@fraku/video 0.1.45 → 0.1.46
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/dist/index.cjs
CHANGED
|
@@ -1018,7 +1018,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1018
1018
|
`}else if(nt=="subjectAltName"){var Zi=z(this.getExtSubjectAltName());ue+=Zi+`
|
|
1019
1019
|
`}else if(nt=="cRLDistributionPoints"){var Vi=this.getExtCRLDistributionPoints();ue+=te(Vi)}else if(nt=="authorityInfoAccess"){var Hf=this.getExtAuthorityInfoAccess();ue+=K(Hf)}else nt=="certificatePolicies"&&(ue+=Y(this.getExtCertificatePolicies()))}}return ue+="signature algorithm: "+this.getSignatureAlgorithmName()+`
|
|
1020
1020
|
`,ue+="signature: "+this.getSignatureValueHex().substr(0,16)+`...
|
|
1021
|
-
`,ue},typeof u=="string"&&(u.indexOf("-----BEGIN")!=-1?this.readCertPEM(u):I.lang.String.isHex(u)&&this.readCertHex(u))}Qr.EXT_PARSER={},Qr.registExtParser=function(u,f){Qr.EXT_PARSER[u]=f},Qr.hex2dn=function(u,f){f===void 0&&(f=0);var h=new Qr;er.getTLV(u,f);var g=h.getX500Name(u);return g.str},Qr.hex2rdn=function(u,f){if(f===void 0&&(f=0),u.substr(f,2)!=="31")throw new Error("malformed RDN");for(var h=new Array,g=er.getChildIdx(u,f),w=0;w<g.length;w++)h.push(Qr.hex2attrTypeValue(u,g[w]));return h=h.map(function(E){return E.replace("+","\\+")}),h.join("+")},Qr.hex2attrTypeValue=function(u,f){var h=er,g=h.getV;if(f===void 0&&(f=0),u.substr(f,2)!=="30")throw new Error("malformed attribute type and value");var w=h.getChildIdx(u,f);w.length!==2||u.substr(w[0],2);var E=g(u,w[0]),_=I.asn1.ASN1Util.oidHexToInt(E),O=I.asn1.x509.OID.oid2atype(_),j=g(u,w[1]),N=ca(j);return O+"="+N},Qr.getPublicKeyFromCertHex=function(u){var f=new Qr;return f.readCertHex(u),f.getPublicKey()},Qr.getPublicKeyFromCertPEM=function(u){var f=new Qr;return f.readCertPEM(u),f.getPublicKey()},Qr.getPublicKeyInfoPropOfCertPEM=function(u){var f=er,h=f.getVbyList,g={},w,E;return g.algparam=null,w=new Qr,w.readCertPEM(u),E=w.getPublicKeyHex(),g.keyhex=h(E,0,[1],"03").substr(2),g.algoid=h(E,0,[0,0],"06"),g.algoid==="2a8648ce3d0201"&&(g.algparam=h(E,0,[0,1],"06")),g},Qr.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"];var jF=function(u){var f=I,h=f.lang.String.isHex,g=er,w=g.getV,E=g.getTLV,_=g.getVbyList,O=g.getTLVbyList,j=g.getTLVbyListEx,N=g.getIdxbyList,U=g.getIdxbyListEx,V=g.getChildIdx,T=new Qr;this.hex=null,this.posSigAlg=null,this.posRevCert=null,this.parsed=null,this._setPos=function(){var M=N(this.hex,0,[0,0]),P=this.hex.substr(M,2);if(P=="02")this.posSigAlg=1;else if(P=="30")this.posSigAlg=0;else throw new Error("malformed 1st item of TBSCertList: "+P);var L=N(this.hex,0,[0,this.posSigAlg+3]),B=this.hex.substr(L,2);if(B=="17"||B=="18"){var W,pe;W=N(this.hex,0,[0,this.posSigAlg+4]),this.posRevCert=null,W!=-1&&(pe=this.hex.substr(W,2),pe=="30"&&(this.posRevCert=this.posSigAlg+4))}else if(B=="30")this.posRevCert=this.posSigAlg+3;else if(B=="a0")this.posRevCert=null;else throw new Error("malformed nextUpdate or revCert tag: "+B)},this.getVersion=function(){return this.posSigAlg==0?null:parseInt(_(this.hex,0,[0,0],"02"),16)+1},this.getSignatureAlgorithmField=function(){var M=O(this.hex,0,[0,this.posSigAlg],"30");return T.getAlgorithmIdentifierName(M)},this.getIssuer=function(){return T.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return O(this.hex,0,[0,this.posSigAlg+1],"30")},this.getThisUpdate=function(){var M=_(this.hex,0,[0,this.posSigAlg+2]);return result=ca(M)},this.getNextUpdate=function(){var M=N(this.hex,0,[0,this.posSigAlg+3]),P=this.hex.substr(M,2);return P!="17"&&P!="18"?null:ca(w(this.hex,M))},this.getRevCertArray=function(){if(this.posRevCert==null)return null;for(var M=[],P=N(this.hex,0,[0,this.posRevCert]),L=V(this.hex,P),B=0;B<L.length;B++){var W=E(this.hex,L[B]);M.push(this.getRevCert(W))}return M},this.getRevCert=function(M){var P={},L=V(M,0);return P.sn={hex:_(M,0,[0],"02")},P.date=ca(_(M,0,[1])),L.length==3&&(P.ext=T.getExtParamArray(O(M,0,[2]))),P},this.findRevCert=function(M){var P=new Qr(M),L=P.getSerialNumberHex();return this.findRevCertBySN(L)},this.findRevCertBySN=function(M){if(this.parsed==null&&this.getParam(),this.parsed.revcert==null)return null;for(var P=this.parsed.revcert,L=0;L<P.length;L++)if(M==P[L].sn.hex)return P[L];return null},this.getSignatureValueHex=function(){return _(this.hex,0,[2],"03",!0)},this.verifySignature=function(M){var P=this.getSignatureAlgorithmField(),L=this.getSignatureValueHex(),B=O(this.hex,0,[0],"30"),W=new I.crypto.Signature({alg:P});return W.init(M),W.updateHex(B),W.verify(L)},this.getParam=function(M){var P={},L=this.getVersion();L!=null&&(P.version=L),P.sigalg=this.getSignatureAlgorithmField(),P.issuer=this.getIssuer(),P.thisupdate=this.getThisUpdate();var B=this.getNextUpdate();B!=null&&(P.nextupdate=B);var W=this.getRevCertArray();W!=null&&(P.revcert=W);var pe=U(this.hex,0,[0,"[0]"]);if(pe!=-1){var Me=j(this.hex,0,[0,"[0]",0]);P.ext=T.getExtParamArray(Me)}return P.sighex=this.getSignatureValueHex(),this.parsed=P,typeof M=="object"&&(M.tbshex==!0&&(P.tbshex=O(this.hex,0,[0])),M.nodnarray==!0&&delete P.issuer.array),P},typeof u=="string"&&(h(u)?this.hex=u:u.match(/-----BEGIN X509 CRL/)&&(this.hex=je(u)),this._setPos())};return(typeof I>"u"||!I)&&(I={}),(typeof I.jws>"u"||!I.jws)&&(I.jws={}),I.jws.JWS=function(){var u=I,f=u.jws.JWS,h=f.isSafeJSONString;this.parseJWS=function(g,w){if(!(this.parsedJWS!==void 0&&(w||this.parsedJWS.sigvalH!==void 0))){var E=g.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(E==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var _=E[1],O=E[2],j=E[3],N=_+"."+O;if(this.parsedJWS={},this.parsedJWS.headB64U=_,this.parsedJWS.payloadB64U=O,this.parsedJWS.sigvalB64U=j,this.parsedJWS.si=N,!w){var U=Xn(j),V=ln(U,16);this.parsedJWS.sigvalH=U,this.parsedJWS.sigvalBI=V}var T=Va(_),M=Va(O);if(this.parsedJWS.headS=T,this.parsedJWS.payloadS=M,!h(T,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+T}}},I.jws.JWS.sign=function(u,f,h,g,w){var E=I,_=E.jws,O=_.JWS,j=O.readSafeJSONString,N=O.isSafeJSONString,U=E.crypto;U.ECDSA;var V=U.Mac,T=U.Signature,M=JSON,P,L,B;if(typeof f!="string"&&typeof f!="object")throw"spHeader must be JSON string or object: "+f;if(typeof f=="object"&&(L=f,P=M.stringify(L)),typeof f=="string"){if(P=f,!N(P))throw"JWS Head is not safe JSON string: "+P;L=j(P)}if(B=h,typeof h=="object"&&(B=M.stringify(h)),(u==""||u==null)&&L.alg!==void 0&&(u=L.alg),u!=""&&u!=null&&L.alg===void 0&&(L.alg=u,P=M.stringify(L)),u!==L.alg)throw"alg and sHeader.alg doesn't match: "+u+"!="+L.alg;var W=null;if(O.jwsalg2sigalg[u]===void 0)throw"unsupported alg name: "+u;W=O.jwsalg2sigalg[u];var pe=Eu(P),Me=Eu(B),Ne=pe+"."+Me,Le="";if(W.substr(0,4)=="Hmac"){if(g===void 0)throw"mac key shall be specified for HS* alg";var z=new V({alg:W,prov:"cryptojs",pass:g});z.updateString(Ne),Le=z.doFinal()}else if(W.indexOf("withECDSA")!=-1){var Y=new T({alg:W});Y.init(g,w),Y.updateString(Ne);var te=Y.sign();Le=I.crypto.ECDSA.asn1SigToConcatSig(te)}else if(W!="none"){var Y=new T({alg:W});Y.init(g,w),Y.updateString(Ne),Le=Y.sign()}var K=ti(Le);return Ne+"."+K},I.jws.JWS.verify=function(u,f,h){var g=I,w=g.jws,E=w.JWS,_=E.readSafeJSONString,O=g.crypto,j=O.ECDSA,N=O.Mac,U=O.Signature,V;if(typeof kr!==void 0&&(V=kr),!dS(u))return!1;var T=u.split(".");if(T.length!==3)return!1;var M=T[0],P=T[1],L=M+"."+P,B=Xn(T[2]),W=_(Va(T[0])),pe=null,Me=null;if(W.alg===void 0)throw"algorithm not specified in header";if(pe=W.alg,Me=pe.substr(0,2),h!=null&&Object.prototype.toString.call(h)==="[object Array]"&&h.length>0){var Ne=":"+h.join(":")+":";if(Ne.indexOf(":"+pe+":")==-1)throw"algorithm '"+pe+"' not accepted in the list"}if(pe!="none"&&f===null)throw"key shall be specified to verify.";if(typeof f=="string"&&f.indexOf("-----BEGIN ")!=-1&&(f=Sn.getKey(f)),(Me=="RS"||Me=="PS")&&!(f instanceof V))throw"key shall be a RSAKey obj for RS* and PS* algs";if(Me=="ES"&&!(f instanceof j))throw"key shall be a ECDSA obj for ES* algs";var Le=null;if(E.jwsalg2sigalg[W.alg]===void 0)throw"unsupported alg name: "+pe;if(Le=E.jwsalg2sigalg[pe],Le=="none")throw"not supported";if(Le.substr(0,4)=="Hmac"){var z=null;if(f===void 0)throw"hexadecimal key shall be specified for HMAC";var Y=new N({alg:Le,pass:f});return Y.updateString(L),z=Y.doFinal(),B==z}else if(Le.indexOf("withECDSA")!=-1){var te=null;try{te=j.concatSigToASN1Sig(B)}catch{return!1}var K=new U({alg:Le});return K.init(f),K.updateString(L),K.verify(te)}else{var K=new U({alg:Le});return K.init(f),K.updateString(L),K.verify(B)}},I.jws.JWS.parse=function(u){var f=u.split("."),h={},g,w,E;if(f.length!=2&&f.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";return g=f[0],w=f[1],f.length==3&&(E=f[2]),h.headerObj=I.jws.JWS.readSafeJSONString(Va(g)),h.payloadObj=I.jws.JWS.readSafeJSONString(Va(w)),h.headerPP=JSON.stringify(h.headerObj,null," "),h.payloadObj==null?h.payloadPP=Va(w):h.payloadPP=JSON.stringify(h.payloadObj,null," "),E!==void 0&&(h.sigHex=Xn(E)),h},I.jws.JWS.verifyJWT=function(u,f,h){var g=I,w=g.jws,E=w.JWS,_=E.readSafeJSONString,O=E.inArray,j=E.includedArray;if(!dS(u))return!1;var N=u.split(".");if(N.length!=3)return!1;var U=N[0],V=N[1];Xn(N[2]);var T=_(Va(U)),M=_(Va(V));if(T.alg===void 0)return!1;if(h.alg===void 0)throw"acceptField.alg shall be specified";if(!O(T.alg,h.alg)||M.iss!==void 0&&typeof h.iss=="object"&&!O(M.iss,h.iss)||M.sub!==void 0&&typeof h.sub=="object"&&!O(M.sub,h.sub))return!1;if(M.aud!==void 0&&typeof h.aud=="object"){if(typeof M.aud=="string"){if(!O(M.aud,h.aud))return!1}else if(typeof M.aud=="object"&&!j(M.aud,h.aud))return!1}var P=w.IntDate.getNow();return h.verifyAt!==void 0&&typeof h.verifyAt=="number"&&(P=h.verifyAt),(h.gracePeriod===void 0||typeof h.gracePeriod!="number")&&(h.gracePeriod=0),!(M.exp!==void 0&&typeof M.exp=="number"&&M.exp+h.gracePeriod<P||M.nbf!==void 0&&typeof M.nbf=="number"&&P<M.nbf-h.gracePeriod||M.iat!==void 0&&typeof M.iat=="number"&&P<M.iat-h.gracePeriod||M.jti!==void 0&&h.jti!==void 0&&M.jti!==h.jti||!E.verify(u,f,h.alg))},I.jws.JWS.includedArray=function(u,f){var h=I.jws.JWS.inArray;if(u===null||typeof u!="object"||typeof u.length!="number")return!1;for(var g=0;g<u.length;g++)if(!h(u[g],f))return!1;return!0},I.jws.JWS.inArray=function(u,f){if(f===null||typeof f!="object"||typeof f.length!="number")return!1;for(var h=0;h<f.length;h++)if(f[h]==u)return!0;return!1},I.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",ES512:"SHA512withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},I.jws.JWS.isSafeJSONString=function(u,f,h){var g=null;try{return g=qd(u),typeof g!="object"||g.constructor===Array?0:(f&&(f[h]=g),1)}catch{return 0}},I.jws.JWS.readSafeJSONString=function(u){var f=null;try{return f=qd(u),typeof f!="object"||f.constructor===Array?null:f}catch{return null}},I.jws.JWS.getEncodedSignatureValueFromJWS=function(u){var f=u.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(f==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return f[1]},I.jws.JWS.getJWKthumbprint=function(u){if(u.kty!=="RSA"&&u.kty!=="EC"&&u.kty!=="oct")throw"unsupported algorithm for JWK Thumprint";var f="{";if(u.kty==="RSA"){if(typeof u.n!="string"||typeof u.e!="string")throw"wrong n and e value for RSA key";f+='"e":"'+u.e+'",',f+='"kty":"'+u.kty+'",',f+='"n":"'+u.n+'"}'}else if(u.kty==="EC"){if(typeof u.crv!="string"||typeof u.x!="string"||typeof u.y!="string")throw"wrong crv, x and y value for EC key";f+='"crv":"'+u.crv+'",',f+='"kty":"'+u.kty+'",',f+='"x":"'+u.x+'",',f+='"y":"'+u.y+'"}'}else if(u.kty==="oct"){if(typeof u.k!="string")throw"wrong k value for oct(symmetric) key";f+='"kty":"'+u.kty+'",',f+='"k":"'+u.k+'"}'}var h=Es(f),g=I.crypto.Util.hashHex(h,"sha256"),w=ti(g);return w},I.jws.IntDate={},I.jws.IntDate.get=function(u){var f=I.jws.IntDate,h=f.getNow,g=f.getZulu;if(u=="now")return h();if(u=="now + 1hour")return h()+3600;if(u=="now + 1day")return h()+3600*24;if(u=="now + 1month")return h()+3600*24*30;if(u=="now + 1year")return h()+3600*24*365;if(u.match(/Z$/))return g(u);if(u.match(/^[0-9]+$/))return parseInt(u);throw"unsupported format: "+u},I.jws.IntDate.getZulu=function(u){return hr(u)},I.jws.IntDate.getNow=function(){var u=~~(new Date/1e3);return u},I.jws.IntDate.intDate2UTCString=function(u){var f=new Date(u*1e3);return f.toUTCString()},I.jws.IntDate.intDate2Zulu=function(u){var f=new Date(u*1e3),h=("0000"+f.getUTCFullYear()).slice(-4),g=("00"+(f.getUTCMonth()+1)).slice(-2),w=("00"+f.getUTCDate()).slice(-2),E=("00"+f.getUTCHours()).slice(-2),_=("00"+f.getUTCMinutes()).slice(-2),O=("00"+f.getUTCSeconds()).slice(-2);return h+g+w+E+_+O+"Z"},(typeof I>"u"||!I)&&(I={}),(typeof I.jws>"u"||!I.jws)&&(I.jws={}),I.jws.JWSJS=function(){var u=I,f=u.jws,h=f.JWS,g=h.readSafeJSONString;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(w){this.init();var E=w.split(".");if(E.length!=3)throw"malformed input JWS";this.aHeader.push(E[0]),this.sPayload=E[1],this.aSignature.push(E[2])},this.addSignature=function(w,E,_,O){if(this.sPayload===void 0||this.sPayload===null)throw"there's no JSON-JS signature to add.";var j=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var N=I.jws.JWS.sign(w,E,this.sPayload,_,O),U=N.split("."),V=U[0],T=U[2];this.aHeader.push(U[0]),this.aSignature.push(U[2])}catch(M){throw this.aHeader.length>j&&this.aHeader.pop(),this.aSignature.length>j&&this.aSignature.pop(),"addSignature failed: "+M}},this.verifyAll=function(w){if(this.aHeader.length!==w.length||this.aSignature.length!==w.length)return!1;for(var E=0;E<w.length;E++){var _=w[E];if(_.length!==2)return!1;var O=this.verifyNth(E,_[0],_[1]);if(O===!1)return!1}return!0},this.verifyNth=function(w,E,_){if(this.aHeader.length<=w||this.aSignature.length<=w)return!1;var O=this.aHeader[w],j=this.aSignature[w],N=O+"."+this.sPayload+"."+j,U=!1;try{U=h.verify(N,E,_)}catch{return!1}return U},this.readJWSJS=function(w){if(typeof w=="string"){var E=g(w);if(E==null)throw"argument is not safe JSON object string";this.aHeader=E.headers,this.sPayload=E.payload,this.aSignature=E.signatures}else try{if(w.headers.length>0)this.aHeader=w.headers;else throw"malformed header";if(typeof w.payload=="string")this.sPayload=w.payload;else throw"malformed signatures";if(w.signatures.length>0)this.aSignature=w.signatures;else throw"malformed signatures"}catch(_){throw"malformed JWS-JS JSON object: "+_}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return this.aHeader.length==0?1:0}},lr.SecureRandom=Rn,lr.rng_seed_time=Li,lr.BigInteger=p,lr.RSAKey=kr,lr.ECDSA=I.crypto.ECDSA,lr.DSA=I.crypto.DSA,lr.Signature=I.crypto.Signature,lr.MessageDigest=I.crypto.MessageDigest,lr.Mac=I.crypto.Mac,lr.KEYUTIL=Sn,lr.ASN1HEX=er,lr.X509=Qr,lr.X509CRL=jF,lr.CryptoJS=o,lr.b64tohex=l,lr.b64toBA=c,lr.ECFieldElementFp=No,lr.ECPointFp=Nn,lr.ECCurveFp=Vs,lr.stoBA=Og,lr.BAtos=_g,lr.BAtohex=Jd,lr.stohex=ua,lr.stob64=iS,lr.stob64u=Pg,lr.b64utos=aS,lr.b64tob64u=Su,lr.b64utob64=Tc,lr.hex2b64=s,lr.hextob64u=ti,lr.b64utohex=Xn,lr.utf8tob64u=Eu,lr.b64utoutf8=Va,lr.utf8tob64=sS,lr.b64toutf8=xg,lr.utf8tohex=Qd,lr.hextoutf8=Hn,lr.hextorstr=ca,lr.rstrtohex=Es,lr.hextob64=jf,lr.hextob64nl=cS,lr.b64nltohex=Dg,lr.hextopem=ye,lr.pemtohex=je,lr.hextoArrayBuffer=Dt,lr.ArrayBuffertohex=$t,lr.zulutomsec=kt,lr.msectozulu=rr,lr.zulutosec=hr,lr.zulutodate=Rr,lr.datetozulu=Lr,lr.uricmptohex=bn,lr.hextouricmp=co,lr.ipv6tohex=Ii,lr.hextoipv6=es,lr.hextoip=ts,lr.iptohex=da,lr.ucs2hextoutf8=Vf,lr.encodeURIComponentAll=wu,lr.newline_toUnix=Xd,lr.newline_toDos=MF,lr.hextoposhex=pS,lr.intarystrtohex=kF,lr.strdiffidx=LF,lr.oidtohex=kR,lr.hextooid=Ng,lr.strpad=Mg,lr.bitstrtoint=FR,lr.inttobitstr=jR,lr.bitstrtobinstr=VR,lr.binstrtobitstr=FF,lr.isBase64URLDot=dS,lr.namearraytobinstr=kg,lr.extendClass=bt,lr.foldnl=Yd,lr.b64topem=Ut,lr.pemtob64=gt,lr.timeogen=un,lr.aryval=oo,lr.inttohex=LR,lr.twoscompl=Bf,lr.KJUR=I,lr.crypto=I.crypto,lr.asn1=I.asn1,lr.jws=I.jws,lr.lang=I.lang,lr.VERSION=r,lr.VERSION_FULL=n,lr}yJ();const d0=async()=>{try{const e=await hu.getDevices(),t=e.filter(o=>o.kind==="audioinput"),r=e.filter(o=>o.kind==="audiooutput"),n=e.filter(o=>o.kind==="videoinput");return{micList:t,speakerList:r,cameraList:n}}catch(e){return console.error("Error fetching devices:",e),{micList:[],speakerList:[],cameraList:[]}}};function Ni(...e){return vJ(_q(e))}const aL=ie.createContext({cameraList:[],activeCameraId:"",selfVideoStarted:!1,localVideoStarted:!1,isBlurred:!1,localVideoRef:ie.createRef(),switchBlurred:()=>Promise.resolve(),startVideo:()=>Promise.resolve(),stopVideo:()=>Promise.resolve(),stopLocalVideo:()=>Promise.resolve(),switchCamera:()=>Promise.resolve(),attachUserVideo:()=>Promise.resolve(),detachUserVideo:()=>Promise.resolve(),attachSharedVideo:()=>Promise.resolve(),detachSharedVideo:()=>Promise.resolve(),startScreenSharing:()=>Promise.resolve(),finishScreenSharing:()=>Promise.resolve(),checkIfUserIdRegisteredInCanvas:()=>!1}),zd=()=>{const e=ie.useContext(aL);if(!e)throw new Error("useVideoContext must be used within VideoProvider");return e},bJ=()=>{const e=ie.useRef(hu.createLocalVideoTrack()),t=ie.useRef(null),[r,n]=ie.useState(!1),o=ie.useCallback(async l=>{const c=t.current;if(!(!c||r)){e.current||(e.current=hu.createLocalVideoTrack());try{await e.current.stop()}catch(d){if(!(d instanceof Error&&d.message==="VideoNotStartedError"))throw d}await e.current.switchCamera(l),await e.current.start(c),n(!0)}},[r]),i=ie.useCallback(async()=>{!t.current||!r||(n(!1),await e.current.stop())},[r]),a=ie.useCallback(async l=>{t.current&&await e.current.switchCamera(l)},[]),s=ie.useCallback(async l=>{await e.current.updateVirtualBackground(l?"blur":"")},[]);return ie.useEffect(()=>{const l=t.current;if(!l)return;const c=new MutationObserver(()=>{r&&!document.contains(l)&&n(!1)});return c.observe(document.body,{childList:!0,subtree:!0}),()=>c.disconnect()},[r]),Rq(async()=>{r&&(n(!1),await e.current.stop().catch(console.error)),console.log("useLocalVideo unmounted, stopped local video")}),ie.useMemo(()=>({ref:t,started:r,start:o,stop:i,switch:a,updateVirtualBackground:s}),[r,o,i,a,s])},SJ=e=>e instanceof Error||e!==null&&typeof e=="object"&&(typeof e.type=="string"||typeof e.message=="string")?`${(e==null?void 0:e.type)||(e==null?void 0:e.message)}: ${(e==null?void 0:e.reason)||(e==null?void 0:e.errorCode)||""}`:typeof e=="string"?e:"Se ha producido un error inesperado",EJ=()=>{const{notify:e}=bs();return ie.useMemo(()=>{const t=n=>{e({header:"Se ha producido un error inesperado",message:SJ(n),severity:"error"})};return n=>{try{const o=n();return o instanceof Promise?o.catch(i=>{throw t(i),i}):o}catch(o){throw t(o),o}}},[e])},CJ=()=>/iPad/i.test(navigator.userAgent)||/MacIntel/i.test(navigator==null?void 0:navigator.platform)&&(navigator==null?void 0:navigator.maxTouchPoints)>2,wJ=()=>{const{userAgent:e}=navigator;return/iPad|iPhone|iPod/i.test(e)||CJ()},IJ=()=>/android/i.test(navigator.userAgent),AJ=()=>IJ()||wJ(),EN=[{deviceId:qi.User,label:"Front Camera"},{deviceId:qi.Environment,label:"Back Camera"}],RJ=({children:e})=>{const t=EJ(),{zmClient:r,sessionStarted:n,isSessionStarted:o}=ll(),i=bJ(),a=ie.useRef(new Map),[s,l]=ie.useState([]),[c,d]=ie.useState(""),[p,m]=ie.useState(!1),[y,b]=ie.useState(!1);ie.useEffect(()=>{console.log("cameraList: ",s),console.log("activeCameraId: ",c)},[s,c]);const v=ie.useMemo(()=>AJ(),[]),C=ie.useCallback(async oe=>{if(b(oe),!o()){await t(()=>i.updateVirtualBackground(oe));return}const Ee=r.getMediaStream();!n||!(Ee!=null&&Ee.isSupportVirtualBackground())||(oe?await t(()=>Ee.updateVirtualBackgroundImage("blur")):await t(()=>Ee.updateVirtualBackgroundImage("")))},[o,i,t,n,r]),A=ie.useCallback(async()=>{if(!o()){console.log("Starting local video"),await t(()=>i.start(c));return}const oe=r.getMediaStream();if(!oe)return;const Ee=oe.getActiveCamera(),ce=typeof SharedArrayBuffer=="function";console.log("isSharedArrayBufferSupported: ",ce);const _e={hd:!0,fullHd:!1,ptz:!1,originalRatio:!0,virtualBackground:ce?{imageUrl:y?"blur":""}:void 0,...c?{cameraId:c}:{cameraId:Ee}};await t(()=>oe.startVideo(_e)),console.log("Started video in session")},[o,y,r,c,t,i]),R=ie.useCallback(async()=>{await t(()=>i.stop()),console.log("Local video stopped")},[i,t]),x=ie.useCallback(async()=>{const oe=r.getMediaStream();oe&&(await t(()=>oe.stopVideo()),console.log("Video stopped"))},[r,t]),k=ie.useCallback(async oe=>{if(!o()){await t(()=>i.switch(oe)),d(oe);return}const Ee=r.getMediaStream();Ee&&(p&&await t(()=>Ee.switchCamera(oe)),d(oe))},[o,r,p,t,i]),D=ie.useCallback(async(oe,Ee)=>{const ce=r.getMediaStream();!ce||!Ee||(a.current.set(oe,Ee),await t(()=>ce.attachVideo(oe,3,Ee)),console.log("Attached video for user: ",oe))},[r,t]),F=ie.useCallback(async oe=>{var ce;const Ee=r.getMediaStream();Ee&&((ce=r.getSessionInfo())!=null&&ce.isInMeeting&&await t(()=>Ee.detachVideo(oe)),a.current.delete(oe),console.log("Detached video for user: ",oe))},[r,t]),$=ie.useCallback(async oe=>{const Ee=r.getMediaStream(),{selfShareCanvas:ce}=oe;(Ee==null?void 0:Ee.getShareStatus())===Mr.End&&ce&&(Ee==null||Ee.startShareScreen(ce,{}))},[r]),H=ie.useCallback(async()=>{const oe=r.getMediaStream();(oe==null?void 0:oe.getShareStatus())===Mr.Sharing&&await t(()=>oe==null?void 0:oe.stopShareScreen())},[r,t]),q=ie.useCallback(async({userId:oe,videoPlayer:Ee})=>{const ce=r.getMediaStream();ce&&await t(()=>ce.attachShareView(oe,Ee))},[r,t]),G=ie.useCallback(async oe=>{var ce;const Ee=r.getMediaStream();Ee&&(ce=r.getSessionInfo())!=null&&ce.isInMeeting&&await t(()=>Ee.detachShareView(oe))},[r,t]),Q=ie.useCallback(oe=>a.current.has(oe),[]);ie.useEffect(()=>{if(!n)return;const oe=ne=>{console.log("active-media-failed: ",ne),ne.type==="video"&&m(!1)},Ee=()=>{v?(l(EN),[qi.User,qi.Environment].includes(c)||d(qi.User)):d0().then(({cameraList:ne})=>{var be;l(ne),ne.find(re=>re.deviceId===c)||d(((be=ne[0])==null?void 0:be.deviceId)||"")}),console.log("Video devices changed")},ce=ne=>{console.log("video-capturing-change: ",ne),ne.state==="Started"?m(!0):ne.state==="Stopped"?m(!1):ne.state==="Failed"&&console.error("Failed to capture video")},_e=ne=>{H(),console.log("Passively stopped share due to: ",ne)},xe=ne=>{console.log("Device permission changed: ",ne),ne.name==="camera"&&ne.state==="denied"&&m(!1)};return r.on("active-media-failed",oe),r.on("device-change",Ee),r.on("device-permission-change",xe),r.on("video-capturing-change",ce),r.on("passively-stop-share",_e),()=>{r.off("active-media-failed",oe),r.off("device-change",Ee),r.off("device-permission-change",xe),r.off("video-capturing-change",ce),r.off("passively-stop-share",_e)}},[c,H,v,n,r]),z9(()=>{v?(l(EN),d(qi.User)):d0().then(({cameraList:oe})=>{var Ee;l(oe),d(((Ee=oe[0])==null?void 0:Ee.deviceId)||"")})});const de=ie.useMemo(()=>({activeCameraId:c,attachSharedVideo:q,attachUserVideo:D,cameraList:s,checkIfUserIdRegisteredInCanvas:Q,detachSharedVideo:G,detachUserVideo:F,finishScreenSharing:H,isBlurred:y,localVideoRef:i.ref,localVideoStarted:i.started,selfVideoStarted:n&&p,startScreenSharing:$,startVideo:A,stopLocalVideo:R,stopVideo:x,switchBlurred:C,switchCamera:k}),[c,q,D,s,Q,G,F,H,y,i.ref,i.started,n,p,$,A,R,x,C,k]);return ae.jsx(aL.Provider,{value:de,children:e})},sL=ie.createContext({micList:[],activeMicId:"",micMuted:!1,muteMic:()=>Promise.resolve(),muteUserMic:()=>Promise.resolve(),unmuteMic:()=>Promise.resolve(),unmuteUserMic:()=>Promise.resolve(),switchMic:()=>Promise.resolve(),speakerList:[],activeSpeakerId:"",switchSpeaker:()=>Promise.resolve(),startAudio:()=>Promise.resolve(),setMicList:()=>{},setSpeakerList:()=>{},setActiveMicId:()=>{},setActiveSpeakerId:()=>{},setMicMuted:()=>{},hostAskUnmute:!1,resetHostAskUnmute:()=>{}}),Ac=()=>ie.useContext(sL),TJ={"init-pre-session":["admin"],"init-session":["admin"],"activate-chat":["admin"],"toggle-user-audio":["admin","panelist"],"toggle-user-video":["admin","panelist"],"join-session-with-video":["admin","panelist"],"join-session-with-audio":["admin","panelist"],"revoke-manager-role":["admin"],"make-manager-role":["admin"],"transfer-host-role":["admin"],"request-host-role":["attendee","panelist"],"show-attendee-list":["admin","panelist"],"share-screen":["admin","panelist"],"show-toggle-video-button":["admin","panelist"],"allow-toggle-audio":["admin","panelist"],"request-turn":["attendee"],"grant-turn":["admin","panelist"],"activate-turn-queue":["admin"],"view-activate-turn-queue":["admin","panelist"]},lL=ie.createContext({activeSpeakers:[],activeVideoParticipant:null,currentUser:null,screenSharingUser:null,users:[]}),bu=()=>ie.useContext(lL),OJ=({children:e})=>{const{zmClient:t,signature:r,isSessionStarted:n}=ll(),[o,i]=ie.useState([]),[a,s]=ie.useState(null),[l,c]=ie.useState([]),[d,p]=ie.useState(null),[m,y]=ie.useState(null);ie.useEffect(()=>{if(!n())return;const v=F=>{if(F&&F.length>0){c(F);const $=t.getAllUser().find(H=>H.userId===F[0].userId);$&&p($)}else c([]);console.log("active-speaker-change: ",F)},C=()=>{console.log("user-added"),i(t.getAllUser())},A=()=>{console.log("user-removed"),i(t.getAllUser())},R=F=>{const $=t.getCurrentUserInfo();$&&(i(t.getAllUser()),s($),console.log("user-updated: ",F))},x=F=>{console.log("video-active-change: ",F);const $=t.getAllUser().find(H=>H.userId===F.userId);$&&p($)},k=F=>{const $=t.getCurrentUserInfo();$&&["Started","Stopped"].includes(F.state)&&s($),F.state==="Failed"&&(console.error("Failed to capture video"),s($))},D=async F=>{const{userId:$,state:H}=F;if(H==="Inactive"){y(null);return}const q=t.getAllUser().find(G=>G.userId===$)??null;y(q)};return t.on("active-speaker",v),t.on("user-added",C),t.on("user-removed",A),t.on("user-updated",R),t.on("video-active-change",x),t.on("video-capturing-change",k),t.on("active-share-change",D),()=>{t.off("active-speaker",v),t.off("user-added",C),t.off("user-removed",A),t.off("user-updated",R),t.off("video-active-change",x),t.off("video-capturing-change",k),t.off("active-share-change",D)}},[n,r,t]),ie.useEffect(()=>{if(!n())return;i(t.getAllUser());const v=t.getCurrentUserInfo();v&&s(v);const C=t.getMediaStream().getActiveShareUserId();if(C){const A=t.getAllUser().find(R=>R.userId===C)??null;y(A)}},[n,t]),CR(()=>{const v=t.getSessionHost();v&&!d&&n()&&(console.log("Initial setting active video participant to host user: ",v.displayName),p(v))});const b=ie.useMemo(()=>({activeSpeakers:l,activeVideoParticipant:d,currentUser:a,screenSharingUser:m,users:o}),[l,d,a,m,o]);return ae.jsx(lL.Provider,{value:b,children:e})},Kd=()=>{const{currentUser:e}=bu(),t=!!e&&_J(e);return ie.useCallback(r=>t&&TJ[r].includes(t),[t])},_J=e=>e!=null&&e.isHost?"admin":e!=null&&e.isManager?"panelist":"attendee",PJ=({children:e})=>{const{notify:t}=bs(),{zmClient:r,isSessionStarted:n}=ll(),o=Kd(),[i,a]=ie.useState([]),[s,l]=ie.useState(""),[c,d]=ie.useState(!1),[p,m]=ie.useState([]),[y,b]=ie.useState(""),[v,C]=ie.useState(!1),A=ie.useCallback(async()=>{const G=r.getMediaStream();G&&await G.startAudio({microphoneId:s,speakerId:y,mute:c})},[r,s,y,c]),R=ie.useCallback(async()=>{if(!n()){await d(!0);return}const G=r.getMediaStream();G&&(d(!0),await G.muteAudio())},[n,r]),x=ie.useCallback(async G=>{const Q=r.getMediaStream();Q&&await Q.muteAudio(G)},[r]),k=ie.useCallback(async()=>{if(!n()){d(!1);return}const G=r.getMediaStream();G&&(d(!1),await G.unmuteAudio())},[n,r]),D=ie.useCallback(async G=>{const Q=r.getMediaStream();Q&&await Q.unmuteAudio(G)},[r]),F=ie.useCallback(async G=>{if(l(G),n()){const Q=r.getMediaStream();if(!Q)return;await Q.switchMicrophone(G)}},[r,n]),$=ie.useCallback(async G=>{if(b(G),n()){const Q=r.getMediaStream();if(!Q)return;await Q.switchSpeaker(G)}},[r,n]),H=ie.useCallback(()=>{C(!1)},[]);ie.useEffect(()=>{if(!n())return;const G=()=>{d0().then(({micList:ce,speakerList:_e})=>{var xe,ne;a(ce),m(_e),ce.find(be=>be.deviceId===s)||l(((xe=ce[0])==null?void 0:xe.deviceId)||""),_e.find(be=>be.deviceId===y)||b(((ne=_e[0])==null?void 0:ne.deviceId)||"")}),console.log("Audio devices changed")},Q=ce=>{C(["Unmute","Spotlight"].includes(ce.reason)),console.log("host-ask-unmute-audio: ",ce)},de=ce=>{console.log("active-media-failed: ",ce),ce.type==="audio"&&d(!0)},oe=()=>{o("allow-toggle-audio")&&t({header:"Micrófono silenciado",message:"Estás hablando pero tu micrófono está silenciado.",severity:"info"})},Ee=ce=>{const _e=r.getCurrentUserInfo();if(!_e)return;const xe=ce.find(ne=>ne.userId===_e.userId);(xe==null?void 0:xe.muted)!==void 0&&d(xe.muted),console.log("user-updated (muted): ",ce)};return r.on("active-media-failed",de),r.on("device-change",G),r.on("host-ask-unmute-audio",Q),r.on("speaking-while-muted",oe),r.on("user-updated",Ee),()=>{r.off("active-media-failed",de),r.off("device-change",G),r.off("host-ask-unmute-audio",Q),r.off("speaking-while-muted",oe),r.off("user-updated",Ee)}},[r,n,s,y,o,t]),z9(()=>{d0().then(({micList:G,speakerList:Q})=>{var de,oe;a(G),m(Q),l(((de=G[0])==null?void 0:de.deviceId)||""),b(((oe=Q[0])==null?void 0:oe.deviceId)||"")})});const q=ie.useMemo(()=>({micList:i,activeMicId:s,micMuted:c,speakerList:p,activeSpeakerId:y,hostAskUnmute:v,resetHostAskUnmute:H,muteMic:R,muteUserMic:x,unmuteMic:k,unmuteUserMic:D,switchMic:F,switchSpeaker:$,startAudio:A,setMicList:a,setSpeakerList:m,setActiveMicId:l,setActiveSpeakerId:b,setMicMuted:d}),[i,s,c,p,y,v,H,R,x,k,D,F,$,A,a,m,l,b,d]);return ae.jsx(sL.Provider,{value:q,children:e})},uL=ie.createContext({messages:[],receivers:[],sendMessage:()=>Promise.resolve(),updateReceiversAndChatHistory:()=>{}}),cL=()=>ie.useContext(uL),xJ=({children:e})=>{const{zmClient:t,isSessionStarted:r}=ll(),[n,o]=ie.useState([]),[i,a]=ie.useState([]),[s,l]=ie.useState(null),c=ie.useCallback(async({text:b,receiverId:v})=>{if(!s||!(b!=null&&b.trim()))return;await(v!==0?()=>s.send(b,v):()=>s.sendToAll(b))()},[s]),d=ie.useCallback(()=>{s&&o(s.getHistory()??[])},[s]),p=ie.useCallback(()=>{s&&a(s.getReceivers()??[])},[s]),m=ie.useCallback(()=>{p(),d()},[p,d]);ie.useEffect(()=>{if(!r()||s)return;const b=t.getChatClient();l(b),a(b.getReceivers()??[]),o(b.getHistory()??[])},[s,t,r]),ie.useEffect(()=>{if(!r())return;const b=v=>{o(C=>[...C,v])};return t.on("chat-on-message",b),()=>{t.off("chat-on-message",b)}},[t,r]),ie.useEffect(()=>{if(!r())return;const b=()=>{m()},v=()=>{m()};return t.on("user-added",b),t.on("user-removed",v),()=>{t.off("user-added",b),t.off("user-removed",v)}},[t,r,m]);const y=ie.useMemo(()=>({messages:n,receivers:i,sendMessage:c,updateReceiversAndChatHistory:m}),[n,i,c,m]);return ae.jsx(uL.Provider,{value:y,children:e})},DJ=(e,t)=>({...e,active:t.active,timestamp:t.timestamp}),NJ=(e,t)=>{switch(t.type){case"LOWER-USER-HAND":return{...e,speakerQueueIds:e.speakerQueueIds.filter(r=>r!==t.userId)};case"TOGGLE-HAND":{const r=[...e.speakerQueueIds],n=r.indexOf(t.senderId);return n>-1?r.splice(n,1):r.push(t.senderId),{...e,speakerQueueIds:r}}case"TOGGLE-TURN-QUEUE":return{...e,turnQueueState:{...e.turnQueueState,active:t.active,timestamp:t.timestamp}};default:return e}},MJ=(e,t)=>{switch(t.type){case"CHANGE-SESSION-STATUS":return{...e,status:t.status};default:return e}},kJ=(e,t)=>{switch(t.type){case"REQUEST-HOST-ROLE":return{userId:t.userId,timestamp:t.timestamp};default:return e}},LJ=(e,t)=>{switch(t.type){case"SEND-SHARED-STATE":return t.state;case"TOGGLE-CHAT":return{...e,chatState:DJ(e.chatState,t)};case"TOGGLE-HAND":case"LOWER-USER-HAND":case"TOGGLE-TURN-QUEUE":return{...e,speakerTurnState:NJ(e.speakerTurnState,t)};case"CHANGE-SESSION-STATUS":return{...e,sessionState:MJ(e.sessionState,t)};case"REQUEST-HOST-ROLE":return console.log("case REQUEST-HOST-ROLE: ",t),{...e,requestHostRoleState:kJ(e.requestHostRoleState,t)};default:return e}},dL={active:!0,timestamp:0},pL={active:!0,timestamp:0},fL={userId:null,timestamp:0},hL=ie.createContext({sharedState:{speakerTurnState:{speakerQueueIds:[],turnQueueState:pL},sessionState:{status:eu.NOT_STARTED},chatState:dL,requestHostRoleState:fL},requestSharedState:()=>Promise.resolve(),speakerQueue:[],raisedHand:!1,toggleHand:()=>Promise.resolve(),lowerUserHand:()=>Promise.resolve(),toggleTurnQueue:()=>Promise.resolve(),toggleChat:()=>Promise.resolve(),alertUser:()=>Promise.resolve(),changeSessionStatus:()=>Promise.resolve(),requestHostRole:()=>Promise.resolve(),requestedHostUser:null,requestedHostRoleDialogVisible:!1,rejectHostRoleRequest:()=>Promise.resolve(),transferHostRoleToUser:()=>Promise.resolve()}),hg=()=>ie.useContext(hL),FJ=3,jJ=500,VJ=1e4,BJ=()=>{const{zmClient:e}=ll(),t=ie.useRef(void 0);return ie.useEffect(()=>{const r=n=>{t.current=n};return e.on("command-channel-status",r),()=>{e.off("command-channel-status",r)}},[e]),ie.useCallback(async(r,n)=>{const{maxAttempts:o=FJ,initialDelay:i=jJ,connectionTimeout:a=VJ,userId:s}=n||{},l=e.getCommandClient(),c=async()=>{if(t.current===au.Connected)return;const d=Date.now();for(;Date.now()-d<a;){if(t.current===au.Connected){console.info("Command channel connected, proceeding to send...");return}await new Promise(p=>setTimeout(p,100))}throw new Error(`Command channel connection timeout after ${a}ms`)};await c();for(let d=0;d<o;d++)try{await l.send(JSON.stringify(r),s),d>0&&console.info(`Action sent successfully on attempt ${d+1}`);return}catch(p){if(d===o-1)throw console.error(`Failed to send action after ${o} attempts:`,p),p;const y=i*Math.pow(2,d);console.warn(`Attempt ${d+1} failed, retrying in ${y}ms...`,p),await new Promise(b=>setTimeout(b,y)),t.current!==au.Connected&&(console.warn("Connection lost during retries, waiting for reconnection..."),await c())}},[e])},HJ={"REQUEST-SHARED-STATE":(e,{zmClient:t,sendAction:r,sharedState:n})=>{if(e.type!=="REQUEST-SHARED-STATE")return;const o=t.getCurrentUserInfo();o!=null&&o.isHost&&r({type:"SEND-SHARED-STATE",state:n},{userId:e.userId})},"ALERT-USER":(e,{zmClient:t,alert:r})=>{if(e.type!=="ALERT-USER")return;const n=t.getCurrentUserInfo();(n==null?void 0:n.userId)===e.userId&&r({message:e.message})},"REQUEST-HOST-ROLE":(e,{dispatch:t,zmClient:r,setRequestedHostRoleDialogVisible:n})=>{if(e.type!=="REQUEST-HOST-ROLE")return;const o=r.getCurrentUserInfo();t(e),o!=null&&o.isHost&&n(!0)}},UJ=({children:e})=>{const{changeUserRole:t}=Hd(),{zmClient:r}=ll(),{users:n,currentUser:o}=bu(),{alert:i,notify:a}=bs(),[s,l]=ie.useReducer(LJ,{chatState:dL,sessionState:{status:eu.NOT_STARTED},speakerTurnState:{turnQueueState:pL,speakerQueueIds:[]},requestHostRoleState:fL}),[c,d]=ie.useState(!1),p=BJ(),m=ie.useCallback(async(G,Q)=>{await p({type:"ALERT-USER",message:Q,userId:G})},[p]),y=ie.useMemo(()=>{const G=r.getCurrentUserInfo();return G&&s.speakerTurnState.speakerQueueIds.includes(G.userId)},[r,s.speakerTurnState.speakerQueueIds]),b=ie.useMemo(()=>s.speakerTurnState.speakerQueueIds.map(G=>n.find(de=>de.userId===G)).filter(G=>G!==void 0),[n,s.speakerTurnState.speakerQueueIds]),v=ie.useCallback(async()=>{const G=r.getCurrentUserInfo();await p({type:"REQUEST-SHARED-STATE",userId:G.userId})},[r,p]),C=ie.useCallback(async()=>{const G=r.getCurrentUserInfo();if(!G)return;const Q={type:"TOGGLE-HAND",senderId:G==null?void 0:G.userId};await p(Q),l(Q)},[r,p]),A=ie.useCallback(async G=>{const Q={type:"TOGGLE-CHAT",active:G,timestamp:new Date().getTime()};await p(Q),l(Q)},[p]),R=ie.useCallback(async G=>{const Q={type:"LOWER-USER-HAND",userId:G};await p(Q),l(Q)},[p]),x=ie.useCallback(async G=>{const Q={type:"TOGGLE-TURN-QUEUE",active:G,timestamp:new Date().getTime()};await p(Q),l(Q)},[p]),k=ie.useCallback(async G=>{const Q={type:"CHANGE-SESSION-STATUS",status:G};await p(Q),l(Q)},[p]),D=ie.useCallback(async()=>{const G=r.getCurrentUserInfo();if(!G)return;const Q={type:"REQUEST-HOST-ROLE",userId:G.userId,timestamp:new Date().getTime()};await p(Q),l(Q)},[p,r]),F=ie.useCallback(async()=>{const G=s.requestHostRoleState.userId;G&&(await m(G,"El anfitrión ha rechazado tu solicitud para convertirte en anfitrión.").catch(console.error),d(!1),l({type:"REQUEST-HOST-ROLE",userId:0,timestamp:0}))},[s.requestHostRoleState.userId,m]),$=ie.useMemo(()=>{const G=s.requestHostRoleState.userId;return G?r.getUser(G)??null:null},[s.requestHostRoleState.userId,r]),H=ie.useCallback(async({userId:G})=>{await r.makeHost(G).catch(console.error),await(t==null?void 0:t({userId:G,role:"HOST"}).catch(console.error)),await m(G,"¡Ha sido promocionado a anfitrión!").catch(console.error),d(!1),a({header:"Cambio a anfitrión",message:"Has cambiado a anfitrión a este usuario.",severity:"success"}),l({type:"REQUEST-HOST-ROLE",userId:0,timestamp:0})},[m,t,a,r]);ie.useEffect(()=>{const G=Q=>{const de=JSON.parse(Q.text),oe={zmClient:r,sendAction:p,sharedState:s,alert:i,dispatch:l,setRequestedHostRoleDialogVisible:d},Ee=HJ[de.type];Ee?Ee(de,oe):l(de)};return r.on("command-channel-message",G),()=>{r.off("command-channel-message",G)}},[r,s,o,p,i]);const q=ie.useMemo(()=>({sharedState:s,requestSharedState:v,speakerQueue:b,raisedHand:y,toggleHand:C,lowerUserHand:R,toggleTurnQueue:x,toggleChat:A,alertUser:m,changeSessionStatus:k,requestHostRole:D,requestedHostRoleDialogVisible:c,rejectHostRoleRequest:F,transferHostRoleToUser:H,requestedHostUser:$}),[s,v,b,y,C,R,x,A,m,k,D,H,F,c,$]);return ae.jsx(hL.Provider,{value:q,children:e})};function hc(e,t){if(!e)throw new Error(`[${t}] Ref not mounted or ready`);return e}const mL=ie.forwardRef(({onChangeUserRole:e,onInitVotingPreSession:t,onInitVotingSession:r,onCloseVotingSession:n,credentials:o,children:i,videoSessionStatus:a},s)=>{const[l,c]=ie.useState(0),[d,p]=ie.useState(eu.NOT_STARTED),m=ie.useCallback(async k=>{await(e==null?void 0:e(k))},[e]),y=ie.useCallback(async()=>{!t||a!==eu.NOT_STARTED||(await t(),p(eu.ONLY_PANELIST))},[t,a]),b=ie.useCallback(async()=>{r&&(await r(),p(eu.IN_PROGRESS))},[r]),v=ie.useCallback(async()=>{n&&(await n(),p(eu.CLOSED))},[n]),C=ie.useCallback(k=>{c(k)},[]),A=ie.useRef(null);ie.useImperativeHandle(s,()=>({isReady:()=>{var k;return((k=A.current)==null?void 0:k.isReady())??!1},cleanup:()=>hc(A.current,"SessionProvider").cleanup(),getSessionStarted:()=>hc(A.current,"SessionProvider").getSessionStarted(),joinSession:()=>hc(A.current,"SessionProvider").joinSession(),leaveSession:k=>hc(A.current,"SessionProvider").leaveSession(k)}),[]);const R=ie.useMemo(()=>({appendTo:""}),[]);ie.useEffect(()=>{console.log("VideoPluginProvider: sessionStatus changed:",d),a!==void 0&&d!==a&&p(a)},[a]);const x=ie.useMemo(()=>({credentials:o,changeUserRole:m,breakpoint:l,changePluginBreakpoint:C,sessionStatus:d,initVotingPreSession:y,initVotingSession:b,closeVotingSession:v}),[o,m,l,C,d,y,b,v]);return ae.jsx(W3.Provider,{value:x,children:ae.jsx(wq,{children:ae.jsx($9,{ref:A,children:ae.jsx(OJ,{children:ae.jsx(RJ,{children:ae.jsx(PJ,{children:ae.jsx(xJ,{children:ae.jsx(UJ,{children:ae.jsx(mj,{value:R,children:i})})})})})})})})})});mL.displayName="VideoPluginProvider";var Dm=(e=>(e[e.Mobile=0]="Mobile",e[e.Tablet=1]="Tablet",e[e.Desktop=2]="Desktop",e))(Dm||{});const $J=768,gL=1024,WJ=()=>{const[e,{width:t}]=Oq(),r=ie.useMemo(()=>t<$J?0:t<gL?1:2,[t]);return{ref:e,width:t,breakpoint:r}};function Nm(e){"@babel/helpers - typeof";return Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nm(e)}function zJ(e,t){if(Nm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KJ(e){var t=zJ(e,"string");return Nm(t)=="symbol"?t:t+""}function GJ(e,t,r){return(t=KJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sd.apply(null,arguments)}function Xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function qJ(e){if(Array.isArray(e))return Xw(e)}function JJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vL(e,t){if(e){if(typeof e=="string")return Xw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xw(e,t):void 0}}function QJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1021
|
+
`,ue},typeof u=="string"&&(u.indexOf("-----BEGIN")!=-1?this.readCertPEM(u):I.lang.String.isHex(u)&&this.readCertHex(u))}Qr.EXT_PARSER={},Qr.registExtParser=function(u,f){Qr.EXT_PARSER[u]=f},Qr.hex2dn=function(u,f){f===void 0&&(f=0);var h=new Qr;er.getTLV(u,f);var g=h.getX500Name(u);return g.str},Qr.hex2rdn=function(u,f){if(f===void 0&&(f=0),u.substr(f,2)!=="31")throw new Error("malformed RDN");for(var h=new Array,g=er.getChildIdx(u,f),w=0;w<g.length;w++)h.push(Qr.hex2attrTypeValue(u,g[w]));return h=h.map(function(E){return E.replace("+","\\+")}),h.join("+")},Qr.hex2attrTypeValue=function(u,f){var h=er,g=h.getV;if(f===void 0&&(f=0),u.substr(f,2)!=="30")throw new Error("malformed attribute type and value");var w=h.getChildIdx(u,f);w.length!==2||u.substr(w[0],2);var E=g(u,w[0]),_=I.asn1.ASN1Util.oidHexToInt(E),O=I.asn1.x509.OID.oid2atype(_),j=g(u,w[1]),N=ca(j);return O+"="+N},Qr.getPublicKeyFromCertHex=function(u){var f=new Qr;return f.readCertHex(u),f.getPublicKey()},Qr.getPublicKeyFromCertPEM=function(u){var f=new Qr;return f.readCertPEM(u),f.getPublicKey()},Qr.getPublicKeyInfoPropOfCertPEM=function(u){var f=er,h=f.getVbyList,g={},w,E;return g.algparam=null,w=new Qr,w.readCertPEM(u),E=w.getPublicKeyHex(),g.keyhex=h(E,0,[1],"03").substr(2),g.algoid=h(E,0,[0,0],"06"),g.algoid==="2a8648ce3d0201"&&(g.algparam=h(E,0,[0,1],"06")),g},Qr.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"];var jF=function(u){var f=I,h=f.lang.String.isHex,g=er,w=g.getV,E=g.getTLV,_=g.getVbyList,O=g.getTLVbyList,j=g.getTLVbyListEx,N=g.getIdxbyList,U=g.getIdxbyListEx,V=g.getChildIdx,T=new Qr;this.hex=null,this.posSigAlg=null,this.posRevCert=null,this.parsed=null,this._setPos=function(){var M=N(this.hex,0,[0,0]),P=this.hex.substr(M,2);if(P=="02")this.posSigAlg=1;else if(P=="30")this.posSigAlg=0;else throw new Error("malformed 1st item of TBSCertList: "+P);var L=N(this.hex,0,[0,this.posSigAlg+3]),B=this.hex.substr(L,2);if(B=="17"||B=="18"){var W,pe;W=N(this.hex,0,[0,this.posSigAlg+4]),this.posRevCert=null,W!=-1&&(pe=this.hex.substr(W,2),pe=="30"&&(this.posRevCert=this.posSigAlg+4))}else if(B=="30")this.posRevCert=this.posSigAlg+3;else if(B=="a0")this.posRevCert=null;else throw new Error("malformed nextUpdate or revCert tag: "+B)},this.getVersion=function(){return this.posSigAlg==0?null:parseInt(_(this.hex,0,[0,0],"02"),16)+1},this.getSignatureAlgorithmField=function(){var M=O(this.hex,0,[0,this.posSigAlg],"30");return T.getAlgorithmIdentifierName(M)},this.getIssuer=function(){return T.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return O(this.hex,0,[0,this.posSigAlg+1],"30")},this.getThisUpdate=function(){var M=_(this.hex,0,[0,this.posSigAlg+2]);return result=ca(M)},this.getNextUpdate=function(){var M=N(this.hex,0,[0,this.posSigAlg+3]),P=this.hex.substr(M,2);return P!="17"&&P!="18"?null:ca(w(this.hex,M))},this.getRevCertArray=function(){if(this.posRevCert==null)return null;for(var M=[],P=N(this.hex,0,[0,this.posRevCert]),L=V(this.hex,P),B=0;B<L.length;B++){var W=E(this.hex,L[B]);M.push(this.getRevCert(W))}return M},this.getRevCert=function(M){var P={},L=V(M,0);return P.sn={hex:_(M,0,[0],"02")},P.date=ca(_(M,0,[1])),L.length==3&&(P.ext=T.getExtParamArray(O(M,0,[2]))),P},this.findRevCert=function(M){var P=new Qr(M),L=P.getSerialNumberHex();return this.findRevCertBySN(L)},this.findRevCertBySN=function(M){if(this.parsed==null&&this.getParam(),this.parsed.revcert==null)return null;for(var P=this.parsed.revcert,L=0;L<P.length;L++)if(M==P[L].sn.hex)return P[L];return null},this.getSignatureValueHex=function(){return _(this.hex,0,[2],"03",!0)},this.verifySignature=function(M){var P=this.getSignatureAlgorithmField(),L=this.getSignatureValueHex(),B=O(this.hex,0,[0],"30"),W=new I.crypto.Signature({alg:P});return W.init(M),W.updateHex(B),W.verify(L)},this.getParam=function(M){var P={},L=this.getVersion();L!=null&&(P.version=L),P.sigalg=this.getSignatureAlgorithmField(),P.issuer=this.getIssuer(),P.thisupdate=this.getThisUpdate();var B=this.getNextUpdate();B!=null&&(P.nextupdate=B);var W=this.getRevCertArray();W!=null&&(P.revcert=W);var pe=U(this.hex,0,[0,"[0]"]);if(pe!=-1){var Me=j(this.hex,0,[0,"[0]",0]);P.ext=T.getExtParamArray(Me)}return P.sighex=this.getSignatureValueHex(),this.parsed=P,typeof M=="object"&&(M.tbshex==!0&&(P.tbshex=O(this.hex,0,[0])),M.nodnarray==!0&&delete P.issuer.array),P},typeof u=="string"&&(h(u)?this.hex=u:u.match(/-----BEGIN X509 CRL/)&&(this.hex=je(u)),this._setPos())};return(typeof I>"u"||!I)&&(I={}),(typeof I.jws>"u"||!I.jws)&&(I.jws={}),I.jws.JWS=function(){var u=I,f=u.jws.JWS,h=f.isSafeJSONString;this.parseJWS=function(g,w){if(!(this.parsedJWS!==void 0&&(w||this.parsedJWS.sigvalH!==void 0))){var E=g.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(E==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var _=E[1],O=E[2],j=E[3],N=_+"."+O;if(this.parsedJWS={},this.parsedJWS.headB64U=_,this.parsedJWS.payloadB64U=O,this.parsedJWS.sigvalB64U=j,this.parsedJWS.si=N,!w){var U=Xn(j),V=ln(U,16);this.parsedJWS.sigvalH=U,this.parsedJWS.sigvalBI=V}var T=Va(_),M=Va(O);if(this.parsedJWS.headS=T,this.parsedJWS.payloadS=M,!h(T,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+T}}},I.jws.JWS.sign=function(u,f,h,g,w){var E=I,_=E.jws,O=_.JWS,j=O.readSafeJSONString,N=O.isSafeJSONString,U=E.crypto;U.ECDSA;var V=U.Mac,T=U.Signature,M=JSON,P,L,B;if(typeof f!="string"&&typeof f!="object")throw"spHeader must be JSON string or object: "+f;if(typeof f=="object"&&(L=f,P=M.stringify(L)),typeof f=="string"){if(P=f,!N(P))throw"JWS Head is not safe JSON string: "+P;L=j(P)}if(B=h,typeof h=="object"&&(B=M.stringify(h)),(u==""||u==null)&&L.alg!==void 0&&(u=L.alg),u!=""&&u!=null&&L.alg===void 0&&(L.alg=u,P=M.stringify(L)),u!==L.alg)throw"alg and sHeader.alg doesn't match: "+u+"!="+L.alg;var W=null;if(O.jwsalg2sigalg[u]===void 0)throw"unsupported alg name: "+u;W=O.jwsalg2sigalg[u];var pe=Eu(P),Me=Eu(B),Ne=pe+"."+Me,Le="";if(W.substr(0,4)=="Hmac"){if(g===void 0)throw"mac key shall be specified for HS* alg";var z=new V({alg:W,prov:"cryptojs",pass:g});z.updateString(Ne),Le=z.doFinal()}else if(W.indexOf("withECDSA")!=-1){var Y=new T({alg:W});Y.init(g,w),Y.updateString(Ne);var te=Y.sign();Le=I.crypto.ECDSA.asn1SigToConcatSig(te)}else if(W!="none"){var Y=new T({alg:W});Y.init(g,w),Y.updateString(Ne),Le=Y.sign()}var K=ti(Le);return Ne+"."+K},I.jws.JWS.verify=function(u,f,h){var g=I,w=g.jws,E=w.JWS,_=E.readSafeJSONString,O=g.crypto,j=O.ECDSA,N=O.Mac,U=O.Signature,V;if(typeof kr!==void 0&&(V=kr),!dS(u))return!1;var T=u.split(".");if(T.length!==3)return!1;var M=T[0],P=T[1],L=M+"."+P,B=Xn(T[2]),W=_(Va(T[0])),pe=null,Me=null;if(W.alg===void 0)throw"algorithm not specified in header";if(pe=W.alg,Me=pe.substr(0,2),h!=null&&Object.prototype.toString.call(h)==="[object Array]"&&h.length>0){var Ne=":"+h.join(":")+":";if(Ne.indexOf(":"+pe+":")==-1)throw"algorithm '"+pe+"' not accepted in the list"}if(pe!="none"&&f===null)throw"key shall be specified to verify.";if(typeof f=="string"&&f.indexOf("-----BEGIN ")!=-1&&(f=Sn.getKey(f)),(Me=="RS"||Me=="PS")&&!(f instanceof V))throw"key shall be a RSAKey obj for RS* and PS* algs";if(Me=="ES"&&!(f instanceof j))throw"key shall be a ECDSA obj for ES* algs";var Le=null;if(E.jwsalg2sigalg[W.alg]===void 0)throw"unsupported alg name: "+pe;if(Le=E.jwsalg2sigalg[pe],Le=="none")throw"not supported";if(Le.substr(0,4)=="Hmac"){var z=null;if(f===void 0)throw"hexadecimal key shall be specified for HMAC";var Y=new N({alg:Le,pass:f});return Y.updateString(L),z=Y.doFinal(),B==z}else if(Le.indexOf("withECDSA")!=-1){var te=null;try{te=j.concatSigToASN1Sig(B)}catch{return!1}var K=new U({alg:Le});return K.init(f),K.updateString(L),K.verify(te)}else{var K=new U({alg:Le});return K.init(f),K.updateString(L),K.verify(B)}},I.jws.JWS.parse=function(u){var f=u.split("."),h={},g,w,E;if(f.length!=2&&f.length!=3)throw"malformed sJWS: wrong number of '.' splitted elements";return g=f[0],w=f[1],f.length==3&&(E=f[2]),h.headerObj=I.jws.JWS.readSafeJSONString(Va(g)),h.payloadObj=I.jws.JWS.readSafeJSONString(Va(w)),h.headerPP=JSON.stringify(h.headerObj,null," "),h.payloadObj==null?h.payloadPP=Va(w):h.payloadPP=JSON.stringify(h.payloadObj,null," "),E!==void 0&&(h.sigHex=Xn(E)),h},I.jws.JWS.verifyJWT=function(u,f,h){var g=I,w=g.jws,E=w.JWS,_=E.readSafeJSONString,O=E.inArray,j=E.includedArray;if(!dS(u))return!1;var N=u.split(".");if(N.length!=3)return!1;var U=N[0],V=N[1];Xn(N[2]);var T=_(Va(U)),M=_(Va(V));if(T.alg===void 0)return!1;if(h.alg===void 0)throw"acceptField.alg shall be specified";if(!O(T.alg,h.alg)||M.iss!==void 0&&typeof h.iss=="object"&&!O(M.iss,h.iss)||M.sub!==void 0&&typeof h.sub=="object"&&!O(M.sub,h.sub))return!1;if(M.aud!==void 0&&typeof h.aud=="object"){if(typeof M.aud=="string"){if(!O(M.aud,h.aud))return!1}else if(typeof M.aud=="object"&&!j(M.aud,h.aud))return!1}var P=w.IntDate.getNow();return h.verifyAt!==void 0&&typeof h.verifyAt=="number"&&(P=h.verifyAt),(h.gracePeriod===void 0||typeof h.gracePeriod!="number")&&(h.gracePeriod=0),!(M.exp!==void 0&&typeof M.exp=="number"&&M.exp+h.gracePeriod<P||M.nbf!==void 0&&typeof M.nbf=="number"&&P<M.nbf-h.gracePeriod||M.iat!==void 0&&typeof M.iat=="number"&&P<M.iat-h.gracePeriod||M.jti!==void 0&&h.jti!==void 0&&M.jti!==h.jti||!E.verify(u,f,h.alg))},I.jws.JWS.includedArray=function(u,f){var h=I.jws.JWS.inArray;if(u===null||typeof u!="object"||typeof u.length!="number")return!1;for(var g=0;g<u.length;g++)if(!h(u[g],f))return!1;return!0},I.jws.JWS.inArray=function(u,f){if(f===null||typeof f!="object"||typeof f.length!="number")return!1;for(var h=0;h<f.length;h++)if(f[h]==u)return!0;return!1},I.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",ES512:"SHA512withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},I.jws.JWS.isSafeJSONString=function(u,f,h){var g=null;try{return g=qd(u),typeof g!="object"||g.constructor===Array?0:(f&&(f[h]=g),1)}catch{return 0}},I.jws.JWS.readSafeJSONString=function(u){var f=null;try{return f=qd(u),typeof f!="object"||f.constructor===Array?null:f}catch{return null}},I.jws.JWS.getEncodedSignatureValueFromJWS=function(u){var f=u.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(f==null)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return f[1]},I.jws.JWS.getJWKthumbprint=function(u){if(u.kty!=="RSA"&&u.kty!=="EC"&&u.kty!=="oct")throw"unsupported algorithm for JWK Thumprint";var f="{";if(u.kty==="RSA"){if(typeof u.n!="string"||typeof u.e!="string")throw"wrong n and e value for RSA key";f+='"e":"'+u.e+'",',f+='"kty":"'+u.kty+'",',f+='"n":"'+u.n+'"}'}else if(u.kty==="EC"){if(typeof u.crv!="string"||typeof u.x!="string"||typeof u.y!="string")throw"wrong crv, x and y value for EC key";f+='"crv":"'+u.crv+'",',f+='"kty":"'+u.kty+'",',f+='"x":"'+u.x+'",',f+='"y":"'+u.y+'"}'}else if(u.kty==="oct"){if(typeof u.k!="string")throw"wrong k value for oct(symmetric) key";f+='"kty":"'+u.kty+'",',f+='"k":"'+u.k+'"}'}var h=Es(f),g=I.crypto.Util.hashHex(h,"sha256"),w=ti(g);return w},I.jws.IntDate={},I.jws.IntDate.get=function(u){var f=I.jws.IntDate,h=f.getNow,g=f.getZulu;if(u=="now")return h();if(u=="now + 1hour")return h()+3600;if(u=="now + 1day")return h()+3600*24;if(u=="now + 1month")return h()+3600*24*30;if(u=="now + 1year")return h()+3600*24*365;if(u.match(/Z$/))return g(u);if(u.match(/^[0-9]+$/))return parseInt(u);throw"unsupported format: "+u},I.jws.IntDate.getZulu=function(u){return hr(u)},I.jws.IntDate.getNow=function(){var u=~~(new Date/1e3);return u},I.jws.IntDate.intDate2UTCString=function(u){var f=new Date(u*1e3);return f.toUTCString()},I.jws.IntDate.intDate2Zulu=function(u){var f=new Date(u*1e3),h=("0000"+f.getUTCFullYear()).slice(-4),g=("00"+(f.getUTCMonth()+1)).slice(-2),w=("00"+f.getUTCDate()).slice(-2),E=("00"+f.getUTCHours()).slice(-2),_=("00"+f.getUTCMinutes()).slice(-2),O=("00"+f.getUTCSeconds()).slice(-2);return h+g+w+E+_+O+"Z"},(typeof I>"u"||!I)&&(I={}),(typeof I.jws>"u"||!I.jws)&&(I.jws={}),I.jws.JWSJS=function(){var u=I,f=u.jws,h=f.JWS,g=h.readSafeJSONString;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload=void 0,this.aSignature=[]},this.initWithJWS=function(w){this.init();var E=w.split(".");if(E.length!=3)throw"malformed input JWS";this.aHeader.push(E[0]),this.sPayload=E[1],this.aSignature.push(E[2])},this.addSignature=function(w,E,_,O){if(this.sPayload===void 0||this.sPayload===null)throw"there's no JSON-JS signature to add.";var j=this.aHeader.length;if(this.aHeader.length!=this.aSignature.length)throw"aHeader.length != aSignature.length";try{var N=I.jws.JWS.sign(w,E,this.sPayload,_,O),U=N.split("."),V=U[0],T=U[2];this.aHeader.push(U[0]),this.aSignature.push(U[2])}catch(M){throw this.aHeader.length>j&&this.aHeader.pop(),this.aSignature.length>j&&this.aSignature.pop(),"addSignature failed: "+M}},this.verifyAll=function(w){if(this.aHeader.length!==w.length||this.aSignature.length!==w.length)return!1;for(var E=0;E<w.length;E++){var _=w[E];if(_.length!==2)return!1;var O=this.verifyNth(E,_[0],_[1]);if(O===!1)return!1}return!0},this.verifyNth=function(w,E,_){if(this.aHeader.length<=w||this.aSignature.length<=w)return!1;var O=this.aHeader[w],j=this.aSignature[w],N=O+"."+this.sPayload+"."+j,U=!1;try{U=h.verify(N,E,_)}catch{return!1}return U},this.readJWSJS=function(w){if(typeof w=="string"){var E=g(w);if(E==null)throw"argument is not safe JSON object string";this.aHeader=E.headers,this.sPayload=E.payload,this.aSignature=E.signatures}else try{if(w.headers.length>0)this.aHeader=w.headers;else throw"malformed header";if(typeof w.payload=="string")this.sPayload=w.payload;else throw"malformed signatures";if(w.signatures.length>0)this.aSignature=w.signatures;else throw"malformed signatures"}catch(_){throw"malformed JWS-JS JSON object: "+_}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return this.aHeader.length==0?1:0}},lr.SecureRandom=Rn,lr.rng_seed_time=Li,lr.BigInteger=p,lr.RSAKey=kr,lr.ECDSA=I.crypto.ECDSA,lr.DSA=I.crypto.DSA,lr.Signature=I.crypto.Signature,lr.MessageDigest=I.crypto.MessageDigest,lr.Mac=I.crypto.Mac,lr.KEYUTIL=Sn,lr.ASN1HEX=er,lr.X509=Qr,lr.X509CRL=jF,lr.CryptoJS=o,lr.b64tohex=l,lr.b64toBA=c,lr.ECFieldElementFp=No,lr.ECPointFp=Nn,lr.ECCurveFp=Vs,lr.stoBA=Og,lr.BAtos=_g,lr.BAtohex=Jd,lr.stohex=ua,lr.stob64=iS,lr.stob64u=Pg,lr.b64utos=aS,lr.b64tob64u=Su,lr.b64utob64=Tc,lr.hex2b64=s,lr.hextob64u=ti,lr.b64utohex=Xn,lr.utf8tob64u=Eu,lr.b64utoutf8=Va,lr.utf8tob64=sS,lr.b64toutf8=xg,lr.utf8tohex=Qd,lr.hextoutf8=Hn,lr.hextorstr=ca,lr.rstrtohex=Es,lr.hextob64=jf,lr.hextob64nl=cS,lr.b64nltohex=Dg,lr.hextopem=ye,lr.pemtohex=je,lr.hextoArrayBuffer=Dt,lr.ArrayBuffertohex=$t,lr.zulutomsec=kt,lr.msectozulu=rr,lr.zulutosec=hr,lr.zulutodate=Rr,lr.datetozulu=Lr,lr.uricmptohex=bn,lr.hextouricmp=co,lr.ipv6tohex=Ii,lr.hextoipv6=es,lr.hextoip=ts,lr.iptohex=da,lr.ucs2hextoutf8=Vf,lr.encodeURIComponentAll=wu,lr.newline_toUnix=Xd,lr.newline_toDos=MF,lr.hextoposhex=pS,lr.intarystrtohex=kF,lr.strdiffidx=LF,lr.oidtohex=kR,lr.hextooid=Ng,lr.strpad=Mg,lr.bitstrtoint=FR,lr.inttobitstr=jR,lr.bitstrtobinstr=VR,lr.binstrtobitstr=FF,lr.isBase64URLDot=dS,lr.namearraytobinstr=kg,lr.extendClass=bt,lr.foldnl=Yd,lr.b64topem=Ut,lr.pemtob64=gt,lr.timeogen=un,lr.aryval=oo,lr.inttohex=LR,lr.twoscompl=Bf,lr.KJUR=I,lr.crypto=I.crypto,lr.asn1=I.asn1,lr.jws=I.jws,lr.lang=I.lang,lr.VERSION=r,lr.VERSION_FULL=n,lr}yJ();const d0=async()=>{try{const e=await hu.getDevices(),t=e.filter(o=>o.kind==="audioinput"),r=e.filter(o=>o.kind==="audiooutput"),n=e.filter(o=>o.kind==="videoinput");return{micList:t,speakerList:r,cameraList:n}}catch(e){return console.error("Error fetching devices:",e),{micList:[],speakerList:[],cameraList:[]}}};function Ni(...e){return vJ(_q(e))}const aL=ie.createContext({cameraList:[],activeCameraId:"",selfVideoStarted:!1,localVideoStarted:!1,isBlurred:!1,localVideoRef:ie.createRef(),switchBlurred:()=>Promise.resolve(),startVideo:()=>Promise.resolve(),stopVideo:()=>Promise.resolve(),stopLocalVideo:()=>Promise.resolve(),switchCamera:()=>Promise.resolve(),attachUserVideo:()=>Promise.resolve(),detachUserVideo:()=>Promise.resolve(),attachSharedVideo:()=>Promise.resolve(),detachSharedVideo:()=>Promise.resolve(),startScreenSharing:()=>Promise.resolve(),finishScreenSharing:()=>Promise.resolve(),checkIfUserIdRegisteredInCanvas:()=>!1}),zd=()=>{const e=ie.useContext(aL);if(!e)throw new Error("useVideoContext must be used within VideoProvider");return e},bJ=()=>{const e=ie.useRef(hu.createLocalVideoTrack()),t=ie.useRef(null),[r,n]=ie.useState(!1),o=ie.useCallback(async l=>{const c=t.current;if(!(!c||r)){e.current||(e.current=hu.createLocalVideoTrack());try{await e.current.stop()}catch(d){if(!(d instanceof Error&&d.message==="VideoNotStartedError"))throw d}await e.current.switchCamera(l),await e.current.start(c),n(!0)}},[r]),i=ie.useCallback(async()=>{!t.current||!r||(n(!1),await e.current.stop())},[r]),a=ie.useCallback(async l=>{t.current&&await e.current.switchCamera(l)},[]),s=ie.useCallback(async l=>{await e.current.updateVirtualBackground(l?"blur":"")},[]);return ie.useEffect(()=>{const l=t.current;if(!l)return;const c=new MutationObserver(()=>{r&&!document.contains(l)&&n(!1)});return c.observe(document.body,{childList:!0,subtree:!0}),()=>c.disconnect()},[r]),Rq(async()=>{r&&(n(!1),await e.current.stop().catch(console.error)),console.log("useLocalVideo unmounted, stopped local video")}),ie.useMemo(()=>({ref:t,started:r,start:o,stop:i,switch:a,updateVirtualBackground:s}),[r,o,i,a,s])},SJ=e=>e instanceof Error||e!==null&&typeof e=="object"&&(typeof e.type=="string"||typeof e.message=="string")?`${(e==null?void 0:e.type)||(e==null?void 0:e.message)}: ${(e==null?void 0:e.reason)||(e==null?void 0:e.errorCode)||""}`:typeof e=="string"?e:"Se ha producido un error inesperado",EJ=()=>{const{notify:e}=bs();return ie.useMemo(()=>{const t=n=>{e({header:"Se ha producido un error inesperado",message:SJ(n),severity:"error"})};return n=>{try{const o=n();return o instanceof Promise?o.catch(i=>{throw t(i),i}):o}catch(o){throw t(o),o}}},[e])},CJ=()=>/iPad/i.test(navigator.userAgent)||/MacIntel/i.test(navigator==null?void 0:navigator.platform)&&(navigator==null?void 0:navigator.maxTouchPoints)>2,wJ=()=>{const{userAgent:e}=navigator;return/iPad|iPhone|iPod/i.test(e)||CJ()},IJ=()=>/android/i.test(navigator.userAgent),AJ=()=>IJ()||wJ(),EN=[{deviceId:qi.User,label:"Front Camera"},{deviceId:qi.Environment,label:"Back Camera"}],RJ=({children:e})=>{const t=EJ(),{zmClient:r,sessionStarted:n,isSessionStarted:o}=ll(),i=bJ(),a=ie.useRef(new Map),[s,l]=ie.useState([]),[c,d]=ie.useState(""),[p,m]=ie.useState(!1),[y,b]=ie.useState(!1);ie.useEffect(()=>{console.log("cameraList: ",s),console.log("activeCameraId: ",c)},[s,c]);const v=ie.useMemo(()=>AJ(),[]),C=ie.useCallback(async oe=>{if(b(oe),!o()){await t(()=>i.updateVirtualBackground(oe));return}const Ee=r.getMediaStream();!n||!(Ee!=null&&Ee.isSupportVirtualBackground())||(oe?await t(()=>Ee.updateVirtualBackgroundImage("blur")):await t(()=>Ee.updateVirtualBackgroundImage("")))},[o,i,t,n,r]),A=ie.useCallback(async()=>{if(!o()){console.log("Starting local video"),await t(()=>i.start(c));return}const oe=r.getMediaStream();if(!oe)return;const Ee=oe.getActiveCamera(),ce=typeof SharedArrayBuffer=="function";console.log("isSharedArrayBufferSupported: ",ce);const _e={hd:!0,fullHd:!1,ptz:!1,originalRatio:!0,virtualBackground:ce?{imageUrl:y?"blur":""}:void 0,...c?{cameraId:c}:{cameraId:Ee}};await t(()=>oe.startVideo(_e)),console.log("Started video in session")},[o,y,r,c,t,i]),R=ie.useCallback(async()=>{await t(()=>i.stop()),console.log("Local video stopped")},[i,t]),x=ie.useCallback(async()=>{const oe=r.getMediaStream();oe&&(await t(()=>oe.stopVideo()),console.log("Video stopped"))},[r,t]),k=ie.useCallback(async oe=>{if(!o()){await t(()=>i.switch(oe)),d(oe);return}const Ee=r.getMediaStream();Ee&&(p&&await t(()=>Ee.switchCamera(oe)),d(oe))},[o,r,p,t,i]),D=ie.useCallback(async(oe,Ee)=>{const ce=r.getMediaStream();!ce||!Ee||(a.current.set(oe,Ee),await t(()=>ce.attachVideo(oe,3,Ee)),console.log("Attached video for user: ",oe))},[r,t]),F=ie.useCallback(async oe=>{var ce;const Ee=r.getMediaStream();Ee&&((ce=r.getSessionInfo())!=null&&ce.isInMeeting&&await t(()=>Ee.detachVideo(oe)),a.current.delete(oe),console.log("Detached video for user: ",oe))},[r,t]),$=ie.useCallback(async oe=>{const Ee=r.getMediaStream(),{selfShareCanvas:ce}=oe;(Ee==null?void 0:Ee.getShareStatus())===Mr.End&&ce&&(Ee==null||Ee.startShareScreen(ce,{}))},[r]),H=ie.useCallback(async()=>{const oe=r.getMediaStream();(oe==null?void 0:oe.getShareStatus())===Mr.Sharing&&await t(()=>oe==null?void 0:oe.stopShareScreen())},[r,t]),q=ie.useCallback(async({userId:oe,videoPlayer:Ee})=>{const ce=r.getMediaStream();ce&&await t(()=>ce.attachShareView(oe,Ee))},[r,t]),G=ie.useCallback(async oe=>{var ce;const Ee=r.getMediaStream();Ee&&(ce=r.getSessionInfo())!=null&&ce.isInMeeting&&await t(()=>Ee.detachShareView(oe))},[r,t]),Q=ie.useCallback(oe=>a.current.has(oe),[]);ie.useEffect(()=>{if(!n)return;const oe=ne=>{console.log("active-media-failed: ",ne),ne.type==="video"&&m(!1)},Ee=()=>{v?(l(EN),[qi.User,qi.Environment].includes(c)||d(qi.User)):d0().then(({cameraList:ne})=>{var be;l(ne),ne.find(re=>re.deviceId===c)||d(((be=ne[0])==null?void 0:be.deviceId)||"")}),console.log("Video devices changed")},ce=ne=>{console.log("video-capturing-change: ",ne),ne.state==="Started"?m(!0):ne.state==="Stopped"?m(!1):ne.state==="Failed"&&console.error("Failed to capture video")},_e=ne=>{H(),console.log("Passively stopped share due to: ",ne)},xe=ne=>{console.log("Device permission changed: ",ne),ne.name==="camera"&&ne.state==="denied"&&m(!1)};return r.on("active-media-failed",oe),r.on("device-change",Ee),r.on("device-permission-change",xe),r.on("video-capturing-change",ce),r.on("passively-stop-share",_e),()=>{r.off("active-media-failed",oe),r.off("device-change",Ee),r.off("device-permission-change",xe),r.off("video-capturing-change",ce),r.off("passively-stop-share",_e)}},[c,H,v,n,r]),z9(()=>{v?(l(EN),d(qi.User)):d0().then(({cameraList:oe})=>{var Ee;l(oe),d(((Ee=oe[0])==null?void 0:Ee.deviceId)||"")})});const de=ie.useMemo(()=>({activeCameraId:c,attachSharedVideo:q,attachUserVideo:D,cameraList:s,checkIfUserIdRegisteredInCanvas:Q,detachSharedVideo:G,detachUserVideo:F,finishScreenSharing:H,isBlurred:y,localVideoRef:i.ref,localVideoStarted:i.started,selfVideoStarted:n&&p,startScreenSharing:$,startVideo:A,stopLocalVideo:R,stopVideo:x,switchBlurred:C,switchCamera:k}),[c,q,D,s,Q,G,F,H,y,i.ref,i.started,n,p,$,A,R,x,C,k]);return ae.jsx(aL.Provider,{value:de,children:e})},sL=ie.createContext({micList:[],activeMicId:"",micMuted:!1,muteMic:()=>Promise.resolve(),muteUserMic:()=>Promise.resolve(),unmuteMic:()=>Promise.resolve(),unmuteUserMic:()=>Promise.resolve(),switchMic:()=>Promise.resolve(),speakerList:[],activeSpeakerId:"",switchSpeaker:()=>Promise.resolve(),startAudio:()=>Promise.resolve(),setMicList:()=>{},setSpeakerList:()=>{},setActiveMicId:()=>{},setActiveSpeakerId:()=>{},setMicMuted:()=>{},hostAskUnmute:!1,resetHostAskUnmute:()=>{}}),Ac=()=>ie.useContext(sL),TJ={"init-pre-session":["admin"],"init-session":["admin"],"activate-chat":["admin"],"toggle-user-audio":["admin","panelist"],"toggle-user-video":["admin","panelist"],"join-session-with-video":["admin","panelist"],"join-session-with-audio":["admin","panelist"],"revoke-manager-role":["admin"],"make-manager-role":["admin"],"transfer-host-role":["admin"],"request-host-role":["attendee","panelist"],"show-attendee-list":["admin","panelist"],"share-screen":["admin","panelist"],"show-toggle-video-button":["admin","panelist"],"allow-toggle-audio":["admin","panelist"],"request-turn":["attendee"],"grant-turn":["admin","panelist"],"activate-turn-queue":["admin"],"view-activate-turn-queue":["admin","panelist"]},lL=ie.createContext({activeSpeakers:[],activeVideoParticipant:null,currentUser:null,screenSharingUser:null,users:[]}),bu=()=>ie.useContext(lL),OJ=({children:e})=>{const{zmClient:t,signature:r,isSessionStarted:n}=ll(),[o,i]=ie.useState([]),[a,s]=ie.useState(null),[l,c]=ie.useState([]),[d,p]=ie.useState(null),[m,y]=ie.useState(null);ie.useEffect(()=>{if(!n())return;const v=F=>{if(F&&F.length>0){c(F);const $=t.getAllUser().find(H=>H.userId===F[0].userId);$&&p($)}else c([]);console.log("active-speaker-change: ",F)},C=()=>{console.log("user-added"),i(t.getAllUser())},A=()=>{console.log("user-removed"),i(t.getAllUser())},R=F=>{const $=t.getCurrentUserInfo();$&&(i(t.getAllUser()),s($),console.log("user-updated: ",F))},x=F=>{console.log("video-active-change: ",F);const $=t.getAllUser().find(H=>H.userId===F.userId);$&&p($)},k=F=>{const $=t.getCurrentUserInfo();$&&["Started","Stopped"].includes(F.state)&&s($),F.state==="Failed"&&(console.error("Failed to capture video"),s($))},D=async F=>{const{userId:$,state:H}=F;if(H==="Inactive"){y(null);return}const q=t.getAllUser().find(G=>G.userId===$)??null;y(q)};return t.on("active-speaker",v),t.on("user-added",C),t.on("user-removed",A),t.on("user-updated",R),t.on("video-active-change",x),t.on("video-capturing-change",k),t.on("active-share-change",D),()=>{t.off("active-speaker",v),t.off("user-added",C),t.off("user-removed",A),t.off("user-updated",R),t.off("video-active-change",x),t.off("video-capturing-change",k),t.off("active-share-change",D)}},[n,r,t]),ie.useEffect(()=>{if(!n())return;i(t.getAllUser());const v=t.getCurrentUserInfo();v&&s(v);const C=t.getMediaStream().getActiveShareUserId();if(C){const A=t.getAllUser().find(R=>R.userId===C)??null;y(A)}},[n,t]),CR(()=>{const v=t.getSessionHost();v&&!d&&n()&&(console.log("Initial setting active video participant to host user: ",v.displayName),p(v))});const b=ie.useMemo(()=>({activeSpeakers:l,activeVideoParticipant:d,currentUser:a,screenSharingUser:m,users:o}),[l,d,a,m,o]);return ae.jsx(lL.Provider,{value:b,children:e})},Kd=()=>{const{currentUser:e}=bu(),t=!!e&&_J(e);return ie.useCallback(r=>t&&TJ[r].includes(t),[t])},_J=e=>e!=null&&e.isHost?"admin":e!=null&&e.isManager?"panelist":"attendee",PJ=({children:e})=>{const{notify:t}=bs(),{zmClient:r,isSessionStarted:n}=ll(),o=Kd(),[i,a]=ie.useState([]),[s,l]=ie.useState(""),[c,d]=ie.useState(!1),[p,m]=ie.useState([]),[y,b]=ie.useState(""),[v,C]=ie.useState(!1),A=ie.useCallback(async()=>{const G=r.getMediaStream();G&&await G.startAudio({microphoneId:s,speakerId:y,mute:c})},[r,s,y,c]),R=ie.useCallback(async()=>{if(!n()){await d(!0);return}const G=r.getMediaStream();G&&(d(!0),await G.muteAudio())},[n,r]),x=ie.useCallback(async G=>{const Q=r.getMediaStream();Q&&await Q.muteAudio(G)},[r]),k=ie.useCallback(async()=>{if(!n()){d(!1);return}const G=r.getMediaStream();G&&(d(!1),await G.unmuteAudio())},[n,r]),D=ie.useCallback(async G=>{const Q=r.getMediaStream();Q&&await Q.unmuteAudio(G)},[r]),F=ie.useCallback(async G=>{if(l(G),n()){const Q=r.getMediaStream();if(!Q)return;await Q.switchMicrophone(G)}},[r,n]),$=ie.useCallback(async G=>{if(b(G),n()){const Q=r.getMediaStream();if(!Q)return;await Q.switchSpeaker(G)}},[r,n]),H=ie.useCallback(()=>{C(!1)},[]);ie.useEffect(()=>{if(!n())return;const G=()=>{d0().then(({micList:ce,speakerList:_e})=>{var xe,ne;a(ce),m(_e),ce.find(be=>be.deviceId===s)||l(((xe=ce[0])==null?void 0:xe.deviceId)||""),_e.find(be=>be.deviceId===y)||b(((ne=_e[0])==null?void 0:ne.deviceId)||"")}),console.log("Audio devices changed")},Q=ce=>{C(["Unmute","Spotlight"].includes(ce.reason)),console.log("host-ask-unmute-audio: ",ce)},de=ce=>{console.log("active-media-failed: ",ce),ce.type==="audio"&&d(!0)},oe=()=>{o("allow-toggle-audio")&&t({header:"Micrófono silenciado",message:"Estás hablando pero tu micrófono está silenciado.",severity:"info"})},Ee=ce=>{const _e=r.getCurrentUserInfo();if(!_e)return;const xe=ce.find(ne=>ne.userId===_e.userId);(xe==null?void 0:xe.muted)!==void 0&&d(xe.muted),console.log("user-updated (muted): ",ce)};return r.on("active-media-failed",de),r.on("device-change",G),r.on("host-ask-unmute-audio",Q),r.on("speaking-while-muted",oe),r.on("user-updated",Ee),()=>{r.off("active-media-failed",de),r.off("device-change",G),r.off("host-ask-unmute-audio",Q),r.off("speaking-while-muted",oe),r.off("user-updated",Ee)}},[r,n,s,y,o,t]),z9(()=>{d0().then(({micList:G,speakerList:Q})=>{var de,oe;a(G),m(Q),l(((de=G[0])==null?void 0:de.deviceId)||""),b(((oe=Q[0])==null?void 0:oe.deviceId)||"")})});const q=ie.useMemo(()=>({micList:i,activeMicId:s,micMuted:c,speakerList:p,activeSpeakerId:y,hostAskUnmute:v,resetHostAskUnmute:H,muteMic:R,muteUserMic:x,unmuteMic:k,unmuteUserMic:D,switchMic:F,switchSpeaker:$,startAudio:A,setMicList:a,setSpeakerList:m,setActiveMicId:l,setActiveSpeakerId:b,setMicMuted:d}),[i,s,c,p,y,v,H,R,x,k,D,F,$,A,a,m,l,b,d]);return ae.jsx(sL.Provider,{value:q,children:e})},uL=ie.createContext({messages:[],receivers:[],sendMessage:()=>Promise.resolve(),updateReceiversAndChatHistory:()=>{}}),cL=()=>ie.useContext(uL),xJ=({children:e})=>{const{zmClient:t,isSessionStarted:r}=ll(),[n,o]=ie.useState([]),[i,a]=ie.useState([]),[s,l]=ie.useState(null),c=ie.useCallback(async({text:b,receiverId:v})=>{if(!s||!(b!=null&&b.trim()))return;await(v!==0?()=>s.send(b,v):()=>s.sendToAll(b))()},[s]),d=ie.useCallback(()=>{s&&o(s.getHistory()??[])},[s]),p=ie.useCallback(()=>{s&&a(s.getReceivers()??[])},[s]),m=ie.useCallback(()=>{p(),d()},[p,d]);ie.useEffect(()=>{if(!r()||s)return;const b=t.getChatClient();l(b),a(b.getReceivers()??[]),o(b.getHistory()??[])},[s,t,r]),ie.useEffect(()=>{if(!r())return;const b=v=>{o(C=>[...C,v])};return t.on("chat-on-message",b),()=>{t.off("chat-on-message",b)}},[t,r]),ie.useEffect(()=>{if(!r())return;const b=()=>{m()},v=()=>{m()};return t.on("user-added",b),t.on("user-removed",v),()=>{t.off("user-added",b),t.off("user-removed",v)}},[t,r,m]);const y=ie.useMemo(()=>({messages:n,receivers:i,sendMessage:c,updateReceiversAndChatHistory:m}),[n,i,c,m]);return ae.jsx(uL.Provider,{value:y,children:e})},DJ=(e,t)=>({...e,active:t.active,timestamp:t.timestamp}),NJ=(e,t)=>{switch(t.type){case"LOWER-USER-HAND":return{...e,speakerQueueIds:e.speakerQueueIds.filter(r=>r!==t.userId)};case"TOGGLE-HAND":{const r=[...e.speakerQueueIds],n=r.indexOf(t.senderId);return n>-1?r.splice(n,1):r.push(t.senderId),{...e,speakerQueueIds:r}}case"TOGGLE-TURN-QUEUE":return{...e,turnQueueState:{...e.turnQueueState,active:t.active,timestamp:t.timestamp}};default:return e}},MJ=(e,t)=>{switch(t.type){case"CHANGE-SESSION-STATUS":return{...e,status:t.status};default:return e}},kJ=(e,t)=>{switch(t.type){case"REQUEST-HOST-ROLE":return{userId:t.userId,timestamp:t.timestamp};default:return e}},LJ=(e,t)=>{switch(t.type){case"SEND-SHARED-STATE":return t.state;case"TOGGLE-CHAT":return{...e,chatState:DJ(e.chatState,t)};case"TOGGLE-HAND":case"LOWER-USER-HAND":case"TOGGLE-TURN-QUEUE":return{...e,speakerTurnState:NJ(e.speakerTurnState,t)};case"CHANGE-SESSION-STATUS":return{...e,sessionState:MJ(e.sessionState,t)};case"REQUEST-HOST-ROLE":return{...e,requestHostRoleState:kJ(e.requestHostRoleState,t)};default:return e}},dL={active:!0,timestamp:0},pL={active:!0,timestamp:0},fL={userId:null,timestamp:0},hL=ie.createContext({sharedState:{speakerTurnState:{speakerQueueIds:[],turnQueueState:pL},sessionState:{status:eu.NOT_STARTED},chatState:dL,requestHostRoleState:fL},requestSharedState:()=>Promise.resolve(),speakerQueue:[],raisedHand:!1,toggleHand:()=>Promise.resolve(),lowerUserHand:()=>Promise.resolve(),toggleTurnQueue:()=>Promise.resolve(),toggleChat:()=>Promise.resolve(),alertUser:()=>Promise.resolve(),changeSessionStatus:()=>Promise.resolve(),requestHostRole:()=>Promise.resolve(),requestedHostUser:null,requestedHostRoleDialogVisible:!1,rejectHostRoleRequest:()=>Promise.resolve(),transferHostRoleToUser:()=>Promise.resolve()}),hg=()=>ie.useContext(hL),FJ=3,jJ=500,VJ=1e4,BJ=()=>{const{zmClient:e}=ll(),t=ie.useRef(void 0);return ie.useEffect(()=>{const r=n=>{t.current=n};return e.on("command-channel-status",r),()=>{e.off("command-channel-status",r)}},[e]),ie.useCallback(async(r,n)=>{const{maxAttempts:o=FJ,initialDelay:i=jJ,connectionTimeout:a=VJ,userId:s}=n||{},l=e.getCommandClient(),c=async()=>{if(t.current===au.Connected)return;const d=Date.now();for(;Date.now()-d<a;){if(t.current===au.Connected){console.info("Command channel connected, proceeding to send...");return}await new Promise(p=>setTimeout(p,100))}throw new Error(`Command channel connection timeout after ${a}ms`)};await c();for(let d=0;d<o;d++)try{await l.send(JSON.stringify(r),s),d>0&&console.info(`Action sent successfully on attempt ${d+1}`);return}catch(p){if(d===o-1)throw console.error(`Failed to send action after ${o} attempts:`,p),p;const y=i*Math.pow(2,d);console.warn(`Attempt ${d+1} failed, retrying in ${y}ms...`,p),await new Promise(b=>setTimeout(b,y)),t.current!==au.Connected&&(console.warn("Connection lost during retries, waiting for reconnection..."),await c())}},[e])},HJ={"REQUEST-SHARED-STATE":(e,{zmClient:t,sendAction:r,sharedState:n})=>{if(e.type!=="REQUEST-SHARED-STATE")return;const o=t.getCurrentUserInfo();o!=null&&o.isHost&&r({type:"SEND-SHARED-STATE",state:n},{userId:e.userId})},"ALERT-USER":(e,{zmClient:t,alert:r})=>{if(e.type!=="ALERT-USER")return;const n=t.getCurrentUserInfo();(n==null?void 0:n.userId)===e.userId&&r({message:e.message})},"REQUEST-HOST-ROLE":(e,{dispatch:t,zmClient:r,setRequestedHostRoleDialogVisible:n})=>{if(e.type!=="REQUEST-HOST-ROLE")return;const o=r.getCurrentUserInfo();t(e),o!=null&&o.isHost&&n(!0)}},UJ=({children:e})=>{const{changeUserRole:t}=Hd(),{zmClient:r}=ll(),{users:n,currentUser:o}=bu(),{alert:i,notify:a}=bs(),[s,l]=ie.useReducer(LJ,{chatState:dL,sessionState:{status:eu.NOT_STARTED},speakerTurnState:{turnQueueState:pL,speakerQueueIds:[]},requestHostRoleState:fL}),[c,d]=ie.useState(!1),p=BJ(),m=ie.useCallback(async(G,Q)=>{await p({type:"ALERT-USER",message:Q,userId:G})},[p]),y=ie.useMemo(()=>{const G=r.getCurrentUserInfo();return G&&s.speakerTurnState.speakerQueueIds.includes(G.userId)},[r,s.speakerTurnState.speakerQueueIds]),b=ie.useMemo(()=>s.speakerTurnState.speakerQueueIds.map(G=>n.find(de=>de.userId===G)).filter(G=>G!==void 0),[n,s.speakerTurnState.speakerQueueIds]),v=ie.useCallback(async()=>{const G=r.getCurrentUserInfo();await p({type:"REQUEST-SHARED-STATE",userId:G.userId})},[r,p]),C=ie.useCallback(async()=>{const G=r.getCurrentUserInfo();if(!G)return;const Q={type:"TOGGLE-HAND",senderId:G==null?void 0:G.userId};await p(Q),l(Q)},[r,p]),A=ie.useCallback(async G=>{const Q={type:"TOGGLE-CHAT",active:G,timestamp:new Date().getTime()};await p(Q),l(Q)},[p]),R=ie.useCallback(async G=>{const Q={type:"LOWER-USER-HAND",userId:G};await p(Q),l(Q)},[p]),x=ie.useCallback(async G=>{const Q={type:"TOGGLE-TURN-QUEUE",active:G,timestamp:new Date().getTime()};await p(Q),l(Q)},[p]),k=ie.useCallback(async G=>{const Q={type:"CHANGE-SESSION-STATUS",status:G};await p(Q),l(Q)},[p]),D=ie.useCallback(async()=>{const G=r.getCurrentUserInfo();if(!G)return;const Q={type:"REQUEST-HOST-ROLE",userId:G.userId,timestamp:new Date().getTime()};await p(Q),l(Q)},[p,r]),F=ie.useCallback(async()=>{const G=s.requestHostRoleState.userId;G&&(await m(G,"El anfitrión ha rechazado tu solicitud para convertirte en anfitrión.").catch(console.error),d(!1),l({type:"REQUEST-HOST-ROLE",userId:null,timestamp:0}))},[s.requestHostRoleState.userId,m]),$=ie.useMemo(()=>{const G=s.requestHostRoleState.userId;return G?r.getUser(G)??null:null},[s.requestHostRoleState.userId,r]),H=ie.useCallback(async({userId:G})=>{await r.makeHost(G).catch(console.error),await(t==null?void 0:t({userId:G,role:"HOST"}).catch(console.error)),await m(G,"¡Ha sido promocionado a anfitrión!").catch(console.error),d(!1),a({header:"Cambio a anfitrión",message:"Has cambiado a anfitrión a este usuario.",severity:"success"}),l({type:"REQUEST-HOST-ROLE",userId:null,timestamp:0})},[m,t,a,r]);ie.useEffect(()=>{const G=Q=>{const de=JSON.parse(Q.text),oe={zmClient:r,sendAction:p,sharedState:s,alert:i,dispatch:l,setRequestedHostRoleDialogVisible:d},Ee=HJ[de.type];Ee?Ee(de,oe):l(de)};return r.on("command-channel-message",G),()=>{r.off("command-channel-message",G)}},[r,s,o,p,i]);const q=ie.useMemo(()=>({sharedState:s,requestSharedState:v,speakerQueue:b,raisedHand:y,toggleHand:C,lowerUserHand:R,toggleTurnQueue:x,toggleChat:A,alertUser:m,changeSessionStatus:k,requestHostRole:D,requestedHostRoleDialogVisible:c,rejectHostRoleRequest:F,transferHostRoleToUser:H,requestedHostUser:$}),[s,v,b,y,C,R,x,A,m,k,D,H,F,c,$]);return ae.jsx(hL.Provider,{value:q,children:e})};function hc(e,t){if(!e)throw new Error(`[${t}] Ref not mounted or ready`);return e}const mL=ie.forwardRef(({onChangeUserRole:e,onInitVotingPreSession:t,onInitVotingSession:r,onCloseVotingSession:n,credentials:o,children:i,videoSessionStatus:a},s)=>{const[l,c]=ie.useState(0),[d,p]=ie.useState(eu.NOT_STARTED),m=ie.useCallback(async k=>{await(e==null?void 0:e(k))},[e]),y=ie.useCallback(async()=>{!t||a!==eu.NOT_STARTED||(await t(),p(eu.ONLY_PANELIST))},[t,a]),b=ie.useCallback(async()=>{r&&(await r(),p(eu.IN_PROGRESS))},[r]),v=ie.useCallback(async()=>{n&&(await n(),p(eu.CLOSED))},[n]),C=ie.useCallback(k=>{c(k)},[]),A=ie.useRef(null);ie.useImperativeHandle(s,()=>({isReady:()=>{var k;return((k=A.current)==null?void 0:k.isReady())??!1},cleanup:()=>hc(A.current,"SessionProvider").cleanup(),getSessionStarted:()=>hc(A.current,"SessionProvider").getSessionStarted(),joinSession:()=>hc(A.current,"SessionProvider").joinSession(),leaveSession:k=>hc(A.current,"SessionProvider").leaveSession(k)}),[]);const R=ie.useMemo(()=>({appendTo:""}),[]);ie.useEffect(()=>{console.log("VideoPluginProvider: sessionStatus changed:",d),a!==void 0&&d!==a&&p(a)},[a]);const x=ie.useMemo(()=>({credentials:o,changeUserRole:m,breakpoint:l,changePluginBreakpoint:C,sessionStatus:d,initVotingPreSession:y,initVotingSession:b,closeVotingSession:v}),[o,m,l,C,d,y,b,v]);return ae.jsx(W3.Provider,{value:x,children:ae.jsx(wq,{children:ae.jsx($9,{ref:A,children:ae.jsx(OJ,{children:ae.jsx(RJ,{children:ae.jsx(PJ,{children:ae.jsx(xJ,{children:ae.jsx(UJ,{children:ae.jsx(mj,{value:R,children:i})})})})})})})})})});mL.displayName="VideoPluginProvider";var Dm=(e=>(e[e.Mobile=0]="Mobile",e[e.Tablet=1]="Tablet",e[e.Desktop=2]="Desktop",e))(Dm||{});const $J=768,gL=1024,WJ=()=>{const[e,{width:t}]=Oq(),r=ie.useMemo(()=>t<$J?0:t<gL?1:2,[t]);return{ref:e,width:t,breakpoint:r}};function Nm(e){"@babel/helpers - typeof";return Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nm(e)}function zJ(e,t){if(Nm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KJ(e){var t=zJ(e,"string");return Nm(t)=="symbol"?t:t+""}function GJ(e,t,r){return(t=KJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},sd.apply(null,arguments)}function Xw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function qJ(e){if(Array.isArray(e))return Xw(e)}function JJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vL(e,t){if(e){if(typeof e=="string")return Xw(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xw(e,t):void 0}}function QJ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1022
1022
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CN(e){return qJ(e)||JJ(e)||vL(e)||QJ()}function YJ(e){if(Array.isArray(e))return e}function XJ(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,o=d}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function ZJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1023
1023
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sp(e,t){return YJ(e)||XJ(e,t)||vL(e,t)||ZJ()}var eQ=`
|
|
1024
1024
|
@layer primereact {
|
|
@@ -1778,7 +1778,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1778
1778
|
cursor: pointer;
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
`,Bv=Ar.extend({defaultProps:{__TYPE:"Avatar",className:null,icon:null,image:null,imageAlt:"avatar",imageFallback:"default",label:null,onImageError:null,shape:"square",size:"normal",style:null,template:null,children:void 0},css:{classes:cX,styles:dX}});function QN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QN(Object(r),!0).forEach(function(n){iX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var LL=S.forwardRef(function(e,t){var r=Vr(),n=S.useContext(qr),o=Bv.getProps(e,n),i=S.useRef(null),a=S.useState(!1),s=JN(a,2),l=s[0],c=s[1],d=S.useState(!1),p=JN(d,2),m=p[0],y=p[1],b=Bv.setMetaData({props:o,state:{imageFailed:l,nested:m}}),v=b.ptm,C=b.cx,A=b.isUnstyled;vo(Bv.css.styles,A,{name:"avatar"});var R=function(){if(fe.isNotEmpty(o.image)&&!l){var $=r({src:o.image,onError:x},v("image"));return S.createElement("img",pI({alt:o.imageAlt},$))}else if(o.label){var H=r({className:C("label")},v("label"));return S.createElement("span",H,o.label)}else if(o.icon){var q=r({className:C("icon")},v("icon"));return nn.getJSXIcon(o.icon,pX({},q),{props:o})}return null},x=function($){o.imageFallback==="default"?o.onImageError||(c(!0),$.target.src=null):$.target.src=o.imageFallback,o.onImageError&&o.onImageError($)};S.useEffect(function(){var F=le.isAttributeEquals(i.current.parentElement,"data-pc-name","avatargroup");y(F)},[]),S.useImperativeHandle(t,function(){return{props:o,getElement:function(){return i.current}}});var k=r({ref:i,style:o.style,className:dt(o.className,C("root",{imageFailed:l}))},Bv.getOtherProps(o),v("root")),D=o.template?fe.getJSXElement(o.template,o):R();return S.createElement("div",k,D,o.children)});LL.displayName="Avatar";const YN=["bg-medievalblue-50","bg-highblue-50","bg-lavender-50","bg-neutral-20","bg-danger-60","bg-success-70","bg-warning-10","bg-info-90","bg-started","bg-updated","bg-contest","bg-danger-90","bg-shareholders","bg-bluetiful-50","bg-assembly","bg-contest-light","bg-shareholders-light","bg-error-10","bg-draft","bg-union-elections"],fX=({sender:e,isHost:t})=>{var i;const r=(((i=e.name)==null?void 0:i.split(" ").map(a=>a[0]).join("").slice(0,2))||"").toUpperCase(),n=e.userId%YN.length,o=YN[n];return ae.jsxs("div",{className:"flex items-center gap-8 mb-4",children:[ae.jsx(LL,{label:r,shape:"circle",className:Ni("!text-white font-semibold text-s select-none",o)}),ae.jsx("span",{className:"font-semibold",children:e.name}),t&&ae.jsx(yg,{label:"Admin",className:"text-neutral-50 rounded-l font-semibold"})]})},hX=({chatMessage:e,currentUserId:t,isHost:r})=>{const n=e.sender.userId===t,o=e.receiver.userId===t,i=e.receiver.userId===0;return!i&&!n&&!o?null:ae.jsxs(ae.Fragment,{children:[!n&&ae.jsx(fX,{sender:e.sender,isHost:r}),ae.jsxs(kL,{className:Ni("flex flex-col gap-4 py-8 px-12 w-4/5 rounded-xl",n?"ml-auto rounded-tr-none bg-bluetiful-95":"mr-auto rounded-tl-none bg-neutral-90"),unstyled:!0,"
|
|
1781
|
+
`,Bv=Ar.extend({defaultProps:{__TYPE:"Avatar",className:null,icon:null,image:null,imageAlt:"avatar",imageFallback:"default",label:null,onImageError:null,shape:"square",size:"normal",style:null,template:null,children:void 0},css:{classes:cX,styles:dX}});function QN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QN(Object(r),!0).forEach(function(n){iX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QN(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var LL=S.forwardRef(function(e,t){var r=Vr(),n=S.useContext(qr),o=Bv.getProps(e,n),i=S.useRef(null),a=S.useState(!1),s=JN(a,2),l=s[0],c=s[1],d=S.useState(!1),p=JN(d,2),m=p[0],y=p[1],b=Bv.setMetaData({props:o,state:{imageFailed:l,nested:m}}),v=b.ptm,C=b.cx,A=b.isUnstyled;vo(Bv.css.styles,A,{name:"avatar"});var R=function(){if(fe.isNotEmpty(o.image)&&!l){var $=r({src:o.image,onError:x},v("image"));return S.createElement("img",pI({alt:o.imageAlt},$))}else if(o.label){var H=r({className:C("label")},v("label"));return S.createElement("span",H,o.label)}else if(o.icon){var q=r({className:C("icon")},v("icon"));return nn.getJSXIcon(o.icon,pX({},q),{props:o})}return null},x=function($){o.imageFallback==="default"?o.onImageError||(c(!0),$.target.src=null):$.target.src=o.imageFallback,o.onImageError&&o.onImageError($)};S.useEffect(function(){var F=le.isAttributeEquals(i.current.parentElement,"data-pc-name","avatargroup");y(F)},[]),S.useImperativeHandle(t,function(){return{props:o,getElement:function(){return i.current}}});var k=r({ref:i,style:o.style,className:dt(o.className,C("root",{imageFailed:l}))},Bv.getOtherProps(o),v("root")),D=o.template?fe.getJSXElement(o.template,o):R();return S.createElement("div",k,D,o.children)});LL.displayName="Avatar";const YN=["bg-medievalblue-50","bg-highblue-50","bg-lavender-50","bg-neutral-20","bg-danger-60","bg-success-70","bg-warning-10","bg-info-90","bg-started","bg-updated","bg-contest","bg-danger-90","bg-shareholders","bg-bluetiful-50","bg-assembly","bg-contest-light","bg-shareholders-light","bg-error-10","bg-draft","bg-union-elections"],fX=({sender:e,isHost:t})=>{var i;const r=(((i=e.name)==null?void 0:i.split(" ").map(a=>a[0]).join("").slice(0,2))||"").toUpperCase(),n=e.userId%YN.length,o=YN[n];return ae.jsxs("div",{className:"flex items-center gap-8 mb-4",children:[ae.jsx(LL,{label:r,shape:"circle",className:Ni("!text-white font-semibold text-s select-none",o)}),ae.jsx("span",{className:"font-semibold",children:e.name}),t&&ae.jsx(yg,{label:"Admin",className:"text-neutral-50 rounded-l font-semibold"})]})},hX=({chatMessage:e,currentUserId:t,isHost:r})=>{const n=e.sender.userId===t,o=e.receiver.userId===t,i=e.receiver.userId===0;return!i&&!n&&!o?null:ae.jsxs(ae.Fragment,{children:[!n&&ae.jsx(fX,{sender:e.sender,isHost:r,"data-testid":"sender-info"}),ae.jsxs(kL,{"aria-label":n?"Your message":`Message from ${e.sender.name}`,className:Ni("flex flex-col gap-4 py-8 px-12 w-4/5 rounded-xl",n?"ml-auto rounded-tr-none bg-bluetiful-95":"mr-auto rounded-tl-none bg-neutral-90"),unstyled:!0,"data-testid":"message-card","data-sender":n?"self":e.sender.name,role:"article",children:[ae.jsx(rX,{isCurrentUserSender:n,isPrivate:!i,receiverName:e.receiver.name,isPrivateToCurrentUser:!n&&o,"data-testid":"message-header"}),ae.jsx("span",{"aria-label":"Chat message",className:"flex items-center gap-8 whitespace-pre-line","data-testid":"message-text",children:e.message}),ae.jsx("div",{className:"flex justify-end",children:ae.jsx("span",{"aria-label":"Message timestamp",className:"text-xs","data-testid":"message-timestamp",children:OR(e.timestamp)})})]},e.id)]})},XN=()=>{const e=Kd(),{currentUser:t,users:r}=bu(),{confirm:n,notify:o}=bs(),{sendMessage:i,messages:a,receivers:s}=cL(),{sharedState:l,toggleChat:c}=hg(),d=ie.useRef(null),p=ie.useMemo(()=>{var v;return(v=r.find(C=>C.isHost))==null?void 0:v.userId},[r]),m=ie.useMemo(()=>{var v;return((v=l==null?void 0:l.chatState)==null?void 0:v.active)??!1},[l]),y=(t==null?void 0:t.userId)||0,b=v=>{n({header:v.value?"Activar":"Desactivar",message:v.value?"¿Quieres activar el chat? Los asistentes podrán enviar mensajes.":"¿Quieres desactivar el chat? Los asistentes no podrán enviar más mensajes.",onAccept:async()=>{await c(v.value),o({header:v.value?"Chat activado":"Chat desactivado",message:v.value?"Has activado el chat.":"Has desactivado el chat.",severity:"success"})}})};return ie.useEffect(()=>{d.current&&d.current.scrollTo({top:d.current.scrollHeight,behavior:"smooth"})},[a]),ae.jsxs("div",{className:"h-full w-full flex flex-col min-h-0",children:[ae.jsx("div",{className:"p-16 pb-0 shrink-0",children:e("activate-chat")&&ae.jsxs("label",{className:"flex items-center justify-end gap-8 mb-16",children:[ae.jsx(TR,{checked:m,onChange:b}),ae.jsx("span",{children:m?"Desactivar":"Activar"})]})}),ae.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto py-32",ref:d,children:ae.jsxs("div",{className:"flex flex-col gap-8",children:[a.map((v,C)=>ae.jsx(hX,{chatMessage:v,currentUserId:y,isHost:v.sender.userId===p},v.id??C)),!m&&ae.jsx(yg,{label:l.chatState.timestamp&&Number(l.chatState.timestamp)?`Chat apagado por el administrador ${OR(Number(l.chatState.timestamp))}`:"Chat apagado por el administrador",className:"self-center mt-16 text-neutral-20 rounded-l font-semibold text-s"})]})}),ae.jsxs("div",{className:"shrink-0 bg-white z-10",children:[ae.jsx(NL,{className:"my-8"}),ae.jsx(ZY,{receivers:s,sendMessage:i,isChatActive:m})]})]})};function fI(){return fI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fI.apply(null,arguments)}var FL=S.memo(S.forwardRef(function(e,t){var r=kn.getPTI(e);return S.createElement("svg",fI({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),S.createElement("path",{d:"M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z",fill:"currentColor"}))}));FL.displayName="MinusIcon";function hI(){return hI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hI.apply(null,arguments)}var _R=S.memo(S.forwardRef(function(e,t){var r=kn.getPTI(e);return S.createElement("svg",hI({ref:t,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),S.createElement("path",{d:"M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z",fill:"currentColor"}))}));_R.displayName="PlusIcon";function mI(){return mI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mI.apply(null,arguments)}function mX(e){if(Array.isArray(e))return e}function gX(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){c=!0,o=d}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function ZN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function vX(e,t){if(e){if(typeof e=="string")return ZN(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ZN(e,t):void 0}}function yX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1782
1782
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e3(e,t){return mX(e)||gX(e,t)||vX(e,t)||yX()}var Hv=Ar.extend({defaultProps:{__TYPE:"Panel",id:null,header:null,headerTemplate:null,footer:null,footerTemplate:null,toggleable:null,style:null,className:null,collapsed:null,expandIcon:null,collapseIcon:null,icons:null,transitionOptions:null,onExpand:null,onCollapse:null,onToggle:null,children:void 0},css:{classes:{root:function(t){var r=t.props;return dt("p-panel p-component",{"p-panel-toggleable":r.toggleable})},header:"p-panel-header",title:"p-panel-title",icons:"p-panel-icons",toggler:"p-panel-header-icon p-panel-toggler p-link",togglerIcon:"p-panel-header-icon p-panel-toggler p-link",toggleableContent:"p-toggleable-content",content:"p-panel-content",footer:"p-panel-footer",transition:"p-toggleable-content"},styles:`
|
|
1783
1783
|
@layer primereact {
|
|
1784
1784
|
.p-panel-header {
|
|
@@ -2280,4 +2280,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
2282
|
`);at.current.innerHTML=Dt}},Lf=function(){at.current=le.removeInlineStyle(at.current)},No=function(){vr.current=le.removeInlineStyle(vr.current)},Eg=function(){Pt.current=le.removeInlineStyle(Pt.current)},K0=function(ye){Fn(),Ra(),o.onPage?o.onPage(Ll(ye)):(l(ye.first),m(ye.rows)),o.onValueChange&&o.onValueChange(ul())},G0=function(ye){Fn(),Ra();var je=ye.originalEvent,gt=ye.column,Dt=ye.sortableDisabledFields,$t=X(gt,"sortField")||X(gt,"field"),kt=o.defaultSortOrder,rr,hr;if(Gt.current=X(gt,"sortable"),Yt.current=X(gt,"sortFunction"),Zt.current=$t,o.sortMode==="multiple"){var Rr=je.metaKey||je.ctrlKey;rr=Xo(Nr());var Lr=rr.find(function(bn){return bn.field===$t});kt=Lr?Cg(Lr.order):kt;var un={field:$t,order:kt};kt?(rr=Rr?rr:rr.filter(function(bn){return Dt.some(function(co){return co===bn.field})}),q0(un,rr)):o.removableSort&&J0(un,rr),hr={multiSortMeta:rr}}else kt=br()===$t?Cg(Zr()):kt,o.removableSort&&($t=kt?$t:null),hr={sortField:$t,sortOrder:kt};o.onSort?o.onSort(Ll(hr)):(l(0),C(hr.sortField),k(hr.sortOrder),H(hr.multiSortMeta)),o.onValueChange&&o.onValueChange(ul({sortField:$t,sortOrder:kt,multiSortMeta:rr}))},Cg=function(ye){return o.removableSort?o.defaultSortOrder===ye?ye*-1:0:ye*-1},wg=function(ye,je,gt,Dt){return fe.sort(ye,je,Dt,gt,r&&r.nullSortOrder||Ur.nullSortOrder)},q0=function(ye,je){var gt=je.findIndex(function(Dt){return Dt.field===ye.field});gt>=0?je[gt]=ye:je.push(ye)},J0=function(ye,je){var gt=je.findIndex(function(Dt){return Dt.field===ye.field});gt>=0&&je.splice(gt,1),je=je.length>0?je:null},Q0=function(ye,je,gt){if(o.groupRowsBy&&o.groupRowsBy===o.sortField){var Dt=[{field:o.sortField,order:o.sortOrder||o.defaultSortOrder}];return o.sortField!==je&&Dt.push({field:je,order:gt}),Nn(ye,Dt)}var $t=Xo(ye);if(Gt.current&&Yt.current)$t=Yt.current({data:ye,field:je,order:gt});else{var kt=new Map,rr=fe.localeComparator(r&&r.locale||Ur.locale),hr=aee(ye),Rr;try{for(hr.s();!(Rr=hr.n()).done;){var Lr=Rr.value;kt.set(Lr,fe.resolveFieldData(Lr,je))}}catch(un){hr.e(un)}finally{hr.f()}$t.sort(function(un,bn){var co=kt.get(un),Ii=kt.get(bn);return wg(co,Ii,rr,gt)})}return $t},Nn=function(ye){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(o.groupRowsBy&&(be||je.length&&o.groupRowsBy===je[0].field)){var gt=be,Dt=je[0];gt||(gt=Dt,re(gt)),Dt.field!==gt.field&&(je=[gt].concat(Xo(je)))}var $t=Xo(ye);if(Gt.current&&Yt.current){var kt=je.find(function(Lr){return Lr.field===Zt.current}),rr=Zt.current,hr=kt?kt.order:o.defaultSortOrder;$t=Yt.current({data:ye,field:rr,order:hr,multiSortMeta:je})}else{var Rr=fe.localeComparator(r&&r.locale||Ur.locale);$t.sort(function(Lr,un){return Ig(Lr,un,je,0,Rr)})}return $t},Ig=function(ye,je,gt,Dt,$t){if(!(!gt||!gt[Dt])){var kt=fe.resolveFieldData(ye,gt[Dt].field),rr=fe.resolveFieldData(je,gt[Dt].field);return fe.compare(kt,rr,$t)===0?gt.length-1>Dt?Ig(ye,je,gt,Dt+1,$t):0:wg(kt,rr,$t,gt[Dt].order)}},Y0=function(ye){Fn(),Ra(),cr(ye)},Ff=function(ye){clearTimeout(Cr.current),Cr.current=setTimeout(function(){var je=kl(ye||Wt);o.onFilter?o.onFilter(Ll({filters:je})):(l(0),de(je)),o.onValueChange&&o.onValueChange(ul({filters:je}))},o.filterDelay)},X0=function(ye){var je=function(kt){var rr=Kn(kt,2),hr=rr[0],Rr=rr[1];if(Rr.constraints){var Lr=Rr.constraints.filter(function(un){return un.value!==null});if(Lr.length>0)return[hr,Hi(Hi({},Rr),{},{constraints:Lr})]}else if(Rr.value!==null)return[hr,Rr]},gt=function(kt){return kt!==void 0},Dt=Object.entries(ye).map(je).filter(gt);return Object.fromEntries(Dt)},Z0=function(ye,je){if(ye){var gt=je?X0(je):{},Dt=J(),$t=[],kt=gt.global||o.globalFilter,rr;kt&&(rr=o.globalFilterFields||Dt.filter(function(Xd){return!X(Xd,"excludeGlobalFilter")}).map(function(Xd){return X(Xd,"filterField")||X(Xd,"field")}));for(var hr=0;hr<ye.length;hr++){var Rr=!0,Lr=!1,un=!1;for(var bn in gt)if(bn!=="null"&&Object.prototype.hasOwnProperty.call(gt,bn)&&bn!=="global"){un=!0;var co=bn,Ii=gt[co];if(Ii.operator)for(var es=0;es<Ii.constraints.length;es++){var ts=Ii.constraints[es];if(Rr=Ag(co,ye[hr],ts,es),Ii.operator===Oh.OR&&Rr||Ii.operator===Oh.AND&&!Rr)break}else Rr=Ag(co,ye[hr],Ii,0);if(!Rr)break}if(Rr&&kt&&!Lr&&rr)for(var Fi=0;Fi<rr.length;Fi++){var da=rr[Fi],Cu=gt.global?gt.global.matchMode:o.globalFilterMatchMode,Vf=gt.global?gt.global.value:o.globalFilter;if(Lr=_h.filters[Cu](fe.resolveFieldData(ye[hr],da),Vf,o.filterLocale),Lr)break}var wu=void 0;kt?wu=un?un&&Rr&&Lr:Lr:wu=un&&Rr,wu&&$t.push(ye[hr])}return($t.length===o.value.length||Object.keys(gt).length===0)&&($t=ye),$t}},Ag=function(ye,je,gt,Dt){var $t=gt.value,kt=gt.matchMode==="custom"?"custom_".concat(ye):gt.matchMode||En.STARTS_WITH,rr=fe.resolveFieldData(je,ye),hr=_h.filters[kt];return fe.isFunction(hr)&&hr(rr,$t,o.filterLocale,Dt)},kl=function(ye){ye=ye||o.filters;var je={};if(ye)Object.entries(ye).forEach(function(Dt){var $t=Kn(Dt,2),kt=$t[0],rr=$t[1];je[kt]=rr.operator?{operator:rr.operator,constraints:rr.constraints.map(function(hr){return Hi({},hr)})}:Hi({},rr)});else{var gt=J();je=gt.reduce(function(Dt,$t){var kt=X($t,"filterField")||X($t,"field"),rr=X($t,"filterFunction"),hr=X($t,"dataType"),Rr=X($t,"filterMatchMode")||(r&&r.filterMatchModeOptions[hr]||Ur.filterMatchModeOptions[hr]?r&&r.filterMatchModeOptions[hr][0]||Ur.filterMatchModeOptions[hr][0]:En.STARTS_WITH),Lr={value:null,matchMode:Rr};return rr&&_h.register("custom_".concat(kt),function(){for(var un=arguments.length,bn=new Array(un),co=0;co<un;co++)bn[co]=arguments[co];return rr.apply(void 0,bn.concat([{column:$t}]))}),Dt[kt]=o.filterDisplay==="menu"?{operator:Oh.AND,constraints:[Lr]}:Lr,Dt},{})}return je},Rg=function(ye,je,gt){var Dt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,$t=Hi({},Wt),kt=$t[je],rr=kt&&kt.operator?kt.constraints[Dt]:kt;rr=kt?{value:ye,matchMode:gt||rr.matchMode}:{value:ye,matchMode:gt},o.filterDisplay==="menu"&&kt&&kt.operator?$t[je].constraints[Dt]=rr:$t[je]=rr,cr($t),Ff($t)},eS=function(){Ie(o.rows),cr(kl(o.filters)),re(null),Oe({}),yt({}),o.onPage||(l(o.first),m(o.rows)),o.onSort||(C(o.sortField),k(o.sortOrder),H(o.multiSortMeta)),o.onFilter||de(o.filters),Tg()},Vs=function(){if(gr.current){var ye=vt()?gr.current:le.findSingle(gr.current,'[data-pc-name="virtualscroller"]');ye.scrollTo(0,0)}},tS=function(){No()},Tg=function(){var ye=J(!0),je=[];ye&&(je=ye.reduce(function(gt,Dt){return gt.push(X(Dt,"columnKey")||X(Dt,"field")),gt},[])),_e(je)},rS=function(ye){var je,gt="\uFEFF";ye&&ye.selectionOnly?je=o.selection||[]:je=[].concat(Xo(o.frozenValue||[]),Xo(ul()||[]));var Dt=J().filter(function($t){var kt=X($t,"exportable"),rr=X($t,"field");return kt!==!1&&rr});Dt.forEach(function($t,kt){var rr=[X($t,"field"),X($t,"header"),X($t,"exportHeader")],hr=rr[0],Rr=rr[1],Lr=rr[2],un=String(Lr||Rr||hr).replace(/"/g,'""').replace(/\n/g,"\u2028");gt=gt+('"'+un+'"'),kt<Dt.length-1&&(gt=gt+o.csvSeparator)}),je.forEach(function($t){gt=gt+`
|
|
2283
|
-
`,Dt.forEach(function(kt,rr){var hr=[X(kt,"field"),X(kt,"exportField")],Rr=hr[0],Lr=hr[1],un=Lr||Rr,bn=fe.resolveFieldData($t,un);bn!=null?o.exportFunction?bn=o.exportFunction({data:bn,field:un,rowData:$t,column:kt}):bn=String(bn).replace(/"/g,'""').replace(/\n/g,"\u2028"):bn="",gt=gt+('"'+bn+'"'),rr<Dt.length-1&&(gt=gt+o.csvSeparator)})}),le.exportCSV(gt,o.exportFilename)},nS=function(){o.editMode!=="row"&&document.body.click()},oS=function(){le.find(document.body,'[data-pc-section="roweditorcancelbuttonprops"]').forEach(function(ye,je){setTimeout(function(){ye.click()},je*5)})},Ll=function(ye){return Hi({first:Kt(),rows:sr(),sortField:br(),sortOrder:Zr(),multiSortMeta:Nr(),filters:Vt()},ye)},ul=function(ye){var je=o.value||[];if(!o.lazy&&je&&je.length){var gt=ye&&ye.filters||Vt(),Dt=ye&&ye.sortField||br(),$t=ye&&ye.sortOrder||Zr(),kt=ye&&ye.multiSortMeta||Nr(),rr=J(),hr=rr.find(function(Rr){return X(Rr,"field")===Dt});hr&&(Gt.current=X(hr,"sortable"),Yt.current=X(hr,"sortFunction")),(fe.isNotEmpty(gt)||o.globalFilter)&&(je=Z0(je,gt)),(Dt||fe.isNotEmpty(kt))&&(o.sortMode==="single"?je=Q0(je,Dt,$t):o.sortMode==="multiple"&&(je=Nn(je,kt)))}return je},qd=function(ye){if(ye&&o.paginator){var je=o.lazy?0:Kt();return ye.slice(je,je+sr())}return ye};Go(function(){ar.current&&(Jt.current=ms(),ar.current.setAttribute(Jt.current,"")),cr(kl(o.filters)),Je()&&(lt(),o.resizableColumns&&Pn())}),hn(function(){return o.responsiveLayout==="stack"&&!o.scrollable&&Sg(),function(){Lf()}},[o.breakpoint]),hn(function(){var Ut=kl(o.filters);de(Ut),cr(kl(o.filters)),o.onValueChange&&o.onValueChange(ul({filters:Ut}))},[o.filters]),hn(function(){Je()&&me()}),hn(function(){Lf(),o.responsiveLayout==="stack"&&!o.scrollable&&Sg()},[o.responsiveLayout,o.scrollable]),hn(function(){if(o.globalFilter)Rg(o.globalFilter,"global",o.globalFilterMatchMode);else if(Wt.global){var Ut=Hi({},Wt);delete Ut.global,cr(Ut),Ff(Ut)}},[o.globalFilter,o.globalFilterMatchMode]),wi(function(){xt(),No(),Lf(),Eg()}),S.useImperativeHandle(t,function(){return{props:o,clearState:ze,closeEditingCell:nS,closeEditingRows:oS,exportCSV:rS,filter:Rg,reset:eS,resetColumnOrder:Tg,resetScroll:Vs,resetResizeColumnsWidth:tS,restoreColumnWidths:Pn,restoreState:lt,restoreTableState:ct,saveState:me,getFilterMeta:function(){return Q},setFilterMeta:function(ye){return de(ye)},getSortMeta:function(){return $},setSortMeta:function(ye){return H(ye)},getElement:function(){return ar.current},getTable:function(){return pr.current},getVirtualScroller:function(){return Xr.current},getProcessedData:function(){return ul()}}});var er=function(){if(o.loading){var ye=n({className:Ve.cx("loadingIcon")},Ve.ptm("loadingIcon")),je=o.loadingIcon||S.createElement(fg,Qn({},ye,{spin:!0})),gt=nn.getJSXIcon(je,Hi({},ye),{props:o}),Dt=n({className:Ve.cx("loadingOverlay")},Ve.ptm("loadingOverlay"));return S.createElement("div",Dt,gt)}return null},I=function(){if(o.header){var ye=fe.getJSXElement(o.header,{props:o}),je=n({className:Ve.cx("header")},Ve.ptm("header"));return S.createElement("div",je,ye)}return null},Og=function(ye,je,gt){if(o.showHeaders===!1)return null;var Dt=br(),$t=Zr(),kt=Xo(Nr()),rr=xn(),hr=Wt,Rr=!o.onFilter&&o.filters||Vt(),Lr=ye.items,un=ye.props,bn=ye.columns,co=gt||un.lazy?Lr:un.items;return S.createElement(_F,{hostName:"DataTable",value:co,tableProps:o,columns:bn,tabIndex:o.tabIndex,empty:je,headerColumnGroup:o.headerColumnGroup,resizableColumns:o.resizableColumns,onColumnResizeStart:Li,onColumnResizerClick:o.onColumnResizerClick,onColumnResizerDoubleClick:o.onColumnResizerDoubleClick,sortMode:o.sortMode,sortField:Dt,sortIcon:o.sortIcon,sortOrder:$t,multiSortMeta:kt,groupRowsBy:o.groupRowsBy,groupRowSortField:rr,onSortChange:G0,filterDisplay:o.filterDisplay,filters:hr,filtersStore:Rr,filterIcon:o.filterIcon,filterClearIcon:o.filterClearIcon,onFilterChange:Y0,onFilterApply:Ff,showSelectAll:o.showSelectAll,allRowsSelected:An,onColumnCheckboxChange:Rn,onColumnMouseDown:_r,onColumnDragStart:ln,onColumnDragOver:kr,onColumnDragLeave:Gd,onColumnDrop:Rc,rowGroupMode:o.rowGroupMode,reorderableColumns:o.reorderableColumns,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled})},_g=function(ye,je,gt,Dt,$t){var kt=Kt(),rr=ye.rows,hr=ye.columns,Rr=ye.contentRef,Lr=ye.style,un=ye.className,bn=ye.spacerStyle,co=ye.itemSize,Ii=fe.isNotEmpty(o.frozenValue)&&S.createElement(zy,{hostName:"DataTable",ref:Wr,cellMemo:o.cellMemo,cellMemoProps:o.cellMemoProps,cellMemoPropsDepth:o.cellMemoPropsDepth,cellClassName:o.cellClassName,cellSelection:o.cellSelection,checkIcon:o.checkIcon,className:"p-datatable-tbody p-datatable-frozen-tbody",collapsedRowIcon:o.collapsedRowIcon,columns:hr,compareSelectionBy:o.compareSelectionBy,contextMenuSelection:o.contextMenuSelection,dataKey:o.dataKey,dragSelection:o.dragSelection,editMode:o.editMode,editingMeta:st,editingRows:o.editingRows,emptyMessage:o.emptyMessage,expandableRowGroups:o.expandableRowGroups,expandedRowIcon:o.expandedRowIcon,expandedRows:o.expandedRows,first:kt,frozenRow:!0,groupRowsBy:o.groupRowsBy,isDataSelectable:o.isDataSelectable,isVirtualScrollerDisabled:!0,lazy:o.lazy,loading:o.loading,metaKeySelection:o.metaKeySelection,onCellClick:o.onCellClick,onCellSelect:o.onCellSelect,onCellUnselect:o.onCellUnselect,onContextMenu:o.onContextMenu,onContextMenuSelectionChange:o.onContextMenuSelectionChange,onEditingMetaChange:yn,onRowClick:o.onRowClick,onRowCollapse:o.onRowCollapse,onRowDoubleClick:o.onRowDoubleClick,onRowPointerDown:o.onRowPointerDown,onRowPointerUp:o.onRowPointerUp,onRowEditCancel:o.onRowEditCancel,onRowEditChange:o.onRowEditChange,onRowEditComplete:o.onRowEditComplete,onRowEditInit:o.onRowEditInit,onRowEditSave:o.onRowEditSave,onRowExpand:o.onRowExpand,onRowMouseEnter:o.onRowMouseEnter,onRowMouseLeave:o.onRowMouseLeave,onRowReorder:o.onRowReorder,onRowSelect:o.onRowSelect,onRowToggle:o.onRowToggle,onRowUnselect:o.onRowUnselect,onSelectionChange:o.onSelectionChange,paginator:o.paginator,processedData:$t,reorderableRows:o.reorderableRows,responsiveLayout:o.responsiveLayout,rowClassName:o.rowClassName,rowEditValidator:o.rowEditValidator,rowEditorCancelIcon:o.rowEditorCancelIcon,rowEditorInitIcon:o.rowEditorInitIcon,rowEditorSaveIcon:o.rowEditorSaveIcon,rowExpansionTemplate:o.rowExpansionTemplate,rowGroupFooterTemplate:o.rowGroupFooterTemplate,rowGroupHeaderTemplate:o.rowGroupHeaderTemplate,rowGroupMode:o.rowGroupMode,scrollable:o.scrollable,selectOnEdit:o.selectOnEdit,selection:o.selection,selectionAutoFocus:o.selectionAutoFocus,selectionMode:o.selectionMode,selectionModeInColumn:je,showRowReorderElement:o.showRowReorderElement,showSelectionElement:o.showSelectionElement,tabIndex:o.tabIndex,tableProps:o,tableSelector:Jt.current,value:o.frozenValue,virtualScrollerOptions:ye,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled}),es=S.createElement(zy,{hostName:"DataTable",ref:en,cellMemo:o.cellMemo,cellMemoProps:o.cellMemoProps,cellMemoPropsDepth:o.cellMemoPropsDepth,cellClassName:o.cellClassName,cellSelection:o.cellSelection,checkIcon:o.checkIcon,className:dt("p-datatable-tbody",un),collapsedRowIcon:o.collapsedRowIcon,columns:hr,compareSelectionBy:o.compareSelectionBy,contextMenuSelection:o.contextMenuSelection,dataKey:o.dataKey,dragSelection:o.dragSelection,editMode:o.editMode,editingMeta:Pe,editingRows:o.editingRows,empty:gt,emptyMessage:o.emptyMessage,expandableRowGroups:o.expandableRowGroups,expandedRowIcon:o.expandedRowIcon,expandedRows:o.expandedRows,first:kt,frozenRow:!1,groupRowsBy:o.groupRowsBy,isDataSelectable:o.isDataSelectable,isVirtualScrollerDisabled:Dt,lazy:o.lazy,loading:o.loading,metaKeySelection:o.metaKeySelection,onCellClick:o.onCellClick,onCellSelect:o.onCellSelect,onCellUnselect:o.onCellUnselect,onContextMenu:o.onContextMenu,onContextMenuSelectionChange:o.onContextMenuSelectionChange,onEditingMetaChange:uo,onRowClick:o.onRowClick,onRowCollapse:o.onRowCollapse,onRowDoubleClick:o.onRowDoubleClick,onRowEditCancel:o.onRowEditCancel,onRowEditChange:o.onRowEditChange,onRowEditComplete:o.onRowEditComplete,onRowEditInit:o.onRowEditInit,onRowEditSave:o.onRowEditSave,onRowExpand:o.onRowExpand,onRowMouseEnter:o.onRowMouseEnter,onRowMouseLeave:o.onRowMouseLeave,onRowPointerDown:o.onRowPointerDown,onRowPointerUp:o.onRowPointerUp,onRowReorder:o.onRowReorder,onRowSelect:o.onRowSelect,onRowToggle:o.onRowToggle,onRowUnselect:o.onRowUnselect,onSelectionChange:o.onSelectionChange,paginator:o.paginator,processedData:$t,reorderableRows:o.reorderableRows,responsiveLayout:o.responsiveLayout,rowClassName:o.rowClassName,rowEditValidator:o.rowEditValidator,rowEditorCancelIcon:o.rowEditorCancelIcon,rowEditorInitIcon:o.rowEditorInitIcon,rowEditorSaveIcon:o.rowEditorSaveIcon,rowExpansionTemplate:o.rowExpansionTemplate,rowGroupFooterTemplate:o.rowGroupFooterTemplate,rowGroupHeaderTemplate:o.rowGroupHeaderTemplate,rowGroupMode:o.rowGroupMode,scrollable:o.scrollable,selectOnEdit:o.selectOnEdit,selection:o.selection,selectionAutoFocus:o.selectionAutoFocus,selectionMode:o.selectionMode,selectionModeInColumn:je,showRowReorderElement:o.showRowReorderElement,showSelectionElement:o.showSelectionElement,style:Lr,tabIndex:o.tabIndex,tableProps:o,tableSelector:Jt.current,value:qd(rr),virtualScrollerContentRef:Rr,virtualScrollerOptions:ye,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled}),ts=fe.isNotEmpty(bn)?S.createElement(zy,{hostName:"DataTable",style:{height:"calc(".concat(bn.height," - ").concat(rr.length*co,"px)")},className:"p-datatable-virtualscroller-spacer",ptCallbacks:Ve,metaData:At,unstyled:o.unstyled}):null;return S.createElement(S.Fragment,null,Ii,es,ts)},Jd=function(ye){var je=ye.columns;return S.createElement(TF,{hostName:"DataTable",tableProps:o,columns:je,footerColumnGroup:o.footerColumnGroup,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled})},ua=function(ye,je,gt,Dt){if(je){var $t=vt(),kt=o.virtualScrollerOptions||{},rr=n({className:Ve.cx("wrapper"),style:Hi(Hi({},Ve.sx("wrapper")),{},{maxHeight:$t?o.scrollHeight:null})},Ve.ptm("wrapper"));return S.createElement("div",Qn({ref:gr},rr),S.createElement(RR,Qn({ref:Xr},kt,{items:ye,columns:je,style:Hi(Hi({},kt.style),{height:o.scrollHeight!=="flex"?o.scrollHeight:void 0}),scrollHeight:o.scrollHeight!=="flex"?void 0:"100%",disabled:$t,loaderDisabled:!0,inline:!0,autoSize:!0,pt:Ve.ptm("virtualScroller"),__parentMetadata:{parent:At},showSpacer:!1,unstyled:o.unstyled,contentTemplate:function(Rr){var Lr=function(ts){pr.current=ts,Rr.spacerRef&&Rr.spacerRef(ts)},un=Og(Rr,Dt,$t),bn=_g(Rr,gt,Dt,$t,ye),co=Jd(Rr),Ii=n({className:dt(o.tableClassName,Ve.cx("table")),style:o.tableStyle,role:"table"},Ve.ptm("table"));return S.createElement("table",Qn({ref:Lr},Ii),un,bn,co)}})))}},iS=function(){if(o.footer){var ye=fe.getJSXElement(o.footer,{props:o}),je=n({className:Ve.cx("footer")},Ve.ptm("footer"));return S.createElement("div",je,ye)}return null},Pg=function(ye,je){return S.createElement(lF,{first:Kt(),rows:sr(),pageLinkSize:o.pageLinkSize,className:dt(o.paginatorClassName,Ve.cx("paginator",{position:ye})),onPageChange:K0,template:o.paginatorTemplate,totalRecords:je,rowsPerPageOptions:o.rowsPerPageOptions,currentPageReportTemplate:o.currentPageReportTemplate,leftContent:o.paginatorLeft,rightContent:o.paginatorRight,alwaysShow:o.alwaysShowPaginator,dropdownAppendTo:o.paginatorDropdownAppendTo,pt:Ve.ptm("paginator"),unstyled:o.unstyled,__parentMetadata:{parent:At}})},aS=function(ye){return o.paginator&&o.paginatorPosition!=="bottom"?Pg("top",ye):null},Su=function(ye){return o.paginator&&o.paginatorPosition!=="top"?Pg("bottom",ye):null},Tc=function(){if(o.resizableColumns){var ye=n({className:Ve.cx("resizeHelper"),style:Ve.sx("resizeHelper")},Ve.ptm("resizeHelper"));return S.createElement("div",Qn({ref:zr},ye))}return null},ti=function(){if(o.reorderableColumns){var ye={position:"absolute",display:"none"},je=n({className:Ve.cx("reorderIndicatorUp"),style:Ve.sx("reorderIndicatorUp",{style:ye})},Ve.ptm("reorderIndicatorUp")),gt=n(Ve.ptm("reorderIndicatorUpIcon")),Dt=nn.getJSXIcon(o.reorderIndicatorUpIcon||S.createElement($L,gt),Hi({},gt),{props:o}),$t=n({className:Ve.cx("reorderIndicatorDown"),style:Ve.sx("reorderIndicatorDown",{style:ye})},Ve.ptm("reorderIndicatorDown")),kt=n(Ve.ptm("reorderIndicatorDownIcon")),rr=nn.getJSXIcon(o.reorderIndicatorDownIcon||S.createElement(WL,kt),Hi({},kt),{props:o});return S.createElement(S.Fragment,null,S.createElement("span",Qn({ref:Pr},je),Dt),S.createElement("span",Qn({ref:Br},$t),rr))}return null},Xn=ul(),Eu=J(),Va=fi(Xn),sS=fe.isEmpty(Xn),xg=lo(Eu),Qd=o.selectionMode||xg,Hn=er(),lS=I(),uS=aS(Va),ca=ua(Xn,Eu,xg,sS),Es=Su(Va),jf=iS(),cS=Tc(),Yd=ti(),Dg=n({id:o.id,className:dt(o.className,Ve.cx("root",{selectable:Qd})),style:o.style,"data-scrollselectors":".p-datatable-wrapper","data-showgridlines":o.showGridlines},qv.getOtherProps(o),Ve.ptm("root"));return S.createElement("div",Qn({ref:ar},Dg),Hn,lS,uS,ca,Es,jf,cS,Yd)});PF.displayName="DataTable";function jI(){return jI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jI.apply(null,arguments)}function Jm(e){"@babel/helpers - typeof";return Jm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jm(e)}function lee(e,t){if(Jm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uee(e){var t=lee(e,"string");return Jm(t)=="symbol"?t:t+""}function cee(e,t,r){return(t=uee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var dee={root:function(t){var r=t.props;return dt("p-icon-field",{"p-icon-field-right":r.iconPosition==="right","p-icon-field-left":r.iconPosition==="left"})}},lE=Ar.extend({defaultProps:{__TYPE:"IconField",__parentMetadata:null,children:void 0,className:null,iconPosition:"right"},css:{classes:dee}});function M3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function k3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M3(Object(r),!0).forEach(function(n){cee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xF=ie.memo(ie.forwardRef(function(e,t){var r=ie.useRef(t),n=Vr(),o=ie.useContext(qr),i=lE.getProps(e,o),a=lE.setMetaData(k3(k3({props:i},i.__parentMetadata),{},{context:{iconPosition:i.iconPosition}})),s=a.ptm,l=a.cx,c=n({className:dt(i.className,l("root",{iconPosition:i.iconPosition}))},lE.getOtherProps(i),s("root"));return ie.createElement("div",jI({},c,{ref:r}),ie.Children.map(i.children,function(d,p){return ie.cloneElement(d,{iconPosition:i.iconPosition})}))}));xF.displayName="IconField";function VI(){return VI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},VI.apply(null,arguments)}function Qm(e){"@babel/helpers - typeof";return Qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qm(e)}function pee(e,t){if(Qm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fee(e){var t=pee(e,"string");return Qm(t)=="symbol"?t:t+""}function hee(e,t,r){return(t=fee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var mee={root:"p-input-icon"},uE=Ar.extend({defaultProps:{__TYPE:"InputIcon",__parentMetadata:null,className:null,iconPosition:null},css:{classes:mee}});function L3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function F3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L3(Object(r),!0).forEach(function(n){hee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var DF=ie.memo(ie.forwardRef(function(e,t){var r=ie.useRef(t),n=Vr(),o=ie.useContext(qr),i=uE.getProps(e,o),a=uE.setMetaData(F3(F3({props:i},i.__parentMetadata),{},{context:{iconPosition:i.iconPosition}})),s=a.ptm,l=a.cx,c=n({className:dt(i.className,l("root"))},uE.getOtherProps(i),s("root"));return ie.createElement(ie.Fragment,null,ie.createElement("span",VI({},c,{ref:r}),i.children))}));DF.displayName="InputIcon";const gee=({can:e,columnHeader:t,currentUserId:r,filteredUsers:n,filter:o,handleMakeHost:i,handleMakeManager:a,handleRevokeManager:s,handleRequestMakeHost:l,handleToggleParticipantMic:c,loading:d,setFilter:p,setSelectedUser:m,userMenuRef:y})=>{const b=[{visible:e.requestHostRole,label:"Solicitar cambio a anfitrión",command:l,data:{"data-testid":"request-host-menu-item"}},{visible:e.revokeManagerRole,label:"Convertir a asistente",command:s,data:{"data-testid":"revoke-manager-menu-item"}},{visible:e.makeManagerRole,label:"Convertir a Panelista",command:a,data:{"data-testid":"make-manager-menu-item"}},{visible:e.transferHostRole,label:"Transferir Administración",command:i,data:{"data-testid":"make-admin-menu-item"}}],v=b.filter(R=>R.visible),C={visible:!0,label:"No hay acciones disponibles",data:{"data-testid":"no-actions-menu-item"},command:()=>Promise.resolve()},A=v.length>0?b:[...b,C];return ae.jsxs(ae.Fragment,{children:[ae.jsxs(xF,{iconPosition:"left",className:"w-full mb-16","data-testid":"search-field",children:[ae.jsx(DF,{className:"fa-regular fa-magnifying-glass"}),ae.jsx(z0,{value:o,onChange:R=>p(R.target.value),placeholder:"Buscar participantes",className:"w-full","data-testid":"search-input"})]}),ae.jsxs(PF,{value:n,size:"small",stripedRows:!0,"data-testid":"participants-table",children:[ae.jsx(bI,{body:R=>ae.jsxs("div",{className:"flex items-center gap-16","data-testid":`participant-row-${R.userId}`,children:[ae.jsx("p",{className:"font-semibold","data-testid":"participant-name",children:R.displayName}),R.isHost&&ae.jsx(yg,{label:"Admin",className:"text-neutral-50 rounded-l font-semibold","data-testid":"admin-chip"})]}),header:t}),ae.jsx(bI,{body:R=>ae.jsxs("div",{className:"flex gap-4 justify-end","data-testid":`participant-actions-${R.userId}`,children:[ae.jsx(di,{"aria-label":"Toggle video",disabled:!0,icon:`fa-regular fa-video${R.bVideoOn?"":"-slash"} text-neutral-40`,text:!0,"data-testid":"toggle-video-btn"}),ae.jsx(di,{"aria-label":"Toggle microphone",disabled:d||R.userId===r||!e.toggleUserAudio,icon:`fa-regular fa-microphone${R.muted?"-slash":""} text-neutral-40`,onClick:()=>c(R),text:!0,"data-testid":"toggle-mic-btn"}),ae.jsx(di,{"aria-label":"Open user menu","data-testid":"open-user-menu-button","aria-controls":"user-menu","aria-haspopup":!0,disabled:R.userId===r,icon:"fa-regular fa-gear text-neutral-40",onClick:x=>{var k;m(R),(k=y.current)==null||k.toggle(x)},text:!0})]})})]}),ae.jsx(uu,{id:"user-menu",ref:y,popup:!0,popupAlignment:"right",model:A})]})},vee=e=>{const t=Kd(),{changeUserRole:r}=Hd(),n=mg(),{alertUser:o,requestHostRole:i}=hg(),{zmClient:a}=ll(),{currentUser:s}=bu(),{muteUserMic:l,unmuteUserMic:c}=Ac(),{confirm:d,notify:p}=bs(),[m,y]=ie.useState(""),b=m.toLocaleLowerCase().trim(),v=e.filter(H=>H.displayName.toLocaleLowerCase().includes(b)),C=ie.useRef(null),[A,R]=ie.useState(null),x=ie.useCallback(async()=>{A&&d({header:"Convertir a panelista",message:"¿Quieres convertir a esta persona en panelista?",onAccept:async()=>{await a.makeManager(A.userId),await o(A.userId,"Ha sido convertido a panelista"),await(r==null?void 0:r({userId:A.userId,role:"PANELIST"})),p({header:"Cambio a panelista",message:"Has cambiado a panelista a este asistente.",severity:"success"})}})},[a,A,d,o,p,r]),k=ie.useCallback(async()=>{A&&d({header:"Convertir a asistente",message:"¿Quieres convertir a esta persona en asistente?",onAccept:async()=>{await a.revokeManager(A.userId),await o(A.userId,"Ha sido convertido a asistente"),await(r==null?void 0:r({userId:A.userId,role:"ATTENDEE"})),p({header:"Cambio a asistente",message:"Has cambiado a asistente a este panelista.",severity:"success"})}})},[a,A,d,o,p,r]),D=ie.useCallback(async()=>{A&&d({header:"Transferir administración",message:"Va a transferir la administración a otro usuario. Esta operación es irrevocable. ¿Está seguro?",onAccept:async()=>{await a.makeHost(A.userId),await o(A.userId,"¡Ha sido promocionado a anfitrión!"),await(r==null?void 0:r({userId:A.userId,role:"HOST"})),p({header:"Cambio a anfitrión",message:"Has cambiado a anfitrión a este usuario.",severity:"success"})}})},[a,A,d,p,o,r]),F=ie.useCallback(async()=>{A&&d({header:"Solicitar ser anfitrión",message:"¿Quieres solicitar al anfitrión que te transfiera la administración?",onAccept:async()=>{try{await i(),p({header:"Solicitud enviada",message:"Has solicitado al anfitrión que te transfiera la administración.",severity:"success"})}catch(H){p({header:"Error al solicitar ser anfitrión",message:H instanceof Error?H.message:"Ha ocurrido un error desconocido.",severity:"error"})}}})},[A,d,p,i]),[$]=wa(async H=>{d({header:H.muted?"Encender micrófono":"Apagar micrófono",message:H.muted?`¿Quieres solicitar a ${H.displayName} que encienda su micrófono?`:`¿Quieres apagar el micrófono de ${H.displayName}?`,onAccept:async()=>{H.muted?await c(H.userId):(await l(H.userId),p({header:H.muted?"Solicitud de encendido de micrófono":"Micrófono apagado",message:H.muted?`Has solicitado a ${H.displayName} que encienda su micrófono.`:`Has apagado el micrófono de ${H.displayName}.`,severity:"success"}))}})},[d,l,c,p],n.ref);return{can:{toggleUserAudio:t("toggle-user-audio"),toggleUserVideo:t("toggle-user-video"),requestHostRole:t("request-host-role")&&!!(A!=null&&A.isHost),revokeManagerRole:t("revoke-manager-role")&&!!(A!=null&&A.isManager),makeManagerRole:t("make-manager-role")&&!(A!=null&&A.isManager),transferHostRole:t("transfer-host-role")&&!!(A!=null&&A.isManager)},currentUserId:(s==null?void 0:s.userId)??0,filteredUsers:v,filter:m,handleMakeHost:D,handleMakeManager:x,handleRevokeManager:k,handleToggleParticipantMic:$,handleRequestMakeHost:F,loading:n.loading,setFilter:y,setSelectedUser:R,userMenuRef:C}},j3=({users:e,columnHeader:t})=>{const r=vee(e);return ae.jsx(gee,{columnHeader:t,...r})},V3=({users:e})=>{const t=Kd(),r=e.filter(o=>o.isHost||o.isManager),n=e.filter(o=>!o.isHost&&!o.isManager);return ae.jsxs(UL,{activeIndex:0,pt:{panelContainer:{className:"px-0"},navContent:{className:"[&_.p-tabview-nav-link]:mb-0"}},children:[ae.jsx(yI,{header:"Panelistas",children:ae.jsx(j3,{users:r,columnHeader:`${r.length} panelistas`})}),t("show-attendee-list")&&ae.jsx(yI,{header:"Asistentes",children:ae.jsx(j3,{users:n,columnHeader:`${n.length} asistentes`})})]})},yee=({participant:e,onMicToggle:t,onLowerHand:r,isMicToggleEnabled:n})=>ae.jsxs("li",{className:"flex justify-between items-center py-8 border border-neutral-80 rounded-m px-8","aria-label":`Usuario ${e.displayName}`,"data-testid":"turn-queue-user-item",children:[ae.jsx("p",{className:"font-semibold whitespace-nowrap truncate","data-testid":"turn-queue-user-name",children:e.displayName}),ae.jsxs("div",{className:"flex gap-8 items-center",children:[ae.jsx("button",{"aria-label":e.muted?`Solicitar a ${e.displayName} que encienda su micrófono`:`Apagar el micrófono de ${e.displayName}`,className:"flex items-center justify-center w-24 h-24","data-testid":"turn-queue-user-mic-btn",disabled:!n,onClick:()=>t(e),children:ae.jsx("i",{"aria-hidden":"true",className:`fa-regular fa-microphone${e.muted?"-slash":""} text-neutral-40`})}),ae.jsx("button",{"aria-label":`Bajar la mano de ${e.displayName}`,className:"border border-neutral-80 rounded-l px-8 py-4 font-semibold text-neutral-50 whitespace-nowrap w-fit h-fit","data-testid":"turn-queue-user-lower-hand-btn",onClick:()=>r(e.userId),children:"Bajar mano"})]})]}),bee=({onToggleHand:e,isToggleHandEnabled:t,currentUser:r,raisedHand:n,queuePosition:o,queueLength:i})=>ae.jsxs(ae.Fragment,{children:[n?ae.jsxs("div",{className:"flex flex-col gap-4",children:[ae.jsx("p",{className:"font-semibold",children:"Has solicitado el turno de palabra"}),ae.jsx("p",{children:"Espera que el administrador de la videoconferencia te dé acceso."})]}):ae.jsxs("div",{className:"flex flex-col gap-4",children:[ae.jsx("p",{className:"font-semibold",children:"No has solicitado el turno de palabra"}),ae.jsx("p",{children:"Levanta la mano para solicitar acceso a la videoconferencia."})]}),ae.jsxs("div",{className:"flex justify-between gap-16 my-16 p-8 rounded-m border border-neutral-80",children:[ae.jsx("div",{className:"flex items-center whitespace-nowrap truncate",children:o!==-1?ae.jsxs("p",{className:"truncate","data-testid":"request-turn-position",children:["Posición ",o+1," de ",i]}):ae.jsxs("p",{className:"truncate",children:[i," personas han levantado la mano"]})}),ae.jsxs("div",{className:"flex items-center gap-8",children:[ae.jsx("span",{className:"flex items-center justify-center w-24 h-24",children:ae.jsx("i",{className:`fa-regular fa-microphone${r!=null&&r.muted?"-slash":""} text-neutral-40`,"data-testid":"mic-icon"})}),ae.jsx("button",{className:"border border-neutral-80 rounded-l px-8 py-4 font-semibold text-neutral-50 whitespace-nowrap w-fit h-fit disabled:opacity-32 hover:bg-neutral-95 disabled:hover:bg-transparent","data-testid":"request-turn-btn",disabled:!t,onClick:e,children:n?"Bajar la mano":"Levantar mano"})]})]})]}),See=({canActivateTurnQueue:e,isTurnQueueActive:t,isLowerAllHandsEnabled:r,onLowerAllHands:n,onToggleQueueTurnActive:o})=>ae.jsxs("span",{className:"flex items-center self-end gap-16 mb-16",children:[ae.jsx("button",{className:"w-fit py-4 px-8 bg-neutral-50 text-white font-semibold rounded-l disabled:opacity-32 hover:bg-neutral-70 disabled:hover:bg-neutral-50 min-w-80","data-testid":"lower-all-hands-btn",disabled:!r,onClick:n,children:"Bajar todas las manos"}),ae.jsxs("label",{className:"flex items-center w-fit gap-8",children:[ae.jsx(TR,{"aria-label":"Activar/Desactivar turno de palabra",checked:t,"data-testid":"turn-queue-toggle-switch",disabled:!e,onChange:o}),ae.jsx("span",{children:t?"Desactivar":"Activar"})]})]}),B3=()=>{const e=Kd(),t=mg(),{currentUser:r}=bu(),{confirm:n,notify:o}=bs(),{muteUserMic:i,unmuteUserMic:a}=Ac(),{sharedState:s,speakerQueue:l,raisedHand:c,toggleHand:d,lowerUserHand:p,toggleTurnQueue:m}=hg(),y=ie.useMemo(()=>{var F;return((F=s==null?void 0:s.speakerTurnState.turnQueueState)==null?void 0:F.active)??!1},[s]),[b]=wa(async()=>{n({header:"Bajar todas las manos",message:"¿Quieres bajar todas las manos levantadas? Esta acción no se puede deshacer.",onAccept:async()=>{for(const F of l.map($=>$.userId))await p(F)}})},[n,l,p],t.ref),[v]=wa(async F=>{n({header:F.value?"Activar":"Desactivar",message:F.value?"¿Quieres activar el turno de palabra? Los asistentes podrán solicitar el turno de palabra.":"¿Quieres desactivar el turno de palabra? Se eliminará el listado de petición de palabra y ningún participante podrá solicitar el turno hasta que lo actives de nuevo.",onAccept:async()=>{await m(F.value);for(const $ of l.map(H=>H.userId))await p($);o({header:F.value?"Turno de palabra activado":"Turno de palabra desactivado",message:F.value?"Has activado el turno de palabra.":"Has desactivado el turno de palabra.",severity:"success"})}})},[n,m,o,l,p],t.ref),[C]=wa(async()=>{await d()},[d],t.ref),[A]=wa(async F=>{await p(F)},[p],t.ref),[R]=wa(async F=>{n({header:F.muted?"Encender micrófono":"Apagar micrófono",message:F.muted?`¿Quieres solicitar a ${F.displayName} que encienda su micrófono?`:`¿Quieres apagar el micrófono de ${F.displayName}?`,onAccept:async()=>{F.muted?await a(F.userId):(await i(F.userId),o({header:F.muted?"Solicitud de encendido de micrófono":"Micrófono apagado",message:F.muted?`Has solicitado a ${F.displayName} que encienda su micrófono.`:`Has apagado el micrófono de ${F.displayName}.`,severity:"success"}))}})},[n,i,a,o],t.ref),x=ie.useMemo(()=>!t.loading&&y,[t.loading,y]),k=ie.useMemo(()=>!t.loading&&l.length>0,[t.loading,l]),D=ie.useMemo(()=>F=>!t.loading&&(F!==(r==null?void 0:r.userId)||e("toggle-user-audio")),[t.loading,r,e]);return ae.jsxs("div",{className:"flex flex-col p-16 pb-32 h-full",children:[e("request-turn")&&ae.jsx(bee,{onToggleHand:C,isToggleHandEnabled:x,currentUser:r,raisedHand:c,queuePosition:l.findIndex(F=>F.userId===(r==null?void 0:r.userId)),queueLength:s.speakerTurnState.speakerQueueIds.length}),e("view-activate-turn-queue")&&ae.jsx(See,{isLowerAllHandsEnabled:k,isTurnQueueActive:y,onLowerAllHands:b,onToggleQueueTurnActive:v,canActivateTurnQueue:e("activate-turn-queue")}),e("grant-turn")&&ae.jsx("ul",{className:"mt-16 flex flex-col gap-8",children:l.length?l.map(F=>ae.jsx(yee,{participant:F,onMicToggle:R,onLowerHand:A,isMicToggleEnabled:D(F.userId)},F.userId)):ae.jsxs("span",{children:[ae.jsx("p",{className:"font-semibold",children:"No hay ninguna mano levantada"}),ae.jsx("p",{children:"Espera que algún participante levante la mano para cederle la palabra."})]})}),!y&&ae.jsx(yg,{label:s.speakerTurnState.turnQueueState.timestamp&&Number(s.speakerTurnState.turnQueueState.timestamp)?`Turno de palabra apagado por el administrador ${OR(Number(s.speakerTurnState.turnQueueState.timestamp))}`:"Turno de palabra apagado por el administrador",className:"self-center mt-16 text-neutral-20 rounded-l font-semibold text-s"})]})},Eee=["Asistentes","Turno de palabra","Chat"],Cee=()=>{const e=Kd(),{startVideo:t}=zd(),{requestedHostRoleDialogVisible:r,rejectHostRoleRequest:n,transferHostRoleToUser:o,requestedHostUser:i}=hg(),{toggleAcceptParticipationDialog:a}=bs(),{muteMic:s,startAudio:l,hostAskUnmute:c,resetHostAskUnmute:d}=Ac(),{breakpoint:p,sessionStatus:m,initVotingSession:y}=Hd(),{users:b,currentUser:v}=bu(),{updateReceiversAndChatHistory:C}=cL(),A=p===Dm.Mobile,[R,x]=ie.useState(A?null:0),[k,D]=ie.useState(A?[]:[...Array(3).keys()]),[F,$]=ie.useState(!1),[H,q]=ie.useState(null),G=H!==null?Eee[H]:"",Q=ie.useRef(null),de=ie.useCallback(xe=>{x(xe),xe===2&&k.includes(2)&&C()},[k,C]),oe=ie.useCallback(xe=>{A?(q(xe),$(!0)):D(ne=>ne.includes(xe)?(de(xe===R?null:R),ne.filter(be=>be!==xe)):(de(xe),[...ne,xe])),xe===2&&C()},[R,A,de,C]),Ee=ie.useCallback(()=>{ER({header:"Abrir videoconferencia",message:"Al abrir la videconferencia, los participantes recibirán una notificación y podrán unirse de inmediato. Asegúrate de que todo está listo antes de continuar.",defaultFocus:"accept",rejectLabel:"Cerrar",acceptLabel:"Abrir videoconferencia",accept:async()=>{await(y==null?void 0:y())}})},[y]),ce=ie.useRef(!1);ie.useEffect(()=>{if(!v)return;const xe=async()=>{e("join-session-with-video")&&await t(),await l(),e("join-session-with-audio")||await s()};ce.current||(xe(),ce.current=!0)},[e,v,s,l,t]),ie.useEffect(()=>{c&&(a(),d())},[c,d,a]);const _e=ie.useMemo(()=>({openTabs:k,handleOpenCloseTab:oe,selfShareViewRef:Q}),[k,oe,Q]);return ae.jsxs(xL.Provider,{value:_e,children:[ae.jsx("div",{className:"h-full","data-testid":"main-session-page",children:ae.jsxs(RL,{layout:A||k.length===0?"vertical":"horizontal",className:"border-0 gap-8 h-full bg-neutral-90",gutterSize:k.length===0?0:4,children:[ae.jsx(aI,{size:k.length===0?100:67,minSize:50,children:ae.jsxs("div",{className:"flex flex-col w-full",children:[e("init-session")&&m===eu.ONLY_PANELIST&&ae.jsx(PL,{severity:"warn",content:ae.jsxs("div",{className:"flex flex-col @md:flex-row items-center justify-between w-full gap-16",children:[ae.jsxs("span",{className:"flex-1 text-center @md:text-left",children:["Estás en una ",ae.jsx("b",{children:"conferencia de prueba"}),", abre sesión para invitar a todo el listado de asistentes"]}),ae.jsx(di,{label:"Abrir videoconferencia",onClick:Ee,size:"small",className:"whitespace-nowrap shrink-0 w-full @md:w-auto"})]}),className:"@container bg-warning-90 text-neutral-20"}),ae.jsx(TX,{}),ae.jsx(CX,{})]})}),ae.jsx(aI,{size:33,minSize:25,className:A?void 0:"max-h-full overflow-hidden",children:ae.jsxs(OL,{activeIndex:R,onTabChange:xe=>de(typeof xe.index=="number"?xe.index:null),className:"h-full",expandIcon:" ",collapseIcon:" ",hidden:k.length===0,children:[ae.jsx(Wy,{className:k!=null&&k.includes(0)?"":"hidden",header:()=>ae.jsx(nE,{activeSection:R,label:"Asistentes",tabIdx:0,onClose:()=>oe(0)}),children:ae.jsx(V3,{users:b})}),ae.jsx(Wy,{className:k!=null&&k.includes(1)?"":"hidden",contentClassName:"[&_.p-accordion-content]:p-0",header:()=>ae.jsx(nE,{activeSection:R,label:"Turno de palabra",tabIdx:1,onClose:()=>oe(1)}),children:ae.jsx(B3,{})}),ae.jsx(Wy,{className:k!=null&&k.includes(2)?"":"hidden",contentClassName:"[&_.p-accordion-content]:p-0",header:()=>ae.jsx(nE,{activeSection:R,label:"Chat",tabIdx:2,onClose:()=>oe(2)}),children:ae.jsx(XN,{})})]})})]})}),ae.jsxs(IR,{closeIcon:ae.jsx("i",{className:"fa-regular fa-xmark fa-lg","aria-hidden":"true"}),fullScreen:!0,header:G,onHide:()=>{D([]),$(!1),q(null),x(null)},pt:{header:{className:"border-b border-neutral-80 font-bold"},content:{className:"p-0"}},visible:F,children:[H===0&&ae.jsx(V3,{users:b}),H===1&&ae.jsx(B3,{}),H===2&&ae.jsx(XN,{})]}),ae.jsx(V9,{className:"w-full max-w-xl"}),ae.jsx(IL,{}),ae.jsx(AY,{}),ae.jsx(wY,{visible:r,onClose:n,transferHostRoleToUser:o,requestingUser:{id:(i==null?void 0:i.userId)??0,name:(i==null?void 0:i.displayName)??""}})]})},wee=({className:e})=>{const{changePluginBreakpoint:t}=Hd(),{sessionStarted:r}=ll(),{ref:n,breakpoint:o}=WJ();return ie.useEffect(()=>{t(o)},[o,t]),ae.jsx("div",{className:Ni("fraku-video-plugin",e),ref:n,children:r?ae.jsx(Cee,{}):ae.jsx(JQ,{})})},NF=ie.forwardRef(({onChangeUserRole:e,onInitPreSession:t,onInitSession:r,onCloseSession:n,credentials:o,videoSessionStatus:i,className:a},s)=>{const l=ie.useRef(null);return ie.useImperativeHandle(s,()=>({isReady:()=>{var c;return((c=l.current)==null?void 0:c.isReady())??!1},cleanup:()=>hc(l.current,"VideoPluginProvider").cleanup(),getSessionStarted:()=>hc(l.current,"VideoPluginProvider").getSessionStarted(),joinSession:()=>hc(l.current,"VideoPluginProvider").joinSession(),leaveSession:c=>hc(l.current,"VideoPluginProvider").leaveSession(c)}),[]),ae.jsx(mL,{ref:l,credentials:o,onChangeUserRole:e,onInitVotingPreSession:t,onInitVotingSession:r,onCloseVotingSession:n,videoSessionStatus:i,children:ae.jsx(wee,{className:a})})});NF.displayName="VideoPlugin";exports.VideoPlugin=NF;
|
|
2283
|
+
`,Dt.forEach(function(kt,rr){var hr=[X(kt,"field"),X(kt,"exportField")],Rr=hr[0],Lr=hr[1],un=Lr||Rr,bn=fe.resolveFieldData($t,un);bn!=null?o.exportFunction?bn=o.exportFunction({data:bn,field:un,rowData:$t,column:kt}):bn=String(bn).replace(/"/g,'""').replace(/\n/g,"\u2028"):bn="",gt=gt+('"'+bn+'"'),rr<Dt.length-1&&(gt=gt+o.csvSeparator)})}),le.exportCSV(gt,o.exportFilename)},nS=function(){o.editMode!=="row"&&document.body.click()},oS=function(){le.find(document.body,'[data-pc-section="roweditorcancelbuttonprops"]').forEach(function(ye,je){setTimeout(function(){ye.click()},je*5)})},Ll=function(ye){return Hi({first:Kt(),rows:sr(),sortField:br(),sortOrder:Zr(),multiSortMeta:Nr(),filters:Vt()},ye)},ul=function(ye){var je=o.value||[];if(!o.lazy&&je&&je.length){var gt=ye&&ye.filters||Vt(),Dt=ye&&ye.sortField||br(),$t=ye&&ye.sortOrder||Zr(),kt=ye&&ye.multiSortMeta||Nr(),rr=J(),hr=rr.find(function(Rr){return X(Rr,"field")===Dt});hr&&(Gt.current=X(hr,"sortable"),Yt.current=X(hr,"sortFunction")),(fe.isNotEmpty(gt)||o.globalFilter)&&(je=Z0(je,gt)),(Dt||fe.isNotEmpty(kt))&&(o.sortMode==="single"?je=Q0(je,Dt,$t):o.sortMode==="multiple"&&(je=Nn(je,kt)))}return je},qd=function(ye){if(ye&&o.paginator){var je=o.lazy?0:Kt();return ye.slice(je,je+sr())}return ye};Go(function(){ar.current&&(Jt.current=ms(),ar.current.setAttribute(Jt.current,"")),cr(kl(o.filters)),Je()&&(lt(),o.resizableColumns&&Pn())}),hn(function(){return o.responsiveLayout==="stack"&&!o.scrollable&&Sg(),function(){Lf()}},[o.breakpoint]),hn(function(){var Ut=kl(o.filters);de(Ut),cr(kl(o.filters)),o.onValueChange&&o.onValueChange(ul({filters:Ut}))},[o.filters]),hn(function(){Je()&&me()}),hn(function(){Lf(),o.responsiveLayout==="stack"&&!o.scrollable&&Sg()},[o.responsiveLayout,o.scrollable]),hn(function(){if(o.globalFilter)Rg(o.globalFilter,"global",o.globalFilterMatchMode);else if(Wt.global){var Ut=Hi({},Wt);delete Ut.global,cr(Ut),Ff(Ut)}},[o.globalFilter,o.globalFilterMatchMode]),wi(function(){xt(),No(),Lf(),Eg()}),S.useImperativeHandle(t,function(){return{props:o,clearState:ze,closeEditingCell:nS,closeEditingRows:oS,exportCSV:rS,filter:Rg,reset:eS,resetColumnOrder:Tg,resetScroll:Vs,resetResizeColumnsWidth:tS,restoreColumnWidths:Pn,restoreState:lt,restoreTableState:ct,saveState:me,getFilterMeta:function(){return Q},setFilterMeta:function(ye){return de(ye)},getSortMeta:function(){return $},setSortMeta:function(ye){return H(ye)},getElement:function(){return ar.current},getTable:function(){return pr.current},getVirtualScroller:function(){return Xr.current},getProcessedData:function(){return ul()}}});var er=function(){if(o.loading){var ye=n({className:Ve.cx("loadingIcon")},Ve.ptm("loadingIcon")),je=o.loadingIcon||S.createElement(fg,Qn({},ye,{spin:!0})),gt=nn.getJSXIcon(je,Hi({},ye),{props:o}),Dt=n({className:Ve.cx("loadingOverlay")},Ve.ptm("loadingOverlay"));return S.createElement("div",Dt,gt)}return null},I=function(){if(o.header){var ye=fe.getJSXElement(o.header,{props:o}),je=n({className:Ve.cx("header")},Ve.ptm("header"));return S.createElement("div",je,ye)}return null},Og=function(ye,je,gt){if(o.showHeaders===!1)return null;var Dt=br(),$t=Zr(),kt=Xo(Nr()),rr=xn(),hr=Wt,Rr=!o.onFilter&&o.filters||Vt(),Lr=ye.items,un=ye.props,bn=ye.columns,co=gt||un.lazy?Lr:un.items;return S.createElement(_F,{hostName:"DataTable",value:co,tableProps:o,columns:bn,tabIndex:o.tabIndex,empty:je,headerColumnGroup:o.headerColumnGroup,resizableColumns:o.resizableColumns,onColumnResizeStart:Li,onColumnResizerClick:o.onColumnResizerClick,onColumnResizerDoubleClick:o.onColumnResizerDoubleClick,sortMode:o.sortMode,sortField:Dt,sortIcon:o.sortIcon,sortOrder:$t,multiSortMeta:kt,groupRowsBy:o.groupRowsBy,groupRowSortField:rr,onSortChange:G0,filterDisplay:o.filterDisplay,filters:hr,filtersStore:Rr,filterIcon:o.filterIcon,filterClearIcon:o.filterClearIcon,onFilterChange:Y0,onFilterApply:Ff,showSelectAll:o.showSelectAll,allRowsSelected:An,onColumnCheckboxChange:Rn,onColumnMouseDown:_r,onColumnDragStart:ln,onColumnDragOver:kr,onColumnDragLeave:Gd,onColumnDrop:Rc,rowGroupMode:o.rowGroupMode,reorderableColumns:o.reorderableColumns,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled})},_g=function(ye,je,gt,Dt,$t){var kt=Kt(),rr=ye.rows,hr=ye.columns,Rr=ye.contentRef,Lr=ye.style,un=ye.className,bn=ye.spacerStyle,co=ye.itemSize,Ii=fe.isNotEmpty(o.frozenValue)&&S.createElement(zy,{hostName:"DataTable",ref:Wr,cellMemo:o.cellMemo,cellMemoProps:o.cellMemoProps,cellMemoPropsDepth:o.cellMemoPropsDepth,cellClassName:o.cellClassName,cellSelection:o.cellSelection,checkIcon:o.checkIcon,className:"p-datatable-tbody p-datatable-frozen-tbody",collapsedRowIcon:o.collapsedRowIcon,columns:hr,compareSelectionBy:o.compareSelectionBy,contextMenuSelection:o.contextMenuSelection,dataKey:o.dataKey,dragSelection:o.dragSelection,editMode:o.editMode,editingMeta:st,editingRows:o.editingRows,emptyMessage:o.emptyMessage,expandableRowGroups:o.expandableRowGroups,expandedRowIcon:o.expandedRowIcon,expandedRows:o.expandedRows,first:kt,frozenRow:!0,groupRowsBy:o.groupRowsBy,isDataSelectable:o.isDataSelectable,isVirtualScrollerDisabled:!0,lazy:o.lazy,loading:o.loading,metaKeySelection:o.metaKeySelection,onCellClick:o.onCellClick,onCellSelect:o.onCellSelect,onCellUnselect:o.onCellUnselect,onContextMenu:o.onContextMenu,onContextMenuSelectionChange:o.onContextMenuSelectionChange,onEditingMetaChange:yn,onRowClick:o.onRowClick,onRowCollapse:o.onRowCollapse,onRowDoubleClick:o.onRowDoubleClick,onRowPointerDown:o.onRowPointerDown,onRowPointerUp:o.onRowPointerUp,onRowEditCancel:o.onRowEditCancel,onRowEditChange:o.onRowEditChange,onRowEditComplete:o.onRowEditComplete,onRowEditInit:o.onRowEditInit,onRowEditSave:o.onRowEditSave,onRowExpand:o.onRowExpand,onRowMouseEnter:o.onRowMouseEnter,onRowMouseLeave:o.onRowMouseLeave,onRowReorder:o.onRowReorder,onRowSelect:o.onRowSelect,onRowToggle:o.onRowToggle,onRowUnselect:o.onRowUnselect,onSelectionChange:o.onSelectionChange,paginator:o.paginator,processedData:$t,reorderableRows:o.reorderableRows,responsiveLayout:o.responsiveLayout,rowClassName:o.rowClassName,rowEditValidator:o.rowEditValidator,rowEditorCancelIcon:o.rowEditorCancelIcon,rowEditorInitIcon:o.rowEditorInitIcon,rowEditorSaveIcon:o.rowEditorSaveIcon,rowExpansionTemplate:o.rowExpansionTemplate,rowGroupFooterTemplate:o.rowGroupFooterTemplate,rowGroupHeaderTemplate:o.rowGroupHeaderTemplate,rowGroupMode:o.rowGroupMode,scrollable:o.scrollable,selectOnEdit:o.selectOnEdit,selection:o.selection,selectionAutoFocus:o.selectionAutoFocus,selectionMode:o.selectionMode,selectionModeInColumn:je,showRowReorderElement:o.showRowReorderElement,showSelectionElement:o.showSelectionElement,tabIndex:o.tabIndex,tableProps:o,tableSelector:Jt.current,value:o.frozenValue,virtualScrollerOptions:ye,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled}),es=S.createElement(zy,{hostName:"DataTable",ref:en,cellMemo:o.cellMemo,cellMemoProps:o.cellMemoProps,cellMemoPropsDepth:o.cellMemoPropsDepth,cellClassName:o.cellClassName,cellSelection:o.cellSelection,checkIcon:o.checkIcon,className:dt("p-datatable-tbody",un),collapsedRowIcon:o.collapsedRowIcon,columns:hr,compareSelectionBy:o.compareSelectionBy,contextMenuSelection:o.contextMenuSelection,dataKey:o.dataKey,dragSelection:o.dragSelection,editMode:o.editMode,editingMeta:Pe,editingRows:o.editingRows,empty:gt,emptyMessage:o.emptyMessage,expandableRowGroups:o.expandableRowGroups,expandedRowIcon:o.expandedRowIcon,expandedRows:o.expandedRows,first:kt,frozenRow:!1,groupRowsBy:o.groupRowsBy,isDataSelectable:o.isDataSelectable,isVirtualScrollerDisabled:Dt,lazy:o.lazy,loading:o.loading,metaKeySelection:o.metaKeySelection,onCellClick:o.onCellClick,onCellSelect:o.onCellSelect,onCellUnselect:o.onCellUnselect,onContextMenu:o.onContextMenu,onContextMenuSelectionChange:o.onContextMenuSelectionChange,onEditingMetaChange:uo,onRowClick:o.onRowClick,onRowCollapse:o.onRowCollapse,onRowDoubleClick:o.onRowDoubleClick,onRowEditCancel:o.onRowEditCancel,onRowEditChange:o.onRowEditChange,onRowEditComplete:o.onRowEditComplete,onRowEditInit:o.onRowEditInit,onRowEditSave:o.onRowEditSave,onRowExpand:o.onRowExpand,onRowMouseEnter:o.onRowMouseEnter,onRowMouseLeave:o.onRowMouseLeave,onRowPointerDown:o.onRowPointerDown,onRowPointerUp:o.onRowPointerUp,onRowReorder:o.onRowReorder,onRowSelect:o.onRowSelect,onRowToggle:o.onRowToggle,onRowUnselect:o.onRowUnselect,onSelectionChange:o.onSelectionChange,paginator:o.paginator,processedData:$t,reorderableRows:o.reorderableRows,responsiveLayout:o.responsiveLayout,rowClassName:o.rowClassName,rowEditValidator:o.rowEditValidator,rowEditorCancelIcon:o.rowEditorCancelIcon,rowEditorInitIcon:o.rowEditorInitIcon,rowEditorSaveIcon:o.rowEditorSaveIcon,rowExpansionTemplate:o.rowExpansionTemplate,rowGroupFooterTemplate:o.rowGroupFooterTemplate,rowGroupHeaderTemplate:o.rowGroupHeaderTemplate,rowGroupMode:o.rowGroupMode,scrollable:o.scrollable,selectOnEdit:o.selectOnEdit,selection:o.selection,selectionAutoFocus:o.selectionAutoFocus,selectionMode:o.selectionMode,selectionModeInColumn:je,showRowReorderElement:o.showRowReorderElement,showSelectionElement:o.showSelectionElement,style:Lr,tabIndex:o.tabIndex,tableProps:o,tableSelector:Jt.current,value:qd(rr),virtualScrollerContentRef:Rr,virtualScrollerOptions:ye,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled}),ts=fe.isNotEmpty(bn)?S.createElement(zy,{hostName:"DataTable",style:{height:"calc(".concat(bn.height," - ").concat(rr.length*co,"px)")},className:"p-datatable-virtualscroller-spacer",ptCallbacks:Ve,metaData:At,unstyled:o.unstyled}):null;return S.createElement(S.Fragment,null,Ii,es,ts)},Jd=function(ye){var je=ye.columns;return S.createElement(TF,{hostName:"DataTable",tableProps:o,columns:je,footerColumnGroup:o.footerColumnGroup,ptCallbacks:Ve,metaData:At,unstyled:o.unstyled})},ua=function(ye,je,gt,Dt){if(je){var $t=vt(),kt=o.virtualScrollerOptions||{},rr=n({className:Ve.cx("wrapper"),style:Hi(Hi({},Ve.sx("wrapper")),{},{maxHeight:$t?o.scrollHeight:null})},Ve.ptm("wrapper"));return S.createElement("div",Qn({ref:gr},rr),S.createElement(RR,Qn({ref:Xr},kt,{items:ye,columns:je,style:Hi(Hi({},kt.style),{height:o.scrollHeight!=="flex"?o.scrollHeight:void 0}),scrollHeight:o.scrollHeight!=="flex"?void 0:"100%",disabled:$t,loaderDisabled:!0,inline:!0,autoSize:!0,pt:Ve.ptm("virtualScroller"),__parentMetadata:{parent:At},showSpacer:!1,unstyled:o.unstyled,contentTemplate:function(Rr){var Lr=function(ts){pr.current=ts,Rr.spacerRef&&Rr.spacerRef(ts)},un=Og(Rr,Dt,$t),bn=_g(Rr,gt,Dt,$t,ye),co=Jd(Rr),Ii=n({className:dt(o.tableClassName,Ve.cx("table")),style:o.tableStyle,role:"table"},Ve.ptm("table"));return S.createElement("table",Qn({ref:Lr},Ii),un,bn,co)}})))}},iS=function(){if(o.footer){var ye=fe.getJSXElement(o.footer,{props:o}),je=n({className:Ve.cx("footer")},Ve.ptm("footer"));return S.createElement("div",je,ye)}return null},Pg=function(ye,je){return S.createElement(lF,{first:Kt(),rows:sr(),pageLinkSize:o.pageLinkSize,className:dt(o.paginatorClassName,Ve.cx("paginator",{position:ye})),onPageChange:K0,template:o.paginatorTemplate,totalRecords:je,rowsPerPageOptions:o.rowsPerPageOptions,currentPageReportTemplate:o.currentPageReportTemplate,leftContent:o.paginatorLeft,rightContent:o.paginatorRight,alwaysShow:o.alwaysShowPaginator,dropdownAppendTo:o.paginatorDropdownAppendTo,pt:Ve.ptm("paginator"),unstyled:o.unstyled,__parentMetadata:{parent:At}})},aS=function(ye){return o.paginator&&o.paginatorPosition!=="bottom"?Pg("top",ye):null},Su=function(ye){return o.paginator&&o.paginatorPosition!=="top"?Pg("bottom",ye):null},Tc=function(){if(o.resizableColumns){var ye=n({className:Ve.cx("resizeHelper"),style:Ve.sx("resizeHelper")},Ve.ptm("resizeHelper"));return S.createElement("div",Qn({ref:zr},ye))}return null},ti=function(){if(o.reorderableColumns){var ye={position:"absolute",display:"none"},je=n({className:Ve.cx("reorderIndicatorUp"),style:Ve.sx("reorderIndicatorUp",{style:ye})},Ve.ptm("reorderIndicatorUp")),gt=n(Ve.ptm("reorderIndicatorUpIcon")),Dt=nn.getJSXIcon(o.reorderIndicatorUpIcon||S.createElement($L,gt),Hi({},gt),{props:o}),$t=n({className:Ve.cx("reorderIndicatorDown"),style:Ve.sx("reorderIndicatorDown",{style:ye})},Ve.ptm("reorderIndicatorDown")),kt=n(Ve.ptm("reorderIndicatorDownIcon")),rr=nn.getJSXIcon(o.reorderIndicatorDownIcon||S.createElement(WL,kt),Hi({},kt),{props:o});return S.createElement(S.Fragment,null,S.createElement("span",Qn({ref:Pr},je),Dt),S.createElement("span",Qn({ref:Br},$t),rr))}return null},Xn=ul(),Eu=J(),Va=fi(Xn),sS=fe.isEmpty(Xn),xg=lo(Eu),Qd=o.selectionMode||xg,Hn=er(),lS=I(),uS=aS(Va),ca=ua(Xn,Eu,xg,sS),Es=Su(Va),jf=iS(),cS=Tc(),Yd=ti(),Dg=n({id:o.id,className:dt(o.className,Ve.cx("root",{selectable:Qd})),style:o.style,"data-scrollselectors":".p-datatable-wrapper","data-showgridlines":o.showGridlines},qv.getOtherProps(o),Ve.ptm("root"));return S.createElement("div",Qn({ref:ar},Dg),Hn,lS,uS,ca,Es,jf,cS,Yd)});PF.displayName="DataTable";function jI(){return jI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jI.apply(null,arguments)}function Jm(e){"@babel/helpers - typeof";return Jm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jm(e)}function lee(e,t){if(Jm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Jm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uee(e){var t=lee(e,"string");return Jm(t)=="symbol"?t:t+""}function cee(e,t,r){return(t=uee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var dee={root:function(t){var r=t.props;return dt("p-icon-field",{"p-icon-field-right":r.iconPosition==="right","p-icon-field-left":r.iconPosition==="left"})}},lE=Ar.extend({defaultProps:{__TYPE:"IconField",__parentMetadata:null,children:void 0,className:null,iconPosition:"right"},css:{classes:dee}});function M3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function k3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M3(Object(r),!0).forEach(function(n){cee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xF=ie.memo(ie.forwardRef(function(e,t){var r=ie.useRef(t),n=Vr(),o=ie.useContext(qr),i=lE.getProps(e,o),a=lE.setMetaData(k3(k3({props:i},i.__parentMetadata),{},{context:{iconPosition:i.iconPosition}})),s=a.ptm,l=a.cx,c=n({className:dt(i.className,l("root",{iconPosition:i.iconPosition}))},lE.getOtherProps(i),s("root"));return ie.createElement("div",jI({},c,{ref:r}),ie.Children.map(i.children,function(d,p){return ie.cloneElement(d,{iconPosition:i.iconPosition})}))}));xF.displayName="IconField";function VI(){return VI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},VI.apply(null,arguments)}function Qm(e){"@babel/helpers - typeof";return Qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qm(e)}function pee(e,t){if(Qm(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Qm(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fee(e){var t=pee(e,"string");return Qm(t)=="symbol"?t:t+""}function hee(e,t,r){return(t=fee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var mee={root:"p-input-icon"},uE=Ar.extend({defaultProps:{__TYPE:"InputIcon",__parentMetadata:null,className:null,iconPosition:null},css:{classes:mee}});function L3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function F3(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L3(Object(r),!0).forEach(function(n){hee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L3(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var DF=ie.memo(ie.forwardRef(function(e,t){var r=ie.useRef(t),n=Vr(),o=ie.useContext(qr),i=uE.getProps(e,o),a=uE.setMetaData(F3(F3({props:i},i.__parentMetadata),{},{context:{iconPosition:i.iconPosition}})),s=a.ptm,l=a.cx,c=n({className:dt(i.className,l("root"))},uE.getOtherProps(i),s("root"));return ie.createElement(ie.Fragment,null,ie.createElement("span",VI({},c,{ref:r}),i.children))}));DF.displayName="InputIcon";const gee=({can:e,columnHeader:t,currentUserId:r,filteredUsers:n,filter:o,handleMakeHost:i,handleMakeManager:a,handleRevokeManager:s,handleRequestMakeHost:l,handleToggleParticipantMic:c,loading:d,setFilter:p,setSelectedUser:m,userMenuRef:y})=>{const b=[{visible:e.requestHostRole,label:"Solicitar cambio a anfitrión",command:l,data:{"data-testid":"request-host-menu-item"}},{visible:e.revokeManagerRole,label:"Convertir a asistente",command:s,data:{"data-testid":"revoke-manager-menu-item"}},{visible:e.makeManagerRole,label:"Convertir a Panelista",command:a,data:{"data-testid":"make-manager-menu-item"}},{visible:e.transferHostRole,label:"Transferir Administración",command:i,data:{"data-testid":"make-admin-menu-item"}}],v=b.filter(R=>R.visible),C={visible:!0,label:"No hay acciones disponibles",data:{"data-testid":"no-actions-menu-item"},command:()=>Promise.resolve()},A=v.length>0?b:[...b,C];return ae.jsxs(ae.Fragment,{children:[ae.jsxs(xF,{iconPosition:"left",className:"w-full mb-16","data-testid":"search-field",children:[ae.jsx(DF,{className:"fa-regular fa-magnifying-glass"}),ae.jsx(z0,{value:o,onChange:R=>p(R.target.value),placeholder:"Buscar participantes",className:"w-full","data-testid":"search-input"})]}),ae.jsxs(PF,{value:n,size:"small",stripedRows:!0,"data-testid":"participants-table",children:[ae.jsx(bI,{body:R=>ae.jsxs("div",{className:"flex items-center gap-16","data-testid":`participant-row-${R.userId}`,children:[ae.jsx("p",{className:"font-semibold","data-testid":"participant-name",children:R.displayName}),R.isHost&&ae.jsx(yg,{label:"Admin",className:"text-neutral-50 rounded-l font-semibold","data-testid":"admin-chip"})]}),header:t}),ae.jsx(bI,{body:R=>ae.jsxs("div",{className:"flex gap-4 justify-end","data-testid":`participant-actions-${R.userId}`,children:[ae.jsx(di,{"aria-label":"Toggle video",disabled:!0,icon:`fa-regular fa-video${R.bVideoOn?"":"-slash"} text-neutral-40`,text:!0,"data-testid":"toggle-video-btn"}),ae.jsx(di,{"aria-label":"Toggle microphone",disabled:d||R.userId===r||!e.toggleUserAudio,icon:`fa-regular fa-microphone${R.muted?"-slash":""} text-neutral-40`,onClick:()=>c(R),text:!0,"data-testid":"toggle-mic-btn"}),ae.jsx(di,{"aria-label":"Open user menu","data-testid":"open-user-menu-button","aria-controls":"user-menu","aria-haspopup":!0,disabled:R.userId===r,icon:"fa-regular fa-gear text-neutral-40",onClick:x=>{var k;m(R),(k=y.current)==null||k.toggle(x)},text:!0})]})})]}),ae.jsx(uu,{id:"user-menu",ref:y,popup:!0,popupAlignment:"right",model:A})]})},vee=e=>{const t=Kd(),{changeUserRole:r}=Hd(),n=mg(),{alertUser:o,requestHostRole:i}=hg(),{zmClient:a}=ll(),{currentUser:s}=bu(),{muteUserMic:l,unmuteUserMic:c}=Ac(),{confirm:d,notify:p}=bs(),[m,y]=ie.useState(""),b=m.toLocaleLowerCase().trim(),v=e.filter(H=>H.displayName.toLocaleLowerCase().includes(b)),C=ie.useRef(null),[A,R]=ie.useState(null),x=ie.useCallback(async()=>{A&&d({header:"Convertir a panelista",message:"¿Quieres convertir a esta persona en panelista?",onAccept:async()=>{await a.makeManager(A.userId),await o(A.userId,"Ha sido convertido a panelista"),await(r==null?void 0:r({userId:A.userId,role:"PANELIST"})),p({header:"Cambio a panelista",message:"Has cambiado a panelista a este asistente.",severity:"success"})}})},[a,A,d,o,p,r]),k=ie.useCallback(async()=>{A&&d({header:"Convertir a asistente",message:"¿Quieres convertir a esta persona en asistente?",onAccept:async()=>{await a.revokeManager(A.userId),await o(A.userId,"Ha sido convertido a asistente"),await(r==null?void 0:r({userId:A.userId,role:"ATTENDEE"})),p({header:"Cambio a asistente",message:"Has cambiado a asistente a este panelista.",severity:"success"})}})},[a,A,d,o,p,r]),D=ie.useCallback(async()=>{A&&d({header:"Transferir administración",message:"Va a transferir la administración a otro usuario. Esta operación es irrevocable. ¿Está seguro?",onAccept:async()=>{await a.makeHost(A.userId),await o(A.userId,"¡Ha sido promocionado a anfitrión!"),await(r==null?void 0:r({userId:A.userId,role:"HOST"})),p({header:"Cambio a anfitrión",message:"Has cambiado a anfitrión a este usuario.",severity:"success"})}})},[a,A,d,p,o,r]),F=ie.useCallback(async()=>{A&&d({header:"Solicitar ser anfitrión",message:"¿Quieres solicitar al anfitrión que te transfiera la administración?",onAccept:async()=>{try{await i(),p({header:"Solicitud enviada",message:"Has solicitado al anfitrión que te transfiera la administración.",severity:"success"})}catch(H){p({header:"Error al solicitar ser anfitrión",message:H instanceof Error?H.message:"Ha ocurrido un error desconocido.",severity:"error"})}}})},[A,d,p,i]),[$]=wa(async H=>{d({header:H.muted?"Encender micrófono":"Apagar micrófono",message:H.muted?`¿Quieres solicitar a ${H.displayName} que encienda su micrófono?`:`¿Quieres apagar el micrófono de ${H.displayName}?`,onAccept:async()=>{H.muted?await c(H.userId):(await l(H.userId),p({header:H.muted?"Solicitud de encendido de micrófono":"Micrófono apagado",message:H.muted?`Has solicitado a ${H.displayName} que encienda su micrófono.`:`Has apagado el micrófono de ${H.displayName}.`,severity:"success"}))}})},[d,l,c,p],n.ref);return{can:{toggleUserAudio:t("toggle-user-audio"),toggleUserVideo:t("toggle-user-video"),requestHostRole:t("request-host-role")&&!!(A!=null&&A.isHost),revokeManagerRole:t("revoke-manager-role")&&!!(A!=null&&A.isManager),makeManagerRole:t("make-manager-role")&&!(A!=null&&A.isManager),transferHostRole:t("transfer-host-role")&&!!(A!=null&&A.isManager)},currentUserId:(s==null?void 0:s.userId)??0,filteredUsers:v,filter:m,handleMakeHost:D,handleMakeManager:x,handleRevokeManager:k,handleToggleParticipantMic:$,handleRequestMakeHost:F,loading:n.loading,setFilter:y,setSelectedUser:R,userMenuRef:C}},j3=({users:e,columnHeader:t})=>{const r=vee(e);return ae.jsx(gee,{columnHeader:t,...r})},V3=({users:e})=>{const t=Kd(),r=e.filter(o=>o.isHost||o.isManager),n=e.filter(o=>!o.isHost&&!o.isManager);return ae.jsxs(UL,{activeIndex:0,pt:{panelContainer:{className:"px-0"},navContent:{className:"[&_.p-tabview-nav-link]:mb-0"}},children:[ae.jsx(yI,{header:"Panelistas",children:ae.jsx(j3,{users:r,columnHeader:`${r.length} panelistas`})}),t("show-attendee-list")&&ae.jsx(yI,{header:"Asistentes",children:ae.jsx(j3,{users:n,columnHeader:`${n.length} asistentes`})})]})},yee=({participant:e,onMicToggle:t,onLowerHand:r,isMicToggleEnabled:n})=>ae.jsxs("li",{className:"flex justify-between items-center py-8 border border-neutral-80 rounded-m px-8","aria-label":`Usuario ${e.displayName}`,"data-testid":"turn-queue-user-item",children:[ae.jsx("p",{className:"font-semibold whitespace-nowrap truncate","data-testid":"turn-queue-user-name",children:e.displayName}),ae.jsxs("div",{className:"flex gap-8 items-center",children:[ae.jsx("button",{"aria-label":e.muted?`Solicitar a ${e.displayName} que encienda su micrófono`:`Apagar el micrófono de ${e.displayName}`,className:"flex items-center justify-center w-24 h-24","data-testid":"turn-queue-user-mic-btn",disabled:!n,onClick:()=>t(e),children:ae.jsx("i",{"aria-hidden":"true",className:`fa-regular fa-microphone${e.muted?"-slash":""} text-neutral-40`})}),ae.jsx("button",{"aria-label":`Bajar la mano de ${e.displayName}`,className:"border border-neutral-80 rounded-l px-8 py-4 font-semibold text-neutral-50 whitespace-nowrap w-fit h-fit","data-testid":"turn-queue-user-lower-hand-btn",onClick:()=>r(e.userId),children:"Bajar mano"})]})]}),bee=({onToggleHand:e,isToggleHandEnabled:t,currentUser:r,raisedHand:n,queuePosition:o,queueLength:i})=>ae.jsxs(ae.Fragment,{children:[n?ae.jsxs("div",{className:"flex flex-col gap-4",children:[ae.jsx("p",{className:"font-semibold",children:"Has solicitado el turno de palabra"}),ae.jsx("p",{children:"Espera que el administrador de la videoconferencia te dé acceso."})]}):ae.jsxs("div",{className:"flex flex-col gap-4",children:[ae.jsx("p",{className:"font-semibold",children:"No has solicitado el turno de palabra"}),ae.jsx("p",{children:"Levanta la mano para solicitar acceso a la videoconferencia."})]}),ae.jsxs("div",{className:"flex justify-between gap-16 my-16 p-8 rounded-m border border-neutral-80",children:[ae.jsx("div",{className:"flex items-center whitespace-nowrap truncate",children:o!==-1?ae.jsxs("p",{className:"truncate","data-testid":"request-turn-position",children:["Posición ",o+1," de ",i]}):ae.jsxs("p",{className:"truncate",children:[i," personas han levantado la mano"]})}),ae.jsxs("div",{className:"flex items-center gap-8",children:[ae.jsx("span",{className:"flex items-center justify-center w-24 h-24",children:ae.jsx("i",{className:`fa-regular fa-microphone${r!=null&&r.muted?"-slash":""} text-neutral-40`,"data-testid":"mic-icon"})}),ae.jsx("button",{className:"border border-neutral-80 rounded-l px-8 py-4 font-semibold text-neutral-50 whitespace-nowrap w-fit h-fit disabled:opacity-32 hover:bg-neutral-95 disabled:hover:bg-transparent","data-testid":"request-turn-btn",disabled:!t,onClick:e,children:n?"Bajar la mano":"Levantar mano"})]})]})]}),See=({canActivateTurnQueue:e,isTurnQueueActive:t,isLowerAllHandsEnabled:r,onLowerAllHands:n,onToggleQueueTurnActive:o})=>ae.jsxs("span",{className:"flex items-center self-end gap-16 mb-16",children:[ae.jsx("button",{className:"w-fit py-4 px-8 bg-neutral-50 text-white font-semibold rounded-l disabled:opacity-32 hover:bg-neutral-70 disabled:hover:bg-neutral-50 min-w-80","data-testid":"lower-all-hands-btn",disabled:!r,onClick:n,children:"Bajar todas las manos"}),ae.jsxs("label",{className:"flex items-center w-fit gap-8",children:[ae.jsx(TR,{"aria-label":"Activar/Desactivar turno de palabra",checked:t,"data-testid":"turn-queue-toggle-switch",disabled:!e,onChange:o}),ae.jsx("span",{children:t?"Desactivar":"Activar"})]})]}),B3=()=>{const e=Kd(),t=mg(),{currentUser:r}=bu(),{confirm:n,notify:o}=bs(),{muteUserMic:i,unmuteUserMic:a}=Ac(),{sharedState:s,speakerQueue:l,raisedHand:c,toggleHand:d,lowerUserHand:p,toggleTurnQueue:m}=hg(),y=ie.useMemo(()=>{var F;return((F=s==null?void 0:s.speakerTurnState.turnQueueState)==null?void 0:F.active)??!1},[s]),[b]=wa(async()=>{n({header:"Bajar todas las manos",message:"¿Quieres bajar todas las manos levantadas? Esta acción no se puede deshacer.",onAccept:async()=>{for(const F of l.map($=>$.userId))await p(F)}})},[n,l,p],t.ref),[v]=wa(async F=>{n({header:F.value?"Activar":"Desactivar",message:F.value?"¿Quieres activar el turno de palabra? Los asistentes podrán solicitar el turno de palabra.":"¿Quieres desactivar el turno de palabra? Se eliminará el listado de petición de palabra y ningún participante podrá solicitar el turno hasta que lo actives de nuevo.",onAccept:async()=>{await m(F.value);for(const $ of l.map(H=>H.userId))await p($);o({header:F.value?"Turno de palabra activado":"Turno de palabra desactivado",message:F.value?"Has activado el turno de palabra.":"Has desactivado el turno de palabra.",severity:"success"})}})},[n,m,o,l,p],t.ref),[C]=wa(async()=>{await d()},[d],t.ref),[A]=wa(async F=>{await p(F)},[p],t.ref),[R]=wa(async F=>{n({header:F.muted?"Encender micrófono":"Apagar micrófono",message:F.muted?`¿Quieres solicitar a ${F.displayName} que encienda su micrófono?`:`¿Quieres apagar el micrófono de ${F.displayName}?`,onAccept:async()=>{F.muted?await a(F.userId):(await i(F.userId),o({header:F.muted?"Solicitud de encendido de micrófono":"Micrófono apagado",message:F.muted?`Has solicitado a ${F.displayName} que encienda su micrófono.`:`Has apagado el micrófono de ${F.displayName}.`,severity:"success"}))}})},[n,i,a,o],t.ref),x=ie.useMemo(()=>!t.loading&&y,[t.loading,y]),k=ie.useMemo(()=>!t.loading&&l.length>0,[t.loading,l]),D=ie.useMemo(()=>F=>!t.loading&&(F!==(r==null?void 0:r.userId)||e("toggle-user-audio")),[t.loading,r,e]);return ae.jsxs("div",{className:"flex flex-col p-16 pb-32 h-full",children:[e("request-turn")&&ae.jsx(bee,{onToggleHand:C,isToggleHandEnabled:x,currentUser:r,raisedHand:c,queuePosition:l.findIndex(F=>F.userId===(r==null?void 0:r.userId)),queueLength:s.speakerTurnState.speakerQueueIds.length}),e("view-activate-turn-queue")&&ae.jsx(See,{isLowerAllHandsEnabled:k,isTurnQueueActive:y,onLowerAllHands:b,onToggleQueueTurnActive:v,canActivateTurnQueue:e("activate-turn-queue")}),e("grant-turn")&&ae.jsx("ul",{className:"mt-16 flex flex-col gap-8",children:l.length?l.map(F=>ae.jsx(yee,{participant:F,onMicToggle:R,onLowerHand:A,isMicToggleEnabled:D(F.userId)},F.userId)):ae.jsxs("span",{children:[ae.jsx("p",{className:"font-semibold",children:"No hay ninguna mano levantada"}),ae.jsx("p",{children:"Espera que algún participante levante la mano para cederle la palabra."})]})}),!y&&ae.jsx(yg,{label:s.speakerTurnState.turnQueueState.timestamp&&Number(s.speakerTurnState.turnQueueState.timestamp)?`Turno de palabra apagado por el administrador ${OR(Number(s.speakerTurnState.turnQueueState.timestamp))}`:"Turno de palabra apagado por el administrador",className:"self-center mt-16 text-neutral-20 rounded-l font-semibold text-s"})]})},Eee=["Asistentes","Turno de palabra","Chat"],Cee=()=>{const e=Kd(),{startVideo:t}=zd(),{requestedHostRoleDialogVisible:r,rejectHostRoleRequest:n,transferHostRoleToUser:o,requestedHostUser:i}=hg(),{toggleAcceptParticipationDialog:a}=bs(),{muteMic:s,startAudio:l,hostAskUnmute:c,resetHostAskUnmute:d}=Ac(),{breakpoint:p,sessionStatus:m,initVotingSession:y}=Hd(),{users:b,currentUser:v}=bu(),{updateReceiversAndChatHistory:C}=cL(),A=p===Dm.Mobile,[R,x]=ie.useState(A?null:0),[k,D]=ie.useState(A?[]:[...Array(3).keys()]),[F,$]=ie.useState(!1),[H,q]=ie.useState(null),G=H!==null?Eee[H]:"",Q=ie.useRef(null),de=ie.useCallback(xe=>{x(xe),xe===2&&k.includes(2)&&C()},[k,C]),oe=ie.useCallback(xe=>{A?(q(xe),$(!0)):D(ne=>ne.includes(xe)?(de(xe===R?null:R),ne.filter(be=>be!==xe)):(de(xe),[...ne,xe])),xe===2&&C()},[R,A,de,C]),Ee=ie.useCallback(()=>{ER({header:"Abrir videoconferencia",message:"Al abrir la videconferencia, los participantes recibirán una notificación y podrán unirse de inmediato. Asegúrate de que todo está listo antes de continuar.",defaultFocus:"accept",rejectLabel:"Cerrar",acceptLabel:"Abrir videoconferencia",accept:async()=>{await(y==null?void 0:y())}})},[y]),ce=ie.useRef(!1);ie.useEffect(()=>{if(!v)return;const xe=async()=>{e("join-session-with-video")&&await t(),await l(),e("join-session-with-audio")||await s()};ce.current||(xe(),ce.current=!0)},[e,v,s,l,t]),ie.useEffect(()=>{c&&(a(),d())},[c,d,a]);const _e=ie.useMemo(()=>({openTabs:k,handleOpenCloseTab:oe,selfShareViewRef:Q}),[k,oe,Q]);return ae.jsxs(xL.Provider,{value:_e,children:[ae.jsx("div",{className:"h-full","data-testid":"main-session-page",children:ae.jsxs(RL,{layout:A||k.length===0?"vertical":"horizontal",className:"border-0 gap-8 h-full bg-neutral-90",gutterSize:k.length===0?0:4,children:[ae.jsx(aI,{size:k.length===0?100:67,minSize:50,children:ae.jsxs("div",{className:"flex flex-col w-full overflow-y-auto",children:[e("init-session")&&m===eu.ONLY_PANELIST&&ae.jsx(PL,{severity:"warn",content:ae.jsxs("div",{className:"flex flex-col @md:flex-row items-center justify-between w-full gap-16",children:[ae.jsxs("span",{className:"flex-1 text-center @md:text-left",children:["Estás en una ",ae.jsx("b",{children:"conferencia de prueba"}),", abre sesión para invitar a todo el listado de asistentes"]}),ae.jsx(di,{label:"Abrir videoconferencia",onClick:Ee,size:"small",className:"whitespace-nowrap shrink-0 w-full @md:w-auto"})]}),className:"@container bg-warning-90 text-neutral-20"}),ae.jsx(TX,{}),ae.jsx(CX,{})]})}),ae.jsx(aI,{size:33,minSize:25,className:A?void 0:"h-full min-h-0 flex flex-col overflow-hidden",children:ae.jsxs(OL,{activeIndex:R,onTabChange:xe=>de(typeof xe.index=="number"?xe.index:null),className:"flex flex-col min-h-0 [&_.p-accordion-tab.p-accordion-tab-active]:flex [&_.p-accordion-tab.p-accordion-tab-active]:flex-col [&_.p-accordion-tab.p-accordion-tab-active]:min-h-0",expandIcon:" ",collapseIcon:" ",hidden:k.length===0,children:[ae.jsx(Wy,{className:k!=null&&k.includes(0)?"":"hidden",contentClassName:"flex flex-col overflow-hidden [&_.p-accordion-content]:overflow-hidden",header:()=>ae.jsx(nE,{activeSection:R,label:"Asistentes",tabIdx:0,onClose:()=>oe(0)}),children:ae.jsx(V3,{users:b})}),ae.jsx(Wy,{className:k!=null&&k.includes(1)?"":"hidden",contentClassName:"flex flex-col overflow-hidden [&_.p-accordion-content]:p-0 [&_.p-accordion-content]:overflow-hidden",header:()=>ae.jsx(nE,{activeSection:R,label:"Turno de palabra",tabIdx:1,onClose:()=>oe(1)}),children:ae.jsx(B3,{})}),ae.jsx(Wy,{className:k!=null&&k.includes(2)?"":"hidden",contentClassName:"flex flex-col overflow-hidden [&_.p-accordion-content]:p-0 [&_.p-accordion-content]:overflow-hidden",header:()=>ae.jsx(nE,{activeSection:R,label:"Chat",tabIdx:2,onClose:()=>oe(2)}),children:ae.jsx(XN,{})})]})})]})}),ae.jsxs(IR,{closeIcon:ae.jsx("i",{className:"fa-regular fa-xmark fa-lg","aria-hidden":"true"}),fullScreen:!0,header:G,onHide:()=>{D([]),$(!1),q(null),x(null)},pt:{header:{className:"border-b border-neutral-80 font-bold"},content:{className:"p-0"}},visible:F,children:[H===0&&ae.jsx(V3,{users:b}),H===1&&ae.jsx(B3,{}),H===2&&ae.jsx(XN,{})]}),ae.jsx(V9,{className:"w-full max-w-xl"}),ae.jsx(IL,{}),ae.jsx(AY,{}),ae.jsx(wY,{visible:r,onClose:n,transferHostRoleToUser:o,requestingUser:{id:(i==null?void 0:i.userId)??0,name:(i==null?void 0:i.displayName)??""}})]})},wee=({className:e})=>{const{changePluginBreakpoint:t}=Hd(),{sessionStarted:r}=ll(),{ref:n,breakpoint:o}=WJ();return ie.useEffect(()=>{t(o)},[o,t]),ae.jsx("div",{className:Ni("fraku-video-plugin h-full flex flex-col min-h-0",e),ref:n,children:r?ae.jsx(Cee,{}):ae.jsx(JQ,{})})},NF=ie.forwardRef(({onChangeUserRole:e,onInitPreSession:t,onInitSession:r,onCloseSession:n,credentials:o,videoSessionStatus:i,className:a},s)=>{const l=ie.useRef(null);return ie.useImperativeHandle(s,()=>({isReady:()=>{var c;return((c=l.current)==null?void 0:c.isReady())??!1},cleanup:()=>hc(l.current,"VideoPluginProvider").cleanup(),getSessionStarted:()=>hc(l.current,"VideoPluginProvider").getSessionStarted(),joinSession:()=>hc(l.current,"VideoPluginProvider").joinSession(),leaveSession:c=>hc(l.current,"VideoPluginProvider").leaveSession(c)}),[]),ae.jsx(mL,{ref:l,credentials:o,onChangeUserRole:e,onInitVotingPreSession:t,onInitVotingSession:r,onCloseVotingSession:n,videoSessionStatus:i,children:ae.jsx(wee,{className:a})})});NF.displayName="VideoPlugin";exports.VideoPlugin=NF;
|
package/dist/index.js
CHANGED
|
@@ -37894,7 +37894,7 @@ const bL = Vl({
|
|
|
37894
37894
|
};
|
|
37895
37895
|
// request host role action
|
|
37896
37896
|
case "REQUEST-HOST-ROLE":
|
|
37897
|
-
return
|
|
37897
|
+
return {
|
|
37898
37898
|
...e,
|
|
37899
37899
|
requestHostRoleState: QJ(e.requestHostRoleState, t)
|
|
37900
37900
|
};
|
|
@@ -38098,7 +38098,7 @@ const bL = Vl({
|
|
|
38098
38098
|
const G = s.requestHostRoleState.userId;
|
|
38099
38099
|
G && (await m(G, "El anfitrión ha rechazado tu solicitud para convertirte en anfitrión.").catch(
|
|
38100
38100
|
console.error
|
|
38101
|
-
), d(!1), l({ type: "REQUEST-HOST-ROLE", userId:
|
|
38101
|
+
), d(!1), l({ type: "REQUEST-HOST-ROLE", userId: null, timestamp: 0 }));
|
|
38102
38102
|
}, [s.requestHostRoleState.userId, m]), $ = Fn(() => {
|
|
38103
38103
|
const G = s.requestHostRoleState.userId;
|
|
38104
38104
|
return G ? r.getUser(G) ?? null : null;
|
|
@@ -38108,7 +38108,7 @@ const bL = Vl({
|
|
|
38108
38108
|
header: "Cambio a anfitrión",
|
|
38109
38109
|
message: "Has cambiado a anfitrión a este usuario.",
|
|
38110
38110
|
severity: "success"
|
|
38111
|
-
}), l({ type: "REQUEST-HOST-ROLE", userId:
|
|
38111
|
+
}), l({ type: "REQUEST-HOST-ROLE", userId: null, timestamp: 0 });
|
|
38112
38112
|
},
|
|
38113
38113
|
[m, t, a, r]
|
|
38114
38114
|
);
|
|
@@ -44859,16 +44859,18 @@ const l3 = [
|
|
|
44859
44859
|
}, _X = ({ chatMessage: e, currentUserId: t, isHost: r }) => {
|
|
44860
44860
|
const n = e.sender.userId === t, o = e.receiver.userId === t, i = e.receiver.userId === 0;
|
|
44861
44861
|
return !i && !n && !o ? null : /* @__PURE__ */ ie.jsxs(ie.Fragment, { children: [
|
|
44862
|
-
!n && /* @__PURE__ */ ie.jsx(OX, { sender: e.sender, isHost: r }),
|
|
44862
|
+
!n && /* @__PURE__ */ ie.jsx(OX, { sender: e.sender, isHost: r, "data-testid": "sender-info" }),
|
|
44863
44863
|
/* @__PURE__ */ ie.jsxs(
|
|
44864
44864
|
qL,
|
|
44865
44865
|
{
|
|
44866
|
+
"aria-label": n ? "Your message" : `Message from ${e.sender.name}`,
|
|
44866
44867
|
className: ji(
|
|
44867
44868
|
"flex flex-col gap-4 py-8 px-12 w-4/5 rounded-xl",
|
|
44868
44869
|
n ? "ml-auto rounded-tr-none bg-bluetiful-95" : "mr-auto rounded-tl-none bg-neutral-90"
|
|
44869
44870
|
),
|
|
44870
44871
|
unstyled: !0,
|
|
44871
|
-
"
|
|
44872
|
+
"data-testid": "message-card",
|
|
44873
|
+
"data-sender": n ? "self" : e.sender.name,
|
|
44872
44874
|
role: "article",
|
|
44873
44875
|
children: [
|
|
44874
44876
|
/* @__PURE__ */ ie.jsx(
|
|
@@ -44877,11 +44879,20 @@ const l3 = [
|
|
|
44877
44879
|
isCurrentUserSender: n,
|
|
44878
44880
|
isPrivate: !i,
|
|
44879
44881
|
receiverName: e.receiver.name,
|
|
44880
|
-
isPrivateToCurrentUser: !n && o
|
|
44882
|
+
isPrivateToCurrentUser: !n && o,
|
|
44883
|
+
"data-testid": "message-header"
|
|
44884
|
+
}
|
|
44885
|
+
),
|
|
44886
|
+
/* @__PURE__ */ ie.jsx(
|
|
44887
|
+
"span",
|
|
44888
|
+
{
|
|
44889
|
+
"aria-label": "Chat message",
|
|
44890
|
+
className: "flex items-center gap-8 whitespace-pre-line",
|
|
44891
|
+
"data-testid": "message-text",
|
|
44892
|
+
children: e.message
|
|
44881
44893
|
}
|
|
44882
44894
|
),
|
|
44883
|
-
/* @__PURE__ */ ie.jsx("
|
|
44884
|
-
/* @__PURE__ */ ie.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ ie.jsx("span", { className: "text-xs", "aria-label": "Message timestamp", children: VR(e.timestamp) }) })
|
|
44895
|
+
/* @__PURE__ */ ie.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ ie.jsx("span", { "aria-label": "Message timestamp", className: "text-xs", "data-testid": "message-timestamp", children: VR(e.timestamp) }) })
|
|
44885
44896
|
]
|
|
44886
44897
|
},
|
|
44887
44898
|
e.id
|
|
@@ -44912,36 +44923,34 @@ const l3 = [
|
|
|
44912
44923
|
top: d.current.scrollHeight,
|
|
44913
44924
|
behavior: "smooth"
|
|
44914
44925
|
});
|
|
44915
|
-
}, [a]), /* @__PURE__ */ ie.
|
|
44916
|
-
/* @__PURE__ */ ie.
|
|
44917
|
-
|
|
44918
|
-
|
|
44919
|
-
|
|
44920
|
-
|
|
44921
|
-
|
|
44922
|
-
|
|
44923
|
-
|
|
44924
|
-
|
|
44925
|
-
|
|
44926
|
-
|
|
44927
|
-
|
|
44928
|
-
|
|
44929
|
-
|
|
44930
|
-
|
|
44931
|
-
|
|
44932
|
-
|
|
44933
|
-
{
|
|
44934
|
-
|
|
44935
|
-
|
|
44936
|
-
|
|
44937
|
-
|
|
44938
|
-
|
|
44939
|
-
] }),
|
|
44940
|
-
/* @__PURE__ */ ie.jsxs("div", { className: "sticky bottom-0 z-10 bg-white", children: [
|
|
44926
|
+
}, [a]), /* @__PURE__ */ ie.jsxs("div", { className: "h-full w-full flex flex-col min-h-0", children: [
|
|
44927
|
+
/* @__PURE__ */ ie.jsx("div", { className: "p-16 pb-0 shrink-0", children: e("activate-chat") && /* @__PURE__ */ ie.jsxs("label", { className: "flex items-center justify-end gap-8 mb-16", children: [
|
|
44928
|
+
/* @__PURE__ */ ie.jsx(jR, { checked: m, onChange: b }),
|
|
44929
|
+
/* @__PURE__ */ ie.jsx("span", { children: m ? "Desactivar" : "Activar" })
|
|
44930
|
+
] }) }),
|
|
44931
|
+
/* @__PURE__ */ ie.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto py-32", ref: d, children: /* @__PURE__ */ ie.jsxs("div", { className: "flex flex-col gap-8", children: [
|
|
44932
|
+
a.map((v, C) => /* @__PURE__ */ ie.jsx(
|
|
44933
|
+
_X,
|
|
44934
|
+
{
|
|
44935
|
+
chatMessage: v,
|
|
44936
|
+
currentUserId: y,
|
|
44937
|
+
isHost: v.sender.userId === p
|
|
44938
|
+
},
|
|
44939
|
+
v.id ?? C
|
|
44940
|
+
)),
|
|
44941
|
+
!m && /* @__PURE__ */ ie.jsx(
|
|
44942
|
+
Rg,
|
|
44943
|
+
{
|
|
44944
|
+
label: l.chatState.timestamp && Number(l.chatState.timestamp) ? `Chat apagado por el administrador ${VR(Number(l.chatState.timestamp))}` : "Chat apagado por el administrador",
|
|
44945
|
+
className: "self-center mt-16 text-neutral-20 rounded-l font-semibold text-s"
|
|
44946
|
+
}
|
|
44947
|
+
)
|
|
44948
|
+
] }) }),
|
|
44949
|
+
/* @__PURE__ */ ie.jsxs("div", { className: "shrink-0 bg-white z-10", children: [
|
|
44941
44950
|
/* @__PURE__ */ ie.jsx(KL, { className: "my-8" }),
|
|
44942
44951
|
/* @__PURE__ */ ie.jsx(hX, { receivers: s, sendMessage: i, isChatActive: m })
|
|
44943
44952
|
] })
|
|
44944
|
-
] })
|
|
44953
|
+
] });
|
|
44945
44954
|
};
|
|
44946
44955
|
function wI() {
|
|
44947
44956
|
return wI = Object.assign ? Object.assign.bind() : function(e) {
|
|
@@ -55589,7 +55598,7 @@ const xee = ({
|
|
|
55589
55598
|
className: "border-0 gap-8 h-full bg-neutral-90",
|
|
55590
55599
|
gutterSize: k.length === 0 ? 0 : 4,
|
|
55591
55600
|
children: [
|
|
55592
|
-
/* @__PURE__ */ ie.jsx(gI, { size: k.length === 0 ? 100 : 67, minSize: 50, children: /* @__PURE__ */ ie.jsxs("div", { className: "flex flex-col w-full", children: [
|
|
55601
|
+
/* @__PURE__ */ ie.jsx(gI, { size: k.length === 0 ? 100 : 67, minSize: 50, children: /* @__PURE__ */ ie.jsxs("div", { className: "flex flex-col w-full overflow-y-auto", children: [
|
|
55593
55602
|
e("init-session") && m === su.ONLY_PANELIST && /* @__PURE__ */ ie.jsx(
|
|
55594
55603
|
$L,
|
|
55595
55604
|
{
|
|
@@ -55616,69 +55625,78 @@ const xee = ({
|
|
|
55616
55625
|
/* @__PURE__ */ ie.jsx(UX, {}),
|
|
55617
55626
|
/* @__PURE__ */ ie.jsx(FX, {})
|
|
55618
55627
|
] }) }),
|
|
55619
|
-
/* @__PURE__ */ ie.jsx(
|
|
55620
|
-
|
|
55628
|
+
/* @__PURE__ */ ie.jsx(
|
|
55629
|
+
gI,
|
|
55621
55630
|
{
|
|
55622
|
-
|
|
55623
|
-
|
|
55624
|
-
className: "h-full",
|
|
55625
|
-
|
|
55626
|
-
|
|
55627
|
-
|
|
55628
|
-
|
|
55629
|
-
|
|
55630
|
-
|
|
55631
|
-
|
|
55632
|
-
|
|
55633
|
-
|
|
55634
|
-
|
|
55631
|
+
size: 33,
|
|
55632
|
+
minSize: 25,
|
|
55633
|
+
className: A ? void 0 : "h-full min-h-0 flex flex-col overflow-hidden",
|
|
55634
|
+
children: /* @__PURE__ */ ie.jsxs(
|
|
55635
|
+
HL,
|
|
55636
|
+
{
|
|
55637
|
+
activeIndex: R,
|
|
55638
|
+
onTabChange: (Pe) => ce(typeof Pe.index == "number" ? Pe.index : null),
|
|
55639
|
+
className: "flex flex-col min-h-0 [&_.p-accordion-tab.p-accordion-tab-active]:flex [&_.p-accordion-tab.p-accordion-tab-active]:flex-col [&_.p-accordion-tab.p-accordion-tab-active]:min-h-0",
|
|
55640
|
+
expandIcon: " ",
|
|
55641
|
+
collapseIcon: " ",
|
|
55642
|
+
hidden: k.length === 0,
|
|
55643
|
+
children: [
|
|
55644
|
+
/* @__PURE__ */ ie.jsx(
|
|
55645
|
+
Zy,
|
|
55635
55646
|
{
|
|
55636
|
-
|
|
55637
|
-
|
|
55638
|
-
|
|
55639
|
-
|
|
55647
|
+
className: k != null && k.includes(0) ? "" : "hidden",
|
|
55648
|
+
contentClassName: "flex flex-col overflow-hidden [&_.p-accordion-content]:overflow-hidden",
|
|
55649
|
+
header: () => /* @__PURE__ */ ie.jsx(
|
|
55650
|
+
fE,
|
|
55651
|
+
{
|
|
55652
|
+
activeSection: R,
|
|
55653
|
+
label: "Asistentes",
|
|
55654
|
+
tabIdx: 0,
|
|
55655
|
+
onClose: () => oe(0)
|
|
55656
|
+
}
|
|
55657
|
+
),
|
|
55658
|
+
children: /* @__PURE__ */ ie.jsx(Q3, { users: b })
|
|
55640
55659
|
}
|
|
55641
55660
|
),
|
|
55642
|
-
|
|
55643
|
-
|
|
55644
|
-
),
|
|
55645
|
-
/* @__PURE__ */ ie.jsx(
|
|
55646
|
-
Zy,
|
|
55647
|
-
{
|
|
55648
|
-
className: k != null && k.includes(1) ? "" : "hidden",
|
|
55649
|
-
contentClassName: "[&_.p-accordion-content]:p-0",
|
|
55650
|
-
header: () => /* @__PURE__ */ ie.jsx(
|
|
55651
|
-
fE,
|
|
55661
|
+
/* @__PURE__ */ ie.jsx(
|
|
55662
|
+
Zy,
|
|
55652
55663
|
{
|
|
55653
|
-
|
|
55654
|
-
|
|
55655
|
-
|
|
55656
|
-
|
|
55664
|
+
className: k != null && k.includes(1) ? "" : "hidden",
|
|
55665
|
+
contentClassName: "flex flex-col overflow-hidden [&_.p-accordion-content]:p-0 [&_.p-accordion-content]:overflow-hidden",
|
|
55666
|
+
header: () => /* @__PURE__ */ ie.jsx(
|
|
55667
|
+
fE,
|
|
55668
|
+
{
|
|
55669
|
+
activeSection: R,
|
|
55670
|
+
label: "Turno de palabra",
|
|
55671
|
+
tabIdx: 1,
|
|
55672
|
+
onClose: () => oe(1)
|
|
55673
|
+
}
|
|
55674
|
+
),
|
|
55675
|
+
children: /* @__PURE__ */ ie.jsx(Y3, {})
|
|
55657
55676
|
}
|
|
55658
55677
|
),
|
|
55659
|
-
|
|
55660
|
-
|
|
55661
|
-
),
|
|
55662
|
-
/* @__PURE__ */ ie.jsx(
|
|
55663
|
-
Zy,
|
|
55664
|
-
{
|
|
55665
|
-
className: k != null && k.includes(2) ? "" : "hidden",
|
|
55666
|
-
contentClassName: "[&_.p-accordion-content]:p-0",
|
|
55667
|
-
header: () => /* @__PURE__ */ ie.jsx(
|
|
55668
|
-
fE,
|
|
55678
|
+
/* @__PURE__ */ ie.jsx(
|
|
55679
|
+
Zy,
|
|
55669
55680
|
{
|
|
55670
|
-
|
|
55671
|
-
|
|
55672
|
-
|
|
55673
|
-
|
|
55681
|
+
className: k != null && k.includes(2) ? "" : "hidden",
|
|
55682
|
+
contentClassName: "flex flex-col overflow-hidden [&_.p-accordion-content]:p-0 [&_.p-accordion-content]:overflow-hidden",
|
|
55683
|
+
header: () => /* @__PURE__ */ ie.jsx(
|
|
55684
|
+
fE,
|
|
55685
|
+
{
|
|
55686
|
+
activeSection: R,
|
|
55687
|
+
label: "Chat",
|
|
55688
|
+
tabIdx: 2,
|
|
55689
|
+
onClose: () => oe(2)
|
|
55690
|
+
}
|
|
55691
|
+
),
|
|
55692
|
+
children: /* @__PURE__ */ ie.jsx(u3, {})
|
|
55674
55693
|
}
|
|
55675
|
-
)
|
|
55676
|
-
|
|
55677
|
-
|
|
55678
|
-
|
|
55679
|
-
]
|
|
55694
|
+
)
|
|
55695
|
+
]
|
|
55696
|
+
}
|
|
55697
|
+
)
|
|
55680
55698
|
}
|
|
55681
|
-
)
|
|
55699
|
+
)
|
|
55682
55700
|
]
|
|
55683
55701
|
}
|
|
55684
55702
|
) }),
|
|
@@ -55720,7 +55738,7 @@ const xee = ({
|
|
|
55720
55738
|
const { changePluginBreakpoint: t } = qd(), { sessionStarted: r } = hl(), { ref: n, breakpoint: o } = iQ();
|
|
55721
55739
|
return po(() => {
|
|
55722
55740
|
t(o);
|
|
55723
|
-
}, [o, t]), /* @__PURE__ */ ie.jsx("div", { className: ji("fraku-video-plugin", e), ref: n, children: r ? /* @__PURE__ */ ie.jsx(Fee, {}) : /* @__PURE__ */ ie.jsx(cY, {}) });
|
|
55741
|
+
}, [o, t]), /* @__PURE__ */ ie.jsx("div", { className: ji("fraku-video-plugin h-full flex flex-col min-h-0", e), ref: n, children: r ? /* @__PURE__ */ ie.jsx(Fee, {}) : /* @__PURE__ */ ie.jsx(cY, {}) });
|
|
55724
55742
|
}, Vee = A0(
|
|
55725
55743
|
({ onChangeUserRole: e, onInitPreSession: t, onInitSession: r, onCloseSession: n, credentials: o, videoSessionStatus: i, className: a }, s) => {
|
|
55726
55744
|
const l = Gn(null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|