1import{v as u,j as S}from"./index-DW3gB_bJ.js";function l(e,...n){typeof e=="function"&&e(...n)}function b(e,n=null){return typeof e!="string"?n:e.trim()||n}function h(e={},n=!1){if(typeof(e==null?void 0:e.audioEnabled)=="boolean")return e.audioEnabled;const i=b(e==null?void 0:e.micState,"");return i==="on"||i==="playable"?!0:i==="off"||i==="blocked"?!1:n}function x(e={},n=!1){if(typeof(e==null?void 0:e.videoEnabled)=="boolean")return e.videoEnabled;const i=b(e==null?void 0:e.cameraState,"");return["playable","loading","interrupted"].includes(i)?!0:["off","blocked"].includes(i)?!1:n}function E(e={}){return Array.isArray(e==null?void 0:e.fixtureParticipants)&&e.fixtureParticipants.length>0?e.fixtureParticipants:!(e!=null&&e.participantMetadata)&&!(e!=null&&e.userName)?[]:[{sessionId:"daily-local-fixture",isLocal:!0,userName:e.userName||"Local participant",metadata:e.participantMetadata||null,audioEnabled:e.enableAudio!==!1,videoEnabled:e.enableVideo!==!1,screenSharing:e.enableScreensharing===!0}]}function v({rtcProps:e={},callbacks:n={},fallback:i=null,onProviderError:m,renderless:y=!1,children:g=null}){const a=u.useMemo(()=>E(e),[e==null?void 0:e.enableAudio,e==null?void 0:e.enableScreensharing,e==null?void 0:e.enableVideo,e==null?void 0:e.fixtureParticipants,e==null?void 0:e.participantMetadata,e==null?void 0:e.userName]);return u.useEffect(()=>{if(!(e!=null&&e.roomUrl)){l(m,new Error("Missing Daily.co room url"));return}l(n["connection-state-change"],(e==null?void 0:e.initialSessionState)||"joined","idle",null)},[n,m,e==null?void 0:e.initialSessionState,e==null?void 0:e.roomUrl]),u.useEffect(()=>{l(n["participants-updated"],{participants:a})},[n,a]),u.useEffect(()=>{const f=a.find(d=>(d==null?void 0:d.isLocal)===!0)||null;f&&(l(n.onAudioStateChange,h(f,(e==null?void 0:e.enableAudio)!==!1)),l(n.onCameraStateChange,x(f,(e==null?void 0:e.enableVideo)!==!1)))},[n,a,e==null?void 0:e.enableAudio,e==null?void 0:e.enableVideo]),y?g:i||S.jsx("div",{"data-daily-rtc-compatibility-shell":"true",style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(180deg, #0f172a 0%, #020617 100%)",color:"#e2e8f0",fontSize:"14px",fontWeight:600},children:"Daily.co scaffold active"})}export{v as DailyRtcCompatibilityShell,v as default}; 2//# sourceMappingURL=DailyRtcCompatibilityShell-DGxpPEcX.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.