@camstack/addon-pipeline-orchestrator 1.2.287 → 1.2.288

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.
@@ -1,52 +0,0 @@
1
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),c=r(d[3]);function u(){const u=(0,n.c)(6),{id:l,at:s}=(0,t.useLocalSearchParams)(),b=Number(l),f=void 0!==s?Number(s):Number.NaN;if(!Number.isFinite(b))return null;let S,_,N;return u[0]===Symbol.for("react.memo_cache_sentinel")?(S=(0,c.jsx)(t.Stack.Screen,{options:{gestureEnabled:!1,fullScreenGestureEnabled:!1,presentation:"containedTransparentModal",animation:"slide_from_right",contentStyle:{backgroundColor:"transparent"}}}),u[0]=S):S=u[0],u[1]!==f?(_=Number.isFinite(f)&&f>0?f:void 0,u[1]=f,u[2]=_):_=u[2],u[3]!==b||u[4]!==_?(N=(0,c.jsxs)(c.Fragment,{children:[S,(0,c.jsx)(o.CameraDetailScreen,{deviceId:b,initialSeekMs:_})]}),u[3]=b,u[4]=_,u[5]=N):N=u[5],N}},757,[787,788,1003,10]);
2
- __d(function(e,t,a,o,i,n,l){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),t.default=e,t}Object.defineProperty(n,'__esModule',{value:!0}),Object.defineProperty(n,"WALL_STAGE_TEST_ID",{enumerable:!0,get:function(){return gt}}),n.CameraDetailScreen=function({deviceId:e,initialSeekMs:t}){const{t:a}=(0,O.useTranslation)(),o=(0,H.useConfirm)(),i=(0,H.useNotice)(),n=(0,x.useRouter)(),{colors:l,mode:r}=(0,Z.useTheme)(),s=(0,T.useSafeAreaInsets)(),{viewport:c,readout:C}=(0,k.useViewportReadout)(),{width:Me,height:ze}=c,{name:xt,features:Et,online:Dt,disabled:Pt,known:Wt}=pt(e),{settings:Bt,hydrated:Lt,setStreamDefault:jt}=(0,Ye.useSettings)(),At=Bt.stream.clipLoop,Rt=(0,d.useCallback)(()=>{jt('clipLoop',!At)},[jt,At]),Mt=(0,nt.useCanActuate)(),zt=Mt&&Et.includes(Ge.FEATURE.ptz),Gt=Et.includes(Ge.FEATURE.battery),{data:Ft=[]}=(0,ee.useDeviceCapNames)(e,!0),Jt=Ft.includes('network-link'),Nt=Mt&&Ft.includes('navigation'),{data:Yt=null}=(0,Ne.useBattery)(e,Gt),Vt=Gt&&!0===Yt?.sleeping,Ut=Et.includes(Ge.FEATURE.twoWayAudio),Zt=Et.includes(Ge.FEATURE.doorbell),$t=(0,et.useCameraPrefsStore)(t=>t.prefs.byId[e]?.quality),qt=(0,et.useCameraPrefsStore)(e=>e.setCameraQuality),Kt=(0,et.useCameraPrefsStore)(t=>t.prefs.byId[e]?.audioOn),Qt=(0,et.useCameraPrefsStore)(e=>e.hydrated),Xt=(0,et.useCameraPrefsStore)(e=>e.setCameraAudioOn),[ea,ta]=(0,d.useState)($t??'auto'),aa=(0,d.useRef)(!1);(0,d.useEffect)(()=>{Qt&&!aa.current&&(aa.current=!0,void 0!==$t&&ta($t))},[Qt,$t]);const oa=(0,rt.useRouteChannel)(),ia=(0,d.useMemo)(()=>(0,lt.qualityToTargetForRoute)(ea,oa),[ea,oa]),na=(0,d.useCallback)(t=>{ta(t),qt(e,t)},[e,qt]);(0,Fe.useEventHaptics)([e],!0);const{overlay:la,setOverlay:ra,highlight:sa,setHighlight:ca}=(0,it.useCameraViewOptions)(e),ua=(0,qe.useDetections)(e,sa.detection&&!0),da=sa.detection&&ua.boxes.some(e=>0===sa.detectionClasses.length||sa.detectionClasses.includes(e.label)),ha=(0,Xe.useHeld)(da,1e3*sa.detectionHoldSec),ma=(0,Ke.useAudioActive)(e,sa.audio,sa.audioDb),pa=(0,Xe.useHeld)('off'!==sa.audio&&ma,1e3*Qe.AUDIO_HIGHLIGHT_HOLD_SEC),[ga,fa]=(0,d.useState)(0),va=`${sa.audio}:${sa.audioDb}`,Sa=(0,d.useRef)(!0);(0,d.useEffect)(()=>{if(Sa.current)return void(Sa.current=!1);if('off'===sa.audio)return void fa(0);const e=Date.now()+1e3*Qe.AUDIO_HIGHLIGHT_HOLD_SEC;fa(e);const t=setTimeout(()=>fa(0),1e3*Qe.AUDIO_HIGHLIGHT_HOLD_SEC);return()=>clearTimeout(t)},[va,sa.audio]);const wa=ga>Date.now(),ba=(0,d.useMemo)(()=>Object.assign({enabled:la.highlightBorder},sa,{audioHoldSec:Qe.AUDIO_HIGHLIGHT_HOLD_SEC,appearance:Bt.highlight,motionHoldSec:Bt.grid.motionHoldSec}),[la.highlightBorder,sa,Bt.highlight,Bt.grid.motionHoldSec]),[_a,ya]=(0,d.useState)(null),ka={operatorChoice:_a,cameraKnown:Wt,batteryPowered:Gt},Ca=(0,re.resolveLivePaused)(ka),Ha=(0,d.useRef)(Ca);Ha.current=Ca;const[Oa,xa]=(0,d.useState)({state:'connecting'}),Ta=(0,d.useRef)(null),Ia=(0,d.useRef)(Oa.state);Ia.current=Oa.state;const Ea=()=>{ya(e=>!(0,re.resolveLivePaused)({operatorChoice:e,cameraKnown:Wt,batteryPowered:Gt}))},[Da,Pa]=(0,d.useState)(1),[Wa,Ba]=(0,d.useState)(!1),La=(0,d.useRef)(null),[ja,Aa]=(0,d.useState)(!1),[Ra,Ma]=(0,d.useState)(null),[za,Ga]=(0,d.useState)(0),Fa=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(!ja||null===Ra)return void Ga(0);const e=()=>Ga(Math.floor((Date.now()-Ra)/1e3));e();const t=setInterval(e,250);return()=>clearInterval(t)},[ja,Ra]);const[Ja,Na]=(0,d.useState)(0),Ya=(0,d.useRef)(t??null),[Va,Ua]=(0,d.useState)(t),[Za,$a]=(0,d.useState)(void 0),qa=(0,d.useMemo)(()=>({scrubStart:e=>{La.current?.scrubStart(e)},scrubTo:(e,t)=>La.current?.scrubTo(e,t?.mode,t?.velocityPxPerS),scrubCommit:(e,t)=>La.current?.scrubCommit(e,t),seek:e=>La.current?.seek(e),goLive:()=>{if(!(0,re.shouldDialLiveOnGoLive)(Ha.current))return Ya.current=null,Ua(void 0),Ba(!1),void Pa(1);La.current?.goLive(),Na(e=>e+1),Ba(!1),Pa(1),Ya.current=null,Ua(void 0)}}),[]),Ka=(0,A.usePlaybackMachine)(qa),Qa=(0,d.useMemo)(()=>({playClip:(e,t,a,o)=>{const i=La.current,n='connecting'!==Ia.current&&'error'!==Ia.current;return(0,p.noteClipOpenStep)('port',{clipId:e,provider:t,offsetMs:a,profile:o??null,hasPlayer:null!==i,canHear:n}),null!==i&&n?(i.playClip(e,t,a,o),!0):($a(Object.assign({clipId:e,provider:t},void 0===o?{}:{profile:o})),!1)},noteAsserted:e=>{Ta.current=e},scrubStart:e=>{La.current?.scrubStart(e)},scrubTo:e=>{La.current?.scrubTo(e)},scrubCommit:(e,t)=>{La.current?.scrubCommit(e,t)}}),[]),Xa=(0,h.useClipStage)(Qa,At),[eo,to]=(0,d.useState)(ft),ao=(0,d.useCallback)(e=>{to(t=>(0,v.adoptClipList)(t,e))},[]);(0,d.useEffect)(()=>{const e=[3e3,1e4].map(e=>setTimeout(()=>La.current?.timelineWarm(Date.now()-3e4),e));return()=>{for(const t of e)clearTimeout(t)}},[]);const oo='live'!==Ka.state.mode,io=(0,d.useCallback)(()=>{$a(void 0),Xa.close()},[Xa]),no=(0,d.useCallback)(()=>{io(),Ka.goLive()},[io,Ka]),lo=(0,d.useRef)(!1),ro='clip'===Xa.stage.kind?Xa.stage.clipId:null;(0,d.useEffect)(()=>{const e=null!==La.current;Ta.current=(0,u.assertionAfterPlayerChange)(Ta.current,e,Oa.state),(0,u.shouldAssertClip)({heldClipId:ro,playerPresent:e,playerState:Oa.state,assertedClipId:Ta.current})&&null!==ro&&((0,p.noteClipOpenStep)('assert',{clipId:ro,playerState:Oa.state}),Ta.current=ro,Xa.replay())},[ro,Oa.state,Xa]);const so=(0,m.clipStartOnFrame)(eo,Xa.stage),co=(0,re.shouldMountLiveView)({liveHeld:Ca,mode:Ka.state.mode,playhead:Ka.state.playhead,recordedSeekMs:Va??null,keepRecordedSession:lo.current,initialClipId:ro});lo.current=co;const uo=e=>{Ca&&null==La.current&&(Ya.current=e,Ua(e))},ho=(0,d.useCallback)((e,t)=>{uo(e),Ka.seek(e,t)},[Ca,Ka]),mo=(0,d.useCallback)((e,t)=>{uo(e),Ka.commitScrub(e,t)},[Ca,Ka]),po=async()=>{if(!Fa.current)return null;Fa.current=!1,Aa(!1),Ma(null);try{return await(La.current?.stopLiveCapture())??null}catch{return i({title:a('v2.theater.recordLive'),message:a('v2.theater.recordFailed')}),null}},go=async t=>{const a=(0,q.captureFileExtension)(t.mime),o=`${W.cacheDirectory}live-${e}-${Date.now()}.${a}`;await W.writeAsStringAsync(o,t.base64,{encoding:W.EncodingType.Base64}),await B.isAvailableAsync()&&await B.shareAsync(o,{mimeType:t.mime||('webm'===a?'video/webm':'video/mp4'),UTI:'webm'===a?'public.movie':'public.mpeg-4'})},fo=e=>{(async()=>{await o({title:a('v2.theater.keepClipTitle'),confirmLabel:a('v2.theater.shareClip'),cancelLabel:a('v2.theater.discardClip')})&&await go(e)})()},vo={capturing:ja,elapsedLabel:(0,K.formatSelectionDuration)(1e3*za),onStart:()=>{Fa.current=!0,Aa(!0),Ma(Date.now()),La.current?.startLiveCapture()},onKeep:()=>{(async()=>{const e=await po();e&&await go(e)})()},onDiscard:()=>{po()}},So=(0,te.useExportSelection)(e,Ka),wo='clip'===Xa.stage.kind;(0,d.useEffect)(()=>{(0,f.shouldEndLiveCapture)({mode:Ka.state.mode,clipHeld:wo})&&Fa.current&&(async()=>{const e=await po();e&&fo(e)})()},[Ka.state.mode,wo]);const bo=(0,d.useCallback)(()=>{const e=!Wa;Ba(e),La.current?.setRate(e?0:Da)},[Wa,Da]),_o=(0,d.useCallback)(e=>{Pa(e),Wa||La.current?.setRate(e)},[Wa]),yo=(0,d.useCallback)(e=>{Wa||Ba(!0),La.current?.stepFrame(e)},[Wa]),ko=(0,d.useCallback)(e=>{const t=Ya.current;null!==t&&(Ya.current=null,Ua(void 0),'adopt'===e?Ka.adoptSeek(t,'cluster'):Ka.seek(t,'cluster'))},[Ka]),[Co,Ho]=(0,d.useState)(null),Oo=Xa.reportPlayerState,xo=(0,d.useCallback)(e=>{Ka.reportEmbedState(e),Oo(e),'paused'===e?Ba(!0):'playing'===e&&Ba(!1),'gap'!==e&&'error'!==e||(Ya.current=null,Ua(void 0)),ko((0,M.resolveInitialSeekAction)(e))},[Ka,ko,Oo]),[To,Io]=(0,d.useState)(!0),Eo=(0,d.useRef)(!1);(0,d.useEffect)(()=>{Lt&&Qt&&!Eo.current&&(Eo.current=!0,Io((0,tt.opensMuted)(Bt.stream.audioOnOpen,Kt)))},[Lt,Qt,Bt.stream.audioOnOpen,Kt]);const Do=(0,at.hasLayer)(la,'motion'),Po=(0,at.hasLayer)(la,'objects'),Wo=(0,at.hasLayer)(la,'discarded'),Bo=(0,at.hasLayer)(la,'stationary'),Lo=la.stats,jo=la.audioMeter,[Ao,Ro]=(0,d.useState)(!1),[Mo,zo]=(0,d.useState)(!0),[Go,Fo]=(0,d.useState)(!1),Jo=(0,d.useRef)(null),No=(0,d.useCallback)(()=>{Fo(!0),Jo.current?.openControls()},[]),[Yo,Vo]=(0,d.useState)(null),[Uo,Zo]=(0,d.useState)(!1),$o=(0,d.useCallback)(()=>Zo(!0),[]),qo=(0,d.useCallback)(()=>Vo(null),[]),Ko=(0,d.useCallback)(e=>{Vo(e),Zo(!1)},[]),Qo=(0,d.useCallback)(()=>Zo(!1),[]),Xo=(0,d.useRef)(null),ei=(0,d.useCallback)(()=>{(0,w.scrubFramePainted)(e)},[e]),ti=Xa.reportPosition,ai=(0,d.useCallback)(t=>{if(ti(t))return;ko('adopt'),Ka.reportPosition(t);const a=Date.now(),o=(0,R.evaluateDivergence)({indicatorEpoch:(0,A.selectActiveEpoch)(Ka.state),playerEpoch:t,nowMs:a,lastReportAt:Xo.current});null!==o&&(Xo.current=a,z.log.warn('theater:divergence','indicator and stream disagree',{deviceId:e,deltaMs:o.deltaMs,indicatorAhead:o.indicatorAhead,indicatorEpoch:(0,A.selectActiveEpoch)(Ka.state),playerEpoch:t,mode:Ka.state.mode,seekAnchor:Ka.state.seekAnchor,seekLanded:Ka.state.seekLanded}))},[Ka,e,ko,ti]),oi=(0,d.useCallback)(()=>{const t=!To;Io(t),Xt(e,!t)},[To,e,Xt]),ii=(0,d.useCallback)(t=>{if(t===e)return;const a=(0,_e.viewedInstant)((0,A.selectActiveEpoch)(Ka.state));z.log.info('theater','switch camera',{tags:{deviceId:t},from:e,carrying:'at'===a.kind?a.atMs:'live'}),n.replace(`/camera/${t}${(0,_e.atParam)(a)}`)},[n,e,Ka.state]),[ni,li]=(0,d.useState)(null),ri=(0,We.useLastCameraStore)(e=>e.forget),si=(0,d.useCallback)((e,t)=>{li({kind:e,deviceId:t})},[]),ci=(0,d.useCallback)(e=>{(0,ye.openOnDemandPlayer)({deviceId:e,atMs:(0,be.resolveReelInstant)((0,A.selectActiveEpoch)(Ka.state),Date.now())})},[Ka.state]),ui=(0,d.useCallback)(()=>li(null),[]),{data:di}=(0,Ge.useCameras)(),hi=(0,d.useMemo)(()=>(0,Be.resolveCellPanel)(ni,(di??[]).map(e=>e.id)),[ni,di]),mi=(di??[]).find(e=>e.id===hi?.deviceId),pi=mi?.name??'',gi=Mt&&(mi?.features??[]).includes(Ge.FEATURE.ptz),fi=(0,d.useCallback)(e=>ra((0,at.patchOverlay)(la,{audioMeter:e})),[ra,la]),vi=(0,d.useCallback)(()=>zo(e=>!e),[]),Si=(0,d.useCallback)(()=>zo(!1),[]),wi=(0,d.useCallback)(()=>{xa({state:'connecting'}),no()},[no]),bi=(0,d.useCallback)(()=>La.current?.startPip()??Promise.resolve('unavailable'),[]),_i=(0,G.useSystemPip)({mode:Ka.state.mode,playerState:Oa.state,goLive:wi,startPip:bi}),yi=_i.request,[ki,Ci]=(0,d.useState)(e);if(ki!==e){Ci(e);const t=(0,_e.viewedInstant)((0,A.selectActiveEpoch)(Ka.state)),a='at'===t.kind?t.atMs:void 0;Ka.swapCamera(a??null),Ua(a),Pa(1),Ba(!1),ya(null),xa({state:'connecting'}),Ho(null),Io((0,tt.opensMuted)(Bt.stream.audioOnOpen,Kt)),ta($t??'auto'),Vo(null),Zo(!1),li(null),fa(0),Aa(!1),Ma(null),Ga(0),z.log.info('theater','camera swapped in place',{tags:{deviceId:e},from:ki,carrying:a??'live'})}(0,d.useEffect)(()=>{Ya.current=Va??null,lo.current=!1,Ha.current=!1,Eo.current=!1,aa.current=!1,Sa.current=!0,Fa.current&&(z.log.warn('live:lifecycle','live capture dropped: the camera was swapped',{tags:{deviceId:e}}),Fa.current=!1),_i.abandon()},[e]),(0,d.useEffect)(()=>{(0,ye.focusOnDemandCamera)(e)},[e]);const Hi=(0,d.useCallback)(()=>La.current?.getStats()??Promise.resolve(null),[]),{talking:Oi,error:xi,toggle:Ti}=(0,ae.useIntercom)(e);(0,d.useEffect)(()=>{xi&&i({title:a('v2.cameraDetail.talk'),message:a('v2.cameraDetail.talkFailed')})},[xi,a,i]);const Ii=(0,Re.useScreenMinSide)(),{showSidebar:Ei,compact:Di}=(0,Re.useSidebarLayout)(),Pi=(0,x.usePathname)(),Wi={width:Me,height:ze,screenMinSide:Ii,isWeb:!0,fullscreen:Ao},Bi=(0,je.resolveDetailLayoutMode)(Wi),Li='wide'===Bi,ji=(0,Ee.useWorkspaceStore)(e=>e.setMembers),Ai=(0,Ee.useWorkspaceStore)(e=>e.workspace.members),Ri=(0,d.useMemo)(()=>(0,Oe.workspaceOnScreenCameras)(Ai,e),[Ai,e]),Mi=(0,Oe.shouldShowWorkspaceGrid)(Bi,Ai,e);(0,d.useEffect)(()=>{Mi&&Fa.current&&(Fa.current=!1,Aa(!1),Ma(null),z.log.warn('live:lifecycle','live capture dropped: the picture became a wall',{deviceId:e}))},[Mi,e]);const zi=(0,Ie.cameraSelectionModeFor)(Bi),Gi=(0,d.useCallback)(e=>{const t=(0,Ie.resolveCameraSelection)(zi,e);switch(t.kind){case'buildView':return void ji(t.members);case'goTo':return void ii(t.deviceId);case'openGrid':return void n.push(`/grid/adhoc?devices=${(0,fe.serializeAdhocDeviceIds)(t.deviceIds)}`);case'none':return}},[zi,ii,n,ji]),Fi=Me>ze,Ji='fill'===Bi;!Ji&&Go&&Fo(!1);const Ni=(0,je.toolbarPlacementFor)(Bi),Yi=(0,F.shouldShowOverlayPlayPause)({fill:Ji,landscapeDrawerOpen:Go}),[Vi,Ui]=(0,d.useState)(null),Zi=(0,d.useCallback)(e=>{const t=e.nativeEvent.layout.width;(0,Le.isUsableMeasurement)(t)&&Ui(e=>null!==e&&e.width===t&&e.windowWidth===Me?e:{width:t,windowWidth:Me})},[Me]),$i=(0,d.useMemo)(()=>({visible:Ei&&!Ji,compact:Di,insetLeft:s.left}),[Ei,Ji,Di,s.left]),qi=(0,Le.resolveContainerWidth)({measured:Vi,windowWidth:Me,sideNav:$i}),Ki=(0,De.shouldShowStreamNavBar)({enabled:Bt.stream.navBarOnStream,showSidebar:Ei,fill:Ji}),Qi=(0,U.bottomNavFootprint)({visible:Ki,insetBottom:s.bottom}),Xi=(0,De.streamColumnHeight)({windowHeight:ze,navBarFootprint:Qi}),en=(0,d.useMemo)(()=>(0,Se.computeWideDetailSizes)({containerWidth:qi,viewportHeight:Xi}),[qi,Xi]),tn=(0,Ae.buildDetailLayoutTrace)({deviceId:e,layout:Wi,viewport:C,sideNav:$i,measured:Vi,containerWidth:qi,railWidth:en.railWidth,mode:Bi}),an=(0,Ae.detailLayoutTraceSignature)(tn),on=(0,d.useRef)(null);(0,d.useEffect)(()=>{on.current!==an&&(on.current=an,z.log.info(Ae.DETAIL_LAYOUT_SCOPE,'layout decision',tn))},[an,tn]),(0,d.useEffect)(()=>{z.log.debug('theater','detail geometry',{deviceId:e,winWidth:Me,winHeight:ze,screenMinSide:Ii??-1,isLandscape:Fi,layoutMode:Bi,toolbarPlacement:Ni,fullscreen:Ao,containerWidth:qi,measuredWidth:Vi?.width??-1,railWidth:en.railWidth,defaultHeight:Math.round(9*Me/16)})},[e,Me,ze,Ii,Fi,Bi,Ni,Ao,qi,Vi,en.railWidth]),(0,Ce.shouldShowCameraShelf)(Bi)||Mi||null===ni||li(null);const nn=(0,je.isUnexpectedPortraitStack)(Wi,Bi);(0,d.useEffect)(()=>{if(!nn)return;let t=!1;return(async()=>{t||z.log.warn('theater','tablet resolved to the portrait stack',{deviceId:e,winWidth:Me,winHeight:ze,viewportSource:C.source,dimWidth:C.dimWidth,dimHeight:C.dimHeight,frameWidth:C.frameWidth,frameHeight:C.frameHeight,screenMinSide:Ii??-1,isWeb:!0,orientationLock:-1,orientation:-1})})(),()=>{t=!0}},[nn,e,Me,ze,Ii,C]);const ln=(0,d.useMemo)(()=>9*Me/16,[Me]),rn=(0,d.useMemo)(()=>ze*ht,[ze]),sn=(0,He.resolvePortraitColumnSplit)({columnHeight:Xi,topInset:s.top,pictureHeight:ln,wallShowing:Mi}),cn='stack'===Bi?Math.round(sn.timelineHeight):-1,un=(0,d.useRef)(null);(0,d.useEffect)(()=>{const t=un.current;un.current={wall:Mi,mode:Bi,devices:Ri};const a=ut(t,Mi,Bi);if(null===a)return;const o=t?.devices??[];z.log.info('live:lifecycle','theater surface changed',{deviceId:e,direction:a,opening:null===t,before:o,beforeCount:o.length,after:Ri,afterCount:Ri.length,layoutMode:Bi,beforeLayoutMode:t?.mode??'none',portraitTimelineHeight:cn})},[Mi,Ri,e,Bi,cn]);const dn=Bt.stream.pinchExpandsHeight,hn=en.streamWidth,mn=en.streamHeight,pn=(0,d.useCallback)((function({_worklet_252802605455_init_data:e,fill:t,winHeight:a,isWideDetail:o,wideStreamH:i,pinchExpandsHeight:n,defaultHeight:l,growBoxHeight:r,maxHeight:s,HEIGHT_GROW_SCALE:c}){const u=function(e){return t?a:o?i:n?r(e,{rest:l,max:s,growScale:c}):l};return u.__closure={fill:t,winHeight:a,isWideDetail:o,wideStreamH:i,pinchExpandsHeight:n,defaultHeight:l,growBoxHeight:r,maxHeight:s,HEIGHT_GROW_SCALE:c},u.__workletHash=252802605455,u.__initData=e,u})({_worklet_252802605455_init_data:vt,fill:Ji,winHeight:ze,isWideDetail:Li,wideStreamH:mn,pinchExpandsHeight:dn,defaultHeight:ln,growBoxHeight:X.growBoxHeight,maxHeight:rn,HEIGHT_GROW_SCALE:mt}),[Ji,ze,Li,mn,dn,ln,rn]),gn=Bt.advanced.debugMode,fn=(0,Q.useStreamZoom)({fit:Ji||Li?'contain':'cover',viewport:{width:Li?hn:Me,heightFor:pn},trace:gn}),vn=fn.snapZoom;(0,d.useEffect)(()=>{vn()},[Me,ze,vn]);const Sn=fn.resetZoom;(0,d.useEffect)(()=>{Sn()},[Ji,Sn]),(0,d.useEffect)(()=>{vn()},[e,vn]);const wn=(0,d.useCallback)(()=>{(0,N.backToCameras)(n,ri)},[n,ri]),bn=(0,d.useCallback)(()=>{(0,ye.openOnDemandPlayer)({deviceId:e,atMs:(0,be.resolveReelInstant)((0,A.selectActiveEpoch)(Ka.state),Date.now())}),z.log.info('live:ondemand','swipe \u2192 on-demand overlay',{deviceId:e}),(0,N.backToCameras)(n,ri)},[e,Ka.state,n,ri]),_n=(0,d.useMemo)(()=>{const e=E.Gesture.Tap().numberOfTaps(1).onEnd((function({_worklet_11665093317600_init_data:e,runOnJS:t,onToggleControls:a}){const o=function(){t(a)()};return o.__closure={runOnJS:t,onToggleControls:a},o.__workletHash=0xa9bfdbe53e0,o.__initData=e,o})({_worklet_11665093317600_init_data:St,runOnJS:D.runOnJS,onToggleControls:vi})),t=E.Gesture.Tap().numberOfTaps(2).onEnd((function({_worklet_6513449305402_init_data:e,zoom:t}){const a=function(e){t.stepZoomAt(e.x,e.y)};return a.__closure={zoom:t},a.__workletHash=6513449305402,a.__initData=e,a})({_worklet_6513449305402_init_data:wt,zoom:fn})),a=E.Gesture.Exclusive(t,e),o=E.Gesture.Pan().minPointers(J.BACK_SWIPE_POINTERS).maxPointers(J.BACK_SWIPE_POINTERS).activeOffsetY(40).failOffsetX([-32,32]).onEnd((function({_worklet_10851337650826_init_data:e,shouldGoBackOnSwipe:t,zoom:a,runOnJS:o,onSwipeBack:i}){const n=function(e){t({translationY:e.translationY,velocityY:e.velocityY,zoomScale:a.scale.value})&&o(i)()};return n.__closure={shouldGoBackOnSwipe:t,zoom:a,runOnJS:o,onSwipeBack:i},n.__workletHash=0x9de8620428a,n.__initData=e,n})({_worklet_10851337650826_init_data:bt,shouldGoBackOnSwipe:J.shouldGoBackOnSwipe,zoom:fn,runOnJS:D.runOnJS,onSwipeBack:wn})),i=E.Gesture.Pan().minPointers(J.OVERLAY_SWIPE_POINTERS).maxPointers(J.OVERLAY_SWIPE_POINTERS).activeOffsetY(40).failOffsetX([-32,32]).onEnd((function({_worklet_601866448939_init_data:e,shouldOpenOverlayOnSwipe:t,zoom:a,runOnJS:o,onSwipeToOverlay:i}){const n=function(e){t({translationY:e.translationY,velocityY:e.velocityY,zoomScale:a.scale.value})&&o(i)()};return n.__closure={shouldOpenOverlayOnSwipe:t,zoom:a,runOnJS:o,onSwipeToOverlay:i},n.__workletHash=601866448939,n.__initData=e,n})({_worklet_601866448939_init_data:_t,shouldOpenOverlayOnSwipe:J.shouldOpenOverlayOnSwipe,zoom:fn,runOnJS:D.runOnJS,onSwipeToOverlay:bn}));return E.Gesture.Simultaneous(fn.composeWith(i),o,a)},[fn,vi,wn,bn]),yn=(0,D.useDerivedValue)((function({_worklet_12819335077660_init_data:e,zoomBoxHeightFor:t,zoom:a}){const o=function(){return t(a.scale.value)};return o.__closure={zoomBoxHeightFor:t,zoom:a},o.__workletHash=0xba8bbe9df1c,o.__initData=e,o})({_worklet_12819335077660_init_data:yt,zoomBoxHeightFor:pn,zoom:fn}),[pn,fn.scale]),kn=fn.traceBox;(0,D.useAnimatedReaction)((function({_worklet_9263996983302_init_data:e,liveBoxHeight:t}){const a=()=>t.value;return a.__closure={liveBoxHeight:t},a.__workletHash=9263996983302,a.__initData=e,a})({_worklet_9263996983302_init_data:kt,liveBoxHeight:yn}),(function({_worklet_2483501414187_init_data:e,zoomTraceOn:t,traceBox:a}){const o=function(e,o){t&&null!==o&&e!==o&&a(e)};return o.__closure={zoomTraceOn:t,traceBox:a},o.__workletHash=2483501414187,o.__initData=e,o})({_worklet_2483501414187_init_data:Ct,zoomTraceOn:gn,traceBox:kn}),[gn,kn]);const Cn=(0,D.useAnimatedStyle)((function({_worklet_5895408842923_init_data:e,liveBoxHeight:t}){const a=()=>({height:t.value});return a.__closure={liveBoxHeight:t},a.__workletHash=5895408842923,a.__initData=e,a})({_worklet_5895408842923_init_data:Ht,liveBoxHeight:yn})),Hn=(0,D.useAnimatedStyle)((function({_worklet_3909681025048_init_data:e,fill:t,winWidth:a,winHeight:o,isWideDetail:i,wideStreamW:n,wideStreamH:l,defaultHeight:r}){const s=function(){return t?{position:'absolute',top:0,left:0,width:a,height:o}:i?{position:'absolute',top:0,left:0,width:n,height:l}:{position:'absolute',top:0,left:0,width:a,height:r}};return s.__closure={fill:t,winWidth:a,winHeight:o,isWideDetail:i,wideStreamW:n,wideStreamH:l,defaultHeight:r},s.__workletHash=3909681025048,s.__initData=e,s})({_worklet_3909681025048_init_data:Ot,fill:Ji,winWidth:Me,winHeight:ze,isWideDetail:Li,wideStreamW:hn,wideStreamH:mn,defaultHeight:ln}),[Me,ze,Ji,Li,hn,mn,ln]),{ref:On,isFullscreen:xn,supported:Tn,toggle:In}=(0,L.useWebFullscreen)(),En=(0,d.useCallback)(()=>{Tn?In():Ro(e=>!e)},[In,Tn]);(0,d.useEffect)(()=>{Tn&&Ro(xn)},[xn,Tn]),(0,j.useTheaterOrientation)(Ao,{screenMinSide:Ii});const Dn=(0,A.selectPlaybackStatus)(Ka.state),Pn=Dn.isLive&&!Ca,Wn=Pn&&'playing'===Oa.state,Bn=(0,Ve.useMotionHighlight)(e,Pn),Ln=ha?'detection':pa||wa?'audio':sa.motion&&Bn?'motion':null,jn=(0,d.useMemo)(()=>Pn?ba:Object.assign({},ba,{enabled:!1,motion:!1,detection:!1,audio:'off'}),[ba,Pn]),An='rate'===(0,f.resolvePauseAuthority)({mode:Ka.state.mode,clipHeld:'clip'===Xa.stage.kind}),Rn=An?Wa:Ca,Mn=()=>{!Fa.current||An?An?bo():Ea():(async()=>{const e=await po();Ea(),e&&fo(e)})()},zn='clip'===Xa.stage.kind?!Mi&&Xa.loading:oo?'seeking'===Ka.state.mode:!Mi&&!Ca&&'connecting'===Oa.state,Gn=(0,d.useCallback)(()=>{La.current?.retry()},[]),Fn='error'===Oa.state||'error'===Ka.state.mode,Jn=Oa.reason,Nn=Oa.state,Yn=(0,d.useMemo)(()=>Mi?ct:{failed:Fn,fetching:'connecting'===Nn,reason:'error'===Nn?Jn??null:null,onRetry:Gn},[Mi,Fn,Nn,Jn,Gn]),Vn=(0,d.useCallback)(()=>{const e=(0,A.selectActiveEpoch)(Ka.state),t=(0,M.resolveJogBase)(Ka.state.playhead,e),a=(0,M.jogTarget)(t,-1);z.log.debug('playback:jog','jogBack',{playhead:Ka.state.playhead,active:e,base:t,target:a,mode:Ka.state.mode}),null!=a&&ho(a,'timeline')},[Ka,ho]),Un=(0,d.useCallback)(()=>{const e=(0,A.selectActiveEpoch)(Ka.state),t=(0,M.resolveJogBase)(Ka.state.playhead,e),a=(0,M.jogTarget)(t,1);z.log.debug('playback:jog','jogForward',{playhead:Ka.state.playhead,active:e,base:t,target:a,mode:Ka.state.mode}),null!=a&&ho(a,'timeline')},[Ka,ho]),Zn='clip'===Xa.stage.kind?Xa.stage.clipId:null,$n=(0,d.useMemo)(()=>null===Zn||null===(0,g.clipStageStep)(eo,Zn,-1)?null:()=>Xa.step(eo,-1),[Zn,eo,Xa]),qn=(0,d.useMemo)(()=>null===Zn||null===(0,g.clipStageStep)(eo,Zn,1)?null:()=>Xa.step(eo,1),[Zn,eo,Xa]),Kn=(0,st.jsx)(P.default.View,{style:Ji?[It.videoWrapFull,Cn]:Li?[It.videoWrap,{width:en.streamWidth,height:en.streamHeight}]:dn?[It.videoWrap,Cn]:[It.videoWrap,{height:ln}],children:(0,st.jsxs)(y.default,{style:It.videoContent,children:[(0,st.jsxs)(P.default.View,{style:[Hn,fn.videoStyle],children:[Pt?(0,st.jsxs)(y.default,{style:It.disabledStage,children:[(0,st.jsx)(Je.PowerOff,{size:34,color:"#9aa0a6"}),(0,st.jsx)(_.default,{style:It.disabledTitle,children:a('v2.cameras.disabledTitle')}),(0,st.jsx)(_.default,{style:It.disabledHint,children:a('v2.cameras.disabledHint')})]}):co?(0,st.jsx)($.LiveView,{ref:La,deviceId:e,muted:To,target:ia,showStats:Lo&&!1,highlight:void 0,initialSeekMs:Va,initialClip:Za,onPlaybackState:xo,onPlayerState:xa,onPosition:ai,onLiveCaptureError:()=>{Fa.current=!1,Aa(!1),Ma(null),i({title:a('v2.theater.recordLive'),message:a('v2.theater.recordFailed')})},onScrubDrawn:ei,onServedProfile:Ho,onClipDuration:Xa.reportDuration,onClipAudio:Xa.reportAudio,onClipIncomplete:Xa.reportIncomplete},Ja):(0,st.jsx)(Tt,{deviceId:e,fill:Ji,enabled:Dn.isLive}),Do&&Pn?(0,st.jsx)(de.MotionRegionsOverlay,{deviceId:e,enabled:Do}):null,Po&&Pn?(0,st.jsx)(ce.MotionBoxesOverlay,{deviceId:e,enabled:Po}):null,Bo&&Pn?(0,st.jsx)(ue.StationaryBoxesOverlay,{deviceId:e,enabled:Bo}):null,Wo&&Pn?(0,st.jsx)(he.DiscardedBoxesOverlay,{deviceId:e,enabled:Wo}):null]}),(0,st.jsx)(E.GestureDetector,{gesture:_n,children:(0,st.jsx)(P.default.View,{style:b.default.absoluteFill})}),'off'!==jo&&Pn?(0,st.jsx)(me.AudioLevelMeter,{deviceId:e,position:jo,onSetPosition:fi}):null,null===Yo||Uo?null:(0,st.jsx)(ge.ZoneActiveOverlay,{zone:Yo}),'gap'===Ka.state.mode?(0,st.jsxs)(y.default,{pointerEvents:"none",style:[b.default.absoluteFill,It.noRecOverlay],children:[(0,st.jsx)(Je.VideoOff,{size:28,color:"#9aa0a6"}),(0,st.jsx)(_.default,{style:It.noRecTitle,children:a('v2.theater.noRecording')}),(0,st.jsx)(_.default,{style:It.noRecHint,children:a('v2.theater.noRecordingHint')})]}):null,Ln&&Pn&&la.highlightBorder?(0,st.jsx)(y.default,{pointerEvents:"none",style:[b.default.absoluteFill,{borderWidth:Bt.highlight.thickness,borderColor:'motion'===Ln?Bt.highlight.motionColor:'audio'===Ln?Bt.highlight.audioColor:Bt.highlight.detectionColor}]}):null,Mo?(0,st.jsxs)(y.default,{style:It.nameTag,pointerEvents:"none",children:[Vt&&!Pt?(0,st.jsx)(Je.Moon,{size:12,color:"#fafaf9"}):(0,st.jsx)(Ue.CameraStatusDot,{deviceId:e,online:Dt,disabled:Pt,size:9}),(0,st.jsx)(_.default,{style:It.nameText,numberOfLines:1,children:xt})]}):null,(0,st.jsx)($e.DoorbellBadge,{deviceId:e,enabled:Zt&&Pn}),(0,st.jsx)(Ze.OccupancyBadge,{deviceId:e,enabled:'off'!==la.occupancy&&Dn.isLive&&!Ca,corner:'off'===la.occupancy?'bottom-left':la.occupancy}),(0,st.jsx)(ot.OverlayReadouts,{deviceId:e,config:la,enabled:Pn&&Dn.isLive}),Lo?(0,st.jsx)(se.StreamStatsOverlay,{getStats:Hi}):null,(0,st.jsx)(oe.StreamOverlayControls,{visible:Mo,onRequestHide:Si,paused:Rn,onTogglePause:Mn,showPlayPause:Yi,muted:To,onToggleMute:oi,audio:Xa.audioNotice,hasTwoWayAudio:Ut,talking:Oi,onToggleTalk:Ti,onStartSystemPip:yi,fullscreen:Ao,onToggleFullscreen:En,edgePad:Ji?{left:s.left,right:s.right,bottom:s.bottom}:void 0,timelineToggle:Ji?{expanded:Go,onToggle:()=>Fo(e=>!e)}:void 0}),Ji&&Nt&&Wn?(0,st.jsx)(ie.DriveOverlay,{deviceId:e,visible:Mo,edgePad:{left:s.left,right:s.right,bottom:s.bottom},onOpenControls:No,drawer:{open:Go,width:(0,ne.drawerWidth)(Me)}}):null,Uo?(0,st.jsx)(pe.ZoneDrawOverlay,{zone:Yo,onConfirm:Ko,onCancel:Qo}):null]})}),Qn=[{id:'back',icon:Je.ArrowLeft,label:a('v2.common.back'),active:!1,onPress:()=>(0,N.backToCameras)(n,ri),cluster:'left'},{id:'timeline',icon:Je.History,label:a(Go?'v2.timeline.hideTimeline':'v2.timeline.showTimeline'),active:Go,onPress:()=>Fo(e=>!e),cluster:'left'},{id:'fullscreen',icon:Ao?Je.Minimize2:Je.Maximize2,label:a(Ao?'v2.streamBar.exitFullscreen':'v2.streamBar.fullscreen'),active:Ao,onPress:En,cluster:'right'}],Xn=Mi?(0,st.jsxs)(y.default,{testID:gt,style:[It.wallWrap,(0,He.wallBoxStyle)({mode:Bi,wideStreamWidth:en.streamWidth,portraitStreamHeight:sn.streamHeight})],children:[(0,st.jsx)(ke.WorkspaceStage,{devices:Ri,quality:ea,highlight:jn,showBoxes:Po,onGoTo:ii,onCellPanel:si}),Ji?(0,st.jsx)(le.OverlayDiscGroup,{visible:!0,holdOpen:!0,onRequestHide:dt,items:Qn,edgePad:{left:s.left,right:s.right,bottom:s.bottom}}):null]}):null,el=(0,xe.fanOutPlaybackToWall)({primary:{onSeek:ho,onScrubBegin:Ka.beginScrub,onScrubMove:Ka.moveScrub,onScrubCommit:mo,onGoLive:no,onTogglePlayPause:Mn,onSelectRate:_o},broadcast:Te.gridPlaybackBus.broadcast,paused:Rn}),tl=(0,d.useCallback)(e=>{io(),null!==e&&el.onSeek(e,'timeline')},[io,el]);return(0,st.jsxs)(y.default,{style:It.screenRow,children:[Ei&&!Ji?(0,st.jsx)(Y.SideNavRail,{pathname:Pi,compact:Di}):null,(0,st.jsxs)(y.default,{ref:On,onLayout:Zi,style:{flex:1,minWidth:0,backgroundColor:l.background,paddingTop:Ji?0:s.top},children:[(0,st.jsx)(I.StatusBar,{hidden:Ji,style:Ji||'dark'===r?'light':'dark'}),(0,st.jsx)(ve.TheaterTimeline,{ref:Jo,layoutMode:Bi,railWidth:en.railWidth,stream:Xn??Kn,onOpenClipInFrame:Xa.open,onClipsChange:ao,belowStream:(0,Ce.shouldShowCameraShelf)(Bi)?(0,st.jsx)(we.BelowStreamArea,{width:en.streamWidth,currentDeviceId:e,wallShowing:Mi,onGoTo:ii,onCellPanel:si,onOpenPlayback:ci}):null,deviceId:e,scopeIds:Ri,hideBack:Li,drawerExpanded:Go,name:xt,onBack:()=>(0,N.backToCameras)(n,ri),deviceBinding:{cameraName:xt,hasPtz:zt,hasBattery:Gt,hasNetworkLink:Jt,hasNavigation:Nt,cameraJump:{onSwitchCamera:ii,onOpenAdhocGrid:Gi,cameraSelection:zi}},singleCamera:Object.assign({streamBinding:{quality:ea,onSelectQuality:na},viewOptionsBinding:{highlight:sa,onSetHighlight:ca},overlayBinding:{config:la,onChange:ra},onOpenLinkedDevices:()=>{si('devices',e)},linkedDevicesOpen:'devices'===hi?.kind&&hi.deviceId===e},Mi?{}:{zone:{zoneRect:Yo,onRequestZoneDraw:$o,onClearZone:qo}}),mode:Ka.state.mode,activeEpoch:so??(0,A.selectActiveEpoch)(Ka.state),seekAnchor:Ka.state.seekAnchor,onSeek:el.onSeek,onLeaveClipsMode:tl,onScrubBegin:el.onScrubBegin,onScrubMove:el.onScrubMove,onScrubCommit:el.onScrubCommit,onGoLive:el.onGoLive,liveLocked:Ka.state.liveLocked,onToggleLiveLock:Ka.toggleLiveLock,liveCapture:Mi||wo?void 0:vo,exportSelection:Mi||wo?void 0:So,playbackRate:Da,paused:Rn,servedTier:Co,onTogglePlayPause:el.onTogglePlayPause,loading:zn,streamFault:Yn,scrubDirection:(0,A.selectScrubDirection)(Ka.state),onJogBack:Vn,onJogForward:Un,clipHeld:'clip'===Xa.stage.kind,clipOnFrameId:'clip'===Xa.stage.kind?Xa.stage.clipId:null,onClipPrev:$n,onClipNext:qn,clipProgress:Object.assign({progress:Xa.progress,controls:Xa.controls},Xa.seek),clipLoop:{enabled:At,onToggle:Rt},clipControls:Xa.controls,clipIncomplete:Xa.incompleteNotice,onStepFrame:yo,onSelectRate:el.onSelectRate}),Ki?(0,st.jsx)(V.BottomNavBar,{pathname:Pi,insetBottom:s.bottom}):null,(0,st.jsx)(Pe.GridCellPanelOverlay,{panel:hi,cameraName:pi,hasPtz:gi,onSelect:t=>li({kind:t,deviceId:hi?.deviceId??e}),onClose:ui}),(0,st.jsx)(S.ClipStageView,{stage:Xa.stage,playback:Xa.playback,onPrev:$n,onNext:qn,onClose:io})]})]})};var c=t(l[0]),u=t(l[1]),d=t(l[2]),h=t(l[3]),m=t(l[4]),p=t(l[5]),g=t(l[6]),f=t(l[7]),v=t(l[8]),S=t(l[9]),w=t(l[10]);t(l[11]);var b=r(t(l[12])),_=r(t(l[13])),y=r(t(l[14])),k=t(l[15]),C=t(l[16]),H=t(l[17]),O=t(l[18]),x=t(l[19]),T=t(l[20]),I=t(l[21]);t(l[22]);var E=t(l[23]),D=t(l[24]),P=r(D),W=s(t(l[25])),B=s(t(l[26])),L=t(l[27]),j=t(l[28]),A=t(l[29]),R=t(l[30]),M=t(l[31]),z=t(l[32]),G=t(l[33]),F=t(l[34]),J=t(l[35]),N=t(l[36]),Y=t(l[37]),V=t(l[38]),U=t(l[39]),Z=t(l[40]),$=t(l[41]),q=t(l[42]),K=t(l[43]),Q=t(l[44]),X=t(l[45]),ee=t(l[46]),te=t(l[47]),ae=t(l[48]),oe=t(l[49]),ie=t(l[50]),ne=t(l[51]),le=t(l[52]),re=t(l[53]),se=t(l[54]),ce=t(l[55]),ue=t(l[56]),de=t(l[57]),he=t(l[58]),me=t(l[59]),pe=t(l[60]),ge=t(l[61]),fe=t(l[62]),ve=t(l[63]),Se=t(l[64]),we=t(l[65]),be=t(l[66]),_e=t(l[67]),ye=t(l[68]),ke=t(l[69]),Ce=t(l[70]),He=t(l[71]),Oe=t(l[72]),xe=t(l[73]),Te=t(l[74]),Ie=t(l[75]),Ee=t(l[76]),De=t(l[77]),Pe=t(l[78]),We=t(l[79]),Be=t(l[80]),Le=t(l[81]),je=t(l[82]),Ae=t(l[83]),Re=t(l[84]),Me=t(l[85]),ze=t(l[86]),Ge=t(l[87]),Fe=t(l[88]),Je=t(l[89]),Ne=t(l[90]),Ye=t(l[91]),Ve=t(l[92]),Ue=t(l[93]),Ze=t(l[94]),$e=t(l[95]),qe=t(l[96]),Ke=t(l[97]),Qe=t(l[98]),Xe=t(l[99]),et=t(l[100]),tt=t(l[101]),at=t(l[102]),ot=t(l[103]),it=t(l[104]),nt=t(l[105]),lt=t(l[106]),rt=t(l[107]),st=t(l[108]);const ct={failed:!1,fetching:!1,reason:null,onRetry:()=>{}};function ut(e,t,a){return null===e||e.wall!==t?t?'pictureToWall':'wallToPicture':t&&e.mode!==a?'wallReshaped':null}const dt=()=>{},ht=.5,mt=2.5;function pt(e){const t=(0,c.c)(19),{t:a}=(0,O.useTranslation)(),{data:o}=(0,Ge.useCameras)();let i;t[0]!==o?(i=void 0===o?[]:o,t[0]=o,t[1]=i):i=t[1];const n=i;let l;if(t[2]!==n||t[3]!==e){let a;t[5]!==e?(a=t=>t.id===e,t[5]=e,t[6]=a):a=t[6],l=n.find(a),t[2]=n,t[3]=e,t[4]=l}else l=t[4];const r=l;let s,u;t[7]!==r?.name||t[8]!==e||t[9]!==a?(s=r?.name??a("v2.cameraDetail.fallbackName",{id:e}),t[7]=r?.name,t[8]=e,t[9]=a,t[10]=s):s=t[10],t[11]!==r?.features?(u=r?.features??[],t[11]=r?.features,t[12]=u):u=t[12];const d=r?.online??!1,h=r?.disabled??!1,m=void 0!==r;let p;return t[13]!==s||t[14]!==u||t[15]!==d||t[16]!==h||t[17]!==m?(p={name:s,features:u,online:d,disabled:h,known:m},t[13]=s,t[14]=u,t[15]=d,t[16]=h,t[17]=m,t[18]=p):p=t[18],p}const gt='wall-stage',ft=[],vt={code:"function CameraDetailScreenTsx1(scale){const{fill,winHeight,isWideDetail,wideStreamH,pinchExpandsHeight,defaultHeight,growBoxHeight,maxHeight,HEIGHT_GROW_SCALE}=this.__closure;if(fill)return winHeight;if(isWideDetail)return wideStreamH;if(!pinchExpandsHeight)return defaultHeight;return growBoxHeight(scale,{rest:defaultHeight,max:maxHeight,growScale:HEIGHT_GROW_SCALE});}"},St={code:"function CameraDetailScreenTsx2(){const{runOnJS,onToggleControls}=this.__closure;runOnJS(onToggleControls)();}"},wt={code:"function CameraDetailScreenTsx3(e){const{zoom}=this.__closure;zoom.stepZoomAt(e.x,e.y);}"},bt={code:"function CameraDetailScreenTsx4(e){const{shouldGoBackOnSwipe,zoom,runOnJS,onSwipeBack}=this.__closure;if(shouldGoBackOnSwipe({translationY:e.translationY,velocityY:e.velocityY,zoomScale:zoom.scale.value})){runOnJS(onSwipeBack)();}}"},_t={code:"function CameraDetailScreenTsx5(e){const{shouldOpenOverlayOnSwipe,zoom,runOnJS,onSwipeToOverlay}=this.__closure;if(shouldOpenOverlayOnSwipe({translationY:e.translationY,velocityY:e.velocityY,zoomScale:zoom.scale.value})){runOnJS(onSwipeToOverlay)();}}"},yt={code:"function CameraDetailScreenTsx6(){const{zoomBoxHeightFor,zoom}=this.__closure;return zoomBoxHeightFor(zoom.scale.value);}"},kt={code:"function CameraDetailScreenTsx7(){const{liveBoxHeight}=this.__closure;return liveBoxHeight.value;}"},Ct={code:"function CameraDetailScreenTsx8(h,prev){const{zoomTraceOn,traceBox}=this.__closure;if(zoomTraceOn&&prev!==null&&h!==prev)traceBox(h);}"},Ht={code:"function CameraDetailScreenTsx9(){const{liveBoxHeight}=this.__closure;return{height:liveBoxHeight.value};}"},Ot={code:"function CameraDetailScreenTsx10(){const{fill,winWidth,winHeight,isWideDetail,wideStreamW,wideStreamH,defaultHeight}=this.__closure;if(fill){return{position:'absolute',top:0,left:0,width:winWidth,height:winHeight};}if(isWideDetail){return{position:'absolute',top:0,left:0,width:wideStreamW,height:wideStreamH};}return{position:'absolute',top:0,left:0,width:winWidth,height:defaultHeight};}"};const xt=960;function Tt(e){const t=(0,c.c)(9),{deviceId:a,fill:o,enabled:i}=e,n=(0,Me.useSnapshot)(a,i,xt);let l;t[0]!==n.uri?(l=null===n.uri?(0,st.jsx)(C.SkeletonBox,{}):null,t[0]=n.uri,t[1]=l):l=t[1];const r=o?"contain":"cover";let s,u;return t[2]!==a||t[3]!==n||t[4]!==r?(s=(0,st.jsx)(ze.SnapshotImage,{source:n,deviceId:a,style:b.default.absoluteFill,contentFit:r}),t[2]=a,t[3]=n,t[4]=r,t[5]=s):s=t[5],t[6]!==l||t[7]!==s?(u=(0,st.jsxs)(y.default,{style:It.poster,children:[l,s]}),t[6]=l,t[7]=s,t[8]=u):u=t[8],u}const It=b.default.create({screenRow:{flex:1,flexDirection:'row'},videoWrap:{position:'relative',width:'100%',overflow:'hidden',backgroundColor:'#000'},wallWrap:{overflow:'hidden'},videoWrapFull:Object.assign({},b.default.absoluteFill,{backgroundColor:'#000'}),videoContent:{flex:1,overflow:'hidden'},disabledStage:{flex:1,alignItems:'center',justifyContent:'center',gap:4,backgroundColor:'#000'},disabledTitle:{color:'#e8eaed',fontSize:15,fontWeight:'700'},disabledHint:{color:'#9aa0a6',fontSize:12},noRecOverlay:{alignItems:'center',justifyContent:'center',gap:6,backgroundColor:'rgba(0,0,0,0.55)'},noRecTitle:{color:'#e8eaed',fontSize:15,fontWeight:'600'},noRecHint:{color:'#9aa0a6',fontSize:12},poster:{flex:1,backgroundColor:'#000'},nameTag:{position:'absolute',top:8,left:8,maxWidth:'70%',flexDirection:'row',alignItems:'center',gap:6,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:'#00000080'},nameText:{color:'#fafaf9',fontSize:13,fontWeight:'600'}})},1003,[787,1004,16,1005,1013,1054,1006,1007,1014,1015,1055,110,33,194,115,906,834,921,813,788,274,1056,1057,1058,1059,1060,1061,1016,1017,991,1018,1062,916,1000,1019,1020,1063,792,793,1064,789,988,1065,1066,1021,1023,867,1026,999,1027,1028,1067,1001,1068,1069,1070,1071,1072,1073,1074,1030,1031,1075,1076,1077,1032,986,1078,820,1043,1041,1045,1042,1046,1079,1080,1033,1047,1081,984,1082,1048,1083,1049,790,833,843,823,1050,814,835,829,842,845,847,1051,1084,1085,1086,1040,978,953,1087,1053,1088,828,990,989,10]);
3
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldAssertClip=function(n){return null!==n.heldClipId&&(!!n.playerPresent&&('connecting'!==n.playerState&&'error'!==n.playerState&&n.assertedClipId!==n.heldClipId))},e.assertionAfterPlayerChange=function(n,t,l){return t?'connecting'===l||'error'===l?null:n:null}},1004,[]);
4
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useClipStage=function(M,P){const _=(0,l.c)(65),h=void 0!==P&&P,[O,E]=(0,t.useState)(n.initialClipStage),R=(0,t.useRef)(null),L=(0,t.useRef)(null),T=(0,u.useClipPlayback)(),[w,A]=(0,t.useState)(null),[N,B]=(0,t.useState)(null),[D,j]=(0,t.useState)(null),[H,Y]=(0,t.useState)(null),[F,G]=(0,t.useState)(null),[U,q]=(0,t.useState)(null);let x;_[0]!==T||_[1]!==M||_[2]!==O?(x=(l,t)=>{Z.current=t,G(n=>null!==n&&n.deviceId===l.deviceId&&n.provider===t?n:{deviceId:l.deviceId,provider:t}),L.current=(0,p.reduceClipLoop)(L.current,{kind:"opened"}).memo;const o=(0,n.clipStageAttach)(O,l);if((0,c.noteClipOpenStep)("stage",Object.assign({deviceId:l.deviceId,clipId:l.clipId,attached:o.kind,holds:(0,n.stageHoldsClip)(o),playback:l.playback.kind},!1===l.playable?{refusedBy:"provider"}:{})),E(o),(0,n.stageHoldsClip)(o)){if("clip"===o.kind)switch(A(null),Y(null),l.playback.kind){case"native":return(0,c.noteClipOpenStep)("dispatch",{deviceId:l.deviceId,clipId:l.playback.clipId,provider:t,profile:o.profile??null}),q(l=>(0,s.reduceClipLoading)(l,{kind:"opened",clipId:o.clipId})),R.current=Object.assign({fileClipId:l.playback.clipId,provider:t},null===o.profile?{}:{profile:o.profile}),void(M.playClip(l.playback.clipId,t,0,o.profile??void 0)&&M.noteAsserted(o.clipId));case"recorded":return void E(n.initialClipStage)}}else T.refuse(l.clipId,l.unplayableReason??null)},_[0]=T,_[1]=M,_[2]=O,_[3]=x):x=_[3];const z=x;let J;_[4]!==T?(J=()=>{L.current=(0,p.reduceClipLoop)(L.current,{kind:"closed"}).memo,E(b),A(null),q(y),T.close()},_[4]=T,_[5]=J):J=_[5];const K=J;let Q;_[6]!==M?(Q=()=>{const l=R.current;null!==l&&M.playClip(l.fileClipId,l.provider,0,l.profile)},_[6]=M,_[7]=Q):Q=_[7];const V=Q;let W;_[8]!==h||_[9]!==V||_[10]!==O.clipId||_[11]!==O.kind?(W=l=>{if(q(t=>(0,s.reduceClipLoading)(t,{kind:"player",state:l})),"clip"!==O.kind)return;const t=(0,p.reduceClipLoop)(L.current,{kind:"player",state:l,clipId:O.clipId,loop:h});L.current=t.memo,t.replay&&V()},_[8]=h,_[9]=V,_[10]=O.clipId,_[11]=O.kind,_[12]=W):W=_[12];const X=W,Z=(0,t.useRef)(null);let $;_[13]!==z||_[14]!==O.clipId||_[15]!==O.kind?($=(l,t)=>{if("clip"!==O.kind)return;const o=Z.current;if(null===o)return;const c=(0,n.clipStageStep)(l,O.clipId,t);null!==c&&z(c,o)},_[13]=z,_[14]=O.clipId,_[15]=O.kind,_[16]=$):$=_[16];const ee=$;let le;_[17]!==O?(le=l=>{const t=(0,o.routePlayerPosition)(O,l);switch(t.kind){case"session":return!1;case"clip":return A(t.positionMs),!0;case"dropped":return(0,c.noteTimelineInputIgnored)("positionEpochOnClip"),!0}},_[17]=O,_[18]=le):le=_[18];const ie=le;let te;_[19]===Symbol.for("react.memo_cache_sentinel")?(te=l=>{B(l)},_[19]=te):te=_[19];const ne=te;let re;_[20]===Symbol.for("react.memo_cache_sentinel")?(re=l=>{j(l)},_[20]=re):re=_[20];const oe=re;let ce;_[21]===Symbol.for("react.memo_cache_sentinel")?(ce=l=>{Y(l)},_[21]=ce):ce=_[21];const se=ce,de=(0,S.useClipPlaybackOptions)(F?.deviceId??null,F?.provider??null),pe=(0,t.useRef)(null),ue="clip"===O.kind;let ae;_[22]!==ue||_[23]!==M?(ae=()=>{if(!ue)return void(0,c.noteTimelineInputIgnored)("clipSeekNoClip");const l=(0,I.generateDragId)();pe.current={id:l,lastEmitMs:0},M.scrubStart(l)},_[22]=ue,_[23]=M,_[24]=ae):ae=_[24];const Ie=ae;let ke;_[25]!==M?(ke=l=>{const t=pe.current;if(null===t)return;const n=Date.now();(0,f.shouldEmitScrubSample)(t.lastEmitMs,n,f.PLAYER_SCRUB_EMIT_MS)&&(pe.current={id:t.id,lastEmitMs:n},M.scrubTo(l))},_[25]=M,_[26]=ke):ke=_[26];const Se=ke;let fe;_[27]!==de||_[28]!==ue||_[29]!==M||_[30]!==w?(fe=l=>{if(!ue)return pe.current=null,void(0,c.noteTimelineInputIgnored)("clipSeekNoClip");if(!(0,k.clipSeekAllowed)(de.controls,l,w??0))return pe.current=null,(0,c.noteTimelineInputIgnored)("clipSeekBackwardOnForwardOnly"),void A(w);const t=pe.current?.id;pe.current=null,Y(null),M.scrubCommit(l,t),A(l)},_[27]=de,_[28]=ue,_[29]=M,_[30]=w,_[31]=fe):fe=_[31];const me=fe;let ve;_[32]!==N||_[33]!==w||_[34]!==O.clipId||_[35]!==O.endMs||_[36]!==O.inProgress||_[37]!==O.kind||_[38]!==O.startMs?(ve="clip"===O.kind?(0,o.resolveClipProgress)(w,(0,o.resolveClipDuration)({measuredMs:null!==N&&N.clipId===O.clipId?N.durationMs:null,startMs:O.startMs,endMs:O.endMs,inProgress:O.inProgress})):o.EMPTY_CLIP_PROGRESS,_[32]=N,_[33]=w,_[34]=O.clipId,_[35]=O.endMs,_[36]=O.inProgress,_[37]=O.kind,_[38]=O.startMs,_[39]=ve):ve=_[39];const Ce=ve,ge=T.state;let ye;_[40]!==Ie||_[41]!==me||_[42]!==Se?(ye={onSeekBegin:Ie,onSeekMove:Se,onSeekCommit:me},_[40]=Ie,_[41]=me,_[42]=Se,_[43]=ye):ye=_[43];const be="clip"===O.kind?O.clipId:null;let Me;_[44]!==H||_[45]!==be?(Me=(0,C.resolveClipIncompleteNotice)(be,H),_[44]=H,_[45]=be,_[46]=Me):Me=_[46];const Pe="clip"===O.kind?O.clipId:null;let _e;_[47]!==D||_[48]!==Pe?(_e=(0,v.resolveClipAudioNotice)(Pe,D),_[47]=D,_[48]=Pe,_[49]=_e):_e=_[49];const he="clip"===O.kind&&U===O.clipId;let Oe;_[50]!==T.state||_[51]!==K||_[52]!==de||_[53]!==z||_[54]!==Ce||_[55]!==V||_[56]!==X||_[57]!==ie||_[58]!==O||_[59]!==ee||_[60]!==ye||_[61]!==Me||_[62]!==_e||_[63]!==he?(Oe={stage:O,playback:ge,open:z,replay:V,step:ee,close:K,progress:Ce,seek:ye,controls:de,reportPosition:ie,reportDuration:ne,reportAudio:oe,reportIncomplete:se,incompleteNotice:Me,audioNotice:_e,loading:he,reportPlayerState:X},_[50]=T.state,_[51]=K,_[52]=de,_[53]=z,_[54]=Ce,_[55]=V,_[56]=X,_[57]=ie,_[58]=O,_[59]=ee,_[60]=ye,_[61]=Me,_[62]=_e,_[63]=he,_[64]=Oe):Oe=_[64];return Oe};var l=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]),c=r(d[4]),s=r(d[5]),p=r(d[6]),u=r(d[7]),I=r(d[8]),k=r(d[9]),S=r(d[10]),f=r(d[11]),v=r(d[12]),C=r(d[13]);function y(l){return(0,s.reduceClipLoading)(l,{kind:"closed"})}function b(l){return(0,n.clipStageClose)(l)}},1005,[787,16,1006,1089,1054,1007,1008,1009,1090,1091,1010,1092,1011,1012]);
5
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveClipLoop=o,Object.defineProperty(e,"initialClipStage",{enumerable:!0,get:function(){return t}}),e.stageHoldsClip=function(n){return'clip'===n.kind},e.clipStageAttach=function(t,l){if(!(0,i.isPlayable)(l))return{kind:'refused',clipId:l.clipId,reason:l.unplayableReason??null};const s=o(l);return{kind:'clip',clipId:l.clipId,deviceId:l.deviceId,profile:(0,n.cheapestClipProfile)(l),loop:s.loop,loopReason:s.reason,startMs:l.startMs,endMs:l.endMs,inProgress:!0===l.inProgress}},e.clipStageClose=function(n){return t},e.clipStageStep=function(n,o,t){const l=n.findIndex(n=>n.clipId===o);if(l<0)return null;for(let o=l+t;o>=0&&o<n.length;o+=t){const t=n[o];if(void 0!==t&&(0,i.isPlayable)(t))return t}return null},e.clipSheetShows=function(n){return'refused'===n.kind};var n=r(d[0]),i=r(d[1]);function o(n){return!0===n.inProgress?{loop:!1,reason:'in-progress'}:{loop:!0,reason:'closed'}}const t={kind:'session'}},1006,[1093,1094]);
6
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolvePauseAuthority=function(t){return t.clipHeld?'rate':'live'===t.mode?'live-hold':'rate'},e.planClipExit=function(t){switch(t){case'live':return{closeStage:!0,goLive:!0};case'list':return{closeStage:!1,goLive:!1}}},e.reduceClipLoading=function(t,l){switch(l.kind){case'opened':return l.clipId;case'closed':return null;case'player':return'loading'===l.state?t:null}},e.shouldEndLiveCapture=function(t){return'live'!==t.mode||t.clipHeld}},1007,[]);
7
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.reduceClipLoop=function(l,c){switch(c.kind){case'opened':case'closed':return o;case'player':return'ended'!==c.state?o:c.loop?l===c.clipId?{memo:l,replay:!1}:{memo:c.clipId,replay:!0}:{memo:l,replay:!1}}};const o={memo:null,replay:!1}},1008,[]);
8
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useClipPlayback=function(){const{controller:c}=(0,l.useConnection)(),[p,u]=(0,e.useState)({kind:'idle'}),k=(0,e.useCallback)((e,l,p)=>{u({kind:'resolving',clipId:l}),(async()=>{const k=Date.now();try{const y=c.getSystem();if(!y)throw new Error('not connected');const f=s(await(0,n.capQuery)(y.trpcClient,'videoclips','getClipPlayback',Object.assign({deviceId:e,clipId:l},null!==p?{profile:p}:{}),{rethrow:!0}),p);if(null===f)return(0,t.noteClipPlayback)({deviceId:e,ok:!1,served:null,ms:Date.now()-k}),o.log.warn('clips','clip playback resolved to nothing playable',{deviceId:e,clipId:l}),void u({kind:'failed',clipId:l,reason:null});(0,t.noteClipPlayback)({deviceId:e,ok:!0,served:null===f.mismatch?f.format:`${f.format}:swapped`,ms:Date.now()-k}),u({kind:'ready',clipId:l,playback:f})}catch(n){const c=n instanceof Error?n.message:String(n);(0,t.noteClipPlayback)({deviceId:e,ok:!1,served:null,ms:Date.now()-k}),o.log.warn('clips','clip playback resolve failed',{deviceId:e,clipId:l,error:c}),u({kind:'failed',clipId:l,reason:c})}})()},[c]),y=(0,e.useCallback)((e,l)=>{u({kind:'ready',clipId:e,playback:{playbackUrl:l,format:'mp4',mismatch:null}})},[]),f=(0,e.useCallback)((e,l)=>{u({kind:'failed',clipId:e,reason:l})},[]),b=(0,e.useCallback)(()=>u({kind:'idle'}),[]);return{state:p,open:k,openUrl:y,refuse:f,close:b}};var e=r(d[0]),l=r(d[1]),n=r(d[2]),c=r(d[3]),t=r(d[4]),o=r(d[5]);function s(e,l){if(!(0,n.isRecord)(e))return null;const{playbackUrl:t,format:o,served:s}=e;return'string'!=typeof t||0===t.length?null:{playbackUrl:t,format:'string'==typeof o&&o.length>0?o:'mp4',mismatch:(0,c.clipServedMismatch)(l,'string'==typeof s?s:null)}}},1009,[16,815,870,1093,1054,916]);
9
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.clipPlaybackOptionsKey=p,e.classifyClipPlaybackOptions=y,e.useClipPlaybackOptions=function(C,b){const v=(0,t.c)(8),{controller:O,state:k}=(0,s.useConnection)(),f=null!==C&&Number.isFinite(C)&&null!==b&&b.length>0&&"connected"===k;let _;v[0]!==O||v[1]!==C||v[2]!==b?(_=async()=>{const t=O.getSystem();if(!t)throw new Error("not connected");const n=await(0,o.capQuery)(t.trpcClient,"videoclips","getPlaybackOptions",{deviceId:C,provider:b},{rethrow:!0});return(0,u.parseClipPlaybackOptions)(n)},v[0]=O,v[1]=C,v[2]=b,v[3]=_):_=v[3];const E=(0,n.useQuery)({queryKey:p(C??-1,b??""),enabled:f,staleTime:l.RECONCILE_MS,refetchInterval:l.RECONCILE_MS,queryFn:_}),P=y({asked:f,status:E.status,options:E.data}),w=E.data??null;let I;v[4]!==f||v[5]!==w||v[6]!==P?(I=f?(0,c.resolveClipControls)(P,w):c.LEGACY_CONTROLS_VIEW,v[4]=f,v[5]=w,v[6]=P,v[7]=I):I=v[7];return I};var t=r(d[0]);r(d[1]);var n=r(d[2]),s=r(d[3]),o=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]);function p(t,n){return['v2','clip-playback-options',t,n]}function y(t){return t.asked?'pending'===t.status?'pending':'error'===t.status?'unknown':null===t.options||void 0===t.options?'absent':'present':'absent'}},1010,[787,16,848,815,870,849,1091,1095]);
10
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveClipAudioNotice=function(n,l){if(null===n||null===l)return null;if(l.clipId!==n)return null;if(l.carried)return null;if('rate'!==l.reason)return null;const{rate:u}=l;return'number'!=typeof u||!Number.isFinite(u)||u<=0||1===u?null:{kind:'silent-by-speed',rate:u}}},1011,[]);
11
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveClipIncompleteNotice=function(n,l){return null===l||l.clipId!==n||0===l.reason.trim().length?null:{kind:l.code,reason:l.reason}}},1012,[]);
12
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.clipStartOnFrame=function(n,t){if('clip'!==t.kind)return null;const l=n.find(n=>n.clipId===t.clipId);return l?.startMs??null}},1013,[]);
13
- __d(function(g,r,_i,_a,m,e,d){"use strict";function t(t,n){if(t===n)return!0;if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++)if(t[i]?.clipId!==n[i]?.clipId)return!1;return!0}Object.defineProperty(e,'__esModule',{value:!0}),e.sameClipList=t,e.adoptClipList=function(n,i){return t(n,i)?n:i}},1014,[]);
14
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CLIP_STAGE_TEST_ID",{enumerable:!0,get:function(){return j}}),_e.ClipStageView=function(e){const S=(0,l.c)(102),{stage:M,playback:P,onPrev:R,onNext:w,onClose:_}=e,{t:z}=(0,p.useTranslation)(),{colors:L}=(0,v.useTheme)(),{controller:T,state:E}=(0,f.useConnection)(),{token:D}=(0,k.useServer)();let F;S[0]!==E||S[1]!==T?(F="connected"===E?T.getSystem()?.serverUrl??null:null,S[0]=E,S[1]=T,S[2]=F):F=S[2];const U=F;let A;S[3]!==D?(A=D?{Authorization:`Bearer ${D}`}:void 0,S[3]=D,S[4]=A):A=S[4];const B=A;let N;e:{if("ready"!==P.kind){N=null;break e}let e;S[5]!==P.playback.playbackUrl||S[6]!==U?(e=(0,y.absoluteMediaPath)(U,P.playback.playbackUrl),S[5]=P.playback.playbackUrl,S[6]=U,S[7]=e):e=S[7],N=e}const O=N;let q;S[8]!==M.clipId||S[9]!==M.deviceId||S[10]!==M.kind?(q=e=>{h.log.warn("clips","clip stage playback failed",{deviceId:"clip"===M.kind?M.deviceId:null,clipId:"clip"===M.kind?M.clipId:null,error:String(e)})},S[8]=M.clipId,S[9]=M.deviceId,S[10]=M.kind,S[11]=q):q=S[11];const G=q;if(!(0,x.clipSheetShows)(M))return null;let V;S[12]!==P.kind||S[13]!==P.reason||S[14]!==M.kind||S[15]!==M.reason||S[16]!==z?(V="refused"===M.kind?M.reason??z("v2.clips.playFailed"):"failed"===P.kind?P.reason??z("v2.clips.playFailed"):"resolving"===P.kind?z("v2.clips.loading"):null,S[12]=P.kind,S[13]=P.reason,S[14]=M.kind,S[15]=M.reason,S[16]=z,S[17]=V):V=S[17];const X=V;let $,H,J,K;S[18]!==L.background?($=[t.default.absoluteFill,I.stage,{backgroundColor:L.background}],S[18]=L.background,S[19]=$):$=S[19];S[20]!==B||S[21]!==G||S[22]!==M.kind||S[23]!==M.loop||S[24]!==O?(H=null!==O&&"clip"===M.kind?(0,C.jsx)(u.default,{source:void 0===B?{uri:O}:{uri:O,headers:B},style:t.default.absoluteFill,resizeMode:"contain",controls:!0,paused:!1,repeat:M.loop,onError:G}):null,S[20]=B,S[21]=G,S[22]=M.kind,S[23]=M.loop,S[24]=O,S[25]=H):H=S[25];S[26]!==L.foregroundMuted||S[27]!==X?(J=null!==X?(0,C.jsx)(c.default,{style:I.noticeBox,children:(0,C.jsx)(s.default,{style:[I.notice,{color:L.foregroundMuted}],children:X})}):null,S[26]=L.foregroundMuted,S[27]=X,S[28]=J):J=S[28];S[29]!==z?(K=z("v2.clips.closeClip"),S[29]=z,S[30]=K):K=S[30];const Q=L.background+"CC";let W,Y,Z,ee,le,oe;S[31]!==Q?(W=[I.btn,{backgroundColor:Q}],S[31]=Q,S[32]=W):W=S[32];S[33]!==L.foreground?(Y=(0,C.jsx)(b.X,{size:14,color:L.foreground}),S[33]=L.foreground,S[34]=Y):Y=S[34];S[35]!==_||S[36]!==W||S[37]!==Y||S[38]!==K?(Z=(0,C.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:K,onPress:_,hitSlop:8,style:W,children:Y}),S[35]=_,S[36]=W,S[37]=Y,S[38]=K,S[39]=Z):Z=S[39];S[40]!==L.foregroundMuted||S[41]!==M.inProgress||S[42]!==M.kind||S[43]!==z?(ee="clip"===M.kind&&M.inProgress?(0,C.jsx)(s.default,{style:[I.badge,{color:L.foregroundMuted}],children:z("v2.clips.stillRecordingNoLoop")}):null,S[40]=L.foregroundMuted,S[41]=M.inProgress,S[42]=M.kind,S[43]=z,S[44]=ee):ee=S[44];S[45]!==L.foregroundMuted||S[46]!==P.kind||S[47]!==P.playback||S[48]!==z?(le="ready"===P.kind&&null!==P.playback.mismatch?(0,C.jsx)(s.default,{style:[I.badge,{color:L.foregroundMuted}],children:z("v2.clips.servedInstead",{asked:P.playback.mismatch.asked,served:P.playback.mismatch.served})}):null,S[45]=L.foregroundMuted,S[46]=P.kind,S[47]=P.playback,S[48]=z,S[49]=le):le=S[49];S[50]!==Z||S[51]!==ee||S[52]!==le?(oe=(0,C.jsxs)(c.default,{style:I.topRow,pointerEvents:"box-none",children:[Z,ee,le]}),S[50]=Z,S[51]=ee,S[52]=le,S[53]=oe):oe=S[53];const ne=null===R;let te,ie;S[54]!==ne?(te={disabled:ne},S[54]=ne,S[55]=te):te=S[55];S[56]!==z?(ie=z("v2.clips.previousClip"),S[56]=z,S[57]=ie):ie=S[57];const re=null===R;let se;S[58]!==R?(se=()=>R?.(),S[58]=R,S[59]=se):se=S[59];const de=L.background+"CC",ae=null===R?.35:1;let ce,ue,pe;S[60]!==de||S[61]!==ae?(ce=[I.btn,{backgroundColor:de,opacity:ae}],S[60]=de,S[61]=ae,S[62]=ce):ce=S[62];S[63]!==L.foreground?(ue=(0,C.jsx)(b.ChevronLeft,{size:16,color:L.foreground}),S[63]=L.foreground,S[64]=ue):ue=S[64];S[65]!==te||S[66]!==ie||S[67]!==re||S[68]!==se||S[69]!==ce||S[70]!==ue?(pe=(0,C.jsx)(n.default,{accessibilityRole:"button",accessibilityState:te,accessibilityLabel:ie,disabled:re,onPress:se,hitSlop:8,style:ce,children:ue}),S[65]=te,S[66]=ie,S[67]=re,S[68]=se,S[69]=ce,S[70]=ue,S[71]=pe):pe=S[71];const be=null===w;let ge,fe;S[72]!==be?(ge={disabled:be},S[72]=be,S[73]=ge):ge=S[73];S[74]!==z?(fe=z("v2.clips.nextClip"),S[74]=z,S[75]=fe):fe=S[75];const ke=null===w;let ye;S[76]!==w?(ye=()=>w?.(),S[76]=w,S[77]=ye):ye=S[77];const ve=L.background+"CC",he=null===w?.35:1;let xe,Ce,je,Ie,Se,me;S[78]!==ve||S[79]!==he?(xe=[I.btn,{backgroundColor:ve,opacity:he}],S[78]=ve,S[79]=he,S[80]=xe):xe=S[80];S[81]!==L.foreground?(Ce=(0,C.jsx)(b.ChevronRight,{size:16,color:L.foreground}),S[81]=L.foreground,S[82]=Ce):Ce=S[82];S[83]!==ge||S[84]!==fe||S[85]!==ke||S[86]!==ye||S[87]!==xe||S[88]!==Ce?(je=(0,C.jsx)(n.default,{accessibilityRole:"button",accessibilityState:ge,accessibilityLabel:fe,disabled:ke,onPress:ye,hitSlop:8,style:xe,children:Ce}),S[83]=ge,S[84]=fe,S[85]=ke,S[86]=ye,S[87]=xe,S[88]=Ce,S[89]=je):je=S[89];S[90]!==pe||S[91]!==je?(Ie=(0,C.jsxs)(c.default,{style:I.navRow,pointerEvents:"box-none",children:[pe,je]}),S[90]=pe,S[91]=je,S[92]=Ie):Ie=S[92];S[93]!==oe||S[94]!==Ie||S[95]!==$||S[96]!==H||S[97]!==J?(Se=(0,C.jsxs)(c.default,{testID:j,style:$,children:[H,J,oe,Ie]}),S[93]=oe,S[94]=Ie,S[95]=$,S[96]=H,S[97]=J,S[98]=Se):Se=S[98];S[99]!==_||S[100]!==Se?(me=(0,C.jsx)(o.default,{visible:!0,animationType:"slide",transparent:!1,onRequestClose:_,children:Se}),S[99]=_,S[100]=Se,S[101]=me):me=S[101];return me};var l=r(d[0]);r(d[1]);var o=e(r(d[2])),n=e(r(d[3])),t=e(r(d[4])),s=e(r(d[5])),c=e(r(d[6])),u=e(r(d[7])),p=r(d[8]),b=r(d[9]),f=r(d[10]),k=r(d[11]),y=r(d[12]),v=r(d[13]),h=r(d[14]),x=r(d[15]),C=r(d[16]);const j='clip-stage';const I=t.default.create({stage:{justifyContent:'center',zIndex:60},noticeBox:{alignItems:'center',justifyContent:'center',padding:16},notice:{fontSize:13,textAlign:'center'},topRow:{position:'absolute',top:8,left:8,right:8,flexDirection:'row',alignItems:'center',gap:8},navRow:{position:'absolute',bottom:8,left:8,flexDirection:'row',gap:8},btn:{padding:6,borderRadius:14},badge:{fontSize:11}})},1015,[787,16,241,248,33,194,115,1096,813,814,815,914,926,789,916,1006,10]);
15
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isWebFullscreenSupported=c,e.useWebFullscreen=function(){const l=(0,n.c)(6),u=(0,t.useRef)(null),[o,s]=(0,t.useState)(!1);let f;l[0]===Symbol.for("react.memo_cache_sentinel")?(f=c('undefined'==typeof document?null:document),l[0]=f):f=l[0];const _=f;let b,p,y;l[1]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{const n=()=>s(null!==document.fullscreenElement);return document.addEventListener("fullscreenchange",n),()=>document.removeEventListener("fullscreenchange",n)},p=[],l[1]=b,l[2]=p):(b=l[1],p=l[2]);(0,t.useEffect)(b,p),l[3]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const n=u.current;document.fullscreenElement?document.exitFullscreen():n&&"function"==typeof n.requestFullscreen&&n.requestFullscreen()},l[3]=y):y=l[3];const E=y;let F;l[4]!==o?(F={ref:u,isFullscreen:o,supported:_,toggle:E},l[4]=o,l[5]=F):F=l[5];return F};var n=r(d[0]),t=r(d[1]);function c(n){return!0===n?.fullscreenEnabled}r(d[2])},1016,[787,16,110]);
16
- __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.theaterOrientationIntent=s,_e.useTheaterOrientation=function(l,O){const d=(0,e.c)(3),k=!0,{screenMinSide:y}=O,P=(0,n.useRef)(l);let b;d[0]!==l||d[1]!==y?(b=()=>{const e=P.current&&!l&&(0,o.shouldRestorePortraitLock)({screenMinSide:y,isWeb:k});P.current=l;const n=s({isWeb:k,fullscreen:l,restorePortraitOnExit:e});if("none"!==n)return"landscape"===n?c.lockAsync(c.OrientationLock.LANDSCAPE):"portrait"===n?c.lockAsync(c.OrientationLock.PORTRAIT_UP).then(f):c.unlockAsync(),u},d[0]=l,d[1]=y,d[2]=b):b=d[2];(0,t.useFocusEffect)(b)};var e=r(_d[0]),n=r(_d[1]);r(_d[2]);var t=r(_d[3]),c=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,c.get?c:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[4])),o=r(_d[5]);function s({isWeb:e,fullscreen:n,restorePortraitOnExit:t=!1}){return e?'none':n?'landscape':t?'portrait':'free'}function u(){c.unlockAsync()}function f(){c.unlockAsync()}},1017,[787,16,110,788,1057,956]);
17
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DIVERGENCE_TOLERANCE_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DIVERGENCE_REPORT_INTERVAL_MS",{enumerable:!0,get:function(){return t}}),e.evaluateDivergence=function(u){const{indicatorEpoch:l,playerEpoch:o,nowMs:c,lastReportAt:E}=u;if(null===l||null===o)return null;const s=l-o;return Math.abs(s)<n||null!==E&&c-E<t?null:{deltaMs:s,indicatorAhead:s>0}};const n=2e3,t=1e4},1018,[]);
18
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldShowOverlayPlayPause=function(l){return l.fill&&!l.landscapeDrawerOpen}},1019,[]);
19
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"BACK_SWIPE_POINTERS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"OVERLAY_SWIPE_POINTERS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"SWIPE_DISTANCE",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"SWIPE_VELOCITY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"ZOOM_IDLE_SCALE",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"shouldGoBackOnSwipe",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"shouldOpenOverlayOnSwipe",{enumerable:!0,get:function(){return l}});const n=1,t=2,_=80,o=400,s=1.02,u=(function({_worklet_7215403088850_init_data:n,ZOOM_IDLE_SCALE:t,SWIPE_DISTANCE:_,SWIPE_VELOCITY:o}){const s=function(n){return!(n.zoomScale>t)&&(n.translationY>_&&n.velocityY>o)};return s.__closure={ZOOM_IDLE_SCALE:t,SWIPE_DISTANCE:_,SWIPE_VELOCITY:o},s.__workletHash=7215403088850,s.__initData=n,s})({_worklet_7215403088850_init_data:{code:"function isDownwardFling_streamSwipesTs1(args){const{ZOOM_IDLE_SCALE,SWIPE_DISTANCE,SWIPE_VELOCITY}=this.__closure;if(args.zoomScale>ZOOM_IDLE_SCALE)return false;return args.translationY>SWIPE_DISTANCE&&args.velocityY>SWIPE_VELOCITY;}"},ZOOM_IDLE_SCALE:s,SWIPE_DISTANCE:_,SWIPE_VELOCITY:o}),c=(function({_worklet_13342668791840_init_data:n,isDownwardFling:t}){const _=function(n){return t(n)};return _.__closure={isDownwardFling:t},_.__workletHash=0xc229508a020,_.__initData=n,_})({_worklet_13342668791840_init_data:{code:"function shouldGoBackOnSwipe_streamSwipesTs2(args){const{isDownwardFling}=this.__closure;return isDownwardFling(args);}"},isDownwardFling:u}),l=(function({_worklet_5901426502956_init_data:n,isDownwardFling:t}){const _=function(n){return t(n)};return _.__closure={isDownwardFling:t},_.__workletHash=5901426502956,_.__initData=n,_})({_worklet_5901426502956_init_data:{code:"function shouldOpenOverlayOnSwipe_streamSwipesTs3(args){const{isDownwardFling}=this.__closure;return isDownwardFling(args);}"},isDownwardFling:u})},1020,[]);
20
- __d(function(g,_r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useStreamZoom=function({contentAspect:l=f,fit:N,viewport:C,trace:B=!1}){const{width:H,heightFor:J}=C,L=(0,_.useSharedValue)(1),R=(0,_.useSharedValue)(1),D=(0,_.useSharedValue)(0),V=(0,_.useSharedValue)(0),z=(0,_.useSharedValue)(0),$=(0,_.useSharedValue)(0),K=(0,_.useSharedValue)(1),G=(0,_.useSharedValue)(0),U=(0,_.useSharedValue)(0),j=(0,_.useSharedValue)((0,r.newZoomTraceBuffer)()),q=(0,_.useSharedValue)(''),Q=(0,t.useCallback)(()=>{(0,_.runOnUI)((function({_worklet_2495571499698_init_data:t,takeZoomTrace:e,traceBuf:o,traceKind:n,runOnJS:c,reportZoomTrace:r}){const l=function(){const t=e(o.value),l=n.value;t.length>0&&c(r)(l,t)};return l.__closure={takeZoomTrace:e,traceBuf:o,traceKind:n,runOnJS:c,reportZoomTrace:r},l.__workletHash=2495571499698,l.__initData=t,l})({_worklet_2495571499698_init_data:M,takeZoomTrace:r.takeZoomTrace,traceBuf:j,traceKind:q,runOnJS:_.runOnJS,reportZoomTrace:w}))()},[j,q]),tt=(0,t.useCallback)(()=>{setTimeout(Q,x)},[Q]),et=(0,t.useCallback)((function({_worklet_986476373280_init_data:t,trace:e,takeZoomTrace:o,traceBuf:n,runOnJS:c,reportZoomTrace:r,traceKind:l,beginZoomTrace:s}){const u=function(t){if(!e)return;const u=o(n.value);u.length>0&&c(r)(l.value,u),l.value=t,s(n.value,Date.now())};return u.__closure={trace:e,takeZoomTrace:o,traceBuf:n,runOnJS:c,reportZoomTrace:r,traceKind:l,beginZoomTrace:s},u.__workletHash=986476373280,u.__initData=t,u})({_worklet_986476373280_init_data:y,trace:B,takeZoomTrace:r.takeZoomTrace,traceBuf:j,runOnJS:_.runOnJS,reportZoomTrace:w,traceKind:q,beginZoomTrace:r.beginZoomTrace}),[B,j,q]),at=(0,t.useCallback)((function({_worklet_10375654994048_init_data:t,trace:e,traceBuf:o,pushZoomSample:n,zoomTraceElapsed:c,scale:r,committedScale:l,tx:s,ty:u,viewportWidth:_,heightFor:h}){const p=function(t,p){if(!e)return;const v=o.value;0!==v.startedAt&&n(v,Object.assign({t:c(v,Date.now()),phase:t,live:r.value,committed:l.value,x:s.value,y:u.value,boxW:_,boxH:h(r.value)},p))};return p.__closure={trace:e,traceBuf:o,pushZoomSample:n,zoomTraceElapsed:c,scale:r,committedScale:l,tx:s,ty:u,viewportWidth:_,heightFor:h},p.__workletHash=0x96fc53af080,p.__initData=t,p})({_worklet_10375654994048_init_data:P,trace:B,traceBuf:j,pushZoomSample:r.pushZoomSample,zoomTraceElapsed:r.zoomTraceElapsed,scale:L,committedScale:R,tx:D,ty:V,viewportWidth:H,heightFor:J}),[B,j,L,R,D,V,H,J]),ot=(0,t.useCallback)((function({_worklet_149899535809_init_data:t,trace:e,runOnJS:o,armTraceFlush:n}){const c=function(){e&&o(n)()};return c.__closure={trace:e,runOnJS:o,armTraceFlush:n},c.__workletHash=149899535809,c.__initData=t,c})({_worklet_149899535809_init_data:E,trace:B,runOnJS:_.runOnJS,armTraceFlush:tt}),[B,tt]),nt=(0,t.useCallback)((function({_worklet_13708736578398_init_data:t,traceSample:e}){const o=function(t){e('box',{drawnH:t})};return o.__closure={traceSample:e},o.__workletHash=0xc77d05fc35e,o.__initData=t,o})({_worklet_13708736578398_init_data:A,traceSample:at}),[at]),ct=(0,t.useCallback)(()=>{L.value=1,R.value=1,D.value=0,V.value=0,z.value=0,$.value=0},[L,R,D,V,z,$]),rt=(0,t.useCallback)((function({_worklet_4662698436455_init_data:t,scale:e,withTiming:o,committedScale:n,tx:c,ty:r,savedTx:l,savedTy:s}){const u=function(){e.value=o(1),n.value=1,c.value=o(0),r.value=o(0),l.value=0,s.value=0};return u.__closure={scale:e,withTiming:o,committedScale:n,tx:c,ty:r,savedTx:l,savedTy:s},u.__workletHash=4662698436455,u.__initData=t,u})({_worklet_4662698436455_init_data:Z,scale:L,withTiming:_.withTiming,committedScale:R,tx:D,ty:V,savedTx:z,savedTy:$}),[L,R,D,V,z,$]),lt=(0,_.useSharedValue)(0),st=(0,t.useMemo)(()=>u.Gesture.Pinch().onStart((0,s.guardWorklet)('zoom.pinch.start',(function({_worklet_3659253475082_init_data:t,pinchStartScale:e,committedScale:o,pinchFocalX:n,pinchFocalY:c,traceBegin:r,traceSample:l}){const s=function(t){e.value=o.value,n.value=t.focalX,c.value=t.focalY,r('pinch'),l('start',{focalX:t.focalX,focalY:t.focalY,pointers:t.numberOfPointers})};return s.__closure={pinchStartScale:e,committedScale:o,pinchFocalX:n,pinchFocalY:c,traceBegin:r,traceSample:l},s.__workletHash=3659253475082,s.__initData=t,s})({_worklet_3659253475082_init_data:k,pinchStartScale:K,committedScale:R,pinchFocalX:G,pinchFocalY:U,traceBegin:et,traceSample:at}))).onUpdate((0,s.guardWorklet)('zoom.pinch.update',(function({_worklet_9023822660542_init_data:t,viewportWidth:e,pinchStartScale:o,MIN_SCALE:n,MAX_SCALE:c,heightFor:r,MIN_VIEWPORT:l,scale:s,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,tx:T,ty:M,traceSample:y}){const P=function(t){if(t.numberOfPointers<2)return;const P=e,E=o.value,A=Math.max(n,Math.min(c,E*t.scale)),Z=r(E),k=r(A);if(P<l||k<l)return;s.value=A;const X=u({focalNow:t.focalX,focalStart:_.value,center:P/2,panStart:h.value,scaleStart:E*Z,scaleAfter:A*k}),Y=u({focalNow:t.focalY,focalStart:p.value,center:Z/2,centerAfter:k/2,panStart:v.value,scaleStart:E*Z,scaleAfter:A*k}),{x:F,y:O}=f(P,k,S,A,x),b=w({tx:X,ty:Y,w:P,h:k,aspect:S,scale:A,fit:x});T.value=b.x,M.value=b.y,y('update',{pointers:t.numberOfPointers,focalX:t.focalX,focalY:t.focalY,rawX:X,rawY:Y,limX:F,limY:O})};return P.__closure={viewportWidth:e,pinchStartScale:o,MIN_SCALE:n,MAX_SCALE:c,heightFor:r,MIN_VIEWPORT:l,scale:s,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,tx:T,ty:M,traceSample:y},P.__workletHash=9023822660542,P.__initData=t,P})({_worklet_9023822660542_init_data:X,viewportWidth:H,pinchStartScale:K,MIN_SCALE:h,MAX_SCALE:p,heightFor:J,MIN_VIEWPORT:v,scale:L,focalPan:o.focalPan,pinchFocalX:G,savedTx:z,pinchFocalY:U,savedTy:$,streamPanExtent:e.streamPanExtent,contentAspect:l,fit:N,clampPan:e.clampPan,tx:D,ty:V,traceSample:at}))).onEnd((0,s.guardWorklet)('zoom.pinch.end',(function({_worklet_13274452681532_init_data:t,scale:e,heightFor:o,committedScale:n,savedTx:c,tx:r,savedTy:l,ty:s,viewportWidth:u,streamPanExtent:_,contentAspect:h,fit:p,traceSample:v,lastPinchEndMs:f,traceRelease:S,runOnJS:x,reportZoom:w}){const T=function(){const t=e.value,T=o(n.value);n.value=t,c.value=r.value,l.value=s.value;const M=u,y=o(t),{x:P,y:E}=_(M,y,h,t,p);v('end',{rawX:r.value,rawY:s.value,limX:P,limY:E,note:T===y?void 0:`box ${Math.round(T)}\u2192${Math.round(y)}`}),f.value=Date.now(),S(),x(w)('pinch',{viewportW:Math.round(M),viewportH:Math.round(y),viewportAspect:y>0?Math.round(M/y*100)/100:0,contentAspect:Math.round(100*h)/100,fitCover:'cover'===p?1:0,scale:Math.round(100*t)/100,panExtentX:Math.round(P),panExtentY:Math.round(E),tx:Math.round(r.value),ty:Math.round(s.value)})};return T.__closure={scale:e,heightFor:o,committedScale:n,savedTx:c,tx:r,savedTy:l,ty:s,viewportWidth:u,streamPanExtent:_,contentAspect:h,fit:p,traceSample:v,lastPinchEndMs:f,traceRelease:S,runOnJS:x,reportZoom:w},T.__workletHash=0xc12b309633c,T.__initData=t,T})({_worklet_13274452681532_init_data:Y,scale:L,heightFor:J,committedScale:R,savedTx:z,tx:D,savedTy:$,ty:V,viewportWidth:H,streamPanExtent:e.streamPanExtent,contentAspect:l,fit:N,traceSample:at,lastPinchEndMs:lt,traceRelease:ot,runOnJS:_.runOnJS,reportZoom:S}))),[K,R,lt,H,J,L,D,V,z,$,l,N,G,U,et,at,ot]),it=(0,t.useMemo)(()=>u.Gesture.Pan().maxPointers(1).minDistance(4).onStart((0,s.guardWorklet)('zoom.pan.start',(function({_worklet_3940181477555_init_data:t,scale:e,MIN_SCALE:o,traceBegin:n,traceSample:c}){const r=function(){e.value<=o||(n('pan'),c('start',{}))};return r.__closure={scale:e,MIN_SCALE:o,traceBegin:n,traceSample:c},r.__workletHash=3940181477555,r.__initData=t,r})({_worklet_3940181477555_init_data:F,scale:L,MIN_SCALE:h,traceBegin:et,traceSample:at}))).onUpdate((0,s.guardWorklet)('zoom.pan.update',(function({_worklet_4695793924676_init_data:t,scale:e,MIN_SCALE:o,viewportWidth:n,heightFor:c,streamPanExtent:r,contentAspect:l,fit:s,savedTx:u,savedTy:_,clampPan:h,tx:p,ty:v,traceSample:f}){const S=function(t){if(e.value<=o)return;const S=n,x=e.value,w=c(x),{x:T,y:M}=r(S,w,l,x,s),y=u.value+t.translationX,P=_.value+t.translationY,E=h({tx:y,ty:P,w:S,h:w,aspect:l,scale:x,fit:s});p.value=E.x,v.value=E.y,f('update',{pointers:1,rawX:y,rawY:P,limX:T,limY:M})};return S.__closure={scale:e,MIN_SCALE:o,viewportWidth:n,heightFor:c,streamPanExtent:r,contentAspect:l,fit:s,savedTx:u,savedTy:_,clampPan:h,tx:p,ty:v,traceSample:f},S.__workletHash=4695793924676,S.__initData=t,S})({_worklet_4695793924676_init_data:O,scale:L,MIN_SCALE:h,viewportWidth:H,heightFor:J,streamPanExtent:e.streamPanExtent,contentAspect:l,fit:N,savedTx:z,savedTy:$,clampPan:e.clampPan,tx:D,ty:V,traceSample:at}))).onEnd((0,s.guardWorklet)('zoom.pan.end',(function({_worklet_14321280360394_init_data:t,savedTx:e,tx:o,savedTy:n,ty:c,viewportWidth:r,heightFor:l,scale:s,streamPanExtent:u,contentAspect:_,fit:h,traceSample:p,traceRelease:v,runOnJS:f,reportZoom:S}){const x=function(){e.value=o.value,n.value=c.value;const t=r,x=l(s.value),{x:w,y:T}=u(t,x,_,s.value,h);p('end',{rawX:o.value,rawY:c.value,limX:w,limY:T}),v(),f(S)('pan',{viewportW:Math.round(t),viewportH:Math.round(x),viewportAspect:x>0?Math.round(t/x*100)/100:0,contentAspect:Math.round(100*_)/100,fitCover:'cover'===h?1:0,scale:Math.round(100*s.value)/100,panExtentX:Math.round(w),panExtentY:Math.round(T),tx:Math.round(o.value),ty:Math.round(c.value),atLimitX:Math.abs(Math.abs(o.value)-w)<1?1:0,atLimitY:Math.abs(Math.abs(c.value)-T)<1?1:0})};return x.__closure={savedTx:e,tx:o,savedTy:n,ty:c,viewportWidth:r,heightFor:l,scale:s,streamPanExtent:u,contentAspect:_,fit:h,traceSample:p,traceRelease:v,runOnJS:f,reportZoom:S},x.__workletHash=0xd066ed41fca,x.__initData=t,x})({_worklet_14321280360394_init_data:b,savedTx:z,tx:D,savedTy:$,ty:V,viewportWidth:H,heightFor:J,scale:L,streamPanExtent:e.streamPanExtent,contentAspect:l,fit:N,traceSample:at,traceRelease:ot,runOnJS:_.runOnJS,reportZoom:S}))),[L,H,J,D,V,z,$,l,N,et,at,ot]),ut=(0,_.useAnimatedStyle)((function({_worklet_4116608177168_init_data:t,scale:e,foldGrowth:o,tx:n,ty:c,heightFor:r,ZOOM_MIN:l}){const s=function(){const t=e.value,s=o({scale:t,tx:n.value,ty:c.value,boxHeight:r(t),restHeight:r(l)});return{transform:[{translateX:s.tx},{translateY:s.ty},{scale:s.scale}]}};return s.__closure={scale:e,foldGrowth:o,tx:n,ty:c,heightFor:r,ZOOM_MIN:l},s.__workletHash=4116608177168,s.__initData=t,s})({_worklet_4116608177168_init_data:W,scale:L,foldGrowth:n.foldGrowth,tx:D,ty:V,heightFor:J,ZOOM_MIN:o.ZOOM_MIN})),_t=(0,t.useCallback)((function({_worklet_7064448155811_init_data:t,tapStepAccepted:e,lastPinchEndMs:o,scale:n,nextZoomStep:c,viewportWidth:r,heightFor:l,MIN_SCALE:s,MIN_VIEWPORT:u,resetZoom:_,focalPan:h,tx:p,ty:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,withTiming:T,committedScale:M,savedTx:y,savedTy:P,traceBegin:E,traceSample:A,f2:Z,traceRelease:k}){const X=function(t,X){if(!e({nowMs:Date.now(),lastPinchEndMs:o.value}))return;const Y=n.value,F=c(Y),O=r,b=l(Y);if(F<=s||O<u||b<u)return void _();const W=l(F),I=h({focalNow:t,focalStart:t,center:O/2,panStart:p.value,scaleStart:Y*b,scaleAfter:F*W}),N=h({focalNow:X,focalStart:X,center:b/2,centerAfter:W/2,panStart:v.value,scaleStart:Y*b,scaleAfter:F*W}),{x:C,y:B}=f(O,W,S,F,x),{x:H,y:J}=w({tx:I,ty:N,w:O,h:W,aspect:S,scale:F,fit:x});n.value=T(F),M.value=F,p.value=T(H),y.value=H,v.value=T(J),P.value=J,E('double-tap'),A('step',{focalX:t,focalY:X,rawX:I,rawY:N,x:H,y:J,limX:C,limY:B,boxH:W,note:b===W?`${Z(Y)}\u2192${Z(F)}`:`${Z(Y)}\u2192${Z(F)} box ${Math.round(b)}\u2192${Math.round(W)}`}),k()};return X.__closure={tapStepAccepted:e,lastPinchEndMs:o,scale:n,nextZoomStep:c,viewportWidth:r,heightFor:l,MIN_SCALE:s,MIN_VIEWPORT:u,resetZoom:_,focalPan:h,tx:p,ty:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,withTiming:T,committedScale:M,savedTx:y,savedTy:P,traceBegin:E,traceSample:A,f2:Z,traceRelease:k},X.__workletHash=7064448155811,X.__initData=t,X})({_worklet_7064448155811_init_data:I,tapStepAccepted:c.tapStepAccepted,lastPinchEndMs:lt,scale:L,nextZoomStep:o.nextZoomStep,viewportWidth:H,heightFor:J,MIN_SCALE:h,MIN_VIEWPORT:v,resetZoom:rt,focalPan:o.focalPan,tx:D,ty:V,streamPanExtent:e.streamPanExtent,contentAspect:l,fit:N,clampPan:e.clampPan,withTiming:_.withTiming,committedScale:R,savedTx:z,savedTy:$,traceBegin:et,traceSample:at,f2:T,traceRelease:ot}),[L,R,lt,H,J,D,V,z,$,l,N,rt,et,at,ot]),mt=(0,t.useCallback)((...t)=>u.Gesture.Simultaneous(st,it,...t),[st,it]);return(0,t.useMemo)(()=>({scale:L,committedScale:R,videoStyle:ut,resetZoom:rt,stepZoomAt:_t,snapZoom:ct,composeWith:mt,traceBox:nt}),[L,R,ut,rt,_t,ct,mt,nt])};var t=_r(d[0]),e=_r(d[1]),o=_r(d[2]),n=_r(d[3]),c=_r(d[4]),r=_r(d[5]),l=_r(d[6]),s=_r(d[7]),u=_r(d[8]),_=_r(d[9]);const h=o.ZOOM_MIN,p=o.ZOOM_MAX,v=10,f=1.7777777777777777;function S(t,e){l.log.debug('live:zoom',`zoom ${t} end`,e)}const x=600;function w(t,e){if(0===e.length)return;const o=e[e.length-1],n=void 0===o?0:Math.round(o.t);l.log.debug('live:zoom',`zoom trace \u2014 ${t}, ${e.length} samples over ${n} ms\n${(0,r.formatZoomTrace)(e)}`)}const T=(function({_worklet_12903011362749_init_data:t}){const e=function(t){return t.toFixed(2)};return e.__closure={},e.__workletHash=0xbbc3768a7bd,e.__initData=t,e})({_worklet_12903011362749_init_data:{code:"function useStreamZoomTs1(n){return n.toFixed(2);}"}}),M={code:"function useStreamZoomTs2(){const{takeZoomTrace,traceBuf,traceKind,runOnJS,reportZoomTrace}=this.__closure;const samples=takeZoomTrace(traceBuf.value);const kind=traceKind.value;if(samples.length>0)runOnJS(reportZoomTrace)(kind,samples);}"},y={code:"function useStreamZoomTs3(kind_0){const{trace,takeZoomTrace,traceBuf,runOnJS,reportZoomTrace,traceKind,beginZoomTrace}=this.__closure;if(!trace)return;const pending=takeZoomTrace(traceBuf.value);if(pending.length>0)runOnJS(reportZoomTrace)(traceKind.value,pending);traceKind.value=kind_0;beginZoomTrace(traceBuf.value,Date.now());}"},P={code:"function useStreamZoomTs4(phase,extra){const{trace,traceBuf,pushZoomSample,zoomTraceElapsed,scale,committedScale,tx,ty,viewportWidth,heightFor}=this.__closure;if(!trace)return;const buf=traceBuf.value;if(buf.startedAt===0)return;pushZoomSample(buf,{t:zoomTraceElapsed(buf,Date.now()),phase:phase,live:scale.value,committed:committedScale.value,x:tx.value,y:ty.value,boxW:viewportWidth,boxH:heightFor(scale.value),...extra});}"},E={code:"function useStreamZoomTs5(){const{trace,runOnJS,armTraceFlush}=this.__closure;if(!trace)return;runOnJS(armTraceFlush)();}"},A={code:"function useStreamZoomTs6(drawnHeight){const{traceSample}=this.__closure;traceSample('box',{drawnH:drawnHeight});}"},Z={code:"function useStreamZoomTs7(){const{scale,withTiming,committedScale,tx,ty,savedTx,savedTy}=this.__closure;scale.value=withTiming(1);committedScale.value=1;tx.value=withTiming(0);ty.value=withTiming(0);savedTx.value=0;savedTy.value=0;}"},k={code:"function useStreamZoomTs8(e){const{pinchStartScale,committedScale,pinchFocalX,pinchFocalY,traceBegin,traceSample}=this.__closure;pinchStartScale.value=committedScale.value;pinchFocalX.value=e.focalX;pinchFocalY.value=e.focalY;traceBegin('pinch');traceSample('start',{focalX:e.focalX,focalY:e.focalY,pointers:e.numberOfPointers});}"},X={code:"function useStreamZoomTs9(e_0){const{viewportWidth,pinchStartScale,MIN_SCALE,MAX_SCALE,heightFor,MIN_VIEWPORT,scale,focalPan,pinchFocalX,savedTx,pinchFocalY,savedTy,streamPanExtent,contentAspect,fit,clampPan,tx,ty,traceSample}=this.__closure;if(e_0.numberOfPointers<2)return;const w=viewportWidth;const s0=pinchStartScale.value;const s1=Math.max(MIN_SCALE,Math.min(MAX_SCALE,s0*e_0.scale));const h0=heightFor(s0);const h=heightFor(s1);if(w<MIN_VIEWPORT||h<MIN_VIEWPORT)return;scale.value=s1;const ptx=focalPan({focalNow:e_0.focalX,focalStart:pinchFocalX.value,center:w/2,panStart:savedTx.value,scaleStart:s0*h0,scaleAfter:s1*h});const pty=focalPan({focalNow:e_0.focalY,focalStart:pinchFocalY.value,center:h0/2,centerAfter:h/2,panStart:savedTy.value,scaleStart:s0*h0,scaleAfter:s1*h});const{x:limX,y:limY}=streamPanExtent(w,h,contentAspect,s1,fit);const clamped=clampPan({tx:ptx,ty:pty,w:w,h:h,aspect:contentAspect,scale:s1,fit:fit});tx.value=clamped.x;ty.value=clamped.y;traceSample('update',{pointers:e_0.numberOfPointers,focalX:e_0.focalX,focalY:e_0.focalY,rawX:ptx,rawY:pty,limX:limX,limY:limY});}"},Y={code:"function useStreamZoomTs10(){const{scale,heightFor,committedScale,savedTx,tx,savedTy,ty,viewportWidth,streamPanExtent,contentAspect,fit,traceSample,lastPinchEndMs,traceRelease,runOnJS,reportZoom}=this.__closure;const s=scale.value;const boxBefore=heightFor(committedScale.value);committedScale.value=s;savedTx.value=tx.value;savedTy.value=ty.value;const w_0=viewportWidth;const h_0=heightFor(s);const{x:limX_0,y:limY_0}=streamPanExtent(w_0,h_0,contentAspect,s,fit);traceSample('end',{rawX:tx.value,rawY:ty.value,limX:limX_0,limY:limY_0,note:boxBefore===h_0?undefined:\"box \"+Math.round(boxBefore)+\"\\u2192\"+Math.round(h_0)});lastPinchEndMs.value=Date.now();traceRelease();runOnJS(reportZoom)('pinch',{viewportW:Math.round(w_0),viewportH:Math.round(h_0),viewportAspect:h_0>0?Math.round(w_0/h_0*100)/100:0,contentAspect:Math.round(contentAspect*100)/100,fitCover:fit==='cover'?1:0,scale:Math.round(s*100)/100,panExtentX:Math.round(limX_0),panExtentY:Math.round(limY_0),tx:Math.round(tx.value),ty:Math.round(ty.value)});}"},F={code:"function useStreamZoomTs11(){const{scale,MIN_SCALE,traceBegin,traceSample}=this.__closure;if(scale.value<=MIN_SCALE)return;traceBegin('pan');traceSample('start',{});}"},O={code:"function useStreamZoomTs12(e_1){const{scale,MIN_SCALE,viewportWidth,heightFor,streamPanExtent,contentAspect,fit,savedTx,savedTy,clampPan,tx,ty,traceSample}=this.__closure;if(scale.value<=MIN_SCALE)return;const w_1=viewportWidth;const s_0=scale.value;const h_1=heightFor(s_0);const{x:limX_1,y:limY_1}=streamPanExtent(w_1,h_1,contentAspect,s_0,fit);const rawX=savedTx.value+e_1.translationX;const rawY=savedTy.value+e_1.translationY;const clamped_0=clampPan({tx:rawX,ty:rawY,w:w_1,h:h_1,aspect:contentAspect,scale:s_0,fit:fit});tx.value=clamped_0.x;ty.value=clamped_0.y;traceSample('update',{pointers:1,rawX:rawX,rawY:rawY,limX:limX_1,limY:limY_1});}"},b={code:"function useStreamZoomTs13(){const{savedTx,tx,savedTy,ty,viewportWidth,heightFor,scale,streamPanExtent,contentAspect,fit,traceSample,traceRelease,runOnJS,reportZoom}=this.__closure;savedTx.value=tx.value;savedTy.value=ty.value;const w_2=viewportWidth;const h_2=heightFor(scale.value);const{x:limX_2,y:limY_2}=streamPanExtent(w_2,h_2,contentAspect,scale.value,fit);traceSample('end',{rawX:tx.value,rawY:ty.value,limX:limX_2,limY:limY_2});traceRelease();runOnJS(reportZoom)('pan',{viewportW:Math.round(w_2),viewportH:Math.round(h_2),viewportAspect:h_2>0?Math.round(w_2/h_2*100)/100:0,contentAspect:Math.round(contentAspect*100)/100,fitCover:fit==='cover'?1:0,scale:Math.round(scale.value*100)/100,panExtentX:Math.round(limX_2),panExtentY:Math.round(limY_2),tx:Math.round(tx.value),ty:Math.round(ty.value),atLimitX:Math.abs(Math.abs(tx.value)-limX_2)<1?1:0,atLimitY:Math.abs(Math.abs(ty.value)-limY_2)<1?1:0});}"},W={code:"function useStreamZoomTs14(){const{scale,foldGrowth,tx,ty,heightFor,ZOOM_MIN}=this.__closure;const s_1=scale.value;const r=foldGrowth({scale:s_1,tx:tx.value,ty:ty.value,boxHeight:heightFor(s_1),restHeight:heightFor(ZOOM_MIN)});return{transform:[{translateX:r.tx},{translateY:r.ty},{scale:r.scale}]};}"},I={code:"function useStreamZoomTs15(x,y){const{tapStepAccepted,lastPinchEndMs,scale,nextZoomStep,viewportWidth,heightFor,MIN_SCALE,MIN_VIEWPORT,resetZoom,focalPan,tx,ty,streamPanExtent,contentAspect,fit,clampPan,withTiming,committedScale,savedTx,savedTy,traceBegin,traceSample,f2,traceRelease}=this.__closure;if(!tapStepAccepted({nowMs:Date.now(),lastPinchEndMs:lastPinchEndMs.value}))return;const s0_0=scale.value;const s1_0=nextZoomStep(s0_0);const w_3=viewportWidth;const h0_0=heightFor(s0_0);if(s1_0<=MIN_SCALE||w_3<MIN_VIEWPORT||h0_0<MIN_VIEWPORT){resetZoom();return;}const h1=heightFor(s1_0);const ptx_0=focalPan({focalNow:x,focalStart:x,center:w_3/2,panStart:tx.value,scaleStart:s0_0*h0_0,scaleAfter:s1_0*h1});const pty_0=focalPan({focalNow:y,focalStart:y,center:h0_0/2,centerAfter:h1/2,panStart:ty.value,scaleStart:s0_0*h0_0,scaleAfter:s1_0*h1});const{x:limX_3,y:limY_3}=streamPanExtent(w_3,h1,contentAspect,s1_0,fit);const{x:nx,y:ny}=clampPan({tx:ptx_0,ty:pty_0,w:w_3,h:h1,aspect:contentAspect,scale:s1_0,fit:fit});scale.value=withTiming(s1_0);committedScale.value=s1_0;tx.value=withTiming(nx);savedTx.value=nx;ty.value=withTiming(ny);savedTy.value=ny;traceBegin('double-tap');traceSample('step',{focalX:x,focalY:y,rawX:ptx_0,rawY:pty_0,x:nx,y:ny,limX:limX_3,limY:limY_3,boxH:h1,note:h0_0===h1?f2(s0_0)+\"\\u2192\"+f2(s1_0):f2(s0_0)+\"\\u2192\"+f2(s1_0)+\" box \"+Math.round(h0_0)+\"\\u2192\"+Math.round(h1)});traceRelease();}"}},1021,[16,1022,1097,1023,1024,1025,916,1098,1058,1059]);
21
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"containBox",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"coverBox",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"panExtent",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"streamPanExtent",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"clampPan",{enumerable:!0,get:function(){return _}});const t=(function({_worklet_16403026519218_init_data:t}){const n=function(t,n,o){return!Number.isFinite(o)||o<=0?{width:t,height:n}:{width:Math.min(t,n*o),height:Math.min(n,t/o)}};return n.__closure={},n.__workletHash=0xeeb2091a4b2,n.__initData=t,n})({_worklet_16403026519218_init_data:{code:"function containBox_streamZoomClampTs1(w,h,aspect){if(!Number.isFinite(aspect)||aspect<=0)return{width:w,height:h};return{width:Math.min(w,h*aspect),height:Math.min(h,w/aspect)};}"}}),n=(function({_worklet_12373137558124_init_data:t}){const n=function(t,n,o){return!Number.isFinite(o)||o<=0?{width:t,height:n}:{width:Math.max(t,n*o),height:Math.max(n,t/o)}};return n.__closure={},n.__workletHash=0xb40d8780a6c,n.__initData=t,n})({_worklet_12373137558124_init_data:{code:"function coverBox_streamZoomClampTs2(w,h,aspect){if(!Number.isFinite(aspect)||aspect<=0)return{width:w,height:h};return{width:Math.max(w,h*aspect),height:Math.max(h,w/aspect)};}"}}),o=(function({_worklet_7793081511060_init_data:t}){const n=function(t,n,o){return Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(o)?Math.max(0,(o*n-t)/2):0};return n.__closure={},n.__workletHash=7793081511060,n.__initData=t,n})({_worklet_7793081511060_init_data:{code:"function panExtent_streamZoomClampTs3(containerDim,contentDim,scale){if(!Number.isFinite(containerDim)||!Number.isFinite(contentDim)||!Number.isFinite(scale)){return 0;}return Math.max(0,(scale*contentDim-containerDim)/2);}"}}),c=(function({_worklet_17001621453331_init_data:t,coverBox:n,containBox:o,panExtent:c}){const _=function(t,_,s,u,h="contain"){const x='cover'===h?n(t,_,s):o(t,_,s);return{x:c(t,x.width,u),y:c(_,x.height,u)}};return _.__closure={coverBox:n,containBox:o,panExtent:c},_.__workletHash=0xf767f9b7a13,_.__initData=t,_})({_worklet_17001621453331_init_data:{code:"function streamPanExtent_streamZoomClampTs4(w,h,aspect,scale,fit='contain'){const{coverBox,containBox,panExtent}=this.__closure;const box=fit==='cover'?coverBox(w,h,aspect):containBox(w,h,aspect);return{x:panExtent(w,box.width,scale),y:panExtent(h,box.height,scale)};}"},coverBox:n,containBox:t,panExtent:o}),_=(function({_worklet_11264439652914_init_data:t,streamPanExtent:n}){const o=function(t){if(t.scale<=1)return{x:0,y:0};const{x:o,y:c}=n(t.w,t.h,t.aspect,t.scale,t.fit);return{x:Math.max(-o,Math.min(o,t.tx)),y:Math.max(-c,Math.min(c,t.ty))}};return o.__closure={streamPanExtent:n},o.__workletHash=0xa3eb4ec9232,o.__initData=t,o})({_worklet_11264439652914_init_data:{code:"function clampPan_streamZoomClampTs5(input){const{streamPanExtent}=this.__closure;if(input.scale<=1)return{x:0,y:0};const{x:limX,y:limY}=streamPanExtent(input.w,input.h,input.aspect,input.scale,input.fit);return{x:Math.max(-limX,Math.min(limX,input.tx)),y:Math.max(-limY,Math.min(limY,input.ty))};}"},streamPanExtent:c})},1022,[]);
22
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"foldGrowth",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"growBoxHeight",{enumerable:!0,get:function(){return n}});const t=(function({_worklet_1598582764024_init_data:t}){const n=function(t){const{scale:n,tx:o,ty:s,boxHeight:c,restHeight:u}=t;return{scale:n*(u>0&&Number.isFinite(c/u)?c/u:1),tx:o,ty:s+(c-u)/2}};return n.__closure={},n.__workletHash=1598582764024,n.__initData=t,n})({_worklet_1598582764024_init_data:{code:"function foldGrowth_zoomRenderTs1(input){const{scale:scale,tx:tx,ty:ty,boxHeight:boxHeight,restHeight:restHeight}=input;const growth=restHeight>0&&Number.isFinite(boxHeight/restHeight)?boxHeight/restHeight:1;return{scale:scale*growth,tx:tx,ty:ty+(boxHeight-restHeight)/2};}"}}),n=(function({_worklet_6509324771015_init_data:t}){const n=function(t,n){const o=n.growScale-1;if(!(o>0&&Number.isFinite(t)))return n.rest;const s=Math.max(0,Math.min(1,(t-1)/o));return n.rest+(n.max-n.rest)*s};return n.__closure={},n.__workletHash=6509324771015,n.__initData=t,n})({_worklet_6509324771015_init_data:{code:"function growBoxHeight_zoomRenderTs2(scale,rule){const span=rule.growScale-1;if(!(span>0)||!Number.isFinite(scale))return rule.rest;const t=Math.max(0,Math.min(1,(scale-1)/span));return rule.rest+(rule.max-rule.rest)*t;}"}})},1023,[]);
23
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TAP_AFTER_PINCH_MS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"tapStepAccepted",{enumerable:!0,get:function(){return n}});const t=350,n=(function({_worklet_8291923632438_init_data:t,TAP_AFTER_PINCH_MS:n}){const _=function(t){const _=t.nowMs-t.lastPinchEndMs;return _<0||_>=n};return _.__closure={TAP_AFTER_PINCH_MS:n},_.__workletHash=8291923632438,_.__initData=t,_})({_worklet_8291923632438_init_data:{code:"function tapStepAccepted_zoomTapGateTs1(input){const{TAP_AFTER_PINCH_MS}=this.__closure;const since=input.nowMs-input.lastPinchEndMs;if(since<0)return true;return since>=TAP_AFTER_PINCH_MS;}"},TAP_AFTER_PINCH_MS:t})},1024,[]);
24
- __d(function(g,_r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ZOOM_TRACE_CAP",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ZOOM_TRACE_UPDATE_MIN_MS",{enumerable:!0,get:function(){return o}}),e.newZoomTraceBuffer=function(){return{samples:[],startedAt:0,lastUpdateT:-32,lastBoxT:-32}},Object.defineProperty(e,"beginZoomTrace",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"zoomTraceElapsed",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"pushZoomSample",{enumerable:!0,get:function(){return r}}),Object.defineProperty(e,"takeZoomTrace",{enumerable:!0,get:function(){return s}}),e.formatZoomTrace=function(t){return t.map(t=>{const o=[`${`+${l(t.t)}ms`.padStart(7)} ${t.phase.padEnd(6)}`,`live ${u(t.live)}`,`committed ${u(t.committed)}`];void 0!==t.pointers&&o.push(`${t.pointers} fingers`),void 0!==t.focalX&&void 0!==t.focalY&&o.push(`focal ${l(t.focalX)},${l(t.focalY)}`);const _=c(t);return''!==_&&o.push(_),void 0!==t.limX&&void 0!==t.limY&&o.push(`limit \xb1${l(t.limX)},\xb1${l(t.limY)}`),void 0!==t.drawnH&&o.push(`drawn ${l(t.drawnH)} of ${l(t.boxH)} asked`),o.push(`box ${l(t.boxW)}x${l(t.boxH)}`),void 0!==t.note&&o.push(t.note),o.join(' ')}).join('\n')};const t=400,o=32;const _=(function({_worklet_8237240510461_init_data:t,ZOOM_TRACE_UPDATE_MIN_MS:o}){const _=function(t,_){t.samples=[],t.startedAt=_,t.lastUpdateT=-o,t.lastBoxT=-o};return _.__closure={ZOOM_TRACE_UPDATE_MIN_MS:o},_.__workletHash=8237240510461,_.__initData=t,_})({_worklet_8237240510461_init_data:{code:"function beginZoomTrace_zoomTraceTs1(buf,now){const{ZOOM_TRACE_UPDATE_MIN_MS}=this.__closure;buf.samples=[];buf.startedAt=now;buf.lastUpdateT=-ZOOM_TRACE_UPDATE_MIN_MS;buf.lastBoxT=-ZOOM_TRACE_UPDATE_MIN_MS;}"},ZOOM_TRACE_UPDATE_MIN_MS:o}),n=(function({_worklet_14504184843227_init_data:t}){const o=function(t,o){return 0===t.startedAt?0:o-t.startedAt};return o.__closure={},o.__workletHash=0xd3104c90bdb,o.__initData=t,o})({_worklet_14504184843227_init_data:{code:"function zoomTraceElapsed_zoomTraceTs2(buf,now){return buf.startedAt===0?0:now-buf.startedAt;}"}}),r=(function({_worklet_9921221962001_init_data:t,ZOOM_TRACE_UPDATE_MIN_MS:o,ZOOM_TRACE_CAP:_}){const n=function(t,n){if('update'===n.phase){if(n.t-t.lastUpdateT<o)return;t.lastUpdateT=n.t}else if('box'===n.phase){if(n.t-t.lastBoxT<o)return;t.lastBoxT=n.t}t.samples.length>=_||t.samples.push(n)};return n.__closure={ZOOM_TRACE_UPDATE_MIN_MS:o,ZOOM_TRACE_CAP:_},n.__workletHash=9921221962001,n.__initData=t,n})({_worklet_9921221962001_init_data:{code:"function pushZoomSample_zoomTraceTs3(buf,sample){const{ZOOM_TRACE_UPDATE_MIN_MS,ZOOM_TRACE_CAP}=this.__closure;if(sample.phase==='update'){if(sample.t-buf.lastUpdateT<ZOOM_TRACE_UPDATE_MIN_MS)return;buf.lastUpdateT=sample.t;}else if(sample.phase==='box'){if(sample.t-buf.lastBoxT<ZOOM_TRACE_UPDATE_MIN_MS)return;buf.lastBoxT=sample.t;}if(buf.samples.length>=ZOOM_TRACE_CAP)return;buf.samples.push(sample);}"},ZOOM_TRACE_UPDATE_MIN_MS:o,ZOOM_TRACE_CAP:t}),s=(function({_worklet_16791759848171_init_data:t}){const o=function(t){const o=t.samples;return t.samples=[],t.startedAt=0,o};return o.__closure={},o.__workletHash=0xf45a2e182eb,o.__initData=t,o})({_worklet_16791759848171_init_data:{code:"function takeZoomTrace_zoomTraceTs4(buf){const out=buf.samples;buf.samples=[];buf.startedAt=0;return out;}"}}),u=t=>t.toFixed(2),l=t=>String(Math.round(t));function c(t){if(void 0===t.rawX||void 0===t.rawY)return'';const o=Math.abs(t.rawX-t.x)>.5,_=Math.abs(t.rawY-t.y)>.5,n=o||_?` CLAMPED ${o?'x':''}${_?'y':''}`:'';return`pan ${l(t.x)},${l(t.y)} (raw ${l(t.rawX)},${l(t.rawY)}${n})`}},1025,[]);
25
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.buildExportSelectionInput=p,e.useExportSelection=function(S,v){const{t:M}=(0,o.useTranslation)(),x=(0,n.useConfirm)(),E=(0,n.useNotice)(),C=(0,l.useCreateExport)(),{state:_}=(0,c.useConnection)(),b=(0,t.useCallback)(()=>{const t=(0,f.selectActiveEpoch)(v.state);null!==t&&v.beginSelection(t)},[v]),A=(0,t.useCallback)(()=>{v.endSelection()},[v]),I=(0,t.useCallback)((t,o)=>{(async()=>{if('partial'===o){if(!await x({title:M('v2.exportSelection.gapTitle'),message:M('v2.exportSelection.gapMessage',{duration:(0,u.formatSelectionDuration)(t.durationMs)}),confirmLabel:M('v2.exportSelection.gapConfirm'),cancelLabel:M('common.cancel')}))return}try{const n=p(S,t);s.log.info('exports','createExport from timeline selection',{deviceId:S,fromMs:n.fromMs,toMs:n.toMs,coverage:o});const c=await C.mutateAsync(n);E({title:M('v2.exportSelection.title'),message:M(null===c?'v2.exportSelection.failed':'v2.exportSelection.queued')})}catch{E({title:M('v2.exportSelection.title'),message:M('v2.exportSelection.failed')})}finally{v.endSelection()}})()},[x,C,S,E,v,M]);return(0,t.useEffect)(()=>{'connected'!==_&&null!==v.state.selectionAnchor&&v.endSelection()},[_,v]),(0,t.useMemo)(()=>({anchorMs:v.state.selectionAnchor,onBegin:b,onSave:I,onDiscard:A,saving:C.isPending}),[v.state.selectionAnchor,b,I,A,C.isPending])};var t=r(d[0]),o=r(d[1]),n=r(d[2]),c=r(d[3]),l=r(d[4]),s=r(d[5]),u=r(d[6]),f=r(d[7]);function p(t,o){return{deviceId:t,profiles:[u.EXPORT_SELECTION_PROFILE],fromMs:o.fromMs,toMs:o.toMs,options:{includeAudio:!0,maxLifeMs:u.EXPORT_SELECTION_LIFE_MS,deleteAfterDownload:!1}}}},1026,[16,813,921,815,1099,916,1066,991]);
26
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamOverlayControls=function(c){const p=(0,t.c)(48),{visible:T,onRequestHide:h,paused:v,onTogglePause:y,showPlayPause:P,muted:f,onToggleMute:x,audio:b,hasTwoWayAudio:S,talking:_,onToggleTalk:k,onStartSystemPip:w,fullscreen:M,onToggleFullscreen:B,edgePad:D,timelineToggle:O}=c,{t:H}=(0,s.useTranslation)();let j;p[0]===Symbol.for("react.memo_cache_sentinel")?(j=(0,n.systemPipSupported)("web"),p[0]=j):j=p[0];const q=j;let z,A;p[1]!==b||p[2]!==f||p[3]!==x||p[4]!==H?(z=(0,n.muteDisc)({muted:f,onToggleMute:x,cluster:"left",t:H,audio:b}),p[1]=b,p[2]=f,p[3]=x,p[4]=H,p[5]=z):z=p[5];if(p[6]!==M||p[7]!==S||p[8]!==w||p[9]!==B||p[10]!==y||p[11]!==k||p[12]!==v||p[13]!==P||p[14]!==H||p[15]!==z||p[16]!==_||p[17]!==O){let t;A=[z],p[19]!==S||p[20]!==k||p[21]!==H||p[22]!==_?(t=(0,n.talkDisc)({hasTwoWayAudio:S,talking:_,onToggleTalk:k,cluster:"left",t:H}),p[19]=S,p[20]=k,p[21]=H,p[22]=_,p[23]=t):t=p[23];const s=t;if(s&&A.push(s),O){let t,s;p[24]!==H||p[25]!==O.expanded?(t=O.expanded?H("v2.timeline.hideTimeline"):H("v2.timeline.showTimeline"),p[24]=H,p[25]=O.expanded,p[26]=t):t=p[26],p[27]!==t||p[28]!==O.expanded||p[29]!==O.onToggle?(s={id:"timeline",icon:l.History,label:t,active:O.expanded,onPress:O.onToggle,cluster:"left"},p[27]=t,p[28]=O.expanded,p[29]=O.onToggle,p[30]=s):s=p[30],A.push(s)}let o;P&&A.push({id:"play",icon:v?l.Play:l.Pause,label:H(v?"v2.streamBar.play":"v2.streamBar.pause"),onPress:y,cluster:"right"}),p[31]!==w||p[32]!==H?(o=(0,n.systemPipDisc)({supported:q,onStartSystemPip:w,cluster:"right",t:H}),p[31]=w,p[32]=H,p[33]=o):o=p[33];const u=o;u&&A.push(u);const c=M?l.Minimize2:l.Maximize2;let T,h;p[34]!==M||p[35]!==H?(T=H(M?"v2.streamBar.exitFullscreen":"v2.streamBar.fullscreen"),p[34]=M,p[35]=H,p[36]=T):T=p[36],p[37]!==M||p[38]!==B||p[39]!==c||p[40]!==T?(h={id:"fullscreen",icon:c,label:T,active:M,onPress:B,cluster:"right"},p[37]=M,p[38]=B,p[39]=c,p[40]=T,p[41]=h):h=p[41],A.push(h),p[6]=M,p[7]=S,p[8]=w,p[9]=B,p[10]=y,p[11]=k,p[12]=v,p[13]=P,p[14]=H,p[15]=z,p[16]=_,p[17]=O,p[18]=A}else A=p[18];const F=A;let R;p[42]!==D||p[43]!==F||p[44]!==h||p[45]!==v||p[46]!==T?(R=(0,u.jsx)(o.OverlayDiscGroup,{visible:T,onRequestHide:h,holdOpen:v,items:F,edgePad:D}),p[42]=D,p[43]=F,p[44]=h,p[45]=v,p[46]=T,p[47]=R):R=p[47];return R};var t=r(d[0]);r(d[1]),r(d[2]);var l=r(d[3]),s=r(d[4]),o=r(d[5]),n=r(d[6]),u=r(d[7])},1027,[787,16,110,814,813,1001,1002,10]);
27
- __d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DRIVE_OVERLAY_TEST_ID",{enumerable:!0,get:function(){return O}}),_e.DriveOverlay=function(t){const E=(0,e.c)(75),{deviceId:I,visible:j,edgePad:x,onOpenControls:P,drawer:w}=t,{t:z}=(0,c.useTranslation)(),{width:V}=(0,l.useViewportSize)(),A=(0,f.useNavigation)(I,!0),[C,L]=(0,o.useState)(!1);let R;E[0]===Symbol.for("react.memo_cache_sentinel")?(R=()=>L(!0),E[0]=R):R=E[0];const k=R;let B;E[1]!==A?(B=()=>{L(!1),A.stopDrive()},E[1]=A,E[2]=B):B=E[2];const T=B;if(!j&&!C)return null;const F=!0===A.status?.flash;let H,M,N,Y,G,Z,J,q,K,W,Q,U,X,$,tt,et,ot;if(E[3]!==w||E[4]!==x||E[5]!==F||E[6]!==A||E[7]!==T||E[8]!==z||E[9]!==V){const t=(0,b.actionEntry)(A.actions,"personFollow"),e=(0,b.actionEntry)(A.actions,"goHome"),o=(0,b.actionEntry)(A.actions,"stop");N=!0!==w?.open;const l=1+(A.features?.light?1:0)+(t?1:0)+(e?1:0)+(N?1:0);let c;E[24]!==l||E[25]!==w||E[26]!==x||E[27]!==V?(c=(0,h.driveOverlayLayout)({windowWidth:V,edgePad:x,drawer:w,discSize:p.OVERLAY_DISC_SIZE,joystickSize:y.DRIVE_JOYSTICK_SIZE,buttonCount:l}),E[24]=l,E[25]=w,E[26]=x,E[27]=V,E[28]=c):c=E[28];const f=c;Y=f.discSize;const I=x.bottom+v.SPACING.md+p.OVERLAY_DISC_SIZE+v.SPACING.lg;M=s.default,$=n.default.absoluteFill,G="box-none",Z=O;const j=x.left+v.SPACING.md;let P,C;E[29]!==I||E[30]!==j?(P=[_.stick,{left:j,bottom:I}],E[29]=I,E[30]=j,E[31]=P):P=E[31],E[32]!==A.driveVector||E[33]!==T?(C=(0,D.jsx)(y.DriveJoystick,{onVector:A.driveVector,onRelease:T,onEngage:k}),E[32]=A.driveVector,E[33]=T,E[34]=C):C=E[34],E[35]!==P||E[36]!==C?(J=(0,D.jsx)(s.default,{style:P,children:C}),E[35]=P,E[36]=C,E[37]=J):J=E[37],H=s.default,E[38]!==I||E[39]!==f.gap||E[40]!==f.right?(q=[_.buttons,{right:f.right,bottom:I,gap:f.gap}],E[38]=I,E[39]=f.gap,E[40]=f.right,E[41]=q):q=E[41],K="box-none";const L=S(o,z("v2.navigation.stop"));let R;E[42]!==A||E[43]!==o?(R=()=>{A.stopDrive(),o&&A.runAction("stop")},E[42]=A,E[43]=o,E[44]=R):R=E[44],E[45]!==Y||E[46]!==L||E[47]!==R?(W=(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Square,label:L,onPress:R}),E[45]=Y,E[46]=L,E[47]=R,E[48]=W):W=E[48],E[49]!==F||E[50]!==A||E[51]!==Y||E[52]!==z?(Q=A.features?.light?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Lightbulb,label:z(F?"v2.navigation.lightOff":"v2.navigation.lightOn"),active:F,onPress:()=>A.setLightOn(!F)}):null,E[49]=F,E[50]=A,E[51]=Y,E[52]=z,E[53]=Q):Q=E[53],U=t?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Footprints,label:S(t,z("v2.navigation.followMe")),active:!0===A.status?.following,onPress:()=>A.runAction("personFollow")}):null,X=e?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Home,label:S(e,z("v2.navigation.returnToDock")),onPress:()=>A.runAction("goHome")}):null,E[3]=w,E[4]=x,E[5]=F,E[6]=A,E[7]=T,E[8]=z,E[9]=V,E[10]=H,E[11]=M,E[12]=N,E[13]=Y,E[14]=G,E[15]=Z,E[16]=J,E[17]=q,E[18]=K,E[19]=W,E[20]=Q,E[21]=U,E[22]=X,E[23]=$}else H=E[10],M=E[11],N=E[12],Y=E[13],G=E[14],Z=E[15],J=E[16],q=E[17],K=E[18],W=E[19],Q=E[20],U=E[21],X=E[22],$=E[23];E[54]!==P||E[55]!==N||E[56]!==Y||E[57]!==z?(tt=N?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.MoreHorizontal,label:z("v2.navigation.moreControls"),onPress:P}):null,E[54]=P,E[55]=N,E[56]=Y,E[57]=z,E[58]=tt):tt=E[58];E[59]!==H||E[60]!==tt||E[61]!==q||E[62]!==K||E[63]!==W||E[64]!==Q||E[65]!==U||E[66]!==X?(et=(0,D.jsxs)(H,{style:q,pointerEvents:K,children:[W,Q,U,X,tt]}),E[59]=H,E[60]=tt,E[61]=q,E[62]=K,E[63]=W,E[64]=Q,E[65]=U,E[66]=X,E[67]=et):et=E[67];E[68]!==M||E[69]!==G||E[70]!==Z||E[71]!==J||E[72]!==et||E[73]!==$?(ot=(0,D.jsxs)(M,{style:$,pointerEvents:G,testID:Z,children:[J,et]}),E[68]=M,E[69]=G,E[70]=Z,E[71]=J,E[72]=et,E[73]=$,E[74]=ot):ot=E[74];return ot};var e=r(d[0]),o=r(d[1]),n=t(r(d[2])),s=t(r(d[3])),l=r(d[4]),c=r(d[5]),u=r(d[6]),v=r(d[7]),f=r(d[8]),b=r(d[9]),p=r(d[10]),y=r(d[11]),h=r(d[12]),D=r(d[13]);const O='drive-overlay';function S(t,e){return t?.label??e}const _=n.default.create({stick:{position:'absolute'},buttons:{position:'absolute',flexDirection:'row',alignItems:'center'}})},1028,[787,16,33,115,906,813,814,831,1100,1101,1001,1102,1029,10]);
28
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DRIVE_DISC_MIN_SIZE",{enumerable:!0,get:function(){return n}}),e.driveOverlayLayout=function(o){const{windowWidth:c,edgePad:u,drawer:S,discSize:h,joystickSize:s,buttonCount:I}=o,P=(S?.open?Math.max(S.width,u.right):u.right)+t.SPACING.md,f=u.left+t.SPACING.md+s+t.SPACING.lg,C=c-P-f,l=I*h+Math.max(0,I-1)*t.SPACING.md;if(0===I||l<=C)return{right:P,discSize:h,gap:t.SPACING.md};const M=t.SPACING.sm,N=Math.floor((C-(I-1)*M)/I);return{right:P,discSize:Math.max(n,Math.min(h,N)),gap:M}};var t=r(d[0]);const n=28},1029,[831]);
29
- __d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ZoneDrawOverlay",{enumerable:!0,get:function(){return C}});var t=r(d[0]),o=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),i=e(r(d[4])),s=e(r(d[5])),c=r(d[6]),u=r(d[7]),h=e(u),y=r(d[8]),b=r(d[9]),f=r(d[10]),p=r(d[11]),x=r(d[12]);const S='#ffffff',j='rgba(0, 0, 0, 0.55)',C=(0,o.memo)(function(e){const f=(0,t.c)(122),{zone:j,onConfirm:C,onCancel:R}=e,{t:z}=(0,c.useTranslation)(),{colors:k}=(0,b.useTheme)();let I;f[0]===Symbol.for("react.memo_cache_sentinel")?(I={width:0,height:0},f[0]=I):I=f[0];const[T,W]=(0,o.useState)(I),[A,E]=(0,o.useState)("rect"===j?.kind?j.rect:null);let M;f[1]!==j?(M="polygon"===j?.kind?j.points:[],f[1]=j,f[2]=M):M=f[2];const[G,$]=(0,o.useState)(M),[D,N]=(0,o.useState)("polygon"===j?.kind?"polygon":"rect");let H;f[3]===Symbol.for("react.memo_cache_sentinel")?(H={x:0,y:0},f[3]=H):H=f[3];const U=(0,o.useRef)(H),F=(0,o.useRef)(!1);let O;f[4]===Symbol.for("react.memo_cache_sentinel")?(O=e=>{const{width:t,height:o}=e.nativeEvent.layout;W({width:t,height:o})},f[4]=O):O=f[4];const V=O;let X;f[5]===Symbol.for("react.memo_cache_sentinel")?(X=e=>{U.current={x:e.nativeEvent.locationX,y:e.nativeEvent.locationY},F.current=!1},f[5]=X):X=f[5];const Y=X;let q;f[6]!==T||f[7]!==D?(q=e=>{if(F.current=!0,"rect"!==D)return;const t=(0,p.dragToRect)(U.current.x,U.current.y,e.nativeEvent.locationX,e.nativeEvent.locationY,T.width,T.height);null!==t&&E(t)},f[6]=T,f[7]=D,f[8]=q):q=f[8];const L=q;let Z;f[9]!==T||f[10]!==D?(Z=()=>{if("polygon"!==D||F.current)return;if(T.width<=0||T.height<=0)return;const e={x:Math.min(1,Math.max(0,U.current.x/T.width)),y:Math.min(1,Math.max(0,U.current.y/T.height))};$(t=>[...t,e])},f[9]=T,f[10]=D,f[11]=Z):Z=f[11];const B=Z;let J;f[12]===Symbol.for("react.memo_cache_sentinel")?(J=()=>$(v),f[12]=J):J=f[12];const K=J;let Q;f[13]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>$([]),f[13]=Q):Q=f[13];const ee=Q;let te,oe;f[14]!==D||f[15]!==G||f[16]!==A?(te="rect"===D?null===A?null:(0,p.rectShape)(A):G.length>=3?{kind:"polygon",points:G}:null,oe=null!==te&&(0,p.isShapeUsable)(te),f[14]=D,f[15]=G,f[16]=A,f[17]=te,f[18]=oe):(te=f[17],oe=f[18]);const ne=oe;let le;f[19]!==te||f[20]!==C?(le=()=>{null!==te&&(0,p.isShapeUsable)(te)&&C(te)},f[19]=te,f[20]=C,f[21]=le):le=f[21];const re=le;let ie,se,ae,ce,de,ue,he,ye;f[22]===Symbol.for("react.memo_cache_sentinel")?(ie=[s.default.absoluteFill,_.container],f[22]=ie):ie=f[22],f[23]!==D||f[24]!==z?(se=z("polygon"===D?"v2.theater.zoneHintPolygon":"v2.theater.zoneHint"),f[23]=D,f[24]=z,f[25]=se):se=f[25],f[26]!==se?(ae=(0,x.jsx)(n.default,{style:_.hintWrap,pointerEvents:"none",children:(0,x.jsx)(n.default,{style:_.hintPill,children:(0,x.jsx)(l.default,{style:_.hintText,children:se})})}),f[26]=se,f[27]=ae):ae=f[27],f[28]!==T||f[29]!==k||f[30]!==D||f[31]!==A?(ce="rect"===D&&null!==A&&T.width>0?(0,x.jsx)(n.default,{pointerEvents:"none",style:[_.zoneRect,{borderColor:k.warning,backgroundColor:`${k.warning}26`,left:A.x*T.width,top:A.y*T.height,width:A.w*T.width,height:A.h*T.height}]}):null,f[28]=T,f[29]=k,f[30]=D,f[31]=A,f[32]=ce):ce=f[32],f[33]!==T||f[34]!==k||f[35]!==D||f[36]!==G?(de="polygon"===D&&G.length>0&&T.width>0?(0,x.jsxs)(h.default,{style:s.default.absoluteFill,pointerEvents:"none",children:[G.length>=3?(0,x.jsx)(u.Polygon,{points:G.map(e=>`${e.x*T.width},${e.y*T.height}`).join(" "),fill:`${k.warning}26`,stroke:k.warning,strokeWidth:1.5}):(0,x.jsx)(u.Polyline,{points:G.map(e=>`${e.x*T.width},${e.y*T.height}`).join(" "),fill:"none",stroke:k.warning,strokeWidth:1.5}),G.map((e,t)=>(0,x.jsx)(u.Circle,{cx:e.x*T.width,cy:e.y*T.height,r:5,fill:k.warning},`${e.x}:${e.y}:${t}`))]}):null,f[33]=T,f[34]=k,f[35]=D,f[36]=G,f[37]=de):de=f[37],f[38]!==k||f[39]!==D?(ue="rect"===D&&{backgroundColor:k.primary},f[38]=k,f[39]=D,f[40]=ue):ue=f[40],f[41]!==ue?(he=[_.modeChip,ue],f[41]=ue,f[42]=he):he=f[42],f[43]===Symbol.for("react.memo_cache_sentinel")?(ye=()=>N("rect"),f[43]=ye):ye=f[43];const be="rect"===D;let ge,fe,me,pe,xe,Se,je,Ce;f[44]!==be?(ge={selected:be},f[44]=be,f[45]=ge):ge=f[45],f[46]===Symbol.for("react.memo_cache_sentinel")?(fe=(0,x.jsx)(y.Square,{size:14,color:S}),f[46]=fe):fe=f[46],f[47]!==z?(me=z("v2.theater.zoneModeRect"),f[47]=z,f[48]=me):me=f[48],f[49]!==me?(pe=(0,x.jsx)(l.default,{style:_.modeText,children:me}),f[49]=me,f[50]=pe):pe=f[50],f[51]!==he||f[52]!==ge||f[53]!==pe?(xe=(0,x.jsxs)(i.default,{style:he,onPress:ye,accessibilityRole:"button",accessibilityState:ge,children:[fe,pe]}),f[51]=he,f[52]=ge,f[53]=pe,f[54]=xe):xe=f[54],f[55]!==k||f[56]!==D?(Se="polygon"===D&&{backgroundColor:k.primary},f[55]=k,f[56]=D,f[57]=Se):Se=f[57],f[58]!==Se?(je=[_.modeChip,Se],f[58]=Se,f[59]=je):je=f[59],f[60]===Symbol.for("react.memo_cache_sentinel")?(Ce=()=>N("polygon"),f[60]=Ce):Ce=f[60];const ve="polygon"===D;let we,Pe,Re,ze,ke,Ie,Te,We,Ae,Ee,Me;f[61]!==ve?(we={selected:ve},f[61]=ve,f[62]=we):we=f[62],f[63]===Symbol.for("react.memo_cache_sentinel")?(Pe=(0,x.jsx)(y.Pentagon,{size:14,color:S}),f[63]=Pe):Pe=f[63],f[64]!==z?(Re=z("v2.theater.zoneModePolygon"),f[64]=z,f[65]=Re):Re=f[65],f[66]!==Re?(ze=(0,x.jsx)(l.default,{style:_.modeText,children:Re}),f[66]=Re,f[67]=ze):ze=f[67],f[68]!==je||f[69]!==we||f[70]!==ze?(ke=(0,x.jsxs)(i.default,{style:je,onPress:Ce,accessibilityRole:"button",accessibilityState:we,children:[Pe,ze]}),f[68]=je,f[69]=we,f[70]=ze,f[71]=ke):ke=f[71],f[72]!==xe||f[73]!==ke?(Ie=(0,x.jsxs)(n.default,{style:_.modeWrap,pointerEvents:"box-none",children:[xe,ke]}),f[72]=xe,f[73]=ke,f[74]=Ie):Ie=f[74],f[75]!==D||f[76]!==G||f[77]!==z?(Te="polygon"===D&&G.length>0?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i.default,{style:_.button,onPress:K,accessibilityRole:"button",children:(0,x.jsx)(y.Undo2,{size:14,color:S})}),(0,x.jsx)(i.default,{style:_.button,onPress:ee,accessibilityRole:"button",children:(0,x.jsx)(l.default,{style:_.buttonText,children:z("v2.theater.zoneClearPoints")})})]}):null,f[75]=D,f[76]=G,f[77]=z,f[78]=Te):Te=f[78],f[79]!==z?(We=z("v2.theater.zoneCancel"),f[79]=z,f[80]=We):We=f[80],f[81]!==We?(Ae=(0,x.jsx)(l.default,{style:_.buttonText,children:We}),f[81]=We,f[82]=Ae):Ae=f[82],f[83]!==R||f[84]!==Ae?(Ee=(0,x.jsx)(i.default,{style:_.button,onPress:R,accessibilityRole:"button",children:Ae}),f[83]=R,f[84]=Ae,f[85]=Ee):Ee=f[85],f[86]!==k||f[87]!==ne?(Me=ne&&{backgroundColor:k.primary,borderColor:k.primary},f[86]=k,f[87]=ne,f[88]=Me):Me=f[88];const Ge=!ne&&_.buttonDisabled;let $e;f[89]!==Me||f[90]!==Ge?($e=[_.button,Me,Ge],f[89]=Me,f[90]=Ge,f[91]=$e):$e=f[91];const De=!ne,Ne=!ne;let He,Ue,Fe,Oe,Ve,Xe,Ye,qe;return f[92]!==Ne?(He={disabled:Ne},f[92]=Ne,f[93]=He):He=f[93],f[94]!==k||f[95]!==ne?(Ue=ne&&{color:k.primaryForeground},f[94]=k,f[95]=ne,f[96]=Ue):Ue=f[96],f[97]!==Ue?(Fe=[_.buttonText,Ue],f[97]=Ue,f[98]=Fe):Fe=f[98],f[99]!==z?(Oe=z("v2.theater.zoneConfirm"),f[99]=z,f[100]=Oe):Oe=f[100],f[101]!==Fe||f[102]!==Oe?(Ve=(0,x.jsx)(l.default,{style:Fe,children:Oe}),f[101]=Fe,f[102]=Oe,f[103]=Ve):Ve=f[103],f[104]!==re||f[105]!==$e||f[106]!==De||f[107]!==He||f[108]!==Ve?(Xe=(0,x.jsx)(i.default,{style:$e,onPress:re,disabled:De,accessibilityRole:"button",accessibilityState:He,children:Ve}),f[104]=re,f[105]=$e,f[106]=De,f[107]=He,f[108]=Ve,f[109]=Xe):Xe=f[109],f[110]!==Te||f[111]!==Ee||f[112]!==Xe?(Ye=(0,x.jsxs)(n.default,{style:_.actions,pointerEvents:"box-none",children:[Te,Ee,Xe]}),f[110]=Te,f[111]=Ee,f[112]=Xe,f[113]=Ye):Ye=f[113],f[114]!==L||f[115]!==B||f[116]!==ae||f[117]!==ce||f[118]!==de||f[119]!==Ie||f[120]!==Ye?(qe=(0,x.jsxs)(n.default,{style:ie,onLayout:V,onStartShouldSetResponder:w,onMoveShouldSetResponder:P,onResponderGrant:Y,onResponderMove:L,onResponderRelease:B,children:[ae,ce,de,Ie,Ye]}),f[114]=L,f[115]=B,f[116]=ae,f[117]=ce,f[118]=de,f[119]=Ie,f[120]=Ye,f[121]=qe):qe=f[121],qe}),_=s.default.create({modeWrap:{position:'absolute',top:10,right:10,flexDirection:'row',gap:6},modeChip:{flexDirection:'row',alignItems:'center',gap:5,paddingHorizontal:9,paddingVertical:5,borderRadius:999,backgroundColor:j},modeText:{color:S,fontSize:11,fontWeight:'600'},container:{zIndex:60,backgroundColor:'rgba(0, 0, 0, 0.25)'},hintWrap:{position:'absolute',top:f.SPACING.md,left:0,right:0,alignItems:'center'},hintPill:{backgroundColor:j,paddingHorizontal:f.SPACING.md,paddingVertical:f.SPACING.xs+2,borderRadius:f.RADIUS.lg,maxWidth:'90%'},hintText:{color:S,fontSize:11,fontWeight:'600',textAlign:'center'},zoneRect:{position:'absolute',borderWidth:2,borderRadius:2},actions:{position:'absolute',right:f.SPACING.md,bottom:f.SPACING.md,flexDirection:'row',gap:f.SPACING.md},button:{backgroundColor:j,borderColor:'rgba(255, 255, 255, 0.35)',borderWidth:1,paddingHorizontal:f.SPACING.lg,paddingVertical:f.SPACING.sm+2,borderRadius:f.RADIUS.lg},buttonDisabled:{opacity:.5},buttonText:{color:S,fontSize:12,fontWeight:'700'}});function v(e){return e.slice(0,-1)}function w(){return!0}function P(){return!0}},1030,[787,16,115,194,248,33,813,1103,814,789,831,1104,10]);
30
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ZoneActiveOverlay",{enumerable:!0,get:function(){return f}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),h=r(d[4]),c=e(h),s=r(d[5]),u=r(d[6]);const f=(0,n.memo)(function(e){const f=(0,t.c)(9),{zone:y}=e,{colors:b}=(0,s.useTheme)();let _;f[0]===Symbol.for("react.memo_cache_sentinel")?(_={width:0,height:0},f[0]=_):_=f[0];const[p,v]=(0,n.useState)(_);let j;f[1]===Symbol.for("react.memo_cache_sentinel")?(j=e=>{const{width:t,height:n}=e.nativeEvent.layout;v({width:t,height:n})},f[1]=j):j=f[1];const x=j;let k,$;return f[2]!==p.height||f[3]!==p.width||f[4]!==b||f[5]!==y?(k=p.width<=0||p.height<=0?null:"rect"===y.kind?(0,u.jsx)(o.default,{style:[w.zoneRect,{borderColor:b.warning,backgroundColor:`${b.warning}14`,left:y.rect.x*p.width,top:y.rect.y*p.height,width:y.rect.w*p.width,height:y.rect.h*p.height}]}):(0,u.jsx)(c.default,{style:l.default.absoluteFill,pointerEvents:"none",children:(0,u.jsx)(h.Polygon,{points:y.points.map(e=>`${e.x*p.width},${e.y*p.height}`).join(" "),fill:`${b.warning}14`,stroke:b.warning,strokeWidth:1.5})}),f[2]=p.height,f[3]=p.width,f[4]=b,f[5]=y,f[6]=k):k=f[6],f[7]!==k?($=(0,u.jsx)(o.default,{style:l.default.absoluteFill,onLayout:x,pointerEvents:"none",children:k}),f[7]=k,f[8]=$):$=f[8],$}),w=l.default.create({zoneRect:{position:'absolute',borderWidth:1.5,borderRadius:2}})},1031,[787,16,115,33,1103,789,10]);
31
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.BelowStreamArea=function(e){const c=(0,n.c)(25),{width:v,currentDeviceId:_,wallShowing:y,onGoTo:C,onCellPanel:O,onOpenPlayback:P}=e,{data:b}=(0,l.useCameras)(),j=(0,u.useWorkspaceStore)(w),x=(0,u.useWorkspaceStore)(h);let W,D,G;c[0]!==b||c[1]!==x?(W=()=>{void 0!==b&&0!==b.length&&x(b.map(p))},D=[b,x],c[0]=b,c[1]=x,c[2]=W,c[3]=D):(W=c[2],D=c[3]);(0,t.useEffect)(W,D),c[4]!==_||c[5]!==j?(G=(0,f.workspaceOnScreenCameras)(j,_),c[4]=_,c[5]=j,c[6]=G):G=c[6];const I=G,M=y?k.rootStrip:k.root;let T,A,B,E,F;c[7]!==v?(T={width:v},c[7]=v,c[8]=T):T=c[8];c[9]!==M||c[10]!==T?(A=[M,T],c[9]=M,c[10]=T,c[11]=A):A=c[11];c[12]!==y?(B=(0,f.shelfVariantFor)(y),c[12]=y,c[13]=B):B=c[13];c[14]!==_||c[15]!==O||c[16]!==C||c[17]!==P||c[18]!==I||c[19]!==B||c[20]!==v?(E=(0,S.jsx)(s.CameraShelf,{currentDeviceId:_,contentWidth:v,variant:B,alreadyOnScreen:I,onGoTo:C,onCellPanel:O,onOpenPlayback:P}),c[14]=_,c[15]=O,c[16]=C,c[17]=P,c[18]=I,c[19]=B,c[20]=v,c[21]=E):E=c[21];c[22]!==A||c[23]!==E?(F=(0,S.jsx)(o.default,{style:A,children:E}),c[22]=A,c[23]=E,c[24]=F):F=c[24];return F};var n=r(d[0]),t=r(d[1]),o=e(r(d[2])),c=e(r(d[3])),l=r(d[4]),u=r(d[5]),s=r(d[6]),f=r(d[7]),S=r(d[8]);function p(e){return e.id}function h(e){return e.reconcile}function w(e){return e.workspace.members}const k=c.default.create({root:{flex:1,minHeight:0,alignSelf:'center'},rootStrip:{alignSelf:'center'}})},1032,[787,16,115,33,823,1033,1035,1042,10]);
32
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"useWorkspaceStore",{enumerable:!0,get:function(){return o}});var s=r(d[0]),c=r(d[1]);const o=(0,s.create)(s=>({workspace:c.EMPTY_WORKSPACE,add:o=>s(s=>({workspace:(0,c.addMember)(s.workspace,o)})),setMembers:o=>s(s=>({workspace:(0,c.setMembers)(s.workspace,o)})),remove:o=>s(s=>({workspace:(0,c.removeMember)(s.workspace,o)})),setPrimaryCamera:o=>s(s=>({workspace:(0,c.setPrimary)(s.workspace,o)})),resize:(o,p)=>s(s=>({workspace:(0,c.resizeMember)(s.workspace,o,p)})),reconcile:o=>s(s=>({workspace:(0,c.reconcileMembers)(s.workspace,o)})),clear:()=>s({workspace:c.EMPTY_WORKSPACE})}))},1033,[857,1034]);
33
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EMPTY_WORKSPACE",{enumerable:!0,get:function(){return n}}),e.addMember=function(n,s){return Number.isFinite(s)?n.members.includes(s)?n:{members:[...n.members,s],primaryId:n.primaryId??s,cells:n.cells}:n},e.setMembers=function(i,t){const l=[];for(const n of t)Number.isFinite(n)&&(l.includes(n)||l.push(n));if(0===l.length)return n;if(l.length===i.members.length&&l.every((n,s)=>i.members[s]===n))return i;return{members:l,primaryId:null!==i.primaryId&&l.includes(i.primaryId)?i.primaryId:l[0],cells:s(i.cells,l)}},e.removeMember=function(i,t){if(!i.members.includes(t))return i;const l=i.members.filter(n=>n!==t);return 0===l.length?n:{members:l,primaryId:i.primaryId===t?l[0]:i.primaryId,cells:s(i.cells,l)}},e.setPrimary=function(n,s){return n.members.includes(s)?n.primaryId===s?n:{members:n.members,primaryId:s,cells:n.cells}:n},e.reconcileMembers=function(i,t){const l=new Set(t),c=i.members.filter(n=>l.has(n));return c.length===i.members.length?i:0===c.length?n:{members:c,primaryId:null!==i.primaryId&&l.has(i.primaryId)?i.primaryId:c[0],cells:s(i.cells,c)}},e.resizeMember=function(n,s,i){if(!n.members.includes(s))return n;const t=Number.isFinite(i.cw)?Math.max(1,Math.round(i.cw)):1,l=Number.isFinite(i.ch)?Math.max(1,Math.round(i.ch)):1,c=n.cells[s];if(1===t&&1===l){if(void 0===c)return n;const i=Object.assign({},n.cells);return delete i[s],{members:n.members,primaryId:n.primaryId,cells:i}}return void 0!==c&&c.cw===t&&c.ch===l?n:{members:n.members,primaryId:n.primaryId,cells:Object.assign({},n.cells,{[s]:{cw:t,ch:l}})}},e.isMember=function(n,s){return n.members.includes(s)};const n={members:[],primaryId:null,cells:{}};function s(n,s){const i=Object.keys(n);if(0===i.length)return n;const t={};let l=!1;for(const c of i){const i=Number(c);s.includes(i)?t[i]=n[i]:l=!0}return l?t:n}},1034,[]);
34
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"CAMERA_SHELF_TEST_ID",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"SHELF_VARIANT_TEST_ID",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"CAMERA_SHELF_PENDING_TEST_ID",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"REEL_HIGHLIGHT_BUTTON_TEST_ID",{enumerable:!0,get:function(){return z}}),_e.CameraShelf=function(e){const o=(0,t.c)(67),{currentDeviceId:u,onGoTo:p,onCellPanel:I,onOpenPlayback:y,variant:x,contentWidth:T,alreadyOnScreen:_}=e,A=void 0===x?"rows":x,R=void 0===T?0:T,D=void 0===_?B:_,{colors:w}=(0,f.useTheme)(),{t:E}=(0,H.useTranslation)();let V;o[0]!==w?(V=q(w),o[0]=w,o[1]=V):V=o[1];const J=V,{data:K,status:Q}=(0,S.useCameras)(),X=(0,C.useScreenActive)(),Y=(0,j.useReelHighlightStore)(M),Z=(0,j.useReelHighlightStore)(F),[$,ee]=(0,n.useState)(!1);let te,ie,ne,oe;o[2]!==Z?(te=()=>{Z()},ie=[Z],o[2]=Z,o[3]=te,o[4]=ie):(te=o[3],ie=o[4]);(0,n.useEffect)(te,ie),o[5]!==K?(ne=K??[],o[5]=K,o[6]=ne):ne=o[6];o[7]!==D||o[8]!==u||o[9]!==ne?(oe=(0,W.shelfCameras)(ne,u,D),o[7]=D,o[8]=u,o[9]=ne,o[10]=oe):oe=o[10];const re=oe;let le;o[11]!==R?(le=(0,W.fitShelfRow)({contentWidth:R,gap:b.SPACING.sm,minCardWidth:W.SHELF_CARD_WIDTH}),o[11]=R,o[12]=le):le=o[12];const ae=le,se="strip"===A;if(void 0===K){if("error"===Q)return null;const e=se?J.rootStrip:J.root;let t;o[13]!==E?(t=E("v2.cameraShelf.loadingA11y"),o[13]=E,o[14]=t):t=o[14];const n=J.pending,c=J.pendingText;let h,u,f,b;return o[15]!==E?(h=E("v2.cameraShelf.loading"),o[15]=E,o[16]=h):h=o[16],o[17]!==J.pendingText||o[18]!==h?(u=(0,N.jsx)(s.default,{style:c,children:h}),o[17]=J.pendingText,o[18]=h,o[19]=u):u=o[19],o[20]!==J.pending||o[21]!==t||o[22]!==u?(f=(0,N.jsx)(l.default,{testID:k,accessibilityRole:"progressbar",accessibilityLabel:t,style:n,children:u}),o[20]=J.pending,o[21]=t,o[22]=u,o[23]=f):f=o[23],o[24]!==e||o[25]!==f?(b=(0,N.jsx)(l.default,{testID:L,style:e,children:f}),o[24]=e,o[25]=f,o[26]=b):b=o[26],b}if(0===re.length)return null;const de=se?J.rootStrip:J.root,ce=O[A],he=J.scroll,ue=se?J.strip:J.rows;let ge,fe,me,be,Se,pe,Ie,Ce,ye;if(o[27]!==X||o[28]!==Y||o[29]!==I||o[30]!==p||o[31]!==y||o[32]!==re||o[33]!==ae||o[34]!==se){let e;o[36]!==X||o[37]!==Y||o[38]!==I||o[39]!==p||o[40]!==y||o[41]!==ae||o[42]!==se?(e=e=>(0,N.jsx)(U,{camera:e,width:se?G.STRIP_CARD_WIDTH:ae.cardWidth,active:X,onGoTo:p,onOpenPlayback:y,onCellPanel:I,highlight:Y},e.id),o[36]=X,o[37]=Y,o[38]=I,o[39]=p,o[40]=y,o[41]=ae,o[42]=se,o[43]=e):e=o[43],ge=re.map(e),o[27]=X,o[28]=Y,o[29]=I,o[30]=p,o[31]=y,o[32]=re,o[33]=ae,o[34]=se,o[35]=ge}else ge=o[35];o[44]!==se||o[45]!==J.scroll||o[46]!==ce||o[47]!==ue||o[48]!==ge?(fe=(0,N.jsx)(c.default,{testID:ce,horizontal:se,style:he,contentContainerStyle:ue,showsVerticalScrollIndicator:!1,showsHorizontalScrollIndicator:!1,children:ge}),o[44]=se,o[45]=J.scroll,o[46]=ce,o[47]=ue,o[48]=ge,o[49]=fe):fe=o[49];o[50]===Symbol.for("react.memo_cache_sentinel")?(me=()=>ee(!0),o[50]=me):me=o[50];o[51]!==E?(be=E("v2.reelHighlight.openA11y"),o[51]=E,o[52]=be):be=o[52];o[53]!==w.foreground?(Se=(0,N.jsx)(v.SlidersHorizontal,{size:15,color:w.foreground}),o[53]=w.foreground,o[54]=Se):Se=o[54];o[55]!==J.highlightBtn||o[56]!==be||o[57]!==Se?(pe=(0,N.jsx)(h.default,{onPress:me,hitSlop:8,accessibilityRole:"button",accessibilityLabel:be,testID:z,style:J.highlightBtn,children:Se}),o[55]=J.highlightBtn,o[56]=be,o[57]=Se,o[58]=pe):pe=o[58];o[59]===Symbol.for("react.memo_cache_sentinel")?(Ie=()=>ee(!1),o[59]=Ie):Ie=o[59];o[60]!==$?(Ce=(0,N.jsx)(P.ReelHighlightSheet,{visible:$,onClose:Ie}),o[60]=$,o[61]=Ce):Ce=o[61];o[62]!==de||o[63]!==fe||o[64]!==pe||o[65]!==Ce?(ye=(0,N.jsxs)(l.default,{testID:L,style:de,children:[fe,pe,Ce]}),o[62]=de,o[63]=fe,o[64]=pe,o[65]=Ce,o[66]=ye):ye=o[66];return ye};var t=r(d[0]),n=r(d[1]),o=e(n),l=e(r(d[2])),s=e(r(d[3])),c=e(r(d[4])),h=e(r(d[5])),u=e(r(d[6])),f=r(d[7]),b=r(d[8]),S=r(d[9]),p=r(d[10]),I=r(d[11]),C=r(d[12]),y=r(d[13]),x=r(d[14]),T=r(d[15]),_=r(d[16]),A=r(d[17]),P=r(d[18]),R=r(d[19]),j=r(d[20]),v=r(d[21]),D=r(d[22]),H=r(d[23]),w=r(d[24]),E=r(d[25]),W=r(d[26]),G=r(d[27]),N=r(d[28]);const L='camera-shelf',O={rows:'camera-shelf-rows',strip:'camera-shelf-strip'},k='camera-shelf-pending',z='camera-shelf-highlight-settings',B=[];function F(e){return e.hydrate}function M(e){return e.highlight}const U=o.default.memo(function(e){const n=(0,t.c)(53),{camera:o,width:c,active:u,onGoTo:C,onCellPanel:P,onOpenPlayback:j,highlight:v}=e,{colors:H}=(0,f.useTheme)();let W;n[0]!==H?(W=q(H),n[0]=H,n[1]=W):W=n[1];const G=W,L=(0,E.useWorkspaceStore)(J),O=(0,I.useCanActuate)(),k=o.id;let z;n[2]!==c?(z=(0,y.snapshotWidthForCssPx)(c),n[2]=c,n[3]=z):z=n[3];const B=(0,p.useSnapshot)(k,u,z);let F;n[4]!==o.features||n[5]!==O?(F=(0,w.cameraActionBarItems)({hasPtz:O&&o.features.includes(S.FEATURE.ptz),layout:w.SHELF_CONTROLS,canNavigate:!0}),n[4]=o.features,n[5]=O,n[6]=F):F=n[6];const M=F;let U;n[7]!==L||n[8]!==o.id||n[9]!==P||n[10]!==C||n[11]!==j?(U=e=>{"goTo"!==e?"addToView"!==e?"playback"!==e?(0,w.isCameraPanelAction)(e)&&P(e,o.id):j(o.id):L(o.id):C(o.id)},n[7]=L,n[8]=o.id,n[9]=P,n[10]=C,n[11]=j,n[12]=U):U=n[12];const K=U,Q=(0,R.useReelHighlightTrigger)(o.id,v,u),X=(0,D.useSettings)().settings.highlight;let Y,Z,$,ee,te,ie,ne,oe,re,le,ae;return n[13]!==c?(Y={width:c},n[13]=c,n[14]=Y):Y=n[14],n[15]!==G.card||n[16]!==Y?(Z=[G.card,Y],n[15]=G.card,n[16]=Y,n[17]=Z):Z=n[17],n[18]!==o.id||n[19]!==C?($=()=>C(o.id),n[18]=o.id,n[19]=C,n[20]=$):$=n[20],n[21]!==o.id||n[22]!==B||n[23]!==G.thumb?(ee=(0,N.jsx)(x.SnapshotImage,{source:B,deviceId:o.id,style:G.thumb}),n[21]=o.id,n[22]=B,n[23]=G.thumb,n[24]=ee):ee=n[24],n[25]!==o.name||n[26]!==G.thumbWrap||n[27]!==$||n[28]!==ee?(te=(0,N.jsx)(h.default,{onPress:$,accessibilityRole:"button",accessibilityLabel:o.name,style:G.thumbWrap,children:ee}),n[25]=o.name,n[26]=G.thumbWrap,n[27]=$,n[28]=ee,n[29]=te):te=n[29],n[30]!==o.disabled||n[31]!==o.id||n[32]!==o.online?(ie=(0,N.jsx)(T.CameraStatusDot,{deviceId:o.id,online:o.online,disabled:o.disabled}),n[30]=o.disabled,n[31]=o.id,n[32]=o.online,n[33]=ie):ie=n[33],n[34]!==o.name||n[35]!==G.name?(ne=(0,N.jsx)(s.default,{style:G.name,numberOfLines:1,children:o.name}),n[34]=o.name,n[35]=G.name,n[36]=ne):ne=n[36],n[37]!==G.footer||n[38]!==ie||n[39]!==ne?(oe=(0,N.jsxs)(l.default,{style:G.footer,children:[ie,ne]}),n[37]=G.footer,n[38]=ie,n[39]=ne,n[40]=oe):oe=n[40],n[41]!==M||n[42]!==K?(re=(0,N.jsx)(_.CameraActionBar,{items:M,onAction:K,variant:"surface"}),n[41]=M,n[42]=K,n[43]=re):re=n[43],n[44]!==X||n[45]!==Q?(le=null===Q?null:(0,N.jsx)(A.MotionBorder,{color:X[V[Q]],radius:b.RADIUS.md}),n[44]=X,n[45]=Q,n[46]=le):le=n[46],n[47]!==te||n[48]!==oe||n[49]!==re||n[50]!==le||n[51]!==Z?(ae=(0,N.jsxs)(l.default,{style:Z,children:[te,oe,re,le]}),n[47]=te,n[48]=oe,n[49]=re,n[50]=le,n[51]=Z,n[52]=ae):ae=n[52],ae}),V={motion:'motionColor',audio:'audioColor',detection:'detectionColor'};function q(e){return u.default.create({root:{flex:1,minHeight:0,alignSelf:'stretch',paddingTop:b.SPACING.sm},rootStrip:{height:G.SHELF_STRIP_HEIGHT,alignSelf:'stretch',paddingVertical:b.SPACING.sm},scroll:{flex:1,minHeight:0},pending:{flex:1,minHeight:0,alignItems:'center',justifyContent:'center'},pendingText:{color:e.foregroundMuted,fontSize:12},rows:{flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.sm,paddingBottom:b.SPACING.md},strip:{flexDirection:'row',gap:b.SPACING.sm,alignItems:'flex-start'},card:{borderRadius:b.RADIUS.md,overflow:'hidden',backgroundColor:e.backgroundElevated,borderWidth:u.default.hairlineWidth,borderColor:e.border,padding:b.SPACING.xs,gap:b.SPACING.xs},highlightBtn:{position:'absolute',top:0,right:0,width:28,height:28,borderRadius:b.RADIUS.md,alignItems:'center',justifyContent:'center',backgroundColor:e.backgroundElevated,borderWidth:u.default.hairlineWidth,borderColor:e.border,zIndex:2},thumbWrap:{width:'100%',aspectRatio:1.7777777777777777,borderRadius:b.RADIUS.sm,overflow:'hidden',backgroundColor:'#000'},thumb:{width:'100%',height:'100%'},footer:{flexDirection:'row',alignItems:'center',gap:b.SPACING.xs},name:{flex:1,color:e.foreground,fontSize:12,fontWeight:'600'}})}function J(e){return e.add}},1035,[787,16,115,194,139,248,33,789,831,823,833,828,827,790,843,845,1105,844,1036,1039,1037,814,829,813,1106,1033,1041,1042,10]);
35
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ReelHighlightSheet",{enumerable:!0,get:function(){return R}});var t=r(d[0]),o=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),u=e(r(d[5])),c=e(r(d[6])),h=e(r(d[7])),f=r(d[8]),b=r(d[9]),x=r(d[10]),S=r(d[11]),p=r(d[12]),j=r(d[13]),y=r(d[14]),C=r(d[15]);const R=(0,o.memo)(function(e){const o=(0,t.c)(60),{visible:h,onClose:S}=e,{colors:R}=(0,x.useTheme)(),{t:v}=(0,f.useTranslation)(),k=(0,y.useReelHighlightStore)(H),T=(0,y.useReelHighlightStore)(P),G=(0,y.useReelHighlightStore)(A);let N,B,_,z,D,w,U,E,L,M,O,V,W,q,X,F,J,K,Q,Y,Z,$;return o[0]!==S?(N=(0,C.jsx)(u.default,{style:I.scrim,onPress:S}),o[0]=S,o[1]=N):N=o[1],o[2]!==R.backgroundElevated?(B=[I.sheet,{backgroundColor:R.backgroundElevated}],o[2]=R.backgroundElevated,o[3]=B):B=o[3],o[4]!==R.foreground?(_=[I.title,{color:R.foreground}],o[4]=R.foreground,o[5]=_):_=o[5],o[6]!==v?(z=v("v2.reelHighlight.title"),o[6]=v,o[7]=z):z=o[7],o[8]!==_||o[9]!==z?(D=(0,C.jsx)(s.default,{style:_,children:z}),o[8]=_,o[9]=z,o[10]=D):D=o[10],o[11]!==v?(w=v("v2.reelHighlight.close"),o[11]=v,o[12]=w):w=o[12],o[13]!==R.surface?(U=[I.iconBtn,{backgroundColor:R.surface}],o[13]=R.surface,o[14]=U):U=o[14],o[15]!==R.foreground?(E=(0,C.jsx)(b.X,{size:18,color:R.foreground}),o[15]=R.foreground,o[16]=E):E=o[16],o[17]!==S||o[18]!==w||o[19]!==U||o[20]!==E?(L=(0,C.jsx)(u.default,{onPress:S,hitSlop:10,accessibilityRole:"button",accessibilityLabel:w,style:U,children:E}),o[17]=S,o[18]=w,o[19]=U,o[20]=E,o[21]=L):L=o[21],o[22]!==D||o[23]!==L?(M=(0,C.jsxs)(l.default,{style:I.header,children:[D,L]}),o[22]=D,o[23]=L,o[24]=M):M=o[24],o[25]!==v?(O=v("v2.reelHighlight.section"),o[25]=v,o[26]=O):O=o[26],o[27]!==k||o[28]!==T?(V=(0,C.jsx)(j.HighlightTriggerRows,{highlight:k,onSetHighlight:T}),o[27]=k,o[28]=T,o[29]=V):V=o[29],o[30]!==O||o[31]!==V?(W=(0,C.jsx)(p.Section,{title:O,children:V}),o[30]=O,o[31]=V,o[32]=W):W=o[32],o[33]!==R.surface?(q=[I.resetBtn,{backgroundColor:R.surface}],o[33]=R.surface,o[34]=q):q=o[34],o[35]!==R.foreground?(X=[I.resetText,{color:R.foreground}],o[35]=R.foreground,o[36]=X):X=o[36],o[37]!==v?(F=v("v2.reelHighlight.reset"),o[37]=v,o[38]=F):F=o[38],o[39]!==X||o[40]!==F?(J=(0,C.jsx)(s.default,{style:X,children:F}),o[39]=X,o[40]=F,o[41]=J):J=o[41],o[42]!==G||o[43]!==q||o[44]!==J?(K=(0,C.jsx)(u.default,{onPress:G,accessibilityRole:"button",style:q,children:J}),o[42]=G,o[43]=q,o[44]=J,o[45]=K):K=o[45],o[46]!==W||o[47]!==K?(Q=(0,C.jsxs)(c.default,{contentContainerStyle:I.scroll,children:[W,K]}),o[46]=W,o[47]=K,o[48]=Q):Q=o[48],o[49]!==M||o[50]!==Q||o[51]!==B?(Y=(0,C.jsxs)(l.default,{style:B,children:[M,Q]}),o[49]=M,o[50]=Q,o[51]=B,o[52]=Y):Y=o[52],o[53]!==N||o[54]!==Y?(Z=(0,C.jsxs)(l.default,{style:I.backdrop,children:[N,Y]}),o[53]=N,o[54]=Y,o[55]=Z):Z=o[55],o[56]!==S||o[57]!==Z||o[58]!==h?($=(0,C.jsx)(n.default,{visible:h,animationType:"slide",transparent:!0,onRequestClose:S,children:Z}),o[56]=S,o[57]=Z,o[58]=h,o[59]=$):$=o[59],$}),I=h.default.create({backdrop:{flex:1,justifyContent:'flex-end'},scrim:{position:'absolute',top:0,left:0,right:0,bottom:0,backgroundColor:'rgba(0,0,0,0.5)'},sheet:{maxHeight:'85%',borderTopLeftRadius:S.RADIUS.xl,borderTopRightRadius:S.RADIUS.xl,paddingHorizontal:S.SPACING.md,paddingTop:S.SPACING.md},header:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',paddingBottom:S.SPACING.sm},title:{fontSize:18,fontWeight:'700'},iconBtn:{width:32,height:32,borderRadius:S.RADIUS.md,alignItems:'center',justifyContent:'center'},scroll:{gap:S.SPACING.lg,paddingVertical:S.SPACING.sm,paddingBottom:S.SPACING.xl},resetBtn:{alignItems:'center',paddingVertical:S.SPACING.md,borderRadius:S.RADIUS.md,marginHorizontal:S.SPACING.md},resetText:{fontSize:15,fontWeight:'600'}});function H(e){return e.highlight}function P(e){return e.setHighlight}function A(e){return e.reset}},1036,[787,16,241,115,194,248,139,33,813,814,789,831,860,1107,1037,10]);
36
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.parseReelHighlight=H,Object.defineProperty(_e,"useReelHighlightStore",{enumerable:!0,get:function(){return u}});var t,e=r(d[0]),h=r(d[1]),l=(t=h)&&t.__esModule?t:{default:t},c=r(d[2]),s=r(d[3]);const n='camstack.v2.reel-highlight';function H(t){if('object'!=typeof t||null===t)return s.REEL_HIGHLIGHT_DEFAULTS;const e=t;return(0,c.withHighlightDefaults)(Object.assign({},s.REEL_HIGHLIGHT_DEFAULTS,e))}const u=(0,e.create)((t,e)=>({highlight:s.REEL_HIGHLIGHT_DEFAULTS,hydrated:!1,hydrate:async()=>{if(!e().hydrated)try{const e=await l.default.getItem(n);t({highlight:e?H(JSON.parse(e)):s.REEL_HIGHLIGHT_DEFAULTS,hydrated:!0})}catch{t({highlight:s.REEL_HIGHLIGHT_DEFAULTS,hydrated:!0})}},setHighlight:h=>{const c=Object.assign({},e().highlight,h);t({highlight:c}),l.default.setItem(n,JSON.stringify(c)).catch(()=>{})},reset:()=>{t({highlight:s.REEL_HIGHLIGHT_DEFAULTS}),l.default.removeItem(n).catch(()=>{})}}))},1037,[857,858,929,1038]);
37
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"REEL_AUDIO_DEFAULT_UI",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"REEL_HIGHLIGHT_DEFAULTS",{enumerable:!0,get:function(){return u}}),e.reelHighlightDemand=function(t){const n=t.motion,o='off'!==t.audio,u=t.detection;return{motion:n,audio:o,detection:u,idle:!n&&!o&&!u}};var t=r(d[0]),n=r(d[1]);const o='mid',u=Object.freeze(Object.assign({},n.GRID_HIGHLIGHT_DEFAULTS,{motion:!0,audio:'level',audioDb:(0,t.dbfsForAudioUi)(o)}))},1038,[1086,929]);
38
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useReelHighlightTrigger=function(H,f,h){const _=(0,t.c)(7);let C;_[0]!==f?(C=(0,c.reelHighlightDemand)(f),_[0]=f,_[1]=C):C=_[1];const D=C,b=(0,n.useMotionHighlight)(H,h&&D.motion),v=(0,s.useAudioActive)(H,h&&D.audio?f.audio:"off",f.audioDb),A=(0,u.useHeld)(h&&D.audio&&v,1e3*l.AUDIO_HIGHLIGHT_HOLD_SEC),I=(0,o.useDetections)(H,h&&D.detection);let O;_[2]!==D||_[3]!==I||_[4]!==h||_[5]!==f.detectionClasses?(O=h&&D.detection&&I.boxes.some(t=>0===f.detectionClasses.length||f.detectionClasses.includes(t.label)),_[2]=D,_[3]=I,_[4]=h,_[5]=f.detectionClasses,_[6]=O):O=_[6];const G=O;if((0,u.useHeld)(G,1e3*f.detectionHoldSec))return"detection";if(b)return"motion";if(A)return"audio";return null};var t=r(d[0]),o=r(d[1]),n=r(d[2]),s=r(d[3]),u=r(d[4]),l=r(d[5]),c=r(d[6])},1039,[787,1084,842,1085,1040,1086,1038]);
39
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useHeld=function(n,c){const o=(0,t.c)(4),[s,f]=(0,u.useState)(n);let l,_;o[0]!==n||o[1]!==c?(l=()=>{if(n)return void f(!0);const t=setTimeout(()=>f(!1),Math.max(0,c));return()=>clearTimeout(t)},_=[n,c],o[0]=n,o[1]=c,o[2]=l,o[3]=_):(l=o[2],_=o[3]);return(0,u.useEffect)(l,_),s};var t=r(d[0]),u=r(d[1])},1040,[787,16]);
40
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldShowCameraShelf=function(t){return'wide'===t},e.shelfCameras=function(t,n,o=[]){return t.filter(t=>t.id!==n&&!o.includes(t.id))},Object.defineProperty(e,"SHELF_CARD_WIDTH",{enumerable:!0,get:function(){return t}}),e.fitShelfRow=function({contentWidth:t,gap:n,minCardWidth:o}){if(!Number.isFinite(t)||t<o)return{perRow:1,cardWidth:o};const u=Math.max(1,Math.floor((t+n)/(o+n))),f=Math.floor((t-n*(u-1))/u);return{perRow:u,cardWidth:Math.max(o,f)}};const t=180},1041,[]);
41
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.canHostWorkspaceWall=t,Object.defineProperty(e,"WORKSPACE_GRID_MIN_CAMERAS",{enumerable:!0,get:function(){return o}}),e.shouldShowWorkspaceGrid=function(n,u,s){return!!t(n)&&c(u,s).length>=o},e.workspaceOnScreenCameras=c,e.shelfVariantFor=function(n){return n?'strip':'rows'},Object.defineProperty(e,"STRIP_CARD_WIDTH",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"SHELF_STRIP_HEIGHT",{enumerable:!0,get:function(){return s}});const n={wide:!0,fill:!0,stack:!0};function t(t){return n[t]}const o=2;function c(n,t){return[t,...n.filter(n=>n!==t)]}const u=132,s=154},1042,[]);
42
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.WorkspaceStage=function(b){const W=(0,t.c)(34),{devices:_,quality:I,highlight:P,showBoxes:C,onGoTo:j,onCellPanel:x}=b,G=(0,s.useWorkspaceStore)(y),O=(0,s.useWorkspaceStore)(v),R=(0,s.useWorkspaceStore)(T),q=(0,s.useWorkspaceStore)(w);let z;if(W[0]!==G){z={};for(const t of Object.keys(G))z[t]=G[Number(t)];W[0]=G,W[1]=z}else z=W[1];const A=z,{data:B}=(0,n.useCameras)(),[E,F]=(0,o.useState)(p),[M,N]=(0,o.useState)(f);let U;if(W[2]!==B||W[3]!==_){let t;W[5]!==B?(t=t=>(B??[]).find(o=>o.id===t),W[5]=B,W[6]=t):t=W[6],U=_.map(t).filter(h),W[2]=B,W[3]=_,W[4]=U}else U=W[4];const D=U;let H;W[7]!==D?(H=new Set(D.filter(k).map(S)),W[7]=D,W[8]=H):H=W[8];const J=H;let K;if(W[9]!==J||W[10]!==_||W[11]!==E){let t;W[13]!==J?(t=t=>({id:t,batteryPowered:J.has(t)}),W[13]=J,W[14]=t):t=W[14],K=(0,l.heldTileIds)(_.map(t),E),W[9]=J,W[10]=_,W[11]=E,W[12]=K}else K=W[12];const L=K;let Q;W[15]!==J?(Q=t=>{F(o=>(0,l.toggleTileTransport)(o,t,J.has(t)))},W[15]=J,W[16]=Q):Q=W[16];const V=Q;let X;W[17]===Symbol.for("react.memo_cache_sentinel")?(X=t=>{N(o=>o.includes(t)?o.filter(o=>o!==t):[...o,t])},W[17]=X):X=W[17];const Y=X;let Z;W[18]!==q?(Z=(t,o,s)=>q(t,{cw:o,ch:s}),W[18]=q,W[19]=Z):Z=W[19];const $=Z;let ee;W[20]!==M||W[21]!==O||W[22]!==_||W[23]!==P||W[24]!==x||W[25]!==j||W[26]!==V||W[27]!==$||W[28]!==L||W[29]!==I||W[30]!==R||W[31]!==C||W[32]!==A?(ee=(0,u.jsx)(c.WorkspaceGrid,{devices:_,quality:I,highlight:P,showBoxes:C,onGoTo:j,onCellPanel:x,onClose:O,onRemove:R,onResize:$,spans:A,audioOnIds:M,pausedIds:L,onAudioToggle:Y,onPauseToggle:V}),W[20]=M,W[21]=O,W[22]=_,W[23]=P,W[24]=x,W[25]=j,W[26]=V,W[27]=$,W[28]=L,W[29]=I,W[30]=R,W[31]=C,W[32]=A,W[33]=ee):ee=W[33];return ee};var t=r(d[0]),o=r(d[1]),s=r(d[2]),n=r(d[3]),l=r(d[4]),c=r(d[5]),u=r(d[6]);const f=[],p={pausedIds:new Set,startedIds:new Set};function h(t){return void 0!==t}function S(t){return t.id}function k(t){return t.features.includes(n.FEATURE.battery)}function w(t){return t.resize}function T(t){return t.remove}function v(t){return t.clear}function y(t){return t.workspace.cells}},1043,[787,16,1033,823,1068,1044,10]);
43
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"WORKSPACE_GRID_TEST_ID",{enumerable:!0,get:function(){return T}}),_e.WorkspaceGrid=function({devices:e,quality:t,highlight:n,showBoxes:f,onGoTo:x,onCellPanel:j,onClose:M,onRemove:R,onResize:A,spans:_,audioOnIds:E,pausedIds:W,onAudioToggle:k,onPauseToggle:G}){const{t:L}=(0,c.useTranslation)(),{colors:B}=(0,p.useTheme)(),D=(0,o.useMemo)(()=>z(B),[B]),{data:N}=(0,y.useCameras)(),q=(0,b.useCanActuate)(),H=(0,o.useMemo)(()=>{const t=new Map((N??[]).map(e=>[e.id,e]));return e.flatMap(e=>{const o=t.get(e);return void 0===o?[]:[o]})},[N,e]),U=(0,o.useMemo)(()=>q?H.filter(e=>e.features.includes(y.FEATURE.ptz)).map(e=>e.id):O,[q,H]),V=(0,o.useMemo)(()=>H.map(e=>e.id),[H]),F=(0,P.useCameraPrefsStore)(e=>e.prefs.byId),$=(0,P.useCameraPrefsStore)(e=>e.hydrate);(0,o.useEffect)(()=>{$()},[$]);const K=(0,o.useMemo)(()=>(0,C.buildTileOverlayMap)(V.map(e=>({deviceId:e,overlay:F[e]?.overlay??I.OVERLAY_DEFAULTS}))),[V,F]),{width:X,height:Y}=(0,u.useViewportSize)(),J=`${X}x${Y}`,[Q,Z]=(0,o.useState)(null),ee=(0,o.useCallback)(e=>{const{width:t,height:o}=e.nativeEvent.layout;t<=0||o<=0||Z(e=>null!==e&&e.w===t&&e.h===o&&e.stamp===J?e:{w:t,h:o,stamp:J})},[J]),te=null!==Q&&Q.stamp===J?Q:null,oe=Object.keys(_).length>0,le=(0,o.useMemo)(()=>oe||null===te?null:(0,w.resolvePrimaryWallSpan)(V.length,te.w,te.h),[oe,te,V.length]),se=V[0],ne=(0,o.useMemo)(()=>null===le||le.span<=1||void 0===se?_:{[String(se)]:{cw:le.span,ch:le.span}},[le,se,_]),ae=null!==le&&le.span>1?le.cols:'auto';return(0,S.jsxs)(l.default,{testID:T,style:D.root,children:[(0,S.jsx)(l.default,{style:D.content,onLayout:ee,children:(0,S.jsx)(v.GridLiveEmbed,{devices:V,quality:t,layout:ae,showName:!0,audioOnIds:E,pausedIds:W,onAudioToggle:k,onPauseToggle:G,ptzIds:U,highlight:n,showBoxes:f,overlays:K,onTileOpen:x,onPtzOpen:e=>j('ptz',e),onCellPanelOpen:j,editable:!0,spans:ne,onTileRemove:R,onTileResize:A})}),(0,S.jsx)(s.default,{onPress:M,hitSlop:8,accessibilityRole:"button",accessibilityLabel:L('v2.cameraShelf.closeView'),style:({pressed:e})=>[D.close,{opacity:e?.7:1}],children:(0,S.jsx)(h.X,{size:16,color:"#fafaf9"})})]})},_e.NativeWorkspaceWall=R;var t=r(d[0]),o=r(d[1]),l=e(r(d[2])),s=e(r(d[3])),n=e(r(d[4]));r(d[5]);var u=r(d[6]),c=r(d[7]),h=r(d[8]),p=r(d[9]),f=r(d[10]),y=r(d[11]),b=r(d[12]),v=r(d[13]),x=r(d[14]),w=r(d[15]),C=r(d[16]),I=r(d[17]),P=r(d[18]),S=r(d[19]);const T='workspace-grid';const O=[],j=['objects'],M=[];function R(e){const o=(0,t.c)(14),{cameras:s,quality:n,ptzIds:u,showBoxes:c,audioOnIds:h,pausedIds:p,box:f,onCellPanel:y}=e;let b;o[0]!==f||o[1]!==s.length?(b=null===f?null:(0,w.computeAutoLayout)(s.length,f.w,f.h),o[0]=f,o[1]=s.length,o[2]=b):b=o[2];const v=b;let C,I;return o[3]!==h||o[4]!==s||o[5]!==v||o[6]!==y||o[7]!==p||o[8]!==u||o[9]!==n||o[10]!==c?(C=null!==v&&v.cellW>0?(0,S.jsx)(x.GridWall,{cameras:s,layout:v,showName:!0,quality:n,ptzIds:u,layers:c?j:M,muted:0===h.length,paused:p.length>0,onCellPanelOpen:y}):null,o[3]=h,o[4]=s,o[5]=v,o[6]=y,o[7]=p,o[8]=u,o[9]=n,o[10]=c,o[11]=C):C=o[11],o[12]!==C?(I=(0,S.jsx)(l.default,{style:A.nativeBox,children:C}),o[12]=C,o[13]=I):I=o[13],I}const A=n.default.create({nativeBox:{flex:1,minHeight:0,backgroundColor:'#000'}});function z(e){return n.default.create({root:{flex:1,minHeight:0,alignSelf:'stretch',borderRadius:f.RADIUS.md,overflow:'hidden',backgroundColor:'#000',borderWidth:n.default.hairlineWidth,borderColor:e.border},content:{flex:1,minHeight:0},close:{position:'absolute',top:f.SPACING.xs,right:f.SPACING.xs,width:28,height:28,borderRadius:14,alignItems:'center',justifyContent:'center',backgroundColor:'rgba(0,0,0,0.55)'}})}},1044,[787,16,115,248,33,110,906,813,814,789,831,823,828,1108,1109,1110,1111,1087,978,10]);
44
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PORTRAIT_WALL_TIMELINE_FRACTION",{enumerable:!0,get:function(){return t}}),e.resolvePortraitColumnSplit=function({columnHeight:u,topInset:o,pictureHeight:c,wallShowing:l}){const h=n(u-o,Number.MAX_SAFE_INTEGER),s=n(c,h),f=h-s;if(!l)return{streamHeight:s,timelineHeight:f};const w=f*t;return{streamHeight:h-w,timelineHeight:w}},e.wallBoxStyle=function({mode:t,wideStreamWidth:n,portraitStreamHeight:u}){switch(t){case'fill':return{width:'100%',flex:1,minHeight:0};case'wide':return{width:n,flex:1,minHeight:0};case'stack':return{width:'100%',height:u}}};const t=.5;function n(t,n){return!Number.isFinite(t)||t<=0?0:t>n?n:t}},1045,[]);
45
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.fanOutPlaybackToWall=function(o){const{primary:n,broadcast:t,paused:u}=o;return{onSeek:(o,u)=>{n.onSeek(o,u),t(n=>n.seek(o))},onScrubBegin:o=>{n.onScrubBegin(o),t(o=>o.scrubStart())},onScrubMove:(o,u,c)=>{n.onScrubMove(o,u,c),t(n=>n.scrubTo(o))},onScrubCommit:(o,u)=>{n.onScrubCommit(o,u),t(n=>n.scrubCommit(o))},onGoLive:()=>{n.onGoLive(),t(o=>o.goLive())},onTogglePlayPause:()=>{n.onTogglePlayPause(),t(o=>o.setRate(u?1:0))},onSelectRate:o=>{n.onSelectRate(o),t(n=>n.setRate(o))}}}},1046,[]);
46
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldShowStreamNavBar=function({enabled:t,showSidebar:n,fill:o}){return t&&!n&&!o},e.streamColumnHeight=function({windowHeight:t,navBarFootprint:n}){const o=t-n;return o>0?o:Math.max(0,t)}},1047,[]);
47
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isUsableMeasurement=n,e.acceptsMeasurement=u,e.containerWidthSource=function({measured:t,windowWidth:n}){return u(t,n)?'measured':'derived'},e.resolveContainerWidth=function({measured:n,windowWidth:o,sideNav:s}){if(u(n,o))return n.width;const c=o-(0,t.sideNavFootprint)(s);return c>0?c:Math.max(0,o)};var t=r(d[0]);function n(t){return Number.isFinite(t)&&t>0}function u(t,u){return null!==t&&n(t.width)&&t.windowWidth===u}},1048,[1112]);
48
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DETAIL_LAYOUT_SCOPE",{enumerable:!0,get:function(){return c}}),e.buildDetailLayoutTrace=function({deviceId:c,layout:s,viewport:u,sideNav:W,measured:l,containerWidth:w,railWidth:f,mode:b}){return{deviceId:c,winWidth:s.width,winHeight:s.height,orientation:(0,n.isLandscapeViewport)(s)?'landscape':'portrait',viewportSource:u.source,dimWidth:u.dimWidth,dimHeight:u.dimHeight,frameWidth:u.frameWidth,frameHeight:u.frameHeight,screenMinSide:s.screenMinSide??-1,isWeb:s.isWeb,tabletSource:(0,n.tabletSourceFor)(s),tabletMinSide:n.TABLET_MIN_SIDE,isTablet:(0,n.isTabletViewport)(s),webWideMinWidth:n.DETAIL_WIDE_MIN_WIDTH,fullscreen:s.fullscreen,mode:b,sideNavVisible:W.visible,insetLeft:W.insetLeft,sideNavWidth:(0,t.sideNavFootprint)(W),containerWidth:w,containerWidthSource:(0,o.containerWidthSource)({measured:l,windowWidth:s.width,sideNav:W}),measuredWidth:l?.width??-1,measuredInWindowWidth:l?.windowWidth??-1,railWidth:f,railNarrowBelow:h.RAIL_NARROW_BELOW}},e.detailLayoutTraceSignature=function(t){return[t.winWidth,t.winHeight,t.orientation,t.viewportSource,t.dimWidth,t.dimHeight,t.frameWidth,t.frameHeight,t.screenMinSide,t.isWeb?'w':'n',t.tabletSource,t.isTablet?'t':'p',t.fullscreen?'f':'-',t.mode,t.sideNavWidth,t.containerWidth,t.containerWidthSource,t.railWidth].join('|')};var t=r(d[0]),n=r(d[1]),o=r(d[2]),h=r(d[3]);const c='theater:layout'},1049,[1112,956,1048,1077]);
49
- __d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useEventHaptics=function(e,s){const h=(0,t.c)(10),{controller:T,state:O}=(0,o.useConnection)(),R=(0,u.useSettingsStore)(_);let C;h[0]!==e?(C=[...e].sort(p).join(","),h[0]=e,h[1]=C):C=h[1];const S=C,A=(0,n.useRef)(0),I=(0,n.useRef)(c.default.currentState),M=s&&R.enabled&&!1;let x,y,D,N;h[2]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{},y=[],h[2]=x,h[3]=y):(x=h[2],y=h[3]);(0,n.useEffect)(x,y),h[4]!==M||h[5]!==T||h[6]!==S||h[7]!==R?(D=()=>{if(!M)return;const e=T.getSystem();if(!e)return;const t=new Set(S.split(",").map(v)),n=e=>{if("active"!==I.current)return;const t=Date.now(),n=(0,l.resolveHaptic)(R,e,A.current,t);n&&(A.current=t,(0,E.fireHaptic)(n))},s=e.subscribeEvent(a.MOTION_CATEGORY,e=>{const s=(0,a.parseMotionEvent)(e);s&&s.detected&&t.has(s.deviceId)&&n("motion")}),c=e.subscribeEvent(f.DETECTION_CATEGORY,e=>{const s=(0,f.parseDetectionEvent)(e);s&&0!==s.boxes.length&&t.has(Number(s.sourceId))&&n(b(s.boxes))}),o=e.subscribeEvent(f.FRAME_TRACKED_CATEGORY,e=>{const s=(0,f.parseFrameTrackedEvent)(e);s&&0!==s.boxes.length&&t.has(s.deviceId)&&n(b(s.boxes))});return()=>{s(),c(),o()}},N=[T,M,S,R],h[4]=M,h[5]=T,h[6]=S,h[7]=R,h[8]=D,h[9]=N):(D=h[8],N=h[9]);(0,n.useEffect)(D,N)};var e,t=r(d[0]),n=r(d[1]),s=r(d[2]),c=(e=s)&&e.__esModule?e:{default:e};r(d[3]);var o=r(d[4]),u=r(d[5]),a=r(d[6]),f=r(d[7]),l=r(d[8]),E=r(d[9]);function b(e){const t=e.map(e=>e.label),n=e.some(e=>'string'==typeof e.name&&e.name.length>0);return(0,l.detectionEventKind)(t,n)}function v(e){return Number(e)}function p(e,t){return e-t}function _(e){return e.settings.haptics}},1050,[787,16,219,110,815,830,842,1084,1113,1114]);
50
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.DoorbellBadge=function(e){const s=(0,t.c)(55),{deviceId:h,enabled:I}=e,{t:C}=(0,_.useTranslation)(),{colors:j}=(0,b.useTheme)(),{lastPressedAt:D,ringingNow:E}=(0,y.useDoorbell)(h,I),[M,R]=(0,n.useState)(S);let k,P;s[0]!==I||s[1]!==D||s[2]!==E?(k=()=>{if(!I||E||null===D)return;const e=setInterval(()=>R(Date.now()),x);return()=>clearInterval(e)},P=[I,E,D],s[0]=I,s[1]=D,s[2]=E,s[3]=k,s[4]=P):(k=s[3],P=s[4]);(0,n.useEffect)(k,P);const N=(0,u.useSharedValue)(1);let T,G;s[5]!==N||s[6]!==E?(T=()=>{if(E)return N.value=(0,u.withRepeat)((0,u.withSequence)((0,u.withTiming)(.4,{duration:v,easing:u.Easing.inOut(u.Easing.ease)}),(0,u.withTiming)(1,{duration:v,easing:u.Easing.inOut(u.Easing.ease)})),-1,!1),()=>(0,u.cancelAnimation)(N);N.value=(0,u.withTiming)(1,{duration:150})},G=[N,E],s[5]=N,s[6]=E,s[7]=T,s[8]=G):(T=s[7],G=s[8]);(0,n.useEffect)(T,G);const z=(0,u.useAnimatedStyle)((function({_worklet_15229690820397_init_data:e,breathe:t}){const n=()=>({opacity:t.value,transform:[{scale:.85+.15*t.value}]});return n.__closure={breathe:t},n.__workletHash=0xdd9f04fb72d,n.__initData=e,n})({_worklet_15229690820397_init_data:w,breathe:N}));if(!I)return null;if(E){const e=`${j.primary}26`;let t,n,u,_,b,h,y;return s[9]!==e?(t=[A.badge,{backgroundColor:e}],s[9]=e,s[10]=t):t=s[10],s[11]!==j.primary?(n=(0,p.jsx)(f.BellRing,{size:13,color:j.primary}),s[11]=j.primary,s[12]=n):n=s[12],s[13]!==z||s[14]!==n?(u=(0,p.jsx)(c.default.View,{style:z,children:n}),s[13]=z,s[14]=n,s[15]=u):u=s[15],s[16]!==j.primary?(_=[A.text,{color:j.primary}],s[16]=j.primary,s[17]=_):_=s[17],s[18]!==C?(b=C("v2.cameras.doorbellRinging"),s[18]=C,s[19]=b):b=s[19],s[20]!==b||s[21]!==_?(h=(0,p.jsx)(l.default,{style:_,children:b}),s[20]=b,s[21]=_,s[22]=h):h=s[22],s[23]!==h||s[24]!==t||s[25]!==u?(y=(0,p.jsxs)(o.default,{style:t,pointerEvents:"none",children:[u,h]}),s[23]=h,s[24]=t,s[25]=u,s[26]=y):y=s[26],y}let B,O,V,H,$,q,L,U,W,F;if(s[27]!==j||s[28]!==D||s[29]!==M||s[30]!==C){V=Symbol.for("react.early_return_sentinel");e:{const e=(0,y.formatRingAgo)(D,M);if(null===e){V=null;break e}O=o.default;const t=`${j.background}CC`;s[39]!==t?(q=[A.badge,{backgroundColor:t}],s[39]=t,s[40]=q):q=s[40],L="none",s[41]!==j.foregroundMuted?(U=(0,p.jsx)(f.BellRing,{size:12,color:j.foregroundMuted}),s[41]=j.foregroundMuted,s[42]=U):U=s[42],B=l.default,s[43]!==j.foregroundMuted?(H=[A.text,{color:j.foregroundMuted}],s[43]=j.foregroundMuted,s[44]=H):H=s[44],$=C("v2.cameras.doorbellLastRing",{time:e})}s[27]=j,s[28]=D,s[29]=M,s[30]=C,s[31]=B,s[32]=O,s[33]=V,s[34]=H,s[35]=$,s[36]=q,s[37]=L,s[38]=U}else B=s[31],O=s[32],V=s[33],H=s[34],$=s[35],q=s[36],L=s[37],U=s[38];if(V!==Symbol.for("react.early_return_sentinel"))return V;s[45]!==B||s[46]!==H||s[47]!==$?(W=(0,p.jsx)(B,{style:H,children:$}),s[45]=B,s[46]=H,s[47]=$,s[48]=W):W=s[48];s[49]!==O||s[50]!==W||s[51]!==q||s[52]!==L||s[53]!==U?(F=(0,p.jsxs)(O,{style:q,pointerEvents:L,children:[U,W]}),s[49]=O,s[50]=W,s[51]=q,s[52]=L,s[53]=U,s[54]=F):F=s[54];return F};var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),u=r(d[5]),c=e(u),f=r(d[6]),_=r(d[7]),b=r(d[8]),h=r(d[9]),y=r(d[10]),p=r(d[11]);const v=500,x=6e4,w={code:"function DoorbellBadgeTsx1(){const{breathe}=this.__closure;return{opacity:breathe.value,transform:[{scale:0.85+0.15*breathe.value}]};}"};function S(){return Date.now()}const A=s.default.create({badge:{position:'absolute',top:h.SPACING.md,left:h.SPACING.md,flexDirection:'row',alignItems:'center',gap:h.SPACING.xs,paddingHorizontal:h.SPACING.md,paddingVertical:h.SPACING.xs,borderRadius:h.RADIUS.md},text:{fontSize:11,fontWeight:'700'}})},1051,[787,16,115,194,33,1059,814,813,789,831,1052,10]);
51
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DOORBELL_CATEGORY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"RING_WINDOW_MS",{enumerable:!0,get:function(){return c}}),e.readDoorbellStatus=p,e.parseDoorbellEvent=b,e.formatRingAgo=function(t,n){if(null===t)return null;const s=Math.max(0,Math.floor((n-t)/1e3));if(s<60)return'now';const u=Math.floor(s/60);if(u<60)return`${u}m`;const l=Math.floor(u/60);if(l<24)return`${l}h`;return`${Math.floor(l/24)}d`},e.useDoorbell=function(f,C){const y=(0,t.c)(20),{controller:P,state:A}=(0,u.useConnection)(),S=C&&"connected"===A;let v,E,I;y[0]!==f?(v=["v2","doorbell",f],y[0]=f,y[1]=v):v=y[1];y[2]!==P||y[3]!==f?(E=async()=>{const t=P.getSystem();if(!t)return{lastPressedAt:null,pressCount:0};try{return p(await t.trpcClient.doorbell.getStatus.query({deviceId:f}))}catch{return{lastPressedAt:null,pressCount:0}}},y[2]=P,y[3]=f,y[4]=E):E=y[4];y[5]!==S||y[6]!==v||y[7]!==E?(I={queryKey:v,enabled:S,staleTime:l.RECONCILE_MS,refetchInterval:l.RECONCILE_MS,queryFn:E},y[5]=S,y[6]=v,y[7]=E,y[8]=I):I=y[8];const{data:M}=(0,s.useQuery)(I);let O;y[9]!==M?(O=void 0===M?{lastPressedAt:null,pressCount:0}:M,y[9]=M,y[10]=O):O=y[10];const _=O,[h,R]=(0,n.useState)(!1),[D,N]=(0,n.useState)(null),T=(0,n.useRef)(null);let j,L;y[11]!==S||y[12]!==P||y[13]!==f?(j=()=>{if(!S)return R(!1),void N(null);const t=P.getSystem();if(!t)return;const n=t.subscribeEvent(o,t=>{const n=b(t);n&&n.deviceId===f&&(N(n.timestamp),R(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{R(!1),T.current=null},c))});return()=>{n(),T.current&&(clearTimeout(T.current),T.current=null),R(!1)}},L=[P,S,f],y[11]=S,y[12]=P,y[13]=f,y[14]=j,y[15]=L):(j=y[14],L=y[15]);(0,n.useEffect)(j,L);const q=null!==D&&(null===_.lastPressedAt||D>_.lastPressedAt)?D:_.lastPressedAt;let w;y[16]!==q||y[17]!==_.pressCount||y[18]!==h?(w={lastPressedAt:q,pressCount:_.pressCount,ringingNow:h},y[16]=q,y[17]=_.pressCount,y[18]=h,y[19]=w):w=y[19];return w};var t=r(d[0]),n=r(d[1]),s=r(d[2]),u=r(d[3]),l=r(d[4]);const o='doorbell.onPressed',c=8e3;function f(t){return'object'==typeof t&&null!==t}function p(t){if(!f(t))return{lastPressedAt:null,pressCount:0};return{lastPressedAt:'number'==typeof t.lastPressedAt?t.lastPressedAt:null,pressCount:'number'==typeof t.pressCountSinceStart?t.pressCountSinceStart:0}}function b(t){if(!f(t))return null;const n=t.deviceId,s=t.timestamp;return'number'!=typeof n||'number'!=typeof s?null:{deviceId:n,timestamp:s}}},1052,[787,16,848,815,849]);
52
- __d(function(g,_r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.readoutDeviceIds=p,_e.OverlayReadouts=function(e){const c=(0,n.c)(21),{deviceId:s,config:h,enabled:I}=e,{t:k}=(0,l.useTranslation)();let x;c[0]!==h?(x=p(h),c[0]=h,c[1]=x):x=c[1];const F=x;let O;c[2]===Symbol.for("react.memo_cache_sentinel")?(O={},c[2]=O):O=c[2];const[S,V]=t.default.useState(O);let A;c[3]===Symbol.for("react.memo_cache_sentinel")?(A=(e,n)=>{V(t=>t[e]===n?t:Object.assign({},t,{[e]:n}))},c[3]=A):A=c[3];const E=A;let D;c[4]!==h.readouts?(D=h.readouts.some(y),c[4]=h.readouts,c[5]=D):D=c[5];const R=D,C=(0,r.useAudioLevel)(s,I&&R);let N;c[6]!==S||c[7]!==C||c[8]!==k?(N=e=>{if("audioDbfs"===e.source.kind)return null!==C&&Number.isFinite(C)?(0,u.formatLiveValue)(C,{precision:e.precision??1,unit:e.unit??"dBFS",onLabel:k("v2.common.on"),offLabel:k("v2.common.off")}):"\u2014";const n=(S[e.source.deviceId]??[]).find(n=>"deviceField"===e.source.kind&&n.sectionId===e.source.sectionId&&n.key===e.source.fieldKey);if(!n)return"\u2014";const t={onLabel:k("v2.common.on"),offLabel:k("v2.common.off")},o=e.precision??n.precision;void 0!==o&&(t.precision=o);const c=e.unit??n.unit;return void 0!==c&&(t.unit=c),(0,u.formatLiveValue)(n.value,t)},c[6]=S,c[7]=C,c[8]=k,c[9]=N):N=c[9];const z=N;if(!I||0===h.readouts.length)return null;let H,M,w;if(c[10]!==F||c[11]!==I){let e;c[13]!==I?(e=e=>(0,v.jsx)(L,{deviceId:e,enabled:I,onFields:E},e),c[13]=I,c[14]=e):e=c[14],H=F.map(e),c[10]=F,c[11]=I,c[12]=H}else H=c[12];c[15]!==h||c[16]!==z?(M=b.OVERLAY_ANCHORS.map(e=>{const n=(0,f.readoutsAt)(h,e);return 0===n.length?null:(0,v.jsx)(o.default,{pointerEvents:"none",style:[j.stack,b.ANCHOR_PLACEMENT[e]],children:n.map(e=>(0,v.jsx)(_,{label:e.label,value:z(e)},e.id))},e)}),c[15]=h,c[16]=z,c[17]=M):M=c[17];c[18]!==H||c[19]!==M?(w=(0,v.jsxs)(v.Fragment,{children:[H,M]}),c[18]=H,c[19]=M,c[20]=w):w=c[20];return w};var n=_r(d[0]),t=e(_r(d[1])),o=e(_r(d[2])),c=e(_r(d[3])),s=e(_r(d[4])),l=_r(d[5]),r=_r(d[6]),u=_r(d[7]),f=_r(d[8]),b=_r(d[9]),v=_r(d[10]);function p(e){const n=new Set;for(const t of e.readouts)'deviceField'===t.source.kind&&n.add(t.source.deviceId);return[...n]}const h=[];function L(e){const o=(0,n.c)(5),{deviceId:c,enabled:s,onFields:l}=e,{data:r}=(0,u.useDeviceLiveFields)(c,s),f=r??h;let b,v;return o[0]!==c||o[1]!==f||o[2]!==l?(b=()=>{l(c,f)},v=[c,f,l],o[0]=c,o[1]=f,o[2]=l,o[3]=b,o[4]=v):(b=o[3],v=o[4]),t.default.useEffect(b,v),null}function _(e){const t=(0,n.c)(7),{label:s,value:l}=e;let r,u,f;return t[0]!==s?(r=(0,v.jsx)(c.default,{style:j.chipLabel,numberOfLines:1,children:s}),t[0]=s,t[1]=r):r=t[1],t[2]!==l?(u=(0,v.jsx)(c.default,{style:j.chipValue,numberOfLines:1,children:l}),t[2]=l,t[3]=u):u=t[3],t[4]!==r||t[5]!==u?(f=(0,v.jsxs)(o.default,{style:j.chip,pointerEvents:"none",children:[r,u]}),t[4]=r,t[5]=u,t[6]=f):f=t[6],f}function y(e){return"audioDbfs"===e.source.kind}const j=s.default.create({stack:{position:'absolute',gap:4},chip:{flexDirection:'row',alignItems:'baseline',gap:5,paddingHorizontal:7,paddingVertical:3,borderRadius:6,backgroundColor:'rgba(0,0,0,0.55)'},chipLabel:{color:'#c7c7c7',fontSize:10,fontWeight:'600'},chipValue:{color:'#fafaf9',fontSize:12,fontWeight:'700',fontVariant:['tabular-nums']}})},1053,[787,16,115,194,33,813,1085,1115,1087,1116,10]);