@cometchat/calls-sdk-react-native 4.0.0-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/android/build.gradle +20 -0
- package/android/src/main/AndroidManifest.xml +8 -0
- package/android/src/main/java/com/CometChatCalls/AudioDeviceHandlerGeneric.java +213 -0
- package/android/src/main/java/com/CometChatCalls/AudioDeviceHandlerLegacy.java +213 -0
- package/android/src/main/java/com/CometChatCalls/AudioModeModule.java +456 -0
- package/android/src/main/java/com/CometChatCalls/BluetoothHeadsetMonitor.java +174 -0
- package/android/src/main/java/com/CometChatCalls/CometChatCallsPackage.java +45 -0
- package/cometchat-calls-sdk-react-native.podspec +21 -0
- package/dist/CometChatErrorConstants.d.ts +124 -0
- package/dist/Constants.d.ts +720 -0
- package/dist/Helper copy.d.ts +1 -0
- package/dist/Helper.d.ts +7 -0
- package/dist/api/APIHandler.d.ts +6 -0
- package/dist/api/endpoints.d.ts +6 -0
- package/dist/api/helper.d.ts +63 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/constants/CallConstants.d.ts +136 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/defaultCallsettings.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +128 -0
- package/dist/models/CallAppSettings.d.ts +42 -0
- package/dist/models/CallSettings.d.ts +316 -0
- package/dist/models/CometChatCalls.d.ts +89 -0
- package/dist/models/CometChatCallsComponent.d.ts +13 -0
- package/dist/models/CometChatCallsComponentCore.d.ts +18 -0
- package/dist/models/CometChatCallsException.d.ts +7 -0
- package/dist/models/CometChatPresenterComponent.d.ts +13 -0
- package/dist/models/ErrorModel.d.ts +11 -0
- package/dist/models/Listner.d.ts +64 -0
- package/dist/models/ListnerHandler.d.ts +10 -0
- package/dist/models/MessageComponent.d.ts +7 -0
- package/dist/models/PresenterSettings.d.ts +194 -0
- package/dist/models/RTCUser.d.ts +18 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/types/ICallAppSettings.d.ts +6 -0
- package/dist/types/ICallSettings.d.ts +60 -0
- package/dist/types/RTCUser.d.ts +6 -0
- package/dist/types/callEvents.d.ts +53 -0
- package/dist/types/common.d.ts +17 -0
- package/dist/types/index.d.ts +2 -0
- package/ios/AudioMode.h +11 -0
- package/ios/AudioMode.m +403 -0
- package/ios/JitsiAudioSession+Private.h +25 -0
- package/ios/JitsiAudioSession.h +17 -0
- package/ios/JitsiAudioSession.m +34 -0
- package/ios/LogUtils.h +23 -0
- package/ios/react-native-calls2.xcodeproj/project.pbxproj +269 -0
- package/package.json +122 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
var eh=Object.defineProperty,th=Object.defineProperties;var nh=Object.getOwnPropertyDescriptors;var Lo=Object.getOwnPropertySymbols,rh=Object.getPrototypeOf,Fl=Object.prototype.hasOwnProperty,jl=Object.prototype.propertyIsEnumerable,ih=Reflect.get;var ja=(S,d,o)=>d in S?eh(S,d,{enumerable:!0,configurable:!0,writable:!0,value:o}):S[d]=o,Ft=(S,d)=>{for(var o in d||(d={}))Fl.call(d,o)&&ja(S,o,d[o]);if(Lo)for(var o of Lo(d))jl.call(d,o)&&ja(S,o,d[o]);return S},fn=(S,d)=>th(S,nh(d));var ro=(S,d)=>{var o={};for(var l in S)Fl.call(S,l)&&d.indexOf(l)<0&&(o[l]=S[l]);if(S!=null&&Lo)for(var l of Lo(S))d.indexOf(l)<0&&jl.call(S,l)&&(o[l]=S[l]);return o};var bt=(S,d,o)=>(ja(S,typeof d!="symbol"?d+"":d,o),o);var Vl=(S,d,o)=>ih(rh(S),o,d);var fr=(S,d,o)=>new Promise((l,v)=>{var m=h=>{try{j(o.next(h))}catch(g){v(g)}},y=h=>{try{j(o.throw(h))}catch(g){v(g)}},j=h=>h.done?l(h.value):Promise.resolve(h.value).then(m,y);j((o=o.apply(S,d)).next())});(function(d,o){if(typeof exports=="object"&&typeof module=="object")module.exports=o(require("react"),require("react-native"),require("react-native-webrtc"),require("react-native-background-timer"),require("@react-native-async-storage/async-storage"),require("react-native-callstats/csio-polyfill"),require("react-native-callstats/callstats"));else if(typeof define=="function"&&define.amd)define(["react","react-native","react-native-webrtc","react-native-background-timer","@react-native-async-storage/async-storage","react-native-callstats/csio-polyfill","react-native-callstats/callstats"],o);else{var l=typeof exports=="object"?o(require("react"),require("react-native"),require("react-native-webrtc"),require("react-native-background-timer"),require("@react-native-async-storage/async-storage"),require("react-native-callstats/csio-polyfill"),require("react-native-callstats/callstats")):o(d.react,d["react-native"],d["react-native-webrtc"],d["react-native-background-timer"],d["@react-native-async-storage/async-storage"],d["react-native-callstats/csio-polyfill"],d["react-native-callstats/callstats"]);for(var v in l)(typeof exports=="object"?exports:d)[v]=l[v]}})(self,(__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__925__,__WEBPACK_EXTERNAL_MODULE__941__,__WEBPACK_EXTERNAL_MODULE__559__,__WEBPACK_EXTERNAL_MODULE__878__,__WEBPACK_EXTERNAL_MODULE__394__,__WEBPACK_EXTERNAL_MODULE__650__)=>(()=>{var __webpack_modules__={173:(module,__unused_webpack_exports,__webpack_require__)=>{/*! For license information please see index.js.LICENSE.txt */(function(S,d){if(!0)module.exports=d(__webpack_require__(156),__webpack_require__(925),__webpack_require__(941),__webpack_require__(559),__webpack_require__(878),__webpack_require__(394),__webpack_require__(650));else var o,l})(self,(__WEBPACK_EXTERNAL_MODULE__8156__,__WEBPACK_EXTERNAL_MODULE__9925__,__WEBPACK_EXTERNAL_MODULE__9941__,__WEBPACK_EXTERNAL_MODULE__5559__,__WEBPACK_EXTERNAL_MODULE__6878__,__WEBPACK_EXTERNAL_MODULE__3394__,__WEBPACK_EXTERNAL_MODULE__3650__)=>(()=>{var __webpack_modules__={6427:(S,d)=>{"use strict";function o(m,y){return y===void 0&&(y=Object),y&&typeof y.freeze=="function"?y.freeze(m):m}var l=o({HTML:"text/html",isHTML:function(m){return m===l.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),v=o({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(m){return m===v.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});d.freeze=o,d.MIME_TYPE=l,d.NAMESPACE=v},9775:(S,d,o)=>{var l=o(6427),v=o(8368),m=o(985),y=o(4751),j=v.DOMImplementation,h=l.NAMESPACE,g=y.ParseError,A=y.XMLReader;function I(P){this.options=P||{locator:{}}}function O(){this.cdata=!1}function x(P,z){z.lineNumber=P.lineNumber,z.columnNumber=P.columnNumber}function U(P,z,ue){return typeof P=="string"?P.substr(z,ue):P.length>=z+ue||z?new java.lang.String(P,z,ue)+"":P}function G(P,z){P.currentElement?P.currentElement.appendChild(z):P.doc.appendChild(z)}I.prototype.parseFromString=function(P,z){var ue=this.options,pe=new A,Me=ue.domBuilder||new O,rt=ue.errorHandler,be=ue.locator,Te=ue.xmlns||{},C=/\/x?html?$/.test(z),st=C?m.HTML_ENTITIES:m.XML_ENTITIES;return be&&Me.setDocumentLocator(be),pe.errorHandler=function(_e,Oe,Ye){if(!_e){if(Oe instanceof O)return Oe;_e=Oe}var ne={},Ze=_e instanceof Function;function xe(ct){var Qe=_e[ct];!Qe&&Ze&&(Qe=_e.length==2?function(re){_e(ct,re)}:_e),ne[ct]=Qe&&function(re){Qe("[xmldom "+ct+"] "+re+function(f){if(f)return`
|
|
2
|
+
@`+(f.systemId||"")+"#[line:"+f.lineNumber+",col:"+f.columnNumber+"]"}(Ye))}||function(){}}return Ye=Ye||{},xe("warning"),xe("error"),xe("fatalError"),ne}(rt,Me,be),pe.domBuilder=ue.domBuilder||Me,C&&(Te[""]=h.HTML),Te.xml=Te.xml||h.XML,P&&typeof P=="string"?pe.parse(P,Te,st):pe.errorHandler.error("invalid doc source"),Me.doc},O.prototype={startDocument:function(){this.doc=new j().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(P,z,ue,pe){var Me=this.doc,rt=Me.createElementNS(P,ue||z),be=pe.length;G(this,rt),this.currentElement=rt,this.locator&&x(this.locator,rt);for(var Te=0;Te<be;Te++){P=pe.getURI(Te);var C=pe.getValue(Te),st=(ue=pe.getQName(Te),Me.createAttributeNS(P,ue));this.locator&&x(pe.getLocator(Te),st),st.value=st.nodeValue=C,rt.setAttributeNode(st)}},endElement:function(P,z,ue){var pe=this.currentElement;pe.tagName,this.currentElement=pe.parentNode},startPrefixMapping:function(P,z){},endPrefixMapping:function(P){},processingInstruction:function(P,z){var ue=this.doc.createProcessingInstruction(P,z);this.locator&&x(this.locator,ue),G(this,ue)},ignorableWhitespace:function(P,z,ue){},characters:function(P,z,ue){if(P=U.apply(this,arguments)){if(this.cdata)var pe=this.doc.createCDATASection(P);else pe=this.doc.createTextNode(P);this.currentElement?this.currentElement.appendChild(pe):/^\s*$/.test(P)&&this.doc.appendChild(pe),this.locator&&x(this.locator,pe)}},skippedEntity:function(P){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(P){(this.locator=P)&&(P.lineNumber=0)},comment:function(P,z,ue){P=U.apply(this,arguments);var pe=this.doc.createComment(P);this.locator&&x(this.locator,pe),G(this,pe)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(P,z,ue){var pe=this.doc.implementation;if(pe&&pe.createDocumentType){var Me=pe.createDocumentType(P,z,ue);this.locator&&x(this.locator,Me),G(this,Me),this.doc.doctype=Me}},warning:function(P){},error:function(P){},fatalError:function(P){throw new g(P,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(P){O.prototype[P]=function(){return null}}),d.DOMParser=I,v.DOMImplementation,v.XMLSerializer},8368:(S,d,o)=>{var l=o(6427).NAMESPACE;function v(k){return k!==""}function m(k,J){return k.hasOwnProperty(J)||(k[J]=!0),k}function y(k){if(!k)return[];var J=function(Z){return Z?Z.split(/[\t\n\f\r ]+/).filter(v):[]}(k);return Object.keys(J.reduce(m,{}))}function j(k,J){for(var Z in k)J[Z]=k[Z]}function h(k,J){var Z=k.prototype;if(!(Z instanceof J)){let we=function(){};var ie=we;we.prototype=J.prototype,j(Z,we=new we),k.prototype=Z=we}Z.constructor!=k&&(Z.constructor=k)}var g={},A=g.ELEMENT_NODE=1,I=g.ATTRIBUTE_NODE=2,O=g.TEXT_NODE=3,x=g.CDATA_SECTION_NODE=4,U=g.ENTITY_REFERENCE_NODE=5,G=g.ENTITY_NODE=6,P=g.PROCESSING_INSTRUCTION_NODE=7,z=g.COMMENT_NODE=8,ue=g.DOCUMENT_NODE=9,pe=g.DOCUMENT_TYPE_NODE=10,Me=g.DOCUMENT_FRAGMENT_NODE=11,rt=g.NOTATION_NODE=12,be={},Te={},C=(be.INDEX_SIZE_ERR=(Te[1]="Index size error",1),be.DOMSTRING_SIZE_ERR=(Te[2]="DOMString size error",2),be.HIERARCHY_REQUEST_ERR=(Te[3]="Hierarchy request error",3)),st=(be.WRONG_DOCUMENT_ERR=(Te[4]="Wrong document",4),be.INVALID_CHARACTER_ERR=(Te[5]="Invalid character",5),be.NO_DATA_ALLOWED_ERR=(Te[6]="No data allowed",6),be.NO_MODIFICATION_ALLOWED_ERR=(Te[7]="No modification allowed",7),be.NOT_FOUND_ERR=(Te[8]="Not found",8)),_e=(be.NOT_SUPPORTED_ERR=(Te[9]="Not supported",9),be.INUSE_ATTRIBUTE_ERR=(Te[10]="Attribute in use",10));be.INVALID_STATE_ERR=(Te[11]="Invalid state",11),be.SYNTAX_ERR=(Te[12]="Syntax error",12),be.INVALID_MODIFICATION_ERR=(Te[13]="Invalid modification",13),be.NAMESPACE_ERR=(Te[14]="Invalid namespace",14),be.INVALID_ACCESS_ERR=(Te[15]="Invalid access",15);function Oe(k,J){if(J instanceof Error)var Z=J;else Z=this,Error.call(this,Te[k]),this.message=Te[k],Error.captureStackTrace&&Error.captureStackTrace(this,Oe);return Z.code=k,J&&(this.message=this.message+": "+J),Z}function Ye(){}function ne(k,J){this._node=k,this._refresh=J,Ze(this)}function Ze(k){var J=k._node._inc||k._node.ownerDocument._inc;if(k._inc!=J){var Z=k._refresh(k._node);Le(k,"length",Z.length),j(Z,k),k._inc=J}}function xe(){}function ct(k,J){for(var Z=k.length;Z--;)if(k[Z]===J)return Z}function Qe(k,J,Z,ie){if(ie?J[ct(J,ie)]=Z:J[J.length++]=Z,k){Z.ownerElement=k;var we=k.ownerDocument;we&&(ie&&Ae(we,k,ie),function(ke,at,ft){ke&&ke._inc++;var lt=ft.namespaceURI;lt===l.XMLNS&&(at._nsMap[ft.prefix?ft.localName:""]=ft.value)}(we,k,Z))}}function re(k,J,Z){var ie=ct(J,Z);if(!(ie>=0))throw Oe(st,new Error(k.tagName+"@"+Z));for(var we=J.length-1;ie<we;)J[ie]=J[++ie];if(J.length=we,k){var ke=k.ownerDocument;ke&&(Ae(ke,k,Z),Z.ownerElement=null)}}function f(){}function D(){}function H(k){return(k=="<"?"<":k==">"&&">")||k=="&"&&"&"||k=='"'&&"""||"&#"+k.charCodeAt()+";"}function q(k,J){if(J(k))return!0;if(k=k.firstChild)do if(q(k,J))return!0;while(k=k.nextSibling)}function he(){}function Ae(k,J,Z,ie){k&&k._inc++,Z.namespaceURI===l.XMLNS&&delete J._nsMap[Z.prefix?Z.localName:""]}function ce(k,J,Z){if(k&&k._inc){k._inc++;var ie=J.childNodes;if(Z)ie[ie.length++]=Z;else{for(var we=J.firstChild,ke=0;we;)ie[ke++]=we,we=we.nextSibling;ie.length=ke}}}function Se(k,J){var Z=J.previousSibling,ie=J.nextSibling;return Z?Z.nextSibling=ie:k.firstChild=ie,ie?ie.previousSibling=Z:k.lastChild=Z,ce(k.ownerDocument,k),J}function Re(k,J,Z){var ie=J.parentNode;if(ie&&ie.removeChild(J),J.nodeType===Me){var we=J.firstChild;if(we==null)return J;var ke=J.lastChild}else we=ke=J;var at=Z?Z.previousSibling:k.lastChild;we.previousSibling=at,ke.nextSibling=Z,at?at.nextSibling=we:k.firstChild=we,Z==null?k.lastChild=ke:Z.previousSibling=ke;do we.parentNode=k;while(we!==ke&&(we=we.nextSibling));return ce(k.ownerDocument||k,k),J.nodeType==Me&&(J.firstChild=J.lastChild=null),J}function T(){this._nsMap={}}function B(){}function Y(){}function fe(){}function Ne(){}function De(){}function ht(){}function jt(){}function Ge(){}function Ue(){}function Ct(){}function Kt(){}function Yt(){}function Gt(k,J){var Z=[],ie=this.nodeType==9&&this.documentElement||this,we=ie.prefix,ke=ie.namespaceURI;if(ke&&we==null&&(we=ie.lookupPrefix(ke))==null)var at=[{namespace:ke,prefix:null}];return yt(this,Z,k,J,at),Z.join("")}function Bt(k,J,Z){var ie=k.prefix||"",we=k.namespaceURI;if(!we||ie==="xml"&&we===l.XML||we===l.XMLNS)return!1;for(var ke=Z.length;ke--;){var at=Z[ke];if(at.prefix===ie)return at.namespace!==we}return!0}function mn(k,J,Z){k.push(" ",J,'="',Z.replace(/[<&"]/g,H),'"')}function yt(k,J,Z,ie,we){if(we||(we=[]),ie){if(!(k=ie(k)))return;if(typeof k=="string")return void J.push(k)}switch(k.nodeType){case A:var ke=k.attributes,at=ke.length,ft=k.firstChild,lt=k.tagName,ye=lt;if(!(Z=l.isHTML(k.namespaceURI)||Z)&&!k.prefix&&k.namespaceURI){for(var tn,er=0;er<ke.length;er++)if(ke.item(er).name==="xmlns"){tn=ke.item(er).value;break}if(!tn){for(var rr=we.length-1;rr>=0;rr--)if((or=we[rr]).prefix===""&&or.namespace===k.namespaceURI){tn=or.namespace;break}}if(tn!==k.namespaceURI)for(rr=we.length-1;rr>=0;rr--){var or;if((or=we[rr]).namespace===k.namespaceURI){or.prefix&&(ye=or.prefix+":"+lt);break}}}J.push("<",ye);for(var dn=0;dn<at;dn++)(mt=ke.item(dn)).prefix=="xmlns"?we.push({prefix:mt.localName,namespace:mt.value}):mt.nodeName=="xmlns"&&we.push({prefix:"",namespace:mt.value});for(dn=0;dn<at;dn++){var mt,Xt,ae;Bt(mt=ke.item(dn),0,we)&&(mn(J,(Xt=mt.prefix||"")?"xmlns:"+Xt:"xmlns",ae=mt.namespaceURI),we.push({prefix:Xt,namespace:ae})),yt(mt,J,Z,ie,we)}if(lt===ye&&Bt(k,0,we)&&(mn(J,(Xt=k.prefix||"")?"xmlns:"+Xt:"xmlns",ae=k.namespaceURI),we.push({prefix:Xt,namespace:ae})),ft||Z&&!/^(?:meta|link|img|br|hr|input)$/i.test(lt)){if(J.push(">"),Z&&/^script$/i.test(lt))for(;ft;)ft.data?J.push(ft.data):yt(ft,J,Z,ie,we.slice()),ft=ft.nextSibling;else for(;ft;)yt(ft,J,Z,ie,we.slice()),ft=ft.nextSibling;J.push("</",ye,">")}else J.push("/>");return;case ue:case Me:for(ft=k.firstChild;ft;)yt(ft,J,Z,ie,we.slice()),ft=ft.nextSibling;return;case I:return mn(J,k.name,k.value);case O:return J.push(k.data.replace(/[<&]/g,H).replace(/]]>/g,"]]>"));case x:return J.push("<![CDATA[",k.data,"]]>");case z:return J.push("<!--",k.data,"-->");case pe:var ee=k.publicId,Ee=k.systemId;if(J.push("<!DOCTYPE ",k.name),ee)J.push(" PUBLIC ",ee),Ee&&Ee!="."&&J.push(" ",Ee),J.push(">");else if(Ee&&Ee!=".")J.push(" SYSTEM ",Ee,">");else{var ve=k.internalSubset;ve&&J.push(" [",ve,"]"),J.push(">")}return;case P:return J.push("<?",k.target," ",k.data,"?>");case U:return J.push("&",k.nodeName,";");default:J.push("??",k.nodeName)}}function zt(k,J,Z){var ie;switch(J.nodeType){case A:(ie=J.cloneNode(!1)).ownerDocument=k;case Me:break;case I:Z=!0}if(ie||(ie=J.cloneNode(!1)),ie.ownerDocument=k,ie.parentNode=null,Z)for(var we=J.firstChild;we;)ie.appendChild(zt(k,we,Z)),we=we.nextSibling;return ie}function K(k,J,Z){var ie=new J.constructor;for(var we in J){var ke=J[we];typeof ke!="object"&&ke!=ie[we]&&(ie[we]=ke)}switch(J.childNodes&&(ie.childNodes=new Ye),ie.ownerDocument=k,ie.nodeType){case A:var at=J.attributes,ft=ie.attributes=new xe,lt=at.length;ft._ownerElement=ie;for(var ye=0;ye<lt;ye++)ie.setAttributeNode(K(k,at.item(ye),!0));break;case I:Z=!0}if(Z)for(var tn=J.firstChild;tn;)ie.appendChild(K(k,tn,Z)),tn=tn.nextSibling;return ie}function Le(k,J,Z){k[J]=Z}Oe.prototype=Error.prototype,j(be,Oe),Ye.prototype={length:0,item:function(k){return this[k]||null},toString:function(k,J){for(var Z=[],ie=0;ie<this.length;ie++)yt(this[ie],Z,k,J);return Z.join("")}},ne.prototype.item=function(k){return Ze(this),this[k]},h(ne,Ye),xe.prototype={length:0,item:Ye.prototype.item,getNamedItem:function(k){for(var J=this.length;J--;){var Z=this[J];if(Z.nodeName==k)return Z}},setNamedItem:function(k){var J=k.ownerElement;if(J&&J!=this._ownerElement)throw new Oe(_e);var Z=this.getNamedItem(k.nodeName);return Qe(this._ownerElement,this,k,Z),Z},setNamedItemNS:function(k){var J,Z=k.ownerElement;if(Z&&Z!=this._ownerElement)throw new Oe(_e);return J=this.getNamedItemNS(k.namespaceURI,k.localName),Qe(this._ownerElement,this,k,J),J},removeNamedItem:function(k){var J=this.getNamedItem(k);return re(this._ownerElement,this,J),J},removeNamedItemNS:function(k,J){var Z=this.getNamedItemNS(k,J);return re(this._ownerElement,this,Z),Z},getNamedItemNS:function(k,J){for(var Z=this.length;Z--;){var ie=this[Z];if(ie.localName==J&&ie.namespaceURI==k)return ie}return null}},f.prototype={hasFeature:function(k,J){return!0},createDocument:function(k,J,Z){var ie=new he;if(ie.implementation=this,ie.childNodes=new Ye,ie.doctype=Z||null,Z&&ie.appendChild(Z),J){var we=ie.createElementNS(k,J);ie.appendChild(we)}return ie},createDocumentType:function(k,J,Z){var ie=new ht;return ie.name=k,ie.nodeName=k,ie.publicId=J||"",ie.systemId=Z||"",ie}},D.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(k,J){return Re(this,k,J)},replaceChild:function(k,J){this.insertBefore(k,J),J&&this.removeChild(J)},removeChild:function(k){return Se(this,k)},appendChild:function(k){return this.insertBefore(k,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(k){return K(this.ownerDocument||this,this,k)},normalize:function(){for(var k=this.firstChild;k;){var J=k.nextSibling;J&&J.nodeType==O&&k.nodeType==O?(this.removeChild(J),k.appendData(J.data)):(k.normalize(),k=J)}},isSupported:function(k,J){return this.ownerDocument.implementation.hasFeature(k,J)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(k){for(var J=this;J;){var Z=J._nsMap;if(Z){for(var ie in Z)if(Z[ie]==k)return ie}J=J.nodeType==I?J.ownerDocument:J.parentNode}return null},lookupNamespaceURI:function(k){for(var J=this;J;){var Z=J._nsMap;if(Z&&k in Z)return Z[k];J=J.nodeType==I?J.ownerDocument:J.parentNode}return null},isDefaultNamespace:function(k){return this.lookupPrefix(k)==null}},j(g,D),j(g,D.prototype),he.prototype={nodeName:"#document",nodeType:ue,doctype:null,documentElement:null,_inc:1,insertBefore:function(k,J){if(k.nodeType==Me){for(var Z=k.firstChild;Z;){var ie=Z.nextSibling;this.insertBefore(Z,J),Z=ie}return k}return this.documentElement==null&&k.nodeType==A&&(this.documentElement=k),Re(this,k,J),k.ownerDocument=this,k},removeChild:function(k){return this.documentElement==k&&(this.documentElement=null),Se(this,k)},importNode:function(k,J){return zt(this,k,J)},getElementById:function(k){var J=null;return q(this.documentElement,function(Z){if(Z.nodeType==A&&Z.getAttribute("id")==k)return J=Z,!0}),J},getElementsByClassName:function(k){var J=y(k);return new ne(this,function(Z){var ie=[];return J.length>0&&q(Z.documentElement,function(we){if(we!==Z&&we.nodeType===A){var ke=we.getAttribute("class");if(ke){var at=k===ke;if(!at){var ft=y(ke);at=J.every((lt=ft,function(ye){return lt&<.indexOf(ye)!==-1}))}at&&ie.push(we)}}var lt}),ie})},createElement:function(k){var J=new T;return J.ownerDocument=this,J.nodeName=k,J.tagName=k,J.localName=k,J.childNodes=new Ye,(J.attributes=new xe)._ownerElement=J,J},createDocumentFragment:function(){var k=new Ct;return k.ownerDocument=this,k.childNodes=new Ye,k},createTextNode:function(k){var J=new fe;return J.ownerDocument=this,J.appendData(k),J},createComment:function(k){var J=new Ne;return J.ownerDocument=this,J.appendData(k),J},createCDATASection:function(k){var J=new De;return J.ownerDocument=this,J.appendData(k),J},createProcessingInstruction:function(k,J){var Z=new Kt;return Z.ownerDocument=this,Z.tagName=Z.target=k,Z.nodeValue=Z.data=J,Z},createAttribute:function(k){var J=new B;return J.ownerDocument=this,J.name=k,J.nodeName=k,J.localName=k,J.specified=!0,J},createEntityReference:function(k){var J=new Ue;return J.ownerDocument=this,J.nodeName=k,J},createElementNS:function(k,J){var Z=new T,ie=J.split(":"),we=Z.attributes=new xe;return Z.childNodes=new Ye,Z.ownerDocument=this,Z.nodeName=J,Z.tagName=J,Z.namespaceURI=k,ie.length==2?(Z.prefix=ie[0],Z.localName=ie[1]):Z.localName=J,we._ownerElement=Z,Z},createAttributeNS:function(k,J){var Z=new B,ie=J.split(":");return Z.ownerDocument=this,Z.nodeName=J,Z.name=J,Z.namespaceURI=k,Z.specified=!0,ie.length==2?(Z.prefix=ie[0],Z.localName=ie[1]):Z.localName=J,Z}},h(he,D),T.prototype={nodeType:A,hasAttribute:function(k){return this.getAttributeNode(k)!=null},getAttribute:function(k){var J=this.getAttributeNode(k);return J&&J.value||""},getAttributeNode:function(k){return this.attributes.getNamedItem(k)},setAttribute:function(k,J){var Z=this.ownerDocument.createAttribute(k);Z.value=Z.nodeValue=""+J,this.setAttributeNode(Z)},removeAttribute:function(k){var J=this.getAttributeNode(k);J&&this.removeAttributeNode(J)},appendChild:function(k){return k.nodeType===Me?this.insertBefore(k,null):function(J,Z){var ie=Z.parentNode;if(ie){var we=J.lastChild;ie.removeChild(Z),we=J.lastChild}return we=J.lastChild,Z.parentNode=J,Z.previousSibling=we,Z.nextSibling=null,we?we.nextSibling=Z:J.firstChild=Z,J.lastChild=Z,ce(J.ownerDocument,J,Z),Z}(this,k)},setAttributeNode:function(k){return this.attributes.setNamedItem(k)},setAttributeNodeNS:function(k){return this.attributes.setNamedItemNS(k)},removeAttributeNode:function(k){return this.attributes.removeNamedItem(k.nodeName)},removeAttributeNS:function(k,J){var Z=this.getAttributeNodeNS(k,J);Z&&this.removeAttributeNode(Z)},hasAttributeNS:function(k,J){return this.getAttributeNodeNS(k,J)!=null},getAttributeNS:function(k,J){var Z=this.getAttributeNodeNS(k,J);return Z&&Z.value||""},setAttributeNS:function(k,J,Z){var ie=this.ownerDocument.createAttributeNS(k,J);ie.value=ie.nodeValue=""+Z,this.setAttributeNode(ie)},getAttributeNodeNS:function(k,J){return this.attributes.getNamedItemNS(k,J)},getElementsByTagName:function(k){return new ne(this,function(J){var Z=[];return q(J,function(ie){ie===J||ie.nodeType!=A||k!=="*"&&ie.tagName!=k||Z.push(ie)}),Z})},getElementsByTagNameNS:function(k,J){return new ne(this,function(Z){var ie=[];return q(Z,function(we){we===Z||we.nodeType!==A||k!=="*"&&we.namespaceURI!==k||J!=="*"&&we.localName!=J||ie.push(we)}),ie})}},he.prototype.getElementsByTagName=T.prototype.getElementsByTagName,he.prototype.getElementsByTagNameNS=T.prototype.getElementsByTagNameNS,h(T,D),B.prototype.nodeType=I,h(B,D),Y.prototype={data:"",substringData:function(k,J){return this.data.substring(k,k+J)},appendData:function(k){k=this.data+k,this.nodeValue=this.data=k,this.length=k.length},insertData:function(k,J){this.replaceData(k,0,J)},appendChild:function(k){throw new Error(Te[C])},deleteData:function(k,J){this.replaceData(k,J,"")},replaceData:function(k,J,Z){Z=this.data.substring(0,k)+Z+this.data.substring(k+J),this.nodeValue=this.data=Z,this.length=Z.length}},h(Y,D),fe.prototype={nodeName:"#text",nodeType:O,splitText:function(k){var J=this.data,Z=J.substring(k);J=J.substring(0,k),this.data=this.nodeValue=J,this.length=J.length;var ie=this.ownerDocument.createTextNode(Z);return this.parentNode&&this.parentNode.insertBefore(ie,this.nextSibling),ie}},h(fe,Y),Ne.prototype={nodeName:"#comment",nodeType:z},h(Ne,Y),De.prototype={nodeName:"#cdata-section",nodeType:x},h(De,Y),ht.prototype.nodeType=pe,h(ht,D),jt.prototype.nodeType=rt,h(jt,D),Ge.prototype.nodeType=G,h(Ge,D),Ue.prototype.nodeType=U,h(Ue,D),Ct.prototype.nodeName="#document-fragment",Ct.prototype.nodeType=Me,h(Ct,D),Kt.prototype.nodeType=P,h(Kt,D),Yt.prototype.serializeToString=function(k,J,Z){return Gt.call(k,J,Z)},D.prototype.toString=Gt;try{if(Object.defineProperty){let k=function(J){switch(J.nodeType){case A:case Me:var Z=[];for(J=J.firstChild;J;)J.nodeType!==7&&J.nodeType!==8&&Z.push(k(J)),J=J.nextSibling;return Z.join("");default:return J.nodeValue}};var me=k;Object.defineProperty(ne.prototype,"length",{get:function(){return Ze(this),this.$$length}}),Object.defineProperty(D.prototype,"textContent",{get:function(){return k(this)},set:function(J){switch(this.nodeType){case A:case Me:for(;this.firstChild;)this.removeChild(this.firstChild);(J||String(J))&&this.appendChild(this.ownerDocument.createTextNode(J));break;default:this.data=J,this.value=J,this.nodeValue=J}}}),Le=function(J,Z,ie){J["$$"+Z]=ie}}}catch(k){}d.DocumentType=ht,d.DOMException=Oe,d.DOMImplementation=f,d.Element=T,d.Node=D,d.NodeList=Ye,d.XMLSerializer=Yt},985:(S,d,o)=>{var l=o(6427).freeze;d.XML_ENTITIES=l({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),d.HTML_ENTITIES=l({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",divide:"\xF7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",euro:"\u20AC",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),d.entityMap=d.HTML_ENTITIES},1081:(S,d,o)=>{var l=o(8368);l.DOMImplementation,l.XMLSerializer,d.DOMParser=o(9775).DOMParser},4751:(S,d,o)=>{var l=o(6427).NAMESPACE,v=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=new RegExp("[\\-\\.0-9"+v.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),y=new RegExp("^"+v.source+m.source+"*(?::"+v.source+m.source+"*)?$"),j=0,h=1,g=2,A=3,I=4,O=5,x=6,U=7;function G(_e,Oe){this.message=_e,this.locator=Oe,Error.captureStackTrace&&Error.captureStackTrace(this,G)}function P(){}function z(_e,Oe){return Oe.lineNumber=_e.lineNumber,Oe.columnNumber=_e.columnNumber,Oe}function ue(_e,Oe,Ye,ne,Ze,xe){function ct(q,he,Ae){Ye.attributeNames.hasOwnProperty(q)&&xe.fatalError("Attribute "+q+" redefined"),Ye.addValue(q,he,Ae)}for(var Qe,re=++Oe,f=j;;){var D=_e.charAt(re);switch(D){case"=":if(f===h)Qe=_e.slice(Oe,re),f=A;else{if(f!==g)throw new Error("attribute equal must after attrName");f=A}break;case"'":case'"':if(f===A||f===h){if(f===h&&(xe.warning('attribute value must after "="'),Qe=_e.slice(Oe,re)),Oe=re+1,!((re=_e.indexOf(D,Oe))>0))throw new Error("attribute value no end '"+D+"' match");ct(Qe,H=_e.slice(Oe,re).replace(/&#?\w+;/g,Ze),Oe-1),f=O}else{if(f!=I)throw new Error('attribute value must after "="');ct(Qe,H=_e.slice(Oe,re).replace(/&#?\w+;/g,Ze),Oe),xe.warning('attribute "'+Qe+'" missed start quot('+D+")!!"),Oe=re+1,f=O}break;case"/":switch(f){case j:Ye.setTagName(_e.slice(Oe,re));case O:case x:case U:f=U,Ye.closed=!0;case I:case h:case g:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return xe.error("unexpected end of input"),f==j&&Ye.setTagName(_e.slice(Oe,re)),re;case">":switch(f){case j:Ye.setTagName(_e.slice(Oe,re));case O:case x:case U:break;case I:case h:(H=_e.slice(Oe,re)).slice(-1)==="/"&&(Ye.closed=!0,H=H.slice(0,-1));case g:f===g&&(H=Qe),f==I?(xe.warning('attribute "'+H+'" missed quot(")!'),ct(Qe,H.replace(/&#?\w+;/g,Ze),Oe)):(l.isHTML(ne[""])&&H.match(/^(?:disabled|checked|selected)$/i)||xe.warning('attribute "'+H+'" missed value!! "'+H+'" instead!!'),ct(H,H,Oe));break;case A:throw new Error("attribute value missed!!")}return re;case"\x80":D=" ";default:if(D<=" ")switch(f){case j:Ye.setTagName(_e.slice(Oe,re)),f=x;break;case h:Qe=_e.slice(Oe,re),f=g;break;case I:var H=_e.slice(Oe,re).replace(/&#?\w+;/g,Ze);xe.warning('attribute "'+H+'" missed quot(")!!'),ct(Qe,H,Oe);case O:f=x}else switch(f){case g:Ye.tagName,l.isHTML(ne[""])&&Qe.match(/^(?:disabled|checked|selected)$/i)||xe.warning('attribute "'+Qe+'" missed value!! "'+Qe+'" instead2!!'),ct(Qe,Qe,Oe),Oe=re,f=h;break;case O:xe.warning('attribute space is required"'+Qe+'"!!');case x:f=h,Oe=re;break;case A:f=I,Oe=re;break;case U:throw new Error("elements closed character '/' and '>' must be connected to")}}re++}}function pe(_e,Oe,Ye){for(var ne=_e.tagName,Ze=null,xe=_e.length;xe--;){var ct=_e[xe],Qe=ct.qName,re=ct.value;if((q=Qe.indexOf(":"))>0)var f=ct.prefix=Qe.slice(0,q),D=Qe.slice(q+1),H=f==="xmlns"&&D;else D=Qe,f=null,H=Qe==="xmlns"&&"";ct.localName=D,H!==!1&&(Ze==null&&(Ze={},be(Ye,Ye={})),Ye[H]=Ze[H]=re,ct.uri=l.XMLNS,Oe.startPrefixMapping(H,re))}for(xe=_e.length;xe--;)(f=(ct=_e[xe]).prefix)&&(f==="xml"&&(ct.uri=l.XML),f!=="xmlns"&&(ct.uri=Ye[f||""]));var q;(q=ne.indexOf(":"))>0?(f=_e.prefix=ne.slice(0,q),D=_e.localName=ne.slice(q+1)):(f=null,D=_e.localName=ne);var he=_e.uri=Ye[f||""];if(Oe.startElement(he,D,ne,_e),!_e.closed)return _e.currentNSMap=Ye,_e.localNSMap=Ze,!0;if(Oe.endElement(he,D,ne),Ze)for(f in Ze)Oe.endPrefixMapping(f)}function Me(_e,Oe,Ye,ne,Ze){if(/^(?:script|textarea)$/i.test(Ye)){var xe=_e.indexOf("</"+Ye+">",Oe),ct=_e.substring(Oe+1,xe);if(/[&<]/.test(ct))return/^script$/i.test(Ye)?(Ze.characters(ct,0,ct.length),xe):(ct=ct.replace(/&#?\w+;/g,ne),Ze.characters(ct,0,ct.length),xe)}return Oe+1}function rt(_e,Oe,Ye,ne){var Ze=ne[Ye];return Ze==null&&((Ze=_e.lastIndexOf("</"+Ye+">"))<Oe&&(Ze=_e.lastIndexOf("</"+Ye)),ne[Ye]=Ze),Ze<Oe}function be(_e,Oe){for(var Ye in _e)Oe[Ye]=_e[Ye]}function Te(_e,Oe,Ye,ne){if(_e.charAt(Oe+2)==="-")return _e.charAt(Oe+3)==="-"?(Ze=_e.indexOf("-->",Oe+4))>Oe?(Ye.comment(_e,Oe+4,Ze-Oe-4),Ze+3):(ne.error("Unclosed comment"),-1):-1;if(_e.substr(Oe+3,6)=="CDATA["){var Ze=_e.indexOf("]]>",Oe+9);return Ye.startCDATA(),Ye.characters(_e,Oe+9,Ze-Oe-9),Ye.endCDATA(),Ze+3}var xe=function(H,q){var he,Ae=[],ce=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(ce.lastIndex=q,ce.exec(H);he=ce.exec(H);)if(Ae.push(he),he[1])return Ae}(_e,Oe),ct=xe.length;if(ct>1&&/!doctype/i.test(xe[0][0])){var Qe=xe[1][0],re=!1,f=!1;ct>3&&(/^public$/i.test(xe[2][0])?(re=xe[3][0],f=ct>4&&xe[4][0]):/^system$/i.test(xe[2][0])&&(f=xe[3][0]));var D=xe[ct-1];return Ye.startDTD(Qe,re,f),Ye.endDTD(),D.index+D[0].length}return-1}function C(_e,Oe,Ye){var ne=_e.indexOf("?>",Oe);if(ne){var Ze=_e.substring(Oe,ne).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return Ze?(Ze[0].length,Ye.processingInstruction(Ze[1],Ze[2]),ne+2):-1}return-1}function st(){this.attributeNames={}}G.prototype=new Error,G.prototype.name=G.name,P.prototype={parse:function(_e,Oe,Ye){var ne=this.domBuilder;ne.startDocument(),be(Oe,Oe={}),function(Ze,xe,ct,Qe,re){function f(zt){if(zt>65535){var K=55296+((zt-=65536)>>10),Le=56320+(1023&zt);return String.fromCharCode(K,Le)}return String.fromCharCode(zt)}function D(zt){var K=zt.slice(1,-1);return K in ct?ct[K]:K.charAt(0)==="#"?f(parseInt(K.substr(1).replace("x","0x"))):(re.error("entity not found:"+zt),zt)}function H(zt){if(zt>B){var K=Ze.substring(B,zt).replace(/&#?\w+;/g,D);Se&&q(B),Qe.characters(K,0,zt-B),B=zt}}function q(zt,K){for(;zt>=Ae&&(K=ce.exec(Ze));)he=K.index,Ae=he+K[0].length,Se.lineNumber++;Se.columnNumber=zt-he+1}for(var he=0,Ae=0,ce=/.*(?:\r\n?|\n)|.*$/g,Se=Qe.locator,Re=[{currentNSMap:xe}],T={},B=0;;){try{var Y=Ze.indexOf("<",B);if(Y<0){if(!Ze.substr(B).match(/^\s*$/)){var fe=Qe.doc,Ne=fe.createTextNode(Ze.substr(B));fe.appendChild(Ne),Qe.currentElement=Ne}return}switch(Y>B&&H(Y),Ze.charAt(Y+1)){case"/":var De=Ze.indexOf(">",Y+3),ht=Ze.substring(Y+2,De).replace(/[ \t\n\r]+$/g,""),jt=Re.pop();De<0?(ht=Ze.substring(Y+2).replace(/[\s<].*/,""),re.error("end tag name: "+ht+" is not complete:"+jt.tagName),De=Y+1+ht.length):ht.match(/\s</)&&(ht=ht.replace(/[\s<].*/,""),re.error("end tag name: "+ht+" maybe not complete"),De=Y+1+ht.length);var Ge=jt.localNSMap,Ue=jt.tagName==ht;if(Ue||jt.tagName&&jt.tagName.toLowerCase()==ht.toLowerCase()){if(Qe.endElement(jt.uri,jt.localName,ht),Ge)for(var Ct in Ge)Qe.endPrefixMapping(Ct);Ue||re.fatalError("end tag name: "+ht+" is not match the current start tagName:"+jt.tagName)}else Re.push(jt);De++;break;case"?":Se&&q(Y),De=C(Ze,Y,Qe);break;case"!":Se&&q(Y),De=Te(Ze,Y,Qe,re);break;default:Se&&q(Y);var Kt=new st,Yt=Re[Re.length-1].currentNSMap,Gt=(De=ue(Ze,Y,Kt,Yt,D,re),Kt.length);if(!Kt.closed&&rt(Ze,De,Kt.tagName,T)&&(Kt.closed=!0,ct.nbsp||re.warning("unclosed xml attribute")),Se&&Gt){for(var Bt=z(Se,{}),mn=0;mn<Gt;mn++){var yt=Kt[mn];q(yt.offset),yt.locator=z(Se,{})}Qe.locator=Bt,pe(Kt,Qe,Yt)&&Re.push(Kt),Qe.locator=Se}else pe(Kt,Qe,Yt)&&Re.push(Kt);l.isHTML(Kt.uri)&&!Kt.closed?De=Me(Ze,De,Kt.tagName,D,Qe):De++}}catch(zt){if(zt instanceof G)throw zt;re.error("element parse error: "+zt),De=-1}De>B?B=De:H(Math.max(Y,B)+1)}}(_e,Oe,Ye,ne,this.errorHandler),ne.endDocument()}},st.prototype={setTagName:function(_e){if(!y.test(_e))throw new Error("invalid tagName:"+_e);this.tagName=_e},addValue:function(_e,Oe,Ye){if(!y.test(_e))throw new Error("invalid attribute:"+_e);this.attributeNames[_e]=this.length,this[this.length++]={qName:_e,value:Oe,offset:Ye}},length:0,getLocalName:function(_e){return this[_e].localName},getLocator:function(_e){return this[_e].locator},getQName:function(_e){return this[_e].qName},getURI:function(_e){return this[_e].uri},getValue:function(_e){return this[_e].value}},d.XMLReader=P,d.ParseError=G},7139:(S,d,o)=>{"use strict";var l=o(1976),v=o(9377),m=o(6056),y=o(3495),j=o(3893),h=o(2371),g=o(4337),A=o(3058),I=o(8846),O=o(8780),x=o(2615),U=Object("a"),G=U[0]!=="a"||!(0 in U),P=O("String.prototype.split");S.exports=function(z){var ue,pe=A(this),Me=G&&x(pe)?P(pe,""):pe,rt=g(Me.length);if(!h(z))throw new TypeError("Array.prototype.map callback must be a function");arguments.length>1&&(ue=arguments[1]);for(var be=l(pe,rt),Te=0;Te<rt;){var C=I(Te);if(j(pe,C)){var st=y(pe,C),_e=v(z,ue,[st,Te,pe]);m(be,C,_e)}Te+=1}return be}},7037:(S,d,o)=>{"use strict";var l=o(7921),v=o(560),m=o(8780),y=o(7139),j=o(2924),h=j(),g=o(4875),A=m("Array.prototype.slice"),I=function(O,x){return v(O),h.apply(O,A(arguments,1))};l(I,{getPolyfill:j,implementation:y,shim:g}),S.exports=I},2924:(S,d,o)=>{"use strict";var l=o(9427),v=o(7139);S.exports=function(){var m=Array.prototype.map;return l(m)?m:v}},4875:(S,d,o)=>{"use strict";var l=o(7921),v=o(2924);S.exports=function(){var m=v();return l(Array.prototype,{map:m},{map:function(){return Array.prototype.map!==m}}),m}},7943:(S,d)=>{"use strict";d.byteLength=function(g){var A=j(g),I=A[0],O=A[1];return 3*(I+O)/4-O},d.toByteArray=function(g){var A,I,O=j(g),x=O[0],U=O[1],G=new v(function(ue,pe,Me){return 3*(pe+Me)/4-Me}(0,x,U)),P=0,z=U>0?x-4:x;for(I=0;I<z;I+=4)A=l[g.charCodeAt(I)]<<18|l[g.charCodeAt(I+1)]<<12|l[g.charCodeAt(I+2)]<<6|l[g.charCodeAt(I+3)],G[P++]=A>>16&255,G[P++]=A>>8&255,G[P++]=255&A;return U===2&&(A=l[g.charCodeAt(I)]<<2|l[g.charCodeAt(I+1)]>>4,G[P++]=255&A),U===1&&(A=l[g.charCodeAt(I)]<<10|l[g.charCodeAt(I+1)]<<4|l[g.charCodeAt(I+2)]>>2,G[P++]=A>>8&255,G[P++]=255&A),G},d.fromByteArray=function(g){for(var A,I=g.length,O=I%3,x=[],U=16383,G=0,P=I-O;G<P;G+=U)x.push(h(g,G,G+U>P?P:G+U));return O===1?(A=g[I-1],x.push(o[A>>2]+o[A<<4&63]+"==")):O===2&&(A=(g[I-2]<<8)+g[I-1],x.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),x.join("")};for(var o=[],l=[],v=typeof Uint8Array!="undefined"?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0;y<64;++y)o[y]=m[y],l[m.charCodeAt(y)]=y;function j(g){var A=g.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=g.indexOf("=");return I===-1&&(I=A),[I,I===A?0:4-I%4]}function h(g,A,I){for(var O,x,U=[],G=A;G<I;G+=3)O=(g[G]<<16&16711680)+(g[G+1]<<8&65280)+(255&g[G+2]),U.push(o[(x=O)>>18&63]+o[x>>12&63]+o[x>>6&63]+o[63&x]);return U.join("")}l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},8780:(S,d,o)=>{"use strict";var l=o(6893),v=o(3862),m=v(l("String.prototype.indexOf"));S.exports=function(y,j){var h=l(y,!!j);return typeof h=="function"&&m(y,".prototype.")>-1?v(h):h}},3862:(S,d,o)=>{"use strict";var l=o(5246),v=o(6893),m=v("%Function.prototype.apply%"),y=v("%Function.prototype.call%"),j=v("%Reflect.apply%",!0)||l.call(y,m),h=v("%Object.getOwnPropertyDescriptor%",!0),g=v("%Object.defineProperty%",!0),A=v("%Math.max%");if(g)try{g({},"a",{value:1})}catch(O){g=null}S.exports=function(O){var x=j(l,y,arguments);return h&&g&&h(x,"length").configurable&&g(x,"length",{value:1+A(0,O.length-(arguments.length-1))}),x};var I=function(){return j(l,m,arguments)};g?g(S.exports,"apply",{value:I}):S.exports.apply=I},7921:(S,d,o)=>{"use strict";var l=o(3818),v=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",m=Object.prototype.toString,y=Array.prototype.concat,j=Object.defineProperty,h=j&&function(){var I={};try{for(var O in j(I,"x",{enumerable:!1,value:I}),I)return!1;return I.x===I}catch(x){return!1}}(),g=function(I,O,x,U){var G;(!(O in I)||typeof(G=U)=="function"&&m.call(G)==="[object Function]"&&U())&&(h?j(I,O,{configurable:!0,enumerable:!1,value:x,writable:!0}):I[O]=x)},A=function(I,O){var x=arguments.length>2?arguments[2]:{},U=l(O);v&&(U=y.call(U,Object.getOwnPropertySymbols(O)));for(var G=0;G<U.length;G+=1)g(I,U[G],O[U[G]],x[U[G]])};A.supportsDescriptors=!!h,S.exports=A},9427:S=>{S.exports=function(d){var o=!0,l=!0,v=!1;if(typeof d=="function"){try{d.call("f",function(m,y,j){typeof j!="object"&&(o=!1)}),d.call([null],function(){"use strict";l=typeof this=="string"},"x")}catch(m){v=!0}return!v&&o&&l}return!1}},5670:S=>{var d={}.toString;S.exports=Array.isArray||function(o){return d.call(o)=="[object Array]"}},1157:(S,d,o)=>{"use strict";var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol",v=o(1494),m=o(8625),y=o(5052),j=o(9768);S.exports=function(h){if(v(h))return h;var g,A="default";if(arguments.length>1&&(arguments[1]===String?A="string":arguments[1]===Number&&(A="number")),l&&(Symbol.toPrimitive?g=function(O,x){var U=O[x];if(U!=null){if(!m(U))throw new TypeError(U+" returned for property "+x+" of object "+O+" is not a function");return U}}(h,Symbol.toPrimitive):j(h)&&(g=Symbol.prototype.valueOf)),g!==void 0){var I=g.call(h,A);if(v(I))return I;throw new TypeError("unable to convert exotic object to primitive")}return A==="default"&&(y(h)||j(h))&&(A="string"),function(O,x){if(O==null)throw new TypeError("Cannot call method on "+O);if(typeof x!="string"||x!=="number"&&x!=="string")throw new TypeError('hint must be "string" or "number"');var U,G,P,z=x==="string"?["toString","valueOf"]:["valueOf","toString"];for(P=0;P<z.length;++P)if(U=O[z[P]],m(U)&&(G=U.call(O),v(G)))return G;throw new TypeError("No default value")}(h,A==="default"?"number":A)}},1494:S=>{"use strict";S.exports=function(d){return d===null||typeof d!="function"&&typeof d!="object"}},5929:S=>{"use strict";var d=Array.prototype.slice,o=Object.prototype.toString;S.exports=function(l){var v=this;if(typeof v!="function"||o.call(v)!=="[object Function]")throw new TypeError("Function.prototype.bind called on incompatible "+v);for(var m,y=d.call(arguments,1),j=Math.max(0,v.length-y.length),h=[],g=0;g<j;g++)h.push("$"+g);if(m=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof m){var I=v.apply(this,y.concat(d.call(arguments)));return Object(I)===I?I:this}return v.apply(l,y.concat(d.call(arguments)))}),v.prototype){var A=function(){};A.prototype=v.prototype,m.prototype=new A,A.prototype=null}return m}},5246:(S,d,o)=>{"use strict";var l=o(5929);S.exports=Function.prototype.bind||l},6893:(S,d,o)=>{"use strict";var l,v=SyntaxError,m=Function,y=TypeError,j=function(Oe){try{return m('"use strict"; return ('+Oe+").constructor;")()}catch(Ye){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(Oe){h=null}var g=function(){throw new y},A=h?function(){try{return g}catch(Oe){try{return h(arguments,"callee").get}catch(Ye){return g}}}():g,I=o(5990)(),O=Object.getPrototypeOf||function(Oe){return Oe.__proto__},x={},U=typeof Uint8Array=="undefined"?l:O(Uint8Array),G={"%AggregateError%":typeof AggregateError=="undefined"?l:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?l:ArrayBuffer,"%ArrayIteratorPrototype%":I?O([][Symbol.iterator]()):l,"%AsyncFromSyncIteratorPrototype%":l,"%AsyncFunction%":x,"%AsyncGenerator%":x,"%AsyncGeneratorFunction%":x,"%AsyncIteratorPrototype%":x,"%Atomics%":typeof Atomics=="undefined"?l:Atomics,"%BigInt%":typeof BigInt=="undefined"?l:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?l:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?l:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?l:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?l:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":x,"%Int8Array%":typeof Int8Array=="undefined"?l:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?l:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?l:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I?O(O([][Symbol.iterator]())):l,"%JSON%":typeof JSON=="object"?JSON:l,"%Map%":typeof Map=="undefined"?l:Map,"%MapIteratorPrototype%":typeof Map!="undefined"&&I?O(new Map()[Symbol.iterator]()):l,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?l:Promise,"%Proxy%":typeof Proxy=="undefined"?l:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?l:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?l:Set,"%SetIteratorPrototype%":typeof Set!="undefined"&&I?O(new Set()[Symbol.iterator]()):l,"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?l:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I?O(""[Symbol.iterator]()):l,"%Symbol%":I?Symbol:l,"%SyntaxError%":v,"%ThrowTypeError%":A,"%TypedArray%":U,"%TypeError%":y,"%Uint8Array%":typeof Uint8Array=="undefined"?l:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?l:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?l:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?l:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?l:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?l:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?l:WeakSet},P=function Oe(Ye){var ne;if(Ye==="%AsyncFunction%")ne=j("async function () {}");else if(Ye==="%GeneratorFunction%")ne=j("function* () {}");else if(Ye==="%AsyncGeneratorFunction%")ne=j("async function* () {}");else if(Ye==="%AsyncGenerator%"){var Ze=Oe("%AsyncGeneratorFunction%");Ze&&(ne=Ze.prototype)}else if(Ye==="%AsyncIteratorPrototype%"){var xe=Oe("%AsyncGenerator%");xe&&(ne=O(xe.prototype))}return G[Ye]=ne,ne},z={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ue=o(5246),pe=o(7751),Me=ue.call(Function.call,Array.prototype.concat),rt=ue.call(Function.apply,Array.prototype.splice),be=ue.call(Function.call,String.prototype.replace),Te=ue.call(Function.call,String.prototype.slice),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,st=/\\(\\)?/g,_e=function(Oe,Ye){var ne,Ze=Oe;if(pe(z,Ze)&&(Ze="%"+(ne=z[Ze])[0]+"%"),pe(G,Ze)){var xe=G[Ze];if(xe===x&&(xe=P(Ze)),xe===void 0&&!Ye)throw new y("intrinsic "+Oe+" exists, but is not available. Please file an issue!");return{alias:ne,name:Ze,value:xe}}throw new v("intrinsic "+Oe+" does not exist!")};S.exports=function(Oe,Ye){if(typeof Oe!="string"||Oe.length===0)throw new y("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Ye!="boolean")throw new y('"allowMissing" argument must be a boolean');var ne=function(Se){var Re=Te(Se,0,1),T=Te(Se,-1);if(Re==="%"&&T!=="%")throw new v("invalid intrinsic syntax, expected closing `%`");if(T==="%"&&Re!=="%")throw new v("invalid intrinsic syntax, expected opening `%`");var B=[];return be(Se,C,function(Y,fe,Ne,De){B[B.length]=Ne?be(De,st,"$1"):fe||Y}),B}(Oe),Ze=ne.length>0?ne[0]:"",xe=_e("%"+Ze+"%",Ye),ct=xe.name,Qe=xe.value,re=!1,f=xe.alias;f&&(Ze=f[0],rt(ne,Me([0,1],f)));for(var D=1,H=!0;D<ne.length;D+=1){var q=ne[D],he=Te(q,0,1),Ae=Te(q,-1);if((he==='"'||he==="'"||he==="`"||Ae==='"'||Ae==="'"||Ae==="`")&&he!==Ae)throw new v("property names with quotes must have matching quotes");if(q!=="constructor"&&H||(re=!0),pe(G,ct="%"+(Ze+="."+q)+"%"))Qe=G[ct];else if(Qe!=null){if(!(q in Qe)){if(!Ye)throw new y("base intrinsic for "+Oe+" exists, but the property is not available.");return}if(h&&D+1>=ne.length){var ce=h(Qe,q);Qe=(H=!!ce)&&"get"in ce&&!("originalValue"in ce.get)?ce.get:Qe[q]}else H=pe(Qe,q),Qe=Qe[q];H&&!re&&(G[ct]=Qe)}}return Qe}},5990:(S,d,o)=>{"use strict";var l=typeof Symbol!="undefined"&&Symbol,v=o(3031);S.exports=function(){return typeof l=="function"&&typeof Symbol=="function"&&typeof l("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&v()}},3031:S=>{"use strict";S.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var d={},o=Symbol("test"),l=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;for(o in d[o]=42,d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var v=Object.getOwnPropertySymbols(d);if(v.length!==1||v[0]!==o||!Object.prototype.propertyIsEnumerable.call(d,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var m=Object.getOwnPropertyDescriptor(d,o);if(m.value!==42||m.enumerable!==!0)return!1}return!0}},5994:(S,d,o)=>{"use strict";var l=o(3031);S.exports=function(){return l()&&!!Symbol.toStringTag}},7751:(S,d,o)=>{"use strict";var l=o(5246);S.exports=l.call(Function.call,Object.prototype.hasOwnProperty)},8405:(S,d)=>{d.read=function(o,l,v,m,y){var j,h,g=8*y-m-1,A=(1<<g)-1,I=A>>1,O=-7,x=v?y-1:0,U=v?-1:1,G=o[l+x];for(x+=U,j=G&(1<<-O)-1,G>>=-O,O+=g;O>0;j=256*j+o[l+x],x+=U,O-=8);for(h=j&(1<<-O)-1,j>>=-O,O+=m;O>0;h=256*h+o[l+x],x+=U,O-=8);if(j===0)j=1-I;else{if(j===A)return h?NaN:1/0*(G?-1:1);h+=Math.pow(2,m),j-=I}return(G?-1:1)*h*Math.pow(2,j-m)},d.write=function(o,l,v,m,y,j){var h,g,A,I=8*j-y-1,O=(1<<I)-1,x=O>>1,U=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,G=m?0:j-1,P=m?1:-1,z=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(g=isNaN(l)?1:0,h=O):(h=Math.floor(Math.log(l)/Math.LN2),l*(A=Math.pow(2,-h))<1&&(h--,A*=2),(l+=h+x>=1?U/A:U*Math.pow(2,1-x))*A>=2&&(h++,A/=2),h+x>=O?(g=0,h=O):h+x>=1?(g=(l*A-1)*Math.pow(2,y),h+=x):(g=l*Math.pow(2,x-1)*Math.pow(2,y),h=0));y>=8;o[v+G]=255&g,G+=P,g/=256,y-=8);for(h=h<<y|g,I+=y;I>0;o[v+G]=255&h,G+=P,h/=256,I-=8);o[v+G-P]|=128*z}},2755:(S,d,o)=>{"use strict";var l=o(5994)(),v=o(8780)("Object.prototype.toString"),m=function(h){return!(l&&h&&typeof h=="object"&&Symbol.toStringTag in h)&&v(h)==="[object Arguments]"},y=function(h){return!!m(h)||h!==null&&typeof h=="object"&&typeof h.length=="number"&&h.length>=0&&v(h)!=="[object Array]"&&v(h.callee)==="[object Function]"},j=function(){return m(arguments)}();m.isLegacyArguments=y,S.exports=j?m:y},8625:S=>{"use strict";var d,o,l=Function.prototype.toString,v=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof v=="function"&&typeof Object.defineProperty=="function")try{d=Object.defineProperty({},"length",{get:function(){throw o}}),o={},v(function(){throw 42},null,d)}catch(A){A!==o&&(v=null)}else v=null;var m=/^\s*class\b/,y=function(A){try{var I=l.call(A);return m.test(I)}catch(O){return!1}},j=Object.prototype.toString,h=typeof Symbol=="function"&&!!Symbol.toStringTag,g=typeof document=="object"&&document.all===void 0&&document.all!==void 0?document.all:{};S.exports=v?function(A){if(A===g)return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(typeof A=="function"&&!A.prototype)return!0;try{v(A,null,d)}catch(I){if(I!==o)return!1}return!y(A)}:function(A){if(A===g)return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(typeof A=="function"&&!A.prototype)return!0;if(h)return function(O){try{return!y(O)&&(l.call(O),!0)}catch(x){return!1}}(A);if(y(A))return!1;var I=j.call(A);return I==="[object Function]"||I==="[object GeneratorFunction]"}},5052:(S,d,o)=>{"use strict";var l=Date.prototype.getDay,v=Object.prototype.toString,m=o(5994)();S.exports=function(y){return typeof y=="object"&&y!==null&&(m?function(j){try{return l.call(j),!0}catch(h){return!1}}(y):v.call(y)==="[object Date]")}},8566:S=>{"use strict";var d,o=typeof Map=="function"&&Map.prototype?Map:null,l=typeof Set=="function"&&Set.prototype?Set:null;o||(d=function(y){return!1});var v=o?Map.prototype.has:null,m=l?Set.prototype.has:null;d||v||(d=function(y){return!1}),S.exports=d||function(y){if(!y||typeof y!="object")return!1;try{if(v.call(y),m)try{m.call(y)}catch(j){return!0}return y instanceof o}catch(j){}return!1}},2975:(S,d,o)=>{"use strict";var l,v,m,y,j=o(8780),h=o(5994)();if(h){l=j("Object.prototype.hasOwnProperty"),v=j("RegExp.prototype.exec"),m={};var g=function(){throw m};y={toString:g,valueOf:g},typeof Symbol.toPrimitive=="symbol"&&(y[Symbol.toPrimitive]=g)}var A=j("Object.prototype.toString"),I=Object.getOwnPropertyDescriptor;S.exports=h?function(O){if(!O||typeof O!="object")return!1;var x=I(O,"lastIndex");if(!(x&&l(x,"value")))return!1;try{v(O,y)}catch(U){return U===m}}:function(O){return!(!O||typeof O!="object"&&typeof O!="function")&&A(O)==="[object RegExp]"}},2289:S=>{"use strict";var d,o=typeof Map=="function"&&Map.prototype?Map:null,l=typeof Set=="function"&&Set.prototype?Set:null;l||(d=function(y){return!1});var v=o?Map.prototype.has:null,m=l?Set.prototype.has:null;d||m||(d=function(y){return!1}),S.exports=d||function(y){if(!y||typeof y!="object")return!1;try{if(m.call(y),v)try{v.call(y)}catch(j){return!0}return y instanceof l}catch(j){}return!1}},2615:(S,d,o)=>{"use strict";var l=String.prototype.valueOf,v=Object.prototype.toString,m=o(5994)();S.exports=function(y){return typeof y=="string"||typeof y=="object"&&(m?function(j){try{return l.call(j),!0}catch(h){return!1}}(y):v.call(y)==="[object String]")}},9768:(S,d,o)=>{"use strict";var l=Object.prototype.toString;if(o(5990)()){var v=Symbol.prototype.toString,m=/^Symbol\(.*\)$/;S.exports=function(y){if(typeof y=="symbol")return!0;if(l.call(y)!=="[object Symbol]")return!1;try{return function(j){return typeof j.valueOf()=="symbol"&&m.test(v.call(j))}(y)}catch(j){return!1}}}else S.exports=function(y){return!1}},6247:S=>{"use strict";var d=TypeError;S.exports=function(o){if(!o||typeof o.next!="function")throw new d("iterator must be an object with a `next` method");if(arguments.length>1){var l=arguments[1];if(typeof l!="function")throw new d("`callback`, if provided, must be a function")}for(var v,m=l||[];(v=o.next())&&!v.done;)l?l(v.value):m.push(v.value);if(!l)return m}},6663:function(S,d){var o;(function(l,v){"use strict";typeof S.exports=="object"?S.exports=l.document?v(l,!0):function(m){if(!m.document)throw new Error("jQuery requires a window with a document");return v(m)}:v(l)})(typeof window!="undefined"?window:this,function(l,v){"use strict";var m=[],y=Object.getPrototypeOf,j=m.slice,h=m.flat?function(a){return m.flat.call(a)}:function(a){return m.concat.apply([],a)},g=m.push,A=m.indexOf,I={},O=I.toString,x=I.hasOwnProperty,U=x.toString,G=U.call(Object),P={},z=function(a){return typeof a=="function"&&typeof a.nodeType!="number"},ue=function(a){return a!=null&&a===a.window},pe=l.document,Me={type:!0,src:!0,nonce:!0,noModule:!0};function rt(a,p,E){var M,Q,R=(E=E||pe).createElement("script");if(R.text=a,p)for(M in Me)(Q=p[M]||p.getAttribute&&p.getAttribute(M))&&R.setAttribute(M,Q);E.head.appendChild(R).parentNode.removeChild(R)}function be(a){return a==null?a+"":typeof a=="object"||typeof a=="function"?I[O.call(a)]||"object":typeof a}var Te="3.5.1",C=function(a,p){return new C.fn.init(a,p)};function st(a){var p=!!a&&"length"in a&&a.length,E=be(a);return!z(a)&&!ue(a)&&(E==="array"||p===0||typeof p=="number"&&p>0&&p-1 in a)}C.fn=C.prototype={jquery:Te,constructor:C,length:0,toArray:function(){return j.call(this)},get:function(a){return a==null?j.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var p=C.merge(this.constructor(),a);return p.prevObject=this,p},each:function(a){return C.each(this,a)},map:function(a){return this.pushStack(C.map(this,function(p,E){return a.call(p,E,p)}))},slice:function(){return this.pushStack(j.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,function(a,p){return(p+1)%2}))},odd:function(){return this.pushStack(C.grep(this,function(a,p){return p%2}))},eq:function(a){var p=this.length,E=+a+(a<0?p:0);return this.pushStack(E>=0&&E<p?[this[E]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:m.sort,splice:m.splice},C.extend=C.fn.extend=function(){var a,p,E,M,Q,R,F=arguments[0]||{},_=1,w=arguments.length,V=!1;for(typeof F=="boolean"&&(V=F,F=arguments[_]||{},_++),typeof F=="object"||z(F)||(F={}),_===w&&(F=this,_--);_<w;_++)if((a=arguments[_])!=null)for(p in a)M=a[p],p!=="__proto__"&&F!==M&&(V&&M&&(C.isPlainObject(M)||(Q=Array.isArray(M)))?(E=F[p],R=Q&&!Array.isArray(E)?[]:Q||C.isPlainObject(E)?E:{},Q=!1,F[p]=C.extend(V,R,M)):M!==void 0&&(F[p]=M));return F},C.extend({expando:"jQuery"+(Te+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isPlainObject:function(a){var p,E;return!(!a||O.call(a)!=="[object Object]")&&(!(p=y(a))||typeof(E=x.call(p,"constructor")&&p.constructor)=="function"&&U.call(E)===G)},isEmptyObject:function(a){var p;for(p in a)return!1;return!0},globalEval:function(a,p,E){rt(a,{nonce:p&&p.nonce},E)},each:function(a,p){var E,M=0;if(st(a))for(E=a.length;M<E&&p.call(a[M],M,a[M])!==!1;M++);else for(M in a)if(p.call(a[M],M,a[M])===!1)break;return a},makeArray:function(a,p){var E=p||[];return a!=null&&(st(Object(a))?C.merge(E,typeof a=="string"?[a]:a):g.call(E,a)),E},inArray:function(a,p,E){return p==null?-1:A.call(p,a,E)},merge:function(a,p){for(var E=+p.length,M=0,Q=a.length;M<E;M++)a[Q++]=p[M];return a.length=Q,a},grep:function(a,p,E){for(var M=[],Q=0,R=a.length,F=!E;Q<R;Q++)!p(a[Q],Q)!==F&&M.push(a[Q]);return M},map:function(a,p,E){var M,Q,R=0,F=[];if(st(a))for(M=a.length;R<M;R++)(Q=p(a[R],R,E))!=null&&F.push(Q);else for(R in a)(Q=p(a[R],R,E))!=null&&F.push(Q);return h(F)},guid:1,support:P}),typeof Symbol=="function"&&(C.fn[Symbol.iterator]=m[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,p){I["[object "+p+"]"]=p.toLowerCase()});var _e=function(a){var p,E,M,Q,R,F,_,w,V,W,te,oe,le,Fe,ge,nt,dt,It,kt,Nt="sizzle"+1*new Date,vt=a.document,cn=0,Wt=0,Xe=Hi(),pn=Hi(),Rt=Hi(),Pn=Hi(),gr=function(se,Ce){return se===Ce&&(te=!0),0},vr={}.hasOwnProperty,Gn=[],br=Gn.pop,bn=Gn.push,rn=Gn.push,lr=Gn.slice,Pr=function(se,Ce){for(var je=0,pt=se.length;je<pt;je++)if(se[je]===Ce)return je;return-1},Ur="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Be="[\\x20\\t\\r\\n\\f]",Jn="(?:\\\\[\\da-fA-F]{1,6}"+Be+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",hr="\\["+Be+"*("+Jn+")(?:"+Be+"*([*^$|!~]?=)"+Be+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Jn+"))|)"+Be+"*\\]",Or=":("+Jn+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+hr+")*)|.*)\\)|)",Mt=new RegExp(Be+"+","g"),Ht=new RegExp("^"+Be+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Be+"+$","g"),Nn=new RegExp("^"+Be+"*,"+Be+"*"),as=new RegExp("^"+Be+"*([>+~]|"+Be+")"+Be+"*"),xo=new RegExp(Be+"|>"),Er=new RegExp(Or),Je=new RegExp("^"+Jn+"$"),bi={ID:new RegExp("^#("+Jn+")"),CLASS:new RegExp("^\\.("+Jn+")"),TAG:new RegExp("^("+Jn+"|[*])"),ATTR:new RegExp("^"+hr),PSEUDO:new RegExp("^"+Or),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+Be+"*(even|odd|(([+-]|)(\\d*)n|)"+Be+"*(?:([+-]|)"+Be+"*(\\d+)|))"+Be+"*\\)|)","i"),bool:new RegExp("^(?:"+Ur+")$","i"),needsContext:new RegExp("^"+Be+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+Be+"*((?:-\\d)?\\d*)"+Be+"*\\)|)(?=[^-]|$)","i")},Pi=/HTML$/i,cs=/^(?:input|select|textarea|button)$/i,Oi=/^h\d$/i,Vi=/^[^{]+\{\s*\[native \w/,Ci=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Yi=/[+~]/,Xr=new RegExp("\\\\[\\da-fA-F]{1,6}"+Be+"?|\\\\([^\\r\\n\\f])","g"),Zr=function(se,Ce){var je="0x"+se.slice(1)-65536;return Ce||(je<0?String.fromCharCode(je+65536):String.fromCharCode(je>>10|55296,1023&je|56320))},Fr=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,kr=function(se,Ce){return Ce?se==="\0"?"\uFFFD":se.slice(0,-1)+"\\"+se.charCodeAt(se.length-1).toString(16)+" ":"\\"+se},Xi=function(){oe()},ko=us(function(se){return se.disabled===!0&&se.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{rn.apply(Gn=lr.call(vt.childNodes),vt.childNodes),Gn[vt.childNodes.length].nodeType}catch(se){rn={apply:Gn.length?function(Ce,je){bn.apply(Ce,lr.call(je))}:function(Ce,je){for(var pt=Ce.length,He=0;Ce[pt++]=je[He++];);Ce.length=pt-1}}}function Yn(se,Ce,je,pt){var He,gt,wt,xt,Qt,gn,vn,un=Ce&&Ce.ownerDocument,Mn=Ce?Ce.nodeType:9;if(je=je||[],typeof se!="string"||!se||Mn!==1&&Mn!==9&&Mn!==11)return je;if(!pt&&(oe(Ce),Ce=Ce||le,ge)){if(Mn!==11&&(Qt=Ci.exec(se)))if(He=Qt[1]){if(Mn===9){if(!(wt=Ce.getElementById(He)))return je;if(wt.id===He)return je.push(wt),je}else if(un&&(wt=un.getElementById(He))&&kt(Ce,wt)&&wt.id===He)return je.push(wt),je}else{if(Qt[2])return rn.apply(je,Ce.getElementsByTagName(se)),je;if((He=Qt[3])&&E.getElementsByClassName&&Ce.getElementsByClassName)return rn.apply(je,Ce.getElementsByClassName(He)),je}if(E.qsa&&!Pn[se+" "]&&(!nt||!nt.test(se))&&(Mn!==1||Ce.nodeName.toLowerCase()!=="object")){if(vn=se,un=Ce,Mn===1&&(xo.test(se)||as.test(se))){for((un=Yi.test(se)&&Br(Ce.parentNode)||Ce)===Ce&&E.scope||((xt=Ce.getAttribute("id"))?xt=xt.replace(Fr,kr):Ce.setAttribute("id",xt=Nt)),gt=(gn=F(se)).length;gt--;)gn[gt]=(xt?"#"+xt:":scope")+" "+Di(gn[gt]);vn=gn.join(",")}try{return rn.apply(je,un.querySelectorAll(vn)),je}catch(ir){Pn(se,!0)}finally{xt===Nt&&Ce.removeAttribute("id")}}}return w(se.replace(Ht,"$1"),Ce,je,pt)}function Hi(){var se=[];return function Ce(je,pt){return se.push(je+" ")>M.cacheLength&&delete Ce[se.shift()],Ce[je+" "]=pt}}function yr(se){return se[Nt]=!0,se}function ei(se){var Ce=le.createElement("fieldset");try{return!!se(Ce)}catch(je){return!1}finally{Ce.parentNode&&Ce.parentNode.removeChild(Ce),Ce=null}}function ls(se,Ce){for(var je=se.split("|"),pt=je.length;pt--;)M.attrHandle[je[pt]]=Ce}function Ps(se,Ce){var je=Ce&&se,pt=je&&se.nodeType===1&&Ce.nodeType===1&&se.sourceIndex-Ce.sourceIndex;if(pt)return pt;if(je){for(;je=je.nextSibling;)if(je===Ce)return-1}return se?1:-1}function ds(se){return function(Ce){return Ce.nodeName.toLowerCase()==="input"&&Ce.type===se}}function Os(se){return function(Ce){var je=Ce.nodeName.toLowerCase();return(je==="input"||je==="button")&&Ce.type===se}}function Ds(se){return function(Ce){return"form"in Ce?Ce.parentNode&&Ce.disabled===!1?"label"in Ce?"label"in Ce.parentNode?Ce.parentNode.disabled===se:Ce.disabled===se:Ce.isDisabled===se||Ce.isDisabled!==!se&&ko(Ce)===se:Ce.disabled===se:"label"in Ce&&Ce.disabled===se}}function ti(se){return yr(function(Ce){return Ce=+Ce,yr(function(je,pt){for(var He,gt=se([],je.length,Ce),wt=gt.length;wt--;)je[He=gt[wt]]&&(je[He]=!(pt[He]=je[He]))})})}function Br(se){return se&&se.getElementsByTagName!==void 0&&se}for(p in E=Yn.support={},R=Yn.isXML=function(se){var Ce=se.namespaceURI,je=(se.ownerDocument||se).documentElement;return!Pi.test(Ce||je&&je.nodeName||"HTML")},oe=Yn.setDocument=function(se){var Ce,je,pt=se?se.ownerDocument||se:vt;return pt!=le&&pt.nodeType===9&&pt.documentElement&&(Fe=(le=pt).documentElement,ge=!R(le),vt!=le&&(je=le.defaultView)&&je.top!==je&&(je.addEventListener?je.addEventListener("unload",Xi,!1):je.attachEvent&&je.attachEvent("onunload",Xi)),E.scope=ei(function(He){return Fe.appendChild(He).appendChild(le.createElement("div")),He.querySelectorAll!==void 0&&!He.querySelectorAll(":scope fieldset div").length}),E.attributes=ei(function(He){return He.className="i",!He.getAttribute("className")}),E.getElementsByTagName=ei(function(He){return He.appendChild(le.createComment("")),!He.getElementsByTagName("*").length}),E.getElementsByClassName=Vi.test(le.getElementsByClassName),E.getById=ei(function(He){return Fe.appendChild(He).id=Nt,!le.getElementsByName||!le.getElementsByName(Nt).length}),E.getById?(M.filter.ID=function(He){var gt=He.replace(Xr,Zr);return function(wt){return wt.getAttribute("id")===gt}},M.find.ID=function(He,gt){if(gt.getElementById!==void 0&&ge){var wt=gt.getElementById(He);return wt?[wt]:[]}}):(M.filter.ID=function(He){var gt=He.replace(Xr,Zr);return function(wt){var xt=wt.getAttributeNode!==void 0&&wt.getAttributeNode("id");return xt&&xt.value===gt}},M.find.ID=function(He,gt){if(gt.getElementById!==void 0&&ge){var wt,xt,Qt,gn=gt.getElementById(He);if(gn){if((wt=gn.getAttributeNode("id"))&&wt.value===He)return[gn];for(Qt=gt.getElementsByName(He),xt=0;gn=Qt[xt++];)if((wt=gn.getAttributeNode("id"))&&wt.value===He)return[gn]}return[]}}),M.find.TAG=E.getElementsByTagName?function(He,gt){return gt.getElementsByTagName!==void 0?gt.getElementsByTagName(He):E.qsa?gt.querySelectorAll(He):void 0}:function(He,gt){var wt,xt=[],Qt=0,gn=gt.getElementsByTagName(He);if(He==="*"){for(;wt=gn[Qt++];)wt.nodeType===1&&xt.push(wt);return xt}return gn},M.find.CLASS=E.getElementsByClassName&&function(He,gt){if(gt.getElementsByClassName!==void 0&&ge)return gt.getElementsByClassName(He)},dt=[],nt=[],(E.qsa=Vi.test(le.querySelectorAll))&&(ei(function(He){var gt;Fe.appendChild(He).innerHTML="<a id='"+Nt+"'></a><select id='"+Nt+"-\r\\' msallowcapture=''><option selected=''></option></select>",He.querySelectorAll("[msallowcapture^='']").length&&nt.push("[*^$]="+Be+`*(?:''|"")`),He.querySelectorAll("[selected]").length||nt.push("\\["+Be+"*(?:value|"+Ur+")"),He.querySelectorAll("[id~="+Nt+"-]").length||nt.push("~="),(gt=le.createElement("input")).setAttribute("name",""),He.appendChild(gt),He.querySelectorAll("[name='']").length||nt.push("\\["+Be+"*name"+Be+"*="+Be+`*(?:''|"")`),He.querySelectorAll(":checked").length||nt.push(":checked"),He.querySelectorAll("a#"+Nt+"+*").length||nt.push(".#.+[+~]"),He.querySelectorAll("\\\f"),nt.push("[\\r\\n\\f]")}),ei(function(He){He.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var gt=le.createElement("input");gt.setAttribute("type","hidden"),He.appendChild(gt).setAttribute("name","D"),He.querySelectorAll("[name=d]").length&&nt.push("name"+Be+"*[*^$|!~]?="),He.querySelectorAll(":enabled").length!==2&&nt.push(":enabled",":disabled"),Fe.appendChild(He).disabled=!0,He.querySelectorAll(":disabled").length!==2&&nt.push(":enabled",":disabled"),He.querySelectorAll("*,:x"),nt.push(",.*:")})),(E.matchesSelector=Vi.test(It=Fe.matches||Fe.webkitMatchesSelector||Fe.mozMatchesSelector||Fe.oMatchesSelector||Fe.msMatchesSelector))&&ei(function(He){E.disconnectedMatch=It.call(He,"*"),It.call(He,"[s!='']:x"),dt.push("!=",Or)}),nt=nt.length&&new RegExp(nt.join("|")),dt=dt.length&&new RegExp(dt.join("|")),Ce=Vi.test(Fe.compareDocumentPosition),kt=Ce||Vi.test(Fe.contains)?function(He,gt){var wt=He.nodeType===9?He.documentElement:He,xt=gt&>.parentNode;return He===xt||!(!xt||xt.nodeType!==1||!(wt.contains?wt.contains(xt):He.compareDocumentPosition&&16&He.compareDocumentPosition(xt)))}:function(He,gt){if(gt){for(;gt=gt.parentNode;)if(gt===He)return!0}return!1},gr=Ce?function(He,gt){if(He===gt)return te=!0,0;var wt=!He.compareDocumentPosition-!gt.compareDocumentPosition;return wt||(1&(wt=(He.ownerDocument||He)==(gt.ownerDocument||gt)?He.compareDocumentPosition(gt):1)||!E.sortDetached&>.compareDocumentPosition(He)===wt?He==le||He.ownerDocument==vt&&kt(vt,He)?-1:gt==le||gt.ownerDocument==vt&&kt(vt,gt)?1:W?Pr(W,He)-Pr(W,gt):0:4&wt?-1:1)}:function(He,gt){if(He===gt)return te=!0,0;var wt,xt=0,Qt=He.parentNode,gn=gt.parentNode,vn=[He],un=[gt];if(!Qt||!gn)return He==le?-1:gt==le?1:Qt?-1:gn?1:W?Pr(W,He)-Pr(W,gt):0;if(Qt===gn)return Ps(He,gt);for(wt=He;wt=wt.parentNode;)vn.unshift(wt);for(wt=gt;wt=wt.parentNode;)un.unshift(wt);for(;vn[xt]===un[xt];)xt++;return xt?Ps(vn[xt],un[xt]):vn[xt]==vt?-1:un[xt]==vt?1:0}),le},Yn.matches=function(se,Ce){return Yn(se,null,null,Ce)},Yn.matchesSelector=function(se,Ce){if(oe(se),E.matchesSelector&&ge&&!Pn[Ce+" "]&&(!dt||!dt.test(Ce))&&(!nt||!nt.test(Ce)))try{var je=It.call(se,Ce);if(je||E.disconnectedMatch||se.document&&se.document.nodeType!==11)return je}catch(pt){Pn(Ce,!0)}return Yn(Ce,le,null,[se]).length>0},Yn.contains=function(se,Ce){return(se.ownerDocument||se)!=le&&oe(se),kt(se,Ce)},Yn.attr=function(se,Ce){(se.ownerDocument||se)!=le&&oe(se);var je=M.attrHandle[Ce.toLowerCase()],pt=je&&vr.call(M.attrHandle,Ce.toLowerCase())?je(se,Ce,!ge):void 0;return pt!==void 0?pt:E.attributes||!ge?se.getAttribute(Ce):(pt=se.getAttributeNode(Ce))&&pt.specified?pt.value:null},Yn.escape=function(se){return(se+"").replace(Fr,kr)},Yn.error=function(se){throw new Error("Syntax error, unrecognized expression: "+se)},Yn.uniqueSort=function(se){var Ce,je=[],pt=0,He=0;if(te=!E.detectDuplicates,W=!E.sortStable&&se.slice(0),se.sort(gr),te){for(;Ce=se[He++];)Ce===se[He]&&(pt=je.push(He));for(;pt--;)se.splice(je[pt],1)}return W=null,se},Q=Yn.getText=function(se){var Ce,je="",pt=0,He=se.nodeType;if(He){if(He===1||He===9||He===11){if(typeof se.textContent=="string")return se.textContent;for(se=se.firstChild;se;se=se.nextSibling)je+=Q(se)}else if(He===3||He===4)return se.nodeValue}else for(;Ce=se[pt++];)je+=Q(Ce);return je},M=Yn.selectors={cacheLength:50,createPseudo:yr,match:bi,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(se){return se[1]=se[1].replace(Xr,Zr),se[3]=(se[3]||se[4]||se[5]||"").replace(Xr,Zr),se[2]==="~="&&(se[3]=" "+se[3]+" "),se.slice(0,4)},CHILD:function(se){return se[1]=se[1].toLowerCase(),se[1].slice(0,3)==="nth"?(se[3]||Yn.error(se[0]),se[4]=+(se[4]?se[5]+(se[6]||1):2*(se[3]==="even"||se[3]==="odd")),se[5]=+(se[7]+se[8]||se[3]==="odd")):se[3]&&Yn.error(se[0]),se},PSEUDO:function(se){var Ce,je=!se[6]&&se[2];return bi.CHILD.test(se[0])?null:(se[3]?se[2]=se[4]||se[5]||"":je&&Er.test(je)&&(Ce=F(je,!0))&&(Ce=je.indexOf(")",je.length-Ce)-je.length)&&(se[0]=se[0].slice(0,Ce),se[2]=je.slice(0,Ce)),se.slice(0,3))}},filter:{TAG:function(se){var Ce=se.replace(Xr,Zr).toLowerCase();return se==="*"?function(){return!0}:function(je){return je.nodeName&&je.nodeName.toLowerCase()===Ce}},CLASS:function(se){var Ce=Xe[se+" "];return Ce||(Ce=new RegExp("(^|"+Be+")"+se+"("+Be+"|$)"))&&Xe(se,function(je){return Ce.test(typeof je.className=="string"&&je.className||je.getAttribute!==void 0&&je.getAttribute("class")||"")})},ATTR:function(se,Ce,je){return function(pt){var He=Yn.attr(pt,se);return He==null?Ce==="!=":!Ce||(He+="",Ce==="="?He===je:Ce==="!="?He!==je:Ce==="^="?je&&He.indexOf(je)===0:Ce==="*="?je&&He.indexOf(je)>-1:Ce==="$="?je&&He.slice(-je.length)===je:Ce==="~="?(" "+He.replace(Mt," ")+" ").indexOf(je)>-1:Ce==="|="&&(He===je||He.slice(0,je.length+1)===je+"-"))}},CHILD:function(se,Ce,je,pt,He){var gt=se.slice(0,3)!=="nth",wt=se.slice(-4)!=="last",xt=Ce==="of-type";return pt===1&&He===0?function(Qt){return!!Qt.parentNode}:function(Qt,gn,vn){var un,Mn,ir,An,pr,Cr,Dr=gt!==wt?"nextSibling":"previousSibling",nr=Qt.parentNode,jr=xt&&Qt.nodeName.toLowerCase(),Lr=!vn&&!xt,_r=!1;if(nr){if(gt){for(;Dr;){for(An=Qt;An=An[Dr];)if(xt?An.nodeName.toLowerCase()===jr:An.nodeType===1)return!1;Cr=Dr=se==="only"&&!Cr&&"nextSibling"}return!0}if(Cr=[wt?nr.firstChild:nr.lastChild],wt&&Lr){for(_r=(pr=(un=(Mn=(ir=(An=nr)[Nt]||(An[Nt]={}))[An.uniqueID]||(ir[An.uniqueID]={}))[se]||[])[0]===cn&&un[1])&&un[2],An=pr&&nr.childNodes[pr];An=++pr&&An&&An[Dr]||(_r=pr=0)||Cr.pop();)if(An.nodeType===1&&++_r&&An===Qt){Mn[se]=[cn,pr,_r];break}}else if(Lr&&(_r=pr=(un=(Mn=(ir=(An=Qt)[Nt]||(An[Nt]={}))[An.uniqueID]||(ir[An.uniqueID]={}))[se]||[])[0]===cn&&un[1]),_r===!1)for(;(An=++pr&&An&&An[Dr]||(_r=pr=0)||Cr.pop())&&((xt?An.nodeName.toLowerCase()!==jr:An.nodeType!==1)||!++_r||(Lr&&((Mn=(ir=An[Nt]||(An[Nt]={}))[An.uniqueID]||(ir[An.uniqueID]={}))[se]=[cn,_r]),An!==Qt)););return(_r-=He)===pt||_r%pt==0&&_r/pt>=0}}},PSEUDO:function(se,Ce){var je,pt=M.pseudos[se]||M.setFilters[se.toLowerCase()]||Yn.error("unsupported pseudo: "+se);return pt[Nt]?pt(Ce):pt.length>1?(je=[se,se,"",Ce],M.setFilters.hasOwnProperty(se.toLowerCase())?yr(function(He,gt){for(var wt,xt=pt(He,Ce),Qt=xt.length;Qt--;)He[wt=Pr(He,xt[Qt])]=!(gt[wt]=xt[Qt])}):function(He){return pt(He,0,je)}):pt}},pseudos:{not:yr(function(se){var Ce=[],je=[],pt=_(se.replace(Ht,"$1"));return pt[Nt]?yr(function(He,gt,wt,xt){for(var Qt,gn=pt(He,null,xt,[]),vn=He.length;vn--;)(Qt=gn[vn])&&(He[vn]=!(gt[vn]=Qt))}):function(He,gt,wt){return Ce[0]=He,pt(Ce,null,wt,je),Ce[0]=null,!je.pop()}}),has:yr(function(se){return function(Ce){return Yn(se,Ce).length>0}}),contains:yr(function(se){return se=se.replace(Xr,Zr),function(Ce){return(Ce.textContent||Q(Ce)).indexOf(se)>-1}}),lang:yr(function(se){return Je.test(se||"")||Yn.error("unsupported lang: "+se),se=se.replace(Xr,Zr).toLowerCase(),function(Ce){var je;do if(je=ge?Ce.lang:Ce.getAttribute("xml:lang")||Ce.getAttribute("lang"))return(je=je.toLowerCase())===se||je.indexOf(se+"-")===0;while((Ce=Ce.parentNode)&&Ce.nodeType===1);return!1}}),target:function(se){var Ce=a.location&&a.location.hash;return Ce&&Ce.slice(1)===se.id},root:function(se){return se===Fe},focus:function(se){return se===le.activeElement&&(!le.hasFocus||le.hasFocus())&&!!(se.type||se.href||~se.tabIndex)},enabled:Ds(!1),disabled:Ds(!0),checked:function(se){var Ce=se.nodeName.toLowerCase();return Ce==="input"&&!!se.checked||Ce==="option"&&!!se.selected},selected:function(se){return se.parentNode&&se.parentNode.selectedIndex,se.selected===!0},empty:function(se){for(se=se.firstChild;se;se=se.nextSibling)if(se.nodeType<6)return!1;return!0},parent:function(se){return!M.pseudos.empty(se)},header:function(se){return Oi.test(se.nodeName)},input:function(se){return cs.test(se.nodeName)},button:function(se){var Ce=se.nodeName.toLowerCase();return Ce==="input"&&se.type==="button"||Ce==="button"},text:function(se){var Ce;return se.nodeName.toLowerCase()==="input"&&se.type==="text"&&((Ce=se.getAttribute("type"))==null||Ce.toLowerCase()==="text")},first:ti(function(){return[0]}),last:ti(function(se,Ce){return[Ce-1]}),eq:ti(function(se,Ce,je){return[je<0?je+Ce:je]}),even:ti(function(se,Ce){for(var je=0;je<Ce;je+=2)se.push(je);return se}),odd:ti(function(se,Ce){for(var je=1;je<Ce;je+=2)se.push(je);return se}),lt:ti(function(se,Ce,je){for(var pt=je<0?je+Ce:je>Ce?Ce:je;--pt>=0;)se.push(pt);return se}),gt:ti(function(se,Ce,je){for(var pt=je<0?je+Ce:je;++pt<Ce;)se.push(pt);return se})}},M.pseudos.nth=M.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})M.pseudos[p]=ds(p);for(p in{submit:!0,reset:!0})M.pseudos[p]=Os(p);function io(){}function Di(se){for(var Ce=0,je=se.length,pt="";Ce<je;Ce++)pt+=se[Ce].value;return pt}function us(se,Ce,je){var pt=Ce.dir,He=Ce.next,gt=He||pt,wt=je&>==="parentNode",xt=Wt++;return Ce.first?function(Qt,gn,vn){for(;Qt=Qt[pt];)if(Qt.nodeType===1||wt)return se(Qt,gn,vn);return!1}:function(Qt,gn,vn){var un,Mn,ir,An=[cn,xt];if(vn){for(;Qt=Qt[pt];)if((Qt.nodeType===1||wt)&&se(Qt,gn,vn))return!0}else for(;Qt=Qt[pt];)if(Qt.nodeType===1||wt)if(Mn=(ir=Qt[Nt]||(Qt[Nt]={}))[Qt.uniqueID]||(ir[Qt.uniqueID]={}),He&&He===Qt.nodeName.toLowerCase())Qt=Qt[pt]||Qt;else{if((un=Mn[gt])&&un[0]===cn&&un[1]===xt)return An[2]=un[2];if(Mn[gt]=An,An[2]=se(Qt,gn,vn))return!0}return!1}}function hs(se){return se.length>1?function(Ce,je,pt){for(var He=se.length;He--;)if(!se[He](Ce,je,pt))return!1;return!0}:se[0]}function Zi(se,Ce,je,pt,He){for(var gt,wt=[],xt=0,Qt=se.length,gn=Ce!=null;xt<Qt;xt++)(gt=se[xt])&&(je&&!je(gt,pt,He)||(wt.push(gt),gn&&Ce.push(xt)));return wt}function Ms(se,Ce,je,pt,He,gt){return pt&&!pt[Nt]&&(pt=Ms(pt)),He&&!He[Nt]&&(He=Ms(He,gt)),yr(function(wt,xt,Qt,gn){var vn,un,Mn,ir=[],An=[],pr=xt.length,Cr=wt||function(jr,Lr,_r){for(var ni=0,es=Lr.length;ni<es;ni++)Yn(jr,Lr[ni],_r);return _r}(Ce||"*",Qt.nodeType?[Qt]:Qt,[]),Dr=!se||!wt&&Ce?Cr:Zi(Cr,ir,se,Qt,gn),nr=je?He||(wt?se:pr||pt)?[]:xt:Dr;if(je&&je(Dr,nr,Qt,gn),pt)for(vn=Zi(nr,An),pt(vn,[],Qt,gn),un=vn.length;un--;)(Mn=vn[un])&&(nr[An[un]]=!(Dr[An[un]]=Mn));if(wt){if(He||se){if(He){for(vn=[],un=nr.length;un--;)(Mn=nr[un])&&vn.push(Dr[un]=Mn);He(null,nr=[],vn,gn)}for(un=nr.length;un--;)(Mn=nr[un])&&(vn=He?Pr(wt,Mn):ir[un])>-1&&(wt[vn]=!(xt[vn]=Mn))}}else nr=Zi(nr===xt?nr.splice(pr,nr.length):nr),He?He(null,xt,nr,gn):rn.apply(xt,nr)})}function Ns(se){for(var Ce,je,pt,He=se.length,gt=M.relative[se[0].type],wt=gt||M.relative[" "],xt=gt?1:0,Qt=us(function(un){return un===Ce},wt,!0),gn=us(function(un){return Pr(Ce,un)>-1},wt,!0),vn=[function(un,Mn,ir){var An=!gt&&(ir||Mn!==V)||((Ce=Mn).nodeType?Qt(un,Mn,ir):gn(un,Mn,ir));return Ce=null,An}];xt<He;xt++)if(je=M.relative[se[xt].type])vn=[us(hs(vn),je)];else{if((je=M.filter[se[xt].type].apply(null,se[xt].matches))[Nt]){for(pt=++xt;pt<He&&!M.relative[se[pt].type];pt++);return Ms(xt>1&&hs(vn),xt>1&&Di(se.slice(0,xt-1).concat({value:se[xt-2].type===" "?"*":""})).replace(Ht,"$1"),je,xt<pt&&Ns(se.slice(xt,pt)),pt<He&&Ns(se=se.slice(pt)),pt<He&&Di(se))}vn.push(je)}return hs(vn)}return io.prototype=M.filters=M.pseudos,M.setFilters=new io,F=Yn.tokenize=function(se,Ce){var je,pt,He,gt,wt,xt,Qt,gn=pn[se+" "];if(gn)return Ce?0:gn.slice(0);for(wt=se,xt=[],Qt=M.preFilter;wt;){for(gt in je&&!(pt=Nn.exec(wt))||(pt&&(wt=wt.slice(pt[0].length)||wt),xt.push(He=[])),je=!1,(pt=as.exec(wt))&&(je=pt.shift(),He.push({value:je,type:pt[0].replace(Ht," ")}),wt=wt.slice(je.length)),M.filter)!(pt=bi[gt].exec(wt))||Qt[gt]&&!(pt=Qt[gt](pt))||(je=pt.shift(),He.push({value:je,type:gt,matches:pt}),wt=wt.slice(je.length));if(!je)break}return Ce?wt.length:wt?Yn.error(se):pn(se,xt).slice(0)},_=Yn.compile=function(se,Ce){var je,pt=[],He=[],gt=Rt[se+" "];if(!gt){for(Ce||(Ce=F(se)),je=Ce.length;je--;)(gt=Ns(Ce[je]))[Nt]?pt.push(gt):He.push(gt);gt=Rt(se,function(wt,xt){var Qt=xt.length>0,gn=wt.length>0,vn=function(un,Mn,ir,An,pr){var Cr,Dr,nr,jr=0,Lr="0",_r=un&&[],ni=[],es=V,so=un||gn&&M.find.TAG("*",pr),Ls=cn+=es==null?1:Math.random()||.1,Bo=so.length;for(pr&&(V=Mn==le||Mn||pr);Lr!==Bo&&(Cr=so[Lr])!=null;Lr++){if(gn&&Cr){for(Dr=0,Mn||Cr.ownerDocument==le||(oe(Cr),ir=!ge);nr=wt[Dr++];)if(nr(Cr,Mn||le,ir)){An.push(Cr);break}pr&&(cn=Ls)}Qt&&((Cr=!nr&&Cr)&&jr--,un&&_r.push(Cr))}if(jr+=Lr,Qt&&Lr!==jr){for(Dr=0;nr=xt[Dr++];)nr(_r,ni,Mn,ir);if(un){if(jr>0)for(;Lr--;)_r[Lr]||ni[Lr]||(ni[Lr]=br.call(An));ni=Zi(ni)}rn.apply(An,ni),pr&&!un&&ni.length>0&&jr+xt.length>1&&Yn.uniqueSort(An)}return pr&&(cn=Ls,V=es),_r};return Qt?yr(vn):vn}(He,pt)),gt.selector=se}return gt},w=Yn.select=function(se,Ce,je,pt){var He,gt,wt,xt,Qt,gn=typeof se=="function"&&se,vn=!pt&&F(se=gn.selector||se);if(je=je||[],vn.length===1){if((gt=vn[0]=vn[0].slice(0)).length>2&&(wt=gt[0]).type==="ID"&&Ce.nodeType===9&&ge&&M.relative[gt[1].type]){if(!(Ce=(M.find.ID(wt.matches[0].replace(Xr,Zr),Ce)||[])[0]))return je;gn&&(Ce=Ce.parentNode),se=se.slice(gt.shift().value.length)}for(He=bi.needsContext.test(se)?0:gt.length;He--&&(wt=gt[He],!M.relative[xt=wt.type]);)if((Qt=M.find[xt])&&(pt=Qt(wt.matches[0].replace(Xr,Zr),Yi.test(gt[0].type)&&Br(Ce.parentNode)||Ce))){if(gt.splice(He,1),!(se=pt.length&&Di(gt)))return rn.apply(je,pt),je;break}}return(gn||_(se,vn))(pt,Ce,!ge,je,!Ce||Yi.test(se)&&Br(Ce.parentNode)||Ce),je},E.sortStable=Nt.split("").sort(gr).join("")===Nt,E.detectDuplicates=!!te,oe(),E.sortDetached=ei(function(se){return 1&se.compareDocumentPosition(le.createElement("fieldset"))}),ei(function(se){return se.innerHTML="<a href='#'></a>",se.firstChild.getAttribute("href")==="#"})||ls("type|href|height|width",function(se,Ce,je){if(!je)return se.getAttribute(Ce,Ce.toLowerCase()==="type"?1:2)}),E.attributes&&ei(function(se){return se.innerHTML="<input/>",se.firstChild.setAttribute("value",""),se.firstChild.getAttribute("value")===""})||ls("value",function(se,Ce,je){if(!je&&se.nodeName.toLowerCase()==="input")return se.defaultValue}),ei(function(se){return se.getAttribute("disabled")==null})||ls(Ur,function(se,Ce,je){var pt;if(!je)return se[Ce]===!0?Ce.toLowerCase():(pt=se.getAttributeNode(Ce))&&pt.specified?pt.value:null}),Yn}(l);C.find=_e,C.expr=_e.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=_e.uniqueSort,C.text=_e.getText,C.isXMLDoc=_e.isXML,C.contains=_e.contains,C.escapeSelector=_e.escape;var Oe=function(a,p,E){for(var M=[],Q=E!==void 0;(a=a[p])&&a.nodeType!==9;)if(a.nodeType===1){if(Q&&C(a).is(E))break;M.push(a)}return M},Ye=function(a,p){for(var E=[];a;a=a.nextSibling)a.nodeType===1&&a!==p&&E.push(a);return E},ne=C.expr.match.needsContext;function Ze(a,p){return a.nodeName&&a.nodeName.toLowerCase()===p.toLowerCase()}var xe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function ct(a,p,E){return z(p)?C.grep(a,function(M,Q){return!!p.call(M,Q,M)!==E}):p.nodeType?C.grep(a,function(M){return M===p!==E}):typeof p!="string"?C.grep(a,function(M){return A.call(p,M)>-1!==E}):C.filter(p,a,E)}C.filter=function(a,p,E){var M=p[0];return E&&(a=":not("+a+")"),p.length===1&&M.nodeType===1?C.find.matchesSelector(M,a)?[M]:[]:C.find.matches(a,C.grep(p,function(Q){return Q.nodeType===1}))},C.fn.extend({find:function(a){var p,E,M=this.length,Q=this;if(typeof a!="string")return this.pushStack(C(a).filter(function(){for(p=0;p<M;p++)if(C.contains(Q[p],this))return!0}));for(E=this.pushStack([]),p=0;p<M;p++)C.find(a,Q[p],E);return M>1?C.uniqueSort(E):E},filter:function(a){return this.pushStack(ct(this,a||[],!1))},not:function(a){return this.pushStack(ct(this,a||[],!0))},is:function(a){return!!ct(this,typeof a=="string"&&ne.test(a)?C(a):a||[],!1).length}});var Qe,re=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(a,p,E){var M,Q;if(!a)return this;if(E=E||Qe,typeof a=="string"){if(!(M=a[0]==="<"&&a[a.length-1]===">"&&a.length>=3?[null,a,null]:re.exec(a))||!M[1]&&p)return!p||p.jquery?(p||E).find(a):this.constructor(p).find(a);if(M[1]){if(p=p instanceof C?p[0]:p,C.merge(this,C.parseHTML(M[1],p&&p.nodeType?p.ownerDocument||p:pe,!0)),xe.test(M[1])&&C.isPlainObject(p))for(M in p)z(this[M])?this[M](p[M]):this.attr(M,p[M]);return this}return(Q=pe.getElementById(M[2]))&&(this[0]=Q,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):z(a)?E.ready!==void 0?E.ready(a):a(C):C.makeArray(a,this)}).prototype=C.fn,Qe=C(pe);var f=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function H(a,p){for(;(a=a[p])&&a.nodeType!==1;);return a}C.fn.extend({has:function(a){var p=C(a,this),E=p.length;return this.filter(function(){for(var M=0;M<E;M++)if(C.contains(this,p[M]))return!0})},closest:function(a,p){var E,M=0,Q=this.length,R=[],F=typeof a!="string"&&C(a);if(!ne.test(a)){for(;M<Q;M++)for(E=this[M];E&&E!==p;E=E.parentNode)if(E.nodeType<11&&(F?F.index(E)>-1:E.nodeType===1&&C.find.matchesSelector(E,a))){R.push(E);break}}return this.pushStack(R.length>1?C.uniqueSort(R):R)},index:function(a){return a?typeof a=="string"?A.call(C(a),this[0]):A.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,p){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(a,p))))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),C.each({parent:function(a){var p=a.parentNode;return p&&p.nodeType!==11?p:null},parents:function(a){return Oe(a,"parentNode")},parentsUntil:function(a,p,E){return Oe(a,"parentNode",E)},next:function(a){return H(a,"nextSibling")},prev:function(a){return H(a,"previousSibling")},nextAll:function(a){return Oe(a,"nextSibling")},prevAll:function(a){return Oe(a,"previousSibling")},nextUntil:function(a,p,E){return Oe(a,"nextSibling",E)},prevUntil:function(a,p,E){return Oe(a,"previousSibling",E)},siblings:function(a){return Ye((a.parentNode||{}).firstChild,a)},children:function(a){return Ye(a.firstChild)},contents:function(a){return a.contentDocument!=null&&y(a.contentDocument)?a.contentDocument:(Ze(a,"template")&&(a=a.content||a),C.merge([],a.childNodes))}},function(a,p){C.fn[a]=function(E,M){var Q=C.map(this,p,E);return a.slice(-5)!=="Until"&&(M=E),M&&typeof M=="string"&&(Q=C.filter(M,Q)),this.length>1&&(D[a]||C.uniqueSort(Q),f.test(a)&&Q.reverse()),this.pushStack(Q)}});var q=/[^\x20\t\r\n\f]+/g;function he(a){return a}function Ae(a){throw a}function ce(a,p,E,M){var Q;try{a&&z(Q=a.promise)?Q.call(a).done(p).fail(E):a&&z(Q=a.then)?Q.call(a,p,E):p.apply(void 0,[a].slice(M))}catch(R){E.apply(void 0,[R])}}C.Callbacks=function(a){a=typeof a=="string"?function(W){var te={};return C.each(W.match(q)||[],function(oe,le){te[le]=!0}),te}(a):C.extend({},a);var p,E,M,Q,R=[],F=[],_=-1,w=function(){for(Q=Q||a.once,M=p=!0;F.length;_=-1)for(E=F.shift();++_<R.length;)R[_].apply(E[0],E[1])===!1&&a.stopOnFalse&&(_=R.length,E=!1);a.memory||(E=!1),p=!1,Q&&(R=E?[]:"")},V={add:function(){return R&&(E&&!p&&(_=R.length-1,F.push(E)),function W(te){C.each(te,function(oe,le){z(le)?a.unique&&V.has(le)||R.push(le):le&&le.length&&be(le)!=="string"&&W(le)})}(arguments),E&&!p&&w()),this},remove:function(){return C.each(arguments,function(W,te){for(var oe;(oe=C.inArray(te,R,oe))>-1;)R.splice(oe,1),oe<=_&&_--}),this},has:function(W){return W?C.inArray(W,R)>-1:R.length>0},empty:function(){return R&&(R=[]),this},disable:function(){return Q=F=[],R=E="",this},disabled:function(){return!R},lock:function(){return Q=F=[],E||p||(R=E=""),this},locked:function(){return!!Q},fireWith:function(W,te){return Q||(te=[W,(te=te||[]).slice?te.slice():te],F.push(te),p||w()),this},fire:function(){return V.fireWith(this,arguments),this},fired:function(){return!!M}};return V},C.extend({Deferred:function(a){var p=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],E="pending",M={state:function(){return E},always:function(){return Q.done(arguments).fail(arguments),this},catch:function(R){return M.then(null,R)},pipe:function(){var R=arguments;return C.Deferred(function(F){C.each(p,function(_,w){var V=z(R[w[4]])&&R[w[4]];Q[w[1]](function(){var W=V&&V.apply(this,arguments);W&&z(W.promise)?W.promise().progress(F.notify).done(F.resolve).fail(F.reject):F[w[0]+"With"](this,V?[W]:arguments)})}),R=null}).promise()},then:function(R,F,_){var w=0;function V(W,te,oe,le){return function(){var Fe=this,ge=arguments,nt=function(){var It,kt;if(!(W<w)){if((It=oe.apply(Fe,ge))===te.promise())throw new TypeError("Thenable self-resolution");kt=It&&(typeof It=="object"||typeof It=="function")&&It.then,z(kt)?le?kt.call(It,V(w,te,he,le),V(w,te,Ae,le)):(w++,kt.call(It,V(w,te,he,le),V(w,te,Ae,le),V(w,te,he,te.notifyWith))):(oe!==he&&(Fe=void 0,ge=[It]),(le||te.resolveWith)(Fe,ge))}},dt=le?nt:function(){try{nt()}catch(It){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(It,dt.stackTrace),W+1>=w&&(oe!==Ae&&(Fe=void 0,ge=[It]),te.rejectWith(Fe,ge))}};W?dt():(C.Deferred.getStackHook&&(dt.stackTrace=C.Deferred.getStackHook()),l.setTimeout(dt))}}return C.Deferred(function(W){p[0][3].add(V(0,W,z(_)?_:he,W.notifyWith)),p[1][3].add(V(0,W,z(R)?R:he)),p[2][3].add(V(0,W,z(F)?F:Ae))}).promise()},promise:function(R){return R!=null?C.extend(R,M):M}},Q={};return C.each(p,function(R,F){var _=F[2],w=F[5];M[F[1]]=_.add,w&&_.add(function(){E=w},p[3-R][2].disable,p[3-R][3].disable,p[0][2].lock,p[0][3].lock),_.add(F[3].fire),Q[F[0]]=function(){return Q[F[0]+"With"](this===Q?void 0:this,arguments),this},Q[F[0]+"With"]=_.fireWith}),M.promise(Q),a&&a.call(Q,Q),Q},when:function(a){var p=arguments.length,E=p,M=Array(E),Q=j.call(arguments),R=C.Deferred(),F=function(_){return function(w){M[_]=this,Q[_]=arguments.length>1?j.call(arguments):w,--p||R.resolveWith(M,Q)}};if(p<=1&&(ce(a,R.done(F(E)).resolve,R.reject,!p),R.state()==="pending"||z(Q[E]&&Q[E].then)))return R.then();for(;E--;)ce(Q[E],F(E),R.reject);return R.promise()}});var Se=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(a,p){l.console&&l.console.warn&&a&&Se.test(a.name)&&l.console.warn("jQuery.Deferred exception: "+a.message,a.stack,p)},C.readyException=function(a){l.setTimeout(function(){throw a})};var Re=C.Deferred();function T(){pe.removeEventListener("DOMContentLoaded",T),l.removeEventListener("load",T),C.ready()}C.fn.ready=function(a){return Re.then(a).catch(function(p){C.readyException(p)}),this},C.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--C.readyWait:C.isReady)||(C.isReady=!0,a!==!0&&--C.readyWait>0||Re.resolveWith(pe,[C]))}}),C.ready.then=Re.then,pe.readyState==="complete"||pe.readyState!=="loading"&&!pe.documentElement.doScroll?l.setTimeout(C.ready):(pe.addEventListener("DOMContentLoaded",T),l.addEventListener("load",T));var B=function(a,p,E,M,Q,R,F){var _=0,w=a.length,V=E==null;if(be(E)==="object")for(_ in Q=!0,E)B(a,p,_,E[_],!0,R,F);else if(M!==void 0&&(Q=!0,z(M)||(F=!0),V&&(F?(p.call(a,M),p=null):(V=p,p=function(W,te,oe){return V.call(C(W),oe)})),p))for(;_<w;_++)p(a[_],E,F?M:M.call(a[_],_,p(a[_],E)));return Q?a:V?p.call(a):w?p(a[0],E):R},Y=/^-ms-/,fe=/-([a-z])/g;function Ne(a,p){return p.toUpperCase()}function De(a){return a.replace(Y,"ms-").replace(fe,Ne)}var ht=function(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType};function jt(){this.expando=C.expando+jt.uid++}jt.uid=1,jt.prototype={cache:function(a){var p=a[this.expando];return p||(p={},ht(a)&&(a.nodeType?a[this.expando]=p:Object.defineProperty(a,this.expando,{value:p,configurable:!0}))),p},set:function(a,p,E){var M,Q=this.cache(a);if(typeof p=="string")Q[De(p)]=E;else for(M in p)Q[De(M)]=p[M];return Q},get:function(a,p){return p===void 0?this.cache(a):a[this.expando]&&a[this.expando][De(p)]},access:function(a,p,E){return p===void 0||p&&typeof p=="string"&&E===void 0?this.get(a,p):(this.set(a,p,E),E!==void 0?E:p)},remove:function(a,p){var E,M=a[this.expando];if(M!==void 0){if(p!==void 0)for(E=(p=Array.isArray(p)?p.map(De):(p=De(p))in M?[p]:p.match(q)||[]).length;E--;)delete M[p[E]];(p===void 0||C.isEmptyObject(M))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var p=a[this.expando];return p!==void 0&&!C.isEmptyObject(p)}};var Ge=new jt,Ue=new jt,Ct=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Kt=/[A-Z]/g;function Yt(a,p,E){var M;if(E===void 0&&a.nodeType===1)if(M="data-"+p.replace(Kt,"-$&").toLowerCase(),typeof(E=a.getAttribute(M))=="string"){try{E=function(Q){return Q==="true"||Q!=="false"&&(Q==="null"?null:Q===+Q+""?+Q:Ct.test(Q)?JSON.parse(Q):Q)}(E)}catch(Q){}Ue.set(a,p,E)}else E=void 0;return E}C.extend({hasData:function(a){return Ue.hasData(a)||Ge.hasData(a)},data:function(a,p,E){return Ue.access(a,p,E)},removeData:function(a,p){Ue.remove(a,p)},_data:function(a,p,E){return Ge.access(a,p,E)},_removeData:function(a,p){Ge.remove(a,p)}}),C.fn.extend({data:function(a,p){var E,M,Q,R=this[0],F=R&&R.attributes;if(a===void 0){if(this.length&&(Q=Ue.get(R),R.nodeType===1&&!Ge.get(R,"hasDataAttrs"))){for(E=F.length;E--;)F[E]&&(M=F[E].name).indexOf("data-")===0&&(M=De(M.slice(5)),Yt(R,M,Q[M]));Ge.set(R,"hasDataAttrs",!0)}return Q}return typeof a=="object"?this.each(function(){Ue.set(this,a)}):B(this,function(_){var w;if(R&&_===void 0)return(w=Ue.get(R,a))!==void 0||(w=Yt(R,a))!==void 0?w:void 0;this.each(function(){Ue.set(this,a,_)})},null,p,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){Ue.remove(this,a)})}}),C.extend({queue:function(a,p,E){var M;if(a)return p=(p||"fx")+"queue",M=Ge.get(a,p),E&&(!M||Array.isArray(E)?M=Ge.access(a,p,C.makeArray(E)):M.push(E)),M||[]},dequeue:function(a,p){p=p||"fx";var E=C.queue(a,p),M=E.length,Q=E.shift(),R=C._queueHooks(a,p);Q==="inprogress"&&(Q=E.shift(),M--),Q&&(p==="fx"&&E.unshift("inprogress"),delete R.stop,Q.call(a,function(){C.dequeue(a,p)},R)),!M&&R&&R.empty.fire()},_queueHooks:function(a,p){var E=p+"queueHooks";return Ge.get(a,E)||Ge.access(a,E,{empty:C.Callbacks("once memory").add(function(){Ge.remove(a,[p+"queue",E])})})}}),C.fn.extend({queue:function(a,p){var E=2;return typeof a!="string"&&(p=a,a="fx",E--),arguments.length<E?C.queue(this[0],a):p===void 0?this:this.each(function(){var M=C.queue(this,a,p);C._queueHooks(this,a),a==="fx"&&M[0]!=="inprogress"&&C.dequeue(this,a)})},dequeue:function(a){return this.each(function(){C.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,p){var E,M=1,Q=C.Deferred(),R=this,F=this.length,_=function(){--M||Q.resolveWith(R,[R])};for(typeof a!="string"&&(p=a,a=void 0),a=a||"fx";F--;)(E=Ge.get(R[F],a+"queueHooks"))&&E.empty&&(M++,E.empty.add(_));return _(),Q.promise(p)}});var Gt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Bt=new RegExp("^(?:([+-])=|)("+Gt+")([a-z%]*)$","i"),mn=["Top","Right","Bottom","Left"],yt=pe.documentElement,zt=function(a){return C.contains(a.ownerDocument,a)},K={composed:!0};yt.getRootNode&&(zt=function(a){return C.contains(a.ownerDocument,a)||a.getRootNode(K)===a.ownerDocument});var Le=function(a,p){return(a=p||a).style.display==="none"||a.style.display===""&&zt(a)&&C.css(a,"display")==="none"};function me(a,p,E,M){var Q,R,F=20,_=M?function(){return M.cur()}:function(){return C.css(a,p,"")},w=_(),V=E&&E[3]||(C.cssNumber[p]?"":"px"),W=a.nodeType&&(C.cssNumber[p]||V!=="px"&&+w)&&Bt.exec(C.css(a,p));if(W&&W[3]!==V){for(w/=2,V=V||W[3],W=+w||1;F--;)C.style(a,p,W+V),(1-R)*(1-(R=_()/w||.5))<=0&&(F=0),W/=R;W*=2,C.style(a,p,W+V),E=E||[]}return E&&(W=+W||+w||0,Q=E[1]?W+(E[1]+1)*E[2]:+E[2],M&&(M.unit=V,M.start=W,M.end=Q)),Q}var k={};function J(a){var p,E=a.ownerDocument,M=a.nodeName,Q=k[M];return Q||(p=E.body.appendChild(E.createElement(M)),Q=C.css(p,"display"),p.parentNode.removeChild(p),Q==="none"&&(Q="block"),k[M]=Q,Q)}function Z(a,p){for(var E,M,Q=[],R=0,F=a.length;R<F;R++)(M=a[R]).style&&(E=M.style.display,p?(E==="none"&&(Q[R]=Ge.get(M,"display")||null,Q[R]||(M.style.display="")),M.style.display===""&&Le(M)&&(Q[R]=J(M))):E!=="none"&&(Q[R]="none",Ge.set(M,"display",E)));for(R=0;R<F;R++)Q[R]!=null&&(a[R].style.display=Q[R]);return a}C.fn.extend({show:function(){return Z(this,!0)},hide:function(){return Z(this)},toggle:function(a){return typeof a=="boolean"?a?this.show():this.hide():this.each(function(){Le(this)?C(this).show():C(this).hide()})}});var ie,we,ke=/^(?:checkbox|radio)$/i,at=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ft=/^$|^module$|\/(?:java|ecma)script/i;ie=pe.createDocumentFragment().appendChild(pe.createElement("div")),(we=pe.createElement("input")).setAttribute("type","radio"),we.setAttribute("checked","checked"),we.setAttribute("name","t"),ie.appendChild(we),P.checkClone=ie.cloneNode(!0).cloneNode(!0).lastChild.checked,ie.innerHTML="<textarea>x</textarea>",P.noCloneChecked=!!ie.cloneNode(!0).lastChild.defaultValue,ie.innerHTML="<option></option>",P.option=!!ie.lastChild;var lt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ye(a,p){var E;return E=a.getElementsByTagName!==void 0?a.getElementsByTagName(p||"*"):a.querySelectorAll!==void 0?a.querySelectorAll(p||"*"):[],p===void 0||p&&Ze(a,p)?C.merge([a],E):E}function tn(a,p){for(var E=0,M=a.length;E<M;E++)Ge.set(a[E],"globalEval",!p||Ge.get(p[E],"globalEval"))}lt.tbody=lt.tfoot=lt.colgroup=lt.caption=lt.thead,lt.th=lt.td,P.option||(lt.optgroup=lt.option=[1,"<select multiple='multiple'>","</select>"]);var er=/<|&#?\w+;/;function rr(a,p,E,M,Q){for(var R,F,_,w,V,W,te=p.createDocumentFragment(),oe=[],le=0,Fe=a.length;le<Fe;le++)if((R=a[le])||R===0)if(be(R)==="object")C.merge(oe,R.nodeType?[R]:R);else if(er.test(R)){for(F=F||te.appendChild(p.createElement("div")),_=(at.exec(R)||["",""])[1].toLowerCase(),w=lt[_]||lt._default,F.innerHTML=w[1]+C.htmlPrefilter(R)+w[2],W=w[0];W--;)F=F.lastChild;C.merge(oe,F.childNodes),(F=te.firstChild).textContent=""}else oe.push(p.createTextNode(R));for(te.textContent="",le=0;R=oe[le++];)if(M&&C.inArray(R,M)>-1)Q&&Q.push(R);else if(V=zt(R),F=ye(te.appendChild(R),"script"),V&&tn(F),E)for(W=0;R=F[W++];)ft.test(R.type||"")&&E.push(R);return te}var or=/^key/,dn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,mt=/^([^.]*)(?:\.(.+)|)/;function Xt(){return!0}function ae(){return!1}function ee(a,p){return a===function(){try{return pe.activeElement}catch(E){}}()==(p==="focus")}function Ee(a,p,E,M,Q,R){var F,_;if(typeof p=="object"){for(_ in typeof E!="string"&&(M=M||E,E=void 0),p)Ee(a,_,E,M,p[_],R);return a}if(M==null&&Q==null?(Q=E,M=E=void 0):Q==null&&(typeof E=="string"?(Q=M,M=void 0):(Q=M,M=E,E=void 0)),Q===!1)Q=ae;else if(!Q)return a;return R===1&&(F=Q,Q=function(w){return C().off(w),F.apply(this,arguments)},Q.guid=F.guid||(F.guid=C.guid++)),a.each(function(){C.event.add(this,p,Q,M,E)})}function ve(a,p,E){E?(Ge.set(a,p,!1),C.event.add(a,p,{namespace:!1,handler:function(M){var Q,R,F=Ge.get(this,p);if(1&M.isTrigger&&this[p]){if(F.length)(C.event.special[p]||{}).delegateType&&M.stopPropagation();else if(F=j.call(arguments),Ge.set(this,p,F),Q=E(this,p),this[p](),F!==(R=Ge.get(this,p))||Q?Ge.set(this,p,!1):R={},F!==R)return M.stopImmediatePropagation(),M.preventDefault(),R.value}else F.length&&(Ge.set(this,p,{value:C.event.trigger(C.extend(F[0],C.Event.prototype),F.slice(1),this)}),M.stopImmediatePropagation())}})):Ge.get(a,p)===void 0&&C.event.add(a,p,Xt)}C.event={global:{},add:function(a,p,E,M,Q){var R,F,_,w,V,W,te,oe,le,Fe,ge,nt=Ge.get(a);if(ht(a))for(E.handler&&(E=(R=E).handler,Q=R.selector),Q&&C.find.matchesSelector(yt,Q),E.guid||(E.guid=C.guid++),(w=nt.events)||(w=nt.events=Object.create(null)),(F=nt.handle)||(F=nt.handle=function(dt){return C!==void 0&&C.event.triggered!==dt.type?C.event.dispatch.apply(a,arguments):void 0}),V=(p=(p||"").match(q)||[""]).length;V--;)le=ge=(_=mt.exec(p[V])||[])[1],Fe=(_[2]||"").split(".").sort(),le&&(te=C.event.special[le]||{},le=(Q?te.delegateType:te.bindType)||le,te=C.event.special[le]||{},W=C.extend({type:le,origType:ge,data:M,handler:E,guid:E.guid,selector:Q,needsContext:Q&&C.expr.match.needsContext.test(Q),namespace:Fe.join(".")},R),(oe=w[le])||((oe=w[le]=[]).delegateCount=0,te.setup&&te.setup.call(a,M,Fe,F)!==!1||a.addEventListener&&a.addEventListener(le,F)),te.add&&(te.add.call(a,W),W.handler.guid||(W.handler.guid=E.guid)),Q?oe.splice(oe.delegateCount++,0,W):oe.push(W),C.event.global[le]=!0)},remove:function(a,p,E,M,Q){var R,F,_,w,V,W,te,oe,le,Fe,ge,nt=Ge.hasData(a)&&Ge.get(a);if(nt&&(w=nt.events)){for(V=(p=(p||"").match(q)||[""]).length;V--;)if(le=ge=(_=mt.exec(p[V])||[])[1],Fe=(_[2]||"").split(".").sort(),le){for(te=C.event.special[le]||{},oe=w[le=(M?te.delegateType:te.bindType)||le]||[],_=_[2]&&new RegExp("(^|\\.)"+Fe.join("\\.(?:.*\\.|)")+"(\\.|$)"),F=R=oe.length;R--;)W=oe[R],!Q&&ge!==W.origType||E&&E.guid!==W.guid||_&&!_.test(W.namespace)||M&&M!==W.selector&&(M!=="**"||!W.selector)||(oe.splice(R,1),W.selector&&oe.delegateCount--,te.remove&&te.remove.call(a,W));F&&!oe.length&&(te.teardown&&te.teardown.call(a,Fe,nt.handle)!==!1||C.removeEvent(a,le,nt.handle),delete w[le])}else for(le in w)C.event.remove(a,le+p[V],E,M,!0);C.isEmptyObject(w)&&Ge.remove(a,"handle events")}},dispatch:function(a){var p,E,M,Q,R,F,_=new Array(arguments.length),w=C.event.fix(a),V=(Ge.get(this,"events")||Object.create(null))[w.type]||[],W=C.event.special[w.type]||{};for(_[0]=w,p=1;p<arguments.length;p++)_[p]=arguments[p];if(w.delegateTarget=this,!W.preDispatch||W.preDispatch.call(this,w)!==!1){for(F=C.event.handlers.call(this,w,V),p=0;(Q=F[p++])&&!w.isPropagationStopped();)for(w.currentTarget=Q.elem,E=0;(R=Q.handlers[E++])&&!w.isImmediatePropagationStopped();)w.rnamespace&&R.namespace!==!1&&!w.rnamespace.test(R.namespace)||(w.handleObj=R,w.data=R.data,(M=((C.event.special[R.origType]||{}).handle||R.handler).apply(Q.elem,_))!==void 0&&(w.result=M)===!1&&(w.preventDefault(),w.stopPropagation()));return W.postDispatch&&W.postDispatch.call(this,w),w.result}},handlers:function(a,p){var E,M,Q,R,F,_=[],w=p.delegateCount,V=a.target;if(w&&V.nodeType&&!(a.type==="click"&&a.button>=1)){for(;V!==this;V=V.parentNode||this)if(V.nodeType===1&&(a.type!=="click"||V.disabled!==!0)){for(R=[],F={},E=0;E<w;E++)F[Q=(M=p[E]).selector+" "]===void 0&&(F[Q]=M.needsContext?C(Q,this).index(V)>-1:C.find(Q,this,null,[V]).length),F[Q]&&R.push(M);R.length&&_.push({elem:V,handlers:R})}}return V=this,w<p.length&&_.push({elem:V,handlers:p.slice(w)}),_},addProp:function(a,p){Object.defineProperty(C.Event.prototype,a,{enumerable:!0,configurable:!0,get:z(p)?function(){if(this.originalEvent)return p(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(E){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:E})}})},fix:function(a){return a[C.expando]?a:new C.Event(a)},special:{load:{noBubble:!0},click:{setup:function(a){var p=this||a;return ke.test(p.type)&&p.click&&Ze(p,"input")&&ve(p,"click",Xt),!1},trigger:function(a){var p=this||a;return ke.test(p.type)&&p.click&&Ze(p,"input")&&ve(p,"click"),!0},_default:function(a){var p=a.target;return ke.test(p.type)&&p.click&&Ze(p,"input")&&Ge.get(p,"click")||Ze(p,"a")}},beforeunload:{postDispatch:function(a){a.result!==void 0&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},C.removeEvent=function(a,p,E){a.removeEventListener&&a.removeEventListener(p,E)},C.Event=function(a,p){if(!(this instanceof C.Event))return new C.Event(a,p);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.defaultPrevented===void 0&&a.returnValue===!1?Xt:ae,this.target=a.target&&a.target.nodeType===3?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,p&&C.extend(this,p),this.timeStamp=a&&a.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:ae,isPropagationStopped:ae,isImmediatePropagationStopped:ae,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Xt,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Xt,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Xt,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var p=a.button;return a.which==null&&or.test(a.type)?a.charCode!=null?a.charCode:a.keyCode:!a.which&&p!==void 0&&dn.test(a.type)?1&p?1:2&p?3:4&p?2:0:a.which}},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},function(a,p){C.event.special[a]={setup:function(){return ve(this,a,ee),!1},trigger:function(){return ve(this,a),!0},delegateType:p}}),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,p){C.event.special[a]={delegateType:p,bindType:p,handle:function(E){var M,Q=E.relatedTarget,R=E.handleObj;return Q&&(Q===this||C.contains(this,Q))||(E.type=R.origType,M=R.handler.apply(this,arguments),E.type=p),M}}}),C.fn.extend({on:function(a,p,E,M){return Ee(this,a,p,E,M)},one:function(a,p,E,M){return Ee(this,a,p,E,M,1)},off:function(a,p,E){var M,Q;if(a&&a.preventDefault&&a.handleObj)return M=a.handleObj,C(a.delegateTarget).off(M.namespace?M.origType+"."+M.namespace:M.origType,M.selector,M.handler),this;if(typeof a=="object"){for(Q in a)this.off(Q,p,a[Q]);return this}return p!==!1&&typeof p!="function"||(E=p,p=void 0),E===!1&&(E=ae),this.each(function(){C.event.remove(this,a,E,p)})}});var et=/<script|<style|<link/i,We=/checked\s*(?:[^=]|=\s*.checked.)/i,Ot=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function _t(a,p){return Ze(a,"table")&&Ze(p.nodeType!==11?p:p.firstChild,"tr")&&C(a).children("tbody")[0]||a}function Vt(a){return a.type=(a.getAttribute("type")!==null)+"/"+a.type,a}function Tt(a){return(a.type||"").slice(0,5)==="true/"?a.type=a.type.slice(5):a.removeAttribute("type"),a}function nn(a,p){var E,M,Q,R,F,_;if(p.nodeType===1){if(Ge.hasData(a)&&(_=Ge.get(a).events))for(Q in Ge.remove(p,"handle events"),_)for(E=0,M=_[Q].length;E<M;E++)C.event.add(p,Q,_[Q][E]);Ue.hasData(a)&&(R=Ue.access(a),F=C.extend({},R),Ue.set(p,F))}}function In(a,p){var E=p.nodeName.toLowerCase();E==="input"&&ke.test(a.type)?p.checked=a.checked:E!=="input"&&E!=="textarea"||(p.defaultValue=a.defaultValue)}function Xn(a,p,E,M){p=h(p);var Q,R,F,_,w,V,W=0,te=a.length,oe=te-1,le=p[0],Fe=z(le);if(Fe||te>1&&typeof le=="string"&&!P.checkClone&&We.test(le))return a.each(function(ge){var nt=a.eq(ge);Fe&&(p[0]=le.call(this,ge,nt.html())),Xn(nt,p,E,M)});if(te&&(R=(Q=rr(p,a[0].ownerDocument,!1,a,M)).firstChild,Q.childNodes.length===1&&(Q=R),R||M)){for(_=(F=C.map(ye(Q,"script"),Vt)).length;W<te;W++)w=Q,W!==oe&&(w=C.clone(w,!0,!0),_&&C.merge(F,ye(w,"script"))),E.call(a[W],w,W);if(_)for(V=F[F.length-1].ownerDocument,C.map(F,Tt),W=0;W<_;W++)w=F[W],ft.test(w.type||"")&&!Ge.access(w,"globalEval")&&C.contains(V,w)&&(w.src&&(w.type||"").toLowerCase()!=="module"?C._evalUrl&&!w.noModule&&C._evalUrl(w.src,{nonce:w.nonce||w.getAttribute("nonce")},V):rt(w.textContent.replace(Ot,""),w,V))}return a}function Wn(a,p,E){for(var M,Q=p?C.filter(p,a):a,R=0;(M=Q[R])!=null;R++)E||M.nodeType!==1||C.cleanData(ye(M)),M.parentNode&&(E&&zt(M)&&tn(ye(M,"script")),M.parentNode.removeChild(M));return a}C.extend({htmlPrefilter:function(a){return a},clone:function(a,p,E){var M,Q,R,F,_=a.cloneNode(!0),w=zt(a);if(!(P.noCloneChecked||a.nodeType!==1&&a.nodeType!==11||C.isXMLDoc(a)))for(F=ye(_),M=0,Q=(R=ye(a)).length;M<Q;M++)In(R[M],F[M]);if(p)if(E)for(R=R||ye(a),F=F||ye(_),M=0,Q=R.length;M<Q;M++)nn(R[M],F[M]);else nn(a,_);return(F=ye(_,"script")).length>0&&tn(F,!w&&ye(a,"script")),_},cleanData:function(a){for(var p,E,M,Q=C.event.special,R=0;(E=a[R])!==void 0;R++)if(ht(E)){if(p=E[Ge.expando]){if(p.events)for(M in p.events)Q[M]?C.event.remove(E,M):C.removeEvent(E,M,p.handle);E[Ge.expando]=void 0}E[Ue.expando]&&(E[Ue.expando]=void 0)}}}),C.fn.extend({detach:function(a){return Wn(this,a,!0)},remove:function(a){return Wn(this,a)},text:function(a){return B(this,function(p){return p===void 0?C.text(this):this.empty().each(function(){this.nodeType!==1&&this.nodeType!==11&&this.nodeType!==9||(this.textContent=p)})},null,a,arguments.length)},append:function(){return Xn(this,arguments,function(a){this.nodeType!==1&&this.nodeType!==11&&this.nodeType!==9||_t(this,a).appendChild(a)})},prepend:function(){return Xn(this,arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var p=_t(this,a);p.insertBefore(a,p.firstChild)}})},before:function(){return Xn(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Xn(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,p=0;(a=this[p])!=null;p++)a.nodeType===1&&(C.cleanData(ye(a,!1)),a.textContent="");return this},clone:function(a,p){return a=a!=null&&a,p=p==null?a:p,this.map(function(){return C.clone(this,a,p)})},html:function(a){return B(this,function(p){var E=this[0]||{},M=0,Q=this.length;if(p===void 0&&E.nodeType===1)return E.innerHTML;if(typeof p=="string"&&!et.test(p)&&!lt[(at.exec(p)||["",""])[1].toLowerCase()]){p=C.htmlPrefilter(p);try{for(;M<Q;M++)(E=this[M]||{}).nodeType===1&&(C.cleanData(ye(E,!1)),E.innerHTML=p);E=0}catch(R){}}E&&this.empty().append(p)},null,a,arguments.length)},replaceWith:function(){var a=[];return Xn(this,arguments,function(p){var E=this.parentNode;C.inArray(this,a)<0&&(C.cleanData(ye(this)),E&&E.replaceChild(p,this))},a)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,p){C.fn[a]=function(E){for(var M,Q=[],R=C(E),F=R.length-1,_=0;_<=F;_++)M=_===F?this:this.clone(!0),C(R[_])[p](M),g.apply(Q,M.get());return this.pushStack(Q)}});var cr=new RegExp("^("+Gt+")(?!px)[a-z%]+$","i"),Ke=function(a){var p=a.ownerDocument.defaultView;return p&&p.opener||(p=l),p.getComputedStyle(a)},ot=function(a,p,E){var M,Q,R={};for(Q in p)R[Q]=a.style[Q],a.style[Q]=p[Q];for(Q in M=E.call(a),p)a.style[Q]=R[Q];return M},Et=new RegExp(mn.join("|"),"i");function Pt(a,p,E){var M,Q,R,F,_=a.style;return(E=E||Ke(a))&&((F=E.getPropertyValue(p)||E[p])!==""||zt(a)||(F=C.style(a,p)),!P.pixelBoxStyles()&&cr.test(F)&&Et.test(p)&&(M=_.width,Q=_.minWidth,R=_.maxWidth,_.minWidth=_.maxWidth=_.width=F,F=E.width,_.width=M,_.minWidth=Q,_.maxWidth=R)),F!==void 0?F+"":F}function Cn(a,p){return{get:function(){if(!a())return(this.get=p).apply(this,arguments);delete this.get}}}(function(){function a(){if(V){w.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",V.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",yt.appendChild(w).appendChild(V);var W=l.getComputedStyle(V);E=W.top!=="1%",_=p(W.marginLeft)===12,V.style.right="60%",R=p(W.right)===36,M=p(W.width)===36,V.style.position="absolute",Q=p(V.offsetWidth/3)===12,yt.removeChild(w),V=null}}function p(W){return Math.round(parseFloat(W))}var E,M,Q,R,F,_,w=pe.createElement("div"),V=pe.createElement("div");V.style&&(V.style.backgroundClip="content-box",V.cloneNode(!0).style.backgroundClip="",P.clearCloneStyle=V.style.backgroundClip==="content-box",C.extend(P,{boxSizingReliable:function(){return a(),M},pixelBoxStyles:function(){return a(),R},pixelPosition:function(){return a(),E},reliableMarginLeft:function(){return a(),_},scrollboxSize:function(){return a(),Q},reliableTrDimensions:function(){var W,te,oe,le;return F==null&&(W=pe.createElement("table"),te=pe.createElement("tr"),oe=pe.createElement("div"),W.style.cssText="position:absolute;left:-11111px",te.style.height="1px",oe.style.height="9px",yt.appendChild(W).appendChild(te).appendChild(oe),le=l.getComputedStyle(te),F=parseInt(le.height)>3,yt.removeChild(W)),F}}))})();var ln=["Webkit","Moz","ms"],Pe=pe.createElement("div").style,tt={};function St(a){var p=C.cssProps[a]||tt[a];return p||(a in Pe?a:tt[a]=function(E){for(var M=E[0].toUpperCase()+E.slice(1),Q=ln.length;Q--;)if((E=ln[Q]+M)in Pe)return E}(a)||a)}var Ut=/^(none|table(?!-c[ea]).+)/,Zt=/^--/,En={position:"absolute",visibility:"hidden",display:"block"},yn={letterSpacing:"0",fontWeight:"400"};function on(a,p,E){var M=Bt.exec(p);return M?Math.max(0,M[2]-(E||0))+(M[3]||"px"):p}function tr(a,p,E,M,Q,R){var F=p==="width"?1:0,_=0,w=0;if(E===(M?"border":"content"))return 0;for(;F<4;F+=2)E==="margin"&&(w+=C.css(a,E+mn[F],!0,Q)),M?(E==="content"&&(w-=C.css(a,"padding"+mn[F],!0,Q)),E!=="margin"&&(w-=C.css(a,"border"+mn[F]+"Width",!0,Q))):(w+=C.css(a,"padding"+mn[F],!0,Q),E!=="padding"?w+=C.css(a,"border"+mn[F]+"Width",!0,Q):_+=C.css(a,"border"+mn[F]+"Width",!0,Q));return!M&&R>=0&&(w+=Math.max(0,Math.ceil(a["offset"+p[0].toUpperCase()+p.slice(1)]-R-w-_-.5))||0),w}function jn(a,p,E){var M=Ke(a),Q=(!P.boxSizingReliable()||E)&&C.css(a,"boxSizing",!1,M)==="border-box",R=Q,F=Pt(a,p,M),_="offset"+p[0].toUpperCase()+p.slice(1);if(cr.test(F)){if(!E)return F;F="auto"}return(!P.boxSizingReliable()&&Q||!P.reliableTrDimensions()&&Ze(a,"tr")||F==="auto"||!parseFloat(F)&&C.css(a,"display",!1,M)==="inline")&&a.getClientRects().length&&(Q=C.css(a,"boxSizing",!1,M)==="border-box",(R=_ in a)&&(F=a[_])),(F=parseFloat(F)||0)+tr(a,p,E||(Q?"border":"content"),R,M,F)+"px"}function qe(a,p,E,M,Q){return new qe.prototype.init(a,p,E,M,Q)}C.extend({cssHooks:{opacity:{get:function(a,p){if(p){var E=Pt(a,"opacity");return E===""?"1":E}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(a,p,E,M){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var Q,R,F,_=De(p),w=Zt.test(p),V=a.style;if(w||(p=St(_)),F=C.cssHooks[p]||C.cssHooks[_],E===void 0)return F&&"get"in F&&(Q=F.get(a,!1,M))!==void 0?Q:V[p];(R=typeof E)=="string"&&(Q=Bt.exec(E))&&Q[1]&&(E=me(a,p,Q),R="number"),E!=null&&E==E&&(R!=="number"||w||(E+=Q&&Q[3]||(C.cssNumber[_]?"":"px")),P.clearCloneStyle||E!==""||p.indexOf("background")!==0||(V[p]="inherit"),F&&"set"in F&&(E=F.set(a,E,M))===void 0||(w?V.setProperty(p,E):V[p]=E))}},css:function(a,p,E,M){var Q,R,F,_=De(p);return Zt.test(p)||(p=St(_)),(F=C.cssHooks[p]||C.cssHooks[_])&&"get"in F&&(Q=F.get(a,!0,E)),Q===void 0&&(Q=Pt(a,p,M)),Q==="normal"&&p in yn&&(Q=yn[p]),E===""||E?(R=parseFloat(Q),E===!0||isFinite(R)?R||0:Q):Q}}),C.each(["height","width"],function(a,p){C.cssHooks[p]={get:function(E,M,Q){if(M)return!Ut.test(C.css(E,"display"))||E.getClientRects().length&&E.getBoundingClientRect().width?jn(E,p,Q):ot(E,En,function(){return jn(E,p,Q)})},set:function(E,M,Q){var R,F=Ke(E),_=!P.scrollboxSize()&&F.position==="absolute",w=(_||Q)&&C.css(E,"boxSizing",!1,F)==="border-box",V=Q?tr(E,p,Q,w,F):0;return w&&_&&(V-=Math.ceil(E["offset"+p[0].toUpperCase()+p.slice(1)]-parseFloat(F[p])-tr(E,p,"border",!1,F)-.5)),V&&(R=Bt.exec(M))&&(R[3]||"px")!=="px"&&(E.style[p]=M,M=C.css(E,p)),on(0,M,V)}}}),C.cssHooks.marginLeft=Cn(P.reliableMarginLeft,function(a,p){if(p)return(parseFloat(Pt(a,"marginLeft"))||a.getBoundingClientRect().left-ot(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(a,p){C.cssHooks[a+p]={expand:function(E){for(var M=0,Q={},R=typeof E=="string"?E.split(" "):[E];M<4;M++)Q[a+mn[M]+p]=R[M]||R[M-2]||R[0];return Q}},a!=="margin"&&(C.cssHooks[a+p].set=on)}),C.fn.extend({css:function(a,p){return B(this,function(E,M,Q){var R,F,_={},w=0;if(Array.isArray(M)){for(R=Ke(E),F=M.length;w<F;w++)_[M[w]]=C.css(E,M[w],!1,R);return _}return Q!==void 0?C.style(E,M,Q):C.css(E,M)},a,p,arguments.length>1)}}),C.Tween=qe,qe.prototype={constructor:qe,init:function(a,p,E,M,Q,R){this.elem=a,this.prop=E,this.easing=Q||C.easing._default,this.options=p,this.start=this.now=this.cur(),this.end=M,this.unit=R||(C.cssNumber[E]?"":"px")},cur:function(){var a=qe.propHooks[this.prop];return a&&a.get?a.get(this):qe.propHooks._default.get(this)},run:function(a){var p,E=qe.propHooks[this.prop];return this.options.duration?this.pos=p=C.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=p=a,this.now=(this.end-this.start)*p+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),E&&E.set?E.set(this):qe.propHooks._default.set(this),this}},qe.prototype.init.prototype=qe.prototype,qe.propHooks={_default:{get:function(a){var p;return a.elem.nodeType!==1||a.elem[a.prop]!=null&&a.elem.style[a.prop]==null?a.elem[a.prop]:(p=C.css(a.elem,a.prop,""))&&p!=="auto"?p:0},set:function(a){C.fx.step[a.prop]?C.fx.step[a.prop](a):a.elem.nodeType!==1||!C.cssHooks[a.prop]&&a.elem.style[St(a.prop)]==null?a.elem[a.prop]=a.now:C.style(a.elem,a.prop,a.now+a.unit)}}},qe.propHooks.scrollTop=qe.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},C.easing={linear:function(a){return a},swing:function(a){return .5-Math.cos(a*Math.PI)/2},_default:"swing"},C.fx=qe.prototype.init,C.fx.step={};var dr,Ir,an=/^(?:toggle|show|hide)$/,On=/queueHooks$/;function zn(){Ir&&(pe.hidden===!1&&l.requestAnimationFrame?l.requestAnimationFrame(zn):l.setTimeout(zn,C.fx.interval),C.fx.tick())}function hn(){return l.setTimeout(function(){dr=void 0}),dr=Date.now()}function _n(a,p){var E,M=0,Q={height:a};for(p=p?1:0;M<4;M+=2-p)Q["margin"+(E=mn[M])]=Q["padding"+E]=a;return p&&(Q.opacity=Q.width=a),Q}function Ar(a,p,E){for(var M,Q=(en.tweeners[p]||[]).concat(en.tweeners["*"]),R=0,F=Q.length;R<F;R++)if(M=Q[R].call(E,p,a))return M}function en(a,p,E){var M,Q,R=0,F=en.prefilters.length,_=C.Deferred().always(function(){delete w.elem}),w=function(){if(Q)return!1;for(var te=dr||hn(),oe=Math.max(0,V.startTime+V.duration-te),le=1-(oe/V.duration||0),Fe=0,ge=V.tweens.length;Fe<ge;Fe++)V.tweens[Fe].run(le);return _.notifyWith(a,[V,le,oe]),le<1&&ge?oe:(ge||_.notifyWith(a,[V,1,0]),_.resolveWith(a,[V]),!1)},V=_.promise({elem:a,props:C.extend({},p),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},E),originalProperties:p,originalOptions:E,startTime:dr||hn(),duration:E.duration,tweens:[],createTween:function(te,oe){var le=C.Tween(a,V.opts,te,oe,V.opts.specialEasing[te]||V.opts.easing);return V.tweens.push(le),le},stop:function(te){var oe=0,le=te?V.tweens.length:0;if(Q)return this;for(Q=!0;oe<le;oe++)V.tweens[oe].run(1);return te?(_.notifyWith(a,[V,1,0]),_.resolveWith(a,[V,te])):_.rejectWith(a,[V,te]),this}}),W=V.props;for(!function(te,oe){var le,Fe,ge,nt,dt;for(le in te)if(ge=oe[Fe=De(le)],nt=te[le],Array.isArray(nt)&&(ge=nt[1],nt=te[le]=nt[0]),le!==Fe&&(te[Fe]=nt,delete te[le]),(dt=C.cssHooks[Fe])&&"expand"in dt)for(le in nt=dt.expand(nt),delete te[Fe],nt)le in te||(te[le]=nt[le],oe[le]=ge);else oe[Fe]=ge}(W,V.opts.specialEasing);R<F;R++)if(M=en.prefilters[R].call(V,a,W,V.opts))return z(M.stop)&&(C._queueHooks(V.elem,V.opts.queue).stop=M.stop.bind(M)),M;return C.map(W,Ar,V),z(V.opts.start)&&V.opts.start.call(a,V),V.progress(V.opts.progress).done(V.opts.done,V.opts.complete).fail(V.opts.fail).always(V.opts.always),C.fx.timer(C.extend(w,{elem:a,anim:V,queue:V.opts.queue})),V}C.Animation=C.extend(en,{tweeners:{"*":[function(a,p){var E=this.createTween(a,p);return me(E.elem,a,Bt.exec(p),E),E}]},tweener:function(a,p){z(a)?(p=a,a=["*"]):a=a.match(q);for(var E,M=0,Q=a.length;M<Q;M++)E=a[M],en.tweeners[E]=en.tweeners[E]||[],en.tweeners[E].unshift(p)},prefilters:[function(a,p,E){var M,Q,R,F,_,w,V,W,te="width"in p||"height"in p,oe=this,le={},Fe=a.style,ge=a.nodeType&&Le(a),nt=Ge.get(a,"fxshow");for(M in E.queue||((F=C._queueHooks(a,"fx")).unqueued==null&&(F.unqueued=0,_=F.empty.fire,F.empty.fire=function(){F.unqueued||_()}),F.unqueued++,oe.always(function(){oe.always(function(){F.unqueued--,C.queue(a,"fx").length||F.empty.fire()})})),p)if(Q=p[M],an.test(Q)){if(delete p[M],R=R||Q==="toggle",Q===(ge?"hide":"show")){if(Q!=="show"||!nt||nt[M]===void 0)continue;ge=!0}le[M]=nt&&nt[M]||C.style(a,M)}if((w=!C.isEmptyObject(p))||!C.isEmptyObject(le))for(M in te&&a.nodeType===1&&(E.overflow=[Fe.overflow,Fe.overflowX,Fe.overflowY],(V=nt&&nt.display)==null&&(V=Ge.get(a,"display")),(W=C.css(a,"display"))==="none"&&(V?W=V:(Z([a],!0),V=a.style.display||V,W=C.css(a,"display"),Z([a]))),(W==="inline"||W==="inline-block"&&V!=null)&&C.css(a,"float")==="none"&&(w||(oe.done(function(){Fe.display=V}),V==null&&(W=Fe.display,V=W==="none"?"":W)),Fe.display="inline-block")),E.overflow&&(Fe.overflow="hidden",oe.always(function(){Fe.overflow=E.overflow[0],Fe.overflowX=E.overflow[1],Fe.overflowY=E.overflow[2]})),w=!1,le)w||(nt?"hidden"in nt&&(ge=nt.hidden):nt=Ge.access(a,"fxshow",{display:V}),R&&(nt.hidden=!ge),ge&&Z([a],!0),oe.done(function(){for(M in ge||Z([a]),Ge.remove(a,"fxshow"),le)C.style(a,M,le[M])})),w=Ar(ge?nt[M]:0,M,oe),M in nt||(nt[M]=w.start,ge&&(w.end=w.start,w.start=0))}],prefilter:function(a,p){p?en.prefilters.unshift(a):en.prefilters.push(a)}}),C.speed=function(a,p,E){var M=a&&typeof a=="object"?C.extend({},a):{complete:E||!E&&p||z(a)&&a,duration:a,easing:E&&p||p&&!z(p)&&p};return C.fx.off?M.duration=0:typeof M.duration!="number"&&(M.duration in C.fx.speeds?M.duration=C.fx.speeds[M.duration]:M.duration=C.fx.speeds._default),M.queue!=null&&M.queue!==!0||(M.queue="fx"),M.old=M.complete,M.complete=function(){z(M.old)&&M.old.call(this),M.queue&&C.dequeue(this,M.queue)},M},C.fn.extend({fadeTo:function(a,p,E,M){return this.filter(Le).css("opacity",0).show().end().animate({opacity:p},a,E,M)},animate:function(a,p,E,M){var Q=C.isEmptyObject(a),R=C.speed(p,E,M),F=function(){var _=en(this,C.extend({},a),R);(Q||Ge.get(this,"finish"))&&_.stop(!0)};return F.finish=F,Q||R.queue===!1?this.each(F):this.queue(R.queue,F)},stop:function(a,p,E){var M=function(Q){var R=Q.stop;delete Q.stop,R(E)};return typeof a!="string"&&(E=p,p=a,a=void 0),p&&this.queue(a||"fx",[]),this.each(function(){var Q=!0,R=a!=null&&a+"queueHooks",F=C.timers,_=Ge.get(this);if(R)_[R]&&_[R].stop&&M(_[R]);else for(R in _)_[R]&&_[R].stop&&On.test(R)&&M(_[R]);for(R=F.length;R--;)F[R].elem!==this||a!=null&&F[R].queue!==a||(F[R].anim.stop(E),Q=!1,F.splice(R,1));!Q&&E||C.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var p,E=Ge.get(this),M=E[a+"queue"],Q=E[a+"queueHooks"],R=C.timers,F=M?M.length:0;for(E.finish=!0,C.queue(this,a,[]),Q&&Q.stop&&Q.stop.call(this,!0),p=R.length;p--;)R[p].elem===this&&R[p].queue===a&&(R[p].anim.stop(!0),R.splice(p,1));for(p=0;p<F;p++)M[p]&&M[p].finish&&M[p].finish.call(this);delete E.finish})}}),C.each(["toggle","show","hide"],function(a,p){var E=C.fn[p];C.fn[p]=function(M,Q,R){return M==null||typeof M=="boolean"?E.apply(this,arguments):this.animate(_n(p,!0),M,Q,R)}}),C.each({slideDown:_n("show"),slideUp:_n("hide"),slideToggle:_n("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,p){C.fn[a]=function(E,M,Q){return this.animate(p,E,M,Q)}}),C.timers=[],C.fx.tick=function(){var a,p=0,E=C.timers;for(dr=Date.now();p<E.length;p++)(a=E[p])()||E[p]!==a||E.splice(p--,1);E.length||C.fx.stop(),dr=void 0},C.fx.timer=function(a){C.timers.push(a),C.fx.start()},C.fx.interval=13,C.fx.start=function(){Ir||(Ir=!0,zn())},C.fx.stop=function(){Ir=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(a,p){return a=C.fx&&C.fx.speeds[a]||a,p=p||"fx",this.queue(p,function(E,M){var Q=l.setTimeout(E,a);M.stop=function(){l.clearTimeout(Q)}})},function(){var a=pe.createElement("input"),p=pe.createElement("select").appendChild(pe.createElement("option"));a.type="checkbox",P.checkOn=a.value!=="",P.optSelected=p.selected,(a=pe.createElement("input")).value="t",a.type="radio",P.radioValue=a.value==="t"}();var kn,Bn=C.expr.attrHandle;C.fn.extend({attr:function(a,p){return B(this,C.attr,a,p,arguments.length>1)},removeAttr:function(a){return this.each(function(){C.removeAttr(this,a)})}}),C.extend({attr:function(a,p,E){var M,Q,R=a.nodeType;if(R!==3&&R!==8&&R!==2)return a.getAttribute===void 0?C.prop(a,p,E):(R===1&&C.isXMLDoc(a)||(Q=C.attrHooks[p.toLowerCase()]||(C.expr.match.bool.test(p)?kn:void 0)),E!==void 0?E===null?void C.removeAttr(a,p):Q&&"set"in Q&&(M=Q.set(a,E,p))!==void 0?M:(a.setAttribute(p,E+""),E):Q&&"get"in Q&&(M=Q.get(a,p))!==null?M:(M=C.find.attr(a,p))==null?void 0:M)},attrHooks:{type:{set:function(a,p){if(!P.radioValue&&p==="radio"&&Ze(a,"input")){var E=a.value;return a.setAttribute("type",p),E&&(a.value=E),p}}}},removeAttr:function(a,p){var E,M=0,Q=p&&p.match(q);if(Q&&a.nodeType===1)for(;E=Q[M++];)a.removeAttribute(E)}}),kn={set:function(a,p,E){return p===!1?C.removeAttr(a,E):a.setAttribute(E,E),E}},C.each(C.expr.match.bool.source.match(/\w+/g),function(a,p){var E=Bn[p]||C.find.attr;Bn[p]=function(M,Q,R){var F,_,w=Q.toLowerCase();return R||(_=Bn[w],Bn[w]=F,F=E(M,Q,R)!=null?w:null,Bn[w]=_),F}});var Sn=/^(?:input|select|textarea|button)$/i,Nr=/^(?:a|area)$/i;function Hn(a){return(a.match(q)||[]).join(" ")}function mr(a){return a.getAttribute&&a.getAttribute("class")||""}function Qn(a){return Array.isArray(a)?a:typeof a=="string"&&a.match(q)||[]}C.fn.extend({prop:function(a,p){return B(this,C.prop,a,p,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[C.propFix[a]||a]})}}),C.extend({prop:function(a,p,E){var M,Q,R=a.nodeType;if(R!==3&&R!==8&&R!==2)return R===1&&C.isXMLDoc(a)||(p=C.propFix[p]||p,Q=C.propHooks[p]),E!==void 0?Q&&"set"in Q&&(M=Q.set(a,E,p))!==void 0?M:a[p]=E:Q&&"get"in Q&&(M=Q.get(a,p))!==null?M:a[p]},propHooks:{tabIndex:{get:function(a){var p=C.find.attr(a,"tabindex");return p?parseInt(p,10):Sn.test(a.nodeName)||Nr.test(a.nodeName)&&a.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),P.optSelected||(C.propHooks.selected={get:function(a){var p=a.parentNode;return p&&p.parentNode&&p.parentNode.selectedIndex,null},set:function(a){var p=a.parentNode;p&&(p.selectedIndex,p.parentNode&&p.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(a){var p,E,M,Q,R,F,_,w=0;if(z(a))return this.each(function(V){C(this).addClass(a.call(this,V,mr(this)))});if((p=Qn(a)).length){for(;E=this[w++];)if(Q=mr(E),M=E.nodeType===1&&" "+Hn(Q)+" "){for(F=0;R=p[F++];)M.indexOf(" "+R+" ")<0&&(M+=R+" ");Q!==(_=Hn(M))&&E.setAttribute("class",_)}}return this},removeClass:function(a){var p,E,M,Q,R,F,_,w=0;if(z(a))return this.each(function(V){C(this).removeClass(a.call(this,V,mr(this)))});if(!arguments.length)return this.attr("class","");if((p=Qn(a)).length){for(;E=this[w++];)if(Q=mr(E),M=E.nodeType===1&&" "+Hn(Q)+" "){for(F=0;R=p[F++];)for(;M.indexOf(" "+R+" ")>-1;)M=M.replace(" "+R+" "," ");Q!==(_=Hn(M))&&E.setAttribute("class",_)}}return this},toggleClass:function(a,p){var E=typeof a,M=E==="string"||Array.isArray(a);return typeof p=="boolean"&&M?p?this.addClass(a):this.removeClass(a):z(a)?this.each(function(Q){C(this).toggleClass(a.call(this,Q,mr(this),p),p)}):this.each(function(){var Q,R,F,_;if(M)for(R=0,F=C(this),_=Qn(a);Q=_[R++];)F.hasClass(Q)?F.removeClass(Q):F.addClass(Q);else a!==void 0&&E!=="boolean"||((Q=mr(this))&&Ge.set(this,"__className__",Q),this.setAttribute&&this.setAttribute("class",Q||a===!1?"":Ge.get(this,"__className__")||""))})},hasClass:function(a){var p,E,M=0;for(p=" "+a+" ";E=this[M++];)if(E.nodeType===1&&(" "+Hn(mr(E))+" ").indexOf(p)>-1)return!0;return!1}});var ar=/\r/g;C.fn.extend({val:function(a){var p,E,M,Q=this[0];return arguments.length?(M=z(a),this.each(function(R){var F;this.nodeType===1&&((F=M?a.call(this,R,C(this).val()):a)==null?F="":typeof F=="number"?F+="":Array.isArray(F)&&(F=C.map(F,function(_){return _==null?"":_+""})),(p=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in p&&p.set(this,F,"value")!==void 0||(this.value=F))})):Q?(p=C.valHooks[Q.type]||C.valHooks[Q.nodeName.toLowerCase()])&&"get"in p&&(E=p.get(Q,"value"))!==void 0?E:typeof(E=Q.value)=="string"?E.replace(ar,""):E==null?"":E:void 0}}),C.extend({valHooks:{option:{get:function(a){var p=C.find.attr(a,"value");return p!=null?p:Hn(C.text(a))}},select:{get:function(a){var p,E,M,Q=a.options,R=a.selectedIndex,F=a.type==="select-one",_=F?null:[],w=F?R+1:Q.length;for(M=R<0?w:F?R:0;M<w;M++)if(((E=Q[M]).selected||M===R)&&!E.disabled&&(!E.parentNode.disabled||!Ze(E.parentNode,"optgroup"))){if(p=C(E).val(),F)return p;_.push(p)}return _},set:function(a,p){for(var E,M,Q=a.options,R=C.makeArray(p),F=Q.length;F--;)((M=Q[F]).selected=C.inArray(C.valHooks.option.get(M),R)>-1)&&(E=!0);return E||(a.selectedIndex=-1),R}}}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(a,p){if(Array.isArray(p))return a.checked=C.inArray(C(a).val(),p)>-1}},P.checkOn||(C.valHooks[this].get=function(a){return a.getAttribute("value")===null?"on":a.value})}),P.focusin="onfocusin"in l;var oi=/^(?:focusinfocus|focusoutblur)$/,di=function(a){a.stopPropagation()};C.extend(C.event,{trigger:function(a,p,E,M){var Q,R,F,_,w,V,W,te,oe=[E||pe],le=x.call(a,"type")?a.type:a,Fe=x.call(a,"namespace")?a.namespace.split("."):[];if(R=te=F=E=E||pe,E.nodeType!==3&&E.nodeType!==8&&!oi.test(le+C.event.triggered)&&(le.indexOf(".")>-1&&(Fe=le.split("."),le=Fe.shift(),Fe.sort()),w=le.indexOf(":")<0&&"on"+le,(a=a[C.expando]?a:new C.Event(le,typeof a=="object"&&a)).isTrigger=M?2:3,a.namespace=Fe.join("."),a.rnamespace=a.namespace?new RegExp("(^|\\.)"+Fe.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,a.result=void 0,a.target||(a.target=E),p=p==null?[a]:C.makeArray(p,[a]),W=C.event.special[le]||{},M||!W.trigger||W.trigger.apply(E,p)!==!1)){if(!M&&!W.noBubble&&!ue(E)){for(_=W.delegateType||le,oi.test(_+le)||(R=R.parentNode);R;R=R.parentNode)oe.push(R),F=R;F===(E.ownerDocument||pe)&&oe.push(F.defaultView||F.parentWindow||l)}for(Q=0;(R=oe[Q++])&&!a.isPropagationStopped();)te=R,a.type=Q>1?_:W.bindType||le,(V=(Ge.get(R,"events")||Object.create(null))[a.type]&&Ge.get(R,"handle"))&&V.apply(R,p),(V=w&&R[w])&&V.apply&&ht(R)&&(a.result=V.apply(R,p),a.result===!1&&a.preventDefault());return a.type=le,M||a.isDefaultPrevented()||W._default&&W._default.apply(oe.pop(),p)!==!1||!ht(E)||w&&z(E[le])&&!ue(E)&&((F=E[w])&&(E[w]=null),C.event.triggered=le,a.isPropagationStopped()&&te.addEventListener(le,di),E[le](),a.isPropagationStopped()&&te.removeEventListener(le,di),C.event.triggered=void 0,F&&(E[w]=F)),a.result}},simulate:function(a,p,E){var M=C.extend(new C.Event,E,{type:a,isSimulated:!0});C.event.trigger(M,null,p)}}),C.fn.extend({trigger:function(a,p){return this.each(function(){C.event.trigger(a,p,this)})},triggerHandler:function(a,p){var E=this[0];if(E)return C.event.trigger(a,p,E,!0)}}),P.focusin||C.each({focus:"focusin",blur:"focusout"},function(a,p){var E=function(M){C.event.simulate(p,M.target,C.event.fix(M))};C.event.special[p]={setup:function(){var M=this.ownerDocument||this.document||this,Q=Ge.access(M,p);Q||M.addEventListener(a,E,!0),Ge.access(M,p,(Q||0)+1)},teardown:function(){var M=this.ownerDocument||this.document||this,Q=Ge.access(M,p)-1;Q?Ge.access(M,p,Q):(M.removeEventListener(a,E,!0),Ge.remove(M,p))}}});var Jr=l.location,Kn={guid:Date.now()},ui=/\?/;C.parseXML=function(a){var p;if(!a||typeof a!="string")return null;try{p=new l.DOMParser().parseFromString(a,"text/xml")}catch(E){p=void 0}return p&&!p.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+a),p};var zr=/\[\]$/,qr=/\r?\n/g,Gr=/^(?:submit|button|image|reset|file)$/i,Ri=/^(?:input|select|textarea|keygen)/i;function Ai(a,p,E,M){var Q;if(Array.isArray(p))C.each(p,function(R,F){E||zr.test(a)?M(a,F):Ai(a+"["+(typeof F=="object"&&F!=null?R:"")+"]",F,E,M)});else if(E||be(p)!=="object")M(a,p);else for(Q in p)Ai(a+"["+Q+"]",p[Q],E,M)}C.param=function(a,p){var E,M=[],Q=function(R,F){var _=z(F)?F():F;M[M.length]=encodeURIComponent(R)+"="+encodeURIComponent(_==null?"":_)};if(a==null)return"";if(Array.isArray(a)||a.jquery&&!C.isPlainObject(a))C.each(a,function(){Q(this.name,this.value)});else for(E in a)Ai(E,a[E],p,Q);return M.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=C.prop(this,"elements");return a?C.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!C(this).is(":disabled")&&Ri.test(this.nodeName)&&!Gr.test(a)&&(this.checked||!ke.test(a))}).map(function(a,p){var E=C(this).val();return E==null?null:Array.isArray(E)?C.map(E,function(M){return{name:p.name,value:M.replace(qr,`\r
|
|
3
|
+
`)}}):{name:p.name,value:E.replace(qr,`\r
|
|
4
|
+
`)}}).get()}});var ss=/%20/g,Bi=/#.*$/,wi=/([?&])_=[^&]*/,$i=/^(.*?):[ \t]*([^\r\n]*)$/gm,ur=/^(?:GET|HEAD)$/,Ui=/^\/\//,Dn={},ai={},hi="*/".concat("*"),Fi=pe.createElement("a");function Yr(a){return function(p,E){typeof p!="string"&&(E=p,p="*");var M,Q=0,R=p.toLowerCase().match(q)||[];if(z(E))for(;M=R[Q++];)M[0]==="+"?(M=M.slice(1)||"*",(a[M]=a[M]||[]).unshift(E)):(a[M]=a[M]||[]).push(E)}}function Wi(a,p,E,M){var Q={},R=a===ai;function F(_){var w;return Q[_]=!0,C.each(a[_]||[],function(V,W){var te=W(p,E,M);return typeof te!="string"||R||Q[te]?R?!(w=te):void 0:(p.dataTypes.unshift(te),F(te),!1)}),w}return F(p.dataTypes[0])||!Q["*"]&&F("*")}function Ii(a,p){var E,M,Q=C.ajaxSettings.flatOptions||{};for(E in p)p[E]!==void 0&&((Q[E]?a:M||(M={}))[E]=p[E]);return M&&C.extend(!0,a,M),a}Fi.href=Jr.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Jr.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Jr.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":hi,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,p){return p?Ii(Ii(a,C.ajaxSettings),p):Ii(C.ajaxSettings,a)},ajaxPrefilter:Yr(Dn),ajaxTransport:Yr(ai),ajax:function(a,p){typeof a=="object"&&(p=a,a=void 0),p=p||{};var E,M,Q,R,F,_,w,V,W,te,oe=C.ajaxSetup({},p),le=oe.context||oe,Fe=oe.context&&(le.nodeType||le.jquery)?C(le):C.event,ge=C.Deferred(),nt=C.Callbacks("once memory"),dt=oe.statusCode||{},It={},kt={},Nt="canceled",vt={readyState:0,getResponseHeader:function(Wt){var Xe;if(w){if(!R)for(R={};Xe=$i.exec(Q);)R[Xe[1].toLowerCase()+" "]=(R[Xe[1].toLowerCase()+" "]||[]).concat(Xe[2]);Xe=R[Wt.toLowerCase()+" "]}return Xe==null?null:Xe.join(", ")},getAllResponseHeaders:function(){return w?Q:null},setRequestHeader:function(Wt,Xe){return w==null&&(Wt=kt[Wt.toLowerCase()]=kt[Wt.toLowerCase()]||Wt,It[Wt]=Xe),this},overrideMimeType:function(Wt){return w==null&&(oe.mimeType=Wt),this},statusCode:function(Wt){var Xe;if(Wt)if(w)vt.always(Wt[vt.status]);else for(Xe in Wt)dt[Xe]=[dt[Xe],Wt[Xe]];return this},abort:function(Wt){var Xe=Wt||Nt;return E&&E.abort(Xe),cn(0,Xe),this}};if(ge.promise(vt),oe.url=((a||oe.url||Jr.href)+"").replace(Ui,Jr.protocol+"//"),oe.type=p.method||p.type||oe.method||oe.type,oe.dataTypes=(oe.dataType||"*").toLowerCase().match(q)||[""],oe.crossDomain==null){_=pe.createElement("a");try{_.href=oe.url,_.href=_.href,oe.crossDomain=Fi.protocol+"//"+Fi.host!=_.protocol+"//"+_.host}catch(Wt){oe.crossDomain=!0}}if(oe.data&&oe.processData&&typeof oe.data!="string"&&(oe.data=C.param(oe.data,oe.traditional)),Wi(Dn,oe,p,vt),w)return vt;for(W in(V=C.event&&oe.global)&&C.active++==0&&C.event.trigger("ajaxStart"),oe.type=oe.type.toUpperCase(),oe.hasContent=!ur.test(oe.type),M=oe.url.replace(Bi,""),oe.hasContent?oe.data&&oe.processData&&(oe.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(oe.data=oe.data.replace(ss,"+")):(te=oe.url.slice(M.length),oe.data&&(oe.processData||typeof oe.data=="string")&&(M+=(ui.test(M)?"&":"?")+oe.data,delete oe.data),oe.cache===!1&&(M=M.replace(wi,"$1"),te=(ui.test(M)?"&":"?")+"_="+Kn.guid+++te),oe.url=M+te),oe.ifModified&&(C.lastModified[M]&&vt.setRequestHeader("If-Modified-Since",C.lastModified[M]),C.etag[M]&&vt.setRequestHeader("If-None-Match",C.etag[M])),(oe.data&&oe.hasContent&&oe.contentType!==!1||p.contentType)&&vt.setRequestHeader("Content-Type",oe.contentType),vt.setRequestHeader("Accept",oe.dataTypes[0]&&oe.accepts[oe.dataTypes[0]]?oe.accepts[oe.dataTypes[0]]+(oe.dataTypes[0]!=="*"?", "+hi+"; q=0.01":""):oe.accepts["*"]),oe.headers)vt.setRequestHeader(W,oe.headers[W]);if(oe.beforeSend&&(oe.beforeSend.call(le,vt,oe)===!1||w))return vt.abort();if(Nt="abort",nt.add(oe.complete),vt.done(oe.success),vt.fail(oe.error),E=Wi(ai,oe,p,vt)){if(vt.readyState=1,V&&Fe.trigger("ajaxSend",[vt,oe]),w)return vt;oe.async&&oe.timeout>0&&(F=l.setTimeout(function(){vt.abort("timeout")},oe.timeout));try{w=!1,E.send(It,cn)}catch(Wt){if(w)throw Wt;cn(-1,Wt)}}else cn(-1,"No Transport");function cn(Wt,Xe,pn,Rt){var Pn,gr,vr,Gn,br,bn=Xe;w||(w=!0,F&&l.clearTimeout(F),E=void 0,Q=Rt||"",vt.readyState=Wt>0?4:0,Pn=Wt>=200&&Wt<300||Wt===304,pn&&(Gn=function(rn,lr,Pr){for(var Ur,Be,Jn,hr,Or=rn.contents,Mt=rn.dataTypes;Mt[0]==="*";)Mt.shift(),Ur===void 0&&(Ur=rn.mimeType||lr.getResponseHeader("Content-Type"));if(Ur){for(Be in Or)if(Or[Be]&&Or[Be].test(Ur)){Mt.unshift(Be);break}}if(Mt[0]in Pr)Jn=Mt[0];else{for(Be in Pr){if(!Mt[0]||rn.converters[Be+" "+Mt[0]]){Jn=Be;break}hr||(hr=Be)}Jn=Jn||hr}if(Jn)return Jn!==Mt[0]&&Mt.unshift(Jn),Pr[Jn]}(oe,vt,pn)),!Pn&&C.inArray("script",oe.dataTypes)>-1&&(oe.converters["text script"]=function(){}),Gn=function(rn,lr,Pr,Ur){var Be,Jn,hr,Or,Mt,Ht={},Nn=rn.dataTypes.slice();if(Nn[1])for(hr in rn.converters)Ht[hr.toLowerCase()]=rn.converters[hr];for(Jn=Nn.shift();Jn;)if(rn.responseFields[Jn]&&(Pr[rn.responseFields[Jn]]=lr),!Mt&&Ur&&rn.dataFilter&&(lr=rn.dataFilter(lr,rn.dataType)),Mt=Jn,Jn=Nn.shift()){if(Jn==="*")Jn=Mt;else if(Mt!=="*"&&Mt!==Jn){if(!(hr=Ht[Mt+" "+Jn]||Ht["* "+Jn])){for(Be in Ht)if((Or=Be.split(" "))[1]===Jn&&(hr=Ht[Mt+" "+Or[0]]||Ht["* "+Or[0]])){hr===!0?hr=Ht[Be]:Ht[Be]!==!0&&(Jn=Or[0],Nn.unshift(Or[1]));break}}if(hr!==!0)if(hr&&rn.throws)lr=hr(lr);else try{lr=hr(lr)}catch(as){return{state:"parsererror",error:hr?as:"No conversion from "+Mt+" to "+Jn}}}}return{state:"success",data:lr}}(oe,Gn,vt,Pn),Pn?(oe.ifModified&&((br=vt.getResponseHeader("Last-Modified"))&&(C.lastModified[M]=br),(br=vt.getResponseHeader("etag"))&&(C.etag[M]=br)),Wt===204||oe.type==="HEAD"?bn="nocontent":Wt===304?bn="notmodified":(bn=Gn.state,gr=Gn.data,Pn=!(vr=Gn.error))):(vr=bn,!Wt&&bn||(bn="error",Wt<0&&(Wt=0))),vt.status=Wt,vt.statusText=(Xe||bn)+"",Pn?ge.resolveWith(le,[gr,bn,vt]):ge.rejectWith(le,[vt,bn,vr]),vt.statusCode(dt),dt=void 0,V&&Fe.trigger(Pn?"ajaxSuccess":"ajaxError",[vt,oe,Pn?gr:vr]),nt.fireWith(le,[vt,bn]),V&&(Fe.trigger("ajaxComplete",[vt,oe]),--C.active||C.event.trigger("ajaxStop")))}return vt},getJSON:function(a,p,E){return C.get(a,p,E,"json")},getScript:function(a,p){return C.get(a,void 0,p,"script")}}),C.each(["get","post"],function(a,p){C[p]=function(E,M,Q,R){return z(M)&&(R=R||Q,Q=M,M=void 0),C.ajax(C.extend({url:E,type:p,dataType:R,data:M,success:Q},C.isPlainObject(E)&&E))}}),C.ajaxPrefilter(function(a){var p;for(p in a.headers)p.toLowerCase()==="content-type"&&(a.contentType=a.headers[p]||"")}),C._evalUrl=function(a,p,E){return C.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(M){C.globalEval(M,p,E)}})},C.fn.extend({wrapAll:function(a){var p;return this[0]&&(z(a)&&(a=a.call(this[0])),p=C(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&p.insertBefore(this[0]),p.map(function(){for(var E=this;E.firstElementChild;)E=E.firstElementChild;return E}).append(this)),this},wrapInner:function(a){return z(a)?this.each(function(p){C(this).wrapInner(a.call(this,p))}):this.each(function(){var p=C(this),E=p.contents();E.length?E.wrapAll(a):p.append(a)})},wrap:function(a){var p=z(a);return this.each(function(E){C(this).wrapAll(p?a.call(this,E):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(a){return!C.expr.pseudos.visible(a)},C.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new l.XMLHttpRequest}catch(a){}};var ji={0:200,1223:204},Ei=C.ajaxSettings.xhr();P.cors=!!Ei&&"withCredentials"in Ei,P.ajax=Ei=!!Ei,C.ajaxTransport(function(a){var p,E;if(P.cors||Ei&&!a.crossDomain)return{send:function(M,Q){var R,F=a.xhr();if(F.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(R in a.xhrFields)F[R]=a.xhrFields[R];for(R in a.mimeType&&F.overrideMimeType&&F.overrideMimeType(a.mimeType),a.crossDomain||M["X-Requested-With"]||(M["X-Requested-With"]="XMLHttpRequest"),M)F.setRequestHeader(R,M[R]);p=function(_){return function(){p&&(p=E=F.onload=F.onerror=F.onabort=F.ontimeout=F.onreadystatechange=null,_==="abort"?F.abort():_==="error"?typeof F.status!="number"?Q(0,"error"):Q(F.status,F.statusText):Q(ji[F.status]||F.status,F.statusText,(F.responseType||"text")!=="text"||typeof F.responseText!="string"?{binary:F.response}:{text:F.responseText},F.getAllResponseHeaders()))}},F.onload=p(),E=F.onerror=F.ontimeout=p("error"),F.onabort!==void 0?F.onabort=E:F.onreadystatechange=function(){F.readyState===4&&l.setTimeout(function(){p&&E()})},p=p("abort");try{F.send(a.hasContent&&a.data||null)}catch(_){if(p)throw _}},abort:function(){p&&p()}}}),C.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return C.globalEval(a),a}}}),C.ajaxPrefilter("script",function(a){a.cache===void 0&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),C.ajaxTransport("script",function(a){var p,E;if(a.crossDomain||a.scriptAttrs)return{send:function(M,Q){p=C("<script>").attr(a.scriptAttrs||{}).prop({charset:a.scriptCharset,src:a.url}).on("load error",E=function(R){p.remove(),E=null,R&&Q(R.type==="error"?404:200,R.type)}),pe.head.appendChild(p[0])},abort:function(){E&&E()}}});var pi,Si=[],zi=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Si.pop()||C.expando+"_"+Kn.guid++;return this[a]=!0,a}}),C.ajaxPrefilter("json jsonp",function(a,p,E){var M,Q,R,F=a.jsonp!==!1&&(zi.test(a.url)?"url":typeof a.data=="string"&&(a.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&zi.test(a.data)&&"data");if(F||a.dataTypes[0]==="jsonp")return M=a.jsonpCallback=z(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,F?a[F]=a[F].replace(zi,"$1"+M):a.jsonp!==!1&&(a.url+=(ui.test(a.url)?"&":"?")+a.jsonp+"="+M),a.converters["script json"]=function(){return R||C.error(M+" was not called"),R[0]},a.dataTypes[0]="json",Q=l[M],l[M]=function(){R=arguments},E.always(function(){Q===void 0?C(l).removeProp(M):l[M]=Q,a[M]&&(a.jsonpCallback=p.jsonpCallback,Si.push(M)),R&&z(Q)&&Q(R[0]),R=Q=void 0}),"script"}),P.createHTMLDocument=((pi=pe.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",pi.childNodes.length===2),C.parseHTML=function(a,p,E){return typeof a!="string"?[]:(typeof p=="boolean"&&(E=p,p=!1),p||(P.createHTMLDocument?((M=(p=pe.implementation.createHTMLDocument("")).createElement("base")).href=pe.location.href,p.head.appendChild(M)):p=pe),R=!E&&[],(Q=xe.exec(a))?[p.createElement(Q[1])]:(Q=rr([a],p,R),R&&R.length&&C(R).remove(),C.merge([],Q.childNodes)));var M,Q,R},C.fn.load=function(a,p,E){var M,Q,R,F=this,_=a.indexOf(" ");return _>-1&&(M=Hn(a.slice(_)),a=a.slice(0,_)),z(p)?(E=p,p=void 0):p&&typeof p=="object"&&(Q="POST"),F.length>0&&C.ajax({url:a,type:Q||"GET",dataType:"html",data:p}).done(function(w){R=arguments,F.html(M?C("<div>").append(C.parseHTML(w)).find(M):w)}).always(E&&function(w,V){F.each(function(){E.apply(this,R||[w.responseText,V,w])})}),this},C.expr.pseudos.animated=function(a){return C.grep(C.timers,function(p){return a===p.elem}).length},C.offset={setOffset:function(a,p,E){var M,Q,R,F,_,w,V=C.css(a,"position"),W=C(a),te={};V==="static"&&(a.style.position="relative"),_=W.offset(),R=C.css(a,"top"),w=C.css(a,"left"),(V==="absolute"||V==="fixed")&&(R+w).indexOf("auto")>-1?(F=(M=W.position()).top,Q=M.left):(F=parseFloat(R)||0,Q=parseFloat(w)||0),z(p)&&(p=p.call(a,E,C.extend({},_))),p.top!=null&&(te.top=p.top-_.top+F),p.left!=null&&(te.left=p.left-_.left+Q),"using"in p?p.using.call(a,te):(typeof te.top=="number"&&(te.top+="px"),typeof te.left=="number"&&(te.left+="px"),W.css(te))}},C.fn.extend({offset:function(a){if(arguments.length)return a===void 0?this:this.each(function(Q){C.offset.setOffset(this,a,Q)});var p,E,M=this[0];return M?M.getClientRects().length?(p=M.getBoundingClientRect(),E=M.ownerDocument.defaultView,{top:p.top+E.pageYOffset,left:p.left+E.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var a,p,E,M=this[0],Q={top:0,left:0};if(C.css(M,"position")==="fixed")p=M.getBoundingClientRect();else{for(p=this.offset(),E=M.ownerDocument,a=M.offsetParent||E.documentElement;a&&(a===E.body||a===E.documentElement)&&C.css(a,"position")==="static";)a=a.parentNode;a&&a!==M&&a.nodeType===1&&((Q=C(a).offset()).top+=C.css(a,"borderTopWidth",!0),Q.left+=C.css(a,"borderLeftWidth",!0))}return{top:p.top-Q.top-C.css(M,"marginTop",!0),left:p.left-Q.left-C.css(M,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent;a&&C.css(a,"position")==="static";)a=a.offsetParent;return a||yt})}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,p){var E=p==="pageYOffset";C.fn[a]=function(M){return B(this,function(Q,R,F){var _;if(ue(Q)?_=Q:Q.nodeType===9&&(_=Q.defaultView),F===void 0)return _?_[p]:Q[R];_?_.scrollTo(E?_.pageXOffset:F,E?F:_.pageYOffset):Q[R]=F},a,M,arguments.length)}}),C.each(["top","left"],function(a,p){C.cssHooks[p]=Cn(P.pixelPosition,function(E,M){if(M)return M=Pt(E,p),cr.test(M)?C(E).position()[p]+"px":M})}),C.each({Height:"height",Width:"width"},function(a,p){C.each({padding:"inner"+a,content:p,"":"outer"+a},function(E,M){C.fn[M]=function(Q,R){var F=arguments.length&&(E||typeof Q!="boolean"),_=E||(Q===!0||R===!0?"margin":"border");return B(this,function(w,V,W){var te;return ue(w)?M.indexOf("outer")===0?w["inner"+a]:w.document.documentElement["client"+a]:w.nodeType===9?(te=w.documentElement,Math.max(w.body["scroll"+a],te["scroll"+a],w.body["offset"+a],te["offset"+a],te["client"+a])):W===void 0?C.css(w,V,_):C.style(w,V,W,_)},p,F?Q:void 0,F)}})}),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,p){C.fn[p]=function(E){return this.on(p,E)}}),C.fn.extend({bind:function(a,p,E){return this.on(a,null,p,E)},unbind:function(a,p){return this.off(a,null,p)},delegate:function(a,p,E,M){return this.on(p,a,E,M)},undelegate:function(a,p,E){return arguments.length===1?this.off(a,"**"):this.off(p,a||"**",E)},hover:function(a,p){return this.mouseenter(a).mouseleave(p||a)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,p){C.fn[p]=function(E,M){return arguments.length>0?this.on(p,null,E,M):this.trigger(p)}});var os=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;C.proxy=function(a,p){var E,M,Q;if(typeof p=="string"&&(E=a[p],p=a,a=E),z(a))return M=j.call(arguments,2),Q=function(){return a.apply(p||this,M.concat(j.call(arguments)))},Q.guid=a.guid=a.guid||C.guid++,Q},C.holdReady=function(a){a?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=Ze,C.isFunction=z,C.isWindow=ue,C.camelCase=De,C.type=be,C.now=Date.now,C.isNumeric=function(a){var p=C.type(a);return(p==="number"||p==="string")&&!isNaN(a-parseFloat(a))},C.trim=function(a){return a==null?"":(a+"").replace(os,"")},(o=function(){return C}.apply(d,[]))===void 0||(S.exports=o);var Is=l.jQuery,sr=l.$;return C.noConflict=function(a){return l.$===C&&(l.$=sr),a&&l.jQuery===C&&(l.jQuery=Is),C},v===void 0&&(l.jQuery=l.$=C),C})},2428:(S,d,o)=>{var l=typeof Map=="function"&&Map.prototype,v=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,m=l&&v&&typeof v.get=="function"?v.get:null,y=l&&Map.prototype.forEach,j=typeof Set=="function"&&Set.prototype,h=Object.getOwnPropertyDescriptor&&j?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,g=j&&h&&typeof h.get=="function"?h.get:null,A=j&&Set.prototype.forEach,I=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,O=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,x=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,U=Boolean.prototype.valueOf,G=Object.prototype.toString,P=Function.prototype.toString,z=String.prototype.match,ue=String.prototype.slice,pe=String.prototype.replace,Me=String.prototype.toUpperCase,rt=String.prototype.toLowerCase,be=RegExp.prototype.test,Te=Array.prototype.concat,C=Array.prototype.join,st=Array.prototype.slice,_e=Math.floor,Oe=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ye=Object.getOwnPropertySymbols,ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="object",xe=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ze||"symbol")?Symbol.toStringTag:null,ct=Object.prototype.propertyIsEnumerable,Qe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Ge){return Ge.__proto__}:null);function re(Ge,Ue){if(Ge===1/0||Ge===-1/0||Ge!=Ge||Ge&&Ge>-1e3&&Ge<1e3||be.call(/e/,Ue))return Ue;var Ct=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Ge=="number"){var Kt=Ge<0?-_e(-Ge):_e(Ge);if(Kt!==Ge){var Yt=String(Kt),Gt=ue.call(Ue,Yt.length+1);return pe.call(Yt,Ct,"$&_")+"."+pe.call(pe.call(Gt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return pe.call(Ue,Ct,"$&_")}var f=o(4654).custom,D=f&&Ae(f)?f:null;function H(Ge,Ue,Ct){var Kt=(Ct.quoteStyle||Ue)==="double"?'"':"'";return Kt+Ge+Kt}function q(Ge){return pe.call(String(Ge),/"/g,""")}function he(Ge){return!(Re(Ge)!=="[object Array]"||xe&&typeof Ge=="object"&&xe in Ge)}function Ae(Ge){if(Ze)return Ge&&typeof Ge=="object"&&Ge instanceof Symbol;if(typeof Ge=="symbol")return!0;if(!Ge||typeof Ge!="object"||!ne)return!1;try{return ne.call(Ge),!0}catch(Ue){}return!1}S.exports=function Ge(Ue,Ct,Kt,Yt){var Gt=Ct||{};if(Se(Gt,"quoteStyle")&&Gt.quoteStyle!=="single"&&Gt.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(Gt,"maxStringLength")&&(typeof Gt.maxStringLength=="number"?Gt.maxStringLength<0&&Gt.maxStringLength!==1/0:Gt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Bt=!Se(Gt,"customInspect")||Gt.customInspect;if(typeof Bt!="boolean"&&Bt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(Gt,"indent")&&Gt.indent!==null&&Gt.indent!==" "&&!(parseInt(Gt.indent,10)===Gt.indent&&Gt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(Gt,"numericSeparator")&&typeof Gt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var mn=Gt.numericSeparator;if(Ue===void 0)return"undefined";if(Ue===null)return"null";if(typeof Ue=="boolean")return Ue?"true":"false";if(typeof Ue=="string")return B(Ue,Gt);if(typeof Ue=="number"){if(Ue===0)return 1/0/Ue>0?"0":"-0";var yt=String(Ue);return mn?re(Ue,yt):yt}if(typeof Ue=="bigint"){var zt=String(Ue)+"n";return mn?re(Ue,zt):zt}var K=Gt.depth===void 0?5:Gt.depth;if(Kt===void 0&&(Kt=0),Kt>=K&&K>0&&typeof Ue=="object")return he(Ue)?"[Array]":"[Object]";var Le=function(mt,Xt){var ae;if(mt.indent===" ")ae=" ";else{if(!(typeof mt.indent=="number"&&mt.indent>0))return null;ae=C.call(Array(mt.indent+1)," ")}return{base:ae,prev:C.call(Array(Xt+1),ae)}}(Gt,Kt);if(Yt===void 0)Yt=[];else if(T(Yt,Ue)>=0)return"[Circular]";function me(mt,Xt,ae){if(Xt&&(Yt=st.call(Yt)).push(Xt),ae){var ee={depth:Gt.depth};return Se(Gt,"quoteStyle")&&(ee.quoteStyle=Gt.quoteStyle),Ge(mt,ee,Kt+1,Yt)}return Ge(mt,Gt,Kt+1,Yt)}if(typeof Ue=="function"){var k=function(mt){if(mt.name)return mt.name;var Xt=z.call(P.call(mt),/^function\s*([\w$]+)/);return Xt?Xt[1]:null}(Ue),J=jt(Ue,me);return"[Function"+(k?": "+k:" (anonymous)")+"]"+(J.length>0?" { "+C.call(J,", ")+" }":"")}if(Ae(Ue)){var Z=Ze?pe.call(String(Ue),/^(Symbol\(.*\))_[^)]*$/,"$1"):ne.call(Ue);return typeof Ue!="object"||Ze?Z:fe(Z)}if(function(mt){return!mt||typeof mt!="object"?!1:typeof HTMLElement!="undefined"&&mt instanceof HTMLElement?!0:typeof mt.nodeName=="string"&&typeof mt.getAttribute=="function"}(Ue)){for(var ie="<"+rt.call(String(Ue.nodeName)),we=Ue.attributes||[],ke=0;ke<we.length;ke++)ie+=" "+we[ke].name+"="+H(q(we[ke].value),"double",Gt);return ie+=">",Ue.childNodes&&Ue.childNodes.length&&(ie+="..."),ie+="</"+rt.call(String(Ue.nodeName))+">"}if(he(Ue)){if(Ue.length===0)return"[]";var at=jt(Ue,me);return Le&&!function(mt){for(var Xt=0;Xt<mt.length;Xt++)if(T(mt[Xt],`
|
|
5
|
+
`)>=0)return!1;return!0}(at)?"["+ht(at,Le)+"]":"[ "+C.call(at,", ")+" ]"}if(function(mt){return!(Re(mt)!=="[object Error]"||xe&&typeof mt=="object"&&xe in mt)}(Ue)){var ft=jt(Ue,me);return"cause"in Ue&&!ct.call(Ue,"cause")?"{ ["+String(Ue)+"] "+C.call(Te.call("[cause]: "+me(Ue.cause),ft),", ")+" }":ft.length===0?"["+String(Ue)+"]":"{ ["+String(Ue)+"] "+C.call(ft,", ")+" }"}if(typeof Ue=="object"&&Bt){if(D&&typeof Ue[D]=="function")return Ue[D]();if(Bt!=="symbol"&&typeof Ue.inspect=="function")return Ue.inspect()}if(function(mt){if(!m||!mt||typeof mt!="object")return!1;try{m.call(mt);try{g.call(mt)}catch(Xt){return!0}return mt instanceof Map}catch(Xt){}return!1}(Ue)){var lt=[];return y.call(Ue,function(mt,Xt){lt.push(me(Xt,Ue,!0)+" => "+me(mt,Ue))}),De("Map",m.call(Ue),lt,Le)}if(function(mt){if(!g||!mt||typeof mt!="object")return!1;try{g.call(mt);try{m.call(mt)}catch(Xt){return!0}return mt instanceof Set}catch(Xt){}return!1}(Ue)){var ye=[];return A.call(Ue,function(mt){ye.push(me(mt,Ue))}),De("Set",g.call(Ue),ye,Le)}if(function(mt){if(!I||!mt||typeof mt!="object")return!1;try{I.call(mt,I);try{O.call(mt,O)}catch(Xt){return!0}return mt instanceof WeakMap}catch(Xt){}return!1}(Ue))return Ne("WeakMap");if(function(mt){if(!O||!mt||typeof mt!="object")return!1;try{O.call(mt,O);try{I.call(mt,I)}catch(Xt){return!0}return mt instanceof WeakSet}catch(Xt){}return!1}(Ue))return Ne("WeakSet");if(function(mt){if(!x||!mt||typeof mt!="object")return!1;try{return x.call(mt),!0}catch(Xt){}return!1}(Ue))return Ne("WeakRef");if(function(mt){return!(Re(mt)!=="[object Number]"||xe&&typeof mt=="object"&&xe in mt)}(Ue))return fe(me(Number(Ue)));if(function(mt){if(!mt||typeof mt!="object"||!Oe)return!1;try{return Oe.call(mt),!0}catch(Xt){}return!1}(Ue))return fe(me(Oe.call(Ue)));if(function(mt){return!(Re(mt)!=="[object Boolean]"||xe&&typeof mt=="object"&&xe in mt)}(Ue))return fe(U.call(Ue));if(function(mt){return!(Re(mt)!=="[object String]"||xe&&typeof mt=="object"&&xe in mt)}(Ue))return fe(me(String(Ue)));if(!function(mt){return!(Re(mt)!=="[object Date]"||xe&&typeof mt=="object"&&xe in mt)}(Ue)&&!function(mt){return!(Re(mt)!=="[object RegExp]"||xe&&typeof mt=="object"&&xe in mt)}(Ue)){var tn=jt(Ue,me),er=Qe?Qe(Ue)===Object.prototype:Ue instanceof Object||Ue.constructor===Object,rr=Ue instanceof Object?"":"null prototype",or=!er&&xe&&Object(Ue)===Ue&&xe in Ue?ue.call(Re(Ue),8,-1):rr?"Object":"",dn=(er||typeof Ue.constructor!="function"?"":Ue.constructor.name?Ue.constructor.name+" ":"")+(or||rr?"["+C.call(Te.call([],or||[],rr||[]),": ")+"] ":"");return tn.length===0?dn+"{}":Le?dn+"{"+ht(tn,Le)+"}":dn+"{ "+C.call(tn,", ")+" }"}return String(Ue)};var ce=Object.prototype.hasOwnProperty||function(Ge){return Ge in this};function Se(Ge,Ue){return ce.call(Ge,Ue)}function Re(Ge){return G.call(Ge)}function T(Ge,Ue){if(Ge.indexOf)return Ge.indexOf(Ue);for(var Ct=0,Kt=Ge.length;Ct<Kt;Ct++)if(Ge[Ct]===Ue)return Ct;return-1}function B(Ge,Ue){if(Ge.length>Ue.maxStringLength){var Ct=Ge.length-Ue.maxStringLength,Kt="... "+Ct+" more character"+(Ct>1?"s":"");return B(ue.call(Ge,0,Ue.maxStringLength),Ue)+Kt}return H(pe.call(pe.call(Ge,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",Ue)}function Y(Ge){var Ue=Ge.charCodeAt(0),Ct={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ue];return Ct?"\\"+Ct:"\\x"+(Ue<16?"0":"")+Me.call(Ue.toString(16))}function fe(Ge){return"Object("+Ge+")"}function Ne(Ge){return Ge+" { ? }"}function De(Ge,Ue,Ct,Kt){return Ge+" ("+Ue+") {"+(Kt?ht(Ct,Kt):C.call(Ct,", "))+"}"}function ht(Ge,Ue){if(Ge.length===0)return"";var Ct=`
|
|
6
|
+
`+Ue.prev+Ue.base;return Ct+C.call(Ge,","+Ct)+`
|
|
7
|
+
`+Ue.prev}function jt(Ge,Ue){var Ct=he(Ge),Kt=[];if(Ct){Kt.length=Ge.length;for(var Yt=0;Yt<Ge.length;Yt++)Kt[Yt]=Se(Ge,Yt)?Ue(Ge[Yt],Ge):""}var Gt,Bt=typeof Ye=="function"?Ye(Ge):[];if(Ze){Gt={};for(var mn=0;mn<Bt.length;mn++)Gt["$"+Bt[mn]]=Bt[mn]}for(var yt in Ge)Se(Ge,yt)&&(Ct&&String(Number(yt))===yt&&yt<Ge.length||Ze&&Gt["$"+yt]instanceof Symbol||(be.call(/[^\w$]/,yt)?Kt.push(Ue(yt,Ge)+": "+Ue(Ge[yt],Ge)):Kt.push(yt+": "+Ue(Ge[yt],Ge))));if(typeof Ye=="function")for(var zt=0;zt<Bt.length;zt++)ct.call(Ge,Bt[zt])&&Kt.push("["+Ue(Bt[zt])+"]: "+Ue(Ge[Bt[zt]],Ge));return Kt}},6164:(S,d,o)=>{"use strict";var l;if(!Object.keys){var v=Object.prototype.hasOwnProperty,m=Object.prototype.toString,y=o(5184),j=Object.prototype.propertyIsEnumerable,h=!j.call({toString:null},"toString"),g=j.call(function(){},"prototype"),A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],I=function(U){var G=U.constructor;return G&&G.prototype===U},O={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},x=function(){if(typeof window=="undefined")return!1;for(var U in window)try{if(!O["$"+U]&&v.call(window,U)&&window[U]!==null&&typeof window[U]=="object")try{I(window[U])}catch(G){return!0}}catch(G){return!0}return!1}();l=function(U){var G=U!==null&&typeof U=="object",P=m.call(U)==="[object Function]",z=y(U),ue=G&&m.call(U)==="[object String]",pe=[];if(!G&&!P&&!z)throw new TypeError("Object.keys called on a non-object");var Me=g&&P;if(ue&&U.length>0&&!v.call(U,0))for(var rt=0;rt<U.length;++rt)pe.push(String(rt));if(z&&U.length>0)for(var be=0;be<U.length;++be)pe.push(String(be));else for(var Te in U)Me&&Te==="prototype"||!v.call(U,Te)||pe.push(String(Te));if(h)for(var C=function(_e){if(typeof window=="undefined"||!x)return I(_e);try{return I(_e)}catch(Oe){return!1}}(U),st=0;st<A.length;++st)C&&A[st]==="constructor"||!v.call(U,A[st])||pe.push(A[st]);return pe}}S.exports=l},3818:(S,d,o)=>{"use strict";var l=Array.prototype.slice,v=o(5184),m=Object.keys,y=m?function(h){return m(h)}:o(6164),j=Object.keys;y.shim=function(){if(Object.keys){var h=function(){var g=Object.keys(arguments);return g&&g.length===arguments.length}(1,2);h||(Object.keys=function(g){return v(g)?j(l.call(g)):j(g)})}else Object.keys=y;return Object.keys||y},S.exports=y},5184:S=>{"use strict";var d=Object.prototype.toString;S.exports=function(o){var l=d.call(o),v=l==="[object Arguments]";return v||(v=l!=="[object Array]"&&o!==null&&typeof o=="object"&&typeof o.length=="number"&&o.length>=0&&d.call(o.callee)==="[object Function]"),v}},9747:(S,d,o)=>{"use strict";o(1e3)()},216:(S,d,o)=>{"use strict";o(8158)();var l=o(4663),v=o(8737),m=o(4787),y=o(7037),j=o(6893),h=o(3862),g=h(j("%Promise.all%")),A=h(j("%Promise.reject%"));S.exports=function(I){var O=this;if(v(O)!=="Object")throw new TypeError("`this` value must be an object");var x=m(I);return g(O,y(x,function(U){var G=l(O,U);try{return G.then(function(P){return{status:"fulfilled",value:P}},function(P){return{status:"rejected",reason:P}})}catch(P){return A(O,P)}}))}},7384:(S,d,o)=>{"use strict";var l=o(8158),v=o(216);S.exports=function(){return l(),typeof Promise.allSettled=="function"?Promise.allSettled:v}},8158:S=>{"use strict";S.exports=function(){if(typeof Promise!="function")throw new TypeError("`Promise.allSettled` requires a global `Promise` be available.")}},1e3:(S,d,o)=>{"use strict";var l=o(8158),v=o(7384),m=o(7921);S.exports=function(){l();var y=v();return m(Promise,{allSettled:y},{allSettled:function(){return Promise.allSettled!==y}}),y}},2231:(S,d,o)=>{"use strict";o.r(d),o.d(d,{decode:()=>z,default:()=>rt,encode:()=>ue,toASCII:()=>Me,toUnicode:()=>pe,ucs2decode:()=>x,ucs2encode:()=>U});const l=2147483647,v=36,m=/^xn--/,y=/[^\0-\x7E]/,j=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=Math.floor,A=String.fromCharCode;function I(be){throw new RangeError(h[be])}function O(be,Te){const C=be.split("@");let st="";C.length>1&&(st=C[0]+"@",be=C[1]);const _e=function(Oe,Ye){const ne=[];let Ze=Oe.length;for(;Ze--;)ne[Ze]=Ye(Oe[Ze]);return ne}((be=be.replace(j,".")).split("."),Te).join(".");return st+_e}function x(be){const Te=[];let C=0;const st=be.length;for(;C<st;){const _e=be.charCodeAt(C++);if(_e>=55296&&_e<=56319&&C<st){const Oe=be.charCodeAt(C++);(64512&Oe)==56320?Te.push(((1023&_e)<<10)+(1023&Oe)+65536):(Te.push(_e),C--)}else Te.push(_e)}return Te}const U=be=>String.fromCodePoint(...be),G=function(be,Te){return be+22+75*(be<26)-((Te!=0)<<5)},P=function(be,Te,C){let st=0;for(be=C?g(be/700):be>>1,be+=g(be/Te);be>455;st+=v)be=g(be/35);return g(st+36*be/(be+38))},z=function(be){const Te=[],C=be.length;let st=0,_e=128,Oe=72,Ye=be.lastIndexOf("-");Ye<0&&(Ye=0);for(let Ze=0;Ze<Ye;++Ze)be.charCodeAt(Ze)>=128&&I("not-basic"),Te.push(be.charCodeAt(Ze));for(let Ze=Ye>0?Ye+1:0;Ze<C;){let xe=st;for(let Qe=1,re=v;;re+=v){Ze>=C&&I("invalid-input");const f=(ne=be.charCodeAt(Ze++))-48<10?ne-22:ne-65<26?ne-65:ne-97<26?ne-97:v;(f>=v||f>g((l-st)/Qe))&&I("overflow"),st+=f*Qe;const D=re<=Oe?1:re>=Oe+26?26:re-Oe;if(f<D)break;const H=v-D;Qe>g(l/H)&&I("overflow"),Qe*=H}const ct=Te.length+1;Oe=P(st-xe,ct,xe==0),g(st/ct)>l-_e&&I("overflow"),_e+=g(st/ct),st%=ct,Te.splice(st++,0,_e)}var ne;return String.fromCodePoint(...Te)},ue=function(be){const Te=[];let C=(be=x(be)).length,st=128,_e=0,Oe=72;for(const Ze of be)Ze<128&&Te.push(A(Ze));let Ye=Te.length,ne=Ye;for(Ye&&Te.push("-");ne<C;){let Ze=l;for(const ct of be)ct>=st&&ct<Ze&&(Ze=ct);const xe=ne+1;Ze-st>g((l-_e)/xe)&&I("overflow"),_e+=(Ze-st)*xe,st=Ze;for(const ct of be)if(ct<st&&++_e>l&&I("overflow"),ct==st){let Qe=_e;for(let re=v;;re+=v){const f=re<=Oe?1:re>=Oe+26?26:re-Oe;if(Qe<f)break;const D=Qe-f,H=v-f;Te.push(A(G(f+D%H,0))),Qe=g(D/H)}Te.push(A(G(Qe,0))),Oe=P(_e,xe,ne==Ye),_e=0,++ne}++_e,++st}return Te.join("")},pe=function(be){return O(be,function(Te){return m.test(Te)?z(Te.slice(4).toLowerCase()):Te})},Me=function(be){return O(be,function(Te){return y.test(Te)?"xn--"+ue(Te):Te})},rt={version:"2.1.0",ucs2:{decode:x,encode:U},decode:z,encode:ue,toASCII:Me,toUnicode:pe}},203:(S,d,o)=>{"use strict";o.d(d,{Z:()=>v});var l=o(9925);const v=l.TurboModuleRegistry.get("RNPerformanceManager")},5280:(S,d,o)=>{"use strict";o.r(d),o.d(d,{PerformanceObserver:()=>Me,default:()=>C,setResourceLoggingEnabled:()=>st});var l=o(9925);function v(_e,Oe,Ye){return Oe in _e?Object.defineProperty(_e,Oe,{value:Ye,enumerable:!0,configurable:!0,writable:!0}):_e[Oe]=Ye,_e}class m{constructor(Oe){v(this,"entries",void 0),this.entries=Oe}getEntries(){return this.entries.slice(0)}getEntriesByType(Oe){return this.entries.filter(Ye=>Ye.entryType===Oe)}getEntriesByName(Oe,Ye){return this.entries.filter(ne=>ne.name===Oe&&(!Ye||ne.entryType===Ye))}}const y=["mark","measure","metric","react-native-mark","resource"],j=(_e,Oe)=>_e.startTime-Oe.startTime,h="single",g="multiple",A=_e=>{var Oe,Ye;let{addEventListener:ne,removeEventListener:Ze,getEntriesByType:xe}=_e;return Ye=Oe=class{constructor(ct){v(this,"callback",void 0),v(this,"buffer",void 0),v(this,"entryTypes",void 0),v(this,"timer",void 0),v(this,"observerType",void 0),v(this,"emitRecords",()=>{this.callback(new m(this.takeRecords()),this)}),v(this,"receiveRecord",Qe=>{this.entryTypes.has(Qe.entryType)&&(this.buffer.push(Qe),this.scheduleEmission())}),this.callback=ct,this.buffer=[],this.timer=null,this.entryTypes=new Set,this.observerType=null}scheduleEmission(){this.timer===null&&(this.timer=requestAnimationFrame(()=>{this.timer=null,this.emitRecords()}))}observe(ct){if(!ct||!ct.entryTypes&&!ct.type)throw new TypeError("Failed to execute 'observe' on 'PerformanceObserver': An observe() call must include either entryTypes or type arguments.");if(ct.entryTypes&&ct.type)throw new TypeError("Failed to execute 'observe' on 'PerformanceObserver': An observe() call must not include both entryTypes and type arguments.");if(ct.entryTypes){if(this.observerType===h)throw new Error("This PerformanceObserver has performed observe({type:...}, therefore it cannot perform observe({entryTypes:...})");if(!Array.isArray(ct.entryTypes))throw new TypeError("entryTypes argument must be an array");this.observerType=g,this.entryTypes=new Set(ct.entryTypes),this.buffer=[],ct.buffered}else{if(this.observerType===g)throw new Error("This PerformanceObserver has performed observe({entryTypes:...}, therefore it cannot perform observe({type:...})");this.observerType=h,this.entryTypes.add(ct.type),ct.buffered&&(this.buffer=xe(ct.type),this.scheduleEmission())}this.entryTypes.forEach(Qe=>{y.includes(Qe)}),ne(this.receiveRecord)}disconnect(){Ze(this.receiveRecord),this.entryTypes=new Set,this.observerType=null,this.buffer=[],this.timer!==null&&(cancelAnimationFrame(this.timer),this.timer=null)}takeRecords(){const ct=this.buffer.sort(j);return this.buffer=[],ct}},v(Oe,"supportedEntryTypes",y),Ye};function I(_e,Oe,Ye){return Oe in _e?Object.defineProperty(_e,Oe,{value:Ye,enumerable:!0,configurable:!0,writable:!0}):_e[Oe]=Ye,_e}class O{constructor(Oe,Ye,ne,Ze){I(this,"name",void 0),I(this,"entryType",void 0),I(this,"startTime",void 0),I(this,"duration",void 0),this.name=Oe,this.entryType=Ye,this.startTime=ne,this.duration=Ze}toJSON(){return{name:this.name,entryType:this.entryType,startTime:this.startTime,duration:this.duration}}}class x extends O{constructor(Oe){let Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(Oe,"mark",Ye.startTime,0),I(this,"detail",void 0),this.detail=Ye.detail}toJSON(){return{name:this.name,entryType:this.entryType,startTime:this.startTime,duration:this.duration,detail:this.detail}}}class U extends O{constructor(Oe,Ye){super(Oe,"react-native-mark",Ye,0)}}class G extends O{constructor(Oe,Ye){super(Oe,"metric",Ye.startTime,0),I(this,"value",void 0),I(this,"detail",void 0),this.value=Ye.value,this.detail=Ye.detail}toJSON(){return{name:this.name,entryType:this.entryType,startTime:this.startTime,duration:this.duration,detail:this.detail,value:this.value}}}class P extends O{constructor(Oe){let Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(Oe,"measure",Ye.startTime,Ye.duration),I(this,"detail",void 0),this.detail=Ye.detail}toJSON(){return{name:this.name,entryType:this.entryType,startTime:this.startTime,duration:this.duration,detail:this.detail}}}class z extends O{constructor(){let{name:Oe,startTime:Ye,duration:ne,initiatorType:Ze,responseEnd:xe,transferSize:ct}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(Oe,"resource",Ye,ne),I(this,"initiatorType",void 0),I(this,"responseEnd",void 0),I(this,"fetchStart",void 0),I(this,"transferSize",void 0),I(this,"connectEnd",void 0),I(this,"connectStart",void 0),I(this,"decodedBodySize",void 0),I(this,"domainLookupEnd",void 0),I(this,"domainLookupStart",void 0),I(this,"encodedBodySize",void 0),I(this,"redirectEnd",void 0),I(this,"redirectStart",void 0),I(this,"requestStart",void 0),I(this,"responseStart",void 0),I(this,"secureConnectionStart",void 0),I(this,"serverTiming",void 0),I(this,"workerStart",void 0),I(this,"workerTiming",void 0),this.initiatorType=Ze,this.fetchStart=Ye,this.responseEnd=xe,this.transferSize=ct,this.connectEnd=0,this.connectStart=0,this.decodedBodySize=0,this.domainLookupEnd=0,this.domainLookupStart=0,this.encodedBodySize=0,this.redirectEnd=0,this.redirectStart=0,this.requestStart=0,this.responseStart=0,this.secureConnectionStart=0,this.serverTiming=[],this.transferSize=0,this.workerStart=0,this.workerTiming=[]}toJSON(){return{name:this.name,entryType:this.entryType,startTime:this.startTime,duration:this.duration,initiatorType:this.initiatorType,fetchStart:this.fetchStart,responseEnd:this.responseEnd,transferSize:this.transferSize,connectEnd:this.connectEnd,connectStart:this.connectStart,decodedBodySize:this.decodedBodySize,domainLookupEnd:this.domainLookupEnd,domainLookupStart:this.domainLookupStart,encodedBodySize:this.encodedBodySize,redirectEnd:this.redirectEnd,redirectStart:this.redirectStart,requestStart:this.requestStart,responseStart:this.responseStart,secureConnectionStart:this.secureConnectionStart,serverTiming:this.serverTiming,workerStart:this.workerStart,workerTiming:this.workerTiming}}}const ue=()=>o.g.performance.now(),pe=(_e,Oe,Ye)=>{if(_e.XMLHttpRequest&&!_e.XMLHttpRequest.performanceOriginal){class ne extends _e.XMLHttpRequest{constructor(){super(...arguments),this.performanceStartTime=null,super.onreadystatechange=()=>{if(this.readyState===this.DONE&&this.responseURL&&this.responseHeaders){const xe=Oe.now(),ct=Object.entries(this.responseHeaders).find(Qe=>{let[re]=Qe;return re.toLowerCase()==="content-length"});Ye(new z({name:this.responseURL,startTime:this.performanceStartTime,duration:xe-this.performanceStartTime,initiatorType:"xmlhttprequest",responseEnd:xe,transferSize:ct?parseInt(ct[1]):0}))}}}open(){this.performanceStartTime=Oe.now(),super.open(...arguments)}}ne.performanceOriginal=_e.XMLHttpRequest,_e.XMLHttpRequest=ne}},{PerformanceObserver:Me,addEntry:rt,performance:be}=function(){let _e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ue;const Oe=_e(),{addEventListener:Ye,removeEventListener:ne,emit:Ze}=(()=>{const H=new Set;return{addEventListener:q=>{H.add(q)},removeEventListener:q=>{H.delete(q)},emit:q=>{H.forEach(he=>{he(q)})}}})(),xe=new Map;let ct=[];function Qe(H){return ct.push(H),H.entryType!=="mark"&&H.entryType!=="react-native-mark"||xe.set(H.name,H.startTime),Ze(H),H}const re=(H,q)=>{ct=ct.filter(he=>!!(he.entryType!==H||q&&he.name!==q)||(xe.delete(he.name),!1))},f=H=>{switch(typeof H){case"string":if(!xe.has(H))throw new Error(`Failed to execute 'measure' on 'Performance': The mark '${H}' does not exist.`);return xe.get(H);case"number":return H;default:throw new TypeError(`Failed to execute 'measure' on 'Performance': Expected mark name or timestamp, got '${H}'.`)}};function D(H){return ct.filter(q=>q.entryType===H)}return{PerformanceObserver:A({addEventListener:Ye,removeEventListener:ne,getEntriesByType:D}),addEntry:Qe,performance:{timeOrigin:Oe,now:_e,mark:function(H){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Qe(new x(H,{startTime:"startTime"in q&&q.startTime!==void 0?q.startTime:_e(),detail:q.detail}))},clearMarks:H=>re("mark",H),measure:(H,q,he)=>{let Ae,ce=0,Se=0;if(q&&typeof q=="object"&&q.constructor==Object){if(he)throw new TypeError("Failed to execute 'measure' on 'Performance': The measureOptions and endMark arguments may not be combined.");if(!q.start&&!q.end)throw new TypeError("Failed to execute 'measure' on 'Performance': At least one of the start and end option must be passed.");if(q.start&&q.end&&q.duration)throw new TypeError("Failed to execute 'measure' on 'Performance': Cannot send start, end and duration options together.");Ae=q.detail,Se=q&&q.end?f(q.end):q&&q.start&&q.duration?f(q.start)+f(q.duration):_e(),ce=q&&q.start?f(q.start):q&&q.end&&q.duration?f(q.end)-f(q.duration):Oe}else Se=he?f(he):_e(),ce=typeof q=="string"?f(q):Oe;return Qe(new P(H,{detail:Ae,startTime:ce,duration:Se-ce}))},clearMeasures:H=>re("measure",H),metric:(H,q)=>{let he,Ae,ce;if(typeof q=="object"&&q.constructor==Object){if(!q.value)throw new TypeError("Failed to execute 'metric' on 'Performance': The value option must be passed.");he=q.value,Ae=q.startTime,ce=q.detail}else{if(q==null)throw new TypeError("Failed to execute 'metric' on 'Performance': The value option must be passed.");he=q}return Qe(new G(H,{startTime:Ae||_e(),value:he,detail:ce}))},clearMetrics:H=>re("metric",H),getEntries:()=>ct.slice(0),getEntriesByName:(H,q)=>ct.filter(he=>he.name===H&&(!q||he.entryType===q)),getEntriesByType:D}}}(),Te=o.g.__turboModuleProxy!=null?o(203).Z:l.NativeModules.RNPerformanceManager;if(l.Platform.OS==="android"||Te){const _e=new l.NativeEventEmitter(Te);_e.addListener("mark",Oe=>{rt(new U(Oe.name,Oe.startTime))}),_e.addListener("metric",Oe=>{rt(new G(Oe.name,{startTime:Oe.startTime,value:Oe.value}))})}const C=be,st=function(){var _e;!(arguments.length>0&&arguments[0]!==void 0)||arguments[0]?pe(globalThis,be,rt):(_e=globalThis).XMLHttpRequest&&_e.XMLHttpRequest.performanceOriginal&&(_e.XMLHttpRequest=_e.XMLHttpRequest.performanceOriginal)}},5478:(S,d,o)=>{"use strict";o.d(d,{J:()=>j});var l=o(9925),v=o(7091);let m=null;const{BlobModule:y}=l.NativeModules;y&&typeof y.BLOB_URI_SCHEME=="string"&&(m=y.BLOB_URI_SCHEME+":",typeof y.BLOB_URI_HOST=="string"&&(m+=`//${y.BLOB_URI_HOST}/`)),v.Jx.createObjectURL=function(h){if(m===null)throw new Error("Cannot create URL for blob!");return`${m}${h.data.blobId}?offset=${h.data.offset}&size=${h.size}`},v.Jx.revokeObjectURL=function(h){};const j=v.Jx},7343:(S,d,o)=>{"use strict";o.d(d,{_:()=>l._c});var l=o(7091)},5196:(S,d,o)=>{"use strict";const l=o(7146);function v(m,y,j){const h=Object.getOwnPropertyDescriptor(m,y);if(__DEV__&&h){const O=`original${y[0].toUpperCase()}${y.substr(1)}`;Object.defineProperty(m,O,h)}const{enumerable:g,writable:A,configurable:I=!1}=h||{};h&&!I||l(m,y,{get:j,enumerable:g!==!1,writable:A!==!1})}S.exports={polyfillObjectProperty:v,polyfillGlobal:function(m,y){v(o.g,m,y)}}},7146:S=>{"use strict";S.exports=function(d,o,l){const{get:v}=l,m=l.enumerable!==!1,y=l.writable!==!1;let j,h=!1;function g(A){j=A,h=!0,Object.defineProperty(d,o,{value:A,configurable:!0,enumerable:m,writable:y})}Object.defineProperty(d,o,{get:function(){return h||(h=!0,g(v())),j},set:g,configurable:!0,enumerable:m})}},7091:(S,d,o)=>{"use strict";const{URL:l,URLSearchParams:v}=o(62),m=o(5272),y=o(8634),j={};l.install(j),v.install(j),d.Jx=j.URL,d._c=j.URLSearchParams,m.parseURL,m.basicURLParse,m.serializeURL,m.serializeHost,m.serializeInteger,m.serializeURLOrigin,m.setTheUsername,m.setThePassword,m.cannotHaveAUsernamePasswordPort,y.percentDecode},8024:(S,d,o)=>{"use strict";const l=o(5272),v=o(8634),m=o(1209);d.implementation=class{constructor(y,j){const h=j[0],g=j[1];let A=null;if(g!==void 0&&(A=l.basicURLParse(g),A===null))throw new TypeError(`Invalid base URL: ${g}`);const I=l.basicURLParse(h,{baseURL:A});if(I===null)throw new TypeError(`Invalid URL: ${h}`);const O=I.query!==null?I.query:"";this._url=I,this._query=m.createImpl(y,[O],{doNotStripQMark:!0}),this._query._url=this}get href(){return l.serializeURL(this._url)}set href(y){const j=l.basicURLParse(y);if(j===null)throw new TypeError(`Invalid URL: ${y}`);this._url=j,this._query._list.splice(0);const{query:h}=j;h!==null&&(this._query._list=v.parseUrlencoded(h))}get origin(){return l.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(y){l.basicURLParse(y+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(y){l.cannotHaveAUsernamePasswordPort(this._url)||l.setTheUsername(this._url,y)}get password(){return this._url.password}set password(y){l.cannotHaveAUsernamePasswordPort(this._url)||l.setThePassword(this._url,y)}get host(){const y=this._url;return y.host===null?"":y.port===null?l.serializeHost(y.host):l.serializeHost(y.host)+":"+l.serializeInteger(y.port)}set host(y){this._url.cannotBeABaseURL||l.basicURLParse(y,{url:this._url,stateOverride:"host"})}get hostname(){return this._url.host===null?"":l.serializeHost(this._url.host)}set hostname(y){this._url.cannotBeABaseURL||l.basicURLParse(y,{url:this._url,stateOverride:"hostname"})}get port(){return this._url.port===null?"":l.serializeInteger(this._url.port)}set port(y){l.cannotHaveAUsernamePasswordPort(this._url)||(y===""?this._url.port=null:l.basicURLParse(y,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:this._url.path.length===0?"":"/"+this._url.path.join("/")}set pathname(y){this._url.cannotBeABaseURL||(this._url.path=[],l.basicURLParse(y,{url:this._url,stateOverride:"path start"}))}get search(){return this._url.query===null||this._url.query===""?"":"?"+this._url.query}set search(y){const j=this._url;if(y==="")return j.query=null,void(this._query._list=[]);const h=y[0]==="?"?y.substring(1):y;j.query="",l.basicURLParse(h,{url:j,stateOverride:"query"}),this._query._list=v.parseUrlencoded(h)}get searchParams(){return this._query}get hash(){return this._url.fragment===null||this._url.fragment===""?"":"#"+this._url.fragment}set hash(y){if(y==="")return void(this._url.fragment=null);const j=y[0]==="#"?y.substring(1):y;this._url.fragment="",l.basicURLParse(j,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},4485:(S,d,o)=>{"use strict";const l=o(143),v=o(7233),m=v.implSymbol,y=v.ctorRegistrySymbol,j={_mixedIntoPredicates:[],is(g){if(g){if(v.hasOwn(g,m)&&g[m]instanceof h.implementation)return!0;for(const A of S.exports._mixedIntoPredicates)if(A(g))return!0}return!1},isImpl(g){if(g){if(g instanceof h.implementation)return!0;const A=v.wrapperForImpl(g);for(const I of S.exports._mixedIntoPredicates)if(I(A))return!0}return!1},convert(g,{context:A="The provided value"}={}){if(S.exports.is(g))return v.implForWrapper(g);throw new TypeError(`${A} is not of type 'URL'.`)},create(g,A,I){if(g[y]===void 0)throw new Error("Internal error: invalid global object");const O=g[y].URL;if(O===void 0)throw new Error("Internal error: constructor URL is not installed on the passed global object");let x=Object.create(O.prototype);return x=j.setup(x,g,A,I),x},createImpl(g,A,I){const O=j.create(g,A,I);return v.implForWrapper(O)},_internalSetup(g){},setup:(g,A,I=[],O={})=>(O.wrapper=g,j._internalSetup(g),Object.defineProperty(g,m,{value:new h.implementation(A,I,O),configurable:!0}),g[m][v.wrapperSymbol]=g,h.init&&h.init(g[m],O),g),install(g){class A{constructor(O){if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const x=[];{let U=arguments[0];U=l.USVString(U,{context:"Failed to construct 'URL': parameter 1"}),x.push(U)}{let U=arguments[1];U!==void 0&&(U=l.USVString(U,{context:"Failed to construct 'URL': parameter 2"})),x.push(U)}return j.setup(Object.create(this.constructor.prototype),g,x)}toJSON(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].toJSON()}get href(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].href}set href(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'href' property on 'URL': The provided value"}),this[m].href=O}toString(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].href}get origin(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].origin}get protocol(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].protocol}set protocol(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'protocol' property on 'URL': The provided value"}),this[m].protocol=O}get username(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].username}set username(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'username' property on 'URL': The provided value"}),this[m].username=O}get password(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].password}set password(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'password' property on 'URL': The provided value"}),this[m].password=O}get host(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].host}set host(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'host' property on 'URL': The provided value"}),this[m].host=O}get hostname(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].hostname}set hostname(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'hostname' property on 'URL': The provided value"}),this[m].hostname=O}get port(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].port}set port(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'port' property on 'URL': The provided value"}),this[m].port=O}get pathname(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].pathname}set pathname(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'pathname' property on 'URL': The provided value"}),this[m].pathname=O}get search(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].search}set search(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'search' property on 'URL': The provided value"}),this[m].search=O}get searchParams(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return v.getSameObject(this,"searchParams",()=>v.tryWrapperForImpl(this[m].searchParams))}get hash(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].hash}set hash(O){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");O=l.USVString(O,{context:"Failed to set the 'hash' property on 'URL': The provided value"}),this[m].hash=O}}Object.defineProperties(A.prototype,{toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0},[Symbol.toStringTag]:{value:"URL",configurable:!0}}),g[y]===void 0&&(g[y]=Object.create(null)),g[y].URL=A,Object.defineProperty(g,"URL",{configurable:!0,writable:!0,value:A})}};S.exports=j;const h=o(8024)},6897:(S,d,o)=>{"use strict";const l=o(8634);d.implementation=class{constructor(v,m,{doNotStripQMark:y=!1}){let j=m[0];if(this._list=[],this._url=null,y||typeof j!="string"||j[0]!=="?"||(j=j.slice(1)),Array.isArray(j))for(const h of j){if(h.length!==2)throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([h[0],h[1]])}else if(typeof j=="object"&&Object.getPrototypeOf(j)===null)for(const h of Object.keys(j)){const g=j[h];this._list.push([h,g])}else this._list=l.parseUrlencoded(j)}_updateSteps(){if(this._url!==null){let v=l.serializeUrlencoded(this._list);v===""&&(v=null),this._url._url.query=v}}append(v,m){this._list.push([v,m]),this._updateSteps()}delete(v){let m=0;for(;m<this._list.length;)this._list[m][0]===v?this._list.splice(m,1):m++;this._updateSteps()}get(v){for(const m of this._list)if(m[0]===v)return m[1];return null}getAll(v){const m=[];for(const y of this._list)y[0]===v&&m.push(y[1]);return m}has(v){for(const m of this._list)if(m[0]===v)return!0;return!1}set(v,m){let y=!1,j=0;for(;j<this._list.length;)this._list[j][0]===v?y?this._list.splice(j,1):(y=!0,this._list[j][1]=m,j++):j++;y||this._list.push([v,m]),this._updateSteps()}sort(){var v,m;this._list=(v=this._list,m=(y,j)=>y[0]>j[0],v.map((y,j)=>({item:y,index:j})).sort((y,j)=>m(y.item,j.item)||y.index-j.index).map(({item:y})=>y)),this._updateSteps()}[Symbol.iterator](){return this._list[Symbol.iterator]()}toString(){return l.serializeUrlencoded(this._list)}}},1209:(S,d,o)=>{"use strict";const l=o(143),v=o(7233),m=v.implSymbol,y=v.ctorRegistrySymbol,j=Object.create(v.IteratorPrototype,{next:{value:function(){const A=this[v.iterInternalSymbol],{target:I,kind:O,index:x}=A,U=Array.from(I[m]);if(x>=U.length)return{value:void 0,done:!0};const G=U[x];A.index=x+1;const[P,z]=G.map(v.tryWrapperForImpl);let ue;switch(O){case"key":ue=P;break;case"value":ue=z;break;case"key+value":ue=[P,z]}return{value:ue,done:!1}},writable:!0,enumerable:!0,configurable:!0},[Symbol.toStringTag]:{value:"URLSearchParams Iterator",configurable:!0}}),h={_mixedIntoPredicates:[],is(A){if(A){if(v.hasOwn(A,m)&&A[m]instanceof g.implementation)return!0;for(const I of S.exports._mixedIntoPredicates)if(I(A))return!0}return!1},isImpl(A){if(A){if(A instanceof g.implementation)return!0;const I=v.wrapperForImpl(A);for(const O of S.exports._mixedIntoPredicates)if(O(I))return!0}return!1},convert(A,{context:I="The provided value"}={}){if(S.exports.is(A))return v.implForWrapper(A);throw new TypeError(`${I} is not of type 'URLSearchParams'.`)},createDefaultIterator(A,I){const O=Object.create(j);return Object.defineProperty(O,v.iterInternalSymbol,{value:{target:A,kind:I,index:0},configurable:!0}),O},create(A,I,O){if(A[y]===void 0)throw new Error("Internal error: invalid global object");const x=A[y].URLSearchParams;if(x===void 0)throw new Error("Internal error: constructor URLSearchParams is not installed on the passed global object");let U=Object.create(x.prototype);return U=h.setup(U,A,I,O),U},createImpl(A,I,O){const x=h.create(A,I,O);return v.implForWrapper(x)},_internalSetup(A){},setup:(A,I,O=[],x={})=>(x.wrapper=A,h._internalSetup(A),Object.defineProperty(A,m,{value:new g.implementation(I,O,x),configurable:!0}),A[m][v.wrapperSymbol]=A,g.init&&g.init(A[m],x),A),install(A){class I{constructor(){const x=[];{let U=arguments[0];if(U!==void 0)if(v.isObject(U))if(U[Symbol.iterator]!==void 0){if(!v.isObject(U))throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");{const G=[],P=U;for(let z of P){if(!v.isObject(z))throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");{const ue=[],pe=z;for(let Me of pe)Me=l.USVString(Me,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element"}),ue.push(Me);z=ue}G.push(z)}U=G}}else{if(!v.isObject(U))throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");{const G=Object.create(null);for(const P of Reflect.ownKeys(U)){const z=Object.getOwnPropertyDescriptor(U,P);if(z&&z.enumerable){let ue=P;ue=l.USVString(ue,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key"});let pe=U[P];pe=l.USVString(pe,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value"}),G[ue]=pe}}U=G}}else U=l.USVString(U,{context:"Failed to construct 'URLSearchParams': parameter 1"});else U="";x.push(U)}return h.setup(Object.create(this.constructor.prototype),A,x)}append(x,U){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");if(arguments.length<2)throw new TypeError("Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only "+arguments.length+" present.");const G=[];{let P=arguments[0];P=l.USVString(P,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1"}),G.push(P)}{let P=arguments[1];P=l.USVString(P,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2"}),G.push(P)}return this[m].append(...G)}delete(x){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");if(arguments.length<1)throw new TypeError("Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only "+arguments.length+" present.");const U=[];{let G=arguments[0];G=l.USVString(G,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1"}),U.push(G)}return this[m].delete(...U)}get(x){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");if(arguments.length<1)throw new TypeError("Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only "+arguments.length+" present.");const U=[];{let G=arguments[0];G=l.USVString(G,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1"}),U.push(G)}return this[m].get(...U)}getAll(x){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");if(arguments.length<1)throw new TypeError("Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only "+arguments.length+" present.");const U=[];{let G=arguments[0];G=l.USVString(G,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1"}),U.push(G)}return v.tryWrapperForImpl(this[m].getAll(...U))}has(x){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");if(arguments.length<1)throw new TypeError("Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only "+arguments.length+" present.");const U=[];{let G=arguments[0];G=l.USVString(G,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1"}),U.push(G)}return this[m].has(...U)}set(x,U){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");if(arguments.length<2)throw new TypeError("Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only "+arguments.length+" present.");const G=[];{let P=arguments[0];P=l.USVString(P,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1"}),G.push(P)}{let P=arguments[1];P=l.USVString(P,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2"}),G.push(P)}return this[m].set(...G)}sort(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].sort()}toString(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return this[m].toString()}keys(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return S.exports.createDefaultIterator(this,"key")}values(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return S.exports.createDefaultIterator(this,"value")}entries(){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");return S.exports.createDefaultIterator(this,"key+value")}forEach(x){if(!this||!S.exports.is(this))throw new TypeError("Illegal invocation");if(arguments.length<1)throw new TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");if(typeof x!="function")throw new TypeError("Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1 is not a function.");const U=arguments[1];let G=Array.from(this[m]),P=0;for(;P<G.length;){const[z,ue]=G[P].map(v.tryWrapperForImpl);x.call(U,ue,z,this),G=Array.from(this[m]),P++}}}Object.defineProperties(I.prototype,{append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0},[Symbol.toStringTag]:{value:"URLSearchParams",configurable:!0},[Symbol.iterator]:{value:I.prototype.entries,configurable:!0,writable:!0}}),A[y]===void 0&&(A[y]=Object.create(null)),A[y].URLSearchParams=I,Object.defineProperty(A,"URLSearchParams",{configurable:!0,writable:!0,value:I})}};S.exports=h;const g=o(6897)},3291:S=>{"use strict";function d(l){return l>=48&&l<=57}function o(l){return l>=65&&l<=90||l>=97&&l<=122}S.exports={isASCIIDigit:d,isASCIIAlpha:o,isASCIIAlphanumeric:function(l){return o(l)||d(l)},isASCIIHex:function(l){return d(l)||l>=65&&l<=70||l>=97&&l<=102}}},5272:(S,d,o)=>{"use strict";const{Buffer:l}=o(3546),v=o(2231),m=o(3291),{percentEncode:y,percentDecode:j}=o(8634),h={ftp:21,file:null,http:80,https:443,ws:80,wss:443},g=Symbol("failure");function A(re){return v.ucs2.decode(re).length}function I(re,f){const D=re[f];return isNaN(D)?void 0:String.fromCodePoint(D)}function O(re){return re==="."||re.toLowerCase()==="%2e"}function x(re){return re.length===2&&m.isASCIIAlpha(re.codePointAt(0))&&(re[1]===":"||re[1]==="|")}function U(re){return h[re]!==void 0}function G(re){return U(re.scheme)}function P(re){return!U(re.scheme)}function z(re){return h[re]}function ue(re){return re<=31||re>126}const pe=new Set([47,58,59,61,64,91,92,93,94,124]);function Me(re){return C(re)||pe.has(re)}const rt=new Set([32,34,60,62,96]);function be(re){return ue(re)||rt.has(re)}const Te=new Set([35,63,123,125]);function C(re){return be(re)||Te.has(re)}function st(re,f){const D=String.fromCodePoint(re);return f(re)?function(H){const q=l.from(H);let he="";for(let Ae=0;Ae<q.length;++Ae)he+=y(q[Ae]);return he}(D):D}function _e(re){let f=10;if(re.length>=2&&re.charAt(0)==="0"&&re.charAt(1).toLowerCase()==="x"?(re=re.substring(2),f=16):re.length>=2&&re.charAt(0)==="0"&&(re=re.substring(1),f=8),re==="")return 0;let D=/[^0-7]/;return f===10&&(D=/[^0-9]/),f===16&&(D=/[^0-9A-Fa-f]/),D.test(re)?g:parseInt(re,f)}function Oe(re,f=!1){if(re[0]==="[")return re[re.length-1]!=="]"?g:function(q){const he=[0,0,0,0,0,0,0,0];let Ae=0,ce=null,Se=0;if((q=v.ucs2.decode(q))[Se]===58){if(q[Se+1]!==58)return g;Se+=2,++Ae,ce=Ae}for(;Se<q.length;){if(Ae===8)return g;if(q[Se]===58){if(ce!==null)return g;++Se,++Ae,ce=Ae;continue}let Re=0,T=0;for(;T<4&&m.isASCIIHex(q[Se]);)Re=16*Re+parseInt(I(q,Se),16),++Se,++T;if(q[Se]===46){if(T===0||(Se-=T,Ae>6))return g;let B=0;for(;q[Se]!==void 0;){let Y=null;if(B>0){if(!(q[Se]===46&&B<4))return g;++Se}if(!m.isASCIIDigit(q[Se]))return g;for(;m.isASCIIDigit(q[Se]);){const fe=parseInt(I(q,Se));if(Y===null)Y=fe;else{if(Y===0)return g;Y=10*Y+fe}if(Y>255)return g;++Se}he[Ae]=256*he[Ae]+Y,++B,B!==2&&B!==4||++Ae}if(B!==4)return g;break}if(q[Se]===58){if(++Se,q[Se]===void 0)return g}else if(q[Se]!==void 0)return g;he[Ae]=Re,++Ae}if(ce!==null){let Re=Ae-ce;for(Ae=7;Ae!==0&&Re>0;){const T=he[ce+Re-1];he[ce+Re-1]=he[Ae],he[Ae]=T,--Ae,--Re}}else if(ce===null&&Ae!==8)return g;return he}(re.substring(1,re.length-1));if(f)return function(q){if(he=q,he.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/)!==-1)return g;var he;let Ae="";const ce=v.ucs2.decode(q);for(let Se=0;Se<ce.length;++Se)Ae+=st(ce[Se],ue);return Ae}(re);const D=function(q){const he=q;return he===null?g:he}(j(l.from(re)).toString());if(D===g||D.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/)!==-1)return g;const H=function(q){const he=q.split(".");if(he[he.length-1]===""&&he.length>1&&he.pop(),he.length>4)return q;const Ae=[];for(const Re of he){if(Re==="")return q;const T=_e(Re);if(T===g)return q;Ae.push(T)}for(let Re=0;Re<Ae.length-1;++Re)if(Ae[Re]>255)return g;if(Ae[Ae.length-1]>=Math.pow(256,5-Ae.length))return g;let ce=Ae.pop(),Se=0;for(const Re of Ae)ce+=Re*Math.pow(256,3-Se),++Se;return ce}(D);return typeof H=="number"||H===g?H:D}function Ye(re){return typeof re=="number"?function(f){let D="",H=f;for(let q=1;q<=4;++q)D=String(H%256)+D,q!==4&&(D="."+D),H=Math.floor(H/256);return D}(re):re instanceof Array?"["+function(f){let D="";const H=function(he){let Ae=null,ce=1,Se=null,Re=0;for(let T=0;T<he.length;++T)he[T]!==0?(Re>ce&&(Ae=Se,ce=Re),Se=null,Re=0):(Se===null&&(Se=T),++Re);return Re>ce&&(Ae=Se,ce=Re),{idx:Ae,len:ce}}(f).idx;let q=!1;for(let he=0;he<=7;++he)q&&f[he]===0||(q&&(q=!1),H!==he?(D+=f[he].toString(16),he!==7&&(D+=":")):(D+=he===0?"::":":",q=!0));return D}(re)+"]":re}function ne(re){const{path:f}=re;var D;f.length!==0&&(re.scheme==="file"&&f.length===1&&(D=f[0],/^[A-Za-z]:$/.test(D))||f.pop())}function Ze(re){return re.username!==""||re.password!==""}function xe(re,f,D,H,q){if(this.pointer=0,this.input=re,this.base=f||null,this.encodingOverride=D||"utf-8",this.stateOverride=q,this.url=H,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const Ae=function(ce){return ce.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);Ae!==this.input&&(this.parseError=!0),this.input=Ae}const he=function(Ae){return Ae.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(he!==this.input&&(this.parseError=!0),this.input=he,this.state=q||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=v.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const Ae=this.input[this.pointer],ce=isNaN(Ae)?void 0:String.fromCodePoint(Ae),Se=this["parse "+this.state](Ae,ce);if(!Se)break;if(Se===g){this.failure=!0;break}}}xe.prototype["parse scheme start"]=function(re,f){if(m.isASCIIAlpha(re))this.buffer+=f.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,g;this.state="no scheme",--this.pointer}return!0},xe.prototype["parse scheme"]=function(re,f){if(m.isASCIIAlphanumeric(re)||re===43||re===45||re===46)this.buffer+=f.toLowerCase();else if(re===58){if(this.stateOverride&&(G(this.url)&&!U(this.buffer)||!G(this.url)&&U(this.buffer)||(Ze(this.url)||this.url.port!==null)&&this.buffer==="file"||this.url.scheme==="file"&&(this.url.host===""||this.url.host===null)))return!1;if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===z(this.url.scheme)&&(this.url.port=null),!1;this.buffer="",this.url.scheme==="file"?(this.input[this.pointer+1]===47&&this.input[this.pointer+2]===47||(this.parseError=!0),this.state="file"):G(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme?this.state="special relative or authority":G(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===47?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,g;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},xe.prototype["parse no scheme"]=function(re){return this.base===null||this.base.cannotBeABaseURL&&re!==35?g:(this.base.cannotBeABaseURL&&re===35?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):this.base.scheme==="file"?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},xe.prototype["parse special relative or authority"]=function(re){return re===47&&this.input[this.pointer+1]===47?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},xe.prototype["parse path or authority"]=function(re){return re===47?this.state="authority":(this.state="path",--this.pointer),!0},xe.prototype["parse relative"]=function(re){return this.url.scheme=this.base.scheme,isNaN(re)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):re===47?this.state="relative slash":re===63?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):re===35?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):G(this.url)&&re===92?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},xe.prototype["parse relative slash"]=function(re){return!G(this.url)||re!==47&&re!==92?re===47?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(re===92&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},xe.prototype["parse special authority slashes"]=function(re){return re===47&&this.input[this.pointer+1]===47?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},xe.prototype["parse special authority ignore slashes"]=function(re){return re!==47&&re!==92?(this.state="authority",--this.pointer):this.parseError=!0,!0},xe.prototype["parse authority"]=function(re,f){if(re===64){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const D=A(this.buffer);for(let H=0;H<D;++H){const q=this.buffer.codePointAt(H);if(q===58&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const he=st(q,Me);this.passwordTokenSeenFlag?this.url.password+=he:this.url.username+=he}this.buffer=""}else if(isNaN(re)||re===47||re===63||re===35||G(this.url)&&re===92){if(this.atFlag&&this.buffer==="")return this.parseError=!0,g;this.pointer-=A(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=f;return!0},xe.prototype["parse hostname"]=xe.prototype["parse host"]=function(re,f){if(this.stateOverride&&this.url.scheme==="file")--this.pointer,this.state="file host";else if(re!==58||this.arrFlag)if(isNaN(re)||re===47||re===63||re===35||G(this.url)&&re===92){if(--this.pointer,G(this.url)&&this.buffer==="")return this.parseError=!0,g;if(this.stateOverride&&this.buffer===""&&(Ze(this.url)||this.url.port!==null))return this.parseError=!0,!1;const D=Oe(this.buffer,P(this.url));if(D===g)return g;if(this.url.host=D,this.buffer="",this.state="path start",this.stateOverride)return!1}else re===91?this.arrFlag=!0:re===93&&(this.arrFlag=!1),this.buffer+=f;else{if(this.buffer==="")return this.parseError=!0,g;const D=Oe(this.buffer,P(this.url));if(D===g)return g;if(this.url.host=D,this.buffer="",this.state="port",this.stateOverride==="hostname")return!1}return!0},xe.prototype["parse port"]=function(re,f){if(m.isASCIIDigit(re))this.buffer+=f;else{if(!(isNaN(re)||re===47||re===63||re===35||G(this.url)&&re===92||this.stateOverride))return this.parseError=!0,g;if(this.buffer!==""){const D=parseInt(this.buffer);if(D>Math.pow(2,16)-1)return this.parseError=!0,g;this.url.port=D===z(this.url.scheme)?null:D,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}return!0};const ct=new Set([47,92,63,35]);function Qe(re,f){const D=re.length-f;return D>=2&&(H=re[f],q=re[f+1],m.isASCIIAlpha(H)&&(q===58||q===124))&&(D===2||ct.has(re[f+2]));var H,q}xe.prototype["parse file"]=function(re){return this.url.scheme="file",re===47||re===92?(re===92&&(this.parseError=!0),this.state="file slash"):this.base!==null&&this.base.scheme==="file"?isNaN(re)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):re===63?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):re===35?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(Qe(this.input,this.pointer)?this.parseError=!0:(this.url.host=this.base.host,this.url.path=this.base.path.slice(),ne(this.url)),this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},xe.prototype["parse file slash"]=function(re){var f;return re===47||re===92?(re===92&&(this.parseError=!0),this.state="file host"):(this.base===null||this.base.scheme!=="file"||Qe(this.input,this.pointer)||((f=this.base.path[0]).length===2&&m.isASCIIAlpha(f.codePointAt(0))&&f[1]===":"?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},xe.prototype["parse file host"]=function(re,f){if(isNaN(re)||re===47||re===92||re===63||re===35)if(--this.pointer,!this.stateOverride&&x(this.buffer))this.parseError=!0,this.state="path";else if(this.buffer===""){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let D=Oe(this.buffer,P(this.url));if(D===g)return g;if(D==="localhost"&&(D=""),this.url.host=D,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=f;return!0},xe.prototype["parse path start"]=function(re){return G(this.url)?(re===92&&(this.parseError=!0),this.state="path",re!==47&&re!==92&&--this.pointer):this.stateOverride||re!==63?this.stateOverride||re!==35?re!==void 0&&(this.state="path",re!==47&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},xe.prototype["parse path"]=function(re){if(isNaN(re)||re===47||G(this.url)&&re===92||!this.stateOverride&&(re===63||re===35)){if(G(this.url)&&re===92&&(this.parseError=!0),(f=(f=this.buffer).toLowerCase())===".."||f==="%2e."||f===".%2e"||f==="%2e%2e"?(ne(this.url),re===47||G(this.url)&&re===92||this.url.path.push("")):!O(this.buffer)||re===47||G(this.url)&&re===92?O(this.buffer)||(this.url.scheme==="file"&&this.url.path.length===0&&x(this.buffer)&&(this.url.host!==""&&this.url.host!==null&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""),this.buffer="",this.url.scheme==="file"&&(re===void 0||re===63||re===35))for(;this.url.path.length>1&&this.url.path[0]==="";)this.parseError=!0,this.url.path.shift();re===63&&(this.url.query="",this.state="query"),re===35&&(this.url.fragment="",this.state="fragment")}else re!==37||m.isASCIIHex(this.input[this.pointer+1])&&m.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=st(re,C);var f;return!0},xe.prototype["parse cannot-be-a-base-URL path"]=function(re){return re===63?(this.url.query="",this.state="query"):re===35?(this.url.fragment="",this.state="fragment"):(isNaN(re)||re===37||(this.parseError=!0),re!==37||m.isASCIIHex(this.input[this.pointer+1])&&m.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),isNaN(re)||(this.url.path[0]+=st(re,ue))),!0},xe.prototype["parse query"]=function(re,f){if(isNaN(re)||!this.stateOverride&&re===35){G(this.url)&&this.url.scheme!=="ws"&&this.url.scheme!=="wss"||(this.encodingOverride="utf-8");const D=l.from(this.buffer);for(let H=0;H<D.length;++H)D[H]<33||D[H]>126||D[H]===34||D[H]===35||D[H]===60||D[H]===62||D[H]===39&&G(this.url)?this.url.query+=y(D[H]):this.url.query+=String.fromCodePoint(D[H]);this.buffer="",re===35&&(this.url.fragment="",this.state="fragment")}else re!==37||m.isASCIIHex(this.input[this.pointer+1])&&m.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=f;return!0},xe.prototype["parse fragment"]=function(re){return isNaN(re)||(re===0?this.parseError=!0:(re!==37||m.isASCIIHex(this.input[this.pointer+1])&&m.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=st(re,be))),!0},S.exports.serializeURL=function(re,f){let D=re.scheme+":";if(re.host!==null?(D+="//",re.username===""&&re.password===""||(D+=re.username,re.password!==""&&(D+=":"+re.password),D+="@"),D+=Ye(re.host),re.port!==null&&(D+=":"+re.port)):re.host===null&&re.scheme==="file"&&(D+="//"),re.cannotBeABaseURL)D+=re.path[0];else for(const H of re.path)D+="/"+H;return re.query!==null&&(D+="?"+re.query),f||re.fragment===null||(D+="#"+re.fragment),D},S.exports.serializeURLOrigin=function(re){switch(re.scheme){case"blob":try{return S.exports.serializeURLOrigin(S.exports.parseURL(re.path[0]))}catch(f){return"null"}case"ftp":case"http":case"https":case"ws":case"wss":return function(f){let D=f.scheme+"://";return D+=Ye(f.host),f.port!==null&&(D+=":"+f.port),D}({scheme:re.scheme,host:re.host,port:re.port});default:return"null"}},S.exports.basicURLParse=function(re,f){f===void 0&&(f={});const D=new xe(re,f.baseURL,f.encodingOverride,f.url,f.stateOverride);return D.failure?null:D.url},S.exports.setTheUsername=function(re,f){re.username="";const D=v.ucs2.decode(f);for(let H=0;H<D.length;++H)re.username+=st(D[H],Me)},S.exports.setThePassword=function(re,f){re.password="";const D=v.ucs2.decode(f);for(let H=0;H<D.length;++H)re.password+=st(D[H],Me)},S.exports.serializeHost=Ye,S.exports.cannotHaveAUsernamePasswordPort=function(re){return re.host===null||re.host===""||re.cannotBeABaseURL||re.scheme==="file"},S.exports.serializeInteger=function(re){return String(re)},S.exports.parseURL=function(re,f){return f===void 0&&(f={}),S.exports.basicURLParse(re,{baseURL:f.baseURL,encodingOverride:f.encodingOverride})}},8634:(S,d,o)=>{"use strict";const{Buffer:l}=o(3546),{isASCIIHex:v}=o(3291);function m(g,A,I){let O=g.indexOf(A);for(;O>=0;)g[O]=I,O=g.indexOf(A,O+1);return g}function y(g){let A=g.toString(16).toUpperCase();return A.length===1&&(A="0"+A),"%"+A}function j(g){const A=l.alloc(g.byteLength);let I=0;for(let O=0;O<g.length;++O)g[O]===37&&v(g[O+1])&&v(g[O+2])?(A[I++]=parseInt(g.slice(O+1,O+3).toString(),16),O+=2):A[I++]=g[O];return A.slice(0,I)}function h(g){let A="";for(const I of g)A+=I===32?"+":I===42||I===45||I===46||I>=48&&I<=57||I>=65&&I<=90||I===95||I>=97&&I<=122?String.fromCodePoint(I):y(I);return A}S.exports={percentEncode:y,percentDecode:j,parseUrlencoded:g=>function(A){const I=function(x,U){const G=[];let P=0,z=x.indexOf(U);for(;z>=0;)G.push(x.slice(P,z)),P=z+1,z=x.indexOf(U,P);return P!==x.length&&G.push(x.slice(P)),G}(A,38),O=[];for(const x of I){if(x.length===0)continue;let U,G;const P=x.indexOf(61);P>=0?(U=x.slice(0,P),G=x.slice(P+1)):(U=x,G=l.alloc(0)),U=m(l.from(U),43,32),G=m(l.from(G),43,32),O.push([j(U).toString(),j(G).toString()])}return O}(l.from(g)),serializeUrlencoded:function(g,A=void 0){let I="utf-8";A!==void 0&&(I=A);let O="";for(const[x,U]of g.entries()){const G=h(l.from(U[0]));let P=U[1];U.length>2&&U[2]!==void 0&&(U[2]==="hidden"&&G==="_charset_"?P=I:U[2]==="file"&&(P=P.name)),P=h(l.from(P)),x!==0&&(O+="&"),O+=`${G}=${P}`}return O}}},7233:(S,d)=>{"use strict";const o=Symbol("wrapper"),l=Symbol("impl"),v=Symbol("SameObject caches"),m=Symbol.for("[webidl2js] constructor registry");function y(be){return be?be[o]:null}function j(be){return be?be[l]:null}const h=Symbol("internal"),g=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())),A=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,I=Symbol("supports property index"),O=Symbol("supported property indices"),x=Symbol("supports property name"),U=Symbol("supported property names"),G=Symbol("indexed property get"),P=Symbol("indexed property set new"),z=Symbol("indexed property set existing"),ue=Symbol("named property get"),pe=Symbol("named property set new"),Me=Symbol("named property set existing"),rt=Symbol("named property delete");S.exports={isObject:function(be){return typeof be=="object"&&be!==null||typeof be=="function"},hasOwn:function(be,Te){return Object.prototype.hasOwnProperty.call(be,Te)},wrapperSymbol:o,implSymbol:l,getSameObject:function(be,Te,C){return be[v]||(be[v]=Object.create(null)),Te in be[v]||(be[v][Te]=C()),be[v][Te]},ctorRegistrySymbol:m,wrapperForImpl:y,implForWrapper:j,tryWrapperForImpl:function(be){return y(be)||be},tryImplForWrapper:function(be){return j(be)||be},iterInternalSymbol:h,IteratorPrototype:g,isArrayBuffer:function(be){try{return A.call(be),!0}catch(Te){return!1}},isArrayIndexPropName:function(be){if(typeof be!="string")return!1;const Te=be>>>0;return Te!==Math.pow(2,32)-1&&be===`${Te}`},supportsPropertyIndex:I,supportedPropertyIndices:O,supportsPropertyName:x,supportedPropertyNames:U,indexedGet:G,indexedSetNew:P,indexedSetExisting:z,namedGet:ue,namedSetNew:pe,namedSetExisting:Me,namedDelete:rt}},3546:(S,d,o)=>{"use strict";var l=o(7943),v=o(8405),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;d.Buffer=h,d.SlowBuffer=function(T){return+T!=T&&(T=0),h.alloc(+T)},d.INSPECT_MAX_BYTES=50;var y=2147483647;function j(T){if(T>y)throw new RangeError('The value "'+T+'" is invalid for option "size"');var B=new Uint8Array(T);return Object.setPrototypeOf(B,h.prototype),B}function h(T,B,Y){if(typeof T=="number"){if(typeof B=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(T)}return g(T,B,Y)}function g(T,B,Y){if(typeof T=="string")return function(De,ht){if(typeof ht=="string"&&ht!==""||(ht="utf8"),!h.isEncoding(ht))throw new TypeError("Unknown encoding: "+ht);var jt=0|G(De,ht),Ge=j(jt),Ue=Ge.write(De,ht);return Ue!==jt&&(Ge=Ge.slice(0,Ue)),Ge}(T,B);if(ArrayBuffer.isView(T))return function(De){if(ce(De,Uint8Array)){var ht=new Uint8Array(De);return x(ht.buffer,ht.byteOffset,ht.byteLength)}return O(De)}(T);if(T==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(ce(T,ArrayBuffer)||T&&ce(T.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ce(T,SharedArrayBuffer)||T&&ce(T.buffer,SharedArrayBuffer)))return x(T,B,Y);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var fe=T.valueOf&&T.valueOf();if(fe!=null&&fe!==T)return h.from(fe,B,Y);var Ne=function(De){if(h.isBuffer(De)){var ht=0|U(De.length),jt=j(ht);return jt.length===0||De.copy(jt,0,0,ht),jt}if(De.length!==void 0)return typeof De.length!="number"||Se(De.length)?j(0):O(De);if(De.type==="Buffer"&&Array.isArray(De.data))return O(De.data)}(T);if(Ne)return Ne;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return h.from(T[Symbol.toPrimitive]("string"),B,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}function A(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function I(T){return A(T),j(T<0?0:0|U(T))}function O(T){for(var B=T.length<0?0:0|U(T.length),Y=j(B),fe=0;fe<B;fe+=1)Y[fe]=255&T[fe];return Y}function x(T,B,Y){if(B<0||T.byteLength<B)throw new RangeError('"offset" is outside of buffer bounds');if(T.byteLength<B+(Y||0))throw new RangeError('"length" is outside of buffer bounds');var fe;return fe=B===void 0&&Y===void 0?new Uint8Array(T):Y===void 0?new Uint8Array(T,B):new Uint8Array(T,B,Y),Object.setPrototypeOf(fe,h.prototype),fe}function U(T){if(T>=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return 0|T}function G(T,B){if(h.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||ce(T,ArrayBuffer))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);var Y=T.length,fe=arguments.length>2&&arguments[2]===!0;if(!fe&&Y===0)return 0;for(var Ne=!1;;)switch(B){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return q(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Y;case"hex":return Y>>>1;case"base64":return he(T).length;default:if(Ne)return fe?-1:q(T).length;B=(""+B).toLowerCase(),Ne=!0}}function P(T,B,Y){var fe=!1;if((B===void 0||B<0)&&(B=0),B>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0)<=(B>>>=0))return"";for(T||(T="utf8");;)switch(T){case"hex":return Ze(this,B,Y);case"utf8":case"utf-8":return _e(this,B,Y);case"ascii":return Ye(this,B,Y);case"latin1":case"binary":return ne(this,B,Y);case"base64":return st(this,B,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xe(this,B,Y);default:if(fe)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),fe=!0}}function z(T,B,Y){var fe=T[B];T[B]=T[Y],T[Y]=fe}function ue(T,B,Y,fe,Ne){if(T.length===0)return-1;if(typeof Y=="string"?(fe=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Se(Y=+Y)&&(Y=Ne?0:T.length-1),Y<0&&(Y=T.length+Y),Y>=T.length){if(Ne)return-1;Y=T.length-1}else if(Y<0){if(!Ne)return-1;Y=0}if(typeof B=="string"&&(B=h.from(B,fe)),h.isBuffer(B))return B.length===0?-1:pe(T,B,Y,fe,Ne);if(typeof B=="number")return B&=255,typeof Uint8Array.prototype.indexOf=="function"?Ne?Uint8Array.prototype.indexOf.call(T,B,Y):Uint8Array.prototype.lastIndexOf.call(T,B,Y):pe(T,[B],Y,fe,Ne);throw new TypeError("val must be string, number or Buffer")}function pe(T,B,Y,fe,Ne){var De,ht=1,jt=T.length,Ge=B.length;if(fe!==void 0&&((fe=String(fe).toLowerCase())==="ucs2"||fe==="ucs-2"||fe==="utf16le"||fe==="utf-16le")){if(T.length<2||B.length<2)return-1;ht=2,jt/=2,Ge/=2,Y/=2}function Ue(Gt,Bt){return ht===1?Gt[Bt]:Gt.readUInt16BE(Bt*ht)}if(Ne){var Ct=-1;for(De=Y;De<jt;De++)if(Ue(T,De)===Ue(B,Ct===-1?0:De-Ct)){if(Ct===-1&&(Ct=De),De-Ct+1===Ge)return Ct*ht}else Ct!==-1&&(De-=De-Ct),Ct=-1}else for(Y+Ge>jt&&(Y=jt-Ge),De=Y;De>=0;De--){for(var Kt=!0,Yt=0;Yt<Ge;Yt++)if(Ue(T,De+Yt)!==Ue(B,Yt)){Kt=!1;break}if(Kt)return De}return-1}function Me(T,B,Y,fe){Y=Number(Y)||0;var Ne=T.length-Y;fe?(fe=Number(fe))>Ne&&(fe=Ne):fe=Ne;var De=B.length;fe>De/2&&(fe=De/2);for(var ht=0;ht<fe;++ht){var jt=parseInt(B.substr(2*ht,2),16);if(Se(jt))return ht;T[Y+ht]=jt}return ht}function rt(T,B,Y,fe){return Ae(q(B,T.length-Y),T,Y,fe)}function be(T,B,Y,fe){return Ae(function(Ne){for(var De=[],ht=0;ht<Ne.length;++ht)De.push(255&Ne.charCodeAt(ht));return De}(B),T,Y,fe)}function Te(T,B,Y,fe){return Ae(he(B),T,Y,fe)}function C(T,B,Y,fe){return Ae(function(Ne,De){for(var ht,jt,Ge,Ue=[],Ct=0;Ct<Ne.length&&!((De-=2)<0);++Ct)jt=(ht=Ne.charCodeAt(Ct))>>8,Ge=ht%256,Ue.push(Ge),Ue.push(jt);return Ue}(B,T.length-Y),T,Y,fe)}function st(T,B,Y){return B===0&&Y===T.length?l.fromByteArray(T):l.fromByteArray(T.slice(B,Y))}function _e(T,B,Y){Y=Math.min(T.length,Y);for(var fe=[],Ne=B;Ne<Y;){var De,ht,jt,Ge,Ue=T[Ne],Ct=null,Kt=Ue>239?4:Ue>223?3:Ue>191?2:1;if(Ne+Kt<=Y)switch(Kt){case 1:Ue<128&&(Ct=Ue);break;case 2:(192&(De=T[Ne+1]))==128&&(Ge=(31&Ue)<<6|63&De)>127&&(Ct=Ge);break;case 3:De=T[Ne+1],ht=T[Ne+2],(192&De)==128&&(192&ht)==128&&(Ge=(15&Ue)<<12|(63&De)<<6|63&ht)>2047&&(Ge<55296||Ge>57343)&&(Ct=Ge);break;case 4:De=T[Ne+1],ht=T[Ne+2],jt=T[Ne+3],(192&De)==128&&(192&ht)==128&&(192&jt)==128&&(Ge=(15&Ue)<<18|(63&De)<<12|(63&ht)<<6|63&jt)>65535&&Ge<1114112&&(Ct=Ge)}Ct===null?(Ct=65533,Kt=1):Ct>65535&&(Ct-=65536,fe.push(Ct>>>10&1023|55296),Ct=56320|1023&Ct),fe.push(Ct),Ne+=Kt}return function(Yt){var Gt=Yt.length;if(Gt<=Oe)return String.fromCharCode.apply(String,Yt);for(var Bt="",mn=0;mn<Gt;)Bt+=String.fromCharCode.apply(String,Yt.slice(mn,mn+=Oe));return Bt}(fe)}d.kMaxLength=y,h.TYPED_ARRAY_SUPPORT=function(){try{var T=new Uint8Array(1),B={foo:function(){return 42}};return Object.setPrototypeOf(B,Uint8Array.prototype),Object.setPrototypeOf(T,B),T.foo()===42}catch(Y){return!1}}(),h.TYPED_ARRAY_SUPPORT,Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(T,B,Y){return g(T,B,Y)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(T,B,Y){return function(fe,Ne,De){return A(fe),fe<=0?j(fe):Ne!==void 0?typeof De=="string"?j(fe).fill(Ne,De):j(fe).fill(Ne):j(fe)}(T,B,Y)},h.allocUnsafe=function(T){return I(T)},h.allocUnsafeSlow=function(T){return I(T)},h.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==h.prototype},h.compare=function(T,B){if(ce(T,Uint8Array)&&(T=h.from(T,T.offset,T.byteLength)),ce(B,Uint8Array)&&(B=h.from(B,B.offset,B.byteLength)),!h.isBuffer(T)||!h.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===B)return 0;for(var Y=T.length,fe=B.length,Ne=0,De=Math.min(Y,fe);Ne<De;++Ne)if(T[Ne]!==B[Ne]){Y=T[Ne],fe=B[Ne];break}return Y<fe?-1:fe<Y?1:0},h.isEncoding=function(T){switch(String(T).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(T,B){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return h.alloc(0);var Y;if(B===void 0)for(B=0,Y=0;Y<T.length;++Y)B+=T[Y].length;var fe=h.allocUnsafe(B),Ne=0;for(Y=0;Y<T.length;++Y){var De=T[Y];if(ce(De,Uint8Array))Ne+De.length>fe.length?h.from(De).copy(fe,Ne):Uint8Array.prototype.set.call(fe,De,Ne);else{if(!h.isBuffer(De))throw new TypeError('"list" argument must be an Array of Buffers');De.copy(fe,Ne)}Ne+=De.length}return fe},h.byteLength=G,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var T=this.length;if(T%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var B=0;B<T;B+=2)z(this,B,B+1);return this},h.prototype.swap32=function(){var T=this.length;if(T%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var B=0;B<T;B+=4)z(this,B,B+3),z(this,B+1,B+2);return this},h.prototype.swap64=function(){var T=this.length;if(T%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var B=0;B<T;B+=8)z(this,B,B+7),z(this,B+1,B+6),z(this,B+2,B+5),z(this,B+3,B+4);return this},h.prototype.toString=function(){var T=this.length;return T===0?"":arguments.length===0?_e(this,0,T):P.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(T){if(!h.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T||h.compare(this,T)===0},h.prototype.inspect=function(){var T="",B=d.INSPECT_MAX_BYTES;return T=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(T+=" ... "),"<Buffer "+T+">"},m&&(h.prototype[m]=h.prototype.inspect),h.prototype.compare=function(T,B,Y,fe,Ne){if(ce(T,Uint8Array)&&(T=h.from(T,T.offset,T.byteLength)),!h.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(B===void 0&&(B=0),Y===void 0&&(Y=T?T.length:0),fe===void 0&&(fe=0),Ne===void 0&&(Ne=this.length),B<0||Y>T.length||fe<0||Ne>this.length)throw new RangeError("out of range index");if(fe>=Ne&&B>=Y)return 0;if(fe>=Ne)return-1;if(B>=Y)return 1;if(this===T)return 0;for(var De=(Ne>>>=0)-(fe>>>=0),ht=(Y>>>=0)-(B>>>=0),jt=Math.min(De,ht),Ge=this.slice(fe,Ne),Ue=T.slice(B,Y),Ct=0;Ct<jt;++Ct)if(Ge[Ct]!==Ue[Ct]){De=Ge[Ct],ht=Ue[Ct];break}return De<ht?-1:ht<De?1:0},h.prototype.includes=function(T,B,Y){return this.indexOf(T,B,Y)!==-1},h.prototype.indexOf=function(T,B,Y){return ue(this,T,B,Y,!0)},h.prototype.lastIndexOf=function(T,B,Y){return ue(this,T,B,Y,!1)},h.prototype.write=function(T,B,Y,fe){if(B===void 0)fe="utf8",Y=this.length,B=0;else if(Y===void 0&&typeof B=="string")fe=B,Y=this.length,B=0;else{if(!isFinite(B))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");B>>>=0,isFinite(Y)?(Y>>>=0,fe===void 0&&(fe="utf8")):(fe=Y,Y=void 0)}var Ne=this.length-B;if((Y===void 0||Y>Ne)&&(Y=Ne),T.length>0&&(Y<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");fe||(fe="utf8");for(var De=!1;;)switch(fe){case"hex":return Me(this,T,B,Y);case"utf8":case"utf-8":return rt(this,T,B,Y);case"ascii":case"latin1":case"binary":return be(this,T,B,Y);case"base64":return Te(this,T,B,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,T,B,Y);default:if(De)throw new TypeError("Unknown encoding: "+fe);fe=(""+fe).toLowerCase(),De=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Oe=4096;function Ye(T,B,Y){var fe="";Y=Math.min(T.length,Y);for(var Ne=B;Ne<Y;++Ne)fe+=String.fromCharCode(127&T[Ne]);return fe}function ne(T,B,Y){var fe="";Y=Math.min(T.length,Y);for(var Ne=B;Ne<Y;++Ne)fe+=String.fromCharCode(T[Ne]);return fe}function Ze(T,B,Y){var fe=T.length;(!B||B<0)&&(B=0),(!Y||Y<0||Y>fe)&&(Y=fe);for(var Ne="",De=B;De<Y;++De)Ne+=Re[T[De]];return Ne}function xe(T,B,Y){for(var fe=T.slice(B,Y),Ne="",De=0;De<fe.length-1;De+=2)Ne+=String.fromCharCode(fe[De]+256*fe[De+1]);return Ne}function ct(T,B,Y){if(T%1!=0||T<0)throw new RangeError("offset is not uint");if(T+B>Y)throw new RangeError("Trying to access beyond buffer length")}function Qe(T,B,Y,fe,Ne,De){if(!h.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>Ne||B<De)throw new RangeError('"value" argument is out of bounds');if(Y+fe>T.length)throw new RangeError("Index out of range")}function re(T,B,Y,fe,Ne,De){if(Y+fe>T.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function f(T,B,Y,fe,Ne){return B=+B,Y>>>=0,Ne||re(T,0,Y,4),v.write(T,B,Y,fe,23,4),Y+4}function D(T,B,Y,fe,Ne){return B=+B,Y>>>=0,Ne||re(T,0,Y,8),v.write(T,B,Y,fe,52,8),Y+8}h.prototype.slice=function(T,B){var Y=this.length;(T=~~T)<0?(T+=Y)<0&&(T=0):T>Y&&(T=Y),(B=B===void 0?Y:~~B)<0?(B+=Y)<0&&(B=0):B>Y&&(B=Y),B<T&&(B=T);var fe=this.subarray(T,B);return Object.setPrototypeOf(fe,h.prototype),fe},h.prototype.readUintLE=h.prototype.readUIntLE=function(T,B,Y){T>>>=0,B>>>=0,Y||ct(T,B,this.length);for(var fe=this[T],Ne=1,De=0;++De<B&&(Ne*=256);)fe+=this[T+De]*Ne;return fe},h.prototype.readUintBE=h.prototype.readUIntBE=function(T,B,Y){T>>>=0,B>>>=0,Y||ct(T,B,this.length);for(var fe=this[T+--B],Ne=1;B>0&&(Ne*=256);)fe+=this[T+--B]*Ne;return fe},h.prototype.readUint8=h.prototype.readUInt8=function(T,B){return T>>>=0,B||ct(T,1,this.length),this[T]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(T,B){return T>>>=0,B||ct(T,2,this.length),this[T]|this[T+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(T,B){return T>>>=0,B||ct(T,2,this.length),this[T]<<8|this[T+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(T,B){return T>>>=0,B||ct(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+16777216*this[T+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(T,B){return T>>>=0,B||ct(T,4,this.length),16777216*this[T]+(this[T+1]<<16|this[T+2]<<8|this[T+3])},h.prototype.readIntLE=function(T,B,Y){T>>>=0,B>>>=0,Y||ct(T,B,this.length);for(var fe=this[T],Ne=1,De=0;++De<B&&(Ne*=256);)fe+=this[T+De]*Ne;return fe>=(Ne*=128)&&(fe-=Math.pow(2,8*B)),fe},h.prototype.readIntBE=function(T,B,Y){T>>>=0,B>>>=0,Y||ct(T,B,this.length);for(var fe=B,Ne=1,De=this[T+--fe];fe>0&&(Ne*=256);)De+=this[T+--fe]*Ne;return De>=(Ne*=128)&&(De-=Math.pow(2,8*B)),De},h.prototype.readInt8=function(T,B){return T>>>=0,B||ct(T,1,this.length),128&this[T]?-1*(255-this[T]+1):this[T]},h.prototype.readInt16LE=function(T,B){T>>>=0,B||ct(T,2,this.length);var Y=this[T]|this[T+1]<<8;return 32768&Y?4294901760|Y:Y},h.prototype.readInt16BE=function(T,B){T>>>=0,B||ct(T,2,this.length);var Y=this[T+1]|this[T]<<8;return 32768&Y?4294901760|Y:Y},h.prototype.readInt32LE=function(T,B){return T>>>=0,B||ct(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},h.prototype.readInt32BE=function(T,B){return T>>>=0,B||ct(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},h.prototype.readFloatLE=function(T,B){return T>>>=0,B||ct(T,4,this.length),v.read(this,T,!0,23,4)},h.prototype.readFloatBE=function(T,B){return T>>>=0,B||ct(T,4,this.length),v.read(this,T,!1,23,4)},h.prototype.readDoubleLE=function(T,B){return T>>>=0,B||ct(T,8,this.length),v.read(this,T,!0,52,8)},h.prototype.readDoubleBE=function(T,B){return T>>>=0,B||ct(T,8,this.length),v.read(this,T,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(T,B,Y,fe){T=+T,B>>>=0,Y>>>=0,fe||Qe(this,T,B,Y,Math.pow(2,8*Y)-1,0);var Ne=1,De=0;for(this[B]=255&T;++De<Y&&(Ne*=256);)this[B+De]=T/Ne&255;return B+Y},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(T,B,Y,fe){T=+T,B>>>=0,Y>>>=0,fe||Qe(this,T,B,Y,Math.pow(2,8*Y)-1,0);var Ne=Y-1,De=1;for(this[B+Ne]=255&T;--Ne>=0&&(De*=256);)this[B+Ne]=T/De&255;return B+Y},h.prototype.writeUint8=h.prototype.writeUInt8=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,1,255,0),this[B]=255&T,B+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,2,65535,0),this[B]=255&T,this[B+1]=T>>>8,B+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,2,65535,0),this[B]=T>>>8,this[B+1]=255&T,B+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,4,4294967295,0),this[B+3]=T>>>24,this[B+2]=T>>>16,this[B+1]=T>>>8,this[B]=255&T,B+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,4,4294967295,0),this[B]=T>>>24,this[B+1]=T>>>16,this[B+2]=T>>>8,this[B+3]=255&T,B+4},h.prototype.writeIntLE=function(T,B,Y,fe){if(T=+T,B>>>=0,!fe){var Ne=Math.pow(2,8*Y-1);Qe(this,T,B,Y,Ne-1,-Ne)}var De=0,ht=1,jt=0;for(this[B]=255&T;++De<Y&&(ht*=256);)T<0&&jt===0&&this[B+De-1]!==0&&(jt=1),this[B+De]=(T/ht>>0)-jt&255;return B+Y},h.prototype.writeIntBE=function(T,B,Y,fe){if(T=+T,B>>>=0,!fe){var Ne=Math.pow(2,8*Y-1);Qe(this,T,B,Y,Ne-1,-Ne)}var De=Y-1,ht=1,jt=0;for(this[B+De]=255&T;--De>=0&&(ht*=256);)T<0&&jt===0&&this[B+De+1]!==0&&(jt=1),this[B+De]=(T/ht>>0)-jt&255;return B+Y},h.prototype.writeInt8=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,1,127,-128),T<0&&(T=255+T+1),this[B]=255&T,B+1},h.prototype.writeInt16LE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,2,32767,-32768),this[B]=255&T,this[B+1]=T>>>8,B+2},h.prototype.writeInt16BE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,2,32767,-32768),this[B]=T>>>8,this[B+1]=255&T,B+2},h.prototype.writeInt32LE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,4,2147483647,-2147483648),this[B]=255&T,this[B+1]=T>>>8,this[B+2]=T>>>16,this[B+3]=T>>>24,B+4},h.prototype.writeInt32BE=function(T,B,Y){return T=+T,B>>>=0,Y||Qe(this,T,B,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[B]=T>>>24,this[B+1]=T>>>16,this[B+2]=T>>>8,this[B+3]=255&T,B+4},h.prototype.writeFloatLE=function(T,B,Y){return f(this,T,B,!0,Y)},h.prototype.writeFloatBE=function(T,B,Y){return f(this,T,B,!1,Y)},h.prototype.writeDoubleLE=function(T,B,Y){return D(this,T,B,!0,Y)},h.prototype.writeDoubleBE=function(T,B,Y){return D(this,T,B,!1,Y)},h.prototype.copy=function(T,B,Y,fe){if(!h.isBuffer(T))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),fe||fe===0||(fe=this.length),B>=T.length&&(B=T.length),B||(B=0),fe>0&&fe<Y&&(fe=Y),fe===Y||T.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(Y<0||Y>=this.length)throw new RangeError("Index out of range");if(fe<0)throw new RangeError("sourceEnd out of bounds");fe>this.length&&(fe=this.length),T.length-B<fe-Y&&(fe=T.length-B+Y);var Ne=fe-Y;return this===T&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,Y,fe):Uint8Array.prototype.set.call(T,this.subarray(Y,fe),B),Ne},h.prototype.fill=function(T,B,Y,fe){if(typeof T=="string"){if(typeof B=="string"?(fe=B,B=0,Y=this.length):typeof Y=="string"&&(fe=Y,Y=this.length),fe!==void 0&&typeof fe!="string")throw new TypeError("encoding must be a string");if(typeof fe=="string"&&!h.isEncoding(fe))throw new TypeError("Unknown encoding: "+fe);if(T.length===1){var Ne=T.charCodeAt(0);(fe==="utf8"&&Ne<128||fe==="latin1")&&(T=Ne)}}else typeof T=="number"?T&=255:typeof T=="boolean"&&(T=Number(T));if(B<0||this.length<B||this.length<Y)throw new RangeError("Out of range index");if(Y<=B)return this;var De;if(B>>>=0,Y=Y===void 0?this.length:Y>>>0,T||(T=0),typeof T=="number")for(De=B;De<Y;++De)this[De]=T;else{var ht=h.isBuffer(T)?T:h.from(T,fe),jt=ht.length;if(jt===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(De=0;De<Y-B;++De)this[De+B]=ht[De%jt]}return this};var H=/[^+/0-9A-Za-z-_]/g;function q(T,B){var Y;B=B||1/0;for(var fe=T.length,Ne=null,De=[],ht=0;ht<fe;++ht){if((Y=T.charCodeAt(ht))>55295&&Y<57344){if(!Ne){if(Y>56319){(B-=3)>-1&&De.push(239,191,189);continue}if(ht+1===fe){(B-=3)>-1&&De.push(239,191,189);continue}Ne=Y;continue}if(Y<56320){(B-=3)>-1&&De.push(239,191,189),Ne=Y;continue}Y=65536+(Ne-55296<<10|Y-56320)}else Ne&&(B-=3)>-1&&De.push(239,191,189);if(Ne=null,Y<128){if((B-=1)<0)break;De.push(Y)}else if(Y<2048){if((B-=2)<0)break;De.push(Y>>6|192,63&Y|128)}else if(Y<65536){if((B-=3)<0)break;De.push(Y>>12|224,Y>>6&63|128,63&Y|128)}else{if(!(Y<1114112))throw new Error("Invalid code point");if((B-=4)<0)break;De.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,63&Y|128)}}return De}function he(T){return l.toByteArray(function(B){if((B=(B=B.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;B.length%4!=0;)B+="=";return B}(T))}function Ae(T,B,Y,fe){for(var Ne=0;Ne<fe&&!(Ne+Y>=B.length||Ne>=T.length);++Ne)B[Ne+Y]=T[Ne];return Ne}function ce(T,B){return T instanceof B||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===B.name}function Se(T){return T!=T}var Re=function(){for(var T="0123456789abcdef",B=new Array(256),Y=0;Y<16;++Y)for(var fe=16*Y,Ne=0;Ne<16;++Ne)B[fe+Ne]=T[Y]+T[Ne];return B}()},143:(S,d)=>{"use strict";function o(I,O){return`${O&&O.context?O.context:"Value"} ${I}.`}function l(I){return m(Math.trunc(I))}function v(I){return I<0?-1:1}function m(I){return I===0?0:I}function y(I,O){const x=!O.unsigned;let U,G;I===64?(G=Math.pow(2,53)-1,U=x?1-Math.pow(2,53):0):x?(U=-Math.pow(2,I-1),G=Math.pow(2,I-1)-1):(U=0,G=Math.pow(2,I)-1);const P=Math.pow(2,I),z=Math.pow(2,I-1);return(ue,pe)=>{pe===void 0&&(pe={});let Me=+ue;if(Me=m(Me),pe.enforceRange){if(!Number.isFinite(Me))throw new TypeError(o("is not a finite number",pe));if(Me=l(Me),Me<U||Me>G)throw new TypeError(o(`is outside the accepted range of ${U} to ${G}, inclusive`,pe));return Me}return!Number.isNaN(Me)&&pe.clamp?(Me=Math.min(Math.max(Me,U),G),Me=function(rt){return m(rt>0&&rt%1==.5&&!(1&rt)||rt<0&&rt%1==-.5&&(1&rt)==1?Math.floor(rt):Math.round(rt))}(Me),Me):Number.isFinite(Me)&&Me!==0?(Me=l(Me),Me>=U&&Me<=G?Me:(Me=function(rt,be){const Te=rt%be;return v(be)!==v(Te)?Te+be:Te}(Me,P),x&&Me>=z?Me-P:Me)):0}}function j(I,O){if(typeof I!="function")throw new TypeError(o("is not a function",O));return I}d.any=I=>I,d.void=function(){},d.boolean=function(I){return!!I},d.byte=y(8,{unsigned:!1}),d.octet=y(8,{unsigned:!0}),d.short=y(16,{unsigned:!1}),d["unsigned short"]=y(16,{unsigned:!0}),d.long=y(32,{unsigned:!1}),d["unsigned long"]=y(32,{unsigned:!0}),d["long long"]=y(64,{unsigned:!1}),d["unsigned long long"]=y(64,{unsigned:!0}),d.double=(I,O)=>{const x=+I;if(!Number.isFinite(x))throw new TypeError(o("is not a finite floating-point value",O));return x},d["unrestricted double"]=I=>+I,d.float=(I,O)=>{const x=+I;if(!Number.isFinite(x))throw new TypeError(o("is not a finite floating-point value",O));if(Object.is(x,-0))return x;const U=Math.fround(x);if(!Number.isFinite(U))throw new TypeError(o("is outside the range of a single-precision floating-point value",O));return U},d["unrestricted float"]=I=>{const O=+I;return isNaN(O)||Object.is(O,-0)?O:Math.fround(O)},d.DOMString=function(I,O){if(O===void 0&&(O={}),O.treatNullAsEmptyString&&I===null)return"";if(typeof I=="symbol")throw new TypeError(o("is a symbol, which cannot be converted to a string",O));return String(I)},d.ByteString=(I,O)=>{const x=d.DOMString(I,O);let U;for(let G=0;(U=x.codePointAt(G))!==void 0;++G)if(U>255)throw new TypeError(o("is not a valid ByteString",O));return x},d.USVString=(I,O)=>{const x=d.DOMString(I,O),U=x.length,G=[];for(let P=0;P<U;++P){const z=x.charCodeAt(P);if(z<55296||z>57343)G.push(String.fromCodePoint(z));else if(56320<=z&&z<=57343)G.push(String.fromCodePoint(65533));else if(P===U-1)G.push(String.fromCodePoint(65533));else{const ue=x.charCodeAt(P+1);if(56320<=ue&&ue<=57343){const pe=1023&z,Me=1023&ue;G.push(String.fromCodePoint(65536+1024*pe+Me)),++P}else G.push(String.fromCodePoint(65533))}}return G.join("")},d.object=(I,O)=>{if(function(x){if(x===null)return"Null";switch(typeof x){case"undefined":return"Undefined";case"boolean":return"Boolean";case"number":return"Number";case"string":return"String";case"symbol":return"Symbol";default:return"Object"}}(I)!=="Object")throw new TypeError(o("is not an object",O));return I};const h=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;function g(I){try{return h.call(I),!0}catch(O){return!1}}d.ArrayBuffer=(I,O)=>{if(!g(I))throw new TypeError(o("is not a view on an ArrayBuffer object",O));return I};const A=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;d.DataView=(I,O)=>{try{return A.call(I),I}catch(x){throw new TypeError(o("is not a view on an DataView object",O))}},[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach(I=>{const O=I.name,x=/^[AEIOU]/.test(O)?"an":"a";d[O]=(U,G)=>{if(!ArrayBuffer.isView(U)||U.constructor.name!==O)throw new TypeError(o(`is not ${x} ${O} object`,G));return U}}),d.ArrayBufferView=(I,O)=>{if(!ArrayBuffer.isView(I))throw new TypeError(o("is not a view on an ArrayBuffer object",O));return I},d.BufferSource=(I,O)=>{if(!ArrayBuffer.isView(I)&&!g(I))throw new TypeError(o("is not an ArrayBuffer object or a view on one",O));return I},d.DOMTimeStamp=d["unsigned long long"],d.Function=j,d.VoidFunction=j},62:(S,d,o)=>{"use strict";const l=o(4485),v=o(1209);d.URL=l,d.URLSearchParams=v},9291:module=>{var t;t=function(){return(()=>{var __webpack_modules__={9458:(S,d,o)=>{var l=o(8959);function v(m,y){this.logStorage=m,this.stringifyObjects=!(!y||!y.stringifyObjects)&&y.stringifyObjects,this.storeInterval=y&&y.storeInterval?y.storeInterval:3e4,this.maxEntryLength=y&&y.maxEntryLength?y.maxEntryLength:1e4,Object.keys(l.levels).forEach(function(j){this[l.levels[j]]=function(){this._log.apply(this,arguments)}.bind(this,j)}.bind(this)),this.storeLogsIntervalID=null,this.queue=[],this.totalLen=0,this.outputCache=[]}v.prototype.stringify=function(m){try{return JSON.stringify(m)}catch(y){return"[object with circular refs?]"}},v.prototype.formatLogMessage=function(m){for(var y="",j=1,h=arguments.length;j<h;j++){var g=arguments[j];!this.stringifyObjects&&m!==l.levels.ERROR||typeof g!="object"||(g=this.stringify(g)),y+=g,j!==h-1&&(y+=" ")}return y.length?y:null},v.prototype._log=function(){var m=arguments[1],y=this.formatLogMessage.apply(this,arguments);if(y){var j=this.queue[this.queue.length-1];(j&&j.text)===y?j.count+=1:(this.queue.push({text:y,timestamp:m,count:1}),this.totalLen+=y.length)}this.totalLen>=this.maxEntryLength&&this._flush(!0,!0)},v.prototype.start=function(){this._reschedulePublishInterval()},v.prototype._reschedulePublishInterval=function(){this.storeLogsIntervalID&&(window.clearTimeout(this.storeLogsIntervalID),this.storeLogsIntervalID=null),this.storeLogsIntervalID=window.setTimeout(this._flush.bind(this,!1,!0),this.storeInterval)},v.prototype.flush=function(){this._flush(!1,!0)},v.prototype._flush=function(m,y){this.totalLen>0&&(this.logStorage.isReady()||m)&&(this.logStorage.isReady()?(this.outputCache.length&&(this.outputCache.forEach(function(j){this.logStorage.storeLogs(j)}.bind(this)),this.outputCache=[]),this.logStorage.storeLogs(this.queue)):this.outputCache.push(this.queue),this.queue=[],this.totalLen=0),y&&this._reschedulePublishInterval()},v.prototype.stop=function(){this._flush(!1,!1)},S.exports=v},8959:S=>{var d={trace:0,debug:1,info:2,log:3,warn:4,error:5};m.consoleTransport=console;var o=[m.consoleTransport];m.addGlobalTransport=function(y){o.indexOf(y)===-1&&o.push(y)},m.removeGlobalTransport=function(y){var j=o.indexOf(y);j!==-1&&o.splice(j,1)};var l={};function v(){var y=arguments[0],j=arguments[1],h=Array.prototype.slice.call(arguments,2);if(!(d[j]<y.level))for(var g=!(y.options.disableCallerInfo||l.disableCallerInfo)&&function(){var P={methodName:"",fileLocation:"",line:null,column:null},z=new Error,ue=z.stack?z.stack.split(`
|
|
8
|
+
`):[];if(!ue||ue.length<3)return P;var pe=null;return ue[3]&&(pe=ue[3].match(/\s*at\s*(.+?)\s*\((\S*)\s*:(\d*)\s*:(\d*)\)/)),!pe||pe.length<=4?(ue[2].indexOf("log@")===0?P.methodName=ue[3].substr(0,ue[3].indexOf("@")):P.methodName=ue[2].substr(0,ue[2].indexOf("@")),P):(P.methodName=pe[1],P.fileLocation=pe[2],P.line=pe[3],P.column=pe[4],P)}(),A=o.concat(y.transports),I=0;I<A.length;I++){var O=A[I],x=O[j];if(x&&typeof x=="function"){var U=[];U.push(new Date().toISOString()),y.id&&U.push("["+y.id+"]"),g&&g.methodName.length>1&&U.push("<"+g.methodName+">: ");var G=U.concat(h);x.bind(O).apply(O,G)}}}function m(y,j,h,g){this.id=j,this.options=g||{},this.transports=h,this.transports||(this.transports=[]),this.level=d[y];for(var A=Object.keys(d),I=0;I<A.length;I++)this[A[I]]=v.bind(null,this,A[I])}m.setGlobalOptions=function(y){l=y||{}},m.prototype.setLevel=function(y){this.level=d[y]},S.exports=m,m.levels={TRACE:"trace",DEBUG:"debug",INFO:"info",LOG:"log",WARN:"warn",ERROR:"error"}},9077:(S,d,o)=>{var l=o(8959),v=o(9458),m={},y=[],j=l.levels.TRACE;S.exports={addGlobalTransport:function(h){l.addGlobalTransport(h)},removeGlobalTransport:function(h){l.removeGlobalTransport(h)},setGlobalOptions:function(h){l.setGlobalOptions(h)},getLogger:function(h,g,A){var I=new l(j,h,g,A);return h?(m[h]=m[h]||[],m[h].push(I)):y.push(I),I},setLogLevelById:function(h,g){for(var A=g?m[g]||[]:y,I=0;I<A.length;I++)A[I].setLevel(h)},setLogLevel:function(h){j=h;for(var g=0;g<y.length;g++)y[g].setLevel(h);for(var A in m){var I=m[A]||[];for(g=0;g<I.length;g++)I[g].setLevel(h)}},levels:l.levels,LogCollector:v}},1751:S=>{var d=S.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(o){return o.encoding?"rtpmap:%d %s/%s/%s":o.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(o){return o.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(o){return o.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(o){return"extmap:%d"+(o.direction?"/%s":"%v")+(o["encrypt-uri"]?" %s":"%v")+" %s"+(o.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(o){return o.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(o){var l="candidate:%s %d %s %d %s %d typ %s";return l+=o.raddr!=null?" raddr %s rport %d":"%v%v",l+=o.tcptype!=null?" tcptype %s":"%v",o.generation!=null&&(l+=" generation %d"),(l+=o["network-id"]!=null?" network-id %d":"%v")+(o["network-cost"]!=null?" network-cost %d":"%v")}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(o){var l="ssrc:%d";return o.attribute!=null&&(l+=" %s",o.value!=null&&(l+=":%s")),l}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(o){return o.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(o){return o.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(o){return"imageattr:%s %s %s"+(o.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(o){return"simulcast:%s %s"+(o.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(o){return"ts-refclk:%s"+(o.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(o){var l="mediaclk:";return l+=o.id!=null?"id=%s %s":"%v%s",l+=o.mediaClockValue!=null?"=%s":"",(l+=o.rateNumerator!=null?" rate=%s":"")+(o.rateDenominator!=null?"/%s":"")}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(d).forEach(function(o){d[o].forEach(function(l){l.reg||(l.reg=/(.*)/),l.format||(l.format="%s")})})},2342:(S,d,o)=>{var l=o(3755),v=o(6594);d.write=v,d.parse=l.parse,d.parseParams=l.parseParams,d.parseFmtpConfig=l.parseFmtpConfig,d.parsePayloads=l.parsePayloads,d.parseRemoteCandidates=l.parseRemoteCandidates,d.parseImageAttributes=l.parseImageAttributes,d.parseSimulcastStreamList=l.parseSimulcastStreamList},3755:(S,d,o)=>{var l=function(h){return String(Number(h))===h?Number(h):h},v=function(h,g,A){var I=h.name&&h.names;h.push&&!g[h.push]?g[h.push]=[]:I&&!g[h.name]&&(g[h.name]={});var O=h.push?{}:I?g[h.name]:g;(function(x,U,G,P){if(P&&!G)U[P]=l(x[1]);else for(var z=0;z<G.length;z+=1)x[z+1]!=null&&(U[G[z]]=l(x[z+1]))})(A.match(h.reg),O,h.names,h.name),h.push&&g[h.push].push(O)},m=o(1751),y=RegExp.prototype.test.bind(/^([a-z])=(.*)/);d.parse=function(h){var g={},A=[],I=g;return h.split(/(\r\n|\r|\n)/).filter(y).forEach(function(O){var x=O[0],U=O.slice(2);x==="m"&&(A.push({rtp:[],fmtp:[]}),I=A[A.length-1]);for(var G=0;G<(m[x]||[]).length;G+=1){var P=m[x][G];if(P.reg.test(U))return v(P,I,U)}}),g.media=A,g};var j=function(h,g){var A=g.split(/=(.+)/,2);return A.length===2?h[A[0]]=l(A[1]):A.length===1&&g.length>1&&(h[A[0]]=void 0),h};d.parseParams=function(h){return h.split(/;\s?/).reduce(j,{})},d.parseFmtpConfig=d.parseParams,d.parsePayloads=function(h){return h.toString().split(" ").map(Number)},d.parseRemoteCandidates=function(h){for(var g=[],A=h.split(" ").map(l),I=0;I<A.length;I+=3)g.push({component:A[I],ip:A[I+1],port:A[I+2]});return g},d.parseImageAttributes=function(h){return h.split(" ").map(function(g){return g.substring(1,g.length-1).split(",").reduce(j,{})})},d.parseSimulcastStreamList=function(h){return h.split(";").map(function(g){return g.split(",").map(function(A){var I,O=!1;return A[0]!=="~"?I=l(A):(I=l(A.substring(1,A.length)),O=!0),{scid:I,paused:O}})})}},6594:(S,d,o)=>{var l=o(1751),v=/%[sdv%]/g,m=function(g){var A=1,I=arguments,O=I.length;return g.replace(v,function(x){if(A>=O)return x;var U=I[A];switch(A+=1,x){case"%%":return"%";case"%s":return String(U);case"%d":return Number(U);case"%v":return""}})},y=function(g,A,I){var O=[g+"="+(A.format instanceof Function?A.format(A.push?I:I[A.name]):A.format)];if(A.names)for(var x=0;x<A.names.length;x+=1){var U=A.names[x];A.name?O.push(I[A.name][U]):O.push(I[A.names[x]])}else O.push(I[A.name]);return m.apply(null,O)},j=["v","o","s","i","u","e","p","c","b","t","r","z","a"],h=["i","c","b","a"];S.exports=function(g,A){A=A||{},g.version==null&&(g.version=0),g.name==null&&(g.name=" "),g.media.forEach(function(U){U.payloads==null&&(U.payloads="")});var I=A.outerOrder||j,O=A.innerOrder||h,x=[];return I.forEach(function(U){l[U].forEach(function(G){G.name in g&&g[G.name]!=null?x.push(y(U,G,g)):G.push in g&&g[G.push]!=null&&g[G.push].forEach(function(P){x.push(y(U,G,P))})})}),g.media.forEach(function(U){x.push(y("m",l.m[0],U)),O.forEach(function(G){l[G].forEach(function(P){P.name in U&&U[P.name]!=null?x.push(y(G,P,U)):P.push in U&&U[P.push]!=null&&U[P.push].forEach(function(z){x.push(y(G,P,z))})})})}),x.join(`\r
|
|
9
|
+
`)+`\r
|
|
10
|
+
`}},2636:(S,d,o)=>{var l=o(766),v=o(9776),m=v.parseSsrcs,y=v.writeSsrcs;function j(I,O,x){return I.ssrcs.filter(function(U){return U.id===O}).filter(function(U){return U.attribute===x}).map(function(U){return U.value})[0]}function h(I){this.options=I||{},this.options.numOfLayers||(this.options.numOfLayers=3),this.ssrcCache=[]}function g(I,O){I!=null&&Array.isArray(I.media)&&I.media.forEach(function(x){x.type==="video"&&O(x)})}function A(I){return I&&I!=null&&I.type&&I.type!=""&&I.sdp&&I.sdp!=""}h.prototype.clearSsrcCache=function(){this.ssrcCache=[]},h.prototype.setSsrcCache=function(I){this.ssrcCache=I},h.prototype._parseSimLayers=function(I){var O=I.ssrcGroups&&I.ssrcGroups.find(function(x){return x.semantics==="SIM"});return O?O.ssrcs.split(" ").map(function(x){return parseInt(x)}):[I.ssrcs[0].id]},h.prototype._buildNewToOldSsrcMap=function(I,O){for(var x={},U=0;U<I.length;++U){var G=I[U],P=O[U]||null;x[G]=P}return x},h.prototype._fillInSourceDataFromCache=function(I){var O=this._parseSimLayers(I),x=j(I,O[0],"msid"),U=j(I,O[0],"cname"),G=this._buildNewToOldSsrcMap(O,this.ssrcCache),P=this.ssrcCache.filter(function(z){return Object.values(G).indexOf(z)===-1});return I.ssrcs.forEach(function(z){G[z.id]&&(z.id=G[z.id])}),P.forEach(function(z){I.ssrcs.push({id:z,attribute:"msid",value:x}),I.ssrcs.push({id:z,attribute:"cname",value:U})}),I.ssrcGroups=I.ssrcGroups||[],I.ssrcGroups.push({semantics:"SIM",ssrcs:this.ssrcCache.join(" ")}),I},h.prototype._generateSourceData=function(I,O){var x=function(pe,Me){pe.ssrcs.push({id:Me,attribute:"cname",value:G}),pe.ssrcs.push({id:Me,attribute:"msid",value:U})},U=j(I,O,"msid"),G=j(I,O,"cname");this.options.usesUnifiedPlan&&!U&&(U=I.msid,I.ssrcs.forEach(pe=>{I.ssrcs.push({id:pe.id,attribute:"msid",value:U})}));for(var P=[],z=0;z<this.options.numOfLayers-1;++z){var ue=Math.floor(4294967295*Math.random())+0;x(I,ue),P.push(ue)}return I.ssrcGroups=I.ssrcGroups||[],I.ssrcGroups.push({semantics:"SIM",ssrcs:O+" "+P.join(" ")}),I},h.prototype._restoreSimulcast=function(I){var O,x=I.ssrcs&&I.ssrcs.map(function(P){return P.id}).filter(function(P,z,ue){return ue.indexOf(P)===z}).length||0,U=I.ssrcGroups&&I.ssrcGroups.length||0;if(x===0||x>2||x==2&&U===0)return I;if(x===1)O=I.ssrcs[0].id;else{var G=I.ssrcGroups.filter(function(P){return P.semantics==="FID"})[0];if(!G)return I;O=parseInt(G.ssrcs.split(" ")[0])}return I=this.ssrcCache.indexOf(O)!==-1?this._fillInSourceDataFromCache(I):this._generateSourceData(I,O),this.ssrcCache=this._parseSimLayers(I),I},h.prototype.mungeRemoteDescription=function(I,O){if(!A(I))return I;var x=l.parse(I.sdp),U=this;return g(x,function(G){U.options.explodeRemoteSimulcast?function(P){if(P&&Array.isArray(P.ssrcGroups)){for(var z=m(P),ue=[],pe=P.ssrcGroups.length;pe--;)if(P.ssrcGroups[pe].semantics==="SIM"){for(var Me=P.ssrcGroups[pe].ssrcs.split(" "),rt=0;rt<Me.length;rt++){var be=Me[rt];ue.push(be);var Te=z[be].msid.split(" ");z[be].msid=[Te[0],"/",rt," ",Te[1],"/",rt].join(""),z[be].cname=[z[be].cname,"/",rt].join(""),P.ssrcGroups.forEach(function(C){if(C.semantics!=="SIM"){var st=C.ssrcs.split(" ");st.indexOf(be)!==-1&&st.forEach(function(_e){z[_e].msid=z[be].msid,z[_e].cname=z[be].cname,_e!==be&&ue.push(_e)})}})}P.ssrcs=y(z,ue),P.ssrcGroups.splice(pe,1)}}}(G):function(P){if(P&&Array.isArray(P.ssrcGroups)){var z=m(P);P.ssrcGroups.forEach(function(pe){if(pe.semantics==="SIM"){pe.nuke=!0;for(var Me=pe.ssrcs.split(" "),rt=1;rt<Me.length;rt++){var be=Me[rt];delete z[be],P.ssrcGroups.forEach(function(Te){if(Te.semantics!=="SIM"){var C=Te.ssrcs.split(" ");C.indexOf(be)!==-1&&(C.forEach(function(st){delete z[st]}),Te.nuke=!0)}})}}}),P.ssrcs=y(z);for(var ue=P.ssrcGroups.length;ue--;)P.ssrcGroups[ue].nuke&&P.ssrcGroups.splice(ue,1)}}(G),!U.options.usesUnifiedPlan&&O?function(P){P&&(Array.isArray(P.invalid)||(P.invalid=[]),P.invalid.some(function(z){return z.value==="x-google-flag:conference"})||P.invalid.push({value:"x-google-flag:conference"}))}(G):function(P){P&&P.xGoogleFlag!==void 0&&(P.xGoogleFlag=void 0)}(G)}),new RTCSessionDescription({type:I.type,sdp:l.write(x)})},h.prototype.mungeLocalDescription=function(I){if(!A(I))return I;var O=l.parse(I.sdp),x=this;return g(O,function(U){U.direction!="recvonly"&&U.direction!="inactive"&&x._restoreSimulcast(U)}),new RTCSessionDescription({type:I.type,sdp:l.write(O)})},S.exports=h},9776:(S,d)=>{d.writeSsrcs=function(o,l){var v=[];if(o!==void 0&&Object.keys(o).length!==0){Array.isArray(l)||(l=[]);for(var m=0;m<l.length;m++){var y=l[m],j=o[y];Object.keys(j).forEach(function(h){v.push({id:y,attribute:h,value:j[h]})})}Object.keys(o).forEach(function(h){if(h=parseInt(h),!(l.indexOf(h)>=0)){var g=o[h];Object.keys(g).forEach(function(A){v.push({id:h,attribute:A,value:g[A]})})}})}return v},d.parseSsrcs=function(o){var l={};return o.ssrcs!==void 0&&Array.isArray(o.ssrcs)&&o.ssrcs.forEach(function(v){l[v.id]||(l[v.id]={}),l[v.id][v.attribute]=v.value}),l}},4449:(S,d,o)=>{S.exports=o(6141).default},2444:S=>{S.exports=class{constructor(d,o,l){this._userId=d,this.setDisplayName(o),this._isLocalStats=l||!1,this.setDominantSpeaker(!1),this.totalDominantSpeakerTime=0,this._dominantSpeakerStart=0,this._hasLeft=!1,this._facialExpressions={happy:0,neutral:0,surprised:0,angry:0,fearful:0,disgusted:0,sad:0}}getUserId(){return this._userId}getDisplayName(){return this.displayName}setDisplayName(d){this.displayName=d}isLocalStats(){return this._isLocalStats}isDominantSpeaker(){return this._dominantSpeakerStart>0}setDominantSpeaker(d){if(!this.isDominantSpeaker()&&d)this._dominantSpeakerStart=Date.now();else if(this.isDominantSpeaker()&&!d){const o=Date.now()-this._dominantSpeakerStart;this.totalDominantSpeakerTime+=o,this._dominantSpeakerStart=0}}getTotalDominantSpeakerTime(){let d=this.totalDominantSpeakerTime;return this.isDominantSpeaker()&&(d+=Date.now()-this._dominantSpeakerStart),d}hasLeft(){return this._hasLeft}markAsHasLeft(){this._hasLeft=!0,this.setDominantSpeaker(!1)}getFacialExpressions(){return this._facialExpressions}setFacialExpressions(d){this._facialExpressions=d}addFacialExpression(d,o){this._facialExpressions[d]+=o}}},4424:S=>{S.exports={getTokenAuthUrl:(d,o,l)=>typeof d!="string"?null:d.replace("{room}",o).replace("{roleUpgrade}",l===!0)}},4832:S=>{function d(o,l){if(!o||!l||typeof o.addListener!="function"||typeof l.emit!="function")throw new Error("Invalid arguments passed to EventEmitterForwarder");this.src=o,this.dest=l}d.prototype.forward=function(){for(var o=arguments.length,l=new Array(o),v=0;v<o;v++)l[v]=arguments[v];const m=l[0];l[0]=this.dest,this.src.addListener(m,Function.prototype.bind.apply(this.dest.emit,l))},S.exports=d},1023:S=>{const d=[],o=window.onerror,l=window.onunhandledrejection;window.onerror=function(){for(var m=arguments.length,y=new Array(m),j=0;j<m;j++)y[j]=arguments[j];d.forEach(h=>h(...y)),o&&o(...y)},window.onunhandledrejection=function(m){d.forEach(y=>y(null,null,null,null,m.reason)),l&&l(m)};const v={addHandler(m){d.push(m)},callErrorHandler(m){const y=window.onerror;y&&y(null,null,null,null,m)},callUnhandledRejectionHandler(m){const y=window.onunhandledrejection;y&&y(m)}};S.exports=v},5399:S=>{function d(v,m){return Math.floor(Math.random()*(m-v+1))+v}function o(v){return v[d(0,v.length-1)]}const l={randomHexDigit:()=>o("0123456789abcdef"),randomHexString(v){let m="";for(;v--;)m+=this.randomHexDigit();return m},randomElement:o,randomAlphanumStr:function(v){let m="";for(let y=0;y<v;y+=1)m+=o("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");return m},randomInt:d};S.exports=l},549:(S,d,o)=>{const l=o(667),v={loadScript(m,y,j,h,g,A){const I=document,O="script",x=I.createElement(O),U=I.getElementsByTagName(O)[0];if(x.async=y,h){const G=l();if(G){const P=G.src,z=P.substring(0,P.lastIndexOf("/")+1);P&&z&&(m=z+m)}}g&&(x.onload=g),A&&(x.onerror=A),x.src=m,j?U.parentNode.insertBefore(x,U):U.parentNode.appendChild(x)}};S.exports=v},2593:S=>{S.exports={integerHash:function(d){if(!d)return 0;let o,l,v=0;for(l=0;l<d.length;l++)o=d.charCodeAt(l),v+=o*Math.pow(31,d.length-1-l),v=Math.abs(0|v);return v}}},6667:(S,d,o)=>{const l=o(5399),v=["Aaliyah","Aaron","Abagail","Abbey","Abbie","Abbigail","Abby","Abdiel","Abdul","Abdullah","Abe","Abel","Abelardo","Abigail","Abigale","Abigayle","Abner","Abraham","Ada","Adah","Adalberto","Adaline","Adam","Adan","Addie","Addison","Adela","Adelbert","Adele","Adelia","Adeline","Adell","Adella","Adelle","Aditya","Adolf","Adolfo","Adolph","Adolphus","Adonis","Adrain","Adrian","Adriana","Adrianna","Adriel","Adrien","Adrienne","Afton","Aglae","Agnes","Agustin","Agustina","Ahmad","Ahmed","Aida","Aidan","Aiden","Aileen","Aisha","Aiyana","Akeem","Al","Alaina","Alan","Alana","Alanis","Alanna","Alayna","Alba","Albert","Alberta","Albertha","Alberto","Albin","Albina","Alda","Alden","Alec","Aleen","Alejandra","Alejandrin","Alek","Alena","Alene","Alessandra","Alessandro","Alessia","Aletha","Alex","Alexa","Alexander","Alexandra","Alexandre","Alexandrea","Alexandria","Alexandrine","Alexandro","Alexane","Alexanne","Alexie","Alexis","Alexys","Alexzander","Alf","Alfonso","Alfonzo","Alford","Alfred","Alfreda","Alfredo","Ali","Alia","Alice","Alicia","Alisa","Alisha","Alison","Alivia","Aliya","Aliyah","Aliza","Alize","Allan","Allen","Allene","Allie","Allison","Ally","Alphonso","Alta","Althea","Alva","Alvah","Alvena","Alvera","Alverta","Alvina","Alvis","Alyce","Alycia","Alysa","Alysha","Alyson","Alysson","Amalia","Amanda","Amani","Amara","Amari","Amaya","Amber","Ambrose","Amelia","Amelie","Amely","America","Americo","Amie","Amina","Amir","Amira","Amiya","Amos","Amparo","Amy","Amya","Ana","Anabel","Anabelle","Anahi","Anais","Anastacio","Anastasia","Anderson","Andre","Andreane","Andreanne","Andres","Andrew","Andy","Angel","Angela","Angelica","Angelina","Angeline","Angelita","Angelo","Angie","Angus","Anibal","Anika","Anissa","Anita","Aniya","Aniyah","Anjali","Anna","Annabel","Annabell","Annabelle","Annalise","Annamae","Annamarie","Anne","Annetta","Annette","Annie","Ansel","Ansley","Anthony","Antoinette","Antone","Antonetta","Antonette","Antonia","Antonietta","Antonina","Antonio","Antwan","Antwon","Anya","April","Ara","Araceli","Aracely","Arch","Archibald","Ardella","Arden","Ardith","Arely","Ari","Ariane","Arianna","Aric","Ariel","Arielle","Arjun","Arlene","Arlie","Arlo","Armand","Armando","Armani","Arnaldo","Arne","Arno","Arnold","Arnoldo","Arnulfo","Aron","Art","Arthur","Arturo","Arvel","Arvid","Arvilla","Aryanna","Asa","Asha","Ashlee","Ashleigh","Ashley","Ashly","Ashlynn","Ashton","Ashtyn","Asia","Assunta","Astrid","Athena","Aubree","Aubrey","Audie","Audra","Audreanne","Audrey","August","Augusta","Augustine","Augustus","Aurelia","Aurelie","Aurelio","Aurore","Austen","Austin","Austyn","Autumn","Ava","Avery","Avis","Axel","Ayana","Ayden","Ayla","Aylin","Baby","Bailee","Bailey","Barbara","Barney","Baron","Barrett","Barry","Bart","Bartholome","Barton","Baylee","Beatrice","Beau","Beaulah","Bell","Bella","Belle","Ben","Benedict","Benjamin","Bennett","Bennie","Benny","Benton","Berenice","Bernadette","Bernadine","Bernard","Bernardo","Berneice","Bernhard","Bernice","Bernie","Berniece","Bernita","Berry","Bert","Berta","Bertha","Bertram","Bertrand","Beryl","Bessie","Beth","Bethany","Bethel","Betsy","Bette","Bettie","Betty","Bettye","Beulah","Beverly","Bianka","Bill","Billie","Billy","Birdie","Blair","Blaise","Blake","Blanca","Blanche","Blaze","Bo","Bobbie","Bobby","Bonita","Bonnie","Boris","Boyd","Brad","Braden","Bradford","Bradley","Bradly","Brady","Braeden","Brain","Brandi","Brando","Brandon","Brandt","Brandy","Brandyn","Brannon","Branson","Brant","Braulio","Braxton","Brayan","Breana","Breanna","Breanne","Brenda","Brendan","Brenden","Brendon","Brenna","Brennan","Brennon","Brent","Bret","Brett","Bria","Brian","Briana","Brianne","Brice","Bridget","Bridgette","Bridie","Brielle","Brigitte","Brionna","Brisa","Britney","Brittany","Brock","Broderick","Brody","Brook","Brooke","Brooklyn","Brooks","Brown","Bruce","Bryana","Bryce","Brycen","Bryon","Buck","Bud","Buddy","Buford","Bulah","Burdette","Burley","Burnice","Buster","Cade","Caden","Caesar","Caitlyn","Cale","Caleb","Caleigh","Cali","Calista","Callie","Camden","Cameron","Camila","Camilla","Camille","Camren","Camron","Camryn","Camylle","Candace","Candelario","Candice","Candida","Candido","Cara","Carey","Carissa","Carlee","Carleton","Carley","Carli","Carlie","Carlo","Carlos","Carlotta","Carmel","Carmela","Carmella","Carmelo","Carmen","Carmine","Carol","Carolanne","Carole","Carolina","Caroline","Carolyn","Carolyne","Carrie","Carroll","Carson","Carter","Cary","Casandra","Casey","Casimer","Casimir","Casper","Cassandra","Cassandre","Cassidy","Cassie","Catalina","Caterina","Catharine","Catherine","Cathrine","Cathryn","Cathy","Cayla","Ceasar","Cecelia","Cecil","Cecile","Cecilia","Cedrick","Celestine","Celestino","Celia","Celine","Cesar","Chad","Chadd","Chadrick","Chaim","Chance","Chandler","Chanel","Chanelle","Charity","Charlene","Charles","Charley","Charlie","Charlotte","Chase","Chasity","Chauncey","Chaya","Chaz","Chelsea","Chelsey","Chelsie","Chesley","Chester","Chet","Cheyanne","Cheyenne","Chloe","Chris","Christ","Christa","Christelle","Christian","Christiana","Christina","Christine","Christop","Christophe","Christopher","Christy","Chyna","Ciara","Cicero","Cielo","Cierra","Cindy","Citlalli","Clair","Claire","Clara","Clarabelle","Clare","Clarissa","Clark","Claud","Claude","Claudia","Claudie","Claudine","Clay","Clemens","Clement","Clementina","Clementine","Clemmie","Cleo","Cleora","Cleta","Cletus","Cleve","Cleveland","Clifford","Clifton","Clint","Clinton","Clotilde","Clovis","Cloyd","Clyde","Coby","Cody","Colby","Cole","Coleman","Colin","Colleen","Collin","Colt","Colten","Colton","Columbus","Concepcion","Conner","Connie","Connor","Conor","Conrad","Constance","Constantin","Consuelo","Cooper","Cora","Coralie","Corbin","Cordelia","Cordell","Cordia","Cordie","Corene","Corine","Cornelius","Cornell","Corrine","Cortez","Cortney","Cory","Coty","Courtney","Coy","Craig","Crawford","Creola","Cristal","Cristian","Cristina","Cristobal","Cristopher","Cruz","Crystal","Crystel","Cullen","Curt","Curtis","Cydney","Cynthia","Cyril","Cyrus","Dagmar","Dahlia","Daija","Daisha","Daisy","Dakota","Dale","Dallas","Dallin","Dalton","Damaris","Dameon","Damian","Damien","Damion","Damon","Dan","Dana","Dandre","Dane","D'angelo","Dangelo","Danial","Daniela","Daniella","Danielle","Danika","Dannie","Danny","Dante","Danyka","Daphne","Daphnee","Daphney","Darby","Daren","Darian","Dariana","Darien","Dario","Darion","Darius","Darlene","Daron","Darrel","Darrell","Darren","Darrick","Darrin","Darrion","Darron","Darryl","Darwin","Daryl","Dashawn","Dasia","Dave","David","Davin","Davion","Davon","Davonte","Dawn","Dawson","Dax","Dayana","Dayna","Dayne","Dayton","Dean","Deangelo","Deanna","Deborah","Declan","Dedric","Dedrick","Dee","Deion","Deja","Dejah","Dejon","Dejuan","Delaney","Delbert","Delfina","Delia","Delilah","Dell","Della","Delmer","Delores","Delpha","Delphia","Delphine","Delta","Demarco","Demarcus","Demario","Demetris","Demetrius","Demond","Dena","Denis","Dennis","Deon","Deondre","Deontae","Deonte","Dereck","Derek","Derick","Deron","Derrick","Deshaun","Deshawn","Desiree","Desmond","Dessie","Destany","Destin","Destinee","Destiney","Destini","Destiny","Devan","Devante","Deven","Devin","Devon","Devonte","Devyn","Dewayne","Dewitt","Dexter","Diamond","Diana","Dianna","Diego","Dillan","Dillon","Dimitri","Dina","Dino","Dion","Dixie","Dock","Dolly","Dolores","Domenic","Domenica","Domenick","Domenico","Domingo","Dominic","Dominique","Don","Donald","Donato","Donavon","Donna","Donnell","Donnie","Donny","Dora","Dorcas","Dorian","Doris","Dorothea","Dorothy","Dorris","Dortha","Dorthy","Doug","Douglas","Dovie","Doyle","Drake","Drew","Duane","Dudley","Dulce","Duncan","Durward","Dustin","Dusty","Dwight","Dylan","Earl","Earlene","Earline","Earnest","Earnestine","Easter","Easton","Ebba","Ebony","Ed","Eda","Edd","Eddie","Eden","Edgar","Edgardo","Edison","Edmond","Edmund","Edna","Eduardo","Edward","Edwardo","Edwin","Edwina","Edyth","Edythe","Effie","Efrain","Efren","Eileen","Einar","Eino","Eladio","Elaina","Elbert","Elda","Eldon","Eldora","Eldred","Eldridge","Eleanora","Eleanore","Eleazar","Electa","Elena","Elenor","Elenora","Eleonore","Elfrieda","Eli","Elian","Eliane","Elias","Eliezer","Elijah","Elinor","Elinore","Elisa","Elisabeth","Elise","Eliseo","Elisha","Elissa","Eliza","Elizabeth","Ella","Ellen","Ellie","Elliot","Elliott","Ellis","Ellsworth","Elmer","Elmira","Elmo","Elmore","Elna","Elnora","Elody","Eloisa","Eloise","Elouise","Eloy","Elroy","Elsa","Else","Elsie","Elta","Elton","Elva","Elvera","Elvie","Elvis","Elwin","Elwyn","Elyse","Elyssa","Elza","Emanuel","Emelia","Emelie","Emely","Emerald","Emerson","Emery","Emie","Emil","Emile","Emilia","Emiliano","Emilie","Emilio","Emily","Emma","Emmalee","Emmanuel","Emmanuelle","Emmet","Emmett","Emmie","Emmitt","Emmy","Emory","Ena","Enid","Enoch","Enola","Enos","Enrico","Enrique","Ephraim","Era","Eriberto","Eric","Erica","Erich","Erick","Ericka","Erik","Erika","Erin","Erling","Erna","Ernest","Ernestina","Ernestine","Ernesto","Ernie","Ervin","Erwin","Eryn","Esmeralda","Esperanza","Esta","Esteban","Estefania","Estel","Estell","Estella","Estelle","Estevan","Esther","Estrella","Etha","Ethan","Ethel","Ethelyn","Ethyl","Ettie","Eudora","Eugene","Eugenia","Eula","Eulah","Eulalia","Euna","Eunice","Eusebio","Eva","Evalyn","Evan","Evangeline","Evans","Eve","Eveline","Evelyn","Everardo","Everett","Everette","Evert","Evie","Ewald","Ewell","Ezekiel","Ezequiel","Ezra","Fabian","Fabiola","Fae","Fannie","Fanny","Fatima","Faustino","Fausto","Favian","Fay","Faye","Federico","Felicia","Felicita","Felicity","Felipa","Felipe","Felix","Felton","Fermin","Fern","Fernando","Ferne","Fidel","Filiberto","Filomena","Finn","Fiona","Flavie","Flavio","Fleta","Fletcher","Flo","Florence","Florencio","Florian","Florida","Florine","Flossie","Floy","Floyd","Ford","Forest","Forrest","Foster","Frances","Francesca","Francesco","Francis","Francisca","Francisco","Franco","Frank","Frankie","Franz","Fred","Freda","Freddie","Freddy","Frederic","Frederick","Frederik","Frederique","Fredrick","Fredy","Freeda","Freeman","Freida","Frida","Frieda","Friedrich","Fritz","Furman","Gabe","Gabriel","Gabriella","Gabrielle","Gaetano","Gage","Gail","Gardner","Garett","Garfield","Garland","Garnet","Garnett","Garret","Garrett","Garrick","Garrison","Garry","Garth","Gaston","Gavin","Gay","Gayle","Gaylord","Gene","General","Genesis","Genevieve","Gennaro","Genoveva","Geo","Geoffrey","George","Georgette","Georgiana","Georgianna","Geovanni","Geovanny","Geovany","Gerald","Geraldine","Gerard","Gerardo","Gerda","Gerhard","Germaine","German","Gerry","Gerson","Gertrude","Gia","Gianni","Gideon","Gilbert","Gilberto","Gilda","Giles","Gillian","Gina","Gino","Giovani","Giovanna","Giovanni","Giovanny","Gisselle","Giuseppe","Gladyce","Gladys","Glen","Glenda","Glenna","Glennie","Gloria","Godfrey","Golda","Golden","Gonzalo","Gordon","Grace","Gracie","Graciela","Grady","Graham","Grant","Granville","Grayce","Grayson","Green","Greg","Gregg","Gregoria","Gregorio","Gregory","Greta","Gretchen","Greyson","Griffin","Grover","Guadalupe","Gudrun","Guido","Guillermo","Guiseppe","Gunnar","Gunner","Gus","Gussie","Gust","Gustave","Guy","Gwen","Gwendolyn","Hadley","Hailee","Hailey","Hailie","Hal","Haleigh","Haley","Halie","Halle","Hallie","Hank","Hanna","Hannah","Hans","Hardy","Harley","Harmon","Harmony","Harold","Harrison","Harry","Harvey","Haskell","Hassan","Hassie","Hattie","Haven","Hayden","Haylee","Hayley","Haylie","Hazel","Hazle","Heath","Heather","Heaven","Heber","Hector","Heidi","Helen","Helena","Helene","Helga","Hellen","Helmer","Heloise","Henderson","Henri","Henriette","Henry","Herbert","Herman","Hermann","Hermina","Herminia","Herminio","Hershel","Herta","Hertha","Hester","Hettie","Hilario","Hilbert","Hilda","Hildegard","Hillard","Hillary","Hilma","Hilton","Hipolito","Hiram","Hobart","Holden","Hollie","Hollis","Holly","Hope","Horace","Horacio","Hortense","Hosea","Houston","Howard","Howell","Hoyt","Hubert","Hudson","Hugh","Hulda","Humberto","Hunter","Hyman","Ian","Ibrahim","Icie","Ida","Idell","Idella","Ignacio","Ignatius","Ike","Ila","Ilene","Iliana","Ima","Imani","Imelda","Immanuel","Imogene","Ines","Irma","Irving","Irwin","Isaac","Isabel","Isabell","Isabella","Isabelle","Isac","Isadore","Isai","Isaiah","Isaias","Isidro","Ismael","Isobel","Isom","Israel","Issac","Itzel","Iva","Ivah","Ivory","Ivy","Izabella","Izaiah","Jabari","Jace","Jacey","Jacinthe","Jacinto","Jack","Jackeline","Jackie","Jacklyn","Jackson","Jacky","Jaclyn","Jacquelyn","Jacques","Jacynthe","Jada","Jade","Jaden","Jadon","Jadyn","Jaeden","Jaida","Jaiden","Jailyn","Jaime","Jairo","Jakayla","Jake","Jakob","Jaleel","Jalen","Jalon","Jalyn","Jamaal","Jamal","Jamar","Jamarcus","Jamel","Jameson","Jamey","Jamie","Jamil","Jamir","Jamison","Jammie","Jan","Jana","Janae","Jane","Janelle","Janessa","Janet","Janice","Janick","Janie","Janis","Janiya","Jannie","Jany","Jaquan","Jaquelin","Jaqueline","Jared","Jaren","Jarod","Jaron","Jarred","Jarrell","Jarret","Jarrett","Jarrod","Jarvis","Jasen","Jasmin","Jason","Jasper","Jaunita","Javier","Javon","Javonte","Jay","Jayce","Jaycee","Jayda","Jayde","Jayden","Jaydon","Jaylan","Jaylen","Jaylin","Jaylon","Jayme","Jayne","Jayson","Jazlyn","Jazmin","Jazmyn","Jazmyne","Jean","Jeanette","Jeanie","Jeanne","Jed","Jedediah","Jedidiah","Jeff","Jefferey","Jeffery","Jeffrey","Jeffry","Jena","Jenifer","Jennie","Jennifer","Jennings","Jennyfer","Jensen","Jerad","Jerald","Jeramie","Jeramy","Jerel","Jeremie","Jeremy","Jermain","Jermaine","Jermey","Jerod","Jerome","Jeromy","Jerrell","Jerrod","Jerrold","Jerry","Jess","Jesse","Jessica","Jessie","Jessika","Jessy","Jessyca","Jesus","Jett","Jettie","Jevon","Jewel","Jewell","Jillian","Jimmie","Jimmy","Jo","Joan","Joana","Joanie","Joanne","Joannie","Joanny","Joany","Joaquin","Jocelyn","Jodie","Jody","Joe","Joel","Joelle","Joesph","Joey","Johan","Johann","Johanna","Johathan","John","Johnathan","Johnathon","Johnnie","Johnny","Johnpaul","Johnson","Jolie","Jon","Jonas","Jonatan","Jonathan","Jonathon","Jordan","Jordane","Jordi","Jordon","Jordy","Jordyn","Jorge","Jose","Josefa","Josefina","Joseph","Josephine","Josh","Joshua","Joshuah","Josiah","Josiane","Josianne","Josie","Josue","Jovan","Jovani","Jovanny","Jovany","Joy","Joyce","Juana","Juanita","Judah","Judd","Jude","Judge","Judson","Judy","Jules","Julia","Julian","Juliana","Julianne","Julie","Julien","Juliet","Julio","Julius","June","Junior","Junius","Justen","Justice","Justina","Justine","Juston","Justus","Justyn","Juvenal","Juwan","Kacey","Kaci","Kacie","Kade","Kaden","Kadin","Kaela","Kaelyn","Kaia","Kailee","Kailey","Kailyn","Kaitlin","Kaitlyn","Kale","Kaleb","Kaleigh","Kaley","Kali","Kallie","Kameron","Kamille","Kamren","Kamron","Kamryn","Kane","Kara","Kareem","Karelle","Karen","Kari","Kariane","Karianne","Karina","Karine","Karl","Karlee","Karley","Karli","Karlie","Karolann","Karson","Kasandra","Kasey","Kassandra","Katarina","Katelin","Katelyn","Katelynn","Katharina","Katherine","Katheryn","Kathleen","Kathlyn","Kathryn","Kathryne","Katlyn","Katlynn","Katrina","Katrine","Kattie","Kavon","Kay","Kaya","Kaycee","Kayden","Kayla","Kaylah","Kaylee","Kayleigh","Kayley","Kayli","Kaylie","Kaylin","Keagan","Keanu","Keara","Keaton","Keegan","Keeley","Keely","Keenan","Keira","Keith","Kellen","Kelley","Kelli","Kellie","Kelly","Kelsi","Kelsie","Kelton","Kelvin","Ken","Kendall","Kendra","Kendrick","Kenna","Kennedi","Kennedy","Kenneth","Kennith","Kenny","Kenton","Kenya","Kenyatta","Kenyon","Keon","Keshaun","Keshawn","Keven","Kevin","Kevon","Keyon","Keyshawn","Khalid","Khalil","Kian","Kiana","Kianna","Kiara","Kiarra","Kiel","Kiera","Kieran","Kiley","Kim","Kimberly","King","Kip","Kira","Kirk","Kirsten","Kirstin","Kitty","Kobe","Koby","Kody","Kolby","Kole","Korbin","Korey","Kory","Kraig","Kris","Krista","Kristian","Kristin","Kristina","Kristofer","Kristoffer","Kristopher","Kristy","Krystal","Krystel","Krystina","Kurt","Kurtis","Kyla","Kyle","Kylee","Kyleigh","Kyler","Kylie","Kyra","Lacey","Lacy","Ladarius","Lafayette","Laila","Laisha","Lamar","Lambert","Lamont","Lance","Landen","Lane","Laney","Larissa","Laron","Larry","Larue","Laura","Laurel","Lauren","Laurence","Lauretta","Lauriane","Laurianne","Laurie","Laurine","Laury","Lauryn","Lavada","Lavern","Laverna","Laverne","Lavina","Lavinia","Lavon","Lavonne","Lawrence","Lawson","Layla","Layne","Lazaro","Lea","Leann","Leanna","Leanne","Leatha","Leda","Lee","Leif","Leila","Leilani","Lela","Lelah","Leland","Lelia","Lempi","Lemuel","Lenna","Lennie","Lenny","Lenora","Lenore","Leo","Leola","Leon","Leonard","Leonardo","Leone","Leonel","Leonie","Leonor","Leonora","Leopold","Leopoldo","Leora","Lera","Lesley","Leslie","Lesly","Lessie","Lester","Leta","Letha","Letitia","Levi","Lew","Lewis","Lexi","Lexie","Lexus","Lia","Liam","Liana","Libbie","Libby","Lila","Lilian","Liliana","Liliane","Lilla","Lillian","Lilliana","Lillie","Lilly","Lily","Lilyan","Lina","Lincoln","Linda","Lindsay","Lindsey","Linnea","Linnie","Linwood","Lionel","Lisa","Lisandro","Lisette","Litzy","Liza","Lizeth","Lizzie","Llewellyn","Lloyd","Logan","Lois","Lola","Lolita","Loma","Lon","London","Lonie","Lonnie","Lonny","Lonzo","Lora","Loraine","Loren","Lorena","Lorenz","Lorenza","Lorenzo","Lori","Lorine","Lorna","Lottie","Lou","Louie","Louisa","Lourdes","Louvenia","Lowell","Loy","Loyal","Loyce","Lucas","Luciano","Lucie","Lucienne","Lucile","Lucinda","Lucio","Lucious","Lucius","Lucy","Ludie","Ludwig","Lue","Luella","Luigi","Luis","Luisa","Lukas","Lula","Lulu","Luna","Lupe","Lura","Lurline","Luther","Luz","Lyda","Lydia","Lyla","Lynn","Lyric","Lysanne","Mabel","Mabelle","Mable","Mac","Macey","Maci","Macie","Mack","Mackenzie","Macy","Madaline","Madalyn","Maddison","Madeline","Madelyn","Madelynn","Madge","Madie","Madilyn","Madisen","Madison","Madisyn","Madonna","Madyson","Mae","Maegan","Maeve","Mafalda","Magali","Magdalen","Magdalena","Maggie","Magnolia","Magnus","Maia","Maida","Maiya","Major","Makayla","Makenna","Makenzie","Malachi","Malcolm","Malika","Malinda","Mallie","Mallory","Malvina","Mandy","Manley","Manuel","Manuela","Mara","Marc","Marcel","Marcelina","Marcelino","Marcella","Marcelle","Marcellus","Marcelo","Marcia","Marco","Marcos","Marcus","Margaret","Margarete","Margarett","Margaretta","Margarette","Margarita","Marge","Margie","Margot","Margret","Marguerite","Maria","Mariah","Mariam","Marian","Mariana","Mariane","Marianna","Marianne","Mariano","Maribel","Marie","Mariela","Marielle","Marietta","Marilie","Marilou","Marilyne","Marina","Mario","Marion","Marisa","Marisol","Maritza","Marjolaine","Marjorie","Marjory","Mark","Markus","Marlee","Marlen","Marlene","Marley","Marlin","Marlon","Marques","Marquis","Marquise","Marshall","Marta","Martin","Martina","Martine","Marty","Marvin","Mary","Maryam","Maryjane","Maryse","Mason","Mateo","Mathew","Mathias","Mathilde","Matilda","Matilde","Matt","Matteo","Mattie","Maud","Maude","Maudie","Maureen","Maurice","Mauricio","Maurine","Maverick","Mavis","Max","Maxie","Maxime","Maximilian","Maximillia","Maximillian","Maximo","Maximus","Maxine","Maxwell","May","Maya","Maybell","Maybelle","Maye","Maymie","Maynard","Mayra","Mazie","Mckayla","Mckenna","Mckenzie","Meagan","Meaghan","Meda","Megane","Meggie","Meghan","Mekhi","Melany","Melba","Melisa","Melissa","Mellie","Melody","Melvin","Melvina","Melyna","Melyssa","Mercedes","Meredith","Merl","Merle","Merlin","Merritt","Mertie","Mervin","Meta","Mia","Micaela","Micah","Michael","Michaela","Michale","Micheal","Michel","Michele","Michelle","Miguel","Mikayla","Mike","Mikel","Milan","Miles","Milford","Miller","Millie","Milo","Milton","Mina","Minerva","Minnie","Miracle","Mireille","Mireya","Misael","Missouri","Misty","Mitchel","Mitchell","Mittie","Modesta","Modesto","Mohamed","Mohammad","Mohammed","Moises","Mollie","Molly","Mona","Monica","Monique","Monroe","Monserrat","Monserrate","Montana","Monte","Monty","Morgan","Moriah","Morris","Mortimer","Morton","Mose","Moses","Moshe","Mossie","Mozell","Mozelle","Muhammad","Muriel","Murl","Murphy","Murray","Mustafa","Mya","Myah","Mylene","Myles","Myra","Myriam","Myrl","Myrna","Myron","Myrtice","Myrtie","Myrtis","Myrtle","Nadia","Nakia","Name","Nannie","Naomi","Naomie","Napoleon","Narciso","Nash","Nasir","Nat","Natalia","Natalie","Natasha","Nathan","Nathanael","Nathanial","Nathaniel","Nathen","Nayeli","Neal","Ned","Nedra","Neha","Neil","Nelda","Nella","Nelle","Nellie","Nels","Nelson","Neoma","Nestor","Nettie","Neva","Newell","Newton","Nia","Nicholas","Nicholaus","Nichole","Nick","Nicklaus","Nickolas","Nico","Nicola","Nicolas","Nicole","Nicolette","Nigel","Nikita","Nikki","Nikko","Niko","Nikolas","Nils","Nina","Noah","Noble","Noe","Noel","Noelia","Noemi","Noemie","Noemy","Nola","Nolan","Nona","Nora","Norbert","Norberto","Norene","Norma","Norris","Norval","Norwood","Nova","Novella","Nya","Nyah","Nyasia","Obie","Oceane","Ocie","Octavia","Oda","Odell","Odessa","Odie","Ofelia","Okey","Ola","Olaf","Ole","Olen","Oleta","Olga","Olin","Oliver","Ollie","Oma","Omari","Omer","Ona","Onie","Opal","Ophelia","Ora","Oral","Oran","Oren","Orie","Orin","Orion","Orland","Orlando","Orlo","Orpha","Orrin","Orval","Orville","Osbaldo","Osborne","Oscar","Osvaldo","Oswald","Oswaldo","Otha","Otho","Otilia","Otis","Ottilie","Ottis","Otto","Ova","Owen","Ozella","Pablo","Paige","Palma","Pamela","Pansy","Paolo","Paris","Parker","Pascale","Pasquale","Pat","Patience","Patricia","Patrick","Patsy","Pattie","Paul","Paula","Pauline","Paxton","Payton","Pearl","Pearlie","Pearline","Pedro","Peggie","Penelope","Percival","Percy","Perry","Pete","Peter","Petra","Peyton","Philip","Phoebe","Phyllis","Pierce","Pierre","Pietro","Pink","Pinkie","Piper","Polly","Porter","Precious","Presley","Preston","Price","Prince","Princess","Priscilla","Providenci","Prudence","Queen","Queenie","Quentin","Quincy","Quinn","Quinten","Quinton","Rachael","Rachel","Rachelle","Rae","Raegan","Rafael","Rafaela","Raheem","Rahsaan","Rahul","Raina","Raleigh","Ralph","Ramiro","Ramon","Ramona","Randal","Randall","Randi","Randy","Ransom","Raoul","Raphael","Raphaelle","Raquel","Rashad","Rashawn","Rasheed","Raul","Raven","Ray","Raymond","Raymundo","Reagan","Reanna","Reba","Rebeca","Rebecca","Rebeka","Rebekah","Reece","Reed","Reese","Regan","Reggie","Reginald","Reid","Reilly","Reina","Reinhold","Remington","Rene","Renee","Ressie","Reta","Retha","Retta","Reuben","Reva","Rex","Rey","Reyes","Reymundo","Reyna","Reynold","Rhea","Rhett","Rhianna","Rhiannon","Rhoda","Ricardo","Richard","Richie","Richmond","Rick","Rickey","Rickie","Ricky","Rico","Rigoberto","Riley","Rita","River","Robb","Robbie","Robert","Roberta","Roberto","Robin","Robyn","Rocio","Rocky","Rod","Roderick","Rodger","Rodolfo","Rodrick","Rodrigo","Roel","Rogelio","Roger","Rogers","Rolando","Rollin","Roma","Romaine","Roman","Ron","Ronaldo","Ronny","Roosevelt","Rory","Rosa","Rosalee","Rosalia","Rosalind","Rosalinda","Rosalyn","Rosamond","Rosanna","Rosario","Roscoe","Rose","Rosella","Roselyn","Rosemarie","Rosemary","Rosendo","Rosetta","Rosie","Rosina","Roslyn","Ross","Rossie","Rowan","Rowena","Rowland","Roxane","Roxanne","Roy","Royal","Royce","Rozella","Ruben","Rubie","Ruby","Rubye","Rudolph","Rudy","Rupert","Russ","Russel","Russell","Rusty","Ruth","Ruthe","Ruthie","Ryan","Ryann","Ryder","Rylan","Rylee","Ryleigh","Ryley","Sabina","Sabrina","Sabryna","Sadie","Sadye","Sage","Saige","Sallie","Sally","Salma","Salvador","Salvatore","Sam","Samanta","Samantha","Samara","Samir","Sammie","Sammy","Samson","Sandra","Sandrine","Sandy","Sanford","Santa","Santiago","Santina","Santino","Santos","Sarah","Sarai","Sarina","Sasha","Saul","Savanah","Savanna","Savannah","Savion","Scarlett","Schuyler","Scot","Scottie","Scotty","Seamus","Sean","Sebastian","Sedrick","Selena","Selina","Selmer","Serena","Serenity","Seth","Shad","Shaina","Shakira","Shana","Shane","Shanel","Shanelle","Shania","Shanie","Shaniya","Shanna","Shannon","Shanny","Shanon","Shany","Sharon","Shaun","Shawn","Shawna","Shaylee","Shayna","Shayne","Shea","Sheila","Sheldon","Shemar","Sheridan","Sherman","Sherwood","Shirley","Shyann","Shyanne","Sibyl","Sid","Sidney","Sienna","Sierra","Sigmund","Sigrid","Sigurd","Silas","Sim","Simeon","Simone","Sincere","Sister","Skye","Skyla","Skylar","Sofia","Soledad","Solon","Sonia","Sonny","Sonya","Sophia","Sophie","Spencer","Stacey","Stacy","Stan","Stanford","Stanley","Stanton","Stefan","Stefanie","Stella","Stephan","Stephania","Stephanie","Stephany","Stephen","Stephon","Sterling","Steve","Stevie","Stewart","Stone","Stuart","Summer","Sunny","Susan","Susana","Susanna","Susie","Suzanne","Sven","Syble","Sydnee","Sydney","Sydni","Sydnie","Sylvan","Sylvester","Sylvia","Tabitha","Tad","Talia","Talon","Tamara","Tamia","Tania","Tanner","Tanya","Tara","Taryn","Tate","Tatum","Tatyana","Taurean","Tavares","Taya","Taylor","Teagan","Ted","Telly","Terence","Teresa","Terrance","Terrell","Terrence","Terrill","Terry","Tess","Tessie","Tevin","Thad","Thaddeus","Thalia","Thea","Thelma","Theo","Theodora","Theodore","Theresa","Therese","Theresia","Theron","Thomas","Thora","Thurman","Tia","Tiana","Tianna","Tiara","Tierra","Tiffany","Tillman","Timmothy","Timmy","Timothy","Tina","Tito","Titus","Tobin","Toby","Tod","Tom","Tomas","Tomasa","Tommie","Toney","Toni","Tony","Torey","Torrance","Torrey","Toy","Trace","Tracey","Tracy","Travis","Travon","Tre","Tremaine","Tremayne","Trent","Trenton","Tressa","Tressie","Treva","Trever","Trevion","Trevor","Trey","Trinity","Trisha","Tristian","Tristin","Triston","Troy","Trudie","Trycia","Trystan","Turner","Twila","Tyler","Tyra","Tyree","Tyreek","Tyrel","Tyrell","Tyrese","Tyrique","Tyshawn","Tyson","Ubaldo","Ulices","Ulises","Una","Unique","Urban","Uriah","Uriel","Ursula","Vada","Valentin","Valentina","Valentine","Valerie","Vallie","Van","Vance","Vanessa","Vaughn","Veda","Velda","Vella","Velma","Velva","Vena","Verda","Verdie","Vergie","Verla","Verlie","Vern","Verna","Verner","Vernice","Vernie","Vernon","Verona","Veronica","Vesta","Vicenta","Vicente","Vickie","Vicky","Victor","Victoria","Vida","Vidal","Vilma","Vince","Vincent","Vincenza","Vincenzo","Vinnie","Viola","Violet","Violette","Virgie","Virgil","Virginia","Virginie","Vita","Vito","Viva","Vivian","Viviane","Vivianne","Vivien","Vivienne","Vladimir","Wade","Waino","Waldo","Walker","Wallace","Walter","Walton","Wanda","Ward","Warren","Watson","Wava","Waylon","Wayne","Webster","Weldon","Wellington","Wendell","Wendy","Werner","Westley","Weston","Whitney","Wilber","Wilbert","Wilburn","Wiley","Wilford","Wilfred","Wilfredo","Wilfrid","Wilhelm","Wilhelmine","Will","Willa","Willard","William","Willie","Willis","Willow","Willy","Wilma","Wilmer","Wilson","Wilton","Winfield","Winifred","Winnifred","Winona","Winston","Woodrow","Wyatt","Wyman","Xander","Xavier","Xzavier","Yadira","Yasmeen","Yasmin","Yasmine","Yazmin","Yesenia","Yessenia","Yolanda","Yoshiko","Yvette","Yvonne","Zachariah","Zachary","Zachery","Zack","Zackary","Zackery","Zakary","Zander","Zane","Zaria","Zechariah","Zelda","Zella","Zelma","Zena","Zetta","Zion","Zita","Zoe","Zoey","Zoie","Zoila","Zola","Zora","Zula"];S.exports={generateUsername:function(){return`${l.randomElement(v)}-${l.randomAlphanumStr(3)}`}}},7318:S=>{S.exports={CAMERA:"camera",DESKTOP:"desktop",DESKTOP_HIGH_FPS:"desktop_high_fps",NONE:"none"}},4940:S=>{S.exports={ENVIRONMENT:"environment",USER:"user"}},4391:S=>{S.exports={H264:"h264",OPUS:"opus",ULPFEC:"ulpfec",VP8:"vp8",VP9:"vp9"}},8043:S=>{S.exports={INACTIVE:"inactive",RECVONLY:"recvonly",SENDONLY:"sendonly",SENDRECV:"sendrecv"}},1645:S=>{S.exports={CREATE_ANSWER_FAILED:"rtc.create_answer_failed",CREATE_OFFER_FAILED:"rtc.create_offer_failed",DATA_CHANNEL_OPEN:"rtc.data_channel_open",ENDPOINT_CONN_STATUS_CHANGED:"rtc.endpoint_conn_status_changed",DOMINANT_SPEAKER_CHANGED:"rtc.dominant_speaker_changed",LASTN_ENDPOINT_CHANGED:"rtc.lastn_endpoint_changed",PERMISSIONS_CHANGED:"rtc.permissions_changed",SENDER_VIDEO_CONSTRAINTS_CHANGED:"rtc.sender_video_constraints_changed",LASTN_VALUE_CHANGED:"rtc.lastn_value_changed",LOCAL_TRACK_SSRC_UPDATED:"rtc.local_track_ssrc_updated",LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED:"rtc.local_track_max_enabled_resolution_changed",TRACK_ATTACHED:"rtc.track_attached",REMOTE_TRACK_ADDED:"rtc.remote_track_added",REMOTE_TRACK_MUTE:"rtc.remote_track_mute",REMOTE_TRACK_REMOVED:"rtc.remote_track_removed",REMOTE_TRACK_UNMUTE:"rtc.remote_track_unmute",SET_LOCAL_DESCRIPTION_FAILED:"rtc.set_local_description_failed",SET_REMOTE_DESCRIPTION_FAILED:"rtc.set_remote_description_failed",AUDIO_OUTPUT_DEVICE_CHANGED:"rtc.audio_output_device_changed",DEVICE_LIST_CHANGED:"rtc.device_list_changed",DEVICE_LIST_WILL_CHANGE:"rtc.device_list_will_change",DEVICE_LIST_AVAILABLE:"rtc.device_list_available",ENDPOINT_MESSAGE_RECEIVED:"rtc.endpoint_message_received",ENDPOINT_STATS_RECEIVED:"rtc.endpoint_stats_received",LOCAL_UFRAG_CHANGED:"rtc.local_ufrag_changed",REMOTE_UFRAG_CHANGED:"rtc.remote_ufrag_changed"}},6125:S=>{S.exports={2160:{width:3840,height:2160},"4k":{width:3840,height:2160},1080:{width:1920,height:1080},fullhd:{width:1920,height:1080},720:{width:1280,height:720},hd:{width:1280,height:720},540:{width:960,height:540},qhd:{width:960,height:540},480:{width:640,height:480},vga:{width:640,height:480},360:{width:640,height:360},240:{width:320,height:240},180:{width:320,height:180}}},1122:S=>{S.exports={CAMERA:"camera",DESKTOP:"desktop"}},3514:S=>{S.exports={IDENTITY_UPDATED:"authentication.identity_updated"}},4806:S=>{S.exports={LOCAL_JID:"local"}},4188:S=>{S.exports={ADD_ICE_CANDIDATE_FAILED:"xmpp.add_ice_candidate_failed",AUDIO_MUTED_BY_FOCUS:"xmpp.audio_muted_by_focus",VIDEO_MUTED_BY_FOCUS:"xmpp.video_muted_by_focus",AUTHENTICATION_REQUIRED:"xmpp.authentication_required",BRIDGE_DOWN:"xmpp.bridge_down",CALL_ACCEPTED:"xmpp.callaccepted.jingle",CALL_INCOMING:"xmpp.callincoming.jingle",CALL_ENDED:"xmpp.callended.jingle",CHAT_ERROR_RECEIVED:"xmpp.chat_error_received",SETTINGS_ERROR_RECEIVED:"xmpp.settings_error_received",CONFERENCE_PROPERTIES_CHANGED:"xmpp.conference_properties_changed",CONNECTION_ESTABLISHED:"xmpp.connection.connected",CONNECTION_FAILED:"xmpp.connection.failed",CONNECTION_INTERRUPTED:"xmpp.connection.interrupted",CONNECTION_RESTORED:"xmpp.connection.restored",CONNECTION_ICE_FAILED:"xmpp.connection.ice.failed",CONNECTION_RESTARTED:"xmpp.connection.restart",CONNECTION_STATUS_CHANGED:"xmpp.connection.status.changed",DISPLAY_NAME_CHANGED:"xmpp.display_name_changed",EMUC_ROOM_ADDED:"xmpp.emuc_room_added",EMUC_ROOM_REMOVED:"xmpp.emuc_room_removed",ETHERPAD:"xmpp.etherpad",FOCUS_DISCONNECTED:"xmpp.focus_disconnected",FOCUS_LEFT:"xmpp.focus_left",GRACEFUL_SHUTDOWN:"xmpp.graceful_shutdown",ICE_RESTARTING:"rtc.ice_restarting",ICE_RESTART_SUCCESS:"rtc.ice_restart_success",KICKED:"xmpp.kicked",LOCAL_ROLE_CHANGED:"xmpp.localrole_changed",MEETING_ID_SET:"xmpp.meeting_id_set",MESSAGE_RECEIVED:"xmpp.message_received",INVITE_MESSAGE_RECEIVED:"xmpp.invite_message_received",PRIVATE_MESSAGE_RECEIVED:"xmpp.private_message_received",MUC_MEMBER_BOT_TYPE_CHANGED:"xmpp.muc_member_bot_type_changed",MUC_DESTROYED:"xmpp.muc_destroyed",MUC_JOIN_IN_PROGRESS:"xmpp.muc_join_in_progress",MUC_JOINED:"xmpp.muc_joined",MUC_MEMBER_JOINED:"xmpp.muc_member_joined",MUC_MEMBER_LEFT:"xmpp.muc_member_left",MUC_LOBBY_MEMBER_JOINED:"xmpp.muc_lobby_member_joined",MUC_LOBBY_MEMBER_UPDATED:"xmpp.muc_lobby_member_updated",MUC_LOBBY_MEMBER_LEFT:"xmpp.muc_lobby_member_left",MUC_DENIED_ACCESS:"xmpp.muc_denied access",MUC_LEFT:"xmpp.muc_left",MUC_ROLE_CHANGED:"xmpp.muc_role_changed",MUC_LOCK_CHANGED:"xmpp.muc_lock_changed",MUC_MEMBERS_ONLY_CHANGED:"xmpp.muc_members_only_changed",PARTICIPANT_AUDIO_MUTED:"xmpp.audio_muted",PARTICIPANT_VIDEO_MUTED:"xmpp.video_muted",PARTICIPANT_VIDEO_TYPE_CHANGED:"xmpp.video_type",PARTICIPANT_FEATURES_CHANGED:"xmpp.participant_features_changed",PASSWORD_REQUIRED:"xmpp.password_required",PHONE_NUMBER_CHANGED:"conference.phoneNumberChanged",PRESENCE_RECEIVED:"xmpp.presence_received",PRESENCE_STATUS:"xmpp.presence_status",PROMPT_FOR_LOGIN:"xmpp.prompt_for_login",READY_TO_JOIN:"xmpp.ready_to_join",RECORDER_STATE_CHANGED:"xmpp.recorderStateChanged",REMOTE_STATS:"xmpp.remote_stats",RENEGOTIATION_FAILED:"xmpp.renegotiation_failed",RESERVATION_ERROR:"xmpp.room_reservation_error",ROOM_CONNECT_ERROR:"xmpp.room_connect_error",ROOM_CONNECT_NOT_ALLOWED_ERROR:"xmpp.room_connect_error.not_allowed",ROOM_JOIN_ERROR:"xmpp.room_join_error",ROOM_CONNECT_MEMBERS_ONLY_ERROR:"xmpp.room_connect_error.members_only",ROOM_MAX_USERS_ERROR:"xmpp.room_max_users_error",SENDING_CHAT_MESSAGE:"xmpp.sending_chat_message",SENDING_PRIVATE_CHAT_MESSAGE:"xmpp.sending_private_chat_message",SESSION_ACCEPT:"xmpp.session_accept",SESSION_ACCEPT_ERROR:"xmpp.session_accept_error",SESSION_ACCEPT_TIMEOUT:"xmpp.session_accept_timeout",SOURCE_ADD:"xmpp.source_add",SOURCE_ADD_ERROR:"xmpp.source_add_error",SOURCE_REMOVE:"xmpp.source_remove",SOURCE_REMOVE_ERROR:"xmpp.source_remove_error",SPEAKER_STATS_RECEIVED:"xmpp.speaker_stats_received",CONFERENCE_TIMESTAMP_RECEIVED:"xmpp.conference_timestamp_received",AV_MODERATION_APPROVED:"xmpp.av_moderation.approved",AV_MODERATION_REJECTED:"xmpp.av_moderation.rejected",AV_MODERATION_RECEIVED:"xmpp.av_moderation.received",AV_MODERATION_CHANGED:"xmpp.av_moderation.changed",AV_MODERATION_PARTICIPANT_APPROVED:"xmpp.av_moderation.participant.approved",AV_MODERATION_PARTICIPANT_REJECTED:"xmpp.av_moderation.participant.rejected",BREAKOUT_ROOMS_MOVE_TO_ROOM:"xmpp.breakout-rooms.move-to-room",BREAKOUT_ROOMS_EVENT:"xmpp.breakout-rooms.event",BREAKOUT_ROOMS_UPDATED:"xmpp.breakout-rooms.updated",START_MUTED_FROM_FOCUS:"xmpp.start_muted_from_focus",SUBJECT_CHANGED:"xmpp.subject_changed",SUSPEND_DETECTED:"xmpp.suspend_detected",TRANSCRIPTION_STATUS_CHANGED:"xmpp.transcription_status_changed",TRANSPORT_INFO:"xmpp.transportinfo.jingle",VIDEO_SIP_GW_AVAILABILITY_CHANGED:"xmpp.videoSIPGWAvailabilityChanged",VIDEO_SIP_GW_SESSION_STATE_CHANGED:"xmpp.videoSIPGWSessionStateChanged",ICE_CONNECTION_STATE_CHANGED:"xmpp.ice_connection_state_changed",JSON_MESSAGE_RECEIVED:"xmmp.json_message_received"}},9742:(S,d)=>{"use strict";d.byteLength=function(g){var A=j(g),I=A[0],O=A[1];return 3*(I+O)/4-O},d.toByteArray=function(g){var A,I,O=j(g),x=O[0],U=O[1],G=new v(function(ue,pe,Me){return 3*(pe+Me)/4-Me}(0,x,U)),P=0,z=U>0?x-4:x;for(I=0;I<z;I+=4)A=l[g.charCodeAt(I)]<<18|l[g.charCodeAt(I+1)]<<12|l[g.charCodeAt(I+2)]<<6|l[g.charCodeAt(I+3)],G[P++]=A>>16&255,G[P++]=A>>8&255,G[P++]=255&A;return U===2&&(A=l[g.charCodeAt(I)]<<2|l[g.charCodeAt(I+1)]>>4,G[P++]=255&A),U===1&&(A=l[g.charCodeAt(I)]<<10|l[g.charCodeAt(I+1)]<<4|l[g.charCodeAt(I+2)]>>2,G[P++]=A>>8&255,G[P++]=255&A),G},d.fromByteArray=function(g){for(var A,I=g.length,O=I%3,x=[],U=16383,G=0,P=I-O;G<P;G+=U)x.push(h(g,G,G+U>P?P:G+U));return O===1?(A=g[I-1],x.push(o[A>>2]+o[A<<4&63]+"==")):O===2&&(A=(g[I-2]<<8)+g[I-1],x.push(o[A>>10]+o[A>>4&63]+o[A<<2&63]+"=")),x.join("")};for(var o=[],l=[],v=typeof Uint8Array!="undefined"?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0;y<64;++y)o[y]=m[y],l[m.charCodeAt(y)]=y;function j(g){var A=g.length;if(A%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=g.indexOf("=");return I===-1&&(I=A),[I,I===A?0:4-I%4]}function h(g,A,I){for(var O,x,U=[],G=A;G<I;G+=3)O=(g[G]<<16&16711680)+(g[G+1]<<8&65280)+(255&g[G+2]),U.push(o[(x=O)>>18&63]+o[x>>12&63]+o[x>>6&63]+o[63&x]);return U.join("")}l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},1206:function(S){S.exports=function(d){var o={};function l(v){if(o[v])return o[v].exports;var m=o[v]={i:v,l:!1,exports:{}};return d[v].call(m.exports,m,m.exports,l),m.l=!0,m.exports}return l.m=d,l.c=o,l.d=function(v,m,y){l.o(v,m)||Object.defineProperty(v,m,{enumerable:!0,get:y})},l.r=function(v){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})},l.t=function(v,m){if(1&m&&(v=l(v)),8&m||4&m&&typeof v=="object"&&v&&v.__esModule)return v;var y=Object.create(null);if(l.r(y),Object.defineProperty(y,"default",{enumerable:!0,value:v}),2&m&&typeof v!="string")for(var j in v)l.d(y,j,function(h){return v[h]}.bind(null,j));return y},l.n=function(v){var m=v&&v.__esModule?function(){return v.default}:function(){return v};return l.d(m,"a",m),m},l.o=function(v,m){return Object.prototype.hasOwnProperty.call(v,m)},l.p="",l(l.s=90)}({17:function(d,o,l){"use strict";o.__esModule=!0,o.default=void 0;var v=l(18),m=function(){function y(){}return y.getFirstMatch=function(j,h){var g=h.match(j);return g&&g.length>0&&g[1]||""},y.getSecondMatch=function(j,h){var g=h.match(j);return g&&g.length>1&&g[2]||""},y.matchAndReturnConst=function(j,h,g){if(j.test(h))return g},y.getWindowsVersionName=function(j){switch(j){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},y.getMacOSVersionName=function(j){var h=j.split(".").splice(0,2).map(function(g){return parseInt(g,10)||0});if(h.push(0),h[0]===10)switch(h[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},y.getAndroidVersionName=function(j){var h=j.split(".").splice(0,2).map(function(g){return parseInt(g,10)||0});if(h.push(0),!(h[0]===1&&h[1]<5))return h[0]===1&&h[1]<6?"Cupcake":h[0]===1&&h[1]>=6?"Donut":h[0]===2&&h[1]<2?"Eclair":h[0]===2&&h[1]===2?"Froyo":h[0]===2&&h[1]>2?"Gingerbread":h[0]===3?"Honeycomb":h[0]===4&&h[1]<1?"Ice Cream Sandwich":h[0]===4&&h[1]<4?"Jelly Bean":h[0]===4&&h[1]>=4?"KitKat":h[0]===5?"Lollipop":h[0]===6?"Marshmallow":h[0]===7?"Nougat":h[0]===8?"Oreo":h[0]===9?"Pie":void 0},y.getVersionPrecision=function(j){return j.split(".").length},y.compareVersions=function(j,h,g){g===void 0&&(g=!1);var A=y.getVersionPrecision(j),I=y.getVersionPrecision(h),O=Math.max(A,I),x=0,U=y.map([j,h],function(G){var P=O-y.getVersionPrecision(G),z=G+new Array(P+1).join(".0");return y.map(z.split("."),function(ue){return new Array(20-ue.length).join("0")+ue}).reverse()});for(g&&(x=O-Math.min(A,I)),O-=1;O>=x;){if(U[0][O]>U[1][O])return 1;if(U[0][O]===U[1][O]){if(O===x)return 0;O-=1}else if(U[0][O]<U[1][O])return-1}},y.map=function(j,h){var g,A=[];if(Array.prototype.map)return Array.prototype.map.call(j,h);for(g=0;g<j.length;g+=1)A.push(h(j[g]));return A},y.getBrowserAlias=function(j){return v.BROWSER_ALIASES_MAP[j]},y.getBrowserTypeByAlias=function(j){return v.BROWSER_MAP[j]||""},y}();o.default=m,d.exports=o.default},18:function(d,o,l){"use strict";o.__esModule=!0,o.ENGINE_MAP=o.OS_MAP=o.PLATFORMS_MAP=o.BROWSER_MAP=o.BROWSER_ALIASES_MAP=void 0,o.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},o.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},o.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},o.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},o.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(d,o,l){"use strict";o.__esModule=!0,o.default=void 0;var v,m=(v=l(91))&&v.__esModule?v:{default:v},y=l(18),j=function(){function h(){}var g;return h.getParser=function(A,I){if(I===void 0&&(I=!1),typeof A!="string")throw new Error("UserAgent should be a string");return new m.default(A,I)},h.parse=function(A){return new m.default(A).getResult()},(g=[{key:"BROWSER_MAP",get:function(){return y.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return y.ENGINE_MAP}},{key:"OS_MAP",get:function(){return y.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return y.PLATFORMS_MAP}}])&&function(A,I){for(var O=0;O<I.length;O++){var x=I[O];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(A,x.key,x)}}(h,g),h}();o.default=j,d.exports=o.default},91:function(d,o,l){"use strict";o.__esModule=!0,o.default=void 0;var v=g(l(92)),m=g(l(93)),y=g(l(94)),j=g(l(95)),h=g(l(17));function g(I){return I&&I.__esModule?I:{default:I}}var A=function(){function I(x,U){if(U===void 0&&(U=!1),x==null||x==="")throw new Error("UserAgent parameter can't be empty");this._ua=x,this.parsedResult={},U!==!0&&this.parse()}var O=I.prototype;return O.getUA=function(){return this._ua},O.test=function(x){return x.test(this._ua)},O.parseBrowser=function(){var x=this;this.parsedResult.browser={};var U=v.default.find(function(G){if(typeof G.test=="function")return G.test(x);if(G.test instanceof Array)return G.test.some(function(P){return x.test(P)});throw new Error("Browser's test function is not valid")});return U&&(this.parsedResult.browser=U.describe(this.getUA())),this.parsedResult.browser},O.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},O.getBrowserName=function(x){return x?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},O.getBrowserVersion=function(){return this.getBrowser().version},O.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},O.parseOS=function(){var x=this;this.parsedResult.os={};var U=m.default.find(function(G){if(typeof G.test=="function")return G.test(x);if(G.test instanceof Array)return G.test.some(function(P){return x.test(P)});throw new Error("Browser's test function is not valid")});return U&&(this.parsedResult.os=U.describe(this.getUA())),this.parsedResult.os},O.getOSName=function(x){var U=this.getOS().name;return x?String(U).toLowerCase()||"":U||""},O.getOSVersion=function(){return this.getOS().version},O.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},O.getPlatformType=function(x){x===void 0&&(x=!1);var U=this.getPlatform().type;return x?String(U).toLowerCase()||"":U||""},O.parsePlatform=function(){var x=this;this.parsedResult.platform={};var U=y.default.find(function(G){if(typeof G.test=="function")return G.test(x);if(G.test instanceof Array)return G.test.some(function(P){return x.test(P)});throw new Error("Browser's test function is not valid")});return U&&(this.parsedResult.platform=U.describe(this.getUA())),this.parsedResult.platform},O.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},O.getEngineName=function(x){return x?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},O.parseEngine=function(){var x=this;this.parsedResult.engine={};var U=j.default.find(function(G){if(typeof G.test=="function")return G.test(x);if(G.test instanceof Array)return G.test.some(function(P){return x.test(P)});throw new Error("Browser's test function is not valid")});return U&&(this.parsedResult.engine=U.describe(this.getUA())),this.parsedResult.engine},O.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},O.getResult=function(){return Object.assign({},this.parsedResult)},O.satisfies=function(x){var U=this,G={},P=0,z={},ue=0;if(Object.keys(x).forEach(function(st){var _e=x[st];typeof _e=="string"?(z[st]=_e,ue+=1):typeof _e=="object"&&(G[st]=_e,P+=1)}),P>0){var pe=Object.keys(G),Me=pe.find(function(st){return U.isOS(st)});if(Me){var rt=this.satisfies(G[Me]);if(rt!==void 0)return rt}var be=pe.find(function(st){return U.isPlatform(st)});if(be){var Te=this.satisfies(G[be]);if(Te!==void 0)return Te}}if(ue>0){var C=Object.keys(z).find(function(st){return U.isBrowser(st,!0)});if(C!==void 0)return this.compareVersion(z[C])}},O.isBrowser=function(x,U){U===void 0&&(U=!1);var G=this.getBrowserName().toLowerCase(),P=x.toLowerCase(),z=h.default.getBrowserTypeByAlias(P);return U&&z&&(P=z.toLowerCase()),P===G},O.compareVersion=function(x){var U=[0],G=x,P=!1,z=this.getBrowserVersion();if(typeof z=="string")return x[0]===">"||x[0]==="<"?(G=x.substr(1),x[1]==="="?(P=!0,G=x.substr(2)):U=[],x[0]===">"?U.push(1):U.push(-1)):x[0]==="="?G=x.substr(1):x[0]==="~"&&(P=!0,G=x.substr(1)),U.indexOf(h.default.compareVersions(z,G,P))>-1},O.isOS=function(x){return this.getOSName(!0)===String(x).toLowerCase()},O.isPlatform=function(x){return this.getPlatformType(!0)===String(x).toLowerCase()},O.isEngine=function(x){return this.getEngineName(!0)===String(x).toLowerCase()},O.is=function(x){return this.isBrowser(x)||this.isOS(x)||this.isPlatform(x)},O.some=function(x){var U=this;return x===void 0&&(x=[]),x.some(function(G){return U.is(G)})},I}();o.default=A,d.exports=o.default},92:function(d,o,l){"use strict";o.__esModule=!0,o.default=void 0;var v,m=(v=l(17))&&v.__esModule?v:{default:v},y=/version\/(\d+(\.?_?\d+)+)/i,j=[{test:[/googlebot/i],describe:function(h){var g={name:"Googlebot"},A=m.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/opera/i],describe:function(h){var g={name:"Opera"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/opr\/|opios/i],describe:function(h){var g={name:"Opera"},A=m.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/SamsungBrowser/i],describe:function(h){var g={name:"Samsung Internet for Android"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/Whale/i],describe:function(h){var g={name:"NAVER Whale Browser"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/MZBrowser/i],describe:function(h){var g={name:"MZ Browser"},A=m.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/focus/i],describe:function(h){var g={name:"Focus"},A=m.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/swing/i],describe:function(h){var g={name:"Swing"},A=m.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/coast/i],describe:function(h){var g={name:"Opera Coast"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/yabrowser/i],describe:function(h){var g={name:"Yandex Browser"},A=m.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/ucbrowser/i],describe:function(h){var g={name:"UC Browser"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/Maxthon|mxios/i],describe:function(h){var g={name:"Maxthon"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/epiphany/i],describe:function(h){var g={name:"Epiphany"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/puffin/i],describe:function(h){var g={name:"Puffin"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/sleipnir/i],describe:function(h){var g={name:"Sleipnir"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/k-meleon/i],describe:function(h){var g={name:"K-Meleon"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/micromessenger/i],describe:function(h){var g={name:"WeChat"},A=m.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/qqbrowser/i],describe:function(h){var g={name:/qqbrowserlite/i.test(h)?"QQ Browser Lite":"QQ Browser"},A=m.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/msie|trident/i],describe:function(h){var g={name:"Internet Explorer"},A=m.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/\sedg\//i],describe:function(h){var g={name:"Microsoft Edge"},A=m.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/edg([ea]|ios)/i],describe:function(h){var g={name:"Microsoft Edge"},A=m.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/vivaldi/i],describe:function(h){var g={name:"Vivaldi"},A=m.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/seamonkey/i],describe:function(h){var g={name:"SeaMonkey"},A=m.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/sailfish/i],describe:function(h){var g={name:"Sailfish"},A=m.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,h);return A&&(g.version=A),g}},{test:[/silk/i],describe:function(h){var g={name:"Amazon Silk"},A=m.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/phantom/i],describe:function(h){var g={name:"PhantomJS"},A=m.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/slimerjs/i],describe:function(h){var g={name:"SlimerJS"},A=m.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(h){var g={name:"BlackBerry"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/(web|hpw)[o0]s/i],describe:function(h){var g={name:"WebOS Browser"},A=m.default.getFirstMatch(y,h)||m.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/bada/i],describe:function(h){var g={name:"Bada"},A=m.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/tizen/i],describe:function(h){var g={name:"Tizen"},A=m.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/qupzilla/i],describe:function(h){var g={name:"QupZilla"},A=m.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/firefox|iceweasel|fxios/i],describe:function(h){var g={name:"Firefox"},A=m.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/chromium/i],describe:function(h){var g={name:"Chromium"},A=m.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,h)||m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/chrome|crios|crmo/i],describe:function(h){var g={name:"Chrome"},A=m.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/GSA/i],describe:function(h){var g={name:"Google Search"},A=m.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:function(h){var g=!h.test(/like android/i),A=h.test(/android/i);return g&&A},describe:function(h){var g={name:"Android Browser"},A=m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/playstation 4/i],describe:function(h){var g={name:"PlayStation 4"},A=m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/safari|applewebkit/i],describe:function(h){var g={name:"Safari"},A=m.default.getFirstMatch(y,h);return A&&(g.version=A),g}},{test:[/.*/i],describe:function(h){var g=h.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:m.default.getFirstMatch(g,h),version:m.default.getSecondMatch(g,h)}}}];o.default=j,d.exports=o.default},93:function(d,o,l){"use strict";o.__esModule=!0,o.default=void 0;var v,m=(v=l(17))&&v.__esModule?v:{default:v},y=l(18),j=[{test:[/Roku\/DVP/],describe:function(h){var g=m.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,h);return{name:y.OS_MAP.Roku,version:g}}},{test:[/windows phone/i],describe:function(h){var g=m.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,h);return{name:y.OS_MAP.WindowsPhone,version:g}}},{test:[/windows/i],describe:function(h){var g=m.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,h),A=m.default.getWindowsVersionName(g);return{name:y.OS_MAP.Windows,version:g,versionName:A}}},{test:[/macintosh/i],describe:function(h){var g=m.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,h).replace(/[_\s]/g,"."),A=m.default.getMacOSVersionName(g),I={name:y.OS_MAP.MacOS,version:g};return A&&(I.versionName=A),I}},{test:[/(ipod|iphone|ipad)/i],describe:function(h){var g=m.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,h).replace(/[_\s]/g,".");return{name:y.OS_MAP.iOS,version:g}}},{test:function(h){var g=!h.test(/like android/i),A=h.test(/android/i);return g&&A},describe:function(h){var g=m.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,h),A=m.default.getAndroidVersionName(g),I={name:y.OS_MAP.Android,version:g};return A&&(I.versionName=A),I}},{test:[/(web|hpw)[o0]s/i],describe:function(h){var g=m.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,h),A={name:y.OS_MAP.WebOS};return g&&g.length&&(A.version=g),A}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(h){var g=m.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,h)||m.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,h)||m.default.getFirstMatch(/\bbb(\d+)/i,h);return{name:y.OS_MAP.BlackBerry,version:g}}},{test:[/bada/i],describe:function(h){var g=m.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,h);return{name:y.OS_MAP.Bada,version:g}}},{test:[/tizen/i],describe:function(h){var g=m.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,h);return{name:y.OS_MAP.Tizen,version:g}}},{test:[/linux/i],describe:function(){return{name:y.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:y.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(h){var g=m.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,h);return{name:y.OS_MAP.PlayStation4,version:g}}}];o.default=j,d.exports=o.default},94:function(d,o,l){"use strict";o.__esModule=!0,o.default=void 0;var v,m=(v=l(17))&&v.__esModule?v:{default:v},y=l(18),j=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(h){var g=m.default.getFirstMatch(/(can-l01)/i,h)&&"Nova",A={type:y.PLATFORMS_MAP.mobile,vendor:"Huawei"};return g&&(A.model=g),A}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:y.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:y.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:y.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:y.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:y.PLATFORMS_MAP.tablet}}},{test:function(h){var g=h.test(/ipod|iphone/i),A=h.test(/like (ipod|iphone)/i);return g&&!A},describe:function(h){var g=m.default.getFirstMatch(/(ipod|iphone)/i,h);return{type:y.PLATFORMS_MAP.mobile,vendor:"Apple",model:g}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:y.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:y.PLATFORMS_MAP.mobile}}},{test:function(h){return h.getBrowserName(!0)==="blackberry"},describe:function(){return{type:y.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(h){return h.getBrowserName(!0)==="bada"},describe:function(){return{type:y.PLATFORMS_MAP.mobile}}},{test:function(h){return h.getBrowserName()==="windows phone"},describe:function(){return{type:y.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(h){var g=Number(String(h.getOSVersion()).split(".")[0]);return h.getOSName(!0)==="android"&&g>=3},describe:function(){return{type:y.PLATFORMS_MAP.tablet}}},{test:function(h){return h.getOSName(!0)==="android"},describe:function(){return{type:y.PLATFORMS_MAP.mobile}}},{test:function(h){return h.getOSName(!0)==="macos"},describe:function(){return{type:y.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(h){return h.getOSName(!0)==="windows"},describe:function(){return{type:y.PLATFORMS_MAP.desktop}}},{test:function(h){return h.getOSName(!0)==="linux"},describe:function(){return{type:y.PLATFORMS_MAP.desktop}}},{test:function(h){return h.getOSName(!0)==="playstation 4"},describe:function(){return{type:y.PLATFORMS_MAP.tv}}},{test:function(h){return h.getOSName(!0)==="roku"},describe:function(){return{type:y.PLATFORMS_MAP.tv}}}];o.default=j,d.exports=o.default},95:function(d,o,l){"use strict";o.__esModule=!0,o.default=void 0;var v,m=(v=l(17))&&v.__esModule?v:{default:v},y=l(18),j=[{test:function(h){return h.getBrowserName(!0)==="microsoft edge"},describe:function(h){if(/\sedg\//i.test(h))return{name:y.ENGINE_MAP.Blink};var g=m.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,h);return{name:y.ENGINE_MAP.EdgeHTML,version:g}}},{test:[/trident/i],describe:function(h){var g={name:y.ENGINE_MAP.Trident},A=m.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:function(h){return h.test(/presto/i)},describe:function(h){var g={name:y.ENGINE_MAP.Presto},A=m.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:function(h){var g=h.test(/gecko/i),A=h.test(/like gecko/i);return g&&!A},describe:function(h){var g={name:y.ENGINE_MAP.Gecko},A=m.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:y.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(h){var g={name:y.ENGINE_MAP.WebKit},A=m.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,h);return A&&(g.version=A),g}}];o.default=j,d.exports=o.default}})},667:function(S,d){var o,l;(l=typeof(o=function(){var v=/^(interactive|loaded|complete)$/,m=window.location?window.location.href:null,y=m&&m.replace(/#.*$/,"").replace(/\?.*$/,"")||null,j=document.getElementsByTagName("script"),h="readyState"in(j[0]||document.createElement("script")),g=!window.opera||window.opera.toString()!=="[object Opera]",A="currentScript"in document;"stackTraceLimit"in Error&&Error.stackTraceLimit!==1/0&&(Error.stackTraceLimit,Error.stackTraceLimit=1/0);var I=!1,O=!1;function x(P,z){var ue,pe=null,Me=typeof z=="number";return z=Me?Math.round(z):0,typeof P=="string"&&P&&(Me?ue=P.match(/(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/):(ue=P.match(/^(?:|[^:@]*@|.+\)@(?=data:text\/javascript|blob|http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/))&&ue[1]||(ue=P.match(/\)@(data:text\/javascript(?:;[^,]+)?,.+?|(?:|blob:)(?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/)),ue&&ue[1]&&(pe=z>0?x(P.slice(P.indexOf(ue[0])+ue[0].length),z-1):ue[1])),pe}function U(){if(j.length===0)return null;var P,z,ue,pe,Me,rt=[],be=U.skipStackDepth||1;for(P=0;P<j.length;P++)g&&h?v.test(j[P].readyState)&&rt.push(j[P]):rt.push(j[P]);if(z=new Error,I&&(ue=z.stack),!ue&&O)try{throw z}catch(Te){ue=Te.stack}if(ue&&!(Me=function(Te,C){var st,_e=null;if(C=C||j,typeof Te=="string"&&Te){for(st=C.length;st--;)if(C[st].src===Te){_e=C[st];break}}return _e}(pe=x(ue,be),rt))&&y&&pe===y&&(Me=function(Te){var C,st,_e=null;for(C=0,st=(Te=Te||j).length;C<st;C++)if(!Te[C].hasAttribute("src")){if(_e){_e=null;break}_e=Te[C]}return _e}(rt)),Me||rt.length===1&&(Me=rt[0]),Me||A&&(Me=document.currentScript),!Me&&g&&h){for(P=rt.length;P--;)if(rt[P].readyState==="interactive"){Me=rt[P];break}}return Me||(Me=rt[rt.length-1]||null),Me}(function(){try{var P=new Error;throw I=typeof P.stack=="string"&&!!P.stack,P}catch(z){O=typeof z.stack=="string"&&!!z.stack}})(),U.skipStackDepth=1;var G=U;return G.near=U,G.far=function(){return null},G.origin=function(){return null},G})=="function"?o.apply(d,[]):o)===void 0||(S.exports=l)},7187:S=>{"use strict";var d,o=typeof Reflect=="object"?Reflect:null,l=o&&typeof o.apply=="function"?o.apply:function(P,z,ue){return Function.prototype.apply.call(P,z,ue)};d=o&&typeof o.ownKeys=="function"?o.ownKeys:Object.getOwnPropertySymbols?function(P){return Object.getOwnPropertyNames(P).concat(Object.getOwnPropertySymbols(P))}:function(P){return Object.getOwnPropertyNames(P)};var v=Number.isNaN||function(P){return P!=P};function m(){m.init.call(this)}S.exports=m,S.exports.once=function(P,z){return new Promise(function(ue,pe){function Me(be){P.removeListener(z,rt),pe(be)}function rt(){typeof P.removeListener=="function"&&P.removeListener("error",Me),ue([].slice.call(arguments))}G(P,z,rt,{once:!0}),z!=="error"&&function(be,Te,C){typeof be.on=="function"&&G(be,"error",Te,{once:!0})}(P,Me)})},m.EventEmitter=m,m.prototype._events=void 0,m.prototype._eventsCount=0,m.prototype._maxListeners=void 0;var y=10;function j(P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}function h(P){return P._maxListeners===void 0?m.defaultMaxListeners:P._maxListeners}function g(P,z,ue,pe){var Me,rt,be;if(j(ue),(rt=P._events)===void 0?(rt=P._events=Object.create(null),P._eventsCount=0):(rt.newListener!==void 0&&(P.emit("newListener",z,ue.listener?ue.listener:ue),rt=P._events),be=rt[z]),be===void 0)be=rt[z]=ue,++P._eventsCount;else if(typeof be=="function"?be=rt[z]=pe?[ue,be]:[be,ue]:pe?be.unshift(ue):be.push(ue),(Me=h(P))>0&&be.length>Me&&!be.warned){be.warned=!0;var Te=new Error("Possible EventEmitter memory leak detected. "+be.length+" "+String(z)+" listeners added. Use emitter.setMaxListeners() to increase limit");Te.name="MaxListenersExceededWarning",Te.emitter=P,Te.type=z,Te.count=be.length}return P}function A(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function I(P,z,ue){var pe={fired:!1,wrapFn:void 0,target:P,type:z,listener:ue},Me=A.bind(pe);return Me.listener=ue,pe.wrapFn=Me,Me}function O(P,z,ue){var pe=P._events;if(pe===void 0)return[];var Me=pe[z];return Me===void 0?[]:typeof Me=="function"?ue?[Me.listener||Me]:[Me]:ue?function(rt){for(var be=new Array(rt.length),Te=0;Te<be.length;++Te)be[Te]=rt[Te].listener||rt[Te];return be}(Me):U(Me,Me.length)}function x(P){var z=this._events;if(z!==void 0){var ue=z[P];if(typeof ue=="function")return 1;if(ue!==void 0)return ue.length}return 0}function U(P,z){for(var ue=new Array(z),pe=0;pe<z;++pe)ue[pe]=P[pe];return ue}function G(P,z,ue,pe){if(typeof P.on=="function")pe.once?P.once(z,ue):P.on(z,ue);else{if(typeof P.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof P);P.addEventListener(z,function Me(rt){pe.once&&P.removeEventListener(z,Me),ue(rt)})}}Object.defineProperty(m,"defaultMaxListeners",{enumerable:!0,get:function(){return y},set:function(P){if(typeof P!="number"||P<0||v(P))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+P+".");y=P}}),m.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},m.prototype.setMaxListeners=function(P){if(typeof P!="number"||P<0||v(P))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+P+".");return this._maxListeners=P,this},m.prototype.getMaxListeners=function(){return h(this)},m.prototype.emit=function(P){for(var z=[],ue=1;ue<arguments.length;ue++)z.push(arguments[ue]);var pe=P==="error",Me=this._events;if(Me!==void 0)pe=pe&&Me.error===void 0;else if(!pe)return!1;if(pe){var rt;if(z.length>0&&(rt=z[0]),rt instanceof Error)throw rt;var be=new Error("Unhandled error."+(rt?" ("+rt.message+")":""));throw be.context=rt,be}var Te=Me[P];if(Te===void 0)return!1;if(typeof Te=="function")l(Te,this,z);else{var C=Te.length,st=U(Te,C);for(ue=0;ue<C;++ue)l(st[ue],this,z)}return!0},m.prototype.addListener=function(P,z){return g(this,P,z,!1)},m.prototype.on=m.prototype.addListener,m.prototype.prependListener=function(P,z){return g(this,P,z,!0)},m.prototype.once=function(P,z){return j(z),this.on(P,I(this,P,z)),this},m.prototype.prependOnceListener=function(P,z){return j(z),this.prependListener(P,I(this,P,z)),this},m.prototype.removeListener=function(P,z){var ue,pe,Me,rt,be;if(j(z),(pe=this._events)===void 0)return this;if((ue=pe[P])===void 0)return this;if(ue===z||ue.listener===z)--this._eventsCount==0?this._events=Object.create(null):(delete pe[P],pe.removeListener&&this.emit("removeListener",P,ue.listener||z));else if(typeof ue!="function"){for(Me=-1,rt=ue.length-1;rt>=0;rt--)if(ue[rt]===z||ue[rt].listener===z){be=ue[rt].listener,Me=rt;break}if(Me<0)return this;Me===0?ue.shift():function(Te,C){for(;C+1<Te.length;C++)Te[C]=Te[C+1];Te.pop()}(ue,Me),ue.length===1&&(pe[P]=ue[0]),pe.removeListener!==void 0&&this.emit("removeListener",P,be||z)}return this},m.prototype.off=m.prototype.removeListener,m.prototype.removeAllListeners=function(P){var z,ue,pe;if((ue=this._events)===void 0)return this;if(ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ue[P]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete ue[P]),this;if(arguments.length===0){var Me,rt=Object.keys(ue);for(pe=0;pe<rt.length;++pe)(Me=rt[pe])!=="removeListener"&&this.removeAllListeners(Me);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(z=ue[P])=="function")this.removeListener(P,z);else if(z!==void 0)for(pe=z.length-1;pe>=0;pe--)this.removeListener(P,z[pe]);return this},m.prototype.listeners=function(P){return O(this,P,!0)},m.prototype.rawListeners=function(P){return O(this,P,!1)},m.listenerCount=function(P,z){return typeof P.listenerCount=="function"?P.listenerCount(z):x.call(P,z)},m.prototype.listenerCount=x,m.prototype.eventNames=function(){return this._eventsCount>0?d(this._events):[]}},8495:(module,exports,__nested_webpack_require_91364__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_MD5_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=__nested_webpack_require_91364__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&module.exports,AMD=__nested_webpack_require_91364__.amdO,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(S){return Object.prototype.toString.call(S)==="[object Array]"}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(S){return typeof S=="object"&&S.buffer&&S.buffer.constructor===ArrayBuffer});var createOutputMethod=function(S){return function(d){return new Md5(!0).update(d)[S]()}},createMethod=function(){var S=createOutputMethod("hex");NODE_JS&&(S=nodeWrap(S)),S.create=function(){return new Md5},S.update=function(l){return S.create().update(l)};for(var d=0;d<OUTPUT_TYPES.length;++d){var o=OUTPUT_TYPES[d];S[o]=createOutputMethod(o)}return S},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(S){if(typeof S=="string")return crypto.createHash("md5").update(S,"utf8").digest("hex");if(S==null)throw ERROR;return S.constructor===ArrayBuffer&&(S=new Uint8Array(S)),Array.isArray(S)||ArrayBuffer.isView(S)||S.constructor===Buffer?crypto.createHash("md5").update(new Buffer(S)).digest("hex"):method(S)};return nodeMethod};function Md5(S){if(S)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var d=new ArrayBuffer(68);this.buffer8=new Uint8Array(d),this.blocks=new Uint32Array(d)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(S){if(!this.finalized){var d,o=typeof S;if(o!=="string"){if(o!=="object"||S===null)throw ERROR;if(ARRAY_BUFFER&&S.constructor===ArrayBuffer)S=new Uint8Array(S);else if(!(Array.isArray(S)||ARRAY_BUFFER&&ArrayBuffer.isView(S)))throw ERROR;d=!0}for(var l,v,m=0,y=S.length,j=this.blocks,h=this.buffer8;m<y;){if(this.hashed&&(this.hashed=!1,j[0]=j[16],j[16]=j[1]=j[2]=j[3]=j[4]=j[5]=j[6]=j[7]=j[8]=j[9]=j[10]=j[11]=j[12]=j[13]=j[14]=j[15]=0),d)if(ARRAY_BUFFER)for(v=this.start;m<y&&v<64;++m)h[v++]=S[m];else for(v=this.start;m<y&&v<64;++m)j[v>>2]|=S[m]<<SHIFT[3&v++];else if(ARRAY_BUFFER)for(v=this.start;m<y&&v<64;++m)(l=S.charCodeAt(m))<128?h[v++]=l:l<2048?(h[v++]=192|l>>6,h[v++]=128|63&l):l<55296||l>=57344?(h[v++]=224|l>>12,h[v++]=128|l>>6&63,h[v++]=128|63&l):(l=65536+((1023&l)<<10|1023&S.charCodeAt(++m)),h[v++]=240|l>>18,h[v++]=128|l>>12&63,h[v++]=128|l>>6&63,h[v++]=128|63&l);else for(v=this.start;m<y&&v<64;++m)(l=S.charCodeAt(m))<128?j[v>>2]|=l<<SHIFT[3&v++]:l<2048?(j[v>>2]|=(192|l>>6)<<SHIFT[3&v++],j[v>>2]|=(128|63&l)<<SHIFT[3&v++]):l<55296||l>=57344?(j[v>>2]|=(224|l>>12)<<SHIFT[3&v++],j[v>>2]|=(128|l>>6&63)<<SHIFT[3&v++],j[v>>2]|=(128|63&l)<<SHIFT[3&v++]):(l=65536+((1023&l)<<10|1023&S.charCodeAt(++m)),j[v>>2]|=(240|l>>18)<<SHIFT[3&v++],j[v>>2]|=(128|l>>12&63)<<SHIFT[3&v++],j[v>>2]|=(128|l>>6&63)<<SHIFT[3&v++],j[v>>2]|=(128|63&l)<<SHIFT[3&v++]);this.lastByteIndex=v,this.bytes+=v-this.start,v>=64?(this.start=v-64,this.hash(),this.hashed=!0):this.start=v}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var S=this.blocks,d=this.lastByteIndex;S[d>>2]|=EXTRA[3&d],d>=56&&(this.hashed||this.hash(),S[0]=S[16],S[16]=S[1]=S[2]=S[3]=S[4]=S[5]=S[6]=S[7]=S[8]=S[9]=S[10]=S[11]=S[12]=S[13]=S[14]=S[15]=0),S[14]=this.bytes<<3,S[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var S,d,o,l,v,m,y=this.blocks;this.first?d=((d=((S=((S=y[0]-680876937)<<7|S>>>25)-271733879<<0)^(o=((o=(-271733879^(l=((l=(-1732584194^2004318071&S)+y[1]-117830708)<<12|l>>>20)+S<<0)&(-271733879^S))+y[2]-1126478375)<<17|o>>>15)+l<<0)&(l^S))+y[3]-1316259209)<<22|d>>>10)+o<<0:(S=this.h0,d=this.h1,o=this.h2,d=((d+=((S=((S+=((l=this.h3)^d&(o^l))+y[0]-680876936)<<7|S>>>25)+d<<0)^(o=((o+=(d^(l=((l+=(o^S&(d^o))+y[1]-389564586)<<12|l>>>20)+S<<0)&(S^d))+y[2]+606105819)<<17|o>>>15)+l<<0)&(l^S))+y[3]-1044525330)<<22|d>>>10)+o<<0),d=((d+=((S=((S+=(l^d&(o^l))+y[4]-176418897)<<7|S>>>25)+d<<0)^(o=((o+=(d^(l=((l+=(o^S&(d^o))+y[5]+1200080426)<<12|l>>>20)+S<<0)&(S^d))+y[6]-1473231341)<<17|o>>>15)+l<<0)&(l^S))+y[7]-45705983)<<22|d>>>10)+o<<0,d=((d+=((S=((S+=(l^d&(o^l))+y[8]+1770035416)<<7|S>>>25)+d<<0)^(o=((o+=(d^(l=((l+=(o^S&(d^o))+y[9]-1958414417)<<12|l>>>20)+S<<0)&(S^d))+y[10]-42063)<<17|o>>>15)+l<<0)&(l^S))+y[11]-1990404162)<<22|d>>>10)+o<<0,d=((d+=((S=((S+=(l^d&(o^l))+y[12]+1804603682)<<7|S>>>25)+d<<0)^(o=((o+=(d^(l=((l+=(o^S&(d^o))+y[13]-40341101)<<12|l>>>20)+S<<0)&(S^d))+y[14]-1502002290)<<17|o>>>15)+l<<0)&(l^S))+y[15]+1236535329)<<22|d>>>10)+o<<0,d=((d+=((l=((l+=(d^o&((S=((S+=(o^l&(d^o))+y[1]-165796510)<<5|S>>>27)+d<<0)^d))+y[6]-1069501632)<<9|l>>>23)+S<<0)^S&((o=((o+=(S^d&(l^S))+y[11]+643717713)<<14|o>>>18)+l<<0)^l))+y[0]-373897302)<<20|d>>>12)+o<<0,d=((d+=((l=((l+=(d^o&((S=((S+=(o^l&(d^o))+y[5]-701558691)<<5|S>>>27)+d<<0)^d))+y[10]+38016083)<<9|l>>>23)+S<<0)^S&((o=((o+=(S^d&(l^S))+y[15]-660478335)<<14|o>>>18)+l<<0)^l))+y[4]-405537848)<<20|d>>>12)+o<<0,d=((d+=((l=((l+=(d^o&((S=((S+=(o^l&(d^o))+y[9]+568446438)<<5|S>>>27)+d<<0)^d))+y[14]-1019803690)<<9|l>>>23)+S<<0)^S&((o=((o+=(S^d&(l^S))+y[3]-187363961)<<14|o>>>18)+l<<0)^l))+y[8]+1163531501)<<20|d>>>12)+o<<0,d=((d+=((l=((l+=(d^o&((S=((S+=(o^l&(d^o))+y[13]-1444681467)<<5|S>>>27)+d<<0)^d))+y[2]-51403784)<<9|l>>>23)+S<<0)^S&((o=((o+=(S^d&(l^S))+y[7]+1735328473)<<14|o>>>18)+l<<0)^l))+y[12]-1926607734)<<20|d>>>12)+o<<0,d=((d+=((m=(l=((l+=((v=d^o)^(S=((S+=(v^l)+y[5]-378558)<<4|S>>>28)+d<<0))+y[8]-2022574463)<<11|l>>>21)+S<<0)^S)^(o=((o+=(m^d)+y[11]+1839030562)<<16|o>>>16)+l<<0))+y[14]-35309556)<<23|d>>>9)+o<<0,d=((d+=((m=(l=((l+=((v=d^o)^(S=((S+=(v^l)+y[1]-1530992060)<<4|S>>>28)+d<<0))+y[4]+1272893353)<<11|l>>>21)+S<<0)^S)^(o=((o+=(m^d)+y[7]-155497632)<<16|o>>>16)+l<<0))+y[10]-1094730640)<<23|d>>>9)+o<<0,d=((d+=((m=(l=((l+=((v=d^o)^(S=((S+=(v^l)+y[13]+681279174)<<4|S>>>28)+d<<0))+y[0]-358537222)<<11|l>>>21)+S<<0)^S)^(o=((o+=(m^d)+y[3]-722521979)<<16|o>>>16)+l<<0))+y[6]+76029189)<<23|d>>>9)+o<<0,d=((d+=((m=(l=((l+=((v=d^o)^(S=((S+=(v^l)+y[9]-640364487)<<4|S>>>28)+d<<0))+y[12]-421815835)<<11|l>>>21)+S<<0)^S)^(o=((o+=(m^d)+y[15]+530742520)<<16|o>>>16)+l<<0))+y[2]-995338651)<<23|d>>>9)+o<<0,d=((d+=((l=((l+=(d^((S=((S+=(o^(d|~l))+y[0]-198630844)<<6|S>>>26)+d<<0)|~o))+y[7]+1126891415)<<10|l>>>22)+S<<0)^((o=((o+=(S^(l|~d))+y[14]-1416354905)<<15|o>>>17)+l<<0)|~S))+y[5]-57434055)<<21|d>>>11)+o<<0,d=((d+=((l=((l+=(d^((S=((S+=(o^(d|~l))+y[12]+1700485571)<<6|S>>>26)+d<<0)|~o))+y[3]-1894986606)<<10|l>>>22)+S<<0)^((o=((o+=(S^(l|~d))+y[10]-1051523)<<15|o>>>17)+l<<0)|~S))+y[1]-2054922799)<<21|d>>>11)+o<<0,d=((d+=((l=((l+=(d^((S=((S+=(o^(d|~l))+y[8]+1873313359)<<6|S>>>26)+d<<0)|~o))+y[15]-30611744)<<10|l>>>22)+S<<0)^((o=((o+=(S^(l|~d))+y[6]-1560198380)<<15|o>>>17)+l<<0)|~S))+y[13]+1309151649)<<21|d>>>11)+o<<0,d=((d+=((l=((l+=(d^((S=((S+=(o^(d|~l))+y[4]-145523070)<<6|S>>>26)+d<<0)|~o))+y[11]-1120210379)<<10|l>>>22)+S<<0)^((o=((o+=(S^(l|~d))+y[2]+718787259)<<15|o>>>17)+l<<0)|~S))+y[9]-343485551)<<21|d>>>11)+o<<0,this.first?(this.h0=S+1732584193<<0,this.h1=d-271733879<<0,this.h2=o-1732584194<<0,this.h3=l+271733878<<0,this.first=!1):(this.h0=this.h0+S<<0,this.h1=this.h1+d<<0,this.h2=this.h2+o<<0,this.h3=this.h3+l<<0)},Md5.prototype.hex=function(){this.finalize();var S=this.h0,d=this.h1,o=this.h2,l=this.h3;return HEX_CHARS[S>>4&15]+HEX_CHARS[15&S]+HEX_CHARS[S>>12&15]+HEX_CHARS[S>>8&15]+HEX_CHARS[S>>20&15]+HEX_CHARS[S>>16&15]+HEX_CHARS[S>>28&15]+HEX_CHARS[S>>24&15]+HEX_CHARS[d>>4&15]+HEX_CHARS[15&d]+HEX_CHARS[d>>12&15]+HEX_CHARS[d>>8&15]+HEX_CHARS[d>>20&15]+HEX_CHARS[d>>16&15]+HEX_CHARS[d>>28&15]+HEX_CHARS[d>>24&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[l>>4&15]+HEX_CHARS[15&l]+HEX_CHARS[l>>12&15]+HEX_CHARS[l>>8&15]+HEX_CHARS[l>>20&15]+HEX_CHARS[l>>16&15]+HEX_CHARS[l>>28&15]+HEX_CHARS[l>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var S=this.h0,d=this.h1,o=this.h2,l=this.h3;return[255&S,S>>8&255,S>>16&255,S>>24&255,255&d,d>>8&255,d>>16&255,d>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255,255&l,l>>8&255,l>>16&255,l>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var S=new ArrayBuffer(16),d=new Uint32Array(S);return d[0]=this.h0,d[1]=this.h1,d[2]=this.h2,d[3]=this.h3,S},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var S,d,o,l="",v=this.array(),m=0;m<15;)S=v[m++],d=v[m++],o=v[m++],l+=BASE64_ENCODE_CHAR[S>>>2]+BASE64_ENCODE_CHAR[63&(S<<4|d>>>4)]+BASE64_ENCODE_CHAR[63&(d<<2|o>>>6)]+BASE64_ENCODE_CHAR[63&o];return S=v[m],l+(BASE64_ENCODE_CHAR[S>>>2]+BASE64_ENCODE_CHAR[S<<4&63]+"==")};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__nested_webpack_require_91364__,exports,module),__WEBPACK_AMD_DEFINE_RESULT__===void 0||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},3465:(S,d,o)=>{S=o.nmd(S);var l="__lodash_hash_undefined__",v=9007199254740991,m="[object Arguments]",y="[object Boolean]",j="[object Date]",h="[object Function]",g="[object GeneratorFunction]",A="[object Map]",I="[object Number]",O="[object Object]",x="[object Promise]",U="[object RegExp]",G="[object Set]",P="[object String]",z="[object Symbol]",ue="[object WeakMap]",pe="[object ArrayBuffer]",Me="[object DataView]",rt="[object Float32Array]",be="[object Float64Array]",Te="[object Int8Array]",C="[object Int16Array]",st="[object Int32Array]",_e="[object Uint8Array]",Oe="[object Uint8ClampedArray]",Ye="[object Uint16Array]",ne="[object Uint32Array]",Ze=/\w*$/,xe=/^\[object .+?Constructor\]$/,ct=/^(?:0|[1-9]\d*)$/,Qe={};Qe[m]=Qe["[object Array]"]=Qe[pe]=Qe[Me]=Qe[y]=Qe[j]=Qe[rt]=Qe[be]=Qe[Te]=Qe[C]=Qe[st]=Qe[A]=Qe[I]=Qe[O]=Qe[U]=Qe[G]=Qe[P]=Qe[z]=Qe[_e]=Qe[Oe]=Qe[Ye]=Qe[ne]=!0,Qe["[object Error]"]=Qe[h]=Qe[ue]=!1;var re=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,f=typeof self=="object"&&self&&self.Object===Object&&self,D=re||f||Function("return this")(),H=d&&!d.nodeType&&d,q=H&&S&&!S.nodeType&&S,he=q&&q.exports===H;function Ae(Pe,tt){return Pe.set(tt[0],tt[1]),Pe}function ce(Pe,tt){return Pe.add(tt),Pe}function Se(Pe,tt,St,Ut){var Zt=-1,En=Pe?Pe.length:0;for(Ut&&En&&(St=Pe[++Zt]);++Zt<En;)St=tt(St,Pe[Zt],Zt,Pe);return St}function Re(Pe){var tt=!1;if(Pe!=null&&typeof Pe.toString!="function")try{tt=!!(Pe+"")}catch(St){}return tt}function T(Pe){var tt=-1,St=Array(Pe.size);return Pe.forEach(function(Ut,Zt){St[++tt]=[Zt,Ut]}),St}function B(Pe,tt){return function(St){return Pe(tt(St))}}function Y(Pe){var tt=-1,St=Array(Pe.size);return Pe.forEach(function(Ut){St[++tt]=Ut}),St}var fe,Ne=Array.prototype,De=Function.prototype,ht=Object.prototype,jt=D["__core-js_shared__"],Ge=(fe=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+fe:"",Ue=De.toString,Ct=ht.hasOwnProperty,Kt=ht.toString,Yt=RegExp("^"+Ue.call(Ct).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gt=he?D.Buffer:void 0,Bt=D.Symbol,mn=D.Uint8Array,yt=B(Object.getPrototypeOf,Object),zt=Object.create,K=ht.propertyIsEnumerable,Le=Ne.splice,me=Object.getOwnPropertySymbols,k=Gt?Gt.isBuffer:void 0,J=B(Object.keys,Object),Z=Vt(D,"DataView"),ie=Vt(D,"Map"),we=Vt(D,"Promise"),ke=Vt(D,"Set"),at=Vt(D,"WeakMap"),ft=Vt(Object,"create"),lt=Wn(Z),ye=Wn(ie),tn=Wn(we),er=Wn(ke),rr=Wn(at),or=Bt?Bt.prototype:void 0,dn=or?or.valueOf:void 0;function mt(Pe){var tt=-1,St=Pe?Pe.length:0;for(this.clear();++tt<St;){var Ut=Pe[tt];this.set(Ut[0],Ut[1])}}function Xt(Pe){var tt=-1,St=Pe?Pe.length:0;for(this.clear();++tt<St;){var Ut=Pe[tt];this.set(Ut[0],Ut[1])}}function ae(Pe){var tt=-1,St=Pe?Pe.length:0;for(this.clear();++tt<St;){var Ut=Pe[tt];this.set(Ut[0],Ut[1])}}function ee(Pe){this.__data__=new Xt(Pe)}function Ee(Pe,tt,St){var Ut=Pe[tt];Ct.call(Pe,tt)&&cr(Ut,St)&&(St!==void 0||tt in Pe)||(Pe[tt]=St)}function ve(Pe,tt){for(var St=Pe.length;St--;)if(cr(Pe[St][0],tt))return St;return-1}function et(Pe,tt,St,Ut,Zt,En,yn){var on;if(Ut&&(on=En?Ut(Pe,Zt,En,yn):Ut(Pe)),on!==void 0)return on;if(!Cn(Pe))return Pe;var tr=Ke(Pe);if(tr){if(on=function(an){var On=an.length,zn=an.constructor(On);return On&&typeof an[0]=="string"&&Ct.call(an,"index")&&(zn.index=an.index,zn.input=an.input),zn}(Pe),!tt)return function(an,On){var zn=-1,hn=an.length;for(On||(On=Array(hn));++zn<hn;)On[zn]=an[zn];return On}(Pe,on)}else{var jn=nn(Pe),qe=jn==h||jn==g;if(Et(Pe))return function(an,On){if(On)return an.slice();var zn=new an.constructor(an.length);return an.copy(zn),zn}(Pe,tt);if(jn==O||jn==m||qe&&!En){if(Re(Pe))return En?Pe:{};if(on=function(an){return typeof an.constructor!="function"||Xn(an)?{}:Cn(On=yt(an))?zt(On):{};var On}(qe?{}:Pe),!tt)return function(an,On){return Ot(an,Tt(an),On)}(Pe,function(an,On){return an&&Ot(On,ln(On),an)}(on,Pe))}else{if(!Qe[jn])return En?Pe:{};on=function(an,On,zn,hn){var _n,Ar=an.constructor;switch(On){case pe:return We(an);case y:case j:return new Ar(+an);case Me:return function(en,kn){var Bn=kn?We(en.buffer):en.buffer;return new en.constructor(Bn,en.byteOffset,en.byteLength)}(an,hn);case rt:case be:case Te:case C:case st:case _e:case Oe:case Ye:case ne:return function(en,kn){var Bn=kn?We(en.buffer):en.buffer;return new en.constructor(Bn,en.byteOffset,en.length)}(an,hn);case A:return function(en,kn,Bn){return Se(kn?Bn(T(en),!0):T(en),Ae,new en.constructor)}(an,hn,zn);case I:case P:return new Ar(an);case U:return function(en){var kn=new en.constructor(en.source,Ze.exec(en));return kn.lastIndex=en.lastIndex,kn}(an);case G:return function(en,kn,Bn){return Se(kn?Bn(Y(en),!0):Y(en),ce,new en.constructor)}(an,hn,zn);case z:return _n=an,dn?Object(dn.call(_n)):{}}}(Pe,jn,et,tt)}}yn||(yn=new ee);var dr=yn.get(Pe);if(dr)return dr;if(yn.set(Pe,on),!tr)var Ir=St?function(an){return function(On,zn,hn){var _n=zn(On);return Ke(On)?_n:function(Ar,en){for(var kn=-1,Bn=en.length,Sn=Ar.length;++kn<Bn;)Ar[Sn+kn]=en[kn];return Ar}(_n,hn(On))}(an,ln,Tt)}(Pe):ln(Pe);return function(an,On){for(var zn=-1,hn=an?an.length:0;++zn<hn&&On(an[zn],zn)!==!1;);}(Ir||Pe,function(an,On){Ir&&(an=Pe[On=an]),Ee(on,On,et(an,tt,St,Ut,On,Pe,yn))}),on}function We(Pe){var tt=new Pe.constructor(Pe.byteLength);return new mn(tt).set(new mn(Pe)),tt}function Ot(Pe,tt,St,Ut){St||(St={});for(var Zt=-1,En=tt.length;++Zt<En;){var yn=tt[Zt],on=Ut?Ut(St[yn],Pe[yn],yn,St,Pe):void 0;Ee(St,yn,on===void 0?Pe[yn]:on)}return St}function _t(Pe,tt){var St,Ut,Zt=Pe.__data__;return((Ut=typeof(St=tt))=="string"||Ut=="number"||Ut=="symbol"||Ut=="boolean"?St!=="__proto__":St===null)?Zt[typeof tt=="string"?"string":"hash"]:Zt.map}function Vt(Pe,tt){var St=function(Ut,Zt){return Ut==null?void 0:Ut[Zt]}(Pe,tt);return function(Ut){return!(!Cn(Ut)||(Zt=Ut,Ge&&Ge in Zt))&&(Pt(Ut)||Re(Ut)?Yt:xe).test(Wn(Ut));var Zt}(St)?St:void 0}mt.prototype.clear=function(){this.__data__=ft?ft(null):{}},mt.prototype.delete=function(Pe){return this.has(Pe)&&delete this.__data__[Pe]},mt.prototype.get=function(Pe){var tt=this.__data__;if(ft){var St=tt[Pe];return St===l?void 0:St}return Ct.call(tt,Pe)?tt[Pe]:void 0},mt.prototype.has=function(Pe){var tt=this.__data__;return ft?tt[Pe]!==void 0:Ct.call(tt,Pe)},mt.prototype.set=function(Pe,tt){return this.__data__[Pe]=ft&&tt===void 0?l:tt,this},Xt.prototype.clear=function(){this.__data__=[]},Xt.prototype.delete=function(Pe){var tt=this.__data__,St=ve(tt,Pe);return!(St<0||(St==tt.length-1?tt.pop():Le.call(tt,St,1),0))},Xt.prototype.get=function(Pe){var tt=this.__data__,St=ve(tt,Pe);return St<0?void 0:tt[St][1]},Xt.prototype.has=function(Pe){return ve(this.__data__,Pe)>-1},Xt.prototype.set=function(Pe,tt){var St=this.__data__,Ut=ve(St,Pe);return Ut<0?St.push([Pe,tt]):St[Ut][1]=tt,this},ae.prototype.clear=function(){this.__data__={hash:new mt,map:new(ie||Xt),string:new mt}},ae.prototype.delete=function(Pe){return _t(this,Pe).delete(Pe)},ae.prototype.get=function(Pe){return _t(this,Pe).get(Pe)},ae.prototype.has=function(Pe){return _t(this,Pe).has(Pe)},ae.prototype.set=function(Pe,tt){return _t(this,Pe).set(Pe,tt),this},ee.prototype.clear=function(){this.__data__=new Xt},ee.prototype.delete=function(Pe){return this.__data__.delete(Pe)},ee.prototype.get=function(Pe){return this.__data__.get(Pe)},ee.prototype.has=function(Pe){return this.__data__.has(Pe)},ee.prototype.set=function(Pe,tt){var St=this.__data__;if(St instanceof Xt){var Ut=St.__data__;if(!ie||Ut.length<199)return Ut.push([Pe,tt]),this;St=this.__data__=new ae(Ut)}return St.set(Pe,tt),this};var Tt=me?B(me,Object):function(){return[]},nn=function(Pe){return Kt.call(Pe)};function In(Pe,tt){return!!(tt=tt==null?v:tt)&&(typeof Pe=="number"||ct.test(Pe))&&Pe>-1&&Pe%1==0&&Pe<tt}function Xn(Pe){var tt=Pe&&Pe.constructor;return Pe===(typeof tt=="function"&&tt.prototype||ht)}function Wn(Pe){if(Pe!=null){try{return Ue.call(Pe)}catch(tt){}try{return Pe+""}catch(tt){}}return""}function cr(Pe,tt){return Pe===tt||Pe!=Pe&&tt!=tt}(Z&&nn(new Z(new ArrayBuffer(1)))!=Me||ie&&nn(new ie)!=A||we&&nn(we.resolve())!=x||ke&&nn(new ke)!=G||at&&nn(new at)!=ue)&&(nn=function(Pe){var tt=Kt.call(Pe),St=tt==O?Pe.constructor:void 0,Ut=St?Wn(St):void 0;if(Ut)switch(Ut){case lt:return Me;case ye:return A;case tn:return x;case er:return G;case rr:return ue}return tt});var Ke=Array.isArray;function ot(Pe){return Pe!=null&&function(tt){return typeof tt=="number"&&tt>-1&&tt%1==0&&tt<=v}(Pe.length)&&!Pt(Pe)}var Et=k||function(){return!1};function Pt(Pe){var tt=Cn(Pe)?Kt.call(Pe):"";return tt==h||tt==g}function Cn(Pe){var tt=typeof Pe;return!!Pe&&(tt=="object"||tt=="function")}function ln(Pe){return ot(Pe)?function(tt,St){var Ut=Ke(tt)||function(on){return function(tr){return function(jn){return!!jn&&typeof jn=="object"}(tr)&&ot(tr)}(on)&&Ct.call(on,"callee")&&(!K.call(on,"callee")||Kt.call(on)==m)}(tt)?function(on,tr){for(var jn=-1,qe=Array(on);++jn<on;)qe[jn]=tr(jn);return qe}(tt.length,String):[],Zt=Ut.length,En=!!Zt;for(var yn in tt)!Ct.call(tt,yn)||En&&(yn=="length"||In(yn,Zt))||Ut.push(yn);return Ut}(Pe):function(tt){if(!Xn(tt))return J(tt);var St=[];for(var Ut in Object(tt))Ct.call(tt,Ut)&&Ut!="constructor"&&St.push(Ut);return St}(Pe)}S.exports=function(Pe){return et(Pe,!0,!0)}},1296:(S,d,o)=>{var l=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,y=/^0o[0-7]+$/i,j=parseInt,h=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,g=typeof self=="object"&&self&&self.Object===Object&&self,A=h||g||Function("return this")(),I=Object.prototype.toString,O=Math.max,x=Math.min,U=function(){return A.Date.now()};function G(z){var ue=typeof z;return!!z&&(ue=="object"||ue=="function")}function P(z){if(typeof z=="number")return z;if(function(Me){return typeof Me=="symbol"||function(rt){return!!rt&&typeof rt=="object"}(Me)&&I.call(Me)=="[object Symbol]"}(z))return NaN;if(G(z)){var ue=typeof z.valueOf=="function"?z.valueOf():z;z=G(ue)?ue+"":ue}if(typeof z!="string")return z===0?z:+z;z=z.replace(l,"");var pe=m.test(z);return pe||y.test(z)?j(z.slice(2),pe?2:8):v.test(z)?NaN:+z}S.exports=function(z,ue,pe){var Me,rt,be,Te,C,st,_e=0,Oe=!1,Ye=!1,ne=!0;if(typeof z!="function")throw new TypeError("Expected a function");function Ze(f){var D=Me,H=rt;return Me=rt=void 0,_e=f,Te=z.apply(H,D)}function xe(f){var D=f-st;return st===void 0||D>=ue||D<0||Ye&&f-_e>=be}function ct(){var f=U();if(xe(f))return Qe(f);C=setTimeout(ct,function(D){var H=ue-(D-st);return Ye?x(H,be-(D-_e)):H}(f))}function Qe(f){return C=void 0,ne&&Me?Ze(f):(Me=rt=void 0,Te)}function re(){var f=U(),D=xe(f);if(Me=arguments,rt=this,st=f,D){if(C===void 0)return function(H){return _e=H,C=setTimeout(ct,ue),Oe?Ze(H):Te}(st);if(Ye)return C=setTimeout(ct,ue),Ze(st)}return C===void 0&&(C=setTimeout(ct,ue)),Te}return ue=P(ue)||0,G(pe)&&(Oe=!!pe.leading,be=(Ye="maxWait"in pe)?O(P(pe.maxWait)||0,ue):be,ne="trailing"in pe?!!pe.trailing:ne),re.cancel=function(){C!==void 0&&clearTimeout(C),_e=0,Me=st=rt=C=void 0},re.flush=function(){return C===void 0?Te:Qe(U())},re}},2307:(S,d,o)=>{S=o.nmd(S);var l="__lodash_hash_undefined__",v=9007199254740991,m="[object Arguments]",y="[object Array]",j="[object Boolean]",h="[object Date]",g="[object Error]",A="[object Function]",I="[object Map]",O="[object Number]",x="[object Object]",U="[object Promise]",G="[object RegExp]",P="[object Set]",z="[object String]",ue="[object WeakMap]",pe="[object ArrayBuffer]",Me="[object DataView]",rt=/^\[object .+?Constructor\]$/,be=/^(?:0|[1-9]\d*)$/,Te={};Te["[object Float32Array]"]=Te["[object Float64Array]"]=Te["[object Int8Array]"]=Te["[object Int16Array]"]=Te["[object Int32Array]"]=Te["[object Uint8Array]"]=Te["[object Uint8ClampedArray]"]=Te["[object Uint16Array]"]=Te["[object Uint32Array]"]=!0,Te[m]=Te[y]=Te[pe]=Te[j]=Te[Me]=Te[h]=Te[g]=Te[A]=Te[I]=Te[O]=Te[x]=Te[G]=Te[P]=Te[z]=Te[ue]=!1;var C=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g,st=typeof self=="object"&&self&&self.Object===Object&&self,_e=C||st||Function("return this")(),Oe=d&&!d.nodeType&&d,Ye=Oe&&S&&!S.nodeType&&S,ne=Ye&&Ye.exports===Oe,Ze=ne&&C.process,xe=function(){try{return Ze&&Ze.binding&&Ze.binding("util")}catch(Ke){}}(),ct=xe&&xe.isTypedArray;function Qe(Ke,ot){for(var Et=-1,Pt=Ke==null?0:Ke.length;++Et<Pt;)if(ot(Ke[Et],Et,Ke))return!0;return!1}function re(Ke){var ot=-1,Et=Array(Ke.size);return Ke.forEach(function(Pt,Cn){Et[++ot]=[Cn,Pt]}),Et}function f(Ke){var ot=-1,Et=Array(Ke.size);return Ke.forEach(function(Pt){Et[++ot]=Pt}),Et}var D,H,q,he=Array.prototype,Ae=Function.prototype,ce=Object.prototype,Se=_e["__core-js_shared__"],Re=Ae.toString,T=ce.hasOwnProperty,B=(D=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+D:"",Y=ce.toString,fe=RegExp("^"+Re.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ne=ne?_e.Buffer:void 0,De=_e.Symbol,ht=_e.Uint8Array,jt=ce.propertyIsEnumerable,Ge=he.splice,Ue=De?De.toStringTag:void 0,Ct=Object.getOwnPropertySymbols,Kt=Ne?Ne.isBuffer:void 0,Yt=(H=Object.keys,q=Object,function(Ke){return H(q(Ke))}),Gt=ae(_e,"DataView"),Bt=ae(_e,"Map"),mn=ae(_e,"Promise"),yt=ae(_e,"Set"),zt=ae(_e,"WeakMap"),K=ae(Object,"create"),Le=et(Gt),me=et(Bt),k=et(mn),J=et(yt),Z=et(zt),ie=De?De.prototype:void 0,we=ie?ie.valueOf:void 0;function ke(Ke){var ot=-1,Et=Ke==null?0:Ke.length;for(this.clear();++ot<Et;){var Pt=Ke[ot];this.set(Pt[0],Pt[1])}}function at(Ke){var ot=-1,Et=Ke==null?0:Ke.length;for(this.clear();++ot<Et;){var Pt=Ke[ot];this.set(Pt[0],Pt[1])}}function ft(Ke){var ot=-1,Et=Ke==null?0:Ke.length;for(this.clear();++ot<Et;){var Pt=Ke[ot];this.set(Pt[0],Pt[1])}}function lt(Ke){var ot=-1,Et=Ke==null?0:Ke.length;for(this.__data__=new ft;++ot<Et;)this.add(Ke[ot])}function ye(Ke){var ot=this.__data__=new at(Ke);this.size=ot.size}function tn(Ke,ot){for(var Et=Ke.length;Et--;)if(We(Ke[Et][0],ot))return Et;return-1}function er(Ke){return Ke==null?Ke===void 0?"[object Undefined]":"[object Null]":Ue&&Ue in Object(Ke)?function(ot){var Et=T.call(ot,Ue),Pt=ot[Ue];try{ot[Ue]=void 0;var Cn=!0}catch(Pe){}var ln=Y.call(ot);return Cn&&(Et?ot[Ue]=Pt:delete ot[Ue]),ln}(Ke):function(ot){return Y.call(ot)}(Ke)}function rr(Ke){return Xn(Ke)&&er(Ke)==m}function or(Ke,ot,Et,Pt,Cn){return Ke===ot||(Ke==null||ot==null||!Xn(Ke)&&!Xn(ot)?Ke!=Ke&&ot!=ot:function(ln,Pe,tt,St,Ut,Zt){var En=_t(ln),yn=_t(Pe),on=En?y:Ee(ln),tr=yn?y:Ee(Pe),jn=(on=on==m?x:on)==x,qe=(tr=tr==m?x:tr)==x,dr=on==tr;if(dr&&Vt(ln)){if(!Vt(Pe))return!1;En=!0,jn=!1}if(dr&&!jn)return Zt||(Zt=new ye),En||Wn(ln)?dn(ln,Pe,tt,St,Ut,Zt):function(hn,_n,Ar,en,kn,Bn,Sn){switch(Ar){case Me:if(hn.byteLength!=_n.byteLength||hn.byteOffset!=_n.byteOffset)return!1;hn=hn.buffer,_n=_n.buffer;case pe:return!(hn.byteLength!=_n.byteLength||!Bn(new ht(hn),new ht(_n)));case j:case h:case O:return We(+hn,+_n);case g:return hn.name==_n.name&&hn.message==_n.message;case G:case z:return hn==_n+"";case I:var Nr=re;case P:var Hn=1&en;if(Nr||(Nr=f),hn.size!=_n.size&&!Hn)return!1;var mr=Sn.get(hn);if(mr)return mr==_n;en|=2,Sn.set(hn,_n);var Qn=dn(Nr(hn),Nr(_n),en,kn,Bn,Sn);return Sn.delete(hn),Qn;case"[object Symbol]":if(we)return we.call(hn)==we.call(_n)}return!1}(ln,Pe,on,tt,St,Ut,Zt);if(!(1&tt)){var Ir=jn&&T.call(ln,"__wrapped__"),an=qe&&T.call(Pe,"__wrapped__");if(Ir||an){var On=Ir?ln.value():ln,zn=an?Pe.value():Pe;return Zt||(Zt=new ye),Ut(On,zn,tt,St,Zt)}}return!!dr&&(Zt||(Zt=new ye),function(hn,_n,Ar,en,kn,Bn){var Sn=1&Ar,Nr=mt(hn),Hn=Nr.length;if(Hn!=mt(_n).length&&!Sn)return!1;for(var mr=Hn;mr--;){var Qn=Nr[mr];if(!(Sn?Qn in _n:T.call(_n,Qn)))return!1}var ar=Bn.get(hn);if(ar&&Bn.get(_n))return ar==_n;var oi=!0;Bn.set(hn,_n),Bn.set(_n,hn);for(var di=Sn;++mr<Hn;){var Jr=hn[Qn=Nr[mr]],Kn=_n[Qn];if(en)var ui=Sn?en(Kn,Jr,Qn,_n,hn,Bn):en(Jr,Kn,Qn,hn,_n,Bn);if(!(ui===void 0?Jr===Kn||kn(Jr,Kn,Ar,en,Bn):ui)){oi=!1;break}di||(di=Qn=="constructor")}if(oi&&!di){var zr=hn.constructor,qr=_n.constructor;zr==qr||!("constructor"in hn)||!("constructor"in _n)||typeof zr=="function"&&zr instanceof zr&&typeof qr=="function"&&qr instanceof qr||(oi=!1)}return Bn.delete(hn),Bn.delete(_n),oi}(ln,Pe,tt,St,Ut,Zt))}(Ke,ot,Et,Pt,or,Cn))}function dn(Ke,ot,Et,Pt,Cn,ln){var Pe=1&Et,tt=Ke.length,St=ot.length;if(tt!=St&&!(Pe&&St>tt))return!1;var Ut=ln.get(Ke);if(Ut&&ln.get(ot))return Ut==ot;var Zt=-1,En=!0,yn=2&Et?new lt:void 0;for(ln.set(Ke,ot),ln.set(ot,Ke);++Zt<tt;){var on=Ke[Zt],tr=ot[Zt];if(Pt)var jn=Pe?Pt(tr,on,Zt,ot,Ke,ln):Pt(on,tr,Zt,Ke,ot,ln);if(jn!==void 0){if(jn)continue;En=!1;break}if(yn){if(!Qe(ot,function(qe,dr){if(Ir=dr,!yn.has(Ir)&&(on===qe||Cn(on,qe,Et,Pt,ln)))return yn.push(dr);var Ir})){En=!1;break}}else if(on!==tr&&!Cn(on,tr,Et,Pt,ln)){En=!1;break}}return ln.delete(Ke),ln.delete(ot),En}function mt(Ke){return function(ot,Et,Pt){var Cn=Et(ot);return _t(ot)?Cn:function(ln,Pe){for(var tt=-1,St=Pe.length,Ut=ln.length;++tt<St;)ln[Ut+tt]=Pe[tt];return ln}(Cn,Pt(ot))}(Ke,cr,ee)}function Xt(Ke,ot){var Et,Pt,Cn=Ke.__data__;return((Pt=typeof(Et=ot))=="string"||Pt=="number"||Pt=="symbol"||Pt=="boolean"?Et!=="__proto__":Et===null)?Cn[typeof ot=="string"?"string":"hash"]:Cn.map}function ae(Ke,ot){var Et=function(Pt,Cn){return Pt==null?void 0:Pt[Cn]}(Ke,ot);return function(Pt){return!(!In(Pt)||function(Cn){return!!B&&B in Cn}(Pt))&&(Tt(Pt)?fe:rt).test(et(Pt))}(Et)?Et:void 0}ke.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},ke.prototype.delete=function(Ke){var ot=this.has(Ke)&&delete this.__data__[Ke];return this.size-=ot?1:0,ot},ke.prototype.get=function(Ke){var ot=this.__data__;if(K){var Et=ot[Ke];return Et===l?void 0:Et}return T.call(ot,Ke)?ot[Ke]:void 0},ke.prototype.has=function(Ke){var ot=this.__data__;return K?ot[Ke]!==void 0:T.call(ot,Ke)},ke.prototype.set=function(Ke,ot){var Et=this.__data__;return this.size+=this.has(Ke)?0:1,Et[Ke]=K&&ot===void 0?l:ot,this},at.prototype.clear=function(){this.__data__=[],this.size=0},at.prototype.delete=function(Ke){var ot=this.__data__,Et=tn(ot,Ke);return!(Et<0||(Et==ot.length-1?ot.pop():Ge.call(ot,Et,1),--this.size,0))},at.prototype.get=function(Ke){var ot=this.__data__,Et=tn(ot,Ke);return Et<0?void 0:ot[Et][1]},at.prototype.has=function(Ke){return tn(this.__data__,Ke)>-1},at.prototype.set=function(Ke,ot){var Et=this.__data__,Pt=tn(Et,Ke);return Pt<0?(++this.size,Et.push([Ke,ot])):Et[Pt][1]=ot,this},ft.prototype.clear=function(){this.size=0,this.__data__={hash:new ke,map:new(Bt||at),string:new ke}},ft.prototype.delete=function(Ke){var ot=Xt(this,Ke).delete(Ke);return this.size-=ot?1:0,ot},ft.prototype.get=function(Ke){return Xt(this,Ke).get(Ke)},ft.prototype.has=function(Ke){return Xt(this,Ke).has(Ke)},ft.prototype.set=function(Ke,ot){var Et=Xt(this,Ke),Pt=Et.size;return Et.set(Ke,ot),this.size+=Et.size==Pt?0:1,this},lt.prototype.add=lt.prototype.push=function(Ke){return this.__data__.set(Ke,l),this},lt.prototype.has=function(Ke){return this.__data__.has(Ke)},ye.prototype.clear=function(){this.__data__=new at,this.size=0},ye.prototype.delete=function(Ke){var ot=this.__data__,Et=ot.delete(Ke);return this.size=ot.size,Et},ye.prototype.get=function(Ke){return this.__data__.get(Ke)},ye.prototype.has=function(Ke){return this.__data__.has(Ke)},ye.prototype.set=function(Ke,ot){var Et=this.__data__;if(Et instanceof at){var Pt=Et.__data__;if(!Bt||Pt.length<199)return Pt.push([Ke,ot]),this.size=++Et.size,this;Et=this.__data__=new ft(Pt)}return Et.set(Ke,ot),this.size=Et.size,this};var ee=Ct?function(Ke){return Ke==null?[]:(Ke=Object(Ke),function(ot,Et){for(var Pt=-1,Cn=ot==null?0:ot.length,ln=0,Pe=[];++Pt<Cn;){var tt=ot[Pt];St=tt,jt.call(Ke,St)&&(Pe[ln++]=tt)}var St;return Pe}(Ct(Ke)))}:function(){return[]},Ee=er;function ve(Ke,ot){return!!(ot=ot==null?v:ot)&&(typeof Ke=="number"||be.test(Ke))&&Ke>-1&&Ke%1==0&&Ke<ot}function et(Ke){if(Ke!=null){try{return Re.call(Ke)}catch(ot){}try{return Ke+""}catch(ot){}}return""}function We(Ke,ot){return Ke===ot||Ke!=Ke&&ot!=ot}(Gt&&Ee(new Gt(new ArrayBuffer(1)))!=Me||Bt&&Ee(new Bt)!=I||mn&&Ee(mn.resolve())!=U||yt&&Ee(new yt)!=P||zt&&Ee(new zt)!=ue)&&(Ee=function(Ke){var ot=er(Ke),Et=ot==x?Ke.constructor:void 0,Pt=Et?et(Et):"";if(Pt)switch(Pt){case Le:return Me;case me:return I;case k:return U;case J:return P;case Z:return ue}return ot});var Ot=rr(function(){return arguments}())?rr:function(Ke){return Xn(Ke)&&T.call(Ke,"callee")&&!jt.call(Ke,"callee")},_t=Array.isArray,Vt=Kt||function(){return!1};function Tt(Ke){if(!In(Ke))return!1;var ot=er(Ke);return ot==A||ot=="[object GeneratorFunction]"||ot=="[object AsyncFunction]"||ot=="[object Proxy]"}function nn(Ke){return typeof Ke=="number"&&Ke>-1&&Ke%1==0&&Ke<=v}function In(Ke){var ot=typeof Ke;return Ke!=null&&(ot=="object"||ot=="function")}function Xn(Ke){return Ke!=null&&typeof Ke=="object"}var Wn=ct?function(Ke){return function(ot){return Ke(ot)}}(ct):function(Ke){return Xn(Ke)&&nn(Ke.length)&&!!Te[er(Ke)]};function cr(Ke){return(ot=Ke)!=null&&nn(ot.length)&&!Tt(ot)?function(Et,Pt){var Cn=_t(Et),ln=!Cn&&Ot(Et),Pe=!Cn&&!ln&&Vt(Et),tt=!Cn&&!ln&&!Pe&&Wn(Et),St=Cn||ln||Pe||tt,Ut=St?function(yn,on){for(var tr=-1,jn=Array(yn);++tr<yn;)jn[tr]=on(tr);return jn}(Et.length,String):[],Zt=Ut.length;for(var En in Et)!T.call(Et,En)||St&&(En=="length"||Pe&&(En=="offset"||En=="parent")||tt&&(En=="buffer"||En=="byteLength"||En=="byteOffset")||ve(En,Zt))||Ut.push(En);return Ut}(Ke):function(Et){if(Cn=(Pt=Et)&&Pt.constructor,Pt!==(typeof Cn=="function"&&Cn.prototype||ce))return Yt(Et);var Pt,Cn,ln=[];for(var Pe in Object(Et))T.call(Et,Pe)&&Pe!="constructor"&&ln.push(Pe);return ln}(Ke);var ot}S.exports=function(Ke,ot){return or(Ke,ot)}},6692:S=>{var d=S.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-\.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(o){return o.encoding?"rtpmap:%d %s/%s/%s":o.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(o){return o.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%d trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(o){return o.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))? (\S*)(?: (\S*))?/,names:["value","direction","uri","config"],format:function(o){return"extmap:%d"+(o.direction?"/%s":"%v")+" %s"+(o.config?" %s":"")}},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(o){return o.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(o){var l="candidate:%s %d %s %d %s %d typ %s";return l+=o.raddr!=null?" raddr %s rport %d":"%v%v",l+=o.tcptype!=null?" tcptype %s":"%v",o.generation!=null&&(l+=" generation %d"),(l+=o["network-id"]!=null?" network-id %d":"%v")+(o["network-cost"]!=null?" network-cost %d":"%v")}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_]*)(?::(.*))?/,names:["id","attribute","value"],format:function(o){var l="ssrc:%d";return o.attribute!=null&&(l+=" %s",o.value!=null&&(l+=":%s")),l}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_\/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(o){return o.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(o){return o.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(o){return"imageattr:%s %s %s"+(o.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(o){return"simulcast:%s %s"+(o.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{push:"invalid",names:["value"]}]};Object.keys(d).forEach(function(o){d[o].forEach(function(l){l.reg||(l.reg=/(.*)/),l.format||(l.format="%s")})})},766:(S,d,o)=>{var l=o(962),v=o(5776);d.write=v,d.parse=l.parse,d.parseFmtpConfig=l.parseFmtpConfig,d.parseParams=l.parseParams,d.parsePayloads=l.parsePayloads,d.parseRemoteCandidates=l.parseRemoteCandidates,d.parseImageAttributes=l.parseImageAttributes,d.parseSimulcastStreamList=l.parseSimulcastStreamList},962:(S,d,o)=>{var l=function(h){return String(Number(h))===h?Number(h):h},v=function(h,g,A){var I=h.name&&h.names;h.push&&!g[h.push]?g[h.push]=[]:I&&!g[h.name]&&(g[h.name]={});var O=h.push?{}:I?g[h.name]:g;(function(x,U,G,P){if(P&&!G)U[P]=l(x[1]);else for(var z=0;z<G.length;z+=1)x[z+1]!=null&&(U[G[z]]=l(x[z+1]))})(A.match(h.reg),O,h.names,h.name),h.push&&g[h.push].push(O)},m=o(6692),y=RegExp.prototype.test.bind(/^([a-z])=(.*)/);d.parse=function(h){var g={},A=[],I=g;return h.split(/(\r\n|\r|\n)/).filter(y).forEach(function(O){var x=O[0],U=O.slice(2);x==="m"&&(A.push({rtp:[],fmtp:[]}),I=A[A.length-1]);for(var G=0;G<(m[x]||[]).length;G+=1){var P=m[x][G];if(P.reg.test(U))return v(P,I,U)}}),g.media=A,g};var j=function(h,g){var A=g.split(/=(.+)/,2);return A.length===2&&(h[A[0]]=l(A[1])),h};d.parseParams=function(h){return h.split(/\;\s?/).reduce(j,{})},d.parseFmtpConfig=d.parseParams,d.parsePayloads=function(h){return h.split(" ").map(Number)},d.parseRemoteCandidates=function(h){for(var g=[],A=h.split(" ").map(l),I=0;I<A.length;I+=3)g.push({component:A[I],ip:A[I+1],port:A[I+2]});return g},d.parseImageAttributes=function(h){return h.split(" ").map(function(g){return g.substring(1,g.length-1).split(",").reduce(j,{})})},d.parseSimulcastStreamList=function(h){return h.split(";").map(function(g){return g.split(",").map(function(A){var I,O=!1;return A[0]!=="~"?I=l(A):(I=l(A.substring(1,A.length)),O=!0),{scid:I,paused:O}})})}},5776:(S,d,o)=>{var l=o(6692),v=/%[sdv%]/g,m=function(g){var A=1,I=arguments,O=I.length;return g.replace(v,function(x){if(A>=O)return x;var U=I[A];switch(A+=1,x){case"%%":return"%";case"%s":return String(U);case"%d":return Number(U);case"%v":return""}})},y=function(g,A,I){var O=[g+"="+(A.format instanceof Function?A.format(A.push?I:I[A.name]):A.format)];if(A.names)for(var x=0;x<A.names.length;x+=1){var U=A.names[x];A.name?O.push(I[A.name][U]):O.push(I[A.names[x]])}else O.push(I[A.name]);return m.apply(null,O)},j=["v","o","s","i","u","e","p","c","b","t","r","z","a"],h=["i","c","b","a"];S.exports=function(g,A){A=A||{},g.version==null&&(g.version=0),g.name==null&&(g.name=" "),g.media.forEach(function(U){U.payloads==null&&(U.payloads="")});var I=A.outerOrder||j,O=A.innerOrder||h,x=[];return I.forEach(function(U){l[U].forEach(function(G){G.name in g&&g[G.name]!=null?x.push(y(U,G,g)):G.push in g&&g[G.push]!=null&&g[G.push].forEach(function(P){x.push(y(U,G,P))})})}),g.media.forEach(function(U){x.push(y("m",l.m[0],U)),O.forEach(function(G){l[G].forEach(function(P){P.name in U&&U[P.name]!=null?x.push(y(G,P,U)):P.push in U&&U[P.push]!=null&&U[P.push].forEach(function(z){x.push(y(G,P,z))})})})}),x.join(`\r
|
|
11
|
+
`)+`\r
|
|
12
|
+
`}},7539:S=>{"use strict";const d={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};d.localCName=d.generateIdentifier(),d.splitLines=function(o){return o.trim().split(`
|
|
13
|
+
`).map(l=>l.trim())},d.splitSections=function(o){return o.split(`
|
|
14
|
+
m=`).map((l,v)=>(v>0?"m="+l:l).trim()+`\r
|
|
15
|
+
`)},d.getDescription=function(o){const l=d.splitSections(o);return l&&l[0]},d.getMediaSections=function(o){const l=d.splitSections(o);return l.shift(),l},d.matchPrefix=function(o,l){return d.splitLines(o).filter(v=>v.indexOf(l)===0)},d.parseCandidate=function(o){let l;l=o.indexOf("a=candidate:")===0?o.substring(12).split(" "):o.substring(10).split(" ");const v={foundation:l[0],component:{1:"rtp",2:"rtcp"}[l[1]]||l[1],protocol:l[2].toLowerCase(),priority:parseInt(l[3],10),ip:l[4],address:l[4],port:parseInt(l[5],10),type:l[7]};for(let m=8;m<l.length;m+=2)switch(l[m]){case"raddr":v.relatedAddress=l[m+1];break;case"rport":v.relatedPort=parseInt(l[m+1],10);break;case"tcptype":v.tcpType=l[m+1];break;case"ufrag":v.ufrag=l[m+1],v.usernameFragment=l[m+1];break;default:v[l[m]]===void 0&&(v[l[m]]=l[m+1])}return v},d.writeCandidate=function(o){const l=[];l.push(o.foundation);const v=o.component;v==="rtp"?l.push(1):v==="rtcp"?l.push(2):l.push(v),l.push(o.protocol.toUpperCase()),l.push(o.priority),l.push(o.address||o.ip),l.push(o.port);const m=o.type;return l.push("typ"),l.push(m),m!=="host"&&o.relatedAddress&&o.relatedPort&&(l.push("raddr"),l.push(o.relatedAddress),l.push("rport"),l.push(o.relatedPort)),o.tcpType&&o.protocol.toLowerCase()==="tcp"&&(l.push("tcptype"),l.push(o.tcpType)),(o.usernameFragment||o.ufrag)&&(l.push("ufrag"),l.push(o.usernameFragment||o.ufrag)),"candidate:"+l.join(" ")},d.parseIceOptions=function(o){return o.substr(14).split(" ")},d.parseRtpMap=function(o){let l=o.substr(9).split(" ");const v={payloadType:parseInt(l.shift(),10)};return l=l[0].split("/"),v.name=l[0],v.clockRate=parseInt(l[1],10),v.channels=l.length===3?parseInt(l[2],10):1,v.numChannels=v.channels,v},d.writeRtpMap=function(o){let l=o.payloadType;o.preferredPayloadType!==void 0&&(l=o.preferredPayloadType);const v=o.channels||o.numChannels||1;return"a=rtpmap:"+l+" "+o.name+"/"+o.clockRate+(v!==1?"/"+v:"")+`\r
|
|
16
|
+
`},d.parseExtmap=function(o){const l=o.substr(9).split(" ");return{id:parseInt(l[0],10),direction:l[0].indexOf("/")>0?l[0].split("/")[1]:"sendrecv",uri:l[1]}},d.writeExtmap=function(o){return"a=extmap:"+(o.id||o.preferredId)+(o.direction&&o.direction!=="sendrecv"?"/"+o.direction:"")+" "+o.uri+`\r
|
|
17
|
+
`},d.parseFmtp=function(o){const l={};let v;const m=o.substr(o.indexOf(" ")+1).split(";");for(let y=0;y<m.length;y++)v=m[y].trim().split("="),l[v[0].trim()]=v[1];return l},d.writeFmtp=function(o){let l="",v=o.payloadType;if(o.preferredPayloadType!==void 0&&(v=o.preferredPayloadType),o.parameters&&Object.keys(o.parameters).length){const m=[];Object.keys(o.parameters).forEach(y=>{o.parameters[y]!==void 0?m.push(y+"="+o.parameters[y]):m.push(y)}),l+="a=fmtp:"+v+" "+m.join(";")+`\r
|
|
18
|
+
`}return l},d.parseRtcpFb=function(o){const l=o.substr(o.indexOf(" ")+1).split(" ");return{type:l.shift(),parameter:l.join(" ")}},d.writeRtcpFb=function(o){let l="",v=o.payloadType;return o.preferredPayloadType!==void 0&&(v=o.preferredPayloadType),o.rtcpFeedback&&o.rtcpFeedback.length&&o.rtcpFeedback.forEach(m=>{l+="a=rtcp-fb:"+v+" "+m.type+(m.parameter&&m.parameter.length?" "+m.parameter:"")+`\r
|
|
19
|
+
`}),l},d.parseSsrcMedia=function(o){const l=o.indexOf(" "),v={ssrc:parseInt(o.substr(7,l-7),10)},m=o.indexOf(":",l);return m>-1?(v.attribute=o.substr(l+1,m-l-1),v.value=o.substr(m+1)):v.attribute=o.substr(l+1),v},d.parseSsrcGroup=function(o){const l=o.substr(13).split(" ");return{semantics:l.shift(),ssrcs:l.map(v=>parseInt(v,10))}},d.getMid=function(o){const l=d.matchPrefix(o,"a=mid:")[0];if(l)return l.substr(6)},d.parseFingerprint=function(o){const l=o.substr(14).split(" ");return{algorithm:l[0].toLowerCase(),value:l[1].toUpperCase()}},d.getDtlsParameters=function(o,l){return{role:"auto",fingerprints:d.matchPrefix(o+l,"a=fingerprint:").map(d.parseFingerprint)}},d.writeDtlsParameters=function(o,l){let v="a=setup:"+l+`\r
|
|
20
|
+
`;return o.fingerprints.forEach(m=>{v+="a=fingerprint:"+m.algorithm+" "+m.value+`\r
|
|
21
|
+
`}),v},d.parseCryptoLine=function(o){const l=o.substr(9).split(" ");return{tag:parseInt(l[0],10),cryptoSuite:l[1],keyParams:l[2],sessionParams:l.slice(3)}},d.writeCryptoLine=function(o){return"a=crypto:"+o.tag+" "+o.cryptoSuite+" "+(typeof o.keyParams=="object"?d.writeCryptoKeyParams(o.keyParams):o.keyParams)+(o.sessionParams?" "+o.sessionParams.join(" "):"")+`\r
|
|
22
|
+
`},d.parseCryptoKeyParams=function(o){if(o.indexOf("inline:")!==0)return null;const l=o.substr(7).split("|");return{keyMethod:"inline",keySalt:l[0],lifeTime:l[1],mkiValue:l[2]?l[2].split(":")[0]:void 0,mkiLength:l[2]?l[2].split(":")[1]:void 0}},d.writeCryptoKeyParams=function(o){return o.keyMethod+":"+o.keySalt+(o.lifeTime?"|"+o.lifeTime:"")+(o.mkiValue&&o.mkiLength?"|"+o.mkiValue+":"+o.mkiLength:"")},d.getCryptoParameters=function(o,l){return d.matchPrefix(o+l,"a=crypto:").map(d.parseCryptoLine)},d.getIceParameters=function(o,l){const v=d.matchPrefix(o+l,"a=ice-ufrag:")[0],m=d.matchPrefix(o+l,"a=ice-pwd:")[0];return v&&m?{usernameFragment:v.substr(12),password:m.substr(10)}:null},d.writeIceParameters=function(o){let l="a=ice-ufrag:"+o.usernameFragment+`\r
|
|
23
|
+
a=ice-pwd:`+o.password+`\r
|
|
24
|
+
`;return o.iceLite&&(l+=`a=ice-lite\r
|
|
25
|
+
`),l},d.parseRtpParameters=function(o){const l={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},v=d.splitLines(o)[0].split(" ");for(let m=3;m<v.length;m++){const y=v[m],j=d.matchPrefix(o,"a=rtpmap:"+y+" ")[0];if(j){const h=d.parseRtpMap(j),g=d.matchPrefix(o,"a=fmtp:"+y+" ");switch(h.parameters=g.length?d.parseFmtp(g[0]):{},h.rtcpFeedback=d.matchPrefix(o,"a=rtcp-fb:"+y+" ").map(d.parseRtcpFb),l.codecs.push(h),h.name.toUpperCase()){case"RED":case"ULPFEC":l.fecMechanisms.push(h.name.toUpperCase())}}}return d.matchPrefix(o,"a=extmap:").forEach(m=>{l.headerExtensions.push(d.parseExtmap(m))}),l},d.writeRtpDescription=function(o,l){let v="";v+="m="+o+" ",v+=l.codecs.length>0?"9":"0",v+=" UDP/TLS/RTP/SAVPF ",v+=l.codecs.map(y=>y.preferredPayloadType!==void 0?y.preferredPayloadType:y.payloadType).join(" ")+`\r
|
|
26
|
+
`,v+=`c=IN IP4 0.0.0.0\r
|
|
27
|
+
`,v+=`a=rtcp:9 IN IP4 0.0.0.0\r
|
|
28
|
+
`,l.codecs.forEach(y=>{v+=d.writeRtpMap(y),v+=d.writeFmtp(y),v+=d.writeRtcpFb(y)});let m=0;return l.codecs.forEach(y=>{y.maxptime>m&&(m=y.maxptime)}),m>0&&(v+="a=maxptime:"+m+`\r
|
|
29
|
+
`),l.headerExtensions&&l.headerExtensions.forEach(y=>{v+=d.writeExtmap(y)}),v},d.parseRtpEncodingParameters=function(o){const l=[],v=d.parseRtpParameters(o),m=v.fecMechanisms.indexOf("RED")!==-1,y=v.fecMechanisms.indexOf("ULPFEC")!==-1,j=d.matchPrefix(o,"a=ssrc:").map(O=>d.parseSsrcMedia(O)).filter(O=>O.attribute==="cname"),h=j.length>0&&j[0].ssrc;let g;const A=d.matchPrefix(o,"a=ssrc-group:FID").map(O=>O.substr(17).split(" ").map(x=>parseInt(x,10)));A.length>0&&A[0].length>1&&A[0][0]===h&&(g=A[0][1]),v.codecs.forEach(O=>{if(O.name.toUpperCase()==="RTX"&&O.parameters.apt){let x={ssrc:h,codecPayloadType:parseInt(O.parameters.apt,10)};h&&g&&(x.rtx={ssrc:g}),l.push(x),m&&(x=JSON.parse(JSON.stringify(x)),x.fec={ssrc:h,mechanism:y?"red+ulpfec":"red"},l.push(x))}}),l.length===0&&h&&l.push({ssrc:h});let I=d.matchPrefix(o,"b=");return I.length&&(I=I[0].indexOf("b=TIAS:")===0?parseInt(I[0].substr(7),10):I[0].indexOf("b=AS:")===0?1e3*parseInt(I[0].substr(5),10)*.95-16e3:void 0,l.forEach(O=>{O.maxBitrate=I})),l},d.parseRtcpParameters=function(o){const l={},v=d.matchPrefix(o,"a=ssrc:").map(j=>d.parseSsrcMedia(j)).filter(j=>j.attribute==="cname")[0];v&&(l.cname=v.value,l.ssrc=v.ssrc);const m=d.matchPrefix(o,"a=rtcp-rsize");l.reducedSize=m.length>0,l.compound=m.length===0;const y=d.matchPrefix(o,"a=rtcp-mux");return l.mux=y.length>0,l},d.writeRtcpParameters=function(o){let l="";return o.reducedSize&&(l+=`a=rtcp-rsize\r
|
|
30
|
+
`),o.mux&&(l+=`a=rtcp-mux\r
|
|
31
|
+
`),o.ssrc!==void 0&&o.cname&&(l+="a=ssrc:"+o.ssrc+" cname:"+o.cname+`\r
|
|
32
|
+
`),l},d.parseMsid=function(o){let l;const v=d.matchPrefix(o,"a=msid:");if(v.length===1)return l=v[0].substr(7).split(" "),{stream:l[0],track:l[1]};const m=d.matchPrefix(o,"a=ssrc:").map(y=>d.parseSsrcMedia(y)).filter(y=>y.attribute==="msid");return m.length>0?(l=m[0].value.split(" "),{stream:l[0],track:l[1]}):void 0},d.parseSctpDescription=function(o){const l=d.parseMLine(o),v=d.matchPrefix(o,"a=max-message-size:");let m;v.length>0&&(m=parseInt(v[0].substr(19),10)),isNaN(m)&&(m=65536);const y=d.matchPrefix(o,"a=sctp-port:");if(y.length>0)return{port:parseInt(y[0].substr(12),10),protocol:l.fmt,maxMessageSize:m};const j=d.matchPrefix(o,"a=sctpmap:");if(j.length>0){const h=j[0].substr(10).split(" ");return{port:parseInt(h[0],10),protocol:h[1],maxMessageSize:m}}},d.writeSctpDescription=function(o,l){let v=[];return v=o.protocol!=="DTLS/SCTP"?["m="+o.kind+" 9 "+o.protocol+" "+l.protocol+`\r
|
|
33
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
34
|
+
`,"a=sctp-port:"+l.port+`\r
|
|
35
|
+
`]:["m="+o.kind+" 9 "+o.protocol+" "+l.port+`\r
|
|
36
|
+
`,`c=IN IP4 0.0.0.0\r
|
|
37
|
+
`,"a=sctpmap:"+l.port+" "+l.protocol+` 65535\r
|
|
38
|
+
`],l.maxMessageSize!==void 0&&v.push("a=max-message-size:"+l.maxMessageSize+`\r
|
|
39
|
+
`),v.join("")},d.generateSessionId=function(){return Math.random().toString().substr(2,21)},d.writeSessionBoilerplate=function(o,l,v){let m;const y=l!==void 0?l:2;return m=o||d.generateSessionId(),`v=0\r
|
|
40
|
+
o=`+(v||"thisisadapterortc")+" "+m+" "+y+` IN IP4 127.0.0.1\r
|
|
41
|
+
s=-\r
|
|
42
|
+
t=0 0\r
|
|
43
|
+
`},d.getDirection=function(o,l){const v=d.splitLines(o);for(let m=0;m<v.length;m++)switch(v[m]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return v[m].substr(2)}return l?d.getDirection(l):"sendrecv"},d.getKind=function(o){return d.splitLines(o)[0].split(" ")[0].substr(2)},d.isRejected=function(o){return o.split(" ",2)[1]==="0"},d.parseMLine=function(o){const l=d.splitLines(o)[0].substr(2).split(" ");return{kind:l[0],port:parseInt(l[1],10),protocol:l[2],fmt:l.slice(3).join(" ")}},d.parseOLine=function(o){const l=d.matchPrefix(o,"o=")[0].substr(2).split(" ");return{username:l[0],sessionId:l[1],sessionVersion:parseInt(l[2],10),netType:l[3],addressType:l[4],address:l[5]}},d.isValidSDP=function(o){if(typeof o!="string"||o.length===0)return!1;const l=d.splitLines(o);for(let v=0;v<l.length;v++)if(l[v].length<2||l[v].charAt(1)!=="=")return!1;return!0},S.exports=d},6141:(S,d,o)=>{"use strict";o.d(d,{default:()=>Zu});var l={};o.r(l),o.d(l,{AUTHENTICATION_REQUIRED:()=>ue,CHAT_ERROR:()=>pe,CONFERENCE_ACCESS_DENIED:()=>Oe,CONFERENCE_DESTROYED:()=>rt,CONFERENCE_MAX_USERS:()=>be,CONFERENCE_RESTARTED:()=>C,CONNECTION_ERROR:()=>Te,FOCUS_DISCONNECTED:()=>Ye,FOCUS_LEFT:()=>ne,GRACEFUL_SHUTDOWN:()=>Ze,ICE_FAILED:()=>xe,INCOMPATIBLE_SERVER_VERSIONS:()=>ct,MEMBERS_ONLY_ERROR:()=>_e,NOT_ALLOWED_ERROR:()=>st,OFFER_ANSWER_FAILED:()=>Qe,PASSWORD_NOT_SUPPORTED:()=>re,PASSWORD_REQUIRED:()=>f,RESERVATION_ERROR:()=>D,SETTINGS_ERROR:()=>Me,VIDEOBRIDGE_NOT_AVAILABLE:()=>H});var v={};o.r(v),o.d(v,{AUDIO_INPUT_STATE_CHANGE:()=>q,AUDIO_UNMUTE_PERMISSIONS_CHANGED:()=>he,AUTH_STATUS_CHANGED:()=>Ae,AV_MODERATION_APPROVED:()=>Cn,AV_MODERATION_CHANGED:()=>Pe,AV_MODERATION_PARTICIPANT_APPROVED:()=>tt,AV_MODERATION_PARTICIPANT_REJECTED:()=>St,AV_MODERATION_REJECTED:()=>ln,BEFORE_STATISTICS_DISPOSED:()=>ce,BOT_TYPE_CHANGED:()=>Ke,BREAKOUT_ROOMS_MOVE_TO_ROOM:()=>Zt,BREAKOUT_ROOMS_UPDATED:()=>En,CONFERENCE_CREATED_TIMESTAMP:()=>Ct,CONFERENCE_ERROR:()=>Se,CONFERENCE_FAILED:()=>Re,CONFERENCE_JOINED:()=>B,CONFERENCE_JOIN_IN_PROGRESS:()=>T,CONFERENCE_LEFT:()=>Y,CONFERENCE_UNIQUE_ID_SET:()=>fe,CONNECTION_ESTABLISHED:()=>Ne,CONNECTION_INTERRUPTED:()=>De,CONNECTION_RESTORED:()=>ht,DATA_CHANNEL_OPENED:()=>jt,DISPLAY_NAME_CHANGED:()=>Ge,DOMINANT_SPEAKER_CHANGED:()=>Ue,DTMF_SUPPORT_CHANGED:()=>Kt,ENDPOINT_MESSAGE_RECEIVED:()=>Yt,ENDPOINT_STATS_RECEIVED:()=>Gt,FACIAL_EXPRESSION_ADDED:()=>Ut,JVB121_STATUS:()=>Bt,KICKED:()=>mn,LAST_N_ENDPOINTS_CHANGED:()=>zt,LOBBY_USER_JOINED:()=>ot,LOBBY_USER_LEFT:()=>Pt,LOBBY_USER_UPDATED:()=>Et,LOCK_STATE_CHANGED:()=>K,MEMBERS_ONLY_CHANGED:()=>J,MESSAGE_RECEIVED:()=>Z,NOISY_MIC:()=>we,NON_PARTICIPANT_MESSAGE_RECEIVED:()=>ke,NO_AUDIO_INPUT:()=>ie,P2P_STATUS:()=>tn,PARTCIPANT_FEATURES_CHANGED:()=>lt,PARTICIPANT_CONN_STATUS_CHANGED:()=>ft,PARTICIPANT_KICKED:()=>yt,PARTICIPANT_PROPERTY_CHANGED:()=>ye,PHONE_NUMBER_CHANGED:()=>er,PRIVATE_MESSAGE_RECEIVED:()=>at,PROPERTIES_CHANGED:()=>rr,RECORDER_STATE_CHANGED:()=>or,SERVER_REGION_CHANGED:()=>Le,STARTED_MUTED:()=>ae,START_MUTED_POLICY_CHANGED:()=>Xt,SUBJECT_CHANGED:()=>ee,SUSPEND_DETECTED:()=>Ee,TALK_WHILE_MUTED:()=>ve,TRACK_ADDED:()=>et,TRACK_AUDIO_LEVEL_CHANGED:()=>We,TRACK_MUTE_CHANGED:()=>Ot,TRACK_REMOVED:()=>_t,TRACK_UNMUTE_REJECTED:()=>Vt,TRANSCRIPTION_STATUS_CHANGED:()=>Tt,USER_JOINED:()=>nn,USER_LEFT:()=>In,USER_ROLE_CHANGED:()=>Xn,USER_STATUS_CHANGED:()=>Wn,VIDEO_SIP_GW_AVAILABILITY_CHANGED:()=>dn,VIDEO_SIP_GW_SESSION_STATE_CHANGED:()=>mt,VIDEO_UNMUTE_PERMISSIONS_CHANGED:()=>cr,_MEDIA_SESSION_ACTIVE_CHANGED:()=>k,_MEDIA_SESSION_STARTED:()=>me});var m={};o.r(m),o.d(m,{CONSTRAINT_FAILED:()=>Ir,ELECTRON_DESKTOP_PICKER_ERROR:()=>an,ELECTRON_DESKTOP_PICKER_NOT_FOUND:()=>On,GENERAL:()=>zn,NOT_FOUND:()=>hn,PERMISSION_DENIED:()=>_n,SCREENSHARING_GENERIC_ERROR:()=>Ar,SCREENSHARING_USER_CANCELED:()=>en,TIMEOUT:()=>kn,TRACK_IS_DISPOSED:()=>Bn,TRACK_NO_STREAM_FOUND:()=>Sn,UNSUPPORTED_RESOLUTION:()=>Nr});var y={};o.r(y),o.d(y,{AUDIO:()=>Xe,PRESENTER:()=>pn,VIDEO:()=>Rt});var j={};o.r(j),o.d(j,{LOCAL_TRACK_STOPPED:()=>cs,NO_AUDIO_INPUT:()=>Zr,NO_DATA_FROM_SOURCE:()=>Xr,TRACK_AUDIO_LEVEL_CHANGED:()=>Oi,TRACK_AUDIO_OUTPUT_CHANGED:()=>Vi,TRACK_MUTE_CHANGED:()=>Ci,TRACK_VIDEOTYPE_CHANGED:()=>Yi});var h={};o.r(h),o.d(h,{CONNECTION_DISCONNECTED:()=>Yn,CONNECTION_ESTABLISHED:()=>Hi,CONNECTION_FAILED:()=>yr,DISPLAY_NAME_REQUIRED:()=>ls,WRONG_STATE:()=>ei});var g={};o.r(g),o.d(g,{CONNECTION_DROPPED_ERROR:()=>Ps,OTHER_ERROR:()=>ds,PASSWORD_REQUIRED:()=>Os,SERVER_ERROR:()=>Ds});var A={};o.r(A),o.d(A,{OFF:()=>Ha,ON:()=>Kl});var I={};o.r(I),o.d(I,{LOCAL_STATS_UPDATED:()=>Zs,REMOTE_STATS_UPDATED:()=>ws});var O={};o.r(O),o.d(O,{AUDIO_INPUT_STATE_CHANGE:()=>_a,DETECTOR_STATE_CHANGE:()=>Co,NO_AUDIO_INPUT:()=>Aa,VAD_NOISY_DEVICE:()=>Ea,VAD_REPORT_PUBLISHED:()=>Au,VAD_SCORE_PUBLISHED:()=>To,VAD_TALK_WHILE_MUTED:()=>Sa});var x={};o.r(x),o.d(x,{E2E_RTT_CHANGED:()=>ll});var U={};o.r(U),o.d(U,{ERROR_NO_CONNECTION:()=>Rl,ERROR_SESSION_EXISTS:()=>wl,STATE_FAILED:()=>to,STATE_OFF:()=>eo,STATE_ON:()=>Ia,STATE_PENDING:()=>Pa,STATE_RETRYING:()=>Oa,STATUS_AVAILABLE:()=>Hu,STATUS_BUSY:()=>Gu,STATUS_UNDEFINED:()=>Ju});var G={};o.r(G),o.d(G,{DEVICE_LIST_CHANGED:()=>Pl,PERMISSIONS_CHANGED:()=>Ol,PERMISSION_PROMPT_IS_SHOWN:()=>Dl,SLOW_GET_USER_MEDIA:()=>Ml});var P=o(9077),z=o.n(P);const ue="conference.authenticationRequired",pe="conference.chatError",Me="conference.settingsError",rt="conference.destroyed",be="conference.max_users",Te="conference.connectionError",C="conference.restarted",st="conference.connectionError.notAllowed",_e="conference.connectionError.membersOnly",Oe="conference.connectionError.accessDenied",Ye="conference.focusDisconnected",ne="conference.focusLeft",Ze="conference.gracefulShutdown",xe="conference.iceFailed",ct="conference.incompatible_server_versions",Qe="conference.offerAnswerFailed",re="conference.passwordNotSupported",f="conference.passwordRequired",D="conference.reservationError",H="conference.videobridgeNotAvailable",q="conference.audio_input_state_changed",he="conference.audio_unmute_permissions_changed",Ae="conference.auth_status_changed",ce="conference.beforeStatisticsDisposed",Se="conference.error",Re="conference.failed",T="conference.join_in_progress",B="conference.joined",Y="conference.left",fe="conference.unique_id_set",Ne="conference.connectionEstablished",De="conference.connectionInterrupted",ht="conference.connectionRestored",jt="conference.dataChannelOpened",Ge="conference.displayNameChanged",Ue="conference.dominantSpeaker",Ct="conference.createdTimestamp",Kt="conference.dtmfSupportChanged",Yt="conference.endpoint_message_received",Gt="conference.endpoint_stats_received",Bt="conference.jvb121Status",mn="conference.kicked",yt="conference.participant_kicked",zt="conference.lastNEndpointsChanged",K="conference.lock_state_changed",Le="conference.server_region_changed",me="conference.media_session.started",k="conference.media_session.active_changed",J="conference.membersOnlyChanged",Z="conference.messageReceived",ie="conference.no_audio_input",we="conference.noisy_mic",ke="conference.non_participant_message_received",at="conference.privateMessageReceived",ft="conference.participant_conn_status_changed",lt="conference.partcipant_features_changed",ye="conference.participant_property_changed",tn="conference.p2pStatus",er="conference.phoneNumberChanged",rr="conference.propertiesChanged",or="conference.recorderStateChanged",dn="conference.videoSIPGWAvailabilityChanged",mt="conference.videoSIPGWSessionStateChanged",Xt="conference.start_muted_policy_changed",ae="conference.started_muted",ee="conference.subjectChanged",Ee="conference.suspendDetected",ve="conference.talk_while_muted",et="conference.trackAdded",We="conference.audioLevelsChanged",Ot="conference.trackMuteChanged",_t="conference.trackRemoved",Vt="conference.trackUnmuteRejected",Tt="conference.transcriptionStatusChanged",nn="conference.userJoined",In="conference.userLeft",Xn="conference.roleChanged",Wn="conference.statusChanged",cr="conference.video_unmute_permissions_changed",Ke="conference.bot_type_changed",ot="conference.lobby.userJoined",Et="conference.lobby.userUpdated",Pt="conference.lobby.userLeft",Cn="conference.av_moderation.approved",ln="conference.av_moderation.rejected",Pe="conference.av_moderation.changed",tt="conference.av_moderation.participant.approved",St="conference.av_moderation.participant.rejected",Ut="conference.facial_expression.added",Zt="conference.breakout-rooms.move-to-room",En="conference.breakout-rooms.updated";var yn=o(7187),on=o.n(yn),tr=o(2307),jn=o.n(tr),qe=o(9755);const dr="https://api.callstats.io/static/callstats-ws.min.js",Ir="gum.constraint_failed",an="gum.electron_desktop_picker_error",On="gum.electron_desktop_picker_not_found",zn="gum.general",hn="gum.not_found",_n="gum.permission_denied",Ar="gum.screensharing_generic_error",en="gum.screensharing_user_canceled",kn="gum.timeout",Bn="track.track_is_disposed",Sn="track.no_stream_found",Nr="gum.unsupported_resolution",Hn={};function mr(r,e,n){if(typeof r=="object"&&r.name!==void 0)switch(this.gum={error:r,constraints:e,devices:n&&Array.isArray(n)?n.slice(0):void 0},r.name){case"NotAllowedError":case"PermissionDeniedError":case"SecurityError":this.name=_n,this.message=Hn[this.name]+(this.gum.devices||[]).join(", ");break;case"DevicesNotFoundError":case"NotFoundError":this.name=hn,this.message=Hn[this.name]+(this.gum.devices||[]).join(", ");break;case"ConstraintNotSatisfiedError":case"OverconstrainedError":{const i=r.constraintName||r.constraint;e&&e.video&&(!n||n.indexOf("video")>-1)&&(i==="minWidth"||i==="maxWidth"||i==="minHeight"||i==="maxHeight"||i==="width"||i==="height"||i==="deviceId")?(this.name=Nr,this.message=Hn[this.name]+function(s,c){if(c&&c.video&&c.video.mandatory)switch(s){case"width":return c.video.mandatory.minWidth;case"height":return c.video.mandatory.minHeight;default:return c.video.mandatory[s]||""}return""}(i,e)):(this.name=Ir,this.message=Hn[this.name]+r.constraintName);break}default:this.name=zn,this.message=r.message||Hn[this.name]}else{if(typeof r!="string")throw new Error("Invalid arguments");Hn[r]?(this.name=r,this.message=e||Hn[r]):this.message=r}this.stack=r.stack||new Error().stack}Hn[Nr]="Video resolution is not supported: ",Hn[en]="User canceled screen sharing prompt",Hn[Ar]="Unknown error from screensharing",Hn[an]="Unkown error from desktop picker",Hn[On]="Failed to detect desktop picker",Hn[zn]="Generic getUserMedia error",Hn[_n]="User denied permission to use device(s): ",Hn[hn]="Requested device(s) was/were not found: ",Hn[Ir]="Constraint could not be satisfied: ",Hn[kn]="Could not start media source. Timeout occured!",Hn[Bn]="Track has been already disposed",Hn[Sn]="Track does not have an associated Media Stream",mr.prototype=Object.create(Error.prototype),mr.prototype.constructor=mr;const Qn=mr,ar="operational",oi="page",di="track",Jr="connection.disconnected",Kn="ice.duration";function ui(r,e){return{action:r,attributes:e,source:"conference",type:ar}}const zr=function(r,e){const n="connection.stage.reached";return{action:n,actionSubject:r,attributes:e,source:n,type:ar}},qr=function(r){return{type:ar,source:"get.user.media",action:r,attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}},Gr=function(r){return{type:ar,action:r,source:"jingle",attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}},Ri=function(r){return{type:ar,action:r,source:"p2p",attributes:arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}}},Ai=function(r){return{type:ar,action:"remotely.muted",mediaType:r}},ss=function(r){return{type:ar,action:"rtp.stats",attributes:r}},Bi="statistics.audioLevel",wi="statistics.before_disposed",$i="statistics.byte_sent_stats",ur="statistics.connectionstats",Ui="statistics.long_tasks_stats";o(8495);var Dn=o(1206);const ai="chrome",hi="opera",Fi="firefox",Yr="iexplorer",Wi="safari",Ii="nwjs",ji="electron",Ei="react-native",pi="unknown",Si={Chrome:ai,Chromium:ai,Opera:hi,Firefox:Fi,"Internet Explorer":Yr,Safari:Wi};function zi(){const r=navigator.userAgent;if(r.match(/Electron/)){const e=r.match(/Electron(?:\s|\/)([\d.]+)/)[1];return{name:ji,version:e}}if(window.JitsiMeetElectron!==void 0)return{name:ji,version:void 0}}function os(){const r=navigator.userAgent;if(r.match(/JitsiMeetNW/)){const e=r.match(/JitsiMeetNW\/([\d.]+)/)[1];return{name:Ii,version:e}}}function Is(){const r=navigator.userAgent.match(/\b(react[ \t_-]*native)(?:\/(\S+))?/i);let e;if(r||navigator.product==="ReactNative"){let n;return r&&r.length>2&&(n=r[1],e=r[2]),n||(n="react-native"),e||(e="unknown"),{name:Ei,version:e}}}class sr extends yn{constructor(){var e,n;super(...arguments),n={},(e="_storage")in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n}clear(){this._storage={}}get length(){return Object.keys(this._storage).length}getItem(e){return this._storage[e]}setItem(e,n){this._storage[e]=n}removeItem(e){delete this._storage[e]}key(e){const n=Object.keys(this._storage);if(!(n.length<=e))return n[e]}serialize(){return JSON.stringify(this._storage)}}const a=new class extends yn{constructor(){super();try{this._storage=window.localStorage,this._localStorageDisabled=!1}catch(r){}this._storage||(this._storage=new sr,this._localStorageDisabled=!0)}isLocalStorageDisabled(){return this._localStorageDisabled}clear(){this._storage.clear(),this.emit("changed")}get length(){return this._storage.length}getItem(r){return this._storage.getItem(r)}setItem(r,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this._storage.setItem(r,e),n||this.emit("changed")}removeItem(r){this._storage.removeItem(r),this.emit("changed")}key(r){return this._storage.key(r)}serialize(){if(this.isLocalStorageDisabled())return this._storage.serialize();const r=this._storage.length,e={};for(let n=0;n<r;n++){const i=this._storage.key(n);e[i]=this._storage.getItem(i)}return JSON.stringify(e)}},p=(0,P.getLogger)("modules/browser/BrowserCapabilities.js"),E=new class extends class{constructor(r){let e,n;if(this._bowser=Dn.getParser(navigator.userAgent),r===void 0){const i=function(s){let c;const u=[Is,zi,os];for(let L=0;L<u.length;L++)if(c=u[L](),c)return c;const b=s.getBrowserName();return b in Si?{name:Si[b],version:s.getBrowserVersion()}:(c=function(){const L=navigator.userAgent,N={name:pi,version:void 0};if(L.match(/Chrome/)&&!L.match(/Edge/))if(L.match(/Edg(A?)/)){const X=L.match(/Chrome\/([\d.]+)/)[1];Number.parseInt(X,10)>72&&(N.name=ai,N.version=X)}else N.name=ai,N.version=L.match(/Chrome\/([\d.]+)/)[1];return N}(),c||{name:pi,version:void 0})}(this._bowser);e=i.name,n=i.version}else r.name in Si?(e=Si[r.name],n=r.version):(e=pi,n=void 0);this._name=e,this._version=n}getName(){return this._name}isChrome(){return this._name===ai}isOpera(){return this._name===hi}isFirefox(){return this._name===Fi}isIExplorer(){return this._name===Yr}isSafari(){return this._name===Wi}isNWJS(){return this._name===Ii}isElectron(){return this._name===ji}isReactNative(){return this._name===Ei}getVersion(){return this._version}_checkCondition(r){if(this._version)return this._bowser.satisfies(r)}isVersionGreaterThan(r){return this._checkCondition({[this._name]:`>${r}`})}isVersionLessThan(r){return this._checkCondition({[this._name]:`<${r}`})}isVersionEqualTo(r){return this._checkCondition({[this._name]:`~${r}`})}}{constructor(){super(),p.info(`This appears to be ${this.getName()}, ver: ${this.getVersion()}`)}doesVideoMuteByStreamRemove(){return this.isChromiumBased()||this.isWebKitBased()||this.isFirefox()}isChromiumBased(){return(this.isChrome()||this.isElectron()||this.isNWJS()||this.isOpera())&&!this.isWebKitBased()}isIosBrowser(){const{userAgent:r,maxTouchPoints:e,platform:n}=navigator;return Boolean(r.match(/iP(ad|hone|od)/i))||e&&e>2&&/MacIntel/.test(n)}isWebKitBased(){return this._bowser.isEngine("webkit")&&navigator.mediaDevices!==void 0&&navigator.mediaDevices.getUserMedia!==void 0&&window.RTCRtpTransceiver!==void 0&&Object.keys(RTCRtpTransceiver.prototype).indexOf("currentDirection")>-1}isTwa(){return"matchMedia"in window&&window.matchMedia("(display-mode:standalone)").matches}isSupported(){return!(this.isSafari()&&this._getSafariVersion()<14)&&(this.isChromiumBased()&&this._getChromiumBasedVersion()>=72||this.isFirefox()||this.isReactNative()||this.isWebKitBased())}isSupportedAndroidBrowser(){return this.isChromiumBased()||this.isFirefox()}isSupportedIOSBrowser(){return this._getIOSVersion()>=14}isUserInteractionRequiredForUnmute(){return this.isFirefox()&&this.isVersionLessThan("68")}supportsVideoMuteOnConnInterrupted(){return this.isChromiumBased()||this.isReactNative()}supportsBandwidthStatistics(){return!this.isFirefox()&&!this.isWebKitBased()}supportsCodecPreferences(){return Boolean(window.RTCRtpTransceiver&&"setCodecPreferences"in window.RTCRtpTransceiver.prototype&&window.RTCRtpReceiver&&window.RTCRtpReceiver.getCapabilities!==void 0)&&!this.isWebKitBased()}supportsDeviceChangeEvent(){return navigator.mediaDevices&&navigator.mediaDevices.ondevicechange!==void 0&&navigator.mediaDevices.addEventListener!==void 0}supportsLocalCandidateRttStatistics(){return this.isChromiumBased()||this.isReactNative()||this.isWebKitBased()}supportsPerformanceObserver(){return window.PerformanceObserver!==void 0&&PerformanceObserver.supportedEntryTypes.indexOf("longtask")>-1}supportsReceiverStats(){return window.RTCRtpReceiver!==void 0&&Object.keys(RTCRtpReceiver.prototype).indexOf("getSynchronizationSources")>-1&&!this.isWebKitBased()}supportsRTTStatistics(){return!this.isFirefox()}supportsVP9(){return this.isChromiumBased()||this.isReactNative()}usesSdpMungingForSimulcast(){return this.isChromiumBased()||this.isReactNative()||this.isWebKitBased()}usesAdapter(){return!this.isReactNative()}usesRidsForSimulcast(){return!1}supportsGetDisplayMedia(){return navigator.getDisplayMedia!==void 0||navigator.mediaDevices!==void 0&&navigator.mediaDevices.getDisplayMedia!==void 0}supportsEncodedTransform(){return Boolean(window.RTCRtpScriptTransform)}supportsInsertableStreams(){if(window.RTCRtpSender===void 0||!window.RTCRtpSender.prototype.createEncodedStreams)return!1;const r=new ReadableStream;try{return window.postMessage(r,"*",[r]),!0}catch(e){return!1}}supportsAudioRed(){return Boolean(window.RTCRtpSender&&window.RTCRtpSender.getCapabilities&&window.RTCRtpSender.getCapabilities("audio").codecs.some(r=>r.mimeType==="audio/red")&&window.RTCRtpReceiver&&window.RTCRtpReceiver.getCapabilities&&window.RTCRtpReceiver.getCapabilities("audio").codecs.some(r=>r.mimeType==="audio/red"))}supportsUnifiedPlan(){return!this.isReactNative()}supportsVADDetection(){return this.isChromiumBased()}supportsRTX(){return!(this.isFirefox()&&this.isVersionLessThan("96"))}_getChromiumBasedVersion(){if(this.isChromiumBased()){if(this.isNWJS())return Number.parseInt(process.versions.chromium,10);const r=navigator.userAgent;if(r.match(/Chrome/))return Number.parseInt(r.match(/Chrome\/([\d.]+)/)[1],10)}return-1}_getSafariVersion(){return this.isSafari()?Number.parseInt(this.getVersion(),10):-1}_getIOSVersion(){return this.isWebKitBased()?Number.parseInt(this.getVersion(),10):-1}};var M=o(549),Q=o.n(M);const R=(0,P.getLogger)("modules/statistics/AnalyticsAdapter.js"),F=new class{constructor(){this.reset()}reset(){this.disposed=!1,this.analyticsHandlers=new Set,this.cache=[],this.permanentProperties={},this.conferenceName="",this.addPermanentProperties({user_agent:navigator.userAgent,browser_name:E.getName()})}dispose(){R.warn("Disposing of analytics adapter."),this.analyticsHandlers&&this.analyticsHandlers.size>0&&this.analyticsHandlers.forEach(r=>{typeof r.dispose=="function"&&r.dispose()}),this.setAnalyticsHandlers([]),this.disposed=!0}setAnalyticsHandlers(r){if(this.disposed)return;this.analyticsHandlers=new Set(r),this._setUserProperties();const e=this.cache;this.cache=null,e&&e.forEach(n=>this._sendEvent(n))}_setUserProperties(){this.analyticsHandlers.forEach(r=>{try{r.setUserProperties(this.permanentProperties)}catch(e){R.warn(`Error in setUserProperties method of one of the analytics handlers: ${e}`)}})}addPermanentProperties(r){this.permanentProperties=Ft(Ft({},this.permanentProperties),r),this._setUserProperties()}setConferenceName(r){this.conferenceName=r,this.addPermanentProperties({conference_name:r})}sendEvent(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.disposed)return;let n=null;typeof r=="string"?n={type:ar,action:r,actionSubject:r,source:r,attributes:e}:typeof r=="object"&&(n=r),this._verifyRequiredFields(n)?this._sendEvent(n):R.error(`Dropping a mis-formatted event: ${JSON.stringify(n)}`)}_verifyRequiredFields(r){if(!r)return!1;r.type||(r.type=ar);const e=r.type;return e!==ar&&e!==oi&&e!=="ui"&&e!==di?(R.error(`Unknown event type: ${e}`),!1):e===oi?Boolean(r.name):(r.action=r.action||r.name||r.actionSubject,r.actionSubject=r.actionSubject||r.name||r.action,r.source=r.source||r.name||r.action||r.actionSubject,r.action&&r.actionSubject&&r.source?!!(e!==di||(r.objectType=r.objectType||"generic-object-type",r.containerType=r.containerType||"conference",r.containerType!=="conference"||r.containerId||(r.containerId=this.conferenceName),r.objectType&&r.objectId&&r.containerType&&r.containerId))||(R.error("Required field missing (containerId, containerType, objectId or objectType)"),!1):(R.error("Required field missing (action, actionSubject or source)"),!1))}_maybeCacheEvent(r){return!!this.cache&&(this.cache.push(r),this.cache.length>100&&this.cache.splice(0,1),!0)}_sendEvent(r){this._maybeCacheEvent(r)||this.analyticsHandlers.forEach(e=>{try{e.sendEvent(r)}catch(n){R.warn(`Error sending analytics event: ${n}`)}})}};var _=o(1023),w=o.n(_);const V=o(9077).getLogger("modules/statistics/CallStats.js"),W="applicationLog",te="error",oe="event",le="mstWithUserID";let Fe;class ge{static _addNewFabricCallback(e,n){ge.backend&&e!=="success"&&V.error(`Monitoring status: ${e} msg: ${n}`)}static _initCallback(e,n){if(V.log(`CallStats Status: err=${e} msg=${n}`),e!=="success")return;ge.backendInitialized=!0;let i=!1,s=null;for(const c of ge.fabrics.values())c.hasFabric||(V.debug("addNewFabric - initCallback"),c._addNewFabric()&&(i=!0,s||(s=c)));i&&ge._emptyReportQueue(s)}static _emptyReportQueue(e){const n=e.confID,i=e.peerconnection;for(const s of ge.reportsQueue)if(s.type===te){const c=s.data;ge._reportError(e,c.type,c.error,c.pc||i)}else if(s.type===oe){const c=s.data;ge.backend.sendFabricEvent(s.pc||i,c.event,n,c.eventData)}else if(s.type===le){const c=s.data;ge.backend.associateMstWithUserID(s.pc||i,c.callStatsId,n,c.ssrc,c.usageLabel,c.containerId)}ge.reportsQueue.length=0}static _reportError(e,n,i,s){let c=i;c||(V.warn("No error is passed!"),c=new Error("Unknown error")),ge.backendInitialized&&e?ge.backend.reportError(s,e.confID,n,c):ge.reportsQueue.push({type:te,data:{error:c,pc:s,type:n}})}static _reportEvent(e,n,i){const s=e&&e.peerconnection,c=e&&e.confID;ge.backendInitialized&&e?ge.backend.sendFabricEvent(s,n,c,i):ge.reportsQueue.push({confID:c,pc:s,type:oe,data:{event:n,eventData:i}})}static _traceAndCatchBackendCalls(e){const n=["associateMstWithUserID","sendFabricEvent","sendUserFeedback"];for(const c of n){const u=e[c];e[c]=function(){try{for(var b=arguments.length,L=new Array(b),N=0;N<b;N++)L[N]=arguments[N];return u.apply(e,L)}catch(X){w().callErrorHandler(X)}}}const i=["associateMstWithUserID","sendFabricEvent","sendUserFeedback"];for(const c of i){const u=e[c];e[c]=function(){for(var b=arguments.length,L=new Array(b),N=0;N<b;N++)L[N]=arguments[N];V.debug(c,L),u.apply(e,L)}}const s=e.reportError;e.reportError=function(c,u,b){for(var L=arguments.length,N=new Array(L>3?L-3:0),X=3;X<L;X++)N[X-3]=arguments[X];b===W?E.isReactNative():V.debug("reportError",c,u,b,...N);try{s.call(e,c,u,b,...N)}catch(de){b===W||w().callErrorHandler(de)}}}static get fabrics(){return Fe||(Fe=new Set),Fe}static initBackend(e){if(ge.backend)throw new Error("CallStats backend has been initialized already!");try{const n=callstats;ge.backend=new n,ge._traceAndCatchBackendCalls(ge.backend),ge.userID={aliasName:e.aliasName,userName:e.userName},ge.callStatsID=e.callStatsID,ge.callStatsSecret=e.callStatsSecret;const i=Ft({},e.configParams);if(e.applicationName&&(i.applicationVersion=`${e.applicationName} (${E.getName()})`),e.confID){const c=e.confID.match(/.*\/(.*)\/.*/);i.siteID=e.siteID||c&&c[1]||"/"}ge.backend.initialize(ge.callStatsID,ge.callStatsSecret,ge.userID,ge._initCallback,void 0,i);const s=e.getWiFiStatsMethod;return s&&(ge.backend.attachWifiStatsHandler(s),s().then(c=>{c&&V.info("Reported wifi addresses:",JSON.parse(c).addresses)}).catch(()=>{})),!0}catch(n){return w().callErrorHandler(n),ge.backend=null,V.error(n),!1}}static isBackendInitialized(){return Boolean(ge.backend)}static sendActiveDeviceListEvent(e,n){ge._reportEvent(n,"activeDeviceList",e)}static sendApplicationLog(e,n){try{ge._reportError(n,W,e,n&&n.peerconnection)}catch(i){}}static sendFeedback(e,n,i){return new Promise((s,c)=>{if(ge.backend)ge.backend.sendUserFeedback(e,{userID:ge.userID,overall:n,comment:i},(u,b)=>{u==="success"?s(b):c(b)});else{const u="Failed to submit feedback to CallStats - no backend";V.error(u),c(u)}})}static sendGetUserMediaFailed(e,n){ge._reportError(n,"getUserMedia",e,null)}static sendMuteEvent(e,n,i){let s;s=n==="video"?e?"videoPause":"videoResume":e?"audioMute":"audioUnmute",ge._reportEvent(i,s)}constructor(e,n){this.confID=n.confID,this.tpc=e,this.peerconnection=e.peerconnection,this.remoteUserID=n.remoteUserID||"jitsi",this.hasFabric=!1,ge.fabrics.add(this),ge.backendInitialized&&(this._addNewFabric(),ge.fabrics.size===1&&ge._emptyReportQueue(this))}_addNewFabric(){V.info("addNewFabric",this.remoteUserID);try{const e={remoteEndpointType:this.tpc.isP2P?ge.backend.endpointType.peer:ge.backend.endpointType.server},n=ge.backend.addNewFabric(this.peerconnection,this.remoteUserID,ge.backend.fabricUsage.multiplex,this.confID,e,ge._addNewFabricCallback);this.hasFabric=!0;const i=n.status==="success";return i||V.error("callstats fabric not initilized",n.message),i}catch(e){return w().callErrorHandler(e),!1}}associateStreamWithVideoTag(e,n,i,s,c){if(!ge.backend)return;const u=n?ge.userID:i;ge.backendInitialized?ge.backend.associateMstWithUserID(this.peerconnection,u,this.confID,e,s,c):ge.reportsQueue.push({type:le,pc:this.peerconnection,data:{callStatsId:u,containerId:c,ssrc:e,usageLabel:s}})}sendDominantSpeakerEvent(){ge._reportEvent(this,"dominantSpeaker")}sendTerminateEvent(){ge.backendInitialized&&ge.backend.sendFabricEvent(this.peerconnection,ge.backend.fabricEvent.fabricTerminated,this.confID),ge.fabrics.delete(this)}sendIceConnectionFailedEvent(){ge._reportError(this,"iceConnectionFailure",null,this.peerconnection)}sendCreateOfferFailed(e){ge._reportError(this,"createOffer",e,this.peerconnection)}sendCreateAnswerFailed(e){ge._reportError(this,"createAnswer",e,this.peerconnection)}sendResumeOrHoldEvent(e){ge._reportEvent(this,e?"fabricResume":"fabricHold")}sendScreenSharingEvent(e,n){let i;n&&(i={ssrc:n}),ge._reportEvent(this,e?"screenShareStart":"screenShareStop",i)}sendSetLocalDescFailed(e){ge._reportError(this,"setLocalDescription",e,this.peerconnection)}sendSetRemoteDescFailed(e){ge._reportError(this,"setRemoteDescription",e,this.peerconnection)}sendAddIceCandidateFailed(e){ge._reportError(this,"addIceCandidate",e,this.peerconnection)}}ge.backend=null,ge.reportsQueue=[],ge.backendInitialized=!1,ge.callStatsID=null,ge.callStatsSecret=null,ge.userID=null,window.AudioContext=window.AudioContext||window.webkitAudioContext;let nt=null;function dt(r,e,n){this.stream=r,this.intervalId=null,this.intervalMilis=e,this.audioLevel=0,this.callback=n}function It(r){let e=r;return r>=Number.MAX_SAFE_INTEGER&&(e=0),e+1}function kt(r){return r.length>0?r.reduce((e,n)=>e+n)/r.length:0}function Nt(r){return r.filter(e=>e>=0)}window.AudioContext&&(nt=new AudioContext,nt.suspend&&nt.suspend()),dt.prototype.start=function(){if(!dt.isLocalStatsSupported())return;nt.resume();const r=nt.createAnalyser();r.smoothingTimeConstant=.8,r.fftSize=2048,nt.createMediaStreamSource(this.stream).connect(r),this.intervalId=setInterval(()=>{const e=new Uint8Array(r.frequencyBinCount);r.getByteTimeDomainData(e);const n=function(i){let s=0;const c=i.length;for(let u=0;u<c;u++)s<i[u]&&(s=i[u]);return parseFloat(((s-127)/128).toFixed(3))}(e);this.audioLevel=function(i,s){let c=0;const u=s-i;return c=u>.2?s-.2:u<-.4?s+.4:i,parseFloat(c.toFixed(3))}(n,this.audioLevel),this.callback(this.audioLevel)},this.intervalMilis)},dt.prototype.stop=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},dt.isLocalStatsSupported=function(){return Boolean(nt)};class vt{constructor(){this.average=0,this.n=0}addNext(e){typeof e=="number"&&(this.n+=1,this.average=this.average+(e-this.average)/this.n)}getAverage(){return this.average}}const cn=(0,P.getLogger)("modules/statistics/PerformanceObserverStats.js");class Wt{constructor(e,n){this.eventEmitter=e,this.longTasks=0,this.maxDuration=0,this.performanceStatsInterval=n,this.stats=new vt}getLongTasksStats(){return{avgRatePerMinute:(60*this.stats.getAverage()).toFixed(2),maxDurationMs:this.maxDuration}}startObserver(){this.longTaskEventHandler=n=>{const i=n.getEntries();for(const s of i)this.longTasks++,this.maxDuration=Math.max(this.maxDuration,s.duration).toFixed(3)},cn.info("Creating a Performance Observer for monitoring Long Tasks"),this.observer=new PerformanceObserver(this.longTaskEventHandler),this.observer.observe({type:"longtask",buffered:!0});const e=Date.now();this.longTasksIntervalId=setInterval(()=>{const n=Date.now(),i=this._lastTimeStamp?(n-this._lastTimeStamp)/1e3:(n-e)/1e3,s=this.longTasks/i;this.stats.addNext(s),this.eventEmitter.emit(Ui,this.getLongTasksStats()),this.longTasks=0,this._lastTimeStamp=Date.now()},this.performanceStatsInterval)}stopObserver(){this.observer&&this.observer.disconnect(),this.longTaskEventHandler=null,this.longTasksIntervalId&&(clearInterval(this.longTasksIntervalId),this.longTasksIntervalId=null)}}const Xe="audio",pn="presenter",Rt="video",Pn=o(1023),gr=(0,P.getLogger)("modules/statistics/RTPStatsCollector.js");function vr(r,e){return!e||e<=0||!r||r<=0?0:Math.round(r/e*100)}function Gn(){this.loss={},this.bitrate={download:0,upload:0},this.resolution={},this.framerate=0,this.codec=""}function br(){this.bandwidth={},this.bitrate={},this.packetLoss=null,this.transport=[]}function bn(r,e,n,i){this.peerconnection=r,this.baselineAudioLevelsReport=null,this.currentAudioLevelsReport=null,this.currentStatsReport=null,this.previousStatsReport=null,this.audioLevelReportHistory={},this.audioLevelsIntervalId=null,this.eventEmitter=i,this.conferenceStats=new br,this.audioLevelsIntervalMilis=e,this.speakerList=[],this.statsIntervalId=null,this.statsIntervalMilis=n,this.ssrc2stats=new Map}Gn.prototype.setLoss=function(r){this.loss=r||{}},Gn.prototype.setResolution=function(r){this.resolution=r||{}},Gn.prototype.addBitrate=function(r){this.bitrate.download+=r.download,this.bitrate.upload+=r.upload},Gn.prototype.resetBitrate=function(){this.bitrate.download=0,this.bitrate.upload=0},Gn.prototype.setFramerate=function(r){this.framerate=r||0},Gn.prototype.setCodec=function(r){this.codec=r||""},bn.prototype.setSpeakerList=function(r){this.speakerList=r},bn.prototype.stop=function(){this.audioLevelsIntervalId&&(clearInterval(this.audioLevelsIntervalId),this.audioLevelsIntervalId=null),this.statsIntervalId&&(clearInterval(this.statsIntervalId),this.statsIntervalId=null)},bn.prototype.errorCallback=function(r){Pn.callErrorHandler(r),gr.error("Get stats error",r),this.stop()},bn.prototype.start=function(r){r&&(E.supportsReceiverStats()&&gr.info("Using RTCRtpSynchronizationSource for remote audio levels"),this.audioLevelsIntervalId=setInterval(()=>{if(E.supportsReceiverStats()){const n=this.peerconnection.getAudioLevels(this.speakerList);for(const i in n)if(n.hasOwnProperty(i)){const s=2.5*n[i];this.eventEmitter.emit(Bi,this.peerconnection,Number.parseInt(i,10),s,!1)}}else this.peerconnection.getStats().then(n=>{this.currentAudioLevelsReport=typeof(n==null?void 0:n.result)=="function"?n.result():n,this.processAudioLevelReport(),this.baselineAudioLevelsReport=this.currentAudioLevelsReport}).catch(n=>this.errorCallback(n))},this.audioLevelsIntervalMilis));const e=()=>{this.peerconnection.getStats().then(n=>{this.currentStatsReport=typeof(n==null?void 0:n.result)=="function"?n.result():n;try{this.processStatsReport()}catch(i){Pn.callErrorHandler(i),gr.error("Processing of RTP stats failed:",i)}this.previousStatsReport=this.currentStatsReport}).catch(n=>this.errorCallback(n))};e(),this.statsIntervalId=setInterval(e,this.statsIntervalMilis)},bn.prototype._processAndEmitReport=function(){const r={download:0,upload:0},e={download:0,upload:0};let n=0,i=0;const s={},c={},u={};let b,L,N=0,X=0,de=0,Ie=0;for(const[ze,it]of this.ssrc2stats){const At=it.loss,$t=At.isDownloadStream?"download":"upload";r[$t]+=At.packetsTotal,e[$t]+=At.packetsLost,n+=it.bitrate.download,i+=it.bitrate.upload;const wn=this.peerconnection.getTrackBySSRC(ze);if(wn){wn.isAudioTrack()?(N+=it.bitrate.download,X+=it.bitrate.upload,b=it.codec):(de+=it.bitrate.download,Ie+=it.bitrate.upload,L=it.codec);const Fn=wn.getParticipantId();if(Fn){const $n=it.resolution;if($n.width&&$n.height&&$n.width!==-1&&$n.height!==-1){const Zn=s[Fn]||{};Zn[ze]=$n,s[Fn]=Zn}if(it.framerate!==0){const Zn=c[Fn]||{};Zn[ze]=it.framerate,c[Fn]=Zn}if(b&&L){const Zn={audio:b,video:L},si=u[Fn]||{};si[ze]=Zn,u[Fn]=si}}else gr.error(`No participant ID returned by ${wn}`)}it.resetBitrate()}this.conferenceStats.bitrate={upload:i,download:n},this.conferenceStats.bitrate.audio={upload:X,download:N},this.conferenceStats.bitrate.video={upload:Ie,download:de},this.conferenceStats.packetLoss={total:vr(e.download+e.upload,r.download+r.upload),download:vr(e.download,r.download),upload:vr(e.upload,r.upload)};const $e={};let ut;Object.keys(this.audioLevelReportHistory).forEach(ze=>{const{data:it,isLocal:At}=this.audioLevelReportHistory[ze],$t=it.reduce((wn,Fn)=>wn+Fn)/it.length;if(At)ut=$t;else{const wn=this.peerconnection.getTrackBySSRC(Number(ze));if(wn){const Fn=wn.getParticipantId();Fn&&($e[Fn]=$t)}}}),this.audioLevelReportHistory={},this.eventEmitter.emit(ur,this.peerconnection,{bandwidth:this.conferenceStats.bandwidth,bitrate:this.conferenceStats.bitrate,packetLoss:this.conferenceStats.packetLoss,resolution:s,framerate:c,codec:u,transport:this.conferenceStats.transport,localAvgAudioLevels:ut,avgAudioLevels:$e}),this.conferenceStats.transport=[]},bn.prototype.getNonNegativeValue=function(r){let e=r;return typeof e!="number"&&(e=Number(e)),isNaN(e)?0:Math.max(0,e)},bn.prototype._calculateBitrate=function(r,e,n){const i=this.getNonNegativeValue(r[n]),s=this.getNonNegativeValue(e[n]),c=Math.max(0,i-s),u=r.timestamp-e.timestamp;let b=0;return u>0&&(b=Math.round(8*c/u)),b},bn.prototype.processStatsReport=function(){if(!this.previousStatsReport)return;const r={};this.currentStatsReport.forEach(e=>{if(e.type==="candidate-pair"&&e.nominated&&e.state==="succeeded"){const n=e.availableIncomingBitrate,i=e.availableOutgoingBitrate;(n||i)&&(this.conferenceStats.bandwidth={download:Math.round(n/1e3),upload:Math.round(i/1e3)});const s=this.currentStatsReport.get(e.remoteCandidateId),c=this.currentStatsReport.get(e.localCandidateId);if(s&&c){const u=`${E.isChromiumBased()?s.ip:s.address}:${s.port}`,b=`${E.isChromiumBased()?c.ip:c.address}:${c.port}`,L=s.protocol,N=this.conferenceStats.transport;N.some(X=>X.ip===u&&X.type===L&&X.localip===b)||N.push({ip:u,type:L,localip:b,p2p:this.peerconnection.isP2P,localCandidateType:c.candidateType,remoteCandidateType:s.candidateType,networkType:c.networkType,rtt:1e3*e.currentRoundTripTime})}}else if(e.type==="inbound-rtp"||e.type==="outbound-rtp"){const n=this.previousStatsReport.get(e.id),i=this.getNonNegativeValue(e.ssrc);if(!n||!i)return;let s=this.ssrc2stats.get(i);s||(s=new Gn,this.ssrc2stats.set(i,s));let c=!0,u="packetsReceived";e.type==="outbound-rtp"&&(c=!1,u="packetsSent");let b=e[u];(!b||b<0)&&(b=0);const L=this.getNonNegativeValue(n[u]),N=Math.max(0,b-L),X=this.getNonNegativeValue(e.packetsLost),de=this.getNonNegativeValue(n.packetsLost),Ie=Math.max(0,X-de);if(s.setLoss({packetsTotal:N+Ie,packetsLost:Ie,isDownloadStream:c}),e.type==="inbound-rtp"){const ut={height:e.frameHeight,width:e.frameWidth},ze=e.framesPerSecond;ut.height&&ut.width&&s.setResolution(ut),s.setFramerate(Math.round(ze||0)),s.addBitrate({download:this._calculateBitrate(e,n,"bytesReceived"),upload:0})}else r[i]=this.getNonNegativeValue(e.bytesSent),s.addBitrate({download:0,upload:this._calculateBitrate(e,n,"bytesSent")});const $e=this.currentStatsReport.get(e.codecId);if($e){const ut=$e.mimeType.split("/")[1];ut&&s.setCodec(ut)}}else if(e.type==="track"&&e.kind===Rt&&!e.remoteSource){const n={height:e.frameHeight,width:e.frameWidth},i=this.peerconnection.getLocalTracks(Rt);if(i==null||!i.length)return;const s=this.peerconnection.getLocalSSRC(i[0]);if(!s)return;let c=this.ssrc2stats.get(s);c||(c=new Gn,this.ssrc2stats.set(s,c)),n.height&&n.width&&c.setResolution(n);let u=e.framesPerSecond;if(!u){const L=this.previousStatsReport.get(e.id);if(L){const N=e.timestamp-L.timestamp;N>0&&e.framesSent&&(u=(e.framesSent-L.framesSent)/N*1e3)}if(!u)return}const b=this.peerconnection.getActiveSimulcastStreams();u=b?Math.round(u/b):0,c.setFramerate(u)}}),this.eventEmitter.emit($i,this.peerconnection,r),this._processAndEmitReport()},bn.prototype.processAudioLevelReport=function(){this.baselineAudioLevelsReport&&this.currentAudioLevelsReport.forEach(r=>{if(r.type!=="track")return;const e=r.audioLevel;if(!e)return;const n=r.trackIdentifier,i=this.peerconnection.getSsrcByTrackId(n);if(i){const s=i===this.peerconnection.getLocalSSRC(this.peerconnection.getLocalTracks(Xe));this.eventEmitter.emit(Bi,this.peerconnection,i,e,s)}})};const rn=o(9077).getLogger("modules/statistics/statistics.js");let lr,Pr=!1;function Ur(r){ge.isBackendInitialized()||ge.initBackend({callStatsID:r.callStatsID,callStatsSecret:r.callStatsSecret,userName:r.userName,aliasName:r.aliasName,applicationName:r.applicationName,getWiFiStatsMethod:r.getWiFiStatsMethod,confID:r.confID,siteID:r.siteID,configParams:r.configParams})||rn.error("CallStats Backend initialization failed bad")}function Be(r,e){this.rtpStatsMap=new Map,this.eventEmitter=new(on()),this.xmpp=r,this.options=e||{},this.callStatsIntegrationEnabled=this.options.callStatsID&&this.options.callStatsSecret&&this.options.enableCallStats&&Be.disableThirdPartyRequests!==!0,this.callStatsIntegrationEnabled&&(this.callStatsApplicationLogsDisabled=this.options.callStatsApplicationLogsDisabled,E.isReactNative()?Ur(this.options):function(n){Pr||(Q().loadScript(n.customScriptUrl||dr,!0,!0,void 0,()=>Ur(n)),Pr=!0)}(this.options),this.options.confID||rn.warn('"confID" is not defined')),this.callsStatsInstances=new Map,Be.instances.add(this)}Be.init=function(r){Be.audioLevelsEnabled=!r.disableAudioLevels,typeof r.pcStatsInterval=="number"&&(Be.pcStatsInterval=r.pcStatsInterval),typeof r.audioLevelsInterval=="number"&&(Be.audioLevelsInterval=r.audioLevelsInterval),typeof r.longTasksStatsInterval=="number"&&(Be.longTasksStatsInterval=r.longTasksStatsInterval),Be.disableThirdPartyRequests=r.disableThirdPartyRequests},Be.audioLevelsEnabled=!1,Be.audioLevelsInterval=200,Be.pcStatsInterval=1e4,Be.disableThirdPartyRequests=!1,Be.analytics=F,Object.defineProperty(Be,"instances",{get:()=>(lr||(lr=new Set),lr)}),Be.prototype.startRemoteStats=function(r){this.stopRemoteStats(r);try{const e=new bn(r,Be.audioLevelsInterval,Be.pcStatsInterval,this.eventEmitter);e.start(Be.audioLevelsEnabled),this.rtpStatsMap.set(r.id,e)}catch(e){rn.error(`Failed to start collecting remote statistics: ${e}`)}},Be.localStats=[],Be.startLocalStats=function(r,e){if(!Be.audioLevelsEnabled)return;const n=new dt(r,Be.audioLevelsInterval,e);this.localStats.push(n),n.start()},Be.prototype.addAudioLevelListener=function(r){Be.audioLevelsEnabled&&this.eventEmitter.on(Bi,r)},Be.prototype.removeAudioLevelListener=function(r){Be.audioLevelsEnabled&&this.eventEmitter.removeListener(Bi,r)},Be.prototype.addBeforeDisposedListener=function(r){this.eventEmitter.on(wi,r)},Be.prototype.removeBeforeDisposedListener=function(r){this.eventEmitter.removeListener(wi,r)},Be.prototype.addConnectionStatsListener=function(r){this.eventEmitter.on(ur,r)},Be.prototype.removeConnectionStatsListener=function(r){this.eventEmitter.removeListener(ur,r)},Be.prototype.addByteSentStatsListener=function(r){this.eventEmitter.on($i,r)},Be.prototype.removeByteSentStatsListener=function(r){this.eventEmitter.removeListener($i,r)},Be.prototype.addLongTasksStatsListener=function(r){this.eventEmitter.on(Ui,r)},Be.prototype.attachLongTasksStats=function(r){E.supportsPerformanceObserver()?(this.performanceObserverStats=new Wt(this.eventEmitter,Be.longTasksStatsInterval),r.on(B,()=>this.performanceObserverStats.startObserver()),r.on(Y,()=>this.performanceObserverStats.stopObserver())):rn.warn("Performance observer for long tasks not supported by browser!")},Be.prototype.getLongTasksStats=function(){return this.performanceObserverStats?this.performanceObserverStats.getLongTasksStats():null},Be.prototype.removeLongTasksStatsListener=function(r){this.eventEmitter.removeListener(Ui,r)},Be.prototype.setSpeakerList=function(r){for(const e of Array.from(this.rtpStatsMap.values()))e.peerconnection.isP2P||e.setSpeakerList(r)},Be.prototype.dispose=function(){try{this.callsStatsInstances.size||this.eventEmitter.emit(wi);for(const r of this.callsStatsInstances.values())this.stopCallStats(r.tpc);for(const r of this.rtpStatsMap.keys())this._stopRemoteStats(r);this.eventEmitter&&this.eventEmitter.removeAllListeners()}finally{Be.instances.delete(this)}},Be.stopLocalStats=function(r){if(Be.audioLevelsEnabled){for(let e=0;e<Be.localStats.length;e++)if(Be.localStats[e].stream===r){Be.localStats.splice(e,1)[0].stop();break}}},Be.prototype._stopRemoteStats=function(r){const e=this.rtpStatsMap.get(r);e&&(e.stop(),this.rtpStatsMap.delete(r))},Be.prototype.stopRemoteStats=function(r){this._stopRemoteStats(r.id)},Be.prototype.startCallStats=function(r,e){if(!this.callStatsIntegrationEnabled)return;if(this.callsStatsInstances.has(r.id))return void rn.error("CallStats instance for ${tpc} exists already");rn.info(`Starting CallStats for ${r}...`);const n=new ge(r,{confID:this.options.confID,remoteUserID:e});this.callsStatsInstances.set(r.id,n)},Be._getAllCallStatsInstances=function(){const r=new Set;for(const e of Be.instances)for(const n of e.callsStatsInstances.values())r.add(n);return r},Be.prototype.stopCallStats=function(r){const e=this.callsStatsInstances.get(r.id);e&&(this.callsStatsInstances.size===1&&this.eventEmitter.emit(wi),this.callsStatsInstances.delete(r.id),e.sendTerminateEvent())},Be.prototype.isCallstatsEnabled=function(){return this.callStatsIntegrationEnabled},Be.prototype.sendConnectionResumeOrHoldEvent=function(r,e){const n=this.callsStatsInstances.get(r.id);n&&n.sendResumeOrHoldEvent(e)},Be.prototype.sendIceConnectionFailedEvent=function(r){const e=this.callsStatsInstances.get(r.id);e&&e.sendIceConnectionFailedEvent()},Be.prototype.sendMuteEvent=function(r,e,n){const i=r&&this.callsStatsInstances.get(r.id);ge.sendMuteEvent(e,n,i)},Be.prototype.sendScreenSharingEvent=function(r,e){for(const n of this.callsStatsInstances.values())n.sendScreenSharingEvent(r,e)},Be.prototype.sendDominantSpeakerEvent=function(r){for(const e of this.callsStatsInstances.values())e.sendDominantSpeakerEvent();this.xmpp.sendDominantSpeakerEvent(r)},Be.sendActiveDeviceListEvent=function(r){const e=Be._getAllCallStatsInstances();if(e.size)for(const n of e)ge.sendActiveDeviceListEvent(r,n);else ge.sendActiveDeviceListEvent(r,null)},Be.prototype.associateStreamWithVideoTag=function(r,e,n,i,s,c){const u=this.callsStatsInstances.get(r.id);u&&u.associateStreamWithVideoTag(e,n,i,s,c)},Be.sendGetUserMediaFailed=function(r){const e=r instanceof Qn?function(i){const s=new Error;return s.stack=i.stack,s.name=(i.name||"Unknown error")+(i.gum&&i.gum.error&&i.gum.error.name?` - ${i.gum.error.name}`:""),s.constraintName=i.gum&&i.gum.constraints?JSON.stringify(i.gum.constraints):"",s.message=i.message,s}(r):r,n=Be._getAllCallStatsInstances();if(n.size)for(const i of n)ge.sendGetUserMediaFailed(e,i);else ge.sendGetUserMediaFailed(e,null)},Be.prototype.sendCreateOfferFailed=function(r,e){const n=this.callsStatsInstances.get(e.id);n&&n.sendCreateOfferFailed(r)},Be.prototype.sendCreateAnswerFailed=function(r,e){const n=this.callsStatsInstances.get(e.id);n&&n.sendCreateAnswerFailed(r)},Be.prototype.sendSetLocalDescFailed=function(r,e){const n=this.callsStatsInstances.get(e.id);n&&n.sendSetLocalDescFailed(r)},Be.prototype.sendSetRemoteDescFailed=function(r,e){const n=this.callsStatsInstances.get(e.id);n&&n.sendSetRemoteDescFailed(r)},Be.prototype.sendAddIceCandidateFailed=function(r,e){const n=this.callsStatsInstances.get(e.id);n&&n.sendAddIceCandidateFailed(r)},Be.sendLog=function(r){const e=new Set;for(const n of Be.instances){if(n.callStatsApplicationLogsDisabled)return;n.callsStatsInstances.size&&e.add(n.callsStatsInstances.values().next().value)}if(e.size)for(const n of e)ge.sendApplicationLog(r,n);else ge.sendApplicationLog(r,null)},Be.prototype.sendFeedback=function(r,e){return Be.analytics.sendEvent("feedback",{rating:r,comment:e}),ge.sendFeedback(this.options.confID,r,e)},Be.LOCAL_JID=o(4806).LOCAL_JID,Be.reportGlobalError=function(r){r instanceof Qn&&r.gum?Be.sendGetUserMediaFailed(r):Be.sendLog(r)},Be.sendAnalyticsAndLog=function(r){let e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r?(e=typeof r=="object"?r:{name:r,properties:n},rn.log(JSON.stringify(e)),this.analytics.sendEvent(r,n)):rn.warn("No event or event name given.")},Be.sendAnalytics=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.analytics.sendEvent(r,e)};var Jn=o(4832),hr=o.n(Jn),Or=o(1645),Mt=o.n(Or),Ht=o(1122),Nn=o.n(Ht),as=o(3514),xo=o.n(as),Er=o(4188),Je=o.n(Er);const bi=(0,P.getLogger)("JitsiConferenceEventManager.js");function Pi(r){this.conference=r,this.xmppListeners={},r.on(Ot,e=>{if(!e.isLocal()||!r.statistics)return;const n=e.isP2P?r.p2pJingleSession:r.jvbJingleSession,i=n&&n.peerconnection||null;r.statistics.sendMuteEvent(i,e.isMuted(),e.getType())})}Pi.prototype.setupChatRoomListeners=function(){const r=this.conference,e=r.room;this.chatRoomForwarder=new(hr())(e,this.conference.eventEmitter),e.addListener(Je().ICE_RESTARTING,n=>{n.isP2P||r.rtc.closeBridgeChannel()}),e.addListener(Je().PARTICIPANT_FEATURES_CHANGED,(n,i)=>{const s=r.getParticipantById(qe.Strophe.getResourceFromJid(n));s&&(s.setFeatures(i),r.eventEmitter.emit(lt,s))}),e.addListener(Je().ICE_RESTART_SUCCESS,(n,i)=>{!n.isP2P&&r._setBridgeChannel(i,n.peerconnection)}),e.addListener(Je().AUDIO_MUTED_BY_FOCUS,n=>{Be.sendAnalytics(Ai(Xe)),r.mutedByFocusActor=n,r.rtc.setAudioMute(!0).then(()=>{r.isMutedByFocus=!0,r.mutedByFocusActor=null}).catch(i=>{r.mutedByFocusActor=null,bi.warn("Error while audio muting due to focus request",i)})}),e.addListener(Je().VIDEO_MUTED_BY_FOCUS,n=>{Be.sendAnalytics(Ai(Rt)),r.mutedVideoByFocusActor=n,r.rtc.setVideoMute(!0).then(()=>{r.isVideoMutedByFocus=!0,r.mutedVideoByFocusActor=null}).catch(i=>{r.mutedVideoByFocusActor=null,bi.warn("Error while video muting due to focus request",i)})}),this.chatRoomForwarder.forward(Je().SUBJECT_CHANGED,ee),this.chatRoomForwarder.forward(Je().MUC_JOINED,B),this.chatRoomForwarder.forward(Je().MUC_JOIN_IN_PROGRESS,T),this.chatRoomForwarder.forward(Je().MEETING_ID_SET,fe),e.addListener(Je().MUC_JOINED,()=>{this.conference._onMucJoined(),this.conference.isJvbConnectionInterrupted=!1,Object.keys(e.connectionTimes).forEach(n=>{const i=zr(`conference_${n}`,{value:e.connectionTimes[n]});Be.sendAnalytics(i)}),Object.keys(e.xmpp.connectionTimes).forEach(n=>{const i=zr(`xmpp_${n}`,{value:e.xmpp.connectionTimes[n]});Be.sendAnalytics(i)})}),e.addListener(Je().RENEGOTIATION_FAILED,(n,i)=>{i.isP2P||r.eventEmitter.emit(Re,Qe,n)}),this.chatRoomForwarder.forward(Je().ROOM_JOIN_ERROR,Re,Te),this.chatRoomForwarder.forward(Je().ROOM_CONNECT_ERROR,Re,Te),this.chatRoomForwarder.forward(Je().ROOM_CONNECT_NOT_ALLOWED_ERROR,Re,st),this.chatRoomForwarder.forward(Je().ROOM_CONNECT_MEMBERS_ONLY_ERROR,Re,_e),this.chatRoomForwarder.forward(Je().ROOM_MAX_USERS_ERROR,Re,be),this.chatRoomForwarder.forward(Je().PASSWORD_REQUIRED,Re,f),this.chatRoomForwarder.forward(Je().AUTHENTICATION_REQUIRED,Re,ue),this.chatRoomForwarder.forward(Je().BRIDGE_DOWN,Re,H),e.addListener(Je().BRIDGE_DOWN,()=>Be.sendAnalytics(function(){const n="bridge.down";return{action:n,actionSubject:n,type:ar}}())),e.addListener(Je().CONNECTION_RESTARTED,n=>{r._onConferenceRestarted(n)}),this.chatRoomForwarder.forward(Je().RESERVATION_ERROR,Re,D),this.chatRoomForwarder.forward(Je().GRACEFUL_SHUTDOWN,Re,Ze),e.addListener(Je().CONNECTION_ICE_FAILED,n=>{r._onIceConnectionFailed(n)}),this.chatRoomForwarder.forward(Je().MUC_DESTROYED,Re,rt),this.chatRoomForwarder.forward(Je().CHAT_ERROR_RECEIVED,Se,pe),this.chatRoomForwarder.forward(Je().SETTINGS_ERROR_RECEIVED,Se,Me),this.chatRoomForwarder.forward(Je().FOCUS_DISCONNECTED,Re,Ye),e.addListener(Je().FOCUS_LEFT,()=>{Be.sendAnalytics(function(){const n="focus.left";return{action:n,actionSubject:n,type:ar}}()),r.eventEmitter.emit(Re,ne)}),e.addListener(Je().SESSION_ACCEPT_TIMEOUT,n=>{Be.sendAnalyticsAndLog(Gr("session-accept.timeout",{p2p:n.isP2P}))}),e.addListener(Je().RECORDER_STATE_CHANGED,(n,i)=>{if(i){const s=qe.Strophe.getResourceFromJid(i),c=r.getParticipantById(s)||s;n.getStatus()==="off"?n.setTerminator(c):n.getStatus()==="on"&&n.setInitiator(c)}r.eventEmitter.emit(or,n)}),this.chatRoomForwarder.forward(Je().TRANSCRIPTION_STATUS_CHANGED,Tt),this.chatRoomForwarder.forward(Je().VIDEO_SIP_GW_AVAILABILITY_CHANGED,dn),this.chatRoomForwarder.forward(Je().VIDEO_SIP_GW_SESSION_STATE_CHANGED,mt),this.chatRoomForwarder.forward(Je().PHONE_NUMBER_CHANGED,er),e.setParticipantPropertyListener((n,i)=>{const s=r.getParticipantById(i);s&&s.setProperty(n.tagName.substring(18),n.value)}),e.addListener(Je().KICKED,r.onMemberKicked.bind(r)),e.addListener(Je().SUSPEND_DETECTED,r.onSuspendDetected.bind(r)),this.chatRoomForwarder.forward(Je().MUC_LOCK_CHANGED,K),this.chatRoomForwarder.forward(Je().MUC_MEMBERS_ONLY_CHANGED,J),e.addListener(Je().MUC_MEMBER_JOINED,r.onMemberJoined.bind(r)),this.chatRoomForwarder.forward(Je().MUC_LOBBY_MEMBER_JOINED,ot),this.chatRoomForwarder.forward(Je().MUC_LOBBY_MEMBER_UPDATED,Et),this.chatRoomForwarder.forward(Je().MUC_LOBBY_MEMBER_LEFT,Pt),e.addListener(Je().MUC_MEMBER_BOT_TYPE_CHANGED,r._onMemberBotTypeChanged.bind(r)),e.addListener(Je().MUC_MEMBER_LEFT,r.onMemberLeft.bind(r)),this.chatRoomForwarder.forward(Je().MUC_LEFT,Y),this.chatRoomForwarder.forward(Je().MUC_DENIED_ACCESS,Re,Oe),e.addListener(Je().DISPLAY_NAME_CHANGED,r.onDisplayNameChanged.bind(r)),e.addListener(Je().LOCAL_ROLE_CHANGED,n=>{r.onLocalRoleChanged(n),r.statistics&&r.isModerator()&&r.on(or,i=>{const s={error:i.getError(),id:"recorder_status",status:i.getStatus()};Be.sendLog(JSON.stringify(s))})}),e.addListener(Je().MUC_ROLE_CHANGED,r.onUserRoleChanged.bind(r)),e.addListener(xo().IDENTITY_UPDATED,(n,i)=>{r.authEnabled=n,r.authIdentity=i,r.eventEmitter.emit(Ae,n,i)}),e.addListener(Je().MESSAGE_RECEIVED,(n,i,s,c)=>{const u=qe.Strophe.getResourceFromJid(n);r.eventEmitter.emit(Z,u,i,c)}),e.addListener(Je().PRIVATE_MESSAGE_RECEIVED,(n,i,s,c)=>{const u=qe.Strophe.getResourceFromJid(n);r.eventEmitter.emit(at,u,i,c)}),e.addListener(Je().PRESENCE_STATUS,(n,i)=>{const s=qe.Strophe.getResourceFromJid(n),c=r.getParticipantById(s);c&&c._status!==i&&(c._status=i,r.eventEmitter.emit(Wn,s,i))}),e.addListener(Je().JSON_MESSAGE_RECEIVED,(n,i)=>{const s=qe.Strophe.getResourceFromJid(n),c=r.getParticipantById(s);c?r.eventEmitter.emit(Yt,c,i):r.eventEmitter.emit(ke,s,i)}),e.addPresenceListener("startmuted",(n,i)=>{let s=!1;if(r.myUserId()===i&&r.isModerator())s=!0;else{const L=r.getParticipantById(i);L&&L.isModerator()&&(s=!0)}if(!s)return;const c=n.attributes.audio==="true",u=n.attributes.video==="true";let b=!1;c!==r.startMutedPolicy.audio&&(r.startMutedPolicy.audio=c,b=!0),u!==r.startMutedPolicy.video&&(r.startMutedPolicy.video=u,b=!0),b&&r.eventEmitter.emit(Xt,r.startMutedPolicy)}),r.statistics&&(e.addListener(Je().CONNECTION_ICE_FAILED,n=>{r.statistics.sendIceConnectionFailedEvent(n.peerconnection)}),e.addListener(Je().ADD_ICE_CANDIDATE_FAILED,(n,i)=>{r.statistics.sendAddIceCandidateFailed(n,i)})),this.chatRoomForwarder.forward(Je().BREAKOUT_ROOMS_MOVE_TO_ROOM,Zt),this.chatRoomForwarder.forward(Je().BREAKOUT_ROOMS_UPDATED,En)},Pi.prototype.setupRTCListeners=function(){const r=this.conference,e=r.rtc;e.addListener(Mt().REMOTE_TRACK_ADDED,r.onRemoteTrackAdded.bind(r)),e.addListener(Mt().REMOTE_TRACK_REMOVED,r.onRemoteTrackRemoved.bind(r)),e.addListener(Mt().DOMINANT_SPEAKER_CHANGED,(n,i)=>{if(r.lastDominantSpeaker!==n&&r.room){if(r.lastDominantSpeaker=n,r.eventEmitter.emit(Ue,n,i),i&&i.length){const s=i.slice(0);r.myUserId!==n&&s.splice(0,0,n),s.length>5&&s.splice(5,s.length-5),r.statistics&&r.statistics.setSpeakerList(s)}r.statistics&&r.myUserId()===n&&r.statistics.sendDominantSpeakerEvent(r.room.roomjid)}}),e.addListener(Mt().DATA_CHANNEL_OPEN,()=>{const n=window.performance.now(),i="data.channel.opened";bi.log(`(TIME) ${i}: `,n),r.room.connectionTimes[i]=n,Be.sendAnalytics(zr(i,{value:n})),r.eventEmitter.emit(jt)}),e.addListener(Mt().ENDPOINT_MESSAGE_RECEIVED,(n,i)=>{const s=r.getParticipantById(n);s?r.eventEmitter.emit(Yt,s,i):bi.warn(`Ignored ENDPOINT_MESSAGE_RECEIVED for not existing participant: ${n}`,i)}),e.addListener(Mt().ENDPOINT_STATS_RECEIVED,(n,i)=>{const s=r.getParticipantById(n);s?r.eventEmitter.emit(Gt,s,i):bi.warn(`Ignoring ENDPOINT_STATS_RECEIVED for a non-existant participant: ${n}`)}),e.addListener(Mt().LOCAL_UFRAG_CHANGED,(n,i)=>{n.isP2P||Be.sendLog(JSON.stringify({id:"local_ufrag",value:i}))}),e.addListener(Mt().REMOTE_UFRAG_CHANGED,(n,i)=>{n.isP2P||Be.sendLog(JSON.stringify({id:"remote_ufrag",value:i}))}),e.addListener(Mt().CREATE_ANSWER_FAILED,(n,i)=>{r.statistics.sendCreateAnswerFailed(n,i),i.isP2P||r.eventEmitter.emit(Re,Qe,n)}),e.addListener(Mt().CREATE_OFFER_FAILED,(n,i)=>{r.statistics.sendCreateOfferFailed(n,i),i.isP2P||r.eventEmitter.emit(Re,Qe,n)}),e.addListener(Mt().SET_LOCAL_DESCRIPTION_FAILED,(n,i)=>{r.statistics.sendSetLocalDescFailed(n,i),i.isP2P||r.eventEmitter.emit(Re,Qe,n)}),e.addListener(Mt().SET_REMOTE_DESCRIPTION_FAILED,(n,i)=>{r.statistics.sendSetRemoteDescFailed(n,i),i.isP2P||r.eventEmitter.emit(Re,Qe,n)}),e.addListener(Mt().LOCAL_TRACK_SSRC_UPDATED,(n,i)=>{n.isVideoTrack()&&n.videoType===Nn().DESKTOP&&r.statistics.sendScreenSharingEvent(!0,i)})},Pi.prototype.removeXMPPListeners=function(){const r=this.conference;Object.keys(this.xmppListeners).forEach(e=>{r.xmpp.removeListener(e,this.xmppListeners[e])}),this.xmppListeners={}},Pi.prototype.setupXMPPListeners=function(){const r=this.conference;this._addConferenceXMPPListener(Je().CALL_INCOMING,r.onIncomingCall.bind(r)),this._addConferenceXMPPListener(Je().CALL_ACCEPTED,r.onCallAccepted.bind(r)),this._addConferenceXMPPListener(Je().TRANSPORT_INFO,r.onTransportInfo.bind(r)),this._addConferenceXMPPListener(Je().CALL_ENDED,r.onCallEnded.bind(r)),this._addConferenceXMPPListener(Je().START_MUTED_FROM_FOCUS,(e,n)=>{r.options.config.ignoreStartMuted||(r.startAudioMuted=e,r.startVideoMuted=n,r.getLocalTracks().forEach(i=>{switch(i.getType()){case Xe:r.startAudioMuted&&i.mute();break;case Rt:r.startVideoMuted&&i.mute()}}),r.eventEmitter.emit(ae))}),this._addConferenceXMPPListener(Je().CONFERENCE_TIMESTAMP_RECEIVED,e=>{r.eventEmitter.emit(Ct,e)}),this._addConferenceXMPPListener(Je().AV_MODERATION_CHANGED,(e,n,i)=>{const s=r.getParticipants().find(c=>c.getJid()===i);r.eventEmitter.emit(Pe,{enabled:e,mediaType:n,actor:s})}),this._addConferenceXMPPListener(Je().AV_MODERATION_PARTICIPANT_APPROVED,(e,n)=>{const i=r.getParticipantById(qe.Strophe.getResourceFromJid(n));i&&r.eventEmitter.emit(tt,{participant:i,mediaType:e})}),this._addConferenceXMPPListener(Je().AV_MODERATION_PARTICIPANT_REJECTED,(e,n)=>{const i=r.getParticipantById(qe.Strophe.getResourceFromJid(n));i&&r.eventEmitter.emit(St,{participant:i,mediaType:e})}),this._addConferenceXMPPListener(Je().AV_MODERATION_APPROVED,e=>r.eventEmitter.emit(Cn,{mediaType:e})),this._addConferenceXMPPListener(Je().AV_MODERATION_REJECTED,e=>{r.eventEmitter.emit(ln,{mediaType:e})})},Pi.prototype._addConferenceXMPPListener=function(r,e){this.xmppListeners[r]=e,this.conference.xmpp.addListener(r,e)},Pi.prototype.setupStatisticsListeners=function(){const r=this.conference;r.statistics&&(r.statistics.addAudioLevelListener((e,n,i,s)=>{r.rtc.setAudioLevel(e,n,i,s)}),r.statistics.addBeforeDisposedListener(()=>{r.eventEmitter.emit(ce)}),r.options.config.startSilent||r.statistics.addByteSentStatsListener((e,n)=>{r.getLocalTracks(Xe).forEach(i=>{const s=e.getLocalSSRC(i);s&&n.hasOwnProperty(s)&&i.onByteSentStatsReceived(e,n[s])})}))};const cs="track.stopped",Oi="track.audioLevelsChanged",Vi="track.audioOutputChanged",Ci="track.trackMuteChanged",Yi="track.videoTypeChanged",Xr="track.no_data_from_source",Zr="track.no_audio_input",Fr=(0,P.getLogger)("modules/connectivity/ParticipantConnectionStatus.js"),kr={ACTIVE:"active",INACTIVE:"inactive",INTERRUPTED:"interrupted",RESTORING:"restoring"};class Xi{static _getNewStateForJvbMode(e,n,i,s,c){return e?s?kr.ACTIVE:E.supportsVideoMuteOnConnInterrupted()?c?n?i?kr.INTERRUPTED:kr.RESTORING:kr.INACTIVE:kr.ACTIVE:n?kr.ACTIVE:kr.INACTIVE:kr.INTERRUPTED}static _getNewStateForP2PMode(e,n){return E.supportsVideoMuteOnConnInterrupted()?e||!n?kr.ACTIVE:kr.INTERRUPTED:kr.ACTIVE}constructor(e,n,i){this.rtc=e,this.conference=n,this.trackTimers={},this.connStatusFromJvb={},this.outOfLastNTimeout=typeof i.outOfLastNTimeout=="number"?i.outOfLastNTimeout:500,this.p2pRtcMuteTimeout=typeof i.p2pRtcMuteTimeout=="number"?i.p2pRtcMuteTimeout:2500,this.rtcMuteTimeout=typeof i.rtcMuteTimeout=="number"?i.rtcMuteTimeout:1e4,this.rtcMutedTimestamp={},Fr.info(`RtcMuteTimeout set to: ${this.rtcMuteTimeout}`),this.enteredLastNTimestamp=new Map,this.restoringTimers=new Map,this.connectionStatusMap=new Map}_getVideoFrozenTimeout(e){return this.rtc.isInLastN(e)?this.rtcMuteTimeout:this.conference.isP2PActive()?this.p2pRtcMuteTimeout:this.outOfLastNTimeout}init(){this._onEndpointConnStatusChanged=this.onEndpointConnStatusChanged.bind(this),this.rtc.addListener(Mt().ENDPOINT_CONN_STATUS_CHANGED,this._onEndpointConnStatusChanged),this._onP2PStatus=this.refreshConnectionStatusForAll.bind(this),this.conference.on(tn,this._onP2PStatus),this._onUserLeft=this.onUserLeft.bind(this),this.conference.on(In,this._onUserLeft),E.supportsVideoMuteOnConnInterrupted()&&(this._onTrackRtcMuted=this.onTrackRtcMuted.bind(this),this.rtc.addListener(Mt().REMOTE_TRACK_MUTE,this._onTrackRtcMuted),this._onTrackRtcUnmuted=this.onTrackRtcUnmuted.bind(this),this.rtc.addListener(Mt().REMOTE_TRACK_UNMUTE,this._onTrackRtcUnmuted),this._onRemoteTrackAdded=this.onRemoteTrackAdded.bind(this),this.conference.on(et,this._onRemoteTrackAdded),this._onRemoteTrackRemoved=this.onRemoteTrackRemoved.bind(this),this.conference.on(_t,this._onRemoteTrackRemoved),this._onSignallingMuteChanged=this.onSignallingMuteChanged.bind(this),this._onTrackVideoTypeChanged=this.onTrackVideoTypeChanged.bind(this)),this._onLastNChanged=this._onLastNChanged.bind(this),this.conference.on(zt,this._onLastNChanged),this._onLastNValueChanged=this.refreshConnectionStatusForAll.bind(this),this.rtc.on(Mt().LASTN_VALUE_CHANGED,this._onLastNValueChanged)}dispose(){this.rtc.removeListener(Mt().ENDPOINT_CONN_STATUS_CHANGED,this._onEndpointConnStatusChanged),E.supportsVideoMuteOnConnInterrupted()&&(this.rtc.removeListener(Mt().REMOTE_TRACK_MUTE,this._onTrackRtcMuted),this.rtc.removeListener(Mt().REMOTE_TRACK_UNMUTE,this._onTrackRtcUnmuted),this.conference.off(et,this._onRemoteTrackAdded),this.conference.off(_t,this._onRemoteTrackRemoved)),this.conference.off(zt,this._onLastNChanged),this.rtc.removeListener(Mt().LASTN_VALUE_CHANGED,this._onLastNValueChanged),this.conference.off(tn,this._onP2PStatus),this.conference.off(In,this._onUserLeft);const e=Object.keys(this.trackTimers);for(const n of e)this.clearTimeout(n),this.clearRtcMutedTimestamp(n);for(const n in this.connectionStatusMap)this.connectionStatusMap.hasOwnProperty(n)&&this.onUserLeft(n);this.connStatusFromJvb={}}onEndpointConnStatusChanged(e,n){Fr.debug(`Detector RTCEvents.ENDPOINT_CONN_STATUS_CHANGED(${Date.now()}): ${e}: ${n}`),e!==this.conference.myUserId()&&(this.connStatusFromJvb[e]=n,this.figureOutConnectionStatus(e))}_changeConnectionStatus(e,n){if(e.getConnectionStatus()!==n){const i=e.getId();e._setConnectionStatus(n),Fr.debug(`Emit endpoint conn status(${Date.now()}) ${i}: ${n}`),Be.sendLog(JSON.stringify({id:"peer.conn.status",participant:i,status:n})),this.conference.eventEmitter.emit(ft,i,n)}}clearTimeout(e){this.trackTimers[e]&&(window.clearTimeout(this.trackTimers[e]),this.trackTimers[e]=null)}clearRtcMutedTimestamp(e){this.rtcMutedTimestamp[e]=null}onRemoteTrackAdded(e){e.isLocal()||e.getType()!==Rt||(Fr.debug(`Detector on remote track added for: ${e.getParticipantId()}`),e.on(Ci,this._onSignallingMuteChanged),e.on(Yi,n=>this._onTrackVideoTypeChanged(e,n)))}onRemoteTrackRemoved(e){if(!e.isLocal()&&e.getType()===Rt){const n=e.getParticipantId();Fr.debug(`Detector on remote track removed: ${n}`),e.off(Ci,this._onSignallingMuteChanged),this.clearTimeout(n),this.clearRtcMutedTimestamp(n),this.figureOutConnectionStatus(n)}}isVideoTrackFrozen(e){if(!E.supportsVideoMuteOnConnInterrupted())return!1;const n=e.getId(),i=e.hasAnyVideoTrackWebRTCMuted(),s=this.rtcMutedTimestamp[n],c=this._getVideoFrozenTimeout(n);return i&&typeof s=="number"&&Date.now()-s>=c}refreshConnectionStatusForAll(){const e=this.conference.getParticipants();for(const n of e)this.figureOutConnectionStatus(n.getId())}figureOutConnectionStatus(e){const n=this.conference.getParticipantById(e);if(!n)return void Fr.debug(`figure out conn status - no participant for: ${e}`);const i=this.conference.isP2PActive(),s=this._isRestoringTimedout(e),c=this.conference.getLastN()===0,u=n.isVideoMuted()||c,b=this.isVideoTrackFrozen(n),L=this.rtc.isInLastN(e);let N=this.connStatusFromJvb[e];typeof N!="boolean"&&(N=!0);const X=i?Xi._getNewStateForP2PMode(u,b):Xi._getNewStateForJvbMode(N,L,s,u,b);X!==kr.RESTORING&&this._clearRestoringTimer(e),Fr.debug(`Figure out conn status for ${e}, is video muted: ${u} is active(jvb): ${N} video track frozen: ${b} p2p mode: ${i} is in last N: ${L} currentStatus => newStatus: ${n.getConnectionStatus()} => ${X}`);const de=this.connectionStatusMap[e]||{};if(!("p2p"in de)||!("connectionStatus"in de)||de.p2p!==i||de.connectionStatus!==X){const Ie=Date.now();if(this.maybeSendParticipantConnectionStatusEvent(e,Ie),this.connectionStatusMap[e]=fn(Ft({},de),{connectionStatus:X,p2p:i,startedMs:Ie}),!("videoType"in this.connectionStatusMap[e])){const $e=n.getTracksByMediaType(Rt);Array.isArray($e)&&$e.length!==0&&(this.connectionStatusMap[e].videoType=$e[0].videoType)}}this._changeConnectionStatus(n,X)}maybeSendParticipantConnectionStatusEvent(e,n){const i=this.connectionStatusMap[e];i&&"startedMs"in i&&"videoType"in i&&"connectionStatus"in i&&"p2p"in i&&(i.value=n-i.startedMs,Be.sendAnalytics(function(){return{type:ar,source:"peer.conn.status",action:"duration",attributes:arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}}}(i)))}_onLastNChanged(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const i=Date.now();Fr.debug(`LastN endpoints changed leaving=${e}, entering=${n} at ${i}`),E.supportsVideoMuteOnConnInterrupted()||this.refreshConnectionStatusForAll();for(const s of e)this.enteredLastNTimestamp.delete(s),this._clearRestoringTimer(s),E.supportsVideoMuteOnConnInterrupted()&&this.figureOutConnectionStatus(s);for(const s of n)this.enteredLastNTimestamp.set(s,i),E.supportsVideoMuteOnConnInterrupted()&&this.figureOutConnectionStatus(s)}_clearRestoringTimer(e){const n=this.restoringTimers.get(e);n&&(clearTimeout(n),this.restoringTimers.delete(e))}_isRestoringTimedout(e){const n=this.enteredLastNTimestamp.get(e);return!!(n&&Date.now()-n>=1e4)||(this.restoringTimers.get(e)||this.restoringTimers.set(e,setTimeout(()=>this.figureOutConnectionStatus(e),1e4)),!1)}onUserLeft(e){this.maybeSendParticipantConnectionStatusEvent(e,Date.now()),delete this.connectionStatusMap[e]}onTrackRtcMuted(e){const n=e.getParticipantId(),i=this.conference.getParticipantById(n);if(Fr.debug(`Detector track RTC muted: ${n}`,Date.now()),i){if(this.rtcMutedTimestamp[n]=Date.now(),!i.isVideoMuted()){this.clearTimeout(n);const s=this._getVideoFrozenTimeout(n);this.trackTimers[n]=window.setTimeout(()=>{Fr.debug(`Set RTC mute timeout for: ${n} of ${s} ms`),this.clearTimeout(n),this.figureOutConnectionStatus(n)},s)}}else Fr.error(`No participant for id: ${n}`)}onTrackRtcUnmuted(e){const n=e.getParticipantId();Fr.debug(`Detector track RTC unmuted: ${n}`,Date.now()),this.clearTimeout(n),this.clearRtcMutedTimestamp(n),this.figureOutConnectionStatus(n)}onSignallingMuteChanged(e){const n=e.getParticipantId();Fr.debug(`Detector on track signalling mute changed: ${n}`,e.isMuted()),this.figureOutConnectionStatus(n)}onTrackVideoTypeChanged(e,n){const i=e.getParticipantId(),s=Date.now();this.maybeSendParticipantConnectionStatusEvent(i,s),this.connectionStatusMap[i]=fn(Ft({},this.connectionStatusMap[i]||{}),{videoType:n,startedMs:s})}}class ko{constructor(e,n,i,s,c,u,b,L,N){this._jid=e,this._id=qe.Strophe.getResourceFromJid(e),this._conference=n,this._displayName=i,this._supportsDTMF=!1,this._tracks=[],this._role="none",this._status=u,this._hidden=s,this._statsID=c,this._connectionStatus=kr.ACTIVE,this._properties={},this._identity=b,this._isReplacing=L,this._isReplaced=N,this._features=new Set}getConference(){return this._conference}getProperty(e){return this._properties[e]}hasAnyVideoTrackWebRTCMuted(){return this.getTracks().some(e=>e.getType()===Rt&&e.isWebRTCTrackMuted())}_setConnectionStatus(e){this._connectionStatus=e}getConnectionStatus(){return this._connectionStatus}setProperty(e,n){const i=this._properties[e];n!==i&&(this._properties[e]=n,this._conference.eventEmitter.emit(ye,this,e,i,n))}getTracks(){return this._tracks.slice()}getTracksByMediaType(e){return this.getTracks().filter(n=>n.getType()===e)}getId(){return this._id}getJid(){return this._jid}getDisplayName(){return this._displayName}getStatsID(){return this._statsID}getStatus(){return this._status}isModerator(){return this._role==="moderator"}isHidden(){return this._hidden}isReplacing(){return this._isReplacing}isReplaced(){return this._isReplaced}isAudioMuted(){return this._isMediaTypeMuted(Xe)}_isMediaTypeMuted(e){return this.getTracks().reduce((n,i)=>n&&(i.getType()!==e||i.isMuted()),!0)}isVideoMuted(){return this._isMediaTypeMuted(Rt)}getRole(){return this._role}setRole(e){this._role=e}setIsReplacing(e){this._isReplacing=e}setIsReplaced(e){this._isReplaced=e}supportsDTMF(){return this._supportsDTMF}getFeatures(){return Promise.resolve(this._features)}hasFeature(e){return this._features.has(e)}setFeatures(e){this._features=e||new Set}getBotType(){return this._botType}setBotType(e){this._botType=e}}const Yn="connection.connectionDisconnected",Hi="connection.connectionEstablished",yr="connection.connectionFailed",ei="connection.wrongState",ls="connection.display_name_required";o(5808);const Ps="connection.droppedError",ds="connection.otherError",Os="connection.passwordRequired",Ds="connection.serverError";class ti{constructor(){var e=this;this.promise=new Promise((n,i)=>{this.resolve=function(){e.clearRejectTimeout(),n(...arguments)},this.reject=function(){e.clearRejectTimeout(),i(...arguments)}}),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}clearRejectTimeout(){clearTimeout(this._timeout)}setRejectTimeout(e){this._timeout=setTimeout(()=>{this.reject(new Error("timeout"))},e)}}class Br{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new(on());this.eventEmitter=e,this.addEventListener=this.on=this.addListener,this.removeEventListener=this.off=this.removeListener}addListener(e,n){return this.eventEmitter.addListener(e,n),()=>this.removeEventListener(e,n)}removeListener(e,n){this.eventEmitter.removeListener(e,n)}}const io=(0,P.getLogger)("modules/e2ee/E2EEContext.js"),Di=Symbol("kJitsiE2EE");class us{constructor(){let{sharedKey:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n="";const i=document.querySelector('script[src*="lib-jitsi-meet"]');if(i){const c=i.src.lastIndexOf("/");n=`${i.src.substring(0,c)}/`}let s=`${n}lib-jitsi-meet.e2ee-worker.js`;if(n&&n!=="/"){const c=new Blob([`importScripts("${s}");`],{type:"application/javascript"});s=window.URL.createObjectURL(c)}this._worker=new Worker(s,{name:"E2EE Worker"}),this._worker.onerror=c=>io.error(c),this._worker.postMessage({operation:"initialize",sharedKey:e})}cleanup(e){this._worker.postMessage({operation:"cleanup",participantId:e})}cleanupAll(){this._worker.postMessage({operation:"cleanupAll"})}handleReceiver(e,n,i){if(!e[Di])if(e[Di]=!0,window.RTCRtpScriptTransform){const s={operation:"decode",participantId:i};e.transform=new RTCRtpScriptTransform(this._worker,s)}else{const s=e.createEncodedStreams();this._worker.postMessage({operation:"decode",readableStream:s.readable,writableStream:s.writable,participantId:i},[s.readable,s.writable])}}handleSender(e,n,i){if(!e[Di])if(e[Di]=!0,window.RTCRtpScriptTransform){const s={operation:"encode",participantId:i};e.transform=new RTCRtpScriptTransform(this._worker,s)}else{const s=e.createEncodedStreams();this._worker.postMessage({operation:"encode",readableStream:s.readable,writableStream:s.writable,participantId:i},[s.readable,s.writable])}}setKey(e,n,i){this._worker.postMessage({operation:"setKey",key:n,keyIndex:i,participantId:e})}}const hs=(0,P.getLogger)("modules/e2ee/KeyHandler.js");class Zi extends Br{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),this.conference=e,this.e2eeCtx=new us(n),this.enabled=!1,this._enabling=void 0,this.conference.on(me,this._onMediaSessionStarted.bind(this)),this.conference.on(et,i=>i.isLocal()&&this._onLocalTrackAdded(i)),this.conference.rtc.on(Mt().REMOTE_TRACK_ADDED,(i,s)=>this._setupReceiverE2EEForTrack(s,i)),this.conference.on(Ot,this._trackMuteChanged.bind(this))}isEnabled(){return this.enabled}setEnabled(e){return fr(this,null,function*(){e!==this.enabled&&(this._enabling&&(yield this._enabling),this._enabling=new ti,this.enabled=e,e||this.e2eeCtx.cleanupAll(),this._setEnabled&&(yield this._setEnabled(e)),this.conference.setLocalParticipantProperty("e2ee.enabled",e),this.conference._restartMediaSessions(),this._enabling.resolve())})}setEncryptionKey(){throw new Error("Not implemented by subclass")}_onLocalTrackAdded(e){for(const n of this.conference._getMediaSessions())this._setupSenderE2EEForTrack(n,e)}_onMediaSessionStarted(e){const n=this.conference.getLocalTracks();for(const i of n)this._setupSenderE2EEForTrack(e,i)}_setupReceiverE2EEForTrack(e,n){if(!this.enabled)return;const i=e.findReceiverForTrack(n.track);i?this.e2eeCtx.handleReceiver(i,n.getType(),n.getParticipantId()):hs.warn(`Could not handle E2EE for ${n}: receiver not found in: ${e}`)}_setupSenderE2EEForTrack(e,n){if(!this.enabled)return;const i=e.peerconnection,s=i&&i.findSenderForTrack(n.track);s?this.e2eeCtx.handleSender(s,n.getType(),n.getParticipantId()):hs.warn(`Could not handle E2EE for ${n}: sender not found in ${i}`)}_trackMuteChanged(e){if(E.doesVideoMuteByStreamRemove()&&e.isLocal()&&e.isVideoTrack()&&!e.isMuted())for(const n of this.conference._getMediaSessions())this._setupSenderE2EEForTrack(n,e)}}class Ms extends Zi{constructor(e){super(e,{sharedKey:!0})}setKey(e){this.e2eeCtx.setKey(void 0,{encryptionKey:e.encryptionKey},e.index)}}var Ns=o(1296),se=o.n(Ns),Ce=o(9742),je=o(7593);je.v1,je.v3;const pt=je.v4;je.v5;const He=(0,P.getLogger)("modules/e2ee/OlmAdapter.js"),gt="olm",wt="error",xt="key-info",Qt="key-info-ack",gn="session-ack",vn="session-init",un=Symbol("OlmData"),Mn={OLM_ID_KEY_READY:"olm.id_key_ready",PARTICIPANT_E2EE_CHANNEL_READY:"olm.participant_e2ee_channel_ready",PARTICIPANT_KEY_UPDATED:"olm.partitipant_key_updated"};class ir extends Br{constructor(e){super(),this._conf=e,this._init=new ti,this._key=void 0,this._keyIndex=-1,this._reqs=new Map,this._sessionInitialization=void 0,ir.isSupported()?(this._bootstrapOlm(),this._conf.on(Yt,this._onEndpointMessageReceived.bind(this)),this._conf.on(Y,this._onConferenceLeft.bind(this)),this._conf.on(In,this._onParticipantLeft.bind(this)),this._conf.on(ye,this._onParticipantPropertyChanged.bind(this))):this._init.reject(new Error("Olm not supported"))}initSessions(){return fr(this,null,function*(){if(this._sessionInitialization)throw new Error("OlmAdapter initSessions called multiple times");{this._sessionInitialization=new ti,yield this._init;const e=[],n=this._conf.myUserId();for(const i of this._conf.getParticipants())i.hasFeature(yo)&&n<i.getId()&&e.push(this._sendSessionInit(i));yield Promise.allSettled(e),this._sessionInitialization.resolve(),this._sessionInitialization=void 0}})}static isSupported(){return window.Olm!==void 0}updateKey(e){return fr(this,null,function*(){this._key=e,this._keyIndex++;const n=[];for(const i of this._conf.getParticipants()){const s=i.getId(),c=this._getParticipantOlmData(i);if(!c.session){He.warn(`Tried to send key to participant ${s} but we have no session`);continue}const u=pt(),b={[Wr]:gt,olm:{type:xt,data:{ciphertext:this._encryptKeyInfo(c.session),uuid:u}}},L=new ti;L.setRejectTimeout(5e3),L.catch(()=>{this._reqs.delete(u)}),this._reqs.set(u,L),n.push(L),this._sendMessage(b,s)}return yield Promise.allSettled(n),this._keyIndex})}updateCurrentKey(e){return this._key=e,this._keyIndex}clearParticipantSession(e){const n=this._getParticipantOlmData(e);n.session&&(n.session.free(),n.session=void 0)}clearAllParticipantsSessions(){for(const e of this._conf.getParticipants())this.clearParticipantSession(e)}_bootstrapOlm(){return fr(this,null,function*(){He.debug("Initializing Olm...");try{yield Olm.init(),this._olmAccount=new Olm.Account,this._olmAccount.create();const e=JSON.parse(this._olmAccount.identity_keys());this._idKey=e.curve25519,He.debug(`Olm ${Olm.get_library_version().join(".")} initialized`),this._init.resolve(),this._onIdKeyReady(this._idKey)}catch(e){He.error("Failed to initialize Olm",e),this._init.reject(e)}})}_onIdKeyReady(e){He.debug(`Olm id key ready: ${e}`),this._conf.setLocalParticipantProperty("e2ee.idKey",e)}_onParticipantE2EEChannelReady(e){He.debug(`E2EE channel with participant ${e} is ready`)}_encryptKeyInfo(e){const n={};return this._key!==void 0&&(n.key=!!this._key&&Ce.fromByteArray(this._key),n.keyIndex=this._keyIndex),e.encrypt(JSON.stringify(n))}_getParticipantOlmData(e){return e[un]=e[un]||{},e[un]}_onConferenceLeft(){return fr(this,null,function*(){He.debug("Conference left"),yield this._init;for(const e of this._conf.getParticipants())this._onParticipantLeft(e.getId(),e);this._olmAccount&&(this._olmAccount.free(),this._olmAccount=void 0)})}_onEndpointMessageReceived(e,n){return fr(this,null,function*(){if(n[Wr]!==gt)return;if(!n.olm)return void He.warn("Incorrectly formatted message");yield this._init;const i=n.olm,s=e.getId(),c=this._getParticipantOlmData(e);switch(i.type){case vn:if(c.session)He.warn(`Participant ${s} already has a session`),this._sendError(e,"Session already established");else{const u=new Olm.Session;u.create_outbound(this._olmAccount,i.data.idKey,i.data.otKey),c.session=u;const b={[Wr]:gt,olm:{type:gn,data:{ciphertext:this._encryptKeyInfo(u),uuid:i.data.uuid}}};this._sendMessage(b,s),this._onParticipantE2EEChannelReady(s)}break;case gn:if(c.session)He.warn(`Participant ${s} already has a session`),this._sendError(e,"No session found");else if(i.data.uuid===c.pendingSessionUuid){const{ciphertext:u}=i.data,b=this._reqs.get(i.data.uuid),L=new Olm.Session;L.create_inbound(this._olmAccount,u.body),this._olmAccount.remove_one_time_keys(L);const N=L.decrypt(u.type,u.body);c.session=L,c.pendingSessionUuid=void 0,this._onParticipantE2EEChannelReady(s),this._reqs.delete(i.data.uuid),b.resolve();const X=An(N);if(X.key){const de=Ce.toByteArray(X.key),Ie=X.keyIndex;c.lastKey=de,this.eventEmitter.emit(Mn.PARTICIPANT_KEY_UPDATED,s,de,Ie)}}else He.warn("Received ACK with the wrong UUID"),this._sendError(e,"Invalid UUID");break;case wt:He.error(i.data.error);break;case xt:if(c.session){const{ciphertext:u}=i.data,b=An(c.session.decrypt(u.type,u.body));if(b.key!==void 0&&b.keyIndex!==void 0){const L=!!b.key&&Ce.toByteArray(b.key),N=b.keyIndex;jn()(c.lastKey,L)||(c.lastKey=L,this.eventEmitter.emit(Mn.PARTICIPANT_KEY_UPDATED,s,L,N));const X={[Wr]:gt,olm:{type:Qt,data:{ciphertext:this._encryptKeyInfo(c.session),uuid:i.data.uuid}}};this._sendMessage(X,s)}}else He.debug(`Received key info message from ${s} but we have no session for them!`),this._sendError(e,"No session found while processing key-info");break;case Qt:if(c.session){const{ciphertext:u}=i.data,b=An(c.session.decrypt(u.type,u.body));if(b.key!==void 0&&b.keyIndex!==void 0){const N=!!b.key&&Ce.toByteArray(b.key),X=b.keyIndex;jn()(c.lastKey,N)||(c.lastKey=N,this.eventEmitter.emit(Mn.PARTICIPANT_KEY_UPDATED,s,N,X))}const L=this._reqs.get(i.data.uuid);this._reqs.delete(i.data.uuid),L.resolve()}else He.debug(`Received key info ack message from ${s} but we have no session for them!`),this._sendError(e,"No session found while processing key-info-ack")}})}_onParticipantLeft(e,n){He.debug(`Participant ${e} left`),this.clearParticipantSession(n)}_onParticipantPropertyChanged(e,n,i,s){return fr(this,null,function*(){if(n==="e2ee.enabled"&&s&&this._conf.isE2EEEnabled()){const c=this._conf.myUserId(),u=e.getId();if((yield e.getFeatures()).has(yo)&&c<u){this._sessionInitialization&&(yield this._sessionInitialization),yield this._sendSessionInit(e);const b=this._getParticipantOlmData(e),L=pt(),N={[Wr]:gt,olm:{type:xt,data:{ciphertext:this._encryptKeyInfo(b.session),uuid:L}}};this._sendMessage(N,u)}}})}_sendError(e,n){const i=e.getId(),s={[Wr]:gt,olm:{type:wt,data:{error:n}}};this._sendMessage(s,i)}_sendMessage(e,n){this._conf.sendMessage(e,n)}_sendSessionInit(e){const n=e.getId(),i=this._getParticipantOlmData(e);if(i.session)return He.warn(`Tried to send session-init to ${n} but we already have a session`),Promise.reject();if(i.pendingSessionUuid!==void 0)return He.warn(`Tried to send session-init to ${n} but we already have a pending session`),Promise.reject();this._olmAccount.generate_one_time_keys(1);const s=JSON.parse(this._olmAccount.one_time_keys()),c=Object.values(s.curve25519)[0];if(!c)return Promise.reject(new Error("No one-time-keys generated"));this._olmAccount.mark_keys_as_published();const u=pt(),b={[Wr]:gt,olm:{type:vn,data:{idKey:this._idKey,otKey:c,uuid:u}}},L=new ti;return L.setRejectTimeout(5e3),L.catch(()=>{this._reqs.delete(u),i.pendingSessionUuid=void 0}),this._reqs.set(u,L),this._sendMessage(b,n),i.pendingSessionUuid=u,L}}function An(r){try{return JSON.parse(r)}catch(e){return{}}}ir.events=Mn;const pr=(0,P.getLogger)("modules/e2ee/ManagedKeyHandler.js");class Cr extends Zi{constructor(e){super(e),this._key=void 0,this._conferenceJoined=!1,this._olmAdapter=new ir(e),this._rotateKey=se()(this._rotateKeyImpl,5e3),this._ratchetKey=se()(this._ratchetKeyImpl,5e3),this._olmAdapter.on(ir.events.PARTICIPANT_KEY_UPDATED,this._onParticipantKeyUpdated.bind(this)),this.conference.on(ye,this._onParticipantPropertyChanged.bind(this)),this.conference.on(nn,this._onParticipantJoined.bind(this)),this.conference.on(In,this._onParticipantLeft.bind(this)),this.conference.on(B,()=>{this._conferenceJoined=!0})}_setEnabled(e){return fr(this,null,function*(){e?yield this._olmAdapter.initSessions():this._olmAdapter.clearAllParticipantsSessions(),this._key=!!e&&this._generateKey();const n=yield this._olmAdapter.updateKey(this._key);this.e2eeCtx.setKey(this.conference.myUserId(),this._key,n)})}_onParticipantPropertyChanged(e,n,i,s){return fr(this,null,function*(){switch(n){case"e2ee.idKey":pr.debug(`Participant ${e.getId()} updated their id key: ${s}`);break;case"e2ee.enabled":!s&&this.enabled&&this._olmAdapter.clearParticipantSession(e)}})}_onParticipantJoined(){this._conferenceJoined&&this.enabled&&this._ratchetKey()}_onParticipantLeft(e){this.e2eeCtx.cleanup(e),this.enabled&&this._rotateKey()}_rotateKeyImpl(){return fr(this,null,function*(){pr.debug("Rotating key"),this._key=this._generateKey();const e=yield this._olmAdapter.updateKey(this._key);this.e2eeCtx.setKey(this.conference.myUserId(),this._key,e)})}_ratchetKeyImpl(){return fr(this,null,function*(){pr.debug("Ratchetting key");const e=yield function(s){return fr(this,null,function*(){return crypto.subtle.importKey("raw",s,"HKDF",!1,["deriveBits","deriveKey"])})}(this._key),n=yield function(s){return fr(this,null,function*(){const c=new TextEncoder;return crypto.subtle.deriveBits({name:"HKDF",salt:c.encode("JFrameRatchetKey"),hash:"SHA-256",info:new ArrayBuffer},s,256)})}(e);this._key=new Uint8Array(n);const i=this._olmAdapter.updateCurrentKey(this._key);this.e2eeCtx.setKey(this.conference.myUserId(),this._key,i)})}_onParticipantKeyUpdated(e,n,i){pr.debug(`Participant ${e} updated their key`),this.e2eeCtx.setKey(e,n,i)}_generateKey(){return window.crypto.getRandomValues(new Uint8Array(32))}}class Dr{constructor(e){const{e2ee:n={}}=e.options.config;this._externallyManaged=n.externallyManagedKey,this._externallyManaged?this._keyHandler=new Ms(e):this._keyHandler=new Cr(e)}static isSupported(e){const{e2ee:n={}}=e;return!(!n.externallyManagedKey&&!ir.isSupported())&&!(e.testing&&e.testing.disableE2EE)&&(E.supportsInsertableStreams()||e.enableEncodedTransformSupport&&E.supportsEncodedTransform())}isEnabled(){return this._keyHandler.isEnabled()}setEnabled(e){return fr(this,null,function*(){yield this._keyHandler.setEnabled(e)})}setEncryptionKey(e){this._keyHandler.setKey(e)}}var nr=o(5399),jr=o.n(nr);const Lr=["category","type","lang","name"],_r=["category","type","lang"];function ni(r,e){let n=0;return _r.some(i=>(n=r[i]>e[i]?1:r[i]<e[i]&&-1)!==0),n}function es(r){const e=new Set,n=new Set;return $(r).find(">query>feature").each((i,s)=>e.add(s.getAttribute("var"))),$(r).find(">query>identity").each((i,s)=>n.add({type:s.getAttribute("type"),name:s.getAttribute("name"),category:s.getAttribute("category")})),{features:e,identities:n}}class so extends Br{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"http://jitsi.org/jitsimeet";if(super(),this.node=n,this.disco=e.disco,!this.disco)throw new Error("Missing strophe-plugins (disco plugin is required)!");this.version="",this.rooms=new Set,this.externalFeatures=new Set;const i=e.emuc;i.addListener(Je().EMUC_ROOM_ADDED,s=>this._addChatRoom(s)),i.addListener(Je().EMUC_ROOM_REMOVED,s=>this._removeChatRoom(s)),Object.keys(i.rooms).forEach(s=>{this._addChatRoom(i.rooms[s])}),qe.Strophe.addNamespace("CAPS","http://jabber.org/protocol/caps"),this.disco.addFeature(qe.Strophe.NS.CAPS)}addFeature(e){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this.disco.addFeature(e),this._generateVersion(),i&&!this.externalFeatures.has(e)&&(this.externalFeatures.add(e),this.rooms.forEach(s=>this._updateRoomWithExternalFeatures(s))),n&&this.submit()}removeFeature(e){let n=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this.disco.removeFeature(e),this._generateVersion(),i&&this.externalFeatures.has(e)&&(this.externalFeatures.delete(e),this.rooms.forEach(s=>this._updateRoomWithExternalFeatures(s))),n&&this.submit()}submit(){this.rooms.forEach(e=>e.sendPresence())}_updateRoomWithExternalFeatures(e){if(this.externalFeatures.size===0)e.removeFromPresence("features");else{const n=[];this.externalFeatures.forEach(i=>{n.push({tagName:"feature",attributes:{var:i}})}),e.addOrReplaceInPresence("features",{children:n})}}getFeaturesAndIdentities(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5e3;return this._getDiscoInfo(e,n,i)}_getDiscoInfo(e,n,i){return new Promise((s,c)=>this.disco.info(e,n,u=>{s(es(u))},c,i))}_addChatRoom(e){this.rooms.add(e),this._fixChatRoomPresenceMap(e),this._updateRoomWithExternalFeatures(e)}_removeChatRoom(e){this.rooms.delete(e)}_fixChatRoomPresenceMap(e){e.addOrReplaceInPresence("c",{attributes:{xmlns:qe.Strophe.NS.CAPS,hash:"sha-1",node:this.node,ver:this.version}})}_notifyVersionChanged(){this.rooms.forEach(e=>this._fixChatRoomPresenceMap(e))}_generateVersion(){this.version=function(e,n){const i=e.sort(ni).reduce((c,u)=>`${Lr.reduce((b,L,N)=>b+(N===0?"":"/")+(u[L]?u[L]:""),"")}<`,""),s=n.sort().reduce((c,u)=>`${c+u}<`,"");return(0,qe.b64_sha1)(i+s)}(this.disco._identities,this.disco._features),this._notifyVersionChanged()}}o(6552);const Ls="NETWORK_INFO_CHANGED",Bo=(0,P.getLogger)("modules/connectivity/NetworkInfo.js"),Uo=new class extends Br{constructor(){super(),this._current={isOnline:!0}}updateNetworkInfo(r){let{isOnline:e}=r;Bo.debug("updateNetworkInfo",{isOnline:e}),this._current={isOnline:e===!0},this.eventEmitter.emit(Ls,this._current)}isOnline(){return this._current.isOnline===!0}},ps=(0,P.getLogger)("modules/xmpp/ResumeTask.js");class Hl{constructor(e){this._stropheConn=e,this._resumeRetryN=0,this._retryDelay=void 0}get retryDelay(){return this._retryDelay}schedule(){this._cancelResume(),this._resumeRetryN+=1,this._networkOnlineListener=Uo.addEventListener(Ls,e=>{let{isOnline:n}=e;n?this._scheduleResume():this._cancelResume()}),Uo.isOnline()&&this._scheduleResume()}_scheduleResume(){this._resumeTimeout||(this._resumeRetryN=Math.min(3,this._resumeRetryN),this._retryDelay=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:2;return Math.floor(Math.random()*(1e3*Math.pow(i,e)-n)+n)}(this._resumeRetryN,1500*this._resumeRetryN,3),ps.info(`Will try to resume the XMPP connection in ${this.retryDelay}ms`),this._resumeTimeout=setTimeout(()=>this._resumeConnection(),this.retryDelay))}_cancelResume(){this._resumeTimeout&&(ps.info("Canceling connection resume task"),clearTimeout(this._resumeTimeout),this._resumeTimeout=void 0,this._retryDelay=void 0)}_resumeConnection(){try{const{streamManagement:e}=this._stropheConn,n=e.getResumeToken();if(!n)return;ps.info("Trying to resume the XMPP connection",this._stropheConn.service);let i=this._stropheConn.service,s=i.includes("?")?i.replace(/.*\?/,"?"):"";const c=/(previd=)([\w-]+)/,u=s.match(c);u&&u.indexOf(n)===-1?s=s.replace(c,`$1${n}`):u||(s+=s.indexOf("?")===-1?`?previd=${n}`:`&previd=${n}`),ps.info("Trying to resume the XMPP connection search let --",s),i=i.includes("?")?i.replace(/\?.*/,s):i+s,this._stropheConn.service=i.toString(),ps.info("Trying to resume the XMPP connection final--",this._stropheConn.service),e.resume()}catch(e){ps.info("in Catch >>>>>>>>>>>>",e)}}cancel(){this._cancelResume(),this._resumeRetryN=0,this._networkOnlineListener&&(this._networkOnlineListener(),this._networkOnlineListener=null)}}class Jl{constructor(){this._lastSuccess=null,this._lastFailedMessage=null}startTracking(e,n){var i=this;const s=n.rawInput;n.rawInput=function(){for(var c=arguments.length,u=new Array(c),b=0;b<c;b++)u[b]=arguments[b];const L=u[0];L.includes("failure")&&(i._lastFailedMessage=L),e.connected&&(i._lastSuccess=Date.now()),s.apply(n,u)}}getLastFailedMessage(){return this._lastFailedMessage}getTimeSinceLastSuccess(){return this._lastSuccess?Date.now()-this._lastSuccess:null}}function Va(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:class{};return class extends r{constructor(){super(...arguments),this.connection=null}init(e){this.connection=e}}}const oo=Va(),Gl=Va(Br),ao=(0,P.getLogger)("modules/xmpp/strophe.ping.js");class Ql extends oo{constructor(e){let{getTimeSinceLastServerResponse:n,onPingThresholdExceeded:i,pingOptions:s={}}=e;super(),this.failedPings=0,this._onPingThresholdExceeded=i,this._getTimeSinceLastServerResponse=n,this.pingInterval=typeof s.interval=="number"?s.interval:1e4,this.pingTimeout=typeof s.timeout=="number"?s.timeout:5e3,this.pingThreshold=typeof s.threshold=="number"?s.threshold:2,this.pingTimestampsToKeep=Math.round(12e4/this.pingInterval),this.pingExecIntervals=new Array(this.pingTimestampsToKeep)}init(e){super.init(e),qe.Strophe.addNamespace("PING","urn:xmpp:ping")}ping(e,n,i,s){this._addPingExecutionTimestamp();const c=(0,qe.$iq)({type:"get",to:e});c.c("ping",{xmlns:qe.Strophe.NS.PING}),this.connection.sendIQ2(c,{timeout:s}).then(n,i)}startInterval(e){clearInterval(this.intervalId),this.intervalId=window.setInterval(()=>{const n=Date.now();if(this._getTimeSinceLastServerResponse()<n-this._lastServerCheck)return this._addPingExecutionTimestamp(),this._lastServerCheck=n,void(this.failedPings=0);this.ping(e,()=>{this._lastServerCheck=this._getTimeSinceLastServerResponse()+Date.now(),this.failedPings=0},i=>{this.failedPings+=1;const s="Ping "+(i?"error":"timeout");this.failedPings>=this.pingThreshold?(w().callErrorHandler(new Error(s)),ao.error(s,i),this._onPingThresholdExceeded&&this._onPingThresholdExceeded()):ao.warn(s,i)},this.pingTimeout)},this.pingInterval),ao.info(`XMPP pings will be sent every ${this.pingInterval} ms`)}stopInterval(){this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null,this.failedPings=0,ao.info("Ping interval cleared"))}_addPingExecutionTimestamp(){this.pingExecIntervals.push(new Date().getTime()),this.pingExecIntervals.length>this.pingTimestampsToKeep&&this.pingExecIntervals.shift()}getPingSuspendTime(){const e=this.pingExecIntervals.slice();e.push(new Date().getTime());let n=0,i=e[0];return e.forEach(s=>{const c=s-i;c>n&&(n=c),i=s}),n-=this.pingInterval,Math.max(n,0)}}const Ti=(0,P.getLogger)("modules/xmpp/XmppConnection.js");class Mi extends Br{static get Events(){return{CONN_STATUS_CHANGED:"CONN_STATUS_CHANGED",CONN_SHARD_CHANGED:"CONN_SHARD_CHANGED"}}static get Status(){return qe.Strophe.Status}constructor(e){let{enableWebsocketResume:n,websocketKeepAlive:i,websocketKeepAliveUrl:s,serviceUrl:c,shard:u,xmppPing:b}=e;super(),this._options={enableWebsocketResume:n===void 0||n,pingOptions:b,shard:u,websocketKeepAlive:i===void 0?6e4:Number(i),websocketKeepAliveUrl:s},this._stropheConn=new qe.Strophe.Connection(c),this._usesWebsocket=c.startsWith("ws:")||c.startsWith("wss:"),this._stropheConn.maxRetries=3,this._rawInputTracker=new Jl,this._rawInputTracker.startTracking(this,this._stropheConn),this._resumeTask=new Hl(this._stropheConn),this._deferredIQs=[],this.addConnectionPlugin("ping",new Ql({getTimeSinceLastServerResponse:()=>this.getTimeSinceLastSuccess(),onPingThresholdExceeded:()=>this._onPingErrorThresholdExceeded(),pingOptions:b})),this._oneSuccessfulConnect=!1}get connected(){const e=this._stropheConn&&this._stropheConn._proto&&this._stropheConn._proto.socket;return(this._status===qe.Strophe.Status.CONNECTED||this._status===qe.Strophe.Status.ATTACHED)&&(!this.isUsingWebSocket||e&&e.readyState===WebSocket.OPEN)}get disco(){return this._stropheConn.disco}get disconnecting(){return this._stropheConn.disconnecting===!0}get domain(){return this._stropheConn.domain}get isUsingWebSocket(){return this._usesWebsocket}get jid(){return this._stropheConn.jid}get lastResponseHeaders(){return this._stropheConn._proto&&this._stropheConn._proto.lastResponseHeaders}get logger(){return this._stropheConn.logger}get options(){return this._stropheConn.options}get pingDomain(){var e;return((e=this._options.pingOptions)===null||e===void 0?void 0:e.domain)||this.domain}get service(){return this._stropheConn.service}set shard(e){this._options.shard=e,this._oneSuccessfulConnect&&this._maybeStartWSKeepAlive()}get status(){return this._status}addConnectionPlugin(e,n){this[e]=n,n.init(this)}addHandler(){this._stropheConn.addHandler(...arguments)}attach(e,n,i,s){for(var c=arguments.length,u=new Array(c>4?c-4:0),b=4;b<c;b++)u[b-4]=arguments[b];this._stropheConn.attach(e,n,i,this._stropheConnectionCb.bind(this,s),...u)}connect(e,n,i){for(var s=arguments.length,c=new Array(s>3?s-3:0),u=3;u<s;u++)c[u-3]=arguments[u];this._stropheConn.connect(e,n,this._stropheConnectionCb.bind(this,i),...c)}_stropheConnectionCb(e,n){this._status=n;let i=!1;var s;if(n===qe.Strophe.Status.CONNECTED||n===qe.Strophe.Status.ATTACHED?(this._maybeEnableStreamResume(),this._usesWebsocket&&this._oneSuccessfulConnect&&this._keepAliveAndCheckShard(),this._oneSuccessfulConnect=!0,this._maybeStartWSKeepAlive(),this._processDeferredIQs(),this._resumeTask.cancel(),this.ping.startInterval(((s=this._options.pingOptions)===null||s===void 0?void 0:s.domain)||this.domain)):n===qe.Strophe.Status.DISCONNECTED&&(this.ping.stopInterval(),i=this._tryResumingConnection(),i||clearTimeout(this._wsKeepAlive)),!i){for(var c=arguments.length,u=new Array(c>2?c-2:0),b=2;b<c;b++)u[b-2]=arguments[b];e(n,...u),this.eventEmitter.emit(Mi.Events.CONN_STATUS_CHANGED,n)}}_clearDeferredIQs(){for(const e of this._deferredIQs)e.reject(new Error("disconnect"));this._deferredIQs=[]}closeWebsocket(){this._stropheConn&&this._stropheConn._proto&&(this._stropheConn._proto._closeSocket(),this._stropheConn._proto._onClose(null))}disconnect(){this._resumeTask.cancel(),clearTimeout(this._wsKeepAlive),this._clearDeferredIQs(),this._stropheConn.disconnect(...arguments)}flush(){this._stropheConn.flush(...arguments)}getTimeSinceLastSuccess(){return this._rawInputTracker.getTimeSinceLastSuccess()}getLastFailedMessage(){return this._rawInputTracker.getLastFailedMessage()}_maybeEnableStreamResume(){if(!this._options.enableWebsocketResume)return;const{streamManagement:e}=this._stropheConn;this.isUsingWebSocket?e?e.isSupported()?e.getResumeToken()||(Ti.info("Enabling XEP-0198 stream management"),e.enable(!0)):Ti.warn("Stream resume enabled, but XEP-0198 is not supported by the server"):Ti.warn("Stream resume enabled, but Strophe streamManagement plugin is not installed"):Ti.warn("Stream resume enabled, but WebSockets are not enabled")}_maybeStartWSKeepAlive(){const{websocketKeepAlive:e}=this._options;if(this._usesWebsocket&&e>0){this._wsKeepAlive||Ti.info(`WebSocket keep alive interval: ${e}ms`),clearTimeout(this._wsKeepAlive);const n=e+60*Math.random()*1e3;Ti.debug(`Scheduling next WebSocket keep-alive in ${n}ms`),this._wsKeepAlive=setTimeout(()=>this._keepAliveAndCheckShard().then(()=>this._maybeStartWSKeepAlive()),n)}}_keepAliveAndCheckShard(){const{shard:e,websocketKeepAliveUrl:n}=this._options,i=n||this.service.replace("wss://","https://").replace("ws://","http://");return fetch(i).then(s=>{if(!e)return;const c=s.headers.get("x-jitsi-shard");c!==e&&(Ti.error(`Detected that shard changed from ${e} to ${c}`),this.eventEmitter.emit(Mi.Events.CONN_SHARD_CHANGED))}).catch(s=>{Ti.error(`Websocket Keep alive failed for url: ${i}`,{error:s})})}_processDeferredIQs(){for(const e of this._deferredIQs)if(e.iq){clearTimeout(e.timeout);const n=Date.now()-e.start;this.sendIQ(e.iq,i=>e.resolve(i),i=>e.reject(i),n)}this._deferredIQs=[]}send(e){if(!this.connected)throw new Error("Not connected");this._stropheConn.send(e)}sendIQ(e,n,i,s){if(this.connected)return this._stropheConn.sendIQ(e,n,i,s);i("Not connected")}sendIQ2(e,n){let{timeout:i}=n;return new Promise((s,c)=>{if(this.connected)this.sendIQ(e,u=>s(u),u=>c(u),i);else{const u={iq:e,resolve:s,reject:c,start:Date.now(),timeout:setTimeout(()=>{u.iq=void 0,c(void 0)},i)};this._deferredIQs.push(u)}})}_onPingErrorThresholdExceeded(){this.isUsingWebSocket&&(Ti.warn("Ping error threshold exceeded - killing the WebSocket"),this.closeWebsocket())}sendPresence(e,n,i,s){this.connected?this._stropheConn.sendPresence(e,n,i,s):i("Not connected")}sendUnavailableBeacon(){if(!navigator.sendBeacon||this._stropheConn.disconnecting||!this._stropheConn.connected)return!1;this._stropheConn._changeConnectStatus(qe.Strophe.Status.DISCONNECTING),this._stropheConn.disconnecting=!0;const e=this._stropheConn._proto._buildBody().attrs({type:"terminate"}),n=(0,qe.$pres)({xmlns:qe.Strophe.NS.CLIENT,type:"unavailable"});e.cnode(n.tree());const i=navigator.sendBeacon(this.service.indexOf("https://")===-1?`https:${this.service}`:this.service,qe.Strophe.serialize(e.tree()));return Ti.info(`Successfully send unavailable beacon ${i}`),this._stropheConn._proto._abortAllRequests(),this._stropheConn._doDisconnect(),!0}_tryResumingConnection(){const{streamManagement:e}=this._stropheConn;return!(!e||!e.getResumeToken()||(this._resumeTask.schedule(),0))}}const Kl="on",Ha="off",co=(0,P.getLogger)("modules/xmpp/AVModeration.js");class ql{constructor(e){this._xmpp=e.xmpp,this._mainRoom=e,this._moderationEnabledByType={[Xe]:!1,[Rt]:!1},this._whitelistAudio=[],this._whitelistVideo=[],this._onMessage=this._onMessage.bind(this),this._xmpp.addListener(Je().AV_MODERATION_RECEIVED,this._onMessage)}dispose(){this._xmpp.removeListener(Je().AV_MODERATION_RECEIVED,this._onMessage)}isSupported(){return Boolean(this._xmpp.avModerationComponentAddress)}enable(e,n){if(!this.isSupported()||!this._mainRoom.isModerator())return void co.error(`Cannot enable:${e} AV moderation supported:${this.isSupported()},
|
|
44
|
+
moderator:${this._mainRoom.isModerator()}`);if(e===this._moderationEnabledByType[n])return void co.warn(`Moderation already in state:${e} for mediaType:${n}`);const i=(0,qe.$msg)({to:this._xmpp.avModerationComponentAddress});i.c("av_moderation",{enable:e,mediaType:n}).up(),this._xmpp.connection.send(i)}approve(e,n){if(!this.isSupported()||!this._mainRoom.isModerator())return void co.error(`Cannot approve in AV moderation supported:${this.isSupported()},
|
|
45
|
+
moderator:${this._mainRoom.isModerator()}`);const i=(0,qe.$msg)({to:this._xmpp.avModerationComponentAddress});i.c("av_moderation",{mediaType:e,jidToWhitelist:n}).up(),this._xmpp.connection.send(i)}reject(e,n){if(!this.isSupported()||!this._mainRoom.isModerator())return void co.error(`Cannot reject in AV moderation supported:${this.isSupported()},
|
|
46
|
+
moderator:${this._mainRoom.isModerator()}`);const i=(0,qe.$msg)({to:this._xmpp.avModerationComponentAddress});i.c("av_moderation",{mediaType:e,jidToBlacklist:n}).up(),this._xmpp.connection.send(i)}_onMessage(e){const{removed:n,mediaType:i,enabled:s,approved:c,actor:u,whitelists:b}=e;if(b){const L=i===Xe?this._whitelistAudio:this._whitelistVideo,N=Array.isArray(b[i])?b[i]:[];n?L.filter(X=>!N.includes(X)).forEach(X=>this._xmpp.eventEmitter.emit(Je().AV_MODERATION_PARTICIPANT_REJECTED,i,X)):N.filter(X=>!L.includes(X)).forEach(X=>this._xmpp.eventEmitter.emit(Je().AV_MODERATION_PARTICIPANT_APPROVED,i,X)),i===Xe?this._whitelistAudio=N:this._whitelistVideo=N}else s!==void 0&&this._moderationEnabledByType[i]!==s?(this._moderationEnabledByType[i]=s,this._xmpp.eventEmitter.emit(Je().AV_MODERATION_CHANGED,s,i,u)):n?this._xmpp.eventEmitter.emit(Je().AV_MODERATION_REJECTED,i):c&&this._xmpp.eventEmitter.emit(Je().AV_MODERATION_APPROVED,i)}}const xs="features/breakout-rooms",Fo={ADD:`${xs}/add`,REMOVE:`${xs}/remove`,MOVE_TO_ROOM:`${xs}/move-to-room`},$l=`${xs}/move-to-room`,Wl=`${xs}/update`,jo=(0,P.getLogger)("modules/xmpp/BreakoutRooms.js");class zl{constructor(e){this.room=e,this._handleMessages=this._handleMessages.bind(this),this.room.xmpp.addListener(Je().BREAKOUT_ROOMS_EVENT,this._handleMessages),this._rooms={}}dispose(){this.room.xmpp.removeListener(Je().BREAKOUT_ROOMS_EVENT,this._handleMessages)}createBreakoutRoom(e){if(!this.isSupported()||!this.room.isModerator())return void jo.error(`Cannot create breakout room - supported:${this.isSupported()},
|
|
47
|
+
moderator:${this.room.isModerator()}`);const n={type:Fo.ADD,subject:e};this._sendMessage(n)}removeBreakoutRoom(e){if(!this.isSupported()||!this.room.isModerator())return void jo.error(`Cannot remove breakout room - supported:${this.isSupported()},
|
|
48
|
+
moderator:${this.room.isModerator()}`);const n={type:Fo.REMOVE,breakoutRoomJid:e};this._sendMessage(n)}sendParticipantToRoom(e,n){if(!this.isSupported()||!this.room.isModerator())return void jo.error(`Cannot send participant to room - supported:${this.isSupported()},
|
|
49
|
+
moderator:${this.room.isModerator()}`);const i={type:Fo.MOVE_TO_ROOM,participantJid:e,roomJid:n};this._sendMessage(i)}isSupported(){return Boolean(this.getComponentAddress())}getComponentAddress(){return this.room.xmpp.breakoutRoomsComponentAddress}_setIsBreakoutRoom(e){this._isBreakoutRoom=e}isBreakoutRoom(){return this._isBreakoutRoom}_setMainRoomJid(e){this._mainRoomJid=e}getMainRoomJid(){return this._mainRoomJid}_handleMessages(e){switch(e.event){case $l:this.room.eventEmitter.emit(Je().BREAKOUT_ROOMS_MOVE_TO_ROOM,e.roomJid);break;case Wl:this._rooms=e.rooms,this.room.eventEmitter.emit(Je().BREAKOUT_ROOMS_UPDATED,e)}}_sendMessage(e){const n=(0,qe.$msg)({to:this.getComponentAddress()});n.c("breakout_rooms",e).up(),this.room.xmpp.connection.send(n)}}const Ji=(0,P.getLogger)("modules/xmpp/Lobby.js"),Ja="email";class Yl{constructor(e){this.xmpp=e.xmpp,this.mainRoom=e;const n=this._maybeJoinLobbyRoom.bind(this);this.mainRoom.addEventListener(Je().LOCAL_ROLE_CHANGED,n),this.mainRoom.addEventListener(Je().MUC_MEMBERS_ONLY_CHANGED,n),this.mainRoom.addEventListener(Je().ROOM_CONNECT_MEMBERS_ONLY_ERROR,i=>{this.lobbyRoomJid=i})}isSupported(){return this.xmpp.lobbySupported}enable(){return this.isSupported()?new Promise((e,n)=>{this.mainRoom.setMembersOnly(!0,e,n)}):Promise.reject(new Error("Lobby not supported!"))}disable(){this.isSupported()&&this.mainRoom.isModerator()&&this.lobbyRoom&&this.mainRoom.membersOnlyEnabled&&this.mainRoom.setMembersOnly(!1)}leave(){return this.lobbyRoom?this.lobbyRoom.leave().then(()=>{this.lobbyRoom=void 0,Ji.info("Lobby room left!")}).catch(()=>{}):Promise.reject(new Error("The lobby has already been left"))}setLobbyRoomJid(e){this.lobbyRoomJid=e}_maybeJoinLobbyRoom(){this.isSupported()&&this.mainRoom.joined&&this.mainRoom.isModerator()&&this.mainRoom.membersOnlyEnabled&&!this.lobbyRoom&&this.join().then(()=>Ji.info("Joined lobby room")).catch(e=>Ji.error("Failed joining lobby",e))}join(e,n){const i=this.mainRoom.joined&&this.mainRoom.isModerator();if(!this.lobbyRoomJid)return Promise.reject(new Error("Missing lobbyRoomJid, cannot join lobby room."));const s=qe.Strophe.getNodeFromJid(this.lobbyRoomJid),c=qe.Strophe.getDomainFromJid(this.lobbyRoomJid);return this.lobbyRoom=this.xmpp.createRoom(s,{customDomain:c,disableDiscoInfo:!0,disableFocus:!0,enableLobby:!1}),e&&this.lobbyRoom.addOrReplaceInPresence("nick",{attributes:{xmlns:"http://jabber.org/protocol/nick"},value:e}),i?(this.lobbyRoom.addPresenceListener(Ja,(u,b)=>{this.mainRoom.eventEmitter.emit(Je().MUC_LOBBY_MEMBER_UPDATED,b,{email:u.value})}),this.lobbyRoom.addEventListener(Je().MUC_MEMBER_JOINED,(u,b,L,N,X,de,Ie,$e,ut)=>{if(!Object.values(this.mainRoom.members).find(ze=>ze.jid===ut)){for(const ze of Object.values(this.mainRoom.getBreakoutRooms()._rooms))if(Object.values(ze.participants).find(it=>it.jid===ut))return;this.mainRoom.eventEmitter.emit(Je().MUC_LOBBY_MEMBER_JOINED,qe.Strophe.getResourceFromJid(u),b,Ie?Ie.avatar:void 0)}}),this.lobbyRoom.addEventListener(Je().MUC_MEMBER_LEFT,u=>{this.mainRoom.eventEmitter.emit(Je().MUC_LOBBY_MEMBER_LEFT,qe.Strophe.getResourceFromJid(u))}),this.lobbyRoom.addEventListener(Je().MUC_DESTROYED,()=>{Object.keys(this.lobbyRoom.members).forEach(u=>this.mainRoom.eventEmitter.emit(Je().MUC_LOBBY_MEMBER_LEFT,qe.Strophe.getResourceFromJid(u))),this.lobbyRoom.clean(),this.lobbyRoom=void 0,Ji.info("Lobby room left(destroyed)!")})):(this.lobbyRoom.addEventListener(Je().KICKED,u=>{if(u)return this.mainRoom.eventEmitter.emit(Je().MUC_DENIED_ACCESS),void this.lobbyRoom.clean()}),this.mainRoom.addEventListener(Je().INVITE_MESSAGE_RECEIVED,(u,b,L,N)=>{Ji.debug(`Received approval to join ${u} ${b} ${L}`),u===this.mainRoom.roomjid&&this.mainRoom.join(N)}),this.lobbyRoom.addEventListener(Je().MUC_DESTROYED,(u,b)=>{b?this.mainRoom.join():(this.lobbyRoom.clean(),this.mainRoom.eventEmitter.emit(Je().MUC_DESTROYED,u))}),this.mainRoom.addEventListener(Je().MUC_JOINED,()=>{this.leave()})),new Promise((u,b)=>{this.lobbyRoom.addEventListener(Je().MUC_JOINED,()=>{u(),n&&!i&&this.lobbyRoom.addOrReplaceInPresence(Ja,{value:n})&&this.lobbyRoom.sendPresence()}),this.lobbyRoom.addEventListener(Je().ROOM_JOIN_ERROR,b),this.lobbyRoom.addEventListener(Je().ROOM_CONNECT_NOT_ALLOWED_ERROR,b),this.lobbyRoom.addEventListener(Je().ROOM_CONNECT_ERROR,b),this.lobbyRoom.join()})}denyAccess(e){if(!this.isSupported()||!this.mainRoom.isModerator())return;const n=Object.keys(this.lobbyRoom.members).find(i=>qe.Strophe.getResourceFromJid(i)===e);n?this.lobbyRoom.kick(n):Ji.error(`Not found member for ${e} in lobby room.`)}approveAccess(e){if(!this.isSupported()||!this.mainRoom.isModerator())return;let n=this.mainRoom.roomjid;this.mainRoom.getBreakoutRooms().isBreakoutRoom()&&(n=this.mainRoom.getBreakoutRooms().getMainRoomJid());const i=Object.keys(this.lobbyRoom.members).find(s=>qe.Strophe.getResourceFromJid(s)===e);if(i){const s=this.lobbyRoom.members[i].jid,c=(0,qe.$msg)({to:n}).c("x",{xmlns:"http://jabber.org/protocol/muc#user"}).c("invite",{to:s});this.xmpp.connection.sendIQ(c,()=>{},u=>{Ji.error(`Error sending invite for ${s}`,u)})}else Ji.error(`Not found member for ${i} in lobby room.`)}}var Xl=o(6667),Zl=o.n(Xl);const Ga=(0,P.getLogger)("modules/settings/Settings.js");let fs,ms;const fi={_storage:a,init(r){this._storage=r||a},get callStatsUserName(){return fs||(fs=this._storage.getItem("callStatsUserName"),fs||(fs=function(){const r=Zl().generateUsername();return Ga.log("generated callstats uid",r),r}(),this._storage.setItem("callStatsUserName",fs))),fs},get machineId(){if(!ms){const r=this._storage.getItem("billingId");ms=r||this._storage.getItem("jitsiMeetId"),r?this._storage.setItem("jitsiMeetId",r):ms||(ms=function(){const e=lo()+lo()+lo()+lo();return Ga.log("generated id",e),e}(),this._storage.setItem("jitsiMeetId",ms))}return ms},get sessionId(){return this._storage.getItem("sessionId")},set sessionId(r){r?this._storage.setItem("sessionId",r):this._storage.removeItem("sessionId")}};function lo(){return`${Math.random().toString(16)}000000000`.substr(2,8)}const ed=o(3514),ks=o(4188),Vo=o(1023),Vr=(0,P.getLogger)("modules/xmpp/moderator.js");function Qa(r){let e=1;return function(n){if(n)return void(e=1);const i=Math.pow(2,e-1);return e+=1,i*r}}function xr(r,e,n,i){function s(c){if(c.data&&c.data.sessionId){if(c.origin!==window.location.origin)return void Vr.warn(`Ignoring sessionId from different origin: ${c.origin}`);fi.sessionId=c.data.sessionId}}this.roomName=r,this.xmppService=e,this.getNextTimeout=Qa(1e3),this.getNextErrorTimeout=Qa(1e3),this.externalAuthEnabled=!1,this.options=i,this.sipGatewayEnabled=!1,this.eventEmitter=n,this.connection=this.xmppService.connection,window.addEventListener?window.addEventListener("message",s,!1):window.attachEvent("onmessage",s)}xr.prototype.isExternalAuthEnabled=function(){return this.externalAuthEnabled},xr.prototype.isSipGatewayEnabled=function(){return this.sipGatewayEnabled},xr.prototype.onMucMemberLeft=function(r){qe.Strophe.getResourceFromJid(r)==="focus"&&(Vr.info("Focus has left the room - leaving conference"),this.eventEmitter.emit(ks.FOCUS_LEFT))},xr.prototype.setFocusUserJid=function(r){this.focusUserJid||(this.focusUserJid=r,Vr.info(`Focus jid set to: ${this.focusUserJid}`))},xr.prototype.getFocusUserJid=function(){return this.focusUserJid},xr.prototype.getFocusComponent=function(){let r=this.options.connection.hosts.focus;return r||(r=`focus.${this.options.connection.hosts.domain}`),r},xr.prototype.createConferenceIq=function(){var r,e,n;const i=(0,qe.$iq)({to:this.getFocusComponent(),type:"set"}),{sessionId:s}=fi,c=fi.machineId,u=this.options.conference;Vr.info(`Session ID: ${s} machine UID: ${c}`),i.c("conference",{xmlns:"http://jitsi.org/protocol/focus",room:this.roomName,"machine-uid":c}),s&&i.attrs({"session-id":s}),i.c("property",{name:"disableRtx",value:Boolean(u.disableRtx)}).up(),u.audioPacketDelay!==void 0&&i.c("property",{name:"audioPacketDelay",value:u.audioPacketDelay}).up(),u.startBitrate&&i.c("property",{name:"startBitrate",value:u.startBitrate}).up(),u.minBitrate&&i.c("property",{name:"minBitrate",value:u.minBitrate}).up(),this.options.conference.startAudioMuted!==void 0&&i.c("property",{name:"startAudioMuted",value:this.options.conference.startAudioMuted}).up(),this.options.conference.startVideoMuted!==void 0&&i.c("property",{name:"startVideoMuted",value:this.options.conference.startVideoMuted}).up();const b=(r=(e=this.options.conference)===null||e===void 0||(n=e.analytics)===null||n===void 0?void 0:n.rtcstatsEnabled)!==null&&r!==void 0&&r;b||i.c("property",{name:"rtcstatsEnabled",value:b}).up();const{callStatsID:L,callStatsSecret:N,disableThirdPartyRequests:X,enableCallStats:de}=this.options.conference,Ie=!L||!N||!de||X===!0;return Ie&&i.c("property",{name:"callstatsEnabled",value:!Ie}).up(),i.up(),i},xr.prototype.parseSessionId=function(r){const e=$(r).find("conference").attr("session-id");e&&(Vr.info(`Received sessionId: ${e}`),fi.sessionId=e)},xr.prototype.parseConfigOptions=function(r){this.setFocusUserJid($(r).find("conference").attr("focusjid"));const e=$(r).find(">conference>property[name='authentication'][value='true']").length>0;Vr.info(`Authentication enabled: ${e}`),this.externalAuthEnabled=$(r).find(">conference>property[name='externalAuth'][value='true']").length>0,Vr.info(`External authentication enabled: ${this.externalAuthEnabled}`),this.externalAuthEnabled||this.parseSessionId(r);const n=$(r).find(">conference").attr("identity");this.eventEmitter.emit(ed.IDENTITY_UPDATED,e,n),$(r).find(">conference>property[name='sipGatewayEnabled'][value='true']").length&&(this.sipGatewayEnabled=!0),Vr.info(`Sip gateway enabled: ${this.sipGatewayEnabled}`)},xr.prototype.allocateConferenceFocus=function(){return new Promise(r=>{this.setFocusUserJid(this.options.connection.focusUserJid),this.connection.sendIQ(this.createConferenceIq(),e=>this._allocateConferenceFocusSuccess(e,r),e=>this._allocateConferenceFocusError(e,r)),this.connection.flush()})},xr.prototype._allocateConferenceFocusError=function(r,e){const n=$(r).find(">error>session-invalid").length||$(r).find(">error>not-acceptable").length;if(n&&(Vr.info("Session expired! - removing"),fi.sessionId=void 0),$(r).find(">error>graceful-shutdown").length)return void this.eventEmitter.emit(ks.GRACEFUL_SHUTDOWN);const i=$(r).find(">error>reservation-error");if(i.length){const L=i.attr("error-code"),N=$(r).find(">error>text");let X;return N&&(X=N.text()),void this.eventEmitter.emit(ks.RESERVATION_ERROR,L,X)}if($(r).find(">error>not-authorized").length)return Vr.warn("Unauthorized to start the conference",r),qe.Strophe.getDomainFromJid(r.getAttribute("to"))!==this.options.connection.hosts.anonymousdomain&&(this.externalAuthEnabled=!0),void this.eventEmitter.emit(ks.AUTHENTICATION_REQUIRED);const s=this.getNextErrorTimeout(),c=`Focus error, retry after ${s}`;Vo.callErrorHandler(new Error(c)),Vr.error(c,r);const u=this.getFocusComponent(),b=s/1e3;n||this.eventEmitter.emit(ks.FOCUS_DISCONNECTED,u,b),this.getNextTimeout(!0),window.setTimeout(()=>this.allocateConferenceFocus().then(e),s)},xr.prototype._allocateConferenceFocusSuccess=function(r,e){if(this.parseConfigOptions(r),this.getNextErrorTimeout(!0),$(r).find("conference").attr("ready")==="true")this.getNextTimeout(!0),e();else{const n=this.getNextTimeout();Vr.info(`Waiting for the focus... ${n}`),window.setTimeout(()=>this.allocateConferenceFocus().then(e),n)}},xr.prototype.authenticate=function(){return new Promise((r,e)=>{this.connection.sendIQ(this.createConferenceIq(),n=>{this.parseSessionId(n),r()},n=>e({error:$(n).find("iq>error :first").prop("tagName"),message:$(n).find("iq>error>text").text()}))})},xr.prototype.getLoginUrl=function(r,e){this._getLoginUrl(!1,r,e)},xr.prototype._getLoginUrl=function(r,e,n){const i=(0,qe.$iq)({to:this.getFocusComponent(),type:"get"}),s={xmlns:"http://jitsi.org/protocol/focus",room:this.roomName,"machine-uid":fi.machineId};let c="auth url";function u(b,L){Vo.callErrorHandler(new Error(b)),Vr.error(b,L),n(L)}r&&(s.popup=!0,c=`POPUP ${c}`),i.c("login-url",s),this.connection.sendIQ(i,b=>{let L=$(b).find("login-url").attr("url");L=decodeURIComponent(L),L?(Vr.info(`Got ${c}: ${L}`),e(L)):u(`Failed to get ${c} from the focus`,b)},u.bind(void 0,`Get ${c} error`))},xr.prototype.getPopupLoginUrl=function(r,e){this._getLoginUrl(!0,r,e)},xr.prototype.logout=function(r){const e=(0,qe.$iq)({to:this.getFocusComponent(),type:"set"}),{sessionId:n}=fi;n?(e.c("logout",{xmlns:"http://jitsi.org/protocol/focus","session-id":n}),this.connection.sendIQ(e,i=>{let s=$(i).find("logout").attr("logout-url");s&&(s=decodeURIComponent(s)),Vr.info(`Log out OK, url: ${s}`,i),fi.sessionId=void 0,r(s)},i=>{const s="Logout error";Vo.callErrorHandler(new Error(s)),Vr.error(s,i)})):r()};const qn=(0,P.getLogger)("modules/xmpp/ChatRoom.js"),Ka={packet2JSON(r,e){for(const n of Array.from(r.children)){const i={attributes:{},children:[],tagName:n.tagName};for(const c of Array.from(n.attributes))i.attributes[c.name]=c.value;const s=qe.Strophe.getText(n);s&&(i.value=qe.Strophe.xmlunescape(s)),e.push(i),this.packet2JSON(n,i.children)}},json2packet(r,e){for(let n=0;n<r.length;n++){const i=r[n];i&&(e.c(i.tagName,i.attributes),i.value&&e.t(i.value),i.children&&this.json2packet(i.children,e),e.up())}}};function Bs(r,e){const n=[];for(let i=0;i<r.length;i++)r[i].tagName===e&&n.push(r[i]);return n}const td=["owner","admin","member"];class nd extends Br{constructor(e,n,i,s,c){super(),this.xmpp=s,this.connection=e,this.roomjid=qe.Strophe.getBareJidFromJid(n),this.myroomjid=n,this.password=i,this.replaceParticipant=!1,qn.info(`Joined MUC as ${this.myroomjid}`),this.members={},this.presMap={},this.presHandlers={},this._removeConnListeners=[],this.joined=!1,this.inProgressEmitted=!1,this.role=null,this.focusMucJid=null,this.noBridgeAvailable=!1,this.options=c||{},this.moderator=new xr(this.roomjid,this.xmpp,this.eventEmitter,{connection:this.xmpp.options,conference:this.options}),(this.options.enableLobby===void 0||this.options.enableLobby)&&(this.lobby=new Yl(this)),this.avModeration=new ql(this),this.breakoutRooms=new zl(this),this.initPresenceMap(c),this.lastPresences={},this.phoneNumber=null,this.phonePin=null,this.connectionTimes={},this.participantPropertyListener=null,this.locked=!1,this.transcriptionStatus=Ha}initPresenceMap(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.presMap.to=this.myroomjid,this.presMap.xns="http://jabber.org/protocol/muc",this.presMap.nodes=[],e.statsId&&this.presMap.nodes.push({tagName:"stats-id",value:e.statsId}),this.presenceUpdateTime=Date.now()}join(e,n){return this.password=e,this.replaceParticipant=n,new Promise(i=>{this.options.disableFocus&&qn.info(`Conference focus disabled for ${this.roomjid}`),(this.options.disableFocus?Promise.resolve():this.moderator.allocateConferenceFocus()).then(()=>{this.sendPresence(!0),this._removeConnListeners.push(this.connection.addEventListener(Mi.Events.CONN_STATUS_CHANGED,this.onConnStatusChanged.bind(this))),i()})})}sendPresence(e){const n=this.presMap.to;if(!this.connection||!this.connection.connected||!n||!this.joined&&!e)return;const i=(0,qe.$pres)({to:n});e&&(this.replaceParticipant&&i.c("flip_device").up(),i.c("x",{xmlns:this.presMap.xns}),this.password&&i.c("password").t(this.password).up(),this.options.billingId&&i.c("billingid").t(this.options.billingId).up(),i.up()),Ka.json2packet(this.presMap.nodes,i),this.presenceSyncTime=Date.now(),this.connection.send(i),e&&this.connection.flush()}doLeave(){qn.log("do leave",this.myroomjid);const e=(0,qe.$pres)({to:this.myroomjid,type:"unavailable"});this.presMap.length=0,!this.connection.isUsingWebSocket&&this.connection.flush(),this.connection.send(e),this.connection.flush()}discoRoomInfo(){const e=(0,qe.$iq)({type:"get",to:this.roomjid}).c("query",{xmlns:qe.Strophe.NS.DISCO_INFO});this.connection.sendIQ(e,n=>{const i=$(n).find('>query>feature[var="muc_passwordprotected"]').length===1;i!==this.locked&&(this.eventEmitter.emit(Je().MUC_LOCK_CHANGED,i),this.locked=i);const s=$(n).find('>query>x[type="result"]>field[var="muc#roominfo_meetingId"]>value');s.length?this.setMeetingId(s.text()):qn.warn("No meeting ID from backend");const c=$(n).find('>query>feature[var="muc_membersonly"]').length===1,u=$(n).find('>query>x[type="result"]>field[var="muc#roominfo_lobbyroom"]>value');this.lobby&&this.lobby.setLobbyRoomJid(u&&u.length?u.text():void 0);const b=$(n).find('>query>x[type="result"]>field[var="muc#roominfo_isbreakout"]>value'),L=Boolean(b==null?void 0:b.text());this.breakoutRooms._setIsBreakoutRoom(L);const N=$(n).find('>query>x[type="result"]>field[var="muc#roominfo_breakout_main_room"]>value');N!=null&&N.length&&this.breakoutRooms._setMainRoomJid(N.text()),c!==this.membersOnlyEnabled&&(this.membersOnlyEnabled=c,this.eventEmitter.emit(Je().MUC_MEMBERS_ONLY_CHANGED,c))},n=>{w().callErrorHandler(n),qn.error("Error getting room info: ",n)})}setMeetingId(e){this.meetingId!==e&&(this.meetingId&&qn.warn(`Meeting Id changed from:${this.meetingId} to:${e}`),this.meetingId=e,this.eventEmitter.emit(Je().MEETING_ID_SET,e))}createNonAnonymousRoom(){if(this.options.disableDiscoInfo)return;const e=(0,qe.$iq)({type:"get",to:this.roomjid}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}).c("x",{xmlns:"jabber:x:data",type:"submit"});this.connection.sendIQ(e,n=>{if(!$(n).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_whois"]').length){const s="non-anonymous rooms not supported";return w().callErrorHandler(new Error(s)),void qn.error(s)}const i=(0,qe.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});i.c("x",{xmlns:"jabber:x:data",type:"submit"}),i.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),i.c("field",{var:"muc#roomconfig_whois"}).c("value").t("anyone").up().up(),this.connection.sendIQ(i)},n=>{w().callErrorHandler(n),qn.error("Error getting room configuration form: ",n)})}onConnStatusChanged(e){e===Mi.Status.CONNECTED&&this.sendPresence()}onPresence(e){const n=e.getAttribute("from"),i={},s=e.getElementsByTagName("status")[0];s&&(i.status=s.textContent||"");let c=!1,u=!1;const b=e.getElementsByTagNameNS("http://jabber.org/protocol/muc#user","x")[0],L=b&&b.getElementsByTagName("item")[0];i.isReplaceParticipant=e.getElementsByTagName("flip_device").length,i.affiliation=L&&L.getAttribute("affiliation"),i.role=L&&L.getAttribute("role");const N=L&&L.getAttribute("jid");i.jid=N,i.isFocus=N&&N.indexOf(`${this.moderator.getFocusUserJid()}/`)===0,i.isHiddenDomain=N&&N.indexOf("@")>0&&this.options.hiddenDomain===N.substring(N.indexOf("@")+1,N.indexOf("/")),this.eventEmitter.emit(Je().PRESENCE_RECEIVED,{fromHiddenDomain:i.isHiddenDomain,presence:e});const X=e.querySelector("x");X&&X.remove();const de=[];Ka.packet2JSON(e,de),this.lastPresences[n]=de;const Ie=$e=>{const ut={},ze=$e.children.find(At=>At.tagName==="user");if(ze){ut.user={};for(const At of["id","name","avatar"]){const $t=ze.children.find(wn=>wn.tagName===At);$t&&(ut.user[At]=$t.value)}}const it=$e.children.find(At=>At.tagName==="group");return it&&(ut.group=it.value),ut};for(let $e=0;$e<de.length;$e++){const ut=de[$e];switch(ut.tagName){case"bot":{const{attributes:ze}=ut;if(!ze)break;const{type:it}=ze;i.botType=it;break}case"nick":i.nick=ut.value;break;case"userId":i.id=ut.value;break;case"stats-id":i.statsID=ut.value;break;case"identity":i.identity=Ie(ut);break;case"features":i.features=this._extractFeatures(ut);break;case"stat":{const{attributes:ze}=ut;if(!ze)break;const{name:it}=ze;it==="version"&&(i.version=ze.value);break}}}if(!this.joined&&!this.inProgressEmitted){const $e=this.connectionTimes["muc.join.started"]=window.performance.now();qn.log("(TIME) MUC join started: ",$e),this.eventEmitter.emit(Je().MUC_JOIN_IN_PROGRESS),this.inProgressEmitted=!0}if(n===this.myroomjid){const $e=i.affiliation==="owner"?i.role:"none";if(this.role!==$e&&(this.role=$e,this.eventEmitter.emit(Je().LOCAL_ROLE_CHANGED,this.role)),!this.joined){this.joined=!0;const ut=this.connectionTimes["muc.joined"]=window.performance.now();qn.log("(TIME) MUC joined: ",ut),this.password&&(this.locked=!0),this.presenceUpdateTime>=this.presenceSyncTime&&this.sendPresence(),this.eventEmitter.emit(Je().MUC_JOINED),!this.options.disableDiscoInfo&&this.discoRoomInfo()}}else if(N===void 0)qn.info("Ignoring member with undefined JID");else if(this.members[n]===void 0)this.members[n]=i,qn.log("entered",n,i),c=i.status!==void 0,u=i.version!==void 0,i.isFocus?this._initFocus(n,i.features):(this.eventEmitter.emit(Je().MUC_MEMBER_JOINED,n,i.nick,i.role,i.isHiddenDomain,i.statsID,i.status,i.identity,i.botType,i.jid,i.features,i.isReplaceParticipant),c=!1);else{const $e=this.members[n];$e.role!==i.role&&($e.role=i.role,this.eventEmitter.emit(Je().MUC_ROLE_CHANGED,n,i.role)),$e.affiliation!==i.affiliation&&($e.affiliation=i.affiliation),$e.botType!==i.botType&&($e.botType=i.botType,this.eventEmitter.emit(Je().MUC_MEMBER_BOT_TYPE_CHANGED,n,i.botType)),i.isFocus&&($e.isFocus=!0,this._initFocus(n,i.features)),i.displayName&&($e.displayName=i.displayName),$e.status!==i.status&&(c=!0,$e.status=i.status),$e.version!==i.version&&(u=!0,$e.version=i.version),jn()($e.features,i.features)||($e.features=i.features,this.eventEmitter.emit(Je().PARTICIPANT_FEATURES_CHANGED,n,i.features))}for(let $e=0;$e<de.length;$e++){const ut=de[$e];switch(ut.tagName){case"nick":if(!i.isFocus){const ze=this.xmpp.options.displayJids?qe.Strophe.getResourceFromJid(n):i.nick;this.eventEmitter.emit(Je().DISPLAY_NAME_CHANGED,n,ze)}break;case"bridgeNotAvailable":i.isFocus&&!this.noBridgeAvailable&&(this.noBridgeAvailable=!0,this.eventEmitter.emit(Je().BRIDGE_DOWN));break;case"conference-properties":if(i.isFocus){const ze={};for(let it=0;it<ut.children.length;it++){const{attributes:At}=ut.children[it];At&&At.key&&(ze[At.key]=At.value)}this.eventEmitter.emit(Je().CONFERENCE_PROPERTIES_CHANGED,ze),this.restartByTerminateSupported===void 0&&(this.restartByTerminateSupported=ze["support-terminate-restart"]==="true",qn.info(`Jicofo supports restart by terminate: ${this.supportsRestartByTerminate()}`))}break;case"transcription-status":{const{attributes:ze}=ut;if(!ze)break;const{status:it}=ze;it&&it!==this.transcriptionStatus&&(this.transcriptionStatus=it,this.eventEmitter.emit(Je().TRANSCRIPTION_STATUS_CHANGED,it));break}case"call-control":{const ze=ut.attributes;if(!ze)break;this.phoneNumber=ze.phone||null,this.phonePin=ze.pin||null,this.eventEmitter.emit(Je().PHONE_NUMBER_CHANGED);break}default:this.processNode(ut,n)}}c&&this.eventEmitter.emit(Je().PRESENCE_STATUS,n,i.status),u&&qn.info(`Received version for ${N}: ${i.version}`)}_extractFeatures(e){const n=new Set;for(let i=0;i<e.children.length;i++){const{attributes:s}=e.children[i];s&&s.var&&n.add(s.var)}return n}_initFocus(e,n){this.focusMucJid=e,this.focusFeatures=n}setParticipantPropertyListener(e){this.participantPropertyListener=e}supportsRestartByTerminate(){return this.restartByTerminateSupported}processNode(e,n){try{let i=this.presHandlers[e.tagName];e.tagName.startsWith("jitsi_participant_")&&(i=[this.participantPropertyListener]),i&&i.forEach(s=>{s(e,qe.Strophe.getResourceFromJid(n),n)})}catch(i){w().callErrorHandler(i),qn.error(`Error processing:${e.tagName} node.`,i)}}sendMessage(e,n){const i=(0,qe.$msg)({to:this.roomjid,type:"groupchat"});n==="body"?i.c(n,{},e):i.c(n,{xmlns:"http://jitsi.org/jitmeet"},e),this.connection.send(i),this.eventEmitter.emit(Je().SENDING_CHAT_MESSAGE,e)}sendPrivateMessage(e,n,i){const s=(0,qe.$msg)({to:`${this.roomjid}/${e}`,type:"chat"});i==="body"?s.c(i,n).up():s.c(i,{xmlns:"http://jitsi.org/jitmeet"},n).up(),this.connection.send(s),this.eventEmitter.emit(Je().SENDING_PRIVATE_CHAT_MESSAGE,n)}setSubject(e){const n=(0,qe.$msg)({to:this.roomjid,type:"groupchat"});n.c("subject",e),this.connection.send(n)}onParticipantLeft(e,n){delete this.lastPresences[e],n||(this.eventEmitter.emit(Je().MUC_MEMBER_LEFT,e),this.moderator.onMucMemberLeft(e))}onPresenceUnavailable(e,n){if($(e).find('>ignore[xmlns="http://jitsi.org/jitmeet/"]').length)return!0;const i=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy');if(i.length){let L;const N=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>destroy>reason');return N.length&&(L=N.text()),this.eventEmitter.emit(Je().MUC_DESTROYED,L,i.attr("jid")),this.connection.emuc.doLeave(this.roomjid),!0}const s=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="110"]').length,c=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="307"]').length,u=Object.keys(this.members),b=$(e).find("flip_device").length;if(c){const L=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>item>actor');let N,X;L.length&&(N=L.attr("nick"));const de=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>item>reason');de.length&&(X=de.text()),this.eventEmitter.emit(Je().KICKED,s,N,qe.Strophe.getResourceFromJid(n),X,b)}s?(u.forEach(L=>{const N=this.members[L];delete this.members[L],this.onParticipantLeft(L,N.isFocus)}),this.connection.emuc.doLeave(this.roomjid),c||this.eventEmitter.emit(Je().MUC_LEFT)):(delete this.members[n],this.onParticipantLeft(n,!1))}onMessage(e,n){const i=e.getAttribute("type");if(i==="error"){const L=$(e).find(">settings-error>text").text();if(L.length)return this.eventEmitter.emit(Je().SETTINGS_ERROR_RECEIVED,L),!0;const N=$(e).find(">error>text").text();return this.eventEmitter.emit(Je().CHAT_ERROR_RECEIVED,N),!0}const s=$(e).find(">body").text(),c=$(e).find(">subject");if(c.length){const L=c.text();(L||L==="")&&(this.eventEmitter.emit(Je().SUBJECT_CHANGED,L),qn.log(`Subject is changed to ${L}`))}let u=$(e).find(">delay").attr("stamp");if(!u&&(u=$(e).find('>[xmlns="jabber:x:delay"]').attr("stamp"),u)){const L=u.match(/(\d{4})(\d{2})(\d{2}T\d{2}:\d{2}:\d{2})/);u=`${L[1]}-${L[2]}-${L[3]}Z`}if(n===this.roomjid){let L;if($(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length)this.discoRoomInfo();else if((L=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>invite'))&&L.length){const N=$(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>password');let X;N&&N.length&&(X=N.text()),this.eventEmitter.emit(Je().INVITE_MESSAGE_RECEIVED,n,L.attr("from"),s,X)}}const b=$(e).find(">json-message").text();if(b){const L=this.xmpp.tryParseJSONAndVerify(b);if(L&&u===void 0)return void this.eventEmitter.emit(Je().JSON_MESSAGE_RECEIVED,n,L)}s&&(i==="chat"?this.eventEmitter.emit(Je().PRIVATE_MESSAGE_RECEIVED,n,s,this.myroomjid,u):i==="groupchat"&&this.eventEmitter.emit(Je().MESSAGE_RECEIVED,n,s,this.myroomjid,u))}onPresenceError(e,n){if($(e).find('>error[type="auth"]>not-authorized[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length)qn.log("on password required",n),this.eventEmitter.emit(Je().PASSWORD_REQUIRED);else if($(e).find('>error[type="cancel"]>not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length)qe.Strophe.getDomainFromJid(e.getAttribute("to"))===this.xmpp.options.hosts.anonymousdomain?this.eventEmitter.emit(Je().ROOM_JOIN_ERROR):(qn.warn("onPresError ",e),this.eventEmitter.emit(Je().ROOM_CONNECT_NOT_ALLOWED_ERROR));else if($(e).find(">error>service-unavailable").length)qn.warn("Maximum users limit for the room has been reached",e),this.eventEmitter.emit(Je().ROOM_MAX_USERS_ERROR);else if($(e).find('>error[type="auth"]>registration-required[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length){const i=$(e).find('>error[type="auth"]>lobbyroom');let s;if(i.length)s=i.text();else{const c=$(e).find(">lobbyroom");c.length&&(s=c.text())}this.eventEmitter.emit(Je().ROOM_CONNECT_MEMBERS_ONLY_ERROR,s)}else qn.warn("onPresError ",e),this.eventEmitter.emit(Je().ROOM_CONNECT_ERROR)}setAffiliation(e,n){const i=(0,qe.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#admin"}).c("item",{affiliation:n,nick:qe.Strophe.getResourceFromJid(e)}).c("reason").t(`Your affiliation has been changed to '${n}'.`).up().up().up();this.connection.sendIQ(i,s=>qn.log("Set affiliation of participant with jid: ",e,"to",n,s),s=>qn.log("Set affiliation of participant error: ",s))}kick(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"You have been kicked.";const i=(0,qe.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#admin"}).c("item",{nick:qe.Strophe.getResourceFromJid(e),role:"none"}).c("reason").t(n).up().up().up();this.connection.sendIQ(i,s=>qn.log("Kick participant with jid: ",e,s),s=>qn.log("Kick participant error: ",s))}lockRoom(e,n,i,s){this.connection.sendIQ((0,qe.$iq)({to:this.roomjid,type:"get"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}),c=>{if($(c).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_roomsecret"]').length){const u=(0,qe.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});u.c("x",{xmlns:"jabber:x:data",type:"submit"}),u.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),u.c("field",{var:"muc#roomconfig_roomsecret"}).c("value").t(e).up().up(),u.c("field",{var:"muc#roomconfig_passwordprotectedroom"}).c("value").t(e===null||e.length===0?"0":"1").up().up(),this.membersOnlyEnabled&&u.c("field",{var:"muc#roomconfig_membersonly"}).c("value").t("true").up().up(),u.c("field",{var:"muc#roomconfig_whois"}).c("value").t("anyone").up().up(),this.connection.sendIQ(u,()=>{this.password=e,n()},i)}else s()},i)}setMembersOnly(e,n,i){e&&Object.values(this.members).filter(c=>!c.isFocus).length&&Object.values(this.members).forEach(c=>{c.jid&&!td.includes(c.affiliation)&&this.xmpp.connection.sendIQ((0,qe.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#admin"}).c("item",{affiliation:"member",jid:c.jid}).up().up())});const s=i||(()=>{});this.xmpp.connection.sendIQ((0,qe.$iq)({to:this.roomjid,type:"get"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"}),c=>{if($(c).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_membersonly"]').length){const u=(0,qe.$iq)({to:this.roomjid,type:"set"}).c("query",{xmlns:"http://jabber.org/protocol/muc#owner"});u.c("x",{xmlns:"jabber:x:data",type:"submit"}),u.c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up(),u.c("field",{var:"muc#roomconfig_membersonly"}).c("value").t(e?"true":"false").up().up(),this.locked&&u.c("field",{var:"muc#roomconfig_passwordprotectedroom"}).c("value").t("1").up().up(),this.xmpp.connection.sendIQ(u,n,s)}else s(new Error("Setting members only room not supported!"))},s)}addToPresence(e,n){return this.addOrReplaceInPresence(e,n)}addOrReplaceInPresence(e,n){n.tagName=e;const i=this.presMap.nodes.filter(s=>e===s.tagName);return!(i.length===1&&jn()(i[0],n)||(this.removeFromPresence(e),this.presMap.nodes.push(n),this.presenceUpdateTime=Date.now(),0))}getFromPresence(e){return this.presMap.nodes.find(n=>e===n.tagName)}removeFromPresence(e){const n=this.presMap.nodes.filter(i=>e!==i.tagName);this.presMap.nodes=n,this.presenceUpdateTime=Date.now()}addPresenceListener(e,n){if(typeof n!="function")throw new Error('"handler" is not a function');let i=this.presHandlers[e];i||(this.presHandlers[e]=i=[]),i.indexOf(n)===-1?i.push(n):qn.warn(`Trying to add the same handler more than once for: ${e}`)}removePresenceListener(e,n){const i=this.presHandlers[e],s=i?i.indexOf(n):-1;s!==-1?i.splice(s,1):qn.warn(`Handler for: ${e} was not registered`)}isFocus(e){const n=this.members[e];return n?n.isFocus:null}isModerator(){return this.role==="moderator"}getMemberRole(e){return this.members[e]?this.members[e].role:null}addAudioInfoToPresence(e){const n="audiomuted";return!(e&&!this.getFromPresence(n))&&this.addOrReplaceInPresence(n,{value:e.toString()})}addVideoInfoToPresence(e){const n="videomuted";return!(e&&!this.getFromPresence(n))&&this.addOrReplaceInPresence(n,{value:e.toString()})}getMediaPresenceInfo(e,n){const i=this.lastPresences[`${this.roomjid}/${e}`];if(!i)return null;const s={muted:!0,videoType:void 0};let c=null;if(n===Xe)c=Bs(i,"audiomuted");else{if(n!==Rt)return qn.error(`Unsupported media type: ${n}`),null;{c=Bs(i,"videomuted");const u=Bs(i,"jitsi_participant_codecType"),b=Bs(i,"videoType");b.length>0&&(s.videoType=b[0].value),u.length>0&&(s.codecType=u[0].value)}}return c.length>0&&(s.muted=c[0].value==="true"),s}getLastPresence(e){return this.lastPresences[`${this.roomjid}/${e}`]}isSIPCallingSupported(){return!!this.moderator&&this.moderator.isSipGatewayEnabled()}dial(e){return this.connection.rayo.dial(e,"fromnumber",qe.Strophe.getBareJidFromJid(this.myroomjid),this.password,this.focusMucJid)}hangup(){return this.connection.rayo.hangup()}getLobby(){return this.lobby}getAVModeration(){return this.avModeration}getBreakoutRooms(){return this.breakoutRooms}getPhoneNumber(){return this.phoneNumber}getPhonePin(){return this.phonePin}getMeetingId(){return this.meetingId}muteParticipant(e,n,i){qn.info("set mute",n,e);const s=(0,qe.$iq)({to:this.focusMucJid,type:"set"}).c("mute",{xmlns:`http://jitsi.org/jitmeet/${i}`,jid:e}).t(n.toString()).up();this.connection.sendIQ(s,c=>qn.log("set mute",c),c=>qn.log("set mute error",c))}onMute(e){if(e.getAttribute("from")!==this.focusMucJid)return void qn.warn("Ignored mute from non focus peer");const n=$(e).find("mute");n.length&&n.text()==="true"?this.eventEmitter.emit(Je().AUDIO_MUTED_BY_FOCUS,n.attr("actor")):qn.warn("Ignoring a mute request which does not explicitly specify a positive mute command.")}onMuteVideo(e){if(e.getAttribute("from")!==this.focusMucJid)return void qn.warn("Ignored mute from non focus peer");const n=$(e).find("mute");n.length&&n.text()==="true"?this.eventEmitter.emit(Je().VIDEO_MUTED_BY_FOCUS,n.attr("actor")):qn.warn("Ignoring a mute request which does not explicitly specify a positive mute command.")}clean(){this._removeConnListeners.forEach(e=>e()),this._removeConnListeners=[],this.joined=!1,this.inProgressEmitted=!1}leave(){var e,n=this;this.avModeration.dispose(),this.breakoutRooms.dispose();const i=[];return!((e=this.lobby)===null||e===void 0)&&e.lobbyRoom&&i.push(this.lobby.leave()),i.push(new Promise((s,c)=>{let u=-1;const b=function(){let L=arguments.length>0&&arguments[0]!==void 0&&arguments[0];n.eventEmitter.removeListener(Je().MUC_LEFT,b),clearTimeout(u),L?(n.connection.emuc.doLeave(n.roomjid),c(new Error("The timeout for the confirmation about leaving the room expired."))):s()};u=setTimeout(()=>b(!0),5e3),this.clean(),this.eventEmitter.on(Je().MUC_LEFT,b),this.doLeave()})),Promise.allSettled(i)}}const rd=(0,P.getLogger)("modules/xmpp/strophe.emuc.js");class id extends Gl{constructor(e){super(),this.xmpp=e,this.rooms={}}init(e){super.init(e),this.connection.addHandler(this.onPresence.bind(this),null,"presence",null,null,null,null),this.connection.addHandler(this.onPresenceUnavailable.bind(this),null,"presence","unavailable",null),this.connection.addHandler(this.onPresenceError.bind(this),null,"presence","error",null),this.connection.addHandler(this.onMessage.bind(this),null,"message",null,null),this.connection.addHandler(this.onMute.bind(this),"http://jitsi.org/jitmeet/audio","iq","set",null,null),this.connection.addHandler(this.onMuteVideo.bind(this),"http://jitsi.org/jitmeet/video","iq","set",null,null)}createRoom(e,n,i){const s=qe.Strophe.getBareJidFromJid(e);if(this.isRoomCreated(s)){const c="You are already in the room!";throw rd.error(c),new Error(c)}return this.rooms[s]=new nd(this.connection,e,n,this.xmpp,i),this.eventEmitter.emit(Je().EMUC_ROOM_ADDED,this.rooms[s]),this.rooms[s]}isRoomCreated(e){return e in this.rooms}doLeave(e){this.eventEmitter.emit(Je().EMUC_ROOM_REMOVED,this.rooms[e]),delete this.rooms[e]}onPresence(e){const n=e.getAttribute("from");if(e.getAttribute("type"))return!0;const i=this.rooms[qe.Strophe.getBareJidFromJid(n)];return!i||($(e).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="201"]').length&&i.createNonAnonymousRoom(),i.onPresence(e),!0)}onPresenceUnavailable(e){const n=e.getAttribute("from"),i=this.rooms[qe.Strophe.getBareJidFromJid(n)];return!i||(i.onPresenceUnavailable(e,n),!0)}onPresenceError(e){const n=e.getAttribute("from"),i=this.rooms[qe.Strophe.getBareJidFromJid(n)];return!i||(i.onPresenceError(e,n),!0)}onMessage(e){const n=e.getAttribute("from"),i=this.rooms[qe.Strophe.getBareJidFromJid(n)];return!i||(i.onMessage(e,n),!0)}onMute(e){const n=e.getAttribute("from"),i=this.rooms[qe.Strophe.getBareJidFromJid(n)];return!i||(i.onMute(e),!0)}onMuteVideo(e){const n=e.getAttribute("from"),i=this.rooms[qe.Strophe.getBareJidFromJid(n)];return!i||(i.onMuteVideo(e),!0)}}const sd=(0,P.getLogger)("FeatureFlags"),Mr=new class{init(r){this._sourceNameSignaling=Boolean(r.sourceNameSignaling),sd.info(`Source name signaling: ${this._sourceNameSignaling}`)}isSourceNameSignalingEnabled(){return this._sourceNameSignaling}},od=(0,P.getLogger)("modules/xmpp/JingleHelperFunctions.js");function qa(r,e){const n=(0,qe.$build)("source",{xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0",ssrc:e.s,name:Mr.isSourceNameSignalingEnabled()?e.n:void 0});return e.m&&n.c("parameter",{name:"msid",value:e.m}).up(),n.c("ssrc-info",{xmlns:"http://jitsi.org/jitmeet",owner:r}).up(),n.node}function $a(r){const e=(0,qe.$build)("ssrc-group",{xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0",semantics:(n=r[0],n==="f"?"FID":n==="s"?"SIM":null)});var n;for(let i=1;i<r.length;i++)e.c("source",{xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0",ssrc:r[i]}).up();return e.node}function Wa(r,e){const n=$(r).find("jingle")[0];let i,s=$(n).find(`content[name="${e}"]`);return s.length?s=s[0]:(s=(0,qe.$build)("content",{name:e}).node,n.appendChild(s)),i=$(s).find("description"),i.length?i=i[0]:(i=(0,qe.$build)("description",{xmlns:"urn:xmpp:jingle:apps:rtp:1",media:e}).node,s.appendChild(i)),i}function ad(r,e){var n;let i;try{i=JSON.parse(e.textContent)}catch(N){return od.error(`json-message XML contained invalid JSON, ignoring: ${e.textContent}`),null}if((n=i)===null||n===void 0||!n.sources)return null;const s=Wa(r,Xe),c=Wa(r,Rt),u=new Map;for(const N in i.sources)if(i.sources.hasOwnProperty(N)){const X=[],de=i.sources[N],Ie=(de==null?void 0:de.length)&&de[0],$e=(de==null?void 0:de.length)>1&&de[1],ut=(de==null?void 0:de.length)>2&&de[2],ze=(de==null?void 0:de.length)>3&&de[3];if(Ie!=null&&Ie.length)for(let it=0;it<Ie.length;it++){var b;c.appendChild(qa(N,Ie[it])),X.push((b=Ie[it])===null||b===void 0?void 0:b.s)}if($e!=null&&$e.length)for(let it=0;it<$e.length;it++)c.appendChild($a($e[it]));if(ut!=null&&ut.length)for(let it=0;it<ut.length;it++){var L;s.appendChild(qa(N,ut[it])),X.push((L=ut[it])===null||L===void 0?void 0:L.s)}if(ze!=null&&ze.length)for(let it=0;it<ze.length;it++)s.appendChild($a(ze[it]));u.set(N,X)}return u}var mi=o(4391),ri=o.n(mi),cd=o(8043),Tn=o.n(cd);const gs=o(9077).getLogger("modules/RTC/ScreenObtainer.js"),ld={obtainStream:null,init(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=r,this.obtainStream=this._createObtainStreamMethod(),this.obtainStream||gs.info("Desktop sharing disabled")},_createObtainStreamMethod(){return E.isNWJS()?(r,e)=>{window.JitsiMeetNW.obtainDesktopStream(r,(n,i)=>{let s;s=n&&n.name==="InvalidStateError"?new Qn(en):new Qn(n,i,["desktop"]),typeof e=="function"&&e(s)})}:E.isElectron()?this.obtainScreenOnElectron:E.isReactNative()&&E.supportsGetDisplayMedia()?this.obtainScreenFromGetDisplayMediaRN:E.supportsGetDisplayMedia()?this.obtainScreenFromGetDisplayMedia:(gs.log("Screen sharing not supported on ",E.getName()),null)},_getAudioConstraints(){const{audioQuality:r}=this.options;return r==null||!r.stereo||{autoGainControl:!1,channelCount:2,echoCancellation:!1,noiseSuppression:!1}},isSupported(){return this.obtainStream!==null},obtainScreenOnElectron(r,e){var n=this;if(window.JitsiMeetScreenObtainer&&window.JitsiMeetScreenObtainer.openDesktopPicker){const{desktopSharingFrameRate:i,desktopSharingSources:s}=this.options;window.JitsiMeetScreenObtainer.openDesktopPicker({desktopSharingSources:s||["screen","window"]},function(c,u){if(c){var b,L;let N=!1;if(arguments.length>2&&arguments[2]!==void 0&&arguments[2]){N={};const de=n._getAudioConstraints();typeof de!="boolean"&&(N={optional:de}),u==="screen"&&(N.mandatory={chromeMediaSource:"desktop"})}const X={audio:N,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:c,minFrameRate:(b=i==null?void 0:i.min)!==null&&b!==void 0?b:5,maxFrameRate:(L=i==null?void 0:i.max)!==null&&L!==void 0?L:5,maxWidth:window.screen.width,maxHeight:window.screen.height}}};navigator.mediaDevices.getUserMedia(X).then(de=>r({stream:de,sourceId:c,sourceType:u}),e)}else e(new Qn(en))},c=>e(new Qn(an,c)))}else e(new Qn(On))},obtainScreenFromGetDisplayMedia(r,e){let n;n=navigator.getDisplayMedia?navigator.getDisplayMedia.bind(navigator):navigator.mediaDevices.getDisplayMedia.bind(navigator.mediaDevices);const{desktopSharingFrameRate:i}=this.options,s=typeof i!="object"||{frameRate:i},c=this._getAudioConstraints();s.frameRate&&delete s.frameRate.min;const u={video:s,audio:c,cursor:"always"};gs.info("Using getDisplayMedia for screen sharing",u),n(u).then(b=>{r({stream:b,sourceId:b.id})}).catch(b=>{const L={errorName:b&&b.name,errorMsg:b&&b.message,errorStack:b&&b.stack};gs.error("getDisplayMedia error",u,L),L.errorMsg&&L.errorMsg.indexOf("denied by system")!==-1?e(new Qn(_n)):e(new Qn(en))})},obtainScreenFromGetDisplayMediaRN(r,e){gs.info("Using getDisplayMedia for screen sharing"),navigator.mediaDevices.getDisplayMedia({video:!0}).then(n=>{r({stream:n,sourceId:n.id})}).catch(()=>{e(new Qn(en))})},setDesktopSharingFrameRate(r){gs.info(`Setting the desktop capture rate to ${r}`),this.options.desktopSharingFrameRate={min:5,max:r}}},Us=ld,vs=(0,P.getLogger)("modules/sdp/SDPUtil.js"),ys={filterSpecialChars:r=>r&&r.replace(/[\\\/\{,\}\+]/g,""),iceparams(r,e){let n,i,s=null;return(i=ys.findLine(r,"a=ice-ufrag:",e))&&(n=ys.findLine(r,"a=ice-pwd:",e))&&(s={ufrag:ys.parseICEUfrag(i),pwd:ys.parseICEPwd(n)}),s},parseICEUfrag:r=>r.substring(12),buildICEUfrag:r=>`a=ice-ufrag:${r}`,parseICEPwd:r=>r.substring(10),buildICEPwd:r=>`a=ice-pwd:${r}`,parseMID:r=>r.substring(6),parseMSIDAttribute(r){const e=r.find(i=>i.indexOf(" msid:")>0);if(!e)return;const n=e.substring(e.indexOf(" msid:")+6);return ys.filterSpecialChars(n)},parseMLine(r){const e={},n=r.substring(2).split(" ");return e.media=n.shift(),e.port=n.shift(),e.proto=n.shift(),n[n.length-1]===""&&n.pop(),e.fmt=n,e},buildMLine:r=>`m=${r.media} ${r.port} ${r.proto} ${r.fmt.join(" ")}`,parseRTPMap(r){const e={};let n=r.substring(9).split(" ");return e.id=n.shift(),n=n[0].split("/"),e.name=n.shift(),e.clockrate=n.shift(),e.channels=n.length?n.shift():"1",e},parseSCTPMap(r){const e=r.substring(10).split(" ");return[e[0],e[1],e.length>2?e[2]:null]},parseSCTPPort:r=>r.substring(12),buildRTPMap(r){let e=`a=rtpmap:${r.getAttribute("id")} ${r.getAttribute("name")}/${r.getAttribute("clockrate")}`;return r.getAttribute("channels")&&r.getAttribute("channels")!=="1"&&(e+=`/${r.getAttribute("channels")}`),e},parseCrypto(r){const e={},n=r.substring(9).split(" ");return e.tag=n.shift(),e["crypto-suite"]=n.shift(),e["key-params"]=n.shift(),n.length&&(e["session-params"]=n.join(" ")),e},parseFingerprint(r){const e={},n=r.substring(14).split(" ");return e.hash=n.shift(),e.fingerprint=n.shift(),e},parseFmtp(r){const e=[];let n=r.split(" ");n.shift(),n=n.join(" ").split(";");for(let i=0;i<n.length;i++){let s=n[i].split("=")[0];for(;s.length&&s[0]===" ";)s=s.substring(1);const c=n[i].split("=")[1];s&&c?e.push({name:s,value:c}):s&&e.push({name:"",value:s})}return e},parseICECandidate(r){const e={},n=r.split(" ");e.foundation=n[0].substring(12),e.component=n[1],e.protocol=n[2].toLowerCase(),e.priority=n[3],e.ip=n[4],e.port=n[5],e.type=n[7],e.generation=0;for(let i=8;i<n.length;i+=2)switch(n[i]){case"raddr":e["rel-addr"]=n[i+1];break;case"rport":e["rel-port"]=n[i+1];break;case"generation":e.generation=n[i+1];break;case"tcptype":e.tcptype=n[i+1];break;default:vs.debug(`parseICECandidate not translating "${n[i]}" = "${n[i+1]}"`)}return e.network="1",e.id=Math.random().toString(36).substr(2,10),e},buildICECandidate(r){let e=[`a=candidate:${r.foundation}`,r.component,r.protocol,r.priority,r.ip,r.port,"typ",r.type].join(" ");switch(e+=" ",r.type){case"srflx":case"prflx":case"relay":r.hasOwnAttribute("rel-addr")&&r.hasOwnAttribute("rel-port")&&(e+="raddr",e+=" ",e+=r["rel-addr"],e+=" ",e+="rport",e+=" ",e+=r["rel-port"],e+=" ")}return r.hasOwnAttribute("tcptype")&&(e+="tcptype",e+=" ",e+=r.tcptype,e+=" "),e+="generation",e+=" ",e+=r.hasOwnAttribute("generation")?r.generation:"0",e},parseSSRC(r){const e=new Map,n=r.split(`\r
|
|
50
|
+
`);for(let i=0;i<n.length;i++)if(n[i].substring(0,7)==="a=ssrc:"){const s=n[i].split("a=ssrc:")[1].split(" ")[0];e.get(s)||e.set(s,[]),e.get(s).push(n[i])}return e},parseSourceNameLine(r){const e=r.find(n=>n.indexOf(" name:")>0);return e==null?void 0:e.substring(e.indexOf(" name:")+6)},parseRTCPFB(r){const e=r.substr(10).split(" "),n={};return n.pt=e.shift(),n.type=e.shift(),n.params=e,n},parseExtmap(r){const e=r.substr(9).split(" "),n={};return n.value=e.shift(),n.value.indexOf("/")===-1?n.direction="both":(n.direction=n.value.substr(n.value.indexOf("/")+1),n.value=n.value.substr(0,n.value.indexOf("/"))),n.uri=e.shift(),n.params=e,n},findLine(r,e,n){let i=r.split(`\r
|
|
51
|
+
`);for(let s=0;s<i.length;s++)if(i[s].substring(0,e.length)===e)return i[s];if(!n)return!1;i=n.split(`\r
|
|
52
|
+
`);for(let s=0;s<i.length;s++)if(i[s].substring(0,e.length)===e)return i[s];return!1},findLines(r,e,n){let i=r.split(`\r
|
|
53
|
+
`);const s=[];for(let c=0;c<i.length;c++)i[c].substring(0,e.length)===e&&s.push(i[c]);if(s.length||!n)return s;i=n.split(`\r
|
|
54
|
+
`);for(let c=0;c<i.length;c++)i[c].substring(0,e.length)===e&&s.push(i[c]);return s},candidateToJingle(r){if(r.indexOf("candidate:")===0)r=`a=${r}`;else if(r.substring(0,12)!=="a=candidate:")return vs.warn("parseCandidate called with a line that is not a candidate line"),vs.warn(r),null;r.substring(r.length-2)===`\r
|
|
55
|
+
`&&(r=r.substring(0,r.length-2));const e={},n=r.split(" ");if(n[6]!=="typ")return vs.warn("did not find typ in the right place"),vs.warn(r),null;e.foundation=n[0].substring(12),e.component=n[1],e.protocol=n[2].toLowerCase(),e.priority=n[3],e.ip=n[4],e.port=n[5],e.type=n[7],e.generation="0";for(let i=8;i<n.length;i+=2)switch(n[i]){case"raddr":e["rel-addr"]=n[i+1];break;case"rport":e["rel-port"]=n[i+1];break;case"generation":e.generation=n[i+1];break;case"tcptype":e.tcptype=n[i+1];break;default:vs.debug(`not translating "${n[i]}" = "${n[i+1]}"`)}return e.network="1",e.id=Math.random().toString(36).substr(2,10),e},candidateFromJingle(r){let e="a=candidate:";e+=r.getAttribute("foundation"),e+=" ",e+=r.getAttribute("component"),e+=" ";let n=r.getAttribute("protocol");switch(E.isFirefox()&&n.toLowerCase()==="ssltcp"&&(n="tcp"),e+=n,e+=" ",e+=r.getAttribute("priority"),e+=" ",e+=r.getAttribute("ip"),e+=" ",e+=r.getAttribute("port"),e+=" ",e+="typ",e+=` ${r.getAttribute("type")}`,e+=" ",r.getAttribute("type")){case"srflx":case"prflx":case"relay":r.getAttribute("rel-addr")&&r.getAttribute("rel-port")&&(e+="raddr",e+=" ",e+=r.getAttribute("rel-addr"),e+=" ",e+="rport",e+=" ",e+=r.getAttribute("rel-port"),e+=" ")}return n.toLowerCase()==="tcp"&&(e+="tcptype",e+=" ",e+=r.getAttribute("tcptype"),e+=" "),e+="generation",e+=" ",e+=r.getAttribute("generation")||"0",`${e}\r
|
|
56
|
+
`},parsePrimaryVideoSsrc(r){const e=r.ssrcs.map(s=>s.id).filter((s,c,u)=>u.indexOf(s)===c).length,n=r.ssrcGroups&&r.ssrcGroups.length||0;if(e>1&&n===0)return;let i=null;if(e===1)i=r.ssrcs[0].id;else if(e===2){const s=r.ssrcGroups.find(c=>c.semantics==="FID");s&&(i=s.ssrcs.split(" ")[0])}else if(e>=3){const s=r.ssrcGroups.find(c=>c.semantics==="SIM");s&&(i=s.ssrcs.split(" ")[0])}return i},generateSsrc:()=>jr().randomInt(1,4294967295),getSsrcAttribute(r,e,n){for(let i=0;i<r.ssrcs.length;++i){const s=r.ssrcs[i];if(s.id===e&&s.attribute===n)return s.value}},parseGroupSsrcs:r=>r.ssrcs.split(" ").map(e=>parseInt(e,10)),getMedia:(r,e)=>r.media.find(n=>n.type===e),getUfrag(r){const e=r.split(`
|
|
57
|
+
`).filter(n=>n.startsWith("a=ice-ufrag:"));if(e.length>0)return e[0].substr(12)},preferCodec(r,e){if(!r||!e)return;const n=r.rtp.filter(i=>i.codec&&i.codec.toLowerCase()===e.toLowerCase()).map(i=>i.payload);if(n){const i=r.payloads.toString().split(" ").map(s=>parseInt(s,10));for(const s of n.reverse()){const c=i.indexOf(s);i.splice(c,1),i.unshift(s)}r.payloads=i.join(" ")}},stripCodec(r,e){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(!r||!e)return;const i=[];let s=[];const c=e.toLowerCase()===ri().H264&&n;for(const u of r.rtp)u.codec&&u.codec.toLowerCase()===e.toLowerCase()&&(c?i.push(u.payload):s.push(u.payload));if(c&&(s=r.fmtp.filter(u=>i.indexOf(u.payload)>-1&&u.config.includes("profile-level-id=64")).map(u=>u.payload)),s.length>0){const u=s.map(N=>`apt=${N}`),b=r.fmtp.filter(N=>u.indexOf(N.config)!==-1);s.push(...b.map(N=>N.payload));const L=r.payloads.toString().split(" ").map(Number).filter(N=>s.indexOf(N)===-1);L.length===0?(r.port=0,r.direction=Tn().INACTIVE,r.payloads="*"):r.payloads=L.join(" "),r.rtp=r.rtp.filter(N=>L.indexOf(N.payload)!==-1),r.fmtp=r.fmtp.filter(N=>L.indexOf(N.payload)!==-1),r.rtcpFb&&(r.rtcpFb=r.rtcpFb.filter(N=>L.indexOf(N.payload)!==-1))}}},Jt=ys;function Ln(r){const e=r.split(`\r
|
|
58
|
+
m=`);for(let i=1,s=e.length;i<s;i++){let c=`m=${e[i]}`;i!==s-1&&(c+=`\r
|
|
59
|
+
`),e[i]=c}const n=`${e.shift()}\r
|
|
60
|
+
`;this.media=e,this.raw=n+e.join(""),this.session=n}function dd(r,e){if(!e||r.length!==e.length)return!1;for(let n=0,i=r.length;n<i;n++)if(r[n]instanceof Array&&e[n]instanceof Array){if(!r[n].equals(e[n]))return!1}else if(r[n]!==e[n])return!1;return!0}function _s(r,e){if(this.mySDP=r,this.otherSDP=e,!r)throw new Error('"mySDP" is undefined!');if(!e)throw new Error('"otherSDP" is undefined!')}function Fs(r){return function(...e){var n=e.pop();return r.call(this,e,n)}}Ln.prototype.failICE=!1,Ln.prototype.removeTcpCandidates=!1,Ln.prototype.removeUdpCandidates=!1,Ln.prototype.getMediaSsrcMap=function(){const r={};for(let e=0;e<this.media.length;e++){const n={mediaindex:e,mid:Jt.parseMID(Jt.findLine(this.media[e],"a=mid:")),ssrcs:{},ssrcGroups:[]};r[e]=n,Jt.findLines(this.media[e],"a=ssrc:").forEach(i=>{const s=i.substring(7).split(" ")[0];n.ssrcs[s]||(n.ssrcs[s]={ssrc:s,lines:[]}),n.ssrcs[s].lines.push(i)}),Jt.findLines(this.media[e],"a=ssrc-group:").forEach(i=>{const s=i.indexOf(" "),c=i.substr(0,s).substr(13),u=i.substr(14+c.length).split(" ");u.length&&n.ssrcGroups.push({semantics:c,ssrcs:u})})}return r},Ln.prototype.containsSSRC=function(r){const e=this.getMediaSsrcMap();let n=!1;return Object.keys(e).forEach(i=>{n||e[i].ssrcs[r]&&(n=!0)}),n},Ln.prototype.toJingle=function(r,e){Jt.findLines(this.session,"a=group:").forEach(n=>{const i=n.split(" "),s=i.shift().substr(8);r.c("group",{xmlns:"urn:xmpp:jingle:apps:grouping:0",semantics:s});for(let c=0;c<i.length;c++)r.c("content",{name:i[c]}).up();r.up()});for(let n=0;n<this.media.length;n++){const i=Jt.parseMLine(this.media[n].split(`\r
|
|
61
|
+
`)[0]);if(i.media!=="audio"&&i.media!=="video"&&i.media!=="application")continue;let s;const c=Jt.findLine(this.media[n],"a=ssrc:");s=!!c&&c.substring(7).split(" ")[0],r.c("content",{creator:e,name:i.media});const u=Jt.findLine(this.media[n],"a=mid:");if(u){const L=Jt.parseMID(u);r.attrs({name:L})}if(i.media==="audio"||i.media==="video"){r.c("description",{xmlns:"urn:xmpp:jingle:apps:rtp:1",media:i.media}),s&&r.attrs({ssrc:s});for(let X=0;X<i.fmt.length;X++){const de=Jt.findLine(this.media[n],`a=rtpmap:${i.fmt[X]}`);r.c("payload-type",Jt.parseRTPMap(de));const Ie=Jt.findLine(this.media[n],`a=fmtp:${i.fmt[X]}`);if(Ie){const $e=Jt.parseFmtp(Ie);for(let ut=0;ut<$e.length;ut++)r.c("parameter",$e[ut]).up()}this.rtcpFbToJingle(n,r,i.fmt[X]),r.up()}if(s){const X=Jt.parseSSRC(this.media[n]);for(const[de,Ie]of X){const $e=Jt.parseSourceNameLine(Ie);r.c("source",{ssrc:de,name:Mr.isSourceNameSignalingEnabled()?$e:void 0,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"});const ut=Jt.parseMSIDAttribute(Ie);ut&&(r.c("parameter"),r.attrs({name:"msid"}),r.attrs({value:ut}),r.up()),r.up()}Jt.findLines(this.media[n],"a=ssrc-group:").forEach(de=>{const Ie=de.indexOf(" "),$e=de.substr(0,Ie).substr(13),ut=de.substr(14+$e.length).split(" ");ut.length&&(r.c("ssrc-group",{semantics:$e,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),ut.forEach(ze=>r.c("source",{ssrc:ze}).up()),r.up())})}const L=Jt.findLines(this.media[n],"a=rid:");if(L.length&&E.usesRidsForSimulcast()){const X=L.map(de=>de.split(":")[1]).map(de=>de.split(" ")[0]);X.forEach(de=>{r.c("source",{rid:de,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),r.up()}),Jt.findLine(this.media[n],"a=simulcast:")&&(r.c("rid-group",{semantics:"SIM",xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),X.forEach(de=>{r.c("source",{rid:de}).up()}),r.up())}Jt.findLine(this.media[n],"a=rtcp-mux")&&r.c("rtcp-mux").up(),this.rtcpFbToJingle(n,r,"*");const N=Jt.findLines(this.media[n],"a=extmap:");for(let X=0;X<N.length;X++){const de=Jt.parseExtmap(N[X]);if(r.c("rtp-hdrext",{xmlns:"urn:xmpp:jingle:apps:rtp:rtp-hdrext:0",uri:de.uri,id:de.value}),de.hasOwnProperty("direction"))switch(de.direction){case Tn().SENDONLY:r.attrs({senders:"responder"});break;case Tn().RECVONLY:r.attrs({senders:"initiator"});break;case Tn().SENDRECV:r.attrs({senders:"both"});break;case Tn().INACTIVE:r.attrs({senders:"none"})}r.up()}r.up()}this.transportToJingle(n,r);const b=this.media[n];Jt.findLine(b,`a=${Tn().SENDRECV}`,this.session)?r.attrs({senders:"both"}):Jt.findLine(b,`a=${Tn().SENDONLY}`,this.session)?r.attrs({senders:"initiator"}):Jt.findLine(b,`a=${Tn().RECVONLY}`,this.session)?r.attrs({senders:"responder"}):Jt.findLine(b,`a=${Tn().INACTIVE}`,this.session)&&r.attrs({senders:"none"}),i.port!=="0"||Jt.findLine(b,"a=bundle-only",this.session)||r.attrs({senders:"rejected"}),r.up()}return r.up(),r},Ln.prototype.transportToJingle=function(r,e){e.c("transport");const n=Jt.findLine(this.media[r],"a=sctp-port:",this.session),i=Jt.findLine(this.media[r],"a=sctpmap:",this.session);if(n){const c=Jt.parseSCTPPort(n);e.c("sctpmap",{xmlns:"urn:xmpp:jingle:transports:dtls-sctp:1",number:c,protocol:"webrtc-datachannel"}),e.attrs({streams:0}),e.up()}else if(i){const c=Jt.parseSCTPMap(i);e.c("sctpmap",{xmlns:"urn:xmpp:jingle:transports:dtls-sctp:1",number:c[0],protocol:c[1]}),c.length>2?e.attrs({streams:c[2]}):e.attrs({streams:0}),e.up()}Jt.findLines(this.media[r],"a=fingerprint:",this.session).forEach(c=>{const u=Jt.parseFingerprint(c);u.xmlns="urn:xmpp:jingle:apps:dtls:0",e.c("fingerprint").t(u.fingerprint),delete u.fingerprint;const b=Jt.findLine(this.media[r],"a=setup:",this.session);b&&(u.setup=b.substr(8)),e.attrs(u),e.up()});const s=Jt.iceparams(this.media[r],this.session);s&&(s.xmlns="urn:xmpp:jingle:transports:ice-udp:1",e.attrs(s),Jt.findLines(this.media[r],"a=candidate:",this.session).forEach(c=>{const u=Jt.candidateToJingle(c);this.failICE&&(u.ip="1.1.1.1");const b=u&&typeof u.protocol=="string"?u.protocol.toLowerCase():"";this.removeTcpCandidates&&(b==="tcp"||b==="ssltcp")||this.removeUdpCandidates&&b==="udp"||e.c("candidate",u).up()})),e.up()},Ln.prototype.rtcpFbToJingle=function(r,e,n){Jt.findLines(this.media[r],`a=rtcp-fb:${n}`).forEach(i=>{const s=Jt.parseRTCPFB(i);s.type==="trr-int"?(e.c("rtcp-fb-trr-int",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",value:s.params[0]}),e.up()):(e.c("rtcp-fb",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",type:s.type}),s.params.length>0&&e.attrs({subtype:s.params[0]}),e.up())})},Ln.prototype.rtcpFbFromJingle=function(r,e){let n="";const i=r.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');return i.length&&(n+="a=rtcp-fb:* trr-int ",i.attr("value")?n+=i.attr("value"):n+="0",n+=`\r
|
|
62
|
+
`),r.find('>rtcp-fb[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]').each((s,c)=>{n+=`a=rtcp-fb:${e} ${c.getAttribute("type")}`,c.hasAttribute("subtype")&&(n+=` ${c.getAttribute("subtype")}`),n+=`\r
|
|
63
|
+
`}),n},Ln.prototype.fromJingle=function(r){const e=Date.now();this.raw=`v=0\r
|
|
64
|
+
o=- ${e} 2 IN IP4 0.0.0.0\r
|
|
65
|
+
s=-\r
|
|
66
|
+
t=0 0\r
|
|
67
|
+
`;const n=$(r).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]');n.length&&n.each((i,s)=>{const c=$(s).find(">content").map((u,b)=>b.getAttribute("name")).get();c.length>0&&(this.raw+=`a=group:${s.getAttribute("semantics")||s.getAttribute("type")} ${c.join(" ")}\r
|
|
68
|
+
`)}),this.session=this.raw,r.find(">content").each((i,s)=>{const c=this.jingle2media($(s));this.media.push(c)}),this.raw=this.session+this.media.join("")},Ln.prototype.jingle2media=function(r){const e=r.find(">description"),n=r.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]');let i="";const s=n.find('>sctpmap[xmlns="urn:xmpp:jingle:transports:dtls-sctp:1"]'),c={media:e.attr("media"),port:"9"};switch(r.attr("senders")==="rejected"&&(c.port="0"),n.find('>fingerprint[xmlns="urn:xmpp:jingle:apps:dtls:0"]').length?c.proto=s.length?"UDP/DTLS/SCTP":"UDP/TLS/RTP/SAVPF":c.proto="UDP/TLS/RTP/SAVPF",s.length?(i+=`m=application ${c.port} UDP/DTLS/SCTP webrtc-datachannel\r
|
|
69
|
+
`,i+=`a=sctp-port:${s.attr("number")}\r
|
|
70
|
+
`,i+=`a=max-message-size:262144\r
|
|
71
|
+
`):(c.fmt=e.find(">payload-type").map((L,N)=>N.getAttribute("id")).get(),i+=`${Jt.buildMLine(c)}\r
|
|
72
|
+
`),i+=`c=IN IP4 0.0.0.0\r
|
|
73
|
+
`,s.length||(i+=`a=rtcp:1 IN IP4 0.0.0.0\r
|
|
74
|
+
`),n.length&&(n.attr("ufrag")&&(i+=`${Jt.buildICEUfrag(n.attr("ufrag"))}\r
|
|
75
|
+
`),n.attr("pwd")&&(i+=`${Jt.buildICEPwd(n.attr("pwd"))}\r
|
|
76
|
+
`),n.find('>fingerprint[xmlns="urn:xmpp:jingle:apps:dtls:0"]').each((L,N)=>{i+=`a=fingerprint:${N.getAttribute("hash")}`,i+=` ${$(N).text()}`,i+=`\r
|
|
77
|
+
`,N.hasAttribute("setup")&&(i+=`a=setup:${N.getAttribute("setup")}\r
|
|
78
|
+
`)})),n.find(">candidate").each((L,N)=>{let X=N.getAttribute("protocol");X=typeof X=="string"?X.toLowerCase():"",this.removeTcpCandidates&&(X==="tcp"||X==="ssltcp")||this.removeUdpCandidates&&X==="udp"||(this.failICE&&N.setAttribute("ip","1.1.1.1"),i+=Jt.candidateFromJingle(N))}),r.attr("senders")){case"initiator":i+=`a=${Tn().SENDONLY}\r
|
|
79
|
+
`;break;case"responder":i+=`a=${Tn().RECVONLY}\r
|
|
80
|
+
`;break;case"none":i+=`a=${Tn().INACTIVE}\r
|
|
81
|
+
`;break;case"both":i+=`a=${Tn().SENDRECV}\r
|
|
82
|
+
`}i+=`a=mid:${r.attr("name")}\r
|
|
83
|
+
`,e.find(">rtcp-mux").length&&(i+=`a=rtcp-mux\r
|
|
84
|
+
`),e.find(">payload-type").each((L,N)=>{i+=`${Jt.buildRTPMap(N)}\r
|
|
85
|
+
`,$(N).find(">parameter").length&&(i+=`a=fmtp:${N.getAttribute("id")} `,i+=$(N).find(">parameter").map((X,de)=>{const Ie=de.getAttribute("name");return(Ie?`${Ie}=`:"")+de.getAttribute("value")}).get().join("; "),i+=`\r
|
|
86
|
+
`),i+=this.rtcpFbFromJingle($(N),N.getAttribute("id"))}),i+=this.rtcpFbFromJingle(e,"*"),e.find('>rtp-hdrext[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]').each((L,N)=>{i+=`a=extmap:${N.getAttribute("id")} ${N.getAttribute("uri")}\r
|
|
87
|
+
`}),e.find('>ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each((L,N)=>{const X=N.getAttribute("semantics"),de=$(N).find(">source").map((Ie,$e)=>$e.getAttribute("ssrc")).get();de.length&&(i+=`a=ssrc-group:${X} ${de.join(" ")}\r
|
|
88
|
+
`)});let u="",b="";return e.find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each((L,N)=>{const X=N.getAttribute("ssrc");let de=!0,Ie="";$(N).find(">parameter").each(($e,ut)=>{var ze;const it=ut.getAttribute("name");let At=ut.getAttribute("value");At=Jt.filterSpecialChars(At),Ie+=`a=ssrc:${X} ${it}`,At&&At.length&&(Ie+=`:${At}`),Ie+=`\r
|
|
89
|
+
`,(ze=At)!==null&&ze!==void 0&&ze.includes("mixedmslabel")&&(de=!1)}),de?u+=Ie:b+=Ie}),i+=b+u,i},_s.prototype.getNewMedia=function(){const r=this.mySDP.getMediaSsrcMap(),e=this.otherSDP.getMediaSsrcMap(),n={};return Object.keys(e).forEach(i=>{const s=r[i],c=e[i];s||!c?(Object.keys(c.ssrcs).forEach(u=>{(Object.keys(s.ssrcs).indexOf(u)===-1||c.ssrcs[u].lines&&s.ssrcs[u].lines&&s.ssrcs[u].lines.find(b=>b.indexOf("msid")!==-1)!==void 0!=(c.ssrcs[u].lines.find(b=>b.indexOf("msid")!==-1)!==void 0))&&(n[i]||(n[i]={mediaindex:c.mediaindex,mid:c.mid,ssrcs:{},ssrcGroups:[]}),n[i].ssrcs[u]=c.ssrcs[u])}),c.ssrcGroups.forEach(u=>{let b=!1;for(let L=0;L<s.ssrcGroups.length;L++){const N=s.ssrcGroups[L];if(u.semantics===N.semantics&&dd(u.ssrcs,N.ssrcs)){b=!0;break}}b||(n[i]||(n[i]={mediaindex:c.mediaindex,mid:c.mid,ssrcs:{},ssrcGroups:[]}),n[i].ssrcGroups.push(u))})):n[i]=c}),n},_s.prototype.toJingle=function(r){const e=this.getNewMedia();let n=!1;return Object.keys(e).forEach(i=>{n=!0;const s=e[i];r.c("content",{name:s.mid}),r.c("description",{xmlns:"urn:xmpp:jingle:apps:rtp:1",media:s.mid}),Object.keys(s.ssrcs).forEach(c=>{const u=s.ssrcs[c],b=u.lines,L=Jt.parseSourceNameLine(b);r.c("source",{xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),r.attrs({name:Mr.isSourceNameSignalingEnabled()?L:void 0,ssrc:u.ssrc});const N=Jt.parseMSIDAttribute(b);N&&(r.c("parameter"),r.attrs({name:"msid"}),r.attrs({value:N}),r.up()),r.up()}),s.ssrcGroups.forEach(c=>{c.ssrcs.length&&(r.c("ssrc-group",{semantics:c.semantics,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}),c.ssrcs.forEach(u=>{r.c("source",{ssrc:u}).up()}),r.up())}),r.up(),r.up()}),n};var ud=typeof queueMicrotask=="function"&&queueMicrotask,za=typeof setImmediate=="function"&&setImmediate,Ya=typeof process=="object"&&typeof process.nextTick=="function";function Xa(r){setTimeout(r,0)}function Za(r){return(e,...n)=>r(()=>e(...n))}var Ni=Za(ud?queueMicrotask:za?setImmediate:Ya?process.nextTick:Xa);function Ho(r){return js(r)?function(...e){const n=e.pop();return ec(r.apply(this,e),n)}:Fs(function(e,n){var i;try{i=r.apply(this,e)}catch(s){return n(s)}if(i&&typeof i.then=="function")return ec(i,n);n(null,i)})}function ec(r,e){return r.then(n=>{tc(e,null,n)},n=>{tc(e,n&&n.message?n:new Error(n))})}function tc(r,e,n){try{r(e,n)}catch(i){Ni(s=>{throw s},i)}}function js(r){return r[Symbol.toStringTag]==="AsyncFunction"}function Un(r){if(typeof r!="function")throw new Error("expected a function");return js(r)?Ho(r):r}function xn(r,e=r.length){if(!e)throw new Error("arity is undefined");return function(...n){return typeof n[e-1]=="function"?r.apply(this,n):new Promise((i,s)=>{n[e-1]=(c,...u)=>{if(c)return s(c);i(u.length>1?u:u[0])},r.apply(this,n)})}}function nc(r){return function(e,...n){return xn(function(i){var s=this;return r(e,(c,u)=>{Un(c).apply(s,n.concat(u))},i)})}}function Jo(r,e,n,i){e=e||[];var s=[],c=0,u=Un(n);return r(e,(b,L,N)=>{var X=c++;u(b,(de,Ie)=>{s[X]=Ie,N(de)})},b=>{i(b,s)})}function uo(r){return r&&typeof r.length=="number"&&r.length>=0&&r.length%1==0}const ho={};function Gi(r){function e(...n){if(r!==null){var i=r;r=null,i.apply(this,n)}}return Object.assign(e,r),e}function Qi(r){return function(...e){if(r===null)throw new Error("Callback was already called.");var n=r;r=null,n.apply(this,e)}}function rc(r,e,n,i){let s=!1,c=!1,u=!1,b=0,L=0;function N(){b>=e||u||s||(u=!0,r.next().then(({value:Ie,done:$e})=>{if(!c&&!s){if(u=!1,$e)return s=!0,void(b<=0&&i(null));b++,n(Ie,L,X),L++,N()}}).catch(de))}function X(Ie,$e){if(b-=1,!c)return Ie?de(Ie):Ie===!1?(s=!0,void(c=!0)):$e===ho||s&&b<=0?(s=!0,i(null)):void N()}function de(Ie){c||(u=!1,s=!0,i(Ie))}N()}var gi=r=>(e,n,i)=>{if(i=Gi(i),r<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if(e[Symbol.toStringTag]==="AsyncGenerator")return rc(e,r,n,i);if(function(de){return typeof de[Symbol.asyncIterator]=="function"}(e))return rc(e[Symbol.asyncIterator](),r,n,i);var s=function(de){if(uo(de))return function(At){var $t=-1,wn=At.length;return function(){return++$t<wn?{value:At[$t],key:$t}:null}}(de);var Ie,$e,ut,ze,it=function(At){return At[Symbol.iterator]&&At[Symbol.iterator]()}(de);return it?function(At){var $t=-1;return function(){var wn=At.next();return wn.done?null:($t++,{value:wn.value,key:$t})}}(it):($e=(Ie=de)?Object.keys(Ie):[],ut=-1,ze=$e.length,function At(){var $t=$e[++ut];return $t==="__proto__"?At():ut<ze?{value:Ie[$t],key:$t}:null})}(e),c=!1,u=!1,b=0,L=!1;function N(de,Ie){if(!u)if(b-=1,de)c=!0,i(de);else if(de===!1)c=!0,u=!0;else{if(Ie===ho||c&&b<=0)return c=!0,i(null);L||X()}}function X(){for(L=!0;b<r&&!c;){var de=s();if(de===null)return c=!0,void(b<=0&&i(null));b+=1,n(de.value,de.key,Qi(N))}L=!1}X()},po=xn(function(r,e,n,i){return gi(e)(r,Un(n),i)},4);function hd(r,e,n){n=Gi(n);var i=0,s=0,{length:c}=r,u=!1;function b(L,N){L===!1&&(u=!0),u!==!0&&(L?n(L):++s!==c&&N!==ho||n(null))}for(c===0&&n(null);i<c;i++)e(r[i],i,Qi(b))}function pd(r,e,n){return po(r,1/0,e,n)}var vi=xn(function(r,e,n){return(uo(r)?hd:pd)(r,Un(e),n)},3),Go=xn(function(r,e,n){return Jo(vi,r,e,n)},3),fd=nc(Go),Li=xn(function(r,e,n){return po(r,1,e,n)},3),ic=xn(function(r,e,n){return Jo(Li,r,e,n)},3),md=nc(ic);const As=Symbol("promiseCallback");function Es(){let r,e;function n(i,...s){if(i)return e(i);r(s.length>1?s:s[0])}return n[As]=new Promise((i,s)=>{r=i,e=s}),n}function sc(r,e,n){typeof e!="number"&&(n=e,e=null),n=Gi(n||Es());var i=Object.keys(r).length;if(!i)return n(null);e||(e=i);var s={},c=0,u=!1,b=!1,L=Object.create(null),N=[],X=[],de={};function Ie(ze,it){N.push(()=>function(At,$t){if(!b){var wn=Qi(($n,...Zn)=>{if(c--,$n!==!1)if(Zn.length<2&&([Zn]=Zn),$n){var si={};if(Object.keys(s).forEach(li=>{si[li]=s[li]}),si[At]=Zn,b=!0,L=Object.create(null),u)return;n($n,si)}else s[At]=Zn,(L[At]||[]).forEach(li=>li()),$e();else u=!0});c++;var Fn=Un($t[$t.length-1]);$t.length>1?Fn(s,wn):Fn(wn)}}(ze,it))}function $e(){if(!u){if(N.length===0&&c===0)return n(null,s);for(;N.length&&c<e;)N.shift()()}}function ut(ze){var it=[];return Object.keys(r).forEach(At=>{const $t=r[At];Array.isArray($t)&&$t.indexOf(ze)>=0&&it.push(At)}),it}return Object.keys(r).forEach(ze=>{var it=r[ze];if(!Array.isArray(it))return Ie(ze,[it]),void X.push(ze);var At=it.slice(0,it.length-1),$t=At.length;if($t===0)return Ie(ze,it),void X.push(ze);de[ze]=$t,At.forEach(wn=>{if(!r[wn])throw new Error("async.auto task `"+ze+"` has a non-existent dependency `"+wn+"` in "+At.join(", "));var Fn,$n;($n=L[Fn=wn])||($n=L[Fn]=[]),$n.push(()=>{--$t==0&&Ie(ze,it)})})}),function(){for(var ze=0;X.length;)ze++,ut(X.pop()).forEach(it=>{--de[it]==0&&X.push(it)});if(ze!==i)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),$e(),n[As]}var gd=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,vd=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,yd=/,/,_d=/(=.+)?(\s*)$/;class Ad{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,n){n.prev=e,n.next=e.next,e.next?e.next.prev=n:this.tail=n,e.next=n,this.length+=1}insertBefore(e,n){n.prev=e.prev,n.next=e,e.prev?e.prev.next=n:this.head=n,e.prev=n,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):oc(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):oc(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var n=this.head;n;){var{next:i}=n;e(n)&&this.removeLink(n),n=i}return this}}function oc(r,e){r.length=1,r.head=r.tail=e}function Qo(r,e,n){if(e==null)e=1;else if(e===0)throw new RangeError("Concurrency must not be zero");var i=Un(r),s=0,c=[];const u={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function b(it,At){return it?At?void(u[it]=u[it].filter($t=>$t!==At)):u[it]=[]:Object.keys(u).forEach($t=>u[$t]=[])}function L(it,...At){u[it].forEach($t=>$t(...At))}var N=!1;function X(it,At,$t,wn){if(wn!=null&&typeof wn!="function")throw new Error("task callback must be a function");var Fn,$n;function Zn(li,...is){return li?$t?$n(li):Fn():is.length<=1?Fn(is[0]):void Fn(is)}ze.started=!0;var si={data:it,callback:$t?Zn:wn||Zn};if(At?ze._tasks.unshift(si):ze._tasks.push(si),N||(N=!0,Ni(()=>{N=!1,ze.process()})),$t||!wn)return new Promise((li,is)=>{Fn=li,$n=is})}function de(it){return function(At,...$t){s-=1;for(var wn=0,Fn=it.length;wn<Fn;wn++){var $n=it[wn],Zn=c.indexOf($n);Zn===0?c.shift():Zn>0&&c.splice(Zn,1),$n.callback(At,...$t),At!=null&&L("error",At,$n.data)}s<=ze.concurrency-ze.buffer&&L("unsaturated"),ze.idle()&&L("drain"),ze.process()}}function Ie(it){return!(it.length!==0||!ze.idle()||(Ni(()=>L("drain")),0))}const $e=it=>At=>{if(!At)return new Promise(($t,wn)=>{(function(Fn,$n){const Zn=(...si)=>{b(Fn,Zn),((li,is)=>{if(li)return wn(li);$t(is)})(...si)};u[Fn].push(Zn)})(it)});b(it),function($t,wn){u[$t].push(wn)}(it,At)};var ut=!1,ze={_tasks:new Ad,*[Symbol.iterator](){yield*ze._tasks[Symbol.iterator]()},concurrency:e,payload:n,buffer:e/4,started:!1,paused:!1,push(it,At){return Array.isArray(it)?Ie(it)?void 0:it.map($t=>X($t,!1,!1,At)):X(it,!1,!1,At)},pushAsync(it,At){return Array.isArray(it)?Ie(it)?void 0:it.map($t=>X($t,!1,!0,At)):X(it,!1,!0,At)},kill(){b(),ze._tasks.empty()},unshift(it,At){return Array.isArray(it)?Ie(it)?void 0:it.map($t=>X($t,!0,!1,At)):X(it,!0,!1,At)},unshiftAsync(it,At){return Array.isArray(it)?Ie(it)?void 0:it.map($t=>X($t,!0,!0,At)):X(it,!0,!0,At)},remove(it){ze._tasks.remove(it)},process(){if(!ut){for(ut=!0;!ze.paused&&s<ze.concurrency&&ze._tasks.length;){var it=[],At=[],$t=ze._tasks.length;ze.payload&&($t=Math.min($t,ze.payload));for(var wn=0;wn<$t;wn++){var Fn=ze._tasks.shift();it.push(Fn),c.push(Fn),At.push(Fn.data)}s+=1,ze._tasks.length===0&&L("empty"),s===ze.concurrency&&L("saturated");var $n=Qi(de(it));i(At,$n)}ut=!1}},length:()=>ze._tasks.length,running:()=>s,workersList:()=>c,idle:()=>ze._tasks.length+s===0,pause(){ze.paused=!0},resume(){ze.paused!==!1&&(ze.paused=!1,Ni(ze.process))}};return Object.defineProperties(ze,{saturated:{writable:!1,value:$e("saturated")},unsaturated:{writable:!1,value:$e("unsaturated")},empty:{writable:!1,value:$e("empty")},drain:{writable:!1,value:$e("drain")},error:{writable:!1,value:$e("error")}}),ze}var Vs=xn(function(r,e,n,i){i=Gi(i);var s=Un(n);return Li(r,(c,u,b)=>{s(e,c,(L,N)=>{e=N,b(L)})},c=>i(c,e))},4);function ac(...r){var e=r.map(Un);return function(...n){var i=this,s=n[n.length-1];return typeof s=="function"?n.pop():s=Es(),Vs(e,n,(c,u,b)=>{u.apply(i,c.concat((L,...N)=>{b(L,N)}))},(c,u)=>s(c,...u)),s[As]}}var fo=xn(function(r,e,n,i){return Jo(gi(e),r,n,i)},4),mo=xn(function(r,e,n,i){var s=Un(n);return fo(r,e,(c,u)=>{s(c,(b,...L)=>b?u(b):u(b,L))},(c,u)=>{for(var b=[],L=0;L<u.length;L++)u[L]&&(b=b.concat(...u[L]));return i(c,b)})},4),cc=xn(function(r,e,n){return mo(r,1/0,e,n)},3),lc=xn(function(r,e,n){return mo(r,1,e,n)},3);function xi(r,e){return(n,i,s,c)=>{var u,b=!1;const L=Un(s);n(i,(N,X,de)=>{L(N,(Ie,$e)=>Ie||Ie===!1?de(Ie):r($e)&&!u?(b=!0,u=e(!0,N),de(null,ho)):void de())},N=>{if(N)return c(N);c(null,b?u:e(!1))})}}var dc=xn(function(r,e,n){return xi(i=>i,(i,s)=>s)(vi,r,e,n)},3),uc=xn(function(r,e,n,i){return xi(s=>s,(s,c)=>c)(gi(e),r,n,i)},4),hc=xn(function(r,e,n){return xi(i=>i,(i,s)=>s)(gi(1),r,e,n)},3);function pc(r){return(e,...n)=>Un(e)(...n,(i,...s)=>{typeof console=="object"&&(i||console[r]&&s.forEach(c=>{}))})}var Ed=pc("dir"),Ko=xn(function(r,e,n){n=Qi(n);var i,s=Un(r),c=Un(e);function u(L,...N){if(L)return n(L);L!==!1&&(i=N,c(...N,b))}function b(L,N){return L?n(L):L!==!1?N?void s(u):n(null,...i):void 0}return b(null,!0)},3);function fc(r){return(e,n,i)=>r(e,i)}var mc=xn(function(r,e,n){return vi(r,fc(Un(e)),n)},3),qo=xn(function(r,e,n,i){return gi(e)(r,fc(Un(n)),i)},4),$o=xn(function(r,e,n){return qo(r,1,e,n)},3);function gc(r){return js(r)?r:function(...e){var n=e.pop(),i=!0;e.push((...s)=>{i?Ni(()=>n(...s)):n(...s)}),r.apply(this,e),i=!1}}var vc=xn(function(r,e,n){return xi(i=>!i,i=>!i)(vi,r,e,n)},3),yc=xn(function(r,e,n,i){return xi(s=>!s,s=>!s)(gi(e),r,n,i)},4),_c=xn(function(r,e,n){return xi(i=>!i,i=>!i)(Li,r,e,n)},3);function Sd(r,e,n,i){var s=new Array(e.length);r(e,(c,u,b)=>{n(c,(L,N)=>{s[u]=!!N,b(L)})},c=>{if(c)return i(c);for(var u=[],b=0;b<e.length;b++)s[b]&&u.push(e[b]);i(null,u)})}function bd(r,e,n,i){var s=[];r(e,(c,u,b)=>{n(c,(L,N)=>{if(L)return b(L);N&&s.push({index:u,value:c}),b(L)})},c=>{if(c)return i(c);i(null,s.sort((u,b)=>u.index-b.index).map(u=>u.value))})}function go(r,e,n,i){return(uo(e)?Sd:bd)(r,e,Un(n),i)}var Ac=xn(function(r,e,n){return go(vi,r,e,n)},3),Ec=xn(function(r,e,n,i){return go(gi(e),r,n,i)},4),Sc=xn(function(r,e,n){return go(Li,r,e,n)},3),Cd=xn(function(r,e){var n=Qi(e),i=Un(gc(r));return function s(c){if(c)return n(c);c!==!1&&i(s)}()},2),Wo=xn(function(r,e,n,i){var s=Un(n);return fo(r,e,(c,u)=>{s(c,(b,L)=>b?u(b):u(b,{key:L,val:c}))},(c,u)=>{for(var b={},{hasOwnProperty:L}=Object.prototype,N=0;N<u.length;N++)if(u[N]){var{key:X}=u[N],{val:de}=u[N];L.call(b,X)?b[X].push(de):b[X]=[de]}return i(c,b)})},4),Td=pc("log"),zo=xn(function(r,e,n,i){i=Gi(i);var s={},c=Un(n);return gi(e)(r,(u,b,L)=>{c(u,b,(N,X)=>{if(N)return L(N);s[b]=X,L(N)})},u=>i(u,s))},4),Rd=Za(Ya?process.nextTick:za?setImmediate:Xa),Yo=xn((r,e,n)=>{var i=uo(e)?[]:{};r(e,(s,c,u)=>{Un(s)((b,...L)=>{L.length<2&&([L]=L),i[c]=L,u(b)})},s=>n(s,i))},3);function bc(r,e){var n=Un(r);return Qo((i,s)=>{n(i[0],s)},e,1)}class wd{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let n;for(;e>0&&Xo(this.heap[e],this.heap[n=Cc(e)]);){let i=this.heap[e];this.heap[e]=this.heap[n],this.heap[n]=i,e=n}}percDown(e){let n;for(;(n=1+(e<<1))<this.heap.length&&(n+1<this.heap.length&&Xo(this.heap[n+1],this.heap[n])&&(n+=1),!Xo(this.heap[e],this.heap[n]));){let i=this.heap[e];this.heap[e]=this.heap[n],this.heap[n]=i,e=n}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let n=0;for(let i=0;i<this.heap.length;i++)e(this.heap[i])||(this.heap[n]=this.heap[i],n++);this.heap.splice(n);for(let i=Cc(this.heap.length-1);i>=0;i--)this.percDown(i);return this}}function Cc(r){return(r+1>>1)-1}function Xo(r,e){return r.priority!==e.priority?r.priority<e.priority:r.pushCount<e.pushCount}var Id=xn(function(r,e){if(e=Gi(e),!Array.isArray(r))return e(new TypeError("First argument to race must be an array of functions"));if(!r.length)return e();for(var n=0,i=r.length;n<i;n++)Un(r[n])(e)},2);function Tc(r,e,n,i){var s=[...r].reverse();return Vs(s,e,n,i)}function Zo(r){var e=Un(r);return Fs(function(n,i){return n.push((s,...c)=>{let u={};if(s&&(u.error=s),c.length>0){var b=c;c.length<=1&&([b]=c),u.value=b}i(null,u)}),e.apply(this,n)})}function ea(r,e,n,i){const s=Un(n);return go(r,e,(c,u)=>{s(c,(b,L)=>{u(b,!L)})},i)}var Pd=xn(function(r,e,n){return ea(vi,r,e,n)},3),Od=xn(function(r,e,n,i){return ea(gi(e),r,n,i)},4),Dd=xn(function(r,e,n){return ea(Li,r,e,n)},3);function Rc(r){return function(){return r}}function ta(r,e,n){var i={times:5,intervalFunc:Rc(0)};if(arguments.length<3&&typeof r=="function"?(n=e||Es(),e=r):(function(u,b){if(typeof b=="object")u.times=+b.times||5,u.intervalFunc=typeof b.interval=="function"?b.interval:Rc(+b.interval||0),u.errorFilter=b.errorFilter;else{if(typeof b!="number"&&typeof b!="string")throw new Error("Invalid arguments for async.retry");u.times=+b||5}}(i,r),n=n||Es()),typeof e!="function")throw new Error("Invalid arguments for async.retry");var s=Un(e),c=1;return function u(){s((b,...L)=>{b!==!1&&(b&&c++<i.times&&(typeof i.errorFilter!="function"||i.errorFilter(b))?setTimeout(u,i.intervalFunc(c-1)):n(b,...L))})}(),n[As]}var wc=xn(function(r,e,n){return xi(Boolean,i=>i)(vi,r,e,n)},3),Ic=xn(function(r,e,n,i){return xi(Boolean,s=>s)(gi(e),r,n,i)},4),Pc=xn(function(r,e,n){return xi(Boolean,i=>i)(Li,r,e,n)},3),Md=xn(function(r,e,n){var i=Un(e);return Go(r,(c,u)=>{i(c,(b,L)=>{if(b)return u(b);u(b,{value:c,criteria:L})})},(c,u)=>{if(c)return n(c);n(null,u.sort(s).map(b=>b.value))});function s(c,u){var b=c.criteria,L=u.criteria;return b<L?-1:b>L?1:0}},3);function na(r,e,n,i){var s=Un(n);return fo(function(c){for(var u=Array(c);c--;)u[c]=c;return u}(r),e,s,i)}var Nd=xn(function(r,e){var n,i=null;return $o(r,(s,c)=>{Un(s)((u,...b)=>{if(u===!1)return c(u);b.length<2?[n]=b:n=b,i=u,c(u?null:{})})},()=>e(i,n))}),ra=xn(function(r,e,n){n=Qi(n);var i=Un(e),s=Un(r),c=[];function u(L,...N){if(L)return n(L);c=N,L!==!1&&s(b)}function b(L,N){return L?n(L):L!==!1?N?void i(u):n(null,...c):void 0}return s(b)},3),Ld=xn(function(r,e){if(e=Gi(e),!Array.isArray(r))return e(new Error("First argument to waterfall must be an array of functions"));if(!r.length)return e();var n=0;function i(c){Un(r[n++])(...c,Qi(s))}function s(c,...u){if(c!==!1)return c||n===r.length?e(c,...u):void i(u)}i([])}),xd={apply:function(r,...e){return(...n)=>r(...e,...n)},applyEach:fd,applyEachSeries:md,asyncify:Ho,auto:sc,autoInject:function(r,e){var n={};return Object.keys(r).forEach(i=>{var s,c=r[i],u=js(c),b=!u&&c.length===1||u&&c.length===0;if(Array.isArray(c))s=[...c],c=s.pop(),n[i]=s.concat(s.length>0?L:c);else if(b)n[i]=c;else{if(s=function(N){const X=function($e){let ut="",ze=0,it=$e.indexOf("*/");for(;ze<$e.length;)if($e[ze]==="/"&&$e[ze+1]==="/"){let At=$e.indexOf(`
|
|
90
|
+
`,ze);ze=At===-1?$e.length:At}else if(it!==-1&&$e[ze]==="/"&&$e[ze+1]==="*"){let At=$e.indexOf("*/",ze);At!==-1?(ze=At+2,it=$e.indexOf("*/",ze)):(ut+=$e[ze],ze++)}else ut+=$e[ze],ze++;return ut}(N.toString());let de=X.match(gd);if(de||(de=X.match(vd)),!de)throw new Error(`could not parse args in autoInject
|
|
91
|
+
Source:
|
|
92
|
+
`+X);let[,Ie]=de;return Ie.replace(/\s/g,"").split(yd).map($e=>$e.replace(_d,"").trim())}(c),c.length===0&&!u&&s.length===0)throw new Error("autoInject task functions require explicit parameters.");u||s.pop(),n[i]=s.concat(L)}function L(N,X){var de=s.map(Ie=>N[Ie]);de.push(X),Un(c)(...de)}}),sc(n,e)},cargo:function(r,e){return Qo(r,1,e)},cargoQueue:function(r,e,n){return Qo(r,e,n)},compose:function(...r){return ac(...r.reverse())},concat:cc,concatLimit:mo,concatSeries:lc,constant:function(...r){return function(...e){return e.pop()(null,...r)}},detect:dc,detectLimit:uc,detectSeries:hc,dir:Ed,doUntil:function(r,e,n){const i=Un(e);return Ko(r,(...s)=>{const c=s.pop();i(...s,(u,b)=>c(u,!b))},n)},doWhilst:Ko,each:mc,eachLimit:qo,eachOf:vi,eachOfLimit:po,eachOfSeries:Li,eachSeries:$o,ensureAsync:gc,every:vc,everyLimit:yc,everySeries:_c,filter:Ac,filterLimit:Ec,filterSeries:Sc,forever:Cd,groupBy:function(r,e,n){return Wo(r,1/0,e,n)},groupByLimit:Wo,groupBySeries:function(r,e,n){return Wo(r,1,e,n)},log:Td,map:Go,mapLimit:fo,mapSeries:ic,mapValues:function(r,e,n){return zo(r,1/0,e,n)},mapValuesLimit:zo,mapValuesSeries:function(r,e,n){return zo(r,1,e,n)},memoize:function(r,e=n=>n){var n=Object.create(null),i=Object.create(null),s=Un(r),c=Fs((u,b)=>{var L=e(...u);L in n?Ni(()=>b(null,...n[L])):L in i?i[L].push(b):(i[L]=[b],s(...u,(N,...X)=>{N||(n[L]=X);var de=i[L];delete i[L];for(var Ie=0,$e=de.length;Ie<$e;Ie++)de[Ie](N,...X)}))});return c.memo=n,c.unmemoized=r,c},nextTick:Rd,parallel:function(r,e){return Yo(vi,r,e)},parallelLimit:function(r,e,n){return Yo(gi(e),r,n)},priorityQueue:function(r,e){var n=bc(r,e),i=!1;return n._tasks=new wd,n.push=function(s,c=0,u=()=>{}){if(typeof u!="function")throw new Error("task callback must be a function");if(n.started=!0,Array.isArray(s)||(s=[s]),s.length===0&&n.idle())return Ni(()=>n.drain());for(var b=0,L=s.length;b<L;b++){var N={data:s[b],priority:c,callback:u};n._tasks.push(N)}i||(i=!0,Ni(()=>{i=!1,n.process()}))},delete n.unshift,n},queue:bc,race:Id,reduce:Vs,reduceRight:Tc,reflect:Zo,reflectAll:function(r){var e;return Array.isArray(r)?e=r.map(Zo):(e={},Object.keys(r).forEach(n=>{e[n]=Zo.call(this,r[n])})),e},reject:Pd,rejectLimit:Od,rejectSeries:Dd,retry:ta,retryable:function(r,e){e||(e=r,r=null);let n=r&&r.arity||e.length;js(e)&&(n+=1);var i=Un(e);return Fs((s,c)=>{function u(b){i(...s,b)}return(s.length<n-1||c==null)&&(s.push(c),c=Es()),r?ta(r,u,c):ta(u,c),c[As]})},seq:ac,series:function(r,e){return Yo(Li,r,e)},setImmediate:Ni,some:wc,someLimit:Ic,someSeries:Pc,sortBy:Md,timeout:function(r,e,n){var i=Un(r);return Fs((s,c)=>{var u,b=!1;s.push((...L)=>{b||(c(...L),clearTimeout(u))}),u=setTimeout(function(){var L=r.name||"anonymous",N=new Error('Callback function "'+L+'" timed out.');N.code="ETIMEDOUT",n&&(N.info=n),b=!0,c(N)},e),i(...s)})},times:function(r,e,n){return na(r,1/0,e,n)},timesLimit:na,timesSeries:function(r,e,n){return na(r,1,e,n)},transform:function(r,e,n,i){arguments.length<=3&&typeof e=="function"&&(i=n,n=e,e=Array.isArray(r)?[]:{}),i=Gi(i||Es());var s=Un(n);return vi(r,(c,u,b)=>{s(e,c,u,b)},c=>i(c,e)),i[As]},tryEach:Nd,unmemoize:function(r){return(...e)=>(r.unmemoized||r)(...e)},until:function(r,e,n){const i=Un(r);return ra(s=>i((c,u)=>s(c,!u)),e,n)},waterfall:Ld,whilst:ra,all:vc,allLimit:yc,allSeries:_c,any:wc,anyLimit:Ic,anySeries:Pc,find:dc,findLimit:uc,findSeries:hc,flatMap:cc,flatMapLimit:mo,flatMapSeries:lc,forEach:mc,forEachSeries:$o,forEachLimit:qo,forEachOf:vi,forEachOfSeries:Li,forEachOfLimit:po,inject:Vs,foldl:Vs,foldr:Tc,select:Ac,selectLimit:Ec,selectSeries:Sc,wrapSync:Ho,during:ra,doDuring:Ko};const kd=xd,Bd=(0,P.getLogger)("modules/util/AsyncQueue.js");class Ud{constructor(){this._queue=kd.queue(this._processQueueTasks.bind(this),1),this._stopped=!1}clear(){this._queue.kill()}_processQueueTasks(e,n){try{e(n)}catch(i){Bd.error(`Task failed: ${i==null?void 0:i.stack}`),n(i)}}push(e,n){this._stopped?n&&n(new Error("The queue has been stopped")):this._queue.push(e,n)}shutdown(){this._stopped=!0}}var Fd=o(2593);const Oc="pending",Hs="active",vo="ended",jd=(0,P.getLogger)("modules/xmpp/JingleSession.js");class Vd extends Br{constructor(e,n,i,s,c,u,b){super(),this.sid=e,this.localJid=n,this.remoteJid=i,this.connection=s,this.mediaConstraints=c,this.pcConfig=u,this.isInitiator=b,this.usedrip=!0,this.dripContainer=[],this.room=null,this._signalingLayer=null,this.state=null,this.rtc=null}get initiatorJid(){return this.isInitiator?this.localJid:this.remoteJid}get responderJid(){return this.isInitiator?this.remoteJid:this.localJid}initialize(e,n,i,s){if(this.state!==null){const c=`attempt to initiate on session ${this.sid}
|
|
93
|
+
in state ${this.state}`;throw jd.error(c),new Error(c)}this.room=e,this.rtc=n,this._signalingLayer=i,this.state=Oc,this.doInitialize(s)}doInitialize(e){}addIceCandidates(e){}getState(){return this.state}addSources(e){}removeSources(e){}terminate(e,n,i){}acceptOffer(e,n,i){}_getInitiatorJid(){return this.isInitiator?this.localJid:this.remoteJid}}const Dc="media_session.REMOTE_VIDEO_CONSTRAINTS_CHANGED",Dt=(0,P.getLogger)("modules/xmpp/JingleSessionPC.js"),ki=1e4;class Ss extends Vd{static parseVideoSenders(e){const n=e.find('>content[name="video"]');if(n.length){const i=n[0].getAttribute("senders");if(i==="both"||i==="initiator"||i==="responder"||i==="none")return i}return null}static parseMaxFrameHeight(e){const n=e.find('>content[name="video"]>max-frame-height');return n.length?Number(n.text()):null}constructor(e,n,i,s,c,u,b,L){super(e,n,i,s,c,u,L),this._bridgeSessionId=null,this._cachedOldLocalSdp=void 0,this._cachedNewLocalSdp=void 0,this._iceCheckingStartedTimestamp=null,this._gatheringStartedTimestamp=null,this.localRecvMaxFrameHeight=void 0,this._localVideoActive=!0,this._remoteVideoActive=!0,this._gatheringReported=!1,this.lasticecandidate=!1,this.closed=!1,this.isP2P=b,this.remoteRecvMaxFrameHeight=void 0,this.modificationQueue=new Ud,this.wasConnected=!1,this.establishmentDuration=void 0,this._xmppListeners=[],this._xmppListeners.push(s.addEventListener(Mi.Events.CONN_STATUS_CHANGED,this.onXmppStatusChanged.bind(this))),this._removeSenderVideoConstraintsChangeListener=void 0}_assertNotEnded(){return this.state!==vo}doInitialize(e){var n,i,s;this.failICE=Boolean(e.failICE),this.lasticecandidate=!1,this.options=e,this.isReconnect=!1,this.wasstable=!1,this.webrtcIceUdpDisable=Boolean(e.webrtcIceUdpDisable),this.webrtcIceTcpDisable=Boolean(e.webrtcIceTcpDisable);const c={disableRtx:e.disableRtx};if(e.gatherStats&&(c.maxstats=300),c.capScreenshareBitrate=!1,c.enableInsertableStreams=e.enableInsertableStreams,c.videoQuality=e.videoQuality,c.forceTurnRelay=e.forceTurnRelay,c.audioQuality=e.audioQuality,c.usesUnifiedPlan=this.usesUnifiedPlan=E.supportsUnifiedPlan()&&(E.isFirefox()||E.isWebKitBased()||(E.isChromiumBased()&&this.isP2P?(n=(i=e.p2p)===null||i===void 0?void 0:i.enableUnifiedOnChrome)===null||n===void 0||n:(s=e.enableUnifiedOnChrome)===null||s===void 0||s)),this.isP2P){c.disableSimulcast=!0;const L=this._abtestSuspendVideoEnabled(e);L!==void 0&&(c.abtestSuspendVideo=L)}else{var u,b;c.disableSimulcast=e.disableSimulcast||e.preferH264&&!e.disableH264||e.videoQuality&&e.videoQuality.preferredCodec===mi.H264,c.capScreenshareBitrate=c.disableSimulcast||!(typeof((u=e.desktopSharingFrameRate)===null||u===void 0?void 0:u.max)=="number"&&((b=e.desktopSharingFrameRate)===null||b===void 0?void 0:b.max)>5),Be.analytics.addPermanentProperties({capScreenshareBitrate:c.capScreenshareBitrate})}e.startSilent&&(c.startSilent=!0),this.peerconnection=this.rtc.createPeerConnection(this._signalingLayer,this.pcConfig,this.isP2P,c),this.peerconnection.onicecandidate=L=>{if(!L)return;const N=L.candidate,X=window.performance.now();if(N){this._gatheringStartedTimestamp===null&&(this._gatheringStartedTimestamp=X);let de=N.protocol;if(typeof de=="string"){if(de=de.toLowerCase(),de==="tcp"||de==="ssltcp"){if(this.webrtcIceTcpDisable)return}else if(de==="udp"&&this.webrtcIceUdpDisable)return}}else this._gatheringReported||(Be.sendAnalytics(Kn,{phase:"gathering",value:X-this._gatheringStartedTimestamp,p2p:this.isP2P,initiator:this.isInitiator}),this._gatheringReported=!0);this.sendIceCandidate(N)},this.peerconnection.onsignalingstatechange=()=>{this.peerconnection.signalingState==="stable"?this.wasstable=!0:this.peerconnection.signalingState!=="closed"&&this.peerconnection.connectionState!=="closed"||this.room.eventEmitter.emit(Je().SUSPEND_DETECTED,this)},this.peerconnection.oniceconnectionstatechange=()=>{const L=window.performance.now();let N=!1;switch(this.isP2P||(this.room.connectionTimes[`ice.state.${this.peerconnection.iceConnectionState}`]=L),Dt.log(`(TIME) ICE ${this.peerconnection.iceConnectionState} ${this.isP2P?"P2P":"JVB"}: `,L),Be.sendAnalytics("ice.state.changed",{p2p:this.isP2P,state:this.peerconnection.iceConnectionState,signaling_state:this.peerconnection.signalingState,reconnect:this.isReconnect,value:L}),this.room.eventEmitter.emit(Je().ICE_CONNECTION_STATE_CHANGED,this,this.peerconnection.iceConnectionState),this.peerconnection.iceConnectionState){case"checking":this._iceCheckingStartedTimestamp=L;break;case"connected":if(this.peerconnection.signalingState==="stable"){N=!0;const X=!this.options.enableIceRestart&&this.room.supportsRestartByTerminate();(this.isReconnect||X)&&this.room.eventEmitter.emit(Je().CONNECTION_RESTORED,this)}if(!this.wasConnected&&(this.wasstable||N||this.usesUnifiedPlan&&this.isInitiator&&E.isChromiumBased())){Be.sendAnalytics(Kn,{phase:"checking",value:L-this._iceCheckingStartedTimestamp,p2p:this.isP2P,initiator:this.isInitiator});const X=Math.min(this._iceCheckingStartedTimestamp,this._gatheringStartedTimestamp);this.establishmentDuration=L-X,Be.sendAnalytics(Kn,{phase:"establishment",value:this.establishmentDuration,p2p:this.isP2P,initiator:this.isInitiator}),this.wasConnected=!0,this.room.eventEmitter.emit(Je().CONNECTION_ESTABLISHED,this)}this.isReconnect=!1;break;case"disconnected":this.isReconnect=!0,this.wasstable&&this.room.eventEmitter.emit(Je().CONNECTION_INTERRUPTED,this);break;case"failed":this.room.eventEmitter.emit(Je().CONNECTION_ICE_FAILED,this)}},this.peerconnection.onconnectionstatechange=()=>{const L=this.peerconnection.iceConnectionState;this.peerconnection.connectionState==="failed"&&L==="disconnected"&&this.room.eventEmitter.emit(Je().CONNECTION_ICE_FAILED,this)},this.peerconnection.onnegotiationneeded=()=>{const L=this.peerconnection.signalingState,N=this.peerconnection.remoteDescription;if(this.usesUnifiedPlan&&!this.isP2P&&L==="stable"&&N&&typeof N.sdp=="string"){Dt.info(`${this} onnegotiationneeded fired on ${this.peerconnection}`);const X=de=>{const Ie=new Ln(this.peerconnection.localDescription.sdp);this._renegotiate().then(()=>this.peerconnection.configureSenderVideoEncodings()).then(()=>{const $e=new Ln(this.peerconnection.localDescription.sdp);this.notifyMySSRCUpdate(Ie,$e)}).then(()=>de(),$e=>de($e))};this.modificationQueue.push(X,de=>{de?Dt.error(`${this} onnegotiationneeded error`,de):Dt.debug(`${this} onnegotiationneeded executed - OK`)})}}}getRemoteRecvMaxFrameHeight(){if(this.isP2P)return this.remoteRecvMaxFrameHeight}sendIceCandidate(e){const n=new Ln(this.peerconnection.localDescription.sdp);if(e&&e.candidate.length&&!this.lasticecandidate){const i=Jt.iceparams(n.media[e.sdpMLineIndex],n.session),s=Jt.candidateToJingle(e.candidate);if(!i||!s){const c="failed to get ice && jcand";return w().callErrorHandler(new Error(c)),void Dt.error(c)}i.xmlns="urn:xmpp:jingle:transports:ice-udp:1",this.usedrip?(this.dripContainer.length===0&&setTimeout(()=>{this.dripContainer.length!==0&&(this.sendIceCandidates(this.dripContainer),this.dripContainer=[])},150),this.dripContainer.push(e)):this.sendIceCandidates([e])}else Dt.log(`${this} sendIceCandidate: last candidate`),this.lasticecandidate=!0}sendIceCandidates(e){if(!this._assertNotEnded("sendIceCandidates"))return;Dt.log(`${this} sendIceCandidates ${JSON.stringify(e)}`);const n=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-info",initiator:this.initiatorJid,sid:this.sid}),i=new Ln(this.peerconnection.localDescription.sdp);for(let s=0;s<i.media.length;s++){const c=e.filter(b=>b.sdpMLineIndex===s),u=Jt.parseMLine(i.media[s].split(`\r
|
|
94
|
+
`)[0]);if(c.length>0){const b=Jt.iceparams(i.media[s],i.session);b.xmlns="urn:xmpp:jingle:transports:ice-udp:1",n.c("content",{creator:this.initiatorJid===this.localJid?"initiator":"responder",name:c[0].sdpMid?c[0].sdpMid:u.media}).c("transport",b);for(let N=0;N<c.length;N++){const X=Jt.candidateToJingle(c[N].candidate);this.failICE&&(X.ip="1.1.1.1"),n.c("candidate",X).up()}const L=Jt.findLine(i.media[s],"a=fingerprint:",i.session);if(L){const N=Jt.parseFingerprint(L);N.required=!0,n.c("fingerprint",{xmlns:"urn:xmpp:jingle:apps:dtls:0"}).t(N.fingerprint),delete N.fingerprint,n.attrs(N),n.up()}n.up(),n.up()}}this.connection.sendIQ(n,null,this.newJingleErrorHandler(n),ki)}sendIceFailedNotification(){const e=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-info",initiator:this.initiatorJid,sid:this.sid}).c("ice-state",{xmlns:"http://jitsi.org/protocol/focus"}).t("failed").up();this._bridgeSessionId&&e.c("bridge-session",{xmlns:"http://jitsi.org/protocol/focus",id:this._bridgeSessionId}),this.connection.sendIQ2(e,{timeout:65}).catch(this.newJingleErrorHandler(e))}addIceCandidates(e){if(this.peerconnection.signalingState==="closed")return void Dt.warn(`${this} Ignored add ICE candidate when in closed state`);const n=[];e.find(">content>transport>candidate").each((i,s)=>{let c=Jt.candidateFromJingle(s);c=c.replace(`\r
|
|
95
|
+
`,"").replace("a=","");const u=new RTCIceCandidate({sdpMLineIndex:0,sdpMid:"",candidate:c});n.push(u)}),n.length?(Dt.debug(`${this} Queued add (${n.length}) ICE candidates task`),this.modificationQueue.push(i=>{for(const s of n)this.peerconnection.addIceCandidate(s).then(()=>Dt.debug(`${this} addIceCandidate ok!`),c=>Dt.error(`${this} addIceCandidate failed!`,c));i(),Dt.debug(`${this} ICE candidates task finished`)})):Dt.error(`${this} No ICE candidates to add ?`,e[0]&&e[0].outerHTML)}readSsrcInfo(e){$(e).find('>description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each((n,i)=>{const s=Number(i.getAttribute("ssrc"));if(this.isP2P)this._signalingLayer.setSSRCOwner(s,qe.Strophe.getResourceFromJid(this.remoteJid));else{if(Mr.isSourceNameSignalingEnabled()&&i.hasAttribute("name")){const c=i.getAttribute("name");this._signalingLayer.setTrackSourceName(s,c)}$(i).find('>ssrc-info[xmlns="http://jitsi.org/jitmeet"]').each((c,u)=>{const b=u.getAttribute("owner");var L;b&&b.length&&(isNaN(s)||s<0?Dt.warn(`${this} Invalid SSRC ${s} value received for ${b}`):this._signalingLayer.setSSRCOwner(s,(L=b,qe.Strophe.getResourceFromJid(L)||L)))})}})}generateRecvonlySsrc(){this.peerconnection?this.peerconnection.generateRecvonlySsrc():Dt.error(`${this} Unable to generate recvonly SSRC - no peerconnection`)}getConfiguredVideoCodec(){return this.peerconnection.getConfiguredVideoCodec()}acceptOffer(e,n,i,s){this.setOfferAnswerCycle(e,()=>{this.sendSessionAccept(()=>{n(),this.room.eventEmitter.emit(Je().SESSION_ACCEPT,this)},c=>{i(c),this.room.eventEmitter.emit(Je().SESSION_ACCEPT_ERROR,this,c)})},i,s)}invite(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!this.isInitiator)throw new Error("Trying to invite from the responder session");Dt.debug(`${this} Queued invite task`),this.modificationQueue.push(n=>{const i=[];for(const s of e)i.push(this.peerconnection.addTrack(s,this.isInitiator));Promise.all(i).then(()=>this.peerconnection.createOffer(this.mediaConstraints)).then(s=>this.peerconnection.setLocalDescription(s)).then(()=>{this.sendSessionInitiate(this.peerconnection.localDescription.sdp)}).then(()=>n(),s=>n(s))},n=>{n?Dt.error(`${this} invite error`,n):Dt.debug(`${this} invite executed - OK`)})}sendSessionInitiate(e){let n=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-initiate",initiator:this.initiatorJid,sid:this.sid});new Ln(e).toJingle(n,this.isInitiator?"initiator":"responder"),n=n.tree(),Dt.debug(`${this} Session-initiate: `,n),this.connection.sendIQ(n,()=>{Dt.info(`${this} Got RESULT for "session-initiate"`)},i=>{Dt.error(`${this} "session-initiate" error`,i)},ki)}setAnswer(e){if(!this.isInitiator)throw new Error("Trying to set an answer on the responder session");this.setOfferAnswerCycle(e,()=>{if(Dt.info(`${this} setAnswer - succeeded`),this.usesUnifiedPlan&&E.isChromiumBased()){const n=i=>{const s=this.peerconnection.remoteDescription.sdp,c=new RTCSessionDescription({type:"offer",sdp:s});return this._responderRenegotiate(c).then(()=>i(),u=>i(u))};Dt.debug(`${this} Queued responderRenegotiate task`),this.modificationQueue.push(n,i=>{i?Dt.error(`${this} failed to renegotiate a decoder for muted endpoint ${i}`):Dt.debug(`${this} renegotiate a decoder for muted endpoint`)})}},n=>{Dt.error(`${this} setAnswer failed: `,n)})}setOfferAnswerCycle(e,n,i){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];Dt.debug(`${this} Queued setOfferAnswerCycle task`),this.modificationQueue.push(c=>{const u=[];for(const X of s)u.push(this.peerconnection.addTrack(X,this.isInitiator));const b=this._processNewJingleOfferIq(e),L=this.peerconnection.localDescription.sdp,N=$(e).find('>bridge-session[xmlns="http://jitsi.org/protocol/focus"]').attr("id");N!==this._bridgeSessionId&&(this._bridgeSessionId=N),Promise.all(u).then(()=>this._renegotiate(b.raw)).then(()=>{if(this.state===Oc&&(this.state=Hs,!this.isP2P||this._localVideoActive&&!this.localRecvMaxFrameHeight||this.sendContentModify()),L){const X=new Ln(this.peerconnection.localDescription.sdp);this.notifyMySSRCUpdate(new Ln(L),X)}}).then(()=>c(),X=>c(X))},c=>{c?(Dt.error(`${this} setOfferAnswerCycle task failed: ${c}`),i(c)):(Dt.debug(`${this} setOfferAnswerCycle task done`),n())})}setVideoCodecs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const i=this.peerconnection.getConfiguredVideoCodec();if(this._assertNotEnded()&&e!==i){Dt.info(`${this} Switching video codec from ${i} to ${e}`),this.peerconnection.setVideoCodecs(e,n);const s=c=>{this._renegotiate().then(()=>(Dt.debug(`${this} setVideoCodecs task is done`),c()),u=>(Dt.error(`${this} setVideoCodecs task failed: ${u}`),c(u)))};Dt.debug(`${this} Queued setVideoCodecs task`),this.modificationQueue.push(s)}}replaceTransport(e,n,i){if(this.options.enableForcedReload){const u=new Ln(this.peerconnection.localDescription.sdp);return this.sendTransportAccept(u,n,i),void this.room.eventEmitter.emit(Je().CONNECTION_RESTARTED,this)}this.room.eventEmitter.emit(Je().ICE_RESTARTING,this);const s=e.clone();e.find(">content[name='data']").attr("senders","rejected"),e.find(">content>description>source").remove(),e.find(">content>description>ssrc-group").remove();const c=e.find(">content>transport>fingerprint");c.attr("hash","sha-1"),c.text("00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"),this.setOfferAnswerCycle(e,()=>{this.setOfferAnswerCycle(s,()=>{const u=new Ln(this.peerconnection.localDescription.sdp);this.sendTransportAccept(u,n,i),this.room.eventEmitter.emit(Je().ICE_RESTART_SUCCESS,this,s)},i)},i)}sendSessionAccept(e,n){const i=new Ln(this.peerconnection.localDescription.sdp),s=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-accept",initiator:this.initiatorJid,responder:this.responderJid,sid:this.sid});this.webrtcIceTcpDisable&&(i.removeTcpCandidates=!0),this.webrtcIceUdpDisable&&(i.removeUdpCandidates=!0),this.failICE&&(i.failICE=!0),i.toJingle(s,this.initiatorJid===this.localJid?"initiator":"responder"),Dt.info(`${this} Sending session-accept`),Dt.debug(s.tree()),this.connection.sendIQ(s,e,this.newJingleErrorHandler(s,c=>{n(c),this.room.eventEmitter.emit(Je().SESSION_ACCEPT_TIMEOUT,this)}),ki)}sendContentModify(){const e=this.localRecvMaxFrameHeight,n=this._localVideoActive?"both":"none";let i=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"content-modify",initiator:this.initiatorJid,sid:this.sid}).c("content",{name:"video",senders:n});e!==void 0&&(i=i.c("max-frame-height",{xmlns:"http://jitsi.org/jitmeet/video"}).t(e)),Dt.info(`${this} sending content-modify, video senders: ${n}, max frame height: ${e}`),Dt.debug(i.tree()),this.connection.sendIQ(i,null,this.newJingleErrorHandler(i),ki)}setReceiverVideoConstraint(e){Dt.info(`${this} setReceiverVideoConstraint - max frame height: ${e}`),this.localRecvMaxFrameHeight=e,this.isP2P?this.state===Hs&&this.sendContentModify():this.rtc.setReceiverVideoConstraint(e)}sendTransportAccept(e,n,i){const s=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-accept",initiator:this.initiatorJid,sid:this.sid});e.media.forEach((c,u)=>{const b=Jt.parseMLine(c.split(`\r
|
|
96
|
+
`)[0]);s.c("content",{creator:this.initiatorJid===this.localJid?"initiator":"responder",name:b.media}),e.transportToJingle(u,s),s.up()}),Dt.info(`${this} Sending transport-accept`),Dt.debug(s.tree()),this.connection.sendIQ(s,n,this.newJingleErrorHandler(s,i),ki)}sendTransportReject(e,n){const i=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-reject",initiator:this.initiatorJid,sid:this.sid});Dt.info(`${this} Sending 'transport-reject'`),Dt.debug(i.tree()),this.connection.sendIQ(i,e,this.newJingleErrorHandler(i,n),ki)}setSenderVideoConstraint(e){if(this._assertNotEnded()){if(Dt.info(`${this} setSenderVideoConstraint: ${e}`),!this.isP2P&&E.isReactNative()&&e!==void 0){const n=e>0;return this.setMediaTransferActive(!0,n)}return e===void 0?this.peerconnection.configureSenderVideoEncodings():this.peerconnection.setSenderVideoConstraints(e)}return Promise.resolve()}terminate(e,n,i){if(this.state!==vo){if(!i||Boolean(i.sendSessionTerminate)){const s=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-terminate",initiator:this.initiatorJid,sid:this.sid}).c("reason").c(i&&i.reason||"success").up();i&&i.reasonDescription?s.c("text").t(i.reasonDescription).up().up():s.up(),this._bridgeSessionId&&s.c("bridge-session",{xmlns:"http://jitsi.org/protocol/focus",id:this._bridgeSessionId,restart:i&&i.requestRestart===!0}).up(),Dt.info(`${this} Sending session-terminate`),Dt.debug(s.tree()),this.connection.sendIQ(s,e,this.newJingleErrorHandler(s,n),ki)}else Dt.info(`${this} Skipped sending session-terminate`);this.connection.jingle.terminate(this.sid)}}onTerminated(e,n){Dt.info(`${this} Session terminated`,e,n),this._xmppListeners.forEach(i=>i()),this._xmppListeners=[],this._removeSenderVideoConstraintsChangeListener&&this._removeSenderVideoConstraintsChangeListener(),this.close()}onXmppStatusChanged(e){e===Mi.Status.CONNECTED&&this._cachedOldLocalSdp&&(Dt.info(`${this} Sending SSRC update on reconnect`),this.notifyMySSRCUpdate(this._cachedOldLocalSdp,this._cachedNewLocalSdp))}_parseSsrcInfoFromSourceAdd(e,n){const i=[],s=this;return $(e).each((c,u)=>{const b=$(u).attr("name");let L="";$(u).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){const N=this.getAttribute("semantics"),X=$(this).find(">source").map(function(){return this.getAttribute("ssrc")}).get();X.length&&(L+=`a=ssrc-group:${N} ${X.join(" ")}\r
|
|
97
|
+
`)}),$(u).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){const N=$(this).attr("ssrc");n.containsSSRC(N)?(!s.usesUnifiedPlan||!s.isP2P)&&Dt.warn(`${s} Source-add request for existing SSRC: ${N}`):$(this).find(">parameter").each(function(){L+=`a=ssrc:${N} ${$(this).attr("name")}`,$(this).attr("value")&&$(this).attr("value").length&&(L+=`:${$(this).attr("value")}`),L+=`\r
|
|
98
|
+
`})}),n.media.forEach((N,X)=>{Jt.findLine(N,`a=mid:${b}`)&&(i[X]||(i[X]=""),i[X]+=L)})}),i}addRemoteStream(e){this._addOrRemoveRemoteStream(!0,e)}removeRemoteStream(e){this._addOrRemoveRemoteStream(!1,e)}removeRemoteStreamsOnLeave(e){Dt.debug(`${this} Queued removeRemoteStreamsOnLeave task for participant ${e}`),this.modificationQueue.push(n=>{const i=this.peerconnection.getRemoteSourceInfoByParticipant(e);if(i.length){this.peerconnection.removeRemoteTracks(e);const s=new Ln(this.peerconnection.localDescription.sdp),c=this._processRemoteRemoveSource(i);this._renegotiate(c.raw).then(()=>{const u=new Ln(this.peerconnection.localDescription.sdp);this.notifyMySSRCUpdate(s,u),n()}).catch(u=>n(u))}else n()},n=>{n?Dt.error(`${this} removeRemoteStreamsOnLeave error:`,n):Dt.info(`${this} removeRemoteStreamsOnLeave done!`)})}_addOrRemoveRemoteStream(e,n){const i=e?"addRemoteStream":"removeRemoteStream";e&&this.readSsrcInfo(n),Dt.debug(`${this} Queued ${i} task`),this.modificationQueue.push(s=>{if(!this.peerconnection.localDescription||!this.peerconnection.localDescription.sdp){const X=`${i} - localDescription not ready yet`;return Dt.error(X),void s(X)}Dt.log(`${this} Processing ${i}`);const c=new Ln(this.peerconnection.localDescription.sdp),u=new Ln(this.peerconnection.remoteDescription.sdp),b=e?this._parseSsrcInfoFromSourceAdd(n,u):this._parseSsrcInfoFromSourceRemove(n,u),L=e?this._processRemoteAddSource(b):this._processRemoteRemoveSource(b),N=new RTCSessionDescription({type:"offer",sdp:L.raw});(e&&this.usesUnifiedPlan&&this.isP2P&&E.isChromiumBased()?this._responderRenegotiate(N):this._renegotiate(L.raw)).then(()=>{const X=new Ln(this.peerconnection.localDescription.sdp);Dt.log(`${this} ${i} - OK`),this.notifyMySSRCUpdate(c,X),s()},X=>{Dt.error(`${this} ${i} failed:`,X),s(X)})})}_processNewJingleOfferIq(e){const n=new Ln("");return this.webrtcIceTcpDisable&&(n.removeTcpCandidates=!0),this.webrtcIceUdpDisable&&(n.removeUdpCandidates=!0),this.failICE&&(n.failICE=!0),n.fromJingle(e),this.readSsrcInfo($(e).find(">content")),n}_processRemoteRemoveSource(e){const n=this.usesUnifiedPlan?new Ln(this.peerconnection.peerconnection.remoteDescription.sdp):new Ln(this.peerconnection.remoteDescription.sdp);return e.forEach((i,s)=>{(i=i.split(`\r
|
|
99
|
+
`)).pop(),this.usesUnifiedPlan?i.forEach(c=>{const u=n.media.findIndex(N=>N.includes(c));if(u>-1){var b;const N=(b=Jt.parseMLine(n.media[u].split(`\r
|
|
100
|
+
`)[0]))===null||b===void 0?void 0:b.media;if(this.isP2P){const X=this.peerconnection.getDesiredMediaDirection(N,!1);[Tn().SENDRECV,Tn().SENDONLY].forEach(de=>{n.media[u]=n.media[u].replace(`a=${de}`,`a=${X}`)})}else{var L;const X=(L=Jt.parseMLine(n.media[u].split(`\r
|
|
101
|
+
`)[0]))===null||L===void 0?void 0:L.port;n.media[u]=n.media[u].replace(`${c}\r
|
|
102
|
+
`,""),n.media[u]=n.media[u].replace(`m=${N} ${X}`,`m=${N} 0`)}}}):i.forEach(c=>{n.media[s]=n.media[s].replace(`${c}\r
|
|
103
|
+
`,"")})}),n.raw=n.session+n.media.join(""),n}_processRemoteAddSource(e){const n=new Ln(this.peerconnection.remoteDescription.sdp);return e.forEach((i,s)=>{if(n.media[s]+=i,this.isP2P&&this.usesUnifiedPlan){var c;const u=(c=Jt.parseMLine(n.media[s].split(`\r
|
|
104
|
+
`)[0]))===null||c===void 0?void 0:c.media,b=this.peerconnection.getDesiredMediaDirection(u,!0);[Tn().RECVONLY,Tn().INACTIVE].forEach(L=>{n.media[s]=n.media[s].replace(`a=${L}`,`a=${b}`)})}}),n.raw=n.session+n.media.join(""),n}_renegotiate(e){if(this.peerconnection.signalingState==="closed"){const s=new Error("Attempted to renegotiate in state closed");return this.room.eventEmitter.emit(Je().RENEGOTIATION_FAILED,s,this),Promise.reject(s)}const n=e||this.peerconnection.remoteDescription.sdp;if(!n){const s=new Error(`Can not renegotiate without remote description, current state: ${this.state}`);return this.room.eventEmitter.emit(Je().RENEGOTIATION_FAILED,s,this),Promise.reject(s)}const i=new RTCSessionDescription({type:this.isInitiator?"answer":"offer",sdp:n});return this.isInitiator?this._initiatorRenegotiate(i):this._responderRenegotiate(i)}_responderRenegotiate(e){return Dt.debug(`${this} Renegotiate: setting remote description`),this.peerconnection.setRemoteDescription(e).then(()=>(Dt.debug(`${this} Renegotiate: creating answer`),this.peerconnection.createAnswer(this.mediaConstraints).then(n=>(Dt.debug(`${this} Renegotiate: setting local description`),this.peerconnection.setLocalDescription(n)))))}_initiatorRenegotiate(e){return Dt.debug(`${this} Renegotiate: creating offer`),this.peerconnection.createOffer(this.mediaConstraints).then(n=>(Dt.debug(`${this} Renegotiate: setting local description`),this.peerconnection.setLocalDescription(n).then(()=>(Dt.debug(`${this} Renegotiate: setting remote description`),this.peerconnection.setRemoteDescription(e)))))}replaceTrack(e,n){const i=s=>{Dt.debug(`${this} replaceTrack worker started. oldTrack = ${e}, newTrack = ${n}`);const c=this.peerconnection.localDescription.sdp;this.usesUnifiedPlan||(this.peerconnection.options.capScreenshareBitrate&&e&&n&&n.isVideoTrack()&&this.peerconnection.clearRecvonlySsrc(),!e&&n&&n.isVideoTrack()?this.peerconnection.clearRecvonlySsrc():e&&e.isVideoTrack()&&!n&&(this.peerconnection.clearRecvonlySsrc(),this.peerconnection.generateRecvonlySsrc())),this.peerconnection.replaceTrack(e,n).then(u=>{let b=Promise.resolve();return Dt.debug(`${this} TPC.replaceTrack finished. shouldRenegotiate = ${u}, JingleSessionState = ${this.state}`),u&&(e||n)&&this.state===Hs&&(b=this._renegotiate().then(()=>{const L=new Ln(this.peerconnection.localDescription.sdp);this.notifyMySSRCUpdate(new Ln(c),L)})),b.then(()=>{if(n!=null&&n.isVideoTrack())return Dt.debug(`${this} replaceTrack worker: configuring video stream`),this.peerconnection.configureSenderVideoEncodings()})}).then(()=>s(),u=>s(u))};return new Promise((s,c)=>{Dt.debug(`${this} Queued replaceTrack task. Old track = ${e}, new track = ${n}`),this.modificationQueue.push(i,u=>{u?(Dt.error(`${this} Replace track error:`,u),c(u)):(Dt.info(`${this} Replace track done!`),s())})})}_parseSsrcInfoFromSourceRemove(e,n){const i=[];return $(e).each((s,c)=>{const u=$(c).attr("name");let b="";$(c).find('ssrc-group[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){const N=this.getAttribute("semantics"),X=$(this).find(">source").map(function(){return this.getAttribute("ssrc")}).get();X.length&&(b+=`a=ssrc-group:${N} ${X.join(" ")}\r
|
|
105
|
+
`)});const L=[];$(c).find('source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]').each(function(){const N=$(this).attr("ssrc");L.push(N)}),n.media.forEach((N,X)=>{Jt.findLine(N,`a=mid:${u}`)&&(i[X]||(i[X]=""),L.forEach(de=>{const Ie=Jt.findLines(N,`a=ssrc:${de}`);Ie.length&&(i[X]+=`${Ie.join(`\r
|
|
106
|
+
`)}\r
|
|
107
|
+
`)}),i[X]+=b)})}),i}_verifyNoSSRCChanged(e,n){const i=new Ln(this.peerconnection.localDescription.sdp);let s=new _s(n,i);const c=s.getNewMedia();if(Object.keys(c).length)return Dt.error(`${this} - some SSRC were added on ${e}`,c),!1;s=new _s(i,n);const u=s.getNewMedia();return!Object.keys(u).length||(Dt.error(`${this} - some SSRCs were removed on ${e}`,u),!1)}addTrackAsUnmute(e){return this._addRemoveTrackAsMuteUnmute(!1,e).then(()=>{if(e.isVideoTrack())return this.peerconnection.configureSenderVideoEncodings()})}removeTrackAsMute(e){return this._addRemoveTrackAsMuteUnmute(!0,e)}_addRemoveTrackAsMuteUnmute(e,n){if(!n)return Promise.reject('invalid "track" argument value');const i=e?"removeTrackMute":"addTrackUnmute",s=c=>{const u=this.peerconnection;if(!u)return void c(`Error: tried ${i} track with no active peerconnection`);const b=u.localDescription.sdp;(e?u.removeTrackMute(n):u.addTrackUnmute(n)).then(L=>{L&&b&&u.remoteDescription.sdp?this._renegotiate().then(()=>{!this.usesUnifiedPlan&&this._verifyNoSSRCChanged(i,new Ln(b));const N=u.localDescription.sdp;this.notifyMySSRCUpdate(new Ln(b),new Ln(N)),c()}):c()},c)};return Dt.debug(`${this} Queued ${i} task`),new Promise((c,u)=>{this.modificationQueue.push(s,b=>{b?(Dt.error(`${this} ${i} failed`),u(b)):(Dt.debug(`${this} ${i} done`),c())})})}setMediaTransferActive(e,n){if(!this.peerconnection)return Promise.reject('Can not modify transfer active state, before "initialize" is called');const i=e?"audio active":"audio inactive",s=n?"video active":"video inactive";Dt.info(`${this} Queued make ${s}, ${i} task`);const c=u=>{const b=this.state===Hs,L=this.peerconnection.setAudioTransferActive(e);this._localVideoActive!==n&&(this._localVideoActive=n,this.isP2P&&b&&this.sendContentModify());const N=this.peerconnection.setVideoTransferActive(this._localVideoActive&&this._remoteVideoActive);b&&(L||N)?this._renegotiate().then(u,u):u()};return new Promise((u,b)=>{this.modificationQueue.push(c,L=>{L?(Dt.error(`${this} Make ${s}, ${i} task failed!`),b(L)):(Dt.debug(`${this} Make ${s}, ${i} task done!`),u())})})}modifyContents(e){const n=Ss.parseVideoSenders(e),i=Ss.parseMaxFrameHeight(e);i&&(Dt.info(`${this} received remote max frame height: ${i}`),this.remoteRecvMaxFrameHeight=i,this.eventEmitter.emit(Dc,this)),n!==null?(Dt.debug(`${this} queued "content-modify" task(video senders="${n}")`),this.modificationQueue.push(s=>{this._assertNotEnded("content-modify")&&this._modifyRemoteVideoActive(n)?this._renegotiate().then(s,s):s()},s=>{s?Dt.error(`${this} "content-modify" failed`,s):Dt.debug(`${this} "content-modify" task(video senders="${n}") done`)})):Dt.error(`${this} - failed to parse video "senders" attribute in"content-modify" action`)}_modifyRemoteVideoActive(e){const n=e==="both"||e==="initiator"&&this.isInitiator||e==="responder"&&!this.isInitiator;return n!==this._remoteVideoActive&&(Dt.debug(`${this} new remote video active: ${n}`),this._remoteVideoActive=n),this.peerconnection.setVideoTransferActive(this._localVideoActive&&this._remoteVideoActive)}notifyMySSRCUpdate(e,n){if(this.state!==Hs)return void Dt.warn(`${this} Skipping SSRC update in '${this.state} ' state.`);if(!this.connection.connected)return this._cachedOldLocalSdp||(this._cachedOldLocalSdp=e),this._cachedNewLocalSdp=n,void Dt.warn(`${this} Not sending SSRC update while the signaling is disconnected`);this._cachedOldLocalSdp=void 0,this._cachedNewLocalSdp=void 0;const i=N=>{const X=N.getNewMedia();let de=[],Ie=null;return Object.keys(X).forEach($e=>{const ut=Object.keys(X[$e].ssrcs);Ie=X[$e].mid,ut!=null&&ut.length&&(de=de.concat(ut))}),{mediaType:Ie,ssrcs:de}};let s=new _s(n,e);const c=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"source-remove",initiator:this.initiatorJid,sid:this.sid}),u=s.toJingle(c),b={};if(u){const N=i(s);Dt.info(`${this} Sending source-remove for ${N.mediaType} ssrcs=${N.ssrcs}`),this.connection.sendIQ(c,()=>{this.room.eventEmitter.emit(Je().SOURCE_REMOVE,this,b)},this.newJingleErrorHandler(c,X=>{this.room.eventEmitter.emit(Je().SOURCE_REMOVE_ERROR,this,X,b)}),ki)}s=new _s(e,n);const L=(0,qe.$iq)({to:this.remoteJid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"source-add",initiator:this.initiatorJid,sid:this.sid});if(s.toJingle(L)){const N=i(s);Dt.info(`${this} Sending source-add for ${N.mediaType} ssrcs=${N.ssrcs}`),this.connection.sendIQ(L,()=>{this.room.eventEmitter.emit(Je().SOURCE_ADD,this,b)},this.newJingleErrorHandler(L,X=>{this.room.eventEmitter.emit(Je().SOURCE_ADD_ERROR,this,X,N.mediaType,b)}),ki)}}newJingleErrorHandler(e,n){return i=>{const s={},c=$(i).find("error");if(c.length){s.code=c.attr("code");const u=$(i).find("error :first");u.length&&(s.reason=u[0].tagName);const b=c.find(">text");b.length&&(s.msg=b.text())}i||(s.reason="timeout"),s.session=this.toString(),n?n(s):this.state===vo&&s.reason==="item-not-found"?Dt.debug(`${this} Jingle error: ${JSON.stringify(s)}`):w().callErrorHandler(new Error(`Jingle error: ${JSON.stringify(s)}`))}}getIceConnectionState(){return this.peerconnection.getConnectionState()}close(){this.state=vo,this.establishmentDuration=void 0,this.peerconnection&&(this.peerconnection.onicecandidate=null,this.peerconnection.oniceconnectionstatechange=null,this.peerconnection.onnegotiationneeded=null,this.peerconnection.onsignalingstatechange=null),Dt.debug(`${this} Clearing modificationQueue`),this.modificationQueue.clear(),Dt.debug(`${this} Queued PC close task`),this.modificationQueue.push(e=>{this.peerconnection&&this.peerconnection.close(),e(),Dt.debug(`${this} PC close task done!`)}),Dt.debug(`${this} Shutdown modificationQueue!`),this.modificationQueue.shutdown()}toString(){return`JingleSessionPC[session=${this.isP2P?"P2P":"JVB"},initiator=${this.isInitiator},sid=${this.sid}]`}_abtestSuspendVideoEnabled(e){let{abTesting:n}=e;if(!n||!n.enableSuspendVideoTest)return;const i=this._getInitiatorJid();return(0,Fd.integerHash)(i)%2==0}}const Sr=(0,P.getLogger)("modules/xmpp/strophe.jingle.js");function Mc(r){const e=$(r).find(">candidate"),n=[];return e.each((i,s)=>{const c=s.attributes,u=[];for(let b=0;b<c.length;b++){const L=c[b];u.push(`${L.name}: ${L.value}`)}n.push(u.join(" "))}),n}class Hd extends oo{constructor(e,n,i){super(),this.xmpp=e,this.eventEmitter=n,this.sessions={},this.jvbIceConfig=i.jvb,this.p2pIceConfig=i.p2p,this.mediaConstraints={offerToReceiveAudio:!0,offerToReceiveVideo:!0}}init(e){super.init(e),this.connection.addHandler(this.onJingle.bind(this),"urn:xmpp:jingle:1","iq","set",null,null)}onJingle(e){const n=$(e).find("jingle").attr("sid"),i=$(e).find("jingle").attr("action"),s=e.getAttribute("from"),c=(0,qe.$iq)({type:"result",to:s,id:e.getAttribute("id")});let u=this.sessions[n];if(i!=="session-initiate"){if(!u)return c.attrs({type:"error"}),c.c("error",{type:"cancel"}).c("item-not-found",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("unknown-session",{xmlns:"urn:xmpp:jingle:errors:1"}),Sr.warn(`invalid session id: ${n}`),Sr.debug(e),this.connection.send(c),!0;if(s!==u.remoteJid)return Sr.warn("jid mismatch for session id",n,u.remoteJid,e),c.attrs({type:"error"}),c.c("error",{type:"cancel"}).c("item-not-found",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("unknown-session",{xmlns:"urn:xmpp:jingle:errors:1"}),this.connection.send(c),!0}else if(u!==void 0)return c.attrs({type:"error"}),c.c("error",{type:"cancel"}).c("service-unavailable",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up(),Sr.warn("duplicate session id",n,e),this.connection.send(c),!0;const b=window.performance.now(),L=qe.Strophe.getResourceFromJid(s)!=="focus",N=$(e).find("jingle>json-message");if(N!=null&&N.length){var X;let Ie;Sr.info(`Found a JSON-encoded element in ${i}, translating to standard Jingle.`);for(let $e=0;$e<N.length;$e++)Ie=ad(e,N[$e]);if((X=Ie)!==null&&X!==void 0&&X.size){const $e=[];for(const ut of Ie.keys())$e.push(`${ut}:[${Ie.get(ut)}]`);Sr.debug(`Received ${i} from ${s} with sources=${$e.join(", ")}`)}}switch(i){case"session-initiate":{Sr.log("(TIME) received session-initiate: ",b);const Ie=$(e).find("jingle>startmuted");if(L&&Sr.debug(`Received ${i} from ${s}`),Ie!=null&&Ie.length){const ut=Ie.attr(Xe),ze=Ie.attr(Rt);this.eventEmitter.emit(Je().START_MUTED_FROM_FOCUS,ut==="true",ze==="true")}const $e=L?this.p2pIceConfig:this.jvbIceConfig;u=new Ss($(e).find("jingle").attr("sid"),$(e).attr("to"),s,this.connection,this.mediaConstraints,JSON.parse(JSON.stringify($e)),L,!1),this.sessions[u.sid]=u,this.eventEmitter.emit(Je().CALL_INCOMING,u,$(e).find(">jingle"),b);break}case"session-accept":{const Ie=[],$e=$(e).find("jingle>content");for(const ut of $e){const ze=$(ut).find("description").attr("ssrc");ze&&Ie.push(ze)}Sr.debug(`Received ${i} from ${s} with ssrcs=${Ie}`),this.eventEmitter.emit(Je().CALL_ACCEPTED,u,$(e).find(">jingle"));break}case"content-modify":{const Ie=$(e).find('jingle>content[name="video"]>max-frame-height');Sr.debug(`Received ${i} from ${s} with a max-frame-height=${Ie==null?void 0:Ie.text()}`),u.modifyContents($(e).find(">jingle"));break}case"transport-info":{const Ie=Mc($(e).find("jingle>content>transport"));Sr.debug(`Received ${i} from ${s} for candidates=${Ie.join(", ")}`),this.eventEmitter.emit(Je().TRANSPORT_INFO,u,$(e).find(">jingle"));break}case"session-terminate":{Sr.log("terminating...",u.sid);let Ie=null,$e=null;$(e).find(">jingle>reason").length&&(Ie=$(e).find(">jingle>reason>:first")[0].tagName,$e=$(e).find(">jingle>reason>text").text()),Sr.debug(`Received ${i} from ${s} disconnect reason=${$e}`),this.terminate(u.sid,Ie,$e),this.eventEmitter.emit(Je().CALL_ENDED,u,Ie,$e);break}case"transport-replace":{var de;Sr.info("(TIME) Start transport replace: ",b);const Ie=$(e).find("jingle>content>transport"),$e=Mc(Ie),ut=$(Ie).attr("ufrag"),ze=$(Ie).attr("pwd"),it=(de=$(Ie).find(">fingerprint"))===null||de===void 0?void 0:de.text();Sr.debug(`Received ${i} from ${s} with iceUfrag=${ut}, icePwd=${ze}, DTLS fingerprint=${it}, candidates=${$e.join(", ")}`),Be.sendAnalytics(Gr("transport-replace.received",{p2p:L,value:b})),u.replaceTransport($(e).find(">jingle"),()=>{const At=window.performance.now();Sr.info("(TIME) Transport replace success: ",At),Be.sendAnalytics(Gr("transport-replace.success",{p2p:L,value:At}))},At=>{w().callErrorHandler(At),Sr.error("Transport replace failed",At),u.sendTransportReject()});break}case"source-add":u.addRemoteStream($(e).find(">jingle>content"));break;case"source-remove":u.removeRemoteStream($(e).find(">jingle>content"));break;default:Sr.warn("jingle action not implemented",i),c.attrs({type:"error"}),c.c("error",{type:"cancel"}).c("bad-request",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up()}return this.connection.send(c),!0}newP2PJingleSession(e,n){const i=new Ss(jr().randomHexString(12),e,n,this.connection,this.mediaConstraints,this.p2pIceConfig,!0,!0);return this.sessions[i.sid]=i,i}terminate(e,n,i){this.sessions.hasOwnProperty(e)&&(this.sessions[e].state!=="ended"&&this.sessions[e].onTerminated(n,i),delete this.sessions[e])}getStunAndTurnCredentials(){this.connection.sendIQ((0,qe.$iq)({type:"get",to:this.xmpp.options.hosts.domain}).c("services",{xmlns:"urn:xmpp:extdisco:2"}),e=>this.onReceiveStunAndTurnCredentials(e),()=>{Sr.warn("getting turn credentials with extdisco:2 failed, trying extdisco:1"),this.connection.sendIQ((0,qe.$iq)({type:"get",to:this.xmpp.options.hosts.domain}).c("services",{xmlns:"urn:xmpp:extdisco:1"}),e=>this.onReceiveStunAndTurnCredentials(e),()=>{Sr.warn("getting turn credentials failed"),Sr.warn("is mod_turncredentials or similar installed and configured?")})})}onReceiveStunAndTurnCredentials(e){const n=[];$(e).find(">services>service").each((c,u)=>{const b={},L=(u=$(u)).attr("type");switch(L){case"stun":b.urls=`stun:${u.attr("host")}`,u.attr("port")&&(b.urls+=`:${u.attr("port")}`),n.push(b);break;case"turn":case"turns":{b.urls=`${L}:`,b.username=u.attr("username"),b.urls+=u.attr("host"),u.attr("port")&&(b.urls+=`:${u.attr("port")}`);const N=u.attr("transport");N&&N!=="udp"&&(b.urls+=`?transport=${N}`),b.credential=u.attr("password")||b.credential,n.push(b);break}}});const i=this.xmpp.options;for(let c=n.length-1;c>0;c--){const u=Math.floor(Math.random()*(c+1)),b=n[c];n[c]=n[u],n[u]=b}let s;return s=i.useTurnUdp?c=>c.urls.startsWith("turn"):c=>c.urls.startsWith("turn")&&c.urls.indexOf("transport=tcp")>=0,this.jvbIceConfig.iceServers=n.filter(s),this.p2pIceConfig.iceServers=n,n.length>0}getLog(){const e={};return Object.keys(this.sessions).forEach(n=>{const i=this.sessions[n].peerconnection;i&&i.updateLog&&(e[`jingle_${n}`]={updateLog:i.updateLog,stats:i.stats,url:window.location.href})}),e}}class Jd extends oo{constructor(){super(),this.log=[]}init(e){super.init(e),this.connection.rawInput=this.logIncoming.bind(this),this.connection.rawOutput=this.logOutgoing.bind(this)}logIncoming(e){this.log.push([new Date().getTime(),"incoming",e])}logOutgoing(e){this.log.push([new Date().getTime(),"outgoing",e])}}const ts=(0,P.getLogger)("modules/xmpp/strophe.rayo.js"),ia="urn:xmpp:rayo:1";class Gd extends oo{init(e){super.init(e),this.connection.addHandler(this.onRayo.bind(this),ia,"iq","set",null,null)}onRayo(e){ts.info("Rayo IQ",e)}dial(e,n,i,s,c){return new Promise((u,b)=>{if(!c)return void b(new Error("Internal error!"));const L=(0,qe.$iq)({type:"set",to:c});L.c("dial",{xmlns:ia,to:e,from:n}),L.c("header",{name:"JvbRoomName",value:i}).up(),s&&s.length&&L.c("header",{name:"JvbRoomPassword",value:s}).up(),this.connection.sendIQ(L,N=>{ts.info("Dial result ",N);const X=$(N).find("ref").attr("uri");this.callResource=X.substr(5),ts.info(`Received call resource: ${this.callResource}`),u()},N=>{ts.info("Dial error ",N),b(N)})})}hangup(){return new Promise((e,n)=>{if(!this.callResource)return n(new Error("No call in progress")),void ts.warn("No call in progress");const i=(0,qe.$iq)({type:"set",to:this.callResource});i.c("hangup",{xmlns:ia}),this.connection.sendIQ(i,s=>{ts.info("Hangup result ",s),this.callResource=null,e()},s=>{ts.info("Hangup error ",s),this.callResource=null,n(new Error("Hangup error "))})})}}const Js=(0,P.getLogger)("modules/xmpp/strophe.util.js");let Gs=-1;const Qd=/request id \d+.\d+ got 200/,Kd=/request errored, status: (\d+), number of errors: \d+/,$r=(0,P.getLogger)("modules/xmpp/xmpp.js"),qd=/<failure.*><not-allowed\/><text>(.*)<\/text><\/failure>/gi,Nc=[{urls:"stun:meet-jit-si-turnrelay.jitsi.net:443"}],Wr="type",Lc="http://jitsi.org/protocol/jigasi",yo="https://jitsi.org/meet/e2ee";class xc extends Br{constructor(e,n){var i;super(),this.connection=null,this.disconnectInProgress=!1,this.connectionTimes={},this.options=e,this.token=n,this.authenticatedUser=!1,qe.Strophe.log=function(c,u){switch(Js.trace("Strophe",c,u),typeof u=="string"&&u.indexOf("Request ")!==-1&&u.indexOf("timed out (secondary), restarting")!==-1&&(c=qe.Strophe.LogLevel.WARN),c){case qe.Strophe.LogLevel.DEBUG:Gs!==-1&&Qd.test(u)&&(Js.debug("Reset lastErrorStatus"),Gs=-1);break;case qe.Strophe.LogLevel.WARN:Js.warn(`Strophe: ${u}`);const b=Kd.exec(u);b&&b.length===2&&(Gs=parseInt(b[1],10),Js.debug(`lastErrorStatus set to: ${Gs}`));break;case qe.Strophe.LogLevel.ERROR:case qe.Strophe.LogLevel.FATAL:u=`Strophe: ${u}`,w().callErrorHandler(new Error(u)),Js.error(u)}},qe.Strophe.getLastErrorStatus=function(){return Gs},qe.Strophe.getStatusString=function(c){switch(c){case qe.Strophe.Status.BINDREQUIRED:return"BINDREQUIRED";case qe.Strophe.Status.ERROR:return"ERROR";case qe.Strophe.Status.CONNECTING:return"CONNECTING";case qe.Strophe.Status.CONNFAIL:return"CONNFAIL";case qe.Strophe.Status.AUTHENTICATING:return"AUTHENTICATING";case qe.Strophe.Status.AUTHFAIL:return"AUTHFAIL";case qe.Strophe.Status.CONNECTED:return"CONNECTED";case qe.Strophe.Status.DISCONNECTED:return"DISCONNECTED";case qe.Strophe.Status.DISCONNECTING:return"DISCONNECTING";case qe.Strophe.Status.ATTACHED:return"ATTACHED";default:return"unknown"}},qe.Strophe.addConnectionPlugin("logger",new Jd);const s=e.xmppPing||{};s.domain=e.hosts.domain,this.connection=function(c){let{enableWebsocketResume:u,serviceUrl:b="/http-bind",shard:L,token:N,websocketKeepAlive:X,websocketKeepAliveUrl:de,xmppPing:Ie}=c;return N&&(b+=`${b.indexOf("?")===-1?"?":"&"}token=${N}`),new Mi({enableWebsocketResume:u,serviceUrl:b,websocketKeepAlive:X,websocketKeepAliveUrl:de,xmppPing:Ie,shard:L})}({enableWebsocketResume:e.enableWebsocketResume,serviceUrl:e.serviceUrl||e.bosh,token:n,websocketKeepAlive:e.websocketKeepAlive,websocketKeepAliveUrl:e.websocketKeepAliveUrl,xmppPing:s,shard:(i=e.deploymentInfo)===null||i===void 0?void 0:i.shard}),this.connection.on(Mi.Events.CONN_SHARD_CHANGED,()=>{const c={shard_changed:!0,suspend_time:this.connection.ping.getPingSuspendTime(),time_since_last_success:this.connection.getTimeSinceLastSuccess()};this.eventEmitter.emit(yr,ds,void 0,void 0,c)}),this._initStrophePlugins(),this.caps=new so(this.connection,"https://jitsi.org/jitsi-meet"),this.initFeaturesList(),$(window).on((this.options.disableBeforeUnloadHandlers?"":"beforeunload ")+"unload",c=>{this.disconnect(c).catch(()=>{})})}initFeaturesList(){this.caps.addFeature("urn:xmpp:jingle:1"),this.caps.addFeature("urn:xmpp:jingle:apps:rtp:1"),this.caps.addFeature("urn:xmpp:jingle:transports:ice-udp:1"),this.caps.addFeature("urn:xmpp:jingle:apps:dtls:0"),this.caps.addFeature("urn:xmpp:jingle:transports:dtls-sctp:1"),this.caps.addFeature("urn:xmpp:jingle:apps:rtp:audio"),this.caps.addFeature("urn:xmpp:jingle:apps:rtp:video"),this.caps.addFeature("http://jitsi.org/json-encoded-sources"),!this.options.disableRtx&&E.supportsRTX()&&this.caps.addFeature("urn:ietf:rfc:4588"),this.options.enableOpusRed===!0&&E.supportsAudioRed()&&this.caps.addFeature("http://jitsi.org/opus-red"),(this.options.enableRemb===void 0||this.options.enableRemb)&&this.caps.addFeature("http://jitsi.org/remb"),E.isFirefox()||this.options.enableTcc!==void 0&&!this.options.enableTcc||this.caps.addFeature("http://jitsi.org/tcc"),this.caps.addFeature("urn:ietf:rfc:5761"),this.caps.addFeature("urn:ietf:rfc:5888"),E.isChromiumBased()&&this.options.enableLipSync===!0&&($r.info("Lip-sync enabled !"),this.caps.addFeature("http://jitsi.org/meet/lipsync")),this.connection.rayo&&this.caps.addFeature("urn:xmpp:rayo:client:1"),Dr.isSupported(this.options)&&this.caps.addFeature(yo,!1,!0)}getConnection(){return this.connection}connectionHandler(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;const s=window.performance.now(),c=qe.Strophe.getStatusString(n).toLowerCase();if(this.connectionTimes[c]=s,$r.log(`(TIME) Strophe ${c}${i?`[${i}]`:""}: `,s),this.eventEmitter.emit(Je().CONNECTION_STATUS_CHANGED,e,n,i),this._maybeSendDeploymentInfoStat(),n===qe.Strophe.Status.CONNECTED||n===qe.Strophe.Status.ATTACHED)this._sysMessageHandler&&(this.connection._stropheConn.deleteHandler(this._sysMessageHandler),this._sysMessageHandler=null),this.sendDiscoInfo&&this.connection.jingle.getStunAndTurnCredentials(),$r.info(`My Jabber ID: ${this.connection.jid}`),this._resetState(),this.sendDeploymentInfo=!1,this.sendDiscoInfo&&this.caps.getFeaturesAndIdentities(this.options.hosts.domain).then(u=>{let{features:b,identities:L}=u;b.has(qe.Strophe.NS.PING)||$r.error(`Ping NOT supported by ${this.options.hosts.domain} - please enable ping in your XMPP server config`),this._processDiscoInfoIdentities(L,void 0)}).catch(u=>{const b="Feature discovery error";w().callErrorHandler(new Error(`${b}: ${u}`)),$r.error(b,u),this._maybeSendDeploymentInfoStat(!0)}),this.sendDiscoInfo=!1,e.password&&(this.authenticatedUser=!0),this.connection&&this.connection.connected&&qe.Strophe.getResourceFromJid(this.connection.jid)&&this.eventEmitter.emit(Hi,qe.Strophe.getResourceFromJid(this.connection.jid));else if(n===qe.Strophe.Status.CONNFAIL)i==="x-strophe-bad-non-anon-jid"?this.anonymousConnectionFailed=!0:this.connectionFailed=!0,this.lastErrorMsg=i,i==="giving-up"&&this.eventEmitter.emit(yr,ds,i);else if(n===qe.Strophe.Status.ERROR)this.lastErrorMsg=i;else if(n===qe.Strophe.Status.DISCONNECTED){this.connection.ping.stopInterval();const u=Boolean(this.disconnectInProgress),b=i||this.lastErrorMsg;if(this.anonymousConnectionFailed)this.eventEmitter.emit(yr,Os);else if(this.connectionFailed)this.eventEmitter.emit(yr,ds,b,void 0,this._getConnectionFailedReasonDetails());else if(u)this.eventEmitter.emit(Yn,b);else{$r.error("XMPP connection dropped!");const L=qe.Strophe.getLastErrorStatus();L>=500&&L<600?this.eventEmitter.emit(yr,Ds,b||"server-error",void 0,this._getConnectionFailedReasonDetails()):this.eventEmitter.emit(yr,Ps,b||"connection-dropped-error",void 0,this._getConnectionFailedReasonDetails())}}else if(n===qe.Strophe.Status.AUTHFAIL){const u=this.getConnection().getLastFailedMessage();this.eventEmitter.emit(yr,Os,i||this._parseConnectionFailedMessage(u),e)}}_processDiscoInfoIdentities(e,n){e.forEach(i=>{if(i.type==="av_moderation"&&(this.avModerationComponentAddress=i.name),i.type==="speakerstats"&&(this.speakerStatsComponentAddress=i.name),i.type==="conference_duration"&&(this.conferenceDurationComponentAddress=i.name),i.type==="lobbyrooms"){this.lobbySupported=!0;const s=c=>{c.forEach(u=>{u.endsWith("#displayname_required")&&this.eventEmitter.emit(ls)})};n?s(n):i.name&&this.caps.getFeaturesAndIdentities(i.name,i.type).then(c=>{let{features:u}=c;return s(u)}).catch(c=>$r.warn("Error getting features from lobby.",c&&c.message))}i.type==="shard"&&(this.options.deploymentInfo.shard=this.connection.shard=i.name),i.type==="region"&&(this.options.deploymentInfo.region=this.connection.region=i.name),i.type==="breakout_rooms"&&(this.breakoutRoomsComponentAddress=i.name)}),this._maybeSendDeploymentInfoStat(!0),(this.avModerationComponentAddress||this.speakerStatsComponentAddress||this.conferenceDurationComponentAddress||this.breakoutRoomsComponentAddress)&&this.connection.addHandler(this._onPrivateMessage.bind(this),null,"message",null,null)}_parseConnectionFailedMessage(e){if(!e)return null;const n=qd.exec(e);return n?n[1]:null}_connect(e,n){this._resetState(),this.sendDiscoInfo=!0,this.sendDeploymentInfo=!0,this.connection._stropheConn&&this.connection._stropheConn._addSysHandler?this._sysMessageHandler=this.connection._stropheConn._addSysHandler(this._onSystemMessage.bind(this),null,"message"):$r.warn("Cannot attach strophe system handler, jiconop cannot operate"),this.connection.connect(e,n,this.connectionHandler.bind(this,{jid:e,password:n}))}_onSystemMessage(e){if($(e).find(">services").length===0&&$(e).find(">query").length===0)return;this.sendDiscoInfo=!1;const n=this.connection.jingle.onReceiveStunAndTurnCredentials(e),{features:i,identities:s}=es(e);this._processDiscoInfoIdentities(s,i),(n||s.size>0||i.size>0)&&(this.connection._stropheConn.deleteHandler(this._sysMessageHandler),this._sysMessageHandler=null)}attach(e){this._resetState(),this.sendDiscoInfo=!0;const n=this.connectionTimes.attaching=window.performance.now();$r.log("(TIME) Strophe Attaching: ",n),this.connection.attach(e.jid,e.sid,parseInt(e.rid,10)+1,this.connectionHandler.bind(this,{jid:e.jid,password:e.password}))}_resetState(){this.anonymousConnectionFailed=!1,this.connectionFailed=!1,this.lastErrorMsg=void 0,this.disconnectInProgress=void 0}connect(e,n){if(!e){const{anonymousdomain:i,domain:s}=this.options.hosts;let c=i||s;const{location:u}=window;if(i){const b=u&&u.search;(b&&b.indexOf("login=true")!==-1||this.token)&&(c=s)}e=c||u&&u.hostname}return this._connect(e,n)}createRoom(e,n,i){const s=e.domain||n.customDomain;let c=`${this.getRoomJid(e,s)}/`;const u=i?i(this.connection.jid,this.authenticatedUser):jr().randomHexString(8).toLowerCase();return $r.info(`JID ${this.connection.jid} using MUC nickname ${u}`),c+=u,this.connection.emuc.createRoom(c,null,n)}getRoomJid(e,n){return`${e}@${n||this.options.hosts.muc.toLowerCase()}`}isRoomCreated(e,n){return this.connection.emuc.isRoomCreated(this.getRoomJid(e,n))}getJid(){return this.connection.jid}getJingleLog(){const e=this.connection.jingle;return e?e.getLog():{}}getXmppLog(){return(this.connection.logger||{}).log||null}dial(){this.connection.rayo.dial(...arguments)}ping(e){return new Promise((n,i)=>{this.connection.ping.ping(this.connection.pingDomain,n,i,e)})}getSessions(){return this.connection.jingle.sessions}disconnect(e){return this.disconnectInProgress?this.disconnectInProgress:this.connection?(this.disconnectInProgress=new Promise(n=>{const i=(s,c)=>{c===qe.Strophe.Status.DISCONNECTED&&(n(),this.eventEmitter.removeListener(Je().CONNECTION_STATUS_CHANGED,i))};this.eventEmitter.on(Je().CONNECTION_STATUS_CHANGED,i)}),this._cleanupXmppConnection(e),this.disconnectInProgress):Promise.resolve()}_cleanupXmppConnection(e){if(!this.connection.isUsingWebSocket&&this.connection.flush(),!this.connection.isUsingWebSocket&&e!=null){const n=e.type;if((n==="beforeunload"||n==="unload")&&(this.connection.options.sync=!0,this.connection.sendUnavailableBeacon()))return}this.connection.disconnect(),this.connection.options.sync!==!0&&this.connection.flush()}_initStrophePlugins(){const e={jvb:{iceServers:[]},p2p:{iceServers:[]}},n=this.options.p2p&&this.options.p2p.stunServers||Nc;Array.isArray(n)&&($r.info("P2P STUN servers: ",n),e.p2p.iceServers=n),this.options.p2p&&this.options.p2p.iceTransportPolicy&&($r.info("P2P ICE transport policy: ",this.options.p2p.iceTransportPolicy),e.p2p.iceTransportPolicy=this.options.p2p.iceTransportPolicy),this.connection.addConnectionPlugin("emuc",new id(this)),this.connection.addConnectionPlugin("jingle",new Hd(this,this.eventEmitter,e)),this.connection.addConnectionPlugin("rayo",new Gd)}_getConnectionFailedReasonDetails(){const e={};if(this.options.deploymentInfo&&this.options.deploymentInfo.shard&&this.connection.lastResponseHeaders){const n=this.connection.lastResponseHeaders.trim().split(/[\r\n]+/),i={};n.forEach(s=>{const c=s.split(": "),u=c.shift(),b=c.join(": ");i[u]=b}),e.shard_changed=this.options.deploymentInfo.shard!==i["x-jitsi-shard"]}return e.suspend_time=this.connection.ping.getPingSuspendTime(),e.time_since_last_success=this.connection.getTimeSinceLastSuccess(),e}sendDominantSpeakerEvent(e){if(!this.speakerStatsComponentAddress||!e)return;const n=(0,qe.$msg)({to:this.speakerStatsComponentAddress});n.c("speakerstats",{xmlns:"http://jitsi.org/jitmeet",room:e}).up(),this.connection.send(n)}sendFacialExpressionEvent(e,n){if(!this.speakerStatsComponentAddress||!e)return;const i=(0,qe.$msg)({to:this.speakerStatsComponentAddress});i.c("facialExpression",{xmlns:"http://jitsi.org/jitmeet",room:e,expression:n.facialExpression,duration:n.duration}).up(),this.connection.send(i)}tryParseJSONAndVerify(e){if(!e)return!1;try{const n=JSON.parse(e);if(n&&typeof n=="object"){const i=n[Wr];if(i!==void 0)return n;$r.debug("parsing valid json but does not have correct structure","topic: ",i)}}catch(n){return $r.error(`Error parsing json ${e}`,n),!1}return!1}_onPrivateMessage(e){const n=e.getAttribute("from");if(n!==this.speakerStatsComponentAddress&&n!==this.conferenceDurationComponentAddress&&n!==this.avModerationComponentAddress&&n!==this.breakoutRoomsComponentAddress)return!0;const i=$(e).find(">json-message").text(),s=this.tryParseJSONAndVerify(i);return!s||(s[Wr]==="speakerstats"&&s.users?this.eventEmitter.emit(Je().SPEAKER_STATS_RECEIVED,s.users):s[Wr]==="conference_duration"&&s.created_timestamp?this.eventEmitter.emit(Je().CONFERENCE_TIMESTAMP_RECEIVED,s.created_timestamp):s[Wr]==="av_moderation"?this.eventEmitter.emit(Je().AV_MODERATION_RECEIVED,s):s[Wr]==="breakout_rooms"&&this.eventEmitter.emit(Je().BREAKOUT_ROOMS_EVENT,s),!0)}_maybeSendDeploymentInfoStat(e){const n=[qe.Strophe.Status.ERROR,qe.Strophe.Status.CONNFAIL,qe.Strophe.Status.AUTHFAIL,qe.Strophe.Status.DISCONNECTED,qe.Strophe.Status.CONNTIMEOUT];if(!(e||n.includes(this.connection.status)&&this.sendDeploymentInfo))return;const i=this.options.deploymentInfo;if(i&&Object.keys(i).length>0){const s={id:"deployment_info"};for(const c in i)i.hasOwnProperty(c)&&(s[c]=i[c]);Be.sendLog(JSON.stringify(s))}this.sendDeploymentInfo=!1}}function $d(r){let e,{id:n,password:i,onCreateResource:s,onLoginSuccessful:c,roomPassword:u}=r,b=!1,L=new xc(this.connection.options);const N=new Promise((X,de)=>{e=de,L.addListener(Yn,()=>{L=void 0}),L.addListener(Hi,()=>{b||(c&&c(),L.createRoom(this.options.name,this.options.config,s).moderator.authenticate().then(()=>{L&&L.disconnect(),b||(this.join(u),X())}).catch(Ie=>{let{error:$e,message:ut}=Ie;L.disconnect(),de({authenticationError:$e,message:ut})}))}),L.addListener(yr,(Ie,$e,ut)=>{de({connectionError:Ie,credentials:ut,message:$e}),L=void 0}),b||L.connect(n,i)});return N.cancel=()=>{b=!0,e({}),L&&L.disconnect()},N}const Wd=(0,P.getLogger)("modules/RTC/CodecSelection.js");class zd{constructor(e,n){this.conference=e,this.options=n,this.disabledCodec=n.disabledCodec===ri().VP8?void 0:this._getCodecMimeType(n.disabledCodec);const i=this._getCodecMimeType(n.jvbCodec),s=this._getCodecMimeType(n.p2pCodec);this.jvbPreferredCodec=i&&this._isCodecSupported(i)?i:ri().VP8,this.p2pPreferredCodec=s&&this._isCodecSupported(s)?s:ri().VP8,Wd.debug(`Codec preferences for the conference are JVB: ${this.jvbPreferredCodec},
|
|
108
|
+
P2P: ${this.p2pPreferredCodec}`),this.jvbPreferredCodec!==ri().VP9||E.supportsVP9()||(this.jvbPreferredCodec=ri().VP8),this.conference.on(nn,()=>this._selectPreferredCodec()),this.conference.on(In,()=>this._selectPreferredCodec()),this.conference.on(me,c=>this._onMediaSessionStarted(c))}_getCodecMimeType(e){return typeof e=="string"?Object.values(ri()).find(n=>n===e.toLowerCase()):null}_isCodecSupported(e){return!(!E.isFirefox()&&!E.isReactNative())||window.RTCRtpReceiver&&window.RTCRtpReceiver.getCapabilities&&window.RTCRtpReceiver.getCapabilities("video").codecs.some(n=>n.mimeType.toLowerCase()===`video/${e}`)}_onMediaSessionStarted(e){const n=e.isP2P?this.p2pPreferredCodec:this.jvbPreferredCodec,i=this.disabledCodec&&this._isCodecSupported(this.disabledCodec)?this.disabledCodec:null;this._selectPreferredCodec(e,n,i)}_selectPreferredCodec(){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const i=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:null)||this.conference.jvbJingleSession,s=e||this.jvbPreferredCodec;let c=s;if(i&&!i.isP2P&&!this.options.enforcePreferredCodec){const u=this.conference.getParticipants().map(b=>b.getId());for(const b of u){const L=i._signalingLayer.getPeerMediaInfo(b,Rt),N=L==null?void 0:L.codecType;N&&N!==s&&(N!==ri().VP9||E.supportsVP9())&&(c=N)}}i&&i.setVideoCodecs(c,n)}getPreferredCodec(){return this.jvbPreferredCodec}}var Yd=o(7318),_o=o.n(Yd);const Tr=(0,P.getLogger)("modules/RTC/BridgeChannel.js");class Xd{constructor(e,n,i){if(!e&&!n)throw new TypeError("At least peerconnection or wsUrl must be given");if(e&&n)throw new TypeError("Just one of peerconnection or wsUrl must be given");if(e?Tr.debug("constructor() with peerconnection"):Tr.debug(`constructor() with wsUrl:"${n}"`),this._channel=null,this._eventEmitter=i,this._mode=null,this._areRetriesEnabled=!1,this._closedFromClient=!1,e){const s=e.createDataChannel("JVB data channel",{protocol:"http://jitsi.org/protocols/colibri"});this._handleChannel(s),this._mode="datachannel"}else n&&(this._areRetriesEnabled=!0,this._wsUrl=n,this._initWebSocket())}_initWebSocket(){const e=new WebSocket(this._wsUrl);this._handleChannel(e),this._mode="websocket"}_startConnectionRetries(){let e=1;const n=()=>{this.isOpen()||(this._initWebSocket(this._wsUrl),e=Math.min(2*e,60),this._retryTimeout=setTimeout(n,1e3*e))};this._retryTimeout=setTimeout(n,1e3*e)}_stopConnectionRetries(){this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=void 0)}_retryWebSocketConnection(e){if(!this._areRetriesEnabled)return;const{code:n,reason:i}=e;Be.sendAnalytics(function(s,c){return{type:ar,action:"bridge-channel.error",attributes:{code:s,reason:c}}}(n,i)),this._areRetriesEnabled=!1,this._eventEmitter.once(Mt().DATA_CHANNEL_OPEN,()=>{this._stopConnectionRetries(),this._areRetriesEnabled=!0}),this._startConnectionRetries()}get mode(){return this._mode}close(){if(this._closedFromClient=!0,this._stopConnectionRetries(),this._areRetriesEnabled=!1,this._channel){try{this._channel.close()}catch(e){}this._channel=null}}isOpen(){return this._channel&&(this._channel.readyState==="open"||this._channel.readyState===WebSocket.OPEN)}sendEndpointStatsMessage(e){this._send(Ft({colibriClass:"EndpointStats"},e))}sendMessage(e,n){this._send({colibriClass:"EndpointMessage",msgPayload:n,to:e})}sendSetLastNMessage(e){Tr.log(`Sending lastN=${e}.`),this._send({colibriClass:"LastNChangedEvent",lastN:e})}sendSelectedEndpointsMessage(e){Tr.log(`Sending selected endpoints: ${e}.`),this._send({colibriClass:"SelectedEndpointsChangedEvent",selectedEndpoints:e})}sendReceiverVideoConstraintMessage(e){Tr.log(`Sending ReceiverVideoConstraint with maxFrameHeight=${e}px`),this._send({colibriClass:"ReceiverVideoConstraint",maxFrameHeight:e})}sendNewReceiverVideoConstraintsMessage(e){Tr.log(`Sending ReceiverVideoConstraints with ${JSON.stringify(e)}`),this._send(Ft({colibriClass:"ReceiverVideoConstraints"},e))}sendVideoTypeMessage(e){Tr.debug(`Sending VideoTypeMessage with video type as ${e}`),this._send({colibriClass:"VideoTypeMessage",videoType:e})}sendSourceVideoTypeMessage(e,n){Tr.info(`Sending SourceVideoTypeMessage with video type ${e}: ${n}`),this._send({colibriClass:"SourceVideoTypeMessage",sourceName:e,videoType:n})}_handleChannel(e){const n=this._eventEmitter;e.onopen=()=>{Tr.info(`${this._mode} channel opened`),n.emit(Mt().DATA_CHANNEL_OPEN)},e.onerror=i=>{this._mode!=="websocket"&&Tr.error(`Channel error: ${i.message}`)},e.onmessage=i=>{let s,{data:c}=i;try{s=JSON.parse(c)}catch(b){return w().callErrorHandler(b),void Tr.error("Failed to parse channel message as JSON: ",c,b)}const u=s.colibriClass;switch(u){case"DominantSpeakerEndpointChangeEvent":{const{dominantSpeakerEndpoint:b,previousSpeakers:L=[]}=s;Tr.debug(`Dominant speaker: ${b}, previous speakers: ${L}`),n.emit(Mt().DOMINANT_SPEAKER_CHANGED,b,L);break}case"EndpointConnectivityStatusChangeEvent":{const b=s.endpoint,L=s.active==="true";Tr.info(`Endpoint connection status changed: ${b} active=${L}`),n.emit(Mt().ENDPOINT_CONN_STATUS_CHANGED,b,L);break}case"EndpointMessage":n.emit(Mt().ENDPOINT_MESSAGE_RECEIVED,s.from,s.msgPayload);break;case"EndpointStats":n.emit(Mt().ENDPOINT_STATS_RECEIVED,s.from,s);break;case"LastNEndpointsChangeEvent":{const b=s.lastNEndpoints;Tr.info(`New forwarded endpoints: ${b}`),n.emit(Mt().LASTN_ENDPOINT_CHANGED,b);break}case"SenderVideoConstraints":{const b=s.videoConstraints;b&&(Tr.info(`SenderVideoConstraints: ${JSON.stringify(b)}`),n.emit(Mt().SENDER_VIDEO_CONSTRAINTS_CHANGED,b));break}case"ServerHello":Tr.info(`Received ServerHello, version=${s.version}.`);break;default:Tr.debug("Channel JSON-formatted message: ",s),n.emit(`rtc.datachannel.${u}`,s)}},e.onclose=i=>{Tr.info("Channel closed by "+(this._closedFromClient?"client":"server")),this._mode==="websocket"&&(this._closedFromClient||(Tr.error(`Channel closed: ${i.code} ${i.reason}`),this._retryWebSocketConnection(i))),this._channel=null},this._channel=e}_send(e){const n=this._channel;if(!this.isOpen())throw Tr.error("Bridge Channel send: no opened channel."),new Error("No opened channel");n.send(JSON.stringify(e))}}var Zd=o(4940),Qs=o.n(Zd),ns=o(3465),eu=o.n(ns),tu=o(6125),kc=o.n(tu);const Qr=(0,P.getLogger)("modules/RTC/RTCUtils.js");E.usesAdapter()&&o(835);const bs=new(on()),nu={video:{height:{ideal:720,max:720,min:180},width:{ideal:1280,max:1280,min:320}}};let Bc="default",Uc=!1,Ks=!1,sa=!1,oa=!1,aa=!1,ca=null;const Fc=document.createElement("audio"),ru=Fc.setSinkId!==void 0;let la,Kr=[];function jc(){}function Vc(r,e){const n=Boolean(e)&&e.getAudioTracks().length>0,i=Boolean(e)&&e.getVideoTracks().length>0,s={};r.indexOf("video")!==-1&&(s.video=i),r.indexOf("audio")!==-1&&(s.audio=n),bs.emit(Mt().PERMISSIONS_CHANGED,s)}function Hc(r){const e=r.filter(c=>c.kind==="audioinput").length,n=r.filter(c=>c.kind==="audiooutput").length,i=r.filter(c=>c.kind==="videoinput").length,s=r.filter(c=>c.kind==="videooutput").length;r.forEach(c=>{const u={audio_input_device_count:e,audio_output_device_count:n,video_input_device_count:i,video_output_device_count:s,device_id:c.deviceId,device_group_id:c.groupId,device_kind:c.kind,device_label:c.label};Be.sendAnalytics("available.device",u)})}function Jc(r){(function(e){return e.length!==Kr.length||e.map(n).sort().join("")!==Kr.map(n).sort().join("");function n(i){return JSON.stringify({kind:i.kind,deviceId:i.deviceId,groupId:i.groupId,label:i.label,facing:i.facing})}})(r)&&(Kr=r.slice(0),Qr.info("list of media devices has changed:",Kr),Hc(Kr),bs.emit(Mt().DEVICE_LIST_WILL_CHANGE,Kr),bs.emit(Mt().DEVICE_LIST_CHANGED,Kr))}const Ao=new class extends Br{constructor(){super(bs)}init(){var r;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n;typeof e.disableAEC=="boolean"&&(sa=e.disableAEC,Qr.info(`Disable AEC: ${sa}`)),typeof e.disableNS=="boolean"&&(oa=e.disableNS,Qr.info(`Disable NS: ${oa}`)),typeof e.disableAP=="boolean"&&(Ks=e.disableAP,Qr.info(`Disable AP: ${Ks}`)),typeof e.disableAGC=="boolean"&&(aa=e.disableAGC,Qr.info(`Disable AGC: ${aa}`)),typeof((r=e.audioQuality)===null||r===void 0?void 0:r.stereo)=="boolean"&&(ca=e.audioQuality.stereo,Qr.info(`Stereo: ${ca}`)),window.clearInterval(la),la=void 0,E.isReactNative()?(this.RTCPeerConnectionType=RTCPeerConnection,this.attachMediaStream=void 0,this.getStreamID=function(i){let{id:s}=i;return typeof s=="number"?s:Jt.filterSpecialChars(s)},this.getTrackID=i=>{let{id:s}=i;return s}):(this.RTCPeerConnectionType=RTCPeerConnection,this.attachMediaStream=(n=(i,s)=>{i&&(i.srcObject=s)},function(i,s){const c=n.apply(Ao,arguments);return s&&Ao.isDeviceChangeAvailable("output")&&s.getAudioTracks&&s.getAudioTracks().length&&Uc&&i.setSinkId(Ao.getAudioOutputDevice()).catch(function(u){const b=new Qn(u,null,["audiooutput"]);w().callUnhandledRejectionHandler({promise:this,reason:b}),Qr.warn("Failed to set audio output device for the element. Default audio output device will be used instead",i,b)}),c}),this.getStreamID=i=>{let{id:s}=i;return s},this.getTrackID=i=>{let{id:s}=i;return s}),this.pcConstraints=E.isChromiumBased()||E.isReactNative()?{optional:[{googScreencastMinBitrate:100},{googCpuOveruseDetection:!0}]}:{},Us.init(e),this.isDeviceListAvailable()&&this.enumerateDevices(i=>{Kr=i.slice(0),Qr.debug("Available devices: ",Kr),Hc(Kr),bs.emit(Mt().DEVICE_LIST_AVAILABLE,Kr),E.supportsDeviceChangeEvent()?navigator.mediaDevices.addEventListener("devicechange",()=>this.enumerateDevices(jc)):la=window.setInterval(()=>this.enumerateDevices(jc),3e3)})}enumerateDevices(r){navigator.mediaDevices.enumerateDevices().then(e=>{Jc(e),r(e)}).catch(e=>{Qr.warn(`Failed to enumerate devices. ${e}`),Jc([]),r([])})}_getUserMedia(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return new Promise((i,s)=>{let c,u=!1;typeof n=="number"&&!isNaN(n)&&n>0&&(c=setTimeout(()=>{u=!0,c=void 0,s(new Qn(kn))},n)),navigator.mediaDevices.getUserMedia(e).then(b=>{Qr.log("onUserMediaSuccess"),Vc(r,b),u||(c!==void 0&&clearTimeout(c),i(b))}).catch(b=>{Qr.warn(`Failed to get access to local media. ${b} ${JSON.stringify(e)}`);const L=new Qn(b,e,r);u||(c!==void 0&&clearTimeout(c),s(b)),L.name===_n&&Vc(r,void 0)})})}_getDesktopMedia(){return Us.isSupported()?new Promise((r,e)=>{Us.obtainStream(n=>{r(n)},n=>{e(n)})}):Promise.reject(new Error("Desktop sharing is not supported!"))}_getMissingTracks(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;const n=[],i=r.includes("audio"),s=e&&e.getAudioTracks().length>0;i&&!s&&n.push("audio");const c=r.includes("video"),u=e&&e.getVideoTracks().length>0;return c&&!u&&n.push("video"),n}obtainAudioAndVideoPermissions(r){const u=r,{timeout:e}=u,n=ro(u,["timeout"]),i=[],s=function(){if((n.devices||[]).indexOf("desktop")===-1)return Promise.resolve();const{desktopSharingSourceDevice:b}=n;if(b){const L=Kr&&Kr.find(de=>de.kind==="videoinput"&&(de.deviceId===b||de.label===b));if(!L)return Promise.reject(new Qn({name:"ConstraintNotSatisfiedError"},{},[b]));const N=["video"],X={video:{deviceId:L.deviceId}};return this._getUserMedia(N,X,e).then(de=>({sourceType:"device",stream:de}))}return this._getDesktopMedia()}.bind(this),c=function(){const b=(n.devices||["audio","video"]).filter(N=>N==="audio"||N==="video");if(!b.length)return Promise.resolve();const L=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const de=eu()(X.constraints||nu);if(N.indexOf("video")>=0){if(kc()[X.resolution]){const Ie=kc()[X.resolution];de.video.height={ideal:Ie.height},de.video.width={ideal:Ie.width}}if(de.video||(de.video={}),E.isWebKitBased()&&(de.video.height&&de.video.height.ideal?de.video.height={ideal:de.video.height.ideal}:Qr.warn("Ideal camera height missing, camera may not start properly"),de.video.width&&de.video.width.ideal?de.video.width={ideal:de.video.width.ideal}:Qr.warn("Ideal camera width missing, camera may not start properly")),X.cameraDeviceId)de.video.deviceId=X.cameraDeviceId;else{const Ie=X.facingMode||Qs().USER;de.video.facingMode=Ie}}else de.video=!1;return N.indexOf("audio")>=0?(de.audio&&typeof de.audio!="boolean"||(de.audio={}),de.audio={autoGainControl:!aa&&!Ks,deviceId:X.micDeviceId,echoCancellation:!sa&&!Ks,noiseSuppression:!oa&&!Ks},ca&&Object.assign(de.audio,{channelCount:2})):de.audio=!1,de}(b,n);return Qr.info("Got media constraints: ",JSON.stringify(L)),this._getUserMedia(b,L,e)}.bind(this);return s().then(function(b){if(!b)return;const{stream:L,sourceId:N,sourceType:X}=b,de=L.getAudioTracks();if(de.length){const $e=new MediaStream(de);i.push({stream:$e,sourceId:N,sourceType:X,track:$e.getAudioTracks()[0]})}const Ie=L.getVideoTracks();if(Ie.length){const $e=new MediaStream(Ie);i.push({stream:$e,sourceId:N,sourceType:X,track:$e.getVideoTracks()[0],videoType:Nn().DESKTOP})}}).then(c).then(function(b){if(!b)return;const L=b.getAudioTracks();if(L.length){const X=new MediaStream(L);i.push({stream:X,track:X.getAudioTracks()[0],effects:n.effects})}const N=b.getVideoTracks();if(N.length){const X=new MediaStream(N);i.push({stream:X,track:X.getVideoTracks()[0],videoType:Nn().CAMERA,effects:n.effects})}}).then(()=>i).catch(b=>(i.forEach(L=>{let{stream:N}=L;this.stopMediaStream(N)}),Promise.reject(b)))}isDeviceListAvailable(){return Boolean(navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}isDeviceChangeAvailable(r){return r==="output"||r==="audiooutput"?ru:r!=="audioinput"&&r!=="input"||!E.isIosBrowser()}stopMediaStream(r){r&&(r.getTracks().forEach(e=>{e.stop&&e.stop()}),r.stop&&r.stop(),r.release&&r.release())}isDesktopSharingEnabled(){return Us.isSupported()}setAudioOutputDevice(r){return this.isDeviceChangeAvailable("output")?Fc.setSinkId(r).then(()=>{Bc=r,Uc=!0,Qr.log(`Audio output device set to ${r}`),bs.emit(Mt().AUDIO_OUTPUT_DEVICE_CHANGED,r)}):Promise.reject(new Error("Audio output device change is not supported"))}setDesktopSharingFrameRate(r){Us.setDesktopSharingFrameRate(r)}getAudioOutputDevice(){return Bc}getCurrentlyAvailableMediaDevices(){return Kr}arePermissionsGrantedForAvailableDevices(){return Kr.some(r=>Boolean(r.label))}getEventDataForActiveDevice(r){const e=[],n={deviceId:r.deviceId,kind:r.kind,label:r.label,groupId:r.groupId};return e.push(n),{deviceList:e}}setSuspendVideo(r,e){r.optional||(r.optional=[]),r.optional=r.optional.filter(n=>!n.hasOwnProperty("googSuspendBelowMinBitrate")),e&&r.optional.push({googSuspendBelowMinBitrate:"true"})}},Rn=Ao,da=(0,P.getLogger)("modules/RTC/JitsiTrack.js"),ua={track_mute:"onmute",track_unmute:"onunmute",track_ended:"onended"};class Gc extends on(){constructor(e,n,i,s,c,u){super(),this.addEventListener=this.addListener,this.removeEventListener=this.off=this.removeListener,this.containers=[],this.conference=e,this.audioLevel=-1,this.type=c,this.track=i,this.videoType=u,this.handlers=new Map,this.disposed=!1,this._streamInactiveHandler=s,this._setStream(n)}_addMediaStreamInactiveHandler(e){E.isFirefox()?this.track.onended=e:this.stream.oninactive=e}_setHandler(e,n){if(ua.hasOwnProperty(e)){if(n?this.handlers.set(e,n):this.handlers.delete(e),this.stream)for(const i of this.stream.getTracks())i[ua[e]]=n}else da.error(`Invalid handler type ${e}`)}_unregisterHandlers(){if(this.stream){for(const e of this.handlers.keys())for(const n of this.stream.getVideoTracks())n[ua[e]]=void 0;this._streamInactiveHandler&&this._addMediaStreamInactiveHandler(void 0)}else da.warn(`${this}: unable to unregister handlers - no stream object`)}_setStream(e){if(this.stream!==e&&(this.stream=e,this.stream)){for(const n of this.handlers.keys())this._setHandler(n,this.handlers.get(n));this._streamInactiveHandler&&this._addMediaStreamInactiveHandler(this._streamInactiveHandler)}}getVideoType(){return this.videoType}getType(){return this.type}isAudioTrack(){return this.getType()===Xe}isWebRTCTrackMuted(){return this.track&&this.track.muted}isVideoTrack(){return this.getType()===Rt}isLocal(){throw new Error("Not implemented by subclass")}isLocalAudioTrack(){return this.isAudioTrack()&&this.isLocal()}getOriginalStream(){return this.stream}getStreamId(){return this.stream?this.stream.id:null}getTrack(){return this.track}getTrackLabel(){return this.track.label}getTrackId(){return this.track?this.track.id:null}getUsageLabel(){return this.isAudioTrack()?"mic":this.videoType?this.videoType:"default"}_maybeFireTrackAttached(e){this.conference&&e&&this.conference._onTrackAttach(this,e)}attach(e){this.stream&&(this._onTrackAttach(e),Rn.attachMediaStream(e,this.stream)),this.containers.push(e),this._maybeFireTrackAttached(e),this._attachTTFMTracker(e)}detach(e){for(let n=this.containers,i=n.length-1;i>=0;--i){const s=n[i];e||(this._onTrackDetach(s),Rn.attachMediaStream(s,null)),e&&s!==e||n.splice(i,1)}e&&(this._onTrackDetach(e),Rn.attachMediaStream(e,null))}_onTrackAttach(e){}_onTrackDetach(e){}_attachTTFMTracker(e){}dispose(){return this.removeAllListeners(),this.disposed=!0,Promise.resolve()}isScreenSharing(){}getId(){return this.stream?Rn.getStreamID(this.stream):null}isActive(){return this.stream.active===void 0||this.stream.active}setAudioLevel(e,n){let i=e;E.supportsReceiverStats()&&n!==void 0&&this.isMuted()&&(i=0),this.audioLevel!==i?(this.audioLevel=i,this.emit(Oi,i,n)):this.audioLevel===0&&i===0&&this.isLocal()&&!this.isWebRTCTrackMuted()&&this.emit(Zr,i)}getMSID(){const e=this.getStreamId(),n=this.getTrackId();return e&&n?`${e} ${n}`:null}setAudioOutput(e){return Rn.isDeviceChangeAvailable("output")?this.isVideoTrack()?Promise.resolve():Promise.all(this.containers.map(n=>n.setSinkId(e).catch(i=>{throw da.warn("Failed to change audio output device on element. Default or previously set audio output device will be used.",n,i),i}))).then(()=>{this.emit(Vi,e)}):Promise.reject(new Error("Audio output device change is not supported"))}}const Cs=(0,P.getLogger)("modules/RTC/JitsiLocalTrack.js");class iu extends Gc{constructor(e){let{deviceId:n,facingMode:i,mediaType:s,resolution:c,rtcId:u,sourceId:b,sourceType:L,stream:N,track:X,videoType:de,effects:Ie=[]}=e;super(null,N,X,()=>this.emit(cs),s,de),this._setEffectInProgress=!1;const $e=Ie.find(ze=>ze.isEnabled(this));$e&&this._startStreamEffect($e);const ut=de===Nn().DESKTOP?X.getSettings().displaySurface:null;this.metadata=Ft({timestamp:Date.now()},ut?{displaySurface:ut}:{}),this.rtcId=u,this.sourceId=b,this.sourceType=L,this.resolution=X.getSettings().height,this.maxEnabledResolution=c,this._constraints=X.getConstraints(),Object.keys(this._constraints).length||de!==Nn().CAMERA||(this._constraints={height:X.getSettings().height,width:X.getSettings().width}),this.deviceId=n,this._prevSetMuted=Promise.resolve(),this._facingMode=i,this._trackEnded=!1,this._hasSentData=!1,this._testDataSent=!0,this._realDeviceId=this.deviceId===""?void 0:this.deviceId,this._trackMutedTS=0,this._onDeviceListWillChange=ze=>{const it=this._realDeviceId;this._setRealDeviceIdFromDeviceList(ze),(this.getTrack().readyState===void 0&&this._realDeviceId!==void 0&&!ze.find(At=>At.deviceId===this._realDeviceId)||it!==void 0&&this._realDeviceId===void 0)&&(this._trackEnded=!0)},this.isAudioTrack()&&Rn.isDeviceChangeAvailable("output")&&(this._onAudioOutputDeviceChanged=this.setAudioOutput.bind(this),Rn.addListener(Mt().AUDIO_OUTPUT_DEVICE_CHANGED,this._onAudioOutputDeviceChanged)),Rn.addListener(Mt().DEVICE_LIST_WILL_CHANGE,this._onDeviceListWillChange),this._initNoDataFromSourceHandlers()}_addStreamToConferenceAsUnmute(){return this.conference?new Promise((e,n)=>{this.conference._addLocalTrackAsUnmute(this).then(e,i=>n(new Error(i)))}):Promise.resolve()}_fireNoDataFromSourceEvent(){const e=!this.isReceivingData();this.emit(Xr,e),Be.sendAnalytics(function(n,i){return{attributes:{media_type:n,value:i},action:"track.no.data.from.source",type:ar}}(this.getType(),e)),Be.sendLog(JSON.stringify({name:Xr,log:e}))}_initNoDataFromSourceHandlers(){this._isNoDataFromSourceEventsEnabled()&&(this._setHandler("track_mute",()=>{this._trackMutedTS=window.performance.now(),this._fireNoDataFromSourceEvent()}),this._setHandler("track_unmute",()=>{this._fireNoDataFromSourceEvent(),Be.sendAnalyticsAndLog("track.unmuted",{media_type:this.getType(),track_type:"local",value:window.performance.now()-this._trackMutedTS})}),this.isVideoTrack()&&this.videoType===Nn().CAMERA&&this._setHandler("track_ended",()=>{this.isReceivingData()||this._fireNoDataFromSourceEvent()}))}_isNoDataFromSourceEventsEnabled(){return!this.isVideoTrack()||this.videoType!==Nn().DESKTOP}_queueSetMuted(e){const n=this._setMuted.bind(this,e);return this._prevSetMuted=this._prevSetMuted.then(n,n),this._prevSetMuted}_removeStreamFromConferenceAsMute(e,n){this.conference?this.conference._removeLocalTrackAsMute(this).then(e,i=>n(new Error(i))):e()}_sendMuteStatus(e){this.conference&&this.conference._setTrackMuteStatus(this.getType(),this,e)&&this.conference.room.sendPresence()}_setMuted(e){if(this.isMuted()===e)return Promise.resolve();if(this.disposed)return Promise.reject(new Qn(Bn));let n=Promise.resolve();const i=()=>Cs.info(`Mute ${this}: ${e}`);if(this.isAudioTrack()||this.videoType===Nn().DESKTOP||!E.doesVideoMuteByStreamRemove())i(),this._streamEffect&&this._streamEffect.setMuted?this._streamEffect.setMuted(e):this.track&&(this.track.enabled=!e);else if(e)n=new Promise((s,c)=>{i(),this._removeStreamFromConferenceAsMute(()=>{this._streamEffect&&this._stopStreamEffect(),this._unregisterHandlers(),this.stopStream(),this._setStream(null),s()},c)});else{i();const s={cameraDeviceId:this.getDeviceId(),devices:[Rt],effects:this._streamEffect?[this._streamEffect]:[],facingMode:this.getCameraFacingMode()};n=Rn.obtainAudioAndVideoPermissions(Object.assign({},s,{constraints:{video:this._constraints}})),n=n.then(c=>{const u=this.getType()===pn?Rt:this.getType(),b=c.find(L=>L.track.kind===u);if(!b)throw new Qn(Sn);return this._setStream(b.stream),this.track=b.track,this.videoType!==b.videoType&&(Cs.warn(`${this}: video type has changed after unmute!`,this.videoType,b.videoType),this.videoType=b.videoType),this._streamEffect&&this._startStreamEffect(this._streamEffect),this.containers.map(L=>Rn.attachMediaStream(L,this.stream)),this._addStreamToConferenceAsUnmute()})}return n.then(()=>{this._sendMuteStatus(e),this.emit(Ci,this)})}_setRealDeviceIdFromDeviceList(e){const n=this.getTrack(),i=`${n.kind}input`;let s=e.find(c=>c.kind===i&&c.label===n.label);if(!s&&this._realDeviceId==="default"){const c=(n.label||"").replace("Default - ","");s=e.find(u=>u.kind===i&&u.label===c)}this._realDeviceId=s?s.deviceId:void 0}_setStream(e){super._setStream(e),e?(this.storedMSID=this.getMSID(),Cs.debug(`Setting new MSID: ${this.storedMSID} on ${this}`)):Cs.debug(`Setting 'null' stream on ${this}`)}_startStreamEffect(e){this._streamEffect=e,this._originalStream=this.stream,this._setStream(this._streamEffect.startEffect(this._originalStream)),this.track=this.stream.getTracks()[0]}_stopStreamEffect(){this._streamEffect&&(this._streamEffect.stopEffect(),this._setStream(this._originalStream),this._originalStream=null,this.track=this.stream?this.stream.getTracks()[0]:null)}_switchCamera(){this.isVideoTrack()&&this.videoType===Nn().CAMERA&&typeof this.track._switchCamera=="function"&&(this.track._switchCamera(),this._facingMode=this._facingMode===Qs().ENVIRONMENT?Qs().USER:Qs().ENVIRONMENT)}_switchStreamEffect(e){this._streamEffect&&(this._stopStreamEffect(),this._streamEffect=void 0),e&&this._startStreamEffect(e)}dispose(){let e=Promise.resolve();return this._streamEffect&&(e=this.setEffect()),this.conference&&(e=e.then(()=>this.conference.removeTrack(this))),this.stream&&(this.stopStream(),this.detach()),Rn.removeListener(Mt().DEVICE_LIST_WILL_CHANGE,this._onDeviceListWillChange),this._onAudioOutputDeviceChanged&&Rn.removeListener(Mt().AUDIO_OUTPUT_DEVICE_CHANGED,this._onAudioOutputDeviceChanged),e.then(()=>super.dispose())}getCameraFacingMode(){if(this.isVideoTrack()&&this.videoType===Nn().CAMERA){var e,n;const i=(e=(n=this.track).getSettings)===null||e===void 0?void 0:e.call(n);return i&&"facingMode"in i?i.facingMode:this._facingMode!==void 0?this._facingMode:Qs().USER}}getDeviceId(){return this._realDeviceId||this.deviceId}getDuration(){return Date.now()/1e3-this.metadata.timestamp/1e3}getParticipantId(){return this.conference&&this.conference.myUserId()}isEnded(){return this.isVideoTrack()&&this.isMuted()?this._trackEnded:this.getTrack().readyState==="ended"||this._trackEnded}isLocal(){return!0}isMuted(){return!this.stream||!(!this.isVideoTrack()||this.isActive())||(this._streamEffect&&this._streamEffect.isMuted?this._streamEffect.isMuted():!this.track||!this.track.enabled)}isReceivingData(){return!(!this.isVideoTrack()||!this.isMuted()&&!this._stopStreamInProgress&&this.videoType!==Nn().DESKTOP)||!!this.stream&&(this._effectEnabled?this._originalStream:this.stream).getTracks().some(e=>!("readyState"in e&&e.readyState!=="live"||"muted"in e&&e.muted===!0))}mute(){return this._queueSetMuted(!0)}onByteSentStatsReceived(e,n){n>0&&(this._hasSentData=!0);const i=e.getConnectionState();this._testDataSent&&i==="connected"&&(setTimeout(()=>{this._hasSentData||(Cs.warn(`${this} 'bytes sent' <= 0: ${n}`),Be.analytics.sendEvent("track.no-bytes-sent",{media_type:this.getType()}))},3e3),this._testDataSent=!1)}setConference(e){this.conference=e;for(let n=0;n<this.containers.length;n++)this._maybeFireTrackAttached(this.containers[n])}setEffect(e){if(this._streamEffect===void 0&&e===void 0)return Promise.resolve();if(e!==void 0&&!e.isEnabled(this))return Promise.reject(new Error("Incompatible effect instance!"));if(this._setEffectInProgress===!0)return Promise.reject(new Error("setEffect already in progress!"));if(this.isMuted()&&!this.isAudioTrack())return this._streamEffect=e,Promise.resolve();const n=this.conference;return n?(this._setEffectInProgress=!0,n.removeTrack(this).then(()=>(this._switchStreamEffect(e),this.isVideoTrack()&&this.containers.forEach(i=>Rn.attachMediaStream(i,this.stream)),n.addTrack(this))).then(()=>{this._setEffectInProgress=!1}).catch(i=>{throw this._setEffectInProgress=!1,this._switchStreamEffect(),Cs.error("Failed to switch to the new stream!",i),i})):(this._switchStreamEffect(e),this.isVideoTrack()&&this.containers.forEach(i=>Rn.attachMediaStream(i,this.stream)),Promise.resolve())}stopStream(){this._stopStreamInProgress=!0;try{Rn.stopMediaStream(this.stream)}finally{this._stopStreamInProgress=!1}}toString(){return`LocalTrack[${this.rtcId},${this.getType()}]`}unmute(){return this._queueSetMuted(!1)}}var Qc=o(2342);const Kc=function(r,e){return r!==void 0&&r.media!==void 0&&Array.isArray(r.media)&&r.media.forEach(n=>{n.sources&&n.sources.length&&(n.ssrcs=[],n.sources.forEach(i=>{Object.keys(i).forEach(s=>{s!=="id"&&n.ssrcs.push({id:i.id,attribute:s,value:i[s]})})}),delete n.sources),n.ssrcGroups&&n.ssrcGroups.length&&n.ssrcGroups.forEach(i=>{i.ssrcs!==void 0&&Array.isArray(i.ssrcs)&&(i.ssrcs=i.ssrcs.join(" "))})}),Qc.write(r,e)},ha=function(r){const e=Qc.parse(r);return e!==void 0&&e.media!==void 0&&Array.isArray(e.media)&&e.media.forEach(n=>{n.ssrcs!==void 0&&Array.isArray(n.ssrcs)&&(n.sources=[],n.ssrcs.forEach(i=>{const s=n.sources.findIndex(c=>c.id===i.id);if(s>-1)n.sources[s][i.attribute]=i.value;else{const c={id:i.id};c[i.attribute]=i.value,n.sources.push(c)}}),delete n.ssrcs),n.ssrcGroups!==void 0&&Array.isArray(n.ssrcGroups)&&n.ssrcGroups.forEach(i=>{typeof i.ssrcs=="string"&&(i.ssrcs=i.ssrcs.split(" "))})}),e},qc=["audio","video","data"],pa=r=>r.find(e=>e.semantics==="SIM"),$c=r=>r.find(e=>e.semantics==="FID");function Wc(r,e,n,i){if(!r||!e)return;const s=c=>i.find(u=>u.id.toString()===c);e.ssrcs.forEach(c=>{r.sources.push(s(c));const u=n[parseInt(c,10)].find(b=>b.semantics==="FID");if(u){const b=u.ssrcs.find(L=>L!==c);r.sources.push(s(b)),r.ssrcGroups.push(u)}}),r.ssrcGroups.push(e)}function zc(r,e,n,i){if(!r||!e)return;if(r.sources=[],r.ssrcGroups=[],!n[e.id])return r.sources.push(e),void(r.msid=e.msid);const s=pa(n[e.id]),c=$c(n[e.id]);if(s)Wc(r,s,n,i);else if(c){const u=c.ssrcs.find(L=>L!==e),b=pa(n[u]);b?Wc(r,b,n,i):(c.ssrcs.forEach(L=>{r.sources.push((N=>i.find(X=>X.id.toString()===N))(L))}),r.ssrcGroups.push(c))}r.msid=r.sources[0].msid}function fa(r,e,n){if(!n.find(i=>!!i.sources&&i.sources.some(s=>s.id===r.id))){if(!e[r.id])return!1;const i=pa(e[r.id]),s=$c(e[r.id]);return i?n.some(c=>c.sources&&c.sources.some(u=>u.id.toString()===i.ssrcs[0])):!(!s||r.id.toString()===s.ssrcs[0])&&fa({id:s.ssrcs[0]},e,n)}return!0}class su{toPlanB(e){if(!e||typeof e.sdp!="string")return e;const n=ha(e.sdp);if(!n.media||!n.media.length||n.media.every(b=>qc.indexOf(b.mid)!==-1))return e;const i={},s=n.media;n.media=[],s.forEach(b=>{const L=b.type;if(L==="application")return b.mid="data",void(i[b.mid]=b);if(i[L]===void 0){const N=ns(b);N.sources&&Array.isArray(N.sources)&&N.sources.forEach(X=>{b.msid?X.msid=b.msid:delete X.msid}),N.ssrcGroups&&b.msid||(N.ssrcGroups=[]),delete N.msid,N.mid=L,i[L]=N}else if(b.msid){const N=ns(b);N.sources&&Array.isArray(N.sources)&&(N.sources.forEach(X=>{X.msid=b.msid}),i[L].sources=(i[L].sources||[]).concat(N.sources)),N.ssrcGroups!==void 0&&Array.isArray(N.ssrcGroups)&&(i[L].ssrcGroups=(i[L].ssrcGroups||[]).concat(N.ssrcGroups))}}),n.media=Object.values(i);const c=[];Object.values(i).forEach(b=>{b.direction!=="inactive"&&c.push(b.mid)}),n.groups.forEach(b=>{b.type==="BUNDLE"&&(b.mids=c.join(" "))}),n.msidSemantic={semantic:"WMS",token:"*"};const u=Kc(n);return new RTCSessionDescription({type:e.type,sdp:u})}toUnifiedPlan(e,n=null){if(!e||typeof e.sdp!="string")return e;const i=ha(e.sdp);if(!i.media||!i.media.length||i.media.length>3||i.media.every(Ie=>qc.indexOf(Ie.mid)===-1))return e;const s=n?ha(n.sdp):null,c=function(Ie,$e){if(!Ie||!$e||Ie.media.length===0||$e.media.length===0)return!1;const ut=Ie.media[0],ze=$e.media[0];return ut.iceUfrag!==ze.iceUfrag||ut.icePwd!==ze.icePwd}(i,s),u=i.media[0].iceUfrag,b=i.media[0].icePwd,L=i.media[0].fingerprint,N={};i.media.forEach(Ie=>{const $e=Ie.type;if($e==="application"){if(!s||!s.media){const it=ns(Ie);return it.mid=Object.keys(N).length.toString(),void(N[Ie.mid]=it)}const ze=s.media.findIndex(it=>it.type===$e);return void(ze&&(s.media[ze]=Ie,s.media[ze].mid=ze))}const ut=function(ze){const it={};return ze&&Array.isArray(ze)&&ze.forEach(At=>{At.ssrcs&&Array.isArray(At.ssrcs)&&At.ssrcs.forEach($t=>{it[$t]===void 0&&(it[$t]=[]),it[$t].push(At)})}),it}(Ie.ssrcGroups);if(Ie.sources)Ie.sources.forEach((ze,it)=>{if(!ze.msid)return;if(!s||!s.media){if(fa(ze,ut,Object.values(N)))return;const $t=ns(Ie);return $t.mid=Object.keys(N).length.toString(),$t.direction=it||Ie.direction==="sendonly"?"sendonly":"sendrecv",$t.bundleOnly=void 0,zc($t,ze,ut,Ie.sources),void(N[$t.mid]=$t)}if(fa(ze,ut,s.media))return;const At=ns(Ie);At.mid=s.media.length.toString(),At.direction="sendonly",zc(At,ze,ut,Ie.sources),s.media.push(At)});else if(!s){const ze=ns(Ie);ze.mid=Object.keys(N).length.toString(),N[Ie.mid]=ze}}),i.media=s?s.media:Object.values(N);const X=[];i.media.forEach(Ie=>{X.push(Ie.mid),c&&(Ie.iceUfrag=u,Ie.icePwd=b,Ie.fingerprint=L)}),i.groups.forEach(Ie=>{Ie.type==="BUNDLE"&&(Ie.mids=X.join(" "))}),i.msidSemantic={semantic:"WMS",token:"*"},i.origin.sessionVersion++;const de=Kc(i);return new RTCSessionDescription({type:e.type,sdp:de})}}var Hr=o(766);const Ts="signaling.peerMuted",Eo="signaling.peerVideoType";function qs(r,e,n){return`${r}-${e.substring(0,1)}${n}`}function Yc(r){const e=r.indexOf("-")+1;if(e<=0)throw new Error(`Invalid source name: ${r}`);const n=r.substr(e,1);for(const i of Object.values(y))if(i.substr(0,1)===n)return i;throw new Error(`Invalid source name: ${r}`)}class ou extends Br{getSSRCOwner(e){throw new Error("not implemented")}getPeerMediaInfo(e,n){throw new Error("not implemented")}getPeerSourceInfo(e,n){throw new Error("not implemented")}getTrackSourceName(e){throw new Error("not implemented")}}function $s(r){return parseInt(r.ssrcs.split(" ")[0],10)}function So(r){return parseInt(r.ssrcs.split(" ")[1],10)}function Xc(r){return r.ssrcs?r.ssrcs.map(e=>e.id).filter((e,n,i)=>i.indexOf(e)===n).length:0}class au{constructor(e){if(!e)throw new Error("mLine is undefined");this.mLine=e}get ssrcs(){return this.mLine.ssrcs||(this.mLine.ssrcs=[]),this.mLine.ssrcs}set ssrcs(e){this.mLine.ssrcs=e}get direction(){return this.mLine.direction}set direction(e){this.mLine.direction=e}get ssrcGroups(){return this.mLine.ssrcGroups||(this.mLine.ssrcGroups=[]),this.mLine.ssrcGroups}set ssrcGroups(e){this.mLine.ssrcGroups=e}getSSRCAttrValue(e,n){const i=this.ssrcs.find(s=>s.id===e&&s.attribute===n);return i&&i.value}removeSSRC(e){this.mLine.ssrcs&&this.mLine.ssrcs.length&&(this.mLine.ssrcs=this.mLine.ssrcs.filter(n=>n.id!==e))}addSSRCAttribute(e){this.ssrcs.push(e)}findGroup(e,n){return this.ssrcGroups.find(i=>i.semantics===e&&(!n||n===i.ssrcs))}findGroups(e){return this.ssrcGroups.filter(n=>n.semantics===e)}findGroupByPrimarySSRC(e,n){return this.ssrcGroups.find(i=>i.semantics===e&&$s(i)===n)}findSSRCByMSID(e){return this.ssrcs.find(n=>n.attribute==="msid"&&(e===null||n.value===e))}getSSRCCount(){return Xc(this.mLine)}containsAnySSRCGroups(){return this.mLine.ssrcGroups!==void 0}getPrimaryVideoSsrc(){const e=this.mLine.type;if(e!=="video")throw new Error(`getPrimarySsrc doesn't work with '${e}'`);if(Xc(this.mLine)===1)return this.mLine.ssrcs[0].id;if(this.mLine.ssrcGroups){const n=this.findGroup("SIM");if(n)return $s(n);const i=this.findGroup("FID");if(i)return $s(i);const s=this.findGroup("FEC-FR");if(s)return $s(s)}}getRtxSSRC(e){const n=this.findGroupByPrimarySSRC("FID",e);return n&&So(n)}getSSRCs(){return this.ssrcs.map(e=>e.id).filter((e,n,i)=>i.indexOf(e)===n)}getPrimaryVideoSSRCs(){const e=this.mLine.type;if(e!=="video")throw new Error(`getPrimaryVideoSSRCs doesn't work with ${e}`);const n=this.getSSRCs();for(const i of this.ssrcGroups)if(i.semantics==="FID"||i.semantics==="FEC-FR"){const s=So(i);n.splice(n.indexOf(s),1)}return n}dumpSSRCGroups(){return JSON.stringify(this.mLine.ssrcGroups)}removeGroupsWithSSRC(e){this.mLine.ssrcGroups&&(this.mLine.ssrcGroups=this.mLine.ssrcGroups.filter(n=>n.ssrcs.indexOf(`${e}`)===-1))}removeGroupsBySemantics(e){this.mLine.ssrcGroups&&(this.mLine.ssrcGroups=this.mLine.ssrcGroups.filter(n=>n.semantics!==e))}replaceSSRC(e,n){this.mLine.ssrcs&&this.mLine.ssrcs.forEach(i=>{i.id===e&&(i.id=n)})}addSSRCGroup(e){this.ssrcGroups.push(e)}}class Ki{constructor(e){this.parsedSDP=Hr.parse(e)}selectMedia(e){const n=this.parsedSDP.media.filter(i=>i.type===e).map(i=>new au(i));return n!=null?n:null}toRawSDP(){return Hr.write(this.parsedSDP)}}const Ws=(0,P.getLogger)("modules/sdp/LocalSdpMunger.js");class cu{constructor(e,n){this.tpc=e,this.localEndpointId=n}_addMutedLocalVideoTracksToSDP(e){var n;const i=this.tpc.getLocalTracks(Rt);if(!i.length)return!1;i.length!==1&&Ws.error(`${this.tpc} there is more than 1 video track ! Strange things may happen !`,i);const s=(n=e.selectMedia(Rt))===null||n===void 0?void 0:n[0];if(!s)return Ws.debug(`${this.tpc} unable to hack local video track SDP- no "video" media`),!1;let c=!1;for(const u of i){const b=u.isMuted(),L=u.getOriginalStream(),N=u.videoType===Nn().CAMERA,X=L&&this.tpc.isMediaStreamInPc(L);if(!N||!b&&X)continue;const de=this.tpc.isSimulcastOn()?this.tpc.simulcast.ssrcCache:[this.tpc.sdpConsistency.cachedPrimarySsrc];if(!de.length){Ws.error(`No SSRCs stored for: ${u} in ${this.tpc}`);continue}c=!0,s.direction=Tn().SENDRECV;const Ie=`injected-${de[0]}`;for(const $e of de)s.removeSSRC($e),s.addSSRCAttribute({id:$e,attribute:"cname",value:Ie}),s.addSSRCAttribute({id:$e,attribute:"msid",value:u.storedMSID});if(de.length>1){const $e={ssrcs:de.join(" "),semantics:"SIM"};s.findGroup($e.semantics,$e.ssrcs)||s.addSSRCGroup($e)}this.tpc.options.disableRtx||this.tpc.rtxModifier.modifyRtxSsrcs2(s)}return c}_generateMsidAttribute(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!e||!n)return Ws.warn(`Unable to munge local MSID - track id=${n} or media type=${e} is missing`),null;const s=this.tpc.id;return i!=="-"&&i?`${i}-${s} ${n}-${s}`:`${this.localEndpointId}-${e}-${s} ${n}-${s}`}_transformMediaIdentifiers(e){var n;const i=this.tpc.id;for(const X of e.ssrcs)switch(X.attribute){case"cname":case"label":case"mslabel":X.value=X.value&&`${X.value}-${i}`;break;case"msid":if(X.value){const de=X.value.split(" ");var s;de.length===2?X.value=this._generateMsidAttribute((s=e.mLine)===null||s===void 0?void 0:s.type,de[1],de[0]):Ws.warn(`Unable to munge local MSID - weird format detected: ${X.value}`)}}if(!this.tpc.usesUnifiedPlan())return;const c=(n=e.mLine)===null||n===void 0?void 0:n.direction;if(c===Tn().RECVONLY||c===Tn().INACTIVE)e.ssrcs=void 0,e.ssrcGroups=void 0;else{var u,b,L;const X=(u=e.mLine)===null||u===void 0?void 0:u.msid,de=X&&X.split(" ")[1],Ie=[...new Set((b=e.mLine)===null||b===void 0||(L=b.ssrcs)===null||L===void 0?void 0:L.map($e=>$e.id))];for(const $e of Ie)if(!e.ssrcs.find(ut=>ut.id===$e&&ut.attribute==="msid")){var N;const ut=this._generateMsidAttribute((N=e.mLine)===null||N===void 0?void 0:N.type,de);e.ssrcs.push({id:$e,attribute:"msid",value:ut})}}}maybeAddMutedLocalVideoTracksToSDP(e){if(!e)throw new Error("No local description passed in.");const n=new Ki(e.sdp);return this._addMutedLocalVideoTracksToSDP(n)?new RTCSessionDescription({type:e.type,sdp:n.toRawSDP()}):e}transformStreamIdentifiers(e){var n,i;if(!e||!e.sdp||!e.type)return e;const s=new Ki(e.sdp),c=(n=s.selectMedia(Xe))===null||n===void 0?void 0:n[0];c&&(this._transformMediaIdentifiers(c),this._injectSourceNames(c));const u=(i=s.selectMedia(Rt))===null||i===void 0?void 0:i[0];return u&&(this._transformMediaIdentifiers(u),this._injectSourceNames(u)),new RTCSessionDescription({type:e.type,sdp:s.toRawSDP()})}_injectSourceNames(e){var n,i,s;if(!Mr.isSourceNameSignalingEnabled())return;const c=[...new Set((n=e.mLine)===null||n===void 0||(i=n.ssrcs)===null||i===void 0?void 0:i.map(b=>b.id))],u=(s=e.mLine)===null||s===void 0?void 0:s.type;if(!u)throw new Error("_transformMediaIdentifiers - no media type in mediaSection");for(const b of c)e.ssrcs.find(L=>L.id===b&&L.attribute==="name")||e.ssrcs.push({id:b,attribute:"name",value:qs(this.localEndpointId,u,0)})}}const Rs=(0,P.getLogger)("modules/sdp/RtxModifier.js");function lu(r,e,n){const i=e.id,s=e.msid,c=e.cname,u=r.getRtxSSRC(i);u!==n&&(u&&(r.removeSSRC(u),r.removeGroupsWithSSRC(u)),r.addSSRCAttribute({id:n,attribute:"cname",value:c}),r.addSSRCAttribute({id:n,attribute:"msid",value:s}),r.addSSRCGroup({semantics:"FID",ssrcs:`${i} ${n}`}))}class du{constructor(){this.correspondingRtxSsrcs=new Map}clearSsrcCache(){this.correspondingRtxSsrcs.clear()}setSsrcCache(e){Rs.debug("Setting ssrc cache to ",e),this.correspondingRtxSsrcs=e}modifyRtxSsrcs(e){var n;const i=new Ki(e),s=(n=i.selectMedia(Rt))===null||n===void 0?void 0:n[0];return s?this.modifyRtxSsrcs2(s)?i.toRawSDP():e:(Rs.debug(`No 'video' media found in the sdp: ${e}`),e)}modifyRtxSsrcs2(e){if(e.direction==="recvonly"||e.getSSRCCount()<1)return!1;const n=e.getPrimaryVideoSSRCs();for(const i of n){const s=e.getSSRCAttrValue(i,"msid"),c=e.getSSRCAttrValue(i,"cname");let u=this.correspondingRtxSsrcs.get(i);u||(u=e.getRtxSSRC(i)||Jt.generateSsrc(),this.correspondingRtxSsrcs.set(i,u)),lu(e,{id:i,cname:c,msid:s},u)}return!0}stripRtx(e){var n;const i=new Ki(e),s=(n=i.selectMedia(Rt))===null||n===void 0?void 0:n[0];if(!s)return Rs.debug(`No 'video' media found in the sdp: ${e}`),e;if(s.direction==="recvonly")return Rs.debug("RtxModifier doing nothing, video m line is recvonly"),e;if(s.getSSRCCount()<1)return Rs.debug("RtxModifier doing nothing, no video ssrcs present"),e;if(!s.containsAnySSRCGroups())return Rs.debug("RtxModifier doing nothing, no video ssrcGroups present"),e;const c=s.findGroups("FID");s.removeGroupsBySemantics("FID");for(const u of c){const b=So(u);s.removeSSRC(b)}return i.toRawSDP()}}const ma=(0,P.getLogger)("modules/sdp/SdpConsistency.js");class uu{constructor(e){this.clearVideoSsrcCache(),this.logPrefix=e}clearVideoSsrcCache(){this.cachedPrimarySsrc=null,this.injectRecvOnly=!1}setPrimarySsrc(e){if(typeof e!="number")throw new Error("Primary SSRC must be a number!");this.cachedPrimarySsrc=e}hasPrimarySsrcCached(){return Boolean(this.cachedPrimarySsrc)}makeVideoPrimarySsrcsConsistent(e){var n;const i=new Ki(e),s=(n=i.selectMedia(Rt))===null||n===void 0?void 0:n[0];if(!s)return ma.debug(`${this.logPrefix} no 'video' media found in the sdp: ${e}`),e;if(s.direction==="recvonly")this.cachedPrimarySsrc&&this.injectRecvOnly?s.addSSRCAttribute({id:this.cachedPrimarySsrc,attribute:"cname",value:`recvonly-${this.cachedPrimarySsrc}`}):ma.info(`${this.logPrefix} no SSRC found for the recvonly video stream!`);else{const c=s.getPrimaryVideoSsrc();if(!c)return ma.info(`${this.logPrefix} sdp-consistency couldn't parse new primary ssrc`),e;if(this.cachedPrimarySsrc){s.replaceSSRC(c,this.cachedPrimarySsrc);for(const u of s.ssrcGroups)if(u.semantics==="FID"){const b=$s(u),L=So(u);b===c&&(u.ssrcs=`${this.cachedPrimarySsrc} ${L}`)}}else this.cachedPrimarySsrc=c;this.injectRecvOnly=!0}return i.toRawSDP()}}const zs=o(9077).getLogger("modules/RTC/JitsiRemoteTrack.js"),Zc=o(1645);let el=!1,tl=!1;const ga=["abort","canplaythrough","ended","error"];class hu extends Gc{constructor(e,n,i,s,c,u,b,L,N,X,de){if(super(n,s,c,()=>{},u,b),this.rtc=e,typeof L!="number")throw new TypeError(`SSRC ${L} is not a number`);this.ssrc=L,this.ownerEndpointId=i,this.muted=N,this.isP2P=X,this._sourceName=de,zs.debug(`New remote track added: ${this}`),this.hasBeenMuted=N,this.rtc&&this.track&&this._bindTrackHandlers(),this._containerHandlers={},ga.forEach(Ie=>{this._containerHandlers[Ie]=this._containerEventHandler.bind(this,Ie)})}_bindTrackHandlers(){this.track.addEventListener("mute",()=>this._onTrackMute()),this.track.addEventListener("unmute",()=>this._onTrackUnmute()),this.track.addEventListener("ended",()=>{zs.debug(`"onended" event(${Date.now()}): ${this}`)})}_onTrackMute(){zs.debug(`"onmute" event(${Date.now()}): ${this}`),this.rtc.eventEmitter.emit(Zc.REMOTE_TRACK_MUTE,this)}_onTrackUnmute(){zs.debug(`"onunmute" event(${Date.now()}): ${this}`),this.rtc.eventEmitter.emit(Zc.REMOTE_TRACK_UNMUTE,this)}setMute(e){this.muted!==e&&(e&&(this.hasBeenMuted=!0),this.stream&&(this.stream.muted=e),this.muted=e,this.emit(Ci,this))}isMuted(){return this.muted}getParticipantId(){return this.ownerEndpointId}isLocal(){return!1}getSSRC(){return this.ssrc}getSourceName(){return this._sourceName}_setVideoType(e){this.videoType!==e&&(this.videoType=e,this.emit(Yi,e))}_playCallback(){const e=this.isVideoTrack()?"video":"audio",n=window.performance.now();this.conference.getConnectionTimes()[`${e}.render`]=n;const i=window.connectionTimes["obtainPermissions.start"],s=window.connectionTimes["obtainPermissions.end"],c=isNaN(s)||isNaN(i)?0:s-i,u=n-(this.conference.getConnectionTimes()["session.initiate"]-this.conference.getConnectionTimes()["muc.joined"])-c;var b;this.conference.getConnectionTimes()[`${e}.ttfm`]=u,Be.sendAnalytics((b={media_type:e,muted:this.hasBeenMuted,value:u},zr("ttfm",b)))}_attachTTFMTracker(e){el&&this.isAudioTrack()||tl&&this.isVideoTrack()||(this.isAudioTrack()&&(el=!0),this.isVideoTrack()&&(tl=!0),e.addEventListener("canplay",this._playCallback.bind(this)))}_onTrackAttach(e){ga.forEach(n=>{e.addEventListener(n,this._containerHandlers[n])})}_onTrackDetach(e){ga.forEach(n=>{e.removeEventListener(n,this._containerHandlers[n])})}_containerEventHandler(e){zs.debug(`${e} handler was called for a container with attached ${this}`)}_getStatus(){const{enabled:e,muted:n,readyState:i}=this.track;return`readyState: ${i}, muted: ${n}, enabled: ${e}`}toString(){return`RemoteTrack[userID: ${this.getParticipantId()}, type: ${this.getType()}, ssrc: ${this.getSSRC()}, p2p: ${this.isP2P}, sourceName: ${this._sourceName}, status: ${this._getStatus()}]`}}const nl=(0,P.getLogger)("modules/RTC/TPCUtils.js"),bo=25e5,Ys=["1","2","3"];class pu{constructor(e){var n,i,s;this.pc=e;const c=(n=this.pc.options)===null||n===void 0||(i=n.videoQuality)===null||i===void 0?void 0:i.maxBitratesVideo,u={low:2e5,standard:7e5,high:bo};this.videoBitrates=c!=null?c:u;const b=(s=this.videoBitrates.VP8)!==null&&s!==void 0?s:this.videoBitrates;this.localStreamEncodingsConfig=[{active:!0,maxBitrate:E.isFirefox()?b.high:b.low,rid:"1",scaleResolutionDownBy:E.isFirefox()?1:4},{active:!0,maxBitrate:b.standard,rid:"2",scaleResolutionDownBy:2},{active:!0,maxBitrate:E.isFirefox()?b.low:b.high,rid:"3",scaleResolutionDownBy:E.isFirefox()?4:1}]}_getStreamEncodings(e){return this.pc.isSimulcastOn()&&e.isVideoTrack()?this.localStreamEncodingsConfig:e.isVideoTrack()?[{active:!0,maxBitrate:this.videoBitrates.high}]:[{active:!0}]}ensureCorrectOrderOfSsrcs(e){const n=Hr.parse(e.sdp);return n.media.forEach(i=>{if(i.type===Xe||!i.ssrcGroups||!i.ssrcGroups.length)return;let s=[];const c=new Set;i.ssrcGroups.map(u=>u.ssrcs.split(" ").filter(Boolean).forEach(b=>c.add(b))),c.forEach(u=>{const b=i.ssrcs.filter(L=>L.id.toString()===u);s=s.concat(b)}),i.ssrcs=s}),new RTCSessionDescription({type:e.type,sdp:Hr.write(n)})}findTransceiver(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return n!=null&&n.track&&n.getOriginalStream()?this.pc.peerconnection.getTransceivers().find(i=>{var s,c;return((s=i.sender)===null||s===void 0||(c=s.track)===null||c===void 0?void 0:c.id)===n.getTrackId()}):this.pc.peerconnection.getTransceivers().find(i=>{var s,c;return((s=i.receiver)===null||s===void 0||(c=s.track)===null||c===void 0?void 0:c.kind)===e})}insertUnifiedPlanSimulcastReceive(e){if(E.usesSdpMungingForSimulcast())return e;const n=Hr.parse(e.sdp),i=n.media.findIndex(c=>c.type===Rt);if(n.media[i].rids&&(n.media[i].simulcast_03||n.media[i].simulcast))return n.media.forEach((c,u)=>{c.type===Rt&&u!==i&&(n.media[u].rids=void 0,n.media[u].simulcast=void 0,n.media[u].simulcast_03=void 0)}),new RTCSessionDescription({type:e.type,sdp:Hr.write(n)});n.media[i].rids=[{id:"1",direction:"recv"},{id:"2",direction:"recv"},{id:"3",direction:"recv"}];const s=E.isFirefox()&&E.isVersionGreaterThan(71)?`recv ${Ys.join(";")}`:`recv rid=${Ys.join(";")}`;return n.media[i].simulcast_03={value:s},new RTCSessionDescription({type:e.type,sdp:Hr.write(n)})}addTrack(e,n){const i=e.getTrack();if(n){const s={direction:Tn().SENDRECV,streams:[e.getOriginalStream()],sendEncodings:[]};E.isFirefox()||(s.sendEncodings=this._getStreamEncodings(e)),this.pc.peerconnection.addTransceiver(i,s)}else this.pc.peerconnection.addTrack(i)}calculateEncodingsActiveState(e,n){const i=e.getTrack(),{height:s}=i.getSettings();return this.localStreamEncodingsConfig.map(c=>s/c.scaleResolutionDownBy).map((c,u)=>{var b;let L=e.getVideoType()!==Nn().CAMERA||n>0&&((b=this.localStreamEncodingsConfig[u])===null||b===void 0?void 0:b.scaleResolutionDownBy)===4||c<=n;return this.pc.isSharingLowFpsScreen()&&this.pc.usesUnifiedPlan()&&!E.isWebKitBased()&&this.localStreamEncodingsConfig[u].scaleResolutionDownBy!==1&&(L=!1),L})}calculateEncodingsBitrates(e){var n,i;const s=e.getVideoType(),c=((n=this.pc.options)===null||n===void 0||(i=n.videoQuality)===null||i===void 0?void 0:i.desktopBitrate)||5e5,u=e._originalStream&&e._originalStream.id!==e.getStreamId();return this.localStreamEncodingsConfig.map(b=>this.pc.isSharingLowFpsScreen()&&!E.isWebKitBased()?u?bo:c:s===Nn().DESKTOP&&E.isChromiumBased()&&!this.pc.usesUnifiedPlan()?void 0:b.maxBitrate)}replaceTrack(e,n){var i,s;const c=(i=n==null?void 0:n.getType())!==null&&i!==void 0?i:e==null?void 0:e.getType(),u=this.findTransceiver(c,e),b=(s=n==null?void 0:n.getTrack())!==null&&s!==void 0?s:null;return u?(nl.debug(`${this.pc} Replacing ${e} with ${n}`),u.sender.replaceTrack(b)):Promise.reject(new Error("replace track failed"))}setAudioTransferActive(e){this.setMediaTransferActive(Xe,e)}setEncodings(e){var n,i;const s=e.getType(),c=this.findTransceiver(s,e),u=c==null||(n=c.sender)===null||n===void 0?void 0:n.getParameters();return u!=null&&(i=u.encodings)!==null&&i!==void 0&&i.length?(u.encodings=this._getStreamEncodings(e),c.sender.setParameters(u)):Promise.resolve()}setMediaTransferActive(e,n){const i=this.pc.peerconnection.getTransceivers().filter(c=>c.receiver&&c.receiver.track&&c.receiver.track.kind===e),s=this.pc.getLocalTracks(e);nl.info(`${this.pc} ${n?"Enabling":"Suspending"} ${e} media transfer.`),i.forEach((c,u)=>{n?u===0&&s.length?c.direction=Tn().SENDRECV:c.direction=Tn().RECVONLY:c.direction=Tn().INACTIVE})}setVideoTransferActive(e){this.setMediaTransferActive(Rt,e)}updateEncodingsResolution(e){var n;E.isWebKitBased()&&e.encodings&&Array.isArray(e.encodings)&&(n=e.encodings).every(i=>i.scaleResolutionDownBy!==void 0&&i.scaleResolutionDownBy===n[0].scaleResolutionDownBy)&&e.encodings.forEach((i,s)=>{i.scaleResolutionDownBy=this.localStreamEncodingsConfig[s].scaleResolutionDownBy})}}const sn=(0,P.getLogger)("modules/RTC/TraceablePeerConnection.js");function qt(r,e,n,i,s,c,u){this.audioTransferActive=u.startSilent!==!0,this._dtmfSender=void 0,this._dtmfTonesQueue=[],this.videoTransferActive=!0,this.rtc=r,this.id=e,this.isP2P=c,this.remoteTracks=new Map,this.localTracks=new Map,this._addedStreams=[],this.localSSRCs=new Map,this.localUfrag=null,this.remoteUfrag=null,this._dtlsTransport=null,this.signalingLayer=n,this._peerVideoTypeChanged=this._peerVideoTypeChanged.bind(this),this.signalingLayer.on(Eo,this._peerVideoTypeChanged),this._peerMutedChanged=this._peerMutedChanged.bind(this),this.signalingLayer.on(Ts,this._peerMutedChanged),this.options=u;const b=s||{};b.optional=b.optional||[],Array.isArray(b.optional)?b.optional.push({rtcStatsSFUP2P:this.isP2P}):sn.warn("Optional param is not an array, rtcstats p2p data is omitted."),this.peerconnection=new Rn.RTCPeerConnectionType(i,b),this.tpcUtils=new pu(this),this.updateLog=[],this.stats={},this.statsinterval=null,this._capScreenshareBitrate=this.options.capScreenshareBitrate,this._usesUnifiedPlan=u.usesUnifiedPlan,this._usesTransceiverCodecPreferences=E.supportsCodecPreferences()&&this._usesUnifiedPlan,this._usesTransceiverCodecPreferences&&sn.info("Using RTCRtpTransceiver#setCodecPreferences for codec selection"),this.maxstats=u.maxstats,this.interop=new su;const L=o(2636);this.simulcast=new L({numOfLayers:Ys.length,explodeRemoteSimulcast:!1,usesUnifiedPlan:this._usesUnifiedPlan}),this.sdpConsistency=new uu(this.toString()),this.localSdpMunger=new cu(this,this.rtc.getLocalEndpointId()),this.eventEmitter=r.eventEmitter,this.rtxModifier=new du,this._senderVideoMaxHeight=2160,this.trace=(N,X)=>{sn.debug(N,X),this.updateLog.push({time:new Date,type:N,value:X||""})},this.onicecandidate=null,this.peerconnection.onicecandidate=N=>{this.trace("onicecandidate",JSON.stringify(N.candidate,null," ")),this.onicecandidate!==null&&this.onicecandidate(N)},this._usesUnifiedPlan?(this.onTrack=N=>{const X=N.streams[0];this._remoteTrackAdded(X,N.track,N.transceiver),X.addEventListener("removetrack",de=>{this._remoteTrackRemoved(X,de.track)})},this.peerconnection.addEventListener("track",this.onTrack)):(this.peerconnection.onaddstream=N=>this._remoteStreamAdded(N.stream),this.peerconnection.onremovestream=N=>this._remoteStreamRemoved(N.stream)),this.onsignalingstatechange=null,this.peerconnection.onsignalingstatechange=N=>{this.trace("onsignalingstatechange",this.signalingState),this.onsignalingstatechange!==null&&this.onsignalingstatechange(N)},this.oniceconnectionstatechange=null,this.peerconnection.oniceconnectionstatechange=N=>{this.trace("oniceconnectionstatechange",this.iceConnectionState),this.oniceconnectionstatechange!==null&&this.oniceconnectionstatechange(N)},this.onnegotiationneeded=null,this.peerconnection.onnegotiationneeded=N=>{this.trace("onnegotiationneeded"),this.onnegotiationneeded!==null&&this.onnegotiationneeded(N)},this.onconnectionstatechange=null,this.peerconnection.onconnectionstatechange=N=>{this.trace("onconnectionstatechange",this.connectionState),this.onconnectionstatechange!==null&&this.onconnectionstatechange(N)},this.ondatachannel=null,this.peerconnection.ondatachannel=N=>{this.trace("ondatachannel"),this.ondatachannel!==null&&this.ondatachannel(N)},this.maxstats&&(this.statsinterval=window.setInterval(()=>{this.getStats().then(N=>{if(typeof(N==null?void 0:N.result)=="function"){const X=N.result();for(let de=0;de<X.length;++de){const Ie=X[de];Ie.names().forEach($e=>{this._processStat(Ie,$e,Ie.stat($e))})}}else N.forEach(X=>this._processStat(X,"",X))})},1e3)),sn.info(`Create new ${this}`)}qt.prototype._processStat=function(r,e,n){const i=`${r.id}-${e}`;let s=this.stats[i];const c=new Date;s||(this.stats[i]=s={startTime:c,endTime:c,values:[],times:[]}),s.values.push(n),s.times.push(c.getTime()),s.values.length>this.maxstats&&(s.values.shift(),s.times.shift()),s.endTime=c};const Rr=function(r){return r==null?"":`type: ${r.type}\r
|
|
109
|
+
${r.sdp}`};qt.prototype.getConnectionState=function(){const r=this.peerconnection.iceConnectionState;return r==="completed"?"connected":r},qt.prototype.getDesiredMediaDirection=function(r){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const n=this.hasAnyTracksOfType(r);return this._usesUnifiedPlan?e?n?Tn().SENDRECV:Tn().SENDONLY:n?Tn().RECVONLY:Tn().INACTIVE:(r===Xe?this.audioTransferActive:this.videoTransferActive)?n?Tn().SENDRECV:Tn().RECVONLY:Tn().INACTIVE},qt.prototype._getReceiversByEndpointIds=function(r,e){let n=[],i=[];for(const c of r)n=n.concat(this.getRemoteTracks(c,e));const s=n.map(c=>{var u;return(u=c.track)===null||u===void 0?void 0:u.id});return i=this.peerconnection.getReceivers().filter(c=>c.track&&c.track.kind===e&&s.find(u=>u===c.track.id)),i},qt.prototype.isSimulcastOn=function(){return!this.options.disableSimulcast},qt.prototype._peerVideoTypeChanged=function(r,e){if(!r)return void sn.error(`${this} No endpointID on peerVideoTypeChanged`);const n=this.getRemoteTracks(r,Rt);n.length&&n[0]._setVideoType(e)},qt.prototype._peerMutedChanged=function(r,e,n){if(!r)return void sn.error(`${this} On peerMuteChanged - no endpoint ID`);const i=this.getRemoteTracks(r,e);i.length&&i[0].setMute(n)},qt.prototype.getAudioLevels=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e={};return(r.length?this._getReceiversByEndpointIds(r,Xe):this.peerconnection.getReceivers().filter(i=>i.track&&i.track.kind===Xe&&i.track.enabled)).forEach(i=>{const s=i.getSynchronizationSources();s&&s.length&&(e[s[0].source]=s[0].audioLevel)}),e},qt.prototype.getLocalTracks=function(r){let e=Array.from(this.localTracks.values());return r!==void 0&&(e=e.filter(n=>n.getType()===r)),e},qt.prototype.getLocalVideoTracks=function(){return this.getLocalTracks(Rt)},qt.prototype.hasAnyTracksOfType=function(r){if(!r)throw new Error('"mediaType" is required');return this.getLocalTracks(r).length>0},qt.prototype.getRemoteTracks=function(r,e){let n=[];const i=r?[r]:this.remoteTracks.keys();for(const s of i){const c=this.remoteTracks.get(s);if(c)for(const u of c.keys())e&&e!==u||(n=n.concat(Array.from(c.get(u))))}return n},qt.prototype.getRemoteSourceInfoByParticipant=function(r){const e=[],n=this.getRemoteTracks(r);if(n==null||!n.length)return e;const i=n.map(c=>c.getSSRC()),s=new Ln(this.remoteDescription.sdp);return i.forEach((c,u)=>{for(const b of s.media){let L="",N=Jt.findLines(b,`a=ssrc:${c}`);if(N.length){e[u]||(e[u]="");const X=Jt.findLines(b,`a=ssrc-group:FID ${c}`);if(X.length){const de=X[0].split(" ")[2];L+=`${X[0]}\r
|
|
110
|
+
`,N=N.concat(Jt.findLines(b,`a=ssrc:${de}`))}e[u]+=`${N.join(`\r
|
|
111
|
+
`)}\r
|
|
112
|
+
`,e[u]+=L}}}),e},qt.prototype.getTargetVideoBitrates=function(){const r=this.getConfiguredVideoCodec();return this.tpcUtils.videoBitrates[r.toUpperCase()]||this.tpcUtils.videoBitrates},qt.prototype.getTrackBySSRC=function(r){if(typeof r!="number")throw new Error(`SSRC ${r} is not a number`);for(const e of this.localTracks.values())if(this.getLocalSSRC(e)===r)return e;for(const e of this.getRemoteTracks())if(e.getSSRC()===r)return e;return null},qt.prototype.getSsrcByTrackId=function(r){const e=s=>s.getTrack().id===r,n=this.getLocalTracks().find(e);if(n)return this.getLocalSSRC(n);const i=this.getRemoteTracks().find(e);return i?i.getSSRC():null},qt.prototype._remoteStreamAdded=function(r){const e=Vn.getStreamID(r);if(!Vn.isUserStreamById(e))return void sn.info(`${this} ignored remote 'stream added' event for non-user stream[id=${e}]`);E.isChromiumBased()&&(r.onaddtrack=s=>{this._remoteTrackAdded(r,s.track)},r.onremovetrack=s=>{this._remoteTrackRemoved(r,s.track)});const n=r.getAudioTracks();for(const s of n)this._remoteTrackAdded(r,s);const i=r.getVideoTracks();for(const s of i)this._remoteTrackAdded(r,s)},qt.prototype._remoteTrackAdded=function(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const i=Vn.getStreamID(r),s=e.kind;if(!this.isP2P&&!Vn.isUserStreamById(i))return void sn.info(`${this} ignored remote 'stream added' event for non-user stream[id=${i}]`);if(sn.info(`${this} adding remote track for stream[id=${i},type=${s}]`),!s)return void _.callErrorHandler(new Error(`MediaType undefined for remote track, stream id: ${i}`));const c=this._usesUnifiedPlan?new Ln(this.peerconnection.remoteDescription.sdp):new Ln(this.remoteDescription.sdp);let u;if(this._usesUnifiedPlan)if(n&&n.mid){const ze=n.mid;u=c.media.filter(it=>Jt.findLine(it,`a=mid:${ze}`))}else u=c.media.filter(ze=>{const it=Jt.findLine(ze,"a=msid:");return it!==void 0&&i===it.substring(7).split(" ")[0]});else u=c.media.filter(ze=>ze.startsWith(`m=${s}`));if(!u.length)return void _.callErrorHandler(new Error(`No media lines found in remote SDP for remote stream[id=${i},type=${s}]`));let b=Jt.findLines(u[0],"a=ssrc:");if(b=b.filter(ze=>ze.indexOf(`msid:${i}`)!==-1),!b.length)return void _.callErrorHandler(new Error(`No SSRC lines found in remote SDP for remote stream[msid=${i},type=${s}]`));const L=b[0].substring(7).split(" ")[0],N=Number(L),X=this.signalingLayer.getSSRCOwner(N);if(isNaN(N)||N<0)return void _.callErrorHandler(new Error(`Invalid SSRC for remote stream[ssrc=${N},id=${i},type=${s}]`));if(!X)return void _.callErrorHandler(new Error(`No SSRC owner known for remote stream[ssrc=${N},id=${i},type=${s}]`));let de;Mr.isSourceNameSignalingEnabled()&&(de=this.signalingLayer.getTrackSourceName(N),de||(de=qs(X,s,0))),sn.info(`${this} creating remote track[endpoint=${X},ssrc=${N},type=${s},sourceName=${de}]`);const Ie=this.signalingLayer.getPeerMediaInfo(X,s);if(!Ie)return void _.callErrorHandler(new Error(`${this}: no peer media info available for ${X}`));const $e=Ie.muted,ut=Ie.videoType;this._createRemoteTrack(X,r,e,s,ut,N,$e,de)},qt.prototype._createRemoteTrack=function(r,e,n,i,s,c,u,b){let L=this.remoteTracks.get(r);L||(L=new Map,L.set(Xe,new Set),L.set(Rt,new Set),this.remoteTracks.set(r,L));const N=L.get(i);if(N!=null&&N.size&&Array.from(N).find(de=>de.getTrack()===n))return void sn.info(`${this} ignored duplicated track event for track[endpoint=${r},type=${i}]`);if(N!=null&&N.size&&!Mr.isSourceNameSignalingEnabled()){sn.error(`${this} received a second remote track for track[endpoint=${r},type=${i}]deleting the existing track`);const de=Array.from(N)[0];this._remoteTrackRemoved(de.getOriginalStream(),de.getTrack())}const X=new hu(this.rtc,this.rtc.conference,r,e,n,i,s,c,u,this.isP2P,b);N.add(X),this.eventEmitter.emit(Mt().REMOTE_TRACK_ADDED,X,this)},qt.prototype._remoteStreamRemoved=function(r){if(!Vn.isUserStream(r)){const i=Vn.getStreamID(r);return void sn.info(`Ignored remote 'stream removed' event for stream[id=${i}]`)}const e=r.getVideoTracks();for(const i of e)this._remoteTrackRemoved(r,i);const n=r.getAudioTracks();for(const i of n)this._remoteTrackRemoved(r,i)},qt.prototype._remoteTrackRemoved=function(r,e){const n=Vn.getStreamID(r),i=e&&Vn.getTrackID(e);if(!Vn.isUserStreamById(n))return void sn.info(`${this} ignored remote 'stream removed' event for non-user stream[id=${n}]`);if(!n)return void _.callErrorHandler(new Error(`${this} remote track removal failed - no stream ID`));if(!i)return void _.callErrorHandler(new Error(`${this} remote track removal failed - no track ID`));const s=this.getRemoteTracks().find(c=>c.getStreamId()===n&&c.getTrackId()===i);s?(sn.info(`${this} remote track removed stream[id=${n},trackId=${i}]`),this._removeRemoteTrack(s)):_.callErrorHandler(new Error(`${this} remote track removal failed - track not found`))},qt.prototype.removeRemoteTracks=function(r){let e=[];const n=this.remoteTracks.get(r);return n&&(e=e.concat(Array.from(n.get(Xe))),e=e.concat(Array.from(n.get(Rt))),this.remoteTracks.delete(r)),sn.debug(`${this} removed remote tracks[endpoint=${r},count=${e.length}`),e},qt.prototype._removeRemoteTrack=function(r){var e;r.dispose();const n=r.getParticipantId(),i=this.remoteTracks.get(n);i?(e=i.get(r.getType()))!==null&&e!==void 0&&e.delete(r)||sn.error(`${this} Failed to remove ${r} - type mapping messed up ?`):sn.error(`${this} removeRemoteTrack: no remote tracks map for endpoint=${n}`),this.eventEmitter.emit(Mt().REMOTE_TRACK_REMOVED,r)},qt.prototype._extractSSRCMap=function(r){const e=new Map,n=new Map;if(typeof r!="object"||r===null||typeof r.sdp!="string")return sn.warn("An empty description was passed as an argument"),e;const i=Hr.parse(r.sdp);if(!Array.isArray(i.media))return e;let s=i.media;this._usesUnifiedPlan&&(s=[],[Xe,Rt].forEach(c=>{const u=i.media.find(b=>b.type===c);u&&s.push(u)}));for(const c of s){if(!Array.isArray(c.ssrcs))continue;if(Array.isArray(c.ssrcGroups)){for(const b of c.ssrcGroups)if(b.semantics!==void 0&&b.ssrcs!==void 0){const L=b.ssrcs.split(" ").map(X=>parseInt(X,10)),N=L[0];b.ssrcs=L,n.has(N)||n.set(N,[]),n.get(N).push(b)}}let u=c.ssrcs;u=this._usesUnifiedPlan?u.filter(b=>b.attribute==="cname"):u.filter(b=>b.attribute==="msid");for(const b of u){const L=this._usesUnifiedPlan?c.type:b.value,N=b.id;let X=e.get(L);if(X||(X={ssrcs:[],groups:[],msid:L},e.set(L,X)),X.ssrcs.push(N),n.has(N)){const de=n.get(N);for(const Ie of de)X.groups.push(Ie)}}}return e},qt.prototype.getLocalSSRC=function(r){const e=this._getSSRC(r.rtcId);return e&&e.ssrcs[0]},qt.prototype._injectSsrcGroupForUnifiedSimulcast=function(r){const e=Hr.parse(r.sdp),n=e.media.find(s=>s.type==="video");n.ssrcGroups=n.ssrcGroups||[];const i=n.ssrcGroups.filter(s=>s.semantics==="FID");if(n.simulcast||n.simulcast_03){const s=[];if(i&&i.length?i.forEach(c=>{s.push(c.ssrcs.split(" ")[0])}):n.ssrcs.forEach(c=>{c.attribute==="msid"&&s.push(c.id)}),n.ssrcGroups.find(c=>c.semantics==="SIM"))return r;n.ssrcGroups.push({semantics:"SIM",ssrcs:s.join(" ")})}return new RTCSessionDescription({type:r.type,sdp:Hr.write(e)})};const rl={signalingState(){return this.peerconnection.signalingState},iceConnectionState(){return this.peerconnection.iceConnectionState},connectionState(){return this.peerconnection.connectionState},localDescription(){let r=this.peerconnection.localDescription;return r?(this.trace("getLocalDescription::preTransform",Rr(r)),this._usesUnifiedPlan&&!this.isP2P?(r=this.interop.toPlanB(r),this.trace("getLocalDescription::postTransform (Plan B)",Rr(r)),r=this._injectSsrcGroupForUnifiedSimulcast(r),this.trace("getLocalDescription::postTransform (inject ssrc group)",Rr(r))):this._usesUnifiedPlan||(E.doesVideoMuteByStreamRemove()&&(r=this.localSdpMunger.maybeAddMutedLocalVideoTracksToSDP(r),sn.debug("getLocalDescription::postTransform (munge local SDP)",r)),r=function(e,n){var i,s;if(!e)throw new Error("No local description passed in.");const c=new Ki(e.sdp),u=(i=c.selectMedia(Xe))===null||i===void 0?void 0:i[0];let b=!1;u&&u.direction!==Tn().SENDRECV&&(n.startSilent?u.direction=Tn().INACTIVE:u.direction=Tn().SENDRECV,b=!0);const L=(s=c.selectMedia(Rt))===null||s===void 0?void 0:s[0];return L&&L.direction!==Tn().SENDRECV&&(L.direction=Tn().SENDRECV,b=!0),b?new RTCSessionDescription({type:e.type,sdp:c.toRawSDP()}):e}(r,this.options)),r=this.localSdpMunger.transformStreamIdentifiers(r),r):(sn.debug(`${this} getLocalDescription no localDescription found`),{})},remoteDescription(){let r=this.peerconnection.remoteDescription;return r?(this.trace("getRemoteDescription::preTransform",Rr(r)),this._usesUnifiedPlan&&(this.isP2P?r=this._adjustRemoteMediaDirection(r):(r=this.interop.toPlanB(r),this.trace("getRemoteDescription::postTransform (Plan B)",Rr(r)))),r):(sn.debug(`${this} getRemoteDescription no remoteDescription found`),{})}};Object.keys(rl).forEach(r=>{Object.defineProperty(qt.prototype,r,{get:rl[r]})}),qt.prototype._getSSRC=function(r){return this.localSSRCs.get(r)},qt.prototype.isSharingLowFpsScreen=function(){return this._isSharingScreen()&&this._capScreenshareBitrate},qt.prototype._isSharingScreen=function(){const r=this.getLocalVideoTracks();return Boolean(r.find(e=>e.videoType===Ht.DESKTOP))},qt.prototype._mungeCodecOrder=function(r){if(!this.codecPreference)return r;const e=Hr.parse(r.sdp),n=e.media.find(i=>i.type===this.codecPreference.mediaType);if(!n)return r;if(this.codecPreference.enable)if(Jt.preferCodec(n,this.codecPreference.mimeType),this.codecPreference.mimeType===mi.H264&&E.isReactNative()&&this.isP2P&&Jt.stripCodec(n,this.codecPreference.mimeType,!0),this.codecPreference.mimeType===mi.VP9&&this.getConfiguredVideoCodec()===mi.VP9){const i=this.tpcUtils.videoBitrates.VP9||this.tpcUtils.videoBitrates,s=i.high?i.high:bo,c=Math.floor((this._isSharingScreen()?bo:s)/1e3);n.bandwidth=[{type:"AS",limit:c}]}else n.bandwidth=void 0;else Jt.stripCodec(n,this.codecPreference.mimeType);return new RTCSessionDescription({type:r.type,sdp:Hr.write(e)})},qt.prototype.addTrack=function(r){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];const n=r.rtcId;if(sn.info(`${this} adding ${r}`),this.localTracks.has(n))return Promise.reject(new Error(`${r} is already in ${this}`));this.localTracks.set(n,r);const i=r.getOriginalStream();if(this._usesUnifiedPlan){if(sn.debug(`${this} TPC.addTrack using unified plan`),i)try{this.tpcUtils.addTrack(r,e)}catch(c){return sn.error(`${this} Adding track=${r} failed: ${c==null?void 0:c.message}`),Promise.reject(c)}}else{if(i)this._addStream(i);else if(!E.doesVideoMuteByStreamRemove()||r.isAudioTrack()||r.isVideoTrack()&&!r.isMuted())return Promise.reject(new Error(`${this} no WebRTC stream for track=${r}`));if(E.doesVideoMuteByStreamRemove()&&r.isVideoTrack()&&r.isMuted()){const c=this.generateNewStreamSSRCInfo(r);this.sdpConsistency.setPrimarySsrc(c.ssrcs[0]);const u=c.groups.find(L=>L.semantics==="SIM");u&&this.simulcast.setSsrcCache(u.ssrcs);const b=c.groups.filter(L=>L.semantics==="FID");if(b){const L=new Map;b.forEach(N=>{const X=N.ssrcs[0],de=N.ssrcs[1];L.set(X,de)}),this.rtxModifier.setSsrcCache(L)}}}let s=Promise.resolve();return E.isFirefox()&&(s=s.then(()=>i&&this.tpcUtils.setEncodings(r))),s},qt.prototype.addTrackUnmute=function(r){if(sn.info(`${this} Adding track=${r} as unmute`),!this._assertTrackBelongs("addTrackUnmute",r))return Promise.reject("Track not found on the peerconnection");const e=r.getOriginalStream();return e?this._usesUnifiedPlan?this.tpcUtils.replaceTrack(null,r).then(()=>this.isP2P):(this._addStream(e),Promise.resolve(!0)):(sn.error(`${this} Unable to add track=${r} as unmute - no WebRTC stream`),Promise.reject("Stream not found"))},qt.prototype._addStream=function(r){this.peerconnection.addStream(r),this._addedStreams.push(r)},qt.prototype._removeStream=function(r){this.peerconnection.removeStream(r),this._addedStreams=this._addedStreams.filter(e=>e!==r)},qt.prototype._assertTrackBelongs=function(r,e){const n=this.localTracks.has(e==null?void 0:e.rtcId);return n||sn.error(`${this} ${r}: track=${e} does not belong to pc`),n},qt.prototype.getConfiguredVideoCodec=function(){var r;const e=(r=this.peerconnection.localDescription)===null||r===void 0?void 0:r.sdp,n=mi.VP8;if(!e)return n;const i=Hr.parse(e).media.find(s=>s.type===Rt).rtp[0].codec;return i?Object.values(mi).find(s=>s===i.toLowerCase()):n},qt.prototype.setDesktopSharingFrameRate=function(r){const e=r<=5;this._capScreenshareBitrate=this.isSimulcastOn()&&e},qt.prototype.setVideoCodecs=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;const n=e===null,i=e||r;this.codecPreference&&(r||e)?(this.codecPreference.enable=n,this.codecPreference.mimeType=i):r||e?this.codecPreference={enable:n,mediaType:Rt,mimeType:i}:sn.warn(`${this} Invalid codec settings[preferred=${r},disabled=${e}],
|
|
113
|
+
atleast one value is needed`)},qt.prototype.isMediaStreamInPc=function(r){return this._addedStreams.indexOf(r)>-1},qt.prototype.removeTrack=function(r){const e=r.getOriginalStream();this.trace("removeStream",r.rtcId,e?e.id:void 0),this._assertTrackBelongs("removeStream",r)&&(this.localTracks.delete(r.rtcId),this.localSSRCs.delete(r.rtcId),e&&this.peerconnection.removeStream(e))},qt.prototype.findSenderByKind=function(r){if(this.peerconnection.getSenders)return this.peerconnection.getSenders().find(e=>e.track&&e.track.kind===r)},qt.prototype.findReceiverForTrack=function(r){return this.peerconnection.getReceivers().find(e=>e.track===r)},qt.prototype.findSenderForTrack=function(r){if(this.peerconnection.getSenders)return this.peerconnection.getSenders().find(e=>e.track===r)},qt.prototype.replaceTrack=function(r,e){if(!r&&!e)return sn.info(`${this} replaceTrack called with no new track and no old track`),Promise.resolve();const n=Boolean(!r||!this.localTracks.has(r==null?void 0:r.rtcId));if(this._usesUnifiedPlan){var i;sn.debug(`${this} TPC.replaceTrack using unified plan`);const c=(i=e==null?void 0:e.getType())!==null&&i!==void 0?i:r==null?void 0:r.getType(),u=e==null?void 0:e.getOriginalStream(),b=e&&!u?Promise.resolve():this.tpcUtils.replaceTrack(r,e),L=this.tpcUtils.findTransceiver(c,r);return b.then(()=>{r&&this.localTracks.delete(r.rtcId),e&&this.localTracks.set(e.rtcId,e);const N=c===Xe?this.audioTransferActive:this.videoTransferActive;return L&&N&&(L.direction=e?Tn().SENDRECV:Tn().RECVONLY),(E.usesSdpMungingForSimulcast()||!e?Promise.resolve():this.tpcUtils.setEncodings(e)).then(()=>this.isP2P||n)})}sn.debug(`${this} TPC.replaceTrack using plan B`);let s=Promise.resolve();return r&&this.removeTrack(r),e&&(s=this.addTrack(e)),s.then(()=>!0)},qt.prototype.removeTrackMute=function(r){const e=r.getOriginalStream();return this.trace("removeStreamMute",r.rtcId,e?e.id:null),this._assertTrackBelongs("removeStreamMute",r)?this._usesUnifiedPlan?this.tpcUtils.replaceTrack(r,null):e?(sn.info(`${this} Removing track=${r} as mute`),this._removeStream(e),Promise.resolve(!0)):(sn.error(`${this} removeStreamMute - no WebRTC stream for track=${r}`),Promise.reject("Stream not found")):Promise.reject("Track not found in the peerconnection")},qt.prototype.createDataChannel=function(r,e){return this.trace("createDataChannel",r,e),this.peerconnection.createDataChannel(r,e)},qt.prototype._ensureSimulcastGroupIsLast=function(r){let e=r.sdp;const n=e.indexOf("m=video"),i=e.indexOf("a=ssrc-group:SIM",n);let s=e.lastIndexOf("a=ssrc-group");if(i===-1||s===-1||s===i)return r;const c=e.indexOf(`\r
|
|
114
|
+
`,i),u=e.substring(i,c+2);e=e.replace(u,""),s=e.lastIndexOf("a=ssrc-group");const b=e.indexOf(`\r
|
|
115
|
+
`,s),L=e.slice(0,b),N=u.trim(),X=e.slice(b);return e=`${L}\r
|
|
116
|
+
${N}${X}`,new RTCSessionDescription({type:r.type,sdp:e})},qt.prototype._adjustLocalMediaDirection=function(r){var e,n;const i=new Ki(r.sdp);let s=!1;const c=(e=i.selectMedia(Xe))===null||e===void 0?void 0:e[0];if(c){const b=this.getDesiredMediaDirection(Xe);c.direction!==b&&(c.direction=b,sn.info(`${this} Adjusted local audio direction to ${b}`),s=!0)}else sn.warn(`${this} No "audio" media found in the local description`);const u=(n=i.selectMedia(Rt))===null||n===void 0?void 0:n[0];if(u){const b=this.getDesiredMediaDirection(Rt);u.direction!==b&&(u.direction=b,sn.info(`${this} Adjusted local video direction to ${b}`),s=!0)}else sn.warn(`${this} No "video" media found in the local description`);return s?new RTCSessionDescription({type:r.type,sdp:i.toRawSDP()}):r},qt.prototype._adjustRemoteMediaDirection=function(r){const e=new Ki(r.sdp);return[Xe,Rt].forEach(n=>{var i;const s=(i=e.selectMedia(n))===null||i===void 0?void 0:i[0],c=this.hasAnyTracksOfType(n),u=this.getRemoteTracks(null,n).length>0;s.direction=c&&u?Tn().SENDRECV:c?Tn().RECVONLY:u?Tn().SENDONLY:Tn().INACTIVE}),new RTCSessionDescription({type:r.type,sdp:e.toRawSDP()})},qt.prototype._mungeOpus=function(r){const{audioQuality:e}=this.options;if(!(e!=null&&e.stereo||e!=null&&e.opusMaxAverageBitrate))return r;const n=Hr.parse(r.sdp),i=n.media;for(const s of i)if(s.type==="audio"){const{payload:c}=s.rtp.find(X=>X.codec===mi.OPUS);if(!c)continue;let u=s.fmtp.find(X=>X.payload===c);u||(u={payload:c,config:""});const b=Hr.parseParams(u.config);let L=!1;if(e!=null&&e.stereo&&(b.stereo=1,L=!0),e!=null&&e.opusMaxAverageBitrate&&(b.maxaveragebitrate=e.opusMaxAverageBitrate,L=!0),!L)continue;let N="";for(const X of Object.keys(b))N+=`${X}=${b[X]}; `;u.config=N.trim()}return new RTCSessionDescription({type:r.type,sdp:Hr.write(n)})},qt.prototype._initializeDtlsTransport=function(){if(!this.peerconnection.getSenders||this._dtlsTransport)return;const r=this.peerconnection.getSenders();r.length!==0&&r[0].transport&&(this._dtlsTransport=r[0].transport,this._dtlsTransport.onerror=e=>{sn.error(`${this} DtlsTransport error: ${e}`)},this._dtlsTransport.onstatechange=()=>{this.trace("dtlsTransport.onstatechange",this._dtlsTransport.state)})},qt.prototype.configureSenderVideoEncodings=function(){return this.setSenderVideoConstraints(this._senderVideoMaxHeight)},qt.prototype.setLocalDescription=function(r){let e=r;return this.trace("setLocalDescription::preTransform",Rr(e)),e=this._mungeOpus(e),this._usesUnifiedPlan||(e=this._adjustLocalMediaDirection(e),e=this._ensureSimulcastGroupIsLast(e)),this._usesTransceiverCodecPreferences||(e=this._mungeCodecOrder(e)),this.trace("setLocalDescription::postTransform",Rr(e)),new Promise((n,i)=>{this.peerconnection.setLocalDescription(e).then(()=>{this.trace("setLocalDescriptionOnSuccess");const s=Jt.getUfrag(e.sdp);s!==this.localUfrag&&(this.localUfrag=s,this.eventEmitter.emit(Mt().LOCAL_UFRAG_CHANGED,this,s)),this._initializeDtlsTransport(),n()},s=>{this.trace("setLocalDescriptionOnFailure",s),this.eventEmitter.emit(Mt().SET_LOCAL_DESCRIPTION_FAILED,s,this),i(s)})})},qt.prototype.setAudioTransferActive=function(r){sn.debug(`${this} audio transfer active: ${r}`);const e=this.audioTransferActive!==r;return this.audioTransferActive=r,this._usesUnifiedPlan?(this.tpcUtils.setAudioTransferActive(r),!1):e},qt.prototype.setRemoteDescription=function(r){let e=r;if(this.trace("setRemoteDescription::preTransform",Rr(r)),e=this._mungeOpus(e),this._usesUnifiedPlan){if(!this.isP2P){const n=this.peerconnection.remoteDescription;e=this.interop.toUnifiedPlan(e,n),this.trace("setRemoteDescription::postTransform (Unified)",Rr(e))}this.isSimulcastOn()&&(e=this.simulcast.mungeRemoteDescription(e),this.trace("setRemoteDescription::postTransform (simulcast)",Rr(e)),e=this.tpcUtils.insertUnifiedPlanSimulcastReceive(e),this.trace("setRemoteDescription::postTransform (sim receive)",Rr(e))),e=this.tpcUtils.ensureCorrectOrderOfSsrcs(e),this.trace("setRemoteDescription::postTransform (correct ssrc order)",Rr(e))}else this.isSimulcastOn()&&(e=this.simulcast.mungeRemoteDescription(e,!0),this.trace("setRemoteDescription::postTransform (simulcast)",Rr(e))),e=function(n){if(typeof n!="object"||n===null||typeof n.sdp!="string")return sn.warn("An empty description was passed as an argument"),n;const i=o(766),s=i.parse(n.sdp);s!==void 0&&s.media!==void 0&&Array.isArray(s.media)&&s.media.forEach(u=>{const b=[],L=[];if(u.ssrcGroups!==void 0&&Array.isArray(u.ssrcGroups)&&u.ssrcGroups.forEach(N=>{N.semantics!==void 0&&N.semantics==="FID"&&N.ssrcs!==void 0&&b.push(Number(N.ssrcs.split(" ")[0]))}),Array.isArray(u.ssrcs)){let N;for(N=0;N<u.ssrcs.length;N++)typeof u.ssrcs[N]=="object"&&u.ssrcs[N].id!==void 0&&b.indexOf(u.ssrcs[N].id)>=0&&(L.push(u.ssrcs[N]),delete u.ssrcs[N]);for(N=0;N<u.ssrcs.length;N++)u.ssrcs[N]!==void 0&&L.push(u.ssrcs[N]);u.ssrcs=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(!E.isChrome()||!E.isVersionGreaterThan(70))return X;let de=[...X];return X.filter(Ie=>Ie.attribute==="mslabel"&&Ie.value==="-").map(Ie=>Ie.id).forEach(Ie=>{const $e=de.find(ut=>ut.id===Ie&&ut.attribute==="cname");$e.value=`${Tn().RECVONLY}-${Ie}`,de=de.filter(ut=>ut.id!==Ie),de.push($e)}),de}(L)}});const c=i.write(s);return new RTCSessionDescription({type:n.type,sdp:c})}(e);return e=this._mungeCodecOrder(e),this.trace("setRemoteDescription::postTransform (munge codec order)",Rr(e)),new Promise((n,i)=>{this.peerconnection.setRemoteDescription(e).then(()=>{this.trace("setRemoteDescriptionOnSuccess");const s=Jt.getUfrag(e.sdp);s!==this.remoteUfrag&&(this.remoteUfrag=s,this.eventEmitter.emit(Mt().REMOTE_UFRAG_CHANGED,this,s)),this._initializeDtlsTransport(),n()},s=>{this.trace("setRemoteDescriptionOnFailure",s),this.eventEmitter.emit(Mt().SET_REMOTE_DESCRIPTION_FAILED,s,this),i(s)})})},qt.prototype.setSenderVideoConstraints=function(r){var e;if(r<0)throw new Error(`Invalid frameHeight: ${r}`);if(E.isReactNative())return Promise.resolve();this._senderVideoMaxHeight=r;const n=this.getLocalVideoTracks()[0];if(!n||n.isMuted())return Promise.resolve();const i=this.findSenderByKind(Rt);if(!i)return Promise.resolve();const s=i.getParameters();if(s==null||(e=s.encodings)===null||e===void 0||!e.length)return Promise.resolve();const c=this.isSharingLowFpsScreen()?"maintain-resolution":"maintain-framerate";s.degradationPreference=c,sn.info(`${this} Setting degradation preference [preference=${c},track=${n}`),this.encodingsEnabledState=this.tpcUtils.calculateEncodingsActiveState(n,r);const u=this.tpcUtils.calculateEncodingsBitrates(n),b=n.getVideoType();if(this.isSimulcastOn()){for(const ze in s.encodings){var L,N;s.encodings.hasOwnProperty(ze)&&(s.encodings[ze].active=this.encodingsEnabledState[ze],E.isFirefox()&&(s.encodings[ze].degradationPreference=c),this.getConfiguredVideoCodec()===mi.VP8&&((L=this.options)!==null&&L!==void 0&&(N=L.videoQuality)!==null&&N!==void 0&&N.maxBitratesVideo||this.isSharingLowFpsScreen()||this._usesUnifiedPlan)&&(s.encodings[ze].maxBitrate=u[ze]))}this.tpcUtils.updateEncodingsResolution(s)}else if(r>0){var X,de;let ze=1;if(b===Ht.CAMERA&&n.resolution>r&&(ze=Math.floor(n.resolution/r)),s.encodings[0].active=!0,s.encodings[0].scaleResolutionDownBy=ze,E.isFirefox()&&(s.encodings[0].degradationPreference=c),this.getConfiguredVideoCodec()===mi.VP8&&(X=this.options)!==null&&X!==void 0&&(de=X.videoQuality)!==null&&de!==void 0&&de.maxBitratesVideo){var Ie;let it=(Ie=this.getTargetVideoBitrates())===null||Ie===void 0?void 0:Ie.high;var $e,ut;b===Ht.CAMERA&&(it=($e=(ut=this.tpcUtils.localStreamEncodingsConfig.find(At=>At.scaleResolutionDownBy===ze))===null||ut===void 0?void 0:ut.maxBitrate)!==null&&$e!==void 0?$e:it),s.encodings[0].maxBitrate=it}}else s.encodings[0].active=!1;return sn.info(`${this} setting max height=${r},encodings=${JSON.stringify(s.encodings)}`),i.setParameters(s).then(()=>{n.maxEnabledResolution=r,this.eventEmitter.emit(Mt().LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED,n)})},qt.prototype.setVideoTransferActive=function(r){sn.debug(`${this} video transfer active: ${r}`);const e=this.videoTransferActive!==r;return this.videoTransferActive=r,this._usesUnifiedPlan?(this.tpcUtils.setVideoTransferActive(r),!1):e},qt.prototype.sendTones=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:200,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200;if(!this._dtmfSender){if(this.peerconnection.getSenders){const i=this.peerconnection.getSenders().find(s=>s.dtmf);this._dtmfSender=i&&i.dtmf,this._dtmfSender&&sn.info(`${this} initialized DTMFSender using getSenders`)}if(!this._dtmfSender){const i=Array.from(this.localTracks.values()).find(s=>s.isAudioTrack());this.peerconnection.createDTMFSender&&i&&(this._dtmfSender=this.peerconnection.createDTMFSender(i.getTrack())),this._dtmfSender&&sn.info(`${this} initialized DTMFSender using deprecated createDTMFSender`)}this._dtmfSender&&(this._dtmfSender.ontonechange=this._onToneChange.bind(this))}if(this._dtmfSender){if(this._dtmfSender.toneBuffer)return void this._dtmfTonesQueue.push({tones:r,duration:e,interToneGap:n});this._dtmfSender.insertDTMF(r,e,n)}else sn.warn(`${this} sendTones - failed to select DTMFSender`)},qt.prototype._onToneChange=function(r){if(this._dtmfSender&&r.tone===""&&this._dtmfTonesQueue.length){const{tones:e,duration:n,interToneGap:i}=this._dtmfTonesQueue.shift();this._dtmfSender.insertDTMF(e,n,i)}},qt.prototype.generateRecvonlySsrc=function(){const r=Jt.generateSsrc();sn.info(`${this} generated new recvonly SSRC=${r}`),this.sdpConsistency.setPrimarySsrc(r)},qt.prototype.clearRecvonlySsrc=function(){sn.info(`${this} Clearing primary video SSRC!`),this.sdpConsistency.clearVideoSsrcCache()},qt.prototype.close=function(){this.trace("stop"),this.signalingLayer.off(Ts,this._peerMutedChanged),this.signalingLayer.off(Eo,this._peerVideoTypeChanged),this._usesUnifiedPlan&&this.peerconnection.removeEventListener("track",this.onTrack);for(const r of this.remoteTracks.values())for(const e of r.values())for(const n of e)this._removeRemoteTrack(n);this.remoteTracks.clear(),this._addedStreams=[],this._dtmfSender=null,this._dtmfTonesQueue=[],this.rtc._removePeerConnection(this)||sn.error(`${this} RTC._removePeerConnection returned false`),this.statsinterval!==null&&(window.clearInterval(this.statsinterval),this.statsinterval=null),sn.info(`${this} Closing peerconnection`),this.peerconnection.close()},qt.prototype.createAnswer=function(r){return this._createOfferOrAnswer(!1,r)},qt.prototype.createOffer=function(r){return this._createOfferOrAnswer(!0,r)},qt.prototype._createOfferOrAnswer=function(r,e){const n=r?"Offer":"Answer";this.trace(`create${n}`,JSON.stringify(e,null," "));const i=(L,N,X)=>{try{this.trace(`create${n}OnSuccess::preTransform`,Rr(L)),this._usesUnifiedPlan||(this.hasAnyTracksOfType(Rt)||this.sdpConsistency.hasPrimarySsrcCached()||this.generateRecvonlySsrc(),L=new RTCSessionDescription({type:L.type,sdp:this.sdpConsistency.makeVideoPrimarySsrcsConsistent(L.sdp)}),this.trace(`create${n}OnSuccess::postTransform (make primary audio/video ssrcs consistent)`,Rr(L)));const de=this.getLocalVideoTracks()[0];this.isSimulcastOn()&&E.usesSdpMungingForSimulcast()&&((de==null?void 0:de.getVideoType())===Ht.CAMERA||this._usesUnifiedPlan||!this.isSharingLowFpsScreen())&&(L=this.simulcast.mungeLocalDescription(L),this.trace(`create${n} OnSuccess::postTransform (simulcast)`,Rr(L))),!this.options.disableRtx&&E.usesSdpMungingForSimulcast()&&(L=new RTCSessionDescription({type:L.type,sdp:this.rtxModifier.modifyRtxSsrcs(L.sdp)}),this.trace(`create${n}OnSuccess::postTransform (rtx modifier)`,Rr(L)));const Ie=this._extractSSRCMap(L);this._processLocalSSRCsMap(Ie),N(L)}catch(de){this.trace(`create${n}OnError`,de),this.trace(`create${n}OnError`,Rr(L)),sn.error(`${this} create${n}OnError`,de,Rr(L)),X(de)}},s=(L,N)=>{this.trace(`create${n}OnFailure`,L);const X=r?Mt().CREATE_OFFER_FAILED:Mt().CREATE_ANSWER_FAILED;this.eventEmitter.emit(X,L,this),N(L)};if(this._usesTransceiverCodecPreferences){const L=this.peerconnection.getTransceivers().find(N=>{var X,de;return N.receiver&&((X=N.receiver)===null||X===void 0||(de=X.track)===null||de===void 0?void 0:de.kind)===Rt});if(L){var c,u,b;let N=(c=RTCRtpReceiver.getCapabilities(Rt))===null||c===void 0?void 0:c.codecs;const X=(u=this.codecPreference)===null||u===void 0?void 0:u.mimeType,de=(b=this.codecPreference)===null||b===void 0?void 0:b.enable;N&&X&&de?N.sort(Ie=>Ie.mimeType.toLowerCase()===`${Rt}/${X}`?-1:1):N&&X&&(N=N.filter(Ie=>Ie.mimeType.toLowerCase()!==`${Rt}/${X}`)),E.isChromiumBased()&&(N=N.filter(Ie=>Ie.mimeType.toLowerCase()!==`${Rt}/${mi.ULPFEC}`));try{L.setCodecPreferences(N)}catch(Ie){sn.warn(`${this} Setting codec[preference=${X},enable=${de}] failed`,Ie)}}}return new Promise((L,N)=>{let X;X=r?this.peerconnection.createOffer(e):this.peerconnection.createAnswer(e),X.then(de=>i(de,L,N),de=>s(de,N))})},qt.prototype._extractPrimarySSRC=function(r){return r&&r.groups&&r.groups.length?r.groups[0].ssrcs[0]:r&&r.ssrcs&&r.ssrcs.length?r.ssrcs[0]:null},qt.prototype._processLocalSSRCsMap=function(r){for(const e of this.localTracks.values()){const n=this._usesUnifiedPlan?e.getType():e.storedMSID;if(r.has(n)){const i=r.get(n);if(!i)return void sn.error(`${this} No SSRC found for stream=${n}`);const s=this.localSSRCs.get(e.rtcId),c=this._extractPrimarySSRC(i),u=this._extractPrimarySSRC(s);c!==u&&(u&&sn.error(`${this} Overwriting SSRC for track=${e}] with ssrc=${i}`),this.localSSRCs.set(e.rtcId,i),this.eventEmitter.emit(Mt().LOCAL_TRACK_SSRC_UPDATED,e,c))}else e.isVideoTrack()||e.isMuted()||sn.warn(`${this} No SSRCs found in the local SDP for track=${e}, stream=${n}`)}},qt.prototype.addIceCandidate=function(r){return this.trace("addIceCandidate",JSON.stringify({candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment},null," ")),this.peerconnection.addIceCandidate(r)},qt.prototype.getActiveSimulcastStreams=function(){let r=1;var e;return this.isSimulcastOn()&&this.encodingsEnabledState?r=(e=this.encodingsEnabledState.filter(n=>Boolean(n)))===null||e===void 0?void 0:e.length:this.isSimulcastOn()&&(r=Ys.length),r},qt.prototype.getStats=function(){return this.peerconnection.getStats()},qt.prototype.generateNewStreamSSRCInfo=function(r){const e=r.rtcId;let n=this._getSSRC(e);if(n&&sn.error(`${this} Overwriting local SSRCs for track id=${e}`),!this.isSimulcastOn()||r.getVideoType()!==Ht.CAMERA&&this.isSharingLowFpsScreen())n={ssrcs:[Jt.generateSsrc()],groups:[]};else{n={ssrcs:[],groups:[]};for(let i=0;i<Ys.length;i++)n.ssrcs.push(Jt.generateSsrc());n.groups.push({ssrcs:n.ssrcs.slice(),semantics:"SIM"})}if(!this.options.disableRtx){const i=n.ssrcs.length;for(let s=0;s<i;++s){const c=n.ssrcs[s],u=Jt.generateSsrc();n.ssrcs.push(u),n.groups.push({ssrcs:[c,u],semantics:"FID"})}}return n.msid=r.storedMSID,this.localSSRCs.set(e,n),n},qt.prototype.usesUnifiedPlan=function(){return this._usesUnifiedPlan},qt.prototype.toString=function(){return`TPC[id=${this.id},type=${this.isP2P?"P2P":"JVB"}]`};const Xs=(0,P.getLogger)("modules/RTC/RTC.js");let va=0,ya=0;function il(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(r=>{const{sourceId:e,sourceType:n,stream:i,track:s,videoType:c,effects:u}=r,{deviceId:b,facingMode:L}=s.getSettings();return ya=It(ya),new iu({deviceId:b,facingMode:L,mediaType:s.kind,rtcId:ya,sourceId:e,sourceType:n,stream:i,track:s,videoType:c||null,effects:u})})}class Vn extends Br{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),this.conference=e,this.peerConnections=new Map,this.localTracks=[],this.options=n,this._channel=null,this._lastN=void 0,this._lastNEndpoints=null,this._maxFrameHeight=void 0,this._selectedEndpoints=null,this._lastNChangeListener=this._onLastNChanged.bind(this),this._onDeviceListChanged=this._onDeviceListChanged.bind(this),this._updateAudioOutputForAudioTracks=this._updateAudioOutputForAudioTracks.bind(this),this._videoType=_o().NONE,Rn.isDeviceChangeAvailable("output")&&(Rn.addListener(Mt().AUDIO_OUTPUT_DEVICE_CHANGED,this._updateAudioOutputForAudioTracks),Rn.addListener(Mt().DEVICE_LIST_CHANGED,this._onDeviceListChanged))}destroy(){Rn.removeListener(Mt().AUDIO_OUTPUT_DEVICE_CHANGED,this._updateAudioOutputForAudioTracks),Rn.removeListener(Mt().DEVICE_LIST_CHANGED,this._onDeviceListChanged),this._channelOpenListener&&this.removeListener(Mt().DATA_CHANNEL_OPEN,this._channelOpenListener)}static createLocalTracks(e){return il(e)}static obtainAudioAndVideoPermissions(e){return Rn.obtainAudioAndVideoPermissions(e).then(n=>il(n))}initializeBridgeChannel(e,n){this._channel=new Xd(e,n,this.eventEmitter),this._channelOpenListener=()=>{const i=(s,c,u)=>{w().callErrorHandler(s),Xs.error(`Cannot send ${c}(${JSON.stringify(u)}) endpoint message`,s)};if(this._receiverVideoConstraints)try{this._channel.sendNewReceiverVideoConstraintsMessage(this._receiverVideoConstraints)}catch(s){i(s,"ReceiverVideoConstraints",this._receiverVideoConstraints)}if(this._selectedEndpoints)try{this._channel.sendSelectedEndpointsMessage(this._selectedEndpoints)}catch(s){i(s,"SelectedEndpointsChangedEvent",this._selectedEndpoints)}if(this._maxFrameHeight!==void 0)try{this._channel.sendReceiverVideoConstraintMessage(this._maxFrameHeight)}catch(s){i(s,"ReceiverVideoConstraint",this._maxFrameHeight)}if(this._lastN!==void 0&&this._lastN!==-1)try{this._channel.sendSetLastNMessage(this._lastN)}catch(s){i(s,"LastNChangedEvent",this._lastN)}if(!Mr.isSourceNameSignalingEnabled())try{this._channel.sendVideoTypeMessage(this._videoType)}catch(s){i(s,"VideoTypeMessage",this._videoType)}this.removeListener(Mt().DATA_CHANNEL_OPEN,this._channelOpenListener),this._channelOpenListener=null},this.addListener(Mt().DATA_CHANNEL_OPEN,this._channelOpenListener),this.addListener(Mt().LASTN_ENDPOINT_CHANGED,this._lastNChangeListener)}_onDeviceListChanged(){this._updateAudioOutputForAudioTracks(Rn.getAudioOutputDevice())}_onLastNChanged(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const n=this._lastNEndpoints||[];let i=[],s=[];this._lastNEndpoints=e,i=n.filter(c=>!this.isInLastN(c)),s=e.filter(c=>n.indexOf(c)===-1),this.conference.eventEmitter.emit(zt,i,s)}onCallEnded(){this._channel&&(this._channel&&this._channel.mode==="websocket"&&this._channel.close(),this._channel=null)}setDesktopSharingFrameRate(e){Rn.setDesktopSharingFrameRate(e)}setNewReceiverVideoConstraints(e){this._receiverVideoConstraints=e,this._channel&&this._channel.isOpen()&&this._channel.sendNewReceiverVideoConstraintsMessage(e)}setReceiverVideoConstraint(e){this._maxFrameHeight=e,this._channel&&this._channel.isOpen()&&this._channel.sendReceiverVideoConstraintMessage(e)}setVideoType(e){this._videoType!==e&&(this._videoType=e,this._channel&&this._channel.isOpen()&&this._channel.sendVideoTypeMessage(e))}sendSourceVideoType(e,n){this._channel&&this._channel.isOpen()&&this._channel.sendSourceVideoTypeMessage(e,n)}selectEndpoints(e){this._selectedEndpoints=e,this._channel&&this._channel.isOpen()&&this._channel.sendSelectedEndpointsMessage(e)}static addListener(e,n){Rn.addListener(e,n)}static removeListener(e,n){Rn.removeListener(e,n)}static init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.options=e,Rn.init(this.options)}createPeerConnection(e,n,i,s){const c=JSON.parse(JSON.stringify(Rn.pcConstraints));s.abtestSuspendVideo!==void 0&&(Rn.setSuspendVideo(c,s.abtestSuspendVideo),Be.analytics.addPermanentProperties({abtestSuspendVideo:s.abtestSuspendVideo})),s.enableInsertableStreams&&(Xs.debug("E2EE - setting insertable streams constraints"),n.encodedInsertableStreams=!0),(E.isReactNative()||E.isChromiumBased()&&!s.usesUnifiedPlan)&&(Xs.debug("WebRTC application is running in plan-b mode"),n.sdpSemantics="plan-b"),s.forceTurnRelay&&(n.iceTransportPolicy="relay"),n.bundlePolicy="max-bundle",va=It(va);const u=new qt(this,va,e,n,c,i,s);return this.peerConnections.set(u.id,u),u}_removePeerConnection(e){const n=e.id;return!!this.peerConnections.has(n)&&(this.peerConnections.delete(n),!0)}addLocalTrack(e){if(!e)throw new Error("track must not be null nor undefined");this.localTracks.push(e),e.conference=this.conference}getLocalVideoTrack(){const e=this.getLocalTracks(Rt);return e.length?e[0]:void 0}getLocalAudioTrack(){const e=this.getLocalTracks(Xe);return e.length?e[0]:void 0}getLocalEndpointId(){return this.conference.myUserId()}getLocalTracks(e){let n=this.localTracks.slice();return e!==void 0&&(n=n.filter(i=>i.getType()===e)),n}getRemoteTracks(e){let n=[];for(const i of this.peerConnections.values()){const s=i.getRemoteTracks(void 0,e);s&&(n=n.concat(s))}return n}setAudioMute(e){const n=[];return this.getLocalTracks(Xe).forEach(i=>{n.push(e?i.mute():i.unmute())}),Promise.all(n)}setVideoMute(e){const n=[];return this.getLocalTracks(Rt).concat(this.getLocalTracks(pn)).forEach(i=>{n.push(e?i.mute():i.unmute())}),Promise.all(n)}removeLocalTrack(e){const n=this.localTracks.indexOf(e);n!==-1&&this.localTracks.splice(n,1)}static attachMediaStream(e,n){return Rn.attachMediaStream(e,n)}static getStreamID(e){return Rn.getStreamID(e)}static getTrackID(e){return Rn.getTrackID(e)}static isDeviceListAvailable(){return Rn.isDeviceListAvailable()}static isDeviceChangeAvailable(e){return Rn.isDeviceChangeAvailable(e)}static isWebRtcSupported(){return E.isSupported()}static getAudioOutputDevice(){return Rn.getAudioOutputDevice()}static getCurrentlyAvailableMediaDevices(){return Rn.getCurrentlyAvailableMediaDevices()}static arePermissionsGrantedForAvailableDevices(){return Rn.arePermissionsGrantedForAvailableDevices()}static getEventDataForActiveDevice(e){return Rn.getEventDataForActiveDevice(e)}static setAudioOutputDevice(e){return Rn.setAudioOutputDevice(e)}static isUserStream(e){return Vn.isUserStreamById(Rn.getStreamID(e))}static isUserStreamById(e){return e&&e!=="mixedmslabel"&&e!=="default"}static enumerateDevices(e){Rn.enumerateDevices(e)}static stopMediaStream(e){Rn.stopMediaStream(e)}static isDesktopSharingEnabled(){return Rn.isDesktopSharingEnabled()}closeBridgeChannel(){this._channel&&(this._channel.close(),this._channel=null,this.removeListener(Mt().LASTN_ENDPOINT_CHANGED,this._lastNChangeListener))}setAudioLevel(e,n,i,s){const c=e.getTrackBySSRC(n);c&&(c.isAudioTrack()?(c.isLocal()!==s&&Xs.error(`${c} was expected to ${s?"be":"not be"} local`),c.setAudioLevel(i,e)):Xs.warn(`Received audio level for non-audio track: ${n}`))}sendChannelMessage(e,n){if(!this._channel)throw new Error("Channel support is disabled!");this._channel.sendMessage(e,n)}sendEndpointStatsMessage(e){this._channel&&this._channel.isOpen()&&this._channel.sendEndpointStatsMessage(e)}setLastN(e){this._lastN!==e&&(this._lastN=e,this._channel&&this._channel.isOpen()&&this._channel.sendSetLastNMessage(e),this.eventEmitter.emit(Mt().LASTN_VALUE_CHANGED,e))}isInLastN(e){return!this._lastNEndpoints||this._lastNEndpoints.indexOf(e)>-1}_updateAudioOutputForAudioTracks(e){const n=this.getRemoteTracks(Xe);for(const i of n)i.setAudioOutput(e)}}const Zs="cq.local_stats_updated",ws="cq.remote_stats_updated",fu=o(6125),mu=o(1122),gu=o(4188),vu=(0,P.getLogger)("modules/connectivity/ConnectionQuality.js"),sl=[{width:1920,height:1080,layers:3,target:"high",targetRN:4e6},{width:1280,height:720,layers:3,target:"high",targetRN:25e5},{width:960,height:540,layers:3,target:"standard",targetRN:9e5},{width:640,height:360,layers:2,target:"standard",targetRN:5e5},{width:480,height:270,layers:2,target:"low",targetRN:35e4},{width:320,height:180,layers:1,target:"low",targetRN:15e4}];let ol=800;class yu{constructor(e,n,i){var s;this.eventEmitter=n,this._conference=e,this._localStats={connectionQuality:100,jvbRTT:void 0},this._lastConnectionQualityUpdate=-1,this._options=i,this._remoteStats={},this._timeIceConnected=-1,this._timeVideoUnmuted=-1,((s=this._options.config)===null||s===void 0?void 0:s.startBitrate)>0&&(ol=this._options.config.startBitrate),e.on(De,()=>{this._updateLocalConnectionQuality(0),this.eventEmitter.emit(Zs,this._localStats),this._broadcastLocalStats()}),e.room.addListener(gu.ICE_CONNECTION_STATE_CHANGED,(c,u)=>{c.isP2P||u!=="connected"||(this._timeIceConnected=window.performance.now())}),e.on(Yt,(c,u)=>{u.type==="stats"&&this._updateRemoteStats(c.getId(),u.values)}),e.on(Gt,(c,u)=>{this._updateRemoteStats(c.getId(),u)}),e.on(Yt,(c,u)=>{u.type==="facial_expression"&&this.eventEmitter.emit(Ut,c.getId(),u)}),e.statistics.addConnectionStatsListener(this._updateLocalStats.bind(this)),e.on(Ot,c=>{c.isVideoTrack()&&(c.isMuted()?this._timeVideoUnmuted=-1:this._maybeUpdateUnmuteTime())}),e.on(et,c=>{c.isVideoTrack()&&!c.isMuted()&&this._maybeUpdateUnmuteTime()}),e.rtc.on(Or.LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED,c=>{this._localStats.maxEnabledResolution=c.maxEnabledResolution}),e.on(Le,c=>{this._localStats.serverRegion=c}),e.on(rr,c=>{this._localStats.bridgeCount=Number((c||{})["bridge-count"])})}_maybeUpdateUnmuteTime(){this._timeVideoUnmuted<0&&(this._timeVideoUnmuted=window.performance.now())}_calculateConnectionQuality(e,n,i){const s=fu[i];let c,u=100;if(this._localStats.packetLoss&&(c=this._localStats.packetLoss.upload,n&&(c*=.5)),n||!s||e===mu.DESKTOP||this._timeIceConnected<0||this._timeVideoUnmuted<0)c===void 0?(vu.error("Cannot calculate connection quality, unknown packet loss."),u=100):u=c<=2?100:c<=4?70:c<=6?50:c<=8?30:c<=12?10:0;else{const N=this._conference.getActivePeerConnection();if(N){var b,L;const X=N.isSimulcastOn(),de=N.getTargetVideoBitrates();de.codec=N.getConfiguredVideoCodec();const Ie=window.performance.now()-Math.max(this._timeVideoUnmuted,this._timeIceConnected),$e=(b=(L=this._options.config)===null||L===void 0?void 0:L.pcStatsInterval)!==null&&b!==void 0?b:1e4;let ut=function(ze,it,At,$t){let wn=0,Fn=Math.min(it.height,it.width),$n=sl.find(Zn=>Zn.height<=Fn);if($n&&ze&&$t.codec===ri().VP8)for(Fn=$n.height;Fn>=180;Fn/=2){const Zn=Fn;if($n=sl.find(si=>si.height===Zn),!$n)break;wn+=E.isReactNative()?$n.targetRN:$t[$n.target]}else $n&&(wn=E.isReactNative()?$n.targetRN:$t[$n.target]);return Math.min(wn/1e3,function(Zn){return Zn>6e4?Number.MAX_SAFE_INTEGER:ol*Math.pow(1.08,Zn/1e3)}(Math.max(0,At-1e3)))}(X,s,Ie,de);ut=Math.min(ut,2500),Ie>$e&&(u=100*this._localStats.bitrate.upload/ut)}c&&c>=10&&(u=Math.min(u,30))}if(this._lastConnectionQualityUpdate>0){const X=this._localStats.connectionQuality,de=(window.performance.now()-this._lastConnectionQualityUpdate)/1e3;u=Math.min(u,X+de*2)}return Math.min(100,u)}_updateLocalConnectionQuality(e){this._localStats.connectionQuality=e,this._lastConnectionQualityUpdate=window.performance.now()}_broadcastLocalStats(){const e={bitrate:this._localStats.bitrate,packetLoss:this._localStats.packetLoss,connectionQuality:this._localStats.connectionQuality,jvbRTT:this._localStats.jvbRTT,serverRegion:this._localStats.serverRegion,maxEnabledResolution:this._localStats.maxEnabledResolution,avgAudioLevels:this._localStats.localAvgAudioLevels};try{this._conference.sendEndpointStatsMessage(e)}catch(n){}}_updateLocalStats(e,n){if(!e.isP2P){const N=n.transport&&n.transport.length&&n.transport[0].rtt;this._localStats.jvbRTT=N||void 0}if(e!==this._conference.getActivePeerConnection())return;let i;const s=!this._conference.isConnectionInterrupted(),c=this._conference.getLocalVideoTrack(),u=c?c.videoType:void 0,b=!c||c.isMuted(),L=c?Math.min(c.resolution,c.maxEnabledResolution):null;for(i in b||this._maybeUpdateUnmuteTime(),n)n.hasOwnProperty(i)&&(this._localStats[i]=n[i]);s&&this._updateLocalConnectionQuality(this._calculateConnectionQuality(u,b,L)),this.eventEmitter.emit(Zs,this._localStats),this._broadcastLocalStats()}_updateRemoteStats(e,n){this._remoteStats[e]={bitrate:n.bitrate,packetLoss:n.packetLoss,connectionQuality:n.connectionQuality,jvbRTT:n.jvbRTT,serverRegion:n.serverRegion,maxEnabledResolution:n.maxEnabledResolution,avgAudioLevels:n.avgAudioLevels},this.eventEmitter.emit(ws,e,this._remoteStats[e])}getStats(){return this._localStats}}const qi=(0,P.getLogger)("modules/connectivity/IceFailedHandling.js");class _u{constructor(e){this._conference=e}_actOnIceFailed(){const{enableForcedReload:e,enableIceRestart:n}=this._conference.options.config,i=n!==void 0&&!n,s=this._conference.room.supportsRestartByTerminate(),c=s&&!n;if(qi.info(`ICE failed, enableForcedReload: ${e}, enableIceRestart: ${n}, supports restart by terminate: ${s}`),i||!n&&!s||e){qi.info("ICE failed, but ICE restarts are disabled");const L=e?C:xe;return void this._conference.eventEmitter.emit(Re,L)}const u=this._conference.jvbJingleSession,b=u&&u.getIceConnectionState();u?b==="connected"?qi.info("ICE connection restored - not sending ICE failed"):(qi.info(`Sending ICE failed - the connection did not recover, ICE state: ${b}, use 'session-terminate': ${c}`),c?this._conference.jvbJingleSession.terminate(()=>{qi.info("session-terminate for ice restart - done")},L=>{qi.error(`session-terminate for ice restart - error: ${L.message}`)},{reason:"connectivity-error",reasonDescription:"ICE FAILED",requestRestart:!0,sendSessionTerminate:!0}):this._conference.jvbJingleSession.sendIceFailedNotification()):qi.warn("Not sending ICE failed - no JVB connection")}start(){this._conference.xmpp.ping(65e3).then(()=>{this._canceled||(this._iceFailedTimeout=window.setTimeout(()=>{this._iceFailedTimeout=void 0,this._actOnIceFailed()},2e3))},e=>{qi.error("PING error/timeout - not sending ICE failed",e)})}cancel(){this._canceled=!0,window.clearTimeout(this._iceFailedTimeout)}}const Co="detector_state_change",_a="audio_input_state_changed",Aa="no_audio_input_detected",Ea="detection.vad_noise_device",Au="vad-report-published",To="detection.vad_score_published",Sa="detection.vad_talk_while_muted";class Eu extends on(){constructor(e){super(),this._conference=e,this._timeoutTrigger=null,this._hasAudioInput=null,E.supportsReceiverStats()||e.statistics.addAudioLevelListener(this._audioLevel.bind(this)),e.on(et,this._trackAdded.bind(this))}_clearTriggerTimeout(){clearTimeout(this._timeoutTrigger),this._timeoutTrigger=null}_handleAudioInputStateChange(e){const n=e!==0;this._hasAudioInput!==null&&this._hasAudioInput===n||(this._hasAudioInput=n,this.emit(_a,this._hasAudioInput))}_handleNoAudioInputDetection(e){this._eventFired||(e!==0||this._timeoutTrigger?e!==0&&this._timeoutTrigger&&this._clearTriggerTimeout():this._timeoutTrigger=setTimeout(()=>{this._eventFired=!0,this.emit(Aa)},4e3))}_audioLevel(e,n,i,s){if(!s||!this._audioTrack)return;const c=e.localSSRCs.get(this._audioTrack.rtcId);c&&c.ssrcs.includes(n)&&(this._handleAudioInputStateChange(i),this._handleNoAudioInputDetection(i))}_trackAdded(e){e.isLocalAudioTrack()&&(this._audioTrack=e,this._eventFired=!1,this._clearTriggerTimeout(),E.supportsReceiverStats()&&(e.on(Zr,n=>{this._handleNoAudioInputDetection(n)}),e.on(Oi,n=>{this._handleNoAudioInputDetection(n),this._handleAudioInputStateChange(n)})))}}class Su{constructor(e){this.conference=e,e.addEventListener(We,this._audioLevel.bind(this)),this.myUserID=this.conference.myUserId()}_audioLevel(e,n){!this.conference.isP2PActive()||n<=.6||e===this.myUserID&&this.conference.getLocalAudioTrack().isMuted()||this.conference.rtc.eventEmitter.emit(Mt().DOMINANT_SPEAKER_CHANGED,e)}}function al(r){const e=window.AudioContext||window.webkitAudioContext;if(e)return new e(r)}class Ro extends on(){constructor(e,n,i){super(),this._procNodeSampleRate=e,this._vadProcessor=n,this._localTrack=i,this._bufferResidue=new Float32Array([]),this._audioContext=al({sampleRate:n.getRequiredPCMFrequency()}),this._vadSampleSize=n.getSampleLength(),this._onAudioProcess=this._onAudioProcess.bind(this),this._initializeAudioContext()}static create(e,n,i){return Vn.obtainAudioAndVideoPermissions({devices:["audio"],micDeviceId:e}).then(s=>{if(!s[0])throw new Error(`Failed to create jitsi local track for device id: ${e}`);return new Ro(n,i,s[0])})}_initializeAudioContext(){this._audioSource=this._audioContext.createMediaStreamSource(this._localTrack.stream),this._audioProcessingNode=this._audioContext.createScriptProcessor(this._procNodeSampleRate,1,1)}_onAudioProcess(e){const n=e.inputBuffer.getChannelData(0),i=[...this._bufferResidue,...n],s=Date.now();let c=0;for(;c+this._vadSampleSize<i.length;c+=this._vadSampleSize){const u=i.slice(c,c+this._vadSampleSize),b=this._vadProcessor.calculateAudioFrameVAD(u.slice());this.emit(To,{timestamp:s,score:b,pcmData:u,deviceId:this._localTrack.getDeviceId()})}this._bufferResidue=i.slice(c,i.length)}_connectAudioGraph(){this._audioProcessingNode.onaudioprocess=this._onAudioProcess,this._audioSource.connect(this._audioProcessingNode),this._audioProcessingNode.connect(this._audioContext.destination)}_disconnectAudioGraph(){this._audioProcessingNode.onaudioprocess=()=>{},this._audioProcessingNode.disconnect(),this._audioSource.disconnect()}_cleanupResources(){this._disconnectAudioGraph(),this._localTrack.stopStream()}getDeviceId(){return this._localTrack.getDeviceId()}getTrackLabel(){return this._localTrack.getDeviceLabel()}start(){this._connectAudioGraph()}stop(){this._disconnectAudioGraph(),this._bufferResidue=[]}destroy(){this._destroyed||(this._cleanupResources(),this._destroyed=!0)}}const ba=(0,P.getLogger)("modules/detection/VADAudioAnalyser.js");class cl extends yn.EventEmitter{constructor(e,n){super(),this._createVADProcessor=n,this._vadEmitter=null,this._isVADEmitterRunning=!1,this._detectionServices=[],this._vadInitTracker=Promise.resolve(),this._processVADScore=this._processVADScore.bind(this),e.on(et,this._trackAdded.bind(this)),e.on(_t,this._trackRemoved.bind(this)),e.on(Ot,this._trackMuteChanged.bind(this))}addVADDetectionService(e){this._detectionServices.push(e),e.on(Co,()=>{!this._detectionServices.filter(n=>n.isActive()===!0).length&&this._isVADEmitterRunning?this._stopVADEmitter():this._isVADEmitterRunning||this._startVADEmitter()})}_startVADEmitter(){this._vadEmitter&&(this._vadEmitter.on(To,this._processVADScore),this._vadEmitter.start(),this._isVADEmitterRunning=!0)}_stopVADEmitter(){this._vadEmitter&&(this._vadEmitter.removeListener(To,this._processVADScore),this._vadEmitter.stop()),this._isVADEmitterRunning=!1}_processVADScore(e){for(const n of this._detectionServices)n.processVADScore(e)}_changeDetectorsMuteState(e){for(const n of this._detectionServices)n.changeMuteState(e)}_trackAdded(e){e.isLocalAudioTrack()&&(this._vadInitTracker=this._vadInitTracker.then(()=>this._createVADProcessor()).then(n=>Ro.create(e.getDeviceId(),4096,n)).then(n=>{ba.debug("Created VAD emitter for track: ",e.getTrackLabel()),this._vadEmitter=n,this._changeDetectorsMuteState(e.isMuted())}).catch(n=>{ba.warn("Failed to start VADAudioAnalyser",n)}))}_trackMuteChanged(e){e.isLocalAudioTrack()&&(this._vadInitTracker=this._vadInitTracker.then(()=>{this._changeDetectorsMuteState(e.isMuted())}))}_trackRemoved(e){e.isLocalAudioTrack()&&(this._vadInitTracker=this._vadInitTracker.then(()=>{ba.debug("Removing track from VAD detection - ",e.getTrackLabel()),this._vadEmitter&&(this._stopVADEmitter(),this._vadEmitter.destroy(),this._vadEmitter=null);for(const n of this._detectionServices)n.reset()}))}}class bu extends yn.EventEmitter{constructor(){super(),this._processing=!1,this._scoreArray=[],this._audioLvlArray=[],this._active=!1,this._calculateNoisyScore=this._calculateNoisyScore.bind(this)}_calculateNoisyScore(){const e=kt(this._scoreArray),n=kt(this._audioLvlArray);e<.2&&n>.04&&(this.emit(Ea),this._setActiveState(!1)),this.reset()}_recordValues(e,n){this._scoreArray.push(e),this._audioLvlArray.push(n)}_setActiveState(e){this._active=e,this.emit(Co,this._active)}changeMuteState(e){this._setActiveState(!e),this.reset()}isActive(){return this._active}reset(){this._processing=!1,this._scoreArray=[],this._audioLvlArray=[],clearTimeout(this._processTimeout)}processVADScore(e){if(this._active){if(this._processing){const n=Nt(e.pcmData);this._recordValues(e.score,kt(n))}else if(e.score<.2){const n=kt(Nt(e.pcmData));n>.02&&(this._processing=!0,this._recordValues(e.score,n),this._processTimeout=setTimeout(this._calculateNoisyScore,1500))}}}}class Cu extends yn.EventEmitter{constructor(){super(),this._processing=!1,this._scoreArray=[],this._active=!1,this._calculateVADScore=this._calculateVADScore.bind(this)}_calculateVADScore(){kt(this._scoreArray)>.6&&(this.emit(Sa),this._setActiveState(!1)),this.reset()}_setActiveState(e){this._active=e,this.emit(Co,this._active)}changeMuteState(e){this._setActiveState(e),this.reset()}isActive(){return this._active}processVADScore(e){this._active&&(this._processing?this._scoreArray.push(e.score):e.score>.9&&(this._processing=!0,this._scoreArray.push(e.score),this._processTimeout=setTimeout(this._calculateVADScore,700)))}reset(){this._processing=!1,this._scoreArray=[],clearTimeout(this._processTimeout)}}const ll="e2eping.e2e_rtt_changed",wo=(0,P.getLogger)("modules/e2eping/e2eping.js"),dl="e2e-ping-request",ul="e2e-ping-response";class Tu{constructor(e,n){this.participant=e,this.e2eping=n,this.id=e.getId(),this.requests={},this.lastRequestId=1,this.clearIntervals=this.clearIntervals.bind(this),this.sendRequest=this.sendRequest.bind(this),this.handleResponse=this.handleResponse.bind(this),this.maybeSendAnalytics=this.maybeSendAnalytics.bind(this),this.sendAnalytics=this.sendAnalytics.bind(this),n.isDataChannelOpen&&this.sendRequest(),this.pingInterval=window.setInterval(this.sendRequest,n.pingIntervalMs),this.analyticsInterval=window.setTimeout(this.maybeSendAnalytics,this.e2eping.analyticsIntervalMs)}clearIntervals(){this.pingInterval&&window.clearInterval(this.pingInterval),this.analyticsInterval&&window.clearInterval(this.analyticsInterval)}sendRequest(){const e=this.lastRequestId++,n={type:dl,id:e};this.e2eping.sendMessage(n,this.id),this.requests[e]={id:e,timeSent:window.performance.now()}}handleResponse(e){const n=this.requests[e.id];n&&(n.rtt=window.performance.now()-n.timeSent,this.e2eping.eventEmitter.emit(ll,this.participant,n.rtt)),this.maybeSendAnalytics()}maybeSendAnalytics(){const e=window.performance.now();let n,i,s=1/0;for(i in this.requests)this.requests.hasOwnProperty(i)&&(n=this.requests[i],n.timeSent<e-this.e2eping.analyticsIntervalMs?delete this.requests[i]:n.rtt&&(s=Math.min(s,n.rtt)));s<1/0&&this.sendAnalytics(s)}sendAnalytics(e){Be.sendAnalytics(function(n,i,s){return{attributes:{participant_id:n,region:i,rtt:s},name:"e2e_rtt",type:ar}}(this.id,this.participant.getProperty("region"),e))}}class Ru{constructor(e,n,i){this.conference=e,this.eventEmitter=e.eventEmitter,this.sendMessage=i,this.pingIntervalMs=1e4,this.analyticsIntervalMs=6e4,this.participants={},this.isDataChannelOpen=!1,n&&n.e2eping&&(typeof n.e2eping.pingInterval=="number"&&(this.pingIntervalMs=n.e2eping.pingInterval),typeof n.e2eping.analyticsInterval=="number"&&(this.analyticsIntervalMs=n.e2eping.analyticsInterval),this.analyticsIntervalMs>0&&this.analyticsIntervalMs<this.pingIntervalMs&&(this.analyticsIntervalMs=this.pingIntervalMs)),wo.info(`Initializing e2e ping; pingInterval=${this.pingIntervalMs}, analyticsInterval=${this.analyticsIntervalMs}.`),this.participantJoined=this.participantJoined.bind(this),e.on(nn,this.participantJoined),this.participantLeft=this.participantLeft.bind(this),e.on(In,this.participantLeft),this.messageReceived=this.messageReceived.bind(this),e.on(Yt,this.messageReceived),this.dataChannelOpened=this.dataChannelOpened.bind(this),e.on(jt,this.dataChannelOpened)}dataChannelOpened(){this.isDataChannelOpen=!0;for(const e in this.participants)if(this.participants.hasOwnProperty(e)){const n=this.participants[e];window.setTimeout(n.sendRequest,200)}}messageReceived(e,n){n.type===dl?this.handleRequest(e.getId(),n):n.type===ul&&this.handleResponse(e.getId(),n)}participantJoined(e,n){this.pingIntervalMs<=0||(this.participants[e]&&(wo.info(`Participant wrapper already exists for ${e}. Clearing.`),this.participants[e].clearIntervals(),delete this.participants[e]),this.participants[e]=new Tu(n,this))}participantLeft(e){this.pingIntervalMs<=0||this.participants[e]&&(this.participants[e].clearIntervals(),delete this.participants[e])}handleRequest(e,n){if(n&&n.id){const i={type:ul,id:n.id};this.sendMessage(i,e)}else wo.info(`Received an invalid e2e ping request from ${e}.`)}handleResponse(e,n){const i=this.participants[e];i&&i.handleResponse(n)}stop(){wo.info("Stopping e2eping"),this.conference.off(nn,this.participantJoined),this.conference.off(In,this.participantLeft),this.conference.off(Yt,this.messageReceived),this.conference.off(jt,this.dataChannelOpened);for(const e in this.participants)this.participants.hasOwnProperty(e)&&this.participants[e].clearIntervals();this.participants={}}}const wu=(0,P.getLogger)("modules/event/Jvb121EventGenerator.js");class Iu{constructor(e){this._conference=e,this._jvb121=!0,this._conference.addEventListener(nn,()=>this.evaluateStatus()),this._conference.addEventListener(In,()=>this.evaluateStatus()),this._conference.addEventListener(tn,()=>this.evaluateStatus())}evaluateStatus(){const e=this._jvb121,n=!this._conference.isP2PActive()&&this._conference.getParticipantCount()<=2;e!==n&&(this._jvb121=n,wu.debug(`JVB121 status ${e} => ${n}`),this._conference.eventEmitter.emit(Bt,e,n))}}const Io=(0,P.getLogger)("modules/qualitycontrol/ReceiveVideoController.js");class hl{constructor(){this._defaultConstraints={maxHeight:180},this._lastN=-1,this._maxFrameHeight=2160,this._selectedEndpoints=[],this._receiverVideoConstraints={constraints:{},defaultConstraints:this.defaultConstraints,lastN:this._lastN,onStageEndpoints:[],selectedEndpoints:this._selectedEndpoints}}get constraints(){return this._receiverVideoConstraints.lastN=this._lastN,this._selectedEndpoints.length?(this._receiverVideoConstraints.constraints={},this._selectedEndpoints.length>1?(this._receiverVideoConstraints.defaultConstraints={maxHeight:this._maxFrameHeight},this._receiverVideoConstraints.onStageEndpoints=[],this._receiverVideoConstraints.selectedEndpoints=[]):(this._receiverVideoConstraints.constraints[this._selectedEndpoints[0]]={maxHeight:this._maxFrameHeight},this._receiverVideoConstraints.defaultConstraints=this._defaultConstraints,this._receiverVideoConstraints.onStageEndpoints=this._selectedEndpoints,this._receiverVideoConstraints.selectedEndpoints=[]),this._receiverVideoConstraints):this._receiverVideoConstraints}updateLastN(e){const n=this._lastN!==e;return n&&(this._lastN=e,Io.debug(`Updating ReceiverVideoConstraints lastN(${e})`)),n}updateReceiveResolution(e){const n=this._maxFrameHeight!==e;return n&&(this._maxFrameHeight=e,Io.debug(`Updating receive maxFrameHeight: ${e}`)),n}updateReceiverVideoConstraints(e){const n=!jn()(this._receiverVideoConstraints,e);return n&&(this._receiverVideoConstraints=e,Io.debug(`Updating ReceiverVideoConstraints ${JSON.stringify(e)}`)),n}updateSelectedEndpoints(e){Io.debug(`Updating selected endpoints: ${JSON.stringify(e)}`),this._selectedEndpoints=e}}class Pu{constructor(e,n){var i,s;this._conference=e,this._rtc=n;const{config:c}=e.options;this._lastN=(i=c==null?void 0:c.startLastN)!==null&&i!==void 0?i:(c==null?void 0:c.channelLastN)||-1,this._maxFrameHeight=2160,(s=c==null?void 0:c.useNewBandwidthAllocationStrategy)===null||s===void 0||s?(this._receiverVideoConstraints=new hl,this._receiverVideoConstraints.updateLastN(this._lastN)&&this._rtc.setNewReceiverVideoConstraints(this._receiverVideoConstraints.constraints)):this._rtc.setLastN(this._lastN),this._selectedEndpoints=[],this._conference.on(me,u=>this._onMediaSessionStarted(u))}_onMediaSessionStarted(e){e.isP2P||!this._receiverVideoConstraints?e.setReceiverVideoConstraint(this._maxFrameHeight):(this._receiverVideoConstraints.updateReceiveResolution(this._maxFrameHeight),this._rtc.setNewReceiverVideoConstraints(this._receiverVideoConstraints.constraints))}getLastN(){return this._lastN}selectEndpoints(e){if(this._selectedEndpoints=e,this._receiverVideoConstraints){const n=e.filter(c=>c!==this._conference.myUserId()),i=JSON.parse(JSON.stringify(this._receiverVideoConstraints.constraints));n.length&&this._receiverVideoConstraints.updateSelectedEndpoints(n);const s=this._receiverVideoConstraints.constraints;jn()(s,i)||this._rtc.setNewReceiverVideoConstraints(s)}else this._rtc.selectEndpoints(e)}setLastN(e){if(this._lastN!==e){if(this._lastN=e,this._receiverVideoConstraints)return void(this._receiverVideoConstraints.updateLastN(e)&&this._rtc.setNewReceiverVideoConstraints(this._receiverVideoConstraints.constraints));this._rtc.setLastN(e)}}setPreferredReceiveMaxFrameHeight(e){this._maxFrameHeight=e;for(const n of this._conference._getMediaSessions())n.isP2P||!this._receiverVideoConstraints?e&&n.setReceiverVideoConstraint(e):this._receiverVideoConstraints.updateReceiveResolution(e)&&this._rtc.setNewReceiverVideoConstraints(this._receiverVideoConstraints.constraints)}setReceiverConstraints(e){this._receiverVideoConstraints||(this._receiverVideoConstraints=new hl);const n=Object.keys(e).includes("onStageEndpoints","selectedEndpoints"),i=Object.keys(e).includes("onStageSources","selectedSources");if(!Mr.isSourceNameSignalingEnabled()&&i)throw new Error('"onStageSources" and "selectedSources" are not supported when sourceNameSignaling is disabled.');if(Mr.isSourceNameSignalingEnabled()&&n)throw new Error('"onStageEndpoints" and "selectedEndpoints" are not supported when sourceNameSignaling is enabled.');if(this._receiverVideoConstraints.updateReceiverVideoConstraints(e)){var s,c;this._lastN=(s=e.lastN)!==null&&s!==void 0?s:this._lastN,this._selectedEndpoints=(c=e.selectedEndpoints)!==null&&c!==void 0?c:this._selectedEndpoints,this._rtc.setNewReceiverVideoConstraints(e);const L=this._conference._getMediaSessions().find(N=>N.isP2P);if(L){var u;let N=(u=Object.values(e.constraints)[0])===null||u===void 0?void 0:u.maxHeight;var b;N||(N=(b=e.defaultConstraints)===null||b===void 0?void 0:b.maxHeight),N&&L.setReceiverVideoConstraint(N)}}}}class Ou{constructor(e,n){var i,s,c;this.conference=e,this.layerSuspensionEnabled=(i=(s=e.options)===null||s===void 0||(c=s.config)===null||c===void 0?void 0:c.enableLayerSuspension)===null||i===void 0||i,this.rtc=n,this.conference.on(me,u=>this._onMediaSessionStarted(u)),this.conference.on(k,()=>this._propagateSendMaxFrameHeight()),this.rtc.on(Mt().SENDER_VIDEO_CONSTRAINTS_CHANGED,u=>{var b;((b=this._senderVideoConstraints)===null||b===void 0?void 0:b.idealHeight)!==u.idealHeight&&(this._senderVideoConstraints=u,this._propagateSendMaxFrameHeight())})}_onMediaSessionStarted(e){e.addListener(Dc,n=>{n===this.conference._getActiveMediaSession()&&this._propagateSendMaxFrameHeight()})}_propagateSendMaxFrameHeight(){const e=this.selectSendMaxFrameHeight(),n=[];if(e>=0)for(const i of this.conference._getMediaSessions())n.push(i.setSenderVideoConstraint(e));return Promise.all(n)}selectSendMaxFrameHeight(){var e;const n=this.conference._getActiveMediaSession(),i=n?n.isP2P?n.getRemoteRecvMaxFrameHeight():this.layerSuspensionEnabled?(e=this._senderVideoConstraints)===null||e===void 0?void 0:e.idealHeight:void 0:void 0;return this.preferredSendMaxFrameHeight>=0&&i>=0?Math.min(this.preferredSendMaxFrameHeight,i):i>=0?i:this.preferredSendMaxFrameHeight}setPreferredSendMaxFrameHeight(e){return this.preferredSendMaxFrameHeight=e,this._propagateSendMaxFrameHeight()}}const Po={getFocusRecordingUpdate(r){const e=r&&r.getElementsByTagName("jibri-recording-status")[0];if(e)return{error:e.getAttribute("failure_reason"),initiator:e.getAttribute("initiator"),recordingMode:e.getAttribute("recording_mode"),sessionID:e.getAttribute("session_id"),status:e.getAttribute("status")}},getHiddenDomainUpdate(r){const e=r.getElementsByTagName("live-stream-view-url")[0],n=e&&e.textContent,i=r.getElementsByTagName("mode")[0],s=i&&i.textContent&&i.textContent.toLowerCase(),c=r.getElementsByTagName("session_id")[0];return{liveStreamViewURL:n,mode:s,sessionID:c&&c.textContent}},getSessionIdFromIq(r){const e=r&&r.getElementsByTagName("jibri")[0];return e&&e.getAttribute("session_id")},getSessionId(r){const e=r.getElementsByTagName("session_id")[0];return e&&e.textContent},isFromFocus:r=>r.getAttribute("from").includes("focus")};class pl{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._connection=e.connection,this._mode=e.mode,this._setSessionID(e.sessionID),this.setStatus(e.status)}getError(){return this._error}getID(){return this._sessionID}getInitiator(){return this._initiator}getLiveStreamViewURL(){return this._liveStreamViewURL}getStatus(){return this._status}getTerminator(){return this._terminator}getMode(){return this._mode}setError(e){this._error=e}setLiveStreamViewURL(e){this._liveStreamViewURL=e}setStatus(e){this._status=e}setInitiator(e){this._initiator=e}setTerminator(e){this._terminator=e}start(e){let{appData:n,broadcastId:i,focusMucJid:s,streamId:c}=e;return new Promise((u,b)=>{this._connection.sendIQ(this._createIQ({action:"start",appData:n,focusMucJid:s,broadcastId:i,streamId:c}),L=>{this.setStatus("pending"),this._setSessionID(Po.getSessionIdFromIq(L)),u()},L=>{this._setErrorFromIq(L),b(L)})})}stop(e){let{focusMucJid:n}=e;return new Promise((i,s)=>{this._connection.sendIQ(this._createIQ({action:"stop",focusMucJid:n}),i,s)})}_createIQ(e){let{action:n,appData:i,broadcastId:s,focusMucJid:c,streamId:u}=e;return(0,qe.$iq)({to:c,type:"set"}).c("jibri",{xmlns:"http://jitsi.org/protocol/jibri",action:n,app_data:i,recording_mode:this._mode,streamid:u,you_tube_broadcast_id:s}).up()}_setErrorFromIq(e){const n=e.getElementsByTagName("error")[0];this.setError(n.children[0].tagName)}_setSessionID(e){this._sessionID=e}}const Ca=(0,P.getLogger)("modules/recording/RecordingManager.js"),Du=(0,P.getLogger)("modules/statistics/AudioOutputProblemDetector.js");class Mu{constructor(e){this._conference=e,this._localAudioLevelCache={},this._reportedParticipants=[],this._audioProblemCandidates={},this._numberOfRemoteAudioLevelsReceived={},this._onLocalAudioLevelsReport=this._onLocalAudioLevelsReport.bind(this),this._onRemoteAudioLevelReceived=this._onRemoteAudioLevelReceived.bind(this),this._clearUserData=this._clearUserData.bind(this),this._conference.on(ws,this._onRemoteAudioLevelReceived),this._conference.statistics.addConnectionStatsListener(this._onLocalAudioLevelsReport),this._conference.on(In,this._clearUserData)}_onRemoteAudioLevelReceived(e,n){let{avgAudioLevels:i}=n;const s=this._numberOfRemoteAudioLevelsReceived[e]+1||0;if(this._numberOfRemoteAudioLevelsReceived[e]=s,this._reportedParticipants.indexOf(e)!==-1||e in this._audioProblemCandidates||i<=0||s<3)return;const c=this._conference.getParticipantById(e);if(c&&c.getTracksByMediaType(Xe).length>0&&c.isAudioMuted())return;const u=this._localAudioLevelCache[e];Array.isArray(u)&&!u.every(b=>b===0)||(this._audioProblemCandidates[e]={remoteAudioLevels:i,localAudioLevels:[]})}_onLocalAudioLevelsReport(e,n){let{avgAudioLevels:i}=n;e===this._conference.getActivePeerConnection()&&(Object.keys(i).forEach(s=>{if(this._reportedParticipants.indexOf(s)!==-1)return;const c=this._localAudioLevelCache[s];Array.isArray(c)?c.length>=2&&c.shift():this._localAudioLevelCache[s]=[],this._localAudioLevelCache[s].push(i[s])}),Object.keys(this._audioProblemCandidates).forEach(s=>{const{localAudioLevels:c,remoteAudioLevels:u}=this._audioProblemCandidates[s];if(c.push(i[s]),c.length===2){if(c.every(b=>b===void 0||b===0)){const b=JSON.stringify(c);Be.sendAnalytics(function(L,N,X){return{type:ar,action:"audio.output.problem",attributes:{userID:L,localAudioLevels:N,remoteAudioLevels:X}}}(s,b,u)),Du.warn(`A potential problem is detected with the audio output for participant ${s}, local audio levels: ${b}, remote audio levels: ${u}`),this._reportedParticipants.push(s),this._clearUserData(s)}delete this._audioProblemCandidates[s]}}))}_clearUserData(e){delete this._localAudioLevelCache[e]}dispose(){this._conference.off(ws,this._onRemoteAudioLevelReceived),this._conference.off(In,this._clearUserData),this._conference.statistics.removeConnectionStatsListener(this._onLocalAudioLevelsReport),this._localAudioLevelCache=void 0,this._audioProblemCandidates=void 0,this._reportedParticipants=void 0,this._numberOfRemoteAudioLevelsReceived=void 0,this._conference=void 0}}const ci=(0,P.getLogger)("modules/statistics/AvgRTPStatsReporter.js");class wr{constructor(e){this.name=e,this.count=0,this.sum=0,this.samples=[]}addNext(e){typeof e!="number"?ci.error(`${this.name} - invalid value for idx: ${this.count}`,e):isNaN(e)||(this.sum+=e,this.samples.push(e),this.count+=1)}calculate(){return this.sum/this.count}appendReport(e){e[`${this.name}_avg`]=this.calculate(),e[`${this.name}_samples`]=JSON.stringify(this.samples)}reset(){this.samples=[],this.sum=0,this.count=0}}class fl{constructor(e,n,i){this.isP2P=n,this._n=i,this._sampleIdx=0,this._avgRTT=new wr("rtt"),this._avgRemoteRTTMap=new Map,this._avgRtpStatsReporter=e,this._avgEnd2EndRTT=void 0,this._onConnectionStats=(c,u)=>{this.isP2P===c.isP2P&&this._calculateAvgStats(u)};const s=e._conference;s.statistics.addConnectionStatsListener(this._onConnectionStats),this.isP2P||(this._onUserLeft=c=>this._avgRemoteRTTMap.delete(c),s.on(In,this._onUserLeft),this._onRemoteStatsUpdated=(c,u)=>this._processRemoteStats(c,u),s.on(ws,this._onRemoteStatsUpdated))}_calculateAvgStats(e){if(e){if(E.supportsRTTStatistics()&&e.transport&&e.transport.length&&this._avgRTT.addNext(e.transport[0].rtt),this._sampleIdx+=1,this._sampleIdx>=this._n){if(E.supportsRTTStatistics()){const n=this._avgRtpStatsReporter._conference,i={p2p:this.isP2P,conference_size:n.getParticipantCount()};if(e.transport&&e.transport.length&&Object.assign(i,{local_candidate_type:e.transport[0].localCandidateType,remote_candidate_type:e.transport[0].remoteCandidateType,transport_type:e.transport[0].type}),this._avgRTT.appendReport(i),this.isP2P){const s=this._avgRtpStatsReporter.jvbStatsMonitor._avgEnd2EndRTT;isNaN(s)||(i.rtt_diff=this._avgRTT.calculate()-s)}else{const s=this._calculateAvgRemoteRTT(),c=this._avgRTT.calculate();this._avgEnd2EndRTT=c+s,isNaN(c)||isNaN(s)||(i.end2end_rtt_avg=this._avgEnd2EndRTT)}Be.sendAnalytics(ss(i))}this._resetAvgStats()}}else ci.error("No stats")}_calculateAvgRemoteRTT(){let e=0,n=0;for(const i of this._avgRemoteRTTMap.values()){const s=i.calculate();isNaN(s)||(n+=s,e+=1,i.reset())}return n/e}_processRemoteStats(e,n){const i=typeof n.jvbRTT=="number";let s=this._avgRemoteRTTMap.get(e);!s&&i&&(s=new wr(`${e}_stat_rtt`),this._avgRemoteRTTMap.set(e,s)),i?s.addNext(n.jvbRTT):s&&this._avgRemoteRTTMap.delete(e)}_resetAvgStats(){this._avgRTT.reset(),this._avgRemoteRTTMap&&this._avgRemoteRTTMap.clear(),this._sampleIdx=0}dispose(){const e=this._avgRtpStatsReporter._conference;e.statistics.removeConnectionStatsListener(this._onConnectionStats),this.isP2P||(e.off(ws,this._onRemoteStatsUpdated),e.off(In,this._onUserLeft))}}class Nu{constructor(e,n){this._n=n,n>0?(ci.info(`Avg RTP stats will be calculated every ${n} samples`),this._sampleIdx=0,this._conference=e,this._avgAudioBitrateUp=new wr("bitrate_audio_upload"),this._avgAudioBitrateDown=new wr("bitrate_audio_download"),this._avgVideoBitrateUp=new wr("bitrate_video_upload"),this._avgVideoBitrateDown=new wr("bitrate_video_download"),this._avgBandwidthUp=new wr("bandwidth_upload"),this._avgBandwidthDown=new wr("bandwidth_download"),this._avgPacketLossTotal=new wr("packet_loss_total"),this._avgPacketLossUp=new wr("packet_loss_upload"),this._avgPacketLossDown=new wr("packet_loss_download"),this._avgRemoteFPS=new wr("framerate_remote"),this._avgRemoteScreenFPS=new wr("framerate_screen_remote"),this._avgLocalFPS=new wr("framerate_local"),this._avgLocalScreenFPS=new wr("framerate_screen_local"),this._avgRemoteCameraPixels=new wr("pixels_remote"),this._avgRemoteScreenPixels=new wr("pixels_screen_remote"),this._avgLocalCameraPixels=new wr("pixels_local"),this._avgLocalScreenPixels=new wr("pixels_screen_local"),this._avgCQ=new wr("connection_quality"),this._cachedTransportStats=void 0,this._onLocalStatsUpdated=i=>{this._calculateAvgStats(i),this._maybeSendTransportAnalyticsEvent(i)},e.on(Zs,this._onLocalStatsUpdated),this._onP2PStatusChanged=()=>{ci.debug("Resetting average stats calculation"),this._resetAvgStats(),this.jvbStatsMonitor._resetAvgStats(),this.p2pStatsMonitor._resetAvgStats()},e.on(tn,this._onP2PStatusChanged),this._onJvb121StatusChanged=(i,s)=>{s===!0&&(ci.info("Resetting JVB avg RTP stats"),this._resetAvgJvbStats())},e.on(Bt,this._onJvb121StatusChanged),this.jvbStatsMonitor=new fl(this,!1,n),this.p2pStatsMonitor=new fl(this,!0,n)):ci.info("Avg RTP stats reports are disabled.")}_calculateAvgStats(e){if(!e)return void ci.error("No stats");const n=this._conference.isP2PActive(),i=this._conference.getParticipantCount();if(!n&&i<2)return;const s=e.bitrate,c=e.bandwidth,u=e.packetLoss,b=e.framerate,L=e.resolution;if(s)if(c)if(u)if(b)if(L){if(this._avgAudioBitrateUp.addNext(s.audio.upload),this._avgAudioBitrateDown.addNext(s.audio.download),this._avgVideoBitrateUp.addNext(s.video.upload),this._avgVideoBitrateDown.addNext(s.video.download),E.supportsBandwidthStatistics()&&(this._avgBandwidthUp.addNext(c.upload),this._avgBandwidthDown.addNext(c.download)),this._avgPacketLossUp.addNext(u.upload),this._avgPacketLossDown.addNext(u.download),this._avgPacketLossTotal.addNext(u.total),this._avgCQ.addNext(e.connectionQuality),b&&(this._avgRemoteFPS.addNext(this._calculateAvgVideoFps(b,!1,Ht.CAMERA)),this._avgRemoteScreenFPS.addNext(this._calculateAvgVideoFps(b,!1,Ht.DESKTOP)),this._avgLocalFPS.addNext(this._calculateAvgVideoFps(b,!0,Ht.CAMERA)),this._avgLocalScreenFPS.addNext(this._calculateAvgVideoFps(b,!0,Ht.DESKTOP))),L&&(this._avgRemoteCameraPixels.addNext(this._calculateAvgVideoPixels(L,!1,Ht.CAMERA)),this._avgRemoteScreenPixels.addNext(this._calculateAvgVideoPixels(L,!1,Ht.DESKTOP)),this._avgLocalCameraPixels.addNext(this._calculateAvgVideoPixels(L,!0,Ht.CAMERA)),this._avgLocalScreenPixels.addNext(this._calculateAvgVideoPixels(L,!0,Ht.DESKTOP))),this._sampleIdx+=1,this._sampleIdx>=this._n){const N={p2p:n,conference_size:i};e.transport&&e.transport.length&&Object.assign(N,{local_candidate_type:e.transport[0].localCandidateType,remote_candidate_type:e.transport[0].remoteCandidateType,transport_type:e.transport[0].type}),this._avgAudioBitrateUp.appendReport(N),this._avgAudioBitrateDown.appendReport(N),this._avgVideoBitrateUp.appendReport(N),this._avgVideoBitrateDown.appendReport(N),E.supportsBandwidthStatistics()&&(this._avgBandwidthUp.appendReport(N),this._avgBandwidthDown.appendReport(N)),this._avgPacketLossUp.appendReport(N),this._avgPacketLossDown.appendReport(N),this._avgPacketLossTotal.appendReport(N),this._avgRemoteFPS.appendReport(N),isNaN(this._avgRemoteScreenFPS.calculate())||this._avgRemoteScreenFPS.appendReport(N),this._avgLocalFPS.appendReport(N),isNaN(this._avgLocalScreenFPS.calculate())||this._avgLocalScreenFPS.appendReport(N),this._avgRemoteCameraPixels.appendReport(N),isNaN(this._avgRemoteScreenPixels.calculate())||this._avgRemoteScreenPixels.appendReport(N),this._avgLocalCameraPixels.appendReport(N),isNaN(this._avgLocalScreenPixels.calculate())||this._avgLocalScreenPixels.appendReport(N),this._avgCQ.appendReport(N),Be.sendAnalytics(ss(N)),this._resetAvgStats()}}else ci.error("No resolution");else ci.error('No "framerate"');else ci.error('No "packetloss"');else ci.error('No "bandwidth"');else ci.error('No "bitrate"')}_calculateAvgVideoPixels(e,n,i){let s=0,c=0;const u=this._conference.myUserId();for(const b of Object.keys(e))if(n?b===u:b!==u){const L=n?null:this._conference.getParticipantById(b),N=e[b];if((n||L)&&N){const X=this._calculatePeerAvgVideoPixels(N,L,i);isNaN(X)||(s+=X,c+=1)}}return s/c}_calculatePeerAvgVideoPixels(e,n,i){let s=Object.keys(e).map(N=>Number(N)),c=null;const u=this._conference.getActivePeerConnection();n?(c=n.getTracksByMediaType(Rt),c&&(s=s.filter(N=>c.find(X=>!X.isMuted()&&X.getSSRC()===N&&X.videoType===i)))):(c=this._conference.getLocalTracks(Rt),s=s.filter(N=>c.find(X=>!X.isMuted()&&u.getLocalSSRC(X)===N&&X.videoType===i)));let b=0,L=0;for(const N of s){const X=Number(e[N].height)*Number(e[N].width);!isNaN(X)&&X>0&&(b+=X,L+=1)}return b/L}_calculateAvgVideoFps(e,n,i){let s=0,c=0;const u=this._conference.myUserId();for(const b of Object.keys(e))if(n?b===u:b!==u){const L=n?null:this._conference.getParticipantById(b),N=e[b];if((n||L)&&N){const X=this._calculatePeerAvgVideoFps(N,L,i);isNaN(X)||(s+=X,c+=1)}}return s/c}_calculatePeerAvgVideoFps(e,n,i){let s=Object.keys(e).map(N=>Number(N)),c=null;const u=this._conference.getActivePeerConnection();n?(c=n.getTracksByMediaType(Rt),c&&(s=s.filter(N=>c.find(X=>!X.isMuted()&&X.getSSRC()===N&&X.videoType===i)))):(c=this._conference.getLocalTracks(Rt),s=s.filter(N=>c.find(X=>!X.isMuted()&&u.getLocalSSRC(X)===N&&X.videoType===i)));let b=0,L=0;for(const N of s){const X=Number(e[N]);!isNaN(X)&&X>0&&(b+=X,L+=1)}return b/L}_maybeSendTransportAnalyticsEvent(e){if(!e||!e.transport||!e.transport.length)return;const n={p2p:e.transport[0].p2p,local_candidate_type:e.transport[0].localCandidateType,remote_candidate_type:e.transport[0].remoteCandidateType,transport_type:e.transport[0].type};this._cachedTransportStats&&jn()(n,this._cachedTransportStats)||(this._cachedTransportStats=n,Be.sendAnalytics({type:ar,action:"transport.stats",attributes:n}))}_resetAvgJvbStats(){this._resetAvgStats(),this.jvbStatsMonitor._resetAvgStats()}_resetAvgStats(){this._avgAudioBitrateUp.reset(),this._avgAudioBitrateDown.reset(),this._avgVideoBitrateUp.reset(),this._avgVideoBitrateDown.reset(),this._avgBandwidthUp.reset(),this._avgBandwidthDown.reset(),this._avgPacketLossUp.reset(),this._avgPacketLossDown.reset(),this._avgPacketLossTotal.reset(),this._avgRemoteFPS.reset(),this._avgRemoteScreenFPS.reset(),this._avgLocalFPS.reset(),this._avgLocalScreenFPS.reset(),this._avgRemoteCameraPixels.reset(),this._avgRemoteScreenPixels.reset(),this._avgLocalCameraPixels.reset(),this._avgLocalScreenPixels.reset(),this._avgCQ.reset(),this._sampleIdx=0}dispose(){this._conference.off(tn,this._onP2PStatusChanged),this._conference.off(Zs,this._onLocalStatsUpdated),this._conference.off(Bt,this._onJvb121StatusChanged),this.jvbStatsMonitor.dispose(),this.p2pStatsMonitor.dispose()}}var Lu=o(2444),Ta=o.n(Lu);class xu{constructor(e){this.stats={users:{},dominantSpeakerId:null};const n=e.myUserId();this.stats.users[n]=new(Ta())(n,null,!0),this.conference=e,e.addEventListener(Ue,this._onDominantSpeaker.bind(this)),e.addEventListener(nn,this._onUserJoin.bind(this)),e.addEventListener(In,this._onUserLeave.bind(this)),e.addEventListener(Ge,this._onDisplayNameChange.bind(this)),e.addEventListener(Ut,this._onFacialExpressionAdd.bind(this)),e.xmpp&&e.xmpp.addListener(Je().SPEAKER_STATS_RECEIVED,this._updateStats.bind(this))}_onDominantSpeaker(e){const n=this.stats.users[this.stats.dominantSpeakerId],i=this.stats.users[e];n&&n.setDominantSpeaker(!1),i&&i.setDominantSpeaker(!0),this.stats.dominantSpeakerId=e}_onUserJoin(e,n){n.isHidden()||this.stats.users[e]||(this.stats.users[e]=new(Ta())(e,n.getDisplayName()))}_onUserLeave(e){const n=this.stats.users[e];n&&n.markAsHasLeft()}_onDisplayNameChange(e,n){const i=this.stats.users[e];i&&i.setDisplayName(n)}_onFacialExpressionAdd(e,n){const i=this.stats.users[e];i&&i.addFacialExpression(n.facialExpression,n.duration)}getStats(){return this.stats.users}_updateStats(e){for(const n in e){let i;const s=this.conference.getParticipantById(n);s&&s.isHidden()||(this.stats.users[n]?(i=this.stats.users[n],i.getDisplayName()||i.setDisplayName(e[n].displayName)):(i=new(Ta())(n,e[n].displayName),this.stats.users[n]=i,i.markAsHasLeft())),i.totalDominantSpeakerTime=e[n].totalDominantSpeakerTime,i.setFacialExpressions(e[n].facialExpressions)}}}class ku{constructor(e,n,i,s){this.blob=e,this.name=n,this.startTime=i,this.wordArray=s}}class Bu{constructor(e){this.track=e,this.recorder=null,this.data=null,this.name=null,this.startTime=null}}const ml="audio/webm",gl="audio/ogg";function vl(r){if(r.recorder===void 0)throw new Error("Passed an object to startRecorder which is not a TrackRecorder object");r.recorder.start(),r.startTime=new Date}function yl(r){if(r.recorder===void 0)throw new Error("Passed an object to stopRecorder which is not a TrackRecorder object");r.recorder.stop()}function _l(){if(MediaRecorder.isTypeSupported(ml))return ml;if(MediaRecorder.isTypeSupported(gl))return gl;throw new Error("unable to create a MediaRecorder with the right mimetype!")}function yi(r){this.recorders=[],this.fileType=_l(),this.isRecording=!1,this.jitsiConference=r}yi.determineCorrectFileType=_l,yi.prototype.addTrack=function(r){if(r.isAudioTrack()){const e=this.instantiateTrackRecorder(r);this.recorders.push(e),this.updateNames(),this.isRecording&&vl(e)}},yi.prototype.instantiateTrackRecorder=function(r){const e=new Bu(r),n=e.track.getOriginalStream(),i=new MediaStream;return n.getAudioTracks().forEach(s=>i.addTrack(s)),e.recorder=new MediaRecorder(i,{mimeType:this.fileType}),e.data=[],e.recorder.ondataavailable=function(s){s.data.size>0&&e.data.push(s.data)},e},yi.prototype.removeTrack=function(r){if(r.isVideoTrack())return;const e=this.recorders;let n;for(n=0;n<e.length;n++)if(e[n].track.getParticipantId()===r.getParticipantId()){const i=e[n];this.isRecording?yl(i):e.splice(n,1)}this.updateNames()},yi.prototype.updateNames=function(){const r=this.jitsiConference;this.recorders.forEach(e=>{if(e.track.isLocal())e.name="the transcriber";else{const n=e.track.getParticipantId(),i=r.getParticipantById(n).getDisplayName();i!=="undefined"&&(e.name=i)}})},yi.prototype.start=function(){if(this.isRecording)throw new Error("audiorecorder is already recording");this.isRecording=!0,this.recorders.forEach(r=>vl(r))},yi.prototype.stop=function(){this.isRecording=!1,this.recorders.forEach(r=>yl(r))},yi.prototype.download=function(){this.recorders.forEach(r=>{const e=new Blob(r.data,{type:this.fileType}),n=URL.createObjectURL(e),i=document.createElement("a");document.body.appendChild(i),i.style="display: none",i.href=n,i.download=`test.${this.fileType.split("/")[1]}`,i.click(),window.URL.revokeObjectURL(n)})},yi.prototype.getRecordingResults=function(){if(this.isRecording)throw new Error("cannot get blobs because the AudioRecorder is still recording!");this.updateNames();const r=[];return this.recorders.forEach(e=>r.push(new ku(new Blob(e.data,{type:this.fileType}),e.name,e.startTime))),r},yi.prototype.getFileType=function(){return this.fileType};const Al=yi;class Uu{constructor(e,n,i){this.word=e,this.begin=n,this.end=i}getWord(){return this.word}getBeginTime(){return this.begin}getEndTime(){return this.end}}class Fu extends class{constructor(){throw new Error("TranscriptionService is abstract and cannot be created")}send(e,n){this.sendRequest(e.blob,i=>{this.verify(i)?e.wordArray=this.formatResponse(i):e.wordArray=[],n(e)})}sendRequest(e,n){throw new Error("TranscriptionService.sendRequest is abstract")}formatResponse(e){throw new Error("TranscriptionService.format is abstract")}verify(e){throw new Error("TranscriptionService.verify is abstract")}}{constructor(){super(),this.url=function(){if(config.sphinxURL!==void 0){const e=config.sphinxURL;if(e.includes!==void 0&&e.includes("https://"))return e}}()}sendRequest(e,n){const i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===XMLHttpRequest.DONE&&i.status===200)n(i.responseText);else if(i.readyState===XMLHttpRequest.DONE)throw new Error(`unable to accept response from sphinx server. status: ${i.status}`)},i.open("POST",this.url),i.setRequestHeader("Content-Type",Al.determineCorrectFileType()),i.send(e)}formatResponse(e){const n=JSON.parse(e).objects;n.shift();const i=[];return n.forEach(s=>s.filler||i.push(new Uu(s.word,s.start,s.end))),i}verify(e){if(typeof e!="string")return!1;let n;try{n=JSON.parse(e)}catch(s){return!1}if(n.objects===void 0)return!1;const i=n.objects;return!(!i[0]||!i[0]["session-id"])}}const Ra="before",El="recording",Sl="transcribing",bl="finished";function _i(){this.audioRecorder=new Al,this.transcriptionService=new Fu,this.counter=null,this.startTime=null,this.transcription=null,this.callback=null,this.results=[],this.state=Ra,this.lineLength=0}function ju(r,e){if(e.wordArray.length>0){let n=e.startTime.getUTCMilliseconds()-r.startTime.getUTCMilliseconds();n<0&&(n=0);let i="[";e.wordArray.forEach(s=>{s.begin+=n,s.end+=n,i+=`${s.word},`}),i+="]",e.wordArray.name=e.name}r.results.push(e.wordArray),r.counter--,r.maybeMerge()}function Cl(r){for(let e=0;e<r.length;e++)r[e].length===0&&r.splice(e,1);return r.length>0}_i.prototype.start=function(){if(this.state!==Ra)throw new Error(`The transcription can only start when it's in the "before" state. It's currently in the "${this.state}" state`);this.state=El,this.audioRecorder.start(),this.startTime=new Date},_i.prototype.stop=function(r){if(this.state!==El)throw new Error(`The transcription can only stop when it's in the "recording" state. It's currently in the "${this.state}" state`);this.audioRecorder.stop();const e=ju.bind(null,this);this.audioRecorder.getRecordingResults().forEach(n=>{this.transcriptionService.send(n,e),this.counter++}),this.state=Sl,this.callback=r},_i.prototype.maybeMerge=function(){this.state===Sl&&this.counter===0&&this.merge()},_i.prototype.merge=function(){this.transcription="";const r=this.results,e=[];for(Cl(r),r.forEach(n=>function(i,s){if(i.length===0)i.push(s);else{if(i[i.length-1].begin<=s.begin)return void i.push(s);for(let c=0;c<i.length;c++)if(s.begin<i[c].begin)return void i.splice(c,0,s);i.push(s)}}(e,n));Cl(r);){let n=r[0];r.forEach(s=>{s[0].begin<n[0].begin&&(n=s)});let i=n.shift();for(this.updateTranscription(i,n.name);n.length>0;){let s=!1;const c=n[0].begin;if(r.forEach(u=>{u[0].begin<c&&(s=!0)}),s)break;i=n.shift(),this.updateTranscription(i,null)}}this.state=bl,this.callback&&this.callback(this.transcription)},_i.prototype.updateTranscription=function(r,e){e!=null&&(this.transcription+=`
|
|
117
|
+
${e}:`,this.lineLength=e.length+1),this.lineLength+r.word.length>80&&(this.transcription+=`
|
|
118
|
+
`,this.lineLength=4),this.transcription+=` ${r.word}`,this.lineLength+=r.word.length+1},_i.prototype.addTrack=function(r){this.audioRecorder.addTrack(r)},_i.prototype.removeTrack=function(r){this.audioRecorder.removeTrack(r)},_i.prototype.getTranscription=function(){if(this.state!==bl)throw new Error(`The transcription can only be retrieved when it's in the "finished" state. It's currently in the "${this.state}" state`);return this.transcription},_i.prototype.getState=function(){return this.state},_i.prototype.reset=function(){this.state=Ra,this.counter=null,this.transcription=null,this.startTime=null,this.callback=null,this.results=[],this.lineLength=0};const Vu=_i,Tl=o(9077).getLogger("modules/version/ComponentsVersions.js");function wa(r){this.versions={},this.conference=r,this.conference.addCommandListener("versions",this.processVersions.bind(this))}wa.prototype.processVersions=function(r,e,n){if(!this.conference.isFocus(n))return void Tl.warn(`Received versions not from the focus user: ${r}`,n);const i=[];r.children.forEach(s=>{const c=s.attributes.name,u=s.value;this.versions[c]!==u&&(this.versions[c]=u,Tl.info(`Got ${c} version: ${u}`),i.push({id:"component_version",component:c,version:u}))}),i.length>0&&Be.sendLog(JSON.stringify(i))},wa.prototype.getComponentVersion=function(r){return this.versions[r]};const Hu="available",Ju="undefined",Gu="busy",Ia="on",eo="off",Pa="pending",Oa="retrying",to="failed",Rl="error_no_connection",wl="error_session_already_exists",Oo=(0,P.getLogger)("modules/videosipgw/JitsiVideoSIPGWSession.js"),Da="STATE_CHANGED";class Qu extends Br{constructor(e,n,i){super(),this.sipAddress=e,this.displayName=n,this.chatRoom=i,this.state=void 0}stop(){this.state!==eo&&this.state!==to?this._sendJibriIQ("stop"):Oo.warn("Video SIP GW session already stopped or failed!")}start(){this.state!==Ia&&this.state!==eo&&this.state!==Pa&&this.state!==Oa?this._sendJibriIQ("start"):Oo.warn("Video SIP GW session already started!")}setState(e,n){if(e===this.state)return;const i=this.state;this.state=e,this.eventEmitter.emit(Da,{address:this.sipAddress,failureReason:n,oldState:i,newState:this.state,displayName:this.displayName})}addStateListener(e){this.addListener(Da,e)}removeStateListener(e){this.removeListener(Da,e)}_sendJibriIQ(e){const n={xmlns:"http://jitsi.org/protocol/jibri",action:e,sipaddress:this.sipAddress};n.displayname=this.displayName;const i=(0,qe.$iq)({to:this.chatRoom.focusMucJid,type:"set"}).c("jibri",n).up();Oo.debug(`${e} video SIP GW session`,i.nodeTree),this.chatRoom.connection.sendIQ(i,()=>{},s=>{Oo.error(`Failed to ${e} video SIP GW session, error: `,s),this.setState(to)})}}const no=(0,P.getLogger)("modules/videosipgw/VideoSIPGW.js");class Ku{constructor(e){this.chatRoom=e,this.eventEmitter=e.eventEmitter,no.debug("creating VideoSIPGW"),this.sessions={},this.sessionStateChangeListener=this.sessionStateChanged.bind(this),e.addPresenceListener("jibri-sip-call-state",this.handleJibriSIPState.bind(this))}handleJibriSIPState(e){const n=e.attributes;if(!n)return;no.debug("Handle video sip gw state : ",n);const i=n.state;if(i!==this.state)switch(i){case Ia:case eo:case Pa:case Oa:case to:{const s=n.sipaddress;if(!s)return;const c=this.sessions[s];c?c.setState(i,n.failure_reason):no.warn("Video SIP GW session not found:",s)}}}createVideoSIPGWSession(e,n){if(this.sessions[e])return no.warn("There was already a Video SIP GW session for address",e),new Error(wl);const i=new Qu(e,n,this.chatRoom);return i.addStateListener(this.sessionStateChangeListener),this.sessions[e]=i,i}sessionStateChanged(e){const n=e.address;if(e.newState===eo||e.newState===to){const i=this.sessions[n];if(!i)return void no.error("Missing Video SIP GW session with address:",n);i.removeStateListener(this.sessionStateChangeListener),delete this.sessions[n]}this.eventEmitter.emit(Je().VIDEO_SIP_GW_SESSION_STATE_CHANGED,e)}}const Ma=(0,P.getLogger)("modules/xmpp/SignalingLayerImpl.js"),Na="SourceInfo";class Il extends ou{constructor(){super(),this.ssrcOwners=new Map,this.chatRoom=null,this._localSourceState={},this._remoteSourceState={},this._sourceNames=new Map}_addLocalSourceInfoToPresence(){this.chatRoom&&this.chatRoom.addOrReplaceInPresence(Na,{value:JSON.stringify(this._localSourceState)})}_doesEndpointSendNewSourceInfo(e){var n;const i=(n=this.chatRoom)===null||n===void 0?void 0:n.getLastPresence(e);return Boolean(i&&i.find(s=>s.tagName===Na))}setChatRoom(e){const n=this.chatRoom;this.chatRoom=e,n&&(n.removePresenceListener("audiomuted",this._audioMuteHandler),n.removePresenceListener("videomuted",this._videoMuteHandler),n.removePresenceListener("videoType",this._videoTypeHandler),Mr.isSourceNameSignalingEnabled()&&(this._sourceInfoHandler&&n.removePresenceListener(Na,this._sourceInfoHandler),this._memberLeftHandler&&n.removeEventListener(Je().MUC_MEMBER_LEFT,this._memberLeftHandler))),e&&(Mr.isSourceNameSignalingEnabled()?(this._bindChatRoomEventHandlers(e),this._addLocalSourceInfoToPresence()):(this._audioMuteHandler=(i,s)=>{this.eventEmitter.emit(Ts,s,Xe,i.value==="true")},e.addPresenceListener("audiomuted",this._audioMuteHandler),this._videoMuteHandler=(i,s)=>{this.eventEmitter.emit(Ts,s,Rt,i.value==="true")},e.addPresenceListener("videomuted",this._videoMuteHandler),this._videoTypeHandler=(i,s)=>{this.eventEmitter.emit(Eo,s,i.value)},e.addPresenceListener("videoType",this._videoTypeHandler)))}_bindChatRoomEventHandlers(e){const n=(c,u)=>{this.eventEmitter.emit(Ts,c,Xe,u)},i=(c,u)=>{this.eventEmitter.emit(Ts,c,Rt,u)};this._audioMuteHandler=(c,u)=>{this._doesEndpointSendNewSourceInfo(u)||n(u,c.value==="true")},e.addPresenceListener("audiomuted",this._audioMuteHandler),this._videoMuteHandler=(c,u)=>{this._doesEndpointSendNewSourceInfo(u)||i(u,c.value==="true")},e.addPresenceListener("videomuted",this._videoMuteHandler);const s=(c,u)=>{this.eventEmitter.emit(Eo,c,u)};this._videoTypeHandler=(c,u)=>{this._doesEndpointSendNewSourceInfo(u)||s(u,c.value)},e.addPresenceListener("videoType",this._videoTypeHandler),this._sourceInfoHandler=(c,u)=>{const b=u,{value:L}=c,N=JSON.parse(L),X=this._doesEndpointSendNewSourceInfo(b),de=this._remoteSourceState[b]||(this._remoteSourceState[b]={});for(const $e of Object.keys(N)){const ut=Yc($e),ze=Boolean(N[$e].muted),it=de[$e]||(de[$e]={sourceName:$e});it.muted!==ze&&(it.muted=ze,X&&ut===Xe?n(b,ze):i(b,ze));const At=N[$e].videoType;it.videoType!==At&&(it.videoType=At,X&&s(b,At))}const Ie=Object.keys(N);for(const $e of Object.keys(de))Ie.indexOf($e)===-1&&delete de[$e]},e.addPresenceListener("SourceInfo",this._sourceInfoHandler),this._memberLeftHandler=c=>{const u=qe.Strophe.getResourceFromJid(c);if(delete this._remoteSourceState[u],Mr.isSourceNameSignalingEnabled())for(const[b,L]of this.ssrcOwners.entries())L===u&&delete this._sourceNames[b]},e.addEventListener(Je().MUC_MEMBER_LEFT,this._memberLeftHandler)}_findEndpointSourceInfoForMediaType(e,n){const i=this._remoteSourceState[e];if(!i)return null;for(const s of Object.values(i))if(Yc(s.sourceName)===n)return s;return null}getPeerMediaInfo(e,n){const i=()=>{if(this.chatRoom)return this.chatRoom.getMediaPresenceInfo(e,n);Ma.error("Requested peer media info, before room was set")};if(Mr.isSourceNameSignalingEnabled()){const s=this.chatRoom.getLastPresence(e);if(!s)throw new Error(`getPeerMediaInfo - no presence stored for: ${e}`);if(!this._doesEndpointSendNewSourceInfo(e))return i();const c={},u=this._findEndpointSourceInfoForMediaType(e,n);if(n===Xe)c.muted=!u||u.muted;else{if(n!==Rt)throw new Error(`Unsupported media type: ${n}`);{c.muted=!u||u.muted,c.videoType=u?u.videoType:void 0;const b=Bs(s,"jitsi_participant_codecType");b.length>0&&(c.codecType=b[0].value)}}return c}return i()}getPeerSourceInfo(e,n){return this._remoteSourceState[e]?this._remoteSourceState[e][n]:void 0}getSSRCOwner(e){return this.ssrcOwners.get(e)}setSSRCOwner(e,n){if(typeof e!="number")throw new TypeError(`SSRC(${e}) must be a number`);const i=this.ssrcOwners.get(e);i&&i!==n&&Ma.error(`SSRC owner re-assigned from ${i} to ${n}`),this.ssrcOwners.set(e,n)}setTrackMuteStatus(e,n){this._localSourceState[e]||(this._localSourceState[e]={}),this._localSourceState[e].muted=n,this.chatRoom&&this._addLocalSourceInfoToPresence()}setTrackVideoType(e,n){this._localSourceState[e]||(this._localSourceState[e]={}),this._localSourceState[e].videoType!==n&&(this._localSourceState[e].videoType=n===Nn().CAMERA?void 0:n,this._addLocalSourceInfoToPresence())}getTrackSourceName(e){return this._sourceNames.get(e)}setTrackSourceName(e,n){if(typeof e!="number")throw new TypeError(`SSRC(${e}) must be a number`);const i=this._sourceNames.get(e);i&&i!==n&&Ma.error(`SSRC(${e}) sourceName re-assigned from ${i} to ${n}`),this._sourceNames.set(e,n)}}const Lt=(0,P.getLogger)("JitsiConference.js");function Ve(r){var e;if(!r.name||r.name.toLowerCase()!==r.name.toString()){const i="Invalid conference name (no conference name passed or it contains invalid characters like capital letters)!";throw Lt.error(i),new Error(i)}if(this.connection=r.connection,this.xmpp=(e=this.connection)===null||e===void 0?void 0:e.xmpp,this.xmpp.isRoomCreated(r.name,r.customDomain)){const i="A coference with the same name has already been created!";throw delete this.connection,delete this.xmpp,Lt.error(i),new Error(i)}this.eventEmitter=new(on()),this.options=r,this.eventManager=new Pi(this),this.participants={},this._signalingLayer=new Il,this._init(r),this.componentsVersions=new wa(this),this.jvbJingleSession=null,this.lastDominantSpeaker=null,this.dtmfManager=null,this.somebodySupportsDTMF=!1,this.authEnabled=!1,this.startAudioMuted=!1,this.startVideoMuted=!1,this.startMutedPolicy={audio:!1,video:!1},this.isMutedByFocus=!1,this.mutedByFocusActor=null,this.isVideoMutedByFocus=!1,this.mutedVideoByFocusActor=null,this.wasStopped=!1,this.properties={},this.connectionQuality=new yu(this,this.eventEmitter,r),this.avgRtpStatsReporter=new Nu(this,r.config.avgRtpStatsN||15),r.config.disableAudioLevels||(this._audioOutputProblemDetector=new Mu(this)),this.isJvbConnectionInterrupted=!1,this.speakerStatsCollector=new xu(this),this.deferredStartP2PTask=null;const n=parseInt(r.config.p2p&&r.config.p2p.backToP2PDelay,10);this.backToP2PDelay=isNaN(n)?5:n,Lt.info(`backToP2PDelay: ${this.backToP2PDelay}`),this.isP2PConnectionInterrupted=!1,this.p2p=!1,this.p2pJingleSession=null,this.videoSIPGWHandler=new Ku(this.room),this.recordingManager=new class{constructor(i){this._sessions={},this._chatRoom=i,this.onPresence=this.onPresence.bind(this),this._chatRoom.eventEmitter.addListener(Je().PRESENCE_RECEIVED,this.onPresence)}getSession(i){return this._sessions[i]}onPresence(i){let{fromHiddenDomain:s,presence:c}=i;Po.isFromFocus(c)?this._handleFocusPresence(c):s&&this._handleJibriPresence(c)}startRecording(i){const s=new pl(fn(Ft({},i),{connection:this._chatRoom.connection}));return s.start({appData:i.appData,broadcastId:i.broadcastId,focusMucJid:this._chatRoom.focusMucJid,streamId:i.streamId}).then(()=>(this.getSession(s.getID())||(this._addSession(s),this._emitSessionUpdate(s)),s)).catch(c=>(this._emitSessionUpdate(s),Promise.reject(c)))}stopRecording(i){const s=this.getSession(i);return s?s.stop({focusMucJid:this._chatRoom.focusMucJid}):Promise.reject(new Error("Could not find session"))}_addSession(i){this._sessions[i.getID()]=i}_createSession(i,s,c){const u=new pl({connection:this._chatRoom.connection,focusMucJid:this._chatRoom.focusMucJid,mode:c,sessionID:i,status:s});return this._addSession(u),u}_emitSessionUpdate(i,s){this._chatRoom.eventEmitter.emit(Je().RECORDER_STATE_CHANGED,i,s)}_handleFocusPresence(i){const s=Po.getFocusRecordingUpdate(i);if(!s)return;const{error:c,initiator:u,recordingMode:b,sessionID:L,status:N}=s;let X=this.getSession(L);X||N!=="off"?X&&X.getStatus()===N&&X.getError()===c?Ca.warn("Ignoring duplicate presence update: ",JSON.stringify(s)):(X||(X=this._createSession(L,N,b)),X.setStatus(N),c&&X.setError(c),this._emitSessionUpdate(X,u)):Ca.warn("Ignoring recording presence update","Received a new session with status off.")}_handleJibriPresence(i){const{liveStreamViewURL:s,mode:c,sessionID:u}=Po.getHiddenDomainUpdate(i);if(!u)return void Ca.warn("Ignoring potential jibri presence due to no session id.");let b=this.getSession(u);b||(b=this._createSession(u,"",c)),b.setLiveStreamViewURL(s),this._emitSessionUpdate(b)}}(this.room),this._conferenceJoinAnalyticsEventSent=void 0,this.isE2EESupported()&&(Lt.info("End-to-End Encryption is supported"),this._e2eEncryption=new Dr(this)),this._audioSenderLimitReached=void 0,this._videoSenderLimitReached=void 0}function ii(r,e,n){this.appID=r,this.token=e,this.options=n,this.xmpp=new xc(n,e),this.addEventListener(yr,(i,s,c,u)=>{Be.sendAnalyticsAndLog(function(b,L,N){return{type:ar,action:"connection.failed",attributes:Ft({error_type:b,error_message:L},N)}}(i,s,u))}),this.addEventListener(Yn,i=>{i&&Be.sendAnalytics(Jr,{message:i}),Be.sendLog(JSON.stringify({id:Jr,msg:i}))})}Ve.prototype.constructor=Ve,Ve.resourceCreator=function(r,e){let n;var i;return e?n=jr().randomHexString(8).toLowerCase():(n=(i=qe.Strophe.getNodeFromJid(r))===null||i===void 0?void 0:i.substr(0,8).toLowerCase(),n&&/[0-9a-f]{8}/g.test(n)||(n=jr().randomHexString(8).toLowerCase())),n},Ve.prototype._init=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.eventManager.setupXMPPListeners();const{config:e}=this.options,n={disabledCodec:e.videoQuality?e.videoQuality.disabledCodec:e.p2p&&e.p2p.disableH264&&ri().H264,enforcePreferredCodec:e.videoQuality&&e.videoQuality.enforcePreferredCodec,jvbCodec:e.videoQuality&&e.videoQuality.preferredCodec||e.preferH264&&ri().H264,p2pCodec:e.p2p?e.p2p.preferredCodec||e.p2p.preferH264&&ri().H264:ri().VP8};this.codecSelection=new zd(this,n),this._statsCurrentId=e.statisticsId?e.statisticsId:fi.callStatsUserName,this.room=this.xmpp.createRoom(this.options.name,fn(Ft({},e),{statsId:this._statsCurrentId}),Ve.resourceCreator),this._signalingLayer.setChatRoom(this.room),this._onIceConnectionInterrupted=this._onIceConnectionInterrupted.bind(this),this.room.addListener(Er.CONNECTION_INTERRUPTED,this._onIceConnectionInterrupted),this._onIceConnectionRestored=this._onIceConnectionRestored.bind(this),this.room.addListener(Er.CONNECTION_RESTORED,this._onIceConnectionRestored),this._onIceConnectionEstablished=this._onIceConnectionEstablished.bind(this),this.room.addListener(Er.CONNECTION_ESTABLISHED,this._onIceConnectionEstablished),this._updateProperties=this._updateProperties.bind(this),this.room.addListener(Er.CONFERENCE_PROPERTIES_CHANGED,this._updateProperties),this._sendConferenceJoinAnalyticsEvent=this._sendConferenceJoinAnalyticsEvent.bind(this),this.room.addListener(Er.MEETING_ID_SET,this._sendConferenceJoinAnalyticsEvent),this._removeLocalSourceOnReject=this._removeLocalSourceOnReject.bind(this),this._updateRoomPresence=this._updateRoomPresence.bind(this),this.room.addListener(Er.SESSION_ACCEPT,this._updateRoomPresence),this.room.addListener(Er.SOURCE_ADD,this._updateRoomPresence),this.room.addListener(Er.SOURCE_ADD_ERROR,this._removeLocalSourceOnReject),this.room.addListener(Er.SOURCE_REMOVE,this._updateRoomPresence),this.e2eping=new Ru(this,e,(s,c)=>{try{this.sendMessage(s,c,!0)}catch(u){Lt.warn("Failed to send E2E ping request or response.",u&&u.msg)}}),this.rtc||(this.rtc=new Vn(this,r),this.eventManager.setupRTCListeners(),Mr.isSourceNameSignalingEnabled()&&this._registerRtcListeners(this.rtc)),this.receiveVideoController=new Pu(this,this.rtc),this.sendVideoController=new Ou(this,this.rtc),this.participantConnectionStatus=new Xi(this.rtc,this,{p2pRtcMuteTimeout:e._p2pConnStatusRtcMuteTimeout,rtcMuteTimeout:e._peerConnStatusRtcMuteTimeout,outOfLastNTimeout:e._peerConnStatusOutOfLastNTimeout}),this.participantConnectionStatus.init();let i=!0;if(e.testing&&e.testing.callStatsThreshold&&(i=100*Math.random()<=e.testing.callStatsThreshold),this.statistics||(this.statistics=new Be(this.xmpp,{aliasName:this._statsCurrentId,userName:e.statisticsDisplayName?e.statisticsDisplayName:this.myUserId(),confID:e.confID||`${this.connection.options.hosts.domain}/${this.options.name}`,siteID:e.siteID,customScriptUrl:e.callStatsCustomScriptUrl,callStatsID:e.callStatsID,callStatsSecret:e.callStatsSecret,callStatsApplicationLogsDisabled:e.callStatsApplicationLogsDisabled,enableCallStats:i,roomName:this.options.name,applicationName:e.applicationName,getWiFiStatsMethod:e.getWiFiStatsMethod,configParams:e.callStatsConfigParams}),Be.analytics.addPermanentProperties({callstats_name:this._statsCurrentId}),e.longTasksStatsInterval&&this.statistics.attachLongTasksStats(this)),this.eventManager.setupChatRoomListeners(),this.eventManager.setupStatisticsListeners(),e.enableTalkWhileMuted&&E.supportsVADDetection())if(e.createVADProcessor){Lt.info("Using VAD detection for generating talk while muted events"),this._audioAnalyser||(this._audioAnalyser=new cl(this,e.createVADProcessor));const s=new Cu;s.on(Sa,()=>this.eventEmitter.emit(ve)),this._audioAnalyser.addVADDetectionService(s)}else Lt.warn("No VAD Processor was provided. Talk while muted detection service was not initialized!");if(e.enableNoisyMicDetection&&E.supportsVADDetection())if(e.createVADProcessor){this._audioAnalyser||(this._audioAnalyser=new cl(this,e.createVADProcessor));const s=new bu;s.on(Ea,()=>this.eventEmitter.emit(we)),this._audioAnalyser.addVADDetectionService(s)}else Lt.warn("No VAD Processor was provided. Noisy microphone detection service was not initialized!");e.enableNoAudioDetection&&(this._noAudioSignalDetection=new Eu(this),this._noAudioSignalDetection.on(Aa,()=>{this.eventEmitter.emit(ie)}),this._noAudioSignalDetection.on(_a,s=>{this.eventEmitter.emit(q,s)})),"channelLastN"in e&&this.setLastN(e.channelLastN),this.jvb121Status=new Iu(this),this.p2pDominantSpeakerDetection=new Su(this),e&&e.deploymentInfo&&e.deploymentInfo.userRegion&&this.setLocalParticipantProperty("region",e.deploymentInfo.userRegion),this.setLocalParticipantProperty("codecType",this.codecSelection.getPreferredCodec()),e&&e.transcriptionLanguage&&e.transcriptionLanguage!=="en-US"&&this.setLocalParticipantProperty("transcription_language",e.transcriptionLanguage)},Ve.prototype.join=function(r){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.room&&this.room.join(r,e).then(()=>this._maybeSetSITimeout())},Ve.prototype.authenticateAndUpgradeRole=function(r){return $d.call(this,fn(Ft({},r),{onCreateResource:Ve.resourceCreator}))},Ve.prototype.isJoined=function(){return this.room&&this.room.joined},Ve.prototype.isP2PEnabled=function(){return Boolean(this.options.config.p2p&&this.options.config.p2p.enabled)||this.options.config.p2p===void 0},Ve.prototype.isP2PTestModeEnabled=function(){return Boolean(this.options.config.testing&&this.options.config.testing.p2pTestMode)},Ve.prototype.leave=function(){return fr(this,null,function*(){if(this.participantConnectionStatus&&(this.participantConnectionStatus.dispose(),this.participantConnectionStatus=null),this.avgRtpStatsReporter&&(this.avgRtpStatsReporter.dispose(),this.avgRtpStatsReporter=null),this._audioOutputProblemDetector&&(this._audioOutputProblemDetector.dispose(),this._audioOutputProblemDetector=null),this.e2eping&&(this.e2eping.stop(),this.e2eping=null),this.getLocalTracks().forEach(n=>this.onLocalTrackRemoved(n)),this.rtc.closeBridgeChannel(),this._sendConferenceLeftAnalyticsEvent(),this.statistics&&this.statistics.dispose(),this._delayedIceFailed&&this._delayedIceFailed.cancel(),this._maybeClearSITimeout(),this.jvbJingleSession&&(this.jvbJingleSession.close(),this.jvbJingleSession=null),this.p2pJingleSession&&(this.p2pJingleSession.close(),this.p2pJingleSession=null),!this.room)throw new Error("The conference is has been already left");const r=this.room;let e;r.removeListener(Er.CONNECTION_INTERRUPTED,this._onIceConnectionInterrupted),r.removeListener(Er.CONNECTION_RESTORED,this._onIceConnectionRestored),r.removeListener(Er.CONNECTION_ESTABLISHED,this._onIceConnectionEstablished),r.removeListener(Er.CONFERENCE_PROPERTIES_CHANGED,this._updateProperties),r.removeListener(Er.MEETING_ID_SET,this._sendConferenceJoinAnalyticsEvent),r.removeListener(Er.SESSION_ACCEPT,this._updateRoomPresence),r.removeListener(Er.SOURCE_ADD,this._updateRoomPresence),r.removeListener(Er.SOURCE_ADD_ERROR,this._removeLocalSourceOnReject),r.removeListener(Er.SOURCE_REMOVE,this._updateRoomPresence),this.eventManager.removeXMPPListeners(),this._signalingLayer.setChatRoom(null),this.room=null;try{yield r.leave()}catch(n){e=n,this.getParticipants().forEach(i=>this.onMemberLeft(i.getJid()))}if(this.rtc&&this.rtc.destroy(),e)throw e})},Ve.prototype._getActiveMediaSession=function(){return this.isP2PActive()?this.p2pJingleSession:this.jvbJingleSession},Ve.prototype._getMediaSessions=function(){const r=[];return this.jvbJingleSession&&r.push(this.jvbJingleSession),this.p2pJingleSession&&r.push(this.p2pJingleSession),r},Ve.prototype._registerRtcListeners=function(r){r.addListener(Mt().DATA_CHANNEL_OPEN,()=>{for(const e of this.rtc.localTracks)e.isVideoTrack()&&this._sendBridgeVideoTypeMessage(e)})},Ve.prototype._sendBridgeVideoTypeMessage=function(r){let e=!r||r.isMuted()?_o().NONE:r.getVideoType();e===_o().DESKTOP&&this._desktopSharingFrameRate>5&&(e=_o().DESKTOP_HIGH_FPS),Mr.isSourceNameSignalingEnabled()?this.rtc.sendSourceVideoType(qs(this.myUserId(),Rt,0),e):this.rtc.setVideoType(e)},Ve.prototype.getName=function(){return this.options.name.toString()},Ve.prototype.getConnection=function(){return this.connection},Ve.prototype.isAuthEnabled=function(){return this.authEnabled},Ve.prototype.isLoggedIn=function(){return Boolean(this.authIdentity)},Ve.prototype.getAuthLogin=function(){return this.authIdentity},Ve.prototype.isExternalAuthEnabled=function(){return this.room&&this.room.moderator.isExternalAuthEnabled()},Ve.prototype.getExternalAuthUrl=function(r){return new Promise((e,n)=>{this.isExternalAuthEnabled()?r?this.room.moderator.getPopupLoginUrl(e,n):this.room.moderator.getLoginUrl(e,n):n()})},Ve.prototype.getLocalTracks=function(r){let e=[];return this.rtc&&(e=this.rtc.getLocalTracks(r)),e},Ve.prototype.getLocalAudioTrack=function(){return this.rtc?this.rtc.getLocalAudioTrack():null},Ve.prototype.getLocalVideoTrack=function(){return this.rtc?this.rtc.getLocalVideoTrack():null},Ve.prototype.getPerformanceStats=function(){return{longTasksStats:this.statistics.getLongTasksStats()}},Ve.prototype.on=function(r,e){this.eventEmitter&&this.eventEmitter.on(r,e)},Ve.prototype.off=function(r,e){this.eventEmitter&&this.eventEmitter.removeListener(r,e)},Ve.prototype.addEventListener=Ve.prototype.on,Ve.prototype.removeEventListener=Ve.prototype.off,Ve.prototype.addCommandListener=function(r,e){this.room&&this.room.addPresenceListener(r,e)},Ve.prototype.removeCommandListener=function(r,e){this.room&&this.room.removePresenceListener(r,e)},Ve.prototype.sendTextMessage=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"body";this.room&&this.room.sendMessage(r,e)},Ve.prototype.sendPrivateTextMessage=function(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"body";this.room&&this.room.sendPrivateMessage(r,e,n)},Ve.prototype.sendCommand=function(r,e){this.room?this.room.addOrReplaceInPresence(r,e)&&this.room.sendPresence():Lt.warn("Not sending a command, room not initialized.")},Ve.prototype.sendCommandOnce=function(r,e){this.sendCommand(r,e),this.removeCommand(r)},Ve.prototype.removeCommand=function(r){this.room&&this.room.removeFromPresence(r)},Ve.prototype.setDisplayName=function(r){if(this.room){const e="nick";if(!r&&!this.room.getFromPresence(e))return;this.room.addOrReplaceInPresence(e,{attributes:{xmlns:"http://jabber.org/protocol/nick"},value:r})&&this.room.sendPresence()}},Ve.prototype.setSubject=function(r){this.room&&this.isModerator()?this.room.setSubject(r):Lt.warn(`Failed to set subject, ${this.room?"":"not in a room, "}${this.isModerator()?"":"participant is not a moderator"}`)},Ve.prototype.getTranscriber=function(){if(this.transcriber===void 0){this.transcriber=new Vu;const r=this.getLocalTracks(Xe);for(const n of r)this.transcriber.addTrack(n);const e=this.rtc.getRemoteTracks(Xe);for(const n of e)this.transcriber.addTrack(n)}return this.transcriber},Ve.prototype.getTranscriptionStatus=function(){return this.room.transcriptionStatus},Ve.prototype.addTrack=function(r){const e=r.getType(),n=this.rtc.getLocalTracks(e);return n.length>0?r===n[0]?Promise.resolve(r):Promise.reject(new Error(`Cannot add second ${e} track to the conference`)):this.replaceTrack(null,r)},Ve.prototype._fireAudioLevelChangeEvent=function(r,e){const n=this.getActivePeerConnection();e&&n!==e||this.eventEmitter.emit(We,this.myUserId(),r)},Ve.prototype._fireMuteChangeEvent=function(r){let e;if(this.isMutedByFocus&&r.isAudioTrack()&&!r.isMuted()?(this.isMutedByFocus=!1,this.room.muteParticipant(this.room.myroomjid,!1,Xe)):this.isVideoMutedByFocus&&r.isVideoTrack()&&!r.isMuted()&&(this.isVideoMutedByFocus=!1,this.room.muteParticipant(this.room.myroomjid,!1,Rt)),this.mutedByFocusActor&&r.isAudioTrack()){const n=qe.Strophe.getResourceFromJid(this.mutedByFocusActor);e=this.participants[n]}else if(this.mutedVideoByFocusActor&&r.isVideoTrack()){const n=qe.Strophe.getResourceFromJid(this.mutedVideoByFocusActor);e=this.participants[n]}r.isVideoTrack()&&!E.doesVideoMuteByStreamRemove()&&this._sendBridgeVideoTypeMessage(r),this.eventEmitter.emit(Ot,r,e)},Ve.prototype._getInitialLocalTracks=function(){return this.getLocalTracks().filter(r=>{const e=r.getType();return!(e!==Xe||this.isStartAudioMuted()&&!E.isWebKitBased()&&!E.isReactNative())||e===Rt&&!this.isStartVideoMuted()})},Ve.prototype.onLocalTrackRemoved=function(r){r.setConference(null),this.rtc.removeLocalTrack(r),r.removeEventListener(Ci,r.muteHandler),r.isAudioTrack()&&r.removeEventListener(Oi,r.audioLevelHandler),r.isVideoTrack()&&r.videoType===Nn().DESKTOP&&this.statistics.sendScreenSharingEvent(!1),this.eventEmitter.emit(_t,r)},Ve.prototype.removeTrack=function(r){return this.replaceTrack(r,null)},Ve.prototype.replaceTrack=function(r,e){const n=this===(r==null?void 0:r.conference);return n&&r.disposed||e!=null&&e.disposed?Promise.reject(new Qn(Bn)):(r&&!n&&Lt.warn(`JitsiConference.replaceTrack oldTrack (${r} does not belong to this conference`),this._doReplaceTrack(n?r:null,e).then(()=>(n&&this.onLocalTrackRemoved(r),e&&this._setupNewTrack(e),(n&&r!=null&&r.isVideoTrack()||e!=null&&e.isVideoTrack())&&this._sendBridgeVideoTypeMessage(e),n&&r!=null&&r.isVideoTrack()&&!(r!=null&&r._setEffectInProgress||e!=null&&e._setEffectInProgress)&&this._updateRoomPresence(this._getActiveMediaSession()),e!==null&&(this.isMutedByFocus||this.isVideoMutedByFocus)&&this._fireMuteChangeEvent(e),Promise.resolve())).catch(i=>(Lt.error(`replaceTrack failed: ${i==null?void 0:i.stack}`),Promise.reject(i))))},Ve.prototype._doReplaceTrack=function(r,e){const n=[];return this.jvbJingleSession?n.push(this.jvbJingleSession.replaceTrack(r,e)):Lt.info("_doReplaceTrack - no JVB JingleSession"),this.p2pJingleSession?n.push(this.p2pJingleSession.replaceTrack(r,e)):Lt.info("_doReplaceTrack - no P2P JingleSession"),Promise.all(n)},Ve.prototype._removeLocalSourceOnReject=function(r,e,n){if(!r)return;Lt.warn(`Source-add rejected on ${r}, reason="${e==null?void 0:e.reason}", message="${e==null?void 0:e.msg}"`);const i=this.getLocalTracks(n)[0];this.eventEmitter.emit(Vt,i)},Ve.prototype._setupNewTrack=function(r){if(r.isAudioTrack()||r.isVideoTrack()&&r.videoType!==Nn().DESKTOP){const e=Vn.getCurrentlyAvailableMediaDevices().find(n=>n.kind===`${r.getTrack().kind}input`&&n.label===r.getTrack().label);e&&Be.sendActiveDeviceListEvent(Vn.getEventDataForActiveDevice(e))}this.rtc.addLocalTrack(r),r.setConference(this),r.muteHandler=this._fireMuteChangeEvent.bind(this,r),r.addEventListener(Ci,r.muteHandler),r.isAudioTrack()&&(r.audioLevelHandler=this._fireAudioLevelChangeEvent.bind(this),r.addEventListener(Oi,r.audioLevelHandler)),this.eventEmitter.emit(et,r)},Ve.prototype._setNewVideoType=function(r){if(Mr.isSourceNameSignalingEnabled()&&r)return this._signalingLayer.setTrackVideoType(qs(this.myUserId(),r.getType(),0),r.videoType),!0;const e="videoType",n=r?r.videoType:Nn().CAMERA;return!(n===Nn().CAMERA&&!this.room.getFromPresence(e))&&this.room.addOrReplaceInPresence(e,{value:n})},Ve.prototype._setTrackMuteStatus=function(r,e,n){return Mr.isSourceNameSignalingEnabled()&&this._signalingLayer.setTrackMuteStatus(qs(this.myUserId(),r,0),n),!!this.room&&(r===Xe?this.room.addAudioInfoToPresence(n):this.room.addVideoInfoToPresence(n))},Ve.prototype._addLocalTrackAsUnmute=function(r){const e=[];return this.jvbJingleSession?e.push(this.jvbJingleSession.addTrackAsUnmute(r)):Lt.debug("Add local MediaStream as unmute - no JVB Jingle session started yet"),this.p2pJingleSession?e.push(this.p2pJingleSession.addTrackAsUnmute(r)):Lt.debug("Add local MediaStream as unmute - no P2P Jingle session started yet"),Promise.allSettled(e).then(()=>{r.isVideoTrack()&&this._sendBridgeVideoTypeMessage(r)})},Ve.prototype._removeLocalTrackAsMute=function(r){const e=[];return this.jvbJingleSession?e.push(this.jvbJingleSession.removeTrackAsMute(r)):Lt.debug("Remove local MediaStream - no JVB JingleSession started yet"),this.p2pJingleSession?e.push(this.p2pJingleSession.removeTrackAsMute(r)):Lt.debug("Remove local MediaStream - no P2P JingleSession started yet"),Promise.allSettled(e).then(()=>{r.isVideoTrack()&&this._sendBridgeVideoTypeMessage()})},Ve.prototype.getRole=function(){return this.room.role},Ve.prototype.isHidden=function(){return this.connection?qe.Strophe.getDomainFromJid(this.connection.getJid())===this.options.config.hiddenDomain:null},Ve.prototype.isModerator=function(){return this.room?this.room.isModerator():null},Ve.prototype.lock=function(r){return this.isModerator()?new Promise((e,n)=>{this.room.lockRoom(r||"",()=>e(),i=>n(i),()=>n(re))}):Promise.reject(new Error("You are not moderator."))},Ve.prototype.unlock=function(){return this.lock()},Ve.prototype.selectParticipant=function(r){this.selectParticipants([r])},Ve.prototype.selectParticipants=function(r){if(!Array.isArray(r))throw new Error("Invalid argument; participantIds must be an array.");this.receiveVideoController.selectEndpoints(r)},Ve.prototype.getLastN=function(){return this.receiveVideoController.getLastN()},Ve.prototype.setLastN=function(r){if(!Number.isInteger(r)&&!Number.parseInt(r,10))throw new Error(`Invalid value for lastN: ${r}`);const e=Number(r);if(e<-1)throw new RangeError("lastN cannot be smaller than -1");if(this.receiveVideoController.setLastN(e),this.p2pJingleSession){const n=e!==0;this.p2pJingleSession.setMediaTransferActive(!0,n).catch(i=>{Lt.error(`Failed to adjust video transfer status (${n})`,i)})}},Ve.prototype.isInLastN=function(r){return this.rtc.isInLastN(r)},Ve.prototype.getParticipants=function(){return Object.values(this.participants)},Ve.prototype.getParticipantCount=function(){let r=arguments.length>0&&arguments[0]!==void 0&&arguments[0],e=this.getParticipants();return r||(e=e.filter(n=>!n.isHidden())),e.length+1},Ve.prototype.getParticipantById=function(r){return this.participants[r]},Ve.prototype.grantOwner=function(r){const e=this.getParticipantById(r);e&&this.room.setAffiliation(e.getJid(),"owner")},Ve.prototype.revokeOwner=function(r){const e=this.getParticipantById(r),n=this.myUserId()===r,i=this.isMembersOnly()?"member":"none";n?this.room.setAffiliation(this.room.myroomjid,i):e&&this.room.setAffiliation(e.getJid(),i)},Ve.prototype.kickParticipant=function(r,e){const n=this.getParticipantById(r);n&&this.room.kick(n.getJid(),e)},Ve.prototype._maybeClearSITimeout=function(){this._sessionInitiateTimeout&&(this.jvbJingleSession||this.getParticipantCount()<2)&&(window.clearTimeout(this._sessionInitiateTimeout),this._sessionInitiateTimeout=null)},Ve.prototype._maybeSetSITimeout=function(){!this.jvbJingleSession&&this.getParticipantCount()>=2&&!this._sessionInitiateTimeout&&(this._sessionInitiateTimeout=window.setTimeout(()=>{this._sessionInitiateTimeout=null,Be.sendAnalytics(Gr("session-initiate.timeout",{p2p:!1,value:5e3}))},5e3))},Ve.prototype.muteParticipant=function(r,e){const n=e||Xe;if(n!==Xe&&n!==Rt)return void Lt.error(`Unsupported media type: ${n}`);const i=this.getParticipantById(r);i&&this.room.muteParticipant(i.getJid(),!0,n)},Ve.prototype.onMemberJoined=function(r,e,n,i,s,c,u,b,L,N,X){const de=qe.Strophe.getResourceFromJid(r);if(de==="focus"||this.myUserId()===de)return;const Ie=new ko(r,this,e,i,s,c,u);Ie.setRole(n),Ie.setBotType(b),Ie.setFeatures(N),Ie.setIsReplacing(X),this.participants[de]=Ie,this.eventEmitter.emit(nn,de,Ie),this._updateFeatures(Ie),this.isJoined()&&this._maybeStartOrStopP2P(),this._maybeSetSITimeout()},Ve.prototype._onMucJoined=function(){this._maybeStartOrStopP2P()},Ve.prototype._updateFeatures=function(r){r.getFeatures().then(e=>{r._supportsDTMF=e.has("urn:xmpp:jingle:dtmf:0"),this.updateDTMFSupport(),e.has(Lc)&&r.setProperty("features_jigasi",!0),e.has(yo)&&r.setProperty("features_e2ee",!0)}).catch(()=>!1)},Ve.prototype._onMemberBotTypeChanged=function(r,e){const n=this.getParticipants().find(i=>i.getJid()===r);if(n){n.setBotType(e);const i=qe.Strophe.getResourceFromJid(r);this.eventEmitter.emit(Ke,i,e)}n.getBotType()||this._maybeStartOrStopP2P()},Ve.prototype.onMemberLeft=function(r){const e=qe.Strophe.getResourceFromJid(r);if(e==="focus"||this.myUserId()===e)return;const n=this.participants[e],i=this._getMediaSessions();let s=[];for(const c of i){const u=c.peerconnection.getRemoteTracks(e);u&&(s=[...s,...u]),c.removeRemoteStreamsOnLeave(e)}s.forEach(c=>{this.eventEmitter.emit(_t,c)}),n&&(delete this.participants[e],this.eventEmitter.emit(In,e,n)),this.room!==null&&(this._maybeStartOrStopP2P(!0),this._maybeClearSITimeout())},Ve.prototype.onMemberKicked=function(r,e,n,i,s){if(e===this.myUserId())return;const c=this.participants[e];if(r)return this.eventEmitter.emit(mn,c,i,s),void this.leave();const u=this.participants[n];u.setIsReplaced(s),this.eventEmitter.emit(yt,c,u,i)},Ve.prototype.onLocalRoleChanged=function(r){this.eventEmitter.emit(Xn,this.myUserId(),r)},Ve.prototype.onUserRoleChanged=function(r,e){const n=qe.Strophe.getResourceFromJid(r),i=this.getParticipantById(n);i&&(i.setRole(e),this.eventEmitter.emit(Xn,n,e))},Ve.prototype.onDisplayNameChanged=function(r,e){const n=qe.Strophe.getResourceFromJid(r),i=this.getParticipantById(n);i&&i._displayName!==e&&(i._displayName=e,this.eventEmitter.emit(Ge,n,e))},Ve.prototype.onRemoteTrackAdded=function(r){if(r.isP2P&&!this.isP2PActive())return void Lt.info("Trying to add remote P2P track, when not in P2P - IGNORED");if(!r.isP2P&&this.isP2PActive())return void Lt.info("Trying to add remote JVB track, when in P2P - IGNORED");const e=r.getParticipantId(),n=this.getParticipantById(e);if(!n)return void Lt.error(`No participant found for id: ${e}`);n._tracks.push(r),this.transcriber&&this.transcriber.addTrack(r);const i=this.eventEmitter;r.addEventListener(Ci,()=>i.emit(Ot,r)),r.isAudioTrack()&&r.addEventListener(Oi,(s,c)=>{this.getActivePeerConnection()===c&&i.emit(We,e,s)}),i.emit(et,r)},Ve.prototype.onCallAccepted=function(r,e){this.p2pJingleSession===r&&(Lt.info("P2P setAnswer"),this.p2pJingleSession.setAnswer(e),this.eventEmitter.emit(me,this.p2pJingleSession))},Ve.prototype.onTransportInfo=function(r,e){this.p2pJingleSession===r&&(Lt.info("P2P addIceCandidates"),this.p2pJingleSession.addIceCandidates(e))},Ve.prototype.onRemoteTrackRemoved=function(r){this.getParticipants().forEach(e=>{const n=e.getTracks();for(let i=0;i<n.length;i++)if(n[i]===r){e._tracks.splice(i,1),this.eventEmitter.emit(_t,r),this.transcriber&&this.transcriber.removeTrack(r);break}},this)},Ve.prototype._onIncomingCallP2P=function(r,e){let n;!this.isP2PEnabled()&&!this.isP2PTestModeEnabled()||E.isFirefox()||E.isWebKitBased()?n={reason:"decline",reasonDescription:"P2P disabled",errorMsg:"P2P mode disabled in the configuration"}:this.p2pJingleSession?n={reason:"busy",reasonDescription:"P2P already in progress",errorMsg:'Duplicated P2P "session-initiate"'}:this._shouldBeInP2PMode()||(n={reason:"decline",reasonDescription:"P2P requirements not met",errorMsg:'Received P2P "session-initiate" when should not be in P2P mode'},Be.sendAnalytics(Gr("decline"))),n?this._rejectIncomingCall(r,n):this._acceptP2PIncomingCall(r,e)},Ve.prototype.onIncomingCall=function(r,e,n){if(r.isP2P)this._onIncomingCallP2P(r,e);else{if(!this.isFocus(r.remoteJid)){const i="Rejecting session-initiate from non-focus.";return void this._rejectIncomingCall(r,{reason:"security-error",reasonDescription:i,errorMsg:i})}this._acceptJvbIncomingCall(r,e,n)}},Ve.prototype._acceptJvbIncomingCall=function(r,e,n){this.jvbJingleSession=r,this.room.connectionTimes["session.initiate"]=n,this._sendConferenceJoinAnalyticsEvent(),this.wasStopped&&Be.sendAnalyticsAndLog(Gr("restart",{p2p:!1}));const i=$(e).find('>bridge-session[xmlns="http://jitsi.org/protocol/focus"]').attr("region");this.eventEmitter.emit(Le,i),this._maybeClearSITimeout(),Be.sendAnalytics(Gr("session-initiate.received",{p2p:!1,value:n}));try{r.initialize(this.room,this.rtc,this._signalingLayer,fn(Ft({},this.options.config),{enableInsertableStreams:this.isE2EEEnabled()}))}catch(c){return w().callErrorHandler(c),void Lt.error(c)}this._setBridgeChannel(e,r.peerconnection);const s=this._getInitialLocalTracks();try{r.acceptOffer(e,()=>{this.isP2PActive()&&this.jvbJingleSession&&this._suspendMediaTransferForJvbConnection(),this.eventEmitter.emit(me,r),this.isP2PActive()||this.eventEmitter.emit(k,r)},c=>{w().callErrorHandler(c),Lt.error("Failed to accept incoming Jingle session",c)},s),this._desktopSharingFrameRate&&r.peerconnection.setDesktopSharingFrameRate(this._desktopSharingFrameRate),Lt.info("Starting CallStats for JVB connection..."),this.statistics.startCallStats(this.jvbJingleSession.peerconnection,"jitsi"),this.statistics.startRemoteStats(this.jvbJingleSession.peerconnection)}catch(c){w().callErrorHandler(c),Lt.error(c)}},Ve.prototype._setBridgeChannel=function(r,e){let n=null;const i=$(r).find(">content>transport>web-socket").first();i.length===1&&(n=i[0].getAttribute("url")),n?this.rtc.initializeBridgeChannel(null,n):this.rtc.initializeBridgeChannel(e,null)},Ve.prototype._rejectIncomingCall=function(r,e){e&&e.errorMsg&&w().callErrorHandler(new Error(e.errorMsg)),r.terminate(null,n=>{Lt.warn("An error occurred while trying to terminate invalid Jingle session",n)},{reason:e&&e.reason,reasonDescription:e&&e.reasonDescription,sendSessionTerminate:!0})},Ve.prototype.onCallEnded=function(r,e,n){if(Lt.info(`Call ended: ${e} - ${n} P2P ?${r.isP2P}`),r===this.jvbJingleSession)this.wasStopped=!0,Be.sendAnalytics(Gr("terminate",{p2p:!1})),this.statistics&&(this.statistics.stopRemoteStats(this.jvbJingleSession.peerconnection),Lt.info("Stopping JVB CallStats"),this.statistics.stopCallStats(this.jvbJingleSession.peerconnection)),this.jvbJingleSession=null,this.rtc.onCallEnded();else if(r===this.p2pJingleSession){const i={};e==="decline"&&n==="force JVB121"?(Lt.info("In forced JVB 121 mode..."),Be.analytics.addPermanentProperties({forceJvb121:!0})):e==="connectivity-error"&&n==="ICE FAILED"?Be.analytics.addPermanentProperties({p2pFailed:!0}):e==="success"&&n==="restart"&&(i.requestRestart=!0),this._stopP2PSession(i)}else Lt.error("Received onCallEnded for invalid session",r.sid,r.remoteJid,e,n)},Ve.prototype.onSuspendDetected=function(r){r.isP2P||(this.leave(),this.eventEmitter.emit(Ee))},Ve.prototype.updateDTMFSupport=function(){let r=!1;const e=this.getParticipants();for(let n=0;n<e.length;n+=1)if(e[n].supportsDTMF()){r=!0;break}r!==this.somebodySupportsDTMF&&(this.somebodySupportsDTMF=r,this.eventEmitter.emit(Kt,r))},Ve.prototype.isDTMFSupported=function(){return this.somebodySupportsDTMF},Ve.prototype.myUserId=function(){return this.room&&this.room.myroomjid?qe.Strophe.getResourceFromJid(this.room.myroomjid):null},Ve.prototype.sendTones=function(r,e,n){const i=this.getActivePeerConnection();i?i.sendTones(r,e,n):Lt.warn("cannot sendTones: no peer connection")},Ve.prototype.startRecording=function(r){return this.room?this.recordingManager.startRecording(r):Promise.reject(new Error("The conference is not created yet!"))},Ve.prototype.stopRecording=function(r){return this.room?this.recordingManager.stopRecording(r):Promise.reject(new Error("The conference is not created yet!"))},Ve.prototype.isSIPCallingSupported=function(){return!!this.room&&this.room.isSIPCallingSupported()},Ve.prototype.dial=function(r){return this.room?this.room.dial(r):new Promise((e,n)=>{n(new Error("The conference is not created yet!"))})},Ve.prototype.hangup=function(){return this.room?this.room.hangup():new Promise((r,e)=>{e(new Error("The conference is not created yet!"))})},Ve.prototype.startTranscriber=function(){return this.dial("jitsi_meet_transcribe")},Ve.prototype.stopTranscriber=Ve.prototype.hangup,Ve.prototype.getPhoneNumber=function(){return this.room?this.room.getPhoneNumber():null},Ve.prototype.getPhonePin=function(){return this.room?this.room.getPhonePin():null},Ve.prototype.getMeetingUniqueId=function(){if(this.room)return this.room.getMeetingId()},Ve.prototype.getActivePeerConnection=function(){const r=this.isP2PActive()?this.p2pJingleSession:this.jvbJingleSession;return r?r.peerconnection:null},Ve.prototype.getConnectionState=function(){const r=this.getActivePeerConnection();return r?r.getConnectionState():null},Ve.prototype.setStartMutedPolicy=function(r){this.isModerator()?(this.startMutedPolicy=r,this.room.addOrReplaceInPresence("startmuted",{attributes:{audio:r.audio,video:r.video,xmlns:"http://jitsi.org/jitmeet/start-muted"}})&&this.room.sendPresence()):Lt.warn(`Failed to set start muted policy, ${this.room?"":"not in a room, "}${this.isModerator()?"":"participant is not a moderator"}`)},Ve.prototype.getStartMutedPolicy=function(){return this.startMutedPolicy},Ve.prototype.isStartAudioMuted=function(){return this.startAudioMuted},Ve.prototype.isStartVideoMuted=function(){return this.startVideoMuted},Ve.prototype.getConnectionTimes=function(){return this.room.connectionTimes},Ve.prototype.setLocalParticipantProperty=function(r,e){this.sendCommand(`jitsi_participant_${r}`,{value:e})},Ve.prototype.removeLocalParticipantProperty=function(r){this.removeCommand(`jitsi_participant_${r}`),this.room.sendPresence()},Ve.prototype.getLocalParticipantProperty=function(r){const e=this.room.presMap.nodes.find(n=>n.tagName===`jitsi_participant_${r}`);return e?e.value:void 0},Ve.prototype.sendFeedback=function(r,e){return this.statistics.sendFeedback(r,e)},Ve.prototype.isCallstatsEnabled=function(){return this.statistics.isCallstatsEnabled()},Ve.prototype.getSsrcByTrack=function(r){var e;return r.isLocal()?(e=this.getActivePeerConnection())===null||e===void 0?void 0:e.getLocalSSRC(r):r.getSSRC()},Ve.prototype._onTrackAttach=function(r,e){const n=r.isLocal();let i=null;const s=r.isP2P,c=s?r.getParticipantId():"jitsi",u=s?this.p2pJingleSession&&this.p2pJingleSession.peerconnection:this.jvbJingleSession&&this.jvbJingleSession.peerconnection;n?u&&(i=u.getLocalSSRC(r)):i=r.getSSRC(),e.id&&i&&u&&this.statistics.associateStreamWithVideoTag(u,i,n,c,r.getUsageLabel(),e.id)},Ve.prototype.sendApplicationLog=function(r){Be.sendLog(r)},Ve.prototype.isFocus=function(r){return this.room?this.room.isFocus(r):null},Ve.prototype._fireIncompatibleVersionsEvent=function(){this.eventEmitter.emit(Re,ct)},Ve.prototype.sendEndpointMessage=function(r,e){this.rtc.sendChannelMessage(r,e)},Ve.prototype.sendEndpointStatsMessage=function(r){this.rtc.sendEndpointStatsMessage(r)},Ve.prototype.broadcastEndpointMessage=function(r){this.sendEndpointMessage("",r)},Ve.prototype.sendMessage=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const i=typeof r;if(i==="object"||!n&&i==="string")if(n)this.sendEndpointMessage(e,r);else{let s=r,c="body";if(i==="object"){c="json-message",s.hasOwnProperty(Wr)||(s[Wr]="");try{s=JSON.stringify(s)}catch(u){return void Lt.error("Can not send a message, stringify failed: ",u)}}e?this.sendPrivateTextMessage(e,s,c):this.sendTextMessage(s,c)}else Lt.error(`Can not send a message of type ${i}`)},Ve.prototype.isConnectionInterrupted=function(){return this.isP2PActive()?this.isP2PConnectionInterrupted:this.isJvbConnectionInterrupted},Ve.prototype._onConferenceRestarted=function(r){!r.isP2P&&this.options.config.enableForcedReload&&this.eventEmitter.emit(Re,C)},Ve.prototype._onIceConnectionInterrupted=function(r){r.isP2P?this.isP2PConnectionInterrupted=!0:this.isJvbConnectionInterrupted=!0,r.isP2P===this.isP2PActive()&&this.eventEmitter.emit(De)},Ve.prototype._onIceConnectionFailed=function(r){r.isP2P?(Be.analytics.addPermanentProperties({p2pFailed:!0}),this.p2pJingleSession&&Be.sendAnalyticsAndLog(Ri("failed",{initiator:this.p2pJingleSession.isInitiator})),this._stopP2PSession({reason:"connectivity-error",reasonDescription:"ICE FAILED"})):r&&this.jvbJingleSession===r&&(this._delayedIceFailed=new _u(this),this._delayedIceFailed.start(r))},Ve.prototype._onIceConnectionRestored=function(r){r.isP2P?this.isP2PConnectionInterrupted=!1:(this.isJvbConnectionInterrupted=!1,this._delayedIceFailed&&this._delayedIceFailed.cancel()),r.isP2P===this.isP2PActive()&&this.eventEmitter.emit(ht)},Ve.prototype._acceptP2PIncomingCall=function(r,e){this.isP2PConnectionInterrupted=!1,this.p2pJingleSession=r,this._sendConferenceJoinAnalyticsEvent(),this.p2pJingleSession.initialize(this.room,this.rtc,this._signalingLayer,fn(Ft({},this.options.config),{enableInsertableStreams:this.isE2EEEnabled()})),Lt.info("Starting CallStats for P2P connection...");let n=qe.Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid);const i=this.participants[n];i&&(n=i.getStatsID()||n),this.statistics.startCallStats(this.p2pJingleSession.peerconnection,n);const s=this.getLocalTracks();this.p2pJingleSession.acceptOffer(e,()=>{Lt.debug('Got RESULT for P2P "session-accept"'),this.eventEmitter.emit(me,r)},c=>{Lt.error("Failed to accept incoming P2P Jingle session",c)},s)},Ve.prototype._addRemoteJVBTracks=function(){this._addRemoteTracks("JVB",this.jvbJingleSession.peerconnection.getRemoteTracks())},Ve.prototype._addRemoteP2PTracks=function(){this._addRemoteTracks("P2P",this.p2pJingleSession.peerconnection.getRemoteTracks())},Ve.prototype._addRemoteTracks=function(r,e){for(const n of e)Lt.info(`Adding remote ${r} track: ${n}`),this.onRemoteTrackAdded(n)},Ve.prototype._onIceConnectionEstablished=function(r){this.p2pJingleSession!==null&&(this.p2pEstablishmentDuration=this.p2pJingleSession.establishmentDuration),this.jvbJingleSession!==null&&(this.jvbEstablishmentDuration=this.jvbJingleSession.establishmentDuration);let e=!1;const n=this.options.config.forceJVB121Ratio;if(r.isP2P?this.p2pJingleSession!==r?(Lt.error("CONNECTION_ESTABLISHED - wrong P2P session instance ?!"),e=!0):!r.isInitiator&&typeof n=="number"&&Math.random()<n&&(Lt.info(`Forcing JVB 121 mode (ratio=${n})...`),Be.analytics.addPermanentProperties({forceJvb121:!0}),this._stopP2PSession({reason:"decline",reasonDescription:"force JVB121"}),e=!0):e=!0,!isNaN(this.p2pEstablishmentDuration)&&!isNaN(this.jvbEstablishmentDuration)){const i=this.p2pEstablishmentDuration-this.jvbEstablishmentDuration;Be.sendAnalytics("ice.establishment.duration.diff",{value:i})}r.isP2P===this.isP2PActive()&&this.eventEmitter.emit(Ne),e||(this._setP2PStatus(!0),this.jvbJingleSession?this._removeRemoteJVBTracks():Lt.info("Not removing remote JVB tracks - no session yet"),this._addRemoteP2PTracks(),this.jvbJingleSession&&this._suspendMediaTransferForJvbConnection(),Lt.info("Starting remote stats with p2p connection"),this.statistics.startRemoteStats(this.p2pJingleSession.peerconnection),Be.sendAnalyticsAndLog(Ri("established",{initiator:this.p2pJingleSession.isInitiator})))},Ve.prototype._updateProperties=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e=!jn()(r,this.properties);if(this.properties=r,e){this.eventEmitter.emit(rr,this.properties);const n=this.properties["audio-limit-reached"]==="true",i=this.properties["video-limit-reached"]==="true";this._audioSenderLimitReached!==n&&(this._audioSenderLimitReached=n,this.eventEmitter.emit(he,n),Lt.info(`Audio unmute permissions set by Jicofo to ${n}`)),this._videoSenderLimitReached!==i&&(this._videoSenderLimitReached=i,this.eventEmitter.emit(cr,i),Lt.info(`Video unmute permissions set by Jicofo to ${i}`)),["bridge-count","created-ms"].forEach(s=>{r[s]!==void 0&&Be.analytics.addPermanentProperties({[s.replace("-","_")]:r[s]})})}},Ve.prototype.getProperty=function(r){return this.properties[r]},Ve.prototype._maybeClearDeferredStartP2P=function(){this.deferredStartP2PTask&&(Lt.info("Cleared deferred start P2P task"),clearTimeout(this.deferredStartP2PTask),this.deferredStartP2PTask=null)},Ve.prototype._removeRemoteJVBTracks=function(){this._removeRemoteTracks("JVB",this.jvbJingleSession.peerconnection.getRemoteTracks())},Ve.prototype._removeRemoteP2PTracks=function(){this._removeRemoteTracks("P2P",this.p2pJingleSession.peerconnection.getRemoteTracks())},Ve.prototype._removeRemoteTracks=function(r,e){for(const n of e)Lt.info(`Removing remote ${r} track: ${n}`),this.onRemoteTrackRemoved(n)},Ve.prototype._resumeMediaTransferForJvbConnection=function(){Lt.info("Resuming media transfer over the JVB connection..."),this.jvbJingleSession.setMediaTransferActive(!0,!0).then(()=>{Lt.info("Resumed media transfer over the JVB connection!")},r=>{Lt.error("Failed to resume media transfer over the JVB connection:",r)})},Ve.prototype._setP2PStatus=function(r){if(this.p2p!==r){if(this.p2p=r,r){Lt.info("Peer to peer connection established!"),Be.analytics.addPermanentProperties({p2pFailed:!1,forceJvb121:!1});const e=this.getLastN()!==0;this.p2pJingleSession.setMediaTransferActive(!0,e).catch(n=>{Lt.error(`Failed to sync up P2P video transfer status(${e})`,n)})}else Lt.info("Peer to peer connection closed!");this.jvbJingleSession&&this.statistics.sendConnectionResumeOrHoldEvent(this.jvbJingleSession.peerconnection,!r),this.dtmfManager=null,this.eventEmitter.emit(tn,this,this.p2p),this.eventEmitter.emit(k,this._getActiveMediaSession()),this.eventEmitter.emit(this.isConnectionInterrupted()?De:ht)}else Lt.debug(`Called _setP2PStatus with the same status: ${r}`)},Ve.prototype._startP2PSession=function(r){if(this._maybeClearDeferredStartP2P(),this.p2pJingleSession)return void Lt.error("P2P session already started!");this.isP2PConnectionInterrupted=!1,this.p2pJingleSession=this.xmpp.connection.jingle.newP2PJingleSession(this.room.myroomjid,r),Lt.info("Created new P2P JingleSession",this.room.myroomjid,r),this._sendConferenceJoinAnalyticsEvent(),this.p2pJingleSession.initialize(this.room,this.rtc,this._signalingLayer,fn(Ft({},this.options.config),{enableInsertableStreams:this.isE2EEEnabled()})),Lt.info("Starting CallStats for P2P connection...");let e=qe.Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid);const n=this.participants[e];n&&(e=n.getStatsID()||e),this.statistics.startCallStats(this.p2pJingleSession.peerconnection,e);const i=this.getLocalTracks();this.p2pJingleSession.invite(i)},Ve.prototype._suspendMediaTransferForJvbConnection=function(){Lt.info("Suspending media transfer over the JVB connection..."),this.jvbJingleSession.setMediaTransferActive(!1,!1).then(()=>{Lt.info("Suspended media transfer over the JVB connection !")},r=>{Lt.error("Failed to suspend media transfer over the JVB connection:",r)})},Ve.prototype._maybeStartOrStopP2P=function(r){if(!this.isP2PEnabled()||this.isP2PTestModeEnabled()||E.isFirefox()||E.isWebKitBased()||this.isE2EEEnabled())return void Lt.info("Auto P2P disabled");const e=this.getParticipants(),n=e.length,i=this._shouldBeInP2PMode();if(!i&&this.deferredStartP2PTask&&this._maybeClearDeferredStartP2P(),!this.p2pJingleSession&&i){const s=n&&e[0],c=this.myUserId(),u=s.getId();if(c>u)return void Lt.debug("I'm the bigger peersId - the other peer should start P2P",c,u);if(c===u)return void Lt.error("The same IDs ? ",c,u);const b=s.getJid();if(r){if(this.deferredStartP2PTask)return void Lt.error("Deferred start P2P task's been set already!");Lt.info(`Will start P2P with: ${b} after ${this.backToP2PDelay} seconds...`),this.deferredStartP2PTask=setTimeout(this._startP2PSession.bind(this,b),1e3*this.backToP2PDelay)}else Lt.info(`Will start P2P with: ${b}`),this._startP2PSession(b)}else this.p2pJingleSession&&!i&&(Lt.info(`Will stop P2P with: ${this.p2pJingleSession.remoteJid}`),this.p2pJingleSession.isInitiator&&n>1&&Be.sendAnalyticsAndLog(Ri("switch.to.jvb")),this._stopP2PSession())},Ve.prototype._shouldBeInP2PMode=function(){const r=this.getParticipants(),e=r.length,n=r.find(s=>s.getBotType()==="poltergeist"||s.hasFeature(Lc))!==void 0,i=e===1&&!n;return Lt.debug(`P2P? peerCount: ${e}, hasBotPeer: ${n} => ${i}`),i},Ve.prototype._stopP2PSession=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{reason:e="success",reasonDescription:n="Turning off P2P session",requestRestart:i=!1}=r;if(!this.p2pJingleSession)return void Lt.error("No P2P session to be stopped!");const s=this.isP2PActive();s&&(this.jvbJingleSession&&!i&&this._resumeMediaTransferForJvbConnection(),this._removeRemoteP2PTracks()),Lt.info("Stopping remote stats for P2P connection"),this.statistics.stopRemoteStats(this.p2pJingleSession.peerconnection),Lt.info("Stopping CallStats for P2P connection"),this.statistics.stopCallStats(this.p2pJingleSession.peerconnection),this.p2pJingleSession.terminate(()=>{Lt.info("P2P session terminate RESULT")},c=>{e!=="success"&&Lt.error("An error occurred while trying to terminate P2P Jingle session",c)},{reason:e,reasonDescription:n,sendSessionTerminate:this.room&&this.getParticipantById(qe.Strophe.getResourceFromJid(this.p2pJingleSession.remoteJid))}),this.p2pJingleSession=null,this._setP2PStatus(!1),s&&(this.jvbJingleSession&&!i?this._addRemoteJVBTracks():Lt.info("Not adding remote JVB tracks - no session yet"))},Ve.prototype._updateRoomPresence=function(r,e){if(!r)return;if(e){if(e.skip)return;e.skip=!0}const n=r.peerconnection.getLocalTracks(Xe),i=r.peerconnection.getLocalTracks(Rt);let s=!1;if(n&&n.length?s=this._setTrackMuteStatus(Xe,n[0],n[0].isMuted()):this._setTrackMuteStatus(Xe,void 0,!0)&&(s=!0),i&&i.length){const c=this._setTrackMuteStatus(Rt,i[0],i[0].isMuted()),u=this._setNewVideoType(i[0]);s=s||c||u}else{const c=this._setTrackMuteStatus(Rt,void 0,!0),u=this._setNewVideoType();s=s||c||u}s&&this.room.sendPresence()},Ve.prototype.isP2PActive=function(){return this.p2p},Ve.prototype.getP2PConnectionState=function(){return this.isP2PActive()?this.p2pJingleSession.peerconnection.getConnectionState():null},Ve.prototype.setDesktopSharingFrameRate=function(r){return typeof r!="number"||isNaN(r)?(Lt.error(`Invalid value ${r} specified for desktop capture frame rate`),!1):(this._desktopSharingFrameRate=r,this.jvbJingleSession&&this.jvbJingleSession.peerconnection.setDesktopSharingFrameRate(r),this.rtc.setDesktopSharingFrameRate(r),!0)},Ve.prototype.startP2PSession=function(){const r=this.getParticipants();if(r.length!==1)throw new Error("There must be exactly 1 participant to start the P2P session !");{const e=r[0].getJid();this._startP2PSession(e)}},Ve.prototype.stopP2PSession=function(r){this._stopP2PSession(r)},Ve.prototype.getSpeakerStats=function(){return this.speakerStatsCollector.getStats()},Ve.prototype.sendFacialExpression=function(r){this.xmpp.sendFacialExpressionEvent(this.room.roomjid,r)},Ve.prototype.setReceiverConstraints=function(r){this.receiveVideoController.setReceiverConstraints(r)},Ve.prototype.setReceiverVideoConstraint=function(r){this.receiveVideoController.setPreferredReceiveMaxFrameHeight(r)},Ve.prototype.setSenderVideoConstraint=function(r){return this.sendVideoController.setPreferredSendMaxFrameHeight(r)},Ve.prototype.createVideoSIPGWSession=function(r,e){return this.room?this.videoSIPGWHandler.createVideoSIPGWSession(r,e):new Error(Rl)},Ve.prototype._sendConferenceJoinAnalyticsEvent=function(){const r=this.getMeetingUniqueId();!this._conferenceJoinAnalyticsEventSent&&r&&this.getActivePeerConnection()!==null&&(Be.sendAnalytics(ui("joined",{meetingId:r,participantId:`${r}.${this._statsCurrentId}`})),this._conferenceJoinAnalyticsEventSent=Date.now())},Ve.prototype._sendConferenceLeftAnalyticsEvent=function(){const r=this.getMeetingUniqueId();r&&this._conferenceJoinAnalyticsEventSent&&Be.sendAnalytics(ui("left",{meetingId:r,participantId:`${r}.${this._statsCurrentId}`,stats:{duration:Math.floor((Date.now()-this._conferenceJoinAnalyticsEventSent)/1e3),perf:this.getPerformanceStats()}}))},Ve.prototype._restartMediaSessions=function(){this.p2pJingleSession&&this._stopP2PSession({reasonDescription:"restart",requestRestart:!0}),this.jvbJingleSession&&this.jvbJingleSession.terminate(null,r=>{Lt.warn("An error occurred while trying to terminate the JVB session",r)},{reason:"success",reasonDescription:"restart required",requestRestart:!0,sendSessionTerminate:!0}),this._maybeStartOrStopP2P(!1)},Ve.prototype.isE2EEEnabled=function(){return Boolean(this._e2eEncryption&&this._e2eEncryption.isEnabled())},Ve.prototype.isE2EESupported=function(){return Dr.isSupported(this.options.config)},Ve.prototype.toggleE2EE=function(r){this.isE2EESupported()?this._e2eEncryption.setEnabled(r):Lt.warn("Cannot enable / disable E2EE: platform is not supported.")},Ve.prototype.setMediaEncryptionKey=function(r){this._e2eEncryption.setEncryptionKey(r)},Ve.prototype.isLobbySupported=function(){return Boolean(this.room&&this.room.getLobby().isSupported())},Ve.prototype.isMembersOnly=function(){return Boolean(this.room&&this.room.membersOnlyEnabled)},Ve.prototype.enableLobby=function(){return this.room&&this.isModerator()?this.room.getLobby().enable():Promise.reject(new Error("The conference not started or user is not moderator"))},Ve.prototype.disableLobby=function(){this.room&&this.isModerator()?this.room.getLobby().disable():Lt.warn(`Failed to disable lobby, ${this.room?"":"not in a room, "}${this.isModerator()?"":"participant is not a moderator"}`)},Ve.prototype.joinLobby=function(r,e){return this.room?this.room.getLobby().join(r,e):Promise.reject(new Error("The conference not started"))},Ve.prototype.lobbyDenyAccess=function(r){this.room&&this.room.getLobby().denyAccess(r)},Ve.prototype.lobbyApproveAccess=function(r){this.room&&this.room.getLobby().approveAccess(r)},Ve.prototype.isAVModerationSupported=function(){return Boolean(this.room&&this.room.getAVModeration().isSupported())},Ve.prototype.enableAVModeration=function(r){this.room&&this.isModerator()&&(r===Xe||r===Rt)?this.room.getAVModeration().enable(!0,r):Lt.warn(`Failed to enable AV moderation, ${this.room?"":"not in a room, "}${this.isModerator()?"":"participant is not a moderator, "}${this.room&&this.isModerator()?"wrong media type passed":""}`)},Ve.prototype.disableAVModeration=function(r){this.room&&this.isModerator()&&(r===Xe||r===Rt)?this.room.getAVModeration().enable(!1,r):Lt.warn(`Failed to disable AV moderation, ${this.room?"":"not in a room, "}${this.isModerator()?"":"participant is not a moderator, "}${this.room&&this.isModerator()?"wrong media type passed":""}`)},Ve.prototype.avModerationApprove=function(r,e){if(this.room&&this.isModerator()&&(r===Xe||r===Rt)){const n=this.getParticipantById(e);if(!n)return;this.room.getAVModeration().approve(r,n.getJid())}else Lt.warn(`AV moderation approve skipped , ${this.room?"":"not in a room, "}${this.isModerator()?"":"participant is not a moderator, "}${this.room&&this.isModerator()?"wrong media type passed":""}`)},Ve.prototype.avModerationReject=function(r,e){if(this.room&&this.isModerator()&&(r===Xe||r===Rt)){const n=this.getParticipantById(e);if(!n)return;this.room.getAVModeration().reject(r,n.getJid())}else Lt.warn(`AV moderation reject skipped , ${this.room?"":"not in a room, "}${this.isModerator()?"":"participant is not a moderator, "}${this.room&&this.isModerator()?"wrong media type passed":""}`)},Ve.prototype.getBreakoutRooms=function(){var r;return(r=this.room)===null||r===void 0?void 0:r.getBreakoutRooms()},ii.prototype.connect=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.xmpp.connect(r.id,r.password)},ii.prototype.attach=function(r){this.xmpp.attach(r)},ii.prototype.disconnect=function(){return this.xmpp.disconnect(...arguments)},ii.prototype.getJid=function(){return this.xmpp.getJid()},ii.prototype.setToken=function(r){this.token=r},ii.prototype.initJitsiConference=function(r,e){return new Ve({name:r,config:e,connection:this})},ii.prototype.addEventListener=function(r,e){this.xmpp.addListener(r,e)},ii.prototype.removeEventListener=function(r,e){this.xmpp.removeListener(r,e)},ii.prototype.getConnectionTimes=function(){return this.xmpp.connectionTimes},ii.prototype.addFeature=function(r){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.xmpp.caps.addFeature(r,e,!0)},ii.prototype.removeFeature=function(r){let e=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.xmpp.caps.removeFeature(r,e,!0)},ii.prototype.getLogs=function(){const r=this.xmpp.getJingleLog(),e={};e.time=new Date,e.url=window.location.href,e.ua=navigator.userAgent;const n=this.xmpp.getXmppLog();return n&&(e.xmpp=n),r.metadata=e,r};const Pl="mediaDevices.devicechange",Ol="rtc.permissions_changed",Dl="mediaDevices.permissionPromptIsShown",Ml="mediaDevices.slowGetUserMedia",La="microphone",xa="camera",ka=new class{constructor(){this._eventEmitter=new(on()),this._permissions={},Vn.addListener(Mt().DEVICE_LIST_CHANGED,r=>this._eventEmitter.emit(Pl,r)),Vn.addListener(Mt().DEVICE_LIST_AVAILABLE,r=>this._logOutputDevice(this.getAudioOutputDevice(),r)),Vn.addListener(Mt().PERMISSIONS_CHANGED,r=>this._handlePermissionsChange(r)),this._permissionsApiSupported=new Promise(r=>{if(!navigator.permissions)return void r(!1);const e=this,n=[];n.push(navigator.permissions.query({name:xa}).then(i=>(this._handlePermissionsChange({[Rt]:this._parsePermissionState(i)}),i.onchange=function(){try{e._handlePermissionsChange({[Rt]:e._parsePermissionState(this)})}catch(s){}},!0)).catch(()=>!1)),n.push(navigator.permissions.query({name:La}).then(i=>(this._handlePermissionsChange({[Xe]:this._parsePermissionState(i)}),i.onchange=function(){try{e._handlePermissionsChange({[Xe]:e._parsePermissionState(this)})}catch(s){}},!0)).catch(()=>!1)),Promise.all(n).then(i=>r(i.every(s=>s)))})}_parsePermissionState(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const e=r.state||r.status;if(typeof e!="string")throw new TypeError;return e==="granted"}_handlePermissionsChange(r){[Xe,Rt].some(e=>e in r&&r[e]!==this._permissions[e])&&(this._permissions=Ft(Ft({},this._permissions),r),this._eventEmitter.emit(Ol,this._permissions),(this._permissions[Xe]||this._permissions[Rt])&&this.enumerateDevices(()=>{}))}_logOutputDevice(r,e){const n=e.find(i=>i.kind==="audiooutput"&&i.deviceId===r);n&&Be.sendActiveDeviceListEvent(Vn.getEventDataForActiveDevice(n))}enumerateDevices(r){Vn.enumerateDevices(r)}isDeviceListAvailable(){return Vn.isDeviceListAvailable()}isDeviceChangeAvailable(r){return Vn.isDeviceChangeAvailable(r)}isDevicePermissionGranted(r){return new Promise(e=>{r in this._permissions?e(this._permissions[r]):this._permissionsApiSupported.then(n=>{if(!n)return void e(!1);const i=[];switch(r){case Rt:i.push(navigator.permissions.query({name:xa}));break;case Xe:i.push(navigator.permissions.query({name:La}));break;default:i.push(navigator.permissions.query({name:xa})),i.push(navigator.permissions.query({name:La}))}Promise.all(i).then(s=>e(s.every(c=>{try{return this._parsePermissionState(c)}catch(u){return!1}})),()=>e(!1))})})}isMultipleAudioInputSupported(){return!(E.isFirefox()||E.isIosBrowser())}getAudioOutputDevice(){return Vn.getAudioOutputDevice()}setAudioOutputDevice(r){return Vn.getCurrentlyAvailableMediaDevices().length>0&&this._logOutputDevice(r,Vn.getCurrentlyAvailableMediaDevices()),Vn.setAudioOutputDevice(r)}addEventListener(r,e){this._eventEmitter.addListener(r,e)}removeEventListener(r,e){this._eventEmitter.removeListener(r,e)}emitEvent(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];this._eventEmitter.emit(r,...n)}},qu=(0,P.getLogger)("modules/detection/ActiveDeviceDetector.js");function Nl(r){for(const e of r)e.stopStream()}const Do="connection-error-encountered",Ll="session-initiate",xl="session-terminate",kl=(0,P.getLogger)("modules/proxyconnection/ProxyConnectionPC.js");class $u{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._options=Ft({pcConfig:{},isInitiator:!1,receiveAudio:!1,receiveVideo:!1},e),this._tracks=[],this._peerConnection=null,this._onError=this._onError.bind(this),this._onRemoteStream=this._onRemoteStream.bind(this),this._onSendMessage=this._onSendMessage.bind(this)}getPeerJid(){return this._options.peerJid}processMessage(e){switch(e.attr("action")){case"session-accept":this._onSessionAccept(e);break;case Ll:this._onSessionInitiate(e);break;case xl:this._onSessionTerminate(e);break;case"transport-info":this._onTransportInfo(e)}}start(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];this._peerConnection||(this._tracks=this._tracks.concat(e),this._peerConnection=this._createPeerConnection(),this._peerConnection.invite(e))}stop(){this._peerConnection&&this._peerConnection.terminate(),this._onSessionTerminate()}_createPeerConnection(){const e={connected:!0,jingle:{terminate:()=>{}},sendIQ:this._onSendMessage,addEventListener:()=>()=>{}},n=Ft({iceServers:Nc},this._options.pcConfig),i={addPresenceListener:()=>{},connectionTimes:[],eventEmitter:{emit:u=>{switch(u){case Je().CONNECTION_ICE_FAILED:case Je().CONNECTION_FAILED:this._onError(Do,u)}}},getMediaPresenceInfo:()=>({}),removePresenceListener:()=>{},supportsRestartByTerminate:()=>!1};this._rtc=new Vn({myUserId:()=>""},{}),this._rtc.addListener(Mt().REMOTE_TRACK_ADDED,this._onRemoteStream);const s=new Ss(void 0,void 0,this._options.peerJid,e,{offerToReceiveAudio:this._options.receiveAudio,offerToReceiveVideo:this._options.receiveVideo},n,!0,this._options.isInitiator),c=new Il;return c.setChatRoom(i),s.initialize(i,this._rtc,c,{}),s}_onError(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";this._options.onError(this._options.peerJid,e,n)}_onRemoteStream(e){this._tracks.push(e),this._options.onRemoteStream(e)}_onSendMessage(e){this._options.onSendMessage(this._options.peerJid,e)}_onSessionAccept(e){this._peerConnection?this._peerConnection.setAnswer(e):kl.error("Received an answer when no peer connection exists.")}_onSessionInitiate(e){this._peerConnection?kl.error("Received an offer when an offer was already sent."):(this._peerConnection=this._createPeerConnection(),this._peerConnection.acceptOffer(e,()=>{},()=>this._onError(this._options.peerJid,Do,"session initiate error")))}_onSessionTerminate(){this._tracks.forEach(e=>e.dispose()),this._tracks=[],this._peerConnection&&this._peerConnection.onTerminated(),this._rtc&&(this._rtc.removeListener(Mt().REMOTE_TRACK_ADDED,this._onRemoteStream),this._rtc.destroy())}_onTransportInfo(e){this._peerConnection.addIceCandidates(e)}}const Mo=(0,P.getLogger)("modules/proxyconnection/ProxyConnectionService.js"),Ba="preCallTestResults",Bl=new(on());let Ua=!1,No=null;const Wu={init:function(r){return fr(this,null,function*(){if(Ua)throw new Error("Precall Test already initialized");const{callStatsID:e,callStatsSecret:n,disableThirdPartyRequests:i}=r;if(!e||!n||i)throw new Error("Callstats is disabled");return yield function(s){if(!E.isReactNative())return new Promise(c=>{Q().loadScript(s.callStatsCustomScriptUrl||dr,!0,!0,void 0,c)})}(r),No=new window.callstats,function(s){return new Promise((c,u)=>{const b=s.callStatsID,L=s.callStatsSecret,N=s.statisticsId||s.statisticsDisplayName||fi.callStatsUserName;No.initialize(b,L,N,(X,de)=>{X==="success"?(No.on(Ba,function(){for(var Ie=arguments.length,$e=new Array(Ie),ut=0;ut<Ie;ut++)$e[ut]=arguments[ut];Bl.emit(Ba,...$e)}),Ua=!0,c()):u({status:X,message:de})},null,{disablePrecalltest:!0})})}(r)})},execute:function(){return Ua?new Promise((r,e)=>{Bl.on(Ba,(n,i)=>{n==="success"?r(i):e({status:n,payload:i})}),No.makePrecallTest()}):Promise.reject("uninitialized")}};var zu=o(4424),Yu=o.n(zu);const Ul=(0,P.getLogger)("modules/webaudio/AudioMixer.js");class Xu{constructor(){this._started=!1,this._streamsToMix=[],this._streamMSSArray=[]}addMediaStream(e){e.getAudioTracks()||Ul.warn("Added MediaStream doesn't contain audio tracks."),this._streamsToMix.push(e)}start(){if(this._started)return this._mixedMSD.stream;if(this._audioContext=al(),!this._streamsToMix.length)return Ul.warn("No MediaStream's added to AudioMixer, nothing will happen."),null;this._started=!0,this._mixedMSD=this._audioContext.createMediaStreamDestination();for(const e of this._streamsToMix){const n=this._audioContext.createMediaStreamSource(e);n.connect(this._mixedMSD),this._streamMSSArray.push(n)}return this._mixedMSD.stream}reset(){this._started=!1,this._streamsToMix=[];for(const e of this._streamMSSArray)e.disconnect();this._streamMSSArray=[],this._audioContext&&(this._audioContext=void 0)}}const rs=z().getLogger("JitsiMeetJS.js");function Fa(r){const e={audio_requested:r.devices.includes("audio"),video_requested:r.devices.includes("video"),screen_sharing_requested:r.devices.includes("desktop")};return e.video_requested&&(e.resolution=r.resolution),e}const Zu=function(r){return typeof window.JitsiMeetJS=="object"?Object.assign({},window.JitsiMeetJS,r):r}({version:"a336f670",JitsiConnection:ii,ProxyConnectionService:class{constructor(){const i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{jitsiConnection:e}=i,n=ro(i,["jitsiConnection"]);this._options=Ft({pcConfig:e&&e.xmpp.connection.jingle.p2pIceConfig},n),this._peerConnection=null,this._onFatalError=this._onFatalError.bind(this),this._onSendMessage=this._onSendMessage.bind(this),this._onRemoteStream=this._onRemoteStream.bind(this)}processMessage(r){const e=r.from;if(!e)return;if(this._peerConnection&&this._peerConnection.getPeerJid()!==e)return void this._onFatalError(e,Do,"rejected");const n=this._convertStringToXML(r.data.iq),i=n&&n.find("jingle"),s=i&&i.attr("action");s===Ll&&(this._peerConnection=this._createPeerConnection(e,{isInitiator:!1,receiveVideo:!0})),this._peerConnection&&this._peerConnection.processMessage(i),s!==Do&&s!=="unavailable"&&s!==xl||this._selfCloseConnection()}start(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];this._peerConnection=this._createPeerConnection(r,{isInitiator:!0,receiveVideo:!1}),this._peerConnection.start(e)}stop(){this._peerConnection&&this._peerConnection.stop(),this._peerConnection=null}_convertStringToXML(r){try{const e=new DOMParser().parseFromString(r,"text/xml");return $(e)}catch(e){return Mo.error("Attempted to convert incorrectly formatted xml"),null}}_createPeerConnection(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!r)throw new Error("Cannot create ProxyConnectionPC without a peer.");const n=Ft({pcConfig:this._options.pcConfig,onError:this._onFatalError,onRemoteStream:this._onRemoteStream,onSendMessage:this._onSendMessage,peerJid:r},e);return new $u(n)}_onFatalError(r,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";Mo.error("Received a proxy connection error",r,e,n);const i=(0,qe.$iq)({to:r,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:e}).c("details").t(n).up();this._onSendMessage(r,i),this._peerConnection&&this._peerConnection.getPeerJid()===r&&this._selfCloseConnection()}_onRemoteStream(r){if(!this._options.onRemoteStream)return Mo.error("Remote track received without callback."),void r.dispose();const e=r.isVideoTrack();let n;e&&(n=this._options.convertVideoToDesktop?Nn().DESKTOP:Nn().CAMERA);const i=r.getOriginalStream(),s=Vn.createLocalTracks([{deviceId:`proxy:${this._peerConnection.getPeerJid()}`,mediaType:e?Rt:Xe,sourceType:"proxy",stream:i,track:i.getVideoTracks()[0],videoType:n}]);this._options.onRemoteStream(s[0])}_onSendMessage(r,e){if(this._options.onSendMessage)try{const n=new XMLSerializer().serializeToString(e.nodeTree||e);this._options.onSendMessage(r,{iq:n})}catch(n){Mo.error("Attempted to send an incorrectly formatted iq.")}}_selfCloseConnection(){this.stop(),this._options.onConnectionClosed&&this._options.onConnectionClosed()}},constants:{participantConnectionStatus:kr,recording:{error:{BUSY:"busy",ERROR:"error",RESOURCE_CONSTRAINT:"resource-constraint",UNEXPECTED_REQUEST:"unexpected-request",SERVICE_UNAVAILABLE:"service-unavailable"},mode:{FILE:"file",STREAM:"stream"},status:{OFF:"off",ON:"on",PENDING:"pending"}},sipVideoGW:U,transcriptionStatus:A},events:{conference:v,connection:h,detection:O,track:j,mediaDevices:G,connectionQuality:I,e2eping:x},errors:{conference:l,connection:g,track:m},errorTypes:{JitsiTrackError:Qn},logLevels:z().levels,mediaDevices:ka,analytics:Be.analytics,init(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fi.init(r.externalStorage),Be.init(r),Mr.init(r.flags||{}),window.connectionTimes||(window.connectionTimes={}),r.enableAnalyticsLogging!==!0&&(rs.warn("Analytics disabled, disposing."),this.analytics.dispose()),r.enableWindowOnErrorHandler&&w().addHandler(this.getGlobalOnErrorHandler.bind(this)),this.version){const e={id:"component_version",component:"lib-jitsi-meet",version:this.version};Be.sendLog(JSON.stringify(e))}return Vn.init(r)},isDesktopSharingEnabled:()=>Vn.isDesktopSharingEnabled(),isWebRtcSupported:()=>Vn.isWebRtcSupported(),setLogLevel(r){z().setLogLevel(r)},setLogLevelById(r,e){z().setLogLevelById(r,e)},addGlobalLogTransport(r){z().addGlobalTransport(r)},removeGlobalLogTransport(r){z().removeGlobalTransport(r)},setGlobalLogOptions(r){z().setGlobalOptions(r)},createLocalTracks(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=!1;const u=r,{firePermissionPromptIsShownEvent:i,fireSlowPromiseEvent:s}=u,c=ro(u,["firePermissionPromptIsShownEvent","fireSlowPromiseEvent"]);return!i&&!e||Vn.arePermissionsGrantedForAvailableDevices()?s&&window.setTimeout(()=>{n||ka.emitEvent(Ml)},1e3):ka.emitEvent(Dl,E.getName()),window.connectionTimes||(window.connectionTimes={}),window.connectionTimes["obtainPermissions.start"]=window.performance.now(),Vn.obtainAudioAndVideoPermissions(c).then(b=>{if(n=!0,window.connectionTimes["obtainPermissions.end"]=window.performance.now(),Be.sendAnalytics(qr("success",Fa(c))),!Vn.options.disableAudioLevels)for(let N=0;N<b.length;N++){const X=b[N],de=X.getOriginalStream();X.getType()===Xe&&(Be.startLocalStats(de,X.setAudioLevel.bind(X)),X.addEventListener(cs,()=>{Be.stopLocalStats(de)}))}const L=Vn.getCurrentlyAvailableMediaDevices();if(L)for(let N=0;N<b.length;N++)b[N]._setRealDeviceIdFromDeviceList(L);for(const N of b)N.type===Rt&&N.videoType==="desktop"&&this.setVideoTrackContentHints(N.track,"detail");return b}).catch(b=>{if(n=!0,b.name===en){const L={id:"screensharing_user_canceled",message:b.message};Be.sendLog(JSON.stringify(L)),Be.sendAnalytics(qr("warning",{reason:"extension install user canceled"}))}else if(b.name===hn){const L={id:"usermedia_missing_device",status:b.gum.devices};Be.sendLog(JSON.stringify(L));const N=Fa(r);N.reason="device not found",N.devices=b.gum.devices.join("."),Be.sendAnalytics(qr("error",N))}else{Be.sendGetUserMediaFailed(b);const L=Fa(r);L.reason=b.name,Be.sendAnalytics(qr("error",L))}return window.connectionTimes["obtainPermissions.end"]=window.performance.now(),Promise.reject(b)})},createTrackVADEmitter:(r,e,n)=>Ro.create(r,e,n),createAudioMixer:()=>new Xu,getActiveAudioDevice:()=>new Promise(r=>{Vn.enumerateDevices(e=>{const n=e.filter(s=>s.kind==="audioinput"),i=[];for(const s of n){const c=Vn.obtainAudioAndVideoPermissions({devices:["audio"],micDeviceId:s.deviceId}).then(u=>{const b=u[0],L=b.getOriginalStream();return Be.startLocalStats(L,b.setAudioLevel.bind(b)),b.addEventListener(cs,()=>{Be.stopLocalStats(L)}),b});i.push(c)}Promise.allSettled(i).then(s=>{const c=s.filter(N=>N.status==="fulfilled"),u=s.filter(N=>N.status==="rejected"),b=c.map(N=>N.value),L=u.map(N=>N.value);for(const N of L)qu.error("Failed to acquire audio device with error: ",N);for(const N of b)N.on(Oi,X=>{X>.008&&(Nl(b),r({deviceId:N.deviceId,deviceLabel:N.track.label}))});setTimeout(()=>{Nl(b),r({deviceId:"",deviceLabel:""})},3e3)})})}),isDeviceListAvailable(){return rs.warn("This method is deprecated, use JitsiMeetJS.mediaDevices.isDeviceListAvailable instead"),this.mediaDevices.isDeviceListAvailable()},isDeviceChangeAvailable(r){return rs.warn("This method is deprecated, use JitsiMeetJS.mediaDevices.isDeviceChangeAvailable instead"),this.mediaDevices.isDeviceChangeAvailable(r)},isMultipleAudioInputSupported(){return this.mediaDevices.isMultipleAudioInputSupported()},isCollectingLocalStats:()=>Be.audioLevelsEnabled&&dt.isLocalStatsSupported(),enumerateDevices(r){rs.warn("This method is deprecated, use JitsiMeetJS.mediaDevices.enumerateDevices instead"),this.mediaDevices.enumerateDevices(r)},getGlobalOnErrorHandler(r,e,n,i,s){rs.error(`UnhandledError: ${r}`,`Script: ${e}`,`Line: ${n}`,`Column: ${i}`,"StackTrace: ",s),Be.reportGlobalError(s)},setNetworkInfo(r){let{isOnline:e}=r;Uo.updateNetworkInfo({isOnline:e})},setVideoTrackContentHints(r,e){"contentHint"in r?(r.contentHint=e,r.contentHint!==e&&rs.debug("Invalid video track contentHint")):rs.debug("MediaStreamTrack contentHint attribute not supported")},precallTest:Wu,util:{AuthUtil:Yu(),ScriptUtil:Q(),browser:E}})},9755:function(S,d,o){S.exports=function(){"use strict";var l=o.g!==void 0?o.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{};function v(f){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},v(f)}var m=function(f,D){var H=(65535&f)+(65535&D);return(f>>16)+(D>>16)+(H>>16)<<16|65535&H},y=function(f){if(typeof f!="string")throw new Error("str2binl was passed a non-string");for(var D=[],H=0;H<8*f.length;H+=8)D[H>>5]|=(255&f.charCodeAt(H/8))<<H%32;return D},j=function(f,D,H,q,he,Ae){return m((ce=m(m(D,f),m(q,Ae)))<<(Se=he)|ce>>>32-Se,H);var ce,Se},h=function(f,D,H,q,he,Ae,ce){return j(D&H|~D&q,f,D,he,Ae,ce)},g=function(f,D,H,q,he,Ae,ce){return j(D&q|H&~q,f,D,he,Ae,ce)},A=function(f,D,H,q,he,Ae,ce){return j(D^H^q,f,D,he,Ae,ce)},I=function(f,D,H,q,he,Ae,ce){return j(H^(D|~q),f,D,he,Ae,ce)},O=function(f,D){f[D>>5]|=128<<D%32,f[14+(D+64>>>9<<4)]=D;for(var H,q,he,Ae,ce=1732584193,Se=-271733879,Re=-1732584194,T=271733878,B=0;B<f.length;B+=16)H=ce,q=Se,he=Re,Ae=T,ce=h(ce,Se,Re,T,f[B+0],7,-680876936),T=h(T,ce,Se,Re,f[B+1],12,-389564586),Re=h(Re,T,ce,Se,f[B+2],17,606105819),Se=h(Se,Re,T,ce,f[B+3],22,-1044525330),ce=h(ce,Se,Re,T,f[B+4],7,-176418897),T=h(T,ce,Se,Re,f[B+5],12,1200080426),Re=h(Re,T,ce,Se,f[B+6],17,-1473231341),Se=h(Se,Re,T,ce,f[B+7],22,-45705983),ce=h(ce,Se,Re,T,f[B+8],7,1770035416),T=h(T,ce,Se,Re,f[B+9],12,-1958414417),Re=h(Re,T,ce,Se,f[B+10],17,-42063),Se=h(Se,Re,T,ce,f[B+11],22,-1990404162),ce=h(ce,Se,Re,T,f[B+12],7,1804603682),T=h(T,ce,Se,Re,f[B+13],12,-40341101),Re=h(Re,T,ce,Se,f[B+14],17,-1502002290),Se=h(Se,Re,T,ce,f[B+15],22,1236535329),ce=g(ce,Se,Re,T,f[B+1],5,-165796510),T=g(T,ce,Se,Re,f[B+6],9,-1069501632),Re=g(Re,T,ce,Se,f[B+11],14,643717713),Se=g(Se,Re,T,ce,f[B+0],20,-373897302),ce=g(ce,Se,Re,T,f[B+5],5,-701558691),T=g(T,ce,Se,Re,f[B+10],9,38016083),Re=g(Re,T,ce,Se,f[B+15],14,-660478335),Se=g(Se,Re,T,ce,f[B+4],20,-405537848),ce=g(ce,Se,Re,T,f[B+9],5,568446438),T=g(T,ce,Se,Re,f[B+14],9,-1019803690),Re=g(Re,T,ce,Se,f[B+3],14,-187363961),Se=g(Se,Re,T,ce,f[B+8],20,1163531501),ce=g(ce,Se,Re,T,f[B+13],5,-1444681467),T=g(T,ce,Se,Re,f[B+2],9,-51403784),Re=g(Re,T,ce,Se,f[B+7],14,1735328473),Se=g(Se,Re,T,ce,f[B+12],20,-1926607734),ce=A(ce,Se,Re,T,f[B+5],4,-378558),T=A(T,ce,Se,Re,f[B+8],11,-2022574463),Re=A(Re,T,ce,Se,f[B+11],16,1839030562),Se=A(Se,Re,T,ce,f[B+14],23,-35309556),ce=A(ce,Se,Re,T,f[B+1],4,-1530992060),T=A(T,ce,Se,Re,f[B+4],11,1272893353),Re=A(Re,T,ce,Se,f[B+7],16,-155497632),Se=A(Se,Re,T,ce,f[B+10],23,-1094730640),ce=A(ce,Se,Re,T,f[B+13],4,681279174),T=A(T,ce,Se,Re,f[B+0],11,-358537222),Re=A(Re,T,ce,Se,f[B+3],16,-722521979),Se=A(Se,Re,T,ce,f[B+6],23,76029189),ce=A(ce,Se,Re,T,f[B+9],4,-640364487),T=A(T,ce,Se,Re,f[B+12],11,-421815835),Re=A(Re,T,ce,Se,f[B+15],16,530742520),Se=A(Se,Re,T,ce,f[B+2],23,-995338651),ce=I(ce,Se,Re,T,f[B+0],6,-198630844),T=I(T,ce,Se,Re,f[B+7],10,1126891415),Re=I(Re,T,ce,Se,f[B+14],15,-1416354905),Se=I(Se,Re,T,ce,f[B+5],21,-57434055),ce=I(ce,Se,Re,T,f[B+12],6,1700485571),T=I(T,ce,Se,Re,f[B+3],10,-1894986606),Re=I(Re,T,ce,Se,f[B+10],15,-1051523),Se=I(Se,Re,T,ce,f[B+1],21,-2054922799),ce=I(ce,Se,Re,T,f[B+8],6,1873313359),T=I(T,ce,Se,Re,f[B+15],10,-30611744),Re=I(Re,T,ce,Se,f[B+6],15,-1560198380),Se=I(Se,Re,T,ce,f[B+13],21,1309151649),ce=I(ce,Se,Re,T,f[B+4],6,-145523070),T=I(T,ce,Se,Re,f[B+11],10,-1120210379),Re=I(Re,T,ce,Se,f[B+2],15,718787259),Se=I(Se,Re,T,ce,f[B+9],21,-343485551),ce=m(ce,H),Se=m(Se,q),Re=m(Re,he),T=m(T,Ae);return[ce,Se,Re,T]},x={hexdigest:function(f){return function(D){for(var H="0123456789abcdef",q="",he=0;he<4*D.length;he++)q+=H.charAt(D[he>>2]>>he%4*8+4&15)+H.charAt(D[he>>2]>>he%4*8&15);return q}(O(y(f),8*f.length))},hash:function(f){return function(D){for(var H="",q=0;q<32*D.length;q+=8)H+=String.fromCharCode(D[q>>5]>>>q%32&255);return H}(O(y(f),8*f.length))}};function U(f,D){f[D>>5]|=128<<24-D%32,f[15+(D+64>>9<<4)]=D;var H,q,he,Ae,ce,Se,Re,T,B=new Array(80),Y=1732584193,fe=-271733879,Ne=-1732584194,De=271733878,ht=-1009589776;for(H=0;H<f.length;H+=16){for(Ae=Y,ce=fe,Se=Ne,Re=De,T=ht,q=0;q<80;q++)B[q]=q<16?f[H+q]:pe(B[q-3]^B[q-8]^B[q-14]^B[q-16],1),he=ue(ue(pe(Y,5),G(q,fe,Ne,De)),ue(ue(ht,B[q]),P(q))),ht=De,De=Ne,Ne=pe(fe,30),fe=Y,Y=he;Y=ue(Y,Ae),fe=ue(fe,ce),Ne=ue(Ne,Se),De=ue(De,Re),ht=ue(ht,T)}return[Y,fe,Ne,De,ht]}function G(f,D,H,q){return f<20?D&H|~D&q:f<40?D^H^q:f<60?D&H|D&q|H&q:D^H^q}function P(f){return f<20?1518500249:f<40?1859775393:f<60?-1894007588:-899497514}function z(f,D){var H=Me(f);H.length>16&&(H=U(H,8*f.length));for(var q=new Array(16),he=new Array(16),Ae=0;Ae<16;Ae++)q[Ae]=909522486^H[Ae],he[Ae]=1549556828^H[Ae];var ce=U(q.concat(Me(D)),512+8*D.length);return U(he.concat(ce),672)}function ue(f,D){var H=(65535&f)+(65535&D);return(f>>16)+(D>>16)+(H>>16)<<16|65535&H}function pe(f,D){return f<<D|f>>>32-D}function Me(f){for(var D=[],H=0;H<8*f.length;H+=8)D[H>>5]|=(255&f.charCodeAt(H/8))<<24-H%32;return D}function rt(f){for(var D,H,q="",he=0;he<4*f.length;he+=3)for(D=(f[he>>2]>>8*(3-he%4)&255)<<16|(f[he+1>>2]>>8*(3-(he+1)%4)&255)<<8|f[he+2>>2]>>8*(3-(he+2)%4)&255,H=0;H<4;H++)8*he+6*H>32*f.length?q+="=":q+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(D>>6*(3-H)&63);return q}function be(f){for(var D="",H=0;H<32*f.length;H+=8)D+=String.fromCharCode(f[H>>5]>>>24-H%32&255);return D}var Te={b64_hmac_sha1:function(f,D){return rt(z(f,D))},b64_sha1:function(f){return rt(U(Me(f),8*f.length))},binb2str:be,core_hmac_sha1:z,str_hmac_sha1:function(f,D){return be(z(f,D))},str_sha1:function(f){return be(U(Me(f),8*f.length))}},C=function(f){var D,H,q="",he=f.length;for(D=0;D<he;D++)(H=f.charCodeAt(D))>=0&&H<=127?q+=f.charAt(D):H>2047?(q+=String.fromCharCode(224|H>>12&15),q+=String.fromCharCode(128|H>>6&63),q+=String.fromCharCode(128|H>>0&63)):(q+=String.fromCharCode(192|H>>6&31),q+=String.fromCharCode(128|H>>0&63));return q},st=function(f){for(var D in f=f||{})if(Object.prototype.hasOwnProperty.call(f,D)){var H="",q="",he="",Ae=f[D],ce=v(Ae)==="object",Se=escape(unescape(ce?Ae.value:Ae));ce&&(H=Ae.expires?";expires="+Ae.expires:"",q=Ae.domain?";domain="+Ae.domain:"",he=Ae.path?";path="+Ae.path:""),document.cookie=D+"="+Se+H+q+he}};function _e(f,D){return new ne.Builder(f,D)}function Oe(f){return new ne.Builder("iq",f)}function Ye(f){return new ne.Builder("presence",f)}var ne={VERSION:"@VERSION@",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",FRAMING:"urn:ietf:params:xml:ns:xmpp-framing",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag:function(f){for(var D=0;D<ne.XHTML.tags.length;D++)if(f===ne.XHTML.tags[D])return!0;return!1},validAttribute:function(f,D){if(ne.XHTML.attributes[f]!==void 0&&ne.XHTML.attributes[f].length>0){for(var H=0;H<ne.XHTML.attributes[f].length;H++)if(D===ne.XHTML.attributes[f][H])return!0}return!1},validCSS:function(f){for(var D=0;D<ne.XHTML.css.length;D++)if(f===ne.XHTML.css[D])return!0;return!1}},Status:{ERROR:0,CONNECTING:1,CONNFAIL:2,AUTHENTICATING:3,AUTHFAIL:4,CONNECTED:5,DISCONNECTED:6,DISCONNECTING:7,ATTACHED:8,REDIRECT:9,CONNTIMEOUT:10,BINDREQUIRED:11},ErrorCondition:{BAD_FORMAT:"bad-format",CONFLICT:"conflict",MISSING_JID_NODE:"x-strophe-bad-non-anon-jid",NO_AUTH_MECH:"no-auth-mech",UNKNOWN_REASON:"unknown"},LogLevel:{DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4},ElementType:{NORMAL:1,TEXT:3,CDATA:4,FRAGMENT:11},TIMEOUT:1.1,SECONDARY_TIMEOUT:.1,addNamespace:function(f,D){ne.NS[f]=D},forEachChild:function(f,D,H){for(var q=0;q<f.childNodes.length;q++){var he=f.childNodes[q];he.nodeType!==ne.ElementType.NORMAL||D&&!this.isTagEqual(he,D)||H(he)}},isTagEqual:function(f,D){return f.tagName===D},_xmlGenerator:null,_makeGenerator:function(){var f;return document.implementation.createDocument===void 0||document.implementation.createDocument&&document.documentMode&&document.documentMode<10?(f=this._getIEXmlDom()).appendChild(f.createElement("strophe")):f=document.implementation.createDocument("jabber:client","strophe",null),f},xmlGenerator:function(){return ne._xmlGenerator||(ne._xmlGenerator=ne._makeGenerator()),ne._xmlGenerator},_getIEXmlDom:function(){for(var f=null,D=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"],H=0;H<D.length&&f===null;H++)try{f=new ActiveXObject(D[H])}catch(q){f=null}return f},xmlElement:function(f){if(!f)return null;for(var D=ne.xmlGenerator().createElement(f),H=1;H<arguments.length;H++){var q=arguments[H];if(q){if(typeof q=="string"||typeof q=="number")D.appendChild(ne.xmlTextNode(q));else if(v(q)==="object"&&typeof q.sort=="function")for(var he=0;he<q.length;he++){var Ae=q[he];v(Ae)==="object"&&typeof Ae.sort=="function"&&Ae[1]!==void 0&&Ae[1]!==null&&D.setAttribute(Ae[0],Ae[1])}else if(v(q)==="object")for(var ce in q)Object.prototype.hasOwnProperty.call(q,ce)&&q[ce]!==void 0&&q[ce]!==null&&D.setAttribute(ce,q[ce])}}return D},xmlescape:function(f){return(f=(f=(f=(f=f.replace(/\&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/'/g,"'")).replace(/"/g,""")},xmlunescape:function(f){return(f=(f=(f=(f=f.replace(/\&/g,"&")).replace(/</g,"<")).replace(/>/g,">")).replace(/'/g,"'")).replace(/"/g,'"')},xmlTextNode:function(f){return ne.xmlGenerator().createTextNode(f)},xmlHtmlNode:function(f){var D;return DOMParser?D=new DOMParser().parseFromString(f,"text/xml"):((D=new ActiveXObject("Microsoft.XMLDOM")).async="false",D.loadXML(f)),D},getText:function(f){if(!f)return null;var D="";f.childNodes.length===0&&f.nodeType===ne.ElementType.TEXT&&(D+=f.nodeValue);for(var H=0;H<f.childNodes.length;H++)f.childNodes[H].nodeType===ne.ElementType.TEXT&&(D+=f.childNodes[H].nodeValue);return ne.xmlescape(D)},copyElement:function(f){var D;if(f.nodeType===ne.ElementType.NORMAL){D=ne.xmlElement(f.tagName);for(var H=0;H<f.attributes.length;H++)D.setAttribute(f.attributes[H].nodeName,f.attributes[H].value);for(var q=0;q<f.childNodes.length;q++)D.appendChild(ne.copyElement(f.childNodes[q]))}else f.nodeType===ne.ElementType.TEXT&&(D=ne.xmlGenerator().createTextNode(f.nodeValue));return D},createHtml:function(f){var D;if(f.nodeType===ne.ElementType.NORMAL){var H=f.nodeName.toLowerCase();if(ne.XHTML.validTag(H))try{D=ne.xmlElement(H);for(var q=0;q<ne.XHTML.attributes[H].length;q++){var he=ne.XHTML.attributes[H][q],Ae=f.getAttribute(he);if(Ae!=null&&Ae!==""&&Ae!==!1&&Ae!==0)if(he==="style"&&v(Ae)==="object"&&Ae.cssText!==void 0&&(Ae=Ae.cssText),he==="style"){for(var ce=[],Se=Ae.split(";"),Re=0;Re<Se.length;Re++){var T=Se[Re].split(":"),B=T[0].replace(/^\s*/,"").replace(/\s*$/,"").toLowerCase();if(ne.XHTML.validCSS(B)){var Y=T[1].replace(/^\s*/,"").replace(/\s*$/,"");ce.push(B+": "+Y)}}ce.length>0&&(Ae=ce.join("; "),D.setAttribute(he,Ae))}else D.setAttribute(he,Ae)}for(var fe=0;fe<f.childNodes.length;fe++)D.appendChild(ne.createHtml(f.childNodes[fe]))}catch(ht){D=ne.xmlTextNode("")}else{D=ne.xmlGenerator().createDocumentFragment();for(var Ne=0;Ne<f.childNodes.length;Ne++)D.appendChild(ne.createHtml(f.childNodes[Ne]))}}else if(f.nodeType===ne.ElementType.FRAGMENT){D=ne.xmlGenerator().createDocumentFragment();for(var De=0;De<f.childNodes.length;De++)D.appendChild(ne.createHtml(f.childNodes[De]))}else f.nodeType===ne.ElementType.TEXT&&(D=ne.xmlTextNode(f.nodeValue));return D},escapeNode:function(f){return typeof f!="string"?f:f.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/\"/g,"\\22").replace(/\&/g,"\\26").replace(/\'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(/</g,"\\3c").replace(/>/g,"\\3e").replace(/@/g,"\\40")},unescapeNode:function(f){return typeof f!="string"?f:f.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")},getNodeFromJid:function(f){return f.indexOf("@")<0?null:f.split("@")[0]},getDomainFromJid:function(f){var D=ne.getBareJidFromJid(f);if(D.indexOf("@")<0)return D;var H=D.split("@");return H.splice(0,1),H.join("@")},getResourceFromJid:function(f){if(!f)return null;var D=f.split("/");return D.length<2?null:(D.splice(0,1),D.join("/"))},getBareJidFromJid:function(f){return f?f.split("/")[0]:null},_handleError:function(f){f.stack!==void 0&&ne.fatal(f.stack),f.sourceURL?ne.fatal("error: "+this.handler+" "+f.sourceURL+":"+f.line+" - "+f.name+": "+f.message):f.fileName?ne.fatal("error: "+this.handler+" "+f.fileName+":"+f.lineNumber+" - "+f.name+": "+f.message):ne.fatal("error: "+f.message)},log:function(f,D){f===this.LogLevel.FATAL&&v(window.console)==="object"&&typeof window.console.error=="function"&&window.console.error(D)},debug:function(f){this.log(this.LogLevel.DEBUG,f)},info:function(f){this.log(this.LogLevel.INFO,f)},warn:function(f){this.log(this.LogLevel.WARN,f)},error:function(f){this.log(this.LogLevel.ERROR,f)},fatal:function(f){this.log(this.LogLevel.FATAL,f)},serialize:function(f){if(!f)return null;typeof f.tree=="function"&&(f=f.tree());var D=function(Ae){return function(ce){if(Array.isArray(ce)){for(var Se=0,Re=new Array(ce.length);Se<ce.length;Se++)Re[Se]=ce[Se];return Re}}(Ae)||function(ce){if(Symbol.iterator in Object(ce)||Object.prototype.toString.call(ce)==="[object Arguments]")return Array.from(ce)}(Ae)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(Array(f.attributes.length).keys()).map(function(Ae){return f.attributes[Ae].nodeName});D.sort();var H=D.reduce(function(Ae,ce){return"".concat(Ae," ").concat(ce,'="').concat(ne.xmlescape(f.attributes.getNamedItem(ce).value),'"')},"<".concat(f.nodeName));if(f.childNodes.length>0){H+=">";for(var q=0;q<f.childNodes.length;q++){var he=f.childNodes[q];switch(he.nodeType){case ne.ElementType.NORMAL:H+=ne.serialize(he);break;case ne.ElementType.TEXT:H+=ne.xmlescape(he.nodeValue);break;case ne.ElementType.CDATA:H+="<![CDATA["+he.nodeValue+"]]>"}}H+="</"+f.nodeName+">"}else H+="/>";return H},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(f,D){ne._connectionPlugins[f]=D},Builder:function(f,D){f!=="presence"&&f!=="message"&&f!=="iq"||(D&&!D.xmlns?D.xmlns=ne.NS.CLIENT:D||(D={xmlns:ne.NS.CLIENT})),this.nodeTree=ne.xmlElement(f,D),this.node=this.nodeTree}};ne.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return ne.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},root:function(){return this.node=this.nodeTree,this},attrs:function(f){for(var D in f)Object.prototype.hasOwnProperty.call(f,D)&&(f[D]===void 0?this.node.removeAttribute(D):this.node.setAttribute(D,f[D]));return this},c:function(f,D,H){var q=ne.xmlElement(f,D,H);return this.node.appendChild(q),typeof H!="string"&&typeof H!="number"&&(this.node=q),this},cnode:function(f){var D,H=ne.xmlGenerator();try{D=H.importNode!==void 0}catch(he){D=!1}var q=D?H.importNode(f,!0):ne.copyElement(f);return this.node.appendChild(q),this.node=q,this},t:function(f){var D=ne.xmlTextNode(f);return this.node.appendChild(D),this},h:function(f){var D=document.createElement("body");D.innerHTML=f;for(var H=ne.createHtml(D);H.childNodes.length>0;)this.node.appendChild(H.childNodes[0]);return this}},ne.Handler=function(f,D,H,q,he,Ae,ce){this.handler=f,this.ns=D,this.name=H,this.type=q,this.id=he,this.options=ce||{matchBareFromJid:!1,ignoreNamespaceFragment:!1},this.options.matchBare&&(ne.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.'),this.options.matchBareFromJid=this.options.matchBare,delete this.options.matchBare),this.options.matchBareFromJid?this.from=Ae?ne.getBareJidFromJid(Ae):null:this.from=Ae,this.user=!0},ne.Handler.prototype={getNamespace:function(f){var D=f.getAttribute("xmlns");return D&&this.options.ignoreNamespaceFragment&&(D=D.split("#")[0]),D},namespaceMatch:function(f){var D=this,H=!1;return!this.ns||(ne.forEachChild(f,null,function(q){D.getNamespace(q)===D.ns&&(H=!0)}),H||this.getNamespace(f)===this.ns)},isMatch:function(f){var D=f.getAttribute("from");this.options.matchBareFromJid&&(D=ne.getBareJidFromJid(D));var H=f.getAttribute("type");return!(!this.namespaceMatch(f)||this.name&&!ne.isTagEqual(f,this.name)||this.type&&(Array.isArray(this.type)?this.type.indexOf(H)===-1:H!==this.type)||this.id&&f.getAttribute("id")!==this.id||this.from&&D!==this.from)},run:function(f){var D=null;try{D=this.handler(f)}catch(H){throw ne._handleError(H),H}return D},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},ne.TimedHandler=function(f,D){this.period=f,this.handler=D,this.lastCalled=new Date().getTime(),this.user=!0},ne.TimedHandler.prototype={run:function(){return this.lastCalled=new Date().getTime(),this.handler()},reset:function(){this.lastCalled=new Date().getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},ne.Connection=function(f,D){var H=this;this.service=f,this.options=D||{};var q=this.options.protocol||"";for(var he in f.indexOf("ws:")===0||f.indexOf("wss:")===0||q.indexOf("ws")===0?this._proto=new ne.Websocket(this):this._proto=new ne.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.protocolErrorHandlers={HTTP:{},websocket:{}},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(function(){return H._onIdle()},100),st(this.options.cookies),this.registerSASLMechanisms(this.options.mechanisms),ne._connectionPlugins)if(Object.prototype.hasOwnProperty.call(ne._connectionPlugins,he)){var Ae=function(){};Ae.prototype=ne._connectionPlugins[he],this[he]=new Ae,this[he].init(this)}},ne.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(f){var D="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(H){var q=16*Math.random()|0;return(H==="x"?q:3&q|8).toString(16)});return typeof f=="string"||typeof f=="number"?D+":"+f:D+""},addProtocolErrorHandler:function(f,D,H){this.protocolErrorHandlers[f][D]=H},connect:function(f,D,H,q,he,Ae,ce){this.jid=f,this.authzid=ne.getBareJidFromJid(this.jid),this.authcid=ce||ne.getNodeFromJid(this.jid),this.pass=D,this.servtype="xmpp",this.connect_callback=H,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=ne.getDomainFromJid(this.jid),this._changeConnectStatus(ne.Status.CONNECTING,null),this._proto._connect(q,he,Ae)},attach:function(f,D,H,q,he,Ae,ce){if(!(this._proto instanceof ne.Bosh)){var Se=new Error('The "attach" method can only be used with a BOSH connection.');throw Se.name="StropheSessionError",Se}this._proto._attach(f,D,H,q,he,Ae,ce)},restore:function(f,D,H,q,he){if(!this._sessionCachingSupported()){var Ae=new Error('The "restore" method can only be used with a BOSH connection.');throw Ae.name="StropheSessionError",Ae}this._proto._restore(f,D,H,q,he)},_sessionCachingSupported:function(){if(this._proto instanceof ne.Bosh){if(!JSON)return!1;try{sessionStorage.setItem("_strophe_","_strophe_"),sessionStorage.removeItem("_strophe_")}catch(f){return!1}return!0}return!1},xmlInput:function(f){},xmlOutput:function(f){},rawInput:function(f){},rawOutput:function(f){},nextValidRid:function(f){},send:function(f){if(f!==null){if(typeof f.sort=="function")for(var D=0;D<f.length;D++)this._queueData(f[D]);else typeof f.tree=="function"?this._queueData(f.tree()):this._queueData(f);this._proto._send()}},flush:function(){clearTimeout(this._idleTimeout),this._onIdle()},sendPresence:function(f,D,H,q){var he=this,Ae=null;typeof f.tree=="function"&&(f=f.tree());var ce=f.getAttribute("id");if(ce||(ce=this.getUniqueId("sendPresence"),f.setAttribute("id",ce)),typeof D=="function"||typeof H=="function"){var Se=this.addHandler(function(Re){Ae&&he.deleteTimedHandler(Ae),Re.getAttribute("type")==="error"?H&&H(Re):D&&D(Re)},null,"presence",null,ce);q&&(Ae=this.addTimedHandler(q,function(){return he.deleteHandler(Se),H&&H(null),!1}))}return this.send(f),ce},sendIQ:function(f,D,H,q){var he=this,Ae=null;typeof f.tree=="function"&&(f=f.tree());var ce=f.getAttribute("id");if(ce||(ce=this.getUniqueId("sendIQ"),f.setAttribute("id",ce)),typeof D=="function"||typeof H=="function"){var Se=this.addHandler(function(Re){Ae&&he.deleteTimedHandler(Ae);var T=Re.getAttribute("type");if(T==="result")D&&D(Re);else{if(T!=="error"){var B=new Error("Got bad IQ type of ".concat(T));throw B.name="StropheError",B}H&&H(Re)}},null,"iq",["error","result"],ce);q&&(Ae=this.addTimedHandler(q,function(){return he.deleteHandler(Se),H&&H(null),!1}))}return this.send(f),ce},_queueData:function(f){if(f===null||!f.tagName||!f.childNodes){var D=new Error("Cannot queue non-DOMElement.");throw D.name="StropheError",D}this._data.push(f)},_sendRestart:function(){var f=this;this._data.push("restart"),this._proto._sendRestart(),this._idleTimeout=setTimeout(function(){return f._onIdle()},100)},addTimedHandler:function(f,D){var H=new ne.TimedHandler(f,D);return this.addTimeds.push(H),H},deleteTimedHandler:function(f){this.removeTimeds.push(f)},addHandler:function(f,D,H,q,he,Ae,ce){var Se=new ne.Handler(f,D,H,q,he,Ae,ce);return this.addHandlers.push(Se),Se},deleteHandler:function(f){this.removeHandlers.push(f);var D=this.addHandlers.indexOf(f);D>=0&&this.addHandlers.splice(D,1)},registerSASLMechanisms:function(f){this.mechanisms={},(f=f||[ne.SASLAnonymous,ne.SASLExternal,ne.SASLMD5,ne.SASLOAuthBearer,ne.SASLXOAuth2,ne.SASLPlain,ne.SASLSHA1]).forEach(this.registerSASLMechanism.bind(this))},registerSASLMechanism:function(f){this.mechanisms[f.prototype.name]=f},disconnect:function(f){if(this._changeConnectStatus(ne.Status.DISCONNECTING,f),ne.warn("Disconnect was called because: "+f),this.connected){var D=!1;this.disconnecting=!0,this.authenticated&&(D=Ye({xmlns:ne.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(D)}else ne.warn("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests(),this._doDisconnect()},_changeConnectStatus:function(f,D,H){for(var q in ne._connectionPlugins)if(Object.prototype.hasOwnProperty.call(ne._connectionPlugins,q)){var he=this[q];if(he.statusChanged)try{he.statusChanged(f,D)}catch(Ae){ne.error("".concat(q," plugin caused an exception changing status: ").concat(Ae))}}if(this.connect_callback)try{this.connect_callback(f,D,H)}catch(Ae){ne._handleError(Ae),ne.error("User connection callback caused an exception: ".concat(Ae))}},_doDisconnect:function(f){typeof this._idleTimeout=="number"&&clearTimeout(this._idleTimeout),this._disconnectTimeout!==null&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),ne.debug("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(ne.Status.DISCONNECTED,f),this.connected=!1},_dataRecv:function(f,D){var H=this;ne.debug("_dataRecv called");var q=this._proto._reqToData(f);if(q!==null){for(this.xmlInput!==ne.Connection.prototype.xmlInput&&(q.nodeName===this._proto.strip&&q.childNodes.length?this.xmlInput(q.childNodes[0]):this.xmlInput(q)),this.rawInput!==ne.Connection.prototype.rawInput&&(D?this.rawInput(D):this.rawInput(ne.serialize(q)));this.removeHandlers.length>0;){var he=this.removeHandlers.pop(),Ae=this.handlers.indexOf(he);Ae>=0&&this.handlers.splice(Ae,1)}for(;this.addHandlers.length>0;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())this._doDisconnect();else{var ce=q.getAttribute("type");if(ce!==null&&ce==="terminate"){if(this.disconnecting)return;var Se=q.getAttribute("condition"),Re=q.getElementsByTagName("conflict");return Se!==null?(Se==="remote-stream-error"&&Re.length>0&&(Se="conflict"),this._changeConnectStatus(ne.Status.CONNFAIL,Se)):this._changeConnectStatus(ne.Status.CONNFAIL,ne.ErrorCondition.UNKOWN_REASON),void this._doDisconnect(Se)}ne.forEachChild(q,null,function(T){var B=H.handlers;H.handlers=[];for(var Y=0;Y<B.length;Y++){var fe=B[Y];try{(!fe.isMatch(T)||!H.authenticated&&fe.user||fe.run(T))&&H.handlers.push(fe)}catch(Ne){ne.warn("Removing Strophe handlers due to uncaught exception: "+Ne.message)}}})}}},mechanisms:{},_connect_cb:function(f,D,H){var q;ne.debug("_connect_cb was called"),this.connected=!0;try{q=this._proto._reqToData(f)}catch(Re){if(Re.name!==ne.ErrorCondition.BAD_FORMAT)throw Re;this._changeConnectStatus(ne.Status.CONNFAIL,ne.ErrorCondition.BAD_FORMAT),this._doDisconnect(ne.ErrorCondition.BAD_FORMAT)}if(q&&(this.xmlInput!==ne.Connection.prototype.xmlInput&&(q.nodeName===this._proto.strip&&q.childNodes.length?this.xmlInput(q.childNodes[0]):this.xmlInput(q)),this.rawInput!==ne.Connection.prototype.rawInput&&(H?this.rawInput(H):this.rawInput(ne.serialize(q))),this._proto._connect_cb(q)!==ne.Status.CONNFAIL))if(q.getElementsByTagNameNS?q.getElementsByTagNameNS(ne.NS.STREAM,"features").length>0:q.getElementsByTagName("stream:features").length>0||q.getElementsByTagName("features").length>0){var he=[],Ae=q.getElementsByTagName("mechanism");if(Ae.length>0)for(var ce=0;ce<Ae.length;ce++){var Se=ne.getText(Ae[ce]);this.mechanisms[Se]&&he.push(this.mechanisms[Se])}he.length!==0||q.getElementsByTagName("auth").length!==0?this.do_authentication!==!1&&this.authenticate(he):this._proto._no_auth_received(D)}else this._proto._no_auth_received(D)},sortMechanismsByPriority:function(f){for(var D=0;D<f.length-1;++D){for(var H=D,q=D+1;q<f.length;++q)f[q].prototype.priority>f[H].prototype.priority&&(H=q);if(H!==D){var he=f[D];f[D]=f[H],f[H]=he}}return f},authenticate:function(f){this._attemptSASLAuth(f)||this._attemptLegacyAuth()},_attemptSASLAuth:function(f){f=this.sortMechanismsByPriority(f||[]);for(var D=!1,H=0;H<f.length;++H)if(f[H].prototype.test(this)){this._sasl_success_handler=this._addSysHandler(this._sasl_success_cb.bind(this),null,"success",null,null),this._sasl_failure_handler=this._addSysHandler(this._sasl_failure_cb.bind(this),null,"failure",null,null),this._sasl_challenge_handler=this._addSysHandler(this._sasl_challenge_cb.bind(this),null,"challenge",null,null),this._sasl_mechanism=new f[H],this._sasl_mechanism.onStart(this);var q=_e("auth",{xmlns:ne.NS.SASL,mechanism:this._sasl_mechanism.name});if(this._sasl_mechanism.isClientFirst){var he=this._sasl_mechanism.onChallenge(this,null);q.t(btoa(he))}this.send(q.tree()),D=!0;break}return D},_sasl_challenge_cb:function(f){var D=atob(ne.getText(f)),H=this._sasl_mechanism.onChallenge(this,D),q=_e("response",{xmlns:ne.NS.SASL});return H!==""&&q.t(btoa(H)),this.send(q.tree()),!0},_attemptLegacyAuth:function(){ne.getNodeFromJid(this.jid)===null?(this._changeConnectStatus(ne.Status.CONNFAIL,ne.ErrorCondition.MISSING_JID_NODE),this.disconnect(ne.ErrorCondition.MISSING_JID_NODE)):(this._changeConnectStatus(ne.Status.AUTHENTICATING,null),this._addSysHandler(this._onLegacyAuthIQResult.bind(this),null,null,null,"_auth_1"),this.send(Oe({type:"get",to:this.domain,id:"_auth_1"}).c("query",{xmlns:ne.NS.AUTH}).c("username",{}).t(ne.getNodeFromJid(this.jid)).tree()))},_onLegacyAuthIQResult:function(f){var D=Oe({type:"set",id:"_auth_2"}).c("query",{xmlns:ne.NS.AUTH}).c("username",{}).t(ne.getNodeFromJid(this.jid)).up().c("password").t(this.pass);return ne.getResourceFromJid(this.jid)||(this.jid=ne.getBareJidFromJid(this.jid)+"/strophe"),D.up().c("resource",{}).t(ne.getResourceFromJid(this.jid)),this._addSysHandler(this._auth2_cb.bind(this),null,null,null,"_auth_2"),this.send(D.tree()),!1},_sasl_success_cb:function(f){var D=this;if(this._sasl_data["server-signature"]){var H,q=atob(ne.getText(f)).match(/([a-z]+)=([^,]+)(,|$)/);if(q[1]==="v"&&(H=q[2]),H!==this._sasl_data["server-signature"])return this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_data={},this._sasl_failure_cb(null)}ne.info("SASL authentication succeeded."),this._sasl_mechanism&&this._sasl_mechanism.onSuccess(),this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null);var he=[],Ae=function(ce,Se){for(;ce.length;)D.deleteHandler(ce.pop());return D._onStreamFeaturesAfterSASL(Se),!1};return he.push(this._addSysHandler(function(ce){return Ae(he,ce)},null,"stream:features",null,null)),he.push(this._addSysHandler(function(ce){return Ae(he,ce)},ne.NS.STREAM,"features",null,null)),this._sendRestart(),!1},_onStreamFeaturesAfterSASL:function(f){this.features=f;for(var D=0;D<f.childNodes.length;D++){var H=f.childNodes[D];H.nodeName==="bind"&&(this.do_bind=!0),H.nodeName==="session"&&(this.do_session=!0)}return this.do_bind?(this.options.explicitResourceBinding?this._changeConnectStatus(ne.Status.BINDREQUIRED,null):this.bind(),!1):(this._changeConnectStatus(ne.Status.AUTHFAIL,null),!1)},bind:function(){if(this.do_bind){this._addSysHandler(this._onResourceBindResultIQ.bind(this),null,null,null,"_bind_auth_2");var f=ne.getResourceFromJid(this.jid);f?this.send(Oe({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:ne.NS.BIND}).c("resource",{}).t(f).tree()):this.send(Oe({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:ne.NS.BIND}).tree())}else ne.log(ne.LogLevel.INFO,'Strophe.Connection.prototype.bind called but "do_bind" is false')},_onResourceBindResultIQ:function(f){var D;if(f.getAttribute("type")==="error")return ne.warn("Resource binding failed."),f.getElementsByTagName("conflict").length>0&&(D=ne.ErrorCondition.CONFLICT),this._changeConnectStatus(ne.Status.AUTHFAIL,D,f),!1;var H=f.getElementsByTagName("bind");if(!(H.length>0))return ne.warn("Resource binding failed."),this._changeConnectStatus(ne.Status.AUTHFAIL,null,f),!1;var q=H[0].getElementsByTagName("jid");q.length>0&&(this.jid=ne.getText(q[0]),this.do_session?this._establishSession():(this.authenticated=!0,this._changeConnectStatus(ne.Status.CONNECTED,null)))},_establishSession:function(){if(!this.do_session)throw new Error("Strophe.Connection.prototype._establishSession "+"called but apparently ".concat(ne.NS.SESSION," wasn't advertised by the server"));this._addSysHandler(this._onSessionResultIQ.bind(this),null,null,null,"_session_auth_2"),this.send(Oe({type:"set",id:"_session_auth_2"}).c("session",{xmlns:ne.NS.SESSION}).tree())},_onSessionResultIQ:function(f){if(f.getAttribute("type")==="result")this.authenticated=!0,this._changeConnectStatus(ne.Status.CONNECTED,null);else if(f.getAttribute("type")==="error")return ne.warn("Session creation failed."),this._changeConnectStatus(ne.Status.AUTHFAIL,null,f),!1;return!1},_sasl_failure_cb:function(f){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(ne.Status.AUTHFAIL,null,f),!1},_auth2_cb:function(f){return f.getAttribute("type")==="result"?(this.authenticated=!0,this._changeConnectStatus(ne.Status.CONNECTED,null)):f.getAttribute("type")==="error"&&(this._changeConnectStatus(ne.Status.AUTHFAIL,null,f),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(f,D){var H=new ne.TimedHandler(f,D);return H.user=!1,this.addTimeds.push(H),H},_addSysHandler:function(f,D,H,q,he){var Ae=new ne.Handler(f,D,H,q,he);return Ae.user=!1,this.addHandlers.push(Ae),Ae},_onDisconnectTimeout:function(){return ne.debug("_onDisconnectTimeout was called"),this._changeConnectStatus(ne.Status.CONNTIMEOUT,null),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){for(var f=this;this.addTimeds.length>0;)this.timedHandlers.push(this.addTimeds.pop());for(;this.removeTimeds.length>0;){var D=this.removeTimeds.pop(),H=this.timedHandlers.indexOf(D);H>=0&&this.timedHandlers.splice(H,1)}for(var q=new Date().getTime(),he=[],Ae=0;Ae<this.timedHandlers.length;Ae++){var ce=this.timedHandlers[Ae];!this.authenticated&&ce.user||(ce.lastCalled+ce.period-q<=0?ce.run()&&he.push(ce):he.push(ce))}this.timedHandlers=he,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(function(){return f._onIdle()},100))}},ne.SASLMechanism=function(f,D,H){this.name=f,this.isClientFirst=D,this.priority=H},ne.SASLMechanism.prototype={test:function(f){return!0},onStart:function(f){this._connection=f},onChallenge:function(f,D){throw new Error("You should implement challenge handling!")},onFailure:function(){this._connection=null},onSuccess:function(){this._connection=null}},ne.SASLAnonymous=function(){},ne.SASLAnonymous.prototype=new ne.SASLMechanism("ANONYMOUS",!1,20),ne.SASLAnonymous.prototype.test=function(f){return f.authcid===null},ne.SASLPlain=function(){},ne.SASLPlain.prototype=new ne.SASLMechanism("PLAIN",!0,50),ne.SASLPlain.prototype.test=function(f){return f.authcid!==null},ne.SASLPlain.prototype.onChallenge=function(f){var D=f.authzid;return D+="\0",D+=f.authcid,D+="\0",D+=f.pass,C(D)},ne.SASLSHA1=function(){},ne.SASLSHA1.prototype=new ne.SASLMechanism("SCRAM-SHA-1",!0,70),ne.SASLSHA1.prototype.test=function(f){return f.authcid!==null},ne.SASLSHA1.prototype.onChallenge=function(f,D,H){var q=H||x.hexdigest(""+1234567890*Math.random()),he="n="+C(f.authcid);return he+=",r=",he+=q,f._sasl_data.cnonce=q,f._sasl_data["client-first-message-bare"]=he,he="n,,"+he,this.onChallenge=function(Ae,ce){for(var Se,Re,T,B,Y,fe,Ne,De,ht="c=biws,",jt="".concat(Ae._sasl_data["client-first-message-bare"],",").concat(ce,","),Ge=Ae._sasl_data.cnonce,Ue=/([a-z]+)=([^,]+)(,|$)/;ce.match(Ue);){var Ct=ce.match(Ue);switch(ce=ce.replace(Ct[0],""),Ct[1]){case"r":Se=Ct[2];break;case"s":Re=Ct[2];break;case"i":T=Ct[2]}}if(Se.substr(0,Ge.length)!==Ge)return Ae._sasl_data={},Ae._sasl_failure_cb();jt+=ht+="r="+Se,Re=atob(Re),Re+="\0\0\0";var Kt=C(Ae.pass);for(B=fe=Te.core_hmac_sha1(Kt,Re),Ne=1;Ne<T;Ne++){for(Y=Te.core_hmac_sha1(Kt,Te.binb2str(fe)),De=0;De<5;De++)B[De]^=Y[De];fe=Y}B=Te.binb2str(B);var Yt=Te.core_hmac_sha1(B,"Client Key"),Gt=Te.str_hmac_sha1(B,"Server Key"),Bt=Te.core_hmac_sha1(Te.str_sha1(Te.binb2str(Yt)),jt);for(Ae._sasl_data["server-signature"]=Te.b64_hmac_sha1(Gt,jt),De=0;De<5;De++)Yt[De]^=Bt[De];return ht+",p="+btoa(Te.binb2str(Yt))},he},ne.SASLMD5=function(){},ne.SASLMD5.prototype=new ne.SASLMechanism("DIGEST-MD5",!1,60),ne.SASLMD5.prototype.test=function(f){return f.authcid!==null},ne.SASLMD5.prototype._quote=function(f){return'"'+f.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'},ne.SASLMD5.prototype.onChallenge=function(f,D,H){for(var q=/([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/,he=H||x.hexdigest(""+1234567890*Math.random()),Ae="",ce=null,Se="";D.match(q);){var Re=D.match(q);switch(D=D.replace(Re[0],""),Re[2]=Re[2].replace(/^"(.+)"$/,"$1"),Re[1]){case"realm":Ae=Re[2];break;case"nonce":Se=Re[2];break;case"qop":Re[2];break;case"host":ce=Re[2]}}var T=f.servtype+"/"+f.domain;ce!==null&&(T=T+"/"+ce);var B=C(f.authcid+":"+Ae+":"+this._connection.pass),Y=x.hash(B)+":"+Se+":"+he,fe="AUTHENTICATE:"+T,Ne="";return Ne+="charset=utf-8,",Ne+="username="+this._quote(C(f.authcid))+",",Ne+="realm="+this._quote(Ae)+",",Ne+="nonce="+this._quote(Se)+",",Ne+="nc=00000001,",Ne+="cnonce="+this._quote(he)+",",Ne+="digest-uri="+this._quote(T)+",",Ne+="response="+x.hexdigest(x.hexdigest(Y)+":"+Se+":00000001:"+he+":auth:"+x.hexdigest(fe))+",",Ne+="qop=auth",this.onChallenge=function(){return""},Ne},ne.SASLOAuthBearer=function(){},ne.SASLOAuthBearer.prototype=new ne.SASLMechanism("OAUTHBEARER",!0,40),ne.SASLOAuthBearer.prototype.test=function(f){return f.pass!==null},ne.SASLOAuthBearer.prototype.onChallenge=function(f){var D="n,";return f.authcid!==null&&(D=D+"a="+f.authzid),D+=",",D+="",D+="auth=Bearer ",D+=f.pass,D+="",C(D+="")},ne.SASLExternal=function(){},ne.SASLExternal.prototype=new ne.SASLMechanism("EXTERNAL",!0,10),ne.SASLExternal.prototype.onChallenge=function(f){return f.authcid===f.authzid?"":f.authzid},ne.SASLXOAuth2=function(){},ne.SASLXOAuth2.prototype=new ne.SASLMechanism("X-OAUTH2",!0,30),ne.SASLXOAuth2.prototype.test=function(f){return f.pass!==null},ne.SASLXOAuth2.prototype.onChallenge=function(f){var D="\0";return f.authcid!==null&&(D+=f.authzid),D+="\0",D+=f.pass,C(D)};var Ze={Strophe:ne,$build:_e,$iq:Oe,$msg:function(f){return new ne.Builder("message",f)},$pres:Ye,SHA1:Te,MD5:x,b64_hmac_sha1:Te.b64_hmac_sha1,b64_sha1:Te.b64_sha1,str_hmac_sha1:Te.str_hmac_sha1,str_sha1:Te.str_sha1},xe=Ze.Strophe,ct=Ze.$build;xe.Request=function(f,D,H,q){this.id=++xe._requestId,this.xmlData=f,this.data=xe.serialize(f),this.origFunc=D,this.func=D,this.rid=H,this.date=NaN,this.sends=q||0,this.abort=!1,this.dead=null,this.age=function(){return this.date?(new Date-this.date)/1e3:0},this.timeDead=function(){return this.dead?(new Date-this.dead)/1e3:0},this.xhr=this._newXHR()},xe.Request.prototype={getResponse:function(){var f=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if((f=this.xhr.responseXML.documentElement).tagName==="parsererror")throw xe.error("invalid response received"),xe.error("responseText: "+this.xhr.responseText),xe.error("responseXML: "+xe.serialize(this.xhr.responseXML)),new Error("parsererror")}else if(this.xhr.responseText){if(xe.debug("Got responseText but no responseXML; attempting to parse it with DOMParser..."),!(f=new DOMParser().parseFromString(this.xhr.responseText,"application/xml").documentElement))throw new Error("Parsing produced null node");if(f.querySelector("parsererror")){xe.error("invalid response received: "+f.querySelector("parsererror").textContent),xe.error("responseText: "+this.xhr.responseText);var D=new Error;throw D.name=xe.ErrorCondition.BAD_FORMAT,D}}return f},_newXHR:function(){var f=null;return window.XMLHttpRequest?(f=new XMLHttpRequest).overrideMimeType&&f.overrideMimeType("text/xml; charset=utf-8"):window.ActiveXObject&&(f=new ActiveXObject("Microsoft.XMLHTTP")),f.onreadystatechange=this.func.bind(null,this),f}},xe.Bosh=function(f){this._conn=f,this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.hold=1,this.wait=60,this.window=5,this.errors=0,this.inactivity=null,this.lastResponseHeaders=null,this._requests=[]},xe.Bosh.prototype={strip:null,_buildBody:function(){var f=ct("body",{rid:this.rid++,xmlns:xe.NS.HTTPBIND});return this.sid!==null&&f.attrs({sid:this.sid}),this._conn.options.keepalive&&this._conn._sessionCachingSupported()&&this._cacheSession(),f},_reset:function(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.errors=0,this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_connect:function(f,D,H){this.wait=f||this.wait,this.hold=D||this.hold,this.errors=0;var q=this._buildBody().attrs({to:this._conn.domain,"xml:lang":"en",wait:this.wait,hold:this.hold,content:"text/xml; charset=utf-8",ver:"1.6","xmpp:version":"1.0","xmlns:xmpp":xe.NS.BOSH});H&&q.attrs({route:H});var he=this._conn._connect_cb;this._requests.push(new xe.Request(q.tree(),this._onRequestStateChange.bind(this,he.bind(this._conn)),q.tree().getAttribute("rid"))),this._throttledRequestHandler()},_attach:function(f,D,H,q,he,Ae,ce){this._conn.jid=f,this.sid=D,this.rid=H,this._conn.connect_callback=q,this._conn.domain=xe.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=he||this.wait,this.hold=Ae||this.hold,this.window=ce||this.window,this._conn._changeConnectStatus(xe.Status.ATTACHED,null)},_restore:function(f,D,H,q,he){var Ae=JSON.parse(window.sessionStorage.getItem("strophe-bosh-session"));if(!(Ae!=null&&Ae.rid&&Ae.sid&&Ae.jid&&(f==null||xe.getBareJidFromJid(Ae.jid)===xe.getBareJidFromJid(f)||xe.getNodeFromJid(f)===null&&xe.getDomainFromJid(Ae.jid)===f))){var ce=new Error("_restore: no restoreable session.");throw ce.name="StropheSessionError",ce}this._conn.restored=!0,this._attach(Ae.jid,Ae.sid,Ae.rid,D,H,q,he)},_cacheSession:function(){this._conn.authenticated?this._conn.jid&&this.rid&&this.sid&&window.sessionStorage.setItem("strophe-bosh-session",JSON.stringify({jid:this._conn.jid,rid:this.rid,sid:this.sid})):window.sessionStorage.removeItem("strophe-bosh-session")},_connect_cb:function(f){var D=f.getAttribute("type");if(D!==null&&D==="terminate"){var H=f.getAttribute("condition");xe.error("BOSH-Connection failed: "+H);var q=f.getElementsByTagName("conflict");return H!==null?(H==="remote-stream-error"&&q.length>0&&(H="conflict"),this._conn._changeConnectStatus(xe.Status.CONNFAIL,H)):this._conn._changeConnectStatus(xe.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(H),xe.Status.CONNFAIL}this.sid||(this.sid=f.getAttribute("sid"));var he=f.getAttribute("requests");he&&(this.window=parseInt(he,10));var Ae=f.getAttribute("hold");Ae&&(this.hold=parseInt(Ae,10));var ce=f.getAttribute("wait");ce&&(this.wait=parseInt(ce,10));var Se=f.getAttribute("inactivity");Se&&(this.inactivity=parseInt(Se,10))},_disconnect:function(f){this._sendTerminate(f)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_emptyQueue:function(){return this._requests.length===0},_callProtocolErrorHandlers:function(f){var D=this._getRequestStatus(f),H=this._conn.protocolErrorHandlers.HTTP[D];H&&H.call(this,D)},_hitError:function(f){this.errors++,xe.warn("request errored, status: "+f+", number of errors: "+this.errors),this.errors>4&&this._conn._onDisconnectTimeout()},_no_auth_received:function(f){xe.warn("Server did not yet offer a supported authentication mechanism. Sending a blank poll request."),f=f?f.bind(this._conn):this._conn._connect_cb.bind(this._conn);var D=this._buildBody();this._requests.push(new xe.Request(D.tree(),this._onRequestStateChange.bind(this,f),D.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){this._abortAllRequests()},_abortAllRequests:function(){for(;this._requests.length>0;){var f=this._requests.pop();f.abort=!0,f.xhr.abort(),f.xhr.onreadystatechange=function(){}}},_onIdle:function(){var f=this._conn._data;if(this._conn.authenticated&&this._requests.length===0&&f.length===0&&!this._conn.disconnecting&&(xe.debug("no requests during idle cycle, sending blank request"),f.push(null)),!this._conn.paused){if(this._requests.length<2&&f.length>0){for(var D=this._buildBody(),H=0;H<f.length;H++)f[H]!==null&&(f[H]==="restart"?D.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":xe.NS.BOSH}):D.cnode(f[H]).up());delete this._conn._data,this._conn._data=[],this._requests.push(new xe.Request(D.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),D.tree().getAttribute("rid"))),this._throttledRequestHandler()}if(this._requests.length>0){var q=this._requests[0].age();this._requests[0].dead!==null&&this._requests[0].timeDead()>Math.floor(xe.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),q>Math.floor(xe.TIMEOUT*this.wait)&&(xe.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(xe.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}},_getRequestStatus:function(f,D){var H;if(f.xhr.readyState===4)try{H=f.xhr.status}catch(q){xe.error("Caught an error while retrieving a request's status, reqStatus: "+H)}return H===void 0&&(H=typeof D=="number"?D:0),H},_onRequestStateChange:function(f,D){if(xe.debug("request id "+D.id+"."+D.sends+" state changed to "+D.xhr.readyState),D.abort)D.abort=!1;else if(D.xhr.readyState===4){var H=this._getRequestStatus(D);if(this.lastResponseHeaders=D.xhr.getAllResponseHeaders(),this.disconnecting&&H>=400)return this._hitError(H),void this._callProtocolErrorHandlers(D);var q=H>0&&H<500,he=D.sends>this._conn.maxRetries;if((q||he)&&(this._removeRequest(D),xe.debug("request id "+D.id+" should now be removed")),H===200){var Ae=this._requests[0]===D;(this._requests[1]===D||Ae&&this._requests.length>0&&this._requests[0].age()>Math.floor(xe.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(Number(D.rid)+1),xe.debug("request id "+D.id+"."+D.sends+" got 200"),f(D),this.errors=0}else H===0||H>=400&&H<600||H>=12e3?(xe.error("request id "+D.id+"."+D.sends+" error "+H+" happened"),this._hitError(H),this._callProtocolErrorHandlers(D),H>=400&&H<500&&(this._conn._changeConnectStatus(xe.Status.DISCONNECTING,null),this._conn._doDisconnect())):xe.error("request id "+D.id+"."+D.sends+" error "+H+" happened");q||he?he&&!this._conn.connected&&this._conn._changeConnectStatus(xe.Status.CONNFAIL,"giving-up"):this._throttledRequestHandler()}},_processRequest:function(f){var D=this,H=this._requests[f],q=this._getRequestStatus(H,-1);if(H.sends>this._conn.maxRetries)this._conn._onDisconnectTimeout();else{var he=H.age(),Ae=!isNaN(he)&&he>Math.floor(xe.TIMEOUT*this.wait),ce=H.dead!==null&&H.timeDead()>Math.floor(xe.SECONDARY_TIMEOUT*this.wait),Se=H.xhr.readyState===4&&(q<1||q>=500);if((Ae||ce||Se)&&(ce&&xe.error("Request ".concat(this._requests[f].id," timed out (secondary), restarting")),H.abort=!0,H.xhr.abort(),H.xhr.onreadystatechange=function(){},this._requests[f]=new xe.Request(H.xmlData,H.origFunc,H.rid,H.sends),H=this._requests[f]),H.xhr.readyState===0){xe.debug("request id "+H.id+"."+H.sends+" posting");try{var Re=this._conn.options.contentType||"text/xml; charset=utf-8";H.xhr.open("POST",this._conn.service,!this._conn.options.sync),H.xhr.setRequestHeader!==void 0&&H.xhr.setRequestHeader("Content-Type",Re),this._conn.options.withCredentials&&(H.xhr.withCredentials=!0)}catch(Y){return xe.error("XHR open failed: "+Y.toString()),this._conn.connected||this._conn._changeConnectStatus(xe.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}var T=function(){if(H.date=new Date,D._conn.options.customHeaders){var Y=D._conn.options.customHeaders;for(var fe in Y)Object.prototype.hasOwnProperty.call(Y,fe)&&H.xhr.setRequestHeader(fe,Y[fe])}H.xhr.send(H.data)};if(H.sends>1){var B=1e3*Math.min(Math.floor(xe.TIMEOUT*this.wait),Math.pow(H.sends,3));setTimeout(function(){T()},B)}else T();H.sends++,this._conn.xmlOutput!==xe.Connection.prototype.xmlOutput&&(H.xmlData.nodeName===this.strip&&H.xmlData.childNodes.length?this._conn.xmlOutput(H.xmlData.childNodes[0]):this._conn.xmlOutput(H.xmlData)),this._conn.rawOutput!==xe.Connection.prototype.rawOutput&&this._conn.rawOutput(H.data)}else xe.debug("_processRequest: "+(f===0?"first":"second")+" request has readyState of "+H.xhr.readyState)}},_removeRequest:function(f){xe.debug("removing request");for(var D=this._requests.length-1;D>=0;D--)f===this._requests[D]&&this._requests.splice(D,1);f.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(f){var D=this._requests[f];D.dead===null&&(D.dead=new Date),this._processRequest(f)},_reqToData:function(f){try{return f.getResponse()}catch(D){if(D.message!=="parsererror")throw D;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(f){xe.debug("_sendTerminate was called");var D=this._buildBody().attrs({type:"terminate"});f&&D.cnode(f.tree());var H=new xe.Request(D.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),D.tree().getAttribute("rid"));this._requests.push(H),this._throttledRequestHandler()},_send:function(){var f=this;clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(function(){return f._conn._onIdle()},100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?xe.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):xe.debug("_throttledRequestHandler called with undefined requests"),this._requests&&this._requests.length!==0&&(this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid)<this.window&&this._processRequest(1))}};var Qe=Ze.Strophe,re=Ze.$build;return Qe.Websocket=function(f){this._conn=f,this.strip="wrapper";var D=f.service;if(D.indexOf("ws:")!==0&&D.indexOf("wss:")!==0){var H="";f.options.protocol==="ws"&&window.location.protocol!=="https:"?H+="ws":H+="wss",H+="://"+window.location.host,D.indexOf("/")!==0?H+=window.location.pathname+D:H+=D,f.service=H}},Qe.Websocket.prototype={_buildStream:function(){return re("open",{xmlns:Qe.NS.FRAMING,to:this._conn.domain,version:"1.0"})},_check_streamerror:function(f,D){var H;if((H=f.getElementsByTagNameNS?f.getElementsByTagNameNS(Qe.NS.STREAM,"error"):f.getElementsByTagName("stream:error")).length===0)return!1;for(var q=H[0],he="",Ae="",ce=0;ce<q.childNodes.length;ce++){var Se=q.childNodes[ce];if(Se.getAttribute("xmlns")!=="urn:ietf:params:xml:ns:xmpp-streams")break;Se.nodeName==="text"?Ae=Se.textContent:he=Se.nodeName}var Re="WebSocket stream error: ";return Re+=he||"unknown",Ae&&(Re+=" - "+Ae),Qe.error(Re),this._conn._changeConnectStatus(D,he),this._conn._doDisconnect(),!0},_reset:function(){},_connect:function(){this._closeSocket(),this.socket=new WebSocket(this._conn.service,"xmpp"),this.socket.onopen=this._onOpen.bind(this),this.socket.onerror=this._onError.bind(this),this.socket.onclose=this._onClose.bind(this),this.socket.onmessage=this._connect_cb_wrapper.bind(this)},_connect_cb:function(f){if(this._check_streamerror(f,Qe.Status.CONNFAIL))return Qe.Status.CONNFAIL},_handleStreamStart:function(f){var D=!1,H=f.getAttribute("xmlns");typeof H!="string"?D="Missing xmlns in <open />":H!==Qe.NS.FRAMING&&(D="Wrong xmlns in <open />: "+H);var q=f.getAttribute("version");return typeof q!="string"?D="Missing version in <open />":q!=="1.0"&&(D="Wrong version in <open />: "+q),!D||(this._conn._changeConnectStatus(Qe.Status.CONNFAIL,D),this._conn._doDisconnect(),!1)},_connect_cb_wrapper:function(f){if(f.data.indexOf("<open ")===0||f.data.indexOf("<?xml")===0){var D=f.data.replace(/^(<\?.*?\?>\s*)*/,"");if(D==="")return;var H=new DOMParser().parseFromString(D,"text/xml").documentElement;this._conn.xmlInput(H),this._conn.rawInput(f.data),this._handleStreamStart(H)&&this._connect_cb(H)}else if(f.data.indexOf("<close ")===0){var q=new DOMParser().parseFromString(f.data,"text/xml").documentElement;this._conn.xmlInput(q),this._conn.rawInput(f.data);var he=q.getAttribute("see-other-uri");if(he){var Ae=this._conn.service;(Ae.indexOf("wss:")>=0&&he.indexOf("wss:")>=0||Ae.indexOf("ws:")>=0)&&(this._conn._changeConnectStatus(Qe.Status.REDIRECT,"Received see-other-uri, resetting connection"),this._conn.reset(),this._conn.service=he,this._connect())}else this._conn._changeConnectStatus(Qe.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect()}else{var ce=this._streamWrap(f.data),Se=new DOMParser().parseFromString(ce,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(Se,null,f.data)}},_disconnect:function(f){if(this.socket&&this.socket.readyState!==WebSocket.CLOSED){f&&this._conn.send(f);var D=re("close",{xmlns:Qe.NS.FRAMING});this._conn.xmlOutput(D.tree());var H=Qe.serialize(D);this._conn.rawOutput(H);try{this.socket.send(H)}catch(q){Qe.warn("Couldn't send <close /> tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){Qe.debug("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(f){return"<wrapper>"+f+"</wrapper>"},_closeSocket:function(){if(this.socket)try{this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close()}catch(f){Qe.debug(f.message)}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(f){this._conn.connected&&!this._conn.disconnecting?(Qe.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):f&&f.code===1006&&!this._conn.connected&&this.socket?(Qe.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(Qe.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):Qe.debug("Websocket closed")},_no_auth_received:function(f){Qe.error("Server did not offer a supported authentication mechanism"),this._conn._changeConnectStatus(Qe.Status.CONNFAIL,Qe.ErrorCondition.NO_AUTH_MECH),f&&f.call(this._conn),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_abortAllRequests:function(){},_onError:function(f){Qe.error("Websocket error "+f),this._conn._changeConnectStatus(Qe.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._disconnect()},_onIdle:function(){var f=this._conn._data;if(f.length>0&&!this._conn.paused){for(var D=0;D<f.length;D++)if(f[D]!==null){var H;H=f[D]==="restart"?this._buildStream().tree():f[D];var q=Qe.serialize(H);this._conn.xmlOutput(H),this._conn.rawOutput(q),this.socket.send(q)}this._conn._data=[]}},_onMessage:function(f){var D,H='<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';if(f.data===H)return this._conn.rawInput(H),this._conn.xmlInput(f),void(this._conn.disconnecting||this._conn._doDisconnect());if(f.data.search("<open ")===0){if(D=new DOMParser().parseFromString(f.data,"text/xml").documentElement,!this._handleStreamStart(D))return}else{var q=this._streamWrap(f.data);D=new DOMParser().parseFromString(q,"text/xml").documentElement}return this._check_streamerror(D,Qe.Status.ERROR)?void 0:this._conn.disconnecting&&D.firstChild.nodeName==="presence"&&D.firstChild.getAttribute("type")==="unavailable"?(this._conn.xmlInput(D),void this._conn.rawInput(Qe.serialize(D))):void this._conn._dataRecv(D,f.data)},_onOpen:function(){Qe.debug("Websocket open");var f=this._buildStream();this._conn.xmlOutput(f.tree());var D=Qe.serialize(f);this._conn.rawOutput(D),this.socket.send(D)},_reqToData:function(f){return f},_send:function(){this._conn.flush()},_sendRestart:function(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}},l.Strophe=Ze.Strophe,l.$build=Ze.$build,l.$iq=Ze.$iq,l.$msg=Ze.$msg,l.$pres=Ze.$pres,Ze}()},5808:function(S,d,o){(function(l){"use strict";l.Strophe.addConnectionPlugin("disco",{_connection:null,_identities:[],_features:[],_items:[],init:function(v){this._connection=v,this._identities=[],this._features=[],this._items=[],v.addHandler(this._onDiscoInfo.bind(this),l.Strophe.NS.DISCO_INFO,"iq","get",null,null),v.addHandler(this._onDiscoItems.bind(this),l.Strophe.NS.DISCO_ITEMS,"iq","get",null,null)},addIdentity:function(v,m,y,j){for(var h=0;h<this._identities.length;h++)if(this._identities[h].category==v&&this._identities[h].type==m&&this._identities[h].name==y&&this._identities[h].lang==j)return!1;return this._identities.push({category:v,type:m,name:y,lang:j}),!0},addFeature:function(v){for(var m=0;m<this._features.length;m++)if(this._features[m]==v)return!1;return this._features.push(v),!0},removeFeature:function(v){for(var m=0;m<this._features.length;m++)if(this._features[m]===v)return this._features.splice(m,1),!0;return!1},addItem:function(v,m,y,j){return!(y&&!j||(this._items.push({jid:v,name:m,node:y,call_back:j}),0))},info:function(v,m,y,j,h){var g={xmlns:l.Strophe.NS.DISCO_INFO};m&&(g.node=m);var A=l.$iq({from:this._connection.jid,to:v,type:"get"}).c("query",g);this._connection.sendIQ(A,y,j,h)},items:function(v,m,y,j,h){var g={xmlns:l.Strophe.NS.DISCO_ITEMS};m&&(g.node=m);var A=l.$iq({from:this._connection.jid,to:v,type:"get"}).c("query",g);this._connection.sendIQ(A,y,j,h)},_buildIQResult:function(v,m){var y=v.getAttribute("id"),j=v.getAttribute("from"),h=l.$iq({type:"result",id:y});return j!==null&&h.attrs({to:j}),h.c("query",m)},_onDiscoInfo:function(v){var m,y=v.getElementsByTagName("query")[0].getAttribute("node"),j={xmlns:l.Strophe.NS.DISCO_INFO};y&&(j.node=y);var h=this._buildIQResult(v,j);for(m=0;m<this._identities.length;m++)j={category:this._identities[m].category,type:this._identities[m].type},this._identities[m].name&&(j.name=this._identities[m].name),this._identities[m].lang&&(j["xml:lang"]=this._identities[m].lang),h.c("identity",j).up();for(m=0;m<this._features.length;m++)h.c("feature",{var:this._features[m]}).up();return this._connection.send(h.tree()),!0},_onDiscoItems:function(v){var m,y,j={xmlns:l.Strophe.NS.DISCO_ITEMS},h=v.getElementsByTagName("query")[0].getAttribute("node");if(h){for(j.node=h,m=[],y=0;y<this._items.length;y++)if(this._items[y].node==h){m=this._items[y].call_back(v);break}}else m=this._items;var g=this._buildIQResult(v,j);for(y=0;y<m.length;y++){var A={jid:m[y].jid};m[y].name&&(A.name=m[y].name),m[y].node&&(A.node=m[y].node),g.c("item",A).up()}return this._connection.send(g.tree()),!0}})})(o(9755))},6552:function(S,d,o){(function(l){"use strict";l.Strophe.addConnectionPlugin("streamManagement",{logging:!1,autoSendCountOnEveryIncomingStanza:!1,requestResponseInterval:5,_c:null,_NS:"urn:xmpp:sm:3",_isStreamManagementEnabled:!1,_serverProcesssedStanzasCounter:null,_clientProcessedStanzasCounter:null,_clientSentStanzasCounter:null,_originalXMLOutput:null,_requestHandler:null,_incomingHandler:null,_requestResponseIntervalCount:0,_isSupported:!1,_unacknowledgedStanzas:[],_acknowledgedStanzaListeners:[],addAcknowledgedStanzaListener:function(v){this._acknowledgedStanzaListeners.push(v)},enable:function(v){if(!this._isSupported)throw new Error("The server doesn't support urn:xmpp:sm:3 namespace");if(this._connectionStatus!==l.Strophe.Status.CONNECTED)throw new Error("enable() can only be called in the CONNECTED state");this._c.send(l.$build("enable",{xmlns:this._NS,resume:v})),this._c.flush(),this._c.pause()},getResumeToken:function(){return this._resumeToken},isSupported(){return this._isSupported},resume:function(){if(!this.getResumeToken())throw new Error("No resume token");if(this._connectionStatus!==l.Strophe.Status.DISCONNECTED)throw new Error("resume() can only be called in the DISCONNECTED state");this._c.options.explicitResourceBinding=!0,this._resuming=!0,this._originalConnect.apply(this._c,this._connectArgs)},requestAcknowledgement:function(){if(this._connectionStatus!==l.Strophe.Status.CONNECTED)throw new Error("requestAcknowledgement() can only be called in the CONNECTED state");this._requestResponseIntervalCount=0,this._c.send(l.$build("r",{xmlns:this._NS}))},getOutgoingCounter:function(){return this._clientSentStanzasCounter},getIncomingCounter:function(){return this._clientProcessedStanzasCounter},init:function(v){this._c=v,l.Strophe.addNamespace("SM",this._NS),this._originalXMLOutput=this._c.xmlOutput,this._c.xmlOutput=this.xmlOutput.bind(this),this._originalConnect=this._c.connect,this._c.connect=this._interceptConnectArgs.bind(this),this._originalOnStreamFeaturesAfterSASL=this._c._onStreamFeaturesAfterSASL,this._c._onStreamFeaturesAfterSASL=this._onStreamFeaturesAfterSASL.bind(this),this._originalDoDisconnect=this._c._doDisconnect,this._c._doDisconnect=this._interceptDoDisconnect.bind(this),this._originalDisconnect=this._c.disconnect,this._c.disconnect=this._interceptDisconnect.bind(this)},_interceptDisconnect:function(){this._resumeToken=void 0,this._originalDisconnect.apply(this._c,arguments)},_interceptDoDisconnect:function(){this.getResumeToken()&&!this._resuming&&this._c.connected&&!this._c.disconnecting&&(this._resumeState={handlers:this._c.handlers,timedHandlers:this._c.timedHandlers,removeTimeds:this._c.removeTimeds,removeHandlers:this._c.removeHandlers,addTimeds:this._c.addTimeds,addHandlers:this._c.addHandlers},this._storedJid=this._c.jid,this.logging&&l.Strophe.debug("SM stored resume state, handler count: "+this._resumeState.handlers.length)),this._c._data=[],this._originalDoDisconnect.apply(this._c,arguments)},_interceptConnectArgs:function(){this._connectArgs=arguments,this._originalConnect.apply(this._c,arguments)},_onStreamFeaturesAfterSASL:function(v){return this._isSupported=v.getElementsByTagNameNS(this._NS,"sm").length>0,this._originalOnStreamFeaturesAfterSASL.apply(this._c,arguments)},statusChanged:function(v){if(this._connectionStatus=v,this.getResumeToken()||v!==l.Strophe.Status.CONNECTED&&v!==l.Strophe.Status.DISCONNECTED)if(v===l.Strophe.Status.BINDREQUIRED){this._c.jid=this._storedJid;for(const m in this._resumeState)this._c[m]=this._resumeState[m];this._c.send(l.$build("resume",{xmlns:this._NS,h:this._clientProcessedStanzasCounter,previd:this._resumeToken})),this._c.flush()}else v===l.Strophe.Status.ERROR&&(this.logging&&l.Strophe.debug("SM cleared resume token on error"),this._resumeToken=void 0);else this.logging&&l.Strophe.debug("SM reset state"),this._serverProcesssedStanzasCounter=0,this._clientProcessedStanzasCounter=0,this._clientSentStanzasCounter=0,this._isStreamManagementEnabled=!1,this._requestResponseIntervalCount=0,this._resuming=!1,v===l.Strophe.Status.DISCONNECTED&&(this._isSupported=!1),this._unacknowledgedStanzas=[],this._requestHandler&&this._c.deleteHandler(this._requestHandler),this._incomingHandler&&this._c.deleteHandler(this._incomingHandler),this._requestHandler=this._c.addHandler(this._handleServerRequestHandler.bind(this),this._NS,"r"),this._ackHandler=this._c.addHandler(this._handleServerAck.bind(this),this._NS,"a"),this._incomingHandler=this._c.addHandler(this._incomingStanzaHandler.bind(this)),this._enabledHandler=this._c._addSysHandler(this._handleEnabled.bind(this),this._NS,"enabled"),this._resumeFailedHandler=this._c._addSysHandler(this._handleResumeFailed.bind(this),this._NS,"failed"),this._resumedHandler=this._c._addSysHandler(this._handleResumed.bind(this),this._NS,"resumed")},xmlOutput:function(v){return(l.Strophe.isTagEqual(v,"iq")||l.Strophe.isTagEqual(v,"presence")||l.Strophe.isTagEqual(v,"message"))&&this._increaseSentStanzasCounter(v),this._originalXMLOutput.call(this._c,v)},_handleEnabled:function(v){return this._isStreamManagementEnabled=!0,this._resumeToken=v.getAttribute("resume")==="true"&&v.getAttribute("id"),this._c.resume(),!0},_handleResumeFailed:function(v){const m=v&&v.firstElementChild&&v.firstElementChild.tagName;return this._c._changeConnectStatus(l.Strophe.Status.ERROR,m,v),this._c._doDisconnect(),!0},_handleResumed:function(v){var m=parseInt(v.getAttribute("h"));if(this._handleAcknowledgedStanzas(m,this._serverProcesssedStanzasCounter),this._resuming=!1,this._c.do_bind=!1,this._c.authenticated=!0,this._c.restored=!0,this._unacknowledgedStanzas.length>0){this.logging&&l.Strophe.debug("SM Sending unacknowledged stanzas",this._unacknowledgedStanzas);for(const y of this._unacknowledgedStanzas)this._c.send(y)}else this.logging&&l.Strophe.debug("SM No unacknowledged stanzas",this._unacknowledgedStanzas);return this._c._changeConnectStatus(l.Strophe.Status.CONNECTED,null),!0},_incomingStanzaHandler:function(v){return(l.Strophe.isTagEqual(v,"iq")||l.Strophe.isTagEqual(v,"presence")||l.Strophe.isTagEqual(v,"message"))&&(this._increaseReceivedStanzasCounter(),this.autoSendCountOnEveryIncomingStanza&&this._answerProcessedStanzas()),!0},_handleAcknowledgedStanzas:function(v,m){var y=v-m;y<0&&this._throwError("New reported stanza count lower than previous. New: "+v+" - Previous: "+m),y>this._unacknowledgedStanzas.length&&this._throwError("Higher reported acknowledge count than unacknowledged stanzas. Reported Acknowledge Count: "+y+" - Unacknowledge Stanza Count: "+this._unacknowledgedStanzas.length+" - New: "+v+" - Previous: "+m);for(var j=0;j<y;j++)for(var h=this._unacknowledgedStanzas.shift(),g=0;g<this._acknowledgedStanzaListeners.length;g++)this._acknowledgedStanzaListeners[g](h);this.logging&&this._unacknowledgedStanzas.length>0&&l.Strophe.warn("SM Unacknowledged stanzas",this._unacknowledgedStanzas),this._serverProcesssedStanzasCounter=v,this.requestResponseInterval>0&&(this._requestResponseIntervalCount=0)},_handleServerRequestHandler:function(){return this._answerProcessedStanzas(),!0},_handleServerAck:function(v){var m=parseInt(v.getAttribute("h"));return this._handleAcknowledgedStanzas(m,this._serverProcesssedStanzasCounter),!0},_answerProcessedStanzas:function(){this._isStreamManagementEnabled&&this._c.send(l.$build("a",{xmlns:this._NS,h:this._clientProcessedStanzasCounter}))},_increaseSentStanzasCounter:function(v){if(this._isStreamManagementEnabled){if(this._unacknowledgedStanzas.indexOf(v)!==-1)return;this._unacknowledgedStanzas.push(v),this._clientSentStanzasCounter++,this.requestResponseInterval>0&&(this._requestResponseIntervalCount++,this._requestResponseIntervalCount===this.requestResponseInterval&&setTimeout(()=>{this._connectionStatus===l.Strophe.Status.CONNECTED&&this.requestAcknowledgement()},1))}},_increaseReceivedStanzasCounter:function(){this._isStreamManagementEnabled&&this._clientProcessedStanzasCounter++},_throwError:function(v){throw l.Strophe.error(v),new Error(v)}})})(o(9755))},825:(S,d)=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;const o=[];for(let l=0;l<256;++l)o.push((l+256).toString(16).substr(1));d.default=function(l,v){const m=v||0,y=o;return(y[l[m+0]]+y[l[m+1]]+y[l[m+2]]+y[l[m+3]]+"-"+y[l[m+4]]+y[l[m+5]]+"-"+y[l[m+6]]+y[l[m+7]]+"-"+y[l[m+8]]+y[l[m+9]]+"-"+y[l[m+10]]+y[l[m+11]]+y[l[m+12]]+y[l[m+13]]+y[l[m+14]]+y[l[m+15]]).toLowerCase()}},7593:(S,d,o)=>{"use strict";Object.defineProperty(d,"v1",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(d,"v3",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(d,"v4",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(d,"v5",{enumerable:!0,get:function(){return y.default}});var l=j(o(4922)),v=j(o(6964)),m=j(o(8509)),y=j(o(5669));function j(h){return h&&h.__esModule?h:{default:h}}},489:(S,d)=>{"use strict";function o(g){return 14+(g+64>>>9<<4)+1}function l(g,A){const I=(65535&g)+(65535&A);return(g>>16)+(A>>16)+(I>>16)<<16|65535&I}function v(g,A,I,O,x,U){return l((G=l(l(A,g),l(O,U)))<<(P=x)|G>>>32-P,I);var G,P}function m(g,A,I,O,x,U,G){return v(A&I|~A&O,g,A,x,U,G)}function y(g,A,I,O,x,U,G){return v(A&O|I&~O,g,A,x,U,G)}function j(g,A,I,O,x,U,G){return v(A^I^O,g,A,x,U,G)}function h(g,A,I,O,x,U,G){return v(I^(A|~O),g,A,x,U,G)}Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0,d.default=function(g){if(typeof g=="string"){const A=unescape(encodeURIComponent(g));g=new Uint8Array(A.length);for(let I=0;I<A.length;++I)g[I]=A.charCodeAt(I)}return function(A){const I=[],O=32*A.length,x="0123456789abcdef";for(let U=0;U<O;U+=8){const G=A[U>>5]>>>U%32&255,P=parseInt(x.charAt(G>>>4&15)+x.charAt(15&G),16);I.push(P)}return I}(function(A,I){A[I>>5]|=128<<I%32,A[o(I)-1]=I;let O=1732584193,x=-271733879,U=-1732584194,G=271733878;for(let P=0;P<A.length;P+=16){const z=O,ue=x,pe=U,Me=G;O=m(O,x,U,G,A[P],7,-680876936),G=m(G,O,x,U,A[P+1],12,-389564586),U=m(U,G,O,x,A[P+2],17,606105819),x=m(x,U,G,O,A[P+3],22,-1044525330),O=m(O,x,U,G,A[P+4],7,-176418897),G=m(G,O,x,U,A[P+5],12,1200080426),U=m(U,G,O,x,A[P+6],17,-1473231341),x=m(x,U,G,O,A[P+7],22,-45705983),O=m(O,x,U,G,A[P+8],7,1770035416),G=m(G,O,x,U,A[P+9],12,-1958414417),U=m(U,G,O,x,A[P+10],17,-42063),x=m(x,U,G,O,A[P+11],22,-1990404162),O=m(O,x,U,G,A[P+12],7,1804603682),G=m(G,O,x,U,A[P+13],12,-40341101),U=m(U,G,O,x,A[P+14],17,-1502002290),x=m(x,U,G,O,A[P+15],22,1236535329),O=y(O,x,U,G,A[P+1],5,-165796510),G=y(G,O,x,U,A[P+6],9,-1069501632),U=y(U,G,O,x,A[P+11],14,643717713),x=y(x,U,G,O,A[P],20,-373897302),O=y(O,x,U,G,A[P+5],5,-701558691),G=y(G,O,x,U,A[P+10],9,38016083),U=y(U,G,O,x,A[P+15],14,-660478335),x=y(x,U,G,O,A[P+4],20,-405537848),O=y(O,x,U,G,A[P+9],5,568446438),G=y(G,O,x,U,A[P+14],9,-1019803690),U=y(U,G,O,x,A[P+3],14,-187363961),x=y(x,U,G,O,A[P+8],20,1163531501),O=y(O,x,U,G,A[P+13],5,-1444681467),G=y(G,O,x,U,A[P+2],9,-51403784),U=y(U,G,O,x,A[P+7],14,1735328473),x=y(x,U,G,O,A[P+12],20,-1926607734),O=j(O,x,U,G,A[P+5],4,-378558),G=j(G,O,x,U,A[P+8],11,-2022574463),U=j(U,G,O,x,A[P+11],16,1839030562),x=j(x,U,G,O,A[P+14],23,-35309556),O=j(O,x,U,G,A[P+1],4,-1530992060),G=j(G,O,x,U,A[P+4],11,1272893353),U=j(U,G,O,x,A[P+7],16,-155497632),x=j(x,U,G,O,A[P+10],23,-1094730640),O=j(O,x,U,G,A[P+13],4,681279174),G=j(G,O,x,U,A[P],11,-358537222),U=j(U,G,O,x,A[P+3],16,-722521979),x=j(x,U,G,O,A[P+6],23,76029189),O=j(O,x,U,G,A[P+9],4,-640364487),G=j(G,O,x,U,A[P+12],11,-421815835),U=j(U,G,O,x,A[P+15],16,530742520),x=j(x,U,G,O,A[P+2],23,-995338651),O=h(O,x,U,G,A[P],6,-198630844),G=h(G,O,x,U,A[P+7],10,1126891415),U=h(U,G,O,x,A[P+14],15,-1416354905),x=h(x,U,G,O,A[P+5],21,-57434055),O=h(O,x,U,G,A[P+12],6,1700485571),G=h(G,O,x,U,A[P+3],10,-1894986606),U=h(U,G,O,x,A[P+10],15,-1051523),x=h(x,U,G,O,A[P+1],21,-2054922799),O=h(O,x,U,G,A[P+8],6,1873313359),G=h(G,O,x,U,A[P+15],10,-30611744),U=h(U,G,O,x,A[P+6],15,-1560198380),x=h(x,U,G,O,A[P+13],21,1309151649),O=h(O,x,U,G,A[P+4],6,-145523070),G=h(G,O,x,U,A[P+11],10,-1120210379),U=h(U,G,O,x,A[P+2],15,718787259),x=h(x,U,G,O,A[P+9],21,-343485551),O=l(O,z),x=l(x,ue),U=l(U,pe),G=l(G,Me)}return[O,x,U,G]}(function(A){if(A.length===0)return[];const I=8*A.length,O=new Uint32Array(o(I));for(let x=0;x<I;x+=8)O[x>>5]|=(255&A[x/8])<<x%32;return O}(g),8*g.length))}},6827:(S,d)=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.default=function(){if(!o)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(l)};const o=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),l=new Uint8Array(16)},3558:(S,d)=>{"use strict";function o(v,m,y,j){switch(v){case 0:return m&y^~m&j;case 1:case 3:return m^y^j;case 2:return m&y^m&j^y&j}}function l(v,m){return v<<m|v>>>32-m}Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0,d.default=function(v){const m=[1518500249,1859775393,2400959708,3395469782],y=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof v=="string"){const A=unescape(encodeURIComponent(v));v=[];for(let I=0;I<A.length;++I)v.push(A.charCodeAt(I))}v.push(128);const j=v.length/4+2,h=Math.ceil(j/16),g=new Array(h);for(let A=0;A<h;++A){const I=new Uint32Array(16);for(let O=0;O<16;++O)I[O]=v[64*A+4*O]<<24|v[64*A+4*O+1]<<16|v[64*A+4*O+2]<<8|v[64*A+4*O+3];g[A]=I}g[h-1][14]=8*(v.length-1)/Math.pow(2,32),g[h-1][14]=Math.floor(g[h-1][14]),g[h-1][15]=8*(v.length-1)&4294967295;for(let A=0;A<h;++A){const I=new Uint32Array(80);for(let z=0;z<16;++z)I[z]=g[A][z];for(let z=16;z<80;++z)I[z]=l(I[z-3]^I[z-8]^I[z-14]^I[z-16],1);let O=y[0],x=y[1],U=y[2],G=y[3],P=y[4];for(let z=0;z<80;++z){const ue=Math.floor(z/20),pe=l(O,5)+o(ue,x,U,G)+P+m[ue]+I[z]>>>0;P=G,G=U,U=l(x,30)>>>0,x=O,O=pe}y[0]=y[0]+O>>>0,y[1]=y[1]+x>>>0,y[2]=y[2]+U>>>0,y[3]=y[3]+G>>>0,y[4]=y[4]+P>>>0}return[y[0]>>24&255,y[0]>>16&255,y[0]>>8&255,255&y[0],y[1]>>24&255,y[1]>>16&255,y[1]>>8&255,255&y[1],y[2]>>24&255,y[2]>>16&255,y[2]>>8&255,255&y[2],y[3]>>24&255,y[3]>>16&255,y[3]>>8&255,255&y[3],y[4]>>24&255,y[4]>>16&255,y[4]>>8&255,255&y[4]]}},4922:(S,d,o)=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var l=m(o(6827)),v=m(o(825));function m(A){return A&&A.__esModule?A:{default:A}}let y,j,h=0,g=0;d.default=function(A,I,O){let x=I&&O||0;const U=I||[];let G=(A=A||{}).node||y,P=A.clockseq!==void 0?A.clockseq:j;if(G==null||P==null){const be=A.random||(A.rng||l.default)();G==null&&(G=y=[1|be[0],be[1],be[2],be[3],be[4],be[5]]),P==null&&(P=j=16383&(be[6]<<8|be[7]))}let z=A.msecs!==void 0?A.msecs:Date.now(),ue=A.nsecs!==void 0?A.nsecs:g+1;const pe=z-h+(ue-g)/1e4;if(pe<0&&A.clockseq===void 0&&(P=P+1&16383),(pe<0||z>h)&&A.nsecs===void 0&&(ue=0),ue>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=z,g=ue,j=P,z+=122192928e5;const Me=(1e4*(268435455&z)+ue)%4294967296;U[x++]=Me>>>24&255,U[x++]=Me>>>16&255,U[x++]=Me>>>8&255,U[x++]=255&Me;const rt=z/4294967296*1e4&268435455;U[x++]=rt>>>8&255,U[x++]=255&rt,U[x++]=rt>>>24&15|16,U[x++]=rt>>>16&255,U[x++]=P>>>8|128,U[x++]=255&P;for(let be=0;be<6;++be)U[x+be]=G[be];return I||(0,v.default)(U)}},6964:(S,d,o)=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var l=m(o(9137)),v=m(o(489));function m(j){return j&&j.__esModule?j:{default:j}}var y=(0,l.default)("v3",48,v.default);d.default=y},9137:(S,d,o)=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.default=function(j,h,g){function A(I,O,x,U){const G=x&&U||0;if(typeof I=="string"&&(I=function(z){z=unescape(encodeURIComponent(z));const ue=[];for(let pe=0;pe<z.length;++pe)ue.push(z.charCodeAt(pe));return ue}(I)),typeof O=="string"&&(O=function(z){const ue=[];return z.replace(/[a-fA-F0-9]{2}/g,function(pe){ue.push(parseInt(pe,16))}),ue}(O)),!Array.isArray(I))throw TypeError("value must be an array of bytes");if(!Array.isArray(O)||O.length!==16)throw TypeError("namespace must be uuid string or an Array of 16 byte values");const P=g(O.concat(I));if(P[6]=15&P[6]|h,P[8]=63&P[8]|128,x)for(let z=0;z<16;++z)x[G+z]=P[z];return x||(0,v.default)(P)}try{A.name=j}catch(I){}return A.DNS=m,A.URL=y,A},d.URL=d.DNS=void 0;var l,v=(l=o(825))&&l.__esModule?l:{default:l};const m="6ba7b810-9dad-11d1-80b4-00c04fd430c8";d.DNS=m;const y="6ba7b811-9dad-11d1-80b4-00c04fd430c8";d.URL=y},8509:(S,d,o)=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var l=m(o(6827)),v=m(o(825));function m(y){return y&&y.__esModule?y:{default:y}}d.default=function(y,j,h){typeof y=="string"&&(j=y==="binary"?new Uint8Array(16):null,y=null);const g=(y=y||{}).random||(y.rng||l.default)();if(g[6]=15&g[6]|64,g[8]=63&g[8]|128,j){const A=h||0;for(let I=0;I<16;++I)j[A+I]=g[I];return j}return(0,v.default)(g)}},5669:(S,d,o)=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0}),d.default=void 0;var l=m(o(9137)),v=m(o(3558));function m(j){return j&&j.__esModule?j:{default:j}}var y=(0,l.default)("v5",80,v.default);d.default=y},835:(S,d,o)=>{"use strict";o.r(d),o.d(d,{default:()=>zt});var l={};o.r(l),o.d(l,{fixNegotiationNeeded:()=>ne,shimAddTrackRemoveTrack:()=>Oe,shimAddTrackRemoveTrackWithNative:()=>_e,shimGetDisplayMedia:()=>Me,shimGetSendersWithDtmf:()=>Te,shimGetStats:()=>C,shimGetUserMedia:()=>pe,shimMediaStream:()=>rt,shimOnTrack:()=>be,shimPeerConnection:()=>Ye,shimSenderReceiverGetStats:()=>st});var v={};o.r(v),o.d(v,{shimAddTransceiver:()=>q,shimCreateAnswer:()=>ce,shimCreateOffer:()=>Ae,shimGetDisplayMedia:()=>xe,shimGetParameters:()=>he,shimGetUserMedia:()=>Ze,shimOnTrack:()=>ct,shimPeerConnection:()=>Qe,shimRTCDataChannel:()=>H,shimReceiverGetStats:()=>f,shimRemoveStream:()=>D,shimSenderGetStats:()=>re});var m={};o.r(m),o.d(m,{shimAudioContext:()=>ht,shimCallbacksAPI:()=>T,shimConstraints:()=>Y,shimCreateOfferLegacy:()=>De,shimGetUserMedia:()=>B,shimLocalStreamsAPI:()=>Se,shimRTCIceServerUrls:()=>fe,shimRemoteStreamsAPI:()=>Re,shimTrackEventTransceiver:()=>Ne});var y={};o.r(y),o.d(y,{removeExtmapAllowMixed:()=>Gt,shimAddIceCandidateNullOrEmpty:()=>Bt,shimConnectionState:()=>Yt,shimMaxMessageSize:()=>Ct,shimParameterlessSetLocalDescription:()=>mn,shimRTCIceCandidate:()=>Ue,shimSendThrowTypeError:()=>Kt});let j=!0,h=!0;function g(K,Le,me){const k=K.match(Le);return k&&k.length>=me&&parseInt(k[me],10)}function A(K,Le,me){if(!K.RTCPeerConnection)return;const k=K.RTCPeerConnection.prototype,J=k.addEventListener;k.addEventListener=function(ie,we){if(ie!==Le)return J.apply(this,arguments);const ke=at=>{const ft=me(at);ft&&(we.handleEvent?we.handleEvent(ft):we(ft))};return this._eventMap=this._eventMap||{},this._eventMap[Le]||(this._eventMap[Le]=new Map),this._eventMap[Le].set(we,ke),J.apply(this,[ie,ke])};const Z=k.removeEventListener;k.removeEventListener=function(ie,we){if(ie!==Le||!this._eventMap||!this._eventMap[Le])return Z.apply(this,arguments);if(!this._eventMap[Le].has(we))return Z.apply(this,arguments);const ke=this._eventMap[Le].get(we);return this._eventMap[Le].delete(we),this._eventMap[Le].size===0&&delete this._eventMap[Le],Object.keys(this._eventMap).length===0&&delete this._eventMap,Z.apply(this,[ie,ke])},Object.defineProperty(k,"on"+Le,{get(){return this["_on"+Le]},set(ie){this["_on"+Le]&&(this.removeEventListener(Le,this["_on"+Le]),delete this["_on"+Le]),ie&&this.addEventListener(Le,this["_on"+Le]=ie)},enumerable:!0,configurable:!0})}function I(K){return typeof K!="boolean"?new Error("Argument type: "+typeof K+". Please use a boolean."):(j=K,K?"adapter.js logging disabled":"adapter.js logging enabled")}function O(K){return typeof K!="boolean"?new Error("Argument type: "+typeof K+". Please use a boolean."):(h=!K,"adapter.js deprecation warnings "+(K?"disabled":"enabled"))}function x(){}function U(K){return Object.prototype.toString.call(K)==="[object Object]"}function G(K){return U(K)?Object.keys(K).reduce(function(Le,me){const k=U(K[me]),J=k?G(K[me]):K[me],Z=k&&!Object.keys(J).length;return J===void 0||Z?Le:Object.assign(Le,{[me]:J})},{}):K}function P(K,Le,me){Le&&!me.has(Le.id)&&(me.set(Le.id,Le),Object.keys(Le).forEach(k=>{k.endsWith("Id")?P(K,K.get(Le[k]),me):k.endsWith("Ids")&&Le[k].forEach(J=>{P(K,K.get(J),me)})}))}function z(K,Le,me){const k=me?"outbound-rtp":"inbound-rtp",J=new Map;if(Le===null)return J;const Z=[];return K.forEach(ie=>{ie.type==="track"&&ie.trackIdentifier===Le.id&&Z.push(ie)}),Z.forEach(ie=>{K.forEach(we=>{we.type===k&&we.trackId===ie.id&&P(K,we,J)})}),J}const ue=x;function pe(K,Le){const me=K&&K.navigator;if(!me.mediaDevices)return;const k=function(ie){if(typeof ie!="object"||ie.mandatory||ie.optional)return ie;const we={};return Object.keys(ie).forEach(ke=>{if(ke==="require"||ke==="advanced"||ke==="mediaSource")return;const at=typeof ie[ke]=="object"?ie[ke]:{ideal:ie[ke]};at.exact!==void 0&&typeof at.exact=="number"&&(at.min=at.max=at.exact);const ft=function(lt,ye){return lt?lt+ye.charAt(0).toUpperCase()+ye.slice(1):ye==="deviceId"?"sourceId":ye};if(at.ideal!==void 0){we.optional=we.optional||[];let lt={};typeof at.ideal=="number"?(lt[ft("min",ke)]=at.ideal,we.optional.push(lt),lt={},lt[ft("max",ke)]=at.ideal,we.optional.push(lt)):(lt[ft("",ke)]=at.ideal,we.optional.push(lt))}at.exact!==void 0&&typeof at.exact!="number"?(we.mandatory=we.mandatory||{},we.mandatory[ft("",ke)]=at.exact):["min","max"].forEach(lt=>{at[lt]!==void 0&&(we.mandatory=we.mandatory||{},we.mandatory[ft(lt,ke)]=at[lt])})}),ie.advanced&&(we.optional=(we.optional||[]).concat(ie.advanced)),we},J=function(ie,we){if(Le.version>=61)return we(ie);if((ie=JSON.parse(JSON.stringify(ie)))&&typeof ie.audio=="object"){const ke=function(at,ft,lt){ft in at&&!(lt in at)&&(at[lt]=at[ft],delete at[ft])};ke((ie=JSON.parse(JSON.stringify(ie))).audio,"autoGainControl","googAutoGainControl"),ke(ie.audio,"noiseSuppression","googNoiseSuppression"),ie.audio=k(ie.audio)}if(ie&&typeof ie.video=="object"){let ke=ie.video.facingMode;ke=ke&&(typeof ke=="object"?ke:{ideal:ke});const at=Le.version<66;if(ke&&(ke.exact==="user"||ke.exact==="environment"||ke.ideal==="user"||ke.ideal==="environment")&&(!me.mediaDevices.getSupportedConstraints||!me.mediaDevices.getSupportedConstraints().facingMode||at)){let ft;if(delete ie.video.facingMode,ke.exact==="environment"||ke.ideal==="environment"?ft=["back","rear"]:ke.exact!=="user"&&ke.ideal!=="user"||(ft=["front"]),ft)return me.mediaDevices.enumerateDevices().then(lt=>{let ye=(lt=lt.filter(tn=>tn.kind==="videoinput")).find(tn=>ft.some(er=>tn.label.toLowerCase().includes(er)));return!ye&<.length&&ft.includes("back")&&(ye=lt[lt.length-1]),ye&&(ie.video.deviceId=ke.exact?{exact:ye.deviceId}:{ideal:ye.deviceId}),ie.video=k(ie.video),ue("chrome: "+JSON.stringify(ie)),we(ie)})}ie.video=k(ie.video)}return ue("chrome: "+JSON.stringify(ie)),we(ie)},Z=function(ie){return Le.version>=64?ie:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[ie.name]||ie.name,message:ie.message,constraint:ie.constraint||ie.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(me.getUserMedia=function(ie,we,ke){J(ie,at=>{me.webkitGetUserMedia(at,we,ft=>{ke&&ke(Z(ft))})})}.bind(me),me.mediaDevices.getUserMedia){const ie=me.mediaDevices.getUserMedia.bind(me.mediaDevices);me.mediaDevices.getUserMedia=function(we){return J(we,ke=>ie(ke).then(at=>{if(ke.audio&&!at.getAudioTracks().length||ke.video&&!at.getVideoTracks().length)throw at.getTracks().forEach(ft=>{ft.stop()}),new DOMException("","NotFoundError");return at},at=>Promise.reject(Z(at))))}}}function Me(K,Le){K.navigator.mediaDevices&&"getDisplayMedia"in K.navigator.mediaDevices||K.navigator.mediaDevices&&typeof Le=="function"&&(K.navigator.mediaDevices.getDisplayMedia=function(me){return Le(me).then(k=>{const J=me.video&&me.video.width,Z=me.video&&me.video.height,ie=me.video&&me.video.frameRate;return me.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:k,maxFrameRate:ie||3}},J&&(me.video.mandatory.maxWidth=J),Z&&(me.video.mandatory.maxHeight=Z),K.navigator.mediaDevices.getUserMedia(me)})})}function rt(K){K.MediaStream=K.MediaStream||K.webkitMediaStream}function be(K){if(typeof K=="object"&&K.RTCPeerConnection&&!("ontrack"in K.RTCPeerConnection.prototype)){Object.defineProperty(K.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(me){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=me)},enumerable:!0,configurable:!0});const Le=K.RTCPeerConnection.prototype.setRemoteDescription;K.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=me=>{me.stream.addEventListener("addtrack",k=>{let J;J=K.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(ie=>ie.track&&ie.track.id===k.track.id):{track:k.track};const Z=new Event("track");Z.track=k.track,Z.receiver=J,Z.transceiver={receiver:J},Z.streams=[me.stream],this.dispatchEvent(Z)}),me.stream.getTracks().forEach(k=>{let J;J=K.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(ie=>ie.track&&ie.track.id===k.id):{track:k};const Z=new Event("track");Z.track=k,Z.receiver=J,Z.transceiver={receiver:J},Z.streams=[me.stream],this.dispatchEvent(Z)})},this.addEventListener("addstream",this._ontrackpoly)),Le.apply(this,arguments)}}else A(K,"track",Le=>(Le.transceiver||Object.defineProperty(Le,"transceiver",{value:{receiver:Le.receiver}}),Le))}function Te(K){if(typeof K=="object"&&K.RTCPeerConnection&&!("getSenders"in K.RTCPeerConnection.prototype)&&"createDTMFSender"in K.RTCPeerConnection.prototype){const Le=function(J,Z){return{track:Z,get dtmf(){return this._dtmf===void 0&&(Z.kind==="audio"?this._dtmf=J.createDTMFSender(Z):this._dtmf=null),this._dtmf},_pc:J}};if(!K.RTCPeerConnection.prototype.getSenders){K.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const J=K.RTCPeerConnection.prototype.addTrack;K.RTCPeerConnection.prototype.addTrack=function(ie,we){let ke=J.apply(this,arguments);return ke||(ke=Le(this,ie),this._senders.push(ke)),ke};const Z=K.RTCPeerConnection.prototype.removeTrack;K.RTCPeerConnection.prototype.removeTrack=function(ie){Z.apply(this,arguments);const we=this._senders.indexOf(ie);we!==-1&&this._senders.splice(we,1)}}const me=K.RTCPeerConnection.prototype.addStream;K.RTCPeerConnection.prototype.addStream=function(J){this._senders=this._senders||[],me.apply(this,[J]),J.getTracks().forEach(Z=>{this._senders.push(Le(this,Z))})};const k=K.RTCPeerConnection.prototype.removeStream;K.RTCPeerConnection.prototype.removeStream=function(J){this._senders=this._senders||[],k.apply(this,[J]),J.getTracks().forEach(Z=>{const ie=this._senders.find(we=>we.track===Z);ie&&this._senders.splice(this._senders.indexOf(ie),1)})}}else if(typeof K=="object"&&K.RTCPeerConnection&&"getSenders"in K.RTCPeerConnection.prototype&&"createDTMFSender"in K.RTCPeerConnection.prototype&&K.RTCRtpSender&&!("dtmf"in K.RTCRtpSender.prototype)){const Le=K.RTCPeerConnection.prototype.getSenders;K.RTCPeerConnection.prototype.getSenders=function(){const me=Le.apply(this,[]);return me.forEach(k=>k._pc=this),me},Object.defineProperty(K.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function C(K){if(!K.RTCPeerConnection)return;const Le=K.RTCPeerConnection.prototype.getStats;K.RTCPeerConnection.prototype.getStats=function(){const[me,k,J]=arguments;if(arguments.length>0&&typeof me=="function")return Le.apply(this,arguments);if(Le.length===0&&(arguments.length===0||typeof me!="function"))return Le.apply(this,[]);const Z=function(we){const ke={};return we.result().forEach(at=>{const ft={id:at.id,timestamp:at.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[at.type]||at.type};at.names().forEach(lt=>{ft[lt]=at.stat(lt)}),ke[ft.id]=ft}),ke},ie=function(we){return new Map(Object.keys(we).map(ke=>[ke,we[ke]]))};if(arguments.length>=2){const we=function(ke){k(ie(Z(ke)))};return Le.apply(this,[we,me])}return new Promise((we,ke)=>{Le.apply(this,[function(at){we(ie(Z(at)))},ke])}).then(k,J)}}function st(K){if(!(typeof K=="object"&&K.RTCPeerConnection&&K.RTCRtpSender&&K.RTCRtpReceiver))return;if(!("getStats"in K.RTCRtpSender.prototype)){const me=K.RTCPeerConnection.prototype.getSenders;me&&(K.RTCPeerConnection.prototype.getSenders=function(){const J=me.apply(this,[]);return J.forEach(Z=>Z._pc=this),J});const k=K.RTCPeerConnection.prototype.addTrack;k&&(K.RTCPeerConnection.prototype.addTrack=function(){const J=k.apply(this,arguments);return J._pc=this,J}),K.RTCRtpSender.prototype.getStats=function(){const J=this;return this._pc.getStats().then(Z=>z(Z,J.track,!0))}}if(!("getStats"in K.RTCRtpReceiver.prototype)){const me=K.RTCPeerConnection.prototype.getReceivers;me&&(K.RTCPeerConnection.prototype.getReceivers=function(){const k=me.apply(this,[]);return k.forEach(J=>J._pc=this),k}),A(K,"track",k=>(k.receiver._pc=k.srcElement,k)),K.RTCRtpReceiver.prototype.getStats=function(){const k=this;return this._pc.getStats().then(J=>z(J,k.track,!1))}}if(!("getStats"in K.RTCRtpSender.prototype)||!("getStats"in K.RTCRtpReceiver.prototype))return;const Le=K.RTCPeerConnection.prototype.getStats;K.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof K.MediaStreamTrack){const me=arguments[0];let k,J,Z;return this.getSenders().forEach(ie=>{ie.track===me&&(k?Z=!0:k=ie)}),this.getReceivers().forEach(ie=>(ie.track===me&&(J?Z=!0:J=ie),ie.track===me)),Z||k&&J?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):k?k.getStats():J?J.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return Le.apply(this,arguments)}}function _e(K){K.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(Z=>this._shimmedLocalStreams[Z][0])};const Le=K.RTCPeerConnection.prototype.addTrack;K.RTCPeerConnection.prototype.addTrack=function(Z,ie){if(!ie)return Le.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const we=Le.apply(this,arguments);return this._shimmedLocalStreams[ie.id]?this._shimmedLocalStreams[ie.id].indexOf(we)===-1&&this._shimmedLocalStreams[ie.id].push(we):this._shimmedLocalStreams[ie.id]=[ie,we],we};const me=K.RTCPeerConnection.prototype.addStream;K.RTCPeerConnection.prototype.addStream=function(Z){this._shimmedLocalStreams=this._shimmedLocalStreams||{},Z.getTracks().forEach(ke=>{if(this.getSenders().find(at=>at.track===ke))throw new DOMException("Track already exists.","InvalidAccessError")});const ie=this.getSenders();me.apply(this,arguments);const we=this.getSenders().filter(ke=>ie.indexOf(ke)===-1);this._shimmedLocalStreams[Z.id]=[Z].concat(we)};const k=K.RTCPeerConnection.prototype.removeStream;K.RTCPeerConnection.prototype.removeStream=function(Z){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[Z.id],k.apply(this,arguments)};const J=K.RTCPeerConnection.prototype.removeTrack;K.RTCPeerConnection.prototype.removeTrack=function(Z){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Z&&Object.keys(this._shimmedLocalStreams).forEach(ie=>{const we=this._shimmedLocalStreams[ie].indexOf(Z);we!==-1&&this._shimmedLocalStreams[ie].splice(we,1),this._shimmedLocalStreams[ie].length===1&&delete this._shimmedLocalStreams[ie]}),J.apply(this,arguments)}}function Oe(K,Le){if(!K.RTCPeerConnection)return;if(K.RTCPeerConnection.prototype.addTrack&&Le.version>=65)return _e(K);const me=K.RTCPeerConnection.prototype.getLocalStreams;K.RTCPeerConnection.prototype.getLocalStreams=function(){const ke=me.apply(this);return this._reverseStreams=this._reverseStreams||{},ke.map(at=>this._reverseStreams[at.id])};const k=K.RTCPeerConnection.prototype.addStream;K.RTCPeerConnection.prototype.addStream=function(ke){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},ke.getTracks().forEach(at=>{if(this.getSenders().find(ft=>ft.track===at))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[ke.id]){const at=new K.MediaStream(ke.getTracks());this._streams[ke.id]=at,this._reverseStreams[at.id]=ke,ke=at}k.apply(this,[ke])};const J=K.RTCPeerConnection.prototype.removeStream;function Z(ke,at){let ft=at.sdp;return Object.keys(ke._reverseStreams||[]).forEach(lt=>{const ye=ke._reverseStreams[lt],tn=ke._streams[ye.id];ft=ft.replace(new RegExp(tn.id,"g"),ye.id)}),new RTCSessionDescription({type:at.type,sdp:ft})}K.RTCPeerConnection.prototype.removeStream=function(ke){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},J.apply(this,[this._streams[ke.id]||ke]),delete this._reverseStreams[this._streams[ke.id]?this._streams[ke.id].id:ke.id],delete this._streams[ke.id]},K.RTCPeerConnection.prototype.addTrack=function(ke,at){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const ft=[].slice.call(arguments,1);if(ft.length!==1||!ft[0].getTracks().find(tn=>tn===ke))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(tn=>tn.track===ke))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const ye=this._streams[at.id];if(ye)ye.addTrack(ke),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const tn=new K.MediaStream([ke]);this._streams[at.id]=tn,this._reverseStreams[tn.id]=at,this.addStream(tn)}return this.getSenders().find(tn=>tn.track===ke)},["createOffer","createAnswer"].forEach(function(ke){const at=K.RTCPeerConnection.prototype[ke],ft={[ke](){const lt=arguments;return arguments.length&&typeof arguments[0]=="function"?at.apply(this,[ye=>{const tn=Z(this,ye);lt[0].apply(null,[tn])},ye=>{lt[1]&<[1].apply(null,ye)},arguments[2]]):at.apply(this,arguments).then(ye=>Z(this,ye))}};K.RTCPeerConnection.prototype[ke]=ft[ke]});const ie=K.RTCPeerConnection.prototype.setLocalDescription;K.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(ke,at){let ft=at.sdp;return Object.keys(ke._reverseStreams||[]).forEach(lt=>{const ye=ke._reverseStreams[lt],tn=ke._streams[ye.id];ft=ft.replace(new RegExp(ye.id,"g"),tn.id)}),new RTCSessionDescription({type:at.type,sdp:ft})}(this,arguments[0]),ie.apply(this,arguments)):ie.apply(this,arguments)};const we=Object.getOwnPropertyDescriptor(K.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(K.RTCPeerConnection.prototype,"localDescription",{get(){const ke=we.get.apply(this);return ke.type===""?ke:Z(this,ke)}}),K.RTCPeerConnection.prototype.removeTrack=function(ke){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!ke._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(ke._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let at;this._streams=this._streams||{},Object.keys(this._streams).forEach(ft=>{this._streams[ft].getTracks().find(lt=>ke.track===lt)&&(at=this._streams[ft])}),at&&(at.getTracks().length===1?this.removeStream(this._reverseStreams[at.id]):at.removeTrack(ke.track),this.dispatchEvent(new Event("negotiationneeded")))}}function Ye(K,Le){!K.RTCPeerConnection&&K.webkitRTCPeerConnection&&(K.RTCPeerConnection=K.webkitRTCPeerConnection),K.RTCPeerConnection&&Le.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(me){const k=K.RTCPeerConnection.prototype[me],J={[me](){return arguments[0]=new(me==="addIceCandidate"?K.RTCIceCandidate:K.RTCSessionDescription)(arguments[0]),k.apply(this,arguments)}};K.RTCPeerConnection.prototype[me]=J[me]})}function ne(K,Le){A(K,"negotiationneeded",me=>{const k=me.target;if(!(Le.version<72||k.getConfiguration&&k.getConfiguration().sdpSemantics==="plan-b")||k.signalingState==="stable")return me})}function Ze(K,Le){const me=K&&K.navigator,k=K&&K.MediaStreamTrack;if(me.getUserMedia=function(J,Z,ie){me.mediaDevices.getUserMedia(J).then(Z,ie)},!(Le.version>55&&"autoGainControl"in me.mediaDevices.getSupportedConstraints())){const J=function(ie,we,ke){we in ie&&!(ke in ie)&&(ie[ke]=ie[we],delete ie[we])},Z=me.mediaDevices.getUserMedia.bind(me.mediaDevices);if(me.mediaDevices.getUserMedia=function(ie){return typeof ie=="object"&&typeof ie.audio=="object"&&(ie=JSON.parse(JSON.stringify(ie)),J(ie.audio,"autoGainControl","mozAutoGainControl"),J(ie.audio,"noiseSuppression","mozNoiseSuppression")),Z(ie)},k&&k.prototype.getSettings){const ie=k.prototype.getSettings;k.prototype.getSettings=function(){const we=ie.apply(this,arguments);return J(we,"mozAutoGainControl","autoGainControl"),J(we,"mozNoiseSuppression","noiseSuppression"),we}}if(k&&k.prototype.applyConstraints){const ie=k.prototype.applyConstraints;k.prototype.applyConstraints=function(we){return this.kind==="audio"&&typeof we=="object"&&(we=JSON.parse(JSON.stringify(we)),J(we,"autoGainControl","mozAutoGainControl"),J(we,"noiseSuppression","mozNoiseSuppression")),ie.apply(this,[we])}}}}function xe(K,Le){K.navigator.mediaDevices&&"getDisplayMedia"in K.navigator.mediaDevices||K.navigator.mediaDevices&&(K.navigator.mediaDevices.getDisplayMedia=function(me){if(!me||!me.video){const k=new DOMException("getDisplayMedia without video constraints is undefined");return k.name="NotFoundError",k.code=8,Promise.reject(k)}return me.video===!0?me.video={mediaSource:Le}:me.video.mediaSource=Le,K.navigator.mediaDevices.getUserMedia(me)})}function ct(K){typeof K=="object"&&K.RTCTrackEvent&&"receiver"in K.RTCTrackEvent.prototype&&!("transceiver"in K.RTCTrackEvent.prototype)&&Object.defineProperty(K.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Qe(K,Le){if(typeof K!="object"||!K.RTCPeerConnection&&!K.mozRTCPeerConnection)return;!K.RTCPeerConnection&&K.mozRTCPeerConnection&&(K.RTCPeerConnection=K.mozRTCPeerConnection),Le.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(J){const Z=K.RTCPeerConnection.prototype[J],ie={[J](){return arguments[0]=new(J==="addIceCandidate"?K.RTCIceCandidate:K.RTCSessionDescription)(arguments[0]),Z.apply(this,arguments)}};K.RTCPeerConnection.prototype[J]=ie[J]});const me={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},k=K.RTCPeerConnection.prototype.getStats;K.RTCPeerConnection.prototype.getStats=function(){const[J,Z,ie]=arguments;return k.apply(this,[J||null]).then(we=>{if(Le.version<53&&!Z)try{we.forEach(ke=>{ke.type=me[ke.type]||ke.type})}catch(ke){if(ke.name!=="TypeError")throw ke;we.forEach((at,ft)=>{we.set(ft,Object.assign({},at,{type:me[at.type]||at.type}))})}return we}).then(Z,ie)}}function re(K){if(typeof K!="object"||!K.RTCPeerConnection||!K.RTCRtpSender||K.RTCRtpSender&&"getStats"in K.RTCRtpSender.prototype)return;const Le=K.RTCPeerConnection.prototype.getSenders;Le&&(K.RTCPeerConnection.prototype.getSenders=function(){const k=Le.apply(this,[]);return k.forEach(J=>J._pc=this),k});const me=K.RTCPeerConnection.prototype.addTrack;me&&(K.RTCPeerConnection.prototype.addTrack=function(){const k=me.apply(this,arguments);return k._pc=this,k}),K.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function f(K){if(typeof K!="object"||!K.RTCPeerConnection||!K.RTCRtpSender||K.RTCRtpSender&&"getStats"in K.RTCRtpReceiver.prototype)return;const Le=K.RTCPeerConnection.prototype.getReceivers;Le&&(K.RTCPeerConnection.prototype.getReceivers=function(){const me=Le.apply(this,[]);return me.forEach(k=>k._pc=this),me}),A(K,"track",me=>(me.receiver._pc=me.srcElement,me)),K.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function D(K){K.RTCPeerConnection&&!("removeStream"in K.RTCPeerConnection.prototype)&&(K.RTCPeerConnection.prototype.removeStream=function(Le){this.getSenders().forEach(me=>{me.track&&Le.getTracks().includes(me.track)&&this.removeTrack(me)})})}function H(K){K.DataChannel&&!K.RTCDataChannel&&(K.RTCDataChannel=K.DataChannel)}function q(K){if(typeof K!="object"||!K.RTCPeerConnection)return;const Le=K.RTCPeerConnection.prototype.addTransceiver;Le&&(K.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const me=arguments[1],k=me&&"sendEncodings"in me;k&&me.sendEncodings.forEach(Z=>{if("rid"in Z&&!/^[a-z0-9]{0,16}$/i.test(Z.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in Z&&!(parseFloat(Z.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in Z&&!(parseFloat(Z.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const J=Le.apply(this,arguments);if(k){const{sender:Z}=J,ie=Z.getParameters();(!("encodings"in ie)||ie.encodings.length===1&&Object.keys(ie.encodings[0]).length===0)&&(ie.encodings=me.sendEncodings,Z.sendEncodings=me.sendEncodings,this.setParametersPromises.push(Z.setParameters(ie).then(()=>{delete Z.sendEncodings}).catch(()=>{delete Z.sendEncodings})))}return J})}function he(K){if(typeof K!="object"||!K.RTCRtpSender)return;const Le=K.RTCRtpSender.prototype.getParameters;Le&&(K.RTCRtpSender.prototype.getParameters=function(){const me=Le.apply(this,arguments);return"encodings"in me||(me.encodings=[].concat(this.sendEncodings||[{}])),me})}function Ae(K){if(typeof K!="object"||!K.RTCPeerConnection)return;const Le=K.RTCPeerConnection.prototype.createOffer;K.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>Le.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):Le.apply(this,arguments)}}function ce(K){if(typeof K!="object"||!K.RTCPeerConnection)return;const Le=K.RTCPeerConnection.prototype.createAnswer;K.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>Le.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):Le.apply(this,arguments)}}function Se(K){if(typeof K=="object"&&K.RTCPeerConnection){if("getLocalStreams"in K.RTCPeerConnection.prototype||(K.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in K.RTCPeerConnection.prototype)){const Le=K.RTCPeerConnection.prototype.addTrack;K.RTCPeerConnection.prototype.addStream=function(me){this._localStreams||(this._localStreams=[]),this._localStreams.includes(me)||this._localStreams.push(me),me.getAudioTracks().forEach(k=>Le.call(this,k,me)),me.getVideoTracks().forEach(k=>Le.call(this,k,me))},K.RTCPeerConnection.prototype.addTrack=function(me,...k){return k&&k.forEach(J=>{this._localStreams?this._localStreams.includes(J)||this._localStreams.push(J):this._localStreams=[J]}),Le.apply(this,arguments)}}"removeStream"in K.RTCPeerConnection.prototype||(K.RTCPeerConnection.prototype.removeStream=function(Le){this._localStreams||(this._localStreams=[]);const me=this._localStreams.indexOf(Le);if(me===-1)return;this._localStreams.splice(me,1);const k=Le.getTracks();this.getSenders().forEach(J=>{k.includes(J.track)&&this.removeTrack(J)})})}}function Re(K){if(typeof K=="object"&&K.RTCPeerConnection&&("getRemoteStreams"in K.RTCPeerConnection.prototype||(K.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in K.RTCPeerConnection.prototype))){Object.defineProperty(K.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(me){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=me),this.addEventListener("track",this._onaddstreampoly=k=>{k.streams.forEach(J=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(J))return;this._remoteStreams.push(J);const Z=new Event("addstream");Z.stream=J,this.dispatchEvent(Z)})})}});const Le=K.RTCPeerConnection.prototype.setRemoteDescription;K.RTCPeerConnection.prototype.setRemoteDescription=function(){const me=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(k){k.streams.forEach(J=>{if(me._remoteStreams||(me._remoteStreams=[]),me._remoteStreams.indexOf(J)>=0)return;me._remoteStreams.push(J);const Z=new Event("addstream");Z.stream=J,me.dispatchEvent(Z)})}),Le.apply(me,arguments)}}}function T(K){if(typeof K!="object"||!K.RTCPeerConnection)return;const Le=K.RTCPeerConnection.prototype,me=Le.createOffer,k=Le.createAnswer,J=Le.setLocalDescription,Z=Le.setRemoteDescription,ie=Le.addIceCandidate;Le.createOffer=function(ke,at){const ft=arguments.length>=2?arguments[2]:arguments[0],lt=me.apply(this,[ft]);return at?(lt.then(ke,at),Promise.resolve()):lt},Le.createAnswer=function(ke,at){const ft=arguments.length>=2?arguments[2]:arguments[0],lt=k.apply(this,[ft]);return at?(lt.then(ke,at),Promise.resolve()):lt};let we=function(ke,at,ft){const lt=J.apply(this,[ke]);return ft?(lt.then(at,ft),Promise.resolve()):lt};Le.setLocalDescription=we,we=function(ke,at,ft){const lt=Z.apply(this,[ke]);return ft?(lt.then(at,ft),Promise.resolve()):lt},Le.setRemoteDescription=we,we=function(ke,at,ft){const lt=ie.apply(this,[ke]);return ft?(lt.then(at,ft),Promise.resolve()):lt},Le.addIceCandidate=we}function B(K){const Le=K&&K.navigator;if(Le.mediaDevices&&Le.mediaDevices.getUserMedia){const me=Le.mediaDevices,k=me.getUserMedia.bind(me);Le.mediaDevices.getUserMedia=J=>k(Y(J))}!Le.getUserMedia&&Le.mediaDevices&&Le.mediaDevices.getUserMedia&&(Le.getUserMedia=function(me,k,J){Le.mediaDevices.getUserMedia(me).then(k,J)}.bind(Le))}function Y(K){return K&&K.video!==void 0?Object.assign({},K,{video:G(K.video)}):K}function fe(K){if(!K.RTCPeerConnection)return;const Le=K.RTCPeerConnection;K.RTCPeerConnection=function(me,k){if(me&&me.iceServers){const J=[];for(let Z=0;Z<me.iceServers.length;Z++){let ie=me.iceServers[Z];!ie.hasOwnProperty("urls")&&ie.hasOwnProperty("url")?(ie=JSON.parse(JSON.stringify(ie)),ie.urls=ie.url,delete ie.url,J.push(ie)):J.push(me.iceServers[Z])}me.iceServers=J}return new Le(me,k)},K.RTCPeerConnection.prototype=Le.prototype,"generateCertificate"in Le&&Object.defineProperty(K.RTCPeerConnection,"generateCertificate",{get:()=>Le.generateCertificate})}function Ne(K){typeof K=="object"&&K.RTCTrackEvent&&"receiver"in K.RTCTrackEvent.prototype&&!("transceiver"in K.RTCTrackEvent.prototype)&&Object.defineProperty(K.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function De(K){const Le=K.RTCPeerConnection.prototype.createOffer;K.RTCPeerConnection.prototype.createOffer=function(me){if(me){me.offerToReceiveAudio!==void 0&&(me.offerToReceiveAudio=!!me.offerToReceiveAudio);const k=this.getTransceivers().find(Z=>Z.receiver.track.kind==="audio");me.offerToReceiveAudio===!1&&k?k.direction==="sendrecv"?k.setDirection?k.setDirection("sendonly"):k.direction="sendonly":k.direction==="recvonly"&&(k.setDirection?k.setDirection("inactive"):k.direction="inactive"):me.offerToReceiveAudio!==!0||k||this.addTransceiver("audio",{direction:"recvonly"}),me.offerToReceiveVideo!==void 0&&(me.offerToReceiveVideo=!!me.offerToReceiveVideo);const J=this.getTransceivers().find(Z=>Z.receiver.track.kind==="video");me.offerToReceiveVideo===!1&&J?J.direction==="sendrecv"?J.setDirection?J.setDirection("sendonly"):J.direction="sendonly":J.direction==="recvonly"&&(J.setDirection?J.setDirection("inactive"):J.direction="inactive"):me.offerToReceiveVideo!==!0||J||this.addTransceiver("video",{direction:"recvonly"})}return Le.apply(this,arguments)}}function ht(K){typeof K!="object"||K.AudioContext||(K.AudioContext=K.webkitAudioContext)}var jt=o(7539),Ge=o.n(jt);function Ue(K){if(!K.RTCIceCandidate||K.RTCIceCandidate&&"foundation"in K.RTCIceCandidate.prototype)return;const Le=K.RTCIceCandidate;K.RTCIceCandidate=function(me){if(typeof me=="object"&&me.candidate&&me.candidate.indexOf("a=")===0&&((me=JSON.parse(JSON.stringify(me))).candidate=me.candidate.substr(2)),me.candidate&&me.candidate.length){const k=new Le(me),J=Ge().parseCandidate(me.candidate),Z=Object.assign(k,J);return Z.toJSON=function(){return{candidate:Z.candidate,sdpMid:Z.sdpMid,sdpMLineIndex:Z.sdpMLineIndex,usernameFragment:Z.usernameFragment}},Z}return new Le(me)},K.RTCIceCandidate.prototype=Le.prototype,A(K,"icecandidate",me=>(me.candidate&&Object.defineProperty(me,"candidate",{value:new K.RTCIceCandidate(me.candidate),writable:"false"}),me))}function Ct(K,Le){if(!K.RTCPeerConnection)return;"sctp"in K.RTCPeerConnection.prototype||Object.defineProperty(K.RTCPeerConnection.prototype,"sctp",{get(){return this._sctp===void 0?null:this._sctp}});const me=function(Z){let ie=65536;return Le.browser==="firefox"&&(ie=Le.version<57?Z===-1?16384:2147483637:Le.version<60?Le.version===57?65535:65536:2147483637),ie},k=function(Z,ie){let we=65536;Le.browser==="firefox"&&Le.version===57&&(we=65535);const ke=Ge().matchPrefix(Z.sdp,"a=max-message-size:");return ke.length>0?we=parseInt(ke[0].substr(19),10):Le.browser==="firefox"&&ie!==-1&&(we=2147483637),we},J=K.RTCPeerConnection.prototype.setRemoteDescription;K.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,Le.browser==="chrome"&&Le.version>=76){const{sdpSemantics:Z}=this.getConfiguration();Z==="plan-b"&&Object.defineProperty(this,"sctp",{get(){return this._sctp===void 0?null:this._sctp},enumerable:!0,configurable:!0})}if(function(Z){if(!Z||!Z.sdp)return!1;const ie=Ge().splitSections(Z.sdp);return ie.shift(),ie.some(we=>{const ke=Ge().parseMLine(we);return ke&&ke.kind==="application"&&ke.protocol.indexOf("SCTP")!==-1})}(arguments[0])){const Z=function(ft){const lt=ft.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(lt===null||lt.length<2)return-1;const ye=parseInt(lt[1],10);return ye!=ye?-1:ye}(arguments[0]),ie=me(Z),we=k(arguments[0],Z);let ke;ke=ie===0&&we===0?Number.POSITIVE_INFINITY:ie===0||we===0?Math.max(ie,we):Math.min(ie,we);const at={};Object.defineProperty(at,"maxMessageSize",{get:()=>ke}),this._sctp=at}return J.apply(this,arguments)}}function Kt(K){if(!K.RTCPeerConnection||!("createDataChannel"in K.RTCPeerConnection.prototype))return;function Le(k,J){const Z=k.send;k.send=function(){const ie=arguments[0],we=ie.length||ie.size||ie.byteLength;if(k.readyState==="open"&&J.sctp&&we>J.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+J.sctp.maxMessageSize+" bytes)");return Z.apply(k,arguments)}}const me=K.RTCPeerConnection.prototype.createDataChannel;K.RTCPeerConnection.prototype.createDataChannel=function(){const k=me.apply(this,arguments);return Le(k,this),k},A(K,"datachannel",k=>(Le(k.channel,k.target),k))}function Yt(K){if(!K.RTCPeerConnection||"connectionState"in K.RTCPeerConnection.prototype)return;const Le=K.RTCPeerConnection.prototype;Object.defineProperty(Le,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(Le,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(me){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),me&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=me)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(me=>{const k=Le[me];Le[me]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=J=>{const Z=J.target;if(Z._lastConnectionState!==Z.connectionState){Z._lastConnectionState=Z.connectionState;const ie=new Event("connectionstatechange",J);Z.dispatchEvent(ie)}return J},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),k.apply(this,arguments)}})}function Gt(K,Le){if(!K.RTCPeerConnection||Le.browser==="chrome"&&Le.version>=71||Le.browser==="safari"&&Le.version>=605)return;const me=K.RTCPeerConnection.prototype.setRemoteDescription;K.RTCPeerConnection.prototype.setRemoteDescription=function(k){if(k&&k.sdp&&k.sdp.indexOf(`
|
|
119
|
+
a=extmap-allow-mixed`)!==-1){const J=k.sdp.split(`
|
|
120
|
+
`).filter(Z=>Z.trim()!=="a=extmap-allow-mixed").join(`
|
|
121
|
+
`);K.RTCSessionDescription&&k instanceof K.RTCSessionDescription?arguments[0]=new K.RTCSessionDescription({type:k.type,sdp:J}):k.sdp=J}return me.apply(this,arguments)}}function Bt(K,Le){if(!K.RTCPeerConnection||!K.RTCPeerConnection.prototype)return;const me=K.RTCPeerConnection.prototype.addIceCandidate;me&&me.length!==0&&(K.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(Le.browser==="chrome"&&Le.version<78||Le.browser==="firefox"&&Le.version<68||Le.browser==="safari")&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():me.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function mn(K,Le){if(!K.RTCPeerConnection||!K.RTCPeerConnection.prototype)return;const me=K.RTCPeerConnection.prototype.setLocalDescription;me&&me.length!==0&&(K.RTCPeerConnection.prototype.setLocalDescription=function(){let k=arguments[0]||{};if(typeof k!="object"||k.type&&k.sdp)return me.apply(this,arguments);if(k={type:k.type,sdp:k.sdp},!k.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":k.type="offer";break;default:k.type="answer"}return k.sdp||k.type!=="offer"&&k.type!=="answer"?me.apply(this,[k]):(k.type==="offer"?this.createOffer:this.createAnswer).apply(this).then(J=>me.apply(this,[J]))})}const yt=function({window:K}={},Le={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const me=x,k=function(Z){const ie={browser:null,version:null};if(Z===void 0||!Z.navigator)return ie.browser="Not a browser.",ie;const{navigator:we}=Z;if(we.mozGetUserMedia)ie.browser="firefox",ie.version=g(we.userAgent,/Firefox\/(\d+)\./,1);else if(we.webkitGetUserMedia||Z.isSecureContext===!1&&Z.webkitRTCPeerConnection&&!Z.RTCIceGatherer)ie.browser="chrome",ie.version=g(we.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!Z.RTCPeerConnection||!we.userAgent.match(/AppleWebKit\/(\d+)\./))return ie.browser="Not a supported browser.",ie;ie.browser="safari",ie.version=g(we.userAgent,/AppleWebKit\/(\d+)\./,1),ie.supportsUnifiedPlan=Z.RTCRtpTransceiver&&"currentDirection"in Z.RTCRtpTransceiver.prototype}return ie}(K),J={browserDetails:k,commonShim:y,extractVersion:g,disableLog:I,disableWarnings:O,sdp:jt};switch(k.browser){case"chrome":if(!l||!Ye||!Le.shimChrome)return me("Chrome shim is not included in this adapter release."),J;if(k.version===null)return me("Chrome shim can not determine version, not shimming."),J;me("adapter.js shimming chrome."),J.browserShim=l,Bt(K,k),mn(K),pe(K,k),rt(K),Ye(K,k),be(K),Oe(K,k),Te(K),C(K),st(K),ne(K,k),Ue(K),Yt(K),Ct(K,k),Kt(K),Gt(K,k);break;case"firefox":if(!v||!Qe||!Le.shimFirefox)return me("Firefox shim is not included in this adapter release."),J;me("adapter.js shimming firefox."),J.browserShim=v,Bt(K,k),mn(K),Ze(K,k),Qe(K,k),ct(K),D(K),re(K),f(K),H(K),q(K),he(K),Ae(K),ce(K),Ue(K),Yt(K),Ct(K,k),Kt(K);break;case"safari":if(!m||!Le.shimSafari)return me("Safari shim is not included in this adapter release."),J;me("adapter.js shimming safari."),J.browserShim=m,Bt(K,k),mn(K),fe(K),De(K),T(K),Se(K),Re(K),Ne(K),B(K),ht(K),Ue(K),Ct(K,k),Kt(K),Gt(K,k);break;default:me("Unsupported browser!")}return J}({window:typeof window=="undefined"?void 0:window}),zt=yt}},__webpack_module_cache__={};function __nested_webpack_require_712918__(S){var d=__webpack_module_cache__[S];if(d!==void 0)return d.exports;var o=__webpack_module_cache__[S]={id:S,loaded:!1,exports:{}};return __webpack_modules__[S].call(o.exports,o,o.exports,__nested_webpack_require_712918__),o.loaded=!0,o.exports}__nested_webpack_require_712918__.amdO={},__nested_webpack_require_712918__.n=S=>{var d=S&&S.__esModule?()=>S.default:()=>S;return __nested_webpack_require_712918__.d(d,{a:d}),d},__nested_webpack_require_712918__.d=(S,d)=>{for(var o in d)__nested_webpack_require_712918__.o(d,o)&&!__nested_webpack_require_712918__.o(S,o)&&Object.defineProperty(S,o,{enumerable:!0,get:d[o]})},__nested_webpack_require_712918__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(S){if(typeof window=="object")return window}}(),__nested_webpack_require_712918__.o=(S,d)=>Object.prototype.hasOwnProperty.call(S,d),__nested_webpack_require_712918__.r=S=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})},__nested_webpack_require_712918__.nmd=S=>(S.paths=[],S.children||(S.children=[]),S);var __webpack_exports__=__nested_webpack_require_712918__(4449);return __webpack_exports__})()},module.exports=t()},4783:function(S,d,o){var l;(l=o.g||window||this).__filename===void 0&&(l.__filename="__filename")},2808:(S,d,o)=>{"use strict";o.r(d);var l=o(9941),v=o(9925);function m(h){return new Promise(g=>g(function(A){const I=A.sdp;let O=0;const x=[],U=new Map;do{const G=I.indexOf(`\r
|
|
122
|
+
`,O);let P;if(G===-1?(P=I.substring(O),O=void 0):(P=I.substring(O,G),O=G+2),P.startsWith("a=candidate:")){const z=P.split(" ");if(z.length>=10&&z[6]==="typ"){const ue=[z[4]];let pe=!1;for(let Me=8;Me<z.length;++Me)if(z[Me]==="raddr"){ue.push(z[++Me]);break}for(const Me of ue){if(Me.indexOf(":")!==-1){pe=!0;break}U.has(Me)||U.set(Me,new Promise((rt,be)=>{const Te=U.get(Me);Te&&typeof Te=="string"?rt(Te):y(Me).then(C=>{C&&C.indexOf(":")!==-1&&C!==U.get(Me)?U.set(Me,C):U.delete(Me),rt(C)},be)}))}if(pe){U.clear();break}P=z}}x.push(P)}while(O);return{ips:U,lines:x}}(h))).then(({ips:g,lines:A})=>Promise.all(Array.from(g.values())).then(()=>function(I,O,x){if(O.size===0)return I;for(let U=0;U<x.length;++U){const G=x[U];if(typeof G!="string"){let P=G[4],z=O.get(P);z&&(G[4]=z);for(let ue=8;ue<G.length;++ue)if(G[ue]==="raddr"){P=G[++ue],(z=O.get(P))&&(G[ue]=z);break}x[U]=G.join(" ")}}return new l.RTCSessionDescription({sdp:x.join(`\r
|
|
123
|
+
`),type:I.type})}(h,g,A)))}const y=function(){const{POSIX:h}=v.NativeModules;if(h){const{getaddrinfo:A}=h;if(typeof A=="function")return I=>A(I,void 0).then(([{ai_addr:O}])=>O)}const{NAT64AddrInfo:g}=v.NativeModules;if(g){const{getIPv6Address:A}=g;if(typeof A=="function")return A}return A=>Promise.resolve(A)}();class j extends l.RTCPeerConnection{setRemoteDescription(g){return fr(this,null,function*(){return Vl(j.prototype,this,"setRemoteDescription").call(this,yield m(g))})}}(h=>{h.MediaStream===void 0&&(h.MediaStream=l.MediaStream),h.MediaStreamTrack===void 0&&(h.MediaStreamTrack=l.MediaStreamTrack),h.RTCIceCandidate===void 0&&(h.RTCIceCandidate=l.RTCIceCandidate),h.RTCPeerConnection===void 0&&(h.RTCPeerConnection=j),h.RTCPeerConnection===void 0&&(h.webkitRTCPeerConnection=j),h.RTCSessionDescription===void 0&&(h.RTCSessionDescription=l.RTCSessionDescription);const g=h.navigator;g&&(g.mediaDevices===void 0&&(g.mediaDevices=l.mediaDevices),g.permissions===void 0&&(g.permissions=l.permissions))})(o.g||window||void 0)},6878:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__6878__},8156:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__8156__},9925:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__9925__},5559:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__5559__},3650:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__3650__},3394:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__3394__},9941:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__9941__},4654:()=>{},7973:(S,d,o)=>{"use strict";var l=o(6893)("%Array%"),v=!l.isArray&&o(8780)("Object.prototype.toString");S.exports=l.isArray||function(m){return v(m)==="[object Array]"}},4663:(S,d,o)=>{"use strict";var l=o(6893),v=o(3862),m=l("%Promise.resolve%",!0),y=m&&v(m);S.exports=function(j,h){if(!y)throw new SyntaxError("This environment does not support Promises.");return y(j,h)}},8737:(S,d,o)=>{"use strict";var l=o(349);S.exports=function(v){return typeof v=="symbol"?"Symbol":typeof v=="bigint"?"BigInt":l(v)}},2612:(S,d,o)=>{"use strict";var l=o(6893),v=l("%Array.prototype%"),m=l("%RangeError%"),y=l("%SyntaxError%"),j=l("%TypeError%"),h=o(6987),g=Math.pow(2,32)-1,A=l("%Object.setPrototypeOf%",!0)||([].__proto__!==v?null:function(I,O){return I.__proto__=O,I});S.exports=function(I){if(!h(I)||I<0)throw new j("Assertion failed: `length` must be an integer Number >= 0");if(I>g)throw new m("length is greater than (2**32 - 1)");var O=arguments.length>1?arguments[1]:v,x=[];if(O!==v){if(!A)throw new y("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");A(x,O)}return I!==0&&(x.length=I),x}},1976:(S,d,o)=>{"use strict";var l=o(6893),v=l("%Symbol.species%",!0),m=l("%TypeError%"),y=o(2612),j=o(3495),h=o(5091),g=o(3520),A=o(6987),I=o(5784);S.exports=function(O,x){if(!A(x)||x<0)throw new m("Assertion failed: length must be an integer >= 0");if(!h(O))return y(x);var U=j(O,"constructor");if(v&&I(U)==="Object"&&(U=j(U,v))===null&&(U=void 0),U===void 0)return y(x);if(!g(U))throw new m("C must be a constructor");return new U(x)}},9377:(S,d,o)=>{"use strict";var l=o(6893),v=o(8780),m=l("%TypeError%"),y=o(5091),j=l("%Reflect.apply%",!0)||v("%Function.prototype.apply%");S.exports=function(h,g){var A=arguments.length>2?arguments[2]:[];if(!y(A))throw new m("Assertion failed: optional `argumentsList`, if provided, must be a List");return j(h,g,A)}},1822:(S,d,o)=>{"use strict";var l=o(6893)("%TypeError%"),v=o(6139),m=o(3790),y=o(2815),j=o(4416),h=o(3680),g=o(2042),A=o(1320),I=o(5784);S.exports=function(O,x,U){if(I(O)!=="Object")throw new l("Assertion failed: Type(O) is not Object");if(!g(x))throw new l("Assertion failed: IsPropertyKey(P) is not true");var G=y(O,x),P=!G||h(O);return!(G&&(!G["[[Writable]]"]||!G["[[Configurable]]"])||!P)&&v(j,A,m,O,x,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":U,"[[Writable]]":!0})}},6056:(S,d,o)=>{"use strict";var l=o(6893)("%TypeError%"),v=o(1822),m=o(2042),y=o(5784);S.exports=function(j,h,g){if(y(j)!=="Object")throw new l("Assertion failed: Type(O) is not Object");if(!m(h))throw new l("Assertion failed: IsPropertyKey(P) is not true");var A=v(j,h,g);if(!A)throw new l("unable to create data property");return A}},9522:(S,d,o)=>{"use strict";var l=o(6893)("%TypeError%"),v=o(7792),m=o(6139),y=o(3790),j=o(6708),h=o(4416),g=o(2042),A=o(1320),I=o(7106),O=o(5784);S.exports=function(x,U,G){if(O(x)!=="Object")throw new l("Assertion failed: Type(O) is not Object");if(!g(U))throw new l("Assertion failed: IsPropertyKey(P) is not true");var P=v({Type:O,IsDataDescriptor:h,IsAccessorDescriptor:j},G)?G:I(G);if(!v({Type:O,IsDataDescriptor:h,IsAccessorDescriptor:j},P))throw new l("Assertion failed: Desc is not a valid Property Descriptor");return m(h,A,y,x,U,P)}},3790:(S,d,o)=>{"use strict";var l=o(7763),v=o(5784);S.exports=function(m){if(m===void 0)return m;l(v,"Property Descriptor","Desc",m);var y={};return"[[Value]]"in m&&(y.value=m["[[Value]]"]),"[[Writable]]"in m&&(y.writable=m["[[Writable]]"]),"[[Get]]"in m&&(y.get=m["[[Get]]"]),"[[Set]]"in m&&(y.set=m["[[Set]]"]),"[[Enumerable]]"in m&&(y.enumerable=m["[[Enumerable]]"]),"[[Configurable]]"in m&&(y.configurable=m["[[Configurable]]"]),y}},3495:(S,d,o)=>{"use strict";var l=o(6893)("%TypeError%"),v=o(2428),m=o(2042),y=o(5784);S.exports=function(j,h){if(y(j)!=="Object")throw new l("Assertion failed: Type(O) is not Object");if(!m(h))throw new l("Assertion failed: IsPropertyKey(P) is not true, got "+v(h));return j[h]}},3893:(S,d,o)=>{"use strict";var l=o(6893)("%TypeError%"),v=o(2042),m=o(5784);S.exports=function(y,j){if(m(y)!=="Object")throw new l("Assertion failed: `O` must be an Object");if(!v(j))throw new l("Assertion failed: `P` must be a Property Key");return j in y}},6708:(S,d,o)=>{"use strict";var l=o(7751),v=o(7763),m=o(5784);S.exports=function(y){return y!==void 0&&(v(m,"Property Descriptor","Desc",y),!(!l(y,"[[Get]]")&&!l(y,"[[Set]]")))}},5091:(S,d,o)=>{"use strict";var l=o(6893)("%Array%"),v=!l.isArray&&o(8780)("Object.prototype.toString");S.exports=l.isArray||function(m){return v(m)==="[object Array]"}},2371:(S,d,o)=>{"use strict";S.exports=o(8625)},3520:(S,d,o)=>{"use strict";var l=o(4149)("%Reflect.construct%",!0),v=o(9522);try{v({},"",{"[[Get]]":function(){}})}catch(j){v=null}if(v&&l){var m={},y={};v(y,"length",{"[[Get]]":function(){throw m},"[[Enumerable]]":!0}),S.exports=function(j){try{l(j,y)}catch(h){return h===m}}}else S.exports=function(j){return typeof j=="function"&&!!j.prototype}},4416:(S,d,o)=>{"use strict";var l=o(7751),v=o(7763),m=o(5784);S.exports=function(y){return y!==void 0&&(v(m,"Property Descriptor","Desc",y),!(!l(y,"[[Value]]")&&!l(y,"[[Writable]]")))}},3680:(S,d,o)=>{"use strict";var l=o(6893)("%Object%"),v=o(127),m=l.preventExtensions,y=l.isExtensible;S.exports=m?function(j){return!v(j)&&y(j)}:function(j){return!v(j)}},6987:(S,d,o)=>{"use strict";var l=o(9561),v=o(5356),m=o(5784),y=o(2657),j=o(7333);S.exports=function(h){if(m(h)!=="Number"||y(h)||!j(h))return!1;var g=l(h);return v(g)===g}},2042:S=>{"use strict";S.exports=function(d){return typeof d=="string"||typeof d=="symbol"}},8273:(S,d,o)=>{"use strict";var l=o(6893)("%Symbol.match%",!0),v=o(2975),m=o(3018);S.exports=function(y){if(!y||typeof y!="object")return!1;if(l){var j=y[l];if(j!==void 0)return m(j)}return v(y)}},2815:(S,d,o)=>{"use strict";var l=o(6893),v=o(3999),m=l("%TypeError%"),y=o(8780)("Object.prototype.propertyIsEnumerable"),j=o(7751),h=o(5091),g=o(2042),A=o(8273),I=o(7106),O=o(5784);S.exports=function(x,U){if(O(x)!=="Object")throw new m("Assertion failed: O must be an Object");if(!g(U))throw new m("Assertion failed: P must be a Property Key");if(j(x,U)){if(!v){var G=h(x)&&U==="length",P=A(x)&&U==="lastIndex";return{"[[Configurable]]":!(G||P),"[[Enumerable]]":y(x,U),"[[Value]]":x[U],"[[Writable]]":!0}}return I(v(x,U))}}},560:(S,d,o)=>{"use strict";S.exports=o(3953)},1320:(S,d,o)=>{"use strict";var l=o(2657);S.exports=function(v,m){return v===m?v!==0||1/v==1/m:l(v)&&l(m)}},3018:S=>{"use strict";S.exports=function(d){return!!d}},3892:(S,d,o)=>{"use strict";var l=o(6893),v=l("%TypeError%"),m=l("%Number%"),y=l("%RegExp%"),j=l("%parseInt%"),h=o(8780),g=o(1667),A=o(127),I=h("String.prototype.slice"),O=g(/^0b[01]+$/i),x=g(/^0o[0-7]+$/i),U=g(/^[-+]0x[0-9a-f]+$/i),G=g(new y("["+["\x85","\u200B","\uFFFE"].join("")+"]","g")),P=[`
|
|
124
|
+
\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003`,"\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028","\u2029\uFEFF"].join(""),z=new RegExp("(^["+P+"]+)|(["+P+"]+$)","g"),ue=h("String.prototype.replace"),pe=o(6281);S.exports=function Me(rt){var be=A(rt)?rt:pe(rt,m);if(typeof be=="symbol")throw new v("Cannot convert a Symbol value to a number");if(typeof be=="bigint")throw new v("Conversion from 'BigInt' to 'number' is not allowed.");if(typeof be=="string"){if(O(be))return Me(j(I(be,2),2));if(x(be))return Me(j(I(be,2),8));if(G(be)||U(be))return NaN;var Te=function(C){return ue(C,z,"")}(be);if(Te!==be)return Me(Te)}return m(be)}},3058:(S,d,o)=>{"use strict";var l=o(6893)("%Object%"),v=o(560);S.exports=function(m){return v(m),l(m)}},6281:(S,d,o)=>{"use strict";var l=o(1157);S.exports=function(v){return arguments.length>1?l(v,arguments[1]):l(v)}},7106:(S,d,o)=>{"use strict";var l=o(7751),v=o(6893)("%TypeError%"),m=o(5784),y=o(3018),j=o(2371);S.exports=function(h){if(m(h)!=="Object")throw new v("ToPropertyDescriptor requires an object");var g={};if(l(h,"enumerable")&&(g["[[Enumerable]]"]=y(h.enumerable)),l(h,"configurable")&&(g["[[Configurable]]"]=y(h.configurable)),l(h,"value")&&(g["[[Value]]"]=h.value),l(h,"writable")&&(g["[[Writable]]"]=y(h.writable)),l(h,"get")){var A=h.get;if(A!==void 0&&!j(A))throw new v("getter must be a function");g["[[Get]]"]=A}if(l(h,"set")){var I=h.set;if(I!==void 0&&!j(I))throw new v("setter must be a function");g["[[Set]]"]=I}if((l(g,"[[Get]]")||l(g,"[[Set]]"))&&(l(g,"[[Value]]")||l(g,"[[Writable]]")))throw new v("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return g}},8846:(S,d,o)=>{"use strict";var l=o(6893),v=l("%String%"),m=l("%TypeError%");S.exports=function(y){if(typeof y=="symbol")throw new m("Cannot convert a Symbol value to a string");return v(y)}},4337:(S,d,o)=>{"use strict";var l=o(3892);S.exports=function(v){return l(v)>>>0}},5784:(S,d,o)=>{"use strict";var l=o(349);S.exports=function(v){return typeof v=="symbol"?"Symbol":typeof v=="bigint"?"BigInt":l(v)}},9561:(S,d,o)=>{"use strict";var l=o(6893)("%Math.abs%");S.exports=function(v){return l(v)}},5356:S=>{"use strict";var d=Math.floor;S.exports=function(o){return d(o)}},3953:(S,d,o)=>{"use strict";var l=o(6893)("%TypeError%");S.exports=function(v,m){if(v==null)throw new l(m||"Cannot call method on "+v);return v}},349:S=>{"use strict";S.exports=function(d){return d===null?"Null":d===void 0?"Undefined":typeof d=="function"||typeof d=="object"?"Object":typeof d=="number"?"Number":typeof d=="boolean"?"Boolean":typeof d=="string"?"String":void 0}},4149:(S,d,o)=>{"use strict";S.exports=o(6893)},6139:(S,d,o)=>{"use strict";var l=o(6893)("%Object.defineProperty%",!0);if(l)try{l({},"a",{value:1})}catch(j){l=null}var v=Object.defineProperty&&Object.defineProperty([],"length",{value:1}).length===0,m=v&&o(7973),y=o(8780)("Object.prototype.propertyIsEnumerable");S.exports=function(j,h,g,A,I,O){if(!l){if(!j(O)||!O["[[Configurable]]"]||!O["[[Writable]]"]||I in A&&y(A,I)!==!!O["[[Enumerable]]"])return!1;var x=O["[[Value]]"];return A[I]=x,h(A[I],x)}return v&&I==="length"&&"[[Value]]"in O&&m(A)&&A.length!==O["[[Value]]"]?(A.length=O["[[Value]]"],A.length===O["[[Value]]"]):(l(A,I,g(O)),!0)}},7763:(S,d,o)=>{"use strict";var l=o(6893),v=l("%TypeError%"),m=l("%SyntaxError%"),y=o(7751),j={"Property Descriptor":function(h,g){if(h(g)!=="Object")return!1;var A={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var I in g)if(y(g,I)&&!A[I])return!1;var O=y(g,"[[Value]]"),x=y(g,"[[Get]]")||y(g,"[[Set]]");if(O&&x)throw new v("Property Descriptors may not be both accessor and data descriptors");return!0}};S.exports=function(h,g,A,I){var O=j[g];if(typeof O!="function")throw new m("unknown record type: "+g);if(!O(h,I))throw new v(A+" must be a "+g)}},3999:(S,d,o)=>{"use strict";var l=o(6893)("%Object.getOwnPropertyDescriptor%",!0);if(l)try{l([],"length")}catch(v){l=null}S.exports=l},7333:S=>{"use strict";var d=Number.isNaN||function(o){return o!=o};S.exports=Number.isFinite||function(o){return typeof o=="number"&&!d(o)&&o!==1/0&&o!==-1/0}},2657:S=>{"use strict";S.exports=Number.isNaN||function(d){return d!=d}},127:S=>{"use strict";S.exports=function(d){return d===null||typeof d!="function"&&typeof d!="object"}},7792:(S,d,o)=>{"use strict";var l=o(6893),v=o(7751),m=l("%TypeError%");S.exports=function(y,j){if(y.Type(j)!=="Object")return!1;var h={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var g in j)if(v(j,g)&&!h[g])return!1;if(y.IsDataDescriptor(j)&&y.IsAccessorDescriptor(j))throw new m("Property Descriptors may not be both accessor and data descriptors");return!0}},1667:(S,d,o)=>{"use strict";var l=o(6893)("RegExp.prototype.test"),v=o(3862);S.exports=function(m){return v(l,m)}},8555:(S,d,o)=>{"use strict";var l=o(2755);if(o(5990)()||o(3031)()){var v=Symbol.iterator;S.exports=function(st){return st!=null&&st[v]!==void 0?st[v]():l(st)?Array.prototype[v].call(st):void 0}}else{var m=o(5670),y=o(2615),j=o(6893),h=j("%Map%",!0),g=j("%Set%",!0),A=o(8780),I=A("Array.prototype.push"),O=A("String.prototype.charCodeAt"),x=A("String.prototype.slice"),U=function(st){var _e=0;return{next:function(){var Oe,Ye=_e>=st.length;return Ye||(Oe=st[_e],_e+=1),{done:Ye,value:Oe}}}},G=function(st,_e){if(m(st)||l(st))return U(st);if(y(st)){var Oe=0;return{next:function(){var Ye=function(Ze,xe){if(xe+1>=Ze.length)return xe+1;var ct=O(Ze,xe);if(ct<55296||ct>56319)return xe+1;var Qe=O(Ze,xe+1);return Qe<56320||Qe>57343?xe+1:xe+2}(st,Oe),ne=x(st,Oe,Ye);return Oe=Ye,{done:Ye>st.length,value:ne}}}}return _e&&st["_es6-shim iterator_"]!==void 0?st["_es6-shim iterator_"]():void 0};if(h||g){var P=o(8566),z=o(2289),ue=A("Map.prototype.forEach",!0),pe=A("Set.prototype.forEach",!0);if(typeof process=="undefined"||!process.versions||!process.versions.node)var Me=A("Map.prototype.iterator",!0),rt=A("Set.prototype.iterator",!0),be=function(st){var _e=!1;return{next:function(){try{return{done:_e,value:_e?void 0:st.next()}}catch(Oe){return _e=!0,{done:!0,value:void 0}}}}};var Te=A("Map.prototype.@@iterator",!0)||A("Map.prototype._es6-shim iterator_",!0),C=A("Set.prototype.@@iterator",!0)||A("Set.prototype._es6-shim iterator_",!0);S.exports=function(st){return function(_e){if(P(_e)){if(Me)return be(Me(_e));if(Te)return Te(_e);if(ue){var Oe=[];return ue(_e,function(ne,Ze){I(Oe,[Ze,ne])}),U(Oe)}}if(z(_e)){if(rt)return be(rt(_e));if(C)return C(_e);if(pe){var Ye=[];return pe(_e,function(ne){I(Ye,ne)}),U(Ye)}}}(st)||G(st)}}else S.exports=function(st){if(st!=null)return G(st,!0)}}},4787:(S,d,o)=>{"use strict";var l=o(8555),v=TypeError,m=o(6247);S.exports=function(y){var j=l(y);if(!j)throw new v("non-iterable value provided");return arguments.length>1?m(j,arguments[1]):m(j)}},2834:S=>{"use strict";S.exports=JSON.parse('{"_args":[["react-native@0.66.4","/Users/ritikkaushik/Desktop/CometChat/cometchat-pro-call-ios"]],"_from":"react-native@0.66.4","_id":"react-native@0.66.4","_inBundle":false,"_integrity":"sha512-9vx5dlSfQlKbbDtr8+xMon6qsmSu7jvjdXWZpEKh3XVKpUidbbODv7048gwVKX8YAel1egeR7hN8vzSeI6ssTw==","_location":"/react-native","_phantomChildren":{"@react-native-community/cli-debugger-ui":"6.0.0","@react-native-community/cli-hermes":"6.3.1","@react-native-community/cli-plugin-metro":"6.4.0","@react-native-community/cli-server-api":"6.4.3","@react-native-community/cli-tools":"6.2.1","@react-native-community/cli-types":"6.0.0","appdirsjs":"1.2.7","chalk":"4.1.2","command-exists":"1.2.9","commander":"2.20.3","cosmiconfig":"5.2.1","deepmerge":"3.3.0","envinfo":"7.10.0","execa":"1.0.0","find-up":"4.1.0","fs-extra":"8.1.0","glob":"7.2.3","graceful-fs":"4.2.11","joi":"17.9.2","leven":"3.1.0","lodash":"4.17.21","minimist":"1.2.8","node-stream-zip":"1.15.0","ora":"3.4.0","pretty-format":"26.6.2","prompts":"2.4.2","semver":"6.3.1","serve-static":"1.15.0","strip-ansi":"5.2.0","sudo-prompt":"9.2.1","wcwidth":"1.0.1"},"_requested":{"type":"version","registry":true,"raw":"react-native@0.66.4","name":"react-native","escapedName":"react-native","rawSpec":"0.66.4","saveSpec":null,"fetchSpec":"0.66.4"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/react-native/-/react-native-0.66.4.tgz","_spec":"0.66.4","_where":"/Users/ritikkaushik/Desktop/CometChat/cometchat-pro-call-ios","bin":{"react-native":"cli.js"},"bugs":{"url":"https://github.com/facebook/react-native/issues"},"dependencies":{"@jest/create-cache-key-function":"^27.0.1","@react-native-community/cli":"^6.0.0","@react-native-community/cli-platform-android":"^6.0.0","@react-native-community/cli-platform-ios":"^6.0.0","@react-native/assets":"1.0.0","@react-native/normalize-color":"1.0.0","@react-native/polyfills":"2.0.0","abort-controller":"^3.0.0","anser":"^1.4.9","base64-js":"^1.1.2","event-target-shim":"^5.0.1","hermes-engine":"~0.9.0","invariant":"^2.2.4","jsc-android":"^250230.2.1","metro-babel-register":"0.66.2","metro-react-native-babel-transformer":"0.66.2","metro-runtime":"0.66.2","metro-source-map":"0.66.2","nullthrows":"^1.1.1","pretty-format":"^26.5.2","promise":"^8.0.3","prop-types":"^15.7.2","react-devtools-core":"^4.13.0","react-native-codegen":"^0.0.7","react-refresh":"^0.4.0","regenerator-runtime":"^0.13.2","scheduler":"^0.20.2","stacktrace-parser":"^0.1.3","use-subscription":"^1.0.0","whatwg-fetch":"^3.0.0","ws":"^6.1.4"},"description":"A framework for building native apps using React","detox":{"test-runner":"jest","runner-config":"packages/rn-tester/e2e/config.json","specs":"","configurations":{"android.emu.release":{"binaryPath":"packages/rn-tester/android/app/build/outputs/apk/hermes/release/app-hermes-x86-release.apk","testBinaryPath":"packages/rn-tester/android/app/build/outputs/apk/androidTest/hermes/release/app-hermes-release-androidTest.apk","build":"./gradlew :packages:rn-tester:android:app:assembleRelease :packages:rn-tester:android:app:assembleAndroidTest -DtestBuildType=release","type":"android.emulator","device":{"avdName":"Nexus_6_API_29"}},"android.emu.debug":{"binaryPath":"packages/rn-tester/android/app/build/outputs/apk/hermes/debug/app-hermes-x86-debug.apk","testBinaryPath":"packages/rn-tester/android/app/build/outputs/apk/androidTest/hermes/debug/app-hermes-debug-androidTest.apk","build":"./gradlew :packages:rn-tester:android:app:assembleDebug :packages:rn-tester:android:app:assembleAndroidTest -DtestBuildType=debug","type":"android.emulator","device":{"avdName":"Nexus_6_API_29"}},"ios.sim.release":{"binaryPath":"packages/rn-tester/build/Build/Products/Release-iphonesimulator/RNTester.app/","build":"xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester -configuration Release -sdk iphonesimulator -derivedDataPath packages/rn-tester/build -UseModernBuildSystem=NO -quiet","type":"ios.simulator","name":"iPhone 8"},"ios.sim.debug":{"binaryPath":"packages/rn-tester/build/Build/Products/Debug-iphonesimulator/RNTester.app/","build":"xcodebuild -workspace packages/rn-tester/RNTesterPods.xcworkspace -scheme RNTester -configuration Debug -sdk iphonesimulator -derivedDataPath packages/rn-tester/build -UseModernBuildSystem=NO -quiet","type":"ios.simulator","name":"iPhone 8"}}},"devDependencies":{"@babel/core":"^7.14.0","@babel/generator":"^7.14.0","@babel/template":"^7.0.0","@babel/types":"^7.0.0","@react-native-community/eslint-plugin":"*","@reactions/component":"^2.0.2","async":"^2.4.0","babel-eslint":"^10.1.0","babel-preset-fbjs":"^3.4.0","clang-format":"^1.2.4","connect":"^3.6.5","coveralls":"^3.0.2","detox":"16.7.2","eslint":"7.12.0","eslint-config-fb-strict":"^24.9.0","eslint-config-fbjs":"2.1.0","eslint-config-prettier":"^6.0.0","eslint-plugin-babel":"^5.3.0","eslint-plugin-eslint-comments":"^3.1.1","eslint-plugin-flowtype":"2.50.3","eslint-plugin-jest":"22.4.1","eslint-plugin-jsx-a11y":"6.2.1","eslint-plugin-prettier":"2.6.2","eslint-plugin-react":"7.21.5","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-react-native":"3.10.0","eslint-plugin-relay":"1.8.1","flow-bin":"^0.158.0","jest":"^26.6.3","jest-junit":"^10.0.0","jscodeshift":"^0.11.0","metro-babel-register":"0.66.2","metro-transform-plugins":"^0.66.0","mkdirp":"^0.5.1","prettier":"1.19.1","react":"17.0.2","react-shallow-renderer":"16.14.1","react-test-renderer":"17.0.2","shelljs":"^0.7.8","signedsource":"^1.0.0","ws":"^6.1.4","yargs":"^15.3.1"},"engines":{"node":">=12"},"files":["!template/node_modules","!template/package-lock.json","!template/yarn.lock","android","cli.js","flow","flow-typed","index.js","interface.js","jest-preset.js","jest","Libraries","LICENSE","local-cli","React-Core.podspec","react-native.config.js","react.gradle","React.podspec","React","ReactAndroid","ReactCommon","README.md","rn-get-polyfills.js","scripts/compose-source-maps.js","scripts/find-node.sh","scripts/generate-specs.sh","scripts/generate-specs-cli.js","scripts/ios-configure-glog.sh","scripts/launchPackager.bat","scripts/launchPackager.command","scripts/node-binary.sh","scripts/packager.sh","scripts/react_native_pods.rb","scripts/react-native-xcode.sh","template.config.js","template","third-party-podspecs"],"homepage":"https://github.com/facebook/react-native#readme","jest-junit":{"outputDirectory":"reports/junit","outputName":"js-test-results.xml"},"license":"MIT","name":"react-native","peerDependencies":{"react":"17.0.2"},"repository":{"type":"git","url":"git+https://github.com/facebook/react-native.git"},"scripts":{"build-ios-e2e":"detox build -c ios.sim.release","clang-format":"clang-format -i --glob=*/**/*.{h,cpp,m,mm}","docker-build-android":"docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .","docker-setup-android":"docker pull reactnativecommunity/react-native-android:4.0","flow":"flow","flow-check-android":"flow check --flowconfig-name .flowconfig.android","flow-check-ios":"flow check","format":"npm run prettier && npm run clang-format","format-check":"prettier --list-different \\"./**/*.{js,md,yml}\\"","lint":"eslint .","lint-ci":"./scripts/circleci/analyze_code.sh && yarn shellcheck","lint-java":"node ./scripts/lint-java.js","prettier":"prettier --write \\"./**/*.{js,md,yml}\\"","shellcheck":"./scripts/circleci/analyze_scripts.sh","start":"react-native start","test":"jest","test-android-all":"yarn run docker-build-android && yarn run test-android-run-unit && yarn run test-android-run-instrumentation && yarn run test-android-run-e2e","test-android-e2e":"yarn run docker-build-android && yarn run test-android-run-e2e","test-android-instrumentation":"yarn run docker-build-android && yarn run test-android-run-instrumentation","test-android-run-e2e":"docker run --privileged -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh --android --js","test-android-run-instrumentation":"docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh","test-android-run-unit":"docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh","test-android-unit":"yarn run docker-build-android && yarn run test-android-run-unit","test-ci":"jest --maxWorkers=2 --ci --reporters=\\"default\\" --reporters=\\"jest-junit\\"","test-ios":"./scripts/objc-test.sh test","test-ios-e2e":"detox test -c ios.sim.release packages/rn-tester/e2e","update-lock":"npx yarn-deduplicate"},"version":"0.66.4"}')},4147:S=>{"use strict";S.exports={i8:"3.0.2"}}},__webpack_module_cache__={};function __nested_webpack_require_965809__(S){var d=__webpack_module_cache__[S];if(d!==void 0)return d.exports;var o=__webpack_module_cache__[S]={exports:{}};return __webpack_modules__[S].call(o.exports,o,o.exports,__nested_webpack_require_965809__),o.exports}__nested_webpack_require_965809__.n=S=>{var d=S&&S.__esModule?()=>S.default:()=>S;return __nested_webpack_require_965809__.d(d,{a:d}),d},__nested_webpack_require_965809__.d=(S,d)=>{for(var o in d)__nested_webpack_require_965809__.o(d,o)&&!__nested_webpack_require_965809__.o(S,o)&&Object.defineProperty(S,o,{enumerable:!0,get:d[o]})},__nested_webpack_require_965809__.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(S){if(typeof window=="object")return window}}(),__nested_webpack_require_965809__.o=(S,d)=>Object.prototype.hasOwnProperty.call(S,d),__nested_webpack_require_965809__.r=S=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__nested_webpack_require_965809__.r(__webpack_exports__),__nested_webpack_require_965809__.d(__webpack_exports__,{default:()=>Q});var S=__nested_webpack_require_965809__(8156),d=__nested_webpack_require_965809__.n(S),o=__nested_webpack_require_965809__(9925);const l="onSwitchedToVideoCall",v="toggleVideoFit",m="updateUserList",y="setDimension",j="onConnectionSuccess",h="onConnectionError",g="onConferenceJoined",A="onConferenceFailed",I="setDominantSpeaker",O="setPinnedUsed",x="onScreenRecordingStarted",U="onTryingToStartRecording",G="onTryingToStopRecording",P="onScreenRecordingStopped",z="onRequestingToSwitchToVideoCall",ue="onSwitchToVideoCallRequested",pe="onSwitchToVideoCallAccepted",Me="onSwitchToVideoCallReJected",rt="onAudioCallConvertedToVideoCall",be="updateNoOfScreenShareUser",Te="setRecorder",C="togglePipMode",st="setAudioModes",_e="setSelectedAudioMode",Oe="toggleAudioModeModel",Ye="toggleParticipantsModel",ne="toggleCamera",Ze="toggleEndCallDialog",xe=(R,{type:F,payload:_})=>{switch(F){case l:return fn(Ft({},R),{isAudioOnly:!1});case v:return fn(Ft({},R),{videoSettings:fn(Ft({},R.videoSettings),{videoFit:_})});default:return Ft({},R)}},ct={disableAudioLevels:!0,disableSimulcast:!1,disableThirdPartyRequests:!0},Qe={openBridgeChannel:"websocket",enableNoisyMicDetection:!0,channelLastN:10,websocketKeepAlive:-1,testing:{octo:{probability:1}},e2eping:{pingInterval:-1},deploymentInfo:{userRegion:"eu-west-1"},enableTalkWhileMuted:!0,p2p:{enabled:!1}},re="user_object",f="SCREEN_SHARING_STARTED",D="SCREEN_SHARING_STOPPED",H="CONVERT_TO_VIDEO_REQUEST",q="CONVERT_TO_VIDEO_RESPONSE",he="START_SCREEN_RECORDING",Ae="stopScreenRecording",ce="tryingToStopStartScreenRecording",Se="tryingToStartScreenRecording",Re="participantMuted",T="endSessionForAll",B="SPOTLIGHT",Y="PRESENTER",fe={HEADPHONES:"HEADPHONES",SPEAKER:"SPEAKER",EARPIECE:"EARPIECE",BLUETOOTH:"BLUETOOTH"},Ne=[fe.BLUETOOTH,fe.HEADPHONES,fe.EARPIECE,fe.SPEAKER],De=[fe.BLUETOOTH,fe.HEADPHONES,fe.SPEAKER,fe.EARPIECE],ht="initial",jt="converted",Ge="requested",Ue=15,Ct={showAudioModel:!1,dimension:{height:500,width:300},dominantSpeakerId:"",connectionSuccess:!1,connectionError:!1,pinnedUserId:"",conferenceJoined:!1,recorder:null,recordId:"",isRecording:!1,tryingToStartRecording:!1,inPIPMode:!1,isPortrait:!0,switchToVideoCallRequestInitiator:null,switchedToVideoCall:!1,showSwitchToVideoCallModel:!1,switchToVideoRequestModelType:ht,switchToVideoCallRequestResponder:null,noOfScreenShareUser:0,audioModes:[],mode:"TILE",selectedAudioMode:"SPEAKER",LastNId:[],isParticipantsModelVisible:!1,cameraFlipped:!0,connectionErrorType:"",showEndCallDialog:!1},Kt=(R,{type:F,payload:_})=>{switch(F){case Ze:return fn(Ft({},R),{showEndCallDialog:_});case ne:return fn(Ft({},R),{cameraFlipped:_});case Ye:return fn(Ft({},R),{isParticipantsModelVisible:_});case"updatelastNid":return fn(Ft({},R),{LastNId:_});case _e:return fn(Ft({},R),{selectedAudioMode:_});case Oe:return fn(Ft({},R),{showAudioModel:_});case st:return fn(Ft({},R),{audioModes:_});case y:return fn(Ft({},R),{dimension:_,isPortrait:_.height>_.width});case I:return fn(Ft({},R),{dominantSpeakerId:_});case j:return fn(Ft({},R),{dominantSpeakerId:_,connectionSuccess:!0,connectionError:!1});case h:return fn(Ft({},R),{connectionError:_.error,connectionErrorType:_.type});case O:return fn(Ft({},R),{pinnedUserId:_});case g:return fn(Ft({},R),{conferenceJoined:!0});case A:return fn(Ft({},R),{conferenceJoined:!1});case x:return fn(Ft({},R),{recorder:_,recordId:_.id,isRecording:!0,tryingToStartRecording:!1});case U:return fn(Ft({},R),{tryingToStartRecording:!0,recorder:_});case G:return fn(Ft({},R),{tryingToStartRecording:!1,recorder:_});case P:return fn(Ft({},R),{recorder:null,recordId:"",isRecording:!1,tryingToStartRecording:!1});case"onScreenOrientationChanged":return fn(Ft({},R),{isPortrait:_});case z:return fn(Ft({},R),{showSwitchToVideoCallModel:!0,switchToVideoRequestModelType:Ge,switchToVideoCallRequestInitiator:_});case ue:return fn(Ft({},R),{showSwitchToVideoCallModel:!0,switchToVideoCallRequestInitiator:_,switchToVideoRequestModelType:ht});case pe:return fn(Ft({},R),{switchToVideoCallRequestResponder:_,showSwitchToVideoCallModel:!1,switchedToVideoCall:!0});case Me:return fn(Ft({},R),{showSwitchToVideoCallModel:!1,switchToVideoCallRequestResponder:_});case rt:return fn(Ft({},R),{switchToVideoCallRequestInitiator:_.switchToVideoCallRequestInitiator,switchToVideoCallRequestResponder:_.switchToVideoCallRequestResponder,switchToVideoRequestModelType:jt,showSwitchToVideoCallModel:!0});case be:return fn(Ft({},R),{noOfScreenShareUser:_});case Te:return fn(Ft({},R),{recorder:_});case C:return fn(Ft({},R),{inPIPMode:_});default:return Ft({},R)}},Yt=(R,{type:F,payload:_})=>F===m?_?[..._]:R:Ft({},R),Gt=(0,S.createContext)(null),Bt=()=>(0,S.useContext)(Gt),mn=({children:R,initialState:F,reducer:_})=>{const[w,V]=(0,S.useReducer)(xe,F),[W,te]=(0,S.useReducer)(_,Ct),oe=(0,S.useRef)({}),le=(0,S.useRef)([]),Fe=(0,S.useRef)(null),[ge,nt]=(0,S.useReducer)(Yt,[]),[dt,It]=(0,S.useState)(null),[kt,Nt]=(0,S.useState)(null),vt=(0,S.useRef)(),cn=(0,S.useRef)();return d().createElement(Gt.Provider,{value:{globalRef:oe,settings:w,setSettings:V,globalState:W,connection:dt,setConnection:It,room:kt,setRoom:Nt,dispatch:te,users:ge,setUsers:(Wt,Xe=!1)=>{Xe?nt(Wt):(Fe.current&&clearTimeout(Fe.current),Fe.current=setTimeout(()=>{nt(Wt)},500))},jitsiManager:vt,nativeManager:cn,usersRef:le}},R)},yt={palette:{black:"#000",white:"#fff",offWhite:"#fefefe",red:"red",transparent:"transparent"},blackTransparent:"#000000c0",blackLightXXXT:"#2e2f30cc",blackLightXXX:"#2e2f30",blackLightXX:"#333",blackLightX:"#222",blackLight:"#111",redLight:"#eb4e3d",redLightX:"#d93834",lightGrey:"#4d4c4f",whiteAlmost:"#fefefe",whiteX:"#e5e5e5",blueLight:"#84aeff",green:"#00d7a4",red:"#fe274d"},zt=({containerStyle:R,textStyles:F,text:_})=>d().createElement(o.View,{style:R},d().createElement(o.Text,{style:F,adjustsFontSizeToFit:!0},_));class K extends S.Component{constructor(F){if(super(F),typeof F.size!="number")throw new Error("Size must be an integer")}render(){var It;const{children:F,size:_=60,backgroundColor:w=yt.blackLightXX,textColor:V=yt.palette.white,style:W,avatar:te}=this.props,oe=(It=this.context.settings)==null?void 0:It.avatarMode;if(typeof F!="string")throw new Error(`Children must be only a string
|
|
125
|
+
Ex: Technology`);const le=F.charAt(0).toUpperCase(),Fe=Ft({width:_,height:_,borderRadius:_/2},te?{}:{backgroundColor:w}),ge=Ft({width:_,height:_,borderRadius:6*_/100},te?{}:{backgroundColor:w}),nt=Ft({width:"100%",height:"100%",borderRadius:8},te?{}:{backgroundColor:w}),dt={color:V,fontSize:_/3.14};return(oe==null?void 0:oe.toLowerCase())=="square"?te?d().createElement(o.Image,{source:{uri:te},style:[W,Le.center,ge]}):d().createElement(zt,{containerStyle:[W,Le.center,Fe,{borderRadius:0}],textStyles:dt,text:le}):(oe==null?void 0:oe.toLowerCase())=="fullscreen"?te?d().createElement(o.Image,{resizeMode:"cover",source:{uri:te},style:[W,Le.center,nt]}):(Fe.borderRadius=_/2,d().createElement(zt,{containerStyle:[W,Le.center,Fe],textStyles:dt,text:le})):te?d().createElement(o.Image,{source:{uri:te},style:[W,Fe]}):d().createElement(zt,{containerStyle:[W,Le.center,Fe],textStyles:dt,text:le})}}bt(K,"contextType",Gt);const Le=o.StyleSheet.create({center:{alignItems:"center",justifyContent:"center"},text:{fontWeight:"bold",letterSpacing:1}}),me=0,k={ALERT:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAACHklEQVR4AezBEVBDARwH4D8MgmA4DIIgDMLuwiAIgzDILwiDMAzCIAyDMAiDcBgEwSAYDL5wUN22t7d3193v+yoiIiIiIuI/wSF2KrqHNQzxXN0LXJg6ru4EBvgy9Y616kbgzk+XFauHXb8bY6NitfDib/cVq4MTs+1V+wLr+DDbK3rVrsCV+Z1WewKbGJvfJ/rVjsCDxV1XLA/7mplgq5oL9PCmucdqLnBmeQcVi0MfI8sbolexGNxoz3nF/LCNifaMMKiYD56077ZiNhz5bucOLBgGoygKd7ACEHSADBB0gKKADFB0gAyQETJAxiqUu8BDPUd/56xwwfPx+pIvU8WMfdV8KTO2V/OlzNhazZcyY181X8qMDdV8KTN2Jl8WzMgVvpQZmeTLMCPfXWZkC1/KjGxvmbEh+bKBGS9F8uUPzMgOkG4yIztA+FJmxAZIT5mRHSB8KTNiA6RNZmQH+IQvZUZqgHTKjOgAaZYZ2QHClzIjNkBaZUZ2gPClzIgNkHaZER0gXWVGagCeL3lm5AdIi8woX/LMCPeSGeXLmhkH7xiKGf+0aRhmpIL5kmfGAXoMwYxUNF/yzAgcYg1tLDM6QPgSY0YHSCfKjA6QZpYZHSB8iTGjA6SVZUYHCF9izOgAaeeZ0a4sM1r4kmVGW2TGxPOlzMjzpcxI8qXMyHbIjHyTzMgWvpQZeb6UGXm+RJjRfB5rZmZmZmZmZmZfmAE3H7vx0hQAAAAASUVORK5CYII="},ARROW:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABmJLR0QA/wD/AP+gvaeTAAAA00lEQVRoge3TPQ6CMACGYYJh5Rq6cxlZ8D6cQBMGmbyfs/K6tEkh0ABC6fA9e9v38ydJRERERERERMICciDb4J4MyLdoWvJoDXTAGyj/uKc0d3RAvWWj79ELfV+gWnFPZc66zns0Dx8eDlg8YiI+zAAT8Fg7whN/D9FuI1LgOTHi5jl3BT4j517AKdgAE7NoRFTxTtSsEVHGO3HeEVHHW2ZEOzFi7A/bAunR3T2ebyLeT35oxoh44y3PiPjjLTOiceKb6H7zcwAFUBzdISIiIiKyjx/OQ3BIdzaCUgAAAABJRU5ErkJggg=="},AUDIO_MODE_BLUETOOTH:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMA/28MqyjD59cYv1P722s889N/j8sEQHOMAAABVUlEQVR4Ae3UN2IEQQwDQVLSeW/+/1ZFc51AFoNsETHqyljL/rZly7q736JAWui00Gmh00KnhU4LnRY6LXRa6LTQM4X3j5UA5gnv694gANgC/UYA8AX6QxDA1hDoD0EAO1fYdyMIoFzhcJQCQEgACAkAKQFguiCA2p0QzrYggMu1x66XmiIA+H0pAPh9KQD4fSkA+H0lAPh9LYxrTl8I45jURxCjnxHoZwT6ASHQRwj0EUJ9hFQfIdVHyPX5//ylSD8j0E8K9BFSfYRUHyHVR0j1EVJ9hKn913WUgt+/jOsgBb9f4ywp+H0AKfh9ACn4fQAp+H0AKfh9ACGYfQW83/q1u9lXwPua/mNKHyDUBwj1Adx+PWUfwO3XbktfAUYfYfQVYPQRRl8BVh+BPoDfR3jS1wD9aUv3K92vdL/S/Ur3K92vdL/S/Ur3K92vdL/+11+2bNknS5UVYka69LoAAAAASUVORK5CYII="},AUDIO_MODE_EARPIECE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABcElEQVR4AeyWAcTCUBRGhx8/AoQAQwhhCAECIAwBQggAIUAIECCEMAwhQIAAECAABIAwQAghvD50yed1bbWr0OGgXm87tre3Ait+/HDORd8UM4dX2HtxfgYTGJUREztBiaI5I/r8yAaGJVwhJYpioOMg4gRj8yiJ8QS1YQqvFDayiJKxf3jgIJrfggeKii2janJCZX4F7uj2heZRAUNRdKW2MmYWRb9dwAqvK1pTUd4Td+D0iZk3iriP7z1RKyikeYOmUCXH0ycknkUuZAZB/qj7epGxumcXF5oWQerTB8Z0/A0UulZBWtSSjp9CYWAWpERN6PgJFIbWQRzF8C3rWwbNc24JR9qLbIKUzZM3R+EM/97ZGNd6ULF3H1iV9/pQggpEdQJgFlXw3VcNBKuoN/55lh+lBDXg6SNR9H0IZ/ACGfsoDnoScdtuujoKj4NOA7EJtjRFt84o1LLtQOyPJ5r76dnz5SHUGaWV3aNgFAAA/4QUGzAl1qsAAAAASUVORK5CYII="},AUDIO_MODE_HEADPHONE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABmJLR0QA/wD/AP+gvaeTAAAFGklEQVR4nO2dTahVVRiG32WmSf5lUIF/WImKFwIpIiEzMKKZlUSNatCgCPobFUVEk5pkFBJE0wYRKkjSQI0g7MeyMtSyqAgrNfOaXs3S7u1psI5B1j1rr+U++zvb+z1wuYN19rff73vPOmfvtdZeR3Icx3Ecx3EcZ6wRrAV0AwiSFkm6TtKApDmSZnf+JnZeNl7S+ZIOStrX+f+9pE8kfSrpyxDCSKPC2wwwHbgb2AD8ytnzG/AmcC9wqXV+fQkQgJs7hTpZQ9FHYwR4B1gFjLfO2xxgPHAPsLOHRR+NvcDjwGTrOpgArAA+Nyj8mfwCPMRY6RHALGCjbc3/l93AUuv69BTgduCQcaG7MQK8CExMZ9MigAnAq7a1zeIzYF4Tten5fQAwQ9I6ScsLQwxLel/xun6XpD2SDkkaDCEMApMkXSBpsqTLJc2XtFDSMklLJJ1XeN6DklaGED4oPN4eYC7wVcE78BSwDrgNmHoW559OvOTc0ImZy+/AHXXWpDGAmcA3mQkfAZ6mBzdMwCXAE8BgpqZh4M669fQU4DJgT0aSp4DngIsa0DYVeAo4nqHvT+DWXmurBWAS8HFGcu8Biw10zgM2Zeg8CSxvWmc2wGsVE/oLeBbjGyDgfqoPf/wMzLbU2xXg0YqJnKCPujSwFNhXUfs2+vE+ARgA/qiQwBFgmbXeMwHmAN9WNOF5a73/gjiotr2C8OPAtdZ6R4M4TPJ1hTyGgWus9f4D8FgF0aeAW6y1piD2hAMV8tlBPwzgEa+vj1YQ/LC11qoQvxOqfJw+aK1VwJoKQtcSpxdbA/HqKMU+4lCImch5pG/xDxDHg1oFcZZucwUTHrEUubqCwLvMBJ4lxLGsY4n89gMTLMRNIV5SduPdxoXVDPBMhTfZKgthD1QQdn3jwmoGmEZ6EuktC2FbE6K2NC6qRwBPJnIdBmY2KWgWcSynGysbE9RjiKO7qYuN+0pijyvUtErdZ9N+krSxMHbfEUI4ICn1MXNTSexSA1Yk2teFEIYLY/crryfabwRKpz+rA4wDDie64w09F9IwwMWdz/puLMmNW9IDBiR1m7kakrS1IG5fE0IYlLQ98bKB3LglBlydaP/oHF6NvC3RvjA3YIkBVybaPyyI2Ra+SLQvyg3YCwP2FMRsCykD5uYGLDHgikT7dwUx28L+RPu03IAlBqSWjvxQELMtHE20T8kNWGJA6iTHCmK2haFEe/YqvhIDLky0nyiI2QpCCCcTL8leLZE9SwXQNWAIrZr5yqXu/EuHIpyacAOMcQOMcQOMcQOMcQOMcQOMcQOMcQOMcQOMqd2AxJwpwBCwHlhQ97lLAWYTFxAPpcTXfe7ax4IyOCzpqhDCjzXFK4L4zNcOSbUsIG7TWNAMSasNz3+aF1RT8Uuw7AGSNBRCyJ5FqhNgSAUTKaOR2wOsDTAfvrbOx6+CjHEDjHEDjHEDjHEDjHEDjHEDjHEDjHEDjHEDjHEDjHEDjHEDjHEDjHEDjCkx4HjtKs4dUg9w/IcSA/YWHDNWyK5NiQGbC44ZK2zKPaBkSnJAcRVBLfsinENTkiOKqzx25xyU3QNCCLskvZJ73CiknjpsgroeKnw5t/jFEH8R4+0Ki7BSrG1EcPdc1teQxxaa3jeOaMIa0juIjMYgML9R0f+fxwLyf1PgNMPAS40X/4wEFhN3T9xJeodBiJu8ru2H4p+GuAPYG1TbgPZYJ9fVGGy77ziO4ziO4ziO4ziO47SXvwGJuroKjpZURwAAAABJRU5ErkJggg=="},AUDIO_MODE_SPEAKER:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAADPElEQVR4Ae3cAWQkZxTA8YcgCIIiOBRBEARQBOFQQHA4HA4QHIoiKCAIigACKA7BIQgOwSFYHIJDEBTB4lAsFotfoVTRb+ZtZrc9834A7DDvP2ZmfLMTpZRSSimllFJKKaWUMgg84gwHUdbPPz3hAodR1sO/u8NRLK/gp+ig26clQ9TwIRWg7Rq70V8NPx+g0wyvo1sNPxUg7xKbURrDzwbIu69TUsfwoefvvljOrG5ZG8OHxDZ+wCXm8hH2aviNABl4gSs5U+zV8BsBsnCI+4qQGH47QB42cK6/R2zX8PMBmvA2cW34UMNPBEhepKf6eVXDTwfohj3MdPuKndEPH2JgOMRCt5vRDx9iBfBKP69HPXyIFcG5bvcjG34+AG6xF0nYxINuL8c1/HwAWOA0knCk2+34hp8PAPABW5GAS90ORjn8fABwh43oCTtYaHsf62J4aw6Qf5rFlbZZbgGnAsDPyafkLkeRUgEW2E/s90TbWaRUALgd8No1iaQKkDh14EDbAtuRVgGuEvv+h7bjSKsA875HLq61nUZaBYDjga4D57GUCvBrYuWs5bdIqgCJuyEcJbaTUAG+DHQn9DmWUgF+jx7wfWI7CRXgKfFSV+d28irAQ/SA/dWskFWAT+mLcGM7eRXgInrAm6FvQytA4u0GvOt8nkirAAvsDLQw80ukVYCbxL5Ph39lsQIcJ15b7LITKRVgktjvk+FvQSvAYWK/Pw57Aa4A54l93tftx+itAmTfDbrUNsdWfAtw8R8HmGSGhW3MtV3HX8YVIR/gLnungrPEwv6IIuQDXGAjEnCARX4NYAQREgE+4zCSsIFJ/jliZBH6DHKFLxE/trc/ggiRMfz/xE6iaQQRImHgf0pO2kf/SCLEgLCDqW4z7EbbOCLEQLCLB/28i7bxRIgB4CW+yi9fVoR4JpxgoZ8pXsTfKsIzTzk39fWsZ0aIJGzhHPMa/gARkl/KOsVUzqIx/IoQHXCMGyzkLTrWeStCdLC8p8aRXxFWHOAjvou2ijB8gNQ3JSrCwAHu1SknH2GAAI94G2U1ugaPjVibCjDHNd5gM8rqYYb3OMZWrFepI/3/opRSSimllFJKKaX8CaVMNtxq0OEXAAAAAElFTkSuQmCC"},AUDIO_MUTE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAYKADAAQAAAABAAAAYAAAAACK+310AAAHkElEQVR4Ae2cTYwURRTHdxHBD4goLioaJYKJHxB1dUFgwRBBkT2oB6KQ6E0PHkw02YNfFxMTYowelJNHTTR6IX4RjF+QiCKIHnRJMCpEhCACyyKoIK6/F6ZDTW1V93R39Uz3zHvJP9P1uup1vf+/q6unu2a6utSUAWVAGVAGlAFlQBlQBpQBZUAZUAaaykB3U48W4GCjo6M9hJkDLgWTwe9gH9je3d19gk+1IhiA+AfAZnAKuGwE5ztgfhHH79iYEDoVvA3SmNS/sGNJC5U4JC4He9Mwb9QdYvuqUH3puDiQNwv8ZRCaZXMrjcZ1HHkhEoa4DVkYd7R5OER/KhMDApaA18GzYHqWjtNOJtxQdoBAnTEfkOhSizW5M1mYRgTqnwP2WXHyFl9N04fK1oWlNx1MpRKB9nc6YuR1HSZAKeeC0J36yXH2yJel9RDQ6Ei4yxEjr2sKAXrzBimifWgBXqOTxxwdTSPCbEf7EK72F4BHAbthagDkEeHyEGw7YsgjjNJZ6BHQhQgbyXIFyCpCUURdXDr26VBwASRJRNjER1YRinqgNkH6VjYrRABJMocIK2k+UjaiKtsf7n4Wgz+By5y3qFS8DRxxNcjhW1tZEvN2HNJEhKMe8nwizKN+SBE6VwAREDIXtViEzhagARFkhPTbow2fjIRhkNdUgBaLoAJEZzenctzlyDcS5tIuz0hQASIBcoyEPCKoAKYANRH6Oat9d0ehR4IKYAvQZBFUAJcATRRBBfAJkEOEvhQTc2cKAEHXgkHwIDg7QYSF1Ek7J4gI8sYryRIFIMAV4HHwCJgU19dK7COJBeBvENlnbMQ+AGS/iCCPJ1zmm5gbESFWAA42E5i3uTson18Jon2dJIG3gG0LfPUjPw2KECFJgDV2RymvjvpU1Gfs2RjgoK5lKS5f3aF4lP0FjrvB0bodpwtyaZB3zIvMfbTZSnkZGDb9KbZd/XL5UoRMrlq0AMk98NRoQIQPHSJsI1weETy9Kc5dWgEk5ZoIy9n0jYTKi1A6ATirZ5rnGyJspty2IpROAMh+HxFuDCTCUuIcNmOVbbuMAsjqhU8CifANsWROKK0IRQsw6jjjkn4WdZI2U4FPBFk5l2ZOiESQnzHFWVK/4tpm3le0AC6iklYqH6xlE4lwk5kdc8KXlLOI8LwZx7EtyxdtO2Q7QpeLFkB+QGfbNNthlQ8YZRHhYy5HPhFcy1fke4Lr7sg1Go1DdfWYhdr2bw5fUFfRAphkRh13JRrtk8/vzALbcSNB7o4aFsGKaxddK+cqL4BrBFxiZ26VP7XKUrwIyJxws7mvdjnKLQJxxxP3MjN2bXuvw1cdF4mtBrb9EpcBlc8Dvh/mHWRfnQgSC9984FtDJA/w6h5b2MdnvywEs+24Xa9yZTK60s6qVp4Vlwx1XMJFoXwixK2mExEW+47Jvqei4MbnDl/9SvlJaKeRVLT5aFISVNwYVXZ8igi9dgx8mUSg3QeOY7xox69kmcTWOpJbn5QMbeaAfx1tI9chNoKIQBw5lvyYz7S5SX2sxH4yus/Mytgecy23E6LuQ+CE0cbezCKCLBQecznCZ4qwy+5LZcskNhG4JtV1jSRF2zvAbuAzEeEWOxa+uMW9SSK8YMerdBkynvCwN4Y4V6K0lZ+uDoIhTxzfSIhbVxonwmxXP4rwNeX5B6TJu9VdwP6y8yO+Pu7nj/DZkBFL7qDkaanct58LdoIh8DNxTvFZZ9Sfh2MDuKBux+nCMT5W0G6TY197uSDCdauHe/Q9UOiJQPzUI6G92CcbSJgAvgYuewmnilC06pA8A8j12mXrcMrviQsz4s8F5tITsx/OOaGwzrQqMBnfY2ZtbX9P+foi+0Z8FQESHgP/AZedwin/tnJNXiGIMQ7I09Q6w5ckwu11DdqxAAkrgblqjmKdybdg+fOPVcC+e4qlhPpCsMwre4B8w51jN8BXChEKnfjspO0yJMiZJl/Iptj7rLK8TNkOtoD9QB5zy7sGuY2Uf0+UvzcQyEIquUWdAUyTuku43fzBdIoIlD8CvlvUAdpsNNu03TYkTAdvgKJtPwcYM7/g6wO+xb0yMbf/5UjOKhLtB9+CouwfAjufcOJXEWoiyKQ5AOTafwyEsF8J8jSYFnf5YL+KYBIEIZOBPA2V/wAdAidBIyaTrry+fBncC84y48ZtU1dF8BEEOfJNejYYBLbJNXw5yL2amRhxIoi4E3197Ag/BPQC2/aETJ7gtwLfxLwq5LGKXpYSsq9Ni8Wt5zYOtgwMOw4qt8Cda5yZhY+AiN3aSDBfBn2FL+h3J1kPo+ZhQEYChF/N7gEwQvlzT9XMbhUggTpIl5c87yZUy7xb54DM1IVpqAKE4TFzlJZdgri2ykO0Z8ANIM2JMMmRbQ/x0j40O04ceVf8Su0y4wjbpi7IGg/k5UsZ7LlW0pzmzAvZT1n2IWd+Gez+VnaiVQL8QdLyjL8MJn1pmbVEAK658uhgTcuyPnPgETafPFNs/lbQb3Vpu88EcB1t5CVJK04EmYS3cDK0dASk5UzrKwPKgDKgDCgDyoAyoAwoA8qAMqAMKAPKgDKgDCgDyoAyUE0G/gfDlh3WAcXfhQAAAABJRU5ErkJggg=="},AUDIO_UNMUTE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAYKADAAQAAAABAAAAYAAAAACK+310AAAGBUlEQVR4Ae2dTahVVRTH3zVT6AvLXkY0qDcpiIhsIKbRTbAGgQ0qHFjOgrSioCiIoKCBGQ6KgoqKICqpSZMiaBBGmUhkhIlNeilE5UekRvUo7PZbvhuet13n6569z97Xsxb83z1n7bXXx3/dc+49X/dNTJgYA8aAMWAMGAPGgDFgDBgDxoAxYAy0ykCv1Wiegg0GgytwNQUuBlLDL2C61+t9x6tJCAYgfRI8C6ZBnvzAwBZwUYgcOusTQh8ER0FVOYbhQ50lzFfhkHgGeLkq64rdK+LDVz6d8wN5zyik1lVt7hxxPgqG5dXg37psK/bi42YfOXXKB6TtUsgcVbWrU+Q1LRaW5d3vW5LcCuY1JSvQ/DsC+L09gM/GLlNtwKrGlZ3qIITPU6PU1CR3JMx+51xqOFazjqrm53G0/HtV4zbsUtwCJgMWHtL3SGmn2IALR6qk2qSQvqtl4Fil2IAFTo4+V0P6HinPFBswUiHjOskaELlz1gBrQGQGIoe3LcAaEJmByOFtC7AGRGYgcnjbAqwBkRmIHN62AGtAZAYih5/fRnzO8d9KnKvBds7Hf9ZGzFFjkOsK5t4AdpPrh6P6SWYeBcmdalm5vyg5DFdmjT0vryyJvcGJt6XIPvkxilkI/naK2l+UOLYxG7DfyVVyX1iUb9Ox0B/CcgHkTCfJS5z1lFbd3CT3oBdxQjcgJXKTzMUaELkt1gBrQGQGIoe3LeA0b8BAqa/sZrB/lDm+VGW+tdy0GnzlMxF6C9DuQpOHLuTutzw5nDfgQZ/re5iT9jCHVoOHVGZdBG3A8DbAGSXbojvUcklS/NRVFfnWniubCX0rY9AGDNk5pLCkFXvCjIKPsrBPmdNUtW/oO8+P9qbQcs+bP5K+jQYcVDJbouiyqk+yK56Wy3xqOWm5e0pn1k0bDfhZyXiZosuq3s+ueFou86nlpOXuKZ1ZN2004HMl49WKLquS08B7soqGy+JLfBaJlpOWe5GP9Mb4drEUuHIcxeKibBlf405qsL6mJNZifEtOrlxXNG8sxqioBw67lbG+vqwAbF5Q5tVVvVghznrFqeTcxh6iLL3m4xTyrlLgnrICGV8A3lHmVlVtFR9FFTA+D0gurrxXNG+sxqgs76nHtWWFMFe2oCfBDKgqYvsU0I5s54TEZm2O01vmGI77CkXuVAqVd16l69LYXQZeA9ruDPUJ+ZW/r4PLq/CF3XzwLXDlyyrzx8qGCvM+VJ+vUwh+5FTGcrAOPAweAXeB64F2KiHXPfbPAU1uy500rgNUKbuSr7Vq0d3ddl3ElKZp8g3K0l1X2/l6iUdh14C/lKpF1/cSpIITYt0I/gSuyGfHtRVcjK8JBd7jVj1clzsQNoaujBhy64l7p8YwhcG9oeMn4Z9q3/q/YuX1VXTn+E5UfAL5/aA82eo7ZrL+YOAs8FEeE+jlm85j4OymReBDYj0KDoE8+ZiBxrGa5trqfAqWr4BvgCI5yOBmcBMoPKDKJi+2oA82gQOgSN5k0L13Kesu6HL0T3uKf5oKn6hQ5R/YfArklxHlNLFAztfLJUO5vjA5fL2S1z6o8o7exDWCx7HtttAEebfuBm2JHHyt6jbrTvUQIgdYD4DfQCg5gmP5BcZKR99Oit1YhZzzwUbwBfAlO3B0H7ggNRajfwYUEQJhU4yvA3K//lXAvXkWlSo/oZWLMHJB5W3289+rVqasxwANWQRWgA+AK6KTsUX1vMa1HqsLDryTj4DtULZXoW2vjImNMpasaqwakCyLDRKzBjQgz8dUa4APFhv4sAY0IM/HVGuADxYb+LAGNCDPx9SoB2J8Z+9TxAYg/4qkjkxhfKkz4UfWpx1d2ar865OX+Oq6rcww1Hi0BkC+3HW2E9S6kB6AiOP4XEYTvgrgu9RlzF3QnWQXm3whSHKQXKJIzAYUPSzRNhlyXSGKxNwFyWNK28DSKJWfDCr/3KHPLijoo0gnw81ditYASYPPAbkUuBwskfUIcoCYOyC/7OG9CKlZSGPAGDAGjAFjwBgwBowBY8AYMAaMAWPAGDAGjAFjwBgwBk4nBv4DPEcPqAPihPYAAAAASUVORK5CYII="},AUDIO_MUTE_COLORED:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAACK0lEQVRIid2VTWsTURSGn3MnbWJ0o250o5vopIlotZqluKtoJwWtS8GiFH+AuizZCP0JLhTEpYofjRaLuigoiBpx0VhHpIouCiKh+FHTJDOniwatdiZNYt14Vofz3jnPfe+dey8EhCadE5rsOxCktRqR4LLsxWdEu47slqkbM0rOYBcGUDLAF0TGxB193gxAgoraM9TBt5kJYJ7vsaOsLd9D6EYF8D3UdCJ6Xtz8cFsAAE07W6jxAvQjSBcQ/X2A+FgclKnR+40AJpRczH9AzCBI97LmiwTw9PgKBsIBAFR5GaoJBtj5d4AOsRrqQmN9RcAqROBvqslsrp5ebqaJ2k4B8Yfk9d1CUwB83Qq04s/GszYFCf98iYIBImWENZSZBbTB95+VnAGiGP3RPADeASl5f2u2nodA/E9se2YDEcSaDpxrUFET/SksfxIkg3gb8a0xROXXeKmAVur5VdB94uYDz0SgA3l7+xVwHfQiVvwxxjsETNed1EAfUCWNSBF0EGEk2GGjTY5UTgNRauVH+KYkbj5BNbaedZvjuLEsEe1F/R3AHMr+sDahlx2Apns3UOu8AAwARaCMyhyii5efksPoE1QmUD0lb+5caQnwE5ToT2F5h0HOgLqIuYQ1n5fieAlA7ew50GE8k6kvb3uhtvNU7b6zy+ogajs3dbszqT1OfKm2KgdNQIlUTgLwlT1LtZAnsw1IcbykHNslXPPaBwgPERP6RvzZ/P+IBZlxuSDYE/aaAAAAAElFTkSuQmCC"},AUDIO_UNMUTE_COLORED:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAByElEQVRIic2Vz0tUURTHP+fMe2+sTZSbwEVQ0fyQJCH8D0IqaCUtdAzaRJt2uZLiEbSNloEKwcxK3AkiVODCNpHQwnGSSP+BMAmy8THe48Io0DszL8bBvqvL/d5zPuf+hi5LUo2yWFm/NILJEPADcQvk7308HsDX2TMkyRvgGhgge4hFOJ5THH/aLlzbAnaTF2ADQAgSAj2YKMoka+UbnQEsVoRRkOxRD1AZ7wywmusDevymKMZAZ4CATEvf2vhtAcegwNtbK8e/W69TZalVVkAeUBhbSQdALqRK/Fc5zJ33GV1fIj/AqCOcol7f5uBA+iX2DYsVyKL2Kz0ANjGKDN7fBtnEDkMMkF3QJb5czAEBFm54a/Cmr1aKKKuIG8IyvYhbwIkgf8YnwHcCrtCwJyDDFEreO+GfQX9pDZjDdBoXvsf0FiobgGE0EHlLwHX2uAo8QnjWZCVabLKLHgJZNFlGbYv82GWi6Cw7P0+TC+/Q4CbGIugU+dJcszStX9Pq7Dk0eQWMAFVM6mA7iBVAspjEFEZfItL0IKT7D6qVIhm7DfIYWMeYwUXz9N/dShWfWrXKBz6XJ/4l5IQu2gkC3uH41JVK/lvtA5HuhLGc3zqoAAAAAElFTkSuQmCC"},CLEAR:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAM1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACjBUbJAAAAEXRSTlMADKsoPJ8Ew//n879T+8sY13W/vG8AAAEBSURBVHgB7daxAcJAEAPBxxh4DBj6r5ZEibObzMGpgJ1Uo9fr9Xq93rl3Wa6jvPV25/5jPsvCus3lzv1ZEtKfJKQfodSPgP0ItT4JrzlrQvrZrQy8P0Xh0N/WkbngfRe874L3XfC+C953wfsueB8F75vgfRO8b4L3TfC+Cd43wfsmeB8F76PgfRe874L3UfA+Cd6HfwWPzPsueN8F76vgfRC8v31I8P76JsH7Y5jgfRO8b4L3TfC+Cd43wfsmeB8F77vgfRe874L3XfC+C953wfsuZHu1fxSWMvD91fpH4XEZIFT7EdIXodaPkL4JtX6E9EnYS/0Ir/R7vV6v1+uddX+z4icAfdG+MQAAAABJRU5ErkJggg=="},END_CALL:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEXRSTlMADKsoPJ8Ew//n879T+8sY13W/vG8AAAEBSURBVHgB7daxAcJAEAPBxxh4DBj6r5ZEibObzMGpgJ1Uo9fr9Xq93rl3Wa6jvPV25/5jPsvCus3lzv1ZEtKfJKQfodSPgP0ItT4JrzlrQvrZrQy8P0Xh0N/WkbngfRe874L3XfC+C953wfsueB8F75vgfRO8b4L3TfC+Cd43wfsmeB8F76PgfRe874L3UfA+Cd6HfwWPzPsueN8F76vgfRC8v31I8P76JsH7Y5jgfRO8b4L3TfC+Cd43wfsmeB8F77vgfRe874L3XfC+C953wfsuZHu1fxSWMvD91fpH4XEZIFT7EdIXodaPkL4JtX6E9EnYS/0Ir/R7vV6v1+uddX+z4icAfdG+MQAAAABJRU5ErkJggg=="},FULLSCREEN_ENABLE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkAQAAAADJe6U1AAAAAnRSTlMAAHaTzTgAAAAeSURBVHgBYyAeMP5j/4FGHmCwwE0SBgRMwLSReAAALFsVry/+TlYAAAAASUVORK5CYII="},FULLSCREEN_DISABLE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkAQAAAADJe6U1AAAAAnRSTlMAAHaTzTgAAAAdSURBVHgBYyAB8LHjIRn/sf9AJQkDTF34bSEBAABlZwzHYOP77gAAAABJRU5ErkJggg=="},NETWORK1:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAeCAYAAABe3VzdAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH6SURBVHgB7Zi9TsJQFMfPuUBijAM+gR3ViTjz1cRdV3VQZ2PAF1DR2fg16GKiDuroA5i0A0wOMpE4WZ9Adtpe/1cwqbVFG9JQDf/kptxzDpcfpz2nvWVKiBqNxo7rulVmzmLalFJuFQoFkykBqtfrhzhU/XZA6kMHNAwjl8lknkLcpqAhK5VK5fq4y0MH/EmJB0xTjPJVptnpdNZ1XbeirBFbBlVlogp3e3BK5XQ6jZowslHWiQUQEBoFtA3AaoCsUgTFAggILcwnhJiiCBpV8aAaAQ6q/9eo0XwraL6f/c3E2Mrn802KSZEyCLhdNN8jb/PFMNCUcxSTfg2I5quez3YCXFkAVygmRcmgFuYAuEYxaVTFg+pvtJnq0yLZ4xO4lphc16az2VtKisRGa5nANYnPqxgVYipvPK9QUqROseaMTTwifRfI30GKxQNs25utJUqCBAu6QKPQvEaWtI1DiRIgZJADQSTzAiVAgiS9BTlQMG2fSc0DYyHLO7Ft2wqJQxG6r9457kKhsVBTMMt9xfPFDGiHnWuvCbuxtuM4ewGLSOzWar5YCyBX3wKltAB/6bWp9y9BsdT9MzVxOn1zwi4Bkl8+0Fxp4sqcP5+5s/xfKJVKR/iRGkY3FrdowM0FbSWLxeIa4o4VVM9kAk7vE1vzxqr3MrDfvwNBx9Y/T8rRYQAAAABJRU5ErkJggg=="},NETWORK2:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHqSURBVHgB7Zg9TgJREIBn3i4FxoIbSKlWeABQPICaWPkTo7FECfEAKB4AjRZSEbRQS2NvFhLoSMAGtRJPoJ0FyxvnKQVhdzUvZMPG8CWEffMmux+bnYEBIOAgBIRarXYopcwgYoSXTT7OJRKJu0AIVqvVE37LDMaJKDlyQcuyYqFQqOGxXRYwYgzDiP2yvTBywb8IvKAJPjJQmeVOp7OTTCbbOufw7Q6qyuQqPOrJKRZM0+SasCI65/FFkCWi4NI2WDbKkhnQwBdBloh67QkhpkCDcRUPy1hwWP5fo049r6eRRBaQuJ9Rxf6Uu4W52zb4hNYdTL1sZBEw/yOnwHkzbNQzjRWt5quDliASbrmEI53wxBb4hOYzSFG3KBLEwCfGVTwsY8Fh+e6Dqk3YE5NLRBiR0n68mL2pQEAQqdb6lB2erPOMV0SQeUOIh72nzTwEBIECio72gZTeb63NQwAQ6tvAbYMQlyEACCD4cNvg59EZ98pFaPavbdtugwc8RL31r3kM8MxlGgKRjgejCNTuYvfKEffKJXnfH1OTG4tcDubyEPXK8qX+WDweL3NuCZxwOh2I8+nrM5TAF+59EkkVQrFamHH+QtHJ5T9+tvkCp0qKX+8cslhu0W3s5NwdzsmpXCWmcvl4Ucl/AS1A0EV7spGmAAAAAElFTkSuQmCC"},NETWORK3:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAeCAMAAABpA6zvAAABDlBMVEUAAAAA/wCA/4BV/1WA1YBt20lmzGZt21twz2Bp0lpo0V1v01lt0Vts2F1q1Vxr11dp2Fxq01dt1Vtr1Vm+w75t1Vi1xbG3y7Nu2Fps2Vtt1lyqyaOlyKFt2Fpt1lxs2Fxt11xr2Fps1ltt11ps11u5xbdr1lts1lpr11y7xrlt2Fxs2Ftt11ts1lpr1lts11ts1lpr11ts11ps1lps1lts1lumy6Cly6Bs11pr1lutyaquyaps11ts11ts11u7xrpr11u8xrts11ts1lps11ts11ts1ltr11u1x7Js11u0yLJs11ps11ps11u7xrm8xrps1lrDxcNs11ts11vCxcLDxcLDxcPDxMPExMT///8r1ctVAAAAV3RSTlMAAQIDBgcKDhARFhccISQmJykqKy8xPkBBSUtLT1teYWdpamxtbnBxcnR1e4GCg4aQkayts7S0tri8y8zT1NfX2Nja3N3n6Ovr7Ozw+Pn6+vv7/P3+/v5u9dgoAAAAAWJLR0RZmrL0GAAAAOZJREFUOMvN1MdWQlEMheGNigV77w2uvfeGqCjoxc6vmPd/EgdnoI5yRi4yzTfaK9mSN20nLx+1GflzYWbWGHfdyJeZmd24cMnMzOzdhWsBWhPC9qm5/hjYV4bn9Qh4BvA26sLsEwCrLuwCgK1/g5nk+vF0KAIuA1RyPrwFoODCljoAuy5sDdu9JoTZyfnhGNhThPpOBNwHYMKHKQDbf3PsDHDz97uWAEgkqQxAXpIqAMz+FMCV8gDVbklKAKo5SdoAuOuQpHMzs8aYMgvF9GgwXM/iZXo4EBJYKd0f9IaSOn79fJjWN5UXmsivB3+sAAAAAElFTkSuQmCC"},NETWORK4:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAeCAYAAABe3VzdAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIJSURBVHgB7Ze/axRREMe/M2uRHAHPv+Cuu/MaEewvYK8WaRKOC2glSU7JH3BFrBW9iz+aCDmSnBaC9hZaW6hNEgtx/QtiQLDZfeO8FwjJ7iZkORZewn1gYZmdN/t9v+bNI3jC/e3ZZsDUBahJoNCQDJ7XNlcIHrCwPVchpp9Ju7AsMzyAwA8y7Ya6XgjUkbp8wqeyFwJPYyxwVLwXeAkF4/JbEFSMmP0X9a0PyElhAh9+vVOOJkvvbOKFiE4VYWm3FQb//t54ev39n7PGKWyK48lS24k7gkCq0USpixwUJlCA21l2Ir6FHIx38ahcvDSzsDvX0XXU0Z1Z1YX2HUzPVmsbAxRErhFc/NFqa632xImzEK7p++ulndkmCiLfFIuZzzQzdVAQOdcgVzLNMcooiPEuHpXzkWb0YEdUmnKGOI7xsjGEL7DeqCCEK/o+7x7C9OJOy4vbnsVOcTWemPqi+WzNPgHxR7U91pwHH2BirGkmqx6zkti81oYHcLJmO8SYaXgA63m6d8K3jKrX/MZZEWRWzWLSMfSCvp/lS5CQieSRC3c8+F4E00u3kPWUrz3pOO6lXSXd3hK4GAkb1jM7ZGjA/fpWjwxUJP1yPzfyicTMvLr6Jkz6r9aGA+3uvUNfwTdGNNOrv01dhvqN4Wf1vQujFc+B5FBHZNnFSMXdsFXRzaRvv7G58h/5AKz4Lj7ucQAAAABJRU5ErkJggg=="},PEOPLE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABXklEQVR4Ae3WAWTjUBjA8aA4DAMMxXAooDgMh3IoDoficBgGOAQHGIoBisMwDMMAw1AUBQwwQABDMQxDEQzFbwBP+mzJkrBNfhT4Pu+vkifJe9HpdNDHDEuskGGGvcLcCBlWmOMEu03H/MFaXI5JMNtDJsQ9xk3GvOYJg2BnYtsGo7oxO3hQzm3hX8pty+oGTVTTD3YX4r7VCZqq5leweyHusE7QP9UcBbvn4n7XCfqhmu/B7rW4r3WCdvGonBV6we7atrukLkyUE95FY9s2OEiagBmIy3FUmL+JxKRJkzDCAk+ADJfYj8w9BLFXGCafGnoY4CcOg9+4zFsTn6kI+zjGErmXrTFHir2kAAe4wwIp+lWflaW32+C6+NxgiDw+E4EdnGnOBieFuyl9cSaEuXacBmd8Eb9oz4sxY+0alPgKGIZBx9r1Nzjrv7g0DJpq17TEWdOPG9QFdTqdFj0DdF7DWEFPa9AAAAAASUVORK5CYII="},PIN:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAAD4/042AAABSklEQVRoBe1XMQ7CMAxsOlfiA4gP8AD2bv0GA8x8hJ3vUcTMCyhnxFDqIXHtRK3kSB5I7bPvLoVQVb5cAVdApMAwDB2iR1ivOwA70TBIDtICNOlRs5XWJeb3IYRdYu43rZYkLzF3DoETiDwykCFnz1Jc8RGaNqAXYbon+Ywjo5phjgOS+bLnOoHsEkcauAMRgbI/dgeySxxp4A5EBMr+WOUAfoQb7YRaDBUBDL/XEtBiaAkcDQhYYMjHgPUt4o3QLsJo5RMoKqgh4qmdfFRPWHlJoEGDOCBuCAvlAfO3CJOwqUfyl0PyXZxaKUwTl6b+T6jFyAsrcAILM8RmHLwuG3pnRutlg8xR/AhxTcruuANl9ebd3AGuSdkdd6Cs3rybO8A1KbvjDpTVm3dbvQOcktEObqLX0W30YgRbFuZHYp3Dl5XKu7kCsxX4AP8MrV2ixb6jAAAAAElFTkSuQmCC"},SWITCH_CAMERA:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAA4CAYAAABE814IAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAARKADAAQAAAABAAAAOAAAAADfM+xLAAAFQklEQVRoBe2ZW4hVVRjHncYy1DCNMoOuzkQRNmVKEHShtId6KosiiBworKALIhSETWmRED31MF2IzCgmuhH2kEn20IMP2XWKLA0OdrdCYqy8jafffzjrsM5p77X2Za3pnNgf/FmX71vf+r7/WXvvb+8zZUolFQMVAxUDFQPBGOgJ5snjqF6vz8FkAKid6jEfR78HjPb09Oz22HaXGiKmgafAIZBXxlnwMjimu7JOiZZE5oKPQFnZjoPTU7bpjmkSmAlCkGHI3EHn+O7Ivi1KAp8ONplMArYf4mt223adPSTgc4ACjyVf43hxLBYyPWUIQHY3gctAH5gPZoB20dy09slI4wP43Zvg+yBzNbATfAKGeVL9RRtGIGMAbAXdKrsI/JqsbDhPCI70i38FTs7qsEPtVNcs5KR87ovvCI/BEPpuJ0Mp9oJhfmDnAZCh0wAHP2MzV4b/EzmTU7LDlUtqCQ0Zqg5jkfEbvkeBbnzCGNBe88Al4CwQQ/pxWowQFmpxaNmKwyfBa/xSehokCj/GGShuA3eD6YlGxSaL50RQS0FIeShvDmw+D7wRMIg1vhh8N1Xf+jz6Z21jkpwK+sAScCU4wdarzyn6iWYZWKvxZEhMQraRgIonI4MkLRL6gRL8Duh63gw2gV+Y/xFsBOcxnhBIqYMHGTzRmPpvGoIqc8ncqajxcS7YC4wcMB1PK7shcKTJnn4v2ALKiPeSMfv9q2XXooS8aDvDz80lMniPtc3SgP4CcLiEPy8hoS+ZLyHjdpsQjrsIarl/2HpP/3L0K4wNvvSoftWMY7QhCdGL1nUE/WdCoHp86kWriKzjRJxkLdxg9YN3QxJyK2RsT4qQ+X3MXw/+SNJ75mahv8uyeZ/+fmsctBuKkGdI+hVXZOi/Rd88/i7bBN2AmcOPXuU/NuPQbShCXs8Y2Ebs6hltbbMF9oC+6pMokvouk3M3vUmONNZ8z684bNYzv5L+cY3xpbTNp4axcbS6H4nAY/EzC7/mklMNYz4OqbQP9cPiKkUIoOhjV8VWU/BT9NvqvU0njg7+F4Gsj+I1DlcTqhjMnti26Wdt46zDsYyGB7HLc+qcbmMQor8fTrN2LUrIo/hpJ9dyO1EJq5J9umWy5CAGIQrpKisuvaf8bo2zdvV9ZARSeh0LHkd3oUOfWxWLkGtNJNwI9TFolRnnbHUTfiRpDUQtY/6eJF2ZuViEXEHAF5nAIGU9/S1mnLO9D19X22sYz2f8nD0Xqh+LEMX3GIHbN7sbmHuzQODysQFfp2ot7dE0ep9RBRtcYhKib6MPm4h16QBdSrcAU08Ytd3+zeAlcAd4u6GYQ/sOZCynVXF3Pogi9i/YsgGbL2Xi3ZbJ/AMVVYMQ8YK9FN8zGSupheACoIRrQG/LI9jvodVp0A31VzBb4wCyFt/62JQqoSrVtA1E+HoS66ddTTAiSJ8GVWV+0ICm0kRV6FFpyhjzMS8ZO94HGGyDmCX2pKuP7cXo9cie4bILrYt9Qux4dXlsJtFPad8CSrYGdgPJKUBPj7PBIIh2n8B3qrgIOZS6qpxCH5CFoYabw7SCK5aGaenGm5MriFrp7bM50GU7WZeuNydXILsI1P4bIVt6nW3V8iaeFGoqITwJxlkwmrSoS+f2E3fiJ047n1RCGkb328Zd3l/HjzxR37jySC3MzCKeCs/TX27GXdp+QdyLIWSfL37fCVERpUfgjeAHn7MO1OuD9GqwKAsZit97QmQk4aSoYlTF2QdUL0xqwcR+WUVf0GpAN9BvIGKMtpKKgYqBioGKgYqBioHOY+AfLnJU7lv5Hu4AAAAASUVORK5CYII="},SWITCH_TO_VIDEO_CALL:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAIABJREFUeF7t3O125DayLNDu939oz5K9NFbLkoofSBCB3PevqkBiZ5CILp+5v3/5fwQIECBAgEA7gd/tdmzDBAgQIECAwC8FQAgIECBAgEBDAQWg4dBtmQABAgQIKAAyQIAAAQIEGgooAA2HbssECBAgQEABkAECBAgQINBQQAFoOHRbJkCAAAECCoAMECBAgACBhgIKQMOh2zIBAgQIEFAAZIAAAQIECDQUUAAaDt2WCRAgQICAAiADBAgQIECgoYAC0HDotkyAAAECBBQAGSBAgAABAg0FFICGQ7dlAgQIECCgAMgAAQIECBBoKKAANBy6LRMgQIAAAQVABggQIECAQEMBBaDh0G2ZAAECBAgoADJAgAABAgQaCigADYduywQIECBAQAGQAQIECBAg0FBAAWg4dFsmQIAAAQIKgAwQIECAAIGGAgpAw6HbMgECBAgQUABkgAABAgQINBRQABoO3ZYJECBAgIACIAMECBAgQKChgALQcOi2TIAAAQIEFAAZIECAAAECDQUUgIZDt2UCBAgQIKAAyAABAgQIEGgooAA0HLotEyBAgAABBUAGCBAgQIBAQwEFoOHQbZkAAQIECCgAMkCAAAECBBoKKAANh27LBAgQIEBAAZABAgQIECDQUEABaDh0WyZAgAABAgqADBAgQIAAgYYCCkDDodsyAQIECBBQAGSAAAECBAg0FFAAGg7dlgkQIECAgAIgAwQIECBAoKGAAtBw6LZMgAABAgQUABkgQIAAAQINBRSAhkO3ZQIECBAgoADIAAECBAgQaCigADQcui0TIECAAAEFQAYIECBAgEBDAQWg4dBtmQABAgQIKAAyQIAAAQIEGgooAA2HbssECBAgQEABkAECBAgQINBQQAFoOHRbJkCAAAECCoAMECBAgACBhgIKQMOh2zIBAgQIEFAAZIAAAQIECDQUUAAaDt2WCRAgQICAAiADBAgQIECgoYAC0HDotkyAAAECBBQAGSBAgAABAg0FFICGQ7dlAgQIECCgAMgAAQIECBBoKKAANBy6LRMgQIAAAQVABggQIECAQEMBBaDh0G2ZAAECBAgoADJAgAABAgQaCigADYduywQIECBAQAGQAQIECBAg0FBAAWg4dFsmQIAAAQIKgAwQIECAAIGGAgpAw6HbMgECBAgQUABkgAABAgQINBRQABoO3ZYJECBAgIACIAMECBAgQKChgALQcOi2TIAAAQIEFAAZIECAAAECDQUUgIZDt2UCBAgQIKAAyAABAgQIEGgooAA0HLotEyBAgAABBUAGCBAgQIBAQwEFoOHQbZkAAQIECCgAMkCAAAECBBoKKAANh27LBAgQIEBAAZABAgQIECDQUEABaDh0WyZAgAABAgqADBAgQIAAgYYCCkDDodsyAQIECBBQAGSAAAECBAg0FFAAGg7dlgkQIECAgAIgAwQIECBAoKGAAtBw6LZMgAABAgQUABkgQIAAAQINBRSAhkO3ZQIECBAgoADIAAECBAgQaCigADQcui0TIECAAAEFQAYIECBAgEBDAQWg4dBtmQABAgQIKAAyQIAAAQIEGgooAA2HbssECBAgQEABkAECBAgQINBQQAFoOHRbJkCAAAECCoAMECBAgACBhgIKQMOh2zIBAgQIEGhdAP7666+/RIAAAQIpAr9//279zk6ZU8p9tgiTgz4lju6TAIGzAkrBWTGffxfYugA4+AWdAIFOAspAp2nf3+uWBcDBfz8YViBAIFdAEcid3cw736oAOPhnRse1CBBYXUARWH1Cz97fNgXA4f9skFydAIE1BZSANeeywl1tUQAc/itEyT0QILCqgBKw6mSeva/4AuDwfzZArk6AQIaAEpAxp5l3GV0AHP4zo+JaBAikCygB6RMce/+xBcDhPzYIViNAoIeAEtBjzkd2qQAcUfIZAgQIbCKgAGwyyAHbiCwA/vU/YPKWIECgrYASUDf6t/MpxVcBqMuBlQkQILCkQMoBtSTeDzf1/o/TFN+4AuBf/2mPhPslQGBFgZRDakW7r+7p49mUYqsApKTLfRIgQGCgQMohNXDLZUt9/odpim1UAfCv/7L8WpgAgWYCKYfU6mP56lxKsVUAVk+X+yNAgECRQMpBVbT928t+94/SFFcF4HYELECAAIFMgZSDakXdn36RTnFVAFZMlnsiQIDABIGUg2oCxalLvPrP0SmuCsCpsfswAQIE9hFIOahWEn91+L/da4prTAE4gr5SSNwLAQIEVhdIOahWcTx6DqW4KgCrJMt9ECBAYLJAykE1meXLyx09/P0CUDCtM/gFl7ckAQIEthNQAI6N9Oz5k+LqF4Bj8/cpAgQIbCeQclA9CX/28PcLQMG0rgyh4DYsSYAAgW0EFICfR3n13Elx9QvANo+yjRAgQOCcQMpBdW5XYz599fD3C8AY/z9WuTOMgtuxJAECBOIFFICvR3j3vElx9QtA/CNsAwQIELgmkHJQXdvdtW/dPfz9AnDN/cdvjRhKwW1ZkgABArECCsCfoxt1zqS4+gUg9tF14wQIELgnkHJQ3dvlsW+POvz9AnDM+9SnRg7n1IV9mAABApsKKAD/DHb0+ZLi6heATR9s2yJAgMArgZSD6tU+7vx99OHvF4A70/jmuxVDKrhNSxIgQCBGoHsBqDpXUlz9AhDzqLpRAgQIjBVIOajG7rrmZ/+P95jiqgBUJMuaBAgQCBBIOahGU1b9y//9PlNcFYDRybIeAQIEQgRSDqqRnNWH/9u9prgqACOTZS0CBAgECaQcVKNIZxz+CsCoaX1YZ9bgCm7dkgQIEFhSoFMBmHmGpLj6BWDJx9JNESBAoF4g5aC6KzHz8PcLwN1pffH92QMs2IIlCRAgsJRAhwLwxNmR4uoXgKUeRzdDgACBeQIpB9VVkScOf78AXJ3WD997apAFW7EkAQIElhDYuQA8eWakuPoFYInH0E0QIEBgvkDKQXVW5snD3y8AZ6d14PNPD/TALfoIAQIEogR2LAArnBUprn4BiHpc3SwBAgTGCaQcVEd3vMLh7xeAo9M68blVBnviln2UAAECSwvsVABWOiNSXP0CsPTj6eYIECBQJ5ByUL0SWOnw9wvAq2ld+PtqA76wBV8hQIDAUgI7FIAVz4YUV78ALPU4uhkCBAjME0g5qL4TWfHw9wtAQX5XHXTBVi1JgACBKQLJBWDlMyHF1S8AUx4zFyFAgMB6AikH1We5lQ9/vwAU5Hz1gRds2ZIECBAoFUgsAAlnQYqrXwBKHy+LEyBAYF2BlIPqXTDh8PcLQEHeUwZfsHVLEiBAoEQgqQAknQEprn4BKHmsLEqAAIH1BVIOqqTD3y8ABblPC0ABgSUJECAwVCChACS++xNc/y4qQ9NUuFhiCAo5LE2AAIHbAqsfVKnv/dVd34OjANx+hCxAgACBTIGVD6rUw99/Aih4FpLDUMBhSQIECNwWWLUApL/vV3X9HBi/ANx+hCxAgACBTIEVD6r0w98vAAXPwg6hKGCxJAECBC4LrFYAdnnPr+b6XUD8AnD50fFFAgQIZAusdFDtcvj7BaDgmdgpHAU8liRAgMBpgVUKwG7v91VcXwXCLwCvhPydAAECmwqscFDtdvj7BaDgYdkxJAVMliRAgMBhgacLwK7v9addjwbALwBHpXyOAAECmwk8eVDtevj7BaDgIdk5LAVcliRAgMBLgacKwO7v86dcXw780wf8AnBWzOcJECCwicATB9Xuh79fAAoejg6hKWCzJAECBL4VmF0AurzHZ7tejbhfAK7K+R4BAgTCBWYeVF0Of78AFDwUncJTwGdJAgQI/EdgVgHo9v6e5Xo30n4BuCvo+wQIEAgVmHFQdTv8/QJQ8DB0DFEBoyUJECDwf4HqAtD1vV3tOirCfgEYJWkdAgQIhAlUHlRdD3+/ABQ8BJ3DVMBpSQIECPyqKgDd39dVrqMj6xeA0aLWI0CAQIhAxUHV/fD3C0BB+IWqANWSBAi0FhhdALyn/4nTaNeqkPoFoEq26bpvwfcSaDr8D9uWg4wMjDyoPPf/znyka2WSFIBK3WZrv4fei6DZ4L/YrixkZGDUQeWZ/3Peo1yrU6QAVAs3Wf9j4L0Mmgz9h23KQ0YGRhxUnvf/znqE64wEKQAzlDe/xueweyFsPvAD25OJA0gLfOTuQeVZ/3qId11nRUMBmCW96XW+CrqXwqbDPrEtuTiB9eBH7xxUnvPvB3fHdWYcFICZ2ptd67uQezFsNugL25GNC2gPfOXqQeUZ/3lYV11nR0ABmC2+yfV+CriXwyZDvrEN+biBN/GrVw4qz/frAV1xfb3q+E8oAONNt1/xVbi9ILaPwMsNyshLoiU+8GpOn2/Ss31sbGddj606/lMKwHjTrVc8Emwvia0jcGhzcnKI6fEPHZnT+016ro+P64zr8VXHf1IBGG+67YpHQ+1FsW0EDm9MVg5TPfpBc6rhP+pac/XjqyoAx61af/JMoBWA1lH5e/PykpGBI3PyPJ+f5RHX86uO/4YCMN50uxXPhtkLY7sInN6QzJwme+QLr+bkWb42lleu11Yd/y0FYLzpViteCbKXxlYRuLQZubnENv1L/tcaNeRX8l9zJz+vqgA8oR5yzashVgBCBlx4m7JTiDtw6e/m5Bm+h3w1//euev7bCsB5sxbfuBNgL48WEflxk/KTkYGv5uT5vT+7O/m/f/XjKygAx63afPJueL1A2kTl243KUEYGPs/JsztmbnfzP+YuXq+iALw2avWJEcH1EmkVmS83K0cZGfg4J8/tuJmNyP+4u/l+JQVghnLINUaF1oskZOCFtylLhbgDl36fk2d2IOrJ/xns2CufW00BOOe17adHvbDfgLxMto3J4Y3J02GqRz/4NifP6/gRjMz/+Lv7d0UFoFI3ZO3RYfVCCRl84W3KVCGupZcXGJ3/qg0rAFWyIetWBFUBCBl+4W3KVSGupZcXqMh/xaYVgArVkDWrQqoAhASg8DZlqxDX0ssLVOV/9MYVgNGiIetVBlQBCAlB4W3KVyGupZcXqMz/yM0rACM1Q9aqDqcCEBKEwtuUsUJcSy8vUJ3/UQAKwCjJkHVmBFMBCAlD4W3KWSGupZcXmJH/EQgKwAjFkDVmhVIBCAlE4W3KWiGupZcXmJX/uxAKwF3BkO/PDKQCEBKKwtuUt0JcSy8vMDP/dzAUgDt6Id+dHUYFICQYhbcpc4W4ll5eYHb+r4IoAFflQr73RBAVgJBwFN6m3BXiWnp5gSfyfwVFAbiiFvKdp0KoAIQEpPA2Za8Q19LLCzyV/7MwCsBZsZDPPxlABSAkJIW3KX+FuJZeXuDJ/J/BUQDOaIV89unwKQAhQSm8TRksxLX08gJP5/8okAJwVCrkcysETwEICUvhbcphIa6llxdYIf9HkBSAI0ohn1kldApASGAKb1MWC3EtvbzAKvl/BaUAvBIK+ftKgVMAQkJTeJvyWIhr6eUFVsr/T1gKwPJRen2Dq4VNAXg9s90/IZO7T9j+fjxYf/+OOFsjbvIN2qHyddxWe9GalRfjm4BcykFngRXz/9U8FIDglK4aMmUtOFSDbl02B0FaJlJg1fx/xlQAIuO15r+w3ikVgNBQDbztlV+A8jlw0Jb6UmDl/H+8YQUgMMCrh8sLNjBUg29ZRgeDWi5KYPX8v2MqAFGxWvtf/n4BCAtT4e0mvAAV1cIANF86If9//9/qpMzJw5px+L/lyaxSnqq6+0x5AcpqXQY6r5ySfwUgJKUpgVIAQgJVfJvyWgxs+aUFUvKvACwdo39uLiVM/hNAQJgm3aLMToJ2mSUFUvKvACwZn39vKiVIHxn9rLp4qCbcntxOQHaJZQVS8q8ALBuhvH/5+wVg4TBNvrWUF+BnFuV1clA2vVxK/hWARQOYEqCv+LxEFw3VxNuS34nYLrWcQEr+FYDlopP7L3+/ACwYpoduKeUF+B2PEvtQcDa5bEr+FYDFApcSnJ/YvDwXC9UDtyPHD6C75DICKflXAJaJTP6//P0CsFCYHr6VlBfgKyZl9pWQv38lkJJ/BWCR/KYE5giXl+YRpb0/I897z9fufhZIyb8CsECSU8JylEoBOCq17+dket/Z2tlrgZT8KwCvZ1n6iZSglCJYnECAgGIbMKRFbjHlva4APBiYlJA8SOTSBJYSUAKWGseyN5PyblcAHopQSkAe4nFZAssKKAHLjmaZG0t5vysAD0QmJRwP0LgkgQgBJSBiTI/dZMo7XgGYHJGUYExmcTkCcQJKQNzIpt1wynteAZgWiX3+d/4TyVyKwNICSsDS43ns5hSAwfTpD1pKIAaPzXIEthdIfzdtP6AHNpjyvvcLwIRwpIRhAoVLENhSQAnYcqyXN5XyzlcALo/42BdTgnBsNz5FgMB3AkqAbLwLpLz3FYDCzKaEoJDA0gRaCSgBrcb97WZT3v0KQFFeUwJQtH3LEmgroAS0Hf3/N57y/lcACrKaMvyCrVuSAIFfv34pAb1jkHIGKACDc5oy+MHbthwBAp8ElIC+kUg5BxSAgRlNGfrALVuKAIEfBJSAnvFIOQsUgEH5TBn4oO1ahgCBgwJKwEGojT6Wch4oAANClzLsAVu1BAECFwSUgAtowV9JORMUgJshSxn0zW36OgECNwWUgJuAQV9PORcUgBuhShnyjS36KgECAwWUgIGYCy+VcjYoABdDlDLgi9vzNQIEigSUgCLYhZZNOR8UgAuhSRnuha35CgECEwSUgAnID14i5YxQAE6GJGWwJ7fl4wQITBZQAiaDT7xcyjmhAJwMRcpgT27LxwkQmCygAEwGn3i5lHNCAbgQipThXtiarxAgMEHA4T8B+cFLpJwRCsDFkKQM+OL2fI0AgSIBh38R7ELLppwPCsCN0KQM+cYWfZUAgYECDv+BmAsvlXI2KAA3Q5Qy6Jvb9HUCBG4KOPxvAgZ9PeVcUAAGhCpl2AO2agkCBC4IOPwvoAV/JeVMUAAGhSxl4IO2axkCBA4KOPwPQm30sZTzQAEYGLqUoQ/csqUIEPhBwOHfMx4pZ4ECMDifKYMfvG3LESDwScDh3zcSKeeAAlCQ0ZThF2zdkgQI/Pr1y+HfOwYpZ4ACUJTTlAAUbd+yBNoKOPzbjv7/G095/ysAhVlNCUEhgaUJtBJw+Lca97ebTXn3KwDFeU0JQjGD5QlsL+Dw337EhzeY8t5XAA6P9PoHU8JwfYe+SaC3gMO/9/w/7z7lna8ATMptSiAmcbgMgW0EHP7bjHLYRlLe9wrAsJG/XiglFK934hMECLwJOPzl4CuBlHe9AjA5vynBmMzicgTiBBz+cSObdsMp73kFYFok/r1QSjgeoHFJAhECDv+IMT12kynveAXgoYikBOQhHpclsKyAw3/Z0SxzYynvdwXgwcikhORBIpcmsJSAw3+pcSx7MynvdgXg4QilBOVhJpcn8LiAw//xEcTcQMp7XQFYIFIpYTlK5UV5VGrfz8n0vrO1s9cCKflXAF7PcsonUgJzBEMBOKK092fkee/52t3PAin5VwAWSnJKaF6RKQCvhPb/uyzvP2M7/F4gJf8KwGIpTgnOT2wKwGKheuB25PgBdJdcRiAl/wrAMpH590ZSwvMdnQKwYKgm35IMTwZ3uaUEUvKvACwVmz1KgAKwaKgm3lbKC/ArEvmdGJRNL5WSfwVg4QCmhOgzoRfowqGadGuyOwnaZZYUSMm/ArBkfLJ/CVAAFg/VhNtLeQF+pJDbCcFocomU/CsAAYFMCdM7pRdpQKiKb1Fmi4Etv7RASv4VgKVjlPlLgAIQEqrC20x5Ab4RyGthEJounZJ/BSAooCmh8kINClXRrcpqEaxlIwRS8q8ARMQp65cABSAsVAW3m/AClNOCwVvyb4GE/P99nynz8rDmlACzSnmq6u5z9RegjNbN3soKwPAMeGD/JF35BWtWw+Mft6B8xo3MDQ8UWDn/H7fpF4CBQ5+91KohUwBmJ2G968nmejNxR/MEVs3/ZwEFYF4mSq60YtAUgJJRRy0ql1HjcrODBVbM/1dbVAAGD/6J5VYLmwLwRArWuqZMrjUPdzNXYLX8f7d7BWBuLsqutlLgFICyMccsLI8xo3KjBQIr5f+n7SkABcN/aslVQqcAPJWAda4ri+vMwp3MF1gl/692rgC8Egr7+wrBUwDCQlNwu3JYgGrJGIEV8n8ESwE4ohT2mafDpwCEBabgdmWwANWSMQJP5/8olAJwVCrsc08GUAEIC0vB7cpfAaolYwSezP8ZJAXgjFbYZ58KoQIQFpSC25W9AlRLxgg8lf+zQArAWbGwzz8RRAUgLCQFtyt3BaiWjBF4Iv9XcBSAK2ph35kdRgUgLCAFtytzBaiWjBGYnf+rMArAVbmw780MpAIQFo6C25W3AlRLxgjMzP8dFAXgjl7Yd2eFUgEIC0bB7cpaAaolYwRm5f8uiAJwVzDs+zOCqQCEhaLgduWsANWSMQIz8j8CQwEYoRi2RnU4FYCwQBTcrowVoFoyRqA6/6MgFIBRkmHrVAZUAQgLQ8HtylcBqiVjBCrzPxJBARipGbZWVUgVgLAgFNyubBWgWjJGoCr/owEUgNGiYetVBFUBCAtBwe3KVQGqJWMEKvJfsXkFoEI1bM3RYVUAwgJQcLsyVYBqyRiB0fmv2rgCUCUbtu7IwCoAYcMvuF15KkC1ZIzAyPxXbloBqNQNW3tUaBWAsMEX3K4sFaAWLPk2J8/reNhR+R9/Z3+uqABUC4etPyK4XihhQy+4XTkqQC1Y8n1OntmxuCPyP/aOvl5NAZihHHaNu+H1MgkbeMHtylABasGSH+fkuR0HfDf/4+7k55UUgFnSYde5E2AvkrBhF9yu/BSgFiz5eU6e3THId/I/5g6OraIAHHNq+amrIfYSaRmXPzYtOxkZ+GpOnt/7s7ua//tXPreCAnDOq92nrwTZC6RdTP6zYbnJyMB3c/IM35vflfzfu+K1bysA19xafetsmL08WsXjy83KTEYGfpqT5/j6DM/m//qV7n1TAbjn1+bbZwLtxdEmFt9uVF4yMvBqTp7la3N85Xpt1fHfUgDGm2674tFQe2lsG4HDG5OVw1SPfvDInDzP50d0xPX8quO/oQCMN916xSPB9sLYOgKHNicnh5ge/9CROb3dpGf63KiOup5bdfynFYDxptuv+CrcXhbbR+DlBmXkJdESH3g1p4836bk+PrIzrsdXHf9JBWC8aYsV/R8PtRjz5U3Kx2W6qV88e1ApAcfGc9b12KrjP6UAjDdts6L/CVGbUZ/eqGycJnvkC1cOKiXg9aiuuL5edfwnFIDxpq1W/CroXhCtIvDlZuUiIwNXDyrP+M/zveo6OzUKwGzxDa/3OexeDhsO+eSWZOIk2EMfv3NQec6/H9od15lRUABmam98rY+B92LYeNAHtyYPB6Ee/tjdg8qz/vUA77rOioUCMEu6wXXeQ++l0GDYL7YoCxkZGHFQed7/O+sRrjMSpADMUG50jbfgeyE0Gvg3W5WDjAyMOqg883/Oe5RrdYoUgGph6xMgQGBRgZEHlRLw75BHulZGRwGo1LU2AQIEFhYYfVApAf8Me7RrVYQUgCpZ6xIgQGBxgYqDSglQAIbHXqiGk1qQAIHmAhUF4I20+/u6ynV0XP0CMFrUegQIEAgRqDyoOpeASteR0VIARmpaiwABAkEC1QdV1xJQ7ToqYgrAKEnrECBAIExgxkHVsQTMcB0RNQVghKI1CBAgECgw66DqVgJmud6NnAJwV9D3CRAgECow86DqVAJmut6JngJwR893CRAgECww+6DqUgJmu16NoAJwVc73CBAgEC7wxEHVoQQ84XoligrAFTXfIUCAwAYCTx1Uu5eAp1zPRlIBOCvm8wQIENhE4MmDaucS8KTrmWgqAGe0fJYAAQIbCTx9UO1aAp52PRpRBeColM8RIEBgM4EVDqodS8AKrkeiqgAcUfIZAgQIbCiwykG1WwlYxfVVZBWAV0L+ToAAgU0FVjqodioBK7n+FF0FYNMH27YIECDwSmC1g2qXErCa63c5UABePSH+ToAAgU0FVjyodigBK7p+FWEFYNMH27YIECDwSmDVgyq9BKzq+jkPCsCrJ8TfCRAgsKnAygdVcglY2fVjlBWATR9s2yJAgMArgdUPqtQSsLrrey4UgFdPiL8TIEBgU4GEgyqxBCS4vkVaAdj0wbYtAgQIvBJIOajSSkCKqwLw6gnxdwIECGwqkHJQvfEnlYAUVwVg0wfbtggQIPBKIOWget9HSglIcVUAXj0h/k6AAIFNBVIOqo/8CSUgxVUB2PTBti0CBAi8Ekg5qD7vY/USkOKqALx6QvydAAECmwqkHFRf8a9cAlJcFYBNH2zbIkCAwCuBlIPqu32sWgJSXBWAV0+IvxMgQGBTgZSD6if+FUtAiqsCsOmDbVsECBB4JZByUL3ax2olIMVVAXiVLH8nQIDApgIpB9UR/pVKQIqrAnAkWT5DgACBDQVSDqqj9KuUgBRXBeBosnyOAAECmwmkHFRn2FcoASmuCsCZZPksAQIENhJIOajOkj9dAlJcFYCzyfJ5AgQIbCKQclBd4X6yBKS4KgBXkuU7BAgQ2EAg5aC6Sv1UCUhxVQCuJsv3CBAgEC6QclDdYX6iBKS4KgB3kuW7BAgQCBZIOajuEs8uASmuCsDdZPk+AQIEQgVSDqoRvDNLQIqrAjAiWdYgQIBAoEDKQTWKdlYJSHFVAEYlyzoECBAIE0g5qEayzigBKa4KwMhkWYsAAQJBAikH1WjS6hKQ4qoAjE6W9QgQIBAikHJQVXBWloAUVwWgIlnWJECAQIBAykFVRVlVAlJcFYCqZFmXAAECiwukHFSVjBUlIMVVAahMlrUJECCwsEDKQVVNOLoEpLgqANXJsj4BAgQWFUg5qGbwjSwBKa4KwIxkuQYBAgQWFEg5qGbRjSoBKa4KwKxkuQ4BAgQWE0g5qGayjSgBKa7rKc+FAAAG40lEQVQKwMxkuRYBAgQWEkg5qGaT3S0BKa4KwOxkuR4BAgQWEUg5qJ7gulMCUlwVgCeS5ZoECBBYQCDloHqK6moJSHFVAJ5KlusSIEDgYYGUg+pJpislIMVVAXgyWa5NgACBBwVSDqoHif6+9NkSkOKqADydLNcnQIDAQwIpB9VDPH9c9kwJSHGNKQBXWtgKoXEPBAgQWFUg5aBaxe9oCUhxVQBWSZb7IECAwGSBlINqMsuPlztSAlJcFYCVkuVeCBAgMFEg5aCaSHLoUq9KQIqrAnBo3D5EgACB/QRSDqoV5X8qASmuCsCKyXJPBAgQmCCQclBNoLh0ie9KQIprVAF4m9Crn14uTdGXCBAg0Ewg5ZBafSxfnUkptgrA6ulyfwQIECgQSDmkCrY+fMnPJSDFVgEYHgULEiBAYG2BlANqbcU/7+5jCUjxjSsA/jNA0iPhXgkQWFEg5YBa0e6ne3ovASm+CkBawtwvAQIEbgikHE43tuirBwUiC4BfAQ5O18cIECDwSUABEIl3gdgCoAQIMQECBM4JOPzPee3+6egCoATsHk/7I0BglIDDf5TkPusoAPvM0k4IECDwpYDDXzC+EogvAO+b8v9BkIATIEDgvwIOf6n4TmCbAuA/Bwg5AQIE/hRw+EvETwJbFQAlQNgJECDwj4DDXxJeCWxXAPwngVcj93cCBHYWcPDvPN2xe9u2ACgCY4NiNQIE1hZw8K89nxXvbvsC8Bnd/7HgijF0TwQInBVw4J8V8/nPAu0KgAgQIECAAAECv34pAFJAgAABAgQaCigADYduywQIECBAQAGQAQIECBAg0FBAAWg4dFsmQIAAAQIKgAwQIECAAIGGAgpAw6HbMgECBAgQUABkgAABAgQINBRQABoO3ZYJECBAgIACIAMECBAgQKChgALQcOi2TIAAAQIEFAAZIECAAAECDQUUgIZDt2UCBAgQIKAAyAABAgQIEGgooAA0HLotEyBAgAABBUAGCBAgQIBAQwEFoOHQbZkAAQIECCgAMkCAAAECBBoKKAANh27LBAgQIEBAAZABAgQIECDQUEABaDh0WyZAgAABAgqADBAgQIAAgYYCCkDDodsyAQIECBBQAGSAAAECBAg0FFAAGg7dlgkQIECAgAIgAwQIECBAoKGAAtBw6LZMgAABAgQUABkgQIAAAQINBRSAhkO3ZQIECBAgoADIAAECBAgQaCigADQcui0TIECAAAEFQAYIECBAgEBDAQWg4dBtmQABAgQIKAAyQIAAAQIEGgooAA2HbssECBAgQEABkAECBAgQINBQQAFoOHRbJkCAAAECCoAMECBAgACBhgIKQMOh2zIBAgQIEFAAZIAAAQIECDQUUAAaDt2WCRAgQICAAiADBAgQIECgoYAC0HDotkyAAAECBBQAGSBAgAABAg0FFICGQ7dlAgQIECCgAMgAAQIECBBoKKAANBy6LRMgQIAAAQVABggQIECAQEMBBaDh0G2ZAAECBAgoADJAgAABAgQaCigADYduywQIECBAQAGQAQIECBAg0FBAAWg4dFsmQIAAAQIKgAwQIECAAIGGAgpAw6HbMgECBAgQUABkgAABAgQINBRQABoO3ZYJECBAgIACIAMECBAgQKChgALQcOi2TIAAAQIEFAAZIECAAAECDQUUgIZDt2UCBAgQIKAAyAABAgQIEGgooAA0HLotEyBAgAABBUAGCBAgQIBAQwEFoOHQbZkAAQIECCgAMkCAAAECBBoKKAANh27LBAgQIEBAAZABAgQIECDQUEABaDh0WyZAgAABAgqADBAgQIAAgYYCCkDDodsyAQIECBBQAGSAAAECBAg0FFAAGg7dlgkQIECAgAIgAwQIECBAoKGAAtBw6LZMgAABAgQUABkgQIAAAQINBRSAhkO3ZQIECBAgoADIAAECBAgQaCigADQcui0TIECAAAEFQAYIECBAgEBDAQWg4dBtmQABAgQIKAAyQIAAAQIEGgooAA2HbssECBAgQEABkAECBAgQINBQQAFoOHRbJkCAAAECCoAMECBAgACBhgIKQMOh2zIBAgQIEFAAZIAAAQIECDQUUAAaDt2WCRAgQICAAiADBAgQIECgoYAC0HDotkyAAAECBBQAGSBAgAABAg0FFICGQ7dlAgQIECCgAMgAAQIECBBoKKAANBy6LRMgQIAAAQVABggQIECAQEMBBaDh0G2ZAAECBAgoADJAgAABAgQaCigADYduywQIECBAQAGQAQIECBAg0FBAAWg4dFsmQIAAAQIKgAwQIECAAIGGAgpAw6HbMgECBAgQUABkgAABAgQINBRQABoO3ZYJECBAgIACIAMECBAgQKChwP8ALFI+poQkXqQAAAAASUVORK5CYII="},VIDEO_MUTE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAA4CAYAAABE814IAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAARKADAAQAAAABAAAAOAAAAADfM+xLAAADxklEQVRoBe2aO2sUURiGd41BK4MKYqNioY02ilhJCkH8ATYKCjaxMN6w0RiTeEsKsYpgJ3Z2Igg2ihZamD8gEUEbCxtFCV7xsj7fsjOc/fbMzu3MeHZ3PniZObfvvOfZs7Mzk9RqVVQEKgIVAYcEGo3GOvQEvUFHHKbuzVRAOIPMON6bK3HkGhKjJo3W+cBDuVxBUTsMIAMJpa44tBUFChXTbZW12ni9Xr8V1NFnL+c7g7Lj4x/yvUWLcmTe347zp08Xt1NoX4UWUNHxiQnGUNcPMf0KM4zAxCXLasMLLW1lQREbj9FQhmW4HYIJG5TxYBbay4RyMpj3vx49gvIZLyNpYND/KHqJvqKHaEOa8WFfBkqilUEF577slNHAU7cjflegu0jHs27jItvIsogeId+gjEWabjXgeS16jqJiTVyOjnYyfWxl01BmLLOUeU253mHWqMDbFvTa4tGs2mYMSXbK6CUjQxYoL4zxLk/no1bAJHvQhwSTbY/KEVlPUhOIzOELFCsQ/B1CP8RognACRObxAUoHEHxNor9iMGE4AyLzaSjTFhP6muLy6xMCYd5hdNsyf1yVUyAyWRIoJ4LvI/3l5s0VFBPIYTGTITqALAvMZjzuY9wDjDR/knn4ukJ5RuW6SXsTCu1LtO1HC6pP3qKzW/m8QGQhvkDJC7U53gWQKCj6tUEZOyU3FFdAbFCuUtlzUFwC6QsoroH0PJQigERBmZIGI7y8phQFRNatf32uUec9lCKBpIHSfANW4H2KeEkURQMRE0l2yjw3b15AKQNIFJSL6iPzAkpZQGxQZqn0Eor6oNqLbGX9PoSqXKEfCOWRXUf4Vp2GqAdC8+FuN/3k5XHa6Hi4a1+9pcQMroGIaRdQQiBim5y70HtJniK8ASKeNZQLloV02yltQFpQNpFD/tSQNLwCIqbzQLlh2dCyU0aQ/MNPkvAOiJhOAuVUsHj6B9eUyaBOH+kjb9DuoLjIBORVXFYH7Vmg7NAgdBlfUzHetuoxsWUS3o9J6qo5FZRY460OmJPXiz8tJr9TN5w0T9iPQbOWZEVVaSgTlonCr09oMuaEHPJvYu9UromYYfZmkmxEX1SyIotFQZFrzzE0h+S9bvYgwVlUZhQCJTsBNRISQ0i277cSqfgNRRgBYzOSh7CnKO1dIUNSh4Zy3pIh9TVFfd7uiphbjuQ3v0i1/U8Zc9mgnHa3qh7MVEGxfGgRUMJnH8uQ/q8Cyjlkhtxsre7/lXdZIQBMKL8or+/SfTCagHAA3UMHB2PF1SorAhUBXwn8A+xdTzcs3gqYAAAAAElFTkSuQmCC"},VIDEO_UNMUTE:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAA4CAYAAABE814IAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAARKADAAQAAAABAAAAOAAAAADfM+xLAAACsklEQVRoBe2aQUtVQRTH30tLcVGQC3FR5iIy6ANEaG0UDNxXCyEFN+2EVhUt6iOE0NKF+g2Eggh1I4RL0zYVQQt3FaSIpc/fkZTXefe+N3PvfbxhPAf+zj0zc2bO/N7Mu+C8UsnMCBgBI2AEjIARMAJGIAgCZd8sKpXKOWKuouvoMjqDmmX7DPwFbUpZLpf/Nmsi73EFBHqCdlAr7AeTTiHvD9FnsU6Dk0QPgy6hAZ/Bm9T3HeOOsltk9xRurtt9hplDgCEAhtEjeWiJsTvGUGj2k4Qu+ACh/0P0EW2jRXTJJ/6kL4GvUIh2+yTJOg8k3oEWEhawkhTmcmRuJAUGUHetUQ5A6KaPfOc8SOg7RPtFXe8CRF6vIZq8+lONxUr7KhpM7VQq9eo2FyBdOigQvzMtD2AIBIFRFxrtNW9ZFyBp8wZZDww5HnJM5Lh4W1RAgPEUAvOow5vEv4D2rIEhxQHiLPm8RpN584plh9wrAobAjAVIW96dcRwfC5Dj9eQuDYhCaEAMiCKgXNshBkQRUK7tEAOiCCjXdogBUQSUazskUiBykbWj1pbJjWKHcEfzgdXfQVuZKFQFRQFE1gOUNYqbaEP8rBYNEAEAlG8Ut9B78bNYVEAEAFB+UYyiWeRtLkByn0vvrNwCUvMCyh80wTDPGwy1p9tdgOQ6k3rCAv2GeQHlJfONo5qFU7eLvqL/LGogslKgzFGMoO/iV9kL2UlV/tFjzUWN7sB/tPupW0chXVi9YTF3da71fNZxnvb76ApaJv4tZTZjsMcoFPtNIn3ZVlJQFAm0oWeoVb8eYuoj2+Sv061/1qU3PDLVA5OMHJ9pJL8IGEA1l8XUFWlyxj+jT2gFzbDVk74gaSrGvIDoKQEkN3+5xtBjKn8fAAeqzlwjYASMgBEwAkbACBiB00DgEI6tZSPk7kDyAAAAAElFTkSuQmCC"},VIDEO_MUTE_COLORED:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAABpklEQVRIieWPz0tUURxHz+f61HTRuFAMijaV5CJKZiZ7hSK0alv5DwjRMqhtSfvWrWrTKtoEurBoV0SRORshaJpK0E3QD42xmdd7cr8tGpwhGx3puajO8t7vPed74Z+gmB2+UsyHp3fC7QBM9JvZdOn4yTDtgAAM9CZ34hZwHuO2wceWtpMWtdJz/9DbB9+bzQS1ihWlu2Y2IXHZoeRnd3MMLzJfBoHJxvOFsbFdUaWy/0N39/tg/dT7vHOKzOgyrKOVH4BANtIoTsrRhXi1OulwvXvL0aWgcXzLlZtQOnim0zLLF+PV6jWk3aCOmm8o2OpxK/ie5TsGZ4Xaf71zaQQkjgg2yFMLbMbfETAU72zA/HWwFcGGUCqBw3MvpqK4ug90tR4yQ4rrAVGWSdtTmwn3FeDo/Py3gbnnN+ohN2Pe31wXloZG+nyw9gizY637+STnzg28fPak2cg2N655x8fbigtL9wTDgQWnDhSeLqYaAFgKw65K4h9i6vVtfnRwdvZzqgGAd9lsZo32xziqZZ+M5gqF5E98v+VVPr/ndS6cSF38//ADKjaadmRjUlEAAAAASUVORK5CYII="},VIDEO_UNMUTE_COLORED:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAABJElEQVRIie2SvUrDUBiGny9NQoVYfxZBCOiWeAdeg7uC1cFZxMGfLuLmDejgIrg5ZHEUr0JBikPxDip0Mz0H8zkEXGJaYiui9JkOfN95n5fDgQn/HqGdBNTsMZotVLspPTK5YqXZGbTm5uHaAvErCRSL6AawVJi9JDOkaYTfe3RRDYFq4TkesFgINmYfY45wnAA733K/EVyknQSI3cWYE/KyeWEhHl3wcD2LYzpAgy9ewhlZMOWvlYWPR5DhIGRl49EFQ/gTglcU7+cE8eYdIntAFzDjF4goUfOSug2BQ6CLqgUU6DtAH7T0FwzBfp6Wd1LirQvqNkTkALgl41x4vlmF93uQ6YrhGaJnRNung5YEAE1qPNlGpfg5LyVcf6tYasIv8AHJDlIAEo1/qAAAAABJRU5ErkJggg=="},MENU:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAADB0lEQVR4nO3bP09TYRTH8d9pbxls0ztcikEwwYQB34kSInEyDL4AMc4uJsbRt0DiiLM2legrYVIHUdS2SS8EB3p7j4smDCZQ7vPIr8nvs0JPnuTk6T/4AiIiIiISnl31AS5jOBwue5JsumPDgBUAN//86IsDn83Qs6LoZll2cJXnvIyZWsjh8XGnUZTPYNgGkJzz6yUcuz6XPO00m4f/43whzMxC+kdHG1b6LoD2lA89Kg1bC2m6F+NcodWu+gAXMcjzbSv9DaZfBgC0a47uYDR6FPpcMdDfkGGe33FHD0C94qjSa7bZabd7Ic4VC/VC+v2TG9Yo9nG5m/EveZnU1xZare+B5gXH/ZTVGL9AuGUAQForJs8DzguO9oYMh8Nlryefcf67qWkVKBor8/PXvgaeGwTtDfEkuY/wywCABI3xZoS5QfAuxHE31mwrsR5rdlW0CzFgNdZst3izq6JdCIDFiLOXIs6uhHkhHnF2GXF2JcwL+RZxNuU7LIB4IQZ8jDbcI86uiHYhboj2ZaCbv4s1uyrahVhRvAVQRBhdYNzoRpgbBO1Csiw7MNirCKN3Op1mzNenSmi/OgGA/snJoo2LfQBpoJGjSVJfu95q/Qg0LzjaGwIAnWbz0AwPAEwCjCu9Zg+ZlwGQLwQAsjT9APgTVFvKxOGP2f8WApA/ZZ31M8/Xa47XmP7pa2SGrSxN38c4V2j0N+SvhTTdm6vZKmAvAZxe4CGFwXbKpH57VpYBzNANOWsw+LWE5PSewTYcuIUz/wZkjk+leQ/jRpf53ZSIiIiIiAiLmfxgqD6EhPoQIupDiKgPIaI+hIj6EDbqQ3ioDyGjPoSM+hAy6kP4qA8hoz6EjPoQJupDyKgPIaM+hIz6EELqQ8ioDyGkPoSU+hAy6kOIqQ8REREREREJZyY/GKoPIaE+hIj6ECLqQ4ioDyGiPoSN+hAe6kPIqA8hoz6EjPoQPupDyKgPIaM+hIn6EDLqQ8ioDyGjPoSQ+hAy6kMIqQ8hpT6EjPoQYupDRERERGQ6vwEgnckhwXx03wAAAABJRU5ErkJggg=="},ZOOM_IN:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABmJLR0QA/wD/AP+gvaeTAAADjElEQVR4nO2cvW7UQBSFj6looggeJSmCaKgQQql4mtBly7wRQQiJlobn4EdESZVAcyh2jW6SnfXYvnNnnJyvXvueOV8cx2vHgBBCCCGEEEIIIYQQCViW04D8JyUXUDp/SQHFyzdrKCYhInwJwso36ygiISK4N+Hlm7W4S4gI7Um18s16XCVEBPaievk9dJQQEdaDZsrvoZOEiKBzaa78HjpIiAj5IMvvmSth7LwnJRaR4AbAeeC8qXzBOmubzDwCLkm+qL2GFCQPSV5EHgFTQs6lSQke5ZNt/wrq2Qdw3pIEkocAPgF4Fj27hgCgIQk1ywfKCfiT8ZlewlGhDINsZn9GXvk5axpNCQErAC8BXGR8dh/AxxpHwuYn/8MmwxBXAF4BeF80VA4D56BT87kDkr8zz12hJ2aOO+Fe2qOUA9cJEeFT3LvIYoMSOKN8s4+khNL5UwKSV7gtSfAo3+xrq4RS2e3g7PLNNtUleJZv9nlPgnfubUNHlW+2qyahRPlm37ckeGXeNXB0+WbbcAklyzcz/kuYmzdn2KTyzfZhEiLKN7NOogSsHPZxtFlwDr9I7k2YsbfZtnj5ZubsbsJg3pHwl+S7GTOOSd5ElL9IBiTMKt/M2CXh8Zbfk5DgUr6ZsU2Cyu+5I8G1fDPDSlD5d9lI+F6ifDPjmOQPlZ+AE/7aaXGGEEIIIYQQQgghhBDNoy/jKsL1DfSIr6N/soGnspuCt59eiLohIwlA8tGRqFuSj1tConxXCYnyJWGgfBcJA+UvUwL1YNaumeUfzNoEPpuxfeTjgpGPQa7I2IdzR0uILN/MLC6hLz9awCgJNco3s4tJsOXXEJAloWb5JoO7hLvl1xKwU0IL5ZssbhK2lV9TwFYJLZVvMs2WkCq/tgDSSGCD5ZtskyVwR/lkfQEkecaGyzfrGC2BA+WTbQggh68+7cKqvqqA+ReEWWsam6GbENrL8hWAN13XfXXa3yRIHmD9so7nHvvrum5Up7XeltJE+QDQdd03AK+R926L+mQerrto8p8jOO6ckCQi6IMrv8dDQkTIqVy3XH4P1yfm6ygBkeeApwCK3e915C3WWdtkxhHQM/mr7NIw4+987yNgSkgPmpNAh/LJ5QggG5JAp/LJZQkgG5BAx/LJ5QkgK0qgc/nkMgWQFSSwQPnkcgWQgRJYqHxy2QLIAAksWD4ZIEAIIYQQQgghhBBCLJZ/JA5dNdHn/r4AAAAASUVORK5CYII="},ZOOM_OUT:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAABmJLR0QA/wD/AP+gvaeTAAADkklEQVR4nO2dsXLTQBCGV1TpEsKbkCIMDRXDUPI0oUvKvBFhgAwtFPAkZJIqpvoo5GMOY0sr6/ZOd96vPt2u/s+yYsd3EnEcx3Ecx3Ecx3Ecx3EcJcAJ8Bl4UbqXXABnwC3wrHQjJ8B3eu4PQcI6/Lv1Of8sJmEjfA5Bwkb4FJOwI/ymJewIP7+EkfCblDASfl4J9DcfDffAuXlDxgDn63PRcJujoefArwkSqr0S0L3y87/gDkHCYsOPGswuAbhSjLlOUGfZ4UeNZpMAXAEoxjFHQjXhRw2bSwjhTxCwl4Tqwg9YSojDnyhgkoRqww9YSNgMfw8BKgnVhx9IKWFb+HsKGJTQTPiBFBJ2hT9DwFYJzYUfmCNhKHyYJQAiCbQafoA9JDASPswWAHBN6+EHmPY9ykozSFEzWS0yhN9ZTi7SXwki8klETlPM13XdYM8aSUoeRORN13XfEs23lSeWk4uIdF33Q0Rei8idda2EZAk/K0y7J+xEUWcu9b7nj0ECCYoaHv4Q9DfmxwUKeCwRvvk9YAtvReSoQN0xjkTkXekmTEHxd37BKyAw+/8JiyRF+JBFALQmgUThQzYB0IoEEoYPWQVA7RJIHD5kFwC1SsAgfCgiAGqTgFH4UEwA1CIBw/ChqACoRYLjOI7jOI7jOIcFcGH5SUhR35LLHBnOBkMJitpW1BF+ACMJiroW1BV+AAMJipqpqTP8AIklKOqlpO7wAySUoKiVijbCD5BIgqJOCtoKP0ACCYoaHv4QcyUo5q8q/BK/jPsqIqsCdcdYichN6SZMYdrKlBJXQJXbKqhIEX4GAZBZQpa3IOBM+lUyT3PUm8mxiNzkkmAuoLLwA9kkmAqg/739F9GF/9uylz1qBQmmawbMBKxf+R+kP5ExHkTklYi8t+on4kpEXopuzdqxiHzMeU9IAjPW4TLyOUFRe4jLaFybm06RYBE0AxIU9UfDj8a2JSFF+NFcWyUoelCFH41vQ0LK8KM5/5OgOEYdfnRM3RIswo/m/keCYvyk8KPj6pRgGX5U468ExdjJ4UfH1iUhR/hRrYsJAvb+VrMaCUzbCSXJCnR021aOjlHMkf3cpjbY/H47LPVKOITwA4uUgG/ePUSWzbu129dXH34A3ZWwmGcINBV+YETCYp6i0WT4gR0SFvMcmabDD2xIKBd+1NAp/Y25+fAD9DfmWyDJRoSO4ziO4ziO4ziO4zjOYfAHO7OVVfpcX1oAAAAASUVORK5CYII="}},J=o.StyleSheet.create({user_list_container:{position:"absolute",top:me,bottom:me,width:"100%",backgroundColor:yt.blackLightXX,elevation:10,zIndex:10},flat_list_style:{},users_icons_container:{marginLeft:10},user_list_close_container:{padding:10,borderRadius:20,margin:5,alignSelf:"center"},user_item_container:{position:"relative",elevation:0,zIndex:0},close_icon:{width:25,height:20,tintColor:yt.whiteAlmost},menu_container:{backgroundColor:"#111",alignSelf:"flex-end",marginBottom:5,borderRadius:5,width:90,paddingHorizontal:10,paddingVertical:5,position:"absolute",right:15,elevation:19,zIndex:1},menu_list:{flexDirection:"row",alignItems:"center"},menu_icon:{width:18,height:18,marginRight:5},menu_text:{fontSize:16,color:"#fff",padding:5},user_item_pinned:{padding:15,fontSize:18,flexDirection:"row",justifyContent:"flex-start",alignItems:"center",zIndex:1,borderBottomWidth:o.StyleSheet.hairlineWidth,borderBottomColor:yt.palette.offWhite},user_item_user_name:{fontSize:18,color:yt.palette.white,marginStart:10,width:"60%"},user_item_icon_container:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",position:"absolute",right:10},user_item_icons:{width:20,height:20},recorderBadge:{height:12,width:12,borderRadius:20,backgroundColor:yt.redLightX},recorderBadgeText:{fontSize:12,color:yt.palette.white},lt_small_button:{width:10,height:10,marginHorizontal:8,borderRadius:20,alignItems:"center",justifyContent:"center"},lt_small_button_red:{width:35,height:35,margin:5,backgroundColor:yt.redLight,borderRadius:20,alignItems:"center",justifyContent:"center"},lt_small_button_blue:{width:35,height:35,margin:5,backgroundColor:yt.blueLight,borderRadius:20,alignItems:"center",justifyContent:"center"}}),Z=d().memo(({connectionQuality:R})=>{const F=R<25?k.NETWORK1:R<50?k.NETWORK2:R<75?k.NETWORK3:k.NETWORK4;return d().createElement(o.Image,{resizeMode:"contain",source:F,style:[{height:20,width:20}]})},(R,F)=>Math.ceil(R.connectionQuality/25)===Math.ceil(F.connectionQuality/25));let ie=null;const we=d().memo(({pinnedUserId:R,itemsRef:F,isMenuVisible:_,setIsMenuVisible:w,recorderId:V,isAudioOnly:W,selectedIndexRef:te,topRef:oe,dispatch:le,headerRef:Fe,refresh:ge,users:nt,screenOffsetRef:dt})=>d().createElement(o.FlatList,{style:J.flat_list_style,data:nt,keyExtractor:It=>It.id,renderItem:It=>{if(It){const kt=It.item,Nt=It.index;let vt,cn=kt.name;return Nt==0&&(cn+=" (you)"),vt=kt.id===R,d().createElement(d().Fragment,null,d().createElement(o.TouchableOpacity,{onPress:()=>{w(!1)},activeOpacity:1,style:J.user_item_container},d().createElement(o.View,{style:J.user_item_pinned},d().createElement(o.View,null,kt.id===V&&d().createElement(o.View,{style:J.recorderBadge})),d().createElement(o.Text,{testID:`cc-user${Nt}-name`,style:J.user_item_user_name},cn),d().createElement(o.View,{style:J.user_item_icon_container},d().createElement(o.View,{style:[J.users_icons_container,{flexDirection:"row",alignItems:"center"}]},__nested_webpack_require_965809__.g.ccUsersStats[kt.id]&&d().createElement(Z,{connectionQuality:__nested_webpack_require_965809__.g.ccUsersStats[kt.id]})),d().createElement(o.View,{testID:`cc-user${Nt}-audio-icon`,style:J.users_icons_container},d().createElement(o.Image,{style:[J.user_item_icons,{tintColor:kt.isAudioMuted?yt.red:yt.green}],source:kt.isAudioMuted?k.AUDIO_MUTE:k.AUDIO_UNMUTE})),W?null:d().createElement(o.View,{testID:`cc-user${Nt}-video-icon`,style:J.users_icons_container},d().createElement(o.Image,{style:[J.user_item_icons,{tintColor:kt.isVideoMuted?yt.red:yt.green}],source:kt.isVideoMuted?k.VIDEO_MUTE:k.VIDEO_UNMUTE})),kt.status==="interrupted"?d().createElement(o.View,{style:J.users_icons_container},d().createElement(o.Image,{style:J.user_item_icons,source:k.ALERT})):null,vt?d().createElement(o.View,{testID:`cc-user${Nt}-pin-icon`,style:J.users_icons_container},d().createElement(o.Image,{style:J.user_item_icons,source:k.PIN})):null,d().createElement(o.TouchableOpacity,{testID:`cc-user${Nt}-opt`,style:J.users_icons_container,onPress:Wt=>{var Rt;const Xe=Wt.nativeEvent.pageY,pn=Wt.nativeEvent.locationY;(Rt=F.current)==null||Rt.measure((Pn,gr,vr,Gn,br,bn)=>{oe.current=Xe+pn-bn,te.current=Nt,w(rn=>!rn)})}},d().createElement(o.Image,{source:k.MENU,style:[{height:20,width:20}]}))))))}},onScroll:()=>{if(_){const It=o.LayoutAnimation.create(300,o.LayoutAnimation.Types.easeOut,o.LayoutAnimation.Properties.scaleXY);o.LayoutAnimation.configureNext(It),w(!1)}},ListHeaderComponent:()=>d().createElement(o.View,{style:J.user_item_pinned,ref:Fe,onLayout:()=>{var It;(It=Fe.current)==null||It.measure((kt,Nt,vt,cn,Wt,Xe)=>{dt.current=Xe})}},d().createElement(o.TouchableOpacity,{testID:"cc-user-list-close",touchSoundDisabled:!0,style:J.user_list_close_container,onPress:()=>{o.LayoutAnimation.configureNext({duration:100,create:{type:"linear",property:"scaleY"},update:{type:"linear",property:"scaleY"},delete:{type:"linear",property:"opacity"}}),le({type:Ye,payload:!1}),w(!1)}},d().createElement(o.Image,{style:J.close_icon,source:k.CLEAR})),d().createElement(o.Text,{style:{fontSize:22,fontWeight:"700",color:"#fff"}},"User List")),ListFooterComponent:()=>d().createElement(o.TouchableOpacity,{activeOpacity:1,onPress:()=>{_&&w(!1)},style:{height:80}})}),(R,F)=>R.refresh==F.refresh),ke=d().memo(function(){var Wt,Xe,pn,Rt;const{globalState:R,settings:F,jitsiManager:_,users:w,dispatch:V}=Bt(),[W,te]=(0,S.useState)(!0),[oe,le]=(0,S.useState)(!1),Fe=(0,S.useRef)(0),ge=(0,S.useRef)(0),nt=(0,S.useRef)(null),dt=(0,S.useRef)(0),It=(0,S.useRef)(null),kt=R.pinnedUserId,Nt=R.recordId,vt=(0,S.useCallback)(()=>{V({type:O,payload:""})},[]),cn=(0,S.useCallback)(Pn=>{V({type:O,payload:Pn.id})},[]);return(0,S.useEffect)(()=>{ie&&clearTimeout(ie),ie=setTimeout(()=>{te(Pn=>!Pn)},500)},[w,kt,Nt,oe]),R.isParticipantsModelVisible?d().createElement(o.View,{style:J.user_list_container,ref:Pn=>{It.current=Pn}},d().createElement(d().Fragment,null,d().createElement(we,{pinnedUserId:kt,itemsRef:It,isMenuVisible:oe,setIsMenuVisible:le,recorderId:Nt,isAudioOnly:F.isAudioOnly,selectedIndexRef:dt,topRef:Fe,dispatch:V,headerRef:nt,refresh:W,users:w,screenOffsetRef:ge}),oe&&d().createElement(o.View,{style:[J.menu_container,{top:Fe.current}]},d().createElement(o.TouchableOpacity,{testID:"cc-user-pin",onPress:()=>{var Pn;((Pn=w[dt.current])==null?void 0:Pn.id)===kt?vt():cn(w[dt.current]),le(!1)},style:J.menu_list},d().createElement(o.Image,{style:J.menu_icon,source:k.PIN}),d().createElement(o.Text,{style:J.menu_text},((Wt=w[dt.current])==null?void 0:Wt.id)===kt?"Unpin":"Pin")),(Xe=w[dt.current])!=null&&Xe.isAudioMuted||((pn=w[dt.current])==null?void 0:pn.id)===((Rt=w[0])==null?void 0:Rt.id)?null:d().createElement(o.TouchableOpacity,{testID:"cc-user-mute",onPress:()=>{_.current.muteParticipant(w[dt.current]),le(!1)},style:J.menu_list},d().createElement(o.Image,{style:J.menu_icon,source:k.AUDIO_MUTE}),d().createElement(o.Text,{style:J.menu_text},"Mute"))))):null}),at=()=>d().createElement(o.View,{style:ft.container},d().createElement(o.View,{style:ft.dot}),d().createElement(o.Text,{style:ft.text},"REC")),ft=o.StyleSheet.create({text:{fontSize:12,fontWeight:"800",color:yt.blackLightXX},container:{backgroundColor:"white",borderRadius:5,position:"absolute",alignItems:"center",top:10,left:10,padding:5,flexDirection:"row",borderWidth:1,borderColor:yt.palette.black},dot:{backgroundColor:"red",height:10,width:10,borderRadius:10,marginRight:5}}),lt=o.StyleSheet.create({buttonIcon:{width:25,height:25},buttonContainer:{width:58,height:58,margin:1,backgroundColor:yt.blackLightXXX,borderRadius:30,alignItems:"center",justifyContent:"center"},touchableContainerPortrait:{width:"100%",alignItems:"center",flexDirection:"column"},touchableContainerLandScape:{width:"100%",alignItems:"center",flexDirection:"row"},bottomButtonContainerPortrait:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:yt.blackLight,width:"100%",borderTopEndRadius:20,borderTopStartRadius:20,justifyContent:"flex-start",alignItems:"center"},bottomButtonContainerLandscape:{position:"absolute",bottom:0,right:0,top:0,backgroundColor:yt.blackLight,flexDirection:"row",alignItems:"center",borderTopStartRadius:20,borderBottomStartRadius:20},bottomButtonArrow:{alignSelf:"center",height:40,width:60,opacity:.9},bottomArrowContainerPortrait:{height:22,width:70},bottomArrowContainerLandScape:{width:32},bottomButtonPlaceHolderPortrait:{height:102},bottomButtonPlaceHolderLandscape:{width:102},userListHeaderContainer:{marginTop:10,alignSelf:"flex-start"},userListHeader:{margin:10,fontSize:18,fontWeight:"bold",color:yt.palette.white},buttonListContainerPortrait:{},buttonListContainerLandscape:{},buttonListPortrait:{alignItems:"center"},buttonListLandscape:{height:"100%",flexWrap:"wrap",justifyContent:"center"},buttonWrapperPortrait:{marginTop:10},buttonWrapperLandscape:{marginRight:10}});class ye{static e(F,_,w={}){}static d(F,_,w={}){}}const tn="AudioButton";function er(){const{users:R,jitsiManager:F}=Bt(),_=(0,S.useRef)(0);return d().createElement(o.TouchableOpacity,{testID:"cc-audio",style:lt.buttonContainer,touchSoundDisabled:!0,onPress:()=>{try{new Date().getTime()-_.current>300&&(ye.d(tn,"[onButtonPress]"),F.current.toggleAudioButton(),_.current=new Date().getTime())}catch(w){ye.d(tn,"[onButtonPress]",w)}R[0].audioTrack}},d().createElement(o.Image,{style:lt.buttonIcon,source:R[0].isAudioMuted?k.AUDIO_MUTE:k.AUDIO_UNMUTE}))}const rr="AudioModeButton";function or(){const{globalState:R,dispatch:F}=Bt();return d().createElement(o.TouchableOpacity,{testID:"cc-audio-mode",onPress:()=>{try{F({type:Oe,payload:!0}),ye.d(rr,"[onButtonPress]")}catch(_){ye.d(rr,"[onButtonPress]",_)}},style:lt.buttonContainer},d().createElement(o.Image,{style:lt.buttonIcon,source:(()=>{switch(R.selectedAudioMode){case fe.SPEAKER:return k.AUDIO_MODE_SPEAKER;case fe.BLUETOOTH:return k.AUDIO_MODE_BLUETOOTH;case fe.EARPIECE:return k.AUDIO_MODE_EARPIECE;case fe.HEADPHONES:return k.AUDIO_MODE_HEADPHONE;default:return k.AUDIO_MODE_SPEAKER}})()}))}const dn=new Proxy({mode:"DEFAULT",isPresenter:!1},{get:(R,F,_)=>F==="isPresenter"?R.mode===Y?!!R.isPresenter:void 0:Reflect.get(R,F,_)}),mt="EndCallButton";function Xt(){const{jitsiManager:R,globalRef:F,nativeManager:_,dispatch:w,users:V}=Bt();return d().createElement(o.TouchableOpacity,{testID:"cc-end-call",onPress:()=>{var W;if(dn.isPresenter===!0&&V.length>1)w({type:Ze,payload:!0});else{try{ye.d(mt,"[onHangUpCalled]"),F.current.callEnded=!0,(W=_.current)!=null&&W.onCallEndButtonPressed&&_.current.onCallEndButtonPressed()}catch(te){ye.d(mt,"[onHangUpCalled]",te)}try{R.current.leave()}catch(te){ye.d(mt,"[onHangUpCalled]",te)}}},style:[lt.buttonContainer,{backgroundColor:yt.redLight}]},d().createElement(o.Image,{style:lt.buttonIcon,source:k.END_CALL}))}const ae="RecordingButton";function ee(){const{globalState:R,jitsiManager:F}=Bt();return d().createElement(o.TouchableOpacity,{testID:"cc-rec",style:lt.buttonContainer,touchSoundDisabled:!0,onPress:()=>{try{ye.d(ae,"[onButtonPress]"),R.isRecording?F.current.stopRecording():F.current.startRecording()}catch(_){ye.d(ae,"[onButtonPress]",_)}}},d().createElement(o.View,{style:{width:Ue,height:Ue,backgroundColor:yt.palette.red,borderRadius:R.isRecording?0:Ue}}))}const Ee="SwitchCameraButton";function ve(){const{jitsiManager:R}=Bt();return d().createElement(o.TouchableOpacity,{testID:"cc-switch-camera",style:lt.buttonContainer,touchSoundDisabled:!0,onPress:()=>{try{ye.d(Ee,"[onButtonPress]"),ye.d(Ee,"[onButtonPress]"),R.current.flipCamera()}catch(F){ye.d(Ee,"[onButtonPress]",F)}}},d().createElement(o.Image,{style:lt.buttonIcon,source:k.SWITCH_CAMERA}))}const et="SwitchToVideoCallButton";function We(){const{jitsiManager:R}=Bt();return d().createElement(o.TouchableOpacity,{testID:"cc-switch-video",onPress:()=>{try{ye.d(et,"[onButtonPressed]"),R.current.requestingToSwitchToVideoCall()}catch(F){ye.d(et,"[onButtonPressed]",F)}},style:[lt.buttonContainer]},d().createElement(o.Image,{style:lt.buttonIcon,source:k.SWITCH_TO_VIDEO_CALL}))}const Ot="VideoButton";function _t(){const{users:R,jitsiManager:F}=Bt();return d().createElement(o.TouchableOpacity,{testID:"cc-video",style:lt.buttonContainer,touchSoundDisabled:!0,onPress:()=>{try{ye.d(Ot,"[onButtonPress]"),F.current.toggleVideoButton()}catch(_){ye.d(Ot,"[onButtonPress]",_)}}},d().createElement(o.Image,{style:lt.buttonIcon,source:R[0].isVideoMuted?k.VIDEO_MUTE:k.VIDEO_UNMUTE}))}const Vt=102,Tt=4;function nn(){const{globalState:R,settings:F,users:_}=Bt(),w=R.isPortrait?R.dimension.height:R.dimension.width;if(R.inPIPMode||F.enableDefaultLayout===!1)return null;const V=(0,S.useMemo)(()=>(Math.min(R.dimension.height,R.dimension.width)-240)/(2*(Tt+3)),[R.dimension.width]);(0,S.useEffect)(()=>{W.setValue({x:0,y:0}),te.setValue(w-Vt)},[R.isPortrait]);const W=(0,S.useRef)(new o.Animated.ValueXY({x:0,y:0})).current,te=(0,S.useRef)(new o.Animated.Value(w-Vt)).current,oe=(0,S.useCallback)((ge,nt)=>{const dt=R.isPortrait?nt.dy:nt.dx;o.LayoutAnimation.configureNext({duration:300,create:{type:"linear",property:"opacity"},update:{type:"spring",springDamping:.4},delete:{type:"linear",property:"opacity"}}),W.setValue({x:0,y:0}),dt>0?te.setValue(w-Vt):te.setValue(w-Vt-70)},[R.isPortrait,W,w]),le=o.PanResponder.create({onStartShouldSetPanResponder:(ge,nt)=>!(nt.dx===0&&nt.dy===0),onPanResponderMove:()=>o.Animated.event([null,{[R.isPortrait?"dy":"dx"]:W.y}],{useNativeDriver:!1}),onMoveShouldSetPanResponder:(ge,nt)=>{const{dx:dt,dy:It}=nt;return dt>5||dt<-5||It>5||It<-5},onPanResponderRelease:oe});if(R.inPIPMode)return null;const Fe=o.Animated.add(te,W.y).interpolate({inputRange:[w-Vt-70,w-Vt],outputRange:R.isPortrait?["0deg","180deg"]:["180deg","0deg"],extrapolate:"clamp"});return d().createElement(d().Fragment,null,d().createElement(o.View,{style:R.isPortrait?lt.bottomButtonPlaceHolderPortrait:lt.bottomButtonPlaceHolderLandscape}),d().createElement(o.Animated.View,fn(Ft({},le.panHandlers),{style:R.isPortrait?[lt.bottomButtonContainerPortrait,{top:o.Animated.add(te,W.y.interpolate({inputRange:[-1e3,0,1e3],outputRange:[-1e3,0,1e3],extrapolate:"clamp"}))}]:[lt.bottomButtonContainerLandscape,{left:o.Animated.add(te,W.y.interpolate({inputRange:[-1e3,0,1e3],outputRange:[-1e3,0,1e3],extrapolate:"clamp"}))}]}),d().createElement(o.TouchableWithoutFeedback,null,d().createElement(o.View,{style:R.isPortrait?lt.touchableContainerPortrait:lt.touchableContainerLandScape},d().createElement(o.View,{style:R.isPortrait?lt.bottomArrowContainerPortrait:lt.bottomArrowContainerLandScape},d().createElement(o.Animated.Image,{style:[lt.bottomButtonArrow,{transform:[R.isPortrait?{rotateX:Fe}:{rotateY:Fe},{rotate:R.isPortrait?"0deg":"90deg"}]}],resizeMode:"stretch",source:k.ARROW})),(()=>{const ge=[],nt=F.hideEndCallButton?null:d().createElement(Xt,null),dt=!R.conferenceJoined||F.hidePauseVideoButton||F.isAudioOnly?null:d().createElement(_t,null),It=!R.conferenceJoined||F.hideAudioMuteButton?null:d().createElement(er,null),kt=!R.conferenceJoined||F.hideVideoSwitchButton||F.isAudioOnly?null:d().createElement(ve,null),Nt=!R.conferenceJoined||F.hideAudioModeButton?null:d().createElement(or,null),vt=R.conferenceJoined&&F.showRecordingButton?d().createElement(ee,null):null,cn=R.conferenceJoined&&F.showSwitchToVideoCallButton&&F.isAudioOnly&&_.length-(R.noOfScreenShareUser||0)==2?d().createElement(We,null):null;return nt&&ge.push(nt),Nt&&ge.push(Nt),dn.isPresenter!==!1&&(cn&&ge.push(cn),dt&&ge.push(dt),It&&ge.push(It),kt&&ge.push(kt),vt&&ge.push(vt)),d().createElement(o.View,{style:R.isPortrait?lt.buttonListContainerPortrait:lt.buttonListContainerLandscape},d().createElement(o.FlatList,{key:R.isPortrait.toString(),scrollEnabled:!1,contentContainerStyle:R.isPortrait?lt.buttonListPortrait:lt.buttonListLandscape,showsVerticalScrollIndicator:!1,numColumns:R.isPortrait?Tt:1,data:ge,renderItem:({item:Wt})=>d().createElement(o.View,{style:R.isPortrait?[lt.buttonWrapperPortrait,{marginHorizontal:V}]:[lt.buttonWrapperLandscape,{marginVertical:V}]},Wt)}))})()))))}class In extends d().Component{constructor(_){super(_);bt(this,"fadeInAnimation",()=>{o.Animated.timing(this.state.fadeAnim,{toValue:0,duration:0,useNativeDriver:!0}).start(()=>{o.Animated.timing(this.state.fadeAnim,{toValue:1,duration:this.props.duration,delay:10,useNativeDriver:!0}).start()})});this.state={activeIndex:-1,fadeAnim:new o.Animated.Value(0),animations:[]},this.animations=[{name:"zoomIn",animation:{scale:this.state.fadeAnim.interpolate({inputRange:[0,1],outputRange:[0,1]})}},{name:"pulse",animation:{scale:this.state.fadeAnim.interpolate({inputRange:[0,.4,.7,1],outputRange:[.7,1,1.3,1]})}},{name:"shake",animation:{scale:this.state.fadeAnim.interpolate({inputRange:[0,.2,.4,.6,.8,1],outputRange:[.8,1.2,.8,1.2,.8,1]})}},{name:"rotate",animation:{rotate:this.state.fadeAnim.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]})}}],this._changeRadio=this._changeRadio.bind(this),this._checkAnimatons=this._checkAnimatons.bind(this)}componentDidMount(){this._checkAnimatons(),this.fadeInAnimation()}componentDidUpdate(_){if(this.state.activeIndex===-1&&this.props.initial>0){const w=this.props.initial-1;this._changeRadio(this.props.data[w],w)}if(this.props.initial!==_.initial){const w=this.props.initial-1;this._changeRadio(this.props.data[w],w)}this.props.animationTypes!==_.animationTypes&&this._checkAnimatons()}_checkAnimatons(){const{animationTypes:_}=this.props;this.setState({animations:[]});const w=[];_&&_.map(V=>{const W=this.animations.find(te=>te.name===V);W&&w.push(W.animation)}),this.setState({animations:w})}_changeRadio(_,w){this.setState({activeIndex:w}),w!==this.state.activeIndex&&this.fadeInAnimation(),this.props.selectedBtn(_)}render(){const{boxStyle:_,style:w,textStyle:V,data:W,activeColor:te,deactiveColor:oe,boxActiveBgColor:le,boxDeactiveBgColor:Fe,box:ge,textColor:nt}=this.props;return d().createElement(o.View,{style:w},W.map((dt,It)=>d().createElement(o.TouchableOpacity,{key:It,style:[ge?Xn.productBox:Xn.productBoxLess,ge&&{backgroundColor:dt.selected?le:Fe,borderColor:dt.selected?te:oe},_,{borderWidth:dt.selected?1:0}],activeOpacity:.9,onPress:()=>this._changeRadio(dt,It)},d().createElement(o.View,{style:Xn.leftProductBox},this.props.renderIcon(dt.type)),d().createElement(o.View,{style:[Xn.centerProductBox]},d().createElement(o.Text,{style:[{color:nt},V]},dt.type===fe.BLUETOOTH&&dt.name?dt.name:dt.type)))))}}bt(In,"defaultProps",{style:{},boxStyle:{},textStyle:{},initial:-1,circleSize:18,duration:500,data:[],animationTypes:[],selectedBtn:()=>{},activeColor:"#fff",deactiveColor:"#e2e2e2",boxActiveBgColor:"#00000000",boxDeactiveBgColor:"#00000000",textColor:"#fff",box:!0});const Xn=o.StyleSheet.create({productBox:{flexDirection:"row",borderRadius:7,borderWidth:1,paddingHorizontal:10,paddingVertical:15,marginTop:10},productBoxLess:{flexDirection:"row",marginTop:10},leftProductBox:{flex:1,alignItems:"center",justifyContent:"center"},centerProductBox:{flex:6,justifyContent:"flex-start",alignItems:"center",paddingHorizontal:4,flexDirection:"row"},circle:{borderWidth:1,borderRadius:1e4,alignItems:"center",justifyContent:"center"},icon:{borderWidth:1,borderRadius:1e4,alignItems:"center",justifyContent:"center"},circleFill:{borderWidth:1,borderRadius:1e4}}),Wn=In,{AudioMode:cr}=o.NativeModules;function Ke(){const{globalState:R,dispatch:F}=Bt(),_=ge=>{switch(ge){case fe.SPEAKER:return w();case fe.BLUETOOTH:return te();case fe.HEADPHONES:return W();case fe.EARPIECE:return V();default:return w()}},w=()=>d().createElement(o.Image,{style:ot.lt_control_icon,source:k.AUDIO_MODE_SPEAKER}),V=()=>d().createElement(o.Image,{style:ot.lt_control_icon,source:k.AUDIO_MODE_EARPIECE}),W=()=>d().createElement(o.Image,{style:ot.lt_control_icon,source:k.AUDIO_MODE_HEADPHONE}),te=()=>d().createElement(o.Image,{style:ot.lt_control_icon,source:k.AUDIO_MODE_BLUETOOTH}),oe=()=>{F({type:Oe,payload:!1})},le=ge=>{oe(),cr.setAudioDevice(ge.uid||ge.type)},Fe=(0,S.useCallback)(()=>d().createElement(Wn,{data:R.audioModes,renderIcon:_,selectedBtn:le}),[R.audioModes]);return d().createElement(o.TouchableOpacity,{onPress:oe,style:ot.container},d().createElement(o.View,{style:ot.listContainer},Fe()))}const ot=o.StyleSheet.create({lt_control_icon:{width:25,height:25},lt_control_view:{width:55,height:55,margin:1,backgroundColor:yt.lightGrey,borderRadius:50,alignItems:"center",justifyContent:"center"},container:{position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:yt.blackTransparent,elevation:10,justifyContent:"flex-end",alignItems:"center"},listContainer:{backgroundColor:yt.blackLight,padding:10,borderTopEndRadius:8,borderTopStartRadius:8,width:"100%"}}),Et={REQUEST_TO_SWITCH_TO_VIDEO_CALL:"wants to switch to video call",CALL_CONVERTED_TO_VIDEO_CALL:"This call was converted into a video call do you wish to continue?",ACCEPT_REQUEST_TO_SWITCH_TO_VIDEO_CALL:"Accept",REJECT_REQUEST_TO_SWITCH_TO_VIDEO_CALL:"Reject",SWITCH_TO_VIDEO_CALL_REQUESTED:"Waiting for other user's response",LEAVE:"Leave"},Pt=o.StyleSheet.create({model:{position:"absolute",bottom:"0%",top:"0%",left:"0%",right:"0%",backgroundColor:yt.blackTransparent,elevation:10,zIndex:10,justifyContent:"center",alignItems:"center"},container:{backgroundColor:yt.palette.white,borderRadius:8,marginHorizontal:"5%"},headerText:{fontSize:18,textAlign:"center",padding:16,color:yt.palette.black},buttonContainer:{flexDirection:"row",justifyContent:"space-around"},button:{width:"50%",padding:12,justifyContent:"center",alignItems:"center",elevation:1},buttonText:{color:yt.palette.black}}),Cn=()=>{const{globalState:R,jitsiManager:F}=Bt();return R.showSwitchToVideoCallModel?R.switchToVideoRequestModelType===Ge?d().createElement(o.View,{style:Pt.model},d().createElement(o.ActivityIndicator,null),d().createElement(o.Text,{style:Pt.headerText},Et.SWITCH_TO_VIDEO_CALL_REQUESTED)):d().createElement(o.View,{style:Pt.model},d().createElement(o.View,{style:Pt.container},d().createElement(o.Text,{style:Pt.headerText},R.switchToVideoRequestModelType===ht?`${R.switchToVideoCallRequestInitiator.name} ${Et.REQUEST_TO_SWITCH_TO_VIDEO_CALL}`:Et.CALL_CONVERTED_TO_VIDEO_CALL),d().createElement(o.View,{style:Pt.buttonContainer},d().createElement(o.TouchableOpacity,{onPress:()=>{F.current.onSwitchToVideoCallResponse(!0)},touchSoundDisabled:!0,style:Pt.button},d().createElement(o.Text,{style:Pt.buttonText},Et.ACCEPT_REQUEST_TO_SWITCH_TO_VIDEO_CALL)),d().createElement(o.TouchableOpacity,{onPress:()=>{R.switchToVideoRequestModelType===ht?F.current.onSwitchToVideoCallResponse(!1):F.current.leave()},touchSoundDisabled:!0,style:Pt.button},d().createElement(o.Text,{style:Pt.buttonText},R.switchToVideoRequestModelType===ht?Et.REJECT_REQUEST_TO_SWITCH_TO_VIDEO_CALL:Et.LEAVE))))):null},ln=o.StyleSheet.create({main_video_avatar_main_view:{height:"100%",width:"100%",alignItems:"center",justifyContent:"center",flexDirection:"column"},zero_height_width:{height:"0%",width:"0%"},full_height_width:{height:"100%",width:"100%"}});var Pe=__nested_webpack_require_965809__(9941);const tt=R=>fn(Ft({},R),{audioTrack:null,videoTrack:null}),St=R=>{let F=0;for(let w=0;w<R.length;w++)F=R.charCodeAt(w)+((F<<5)-F);let _="#";for(let w=0;w<3;w++)_+=("00"+(F>>8*w&240).toString(16)).substr(-2);return _+""},Ut=()=>{const{globalState:{dominantSpeakerId:R,pinnedUserId:F},users:_}=Bt();return d().createElement(o.View,{style:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"#000"}},(()=>{var V;let w=null;return _.length==1?w=_[0]:(_==null?void 0:_.length)==2?w=_[1]:(F?w=_.find(W=>W.id===F):R&&(w=_.find(W=>W.id===R)),w||(w=_[1])),w?w.videoTrack&&!w.isVideoMuted?d().createElement(o.View,{style:{flex:1,height:"100%",width:"100%"}},d().createElement(Pe.RTCView,{key:w==null?void 0:w.id,objectFit:"contain",streamURL:w==null?void 0:w.videoTrack.getOriginalStream().toURL(),style:ln.full_height_width,zOrder:-10}),d().createElement(o.Text,{numberOfLines:1,ellipsizeMode:"tail",style:{color:yt.palette.white,fontSize:10,fontWeight:"bold",marginTop:6,marginHorizontal:5,position:"absolute",top:5,left:5}},w.name)):d().createElement(o.View,{style:ln.main_video_avatar_main_view},d().createElement(K,{backgroundColor:St(w==null?void 0:w.name),textColor:yt.palette.white,size:60,avatar:w.avatar},w.name),d().createElement(o.Text,{numberOfLines:1,ellipsizeMode:"tail",style:{color:yt.palette.white,fontSize:10,fontWeight:"bold",marginTop:6,marginHorizontal:5}},w.name),d().createElement(Pe.RTCView,{key:w.id,objectFit:"cover",streamURL:(V=w.audioTrack)==null?void 0:V.getOriginalStream().toURL(),style:ln.zero_height_width,zOrder:0})):null})())},{height:Zt,width:En}=o.Dimensions.get("window");let yn=20,on=!1,tr=!1,jn=!1,qe=!1,dr=!1,Ir=!1;o.Platform.OS!=="ios"||o.Platform.isPad||o.Platform.isTVOS||(En===375&&Zt===812?(dr=!0,on=!0,yn=44):En===414&&Zt===896?(dr=!0,tr=!0,yn=44):En===390&&Zt===844?(dr=!0,jn=!0,yn=47):En===428&&Zt===926?(dr=!0,qe=!0,yn=47):(En===430&&Zt===932||En===393&&Zt===852)&&(Ir=!0,yn=49));function an(R){return o.Platform.select({ios:yn,android:R?0:o.StatusBar.currentHeight,default:0})}function On({onButtonPress:R,videoFit:F}){return d().createElement(o.TouchableOpacity,{testID:"cc-zoom",touchSoundDisabled:!0,onPress:R,style:{paddingHorizontal:2}},d().createElement(o.Image,{style:{width:25,height:25},source:F==="cover"?k.ZOOM_OUT:k.ZOOM_IN}))}function zn({userLength:R,onButtonPress:F}){const{dispatch:_,globalState:{isParticipantsModelVisible:w}}=Bt();return d().createElement(d().Fragment,null,d().createElement(o.TouchableOpacity,{testID:"cc-user-list",disabled:dn.isPresenter===!1,touchSoundDisabled:!0,onPress:()=>{F(),_({type:Ye,payload:!w})},style:{paddingHorizontal:2}},d().createElement(o.Image,{style:{width:25,height:22},source:k.PEOPLE}),d().createElement(o.View,{style:{backgroundColor:"#1E79E7",height:15,minWidth:15,borderRadius:15,position:"absolute",right:-5,top:-10,justifyContent:"center",alignItems:"center"}},d().createElement(o.Text,{style:{color:"#fff",fontSize:10}},R))))}const hn=150,_n=100,Ar=o.Platform.OS==="android"?100:150;o.Platform.OS==="android"&&o.UIManager.setLayoutAnimationEnabledExperimental&&o.UIManager.setLayoutAnimationEnabledExperimental(!0);const en=function(){const{globalState:R,users:F,settings:_,setSettings:w,settings:{avatarMode:V,videoSettings:{videoFit:W,nameLabel:te,userListButton:oe,zoomButton:le}}}=Bt(),Fe=an(!1),ge=(0,S.useRef)(new o.Animated.ValueXY).current,nt=(0,S.useRef)({x:0,y:0}),dt=(0,S.useRef)(0),It=(0,S.useRef)(0),kt=(0,S.useRef)(R.dimension.width-60),Nt=(0,S.useRef)(R.dimension.height-85-Ar),vt=(0,S.useMemo)(()=>(kt.current=R.dimension.width-60-(R.isPortrait?0:Ar),Nt.current=R.dimension.height-85-(R.isPortrait?Ar:0),o.PanResponder.create({onStartShouldSetPanResponder:()=>!0,onMoveShouldSetPanResponder:(Xe,pn)=>!0,onPanResponderGrant:(Xe,pn)=>{ge.setOffset({x:ge.x._value,y:ge.y._value}),ge.setValue({x:0,y:0})},onPanResponderMove:(Xe,pn)=>{_.enableDraggableVideoTile!==!1&&nt.current.x<kt.current&&nt.current.y<Nt.current&&(ge.setValue({x:pn.dx,y:pn.dy}),dt.current=pn.moveX,It.current=pn.moveY)},onPanResponderRelease:(Xe,pn)=>{pn.dx===0&&pn.dy===0&&pn.vx===0&&pn.vy===0&&_.enableVideoTileClick&&Wt(Rt=>!Rt),ge.flattenOffset(),(nt.current.x>kt.current||nt.current.y>Nt.current)&&ge.setValue({x:dt.current-100,y:It.current-100})}})),[R.dimension.width]);(0,S.useEffect)(()=>{ge.addListener(Xe=>{nt.current={x:Xe.x,y:Xe.y}})},[]),(0,S.useEffect)(()=>{ge.setValue({x:kt.current-50,y:10})},[R.dimension.width]);const[cn,Wt]=(0,S.useState)(!1);return d().createElement(o.View,{style:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"#000"}},(()=>{var Gn,br;let Xe=null;if(cn||F.length==1?Xe=F[0]:(F==null?void 0:F.length)==2?Xe=F[1]:(R.pinnedUserId?Xe=F.find(bn=>bn.id===R.pinnedUserId):R.dominantSpeakerId&&(Xe=F.find(bn=>bn.id===R.dominantSpeakerId)),Xe||(Xe=F[1])),!Xe)return!1;const pn=[],Rt=()=>d().createElement(zn,{userLength:F.length,onButtonPress:()=>{o.LayoutAnimation.configureNext(o.LayoutAnimation.Presets.linear),o.LayoutAnimation.configureNext({duration:100,create:{type:"linear",property:"scaleY"},update:{type:"linear",property:"scaleY"},delete:{type:"linear",property:"opacity"}})}}),Pn=()=>d().createElement(o.View,{style:{paddingRight:5,flexDirection:"row"}},d().createElement(o.Text,{style:{color:yt.palette.white,fontSize:18,fontWeight:"bold"}},Xe.name),Xe.isAudioMuted?d().createElement(o.View,{style:{width:10,height:10,marginLeft:5,borderRadius:20,alignItems:"center",justifyContent:"center"}},d().createElement(o.Image,{style:{width:15,height:15},source:k.AUDIO_MUTE})):null,Xe.isVideoMuted&&!_.isAudioOnly?d().createElement(o.View,{style:{width:10,height:10,marginLeft:5,borderRadius:20,alignItems:"center",justifyContent:"center"}},d().createElement(o.Image,{style:{width:15,height:15},source:k.VIDEO_MUTE})):null),gr=()=>d().createElement(On,{onButtonPress:()=>{o.LayoutAnimation.configureNext(o.LayoutAnimation.Presets.linear),o.LayoutAnimation.configureNext({duration:200,create:{type:"linear",property:"scaleY"},update:{type:"linear",property:"scaleY"},delete:{type:"linear",property:"opacity"}}),w({type:v,payload:W==="cover"?"contain":"cover"})},videoFit:W}),vr=()=>d().createElement(d().Fragment,null,d().createElement(o.View,{style:[kn.videoItemContainer,{top:0}]},d().createElement(o.View,{style:{flex:1}},d().createElement(o.View,{style:[kn.videoInnerContainer,{top:0,left:0}]},(te==null?void 0:te.visibility)&&te.position==="top-left"&&Pn(),(oe==null?void 0:oe.visibility)&&oe.position==="top-left"&&F.length>2&&Rt(),(le==null?void 0:le.visibility)&&le.position==="top-left"&&gr()),d().createElement(o.View,{style:[kn.videoInnerContainer,{top:0,right:0}]},(te==null?void 0:te.visibility)&&te.position==="top-right"&&Pn(),(oe==null?void 0:oe.visibility)&&oe.position==="top-right"&&F.length>2&&Rt(),(le==null?void 0:le.visibility)&&le.position==="top-right"&&gr()))),d().createElement(o.View,{style:[kn.videoItemContainer,{bottom:0}]},d().createElement(o.View,{style:{flex:1}},d().createElement(o.View,{style:[kn.videoInnerContainer,{bottom:0,left:0}]},(te==null?void 0:te.visibility)&&te.position==="bottom-left"&&Pn(),(oe==null?void 0:oe.visibility)&&oe.position==="bottom-left"&&F.length>2&&Rt(),(le==null?void 0:le.visibility)&&le.position==="bottom-left"&&gr()),d().createElement(o.View,{style:[kn.videoInnerContainer,{bottom:0,right:0}]},(te==null?void 0:te.visibility)&&te.position==="bottom-right"&&Pn(),(oe==null?void 0:oe.visibility)&&oe.position==="bottom-right"&&F.length>2&&Rt(),(le==null?void 0:le.visibility)&&le.position==="bottom-right"&&gr()))));return F.length>2&&F.map((bn,rn)=>{var lr;rn!=0&&bn.id!=Xe.id&&!bn.isAudioMuted&&bn.audioTrack&&pn.push(d().createElement(Pe.RTCView,{key:bn.id,objectFit:"cover",streamURL:(lr=bn.audioTrack)==null?void 0:lr.getOriginalStream().toURL(),style:kn.zero_height_width,zOrder:-10}))}),Xe.videoTrack&&!Xe.isVideoMuted?d().createElement(o.View,{style:{flex:1,height:"100%",width:"100%"}},pn!=null&&pn.length?pn.map(bn=>d().createElement(d().Fragment,null,bn)):null,d().createElement(Pe.RTCView,{key:Xe==null?void 0:Xe.id,objectFit:W==="cover"?"cover":"contain",streamURL:Xe==null?void 0:Xe.videoTrack.getOriginalStream().toURL(),style:kn.full_height_width,zOrder:-10,mirror:F[0].id===Xe.id&&((Gn=Xe==null?void 0:Xe.videoTrack)==null?void 0:Gn._facingMode)!=="environment"}),vr()):d().createElement(o.View,{style:kn.main_video_avatar_main_view},pn!=null&&pn.length?pn.map(bn=>d().createElement(d().Fragment,null,bn)):null,d().createElement(K,{backgroundColor:St(Xe==null?void 0:Xe.name),textColor:"#FFF",size:100,avatar:Xe.avatar},Xe.name),d().createElement(Pe.RTCView,{key:Xe.id,objectFit:W==="cover"?"cover":"contain",streamURL:(br=Xe.audioTrack)==null?void 0:br.getOriginalStream().toURL(),style:kn.zero_height_width,zOrder:0}),vr())})(),d().createElement(o.Animated.View,Ft({style:{marginTop:Fe,position:"absolute",top:"0%",left:"0%",height:hn,width:_n,transform:[{translateX:ge.x.interpolate({inputRange:[10,kt.current-50],outputRange:[10,kt.current-50],extrapolate:"clamp"})},{translateY:ge.y.interpolate({inputRange:[10,Nt.current-hn],outputRange:[10,Nt.current-hn],extrapolate:"clamp"})}]}},vt.panHandlers),(()=>{var pn,Rt;let Xe=null;return cn?(F==null?void 0:F.length)==2?Xe=F[1]:(R.pinnedUserId?Xe=F.find(Pn=>Pn.id===R.pinnedUserId):R.dominantSpeakerId&&(Xe=F.find(Pn=>Pn.id===R.dominantSpeakerId)),Xe||(Xe=F[1])):Xe=F[0],Xe&&F.length!=1?Xe.videoTrack&&!Xe.isVideoMuted?d().createElement(o.View,{style:{height:"100%",width:"100%",backgroundColor:"#2E2F30",borderRadius:8,overflow:"hidden"}},d().createElement(o.View,{style:{justifyContent:"flex-start",alignItems:"center",position:"absolute",left:5,bottom:5,zIndex:5,elevation:5}},Xe.isAudioMuted?d().createElement(o.View,{style:{width:10,height:10,margin:2,borderRadius:20,alignItems:"center",justifyContent:"center"}},d().createElement(o.Image,{style:{width:15,height:15},source:k.AUDIO_MUTE})):null,Xe.isVideoMuted&&!_.isAudioOnly?d().createElement(o.View,{style:{width:10,height:10,margin:2,borderRadius:20,alignItems:"center",justifyContent:"center"}},d().createElement(o.Image,{style:{width:15,height:15},source:k.VIDEO_MUTE})):null),d().createElement(Pe.RTCView,{objectFit:"cover",streamURL:Xe==null?void 0:Xe.videoTrack.getOriginalStream().toURL(),style:kn.full_height_width,zOrder:1,mirror:F[0].id===Xe.id&&((pn=Xe==null?void 0:Xe.videoTrack)==null?void 0:pn._facingMode)!=="environment"})):d().createElement(o.View,{style:{backgroundColor:"#2E2F30",height:"100%",width:"100%",borderRadius:8,justifyContent:"center",alignItems:"center"}},d().createElement(o.View,{style:{justifyContent:"flex-start",alignItems:"center",position:"absolute",right:5,bottom:5,zIndex:5,elevation:5}},Xe.isAudioMuted?d().createElement(o.View,{style:{width:10,height:10,margin:2,borderRadius:20,alignItems:"center",justifyContent:"center"}},d().createElement(o.Image,{style:{width:15,height:15},source:k.AUDIO_MUTE})):null),d().createElement(K,{backgroundColor:"#4d4c4f",textColor:"#FFF",size:30,avatar:Xe.avatar},Xe.name),d().createElement(o.Text,{numberOfLines:1,ellipsizeMode:"tail",style:[{fontSize:14,color:"#fff",position:"absolute"},V=="fullscreen"?{top:5,left:5}:{bottom:0,left:0}]},Xe.name),d().createElement(Pe.RTCView,{key:Xe.id,objectFit:"cover",streamURL:(Rt=Xe.audioTrack)==null?void 0:Rt.getOriginalStream().toURL(),style:kn.zero_height_width,zOrder:-10})):null})()))},kn=o.StyleSheet.create({main_video_avatar_main_view:{height:"100%",width:"100%",alignItems:"center",justifyContent:"center",flexDirection:"column"},zero_height_width:{height:"0%",width:"0%"},full_height_width:{height:"100%",width:"100%"},videoItemContainer:{position:"absolute",paddingVertical:5,paddingHorizontal:5,width:"100%",height:55},videoInnerContainer:{position:"absolute",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}}),Bn=o.StyleSheet.create({lt_control_container:{display:"flex",width:"100%",flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",backgroundColor:"rgba(46, 47, 48, 0.5)"},container_background:{display:"flex",width:"95%",height:"100%",flexDirection:"row",justifyContent:"center",alignItems:"center",flexWrap:"wrap",zIndex:2,opacity:.5,borderRadius:20,margin:10,backgroundColor:"#2e2f30"},container_people:{display:"flex",width:"80%",height:"60%",marginTop:110,marginRight:10,flexDirection:"column",flexWrap:"wrap",position:"absolute",zIndex:2,right:0,borderRadius:10,backgroundColor:"#FFF"},container_thum_list:{display:"flex",width:"28%",height:"75%",flexDirection:"column",flexWrap:"wrap",position:"absolute",zIndex:2,right:0},item:{padding:15,fontSize:18,height:70,flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},item_pinned:{padding:15,fontSize:18,height:70,flexDirection:"row",justifyContent:"flex-start",alignItems:"center",opacity:.5,backgroundColor:"#f66301"},container:o.Platform.OS==="ios"?{zIndex:2}:{},lt_control_icon:{width:25,height:25},lt_button:{width:55,height:55,margin:5,backgroundColor:yt.lightGrey,borderRadius:50,alignItems:"center",justifyContent:"center"},lt_small_button:{width:10,height:10,margin:2,borderRadius:20,alignItems:"center",justifyContent:"center"},lt_small_button_red:{width:35,height:35,margin:5,backgroundColor:"#EB4E3D",borderRadius:20,alignItems:"center",justifyContent:"center"},lt_small_button_blue:{width:35,height:35,margin:5,backgroundColor:"#84aeff",borderRadius:20,alignItems:"center",justifyContent:"center"},button_container:{alignItems:"center",justifyContent:"center",margin:2,opacity:.7},color_white:{color:yt.palette.white},full_height_width:{height:"100%",width:"100%"},mainVideoAvatarMainView:{height:"100%",width:"100%",alignItems:"center",justifyContent:"center",flexDirection:"column"},mainVideoName:{fontSize:18,color:yt.palette.white,padding:20},zero_height_width:{height:"0%",width:"0%"},main_video_video_track_view:{flex:1,height:"100%",width:"100%",justifyContent:"center",alignItems:"center",overflow:"hidden",zIndex:2,elevation:1},main_video_track_name:{color:yt.palette.white,fontSize:18,fontWeight:"bold",position:"absolute",bottom:5,left:5,elevation:10},user_item_pinned:{padding:15,fontSize:18,height:70,marginStart:10,marginRight:10,marginBottom:10,borderRadius:10,flexDirection:"row",justifyContent:"flex-start",alignItems:"center",backgroundColor:"#e5e5e5"},user_item_user_name:{fontSize:18,color:yt.palette.black,marginStart:10},user_item_icon_container:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",position:"absolute",right:10},user_item_icons:{width:15,height:15},user_list_network_container:{position:"absolute",bottom:6,right:10},user_list_network_icon:{width:15,height:15},user_list_main_touchable:{zIndex:10,elevation:5},user_list_user_name:{fontSize:18,color:yt.palette.white,padding:5,position:"absolute",top:0,left:0,elevation:5,zIndex:5},user_list_icon_container:{justifyContent:"flex-start",alignItems:"center",position:"absolute",left:5,bottom:5,zIndex:5,elevation:5},user_list_avatar_name:{fontSize:18,color:yt.palette.white,padding:5},mainContainer:{height:"100%",width:"100%",backgroundColor:yt.blackLightXXX},video_container:{flex:1},call_container_portrait:{flex:1},call_container_landscape:{flex:1,height:"100%",flexDirection:"row"},top_bar:{height:25,elevation:1,zIndex:2,backgroundColor:yt.blackLightXXX},main_video_container:{flexDirection:"row",flex:1},side_bar:{width:"5%",elevation:1,zIndex:2,backgroundColor:yt.blackLightXXX},main_video:{position:"relative",backgroundColor:yt.blackLight,flex:1,marginVertical:5,borderRadius:8},reconnetIndicator:{position:"relative"},recordingContainer:{position:"absolute",flexDirection:"row",alignItems:"center",zIndex:10,elevation:10,top:26,left:"6%"},recordingIcon:{height:30,width:30},recordingText:{color:yt.palette.white,fontSize:12},videoItemContainer:{position:"absolute",bottom:0,paddingVertical:10,paddingHorizontal:15,width:"100%",height:"100%",flex:1},videoInnerContainer:{position:"absolute",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}}),Sn=o.StyleSheet.create({user_list_container:{position:"absolute",top:0,bottom:0,width:"100%",backgroundColor:yt.blackLightXXXT,justifyContent:"center",elevation:10,zIndex:10,paddingTop:25},flat_list_style:{width:"100%"},user_list_close_container:{padding:10,borderRadius:20,backgroundColor:yt.whiteAlmost,alignItems:"center",width:40,alignSelf:"center"},close_icon:{width:20,height:20},main_video_container:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},pin_icon_container:{elevation:5,zIndex:5},pin_icon:{width:25,height:25},main_video_avatar_main_view:{height:"100%",width:"100%",alignItems:"center",justifyContent:"center",flexDirection:"column"},main_video_name:{fontSize:18,color:yt.palette.white,padding:20},zero_height_width:{height:"0%",width:"0%"},main_video_video_track_view:{flex:1,height:"100%",width:"100%",overflow:"hidden",zIndex:2,elevation:1},main_video_track_name:{color:yt.palette.white,fontSize:18,fontWeight:"bold",position:"absolute",bottom:5,left:5,elevation:10,width:"80%"},full_height_width:{height:"100%",width:"100%"},user_item_pinned:{padding:15,fontSize:18,height:70,marginStart:10,marginRight:10,marginBottom:10,borderRadius:10,flexDirection:"row",justifyContent:"flex-start",alignItems:"center",backgroundColor:yt.whiteX,zIndex:1,elevation:1},user_item_user_name:{fontSize:18,color:yt.palette.black,marginStart:10,width:"60%"},user_item_icon_container:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",position:"absolute",right:10},user_item_icons:{width:20,height:20},user_list_network_container:{position:"absolute",bottom:6,right:10},recorderBadge:{position:"absolute",height:20,width:20,borderRadius:20,backgroundColor:yt.redLightX,zIndex:1,alignItems:"center",justifyContent:"center",left:25,top:-10},recorderBadgeText:{fontSize:12,color:yt.palette.white},lt_small_button:{},lt_small_button_red:{},lt_small_button_blue:{},user_list_network_icon:{width:15,height:15},user_stats_container:{paddingRight:5,width:200},user_stats_menu:{backgroundColor:"#222",alignSelf:"flex-end",marginBottom:5,borderRadius:5,width:90,paddingHorizontal:10,paddingVertical:5,position:"absolute"},user_stats_menu_list:{flexDirection:"row",alignItems:"center"},user_stats_menu_icon:{width:18,height:18,marginRight:5},user_stats_menu_text:{fontSize:16,color:"#fff",padding:5},user_details_container:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderRadius:5,paddingHorizontal:5},user_details_container_two:{flexDirection:"row",alignItems:"center"},user_detail_icons:{width:20,height:20},videoItemContainer:{position:"absolute",paddingVertical:5,paddingHorizontal:5,width:"100%",height:55,zIndex:9,elevation:1},videoInnerContainer:{position:"absolute",flexDirection:"row",alignItems:"center",justifyContent:"space-between"}}),Nr={lastZoomLevel:1,offsetX:0,offsetY:0,lastX:0,lastY:0,lastMovePinch:!1,originalWidth:null,originalHeight:null};class Hn extends S.Component{constructor(_){var w;super(_);bt(this,"contextState",{distanceLeft:0,distanceRight:0,distanceTop:0,distanceBottom:0});bt(this,"longPressTimeout",null);bt(this,"pinchZoomPosition",null);bt(this,"_getBoxDimensions",_=>{const{height:w,width:V}=_.nativeEvent.layout;this.setState({originalWidth:V,originalHeight:w})});bt(this,"_handleStartShouldSetPanResponder",(_,w)=>(this._doubleTapCheck(_,w),this.props.onStartShouldSetPanResponder&&this.props.onStartShouldSetPanResponder(_,w,this._getZoomableViewEventObject(),!1),this.props.captureEvent));bt(this,"_handleMoveShouldSetPanResponder",(_,w)=>{let V=this.props.zoomEnabled&&(Math.abs(w.dx)>2||Math.abs(w.dy)>2||w.numberActiveTouches===2);return this.props.onMoveShouldSetPanResponder&&(V=this.props.onMoveShouldSetPanResponder(_,w,this._getZoomableViewEventObject(),V)),V});bt(this,"_handlePanResponderGrant",(_,w)=>{if(this.isDistanceSet=!1,w.numberActiveTouches===2){const V=Math.abs(_.nativeEvent.touches[0].pageX-_.nativeEvent.touches[1].pageX),W=Math.abs(_.nativeEvent.touches[0].pageY-_.nativeEvent.touches[1].pageY),te=Math.sqrt(V*V+W*W);this.distance=te,this.isDistanceSet=!0}this.props.onLongPress&&(this.longPressTimeout=setTimeout(()=>{this.props.onLongPress&&(this.props.onLongPress(_,w,this._getZoomableViewEventObject()),this.longPressTimeout=null)},this.props.longPressDuration)),this.props.onPanResponderGrant&&this.props.onPanResponderGrant(_,w,this._getZoomableViewEventObject())});bt(this,"_handlePanResponderEnd",(_,w)=>{this.setState({lastX:this.state.offsetX,lastY:this.state.offsetY,lastZoomLevel:this.state.zoomLevel}),this.longPressTimeout&&(clearTimeout(this.longPressTimeout),this.longPressTimeout=null),this.props.onPanResponderEnd&&this.props.onPanResponderEnd(_,w,this._getZoomableViewEventObject()),this.gestureType==="pinch"?(this.pinchZoomPosition=null,this.props.onZoomEnd&&this.props.onZoomEnd(_,w,this._getZoomableViewEventObject())):this.gestureType==="shift"&&this.props.onShiftingEnd&&this.props.onShiftingEnd(_,w,this._getZoomableViewEventObject()),this.gestureType=null});bt(this,"_handlePanResponderMove",(_,w)=>{if(this.props.onPanResponderMove&&this.props.onPanResponderMove(_,w,this._getZoomableViewEventObject()))return!1;w.numberActiveTouches===2?(this.longPressTimeout&&(clearTimeout(this.longPressTimeout),this.longPressTimeout=null),this.isDistanceSet||this._handlePanResponderGrant(_,w),this.gestureType="pinch",this._handlePinching(_,w)):w.numberActiveTouches===1&&(this.longPressTimeout&&(Math.abs(w.dx)>5||Math.abs(w.dy)>5)&&(clearTimeout(this.longPressTimeout),this.longPressTimeout=null),this.gestureType!=="pinch"&&(this.gestureType="shift"),this._handleMovement(_,w))});bt(this,"_handlePinching",(_,w)=>{const{maxZoom:V,minZoom:W,zoomCenteringLevelDistance:te,pinchToZoomInSensitivity:oe,pinchToZoomOutSensitivity:le}=this.props,Fe=Math.abs(_.nativeEvent.touches[0].pageX-_.nativeEvent.touches[1].pageX),ge=Math.abs(_.nativeEvent.touches[0].pageY-_.nativeEvent.touches[1].pageY),nt=Math.sqrt(Fe*Fe+ge*ge);if(this.props.onZoomBefore&&this.props.onZoomBefore(_,w,this._getZoomableViewEventObject()))return!1;const dt=nt/this.distance,It=dt<1?le:oe;let kt=(dt*this.state.lastZoomLevel+this.state.lastZoomLevel*It)/(It+1);if(V!==null&&kt>V&&(kt=V),kt<W&&(kt=W),this.pinchZoomPosition===null){const Xe=Math.min(_.nativeEvent.touches[0].pageX,_.nativeEvent.touches[1].pageX)+Fe/2,pn=Math.min(_.nativeEvent.touches[0].pageY,_.nativeEvent.touches[1].pageY)+ge/2;this.pinchZoomPosition=this._getOffsetAdjustedPosition(Xe,pn)}const Nt=Math.abs(kt-this.state.lastZoomLevel)/te,vt=this.state.lastX+Nt*this.pinchZoomPosition.x,cn=this.state.lastY+Nt*this.pinchZoomPosition.y,Wt=this._bindOffsetValuesToBorders({zoomLevel:kt,lastMovePinch:!0,offsetX:vt,offsetY:cn},null);this.setState(Wt,()=>{this.props.onZoomAfter&&this.props.onZoomAfter(_,w,this._getZoomableViewEventObject())})});bt(this,"_handleMovement",(_,w)=>{const{movementSensibility:V}=this.props;if(this.pinchZoomPosition)return;const W=this.state.lastX+w.dx/this.state.zoomLevel/V,te=this.state.lastY+w.dy/this.state.zoomLevel/V;this._setNewOffsetPosition(W,te)});bt(this,"_setNewOffsetPosition",(_,w,V=!0,W=!1,te=null)=>{const{onShiftingBefore:oe,onShiftingAfter:le}=this.props;if(oe&&oe(null,null,this._getZoomableViewEventObject()))return!1;const Fe=this._bindOffsetValuesToBorders({lastMovePinch:!1,zoomLevel:this.state.zoomLevel,offsetX:_,offsetY:w},V);W&&(Fe.lastX=Fe.offsetX,Fe.lastY=Fe.offsetY),this.setState(Fe,()=>{if(te&&te(),le&&le(null,null,this._getZoomableViewEventObject()))return!1})});bt(this,"_doubleTapCheck",(_,w)=>{const V=new Date().getTime();this.lastPressHolder&&V-this.lastPressHolder<this.props.doubleTapDelay?(delete this.lastPressHolder,this._handleDoubleTap(_,w)):(this.props.onPress&&this.props.onPress(),this.lastPressHolder=V)});this.gestureHandlers=o.PanResponder.create({onStartShouldSetPanResponder:this._handleStartShouldSetPanResponder,onMoveShouldSetPanResponder:this._handleMoveShouldSetPanResponder,onPanResponderGrant:this._handlePanResponderGrant,onPanResponderMove:this._handlePanResponderMove,onPanResponderRelease:this._handlePanResponderEnd,onPanResponderTerminate:_.onPanResponderTerminate,onPanResponderTerminationRequest:(w=_.onPanResponderTerminationRequest)!=null?w:V=>!1,onShouldBlockNativeResponder:V=>!1}),this.state=fn(Ft({},Nr),{zoomLevel:_.initialZoom,lastZoomLevel:_.initialZoom||Nr.lastZoomLevel,offsetX:_.initialOffsetX,offsetY:_.initialOffsetY}),this.distance=150,this.isDistanceSet=!0,this.gestureType=null,this.contextState={distanceLeft:0,distanceRight:0,distanceTop:0,distanceBottom:0}}componentDidUpdate(_){const{zoomEnabled:w,initialZoom:V}=this.props;_.zoomEnabled&&!w&&this.setState(Ft({zoomLevel:V},Nr))}_getZoomableViewEventObject(_={}){return Ft(Ft(Ft({},this.state),this.contextState),_)}_getBoundOffsetValue(_,w,V,W,te){const oe=V*(1-V/W)*(.5+.5/te),le=-1*(V+oe-V),Fe=w-oe,ge=-1*(w+oe);return this._setContextStateDistances(_,Fe,ge),V>W?V/2-W/2/te:Fe>0?oe:ge>0?le:w}_setContextStateDistances(_,w,V){if(_==="x")return this.contextState.distanceLeft=w,void(this.contextState.distanceRight=V);this.contextState.distanceTop=w,this.contextState.distanceBottom=V}_bindOffsetValuesToBorders(_,w=null){if(w===!1||w===null&&!this.props.bindToBorders)return _;const{originalWidth:V,originalHeight:W}=this.state,te=V*_.zoomLevel,oe=W*_.zoomLevel,le=this._getBoundOffsetValue("x",_.offsetX,V,te,_.zoomLevel);_.offsetX=le;const Fe=this._getBoundOffsetValue("y",_.offsetY,W,oe,_.zoomLevel);return _.offsetY=Fe,_}_handleDoubleTap(_,w){const{onDoubleTapBefore:V,onDoubleTapAfter:W,doubleTapZoomToCenter:te}=this.props;if(w.numberActiveTouches>1||!this.props.zoomEnabled)return;V&&V(_,w,this._getZoomableViewEventObject());const oe=this._getNextZoomStep(),le={x:_.nativeEvent.locationX,y:_.nativeEvent.locationY};te&&(le.x=0,le.y=0),this._zoomToLocation(le.x,le.y,oe,!0,()=>{W&&W(_,w,this._getZoomableViewEventObject({zoomLevel:oe}))})}_getNextZoomStep(){const{zoomStep:_,maxZoom:w,initialZoom:V}=this.props,{zoomLevel:W}=this.state;if(W===w)return V;const te=W+W*_;return w!==null&&te>w?w:te}_getOffsetAdjustedPosition(_,w){const{originalWidth:V,originalHeight:W}=this.state;return _===0&&w===0?{x:0,y:0}:{x:V/2-_,y:W/2-w}}_zoomToLocation(_,w,V,W=!0,te=null){const oe=this._getOffsetAdjustedPosition(_,w);this.props.onZoomBefore&&this.props.onZoomBefore(null,null,this._getZoomableViewEventObject());const le=this._bindOffsetValuesToBorders({zoomLevel:V,offsetX:oe.x,offsetY:oe.y,lastZoomLevel:V,lastX:oe.x,lastY:oe.y},W);this.setState(le,()=>{te&&te(),this.props.onZoomAfter&&this.props.onZoomAfter(null,null,this._getZoomableViewEventObject())})}zoomTo(_,w=!0){return new Promise(V=>{_>=this.props.maxZoom||_<=this.props.minZoom?V(!1):this._zoomToLocation(0,0,_,w,()=>{V(!0)})})}zoomBy(_=null,w=!0){return _||(_=this.props.zoomStep),this.zoomTo(this.state.zoomLevel+_,w)}moveTo(_,w,V=!0){const{zoomLevel:W,originalWidth:te,originalHeight:oe}=this.state,le=(_-te/2)/W,Fe=(w-oe/2)/W;return new Promise(ge=>{this._setNewOffsetPosition(-le,-Fe,V,!0,()=>{ge()})})}moveBy(_,w,V=!0){const{zoomLevel:W,lastX:te,lastY:oe}=this.state,le=te-_/W,Fe=oe-w/W;return new Promise(ge=>{this._setNewOffsetPosition(le,Fe,V,!0,()=>{ge()})})}render(){return d().createElement(o.View,{style:mr.container,onLayout:this._getBoxDimensions},d().createElement(o.View,fn(Ft({},this.gestureHandlers.panHandlers),{style:{flex:1,position:"absolute",height:this.state.originalHeight,width:this.state.originalWidth,zIndex:999}})),d().createElement(o.View,{style:[mr.wrapper,this.props.style,{transform:[{scale:this.state.zoomLevel},{scale:this.state.zoomLevel},{translateX:this.state.offsetX},{translateY:this.state.offsetY}]}]},this.props.children))}}bt(Hn,"defaultProps",{zoomEnabled:!0,initialZoom:1,initialOffsetX:0,initialOffsetY:0,maxZoom:1.5,minZoom:1,pinchToZoomInSensitivity:3,pinchToZoomOutSensitivity:1,zoomCenteringLevelDistance:.5,movementSensibility:1.9,doubleTapDelay:300,bindToBorders:!0,zoomStep:.5,onLongPress:null,longPressDuration:700,captureEvent:!1});const mr=o.StyleSheet.create({wrapper:{flex:1,width:"100%",justifyContent:"center"},container:{flex:1,justifyContent:"center",alignItems:"center",position:"relative"}}),Qn=Hn;function ar({onButtonPress:R,fullScreen:F}){return d().createElement(o.TouchableOpacity,{testID:"cc-full-screen",touchSoundDisabled:!0,onPress:R,style:{paddingHorizontal:2}},d().createElement(o.Image,{style:{width:30,height:30},source:F?k.FULLSCREEN_DISABLE:k.FULLSCREEN_ENABLE}))}o.Platform.OS==="android"&&o.UIManager.setLayoutAnimationEnabledExperimental&&o.UIManager.setLayoutAnimationEnabledExperimental(!0);const oi=({isMenuVisible:R,mainVideoSpeaker:F,setIsMenuVisible:_,pinUser:w,unPinUser:V,pinnedUserId:W,jitsiManager:te,localUserId:oe,isAudioOnly:le,networkColor:Fe,nameLabel:ge})=>{let nt={top:-45,right:5};if(ge)switch(ge.position){case"top-right":case"top-left":nt={top:45,right:5};break;case"bottom-right":case"bottom-left":nt={bottom:40,right:5}}return d().createElement(o.View,{style:[Sn.user_stats_container]},R&&d().createElement(o.View,{style:[Sn.user_stats_menu,nt]},d().createElement(o.TouchableOpacity,{onPress:()=>{F.id===W?V():w(F.id),_(!1)},style:Sn.user_stats_menu_list},d().createElement(o.Image,{style:Sn.user_stats_menu_icon,source:k.PIN}),d().createElement(o.Text,{style:Sn.user_stats_menu_text},F.id===W?"Unpin":"Pin")),F.isAudioMuted||F.id===oe?null:d().createElement(o.TouchableOpacity,{onPress:()=>{te.current.muteParticipant(F),_(!1)},style:Sn.user_stats_menu_list},d().createElement(o.Image,{style:Sn.user_detail_icons,source:k.AUDIO_MUTE}),d().createElement(o.Text,{style:Sn.user_stats_menu_text},"Mute"))),d().createElement(o.View,{style:[Sn.user_details_container,{backgroundColor:ge.color}]},d().createElement(o.View,{style:Sn.user_details_container_two},d().createElement(o.Image,{style:[Sn.user_detail_icons,{tintColor:F.isAudioMuted?yt.red:yt.green}],source:F.isAudioMuted?k.AUDIO_MUTE:k.AUDIO_UNMUTE}),le?null:d().createElement(o.Image,{style:[Sn.user_detail_icons,{tintColor:F.isVideoMuted?yt.red:yt.green}],source:F.isVideoMuted?k.VIDEO_MUTE:k.VIDEO_UNMUTE}),d().createElement(o.Text,{numberOfLines:1,ellipsizeMode:"tail",style:fn(Ft({},Sn.main_video_name),{padding:10,maxWidth:100})},F.name)),d().createElement(o.View,{style:Sn.user_details_container_two},Fe?d().createElement(o.Image,{resizeMode:"contain",source:Fe,style:Sn.user_detail_icons}):null,d().createElement(o.TouchableOpacity,{onPress:()=>{_(dt=>!dt)}},d().createElement(o.Image,{resizeMode:"contain",source:k.MENU,style:Sn.user_detail_icons})))))},di=d().memo(({cameraFlipped:R,videoFit:F,isMenuVisible:_,setIsMenuVisible:w,pinUser:V,unPinUser:W,pinnedUserId:te,jitsiManager:oe,users:le,isAudioOnly:Fe,networkColor:ge,dominantSpeakerId:nt,mainVideoSpeaker:dt})=>{var It,kt,Nt;if(dt){const vt=dt.videoTrack,cn=dt.stats;cn&&(cn.connectionQuality<25?k.NETWORK1:cn.connectionQuality<50?k.NETWORK2:cn.connectionQuality<75?k.NETWORK3:k.NETWORK4);try{dt.id}catch(Wt){}if(dt&&(dt.isVideoMuted||!dt.videoTrack))return d().createElement(o.TouchableOpacity,{activeOpacity:1,onPress:()=>{_&&w(!1)},style:[Sn.main_video_video_track_view,{justifyContent:"center",alignItems:"center"}]},d().createElement(K,{backgroundColor:St(dt==null?void 0:dt.name),textColor:"#FFF",size:160,avatar:dt.avatar},dt.name),d().createElement(Pe.RTCView,{key:dt.id,objectFit:"cover",streamURL:(It=dt.audioTrack)==null?void 0:It.getOriginalStream().toURL(),style:Sn.zero_height_width,zOrder:-10}));if(vt)return(kt=oe==null?void 0:oe.current)==null||kt.setConstraints(dt.id),d().createElement(o.View,{style:Sn.main_video_video_track_view},d().createElement(Qn,{onPress:()=>{_&&w(!1)}},(Nt=vt==null?void 0:vt.getOriginalStream())!=null&&Nt.toURL()?d().createElement(Pe.RTCView,{key:vt.getOriginalStream().toURL(),objectFit:F==="cover"?"cover":"contain",streamURL:vt.getOriginalStream().toURL(),style:Sn.full_height_width,zOrder:-10,mirror:le[0].id===dt.id&&(vt==null?void 0:vt._facingMode)!=="environment"}):null))}return null},(R,F)=>R.isMenuVisible===F.isMenuVisible&&R.setIsMenuVisible===F.setIsMenuVisible&&R.pinnedUserId===F.pinnedUserId&&R.isAudioOnly===F.isAudioOnly&&R.dominantSpeakerId===F.dominantSpeakerId&&R.mainVideoSpeaker.isAudioMuted===F.mainVideoSpeaker.isAudioMuted&&R.mainVideoSpeaker.isVideoMuted===F.mainVideoSpeaker.isVideoMuted&&R.mainVideoSpeaker.isVideoMuted===F.mainVideoSpeaker.isVideoMuted&&R.videoFit===F.videoFit&&R.cameraFlipped===F.cameraFlipped),Jr=({setFullScreen:R=()=>null})=>{const{globalState:{dominantSpeakerId:F,pinnedUserId:_,cameraFlipped:w},users:V,dispatch:W,jitsiManager:te,settings:{isAudioOnly:oe,videoSettings:{videoFit:le,nameLabel:Fe,fullScreenButton:ge,userListButton:nt,zoomButton:dt}},setSettings:It}=Bt(),[kt,Nt]=(0,S.useState)(!1);let vt;const cn=(0,S.useCallback)(()=>{W({type:O,payload:""})},[]),Wt=(0,S.useCallback)(rn=>{W({type:O,payload:rn})},[]),Xe=V[0];let pn;const Rt=V.find(rn=>rn.id===F)||Xe,Pn=V.find(rn=>rn.id===_),gr=V.reduce((rn,lr)=>rn+(lr.isPresenter!==!1?1:0),0),vr=()=>d().createElement(zn,{userLength:V.length,onButtonPress:()=>{o.LayoutAnimation.configureNext(o.LayoutAnimation.Presets.linear),o.LayoutAnimation.configureNext({duration:100,create:{type:"linear",property:"scaleY"},update:{type:"linear",property:"scaleY"},delete:{type:"linear",property:"opacity"}})}}),Gn=()=>d().createElement(ar,{fullScreen:!1,onButtonPress:()=>{o.LayoutAnimation.configureNext(o.LayoutAnimation.Presets.linear),o.LayoutAnimation.configureNext({duration:100,create:{type:"linear",property:"scaleY"},update:{type:"linear",property:"scaleY"},delete:{type:"linear",property:"opacity"}}),R(rn=>!rn)}}),br=()=>d().createElement(On,{onButtonPress:()=>{o.LayoutAnimation.configureNext(o.LayoutAnimation.Presets.linear),o.LayoutAnimation.configureNext({duration:200,create:{type:"linear",property:"scaleY"},update:{type:"linear",property:"scaleY"},delete:{type:"linear",property:"opacity"}}),It({type:v,payload:le==="cover"?"contain":"cover"})},videoFit:le}),bn=()=>{var rn;return d().createElement(oi,{isMenuVisible:kt,mainVideoSpeaker:pn,setIsMenuVisible:Nt,pinUser:Wt,unPinUser:cn,pinnedUserId:_,jitsiManager:te,localUserId:(rn=V[0])==null?void 0:rn.id,isAudioOnly:oe,networkColor:vt,nameLabel:Fe})};if(pn=Rt,Pn&&(pn=Pn),dn.isPresenter===!1&&pn.isPresenter===!1){for(let rn=0;rn<V.length;rn++)if(V[rn].isPresenter!==!1){pn=V[rn];break}}return gr<1?d().createElement(o.View,{style:{flex:1,justifyContent:"center",alignItems:"center"}},d().createElement(o.ActivityIndicator,{size:"small",color:"#fff"}),d().createElement(o.Text,{style:{marginLeft:10,color:"#fff"}},"Waiting for presenter...")):d().createElement(d().Fragment,null,d().createElement(o.View,{style:Sn.main_video_container},d().createElement(di,{cameraFlipped:w,videoFit:le,isMenuVisible:kt,setIsMenuVisible:Nt,pinUser:Wt,unPinUser:cn,pinnedUserId:_,jitsiManager:te,users:V,isAudioOnly:oe,networkColor:vt,dominantSpeakerId:F,mainVideoSpeaker:Ft({},pn)}),d().createElement(o.View,{style:[Sn.videoItemContainer,{top:0}]},d().createElement(o.View,{style:{flex:1}},d().createElement(o.View,{style:[Sn.videoInnerContainer,{top:0,left:0}]},(Fe==null?void 0:Fe.visibility)&&Fe.position==="top-left"&&bn(),(nt==null?void 0:nt.visibility)&&nt.position==="top-left"&&vr(),(dt==null?void 0:dt.visibility)&&dt.position==="top-left"&&br(),(ge==null?void 0:ge.visibility)&&ge.position==="top-left"&&Gn()),d().createElement(o.View,{style:[Sn.videoInnerContainer,{top:0,right:0}]},(Fe==null?void 0:Fe.visibility)&&Fe.position==="top-right"&&bn(),(nt==null?void 0:nt.visibility)&&nt.position==="top-right"&&vr(),(dt==null?void 0:dt.visibility)&&dt.position==="top-right"&&br(),(ge==null?void 0:ge.visibility)&&ge.position==="top-right"&&Gn(),_?d().createElement(o.TouchableOpacity,{touchSoundDisabled:!0,style:Sn.pin_icon_container,onPress:()=>cn()},d().createElement(o.Image,{style:Sn.pin_icon,source:k.PIN})):null))),d().createElement(o.View,{style:[Sn.videoItemContainer,{bottom:0}]},d().createElement(o.View,{style:{flex:1}},d().createElement(o.View,{style:[Sn.videoInnerContainer,{bottom:0,left:0}]},(Fe==null?void 0:Fe.visibility)&&Fe.position==="bottom-left"&&bn(),(nt==null?void 0:nt.visibility)&&nt.position==="bottom-left"&&vr(),(dt==null?void 0:dt.visibility)&&dt.position==="bottom-left"&&br(),(ge==null?void 0:ge.visibility)&&ge.position==="bottom-left"&&Gn()),d().createElement(o.View,{style:[Sn.videoInnerContainer,{bottom:0,right:0}]},(Fe==null?void 0:Fe.visibility)&&Fe.position==="bottom-right"&&bn(),(nt==null?void 0:nt.visibility)&&nt.position==="bottom-right"&&vr(),(dt==null?void 0:dt.visibility)&&dt.position==="bottom-right"&&br(),(ge==null?void 0:ge.visibility)&&ge.position==="bottom-right"&&Gn())))))},Kn=o.StyleSheet.create({main_container:{backgroundColor:yt.blackLightXX,elevation:0,zIndex:0},user_list_main_touchable:{zIndex:10,elevation:5},user_list_user_name:{fontSize:18,color:yt.palette.white,padding:5,position:"absolute",top:0,left:0,elevation:5,zIndex:5},user_list_icon_container:{justifyContent:"flex-start",alignItems:"center",position:"absolute",left:5,bottom:5,zIndex:5,elevation:5},lt_small_button:{width:10,height:10,margin:2,borderRadius:20,alignItems:"center",justifyContent:"center"},user_list_avatar_name:{fontSize:18,color:yt.palette.white,padding:5},full_height_width:{height:"100%",width:"100%"},user_item_icons:{width:15,height:15},user_list_network_container:{position:"absolute",bottom:6,right:10},user_list_network_icon:{width:15,height:15}}),ui=d().memo(function({urls:R=[]}){return d().createElement(d().Fragment,null,R.map((F,_)=>_>2?d().createElement(Pe.RTCView,{key:F.id,objectFit:"cover",streamURL:F.url,style:{height:0,width:0},zOrder:-1}):null))},(R,F)=>R.urls.length===F.urls.length),zr=d().memo(function(){const{globalState:{pinnedUserId:R,isPortrait:F,dimension:_},users:w,dispatch:V,settings:{avatarMode:W,isAudioOnly:te,enableVideoTileClick:oe}}=Bt(),le=w.filter(nt=>nt.isPresenter!==!1),Fe=(0,S.useCallback)(()=>{V({type:O,payload:""})},[]),ge=(0,S.useCallback)(nt=>{V({type:O,payload:nt})},[]);return d().createElement(o.View,{style:[Kn.main_container,F?{paddingVertical:5}:{paddingRight:10,paddingVertical:5}]},d().createElement(o.View,{style:F?{width:"100%",flexDirection:"row",justifyContent:"space-between"}:{width:"100%",height:"100%",justifyContent:"space-between"}},d().createElement(o.View,{style:{flexDirection:F?"row":"column",flex:1,marginHorizontal:F?8:0}},(le==null?void 0:le.length)>=1?(()=>{var It,kt;const nt=[...le],dt=[];for(let Nt=0;Nt<(nt.length>2?3:nt.length);Nt++){const vt=nt[Nt],cn=vt.stats,Wt=cn?cn.connectionQuality<25?k.NETWORK1:cn.connectionQuality<50?k.NETWORK2:cn.connectionQuality<75?k.NETWORK3:k.NETWORK4:"";let Xe;Xe=vt.id===R,!vt.videoTrack||vt.isVideoMuted||vt.status==="inactive"&&Nt!==0?dt.push(d().createElement(o.TouchableOpacity,{activeOpacity:1,touchSoundDisabled:!0,onPress:()=>{oe&&(Xe?Fe():ge(vt.id))},key:vt.id,style:Kn.user_list_main_touchable},d().createElement(o.View,{style:{[F?"width":"height"]:(_[F?"width":"height"]-40)/3,aspectRatio:1,alignItems:"center",justifyContent:"center",flexDirection:"column",borderRadius:8,overflow:"hidden",[F?"marginHorizontal":"marginVertical"]:4,backgroundColor:yt.blackLight,marginBottom:5}},d().createElement(o.View,{style:Kn.user_list_icon_container},vt.isAudioMuted?d().createElement(o.View,{style:Kn.lt_small_button},d().createElement(o.Image,{style:Kn.user_item_icons,source:k.AUDIO_MUTE})):null,vt.isVideoMuted&&!te?d().createElement(o.View,{style:Kn.lt_small_button},d().createElement(o.Image,{style:Kn.user_item_icons,source:k.VIDEO_MUTE})):null),Xe?d().createElement(o.View,{style:fn(Ft({},Kn.lt_small_button),{position:"absolute",top:5,right:5,elevation:5,zIndex:5})},d().createElement(o.Image,{style:Kn.user_item_icons,source:k.PIN})):null,d().createElement(K,{backgroundColor:St(vt==null?void 0:vt.name),textColor:"#FFF",size:30,avatar:vt.avatar},vt.name||""),d().createElement(o.View,{style:W=="fullscreen"?{position:"absolute",top:5,left:5,justifyContent:"center",alignItems:"center"}:{alignItems:"center"}},d().createElement(o.Text,{numberOfLines:1,ellipsizeMode:"tail",style:Kn.user_list_avatar_name},vt.name||"")),d().createElement(Pe.RTCView,{key:vt.id,objectFit:"cover",streamURL:(It=vt.audioTrack)==null?void 0:It.getOriginalStream().toURL(),zOrder:-1})))):dt.push(d().createElement(o.TouchableOpacity,{activeOpacity:1,touchSoundDisabled:!0,onPress:()=>{oe&&(Xe?Fe():ge(vt.id))},key:vt.id,style:Kn.user_list_main_touchable},d().createElement(o.View,{style:{[F?"width":"height"]:(_[F?"width":"height"]-40)/3,aspectRatio:1,alignItems:"center",justifyContent:"center",flexDirection:"column",borderRadius:8,overflow:"hidden",[F?"marginHorizontal":"marginVertical"]:4,backgroundColor:yt.blackLightX,marginBottom:5}},d().createElement(o.Text,{numberOfLines:1,ellipsizeMode:"tail",style:Kn.user_list_user_name},vt.name||""),d().createElement(o.View,{style:Kn.user_list_icon_container},vt.isAudioMuted?d().createElement(o.View,{style:Kn.lt_small_button},d().createElement(o.Image,{style:Kn.user_item_icons,source:k.AUDIO_MUTE})):null,vt.isVideoMuted&&!te?d().createElement(o.View,{style:Kn.lt_small_button},d().createElement(o.Image,{style:Kn.user_item_icons,source:k.VIDEO_MUTE})):null),Xe?d().createElement(o.View,{style:fn(Ft({},Kn.lt_small_button),{position:"absolute",top:5,right:5,elevation:5})},d().createElement(o.Image,{style:Kn.user_item_icons,source:k.PIN})):null,d().createElement(Pe.RTCView,{key:vt.id,objectFit:"cover",streamURL:(kt=vt.videoTrack)==null?void 0:kt.getOriginalStream().toURL(),style:[Kn.full_height_width,{borderRadius:5}],zOrder:1,mirror:le[0].id===vt.id&&vt.videoTrack._facingMode!=="environment"}),d().createElement(o.View,{style:Kn.user_list_network_container},Wt?d().createElement(o.Image,{resizeMode:"contain",source:Wt,style:[Kn.user_list_network_icon]}):null))))}return d().createElement(d().Fragment,null,dt)})():null,(le==null?void 0:le.length)>=3&&d().createElement(ui,{urls:le.map(nt=>{var dt;return{id:nt.id,url:(dt=nt.audioTrack)==null?void 0:dt.getOriginalStream().toURL()}})}))))});function qr({isAudioOnly:R=!1,avatarMode:F="circle"}){const{globalState:{isPortrait:_},users:w}=Bt(),[V,W]=(0,S.useState)(!1);return w.reduce((te,oe)=>te+(oe.isPresenter!==!1?1:0),0)<1?d().createElement(o.View,{style:{flex:1,justifyContent:"center",alignItems:"center"}},d().createElement(o.ActivityIndicator,{size:"small",color:"#fff"}),d().createElement(o.Text,{style:{marginLeft:10,color:"#fff"}},"Waiting for presenter...")):d().createElement(o.View,{style:_?Bn.call_container_portrait:Bn.call_container_landscape},d().createElement(o.View,{style:Bn.main_video_container},d().createElement(o.View,{style:fn(Ft({},Bn.main_video),{marginHorizontal:_?10:5})},d().createElement(Jr,{isAudioOnly:R,avatarMode:F,setFullScreen:W}))),V?null:d().createElement(zr,null))}o.Platform.OS==="android"&&o.UIManager.setLayoutAnimationEnabledExperimental&&o.UIManager.setLayoutAnimationEnabledExperimental(!0);const Gr="CallingAnalytics";class Ri extends S.Component{constructor(_){super(_);bt(this,"interval",null);bt(this,"appId");bt(this,"isAudioOnly");bt(this,"user",null);bt(this,"stopPing",()=>{this.interval&&clearInterval(this.interval)})}componentDidMount(){var _,w,V,W,te;this.appId=(_=this.context)==null?void 0:_.settings.appId,this.isAudioOnly=(w=this.context)==null?void 0:w.settings.isAudioOnly,this.analyticsSettings=(V=this.context)==null?void 0:V.settings.analyticsSettings,this.sessionId=(W=this.context)==null?void 0:W.settings.sessionId,this.user=(te=this.context)==null?void 0:te.users[0],this.interval=setInterval(()=>{this.ping()},6e4)}componentWillUnmount(){}getAnalyticsUrl(){return`https://${this.analyticsSettings.ANALYTICS_HOST}/${this.analyticsSettings.ANALYTICS_VERSION}/calls/ping`}ping(){return fr(this,null,function*(){var te,oe,le;if(((le=(oe=(te=this.context)==null?void 0:te.globalRef)==null?void 0:oe.current)==null?void 0:le.callEnded)===!0)return void this.stopPing();if(!this.appId||!this.user.jwt)return;const _=new Headers;_.append("appId",this.appId),_.append("authorization","Beare "+this.user.jwt),_.append("Content-Type","application/json"),ye.d(Gr,"Ping Headers => ",_);const w={uts:Date.now(),wsId:this.user.resource,type:this.isAudioOnly?"audio":"video",sessionId:this.sessionId,isRecording:!1},V=JSON.stringify(w);ye.d(Gr,"Ping data = ",w);const W={method:"POST",headers:_,body:V,redirect:"follow"};fetch(this.getAnalyticsUrl(),W).then(Fe=>Fe.json()).then(Fe=>ye.d(Gr,"Ping result => ",Fe)).catch(Fe=>ye.e(Gr,"Ping error =>",Fe))})}render(){return null}}bt(Ri,"contextType",Gt),Ri.contextType=Gt;const Ai="EndCallModel",ss=()=>{const{jitsiManager:R,globalRef:F,nativeManager:_,dispatch:w}=Bt(),V=()=>{var W;try{ye.d(Ai,"[onHangUpCalled]"),F.current.callEnded=!0,(W=_.current)!=null&&W.onCallEndButtonPressed&&_.current.onCallEndButtonPressed()}catch(te){ye.d(Ai,"[onHangUpCalled]",te)}try{R.current.leave()}catch(te){ye.d(Ai,"[onHangUpCalled]",te)}};return d().createElement(o.View,{style:Pt.model},d().createElement(o.View,{style:Pt.container},d().createElement(o.Text,{style:Pt.headerText},"Do you want to end presentation for everyone or just leave the call."),d().createElement(o.View,{style:Pt.buttonContainer},d().createElement(o.TouchableOpacity,{onPress:()=>{R.current.endSessionForAll(),w({type:Ze,payload:!1}),V()},touchSoundDisabled:!0,style:Pt.button},d().createElement(o.Text,{style:Pt.buttonText},"End")),d().createElement(o.TouchableOpacity,{onPress:()=>{w({type:Ze,payload:!1}),V()},touchSoundDisabled:!0,style:Pt.button},d().createElement(o.Text,{style:Pt.buttonText},"Leave")))))};function Bi(){const{globalState:R,settings:F}=Bt();return(0,S.useEffect)(()=>{__nested_webpack_require_965809__.g.ccUsersStats={}},[]),R.conferenceJoined?d().createElement(o.View,{style:R.isPortrait?wi.mainContainerPortrait:wi.mainContainerLandScape},d().createElement(Ri,null),R.inPIPMode?d().createElement(Ut,null):F.mode===B?d().createElement(en,null):d().createElement(qr,null),d().createElement(nn,null),R.isParticipantsModelVisible?d().createElement(ke,null):null,d().createElement(Cn,null),R.showAudioModel?d().createElement(Ke,null):null,R.showEndCallDialog?d().createElement(ss,null):null,R.isRecording?d().createElement(at,null):null):d().createElement(o.View,{style:{flex:1,flexDirection:"row",backgroundColor:yt.blackLightXX,justifyContent:"center",alignItems:"center"}},!R.connectionError&&d().createElement(o.ActivityIndicator,{size:"small",color:"#fff"}),d().createElement(o.Text,{style:{marginLeft:10,color:"#fff"}},R.connectionError?"Couldn't connect, something went wrong!":"Joining..."))}const wi=o.StyleSheet.create({mainContainerPortrait:{flex:1,backgroundColor:yt.blackLightXX,overflow:"hidden"},mainContainerLandScape:{flex:1,backgroundColor:yt.blackLightXX,flexDirection:"row"}}),{AudioMode:$i}=o.NativeModules,ur=$i;let Ui=null;Ui=o.NativeModules.CometChatCallsRTC?o.NativeModules.CometChatCallsRTC:o.NativeModules.CometChatRTC;const Dn=Ui;class ai extends d().Component{constructor(_){super(_);bt(this,"isAudioDevicesInitialized",!1);bt(this,"userList",[]);bt(this,"previousAudioModeListToComarpe",[]);bt(this,"audioModeEventTimer",null);bt(this,"getAudioModes",()=>new Promise((_,w)=>{try{const{globalState:V}=this.context;_({modes:V.audioModes})}catch(V){w(V)}}));bt(this,"resetAudioDeviceForVideoCall",()=>{const{globalState:_}=this.context;for(let w=0;w<De.length;w++){const V=_.audioModes.find(W=>W.type.toLowerCase().includes(De[w].toLowerCase()));if(V){ur.setAudioDevice((V==null?void 0:V.uid)||V.type);break}}});bt(this,"setAudioMode",_=>{const{globalState:w}=this.context,V=w.audioModes.find(W=>W.type.toLowerCase().includes(_.toLowerCase()));V&&ur.setAudioDevice((V==null?void 0:V.uid)||V.type)});bt(this,"addAudioDeviceListener",()=>{this.unsubscribeAudioModeEventEmitter=this.AudioModeEventEmitter.addListener(ur.DEVICE_CHANGE_EVENT,_=>{var w;this.isAudioDevicesInitialized||(this.setAudioDevices(_),this.isAudioDevicesInitialized=!0),this.context.dispatch({type:st,payload:_}),this.onAudioModeChanged(_),this.context.dispatch({type:_e,payload:(w=_.find(V=>V.selected))==null?void 0:w.type})}),o.Platform.OS==="ios"&&(this.unsubscribeAudioModeEventEmitterCustom=this.AudioModeEventEmitter.addListener(ur.DEVICE_CHANGE_EVENT_CUSTOM,_=>{var w;if(this.context.users.length===1){const V=this.context.globalState.audioModes.map(W=>fn(Ft({},W),{selected:W.uid===_}));this.context.dispatch({type:st,payload:V}),this.context.dispatch({type:_e,payload:(w=V.find(W=>W.selected))==null?void 0:w.type})}}))});bt(this,"addListeners",()=>{const{jitsiManager:_}=this.context;this.endCall=this.eventEmitter.addListener("EVENT_END_CALL_SESSION",w=>{_.current.leave()}),this.switchCameraSource=this.eventEmitter.addListener("EVENT_SWITCH_CAMERA_SOURCE",w=>{_.current.flipCamera()}),this.muteAudio=this.eventEmitter.addListener("EVENT_MUTE_AUDIO",w=>{_.current.muteAudio()}),this.unMuteAudio=this.eventEmitter.addListener("EVENT_UNMUTE_AUDIO",w=>{_.current.unMuteAudio()}),this.pauseVideo=this.eventEmitter.addListener("EVENT_PAUSE_VIDEO",w=>{_.current.muteVideo()}),this.unPauseVideo=this.eventEmitter.addListener("EVENT_UNPAUSE_VIDEO",w=>{_.current.unMuteVideo()}),this.changeAudiModeToSpeaker=this.eventEmitter.addListener("EVENT_AUDIO_MODE_SPEAKER",w=>{}),this.changeAudiModeToEarpiece=this.eventEmitter.addListener("EVENT_AUDIO_MODE_EARPIECE",w=>{}),this.unmountComponent=this.eventEmitter.addListener("EVENT_UNMOUNT_COMPONENT",w=>{}),this.remountComponent=this.eventEmitter.addListener("EVENT_REMOUNT_COMPONENT",w=>{}),this.enterPipMode=this.eventEmitter.addListener("EVENT_ENTER_PIP_MODE",w=>{_.current.enterPipMode()}),this.exitPipMode=this.eventEmitter.addListener("EVENT_EXIT_PIP_MODE",w=>{_.current.exitPipMode()}),this.switchToVideoCall=this.eventEmitter.addListener("EVENT_SWITCH_TO_VIDEO_CALL",w=>{_.current.requestingToSwitchToVideoCall()}),this.startCallRecording=this.eventEmitter.addListener("EVENT_START_CALL_RECORDING",w=>{_.current.startRecording()}),this.eventEmitter.addListener("EVENT_SET_AUDIO_MODE",w=>{this.setAudioMode(w.audioMode)}),this.eventEmitter.addListener("EVENT_GET_AUDIO_MODES",()=>{this.getAudioModes().then(w=>{Dn.getAudioModesOnSuccess(w.modes)})}),this.stopCallRecording=this.eventEmitter.addListener("EVENT_STOP_CALL_RECORDING",w=>{_.current.stopRecording()})});bt(this,"onRecordingToggled",_=>{var w;(w=this.settings)!=null&&w.onRecordingToggled&&this.settings.onRecordingToggled(_),Dn&&Dn.onRecordingToggled(_)});bt(this,"onUserMuted",_=>{var w;(w=this.settings)!=null&&w.onUserMuted&&this.settings.onUserMuted(_),Dn&&(Dn!=null&&Dn.onUserMuted)&&(Dn==null||Dn.onUserMuted(_))});bt(this,"removeListener",()=>{var _,w,V,W,te,oe,le,Fe,ge,nt,dt,It,kt,Nt,vt,cn,Wt;(_=this.endCall)==null||_.remove(),(w=this.switchCameraSource)==null||w.remove(),(V=this.unsubscribeAudioModeEventEmitter)==null||V.remove(),(W=this.unsubscribeAudioModeEventEmitterCustom)==null||W.remove(),(te=this.muteAudio)==null||te.remove(),(oe=this.unMuteAudio)==null||oe.remove(),(le=this.pauseVideo)==null||le.remove(),(Fe=this.unPauseVideo)==null||Fe.remove(),(ge=this.changeAudiModeToSpeaker)==null||ge.remove(),(nt=this.changeAudiModeToEarpiece)==null||nt.remove(),(dt=this.unmountComponent)==null||dt.remove(),(It=this.remountComponent)==null||It.remove(),(kt=this.enterPipMode)==null||kt.remove(),(Nt=this.exitPipMode)==null||Nt.remove(),(vt=this.switchToVideoCall)==null||vt.remove(),(cn=this.startCallRecording)==null||cn.remove(),(Wt=this.stopCallRecording)==null||Wt.remove()});this.settings=_,this.audioDevices=[],Dn&&(this.eventEmitter=new o.NativeEventEmitter(Dn)),this.AudioModeEventEmitter=new o.NativeEventEmitter(ur),this.unsubscribeAudioModeEventEmitter=null,this.unsubscribeAudioModeEventEmitterCustom=null}componentDidMount(){const{settings:_}=this.context;this.settings=_,Dn&&this.addListeners(),ur&&(this.addAudioDeviceListener(),o.Platform.OS==="android"&&ur.getAllDevices()),_.defaultAudioMode?ur.setMode(ur.VIDEO_CALL):_.isAudioOnly?ur.setMode(ur.AUDIO_CALL):ur.setMode(ur.VIDEO_CALL)}setAudioDevices(_){if(this.settings.defaultAudioMode){const w=_.find(V=>V.type.toLowerCase().includes(this.settings.defaultAudioMode.toLowerCase()));if(w)ur.setAudioDevice((w==null?void 0:w.uid)||(w==null?void 0:w.type));else if(this.settings.isAudioOnly)for(let V=0;V<Ne.length;V++){const W=_.find(te=>te.type.toLowerCase().includes(Ne[V].toLowerCase()));if(W){ur.setAudioDevice((W==null?void 0:W.uid)||W.type);break}}else for(let V=0;V<De.length;V++){const W=_.find(te=>te.type.toLowerCase().includes(De[V].toLowerCase()));if(W){ur.setAudioDevice((W==null?void 0:W.uid)||W.type);break}}}else if(this.settings.isAudioOnly)for(let w=0;w<Ne.length;w++){const V=_.find(W=>W.type.toLowerCase().includes(Ne[w].toLowerCase()));if(V){ur.setAudioDevice((V==null?void 0:V.uid)||V.type);break}}else for(let w=0;w<De.length;w++){const V=_.find(W=>W.type.toLowerCase().includes(De[w].toLowerCase()));if(V){ur.setAudioDevice((V==null?void 0:V.uid)||V.type);break}}}onEndCall(){var _;(_=this.settings)!=null&&_.onEndCall&&this.settings.onEndCall(),ye.d("NativeManager","[onEndCall]"),Dn&&Dn.onCallEnded()}onCallEndButtonPressed(){var _;(_=this.settings)!=null&&_.onCallEndButtonPressed&&this.settings.onCallEndButtonPressed(),Dn&&Dn.onCallEndButtonPressed()}onUserJoined(_){var w,V;(w=this.settings)!=null&&w.onUserJoined&&((V=this.settings)==null||V.onUserJoined(tt(_))),Dn&&Dn.onUserJoined&&(Dn==null||Dn.onUserJoined(tt(_)))}onUserLeft(_){var w;(w=this.settings)!=null&&w.onUserLeft&&this.settings.onUserLeft(tt(_)),Dn&&(Dn!=null&&Dn.onUserLeft)&&Dn.onUserLeft(tt(_))}onUserListChanged(_){var V;const w=_.map(W=>{if(!W.name.includes("(Screen)"))return{uid:W.uid,avatar:W.avatar,name:W.name,jwt:W.jwt}}).filter(W=>W);JSON.stringify(w)!=JSON.stringify(this.userList)&&(this.userList=w,(V=this.settings)!=null&&V.onUserListChanged&&this.settings.onUserListChanged(w),Dn&&Dn.onUserListChanged(w))}onAudioModeChanged(_){var w;this.context.dispatch({type:st,payload:_}),this.audioDevices.length===_.length&&JSON.stringify(this.audioDevices)===JSON.stringify(_)||((w=this.settings)!=null&&w.onAudioModeChanged&&this.settings.onAudioModeChanged(_),this.audioModeEventTimer&&clearTimeout(this.audioModeEventTimer),this.audioModeEventTimer=setTimeout(()=>{JSON.stringify(_)!==JSON.stringify(this.previousAudioModeListToComarpe)&&(Dn&&Dn.onAudioModeChanged(_),this.previousAudioModeListToComarpe=_,this.audioModeEventTimer=null)},600)),this.audioDevices=_}getAudioModesOnSuccess(_){var w;this.context.dispatch({type:st,payload:_}),(w=this.settings)!=null&&w.getAudioModesOnSuccess&&this.settings.getAudioModesOnSuccess(_),Dn&&Dn.getAudioModesOnSuccess(_)}onSwitchedToVideoCall(_){var w;(w=this.settings)!=null&&w.onCallSwitchedToVideo&&this.settings.onCallSwitchedToVideo({initiator:_.initiator,accepted:_.responder,sessionId:_.sessionId}),Dn&&Dn.onCallSwitchedToVideo(_.sessionId,_.initiator,_.responder)}render(){return null}}bt(ai,"contextType",Gt),__nested_webpack_require_965809__(4783);var hi=__nested_webpack_require_965809__(1081),Fi=__nested_webpack_require_965809__(5559),Yr=__nested_webpack_require_965809__.n(Fi);__nested_webpack_require_965809__(9747);const Wi=parseInt(o.Platform.Version,10);o.Platform.OS==="ios"&&Wi===10&&Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength")==null&&Object.defineProperty(ArrayBuffer.prototype,"byteLength",{configurable:!0,enumerable:!1,get:()=>null});var Ii=__nested_webpack_require_965809__(5196);const ji=JSON.parse('{"u2":"react-native-url-polyfill","i8":"1.3.0"}');__nested_webpack_require_965809__(5478),__nested_webpack_require_965809__(7343),__nested_webpack_require_965809__.g.REACT_NATIVE_URL_POLYFILL=`${ji.u2}@${ji.i8}`,(0,Ii.polyfillGlobal)("URL",()=>__nested_webpack_require_965809__(5478).J),(0,Ii.polyfillGlobal)("URLSearchParams",()=>__nested_webpack_require_965809__(7343)._);var Ei=__nested_webpack_require_965809__(6878),pi=__nested_webpack_require_965809__.n(Ei);class Si{constructor(F){this._keyPrefix=F;const _=this._initializeAsync();_&&(this._initializing=_,_.finally(()=>{this._initializing===_&&(this._initializing=void 0)}))}clear(){for(const F of Object.keys(this))this.removeItem(F)}getItem(F){return this.hasOwnProperty(F)?this[F]:null}_getItemAsync(F){return(this._initializing||Promise.resolve()).catch(()=>{}).then(()=>this.getItem(F))}_initializeAsync(){if(this._keyPrefix!==void 0)return new Promise(F=>{pi().getAllKeys().then((..._)=>{const w=_[_.length-1].filter(V=>V.startsWith(this._keyPrefix));pi().multiGet(w).then((...V)=>{const W=V[V.length-1],te=this._keyPrefix&&this._keyPrefix.length;for(let[oe,le]of W)oe=oe.substring(te),this.hasOwnProperty(oe)||(this[oe]=le);F()})})})}key(F){const _=Object.keys(this);return F<_.length?_[F]:null}get length(){return Object.keys(this).length}removeItem(F){delete this[F],this._keyPrefix===void 0||pi().removeItem(`${String(this._keyPrefix)}${F}`)}setItem(F,_){_=String(_),this[F]=_,this._keyPrefix===void 0||pi().setItem(`${String(this._keyPrefix)}${F}`,_)}}function zi(R,F){let _=null;return R&&os(R,w=>w.nodeType===1&&w.nodeName===F&&(_=w,!0)),_}function os(R,F){if(F(R))return!0;if(R=R.firstChild)do if(os(R,F))return!0;while(R=R.nextSibling);return!1}(R=>{if(R.DOMParser=hi.DOMParser,R.addEventListener===void 0&&(R.addEventListener=()=>{}),R.removeEventListener===void 0&&(R.removeEventListener=()=>{}),R.document===void 0){const V=new hi.DOMParser().parseFromString("<html><head></head><body></body></html>","text/xml");V.addEventListener===void 0&&(V.addEventListener=()=>{}),V.cookie===void 0&&(V.cookie=""),V.implementation.createHTMLDocument===void 0&&(V.implementation.createHTMLDocument=function(te=""){const oe=new hi.DOMParser().parseFromString(`<html>
|
|
126
|
+
<head><title>${te}</title></head>
|
|
127
|
+
<body></body>
|
|
128
|
+
</html>`,"text/xml");return Object.defineProperty(oe,"body",{get:()=>oe.getElementsByTagName("body")[0]}),oe});const W=Object.getPrototypeOf(V.documentElement);W&&(W.querySelector===void 0&&(W.querySelector=function(te){return zi(this,te)}),W.remove===void 0&&(W.remove=function(){this.parentNode!==null&&this.parentNode.removeChild(this)}),W.hasOwnProperty("innerHTML")||Object.defineProperty(W,"innerHTML",{get(){return this.childNodes.toString()},set(te){this.textContent="";const oe=new hi.DOMParser().parseFromString(`<div>${te}</div>`,"text/xml").documentElement;let le;for(;le=oe.firstChild;)this.appendChild(le)}}),W.hasOwnProperty("children")||Object.defineProperty(W,"children",{get(){const te=this.childNodes,oe=[];let le=0,Fe=te[le];for(;Fe;)Fe.nodeType===1&&oe.push(Fe),le+=1,Fe=te[le];return oe}})),R.document=V}R.location===void 0&&(R.location={href:"",search:""});const{navigator:F}=R;if(F){let V=F.userAgent||"";const{name:W,version:te}=__nested_webpack_require_965809__(2834);let oe=W||"react-native";te&&(oe+=`/${te}`),V.indexOf(oe)===-1&&(V=V?`${oe} ${V}`:oe);const le=`(${o.Platform.OS} ${o.Platform.Version})`;V.indexOf(le)===-1&&(V=V?`${V} ${le}`:le),F.userAgent=V}__nested_webpack_require_965809__(2808);const _=R.performance.now,w=__nested_webpack_require_965809__(5280);if(R.performance=w.default,R.performance.now=_,R.PerformanceObserver=w.PerformanceObserver,__nested_webpack_require_965809__(3394),R.callstats=__nested_webpack_require_965809__(3650),R.XMLHttpRequest){const{prototype:V}=R.XMLHttpRequest;V&&!V.hasOwnProperty("responseXML")&&Object.defineProperty(V,"responseXML",{get(){const{responseText:W}=this;return W&&new hi.DOMParser().parseFromString(W,"text/xml")}})}o.Platform.OS==="android"&&(R.clearTimeout=Yr().clearTimeout.bind(Yr()),R.clearInterval=Yr().clearInterval.bind(Yr()),R.setInterval=Yr().setInterval.bind(Yr()),R.setTimeout=(V,W=0)=>Yr().setTimeout(V,W)),R.localStorage===void 0&&(R.localStorage=new Si("@jitsi-meet/")),R.sessionStorage===void 0&&(R.sessionStorage=new Si)})(__nested_webpack_require_965809__.g||window||void 0);var Is=__nested_webpack_require_965809__(9291),sr=__nested_webpack_require_965809__.n(Is);const a="JitsiManager";class p extends d().Component{constructor(_){super(_);bt(this,"connection",null);bt(this,"room",null);bt(this,"recordingRetry",0);bt(this,"LastNId",[]);bt(this,"initialize",()=>{try{ye.d(a,"[initialize]");const{setUsers:_,globalRef:w,settings:V,usersRef:W}=this.context,te={};w.current.callEnded=!1,te.uid=V.RTCUser.uid,te.avatar=V.RTCUser.avatar,te.name=V.RTCUser.name,te.isVideoMuted=V.startVideoMuted,te.isAudioMuted=V.startAudioMuted,te.isLocalUser=!0,W.current=[te],_({type:m,payload:[te]},!0),sr().init(ct),sr().setLogLevel(sr().logLevels.ERROR),this.makeConnection(),dn.isPresenter!==!1&&this.createLocalTracks()}catch(_){ye.e(a,"[initialize]",_)}});bt(this,"createLocalTracks",()=>{try{ye.d(a,"[createLocalTracks]");const{settings:_}=this.context;this.createAudioTrack(),_.isAudioOnly||this.createVideoTrack()}catch(_){ye.e(a,"[createLocalTracks]",_)}});bt(this,"createAudioTrack",()=>fr(this,null,function*(){if(dn.isPresenter!==!1)try{ye.d(a,"[createAudioTrack]");const _=yield sr().createLocalTracks({devices:["audio"]});this.onLocalTrack(_[0])}catch(_){ye.e(a,"[createAudioTrack]",_)}}));bt(this,"createVideoTrack",()=>fr(this,null,function*(){if(dn.isPresenter!==!1)try{ye.d(a,"[createVideoTrack]");const _=yield sr().createLocalTracks({devices:["video"]});this.onLocalTrack(_[0])}catch(_){ye.e(a,"[createVideoTrack]",_)}}));bt(this,"onLocalTrack",_=>{try{ye.d(a,"[onLocalTrack]",_);const{setUsers:w,globalState:V,usersRef:W}=this.context,te=W.current;_.type=="video"?(te[0].isVideoMuted===!0?_.mute():te[0].isVideoMuted=!1,te[0].videoTrack=_):_.type=="audio"&&(te[0].isAudioMuted===!0?_.mute():te[0].isAudioMuted=!1,te[0].audioTrack=_),W.current=[...te],w({type:m,payload:te},!0),V.conferenceJoined&&this.addTrackToRoom(_)}catch(w){ye.e(a,"[onLocalTrack]",w)}});bt(this,"onConnectionSuccess",()=>fr(this,null,function*(){var _,w,V,W;try{ye.d(a,"[onConnectionSuccess] ");const{settings:te,setUsers:oe,dispatch:le,setRoom:Fe,globalRef:ge,usersRef:nt,nativeManager:dt}=this.context,It=nt.current;ye.d(a,"[onConnectionSuccess] settings",te);const kt=yield this.connection.initJitsiConference(te==null?void 0:te.sessionId,Qe);kt.setSenderVideoConstraint(720),this.room=kt,Fe(kt),this.addJitsiEventListener(),this.addCommandListener();const Nt=this.room.myUserId()||"";It[0].id=Nt,It[0].jwt=(_=te.RTCUser)==null?void 0:_.jwt,It[0].resource=(w=te.RTCUser)==null?void 0:w.resource,dn.isPresenter===!1?It[0].isPresenter=!1:dn.isPresenter===!0&&(It[0].isPresenter=!0),It[0].videoTrack&&this.room.addTrack(It[0].videoTrack),nt.current=[...It],oe({type:m,payload:It},!0),ge.current.dominantSpeakerId=this.room.lastDominantSpeaker,le({type:j,payload:this.room.lastDominantSpeaker}),this.room.setDisplayName(It[0].name);const vt={start_recording_on_call_start:te.startRecordingOnCallStart,is_video_muted:te.startVideoMuted,is_audio_muted:te.startAudioMuted,session_id:te.sessionId,is_audio_only:te.isAudioOnly,mode:te.mode,call_version:__nested_webpack_require_965809__(4147).i8,uid:It[0].uid,platform:o.Platform.OS,sdk:(V=te.sdk)!=null?V:"react-native",app_id:te.appId,meeting_id:kt.xmpp.getJid()};kt.sendCommand("initial_config",{attributes:vt});const cn={uid:It[0].uid,avatar:It[0].avatar,name:It[0].name,joinedAt:Date.now(),isPresenter:void 0};dn.isPresenter===!1?cn.isPresenter=!1:dn.isPresenter===!0&&(cn.isPresenter=!0),this.room.sendCommand(re,{attributes:cn}),(W=dt.current)==null||W.onUserJoined(It[0])}catch(te){ye.e(a,"[onConnectionSuccess] error",te)}}));bt(this,"endSessionForAll",()=>{const{users:_}=this.context;this.room.sendCommand(T,{value:_[0].id})});bt(this,"onConferenceFailed",_=>{const{dispatch:w}=this.context;w({type:A,payload:null}),this.onConnectionFailed(_)});bt(this,"onConnectionFailed",_=>fr(this,null,function*(){try{ye.d(a,"[onConectionFailed] ",_);const{dispatch:w}=this.context;yield this.unload(),w({type:h,payload:{error:!0,type:"jwt"}})}catch(w){}}));bt(this,"addJitsiEventListener",()=>{try{ye.d(a,"[addJitsiEventListener]",this.room.on),this.room.on(sr().events.conference.CONFERENCE_JOINED,this.onConferenceJoined),this.room.on(sr().events.conference.CONFERENCE_FAILED,this.onConferenceFailed),this.room.on(sr().events.conference.TRACK_ADDED,this.onRemoteTrack),this.room.on(sr().events.conference.TRACK_REMOVED,this.onRemoteTrackRemoved),this.room.on(sr().events.conference.USER_JOINED,this.onUserJoined),this.room.on(sr().events.conference.USER_LEFT,this.onUserLeft),this.room.on(sr().events.conference.TRACK_MUTE_CHANGED,this.onTrackMuted),this.room.on(sr().events.conference.DOMINANT_SPEAKER_CHANGED,this.onDominantSpeakerChanged),this.room.on(sr().events.connectionQuality.LOCAL_STATS_UPDATED,this.onLocalStatsUpdated),this.room.on(sr().events.connectionQuality.REMOTE_STATS_UPDATED,this.onRemoteStatsUpdated),this.room.on(sr().events.conference.PARTICIPANT_CONN_STATUS_CHANGED,this.onParticipantConnStatusChanged),this.room.on(sr().events.conference.LAST_N_ENDPOINTS_CHANGED,this.debounce(this.onLastNChanged,1e3)),this.room.on(sr().events.conference.SUBJECT_CHANGED,this.onSubjectChanged),this.room.join()}catch(_){ye.e(a,"[addJitsiEventListener]",_)}});bt(this,"addCommandListener",()=>{try{this.room.addCommandListener(f,this.onScreenShareStarted),this.room.addCommandListener(D,this.onScreenShareStopped),this.room.addCommandListener(he,this.onScreenRecordingStarted),this.room.addCommandListener(Se,this.onTryingToStartRecording),this.room.addCommandListener(ce,this.onTryingToStopRecording),this.room.addCommandListener(Ae,this.onScreenRecordingStopped),this.room.addCommandListener(Re,this.onParticipantMuted),this.room.addCommandListener(re,this.onUserObjectReceived),this.room.addCommandListener(q,this.onSwitchToVideoCallResponseReceived),this.room.addCommandListener(H,this.onSwitchToVideoRequest)}catch(_){ye.e(a,"[addCommandListener]",_)}});bt(this,"muteParticipant",_=>{if(!_)return alert("select usr"),!1;try{const{users:w}=this.context;this.room.muteParticipant(_.id),this.room.sendCommandOnce(Re,{attributes:{mutedParticipantId:_.id,participantMutedBy:w[0].id}})}catch(w){ye.e(a,"[muteParticipant]",w)}});bt(this,"addTrackToRoom",_=>{try{ye.d(a,"[addTrackToRoom]");const{globalState:w}=this.context;this.room&&w.conferenceJoined&&this.room.addTrack(_)}catch(w){ye.e(a,"[addTrackToRoom]",w)}});bt(this,"removeTrackFromRoom",_=>{this.room.remove(_)});bt(this,"onConferenceJoined",()=>{try{ye.d(a,"[onConferenceJoined]");const{dispatch:_,users:w,settings:V,globalState:W}=this.context;_({type:g,payload:null}),dn.isPresenter!==!1&&(w[0].audioTrack&&this.addTrackToRoom(w[0].audioTrack),w[0].videoTrack&&this.addTrackToRoom(w[0].videoTrack),V.startRecordingOnCallStart&&(W.isRecording&&W.tryingToStartRecording||this.startRecording()))}catch(_){ye.e(a,"[onConferenceJoined]",_)}});bt(this,"onUserJoined",(_,w)=>{var V;try{const W={};if(ye.d(a,"[onUserJoined]",w),W.name=w.getDisplayName()||"Unnamed",W.name==="Unnamed"&&w._statsID.includes("jibri"))return!1;const{dispatch:te,setUsers:oe,globalState:le,usersRef:Fe}=this.context,ge=Fe.current;W.id=w.getId(),Fe.current=[...ge,W],oe({type:m,payload:[...ge,W]}),(V=W==null?void 0:W.name)!=null&&V.includes("(Screen)")&&te({type:be,payload:le.noOfScreenShareUser+1})}catch(W){ye.e(a,"[onUserJoined]",W)}});bt(this,"onUserLeft",(_,w)=>{var V,W,te;try{const{setUsers:oe,dispatch:le,globalState:Fe,nativeManager:ge,usersRef:nt}=this.context,dt=nt.current;if(ye.d(a,"[onUserLeft] id="+_,"user"),(w.getDisplayName()==="Unnamed"||!w.getDisplayName())&&w._statsID&&w._statsID.includes("jibri"))return!1;let It=null;dt.map(Nt=>{var vt;(It==null||It.joinedAt>Nt.joinedAt)&&w._id!==Nt.id&&Nt.status==="active"&&(It=Nt),w._id===Nt.id&&(Fe.tryingToStartRecording&&this.room.sendCommandOnce(ce,{}),w.getDisplayName().includes("(Screen)")||((vt=ge.current)==null||vt.onUserLeft(Nt)))});const kt=dt.filter(Nt=>w._id!==Nt.id);(V=ge.current)==null||V.onUserListChanged(kt),((W=Fe.recorder)==null?void 0:W.id)===w._id&&le({type:Te,payload:It}),w.getDisplayName().includes("(Screen)")&&le({type:be,payload:Fe.noOfScreenShareUser-1}),kt.length<=1&&!this.localUserEndsCall&&((te=ge.current)==null||te.onEndCall()),nt.current=[...kt],oe({type:m,payload:kt})}catch(oe){ye.e(a,"[onUserLeft] ",oe)}});bt(this,"onRemoteTrack",_=>{try{if(ye.d(a,"[onRemoteTrack]","track"),_.isLocal())return;const w=_.ownerEndpointId,{dispatch:V,setUsers:W,globalRef:te,usersRef:oe}=this.context,le=oe.current;_&&_.videoType==="desktop"?(ye.d(a,"[onRemoteTrack] [is screenShare Track]"),V({type:O,payload:w})):this.room.lastDominantSpeaker===w&&(ye.d(a,"[onRemoteTrack] [is dominant Track]"),te.current.dominantSpeakerId=w,V({type:I,payload:w}));for(let Fe=1;Fe<le.length;Fe++)if(le[Fe].id==w){_.type==="video"?(le[Fe].videoTrack=_,le[Fe].isVideoMuted=_.isMuted()):(le[Fe].audioTrack=_,le[Fe].isAudioMuted=_.isMuted());break}oe.current=[...le],W({type:m,payload:le})}catch(w){ye.e(a,"[onRemoteTrack]",w)}});bt(this,"onRemoteTrackRemoved",_=>{try{ye.d(a,"[onRemoteTrackRemoved]","track");const{setUsers:w,usersRef:V}=this.context,W=V.current;for(let te=0;te<W.length;te++)if(W[te].id===_.ownerEndpointId){W[te].videoTrack=void 0,W[te].isVideoMuted=!0;break}V.current=[...W],w({type:m,payload:W})}catch(w){ye.e(a,"[onRemoteTrackRemoved]",w)}});bt(this,"onTrackMuted",_=>{try{ye.d(a,"[onTrackMuted]");const{setUsers:w,usersRef:V}=this.context,W=V.current;let te=_.ownerEndpointId;_.isLocal()&&(te=W[0].id);for(let oe=0;oe<W.length;oe++)if(W[oe].id===te){_.getType()==="video"?(W[oe].videoTrack=_,W[oe].isVideoMuted=_.isMuted()):(W[oe].audioTrack=_,W[oe].isAudioMuted=_.isMuted());break}V.current=[...W],w({type:m,payload:W},_.isLocal())}catch(w){ye.e(a,"[onTrackMuted]",w)}});bt(this,"setConstraints",_=>{const{settings:w}=this.context;if(ye.d(a,"[setConstraints]",_),_){const V={};V[_]={maxHeight:480},this.room.setReceiverConstraints({lastN:w.mode===B?1:3,onStageEndpoints:[_],defaultConstraints:{maxHeight:w.mode===B?0:180},constraints:V})}});bt(this,"onDominantSpeakerChanged",_=>{try{ye.d(a,"[onDominantSpeakerChanged]",_);const{users:w,dispatch:V,globalRef:W}=this.context;for(let te=0;te<w.length;te++)if(w[te].id===_){W.current.dominantSpeakerId=_,V({type:I,payload:_});break}}catch(w){ye.e(a,"[onDominantSpeakerChanged]",w)}});bt(this,"onRemoteStatsUpdated",(_,w)=>{try{ye.d(a,"[onRemoteStatsUpdated]",_),w.connectionQuality&&(__nested_webpack_require_965809__.g.ccUsersStats[_]=w.connectionQuality)}catch(V){ye.e(a,"[onRemoteStatsUpdated]",V)}});bt(this,"onLocalStatsUpdated",_=>{try{ye.d(a,"[onLocalStatsUpdated]",_);const{users:w}=this.context;_.connectionQuality&&(__nested_webpack_require_965809__.g.ccUsersStats[w[0].id]=_.connectionQuality)}catch(w){ye.e(a,"[onLocalStatsUpdated]",w)}});bt(this,"onParticipantConnStatusChanged",(_,w)=>{try{ye.d(a,"[onParticipantConnStatusChanged] id= "+_+"status= ",w);const{setUsers:V,usersRef:W}=this.context,te=W.current;for(let oe=0;oe<te.length;oe++)if(te[oe].id===_){te[oe].status=w;break}W.current=[...te],V({type:m,payload:te})}catch(V){ye.e(a,"[onParticipantConnStatusChanged]",V)}});bt(this,"startLastNLoop",()=>{this.LastNLoopStarted=!0});bt(this,"debounce",(_,w)=>{let V;return function(){const W=this,te=arguments;clearTimeout(V),V=setTimeout(()=>_.apply(W,te),w)}});bt(this,"sortArrayWithOtherArray",(_,w)=>{var le,Fe;const{globalRef:V}=this.context,W=[],te=[],oe=[];for(let ge=1;ge<_.length;ge++)((le=_[ge])==null?void 0:le.id)===((Fe=V.current)==null?void 0:Fe.dominantSpeakerId)?oe.push(_[ge]):w.includes(_[ge].id)?W.push(_[ge]):te.push(_[ge]);return[_[0],...W.sort((ge,nt)=>{const dt=w.indexOf(ge.id),It=w.indexOf(nt.id);return(dt>-1?dt:1/0)-(It>-1?It:1/0)}),...te,...oe]});bt(this,"onLastNChanged",(_,w)=>{try{const{setUsers:V,usersRef:W}=this.context,te=W.current;let oe=[],le=[];if(this.LastNLoopStarted||this.startLastNLoop(),oe=Array.from(new Set([...w,...this.LastNId])),_==null?void 0:_.length)for(let Fe=0;Fe<oe.length;Fe++)_.includes(oe[Fe])||le.push(oe[Fe]);else le=oe;this.LastNId=le,W.current=[...this.sortArrayWithOtherArray(te,le)],V({type:m,payload:this.sortArrayWithOtherArray(te,le)}),ye.d(a,"[onLastNChanged]")}catch(V){ye.e(a,"[onLastNChanged]",V)}});bt(this,"onSubjectChanged",_=>{try{ye.d(a,"[onSubjectChanged]","data");const{globalState:w,dispatch:V}=this.context;if(_){const W=JSON.parse(_);if(W!=null&&W.converted&&!w.switchedToVideoCall){const te=W==null?void 0:W.converted;V({type:rt,payload:{switchToVideoCallRequestInitiator:te.initiator,switchToVideoCallRequestResponder:te.responder}})}}}catch(w){ye.e(a,"[onSubjectChanged]",w)}});bt(this,"onScreenShareStarted",({value:_})=>{try{ye.d(a,"[onScreenShareStarted]","value");const{dispatch:w}=this.context;w({type:O,payload:_})}catch(w){ye.e(a,"[onScreenShareStarted]",w)}});bt(this,"onScreenShareStopped",({value:_})=>{try{ye.d(a,"[onScreenShareStopped]","value");const{globalState:w,dispatch:V}=this.context;w.pinnedUserId===_&&V({type:O,payload:""})}catch(w){ye.e(a,"[onScreenShareStarted]",w)}});bt(this,"onScreenRecordingStarted",({attributes:_})=>{var w;try{ye.d(a,"[onScreenRecordingStarted]",_);const{dispatch:V,nativeManager:W}=this.context;V({type:x,payload:_}),(w=W.current)==null||w.onRecordingToggled({recordingStarted:!0,user:tt(_)})}catch(V){ye.e(a,"[onScreenRecordingStarted]",V)}});bt(this,"onTryingToStartRecording",({attributes:_})=>{try{ye.d(a,"[onTryingToStartRecording]",_);const{dispatch:w}=this.context;w({type:U,payload:_})}catch(w){ye.e(a,"[onTryingToStartRecording]",w)}});bt(this,"onTryingToStopRecording",({attributes:_})=>{try{ye.d(a,"[onTryingToStopRecording]",_);const{dispatch:w}=this.context;w({type:G,payload:null})}catch(w){ye.e(a,"[onTryingToStopRecording]",w)}});bt(this,"onScreenRecordingStopped",({attributes:_})=>{var w;try{ye.d(a,"[onScreenRecordingStopped]",_);const{dispatch:V,nativeManager:W}=this.context;V({type:P,payload:null}),(w=W.current)==null||w.onRecordingToggled({recordingStarted:!1,user:tt(_)})}catch(V){ye.e(a,"[onScreenRecordingStopped]",V)}});bt(this,"onParticipantMuted",({attributes:_})=>{var w;try{ye.d(a,"[onParticipantMuted]","attributes");const{users:V,nativeManager:W}=this.context;let te=null,oe=null;for(let le=0;le<V.length;le++)V[le].id===_.mutedParticipantId?oe=tt(V[le]):V[le].id===_.participantMutedBy&&(te=tt(V[le])),_.mutedParticipantId==V[0].id&&this.muteAudio(),oe&&te&&((w=W==null?void 0:W.current)==null||w.onUserMuted({muted:tt(oe),mutedBy:tt(te)}))}catch(V){ye.e(a,"[onParticipantMuted]",V)}});bt(this,"onUserObjectReceived",(_,w)=>{var le,Fe;ye.d(a,"[onUserObjectReceived]"+w,"data");const{setUsers:V,nativeManager:W,usersRef:te}=this.context,oe=te.current;for(let ge=0;ge<oe.length;ge++)if(oe[ge].id==w&&!oe[ge].uid){oe[ge].uid=_.attributes.uid,oe[ge].avatar=_.attributes.avatar,oe[ge].uid=_.attributes.uid,oe[ge].joinedAt=_.attributes.joinedAt,_.attributes.isPresenter==="false"?oe[ge].isPresenter=!1:_.attributes.isPresenter==="true"&&(oe[ge].isPresenter=!0),(le=W.current)==null||le.onUserJoined(oe[ge]);break}te.current=[...oe],V({type:m,payload:oe}),(Fe=W.current)==null||Fe.onUserListChanged(oe)});bt(this,"unload",()=>{var te,oe;const{globalRef:_,users:w}=this.context;_.current.callEnded=!0;const V=w[0],W=[];if(V&&V.audioTrack)try{W.push((te=V==null?void 0:V.audioTrack)==null?void 0:te.dispose())}catch(le){ye.e(a,"unload audio catch",le)}if(V&&V.videoTrack)try{W.push((oe=V==null?void 0:V.videoTrack)==null?void 0:oe.dispose())}catch(le){ye.e(a,"unload videoTrack catch",le)}return Promise.all(W)});bt(this,"leave",()=>fr(this,null,function*(){var _;try{if(this.alreadyLeft)return;this.alreadyLeft=!0,this.localUserEndsCall||(this.localUserEndsCall=!0);const{nativeManager:w}=this.context;yield this.unload(),ye.d(a,"[leave]"),(_=this.room)==null||_.leave().then(()=>{var V,W,te;(V=this.connection)==null||V.disconnect(),(W=w.current)!=null&&W.removeListener&&((te=w.current)==null||te.removeListener())}).catch()}catch(w){ye.e(a,"[leave]",w)}}));bt(this,"requestingToSwitchToVideoCall",()=>{var _;try{if(dn.isPresenter===!1)return;ye.d(a,"[requestingToSwitchToVideoCall");const{users:w,dispatch:V}=this.context;(_=this.room)==null||_.sendCommandOnce(H,{attributes:{initiator:JSON.stringify(fn(Ft({},w[0]),{audioTrack:null,videoTrack:null}))}}),V({type:z,payload:w[0]})}catch(w){ye.e(a,"[requestingToSwitchToVideoCall",w)}});bt(this,"onSwitchToVideoRequest",(_,w)=>{var V;try{ye.d(a,"[onSwitchToVideoRequest]",w);const{users:W,globalState:te,dispatch:oe}=this.context,le=((V=_==null?void 0:_.attributes)==null?void 0:V.initiator)&&JSON.parse(_.attributes.initiator);w===W[0].id||te.switchedToVideoCall||oe({type:ue,payload:le})}catch(W){ye.e(a,"[onSwitchToVideoRequest",W)}});bt(this,"onSwitchToVideoCallResponse",_=>{var w;try{ye.d(a,"[onSwitchToVideoCallResponse]",_);const{users:V}=this.context;(w=this.room)==null||w.sendCommandOnce(q,{responder:JSON.stringify(tt(V[0])),attributes:{response:_}})}catch(V){ye.e(a,"[onSwitchToVideoCallResponse]",V)}});bt(this,"onSwitchToVideoCallResponseReceived",(_,w)=>{try{ye.d(a,"[onSwitchToVideoCallResponseReceived]"+typeof _.attributes.response);const{users:V,globalState:W,dispatch:te,settings:oe,nativeManager:le}=this.context;if(!W.switchedToVideoCall){const Fe=V.find(nt=>nt.id===w),ge={initiator:tt(W.switchToVideoCallRequestInitiator),responder:tt(Fe),response:!0};_.attributes.response==="true"?(te({type:pe,payload:Fe}),this.switchToVideoCall(),le.current.onSwitchedToVideoCall({sessionId:oe.sessionId,initiator:tt(W.switchToVideoCallRequestInitiator),responder:tt(Fe)}),this.room.setSubject(JSON.stringify({converted:ge}))):te({type:Me,payload:Fe})}}catch(V){ye.e(a,"[onSwitchToVideoCallResponseReceived]",V)}});bt(this,"switchToVideoCall",()=>{try{const{nativeManager:_}=this.context;ye.d(a,"[switchToVideoCall]");const{setSettings:w}=this.context;this.createVideoTrack(),w({type:l,payload:null}),_.current.resetAudioDeviceForVideoCall()}catch(_){ye.e(a,"[switchToVideoCall]",_)}});bt(this,"startRecording",()=>{var _;try{if(dn.isPresenter===!1)return;ye.d(a,"[startRecording]");const{globalState:w,globalRef:V,users:W}=this.context;if((_=V==null?void 0:V.current)!=null&&_.callEnded)return;w.isRecording||this.room.startRecording({mode:"file"}).then(te=>{this.room.sendCommandOnce(he,{attributes:Ft({recordId:te._sessionID},W[0])})}).catch(te=>{ye.e(a,"[startRecording] error starting to retry count="+this.recordingRetry,te),setTimeout(()=>{this.startRecording()},5e3),this.recordingRetry===0&&this.room.sendCommandOnce(Se,{attributes:Ft({},W[0])}),this.recordingRetry++})}catch(w){ye.e(a,"[startRecording]",w)}});bt(this,"stopRecording",()=>{var _,w;try{if(dn.isPresenter===!1)return;ye.d(a,"[stopRecording]");const{globalState:V,users:W}=this.context;V.isRecording&&((_=V.recorder)==null?void 0:_.id)===W[0].id&&(this.room.sendCommandOnce(Ae,{attributes:tt(W[0])}),this.room.stopRecording(V.recordId)),V.tryingToStartRecording&&((w=V.recorder)==null?void 0:w.id)===W[0].id&&(this.recordingRetry=0,this.room.sendCommandOnce(ce,{}))}catch(V){ye.e(a,"[stopRecording]",V)}});bt(this,"flip",()=>{const{users:_,globalState:w,dispatch:V}=this.context;_[0].videoTrack&&(_[0].videoTrack._switchCamera(),V({type:ne,payload:!w.cameraFlipped}))});bt(this,"flipCamera",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[flipCamera]"),this.flipCameraTimer&&clearTimeout(this.flipCameraTimer),this.flipCameraTimer=setTimeout(this.flip,300)}catch(_){ye.e(a,"[flipCamera]",_)}});bt(this,"muteAudio",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[muteAudio]");const{users:_}=this.context;_[0].audioTrack&&(_[0].audioTrack.isMuted()||_[0].audioTrack.mute())}catch(_){ye.e(a,"[muteAudio]",_)}});bt(this,"unMuteAudio",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[unMuteAudio]");const{users:_}=this.context;_[0].audioTrack&&_[0].audioTrack.isMuted()&&_[0].audioTrack.unmute()}catch(_){ye.e(a,"[unMuteAudio]",_)}});bt(this,"toggleAudioButton",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[toggleAudioButton]");const{users:_}=this.context;_[0].audioTrack&&(_[0].audioTrack.isMuted()?_[0].audioTrack.unmute():_[0].audioTrack.mute())}catch(_){ye.e(a,"[toggleAudioButton]",_)}});bt(this,"muteVideo",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[muteVideo]");const{users:_}=this.context;_[0].videoTrack&&(_[0].videoTrack.isMuted()||_[0].videoTrack.mute())}catch(_){ye.d(a,"[muteVideo]",_)}});bt(this,"unMuteVideo",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[unMuteVideo]");const{users:_}=this.context;_[0].videoTrack&&_[0].videoTrack.isMuted()&&_[0].videoTrack.unmute()}catch(_){ye.d(a,"[unMuteVideo]",_)}});bt(this,"toggleVideoButton",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[toggleVideoButton]");const{users:_}=this.context;_[0].videoTrack&&(_[0].videoTrack.isMuted()?_[0].videoTrack.unmute():_[0].videoTrack.mute())}catch(_){ye.d(a,"[toggleVideoButton]",_)}});bt(this,"enterPipMode",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[enterPipMode]");const{dispatch:_}=this.context;_({type:C,payload:!0})}catch(_){ye.e(a,"[enterPipMode]",_)}});bt(this,"exitPipMode",()=>{try{if(dn.isPresenter===!1)return;ye.d(a,"[exitPipMode]");const{dispatch:_}=this.context;_({type:C,payload:!1})}catch(_){ye.e(a,"[exitPipMode]",_)}});ye.d(a,"[constructor]"),this.connection=null,this.alreadyLeft=!1,this.room=null,this.localUserEndsCall=!1,this.state={LastNId:[]}}componentDidMount(){this.initialize()}makeConnection(){var _,w;try{const{settings:V,setConnection:W}=this.context;ye.d(a,"[makeConnection]");const te=V.domain,oe={hosts:{domain:te,muc:"conference."+te,focus:"focus."+te},serviceUrl:"wss://xmpp."+te+"/xmpp-websocket",bosh:"https://xmpp."+te+"/http-bind"};this.connection=new(sr()).JitsiConnection(null,((_=V==null?void 0:V.RTCUser)==null?void 0:_.jwt)||null,oe),W(this.connection),(w=this.connection)==null||w.connect(),this.addConnectionEventListener()}catch(V){ye.e(a,"[makeConnection]",V)}}addConnectionEventListener(){try{ye.d(a,"[addConnectionEventListener]"),this.connection.addEventListener(sr().events.connection.CONNECTION_ESTABLISHED,this.onConnectionSuccess),this.connection.addEventListener(sr().events.connection.CONNECTION_FAILED,this.onConnectionFailed),this.connection.addEventListener(sr().events.connection.CONNECTION_DISCONNECTED,()=>{ye.d(a,"[addConnectionEventListener] [CONNECTION_DISCONNECTED]")}),this.connection.addEventListener(sr().events.connection.CONNECTION_DROPPED_ERROR,()=>{ye.d(a,"[addConnectionEventListener] [CONNECTION_DROPPED_ERROR]")})}catch(_){ye.e(a,"[addConnectionEventListener] [error]",_)}}render(){return null}}bt(p,"contextType",Gt);const E=p;(R=>{if(R.$===void 0){const F=__nested_webpack_require_965809__(6663);F(R),R.$=F}})(__nested_webpack_require_965809__.g||window);const M=(0,S.forwardRef)(function(R,F){var te,oe,le,Fe,ge,nt,dt,It,kt,Nt,vt,cn,Wt,Xe,pn,Rt,Pn,gr,vr,Gn,br,bn,rn,lr,Pr,Ur,Be,Jn,hr,Or,Mt;dn.isPresenter=R.isPresenter,dn.mode=R.mode;const _={enableVideoTileClick:(te=R.enableVideoTileClick)!=null?te:!0,enableDraggableVideoTile:(oe=R.enableDraggableVideoTile)!=null?oe:!0},w={videoFit:(Fe=(le=R.mainVideoSetting)==null?void 0:le.videoFit)!=null?Fe:"contain",fullScreenButton:{visibility:(dt=(nt=(ge=R.mainVideoSetting)==null?void 0:ge.fullScreenButton)==null?void 0:nt.visibility)!=null?dt:!0,position:(Nt=(kt=(It=R.mainVideoSetting)==null?void 0:It.fullScreenButton)==null?void 0:kt.position)!=null?Nt:"bottom-right"},userListButton:{visibility:(Wt=(cn=(vt=R.mainVideoSetting)==null?void 0:vt.userListButton)==null?void 0:cn.visibility)!=null?Wt:!0,position:(Rt=(pn=(Xe=R.mainVideoSetting)==null?void 0:Xe.userListButton)==null?void 0:pn.position)!=null?Rt:"bottom-right"},zoomButton:{visibility:(vr=(gr=(Pn=R.mainVideoSetting)==null?void 0:Pn.zoomButton)==null?void 0:gr.visibility)!=null?vr:!0,position:(bn=(br=(Gn=R.mainVideoSetting)==null?void 0:Gn.zoomButton)==null?void 0:br.position)!=null?bn:"bottom-right"},nameLabel:{visibility:(Pr=(lr=(rn=R.mainVideoSetting)==null?void 0:rn.nameLabel)==null?void 0:lr.visibility)!=null?Pr:!0,position:(Jn=(Be=(Ur=R.mainVideoSetting)==null?void 0:Ur.nameLabel)==null?void 0:Be.position)!=null?Jn:"bottom-left",color:(Mt=(Or=(hr=R.mainVideoSetting)==null?void 0:hr.nameLabel)==null?void 0:Or.color)!=null?Mt:yt.blackLightXX}},V=(0,S.useRef)(),W=(0,S.useRef)();return(0,S.useImperativeHandle)(F,()=>({muteAudio:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.muteAudio()},unMuteAudio:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.unMuteAudio()},switchCamera:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.flipCamera()},pauseVideo:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.muteVideo()},unPauseVideo:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.unMuteVideo()},endCall:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.leave()},switchToVideoCall:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.requestingToSwitchToVideoCall()},startRecording:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.startRecording()},stopRecording:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.stopRecording()},toggleAudioButton:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.toggleAudioButton()},toggleVideoButton:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.toggleVideoButton()},enterPipMode:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.enterPipMode()},exitPipMode:()=>{var Ht;return(Ht=V.current)==null?void 0:Ht.exitPipMode()},setAudioMode:Ht=>{var Nn;return(Nn=W.current)==null?void 0:Nn.setAudioMode(Ht)},getAudioModes:()=>{var Ht;return(Ht=W.current)==null?void 0:Ht.getAudioModes()}})),(0,S.useEffect)(()=>{ye.d("index.js","[index.js] [useEffect]")},[]),d().createElement(mn,{reducer:Kt,initialState:fn(Ft(Ft({},R),_),{videoSettings:w})},d().createElement(Gt.Consumer,null,Ht=>d().createElement(o.View,{onLayout:Nn=>{Ht==null||Ht.dispatch({type:y,payload:Nn.nativeEvent.layout})},style:{backgroundColor:yt.palette.red,flex:1}},d().createElement(E,{ref:Nn=>{Ht.jitsiManager.current=Nn,V.current=Nn}}),d().createElement(ai,Ft({ref:Nn=>{Ht.nativeManager.current=Nn,W.current=Nn}},Ht.settings)),d().createElement(Bi,null))))}),Q=(0,S.forwardRef)(function(It,dt){var kt=It,{callsettings:R={},onCallEndButtonPressed:F,onEndCall:_,onUserJoined:w,onUserLeft:V,onUserListChanged:W,onRecordingToggled:te,onUserMuted:oe,onAudioModeChanged:le,getAudioModesOnSuccess:Fe,onCallSwitchedToVideo:ge}=kt,nt=ro(kt,["callsettings","onCallEndButtonPressed","onEndCall","onUserJoined","onUserLeft","onUserListChanged","onRecordingToggled","onUserMuted","onAudioModeChanged","getAudioModesOnSuccess","onCallSwitchedToVideo"]);var Nt;return d().createElement(M,Ft(fn(Ft({ref:dt},R),{enableVideoTileClick:R.EnableVideoTileClick,sessionId:R.sessionID,RTCUser:R.user,onCallEndButtonPressed:F,onEndCall:_,onUserJoined:w,onUserLeft:V,onUserListChanged:W,onRecordingToggled:te,onUserMuted:oe,onAudioModeChanged:le,getAudioModesOnSuccess:Fe,onCallSwitchedToVideo:ge,mainVideoSetting:R.MainVideoContainerSetting,enableDefaultLayout:R.defaultLayout,isAudioOnly:R.isAudioOnly,hideAudioMuteButton:!R.ShowMuteAudioButton,hideEndCallButton:!R.ShowEndCallButton,hidePauseVideoButton:!R.ShowPauseVideoButton,hideVideoSwitchButton:!R.ShowSwitchCameraButton,showRecordingButton:R.ShowRecordingButton,startRecordingOnCallStart:R.StartRecordingOnCallStart,hideAudioModeButton:!R.ShowAudioModeButton,REGION:R.region,mode:R.mode,domain:R.domain,defaultAudioMode:R.defaultAudioMode,startAudioMuted:R.StartAudioMuted,startVideoMuted:R.StartVideoMuted,appId:R.appId,analyticsSettings:R.analyticsSettings,showSwitchToVideoCallButton:R.ShowSwitchToVideoCallButton,avatarMode:(Nt=R.AvatarMode)==null?void 0:Nt.toLowerCase()}),nt))})})(),__webpack_exports__})())},878:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__878__},156:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__156__},925:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__925__},559:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__559__},650:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__650__},394:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__394__},941:S=>{"use strict";S.exports=__WEBPACK_EXTERNAL_MODULE__941__}},__webpack_module_cache__={};function __webpack_require__(S){var d=__webpack_module_cache__[S];if(d!==void 0)return d.exports;var o=__webpack_module_cache__[S]={exports:{}};return __webpack_modules__[S](o,o.exports,__webpack_require__),o.exports}__webpack_require__.n=S=>{var d=S&&S.__esModule?()=>S.default:()=>S;return __webpack_require__.d(d,{a:d}),d},__webpack_require__.d=(S,d)=>{for(var o in d)__webpack_require__.o(d,o)&&!__webpack_require__.o(S,o)&&Object.defineProperty(S,o,{enumerable:!0,get:d[o]})},__webpack_require__.o=(S,d)=>Object.prototype.hasOwnProperty.call(S,d),__webpack_require__.r=S=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{CometChatCalls:()=>mt,default:()=>Xt});var S=__webpack_require__(173),d=__webpack_require__.n(S);function o(ae){ae!=null&&(typeof ae=="string"&&(ae=ae.trim()),typeof ae=="object"&&Object.keys(ae).length===0&&(ae=void 0));var ee=["",0,"0",!1,null,"null",void 0,"undefined"];return ee.includes(ae)}function l(ae){try{return JSON.stringify(ae),!0}catch(ee){return!1}}var v=function(){function ae(){}return ae.log=function(ee,Ee){console.log(ee,Ee)},ae.error=function(ee,Ee){console.log(ee,Ee)},ae.info=function(ee,Ee){console.info(ee,Ee)},ae}();function m(ae){typeof(ae==null?void 0:ae.toString)=="function"||typeof ae=="string"?console.error(ae.toString()):l(ae)?console.error(ae!=null&&ae.message?ae==null?void 0:ae.message:JSON.stringify(ae)):console.error(ae)}var y=function(){function ae(ee){o(ee.onUserJoined)||(this.onUserJoined=ee.onUserJoined),o(ee.onUserLeft)||(this.onUserLeft=ee.onUserLeft),o(ee.onUserListUpdated)||(this.onUserListUpdated=ee.onUserListUpdated),o(ee.onAudioModesUpdated)||(this.onAudioModesUpdated=ee.onAudioModesUpdated),o(ee.onCallEnded)||(this.onCallEnded=ee.onCallEnded),o(ee.onCallEndButtonPressed)||(this.onCallEndButtonPressed=ee.onCallEndButtonPressed),o(ee.onError)||(this.onError=ee.onError),o(ee.onRecordingStarted)||(this.onRecordingStarted=ee.onRecordingStarted),o(ee.onRecordingStopped)||(this.onRecordingStopped=ee.onRecordingStopped),o(ee.onUserMuted)||(this.onUserMuted=ee.onUserMuted),o(ee.onCallSwitchedToVideo)||(this.onCallSwitchedToVideo=ee.onCallSwitchedToVideo)}return ae}(),j=function(){return j=Object.assign||function(ae){for(var ee,Ee=1,ve=arguments.length;Ee<ve;Ee++){ee=arguments[Ee];for(var et in ee)Object.prototype.hasOwnProperty.call(ee,et)&&(ae[et]=ee[et])}return ae},j.apply(this,arguments)},h=function(ae,ee,Ee){if(Ee||arguments.length===2)for(var ve=0,et=ee.length,We;ve<et;ve++)(We||!(ve in ee))&&(We||(We=Array.prototype.slice.call(ee,0,ve)),We[ve]=ee[ve]);return ae.concat(We||Array.prototype.slice.call(ee))},g=function(){function ae(){}return ae.addCallEventListener=function(ee,Ee){try{ae.callHandlers=ae==null?void 0:ae.callHandlers.filter(function(ve){return ve._name!=ee}),ae.callHandlers=h(h([],ae.callHandlers,!0),[j({_name:ee},new y(Ee))],!1)}catch(ve){console.error("ListenerHandlers: addCallEventListener",ve)}},ae.removeCallEventListener=function(ee){try{ae.callHandlers=ae==null?void 0:ae.callHandlers.filter(function(Ee){return Ee._name!==ee})}catch(Ee){console.error("ListenerHandlers: removeCallEventListener",Ee)}},ae.callHandlers=[],ae}(),A={CALL_TOKENS:"call_tokens"},I="__APP_ID__",O="__REGION__",x="https://".concat(I,".call-").concat(O,".cometchat.io/v3.0/"),U=function(ae){return new Promise(function(ee){var Ee=new Headers;if(Ee.append("content-Type","application/json"),Ee.append("Accept","application/json"),typeof ae.headers=="object")for(var ve in ae.headers)Ee.append(ve,ae.headers[ve]);var et={method:"POST",headers:Ee,body:JSON.stringify(ae.data)};fetch(ae.url,et).then(function(We){return We.json()}).then(function(We){ee({error:null,data:We})}).catch(function(We){console.log(We),ee({error:We,data:null})})})},G=function(ae){return new Promise(function(ee){var Ee=new Headers;if(Ee.append("Accept","application/json"),typeof ae.headers=="object")for(var ve in ae.headers)Ee.append(ve,ae.headers[ve]);var et={method:"GET",headers:Ee};fetch(ae.url,et).then(function(We){return We.json()}).then(function(We){ee({error:null,data:We})}).catch(function(We){console.log(We),ee({error:We,data:null})})})},P=function(ae,ee,Ee,ve){function et(We){return We instanceof Ee?We:new Ee(function(Ot){Ot(We)})}return new(Ee||(Ee=Promise))(function(We,Ot){function _t(nn){try{Tt(ve.next(nn))}catch(In){Ot(In)}}function Vt(nn){try{Tt(ve.throw(nn))}catch(In){Ot(In)}}function Tt(nn){nn.done?We(nn.value):et(nn.value).then(_t,Vt)}Tt((ve=ve.apply(ae,ee||[])).next())})},z=function(ae,ee){var Ee={label:0,sent:function(){if(We[0]&1)throw We[1];return We[1]},trys:[],ops:[]},ve,et,We,Ot;return Ot={next:_t(0),throw:_t(1),return:_t(2)},typeof Symbol=="function"&&(Ot[Symbol.iterator]=function(){return this}),Ot;function _t(Tt){return function(nn){return Vt([Tt,nn])}}function Vt(Tt){if(ve)throw new TypeError("Generator is already executing.");for(;Ot&&(Ot=0,Tt[0]&&(Ee=0)),Ee;)try{if(ve=1,et&&(We=Tt[0]&2?et.return:Tt[0]?et.throw||((We=et.return)&&We.call(et),0):et.next)&&!(We=We.call(et,Tt[1])).done)return We;switch(et=0,We&&(Tt=[Tt[0]&2,We.value]),Tt[0]){case 0:case 1:We=Tt;break;case 4:return Ee.label++,{value:Tt[1],done:!1};case 5:Ee.label++,et=Tt[1],Tt=[0];continue;case 7:Tt=Ee.ops.pop(),Ee.trys.pop();continue;default:if(We=Ee.trys,!(We=We.length>0&&We[We.length-1])&&(Tt[0]===6||Tt[0]===2)){Ee=0;continue}if(Tt[0]===3&&(!We||Tt[1]>We[0]&&Tt[1]<We[3])){Ee.label=Tt[1];break}if(Tt[0]===6&&Ee.label<We[1]){Ee.label=We[1],We=Tt;break}if(We&&Ee.label<We[2]){Ee.label=We[2],Ee.ops.push(Tt);break}We[2]&&Ee.ops.pop(),Ee.trys.pop();continue}Tt=ee.call(ae,Ee)}catch(nn){Tt=[6,nn],et=0}finally{ve=We=0}if(Tt[0]&5)throw Tt[1];return{value:Tt[0]?Tt[1]:void 0,done:!0}}},ue=function(){function ae(){}return ae.generateToken=function(ee,Ee,ve){return P(this,void 0,void 0,function(){var et;return z(this,function(We){return et=x.replace(I,ve.getAppId()).replace(O,ve.getRegion()),ve.getHost()&&(et=ve.getHost()),[2,U({url:"".concat(et).concat(A.CALL_TOKENS),headers:{authToken:ee},data:{sessionId:Ee}})]})})},ae.verifyToken=function(ee,Ee){return P(this,void 0,void 0,function(){var ve;return z(this,function(et){return ve=x.replace(I,Ee.getAppId()).replace(O,Ee.getRegion()),Ee.getHost()&&(ve=Ee.getHost()),[2,G({url:"".concat(ve).concat(A.CALL_TOKENS),headers:{callToken:ee}})]})})},ae}(),pe={DEFAULT_STORE:"cometchat",MSG_VER_PRE:"store-ver-pre",MSG_VER_POST:"store-ver-post"},Me={API_ERROR:{code:"API_ERROR"}},rt={us:"us",eu:"eu",in:"in"},be={ZERO:0,MSGS_LIMIT:30,MSGS_MAX_LIMIT:100,USERS_LIMIT:30,USERS_MAX_LIMIT:100,GROUPS_LIMIT:30,GROUPS_MAX_LIMIT:100,CONVERSATION_MAX_LIMIT:50,CALL_TIMEOUT:45,DEFAULT_MSG_ID:0,DEFAULT_MAX_TYPING_INDICATOR_LIMIT:5,REGION_DEFAULT:"eu",REGION_DEFAULT_EU:"eu",REGION_DEFAULT_US:"us",REGION_DEFAULT_IN:"in",REGION_DEFAULT_PRIVATE:"private"},Te;(function(ae){ae.Public="public",ae.Private="private",ae.Protected="protected",ae.Password="password"})(Te||(Te={}));var C={PUBLIC:"public",PRIVATE:"private",PROTECTED:"password",PASSWORD:"password"},st;(function(ae){ae.Admin="admin",ae.Moderator="moderator",ae.Member="member"})(st||(st={}));var _e={ADMIN:"admin",MODERATOR:"moderator",PARTICIPANT:"participant"},Oe={platform:"REACT_NATIVE",sdkVersion:"v3.0.11",apiVersion:"v3.0",sdkVersionWithUnderScore:"3_0_11",userAgent:"cc_react_native_sdk"},Ye={platform:"react-native",sdkVersion:"3.0.11",sdk:"%s@%s"},ne={CONVERSATION:{TYPE:{CHAT:"chat",GROUP_CHAT:"groupchat"}}},Ze={analyticsHost:"metrics-%s.cometchat.io",analyticsVersion:"v1"},xe={COMMON_STORE:"common_store",MESSAGE_LISTENERS_LIST:"message_listeners_list",USERS_STORE:"users_store",MESSAGES_STORE:"messages_store",KEYS_STORE:"keys_store",STORE_STRING:"%s:%s",KEY_STRING:"%s/%s",KEY_USER:"user",KEY_APP_SETTINGS:"app_settings",KEY_APP_ID:"appId",KEY_DEVICE_ID:"deviceId",KEY_MESSAGE_LISTENER_LIST:"all"},ct={RESPONSE_KEYS:{KEY_DATA:"data",KEY_META:"meta",KEY_CURSOR:"cursor",KEY_ACTION:"action",KEY_MESSAGE:"message",KEY_ERROR:"error",KEY_ERROR_DETAILS:"details",KEY_ERROR_CODE:"code",KEY_ERROR_MESSAGE:"message",KEY_AUTH_TOKEN:"authToken",KEY_WS_CHANNEL:"wsChannel",KEY_IDENTITY:"identity",KEY_SERVICE:"identity",KEY_ENTITIES:"entities",KEY_ENTITITY:"entity",KEY_ENTITYTYPE:"entityType",KEY_ATTACHMENTS:"attachments",CODE_REQUEST_OK:200,CODE_BAD_REQUEST:401,UNREAD_UNDELIVERED_KEYS:{ENTITY:"entity",ENTITY_TYPE:"entityType",ENTITY_Id:"entityId",COUNT:"count"},GROUP_MEMBERS_RESPONSE:{SUCCESS:"success",ERROR:"error",MESSAGE:"message"},KEY_ENTITY_TYPE:{USER:"user",GROUP:"group"}}},Qe={RECEIVER_ID:"receiverId",RECEIVER_TYPE:"type",RECIPIENT:"recipient",MESSAGE_ID:"messageId",RECEIVED:"delivered",DELIVERED_AT:"deliveredAt",ID:"id",TIME:"time",DELIVERED_TO_ME_AT:"deliveredToMeAt"},re={RECEIVER_ID:"receiverId",RECEIVER_TYPE:"type",RECIPIENT:"recipient",MESSAGE_ID:"messageId",READ:"read",READ_AT:"readAt",ID:"id",TIME:"time",READ_BY_ME_AT:"readByMeAt"},f={TYPE:{TEXT:"text",MEDIA:"media",IMAGE:"image",VIDEO:"video",AUDIO:"audio",FILE:"file",CUSTOM:"custom"},CATEGORY:{MESSAGE:"message",ACTION:"action",CALL:"call",CUSTOM:"custom"},RECEIVER_TYPE:{USER:"user",GROUP:"group"},KEYS:{ATTATCHMENT:"attatchment",ATTATCHMENTS:"attachments",ACTION:"action",TYPE:"type",DATA:"data",ID:"id",MUID:"muid",SENDER:"sender",RECEIVER:"receiver",RECEIVER_ID:"receiverId",CATEGORY:"category",RECEIVER_TYPE:"receiverType",SENT_AT:"sentAt",STATUS:"status",TEXT:"text",URL:"url",METADATA:"metadata",RECEIPTS:"receipts",MY_RECEIPTS:"myReceipt",CUSTOM_DATA:"customData",CUSTOM_SUB_TYPE:"subType",RESOURCE:"resource"},KNOWN_MEDIA_TYPE:{IMAGE:[],VIDEO:[],AUDIO:[],FILE:[]},PAGINATION:{AFFIX:{APPEND:"append",PREPEND:"prepend"},CURSOR_FILEDS:{ID:"id",SENT_AT:"sentAt"},CURSOR_AFFIX_DEFAULT:"prepend",CURSOR_FIELD_DEFAULT:"sentAt",KEYS:{PER_PAGE:"per_page",CURSOR_AFFIX:"cursorAffix",AFFIX:"affix",CURSOR_FIELD:"cursorField",CURSOR_VALUE:"cursorValue",UID:"uid",SENT_AT:"sentAt",ID:"id",CURRENT_PAGE:"page",UNREAD:"unread",HIDE_MESSAGES_FROM_BLOCKED_USER:"hideMessagesFromBlockedUsers",SEARCH_KEY:"searchKey",ONLY_UPDATES:"onlyUpdates",UPDATED_AT:"updatedAt",CATEGORY:"category",CATEGORIES:"categories",TYPE:"type",TYPES:"types",HIDE_REPLIES:"hideReplies",HIDE_DELETED_MESSAGES:"hideDeleted",WITH_TAGS:"withTags",TAGS:"tags"}}},D={KEYS:{EXTENSION:"extension",MIME_TYPE:"mimeType",NAME:"name",SIZE:"size",URL:"url"}},H;(function(ae){ae.ACTION="action",ae.MESSAGE="message",ae.CALL="call",ae.CUSTOM="custom"})(H||(H={}));var q={RECEIVER_ID:"receiverId",RECEIVER_TYPE:"receiverType",META:"metadata",KEYS:{TYPING_NOTIFICATION:"typingNotification",TIMESTAMP:"timestamp"},ACTIONS:{STARTED:"started",ENDED:"ended"}},he={ACTION_SUBJECTS:{ACTION_ON:"on",ACTION_BY:"by",ACTION_FOR:"for"},ACTION_ENTITY_TYPE:{GROUP_USER:"groupuser",USER:"user",GROUP:"group",MESSAGE:"message"},ACTION_KEYS:{ACTION_CREATED:"created",ACTION_UPDATED:"updated",ACTION_DELETED:"deleted",ENTITIES:"entities",ENTITY:"entity",ENTITY_TYPE:"entityType",TYPE_MEMBER_JOINED:"joined",TYPE_MEMBER_LEFT:"left",TYPE_MEMBER_KICKED:"kicked",TYPE_MEMBER_BANNED:"banned",TYPE_MEMBER_UNBANNED:"unbanned",TYPE_MEMBER_INVITED:"invited",TYPE_MEMBER_ADDED:"added",ACTION_SCOPE_CHANGED:"scopeChanged",ACTION_TYPE_USER:"user",ACTION_TYPE_GROUP:"group",ACTION_TYPE_GROUP_MEMBER:"groupMember",TYPE_MESSAGE_EDITED:"edited",TYPE_MESSAGE_DELETED:"deleted",ACTION_TYPE_CALL:"call",EXTRAS:"extras",SCOPE:"scope",NEW:"new",OLD:"old"},ActionMessages:{ACTION_GROUP_JOINED_MESSAGE:"%s joined",ACTION_GROUP_LEFT_MESSAGE:"%s left",ACTION_MEMBER_KICKED_MESSAGE:"%s kicked %s",ACTION_MEMBER_BANNED_MESSAGE:"%s banned %s",ACTION_MEMBER_UNBANNED_MESSAGE:"%s unbanned %s",ACTION_MEMBER_INVITED_MESSAGE:"%s banned %s",ACTION_MESSAGE_EDITED_MESSAGE:" Message Edited",ACTION_MESSAGE_DELETED_MESSAGE:"Message Deleted",ACTION_MEMBER_SCOPE_CHANGED:"%s made %s %s",ACTION_MEMBER_ADDED_TO_GROUP:"%s added %s"},ACTION_TYPE:{TYPE_MEMBER_JOINED:"joined",TYPE_MEMBER_LEFT:"left",TYPE_MEMBER_KICKED:"kicked",TYPE_MEMBER_BANNED:"banned",TYPE_MEMBER_UNBANNED:"unbanned",TYPE_MEMBER_INVITED:"invited",TYPE_MEMBER_SCOPE_CHANGED:"scopeChanged",TYPE_MESSAGE:"message",TYPE_MESSAGE_EDITED:"edited",TYPE_MESSAGE_DELETED:"deleted",TYPE_MEMBER_ADDED:"added"},ACTIONS:{MEMBER_ADDED:"added",MEMBER_JOINED:"joined",MEMBER_LEFT:"left",MEMBER_KICKED:"kicked",MEMBER_BANNED:"banned",MEMBER_UNBANNED:"unbanned",MEMBER_INVITED:"invited",MEMBER_SCOPE_CHANGED:"scopeChanged",MESSAGE_EDITED:"edited",MESSSAGE_DELETED:"deleted",TYPE_USER:"user",TYPE_GROUP:"group",TYPE_GROUP_MEMBER:"groupMember"}},Ae={REQUEST_KEYS:{DIRECTIONS:{BOTH:"both",HAS_BLOCKED_ME:"hasBlockedMe",BLOCKED_BY_ME:"blockedByMe"}}},ce={CALL_MODE:{DEFAULT:"DEFAULT",SPOTLIGHT:"SPOTLIGHT"},AUDIO_MODE:{SPEAKER:"SPEAKER",EARPIECE:"EARPIECE",BLUETOOTH:"BLUETOOTH",HEADPHONES:"HEADPHONES"},CALL_TYPE:{AUDIO:"audio",VIDEO:"video"},RECEIVER_TYPE_GROUP:"group",RECEIVER_TYPE_USER:"user",CALL_KEYS:{CALL_DATA:"data",CALL_ID:"id",CALL_SESSION_ID:"sessionid",CALL_RECEIVER:"receiver",CALL_SENDER:"sender",CALL_RECEIVER_TYPE:"receiverType",CALL_STATUS:"status",CALL_TYPE:"type",CALL_INITIATED_AT:"initiatedAt",CALL_JOINED_AT:"joinedAt",CALL_LEFT_AT:"leftAt",CALL_METADATA:"metadata",CALL_ENTITIES:"entities",CALL_ENTITY_TYPE:"entityType",CALL_ENTITY:"entity",CALL_ENTITY_USER:"user",CALL_ENTITY_GROUP:"group"},CALL_STATUS:{INITIATED:"initiated",ONGOING:"ongoing",UNANSWERED:"unanswered",REJECTED:"rejected",BUSY:"busy",CANCELLED:"cancelled",ENDED:"ended"},ZOOM_BUTTON_DEFAULT_PARAMS:{position:"bottom-right",visible:!0},FULL_SCREEN_BUTTON_DEFAULT_PARAMS:{position:"bottom-right",visible:!0},USER_LIST_BUTTON_DEFAULT_PARAMS:{position:"bottom-right",visible:!0},NAME_LABEL_DEFAULT_PARAMS:{position:"bottom-left",visible:!0,color:"#333333"},MAIN_VIDEO_CONTAINER_SETTINGS:{KEYS:{POSITION:"position",VISIBILITY:"visibility",COLOR:"color"}}},Se={KEYS:{NAME:"name",GUID:"guid",TYPE:"type",PASSWORD:"password",ICON:"icon",DESCRIPTION:"description",OWNER:"owner",METADATA:"metadata",CREATED_AT:"createdAt",UPDATED_AT:"updatedAt",HAS_JOINED:"hasJoined",WS_CHANNEL:"wsChannel",TAGS:"tags"}},Re={KEYS:{SCOPE:"scope",UID:"uid",GUID:"guid",USER:"user",NAME:"name"}},T={UID:"uid",NAME:"name",AUTH_TOKEN:"authToken",AVATAR:"avatar",LAST_ACTIVE_AT:"lastActiveAt",LINK:"link",META_DATA:"metadata",ROLE:"role",STATUS:"status",STATUS_MESSAGE:"statusMessage",USER_NAME:"user_name",TAGS:"tags",SORT_BY:{NAME:"name",STATUS:"status"},SORT_ORDER:{ASCENDING:"asc",DESCENDING:"desc"}},B={ERROR_IO_EXCEPTION:"ERROR_IO_EXCEPTION",ERROR_JSON_EXCEPTION:"ERROR_JSON_EXCEPTION",ERROR_PASSWORD_MISSING:"ERROR_PASSWORD_MISSING",ERROR_LIMIT_EXCEEDED:"ERROR_LIMIT_EXCEEDED",ERROR_USER_NOT_LOGGED_IN:"ERROR_USER_NOT_LOGGED_IN",ERROR_INVALID_GUID:"ERROR_INVALID_GUID",ERROR_PASSWORD_MISSING_MESSAGE:"Password is mandatory for a password group",ERROR_LIMIT_EXCEEDED_MESSAGE:"Limit Exceeded Max limit of %s",ERROR_USER_NOT_LOGGED_IN_MESSAGE:"Please log in to CometChat before calling this method",ERROR_INVALID_GUID_MESSAGE:"Please provide a valid GUID",ERROR_DEFAULT_MESSAGE:"Something went wrong",ERR_SETTINGS_HASH_OUTDATED:"ERR_SETTINGS_HASH_OUTDATED",ERR_NO_AUTH:"ERR_NO_AUTH"},Y={CALL_ALREADY_INITIATED:{code:"CALL_ALREADY_INITIATED",name:"CALL_ALREADY_INITIATED",message:"There is already call in progress",details:{}},ERROR_IN_CALLING:{code:"CALL_IN_PROGRESS",name:"CALL_ALREADY_INITIATED",message:"There is already call in progress",details:{}},CANNOT_ACCEPT_CALL:{code:"OTHER_CALL_ONGOING",name:"OTHER_CALL_ONGOING",message:"There is already a call in progress",details:{}},NOT_INITIALIZED:{code:"NOT_INITIALIZED",name:"NOT_INITIALIZED",message:"Please call the CometChat.init() method before calling any other methods related to CometChat.",details:{}},NOT_LOGGED_IN:{code:"NOT_LOGGED_IN",name:"NOT_LOGGED_IN",message:"Please login before starting a call.",details:{}},SESSION_ID_REQUIRED:{code:"SESSION_ID_REQUIRED",name:"SESSION_ID_REQUIRED",message:"Please make sure you are passing correct session id.",details:{}},JWT_NOT_FOUND:{code:"JWT_NOT_FOUND",name:"JWT_NOT_FOUND",message:"There was some issue while fetching JWT from API.",details:{}},MODULE_NOT_INSTALLED:{code:"ERROR_CALL_MODULE_NOT_FOUND",name:"ERROR_CALL_MODULE_NOT_FOUND",message:"CometChat Calling module not found. Please add the CometChat Calling dependency and try again.",details:{}}},fe={PARAMETER_REQUIRED:{code:"%s_NOT_PROVIDED",name:"%s_NOT_PROVIDED",message:"please provide the %s.",details:{}}},Ne={GENERIC_EXCEPTION:{code:"GENERIC_EXCEPTION"},INVALID_ARGUMENT_EXCEPTION:{code:"INVALID_ARGUMENT_EXCEPTION"},INVALID_PROP_EXCEPTION:{code:"INVALID_PROP_EXCEPTION"},API_ERROR:{code:"API_ERROR"},ERROR_PRESENTER_MODE:{code:"ERROR_PRESENTER_MODE",message:"Presenter mode is disabled. To use presenter mode, please enable it from the CometChat Apps Dashboard"},UNKNOWN_API_ERROR:{code:"UNKNOWN_API_ERROR",message:"There is an unknown issue with the API request. Please check your internet connection and verify the api call."}},De={MISSING_PARAMETERS:{code:"MISSING_PARAMETERS",name:"MISSING_PARAMETERS",message:"Expected 4 parameters received 3",details:{}},INVALID_PARAMETER:{code:"INVALID_%s",name:"INVALID_%s",message:"%s",details:{}},NO_WEBSOCKET_CONNECTION:{code:"NO_WEBSOCKET_CONNECTION",name:"NO_WEBSOCKET_CONNECTION",message:"Connection to our Websockets server is broken. Please retry after some time.",details:{}},RECEIPTS_TEMPORARILY_BLOCKED:{code:"RECEIPTS_TEMPORARILY_BLOCKED",name:"RECEIPTS_TEMPORARILY_BLOCKED",message:"Due to high load. Receipts have been blocked for your app.",details:{}},UNKNOWN_ERROR_OCCURRED:{code:"UNKNOWN_ERROR_OCCURRED",name:"UNKNOWN_ERROR_OCCURRED",message:"Unknown error occurred while marking a message as read.",details:{}}},ht={APP_SETTINGS:"app_settings",KEYS:{CHAT_HOST:"CHAT_HOST",CHAT_USE_SSL:"CHAT_USE_SSL",GROUP_SERVICE:"GROUP_SERVICE",CALL_SERVICE:"CALL_SERVICE",CHAT_WS_PORT:"CHAT_WS_PORT",CHAT_WSS_PORT:"CHAT_WSS_PORT",CHAT_HTTP_BIND_PORT:"CHAT_HTTP_BIND_PORT",CHAT_HTTPS_BIND_PORT:"CHAT_HTTPS_BIND_PORT",ADMIN_API_HOST:"ADMIN_API_HOST",CLIENT_API_HOST:"CLIENT_API_HOST",WEBRTC_HOST:"WEBRTC_HOST",WEBRTC_USE_SSL:"WEBRTC_USE_SSL",WEBRTC_WS_PORT:"WEBRTC_WS_PORT",WEBRTC_WSS_PORT:"WEBRTC_WSS_PORT",WEBRTC_HTTP_BIND_PORT:"WEBRTC_HTTP_BIND_PORT",WEBRTC_HTTPS_BIND_PORT:"WEBRTC_HTTPS_BIND_PORT",EXTENSION_LIST:"extensions",EXTENSION_KEYS:{ID:"id",NAME:"name"},JID_HOST_OVERRIDE:"JID_HOST_OVERRIDE",CHAT_HOST_OVERRIDE:"CHAT_HOST_OVERRIDE",CHAT_HOST_APP_SPECIFIC:"CHAT_HOST_APP_SPECIFIC",MODE:"MODE",CONNECTION_TYPE:"connection_type",DEFAULT_MODE:"DEFAULT",LIMITED_TRANSIENT:"LIMITED_TRANSIENT",NO_TRANSIENT:"NO_TRANSIENT",POLLING_ENABLED:"POLLING_ENABLED",POLLING_INTERVAL:"POLLING_INTERVAL",ANALYTICS_PING_DISABLED:"ANALYTICS_PING_DISABLED",ANALYTICS_HOST:"ANALYTICS_HOST",ANALYTICS_VERSION:"ANALYTICS_VERSION",ANALYTICS_USE_SSL:"ANALYTICS_USE_SSL",SETTINGS_HASH:"settingsHash",SETTINGS_HASH_RECEIVED_AT:"settingsHashReceivedAt",DENY_FALLBACK_TO_POLLING:"DENY_FALLBACK_TO_POLLING",APP_VERSION:"APP_VERSION",MAIN_DOMAIN:"MAIN_DOMAIN",CHAT_API_VERSION:"CHAT_API_VERSION",WS_API_VERSION:"WS_API_VERSION",REGION:"REGION",EXTENSION_DOMAIN:"EXTENSION_DOMAIN",WEBRTC_API_SUBDOMAIN:"WEBRTC_API_SUBDOMAIN"}},jt={TYPE_CONSTANTS:{BOOLEAN:"boolean",STRING:"string",OBJECT:"object",NUMBER:"number"}},Ge={CONNECTED:"connected",CONNECTING:"connecting",DISCONNECTED:"disconnected",FEATURE_THROTTLED:"featureThrottled"},Ue={AUTH_ERR_AUTH_TOKEN_NOT_FOUND:"AUTH_ERR_AUTH_TOKEN_NOT_FOUND"},Ct={DOMAIN_PREFIX:"xmpp",PATH:{ROOM:"room",ROOM_SIZE:"room-size",SESSIONS:"sessions"},RESPONSE:{PARTICIPANTS:"participants"},QUERY_PARAMETERS:{DOMAIN:"domain",ROOM:"room"}},Kt={INVALID_SESSIONID:{code:"ERROR_INVALID_SESSIONID",name:"ERROR_INVALID_SESSIONID",message:"The provided sessionId cannot be null or empty. Please provide a valid sessionId.",details:""},INVALID_TYPE:{code:"ERROR_INVALID_TYPE",name:"ERROR_INVALID_TYPE",message:"The provided type cannot be null or empty. Please provide a valid type.",details:""}},Yt={KEYS:{PASSTHROUGH:"passthrough",EXPAND:"expand"}},Gt={ENDPOINTS:{GET_ONLINE_MEMBER_COUNT:"api/%s/online-members"},RESPONSE:{ONLINE_USERS_COUNT:"onlineUsersCount",GROUPS:"groups"},ERRORS:{INVALID_GROUPLIST:{code:"ERROR_INVALID_GROUPLIST",name:"ERROR_INVALID_GROUPLIST",message:"Grouplist cannot be null or empty.",details:""}}},Bt=function(){function ae(ee){"code"in ee&&(this.code=ee.code),"message"in ee&&(this.message=ee.message),"details"in ee&&(this.details=ee.details)}return ae}(),mn=function(){function ae(ee){this.appId=ee.appId,this.region=ee.region,this.host=ee.host}return ae.prototype.setAppId=function(ee){return this.appId=ee,this},ae.prototype.setRegion=function(ee){return this.region=ee,this},ae.prototype.setHost=function(ee){return this.host=ee,this},ae.prototype.getAppId=function(){return this.appId},ae.prototype.getRegion=function(){return this.region},ae.prototype.getHost=function(){return this.host},ae}(),yt=function(){function ae(){}return ae.prototype.setAppId=function(ee){return this.appId=ee,this},ae.prototype.setRegion=function(ee){return this.region=ee,this},ae.prototype.setHost=function(ee){return this.host=ee,this},ae.prototype.build=function(){return new mn(this)},ae}();function zt(ae){return new Promise(function(ee,Ee){var ve=new Bt({code:"INVALID_CALL_APP_SETTINGS"});if(!(ae instanceof mn)){ve.message="appSettings must be an instance of CallAppSettings class",Ee(ve);return}var et=ae.getAppId(),We=ae.getRegion(),Ot=ae.getHost();if(typeof et!="string"||et.length===0){ve.message="Invalid app id, please check your appSettings",Ee(ve);return}if(typeof We!="string"||!rt[We]){ve.message="Invalid region, please check your appSettings",Ee(ve);return}if(Ot!=null&&typeof Ot!="string"){ve.message="Invalid host, please check your appSettings",Ee(ve);return}ee(!0)})}var K=function(){function ae(ee){this.defaultLayout=ee.defaultLayout,this.isAudioOnly=ee.isAudioOnly,this.listener=ee.listener,this.mode=ee.mode,this.ShowEndCallButton=ee.ShowEndCallButton,this.ShowSwitchCameraButton=ee.ShowSwitchCameraButton,this.ShowMuteAudioButton=ee.ShowMuteAudioButton,this.ShowPauseVideoButton=ee.ShowPauseVideoButton,this.ShowAudioModeButton=ee.ShowAudioModeButton,this.StartAudioMuted=ee.StartAudioMuted,this.StartVideoMuted=ee.StartVideoMuted,this.defaultAudioMode=ee.defaultAudioMode,this.ShowSwitchToVideoCallButton=ee.ShowSwitchToVideoCallButton,this.AvatarMode=ee.AvatarMode,this.ShowRecordingButton=ee.ShowRecordingButton,this.StartRecordingOnCallStart=ee.StartRecordingOnCallStart,this.MainVideoContainerSetting=ee.MainVideoContainerSetting,this.EnableVideoTileClick=ee.EnableVideoTileClick,this.enableDraggableVideoTile=ee.enableDraggableVideoTile}return ae.prototype.isAudioOnlyCall=function(){return this.isAudioOnly},ae.prototype.isDefaultLayoutEnabled=function(){return this.defaultLayout},ae.prototype.getCallEventListener=function(){return this.listener},ae.prototype.getMode=function(){return this.mode},ae.prototype.isEndCallButtonEnabled=function(){return this.ShowEndCallButton},ae.prototype.isSwitchCameraButtonEnabled=function(){return this.ShowSwitchCameraButton},ae.prototype.isMuteAudioButtonEnabled=function(){return this.ShowMuteAudioButton},ae.prototype.isPauseVideoButtonEnabled=function(){return this.ShowPauseVideoButton},ae.prototype.isAudioModeButtonEnabled=function(){return this.ShowAudioModeButton},ae.prototype.getStartWithAudioMuted=function(){return this.StartAudioMuted},ae.prototype.getStartWithVideoMuted=function(){return this.StartVideoMuted},ae.prototype.getDefaultAudioMode=function(){return this.defaultAudioMode},ae.prototype.isAudioToVideoButtonEnabled=function(){return this.ShowSwitchToVideoCallButton},ae.prototype.getAvatarMode=function(){return this.AvatarMode},ae.prototype.isRecordingButtonEnabled=function(){return this.ShowRecordingButton},ae.prototype.shouldStartRecordingOnCallStart=function(){return this.StartRecordingOnCallStart},ae.prototype.getMainVideoContainerSetting=function(){return this.MainVideoContainerSetting},ae.prototype.isVideoTileClickEnabled=function(){return this.EnableVideoTileClick},ae.prototype.isVideoTileDragEnabled=function(){return this.enableDraggableVideoTile},ae.POSITION_TOP_LEFT="top-left",ae.POSITION_TOP_RIGHT="top-right",ae.POSITION_BOTTOM_LEFT="bottom-left",ae.POSITION_BOTTOM_RIGHT="bottom-right",ae.ASPECT_RATIO_DEFAULT="default",ae.ASPECT_RATIO_CONTAIN="contain",ae.ASPECT_RATIO_COVER="cover",ae.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},ae.ASPECT_RATIO={DEFAULT:"default",CONTAIN:"contain",COVER:"cover"},ae}(),Le=function(){function ae(){this.defaultLayout=!0,this.isAudioOnly=!1,this.mode=ce.CALL_MODE.DEFAULT,this.ShowEndCallButton=!0,this.ShowSwitchCameraButton=!0,this.ShowMuteAudioButton=!0,this.ShowPauseVideoButton=!0,this.ShowAudioModeButton=!0,this.StartAudioMuted=!1,this.StartVideoMuted=!1,this.ShowSwitchToVideoCallButton=!0,this.AvatarMode="circle",this.ShowRecordingButton=!1,this.StartRecordingOnCallStart=!1,this.MainVideoContainerSetting=new me,this.EnableVideoTileClick=!0,this.enableDraggableVideoTile=!0}return ae.prototype.enableDefaultLayout=function(ee){return this.defaultLayout=ee,this},ae.prototype.setIsAudioOnlyCall=function(ee){return this.isAudioOnly=ee,this},ae.prototype.setCallEventListener=function(ee){return this.listener=ee,this},ae.prototype.setMode=function(ee){return this.mode=ee,this},ae.prototype.showEndCallButton=function(ee){return ee===void 0&&(ee=!0),this.ShowEndCallButton=ee,this},ae.prototype.showSwitchCameraButton=function(ee){return ee===void 0&&(ee=!0),this.ShowSwitchCameraButton=ee,this},ae.prototype.showMuteAudioButton=function(ee){return ee===void 0&&(ee=!0),this.ShowMuteAudioButton=ee,this},ae.prototype.showPauseVideoButton=function(ee){return ee===void 0&&(ee=!0),this.ShowPauseVideoButton=ee,this},ae.prototype.showAudioModeButton=function(ee){return ee===void 0&&(ee=!0),this.ShowAudioModeButton=ee,this},ae.prototype.startWithAudioMuted=function(ee){return ee===void 0&&(ee=!1),this.StartAudioMuted=ee,this},ae.prototype.startWithVideoMuted=function(ee){return ee===void 0&&(ee=!1),this.StartVideoMuted=ee,this},ae.prototype.setDefaultAudioMode=function(ee){return this.defaultAudioMode=ee,this},ae.prototype.showSwitchToVideoCallButton=function(ee){return ee===void 0&&(ee=!0),this.ShowSwitchToVideoCallButton=ee,this},ae.prototype.setAvatarMode=function(ee){return ee===void 0&&(ee="circle"),this.AvatarMode=ee,this},ae.prototype.showRecordingButton=function(ee){return ee===void 0&&(ee=!1),this.ShowRecordingButton=ee,this},ae.prototype.startRecordingOnCallStart=function(ee){return ee===void 0&&(ee=!1),this.StartRecordingOnCallStart=ee,this},ae.prototype.setMainVideoContainerSetting=function(ee){return this.MainVideoContainerSetting=ee,this},ae.prototype.enableVideoTileClick=function(ee){return ee===void 0&&(ee=!0),this.EnableVideoTileClick=ee,this},ae.prototype.enableVideoTileDrag=function(ee){return ee===void 0&&(ee=!0),this.enableDraggableVideoTile=ee,this},ae.prototype.build=function(){return new K(this)},ae}(),me=function(){function ae(){this.videoFit=K.ASPECT_RATIO_CONTAIN,this.zoomButton=ce.ZOOM_BUTTON_DEFAULT_PARAMS,this.fullScreenButton=ce.FULL_SCREEN_BUTTON_DEFAULT_PARAMS,this.userListButton=ce.USER_LIST_BUTTON_DEFAULT_PARAMS,this.nameLabel=ce.NAME_LABEL_DEFAULT_PARAMS}return ae.prototype.setMainVideoAspectRatio=function(ee){ee===void 0&&(ee="contain"),this.videoFit=ee},ae.prototype.setFullScreenButtonParams=function(ee,Ee){ee===void 0&&(ee=K.POSITION_BOTTOM_RIGHT),Ee===void 0&&(Ee=!0),o(ee)||(this.fullScreenButton[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.POSITION]=ee),Ee!=null&&Ee!=null&&(this.fullScreenButton[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.VISIBILITY]=Ee)},ae.prototype.setNameLabelParams=function(ee,Ee,ve){ee===void 0&&(ee=K.POSITION_BOTTOM_LEFT),Ee===void 0&&(Ee=!0),ve===void 0&&(ve="#333333"),o(ee)||(this.nameLabel[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.POSITION]=ee),Ee!=null&&Ee!=null&&(this.nameLabel[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.VISIBILITY]=Ee),o(ve)||(this.nameLabel[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.COLOR]=ve)},ae.prototype.setZoomButtonParams=function(ee,Ee){ee===void 0&&(ee=K.POSITION_BOTTOM_RIGHT),Ee===void 0&&(Ee=!0),o(ee)||(this.zoomButton[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.POSITION]=ee),Ee!=null&&Ee!=null&&(this.zoomButton[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.VISIBILITY]=Ee)},ae.prototype.setUserListButtonParams=function(ee,Ee){ee===void 0&&(ee=K.POSITION_BOTTOM_RIGHT),Ee===void 0&&(Ee=!0),o(ee)||(this.userListButton[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.POSITION]=ee),Ee!=null&&Ee!=null&&(this.userListButton[ce.MAIN_VIDEO_CONTAINER_SETTINGS.KEYS.VISIBILITY]=Ee)},ae}(),k=__webpack_require__(156),J=__webpack_require__.n(k),Z=__webpack_require__(925),ie=function(){function ae(ee){this.defaultLayout=ee.defaultLayout,this.isAudioOnly=ee.isAudioOnly,this.isPresenter=ee.isPresenter,this.listener=ee.listener,this.ShowEndCallButton=ee.ShowEndCallButton,this.ShowSwitchCameraButton=ee.ShowSwitchCameraButton,this.ShowMuteAudioButton=ee.ShowMuteAudioButton,this.ShowPauseVideoButton=ee.ShowPauseVideoButton,this.ShowAudioModeButton=ee.ShowAudioModeButton,this.StartAudioMuted=ee.StartAudioMuted,this.StartVideoMuted=ee.StartVideoMuted,this.defaultAudioMode=ee.defaultAudioMode,this.ShowRecordingButton=ee.ShowRecordingButton}return ae.prototype.isAudioOnlyCall=function(){return this.isAudioOnly},ae.prototype.getIsPresenter=function(){return this.isPresenter},ae.prototype.isDefaultLayoutEnabled=function(){return this.defaultLayout},ae.prototype.getCallEventListener=function(){return this.listener},ae.prototype.isEndCallButtonEnabled=function(){return this.ShowEndCallButton},ae.prototype.isSwitchCameraButtonEnabled=function(){return this.ShowSwitchCameraButton},ae.prototype.isMuteAudioButtonEnabled=function(){return this.ShowMuteAudioButton},ae.prototype.isPauseVideoButtonEnabled=function(){return this.ShowPauseVideoButton},ae.prototype.isAudioModeButtonEnabled=function(){return this.ShowAudioModeButton},ae.prototype.getStartWithAudioMuted=function(){return this.StartAudioMuted},ae.prototype.getStartWithVideoMuted=function(){return this.StartVideoMuted},ae.prototype.getDefaultAudioMode=function(){return this.defaultAudioMode},ae.prototype.isRecordingButtonEnabled=function(){return this.ShowRecordingButton},ae.POSITION_TOP_LEFT="top-left",ae.POSITION_TOP_RIGHT="top-right",ae.POSITION_BOTTOM_LEFT="bottom-left",ae.POSITION_BOTTOM_RIGHT="bottom-right",ae.ASPECT_RATIO_DEFAULT="default",ae.ASPECT_RATIO_CONTAIN="contain",ae.ASPECT_RATIO_COVER="cover",ae.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},ae.ASPECT_RATIO={DEFAULT:"default",CONTAIN:"contain",COVER:"cover"},ae}(),we=function(){function ae(){this.defaultLayout=!0,this.isAudioOnly=!1,this.isPresenter=!1,this.ShowEndCallButton=!0,this.ShowSwitchCameraButton=!0,this.ShowMuteAudioButton=!0,this.ShowPauseVideoButton=!0,this.ShowAudioModeButton=!0,this.StartAudioMuted=!1,this.StartVideoMuted=!1,this.ShowRecordingButton=!1}return ae.prototype.enableDefaultLayout=function(ee){return this.defaultLayout=ee,this},ae.prototype.setIsAudioOnlyCall=function(ee){return this.isAudioOnly=ee,this},ae.prototype.setIsPresenter=function(ee){return this.isPresenter=ee,this},ae.prototype.setCallEventListener=function(ee){return this.listener=ee,this},ae.prototype.showEndCallButton=function(ee){return ee===void 0&&(ee=!0),this.ShowEndCallButton=ee,this},ae.prototype.showSwitchCameraButton=function(ee){return ee===void 0&&(ee=!0),this.ShowSwitchCameraButton=ee,this},ae.prototype.showMuteAudioButton=function(ee){return ee===void 0&&(ee=!0),this.ShowMuteAudioButton=ee,this},ae.prototype.showPauseVideoButton=function(ee){return ee===void 0&&(ee=!0),this.ShowPauseVideoButton=ee,this},ae.prototype.showAudioModeButton=function(ee){return ee===void 0&&(ee=!0),this.ShowAudioModeButton=ee,this},ae.prototype.startWithAudioMuted=function(ee){return ee===void 0&&(ee=!1),this.StartAudioMuted=ee,this},ae.prototype.startWithVideoMuted=function(ee){return ee===void 0&&(ee=!1),this.StartVideoMuted=ee,this},ae.prototype.setDefaultAudioMode=function(ee){return this.defaultAudioMode=ee,this},ae.prototype.showRecordingButton=function(ee){return ee===void 0&&(ee=!1),this.ShowRecordingButton=ee,this},ae.prototype.build=function(){return new ie(this)},ae}(),ke=function(){var ae=function(ee,Ee){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,et){ve.__proto__=et}||function(ve,et){for(var We in et)Object.prototype.hasOwnProperty.call(et,We)&&(ve[We]=et[We])},ae(ee,Ee)};return function(ee,Ee){if(typeof Ee!="function"&&Ee!==null)throw new TypeError("Class extends value "+String(Ee)+" is not a constructor or null");ae(ee,Ee);function ve(){this.constructor=ee}ee.prototype=Ee===null?Object.create(Ee):(ve.prototype=Ee.prototype,new ve)}}(),at=function(ae){ke(ee,ae);function ee(Ee){return ae.call(this,Ee)||this}return ee.prototype.render=function(){return J().createElement(Z.View,{style:{flex:1,backgroundColor:"#000",justifyContent:"center",alignItems:"center",padding:20}},J().createElement(Z.Text,{style:{color:"#FFF"}},this.props.message))},ee}(J().Component),ft=function(){var ae=function(ee,Ee){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,et){ve.__proto__=et}||function(ve,et){for(var We in et)Object.prototype.hasOwnProperty.call(et,We)&&(ve[We]=et[We])},ae(ee,Ee)};return function(ee,Ee){if(typeof Ee!="function"&&Ee!==null)throw new TypeError("Class extends value "+String(Ee)+" is not a constructor or null");ae(ee,Ee);function ve(){this.constructor=ee}ee.prototype=Ee===null?Object.create(Ee):(ve.prototype=Ee.prototype,new ve)}}(),lt=function(){return lt=Object.assign||function(ae){for(var ee,Ee=1,ve=arguments.length;Ee<ve;Ee++){ee=arguments[Ee];for(var et in ee)Object.prototype.hasOwnProperty.call(ee,et)&&(ae[et]=ee[et])}return ae},lt.apply(this,arguments)},ye=function(ae){ft(ee,ae);function ee(Ee){var ve=ae.call(this,Ee)||this;return ve.state={shouldLoad:!1,errored:!1},ve.callsettings=Ee.callSettings,!ve.callsettings||!(ve.callsettings instanceof K||ve.callsettings instanceof ie)?(ve.state=lt(lt({},ve.state),{errored:!0}),console.error(new Bt({code:Ne.INVALID_PROP_EXCEPTION.code,message:"Component requires valid callSettings.",details:"Component requires valid callSettings."})),ve):(zt(mt.getAppSettings()).then(function(){var et,We;if(typeof Ee.callToken!="string"||Ee.callToken===""){var Ot=new Bt({code:Ne.INVALID_ARGUMENT_EXCEPTION.code,message:"Invalid callToken passed, please verify."});console.error(Ot),(We=(et=ve.callsettings.getCallEventListener())===null||et===void 0?void 0:et.onError)===null||We===void 0||We.call(et,Ot);return}ue.verifyToken(Ee.callToken,mt.getAppSettings()).then(function(_t){var Vt,Tt,nn,In,Xn,Wn,cr,Ke,ot,Et,Pt,Cn,ln,Pe,tt,St,Ut,Zt;if(!((Tt=(Vt=_t==null?void 0:_t.data)===null||Vt===void 0?void 0:Vt.error)===null||Tt===void 0)&&Tt.message){console.error(_t.data.error.message),(In=(nn=ve.callsettings.getCallEventListener())===null||nn===void 0?void 0:nn.onError)===null||In===void 0||In.call(nn,new Bt({code:Ne.API_ERROR.code,message:(Wn=(Xn=_t==null?void 0:_t.data)===null||Xn===void 0?void 0:Xn.error)===null||Wn===void 0?void 0:Wn.message}));return}if(ve.callsettings.user=lt(lt({},_t.data.data.payload.data.user),{jwt:ve.props.callToken}),ve.callsettings.sessionID=_t.data.data.payload.room,ve.callsettings.appId=_t.data.data.payload.data.appId,ve.callsettings.domain=_t.data.data.settings.WEBRTC_HOST,typeof ve.callsettings.analyticsSettings!="object"&&(ve.callsettings.analyticsSettings={}),!((ot=(Ke=(cr=_t==null?void 0:_t.data)===null||cr===void 0?void 0:cr.data)===null||Ke===void 0?void 0:Ke.settings)===null||ot===void 0)&&ot.ANALYTICS_HOST&&(ve.callsettings.analyticsSettings.ANALYTICS_HOST=_t.data.data.settings.ANALYTICS_HOST),!((Cn=(Pt=(Et=_t==null?void 0:_t.data)===null||Et===void 0?void 0:Et.data)===null||Pt===void 0?void 0:Pt.settings)===null||Cn===void 0)&&Cn.ANALYTICS_VERSION&&(ve.callsettings.analyticsSettings.ANALYTICS_VERSION=_t.data.data.settings.ANALYTICS_VERSION),Ee.presenterMode)if(((tt=(Pe=(ln=_t==null?void 0:_t.data)===null||ln===void 0?void 0:ln.data)===null||Pe===void 0?void 0:Pe.settings)===null||tt===void 0?void 0:tt.PRESENTER_MODE_ENABLED)===!0)ve.setState({shouldLoad:!0,errored:!1});else{var En=new Bt({code:Ne.ERROR_PRESENTER_MODE.code,message:Ne.ERROR_PRESENTER_MODE.message});(Ut=(St=ve.callsettings.getCallEventListener())===null||St===void 0?void 0:St.onError)===null||Ut===void 0||Ut.call(St,En),(Zt=g==null?void 0:g.callHandlers)===null||Zt===void 0||Zt.map(function(yn){var on;(on=yn==null?void 0:yn.onError)===null||on===void 0||on.call(yn,En)}),console.error(En),ve.setState({shouldLoad:!1,errored:!0})}else ve.setState({shouldLoad:!0,errored:!1})}).catch(function(_t){var Vt,Tt;(Tt=(Vt=ve.callsettings.getCallEventListener())===null||Vt===void 0?void 0:Vt.onError)===null||Tt===void 0||Tt.call(Vt,new Bt({code:Ne.API_ERROR.code,message:"Unknown API error",details:_t})),console.error(_t),ve.setState({errored:!0})})}).catch(function(et){var We,Ot;console.error(et),(Ot=(We=ve.callsettings.getCallEventListener())===null||We===void 0?void 0:We.onError)===null||Ot===void 0||Ot.call(We,new Bt({code:Ne.API_ERROR.code,message:"Unknown API error",details:et})),ve.setState({errored:!0})}),ve)}return ee.prototype.render=function(){var Ee=this;return this.state.errored?J().createElement(at,{message:"Something went wrong! Please check logs for more details."}):this.state.shouldLoad?J().createElement(Z.View,{style:{flex:1,backgroundColor:"#000"}},J().createElement(d(),{ref:function(ve){return ee.ref=ve},style:{flex:1,backgroundColor:"#000"},callsettings:this.callsettings,onEndCall:function(){var ve,et,We;(et=(ve=Ee.callsettings.getCallEventListener())===null||ve===void 0?void 0:ve.onCallEnded)===null||et===void 0||et.call(ve),(We=g==null?void 0:g.callHandlers)===null||We===void 0||We.map(function(Ot){var _t;(_t=Ot==null?void 0:Ot.onCallEnded)===null||_t===void 0||_t.call(Ot)}),g&&(g.callHandlers=[])},onCallEndButtonPressed:function(){var ve,et,We;(et=(ve=Ee.callsettings.getCallEventListener())===null||ve===void 0?void 0:ve.onCallEndButtonPressed)===null||et===void 0||et.call(ve),(We=g==null?void 0:g.callHandlers)===null||We===void 0||We.map(function(Ot){var _t;(_t=Ot==null?void 0:Ot.onCallEndButtonPressed)===null||_t===void 0||_t.call(Ot)})},onUserJoined:function(ve){var et,We,Ot;ve&&(ve!=null&&ve.uid)&&(ve!=null&&ve.name)&&("jwt"in ve&&delete ve.jwt,"audioTrack"in ve&&delete ve.audioTrack,"videoTrack"in ve&&delete ve.videoTrack,"resource"in ve&&delete ve.resource,(We=(et=Ee.callsettings.getCallEventListener())===null||et===void 0?void 0:et.onUserJoined)===null||We===void 0||We.call(et,ve),(Ot=g==null?void 0:g.callHandlers)===null||Ot===void 0||Ot.map(function(_t){var Vt;(Vt=_t==null?void 0:_t.onUserJoined)===null||Vt===void 0||Vt.call(_t,ve)}))},onUserLeft:function(ve){var et,We,Ot;ve&&(ve!=null&&ve.uid)&&(ve!=null&&ve.name)&&("jwt"in ve&&delete ve.jwt,"audioTrack"in ve&&delete ve.audioTrack,"videoTrack"in ve&&delete ve.videoTrack,"resource"in ve&&delete ve.resource,(We=(et=Ee.callsettings.getCallEventListener())===null||et===void 0?void 0:et.onUserLeft)===null||We===void 0||We.call(et,ve),(Ot=g==null?void 0:g.callHandlers)===null||Ot===void 0||Ot.map(function(_t){var Vt;(Vt=_t==null?void 0:_t.onUserLeft)===null||Vt===void 0||Vt.call(_t,ve)}))},onUserListChanged:function(ve){var et,We,Ot;Array.isArray(ve)&&((We=(et=Ee.callsettings.getCallEventListener())===null||et===void 0?void 0:et.onUserListUpdated)===null||We===void 0||We.call(et,ve),(Ot=g==null?void 0:g.callHandlers)===null||Ot===void 0||Ot.map(function(_t){var Vt;(Vt=_t==null?void 0:_t.onUserListUpdated)===null||Vt===void 0||Vt.call(_t,ve)}))},onAudioModeChanged:function(ve){var et,We,Ot;ve&&ve.length>0&&((We=(et=Ee.callsettings.getCallEventListener())===null||et===void 0?void 0:et.onAudioModesUpdated)===null||We===void 0||We.call(et,ve),(Ot=g==null?void 0:g.callHandlers)===null||Ot===void 0||Ot.map(function(_t){var Vt;(Vt=_t==null?void 0:_t.onAudioModesUpdated)===null||Vt===void 0||Vt.call(_t,ve)}))},onRecordingToggled:function(ve){var et,We,Ot,_t,Vt,Tt,nn,In;if(ve&&ve.hasOwnProperty("user")&&ve.hasOwnProperty("recordingStarted")&&!((et=ve.user)===null||et===void 0)&&et.uid&&!((We=ve.user)===null||We===void 0)&&We.name){var Xn=ve.recordingStarted;"jwt"in ve.user&&delete ve.user.jwt,"audioTrack"in ve.user&&delete ve.user.audioTrack,"videoTrack"in ve.user&&delete ve.user.videoTrack,"resource"in ve.user&&delete ve.user.resource,Xn?((_t=(Ot=Ee.callsettings.getCallEventListener())===null||Ot===void 0?void 0:Ot.onRecordingStarted)===null||_t===void 0||_t.call(Ot,ve.user),(Vt=g==null?void 0:g.callHandlers)===null||Vt===void 0||Vt.map(function(Wn){var cr;(cr=Wn==null?void 0:Wn.onRecordingStarted)===null||cr===void 0||cr.call(Wn,ve.user)})):((nn=(Tt=Ee.callsettings.getCallEventListener())===null||Tt===void 0?void 0:Tt.onRecordingStopped)===null||nn===void 0||nn.call(Tt,ve.user),(In=g==null?void 0:g.callHandlers)===null||In===void 0||In.map(function(Wn){var cr;(cr=Wn==null?void 0:Wn.onRecordingStopped)===null||cr===void 0||cr.call(Wn,ve.user)}))}},onCallSwitchedToVideo:function(ve){var et,We,Ot;ve&&((We=(et=Ee.callsettings.getCallEventListener())===null||et===void 0?void 0:et.onCallSwitchedToVideo)===null||We===void 0||We.call(et,ve.user),(Ot=g==null?void 0:g.callHandlers)===null||Ot===void 0||Ot.map(function(_t){var Vt;(Vt=_t==null?void 0:_t.onCallSwitchedToVideo)===null||Vt===void 0||Vt.call(_t,ve.user)}))},onUserMuted:function(ve){var et,We,Ot;ve&&((We=(et=Ee.callsettings.getCallEventListener())===null||et===void 0?void 0:et.onUserMuted)===null||We===void 0||We.call(et,ve.user),(Ot=g==null?void 0:g.callHandlers)===null||Ot===void 0||Ot.map(function(_t){var Vt;(Vt=_t==null?void 0:_t.onUserMuted)===null||Vt===void 0||Vt.call(_t,ve.user)}))}})):J().createElement(at,{message:"Initializing..."})},ee.ref=null,ee}(J().Component),tn=function(){var ae=function(ee,Ee){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,et){ve.__proto__=et}||function(ve,et){for(var We in et)Object.prototype.hasOwnProperty.call(et,We)&&(ve[We]=et[We])},ae(ee,Ee)};return function(ee,Ee){if(typeof Ee!="function"&&Ee!==null)throw new TypeError("Class extends value "+String(Ee)+" is not a constructor or null");ae(ee,Ee);function ve(){this.constructor=ee}ee.prototype=Ee===null?Object.create(Ee):(ve.prototype=Ee.prototype,new ve)}}(),er=function(){return er=Object.assign||function(ae){for(var ee,Ee=1,ve=arguments.length;Ee<ve;Ee++){ee=arguments[Ee];for(var et in ee)Object.prototype.hasOwnProperty.call(ee,et)&&(ae[et]=ee[et])}return ae},er.apply(this,arguments)},rr=function(ae){tn(ee,ae);function ee(Ee){var ve=ae.call(this,Ee)||this;return ve.state={errored:!1},ve.props.presenterSettings.mode="PRESENTER",ve.props.presenterSettings instanceof ie||(ve.state=er(er({},ve.state),{errored:!0}),console.error(new Bt({code:Ne.INVALID_PROP_EXCEPTION.code,message:"Component requires valid presenterSettings.",details:"Component requires valid presenterSettings."}))),ve}return ee.prototype.render=function(){return this.state.errored?J().createElement(at,{message:"Something went wrong! Please check logs for more details."}):J().createElement(ye,{callSettings:this.props.presenterSettings,callToken:this.props.callToken,presenterMode:!0})},ee}(J().Component),or=function(ae,ee,Ee,ve){function et(We){return We instanceof Ee?We:new Ee(function(Ot){Ot(We)})}return new(Ee||(Ee=Promise))(function(We,Ot){function _t(nn){try{Tt(ve.next(nn))}catch(In){Ot(In)}}function Vt(nn){try{Tt(ve.throw(nn))}catch(In){Ot(In)}}function Tt(nn){nn.done?We(nn.value):et(nn.value).then(_t,Vt)}Tt((ve=ve.apply(ae,ee||[])).next())})},dn=function(ae,ee){var Ee={label:0,sent:function(){if(We[0]&1)throw We[1];return We[1]},trys:[],ops:[]},ve,et,We,Ot;return Ot={next:_t(0),throw:_t(1),return:_t(2)},typeof Symbol=="function"&&(Ot[Symbol.iterator]=function(){return this}),Ot;function _t(Tt){return function(nn){return Vt([Tt,nn])}}function Vt(Tt){if(ve)throw new TypeError("Generator is already executing.");for(;Ot&&(Ot=0,Tt[0]&&(Ee=0)),Ee;)try{if(ve=1,et&&(We=Tt[0]&2?et.return:Tt[0]?et.throw||((We=et.return)&&We.call(et),0):et.next)&&!(We=We.call(et,Tt[1])).done)return We;switch(et=0,We&&(Tt=[Tt[0]&2,We.value]),Tt[0]){case 0:case 1:We=Tt;break;case 4:return Ee.label++,{value:Tt[1],done:!1};case 5:Ee.label++,et=Tt[1],Tt=[0];continue;case 7:Tt=Ee.ops.pop(),Ee.trys.pop();continue;default:if(We=Ee.trys,!(We=We.length>0&&We[We.length-1])&&(Tt[0]===6||Tt[0]===2)){Ee=0;continue}if(Tt[0]===3&&(!We||Tt[1]>We[0]&&Tt[1]<We[3])){Ee.label=Tt[1];break}if(Tt[0]===6&&Ee.label<We[1]){Ee.label=We[1],We=Tt;break}if(We&&Ee.label<We[2]){Ee.label=We[2],Ee.ops.push(Tt);break}We[2]&&Ee.ops.pop(),Ee.trys.pop();continue}Tt=ee.call(ae,Ee)}catch(nn){Tt=[6,nn],et=0}finally{ve=We=0}if(Tt[0]&5)throw Tt[1];return{value:Tt[0]?Tt[1]:void 0,done:!0}}},mt=function(){function ae(){}return ae.generateToken=function(ee,Ee){var ve,et,We,Ot,_t;return or(this,void 0,void 0,function(){var Vt;return dn(this,function(Tt){switch(Tt.label){case 0:return[4,zt(this.appSettings)];case 1:if(Tt.sent(),!Ee||!ee)throw new Bt({code:Ne.INVALID_ARGUMENT_EXCEPTION.code,message:"Authtoken and session is required."});return[4,ue.generateToken(Ee,ee,this.appSettings)];case 2:if(Vt=Tt.sent(),!(!((ve=Vt==null?void 0:Vt.data)===null||ve===void 0)&&ve.data))throw!((We=(et=Vt==null?void 0:Vt.data)===null||et===void 0?void 0:et.error)===null||We===void 0)&&We.message?new Bt({code:Ne.API_ERROR.code,message:(_t=(Ot=Vt==null?void 0:Vt.data)===null||Ot===void 0?void 0:Ot.error)===null||_t===void 0?void 0:_t.message}):new Bt({code:Ne.UNKNOWN_API_ERROR.code,message:Ne.UNKNOWN_API_ERROR.message});return[2,Vt.data.data]}})})},ae.init=function(ee){return or(this,void 0,void 0,function(){return dn(this,function(Ee){switch(Ee.label){case 0:return[4,zt(ee)];case 1:return Ee.sent(),this.appSettings=ee,[2]}})})},ae.endCall=function(){var ee;try{(ee=ye==null?void 0:ye.ref)===null||ee===void 0||ee.endCall()}catch(Ee){v.log("CometChatCalls :: endCall",Ee),m(Ee)}},ae.muteAudio=function(ee){var Ee,ve;try{ee?(Ee=ye==null?void 0:ye.ref)===null||Ee===void 0||Ee.muteAudio():(ve=ye==null?void 0:ye.ref)===null||ve===void 0||ve.unMuteAudio()}catch(et){v.log("CometChatCalls :: muteAudio",et),m(et)}},ae.pauseVideo=function(ee){var Ee,ve;try{ee?(Ee=ye==null?void 0:ye.ref)===null||Ee===void 0||Ee.pauseVideo():(ve=ye==null?void 0:ye.ref)===null||ve===void 0||ve.unPauseVideo()}catch(et){v.log("CometChatCalls :: pauseVideo",et),m(et)}},ae.resumeVideo=function(){var ee;try{(ee=ye==null?void 0:ye.ref)===null||ee===void 0||ee.unPauseVideo()}catch(Ee){v.log("CometChatCalls :: resumeVideo",Ee),m(Ee)}},ae.setAudioMode=function(ee){var Ee;try{ee&&((Ee=ye==null?void 0:ye.ref)===null||Ee===void 0||Ee.setAudioMode(ee))}catch(ve){v.log("CometChatCalls :: setAudioMode",ve),m(ve)}},ae.switchCamera=function(){var ee,Ee;try{(Ee=(ee=ye==null?void 0:ye.ref)===null||ee===void 0?void 0:ee.switchCamera)===null||Ee===void 0||Ee.call(ee)}catch(ve){v.log("CometChatCalls :: switchCamera",ve),m(ve)}},ae.getAudioOutputModes=function(){try{return new Promise(function(ee,Ee){var ve;(ve=ye==null?void 0:ye.ref)===null||ve===void 0||ve.getAudioModes().then(function(et){ee(et)},function(et){Ee(et)})})}catch(ee){v.log("CometChatCalls :: getAudioOutputModes",ee),m(ee)}},ae.switchToVideoCall=function(){var ee;try{(ee=ye==null?void 0:ye.ref)===null||ee===void 0||ee.switchToVideoCall()}catch(Ee){v.log("CometChatCalls :: switchToVideoCall",Ee),m(Ee)}},ae.startRecording=function(){var ee;try{(ee=ye==null?void 0:ye.ref)===null||ee===void 0||ee.startRecording()}catch(Ee){v.log("CometChatCalls :: startRecording",Ee),m(Ee)}},ae.stopRecording=function(){var ee;try{(ee=ye==null?void 0:ye.ref)===null||ee===void 0||ee.stopRecording()}catch(Ee){v.log("CometChatCalls :: stopRecording",Ee),m(Ee)}},ae.getAppSettings=function(){return this.appSettings},ae.CALL_MODE=ce.CALL_MODE,ae.AUDIO_MODE=ce.AUDIO_MODE,ae.addCallEventListener=g.addCallEventListener,ae.removeCallEventListener=g.removeCallEventListener,ae.OngoingCallListener=y,ae.CallSettingsBuilder=Le,ae.CallSettings=K,ae.PresenterSettingsBuilder=we,ae.PresenterSettings=ie,ae.CallAppSettingsBuilder=yt,ae.CallAppSettings=mn,ae.Component=ye,ae.PresenterComponent=rr,ae}();const Xt=S})(),__webpack_exports__})());
|