@camstack/addon-pipeline-orchestrator 1.2.665 → 1.2.667
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/assets/viewer/.viewer-current-files.json +24 -24
- package/assets/viewer/.viewer-version +1 -1
- package/assets/viewer/_expo/static/js/web/{Clipboard-3c3c5a559a1968fdf0d9340338c8d3fa.js → Clipboard-b6e0c08e8e8c6723a16059e8a5f034d5.js} +8 -8
- package/assets/viewer/_expo/static/js/web/Clipboard-cba253dbeeeb383ce66f3c84fbe67025.js +8 -0
- package/assets/viewer/_expo/static/js/web/{Haptics-7e9ec45cd804d266488ee605ff6b444f.js → Haptics-4770c6d7c73d2becf4ac20cfd82301e3.js} +3 -3
- package/assets/viewer/_expo/static/js/web/Haptics-837d56e745cc59bcc770303d4f3b2a38.js +3 -0
- package/assets/viewer/_expo/static/js/web/{[frameId]-cdb0614ac0da3eb19aa5a6acb40b53d9.js → [frameId]-528f1ef5ec6602be658268df473077be.js} +23 -23
- package/assets/viewer/_expo/static/js/web/{[id]-10140de1bf56b396cde6675b96ba5c04.js → [id]-71ad765384f2942198bfca7743db54f1.js} +50 -46
- package/assets/viewer/_expo/static/js/web/{[id]-d0baf6b31342159fc081008ef1f2087f.js → [id]-78f7c87c88400a873d0b533e7c23f76a.js} +5 -5
- package/assets/viewer/_expo/static/js/web/{[id]-0999e6e8d5ebe2bdf791bac89e29591f.js → [id]-9567e4993a3f1d89c3110b2641846af2.js} +2 -2
- package/assets/viewer/_expo/static/js/web/[id]-987ae3321e809d96b4a4181a19298ebb.js +5 -0
- package/assets/viewer/_expo/static/js/web/{[id]-878bec264f82c5bf51489d485e24b207.js → [id]-c0f33d2f5fe793f731fd61c937d7b44c.js} +7 -7
- package/assets/viewer/_expo/static/js/web/[id]-f3da975fca51aba463a0f02017e72a65.js +7 -0
- package/assets/viewer/_expo/static/js/web/[section]-a3c5edce4233f867497e894ed81facc6.js +31 -0
- package/assets/viewer/_expo/static/js/web/{[section]-b4061c410ca784cb7f12b2b879f03353.js → [section]-b015bac86cf9f4878c5e8039708fc7d1.js} +31 -31
- package/assets/viewer/_expo/static/js/web/{__common-c1006820c503eeb932053de50a0c5744.js → __common-37966e866c55875c88781e525364c3ea.js} +1844 -1844
- package/assets/viewer/_expo/static/js/web/{__common-944a1711775677f5c7cba328efbb7eb2.js → __common-5347bf558599c0f47249bb63f3bc8096.js} +1836 -1836
- package/assets/viewer/_expo/static/js/web/{_layout-7910936c0d0224d3b6ecd4ed95567264.js → _layout-fa7def3815bd963af923f3fb0b28b8a4.js} +24 -24
- package/assets/viewer/_expo/static/js/web/_layout-fa940306541897e284d2e42a3dae7308.js +24 -0
- package/assets/viewer/_expo/static/js/web/{add-server-22cb2419b2b4842fe57d4a0f274fa271.js → add-server-c59be262439c5c4d3263dc368bf1d4d4.js} +2 -2
- package/assets/viewer/_expo/static/js/web/add-server-dc8c504e936a81d69e40f6efa6ac7b2b.js +2 -0
- package/assets/viewer/_expo/static/js/web/{adhoc-1133eb81de4b1c92962e4111a874636e.js → adhoc-9d63ed0305edf18069cc3f3f2e6ccd1d.js} +1 -1
- package/assets/viewer/_expo/static/js/web/{alarm-1f8d7a07799cd782fefb469c10fd40cf.js → alarm-32ab52a1cb0128e69b1bfcc4cd1b219e.js} +1 -1
- package/assets/viewer/_expo/static/js/web/alarm-8c1402344adf58c18245c2a1da1a316b.js +1 -0
- package/assets/viewer/_expo/static/js/web/{cameras-aaa1d3a5f4a6869a6a431b827029ad93.js → cameras-5d2d0676a64f4c01b81004f9a5138152.js} +27 -27
- package/assets/viewer/_expo/static/js/web/cameras-6a7062fac61db150930c4ea824098806.js +27 -0
- package/assets/viewer/_expo/static/js/web/{connect-957cf51a12ddfd586657b560d0e1158c.js → connect-a04da8316c872406a85fecfac72afb97.js} +2 -2
- package/assets/viewer/_expo/static/js/web/connect-bbb28b4b4df5a85e8de5d0d3034e5445.js +2 -0
- package/assets/viewer/_expo/static/js/web/{enroll-c9eae027db722e770adf2f3ddec4cb87.js → enroll-6fe018df6035905080abf2163931500a.js} +19 -19
- package/assets/viewer/_expo/static/js/web/enroll-782faf384e3ac476d89a394e99835835.js +19 -0
- package/assets/viewer/_expo/static/js/web/{history-f3ca6446f63f97916169b69565a8a979.js → history-7e0ec59e8eda500a3c79400f9d048933.js} +3 -3
- package/assets/viewer/_expo/static/js/web/{index-8c478ea1e5ddf090855b63d8b829a750.js → index-2d40982745027241350379ea664ebf48.js} +1 -1
- package/assets/viewer/_expo/static/js/web/{index-de82fe372b81ea9a28bb8b5b8fbcce88.js → index-379be00b659341792684238227461217.js} +4 -4
- package/assets/viewer/_expo/static/js/web/{index-23b1ac33b59cd8940709dc955d98d7f4.js → index-682c895d9ae6c5fd07258ad0335a89a2.js} +2 -2
- package/assets/viewer/_expo/static/js/web/index-7fb91729ac1133d8e8e2873ea9046958.js +2 -0
- package/assets/viewer/_expo/static/js/web/{index-3b50c929438ccb1b9d91b59caed856d7.js → index-8c0a589c651d0905b5f092442bdea699.js} +1 -1
- package/assets/viewer/_expo/static/js/web/{index-bba520e9de4e43f8c1b628f27c49c35c.js → index-9c79a5153bc603a135ced9ee11b99464.js} +2 -2
- package/assets/viewer/_expo/static/js/web/{index-c2e4074d6805fc38a186dd83bd4fd0a2.js → index-b2db94a55da06710686c8d231c3a160f.js} +2 -2
- package/assets/viewer/_expo/static/js/web/index-cdd684984f16d19f8d2c87782de30fa6.js +4 -0
- package/assets/viewer/_expo/static/js/web/index-fd788c291d9b9de7d0895bb58b0549b7.js +1 -0
- package/assets/viewer/_expo/static/js/web/{new-8119c7a239466b22805ca6d0e357cfc7.js → new-41d5293ef3668dcabd305dd0cec83c60.js} +2 -2
- package/assets/viewer/_expo/static/js/web/new-e878bad89ab3055e4675ecf163c526cf.js +2 -0
- package/assets/viewer/_expo/static/js/web/{sign-in-dbc02d4e6ad3ca801a17f28438575a4e.js → sign-in-6d7c44c0e4b3a63d597c93c1aeebafa8.js} +38 -38
- package/assets/viewer/_expo/static/js/web/sign-in-ac807c2017f1f0665288ee84bfc94787.js +38 -0
- package/assets/viewer/index.html +1 -1
- package/dist/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-B7k80ISv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-RuJPE6QL.mjs} +2 -2
- package/dist/{_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DfqFDwlL.mjs → _virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BDfpXeSr.mjs} +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DBMfBxpT.mjs +26 -0
- package/dist/{hostInit-Bk7YaEnm.mjs → hostInit-B2CXeCkI.mjs} +2 -2
- package/dist/index.js +2 -71
- package/dist/index.mjs +2 -71
- package/dist/remoteEntry.js +1 -1
- package/package.json +2 -2
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DxiHs-74.mjs +0 -26
|
@@ -1,57 +1,61 @@
|
|
|
1
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}},755,[788,789,1156,10]);
|
|
2
|
-
__d(function(e,t,a,o,i,n,r){"use strict";function l(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 Pt}}),n.CameraDetailScreen=function({deviceId:e,initialSeekMs:t}){const a=(0,nt.usePopTransitions)(),{t:o}=(0,x.useTranslation)(),i=(0,O.useConfirm)(),n=(0,O.useNotice)(),r=(0,T.useRouter)(),{colors:l,mode:s}=(0,q.useTheme)(),c=(0,I.useSafeAreaInsets)(),{viewport:C,readout:Ke}=(0,k.useViewportReadout)(),{width:Qe,height:Jt}=C,{name:Ut,features:$t,online:qt,disabled:Zt,known:Kt}=Et(e),{settings:Qt,hydrated:Xt,setStreamDefault:ea}=(0,ot.useSettings)(),ta=Qt.stream.clipLoop,aa=(0,d.useCallback)(()=>{ea('clipLoop',!ta)},[ea,ta]),oa=(0,_t.useCanActuate)(),ia=oa&&$t.includes(Xe.FEATURE.ptz),na=$t.includes(Xe.FEATURE.battery),{data:ra=[]}=(0,ae.useDeviceCapNames)(e,!0),la=ra.includes('network-link'),sa=oa&&ra.includes('navigation'),{data:ca=null}=(0,at.useBattery)(e,na),ua=na&&!0===ca?.sleeping,da=$t.includes(Xe.FEATURE.twoWayAudio),ha=$t.includes(Xe.FEATURE.doorbell),ma=(0,pt.useCameraLocalStore)(t=>t.local.byId[e]?.quality),ga=(0,pt.useCameraLocalStore)(e=>e.setCameraQuality),pa=(0,pt.useCameraLocalStore)(t=>t.local.byId[e]?.audioOn),va=(0,pt.useCameraLocalStore)(e=>e.hydrated),fa=(0,pt.useCameraLocalStore)(e=>e.hydrate);(0,d.useEffect)(()=>{fa()},[fa]);const Sa=(0,pt.useCameraLocalStore)(e=>e.setCameraAudioOn),[wa,ba]=(0,d.useState)(ma??'auto'),_a=(0,d.useRef)(!1);(0,d.useEffect)(()=>{va&&!_a.current&&(_a.current=!0,void 0!==ma&&ba(ma))},[va,ma]);const ya=(0,kt.useRouteChannel)(),ka=(0,d.useMemo)(()=>(0,yt.qualityToTargetForRoute)(wa,ya),[wa,ya]),Ca=(0,d.useCallback)(t=>{ba(t),ga(e,t)},[e,ga]);(0,et.useEventHaptics)([e],!0);const{overlay:Ha,setOverlay:Oa,highlight:xa,setHighlight:Ta}=(0,bt.useCameraViewOptions)(e),Ia=(0,dt.useDetections)(e,xa.detection&&!0),Ea=xa.detection&&Ia.boxes.some(e=>0===xa.detectionClasses.length||xa.detectionClasses.includes(e.label)),Pa=(0,gt.useHeld)(Ea,1e3*xa.detectionHoldSec),Da=(0,ht.useAudioActive)(e,xa.audio,xa.audioDb),Ra=(0,gt.useHeld)('off'!==xa.audio&&Da,1e3*mt.AUDIO_HIGHLIGHT_HOLD_SEC),[Wa,La]=(0,d.useState)(0),Ba=`${xa.audio}:${xa.audioDb}`,Aa=(0,d.useRef)(!0);(0,d.useEffect)(()=>{if(Aa.current)return void(Aa.current=!1);if('off'===xa.audio)return void La(0);const e=Date.now()+1e3*mt.AUDIO_HIGHLIGHT_HOLD_SEC;La(e);const t=setTimeout(()=>La(0),1e3*mt.AUDIO_HIGHLIGHT_HOLD_SEC);return()=>clearTimeout(t)},[Ba,xa.audio]);const ja=Wa>Date.now(),Ma=(0,d.useMemo)(()=>({enabled:Ha.highlightBorder,...xa,audioHoldSec:mt.AUDIO_HIGHLIGHT_HOLD_SEC,appearance:Qt.highlight,motionHoldSec:Qt.grid.motionHoldSec}),[Ha.highlightBorder,xa,Qt.highlight,Qt.grid.motionHoldSec]),[za,Fa]=(0,d.useState)(null),Ga={operatorChoice:za,cameraKnown:Kt,batteryPowered:na},Na=(0,me.resolveLivePaused)(Ga),Ja=(0,d.useRef)(Na);Ja.current=Na;const[Ya,Va]=(0,d.useState)({state:'connecting'}),Ua=(0,d.useRef)(null),$a=(0,d.useRef)(Ya.state);$a.current=Ya.state;const qa=()=>{Fa(e=>!(0,me.resolveLivePaused)({operatorChoice:e,cameraKnown:Kt,batteryPowered:na}))},[Za,Ka]=(0,d.useState)(1),[Qa,Xa]=(0,d.useState)(!1),eo=(0,d.useRef)(null),[to,ao]=(0,d.useState)(!1),[oo,io]=(0,d.useState)(null),[no,ro]=(0,d.useState)(0),lo=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(!to||null===oo)return void ro(0);const e=()=>ro(Math.floor((Date.now()-oo)/1e3));e();const t=setInterval(e,250);return()=>clearInterval(t)},[to,oo]);const[so,co]=(0,d.useState)(0),uo=(0,d.useRef)(t??null),[ho,mo]=(0,d.useState)(t),[go,po]=(0,d.useState)(void 0),vo=(0,d.useMemo)(()=>({scrubStart:e=>{eo.current?.scrubStart(e)},scrubTo:(e,t)=>eo.current?.scrubTo(e,t?.mode,t?.velocityPxPerS),scrubCommit:(e,t)=>eo.current?.scrubCommit(e,t),seek:e=>eo.current?.seek(e),goLive:()=>{if(!(0,me.shouldDialLiveOnGoLive)(Ja.current))return uo.current=null,mo(void 0),Xa(!1),void Ka(1);eo.current?.goLive(),co(e=>e+1),Xa(!1),Ka(1),uo.current=null,mo(void 0)}}),[]),fo=(0,j.usePlaybackMachine)(vo),So=(0,d.useMemo)(()=>({playClip:(e,t,a,o)=>{const i=eo.current,n='connecting'!==$a.current&&'error'!==$a.current;return(0,g.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):(po({clipId:e,provider:t,...void 0===o?{}:{profile:o}}),!1)},noteAsserted:e=>{Ua.current=e},scrubStart:e=>{eo.current?.scrubStart(e)},scrubTo:e=>{eo.current?.scrubTo(e)},scrubCommit:(e,t)=>{eo.current?.scrubCommit(e,t)}}),[]),wo=(0,h.useClipStage)(So,ta),[bo,_o]=(0,d.useState)(Dt),yo=(0,d.useCallback)(e=>{_o(t=>(0,f.adoptClipList)(t,e))},[]);(0,d.useEffect)(()=>{const e=[3e3,1e4].map(e=>setTimeout(()=>eo.current?.timelineWarm(Date.now()-3e4),e));return()=>{for(const t of e)clearTimeout(t)}},[]);const ko='live'!==fo.state.mode,Co=(0,d.useCallback)(()=>{po(void 0),wo.close()},[wo]),Ho=(0,d.useCallback)(()=>{Co(),fo.goLive()},[Co,fo]),Oo=(0,d.useRef)(!1),xo='clip'===wo.stage.kind?wo.stage.clipId:null;(0,d.useEffect)(()=>{const e=null!==eo.current;Ua.current=(0,u.assertionAfterPlayerChange)(Ua.current,e,Ya.state),(0,u.shouldAssertClip)({heldClipId:xo,playerPresent:e,playerState:Ya.state,assertedClipId:Ua.current})&&null!==xo&&((0,g.noteClipOpenStep)('assert',{clipId:xo,playerState:Ya.state}),Ua.current=xo,wo.replay())},[xo,Ya.state,wo]);const To=(0,m.clipStartOnFrame)(bo,wo.stage),Io=(0,me.shouldMountLiveView)({liveHeld:Na,mode:fo.state.mode,playhead:fo.state.playhead,recordedSeekMs:ho??null,keepRecordedSession:Oo.current,initialClipId:xo});Oo.current=Io;const Eo=e=>{Na&&null==eo.current&&(uo.current=e,mo(e))},Po=(0,d.useCallback)((e,t)=>{Eo(e),fo.seek(e,t)},[Na,fo]),Do=(0,d.useCallback)((e,t)=>{Eo(e),fo.commitScrub(e,t)},[Na,fo]),Ro=async()=>{if(!lo.current)return null;lo.current=!1,ao(!1),io(null);try{return await(eo.current?.stopLiveCapture())??null}catch{return n({title:o('v2.theater.recordLive'),message:o('v2.theater.recordFailed')}),null}},Wo=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 L.isAvailableAsync()&&await L.shareAsync(o,{mimeType:t.mime||('webm'===a?'video/webm':'video/mp4'),UTI:'webm'===a?'public.movie':'public.mpeg-4'})},Lo=e=>{(async()=>{await i({title:o('v2.theater.keepClipTitle'),confirmLabel:o('v2.theater.shareClip'),cancelLabel:o('v2.theater.discardClip')})&&await Wo(e)})()},Bo={capturing:to,elapsedLabel:(0,X.formatSelectionDuration)(1e3*no),onStart:()=>{lo.current=!0,ao(!0),io(Date.now()),eo.current?.startLiveCapture()},onKeep:()=>{(async()=>{const e=await Ro();e&&await Wo(e)})()},onDiscard:()=>{Ro()}},Ao=(0,oe.useExportSelection)(e,Ut,fo),jo=(0,ie.useActivityStore)(e=>e.add),Mo=(0,d.useCallback)(()=>{(async()=>{const t=()=>n({title:o('v2.activity.title'),message:o('v2.activity.snapshotFailed')}),a=eo.current;if(null!==a)try{const i=await a.captureSnapshot(),r=Date.now(),l=(0,j.selectActiveEpoch)(fo.state)??r,s=await(0,re.saveSnapshot)(i.base64,`snapshot-${e}-${l}`);if(null===s)return void t();jo((0,ne.snapshotItemFrom)({uid:`${e}-${r.toString(36)}`,deviceId:e,cameraName:Ut,atMs:l,fileUri:s.uri,mime:s.mime,now:r})),n({title:o('v2.activity.title'),message:o('v2.activity.snapshotSaved')})}catch(a){F.log.warn('activity','snapshot failed',{deviceId:e,error:a instanceof Error?a.message:String(a)}),t()}else t()})()},[jo,e,Ut,n,fo,o]),zo='clip'===wo.stage.kind;(0,d.useEffect)(()=>{(0,v.shouldEndLiveCapture)({mode:fo.state.mode,clipHeld:zo})&&lo.current&&(async()=>{const e=await Ro();e&&Lo(e)})()},[fo.state.mode,zo]);const Fo=(0,d.useCallback)(()=>{const e=!Qa;Xa(e),eo.current?.setRate(e?0:Za)},[Qa,Za]),Go=(0,d.useCallback)(e=>{Ka(e),Qa||eo.current?.setRate(e)},[Qa]),No=(0,d.useCallback)(e=>{Qa||Xa(!0),eo.current?.stepFrame(e)},[Qa]),Jo=(0,d.useCallback)(e=>{const t=uo.current;null!==t&&(uo.current=null,mo(void 0),'adopt'===e?fo.adoptSeek(t,'cluster'):fo.seek(t,'cluster'))},[fo]),[Yo,Vo]=(0,d.useState)(null),Uo=(0,d.useRef)(null);Uo.current=Yo;const $o=(0,d.useRef)(!1),qo=(0,d.useRef)(null),Zo=(0,d.useRef)(null),Ko=(0,d.useRef)(fo.state.mode);Ko.current=fo.state.mode;const Qo=(0,d.useRef)((0,j.selectActiveEpoch)(fo.state));Qo.current=(0,j.selectActiveEpoch)(fo.state);const Xo=(0,d.useRef)(null);Xo.current=xo;const ei=(0,d.useCallback)(()=>{if(!(0,K.shouldReassertRecordedOnReconnect)({playbackMode:Ko.current,playheadEpoch:Qo.current,clipHoldingFrame:Xo.current}))return;const e=Qo.current;null!==e&&(qo.current=e,Zo.current=(0,K.resolveRecordedProfileForReconnect)(ka,Uo.current?.profile??null),$o.current=!0)},[ka]);(0,d.useEffect)(()=>{if(!$o.current)return;if('playing'!==Ya.state)return;const t=qo.current,a=Zo.current;$o.current=!1,qo.current=null,Zo.current=null,null!==t&&null!==a&&'live'!==Ko.current&&(F.log.info('playback','foreground reconnect \u2192 playRecorded',{tags:{deviceId:e},epoch:t,profile:a}),eo.current?.playRecorded(t,a),Qa&&eo.current?.setRate(0))},[Ya.state,e,Qa]);const ti=wo.reportPlayerState,ai=(0,d.useCallback)(e=>{fo.reportEmbedState(e),ti(e),'paused'===e?Xa(!0):'playing'===e&&Xa(!1),'gap'!==e&&'error'!==e||(uo.current=null,mo(void 0)),Jo((0,z.resolveInitialSeekAction)(e))},[fo,Jo,ti]),[oi,ii]=(0,d.useState)(!0),ni=(0,d.useRef)(!1);(0,d.useEffect)(()=>{Xt&&va&&!ni.current&&(ni.current=!0,ii((0,ft.opensMuted)(Qt.stream.audioOnOpen,pa)))},[Xt,va,Qt.stream.audioOnOpen,pa]);const ri=(0,St.hasLayer)(Ha,'motion'),li=(0,St.hasLayer)(Ha,'objects'),si=(0,St.hasLayer)(Ha,'discarded'),ci=(0,St.hasLayer)(Ha,'stationary'),ui=Ha.stats,di=(0,fe.useStreamAspect)(e),hi=Ha.audioMeter,mi=(0,Ce.useSettingsStore)(e=>e.settings.deviceInfo),[gi,pi]=(0,d.useState)(!1),[vi,fi]=(0,d.useState)(!0),[Si,wi]=(0,d.useState)(!1),bi=(0,d.useCallback)(()=>wi(e=>!e),[]),[_i,yi]=(0,d.useState)(0),ki=(0,d.useCallback)(()=>yi(e=>e+1),[]),[Ci,Hi]=(0,d.useState)(Qt.stream.landscapeTimeline),Oi=(0,d.useCallback)(e=>{Hi(e),ea('landscapeTimeline',e)},[ea]),xi=(0,d.useRef)(null),Ti=(0,d.useCallback)(()=>{Hi(e=>'off'===e?'overlay':e),xi.current?.openControls()},[]),[Ii,Ei]=(0,d.useState)(null),[Pi,Di]=(0,d.useState)(!1),Ri=(0,d.useCallback)(()=>Di(!0),[]),Wi=(0,d.useCallback)(()=>{Di(!1),Ei(null)},[]),Li=(0,d.useCallback)(e=>{Ei(e),Di(!1)},[]),Bi=(0,d.useCallback)(()=>Di(!1),[]),Ai=(0,d.useRef)(null),ji=(0,d.useCallback)(()=>{(0,w.scrubFramePainted)(e)},[e]),Mi=wo.reportPosition,zi=(0,d.useCallback)(t=>{if(Mi(t))return;Jo('adopt'),fo.reportPosition(t);const a=Date.now(),o=(0,M.evaluateDivergence)({indicatorEpoch:(0,j.selectActiveEpoch)(fo.state),playerEpoch:t,nowMs:a,lastReportAt:Ai.current});null!==o&&(Ai.current=a,F.log.warn('theater:divergence','indicator and stream disagree',{deviceId:e,deltaMs:o.deltaMs,indicatorAhead:o.indicatorAhead,indicatorEpoch:(0,j.selectActiveEpoch)(fo.state),playerEpoch:t,mode:fo.state.mode,seekAnchor:fo.state.seekAnchor,seekLanded:fo.state.seekLanded}))},[fo,e,Jo,Mi]),Fi=(0,d.useCallback)(()=>{const t=!oi;ii(t),Sa(e,!t)},[oi,e,Sa]),Gi=(0,d.useCallback)(t=>{if(t===e)return;const a=(0,De.viewedInstant)((0,j.selectActiveEpoch)(fo.state));F.log.info('theater','switch camera',{tags:{deviceId:t},from:e,carrying:'at'===a.kind?a.atMs:'live'}),r.replace(`/camera/${t}${(0,De.atParam)(a)}`)},[r,e,fo.state]),[Ni,Ji]=(0,d.useState)(null),Yi=(0,Ye.useLastCameraStore)(e=>e.forget),Vi=(0,d.useCallback)((e,t)=>{Ji({kind:e,deviceId:t})},[]),Ui=(0,d.useCallback)(e=>{(0,Re.openOnDemandPlayer)({deviceId:e,atMs:(0,Pe.resolveReelInstant)((0,j.selectActiveEpoch)(fo.state))})},[fo.state]),$i=(0,d.useCallback)(()=>Ji(null),[]),{data:qi}=(0,Xe.useCameras)(),Zi=(0,d.useMemo)(()=>(0,Ve.resolveCellPanel)(Ni,(qi??[]).map(e=>e.id)),[Ni,qi]),Ki=(qi??[]).find(e=>e.id===Zi?.deviceId),Qi=Ki?.name??'',Xi=oa&&(Ki?.features??[]).includes(Xe.FEATURE.ptz),en=(0,d.useCallback)(e=>Oa((0,St.patchOverlay)(Ha,{audioMeter:e})),[Oa,Ha]),tn=(0,d.useCallback)(()=>fi(e=>!e),[]),an=(0,d.useCallback)(()=>fi(!1),[]),on=(0,d.useCallback)(()=>{Va({state:'connecting'}),Ho()},[Ho]),nn=(0,d.useCallback)(()=>eo.current?.startPip()??Promise.resolve('unavailable'),[]),rn=(0,G.useSystemPip)({mode:fo.state.mode,playerState:Ya.state,goLive:on,startPip:nn}),ln=rn.request,[sn,cn]=(0,d.useState)(e);if(sn!==e){cn(e);const t=(0,De.viewedInstant)((0,j.selectActiveEpoch)(fo.state)),a='at'===t.kind?t.atMs:void 0;fo.swapCamera(a??null),mo(a),Ka(1),Xa(!1),Fa(null),Va({state:'connecting'}),Vo(null),ii((0,ft.opensMuted)(Qt.stream.audioOnOpen,pa)),ba(ma??'auto'),Ei(null),Di(!1),Ji(null),wi(!1),La(0),ao(!1),io(null),ro(0),F.log.info('theater','camera swapped in place',{tags:{deviceId:e},from:sn,carrying:a??'live'})}(0,d.useEffect)(()=>{uo.current=ho??null,Oo.current=!1,Ja.current=!1,ni.current=!1,_a.current=!1,Aa.current=!0,lo.current&&(F.log.warn('live:lifecycle','live capture dropped: the camera was swapped',{tags:{deviceId:e}}),lo.current=!1),rn.abandon()},[e]),(0,d.useEffect)(()=>{(0,Re.focusOnDemandCamera)(e)},[e]);const un=(0,d.useCallback)(()=>eo.current?.getStats()??Promise.resolve(null),[]),{talking:dn,error:hn,toggle:mn}=(0,le.useIntercom)(e);(0,d.useEffect)(()=>{hn&&n({title:o('v2.cameraDetail.talk'),message:o('v2.cameraDetail.talkFailed')})},[hn,o,n]);const gn=(0,Ze.useScreenMinSide)(),{showSidebar:pn,compact:vn}=(0,Ze.useSidebarLayout)(),fn=(0,T.usePathname)(),Sn={width:Qe,height:Jt,screenMinSide:gn,isWeb:!0,fullscreen:gi},wn=(0,$e.resolveDetailLayoutMode)(Sn),bn='wide'===wn,_n=(0,Ge.useWorkspaceStore)(e=>e.setMembers),yn=(0,Ge.useWorkspaceStore)(e=>e.workspace.members),kn=(0,Ge.useWorkspaceStore)(e=>e.wallOptions.quality),Cn=(0,Ge.useWorkspaceStore)(e=>e.setWallOptions),Hn=(0,d.useCallback)(e=>Cn({quality:e}),[Cn]),On=(0,d.useMemo)(()=>(0,je.workspaceOnScreenCameras)(yn,e),[yn,e]),xn=(0,je.shouldShowWorkspaceGrid)(wn,yn,e);(0,d.useEffect)(()=>{xn&&lo.current&&(lo.current=!1,ao(!1),io(null),F.log.warn('live:lifecycle','live capture dropped: the picture became a wall',{deviceId:e}))},[xn,e]);const Tn=(0,Fe.cameraSelectionModeFor)(wn),In=(0,d.useCallback)(e=>{const t=(0,Fe.resolveCameraSelection)(Tn,e);switch(t.kind){case'buildView':return void _n(t.members);case'goTo':return void Gi(t.deviceId);case'openGrid':return void r.push(`/grid/adhoc?devices=${(0,xe.serializeAdhocDeviceIds)(t.deviceIds)}`);case'none':return}},[Tn,Gi,r,_n]),En=Qe>Jt,Pn='fill'===wn,Dn=Pn&&ia&&!sa,Rn=Pn?Ci:'off',Wn=(0,rt.timelineShown)(Rn),Ln='side'===Rn,Bn=(0,$e.toolbarPlacementFor)(wn),An=(0,N.shouldShowOverlayPlayPause)({fill:Pn,landscapeDrawerOpen:Wn}),[jn,Mn]=(0,d.useState)(null),zn=(0,d.useCallback)(e=>{const t=e.nativeEvent.layout.width;(0,Ue.isUsableMeasurement)(t)&&Mn(e=>null!==e&&e.width===t&&e.windowWidth===Qe?e:{width:t,windowWidth:Qe})},[Qe]),Fn=(0,d.useMemo)(()=>({visible:pn&&!Pn,compact:vn,insetLeft:c.left}),[pn,Pn,vn,c.left]),Gn=(0,Ue.resolveContainerWidth)({measured:jn,windowWidth:Qe,sideNav:Fn}),Nn=(0,Ne.shouldShowStreamNavBar)({enabled:Qt.stream.navBarOnStream,showSidebar:pn,fill:Pn}),Jn=(0,$.bottomNavFootprint)({visible:Nn,insetBottom:c.bottom}),Yn=(0,Ne.streamColumnHeight)({windowHeight:Jt,navBarFootprint:Jn}),Vn=(0,d.useMemo)(()=>(0,Ie.computeWideDetailSizes)({containerWidth:Gn,viewportHeight:Yn}),[Gn,Yn]),Un=(0,qe.buildDetailLayoutTrace)({deviceId:e,layout:Sn,viewport:Ke,sideNav:Fn,measured:jn,containerWidth:Gn,railWidth:Vn.railWidth,mode:wn}),$n=(0,qe.detailLayoutTraceSignature)(Un),qn=(0,d.useRef)(null);(0,d.useEffect)(()=>{qn.current!==$n&&(qn.current=$n,F.log.info(qe.DETAIL_LAYOUT_SCOPE,'layout decision',Un))},[$n,Un]),(0,d.useEffect)(()=>{F.log.debug('theater','detail geometry',{deviceId:e,winWidth:Qe,winHeight:Jt,screenMinSide:gn??-1,isLandscape:En,layoutMode:wn,toolbarPlacement:Bn,fullscreen:gi,containerWidth:Gn,measuredWidth:jn?.width??-1,railWidth:Vn.railWidth,defaultHeight:Math.round(9*Qe/16)})},[e,Qe,Jt,gn,En,wn,Bn,gi,Gn,jn,Vn.railWidth]),(0,Be.shouldShowCameraShelf)(wn)||xn||null===Ni||Ji(null);const Zn=(0,$e.isUnexpectedPortraitStack)(Sn,wn);(0,d.useEffect)(()=>{if(!Zn)return;let t=!1;return(async()=>{t||F.log.warn('theater','tablet resolved to the portrait stack',{deviceId:e,winWidth:Qe,winHeight:Jt,viewportSource:Ke.source,dimWidth:Ke.dimWidth,dimHeight:Ke.dimHeight,frameWidth:Ke.frameWidth,frameHeight:Ke.frameHeight,screenMinSide:gn??-1,isWeb:!0,orientationLock:-1,orientation:-1})})(),()=>{t=!0}},[Zn,e,Qe,Jt,gn,Ke]);const Kn=(0,d.useMemo)(()=>9*Qe/16,[Qe]),Qn=(0,d.useMemo)(()=>Jt*Tt,[Jt]),Xn=(0,Ae.resolvePortraitColumnSplit)({columnHeight:Yn,topInset:c.top,pictureHeight:Kn,wallShowing:xn}),er='stack'===wn?Math.round(Xn.timelineHeight):-1,tr=(0,d.useRef)(null);(0,d.useEffect)(()=>{const t=tr.current;tr.current={wall:xn,mode:wn,devices:On};const a=Ot(t,xn,wn);if(null===a)return;const o=t?.devices??[];F.log.info('live:lifecycle','theater surface changed',{deviceId:e,direction:a,opening:null===t,before:o,beforeCount:o.length,after:On,afterCount:On.length,layoutMode:wn,beforeLayoutMode:t?.mode??'none',portraitTimelineHeight:er})},[xn,On,e,wn,er]);const ar=Qt.stream.pinchExpandsHeight,or=Vn.streamWidth,ir=Vn.streamHeight,nr=(0,d.useCallback)((function({_worklet_252802605455_init_data:e,fill:t,winHeight:a,isWideDetail:o,wideStreamH:i,pinchExpandsHeight:n,defaultHeight:r,growBoxHeight:l,maxHeight:s,HEIGHT_GROW_SCALE:c}){const u=function(e){return t?a:o?i:n?l(e,{rest:r,max:s,growScale:c}):r};return u.__closure={fill:t,winHeight:a,isWideDetail:o,wideStreamH:i,pinchExpandsHeight:n,defaultHeight:r,growBoxHeight:l,maxHeight:s,HEIGHT_GROW_SCALE:c},u.__workletHash=252802605455,u.__initData=e,u})({_worklet_252802605455_init_data:Rt,fill:Pn,winHeight:Jt,isWideDetail:bn,wideStreamH:ir,pinchExpandsHeight:ar,defaultHeight:Kn,growBoxHeight:te.growBoxHeight,maxHeight:Qn,HEIGHT_GROW_SCALE:It}),[Pn,Jt,bn,ir,ar,Kn,Qn]),rr=(0,vt.useDeviceSettingsStore)(e=>e.settings.debugMode),lr=(0,ee.useStreamZoom)({fit:Pn||bn?'contain':'cover',viewport:{width:bn?or:Qe,heightFor:nr},trace:rr}),sr=lr.snapZoom;(0,d.useEffect)(()=>{sr()},[Qe,Jt,sr]);const cr=lr.resetZoom;(0,d.useEffect)(()=>{cr()},[Pn,cr]),(0,d.useEffect)(()=>{sr()},[e,sr]);const ur=(0,d.useCallback)(()=>{(0,Y.backToCameras)(r,Yi)},[r,Yi]),dr=(0,d.useCallback)(()=>{(0,Re.openOnDemandPlayer)({deviceId:e,atMs:(0,Pe.resolveReelInstant)((0,j.selectActiveEpoch)(fo.state))}),F.log.info('live:ondemand','swipe \u2192 on-demand overlay',{deviceId:e}),(0,Y.backToCameras)(r,Yi)},[e,fo.state,r,Yi]),hr=(0,d.useMemo)(()=>{const e=P.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:Wt,runOnJS:D.runOnJS,onToggleControls:tn})),t=P.Gesture.Tap().numberOfTaps(2).onEnd((function({_worklet_14880445913912_init_data:e,zoom:t}){const a=function(e){t.doubleTapZoomAt(e.x,e.y)};return a.__closure={zoom:t},a.__workletHash=0xd889fb15b38,a.__initData=e,a})({_worklet_14880445913912_init_data:Lt,zoom:lr})),a=P.Gesture.Exclusive(t,e),o=P.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:lr,runOnJS:D.runOnJS,onSwipeBack:ur})),i=P.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:At,shouldOpenOverlayOnSwipe:J.shouldOpenOverlayOnSwipe,zoom:lr,runOnJS:D.runOnJS,onSwipeToOverlay:dr}));return P.Gesture.Simultaneous(lr.composeWith(i),o,a)},[lr,tn,ur,dr]),mr=(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:jt,zoomBoxHeightFor:nr,zoom:lr}),[nr,lr.scale]),gr=lr.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:Mt,liveBoxHeight:mr}),(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:zt,zoomTraceOn:rr,traceBox:gr}),[rr,gr]);const pr=(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:Ft,liveBoxHeight:mr})),vr=(0,nt.useReducedMotion)(),fr=(0,D.useSharedValue)(Ln?1:0);(0,d.useEffect)(()=>{fr.set((0,nt.timingTo)(Ln?1:0,nt.MOTION.sheet.ms,vr))},[Ln,fr,vr]);const Sr=(0,rt.sideTimelineWidth)(Qe),wr=(0,D.useAnimatedStyle)((function({_worklet_3745472025135_init_data:e,fill:t,sideProgress:a,sideReserve:o}){const i=()=>({right:t?a.get()*o:0});return i.__closure={fill:t,sideProgress:a,sideReserve:o},i.__workletHash=3745472025135,i.__initData=e,i})({_worklet_3745472025135_init_data:Gt,fill:Pn,sideProgress:fr,sideReserve:Sr}),[Pn,Sr]),br=(0,D.useAnimatedStyle)((function({_worklet_15991984246055_init_data:e,fill:t,winWidth:a,sideProgress:o,sideReserve:i,winHeight:n,isWideDetail:r,wideStreamW:l,wideStreamH:s,defaultHeight:c}){const u=function(){return t?{position:'absolute',top:0,left:0,width:a-o.get()*i,height:n}:r?{position:'absolute',top:0,left:0,width:l,height:s}:{position:'absolute',top:0,left:0,width:a,height:c}};return u.__closure={fill:t,winWidth:a,sideProgress:o,sideReserve:i,winHeight:n,isWideDetail:r,wideStreamW:l,wideStreamH:s,defaultHeight:c},u.__workletHash=0xe8b6c8a4d27,u.__initData=e,u})({_worklet_15991984246055_init_data:Nt,fill:Pn,winWidth:Qe,sideProgress:fr,sideReserve:Sr,winHeight:Jt,isWideDetail:bn,wideStreamW:or,wideStreamH:ir,defaultHeight:Kn}),[Qe,Jt,Pn,bn,or,ir,Kn,Sr]),{ref:_r,isFullscreen:yr,supported:kr,mode:Cr,toggle:Hr}=(0,B.useWebFullscreen)(),Or=(0,B.webFullscreenButtonShown)(Cr),xr=(0,d.useCallback)(()=>{kr?Hr():pi(e=>!e)},[Hr,kr]);(0,d.useEffect)(()=>{kr&&pi(yr)},[yr,kr]),(0,A.useTheaterOrientation)(gi,{screenMinSide:gn});const Tr=(0,j.selectPlaybackStatus)(fo.state),Ir=Tr.isLive&&!Na,Er=Ir&&'playing'===Ya.state,Pr=(0,it.useMotionHighlight)(e,Ir),Dr=Pa?'detection':Ra||ja?'audio':xa.motion&&Pr?'motion':null,Rr=((0,d.useMemo)(()=>(0,Le.gateLiveHighlight)(Ma,Ir),[Ma,Ir]),(0,d.useMemo)(()=>({quality:wa,highlight:Ma,showBoxes:li}),[wa,Ma,li])),Wr='rate'===(0,v.resolvePauseAuthority)({mode:fo.state.mode,clipHeld:'clip'===wo.stage.kind}),Lr=Wr?Qa:Na,Br=()=>{!lo.current||Wr?Wr?Fo():qa():(async()=>{const e=await Ro();qa(),e&&Lo(e)})()},Ar='clip'===wo.stage.kind?!xn&&wo.loading:ko?'seeking'===fo.state.mode:!xn&&!Na&&'connecting'===Ya.state,jr=(0,d.useCallback)(()=>{eo.current?.retry()},[]),Mr='error'===Ya.state||'error'===fo.state.mode,zr=Ya.reason,Fr=Ya.state,Gr=(0,d.useMemo)(()=>xn?Ht:{failed:Mr,fetching:'connecting'===Fr,reason:'error'===Fr?zr??null:null,onRetry:jr},[xn,Mr,Fr,zr,jr]),Nr=(0,d.useCallback)(()=>{const e=(0,j.selectActiveEpoch)(fo.state),t=(0,z.jogBaseFor)(null!==fo.state.selectionAnchor,fo.state.playhead,e),a=(0,z.jogTarget)(t,-1);F.log.debug('playback:jog','jogBack',{playhead:fo.state.playhead,active:e,base:t,target:a,mode:fo.state.mode}),null!=a&&Po(a,'timeline')},[fo,Po]),Jr=(0,d.useCallback)(()=>{const e=(0,j.selectActiveEpoch)(fo.state),t=(0,z.jogBaseFor)(null!==fo.state.selectionAnchor,fo.state.playhead,e),a=(0,z.jogTarget)(t,1);F.log.debug('playback:jog','jogForward',{playhead:fo.state.playhead,active:e,base:t,target:a,mode:fo.state.mode}),null!=a&&Po(a,'timeline')},[fo,Po]),Yr='clip'===wo.stage.kind?wo.stage.clipId:null,Vr=(0,d.useMemo)(()=>null===Yr||null===(0,p.clipStageStep)(bo,Yr,-1)?null:()=>wo.step(bo,-1),[Yr,bo,wo]),Ur=(0,d.useMemo)(()=>null===Yr||null===(0,p.clipStageStep)(bo,Yr,1)?null:()=>wo.step(bo,1),[Yr,bo,wo]),$r=(0,Ct.jsx)(R.default.View,{style:Pn?[Vt.videoWrapFull,pr,wr]:bn?[Vt.videoWrap,{width:Vn.streamWidth,height:Vn.streamHeight}]:ar?[Vt.videoWrap,pr]:[Vt.videoWrap,{height:Kn}],children:(0,Ct.jsxs)(y.default,{style:Vt.videoContent,children:[(0,Ct.jsxs)(R.default.View,{style:[br,lr.videoStyle],children:[Zt?(0,Ct.jsxs)(y.default,{style:Vt.disabledStage,children:[(0,Ct.jsx)(tt.PowerOff,{size:34,color:"#9aa0a6"})," ",(0,Ct.jsx)(_.default,{style:Vt.disabledTitle,children:o('v2.cameras.disabledTitle')}),(0,Ct.jsx)(_.default,{style:Vt.disabledHint,children:o('v2.cameras.disabledHint')})]}):Io?(0,Ct.jsx)(Z.LiveView,{ref:eo,deviceId:e,muted:oi,target:ka,highlight:void 0,initialSeekMs:ho,initialClip:go,onPlaybackState:ai,onPlayerState:Va,onPosition:zi,onLiveCaptureError:()=>{lo.current=!1,ao(!1),io(null),n({title:o('v2.theater.recordLive'),message:o('v2.theater.recordFailed')})},onScrubDrawn:ji,onServedProfile:Vo,onClipDuration:wo.reportDuration,onClipAudio:wo.reportAudio,onClipIncomplete:wo.reportIncomplete,onPeerReconnect:ei},so):(0,Ct.jsx)(Yt,{deviceId:e,fill:Pn,enabled:Tr.isLive}),ri&&Ir?(0,Ct.jsx)(be.MotionRegionsOverlay,{deviceId:e,enabled:ri}):null,li&&Ir?(0,Ct.jsx)(Se.MotionBoxesOverlay,{deviceId:e,enabled:li}):null,ci&&Ir?(0,Ct.jsx)(we.StationaryBoxesOverlay,{deviceId:e,enabled:ci}):null,si&&Ir?(0,Ct.jsx)(_e.DiscardedBoxesOverlay,{deviceId:e,enabled:si}):null]}),(0,Ct.jsx)(P.GestureDetector,{gesture:hr,children:(0,Ct.jsx)(R.default.View,{style:b.default.absoluteFill})}),null===Ii||Pi?null:(0,Ct.jsx)(Oe.ZoneActiveOverlay,{zone:Ii}),'gap'===fo.state.mode?(0,Ct.jsxs)(y.default,{pointerEvents:"none",style:[b.default.absoluteFill,Vt.noRecOverlay],children:[(0,Ct.jsx)(tt.VideoOff,{size:28,color:"#9aa0a6"})," ",(0,Ct.jsx)(_.default,{style:Vt.noRecTitle,children:o('v2.theater.noRecording')}),(0,Ct.jsx)(_.default,{style:Vt.noRecHint,children:o('v2.theater.noRecordingHint')})]}):null,Dr&&Ir&&Ha.highlightBorder?(0,Ct.jsx)(y.default,{pointerEvents:"none",style:[b.default.absoluteFill,{borderWidth:Qt.highlight.thickness,borderColor:'motion'===Dr?Qt.highlight.motionColor:'audio'===Dr?Qt.highlight.audioColor:Qt.highlight.detectionColor}]}):null,vi?(0,Ct.jsx)(R.default.View,{entering:a.entering,exiting:a.exiting,style:Vt.nameTag,pointerEvents:"none",children:(0,Ct.jsxs)(H.GlassSurface,{contentStyle:Vt.nameTagRow,pointerEvents:"none",dense:!0,children:[ua&&!Zt?(0,Ct.jsx)(tt.Moon,{size:12,color:l.foreground}):(0,Ct.jsx)(st.CameraStatusDot,{deviceId:e,online:qt,disabled:Zt,size:9}),(0,Ct.jsx)(_.default,{style:[Vt.nameText,{color:l.foreground}],numberOfLines:1,children:Ut})]})}):null,(0,Ct.jsxs)(pe.OverlayFrame,{fit:Pn||bn?'contain':'cover',aspect:di,children:['off'!==hi&&Ir?(0,Ct.jsx)(ye.AudioLevelMeter,{deviceId:e,position:hi,onSetPosition:en}):null,'off'!==mi?(0,Ct.jsx)(ke.DeviceInfoOverlay,{position:mi}):null,(0,Ct.jsx)(ut.DoorbellBadge,{deviceId:e,enabled:ha&&Ir}),(0,Ct.jsx)(ct.OccupancyBadge,{deviceId:e,enabled:'off'!==Ha.occupancy&&Tr.isLive&&!Na,corner:'off'===Ha.occupancy?'bottom-left':Ha.occupancy}),(0,Ct.jsx)(wt.OverlayReadouts,{deviceId:e,config:Ha,enabled:Ir&&Tr.isLive}),'off'!==ui?(0,Ct.jsx)(ge.StreamStatsOverlay,{getStats:un,position:ui}):null,(0,Ct.jsx)(ve.LiveViewersBadge,{deviceId:e,position:Ha.viewers,enabled:Ir&&Tr.isLive})]}),(0,Ct.jsx)(se.StreamOverlayControls,{visible:vi,onRequestHide:an,paused:Lr,onTogglePause:Br,showPlayPause:An,muted:oi,onToggleMute:Fi,audio:wo.audioNotice,hasTwoWayAudio:da,talking:dn,onToggleTalk:mn,onStartSystemPip:ln,fullscreen:gi,onToggleFullscreen:Or?xr:void 0,edgePad:Pn?{left:c.left,right:Ln?0:c.right,bottom:c.bottom}:void 0,timelineToggle:Pn?{dock:Rn,onSet:Oi}:void 0,ptzToggle:Dn?{open:Si,onToggle:bi}:void 0,activity:_i}),Dn&&Si?(0,Ct.jsx)(ue.PtzOverlay,{deviceId:e,visible:vi,edgePad:{left:c.left,right:Ln?0:c.right,bottom:c.bottom},onInteract:ki}):null,Pn&&sa&&Er?(0,Ct.jsx)(ce.DriveOverlay,{deviceId:e,visible:vi,edgePad:{left:c.left,right:c.right,bottom:c.bottom},onOpenControls:Ti,drawer:{open:'overlay'===Rn,width:(0,de.drawerWidth)(Qe)}}):null,Pi?(0,Ct.jsx)(He.ZoneDrawOverlay,{zone:Ii,onConfirm:Li,onCancel:Bi}):null]})}),qr=[{id:'back',icon:tt.ArrowLeft,label:o('v2.common.back'),active:!1,onPress:()=>(0,Y.backToCameras)(r,Yi),cluster:'left'},(0,lt.timelineDockDisc)({dock:Rn,onSet:Oi,cluster:'left',t:o}),...Or||gi?[{id:'fullscreen',icon:gi?tt.Minimize2:tt.Maximize2,label:o(gi?'v2.streamBar.exitFullscreen':'v2.streamBar.fullscreen'),active:gi,onPress:xr,cluster:'right'}]:[]],Zr=xn?(0,Ct.jsxs)(y.default,{testID:Pt,style:[Vt.wallWrap,Pn&&Ln?{marginRight:(0,rt.sideTimelineWidth)(Qe)}:null,(0,Ae.wallBoxStyle)({mode:wn,wideStreamWidth:Vn.streamWidth,portraitStreamHeight:Xn.streamHeight})],children:[(0,Ct.jsx)(We.WorkspaceStage,{devices:On,primary:Rr,liveOverlaysVisible:Ir,onGoTo:Gi,onCellPanel:Vi}),Pn?(0,Ct.jsx)(he.OverlayDiscGroup,{visible:!0,holdOpen:!0,onRequestHide:xt,items:qr,edgePad:{left:c.left,right:Ln?0:c.right,bottom:c.bottom}}):null]}):null,Kr=(0,Me.fanOutPlaybackToWall)({primary:{onSeek:Po,onScrubBegin:fo.beginScrub,onScrubMove:fo.moveScrub,onScrubCommit:Do,onGoLive:Ho,onTogglePlayPause:Br,onSelectRate:Go},broadcast:ze.gridPlaybackBus.broadcast,paused:Lr}),Qr=(0,d.useCallback)(e=>{Co(),null!==e&&Kr.onSeek(e,'timeline')},[Co,Kr]);return(0,Ct.jsxs)(y.default,{style:Vt.screenRow,children:[pn&&!Pn?(0,Ct.jsx)(V.SideNavRail,{pathname:fn,compact:vn}):null,(0,Ct.jsxs)(y.default,{ref:_r,onLayout:zn,style:{flex:1,minWidth:0,backgroundColor:l.background,paddingTop:Pn?0:c.top},children:[(0,Ct.jsx)(E.StatusBar,{hidden:Pn,style:Pn||'dark'===s?'light':'dark'}),(0,Ct.jsx)(Te.TheaterTimeline,{ref:xi,navBarVisible:Nn,layoutMode:wn,railWidth:Vn.railWidth,stream:Zr??$r,onOpenClipInFrame:wo.open,onClipsChange:yo,belowStream:(0,Be.shouldShowCameraShelf)(wn)?(0,Ct.jsx)(Ee.BelowStreamArea,{width:Vn.streamWidth,currentDeviceId:e,wallShowing:xn,onGoTo:Gi,onCellPanel:Vi,onOpenPlayback:Ui}):null,deviceId:e,scopeIds:On,hideBack:bn,drawerExpanded:Wn,drawerBeside:Ln,name:Ut,onBack:()=>(0,Y.backToCameras)(r,Yi),deviceBinding:{cameraName:Ut,hasPtz:ia,hasBattery:na,hasNetworkLink:la,hasNavigation:sa,cameraJump:{onSwitchCamera:Gi,onOpenAdhocGrid:In,cameraSelection:Tn}},singleCamera:{streamBinding:xn?{quality:kn??wa,onSelectQuality:Hn}:{quality:wa,onSelectQuality:Ca},viewOptionsBinding:{highlight:xa,onSetHighlight:Ta},overlayBinding:{config:Ha,onChange:Oa},onOpenLinkedDevices:()=>{Vi('devices',e)},linkedDevicesOpen:'devices'===Zi?.kind&&Zi.deviceId===e,...xn?{}:{zone:{zoneRect:Ii,drawing:Pi,onRequestZoneDraw:Ri,onClearZone:Wi}}},mode:fo.state.mode,activeEpoch:To??(0,j.selectActiveEpoch)(fo.state),seekAnchor:fo.state.seekAnchor,onSeek:Kr.onSeek,onLeaveClipsMode:Qr,onScrubBegin:Kr.onScrubBegin,onScrubMove:Kr.onScrubMove,onScrubCommit:Kr.onScrubCommit,onGoLive:Kr.onGoLive,liveLocked:fo.state.liveLocked,onToggleLiveLock:fo.toggleLiveLock,liveCapture:xn||zo?void 0:Bo,exportSelection:xn||zo?void 0:Ao,onSnapshot:xn||zo?void 0:Mo,playbackRate:Za,paused:Lr,servedTier:Yo,onTogglePlayPause:Kr.onTogglePlayPause,loading:Ar,streamFault:Gr,scrubDirection:(0,j.selectScrubDirection)(fo.state),onJogBack:Nr,onJogForward:Jr,clipHeld:'clip'===wo.stage.kind,clipOnFrameId:'clip'===wo.stage.kind?wo.stage.clipId:null,onClipPrev:Vr,onClipNext:Ur,clipProgress:{progress:wo.progress,controls:wo.controls,...wo.seek},clipLoop:{enabled:ta,onToggle:aa},clipControls:wo.controls,clipIncomplete:wo.incompleteNotice,onStepFrame:No,onSelectRate:Kr.onSelectRate}),Nn?(0,Ct.jsx)(U.BottomNavBar,{pathname:fn,insetBottom:c.bottom}):null,(0,Ct.jsx)(Je.GridCellPanelOverlay,{panel:Zi,cameraName:Qi,hasPtz:Xi,onSelect:t=>Ji({kind:t,deviceId:Zi?.deviceId??e}),onClose:$i}),(0,Ct.jsx)(S.ClipStageView,{stage:wo.stage,playback:wo.playback,onPrev:Vr,onNext:Ur,onClose:Co})]})]})};var c=t(r[0]),u=t(r[1]),d=t(r[2]),h=t(r[3]),m=t(r[4]),g=t(r[5]),p=t(r[6]),v=t(r[7]),f=t(r[8]),S=t(r[9]),w=t(r[10]);t(r[11]);var b=l(t(r[12])),_=l(t(r[13])),y=l(t(r[14])),k=t(r[15]),C=t(r[16]),H=t(r[17]),O=t(r[18]),x=t(r[19]),T=t(r[20]),I=t(r[21]),E=t(r[22]);t(r[23]);var P=t(r[24]),D=t(r[25]),R=l(D),W=s(t(r[26])),L=s(t(r[27])),B=t(r[28]),A=t(r[29]),j=t(r[30]),M=t(r[31]),z=t(r[32]),F=t(r[33]),G=t(r[34]),N=t(r[35]),J=t(r[36]),Y=t(r[37]),V=t(r[38]),U=t(r[39]),$=t(r[40]),q=t(r[41]),Z=t(r[42]),K=t(r[43]),Q=t(r[44]),X=t(r[45]),ee=t(r[46]),te=t(r[47]),ae=t(r[48]),oe=t(r[49]),ie=t(r[50]),ne=t(r[51]),re=t(r[52]),le=t(r[53]),se=t(r[54]),ce=t(r[55]),ue=t(r[56]),de=t(r[57]),he=t(r[58]),me=t(r[59]),ge=t(r[60]),pe=t(r[61]),ve=t(r[62]),fe=t(r[63]),Se=t(r[64]),we=t(r[65]),be=t(r[66]),_e=t(r[67]),ye=t(r[68]),ke=t(r[69]),Ce=t(r[70]),He=t(r[71]),Oe=t(r[72]),xe=t(r[73]),Te=t(r[74]),Ie=t(r[75]),Ee=t(r[76]),Pe=t(r[77]),De=t(r[78]),Re=t(r[79]),We=t(r[80]),Le=t(r[81]),Be=t(r[82]),Ae=t(r[83]),je=t(r[84]),Me=t(r[85]),ze=t(r[86]),Fe=t(r[87]),Ge=t(r[88]),Ne=t(r[89]),Je=t(r[90]),Ye=t(r[91]),Ve=t(r[92]),Ue=t(r[93]),$e=t(r[94]),qe=t(r[95]),Ze=t(r[96]),Ke=t(r[97]),Qe=t(r[98]),Xe=t(r[99]),et=t(r[100]),tt=t(r[101]),at=t(r[102]),ot=t(r[103]),it=t(r[104]),nt=t(r[105]),rt=t(r[106]),lt=t(r[107]),st=t(r[108]),ct=t(r[109]),ut=t(r[110]),dt=t(r[111]),ht=t(r[112]),mt=t(r[113]),gt=t(r[114]),pt=t(r[115]),vt=t(r[116]),ft=t(r[117]),St=t(r[118]),wt=t(r[119]),bt=t(r[120]),_t=t(r[121]),yt=t(r[122]),kt=t(r[123]),Ct=t(r[124]);const Ht={failed:!1,fetching:!1,reason:null,onRetry:()=>{}};function Ot(e,t,a){return null===e||e.wall!==t?t?'pictureToWall':'wallToPicture':t&&e.mode!==a?'wallReshaped':null}const xt=()=>{},Tt=.5,It=2.5;function Et(e){const t=(0,c.c)(19),{t:a}=(0,x.useTranslation)(),{data:o}=(0,Xe.useCameras)();let i;t[0]!==o?(i=void 0===o?[]:o,t[0]=o,t[1]=i):i=t[1];const n=i;let r;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],r=n.find(a),t[2]=n,t[3]=e,t[4]=r}else r=t[4];const l=r;let s,u;t[7]!==l?.name||t[8]!==e||t[9]!==a?(s=l?.name??a("v2.cameraDetail.fallbackName",{id:e}),t[7]=l?.name,t[8]=e,t[9]=a,t[10]=s):s=t[10],t[11]!==l?.features?(u=l?.features??[],t[11]=l?.features,t[12]=u):u=t[12];const d=l?.online??!1,h=l?.disabled??!1,m=void 0!==l;let g;return t[13]!==s||t[14]!==u||t[15]!==d||t[16]!==h||t[17]!==m?(g={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]=g):g=t[18],g}const Pt='wall-stage',Dt=[],Rt={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});}"},Wt={code:"function CameraDetailScreenTsx2(){const{runOnJS,onToggleControls}=this.__closure;runOnJS(onToggleControls)();}"},Lt={code:"function CameraDetailScreenTsx3(e){const{zoom}=this.__closure;zoom.doubleTapZoomAt(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)();}}"},At={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)();}}"},jt={code:"function CameraDetailScreenTsx6(){const{zoomBoxHeightFor,zoom}=this.__closure;return zoomBoxHeightFor(zoom.scale.value);}"},Mt={code:"function CameraDetailScreenTsx7(){const{liveBoxHeight}=this.__closure;return liveBoxHeight.value;}"},zt={code:"function CameraDetailScreenTsx8(h,prev){const{zoomTraceOn,traceBox}=this.__closure;if(zoomTraceOn&&prev!==null&&h!==prev)traceBox(h);}"},Ft={code:"function CameraDetailScreenTsx9(){const{liveBoxHeight}=this.__closure;return{height:liveBoxHeight.value};}"},Gt={code:"function CameraDetailScreenTsx10(){const{fill,sideProgress,sideReserve}=this.__closure;return{right:fill?sideProgress.get()*sideReserve:0};}"},Nt={code:"function CameraDetailScreenTsx11(){const{fill,winWidth,sideProgress,sideReserve,winHeight,isWideDetail,wideStreamW,wideStreamH,defaultHeight}=this.__closure;if(fill){return{position:'absolute',top:0,left:0,width:winWidth-sideProgress.get()*sideReserve,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 Jt=960;function Yt(e){const t=(0,c.c)(9),{deviceId:a,fill:o,enabled:i}=e,n=(0,Ke.useSnapshot)(a,i,Jt);let r;t[0]!==n.uri?(r=null===n.uri?(0,Ct.jsx)(C.SkeletonBox,{}):null,t[0]=n.uri,t[1]=r):r=t[1];const l=o?"contain":"cover";let s,u;return t[2]!==a||t[3]!==n||t[4]!==l?(s=(0,Ct.jsx)(Qe.SnapshotImage,{source:n,deviceId:a,style:b.default.absoluteFill,contentFit:l}),t[2]=a,t[3]=n,t[4]=l,t[5]=s):s=t[5],t[6]!==r||t[7]!==s?(u=(0,Ct.jsxs)(y.default,{style:Vt.poster,children:[r,s]}),t[6]=r,t[7]=s,t[8]=u):u=t[8],u}const Vt=b.default.create({screenRow:{flex:1,flexDirection:'row'},videoWrap:{position:'relative',width:'100%',overflow:'hidden',backgroundColor:'#000'},wallWrap:{overflow:'hidden'},videoWrapFull:{...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%'},nameTagRow:{flexDirection:'row',alignItems:'center',gap:6,paddingHorizontal:10,paddingVertical:5},nameText:{fontSize:13,fontWeight:'600'}})},1156,[788,1157,16,1158,1166,1212,1159,1160,1167,1168,1213,109,32,193,114,974,840,885,1005,818,789,273,1214,1215,1216,1130,1217,1218,1169,1170,992,1171,1219,1000,1152,1172,1173,1220,793,794,796,790,1141,1174,1221,1222,1176,1179,880,994,1006,1223,1182,1151,1183,1184,1186,1224,1153,1225,1226,1227,1228,1188,1229,1230,1231,1232,1233,1234,835,1189,1190,1235,991,1236,1191,824,1237,823,1201,1194,1199,1203,1200,1204,1238,1239,1192,1205,1240,1138,1241,1206,996,1207,791,839,849,828,1208,838,841,834,848,1131,1242,1154,851,853,1209,1243,1244,1245,1198,1246,1062,1075,1247,1211,1248,833,1143,1142,10]);
|
|
2
|
+
__d(function(e,t,o,a,n,i,r){"use strict";function l(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(o){var a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,a.get?a:{enumerable:!0,get:function(){return e[o]}})}),t.default=e,t}Object.defineProperty(i,'__esModule',{value:!0}),Object.defineProperty(i,"WALL_STAGE_TEST_ID",{enumerable:!0,get:function(){return Bt}}),i.CameraDetailScreen=function({deviceId:e,initialSeekMs:t}){const o=(0,rt.usePopTransitions)(),{t:a}=(0,T.useTranslation)(),n=(0,O.useConfirm)(),i=(0,O.useNotice)(),r=(0,H.useRouter)(),{colors:l,mode:s}=(0,Z.useTheme)(),c=(0,R.useSafeAreaInsets)(),{viewport:C,readout:Qe}=(0,k.useViewportReadout)(),{width:Xe,height:qt}=C,{name:Zt,features:Kt,online:Qt,disabled:Xt,known:eo}=Dt(e),{settings:to,hydrated:oo,setStreamDefault:ao}=(0,nt.useSettings)(),no=to.stream.clipLoop,io=(0,d.useCallback)(()=>{ao('clipLoop',!no)},[ao,no]),ro=(0,_t.useCanActuate)(),lo=ro&&Kt.includes(et.FEATURE.ptz),so=Kt.includes(et.FEATURE.battery),{data:co=[]}=(0,ae.useDeviceCapNames)(e,!0),uo=co.includes('network-link'),ho=ro&&co.includes('navigation'),{data:mo=null}=(0,at.useBattery)(e,so),po=so&&!0===mo?.sleeping,fo=Kt.includes(et.FEATURE.twoWayAudio),go=Kt.includes(et.FEATURE.doorbell),vo=(0,gt.useCameraLocalStore)(t=>t.local.byId[e]?.quality),So=(0,gt.useCameraLocalStore)(e=>e.setCameraQuality),wo=(0,gt.useCameraLocalStore)(t=>t.local.byId[e]?.audioOn),bo=(0,gt.useCameraLocalStore)(e=>e.hydrated),yo=(0,gt.useCameraLocalStore)(e=>e.hydrate);(0,d.useEffect)(()=>{yo()},[yo]);const _o=(0,gt.useCameraLocalStore)(e=>e.setCameraAudioOn),[ko,Co]=(0,d.useState)(vo??'auto'),xo=(0,d.useRef)(!1);(0,d.useEffect)(()=>{bo&&!xo.current&&(xo.current=!0,void 0!==vo&&Co(vo))},[bo,vo]);const Oo=(0,Ct.useRouteChannel)(),To=(0,d.useMemo)(()=>(0,kt.qualityToTargetForRoute)(ko,Oo),[ko,Oo]),Ho=(0,d.useCallback)(t=>{Co(t),So(e,t)},[e,So]);(0,tt.useEventHaptics)([e],!0);const{overlay:Ro,setOverlay:Io,highlight:Po,setHighlight:Eo}=(0,yt.useCameraViewOptions)(e),Do=(0,ht.useDetections)(e,Po.detection&&!0),Bo=Po.detection&&Do.boxes.some(e=>0===Po.detectionClasses.length||Po.detectionClasses.includes(e.label)),Wo=(0,ft.useHeld)(Bo,1e3*Po.detectionHoldSec),Lo=(0,mt.useAudioActive)(e,Po.audio,Po.audioDb),zo=(0,ft.useHeld)('off'!==Po.audio&&Lo,1e3*pt.AUDIO_HIGHLIGHT_HOLD_SEC),[Mo,Ao]=(0,d.useState)(0),jo=`${Po.audio}:${Po.audioDb}`,Fo=(0,d.useRef)(!0);(0,d.useEffect)(()=>{if(Fo.current)return void(Fo.current=!1);if('off'===Po.audio)return void Ao(0);const e=Date.now()+1e3*pt.AUDIO_HIGHLIGHT_HOLD_SEC;Ao(e);const t=setTimeout(()=>Ao(0),1e3*pt.AUDIO_HIGHLIGHT_HOLD_SEC);return()=>clearTimeout(t)},[jo,Po.audio]);const Go=Mo>Date.now(),No=(0,d.useMemo)(()=>({enabled:Ro.highlightBorder,...Po,audioHoldSec:pt.AUDIO_HIGHLIGHT_HOLD_SEC,appearance:to.highlight,motionHoldSec:to.grid.motionHoldSec}),[Ro.highlightBorder,Po,to.highlight,to.grid.motionHoldSec]),[Jo,Vo]=(0,d.useState)(null),Yo={operatorChoice:Jo,cameraKnown:eo,batteryPowered:so},qo=(0,pe.resolveLivePaused)(Yo),$o=(0,d.useRef)(qo);$o.current=qo;const[Uo,Zo]=(0,d.useState)({state:'connecting'}),Ko=(0,d.useRef)(null),Qo=(0,d.useRef)(Uo.state);Qo.current=Uo.state;const Xo=()=>{Vo(e=>!(0,pe.resolveLivePaused)({operatorChoice:e,cameraKnown:eo,batteryPowered:so}))},[ea,ta]=(0,d.useState)(1),[oa,aa]=(0,d.useState)(!1),na=(0,d.useRef)(null),[ia,ra]=(0,d.useState)(!1),[la,sa]=(0,d.useState)(null),[ca,ua]=(0,d.useState)(0),da=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(!ia||null===la)return void ua(0);const e=()=>ua(Math.floor((Date.now()-la)/1e3));e();const t=setInterval(e,250);return()=>clearInterval(t)},[ia,la]);const[ha,ma]=(0,d.useState)(0),pa=(0,d.useRef)(t??null),[fa,ga]=(0,d.useState)(t),[va,Sa]=(0,d.useState)(void 0),wa=(0,d.useMemo)(()=>({scrubStart:e=>{na.current?.scrubStart(e)},scrubTo:(e,t)=>na.current?.scrubTo(e,t?.mode,t?.velocityPxPerS),scrubCommit:(e,t)=>na.current?.scrubCommit(e,t),seek:e=>na.current?.seek(e),goLive:()=>{if(!(0,pe.shouldDialLiveOnGoLive)($o.current))return pa.current=null,ga(void 0),aa(!1),void ta(1);na.current?.goLive(),ma(e=>e+1),aa(!1),ta(1),pa.current=null,ga(void 0)}}),[]),ba=(0,M.usePlaybackMachine)(wa),ya=(0,d.useMemo)(()=>({playClip:(e,t,o,a)=>{const n=na.current,i='connecting'!==Qo.current&&'error'!==Qo.current;return(0,p.noteClipOpenStep)('port',{clipId:e,provider:t,offsetMs:o,profile:a??null,hasPlayer:null!==n,canHear:i}),null!==n&&i?(n.playClip(e,t,o,a),!0):(Sa({clipId:e,provider:t,...void 0===a?{}:{profile:a}}),!1)},noteAsserted:e=>{Ko.current=e},scrubStart:e=>{na.current?.scrubStart(e)},scrubTo:e=>{na.current?.scrubTo(e)},scrubCommit:(e,t)=>{na.current?.scrubCommit(e,t)}}),[]),_a=(0,h.useClipStage)(ya,no),[ka,Ca]=(0,d.useState)(Wt),xa=(0,d.useCallback)(e=>{Ca(t=>(0,v.adoptClipList)(t,e))},[]);(0,d.useEffect)(()=>{const e=[3e3,1e4].map(e=>setTimeout(()=>na.current?.timelineWarm(Date.now()-3e4),e));return()=>{for(const t of e)clearTimeout(t)}},[]);const Oa='live'!==ba.state.mode,Ta=(0,d.useCallback)(()=>{Sa(void 0),_a.close()},[_a]),Ha=(0,d.useCallback)(()=>{Ta(),ba.goLive()},[Ta,ba]),Ra=(0,d.useRef)(!1),Ia='clip'===_a.stage.kind?_a.stage.clipId:null;(0,d.useEffect)(()=>{const e=null!==na.current;Ko.current=(0,u.assertionAfterPlayerChange)(Ko.current,e,Uo.state),(0,u.shouldAssertClip)({heldClipId:Ia,playerPresent:e,playerState:Uo.state,assertedClipId:Ko.current})&&null!==Ia&&((0,p.noteClipOpenStep)('assert',{clipId:Ia,playerState:Uo.state}),Ko.current=Ia,_a.replay())},[Ia,Uo.state,_a]);const Pa=(0,m.clipStartOnFrame)(ka,_a.stage),Ea=(0,pe.shouldMountLiveView)({liveHeld:qo,mode:ba.state.mode,playhead:ba.state.playhead,recordedSeekMs:fa??null,keepRecordedSession:Ra.current,initialClipId:Ia});Ra.current=Ea;const Da=e=>{qo&&null==na.current&&(pa.current=e,ga(e))},Ba=(0,d.useCallback)((e,t)=>{Da(e),ba.seek(e,t)},[qo,ba]),Wa=(0,d.useCallback)((e,t)=>{Da(e),ba.commitScrub(e,t)},[qo,ba]),La=async()=>{if(!da.current)return null;da.current=!1,ra(!1),sa(null);try{return await(na.current?.stopLiveCapture())??null}catch{return i({title:a('v2.theater.recordLive'),message:a('v2.theater.recordFailed')}),null}},za=async t=>{const o=(0,X.captureFileExtension)(t.mime),a=`${B.cacheDirectory}live-${e}-${Date.now()}.${o}`;await B.writeAsStringAsync(a,t.base64,{encoding:B.EncodingType.Base64}),await W.isAvailableAsync()&&await W.shareAsync(a,{mimeType:t.mime||('webm'===o?'video/webm':'video/mp4'),UTI:'webm'===o?'public.movie':'public.mpeg-4'})},Ma=e=>{(async()=>{await n({title:a('v2.theater.keepClipTitle'),confirmLabel:a('v2.theater.shareClip'),cancelLabel:a('v2.theater.discardClip')})&&await za(e)})()},Aa={capturing:ia,elapsedLabel:(0,ee.formatSelectionDuration)(1e3*ca),onStart:()=>{da.current=!0,ra(!0),sa(Date.now()),na.current?.startLiveCapture()},onKeep:()=>{(async()=>{const e=await La();e&&await za(e)})()},onDiscard:()=>{La()}},ja=(0,ne.useExportSelection)(e,Zt,ba),Fa=(0,ie.useActivityStore)(e=>e.add),Ga=(0,d.useCallback)(()=>{(async()=>{const t=()=>i({title:a('v2.activity.title'),message:a('v2.activity.snapshotFailed')}),o=na.current;if(null!==o)try{const n=await o.captureSnapshot(),r=Date.now(),l=(0,M.selectActiveEpoch)(ba.state)??r,s=await(0,le.saveSnapshot)(n.base64,`snapshot-${e}-${l}`);if(null===s)return void t();Fa((0,re.snapshotItemFrom)({uid:`${e}-${r.toString(36)}`,deviceId:e,cameraName:Zt,atMs:l,fileUri:s.uri,mime:s.mime,now:r})),i({title:a('v2.activity.title'),message:a('v2.activity.snapshotSaved')})}catch(o){F.log.warn('activity','snapshot failed',{deviceId:e,error:o instanceof Error?o.message:String(o)}),t()}else t()})()},[Fa,e,Zt,i,ba,a]),Na='clip'===_a.stage.kind;(0,d.useEffect)(()=>{(0,g.shouldEndLiveCapture)({mode:ba.state.mode,clipHeld:Na})&&da.current&&(async()=>{const e=await La();e&&Ma(e)})()},[ba.state.mode,Na]);const Ja=(0,d.useCallback)(()=>{const e=!oa;aa(e),na.current?.setRate(e?0:ea)},[oa,ea]),Va=(0,d.useCallback)(e=>{ta(e),oa||na.current?.setRate(e)},[oa]),Ya=(0,d.useCallback)(e=>{oa||aa(!0),na.current?.stepFrame(e)},[oa]),qa=(0,d.useCallback)(e=>{const t=pa.current;null!==t&&(pa.current=null,ga(void 0),'adopt'===e?ba.adoptSeek(t,'cluster'):ba.seek(t,'cluster'))},[ba]),[$a,Ua]=(0,d.useState)(null),Za=(0,d.useRef)(null);Za.current=$a;const Ka=(0,d.useRef)(!1),Qa=(0,d.useRef)(null),Xa=(0,d.useRef)(null),en=(0,d.useRef)(ba.state.mode);en.current=ba.state.mode;const tn=(0,d.useRef)((0,M.selectActiveEpoch)(ba.state));tn.current=(0,M.selectActiveEpoch)(ba.state);const on=(0,d.useRef)(null);on.current=Ia;const an=(0,d.useCallback)(()=>{if(!(0,Q.shouldReassertRecordedOnReconnect)({playbackMode:en.current,playheadEpoch:tn.current,clipHoldingFrame:on.current}))return;const e=tn.current;null!==e&&(Qa.current=e,Xa.current=(0,Q.resolveRecordedProfileForReconnect)(To,Za.current?.profile??null),Ka.current=!0)},[To]);(0,d.useEffect)(()=>{if(!Ka.current)return;if('playing'!==Uo.state)return;const t=Qa.current,o=Xa.current;Ka.current=!1,Qa.current=null,Xa.current=null,null!==t&&null!==o&&'live'!==en.current&&(F.log.info('playback','foreground reconnect \u2192 playRecorded',{tags:{deviceId:e},epoch:t,profile:o}),na.current?.playRecorded(t,o),oa&&na.current?.setRate(0))},[Uo.state,e,oa]);const nn=_a.reportPlayerState,rn=(0,d.useCallback)(e=>{ba.reportEmbedState(e),nn(e),'paused'===e?aa(!0):'playing'===e&&aa(!1),'gap'!==e&&'error'!==e||(pa.current=null,ga(void 0)),qa((0,j.resolveInitialSeekAction)(e))},[ba,qa,nn]),[ln,sn]=(0,d.useState)(!0),cn=(0,d.useRef)(!1);(0,d.useEffect)(()=>{oo&&bo&&!cn.current&&(cn.current=!0,sn((0,St.opensMuted)(to.stream.audioOnOpen,wo)))},[oo,bo,to.stream.audioOnOpen,wo]);const un=(0,wt.hasLayer)(Ro,'motion'),dn=(0,wt.hasLayer)(Ro,'objects'),hn=(0,wt.hasLayer)(Ro,'discarded'),mn=(0,wt.hasLayer)(Ro,'stationary'),pn=Ro.stats,fn=(0,Se.useStreamAspect)(e),gn=Ro.audioMeter,vn=(0,xe.useSettingsStore)(e=>e.settings.deviceInfo),[Sn,wn]=(0,d.useState)(!1),[bn,yn]=(0,d.useState)(!0),[_n,kn]=(0,d.useState)(!1),Cn=(0,d.useCallback)(()=>kn(e=>!e),[]),[xn,On]=(0,d.useState)(0),Tn=(0,d.useCallback)(()=>On(e=>e+1),[]),[Hn,Rn]=(0,d.useState)(to.stream.landscapeTimeline),In=(0,d.useCallback)(e=>{Rn(e),ao('landscapeTimeline',e)},[ao]),Pn=(0,d.useRef)(null),En=(0,d.useCallback)(()=>{Rn(e=>'off'===e?'overlay':e),Pn.current?.openControls()},[]),[Dn,Bn]=(0,d.useState)(null),[Wn,Ln]=(0,d.useState)(!1),zn=(0,d.useCallback)(()=>Ln(!0),[]),Mn=(0,d.useCallback)(()=>{Ln(!1),Bn(null)},[]),An=(0,d.useCallback)(e=>{Bn(e),Ln(!1)},[]),jn=(0,d.useCallback)(()=>Ln(!1),[]),Fn=(0,d.useRef)(null),Gn=(0,d.useCallback)(()=>{(0,w.scrubFramePainted)(e)},[e]),Nn=_a.reportPosition,Jn=(0,d.useCallback)(t=>{if(Nn(t))return;qa('adopt'),ba.reportPosition(t);const o=Date.now(),a=(0,A.evaluateDivergence)({indicatorEpoch:(0,M.selectActiveEpoch)(ba.state),playerEpoch:t,nowMs:o,lastReportAt:Fn.current});null!==a&&(Fn.current=o,F.log.warn('theater:divergence','indicator and stream disagree',{deviceId:e,deltaMs:a.deltaMs,indicatorAhead:a.indicatorAhead,indicatorEpoch:(0,M.selectActiveEpoch)(ba.state),playerEpoch:t,mode:ba.state.mode,seekAnchor:ba.state.seekAnchor,seekLanded:ba.state.seekLanded}))},[ba,e,qa,Nn]),Vn=(0,d.useCallback)(()=>{const t=!ln;sn(t),_o(e,!t)},[ln,e,_o]),Yn=(0,d.useCallback)(t=>{if(t===e)return;const o=(0,De.viewedInstant)((0,M.selectActiveEpoch)(ba.state));F.log.info('theater','switch camera',{tags:{deviceId:t},from:e,carrying:'at'===o.kind?o.atMs:'live'}),r.replace(`/camera/${t}${(0,De.atParam)(o)}`)},[r,e,ba.state]),[qn,$n]=(0,d.useState)(null),Un=(0,Ye.useLastCameraStore)(e=>e.forget),Zn=(0,d.useCallback)((e,t)=>{$n({kind:e,deviceId:t})},[]),Kn=(0,d.useCallback)(e=>{(0,Be.openOnDemandPlayer)({deviceId:e,atMs:(0,Ee.resolveReelInstant)((0,M.selectActiveEpoch)(ba.state))})},[ba.state]),Qn=(0,d.useCallback)(()=>$n(null),[]),{data:Xn}=(0,et.useCameras)(),ei=(0,d.useMemo)(()=>(0,qe.resolveCellPanel)(qn,(Xn??[]).map(e=>e.id)),[qn,Xn]),ti=(Xn??[]).find(e=>e.id===ei?.deviceId),oi=ti?.name??'',ai=ro&&(ti?.features??[]).includes(et.FEATURE.ptz),ni=(0,d.useCallback)(e=>Io((0,wt.patchOverlay)(Ro,{audioMeter:e})),[Io,Ro]),ii=(0,d.useCallback)(()=>yn(e=>!e),[]),ri=(0,d.useCallback)(()=>yn(!1),[]),li=(0,d.useCallback)(()=>{Zo({state:'connecting'}),Ha()},[Ha]),si=(0,d.useCallback)(()=>na.current?.startPip()??Promise.resolve('unavailable'),[]),ci=(0,G.useSystemPip)({mode:ba.state.mode,playerState:Uo.state,goLive:li,startPip:si}),ui=ci.request,[di,hi]=(0,d.useState)(e);if(di!==e){hi(e);const t=(0,De.viewedInstant)((0,M.selectActiveEpoch)(ba.state)),o='at'===t.kind?t.atMs:void 0;ba.swapCamera(o??null),ga(o),ta(1),aa(!1),Vo(null),Zo({state:'connecting'}),Ua(null),sn((0,St.opensMuted)(to.stream.audioOnOpen,wo)),Co(vo??'auto'),Bn(null),Ln(!1),$n(null),kn(!1),Ao(0),ra(!1),sa(null),ua(0),F.log.info('theater','camera swapped in place',{tags:{deviceId:e},from:di,carrying:o??'live'})}(0,d.useEffect)(()=>{pa.current=fa??null,Ra.current=!1,$o.current=!1,cn.current=!1,xo.current=!1,Fo.current=!0,da.current&&(F.log.warn('live:lifecycle','live capture dropped: the camera was swapped',{tags:{deviceId:e}}),da.current=!1),ci.abandon()},[e]),(0,d.useEffect)(()=>{(0,Be.focusOnDemandCamera)(e)},[e]);const mi=(0,d.useCallback)(()=>na.current?.getStats()??Promise.resolve(null),[]),{talking:pi,error:fi,toggle:gi}=(0,se.useIntercom)(e);(0,d.useEffect)(()=>{fi&&i({title:a('v2.cameraDetail.talk'),message:a('v2.cameraDetail.talkFailed')})},[fi,a,i]);const vi=(0,Ke.useScreenMinSide)(),{showSidebar:Si,compact:wi}=(0,Ke.useSidebarLayout)(),bi=(0,H.usePathname)(),yi={width:Xe,height:qt,screenMinSide:vi,isWeb:!0,fullscreen:Sn},_i=(0,Ue.resolveDetailLayoutMode)(yi),ki='wide'===_i,Ci=(0,Ne.useWorkspaceStore)(e=>e.setMembers),xi=(0,Ne.useWorkspaceStore)(e=>e.workspace.members),Oi=(0,Ne.useWorkspaceStore)(e=>e.wallOptions.quality),Ti=(0,Ne.useWorkspaceStore)(e=>e.setWallOptions),Hi=(0,d.useCallback)(e=>Ti({quality:e}),[Ti]),Ri=(0,d.useMemo)(()=>(0,Ae.workspaceOnScreenCameras)(xi,e),[xi,e]),Ii=(0,Ae.shouldShowWorkspaceGrid)(_i,xi,e);(0,d.useEffect)(()=>{Ii&&da.current&&(da.current=!1,ra(!1),sa(null),F.log.warn('live:lifecycle','live capture dropped: the picture became a wall',{deviceId:e}))},[Ii,e]);const Pi=(0,Ge.cameraSelectionModeFor)(_i),Ei=(0,d.useCallback)(e=>{const t=(0,Ge.resolveCameraSelection)(Pi,e);switch(t.kind){case'buildView':return void Ci(t.members);case'goTo':return void Yn(t.deviceId);case'openGrid':return void r.push(`/grid/adhoc?devices=${(0,He.serializeAdhocDeviceIds)(t.deviceIds)}`);case'none':return}},[Pi,Yn,r,Ci]),Di=Xe>qt,Bi='fill'===_i,Wi=Bi&&lo&&!ho,Li=Bi?Hn:'off',zi=(0,lt.timelineShown)(Li),Mi='side'===Li,Ai=(0,Ue.toolbarPlacementFor)(_i),ji=(0,N.shouldShowOverlayPlayPause)({fill:Bi,landscapeDrawerOpen:zi}),[Fi,Gi]=(0,d.useState)(null),Ni=(0,d.useCallback)(e=>{const t=e.nativeEvent.layout.width;(0,$e.isUsableMeasurement)(t)&&Gi(e=>null!==e&&e.width===t&&e.windowWidth===Xe?e:{width:t,windowWidth:Xe})},[Xe]),Ji=(0,d.useMemo)(()=>({visible:Si&&!Bi,compact:wi,insetLeft:c.left}),[Si,Bi,wi,c.left]),Vi=(0,$e.resolveContainerWidth)({measured:Fi,windowWidth:Xe,sideNav:Ji}),Yi=(0,Je.shouldShowStreamNavBar)({enabled:to.stream.navBarOnStream,showSidebar:Si,fill:Bi}),qi=(0,U.bottomNavFootprint)({visible:Yi,insetBottom:c.bottom}),$i=(0,Je.streamColumnHeight)({windowHeight:qt,navBarFootprint:qi}),Ui=(0,d.useMemo)(()=>(0,Ie.computeWideDetailSizes)({containerWidth:Vi,viewportHeight:$i}),[Vi,$i]),Zi=(0,Ze.buildDetailLayoutTrace)({deviceId:e,layout:yi,viewport:Qe,sideNav:Ji,measured:Fi,containerWidth:Vi,railWidth:Ui.railWidth,mode:_i}),Ki=(0,Ze.detailLayoutTraceSignature)(Zi),Qi=(0,d.useRef)(null);(0,d.useEffect)(()=>{Qi.current!==Ki&&(Qi.current=Ki,F.log.info(Ze.DETAIL_LAYOUT_SCOPE,'layout decision',Zi))},[Ki,Zi]),(0,d.useEffect)(()=>{F.log.debug('theater','detail geometry',{deviceId:e,winWidth:Xe,winHeight:qt,screenMinSide:vi??-1,isLandscape:Di,layoutMode:_i,toolbarPlacement:Ai,fullscreen:Sn,containerWidth:Vi,measuredWidth:Fi?.width??-1,railWidth:Ui.railWidth,defaultHeight:Math.round(9*Xe/16)})},[e,Xe,qt,vi,Di,_i,Ai,Sn,Vi,Fi,Ui.railWidth]),(0,ze.shouldShowCameraShelf)(_i)||Ii||null===qn||$n(null);const Xi=(0,Ue.isUnexpectedPortraitStack)(yi,_i);(0,d.useEffect)(()=>{if(!Xi)return;let t=!1;return(async()=>{t||F.log.warn('theater','tablet resolved to the portrait stack',{deviceId:e,winWidth:Xe,winHeight:qt,viewportSource:Qe.source,dimWidth:Qe.dimWidth,dimHeight:Qe.dimHeight,frameWidth:Qe.frameWidth,frameHeight:Qe.frameHeight,screenMinSide:vi??-1,isWeb:!0,orientationLock:-1,orientation:-1})})(),()=>{t=!0}},[Xi,e,Xe,qt,vi,Qe]);const er=(0,d.useMemo)(()=>9*Xe/16,[Xe]),tr=(0,d.useMemo)(()=>qt*Rt,[qt]),or=(0,Me.resolvePortraitColumnSplit)({columnHeight:$i,topInset:c.top,pictureHeight:er,wallShowing:Ii}),ar='stack'===_i?Math.round(or.timelineHeight):-1,nr=(0,d.useRef)(null);(0,d.useEffect)(()=>{const t=nr.current;nr.current={wall:Ii,mode:_i,devices:Ri};const o=Tt(t,Ii,_i);if(null===o)return;const a=t?.devices??[];F.log.info('live:lifecycle','theater surface changed',{deviceId:e,direction:o,opening:null===t,before:a,beforeCount:a.length,after:Ri,afterCount:Ri.length,layoutMode:_i,beforeLayoutMode:t?.mode??'none',portraitTimelineHeight:ar})},[Ii,Ri,e,_i,ar]);const ir=to.stream.pinchExpandsHeight,rr=Ui.streamWidth,lr=Ui.streamHeight,sr=(0,d.useMemo)(()=>({fill:Bi,winHeight:qt,isWideDetail:ki,wideStreamH:lr,pinchExpandsHeight:ir,defaultHeight:er,maxHeight:tr,growScale:It}),[Bi,qt,ki,lr,ir,er,tr]),cr=(0,E.useSharedValue)(sr);(0,d.useLayoutEffect)(()=>{cr.set(sr)},[sr,cr]);const ur=(0,d.useCallback)((function({_worklet_12169440168065_init_data:e,zoomBoxHeight:t,zoomBoxShared:o}){const a=function(e){return t(e,o.value)};return a.__closure={zoomBoxHeight:t,zoomBoxShared:o},a.__workletHash=0xb116b288881,a.__initData=e,a})({_worklet_12169440168065_init_data:Lt,zoomBoxHeight:oe.zoomBoxHeight,zoomBoxShared:cr}),[cr]),dr=(0,vt.useDeviceSettingsStore)(e=>e.settings.debugMode),hr=(0,te.useStreamZoom)({fit:Bi||ki?'contain':'cover',viewport:{width:ki?rr:Xe,heightFor:ur},trace:dr}),mr=hr.snapZoom,pr=hr.reclampZoom,fr=(0,d.useRef)({width:Xe,height:qt});(0,d.useEffect)(()=>{const e=fr.current,t=(0,V.classifyViewportChange)(e,{width:Xe,height:qt});if('none'===t)return!dr||e.width===Xe&&e.height===qt||F.log.debug('live:zoom','zoom snap skipped \u2014 viewport jitter',{oldW:Math.round(e.width),oldH:Math.round(e.height),newW:Math.round(Xe),newH:Math.round(qt)}),void(e.width===Xe&&e.height===qt||pr());fr.current={width:Xe,height:qt},mr(`viewport ${t} ${Math.round(e.width)}x${Math.round(e.height)}\u2192${Math.round(Xe)}x${Math.round(qt)}`)},[Xe,qt,mr,pr,dr]);const gr=hr.resetZoom,vr=(0,d.useRef)(Bi);(0,d.useEffect)(()=>{vr.current!==Bi&&(vr.current=Bi,gr("fill flip \u2192 "+(Bi?'fill':'stacked')))},[Bi,gr]),(0,d.useEffect)(()=>{mr('camera change')},[e,mr]);const Sr=(0,d.useCallback)(()=>{(0,Y.backToCameras)(r,Un)},[r,Un]),wr=(0,d.useRef)(ba.state);(0,d.useLayoutEffect)(()=>{wr.current=ba.state},[ba.state]);const br=(0,d.useCallback)(()=>{(0,Be.openOnDemandPlayer)({deviceId:e,atMs:(0,Ee.resolveReelInstant)((0,M.selectActiveEpoch)(wr.current))}),F.log.info('live:ondemand','swipe \u2192 on-demand overlay',{deviceId:e}),(0,Y.backToCameras)(r,Un)},[e,r,Un]),yr=(0,d.useMemo)(()=>{const e=P.Gesture.Tap().numberOfTaps(1).onEnd((function({_worklet_11665093317600_init_data:e,runOnJS:t,onToggleControls:o}){const a=function(){t(o)()};return a.__closure={runOnJS:t,onToggleControls:o},a.__workletHash=0xa9bfdbe53e0,a.__initData=e,a})({_worklet_11665093317600_init_data:zt,runOnJS:E.runOnJS,onToggleControls:ii})),t=P.Gesture.Tap().numberOfTaps(2).maxDistance(Pt).maxDelay(Et).onEnd((function({_worklet_14880445913912_init_data:e,zoom:t}){const o=function(e){t.doubleTapZoomAt(e.x,e.y)};return o.__closure={zoom:t},o.__workletHash=0xd889fb15b38,o.__initData=e,o})({_worklet_14880445913912_init_data:Mt,zoom:hr})),o=P.Gesture.Exclusive(t,e),a=P.Gesture.Pan().minPointers(J.BACK_SWIPE_POINTERS).maxPointers(J.BACK_SWIPE_POINTERS).activeOffsetY(40).failOffsetX([-32,32]).onEnd((function({_worklet_16760767679460_init_data:e,zoom:t,swipeRefusal:o,shouldGoBackOnSwipe:a,runOnJS:n,onSwipeBack:i}){const r=function(e){const r={translationY:e.translationY,velocityY:e.velocityY,zoomScale:t.scale.value,pinchSeen:t.touchSequence.value.pinchSeen,maxTouches:t.touchSequence.value.maxTouches},l=o(r,'back');null===l?a(r)&&n(i)():t.traceEvent('zoom swipe-back refused',{reason:l,maxTouches:r.maxTouches})};return r.__closure={zoom:t,swipeRefusal:o,shouldGoBackOnSwipe:a,runOnJS:n,onSwipeBack:i},r.__workletHash=0xf3e6b9a8be4,r.__initData=e,r})({_worklet_16760767679460_init_data:At,zoom:hr,swipeRefusal:J.swipeRefusal,shouldGoBackOnSwipe:J.shouldGoBackOnSwipe,runOnJS:E.runOnJS,onSwipeBack:Sr})),n=P.Gesture.Pan().minPointers(J.OVERLAY_SWIPE_POINTERS).maxPointers(J.OVERLAY_SWIPE_POINTERS).activeOffsetY(40).failOffsetX([-32,32]).onEnd((function({_worklet_9885163590821_init_data:e,zoom:t,swipeRefusal:o,shouldOpenOverlayOnSwipe:a,runOnJS:n,onSwipeToOverlay:i}){const r=function(e){const r={translationY:e.translationY,velocityY:e.velocityY,zoomScale:t.scale.value,pinchSeen:t.touchSequence.value.pinchSeen,maxTouches:t.touchSequence.value.maxTouches},l=o(r,'overlay');null===l?a(r)&&n(i)():t.traceEvent('zoom swipe-overlay refused',{reason:l,maxTouches:r.maxTouches})};return r.__closure={zoom:t,swipeRefusal:o,shouldOpenOverlayOnSwipe:a,runOnJS:n,onSwipeToOverlay:i},r.__workletHash=9885163590821,r.__initData=e,r})({_worklet_9885163590821_init_data:jt,zoom:hr,swipeRefusal:J.swipeRefusal,shouldOpenOverlayOnSwipe:J.shouldOpenOverlayOnSwipe,runOnJS:E.runOnJS,onSwipeToOverlay:br}));return P.Gesture.Simultaneous(hr.composeWith(n),a,o)},[hr,ii,Sr,br]);(0,d.useEffect)(()=>{dr&&F.log.debug('live:zoom','video gesture tree rebuilt',{scale:hr.scale.value})},[yr,dr,hr]);const _r=(0,E.useDerivedValue)((function({_worklet_12819335077660_init_data:e,zoomBoxHeightFor:t,zoom:o}){const a=function(){return t(o.scale.value)};return a.__closure={zoomBoxHeightFor:t,zoom:o},a.__workletHash=0xba8bbe9df1c,a.__initData=e,a})({_worklet_12819335077660_init_data:Ft,zoomBoxHeightFor:ur,zoom:hr}),[ur,hr.scale]),kr=hr.traceBox;(0,E.useAnimatedReaction)((function({_worklet_9263996983302_init_data:e,liveBoxHeight:t}){const o=()=>t.value;return o.__closure={liveBoxHeight:t},o.__workletHash=9263996983302,o.__initData=e,o})({_worklet_9263996983302_init_data:Gt,liveBoxHeight:_r}),(function({_worklet_2483501414187_init_data:e,zoomTraceOn:t,traceBox:o}){const a=function(e,a){t&&null!==a&&e!==a&&o(e)};return a.__closure={zoomTraceOn:t,traceBox:o},a.__workletHash=2483501414187,a.__initData=e,a})({_worklet_2483501414187_init_data:Nt,zoomTraceOn:dr,traceBox:kr}),[dr,kr]);const Cr=(0,E.useAnimatedStyle)((function({_worklet_5895408842923_init_data:e,liveBoxHeight:t}){const o=()=>({height:t.value});return o.__closure={liveBoxHeight:t},o.__workletHash=5895408842923,o.__initData=e,o})({_worklet_5895408842923_init_data:Jt,liveBoxHeight:_r})),xr=(0,rt.useReducedMotion)(),Or=(0,E.useSharedValue)(Mi?1:0);(0,d.useEffect)(()=>{Or.set((0,rt.timingTo)(Mi?1:0,rt.MOTION.sheet.ms,xr))},[Mi,Or,xr]);const Tr=(0,lt.sideTimelineWidth)(Xe),Hr=(0,E.useAnimatedStyle)((function({_worklet_3745472025135_init_data:e,fill:t,sideProgress:o,sideReserve:a}){const n=()=>({right:t?o.get()*a:0});return n.__closure={fill:t,sideProgress:o,sideReserve:a},n.__workletHash=3745472025135,n.__initData=e,n})({_worklet_3745472025135_init_data:Vt,fill:Bi,sideProgress:Or,sideReserve:Tr}),[Bi,Tr]),Rr=(0,E.useAnimatedStyle)((function({_worklet_15991984246055_init_data:e,fill:t,winWidth:o,sideProgress:a,sideReserve:n,winHeight:i,isWideDetail:r,wideStreamW:l,wideStreamH:s,defaultHeight:c}){const u=function(){return t?{position:'absolute',top:0,left:0,width:o-a.get()*n,height:i}:r?{position:'absolute',top:0,left:0,width:l,height:s}:{position:'absolute',top:0,left:0,width:o,height:c}};return u.__closure={fill:t,winWidth:o,sideProgress:a,sideReserve:n,winHeight:i,isWideDetail:r,wideStreamW:l,wideStreamH:s,defaultHeight:c},u.__workletHash=0xe8b6c8a4d27,u.__initData=e,u})({_worklet_15991984246055_init_data:Yt,fill:Bi,winWidth:Xe,sideProgress:Or,sideReserve:Tr,winHeight:qt,isWideDetail:ki,wideStreamW:rr,wideStreamH:lr,defaultHeight:er}),[Xe,qt,Bi,ki,rr,lr,er,Tr]),{ref:Ir,isFullscreen:Pr,supported:Er,mode:Dr,toggle:Br}=(0,L.useWebFullscreen)(),Wr=(0,L.webFullscreenButtonShown)(Dr),Lr=(0,d.useCallback)(()=>{Er?Br():wn(e=>!e)},[Br,Er]);(0,d.useEffect)(()=>{Er&&wn(Pr)},[Pr,Er]),(0,z.useTheaterOrientation)(Sn,{screenMinSide:vi});const zr=(0,M.selectPlaybackStatus)(ba.state),Mr=zr.isLive&&!qo,Ar=Mr&&'playing'===Uo.state,jr=(0,it.useMotionHighlight)(e,Mr),Fr=Wo?'detection':zo||Go?'audio':Po.motion&&jr?'motion':null,Gr=((0,d.useMemo)(()=>(0,Le.gateLiveHighlight)(No,Mr),[No,Mr]),(0,d.useMemo)(()=>({quality:ko,highlight:No,showBoxes:dn}),[ko,No,dn])),Nr='rate'===(0,g.resolvePauseAuthority)({mode:ba.state.mode,clipHeld:'clip'===_a.stage.kind}),Jr=Nr?oa:qo,Vr=()=>{!da.current||Nr?Nr?Ja():Xo():(async()=>{const e=await La();Xo(),e&&Ma(e)})()},Yr='clip'===_a.stage.kind?!Ii&&_a.loading:Oa?'seeking'===ba.state.mode:!Ii&&!qo&&'connecting'===Uo.state,qr=(0,d.useCallback)(()=>{na.current?.retry()},[]),$r='error'===Uo.state||'error'===ba.state.mode,Ur=Uo.reason,Zr=Uo.state,Kr=(0,d.useMemo)(()=>Ii?Ot:{failed:$r,fetching:'connecting'===Zr,reason:'error'===Zr?Ur??null:null,onRetry:qr},[Ii,$r,Zr,Ur,qr]),Qr=(0,d.useCallback)(()=>{const e=(0,M.selectActiveEpoch)(ba.state),t=(0,j.jogBaseFor)(null!==ba.state.selectionAnchor,ba.state.playhead,e),o=(0,j.jogTarget)(t,-1);F.log.debug('playback:jog','jogBack',{playhead:ba.state.playhead,active:e,base:t,target:o,mode:ba.state.mode}),null!=o&&Ba(o,'timeline')},[ba,Ba]),Xr=(0,d.useCallback)(()=>{const e=(0,M.selectActiveEpoch)(ba.state),t=(0,j.jogBaseFor)(null!==ba.state.selectionAnchor,ba.state.playhead,e),o=(0,j.jogTarget)(t,1);F.log.debug('playback:jog','jogForward',{playhead:ba.state.playhead,active:e,base:t,target:o,mode:ba.state.mode}),null!=o&&Ba(o,'timeline')},[ba,Ba]),el='clip'===_a.stage.kind?_a.stage.clipId:null,tl=(0,d.useMemo)(()=>null===el||null===(0,f.clipStageStep)(ka,el,-1)?null:()=>_a.step(ka,-1),[el,ka,_a]),ol=(0,d.useMemo)(()=>null===el||null===(0,f.clipStageStep)(ka,el,1)?null:()=>_a.step(ka,1),[el,ka,_a]),al=(0,xt.jsx)(D.default.View,{style:Bi?[Ut.videoWrapFull,Cr,Hr]:ki?[Ut.videoWrap,{width:Ui.streamWidth,height:Ui.streamHeight}]:ir?[Ut.videoWrap,Cr]:[Ut.videoWrap,{height:er}],children:(0,xt.jsxs)(_.default,{style:Ut.videoContent,children:[(0,xt.jsxs)(D.default.View,{style:[Rr,hr.videoStyle],children:[Xt?(0,xt.jsxs)(_.default,{style:Ut.disabledStage,children:[(0,xt.jsx)(ot.PowerOff,{size:34,color:"#9aa0a6"})," ",(0,xt.jsx)(y.default,{style:Ut.disabledTitle,children:a('v2.cameras.disabledTitle')}),(0,xt.jsx)(y.default,{style:Ut.disabledHint,children:a('v2.cameras.disabledHint')})]}):Ea?(0,xt.jsx)(K.LiveView,{ref:na,deviceId:e,muted:ln,target:To,highlight:void 0,initialSeekMs:fa,initialClip:va,onPlaybackState:rn,onPlayerState:Zo,onPosition:Jn,onLiveCaptureError:()=>{da.current=!1,ra(!1),sa(null),i({title:a('v2.theater.recordLive'),message:a('v2.theater.recordFailed')})},onScrubDrawn:Gn,onServedProfile:Ua,onClipDuration:_a.reportDuration,onClipAudio:_a.reportAudio,onClipIncomplete:_a.reportIncomplete,onPeerReconnect:an},ha):(0,xt.jsx)($t,{deviceId:e,fill:Bi,enabled:zr.isLive}),un&&Mr?(0,xt.jsx)(ye.MotionRegionsOverlay,{deviceId:e,enabled:un}):null,dn&&Mr?(0,xt.jsx)(we.MotionBoxesOverlay,{deviceId:e,enabled:dn}):null,mn&&Mr?(0,xt.jsx)(be.StationaryBoxesOverlay,{deviceId:e,enabled:mn}):null,hn&&Mr?(0,xt.jsx)(_e.DiscardedBoxesOverlay,{deviceId:e,enabled:hn}):null]}),(0,xt.jsx)(P.GestureDetector,{gesture:yr,children:(0,xt.jsx)(D.default.View,{style:b.default.absoluteFill})}),null===Dn||Wn?null:(0,xt.jsx)(Te.ZoneActiveOverlay,{zone:Dn}),'gap'===ba.state.mode?(0,xt.jsxs)(_.default,{pointerEvents:"none",style:[b.default.absoluteFill,Ut.noRecOverlay],children:[(0,xt.jsx)(ot.VideoOff,{size:28,color:"#9aa0a6"})," ",(0,xt.jsx)(y.default,{style:Ut.noRecTitle,children:a('v2.theater.noRecording')}),(0,xt.jsx)(y.default,{style:Ut.noRecHint,children:a('v2.theater.noRecordingHint')})]}):null,Fr&&Mr&&Ro.highlightBorder?(0,xt.jsx)(_.default,{pointerEvents:"none",style:[b.default.absoluteFill,{borderWidth:to.highlight.thickness,borderColor:'motion'===Fr?to.highlight.motionColor:'audio'===Fr?to.highlight.audioColor:to.highlight.detectionColor}]}):null,bn?(0,xt.jsx)(D.default.View,{entering:o.entering,exiting:o.exiting,style:Ut.nameTag,pointerEvents:"none",children:(0,xt.jsxs)(x.GlassSurface,{contentStyle:Ut.nameTagRow,pointerEvents:"none",dense:!0,children:[po&&!Xt?(0,xt.jsx)(ot.Moon,{size:12,color:l.foreground}):(0,xt.jsx)(ct.CameraStatusDot,{deviceId:e,online:Qt,disabled:Xt,size:9}),(0,xt.jsx)(y.default,{style:[Ut.nameText,{color:l.foreground}],numberOfLines:1,children:Zt})]})}):null,(0,xt.jsxs)(ge.OverlayFrame,{fit:Bi||ki?'contain':'cover',aspect:fn,children:['off'!==gn&&Mr?(0,xt.jsx)(ke.AudioLevelMeter,{deviceId:e,position:gn,onSetPosition:ni}):null,'off'!==vn?(0,xt.jsx)(Ce.DeviceInfoOverlay,{position:vn}):null,(0,xt.jsx)(dt.DoorbellBadge,{deviceId:e,enabled:go&&Mr}),(0,xt.jsx)(ut.OccupancyBadge,{deviceId:e,enabled:'off'!==Ro.occupancy&&zr.isLive&&!qo,corner:'off'===Ro.occupancy?'bottom-left':Ro.occupancy}),(0,xt.jsx)(bt.OverlayReadouts,{deviceId:e,config:Ro,enabled:Mr&&zr.isLive}),'off'!==pn?(0,xt.jsx)(fe.StreamStatsOverlay,{getStats:mi,position:pn}):null,(0,xt.jsx)(ve.LiveViewersBadge,{deviceId:e,position:Ro.viewers,enabled:Mr&&zr.isLive})]}),(0,xt.jsx)(ce.StreamOverlayControls,{visible:bn,onRequestHide:ri,paused:Jr,onTogglePause:Vr,showPlayPause:ji,muted:ln,onToggleMute:Vn,audio:_a.audioNotice,hasTwoWayAudio:fo,talking:pi,onToggleTalk:gi,onStartSystemPip:ui,fullscreen:Sn,onToggleFullscreen:Wr?Lr:void 0,edgePad:Bi?{left:c.left,right:Mi?0:c.right,bottom:c.bottom}:void 0,timelineToggle:Bi?{dock:Li,onSet:In}:void 0,ptzToggle:Wi?{open:_n,onToggle:Cn}:void 0,activity:xn}),Wi&&_n?(0,xt.jsx)(de.PtzOverlay,{deviceId:e,visible:bn,edgePad:{left:c.left,right:Mi?0:c.right,bottom:c.bottom},onInteract:Tn}):null,Bi&&ho&&Ar?(0,xt.jsx)(ue.DriveOverlay,{deviceId:e,visible:bn,edgePad:{left:c.left,right:c.right,bottom:c.bottom},onOpenControls:En,drawer:{open:'overlay'===Li,width:(0,he.drawerWidth)(Xe)}}):null,Wn?(0,xt.jsx)(Oe.ZoneDrawOverlay,{zone:Dn,onConfirm:An,onCancel:jn}):null]})}),nl=[{id:'back',icon:ot.ArrowLeft,label:a('v2.common.back'),active:!1,onPress:()=>(0,Y.backToCameras)(r,Un),cluster:'left'},(0,st.timelineDockDisc)({dock:Li,onSet:In,cluster:'left',t:a}),...Wr||Sn?[{id:'fullscreen',icon:Sn?ot.Minimize2:ot.Maximize2,label:a(Sn?'v2.streamBar.exitFullscreen':'v2.streamBar.fullscreen'),active:Sn,onPress:Lr,cluster:'right'}]:[]],il=Ii?(0,xt.jsxs)(_.default,{testID:Bt,style:[Ut.wallWrap,Bi&&Mi?{marginRight:(0,lt.sideTimelineWidth)(Xe)}:null,(0,Me.wallBoxStyle)({mode:_i,wideStreamWidth:Ui.streamWidth,portraitStreamHeight:or.streamHeight})],children:[(0,xt.jsx)(We.WorkspaceStage,{devices:Ri,primary:Gr,liveOverlaysVisible:Mr,onGoTo:Yn,onCellPanel:Zn}),Bi?(0,xt.jsx)(me.OverlayDiscGroup,{visible:!0,holdOpen:!0,onRequestHide:Ht,items:nl,edgePad:{left:c.left,right:Mi?0:c.right,bottom:c.bottom}}):null]}):null,rl=(0,je.fanOutPlaybackToWall)({primary:{onSeek:Ba,onScrubBegin:ba.beginScrub,onScrubMove:ba.moveScrub,onScrubCommit:Wa,onGoLive:Ha,onTogglePlayPause:Vr,onSelectRate:Va},broadcast:Fe.gridPlaybackBus.broadcast,paused:Jr}),ll=(0,d.useCallback)(e=>{Ta(),null!==e&&rl.onSeek(e,'timeline')},[Ta,rl]);return(0,xt.jsxs)(_.default,{style:Ut.screenRow,children:[Si&&!Bi?(0,xt.jsx)(q.SideNavRail,{pathname:bi,compact:wi}):null,(0,xt.jsxs)(_.default,{ref:Ir,onLayout:Ni,style:{flex:1,minWidth:0,backgroundColor:l.background,paddingTop:Bi?0:c.top},children:[(0,xt.jsx)(I.StatusBar,{hidden:Bi,style:Bi||'dark'===s?'light':'dark'}),(0,xt.jsx)(Re.TheaterTimeline,{ref:Pn,navBarVisible:Yi,layoutMode:_i,railWidth:Ui.railWidth,stream:il??al,onOpenClipInFrame:_a.open,onClipsChange:xa,belowStream:(0,ze.shouldShowCameraShelf)(_i)?(0,xt.jsx)(Pe.BelowStreamArea,{width:Ui.streamWidth,currentDeviceId:e,wallShowing:Ii,onGoTo:Yn,onCellPanel:Zn,onOpenPlayback:Kn}):null,deviceId:e,scopeIds:Ri,hideBack:ki,drawerExpanded:zi,drawerBeside:Mi,name:Zt,onBack:()=>(0,Y.backToCameras)(r,Un),deviceBinding:{cameraName:Zt,hasPtz:lo,hasBattery:so,hasNetworkLink:uo,hasNavigation:ho,cameraJump:{onSwitchCamera:Yn,onOpenAdhocGrid:Ei,cameraSelection:Pi}},singleCamera:{streamBinding:Ii?{quality:Oi??ko,onSelectQuality:Hi}:{quality:ko,onSelectQuality:Ho},viewOptionsBinding:{highlight:Po,onSetHighlight:Eo},overlayBinding:{config:Ro,onChange:Io},onOpenLinkedDevices:()=>{Zn('devices',e)},linkedDevicesOpen:'devices'===ei?.kind&&ei.deviceId===e,...Ii?{}:{zone:{zoneRect:Dn,drawing:Wn,onRequestZoneDraw:zn,onClearZone:Mn}}},mode:ba.state.mode,activeEpoch:Pa??(0,M.selectActiveEpoch)(ba.state),seekAnchor:ba.state.seekAnchor,onSeek:rl.onSeek,onLeaveClipsMode:ll,onScrubBegin:rl.onScrubBegin,onScrubMove:rl.onScrubMove,onScrubCommit:rl.onScrubCommit,onGoLive:rl.onGoLive,liveLocked:ba.state.liveLocked,onToggleLiveLock:ba.toggleLiveLock,liveCapture:Ii||Na?void 0:Aa,exportSelection:Ii||Na?void 0:ja,onSnapshot:Ii||Na?void 0:Ga,playbackRate:ea,paused:Jr,servedTier:$a,onTogglePlayPause:rl.onTogglePlayPause,loading:Yr,streamFault:Kr,scrubDirection:(0,M.selectScrubDirection)(ba.state),onJogBack:Qr,onJogForward:Xr,clipHeld:'clip'===_a.stage.kind,clipOnFrameId:'clip'===_a.stage.kind?_a.stage.clipId:null,onClipPrev:tl,onClipNext:ol,clipProgress:{progress:_a.progress,controls:_a.controls,..._a.seek},clipLoop:{enabled:no,onToggle:io},clipControls:_a.controls,clipIncomplete:_a.incompleteNotice,onStepFrame:Ya,onSelectRate:rl.onSelectRate}),Yi?(0,xt.jsx)($.BottomNavBar,{pathname:bi,insetBottom:c.bottom}):null,(0,xt.jsx)(Ve.GridCellPanelOverlay,{panel:ei,cameraName:oi,hasPtz:ai,onSelect:t=>$n({kind:t,deviceId:ei?.deviceId??e}),onClose:Qn}),(0,xt.jsx)(S.ClipStageView,{stage:_a.stage,playback:_a.playback,onPrev:tl,onNext:ol,onClose:Ta})]})]})};var c=t(r[0]),u=t(r[1]),d=t(r[2]),h=t(r[3]),m=t(r[4]),p=t(r[5]),f=t(r[6]),g=t(r[7]),v=t(r[8]),S=t(r[9]),w=t(r[10]);t(r[11]);var b=l(t(r[12])),y=l(t(r[13])),_=l(t(r[14])),k=t(r[15]),C=t(r[16]),x=t(r[17]),O=t(r[18]),T=t(r[19]),H=t(r[20]),R=t(r[21]),I=t(r[22]);t(r[23]);var P=t(r[24]),E=t(r[25]),D=l(E),B=s(t(r[26])),W=s(t(r[27])),L=t(r[28]),z=t(r[29]),M=t(r[30]),A=t(r[31]),j=t(r[32]),F=t(r[33]),G=t(r[34]),N=t(r[35]),J=t(r[36]),V=t(r[37]),Y=t(r[38]),q=t(r[39]),$=t(r[40]),U=t(r[41]),Z=t(r[42]),K=t(r[43]),Q=t(r[44]),X=t(r[45]),ee=t(r[46]),te=t(r[47]),oe=t(r[48]),ae=t(r[49]),ne=t(r[50]),ie=t(r[51]),re=t(r[52]),le=t(r[53]),se=t(r[54]),ce=t(r[55]),ue=t(r[56]),de=t(r[57]),he=t(r[58]),me=t(r[59]),pe=t(r[60]),fe=t(r[61]),ge=t(r[62]),ve=t(r[63]),Se=t(r[64]),we=t(r[65]),be=t(r[66]),ye=t(r[67]),_e=t(r[68]),ke=t(r[69]),Ce=t(r[70]),xe=t(r[71]),Oe=t(r[72]),Te=t(r[73]),He=t(r[74]),Re=t(r[75]),Ie=t(r[76]),Pe=t(r[77]),Ee=t(r[78]),De=t(r[79]),Be=t(r[80]),We=t(r[81]),Le=t(r[82]),ze=t(r[83]),Me=t(r[84]),Ae=t(r[85]),je=t(r[86]),Fe=t(r[87]),Ge=t(r[88]),Ne=t(r[89]),Je=t(r[90]),Ve=t(r[91]),Ye=t(r[92]),qe=t(r[93]),$e=t(r[94]),Ue=t(r[95]),Ze=t(r[96]),Ke=t(r[97]),Qe=t(r[98]),Xe=t(r[99]),et=t(r[100]),tt=t(r[101]),ot=t(r[102]),at=t(r[103]),nt=t(r[104]),it=t(r[105]),rt=t(r[106]),lt=t(r[107]),st=t(r[108]),ct=t(r[109]),ut=t(r[110]),dt=t(r[111]),ht=t(r[112]),mt=t(r[113]),pt=t(r[114]),ft=t(r[115]),gt=t(r[116]),vt=t(r[117]),St=t(r[118]),wt=t(r[119]),bt=t(r[120]),yt=t(r[121]),_t=t(r[122]),kt=t(r[123]),Ct=t(r[124]),xt=t(r[125]);const Ot={failed:!1,fetching:!1,reason:null,onRetry:()=>{}};function Tt(e,t,o){return null===e||e.wall!==t?t?'pictureToWall':'wallToPicture':t&&e.mode!==o?'wallReshaped':null}const Ht=()=>{},Rt=.5,It=2.5,Pt=24,Et=300;function Dt(e){const t=(0,c.c)(19),{t:o}=(0,T.useTranslation)(),{data:a}=(0,et.useCameras)();let n;t[0]!==a?(n=void 0===a?[]:a,t[0]=a,t[1]=n):n=t[1];const i=n;let r;if(t[2]!==i||t[3]!==e){let o;t[5]!==e?(o=t=>t.id===e,t[5]=e,t[6]=o):o=t[6],r=i.find(o),t[2]=i,t[3]=e,t[4]=r}else r=t[4];const l=r;let s,u;t[7]!==l?.name||t[8]!==e||t[9]!==o?(s=l?.name??o("v2.cameraDetail.fallbackName",{id:e}),t[7]=l?.name,t[8]=e,t[9]=o,t[10]=s):s=t[10],t[11]!==l?.features?(u=l?.features??[],t[11]=l?.features,t[12]=u):u=t[12];const d=l?.online??!1,h=l?.disabled??!1,m=void 0!==l;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 Bt='wall-stage',Wt=[],Lt={code:"function CameraDetailScreenTsx1(scale){const{zoomBoxHeight,zoomBoxShared}=this.__closure;return zoomBoxHeight(scale,zoomBoxShared.value);}"},zt={code:"function CameraDetailScreenTsx2(){const{runOnJS,onToggleControls}=this.__closure;runOnJS(onToggleControls)();}"},Mt={code:"function CameraDetailScreenTsx3(e){const{zoom}=this.__closure;zoom.doubleTapZoomAt(e.x,e.y);}"},At={code:"function CameraDetailScreenTsx4(e){const{zoom,swipeRefusal,shouldGoBackOnSwipe,runOnJS,onSwipeBack}=this.__closure;const input={translationY:e.translationY,velocityY:e.velocityY,zoomScale:zoom.scale.value,pinchSeen:zoom.touchSequence.value.pinchSeen,maxTouches:zoom.touchSequence.value.maxTouches};const refusal=swipeRefusal(input,'back');if(refusal!==null){zoom.traceEvent('zoom swipe-back refused',{reason:refusal,maxTouches:input.maxTouches});return;}if(shouldGoBackOnSwipe(input)){runOnJS(onSwipeBack)();}}"},jt={code:"function CameraDetailScreenTsx5(e){const{zoom,swipeRefusal,shouldOpenOverlayOnSwipe,runOnJS,onSwipeToOverlay}=this.__closure;const input={translationY:e.translationY,velocityY:e.velocityY,zoomScale:zoom.scale.value,pinchSeen:zoom.touchSequence.value.pinchSeen,maxTouches:zoom.touchSequence.value.maxTouches};const refusal=swipeRefusal(input,'overlay');if(refusal!==null){zoom.traceEvent('zoom swipe-overlay refused',{reason:refusal,maxTouches:input.maxTouches});return;}if(shouldOpenOverlayOnSwipe(input)){runOnJS(onSwipeToOverlay)();}}"},Ft={code:"function CameraDetailScreenTsx6(){const{zoomBoxHeightFor,zoom}=this.__closure;return zoomBoxHeightFor(zoom.scale.value);}"},Gt={code:"function CameraDetailScreenTsx7(){const{liveBoxHeight}=this.__closure;return liveBoxHeight.value;}"},Nt={code:"function CameraDetailScreenTsx8(h,prev){const{zoomTraceOn,traceBox}=this.__closure;if(zoomTraceOn&&prev!==null&&h!==prev)traceBox(h);}"},Jt={code:"function CameraDetailScreenTsx9(){const{liveBoxHeight}=this.__closure;return{height:liveBoxHeight.value};}"},Vt={code:"function CameraDetailScreenTsx10(){const{fill,sideProgress,sideReserve}=this.__closure;return{right:fill?sideProgress.get()*sideReserve:0};}"},Yt={code:"function CameraDetailScreenTsx11(){const{fill,winWidth,sideProgress,sideReserve,winHeight,isWideDetail,wideStreamW,wideStreamH,defaultHeight}=this.__closure;if(fill){return{position:'absolute',top:0,left:0,width:winWidth-sideProgress.get()*sideReserve,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 qt=960;function $t(e){const t=(0,c.c)(9),{deviceId:o,fill:a,enabled:n}=e,i=(0,Qe.useSnapshot)(o,n,qt);let r;t[0]!==i.uri?(r=null===i.uri?(0,xt.jsx)(C.SkeletonBox,{}):null,t[0]=i.uri,t[1]=r):r=t[1];const l=a?"contain":"cover";let s,u;return t[2]!==o||t[3]!==i||t[4]!==l?(s=(0,xt.jsx)(Xe.SnapshotImage,{source:i,deviceId:o,style:b.default.absoluteFill,contentFit:l}),t[2]=o,t[3]=i,t[4]=l,t[5]=s):s=t[5],t[6]!==r||t[7]!==s?(u=(0,xt.jsxs)(_.default,{style:Ut.poster,children:[r,s]}),t[6]=r,t[7]=s,t[8]=u):u=t[8],u}const Ut=b.default.create({screenRow:{flex:1,flexDirection:'row'},videoWrap:{position:'relative',width:'100%',overflow:'hidden',backgroundColor:'#000'},wallWrap:{overflow:'hidden'},videoWrapFull:{...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%'},nameTagRow:{flexDirection:'row',alignItems:'center',gap:6,paddingHorizontal:10,paddingVertical:5},nameText:{fontSize:13,fontWeight:'600'}})},1156,[788,1157,16,1158,1166,1216,1159,1160,1167,1168,1217,109,32,193,114,974,840,885,1005,818,789,273,1218,1219,1220,1130,1221,1222,1169,1170,992,1171,1223,1000,1152,1172,1173,1174,1224,793,794,796,790,1141,1175,1225,1226,1177,1185,880,994,1006,1227,1186,1151,1187,1188,1190,1228,1153,1229,1230,1231,1232,1192,1233,1234,1235,1236,1237,1238,835,1193,1194,1239,991,1240,1195,824,1241,823,1205,1198,1203,1207,1204,1208,1242,1243,1196,1209,1244,1138,1245,1210,996,1211,791,839,849,828,1212,838,841,834,848,1131,1246,1154,851,853,1213,1247,1248,1249,1202,1250,1062,1075,1251,1215,1252,833,1143,1142,10]);
|
|
3
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}},1157,[]);
|
|
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,[E,R]=(0,t.useState)(n.initialClipStage),L=(0,t.useRef)(null),O=(0,t.useRef)(null),T=(0,u.useClipPlayback)(),[w,A]=(0,t.useState)(null),[N,B]=(0,t.useState)(null),[D,H]=(0,t.useState)(null),[Y,j]=(0,t.useState)(null),[F,G]=(0,t.useState)(null),[U,q]=(0,t.useState)(null);let x;_[0]!==T||_[1]!==M||_[2]!==E?(x=(l,t)=>{Z.current=t,G(n=>null!==n&&n.deviceId===l.deviceId&&n.provider===t?n:{deviceId:l.deviceId,provider:t}),O.current=(0,p.reduceClipLoop)(O.current,{kind:"opened"}).memo;const o=(0,n.clipStageAttach)(E,l);if((0,c.noteClipOpenStep)("stage",{deviceId:l.deviceId,clipId:l.clipId,attached:o.kind,holds:(0,n.stageHoldsClip)(o),playback:l.playback.kind,...!1===l.playable?{refusedBy:"provider"}:{}}),R(o),(0,n.stageHoldsClip)(o)){if("clip"===o.kind)switch(A(null),j(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})),L.current={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 R(n.initialClipStage)}}else T.refuse(l.clipId,l.unplayableReason??null)},_[0]=T,_[1]=M,_[2]=E,_[3]=x):x=_[3];const z=x;let J;_[4]!==T?(J=()=>{O.current=(0,p.reduceClipLoop)(O.current,{kind:"closed"}).memo,R(b),A(null),q(y),T.close()},_[4]=T,_[5]=J):J=_[5];const K=J;let Q;_[6]!==M?(Q=()=>{const l=L.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]!==E.clipId||_[11]!==E.kind?(W=l=>{if(q(t=>(0,s.reduceClipLoading)(t,{kind:"player",state:l})),"clip"!==E.kind)return;const t=(0,p.reduceClipLoop)(O.current,{kind:"player",state:l,clipId:E.clipId,loop:h});O.current=t.memo,t.replay&&V()},_[8]=h,_[9]=V,_[10]=E.clipId,_[11]=E.kind,_[12]=W):W=_[12];const X=W,Z=(0,t.useRef)(null);let $;_[13]!==z||_[14]!==E.clipId||_[15]!==E.kind?($=(l,t)=>{if("clip"!==E.kind)return;const o=Z.current;if(null===o)return;const c=(0,n.clipStageStep)(l,E.clipId,t);null!==c&&z(c,o)},_[13]=z,_[14]=E.clipId,_[15]=E.kind,_[16]=$):$=_[16];const ee=$;let le;_[17]!==E?(le=l=>{const t=(0,o.routePlayerPosition)(E,l);switch(t.kind){case"session":return!1;case"clip":return A(t.positionMs),!0;case"dropped":return(0,c.noteTimelineInputIgnored)("positionEpochOnClip"),!0}},_[17]=E,_[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=>{H(l)},_[20]=re):re=_[20];const oe=re;let ce;_[21]===Symbol.for("react.memo_cache_sentinel")?(ce=l=>{j(l)},_[21]=ce):ce=_[21];const de=ce,se=(0,S.useClipPlaybackOptions)(F?.deviceId??null,F?.provider??null),pe=(0,t.useRef)(null),ue="clip"===E.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]!==se||_[28]!==ue||_[29]!==M||_[30]!==w?(fe=l=>{if(!ue)return pe.current=null,void(0,c.noteTimelineInputIgnored)("clipSeekNoClip");if(!(0,k.clipSeekAllowed)(se.controls,l,w??0))return pe.current=null,(0,c.noteTimelineInputIgnored)("clipSeekBackwardOnForwardOnly"),void A(w);const t=pe.current?.id;pe.current=null,j(null),M.scrubCommit(l,t),A(l)},_[27]=se,_[28]=ue,_[29]=M,_[30]=w,_[31]=fe):fe=_[31];const me=fe;let ve;_[32]!==N||_[33]!==w||_[34]!==E.clipId||_[35]!==E.endMs||_[36]!==E.inProgress||_[37]!==E.kind||_[38]!==E.startMs?(ve="clip"===E.kind?(0,o.resolveClipProgress)(w,(0,o.resolveClipDuration)({measuredMs:null!==N&&N.clipId===E.clipId?N.durationMs:null,startMs:E.startMs,endMs:E.endMs,inProgress:E.inProgress})):o.EMPTY_CLIP_PROGRESS,_[32]=N,_[33]=w,_[34]=E.clipId,_[35]=E.endMs,_[36]=E.inProgress,_[37]=E.kind,_[38]=E.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"===E.kind?E.clipId:null;let Me;_[44]!==Y||_[45]!==be?(Me=(0,C.resolveClipIncompleteNotice)(be,Y),_[44]=Y,_[45]=be,_[46]=Me):Me=_[46];const Pe="clip"===E.kind?E.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"===E.kind&&U===E.clipId;let Ee;_[50]!==T.state||_[51]!==K||_[52]!==se||_[53]!==z||_[54]!==Ce||_[55]!==V||_[56]!==X||_[57]!==ie||_[58]!==E||_[59]!==ee||_[60]!==ye||_[61]!==Me||_[62]!==_e||_[63]!==he?(Ee={stage:E,playback:ge,open:z,replay:V,step:ee,close:K,progress:Ce,seek:ye,controls:se,reportPosition:ie,reportDuration:ne,reportAudio:oe,reportIncomplete:de,incompleteNotice:Me,audioNotice:_e,loading:he,reportPlayerState:X},_[50]=T.state,_[51]=K,_[52]=se,_[53]=z,_[54]=Ce,_[55]=V,_[56]=X,_[57]=ie,_[58]=E,_[59]=ee,_[60]=ye,_[61]=Me,_[62]=_e,_[63]=he,_[64]=Ee):Ee=_[64];return Ee};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)}},1158,[788,16,1159,
|
|
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'}},1159,[
|
|
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,[E,R]=(0,t.useState)(n.initialClipStage),L=(0,t.useRef)(null),O=(0,t.useRef)(null),T=(0,u.useClipPlayback)(),[w,A]=(0,t.useState)(null),[N,B]=(0,t.useState)(null),[D,H]=(0,t.useState)(null),[Y,j]=(0,t.useState)(null),[F,G]=(0,t.useState)(null),[U,q]=(0,t.useState)(null);let x;_[0]!==T||_[1]!==M||_[2]!==E?(x=(l,t)=>{Z.current=t,G(n=>null!==n&&n.deviceId===l.deviceId&&n.provider===t?n:{deviceId:l.deviceId,provider:t}),O.current=(0,p.reduceClipLoop)(O.current,{kind:"opened"}).memo;const o=(0,n.clipStageAttach)(E,l);if((0,c.noteClipOpenStep)("stage",{deviceId:l.deviceId,clipId:l.clipId,attached:o.kind,holds:(0,n.stageHoldsClip)(o),playback:l.playback.kind,...!1===l.playable?{refusedBy:"provider"}:{}}),R(o),(0,n.stageHoldsClip)(o)){if("clip"===o.kind)switch(A(null),j(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})),L.current={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 R(n.initialClipStage)}}else T.refuse(l.clipId,l.unplayableReason??null)},_[0]=T,_[1]=M,_[2]=E,_[3]=x):x=_[3];const z=x;let J;_[4]!==T?(J=()=>{O.current=(0,p.reduceClipLoop)(O.current,{kind:"closed"}).memo,R(b),A(null),q(y),T.close()},_[4]=T,_[5]=J):J=_[5];const K=J;let Q;_[6]!==M?(Q=()=>{const l=L.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]!==E.clipId||_[11]!==E.kind?(W=l=>{if(q(t=>(0,s.reduceClipLoading)(t,{kind:"player",state:l})),"clip"!==E.kind)return;const t=(0,p.reduceClipLoop)(O.current,{kind:"player",state:l,clipId:E.clipId,loop:h});O.current=t.memo,t.replay&&V()},_[8]=h,_[9]=V,_[10]=E.clipId,_[11]=E.kind,_[12]=W):W=_[12];const X=W,Z=(0,t.useRef)(null);let $;_[13]!==z||_[14]!==E.clipId||_[15]!==E.kind?($=(l,t)=>{if("clip"!==E.kind)return;const o=Z.current;if(null===o)return;const c=(0,n.clipStageStep)(l,E.clipId,t);null!==c&&z(c,o)},_[13]=z,_[14]=E.clipId,_[15]=E.kind,_[16]=$):$=_[16];const ee=$;let le;_[17]!==E?(le=l=>{const t=(0,o.routePlayerPosition)(E,l);switch(t.kind){case"session":return!1;case"clip":return A(t.positionMs),!0;case"dropped":return(0,c.noteTimelineInputIgnored)("positionEpochOnClip"),!0}},_[17]=E,_[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=>{H(l)},_[20]=re):re=_[20];const oe=re;let ce;_[21]===Symbol.for("react.memo_cache_sentinel")?(ce=l=>{j(l)},_[21]=ce):ce=_[21];const de=ce,se=(0,S.useClipPlaybackOptions)(F?.deviceId??null,F?.provider??null),pe=(0,t.useRef)(null),ue="clip"===E.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]!==se||_[28]!==ue||_[29]!==M||_[30]!==w?(fe=l=>{if(!ue)return pe.current=null,void(0,c.noteTimelineInputIgnored)("clipSeekNoClip");if(!(0,k.clipSeekAllowed)(se.controls,l,w??0))return pe.current=null,(0,c.noteTimelineInputIgnored)("clipSeekBackwardOnForwardOnly"),void A(w);const t=pe.current?.id;pe.current=null,j(null),M.scrubCommit(l,t),A(l)},_[27]=se,_[28]=ue,_[29]=M,_[30]=w,_[31]=fe):fe=_[31];const me=fe;let ve;_[32]!==N||_[33]!==w||_[34]!==E.clipId||_[35]!==E.endMs||_[36]!==E.inProgress||_[37]!==E.kind||_[38]!==E.startMs?(ve="clip"===E.kind?(0,o.resolveClipProgress)(w,(0,o.resolveClipDuration)({measuredMs:null!==N&&N.clipId===E.clipId?N.durationMs:null,startMs:E.startMs,endMs:E.endMs,inProgress:E.inProgress})):o.EMPTY_CLIP_PROGRESS,_[32]=N,_[33]=w,_[34]=E.clipId,_[35]=E.endMs,_[36]=E.inProgress,_[37]=E.kind,_[38]=E.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"===E.kind?E.clipId:null;let Me;_[44]!==Y||_[45]!==be?(Me=(0,C.resolveClipIncompleteNotice)(be,Y),_[44]=Y,_[45]=be,_[46]=Me):Me=_[46];const Pe="clip"===E.kind?E.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"===E.kind&&U===E.clipId;let Ee;_[50]!==T.state||_[51]!==K||_[52]!==se||_[53]!==z||_[54]!==Ce||_[55]!==V||_[56]!==X||_[57]!==ie||_[58]!==E||_[59]!==ee||_[60]!==ye||_[61]!==Me||_[62]!==_e||_[63]!==he?(Ee={stage:E,playback:ge,open:z,replay:V,step:ee,close:K,progress:Ce,seek:ye,controls:se,reportPosition:ie,reportDuration:ne,reportAudio:oe,reportIncomplete:de,incompleteNotice:Me,audioNotice:_e,loading:he,reportPlayerState:X},_[50]=T.state,_[51]=K,_[52]=se,_[53]=z,_[54]=Ce,_[55]=V,_[56]=X,_[57]=ie,_[58]=E,_[59]=ee,_[60]=ye,_[61]=Me,_[62]=_e,_[63]=he,_[64]=Ee):Ee=_[64];return Ee};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)}},1158,[788,16,1159,1253,1216,1160,1161,1162,1254,1255,1163,1256,1164,1165]);
|
|
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'}},1159,[1257,1258]);
|
|
6
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}},1160,[]);
|
|
7
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}},1161,[]);
|
|
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',{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)}}},1162,[16,819,884,
|
|
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'}},1163,[788,16,854,819,884,855,
|
|
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',{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)}}},1162,[16,819,884,1257,1216,1000]);
|
|
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'}},1163,[788,16,854,819,884,855,1255,1259]);
|
|
10
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}}},1164,[]);
|
|
11
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}}},1165,[]);
|
|
12
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}},1166,[]);
|
|
13
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}},1167,[]);
|
|
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}})},1168,[788,16,240,247,32,193,114,
|
|
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}})},1168,[788,16,240,247,32,193,114,1260,818,838,819,988,1020,790,1000,1159,10]);
|
|
15
15
|
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.decideWebFullscreenMode=t,_e.webFullscreenButtonShown=function(e){return'hidden'!==e},_e.usesBrowserFullscreen=l,_e.isWebFullscreenSupported=c,_e.createWebFullscreenController=s,_e.useWebFullscreen=function(){const o=(0,e.c)(14),t=(0,n.useRef)(null),[c,u]=(0,n.useState)(!1),[f]=(0,n.useState)(h);let p;e:{if("undefined"==typeof document){p=null;break e}let e;o[0]!==f?(e=s({doc:document,orientation:"undefined"!=typeof screen?screen.orientation??null:null,mode:f,warn:k}),o[0]=f,o[1]=e):e=o[1],p=e}const w=p;let v,b,F;o[2]!==w?(v=()=>{if(null===w)return;const e=()=>{u(null!==document.fullscreenElement),w.onFullscreenChange()};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},b=[w],o[2]=w,o[3]=v,o[4]=b):(v=o[3],b=o[4]);(0,n.useEffect)(v,b),o[5]!==w?(F=()=>{const e=t.current;w?.toggle(e)},o[5]=w,o[6]=F):F=o[6];const E=F;let y,P;o[7]!==f?(y=l(f),o[7]=f,o[8]=y):y=o[8];o[9]!==c||o[10]!==f||o[11]!==y||o[12]!==E?(P={ref:t,isFullscreen:c,mode:f,supported:y,toggle:E},o[9]=c,o[10]=f,o[11]=y,o[12]=E,o[13]=P):P=o[13];return P};var e=r(d[0]),n=r(d[1]);r(d[2]);var o=r(d[3]);function t(e){return e.coarsePointer?e.fullscreenEnabled?e.orientationLock?{mode:'lock-landscape',reason:'touch device: fullscreen + landscape lock'}:{mode:'hidden',reason:'touch device that cannot lock landscape (no screen.orientation.lock)'}:{mode:'hidden',reason:'touch device without the fullscreen API (iPhone Safari / iOS PWA)'}:e.fullscreenEnabled?{mode:'plain',reason:'desktop: fullscreen without an orientation lock'}:{mode:'app-fill',reason:'desktop without the fullscreen API: the app fill layout'}}function l(e){return'lock-landscape'===e||'plain'===e}function c(e){return!0===e?.fullscreenEnabled}function u(e){return e instanceof Error?e.message:String(e)}function s(e){const{doc:n,orientation:o,mode:t,warn:l}=e;let c=!1;const s=()=>{if(c){c=!1;try{o?.unlock?.()}catch(e){l('orientation unlock refused',{error:u(e)})}}},f=()=>{'lock-landscape'===t&&void 0!==o?.lock&&o.lock('landscape').then(()=>{c=!0},e=>l('orientation lock refused',{error:u(e)}))};return{toggle:e=>{if(null!==n.fullscreenElement)return s(),void n.exitFullscreen().catch(e=>l('exit refused',{error:u(e)}));null!==e&&void 0!==e.requestFullscreen&&e.requestFullscreen().then(f,e=>l('request refused',{error:u(e)}))},onFullscreenChange:()=>{null===n.fullscreenElement&&s()}}}function f(){const e='undefined'!=typeof document,n='undefined'!=typeof screen?screen.orientation:void 0,o='undefined'!=typeof window&&'function'==typeof window.matchMedia&&window.matchMedia('(pointer: coarse)').matches;return{fullscreenEnabled:e&&c(document),orientationLock:'function'==typeof n?.lock,coarsePointer:o}}let p=null;function h(){const e=f(),n=t(e);return p!==n.mode&&(p=n.mode,o.log.info('fullscreen',`web mode: ${n.mode}`,{reason:n.reason,...e})),n.mode}function k(e,n){return o.log.warn("fullscreen",e,n)}},1169,[788,16,109,1000]);
|
|
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()}},1170,[788,16,109,789,
|
|
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()}},1170,[788,16,109,789,1219,995]);
|
|
17
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},1171,[]);
|
|
18
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}},1172,[]);
|
|
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
|
|
20
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
21
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
22
|
-
__d(function(g,_r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useStreamZoom=function(l){const B=(0,t.c)(158),{contentAspect:C,fit:L,viewport:H,trace:J}=l,R=void 0===C?S:C,D=void 0!==J&&J,{width:V,heightFor:$}=H,z=(0,h.useSharedValue)(1),K=(0,h.useSharedValue)(1),G=(0,h.useSharedValue)(0),U=(0,h.useSharedValue)(0),j=(0,h.useSharedValue)(0),q=(0,h.useSharedValue)(0),Q=(0,h.useSharedValue)(1),tt=(0,h.useSharedValue)(0),et=(0,h.useSharedValue)(0),at=(0,h.useSharedValue)((0,s.newZoomTraceBuffer)()),ot=(0,h.useSharedValue)("");let nt;B[0]!==at||B[1]!==ot?(nt=()=>{(0,h.runOnUI)((function({_worklet_8283821094612_init_data:t,takeZoomTrace:e,traceBuf:o,traceKind:n,runOnJS:c,reportZoomTrace:r}){const s=function(){const t=e(o.value),s=n.value;t.length>0&&c(r)(s,t)};return s.__closure={takeZoomTrace:e,traceBuf:o,traceKind:n,runOnJS:c,reportZoomTrace:r},s.__workletHash=8283821094612,s.__initData=t,s})({_worklet_8283821094612_init_data:y,takeZoomTrace:s.takeZoomTrace,traceBuf:at,traceKind:ot,runOnJS:h.runOnJS,reportZoomTrace:T}))()},B[0]=at,B[1]=ot,B[2]=nt):nt=B[2];const ct=nt;let rt;B[3]!==ct?(rt=()=>{setTimeout(ct,w)},B[3]=ct,B[4]=rt):rt=B[4];const st=rt;let lt;B[5]!==D||B[6]!==at||B[7]!==ot?(lt=(function({_worklet_6864190838485_init_data:t,trace:e,takeZoomTrace:o,traceBuf:n,runOnJS:c,reportZoomTrace:r,traceKind:s,beginZoomTrace:l}){const u=function(t){if(!e)return;const u=o(n.value);u.length>0&&c(r)(s.value,u),s.set(t),l(n.value,Date.now())};return u.__closure={trace:e,takeZoomTrace:o,traceBuf:n,runOnJS:c,reportZoomTrace:r,traceKind:s,beginZoomTrace:l},u.__workletHash=6864190838485,u.__initData=t,u})({_worklet_6864190838485_init_data:E,trace:D,takeZoomTrace:s.takeZoomTrace,traceBuf:at,runOnJS:h.runOnJS,reportZoomTrace:T,traceKind:ot,beginZoomTrace:s.beginZoomTrace}),B[5]=D,B[6]=at,B[7]=ot,B[8]=lt):lt=B[8];const it=lt;let ut;B[9]!==K||B[10]!==$||B[11]!==z.value||B[12]!==D||B[13]!==at||B[14]!==G.value||B[15]!==U.value||B[16]!==V?(ut=(function({_worklet_17285674996544_init_data:t,trace:e,traceBuf:o,pushZoomSample:n,zoomTraceElapsed:c,scale:r,committedScale:s,tx:l,ty:u,viewportWidth:_,heightFor:h}){const p=function(t,p){if(!e)return;const v=o.value;0!==v.startedAt&&n(v,{t:c(v,Date.now()),phase:t,live:r.value,committed:s.value,x:l.value,y:u.value,boxW:_,boxH:h(r.value),...p})};return p.__closure={trace:e,traceBuf:o,pushZoomSample:n,zoomTraceElapsed:c,scale:r,committedScale:s,tx:l,ty:u,viewportWidth:_,heightFor:h},p.__workletHash=0xfb8a2849340,p.__initData=t,p})({_worklet_17285674996544_init_data:P,trace:D,traceBuf:at,pushZoomSample:s.pushZoomSample,zoomTraceElapsed:s.zoomTraceElapsed,scale:z,committedScale:K,tx:G,ty:U,viewportWidth:V,heightFor:$}),B[9]=K,B[10]=$,B[11]=z.value,B[12]=D,B[13]=at,B[14]=G.value,B[15]=U.value,B[16]=V,B[17]=ut):ut=B[17];const _t=ut;let ht;B[18]!==st||B[19]!==D?(ht=(function({_worklet_4686333039655_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=4686333039655,c.__initData=t,c})({_worklet_4686333039655_init_data:A,trace:D,runOnJS:h.runOnJS,armTraceFlush:st}),B[18]=st,B[19]=D,B[20]=ht):ht=B[20];const mt=ht;let dt;B[21]!==_t?(dt=(function({_worklet_16260371776350_init_data:t,traceSample:e}){const o=function(t){e("box",{drawnH:t})};return o.__closure={traceSample:e},o.__workletHash=0xec9e9af035e,o.__initData=t,o})({_worklet_16260371776350_init_data:Z,traceSample:_t}),B[21]=_t,B[22]=dt):dt=B[22];const pt=dt;let vt;B[23]!==K||B[24]!==j||B[25]!==q||B[26]!==z||B[27]!==G||B[28]!==U?(vt=()=>{z.set(1),K.set(1),G.set(0),U.set(0),j.set(0),q.set(0)},B[23]=K,B[24]=j,B[25]=q,B[26]=z,B[27]=G,B[28]=U,B[29]=vt):vt=B[29];const ft=vt;let St;B[30]!==K||B[31]!==j||B[32]!==q||B[33]!==z||B[34]!==G||B[35]!==U?(St=(function({_worklet_2948218997959_init_data:t,scale:e,withTiming:o,committedScale:n,tx:c,ty:r,savedTx:s,savedTy:l}){const u=function(){e.set(o(1)),n.set(1),c.set(o(0)),r.set(o(0)),s.set(0),l.set(0)};return u.__closure={scale:e,withTiming:o,committedScale:n,tx:c,ty:r,savedTx:s,savedTy:l},u.__workletHash=2948218997959,u.__initData=t,u})({_worklet_2948218997959_init_data:O,scale:z,withTiming:h.withTiming,committedScale:K,tx:G,ty:U,savedTx:j,savedTy:q}),B[30]=K,B[31]=j,B[32]=q,B[33]=z,B[34]=G,B[35]=U,B[36]=St):St=B[36];const xt=St,wt=(0,h.useSharedValue)(0);let Tt;if(B[37]!==K||B[38]!==R||B[39]!==L||B[40]!==$||B[41]!==wt||B[42]!==tt||B[43]!==et||B[44]!==Q||B[45]!==j||B[46]!==q||B[47]!==z||B[48]!==it||B[49]!==mt||B[50]!==_t||B[51]!==G||B[52]!==U||B[53]!==V){let t,n,c;B[55]!==K||B[56]!==tt||B[57]!==et||B[58]!==Q||B[59]!==it||B[60]!==_t?(t=(function({_worklet_9285017616255_init_data:t,pinchStartScale:e,committedScale:o,pinchFocalX:n,pinchFocalY:c,traceBegin:r,traceSample:s}){const l=function(t){e.set(o.value),n.set(t.focalX),c.set(t.focalY),r("pinch"),s("start",{focalX:t.focalX,focalY:t.focalY,pointers:t.numberOfPointers})};return l.__closure={pinchStartScale:e,committedScale:o,pinchFocalX:n,pinchFocalY:c,traceBegin:r,traceSample:s},l.__workletHash=9285017616255,l.__initData=t,l})({_worklet_9285017616255_init_data:X,pinchStartScale:Q,committedScale:K,pinchFocalX:tt,pinchFocalY:et,traceBegin:it,traceSample:_t}),B[55]=K,B[56]=tt,B[57]=et,B[58]=Q,B[59]=it,B[60]=_t,B[61]=t):t=B[61],B[62]!==R||B[63]!==L||B[64]!==$||B[65]!==tt||B[66]!==et||B[67]!==Q||B[68]!==j||B[69]!==q||B[70]!==z||B[71]!==_t||B[72]!==G||B[73]!==U||B[74]!==V?(n=(function({_worklet_3328464358507_init_data:t,viewportWidth:e,pinchStartScale:o,MIN_SCALE:n,MAX_SCALE:c,heightFor:r,MIN_VIEWPORT:s,scale:l,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,tx:T,ty:M,traceSample:y}){const E=function(t){if(t.numberOfPointers<2)return;const E=e,P=o.value,A=Math.max(n,Math.min(c,P*t.scale)),Z=r(P),O=r(A);if(E<s||O<s)return;l.set(A);const X=u({focalNow:t.focalX,focalStart:_.value,center:E/2,panStart:h.value,scaleStart:P*Z,scaleAfter:A*O}),Y=u({focalNow:t.focalY,focalStart:p.value,center:Z/2,centerAfter:O/2,panStart:v.value,scaleStart:P*Z,scaleAfter:A*O}),{x:k,y:F}=f(E,O,S,A,x),b=w({tx:X,ty:Y,w:E,h:O,aspect:S,scale:A,fit:x});T.set(b.x),M.set(b.y),y("update",{pointers:t.numberOfPointers,focalX:t.focalX,focalY:t.focalY,rawX:X,rawY:Y,limX:k,limY:F})};return E.__closure={viewportWidth:e,pinchStartScale:o,MIN_SCALE:n,MAX_SCALE:c,heightFor:r,MIN_VIEWPORT:s,scale:l,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,tx:T,ty:M,traceSample:y},E.__workletHash=3328464358507,E.__initData=t,E})({_worklet_3328464358507_init_data:Y,viewportWidth:V,pinchStartScale:Q,MIN_SCALE:p,MAX_SCALE:v,heightFor:$,MIN_VIEWPORT:f,scale:z,focalPan:o.focalPan,pinchFocalX:tt,savedTx:j,pinchFocalY:et,savedTy:q,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,clampPan:e.clampPan,tx:G,ty:U,traceSample:_t}),B[62]=R,B[63]=L,B[64]=$,B[65]=tt,B[66]=et,B[67]=Q,B[68]=j,B[69]=q,B[70]=z,B[71]=_t,B[72]=G,B[73]=U,B[74]=V,B[75]=n):n=B[75],B[76]!==K||B[77]!==R||B[78]!==L||B[79]!==$||B[80]!==wt||B[81]!==j||B[82]!==q||B[83]!==z.value||B[84]!==mt||B[85]!==_t||B[86]!==G.value||B[87]!==U.value||B[88]!==V?(c=(function({_worklet_4867885748892_init_data:t,scale:e,heightFor:o,committedScale:n,savedTx:c,tx:r,savedTy:s,ty:l,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.set(t),c.set(r.value),s.set(l.value);const M=u,y=o(t),{x:E,y:P}=_(M,y,h,t,p);v("end",{rawX:r.value,rawY:l.value,limX:E,limY:P,note:T===y?void 0:`box ${Math.round(T)}\u2192${Math.round(y)}`}),f.set(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(E),panExtentY:Math.round(P),tx:Math.round(r.value),ty:Math.round(l.value)})};return T.__closure={scale:e,heightFor:o,committedScale:n,savedTx:c,tx:r,savedTy:s,ty:l,viewportWidth:u,streamPanExtent:_,contentAspect:h,fit:p,traceSample:v,lastPinchEndMs:f,traceRelease:S,runOnJS:x,reportZoom:w},T.__workletHash=4867885748892,T.__initData=t,T})({_worklet_4867885748892_init_data:k,scale:z,heightFor:$,committedScale:K,savedTx:j,tx:G,savedTy:q,ty:U,viewportWidth:V,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,traceSample:_t,lastPinchEndMs:wt,traceRelease:mt,runOnJS:h.runOnJS,reportZoom:x}),B[76]=K,B[77]=R,B[78]=L,B[79]=$,B[80]=wt,B[81]=j,B[82]=q,B[83]=z.value,B[84]=mt,B[85]=_t,B[86]=G.value,B[87]=U.value,B[88]=V,B[89]=c):c=B[89],Tt=_.Gesture.Pinch().onStart((0,u.guardWorklet)("zoom.pinch.start",t)).onUpdate((0,u.guardWorklet)("zoom.pinch.update",n)).onEnd((0,u.guardWorklet)("zoom.pinch.end",c)),B[37]=K,B[38]=R,B[39]=L,B[40]=$,B[41]=wt,B[42]=tt,B[43]=et,B[44]=Q,B[45]=j,B[46]=q,B[47]=z,B[48]=it,B[49]=mt,B[50]=_t,B[51]=G,B[52]=U,B[53]=V,B[54]=Tt}else Tt=B[54];const Mt=Tt;let yt;if(B[90]!==R||B[91]!==L||B[92]!==$||B[93]!==j||B[94]!==q||B[95]!==z.value||B[96]!==it||B[97]!==mt||B[98]!==_t||B[99]!==G||B[100]!==U||B[101]!==V){let t,o,n;B[103]!==z.value||B[104]!==it||B[105]!==_t?(t=(function({_worklet_16421660376853_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=0xeef773bbf15,r.__initData=t,r})({_worklet_16421660376853_init_data:F,scale:z,MIN_SCALE:p,traceBegin:it,traceSample:_t}),B[103]=z.value,B[104]=it,B[105]=_t,B[106]=t):t=B[106],B[107]!==R||B[108]!==L||B[109]!==$||B[110]!==j||B[111]!==q||B[112]!==z.value||B[113]!==_t||B[114]!==G||B[115]!==U||B[116]!==V?(o=(function({_worklet_15029703260994_init_data:t,scale:e,MIN_SCALE:o,viewportWidth:n,heightFor:c,streamPanExtent:r,contentAspect:s,fit:l,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,s,x,l),y=u.value+t.translationX,E=_.value+t.translationY,P=h({tx:y,ty:E,w:S,h:w,aspect:s,scale:x,fit:l});p.set(P.x),v.set(P.y),f("update",{pointers:1,rawX:y,rawY:E,limX:T,limY:M})};return S.__closure={scale:e,MIN_SCALE:o,viewportWidth:n,heightFor:c,streamPanExtent:r,contentAspect:s,fit:l,savedTx:u,savedTy:_,clampPan:h,tx:p,ty:v,traceSample:f},S.__workletHash=0xdab601fbb42,S.__initData=t,S})({_worklet_15029703260994_init_data:b,scale:z,MIN_SCALE:p,viewportWidth:V,heightFor:$,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,savedTx:j,savedTy:q,clampPan:e.clampPan,tx:G,ty:U,traceSample:_t}),B[107]=R,B[108]=L,B[109]=$,B[110]=j,B[111]=q,B[112]=z.value,B[113]=_t,B[114]=G,B[115]=U,B[116]=V,B[117]=o):o=B[117],B[118]!==R||B[119]!==L||B[120]!==$||B[121]!==j||B[122]!==q||B[123]!==z.value||B[124]!==mt||B[125]!==_t||B[126]!==G.value||B[127]!==U.value||B[128]!==V?(n=(function({_worklet_5550474970474_init_data:t,savedTx:e,tx:o,savedTy:n,ty:c,viewportWidth:r,heightFor:s,scale:l,streamPanExtent:u,contentAspect:_,fit:h,traceSample:p,traceRelease:v,runOnJS:f,reportZoom:S}){const x=function(){e.set(o.value),n.set(c.value);const t=r,x=s(l.value),{x:w,y:T}=u(t,x,_,l.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*l.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:s,scale:l,streamPanExtent:u,contentAspect:_,fit:h,traceSample:p,traceRelease:v,runOnJS:f,reportZoom:S},x.__workletHash=5550474970474,x.__initData=t,x})({_worklet_5550474970474_init_data:W,savedTx:j,tx:G,savedTy:q,ty:U,viewportWidth:V,heightFor:$,scale:z,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,traceSample:_t,traceRelease:mt,runOnJS:h.runOnJS,reportZoom:x}),B[118]=R,B[119]=L,B[120]=$,B[121]=j,B[122]=q,B[123]=z.value,B[124]=mt,B[125]=_t,B[126]=G.value,B[127]=U.value,B[128]=V,B[129]=n):n=B[129],yt=_.Gesture.Pan().maxPointers(1).minDistance(4).onStart((0,u.guardWorklet)("zoom.pan.start",t)).onUpdate((0,u.guardWorklet)("zoom.pan.update",o)).onEnd((0,u.guardWorklet)("zoom.pan.end",n)),B[90]=R,B[91]=L,B[92]=$,B[93]=j,B[94]=q,B[95]=z.value,B[96]=it,B[97]=mt,B[98]=_t,B[99]=G,B[100]=U,B[101]=V,B[102]=yt}else yt=B[102];const gt=yt,Et=(0,h.useAnimatedStyle)((function({_worklet_4116608177168_init_data:t,scale:e,foldGrowth:o,tx:n,ty:c,heightFor:r,ZOOM_MIN:s}){const l=function(){const t=e.value,l=o({scale:t,tx:n.value,ty:c.value,boxHeight:r(t),restHeight:r(s)});return{transform:[{translateX:l.tx},{translateY:l.ty},{scale:l.scale}]}};return l.__closure={scale:e,foldGrowth:o,tx:n,ty:c,heightFor:r,ZOOM_MIN:s},l.__workletHash=4116608177168,l.__initData=t,l})({_worklet_4116608177168_init_data:I,scale:z,foldGrowth:c.foldGrowth,tx:G,ty:U,heightFor:$,ZOOM_MIN:o.ZOOM_MIN}));let Pt;B[130]!==K||B[131]!==R||B[132]!==L||B[133]!==$||B[134]!==wt||B[135]!==xt||B[136]!==j||B[137]!==q||B[138]!==z||B[139]!==it||B[140]!==mt||B[141]!==_t||B[142]!==G||B[143]!==U||B[144]!==V?(Pt=(function({_worklet_14144076631279_init_data:t,tapStepAccepted:e,lastPinchEndMs:o,scale:n,viewportWidth:c,heightFor:r,doubleTapTarget:s,MIN_SCALE:l,MAX_SCALE:u,coverScale:_,contentAspect:h,fit:p,ZOOM_STEPS:v,MIN_VIEWPORT:f,traceBegin:S,traceSample:x,f2:w,traceRelease:T,resetZoom:M,focalPan:y,tx:E,ty:P,streamPanExtent:A,clampPan:Z,withTiming:O,committedScale:X,savedTx:Y,savedTy:k}){const F=function(t,F){if(!e({nowMs:Date.now(),lastPinchEndMs:o.value}))return;const b=n.value,W=c,I=r(b),N=s({current:b,minScale:l,maxScale:u,cover:_({viewportWidth:W,viewportHeight:I,contentAspect:h,fit:p}),fallbackStep:v[0]??2});if("fit"===N.kind||W<f||I<f)return S("double-tap"),x("step",{focalX:t,focalY:F,note:`${w(b)}\u2192fit`}),T(),void M();const B=N.scale,C=r(B),L=y({focalNow:t,focalStart:t,center:W/2,panStart:E.value,scaleStart:b*I,scaleAfter:B*C}),H=y({focalNow:F,focalStart:F,center:I/2,centerAfter:C/2,panStart:P.value,scaleStart:b*I,scaleAfter:B*C}),{x:J,y:R}=A(W,C,h,B,p),{x:D,y:V}=Z({tx:L,ty:H,w:W,h:C,aspect:h,scale:B,fit:p});n.set(O(B)),X.set(B),E.set(O(D)),Y.set(D),P.set(O(V)),k.set(V),S("double-tap"),x("step",{focalX:t,focalY:F,rawX:L,rawY:H,x:D,y:V,limX:J,limY:R,boxH:C,note:I===C?`${w(b)}\u2192${w(B)}`:`${w(b)}\u2192${w(B)} box ${Math.round(I)}\u2192${Math.round(C)}`}),T()};return F.__closure={tapStepAccepted:e,lastPinchEndMs:o,scale:n,viewportWidth:c,heightFor:r,doubleTapTarget:s,MIN_SCALE:l,MAX_SCALE:u,coverScale:_,contentAspect:h,fit:p,ZOOM_STEPS:v,MIN_VIEWPORT:f,traceBegin:S,traceSample:x,f2:w,traceRelease:T,resetZoom:M,focalPan:y,tx:E,ty:P,streamPanExtent:A,clampPan:Z,withTiming:O,committedScale:X,savedTx:Y,savedTy:k},F.__workletHash=0xcdd2ca9ccef,F.__initData=t,F})({_worklet_14144076631279_init_data:N,tapStepAccepted:r.tapStepAccepted,lastPinchEndMs:wt,scale:z,viewportWidth:V,heightFor:$,doubleTapTarget:n.doubleTapTarget,MIN_SCALE:p,MAX_SCALE:v,coverScale:n.coverScale,contentAspect:R,fit:L,ZOOM_STEPS:o.ZOOM_STEPS,MIN_VIEWPORT:f,traceBegin:it,traceSample:_t,f2:M,traceRelease:mt,resetZoom:xt,focalPan:o.focalPan,tx:G,ty:U,streamPanExtent:e.streamPanExtent,clampPan:e.clampPan,withTiming:h.withTiming,committedScale:K,savedTx:j,savedTy:q}),B[130]=K,B[131]=R,B[132]=L,B[133]=$,B[134]=wt,B[135]=xt,B[136]=j,B[137]=q,B[138]=z,B[139]=it,B[140]=mt,B[141]=_t,B[142]=G,B[143]=U,B[144]=V,B[145]=Pt):Pt=B[145];const At=Pt;let Zt;B[146]!==gt||B[147]!==Mt?(Zt=(...t)=>{const e=t;return _.Gesture.Simultaneous(Mt,gt,...e)},B[146]=gt,B[147]=Mt,B[148]=Zt):Zt=B[148];const Ot=Zt;let Xt;B[149]!==K||B[150]!==Ot||B[151]!==At||B[152]!==xt||B[153]!==z||B[154]!==ft||B[155]!==pt||B[156]!==Et?(Xt={scale:z,committedScale:K,videoStyle:Et,resetZoom:xt,doubleTapZoomAt:At,snapZoom:ft,composeWith:Ot,traceBox:pt},B[149]=K,B[150]=Ot,B[151]=At,B[152]=xt,B[153]=z,B[154]=ft,B[155]=pt,B[156]=Et,B[157]=Xt):Xt=B[157];return Xt};var t=_r(d[0]);_r(d[1]);var e=_r(d[2]),o=_r(d[3]),n=_r(d[4]),c=_r(d[5]),r=_r(d[6]),s=_r(d[7]),l=_r(d[8]),u=_r(d[9]),_=_r(d[10]),h=_r(d[11]);const p=o.ZOOM_MIN,v=o.ZOOM_MAX,f=10,S=1.7777777777777777;function x(t,e){l.log.debug('live:zoom',`zoom ${t} end`,e)}const w=600;function T(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,s.formatZoomTrace)(e)}`)}const M=(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);}"}}),y={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);}}"},E={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.set(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});}"},A={code:"function useStreamZoomTs5(){const{trace,runOnJS,armTraceFlush}=this.__closure;if(!trace){return;}runOnJS(armTraceFlush)();}"},Z={code:"function useStreamZoomTs6(drawnHeight){const{traceSample}=this.__closure;traceSample(\"box\",{drawnH:drawnHeight});}"},O={code:"function useStreamZoomTs7(){const{scale,withTiming,committedScale,tx,ty,savedTx,savedTy}=this.__closure;scale.set(withTiming(1));committedScale.set(1);tx.set(withTiming(0));ty.set(withTiming(0));savedTx.set(0);savedTy.set(0);}"},X={code:"function useStreamZoomTs8(e){const{pinchStartScale,committedScale,pinchFocalX,pinchFocalY,traceBegin,traceSample}=this.__closure;pinchStartScale.set(committedScale.value);pinchFocalX.set(e.focalX);pinchFocalY.set(e.focalY);traceBegin(\"pinch\");traceSample(\"start\",{focalX:e.focalX,focalY:e.focalY,pointers:e.numberOfPointers});}"},Y={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.set(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.set(clamped.x);ty.set(clamped.y);traceSample(\"update\",{pointers:e_0.numberOfPointers,focalX:e_0.focalX,focalY:e_0.focalY,rawX:ptx,rawY:pty,limX:limX,limY:limY});}"},k={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.set(s);savedTx.set(tx.value);savedTy.set(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.set(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\",{});}"},b={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.set(clamped_0.x);ty.set(clamped_0.y);traceSample(\"update\",{pointers:1,rawX:rawX,rawY:rawY,limX:limX_1,limY:limY_1});}"},W={code:"function useStreamZoomTs13(){const{savedTx,tx,savedTy,ty,viewportWidth,heightFor,scale,streamPanExtent,contentAspect,fit,traceSample,traceRelease,runOnJS,reportZoom}=this.__closure;savedTx.set(tx.value);savedTy.set(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});}"},I={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}]};}"},N={code:"function useStreamZoomTs15(x,y){const{tapStepAccepted,lastPinchEndMs,scale,viewportWidth,heightFor,doubleTapTarget,MIN_SCALE,MAX_SCALE,coverScale,contentAspect,fit,ZOOM_STEPS,MIN_VIEWPORT,traceBegin,traceSample,f2,traceRelease,resetZoom,focalPan,tx,ty,streamPanExtent,clampPan,withTiming,committedScale,savedTx,savedTy}=this.__closure;var _ZOOM_STEPS$;if(!tapStepAccepted({nowMs:Date.now(),lastPinchEndMs:lastPinchEndMs.value})){return;}const s0_0=scale.value;const w_3=viewportWidth;const h0_0=heightFor(s0_0);const target=doubleTapTarget({current:s0_0,minScale:MIN_SCALE,maxScale:MAX_SCALE,cover:coverScale({viewportWidth:w_3,viewportHeight:h0_0,contentAspect:contentAspect,fit:fit}),fallbackStep:(_ZOOM_STEPS$=ZOOM_STEPS[0])!==null&&_ZOOM_STEPS$!==void 0?_ZOOM_STEPS$:2});if(target.kind===\"fit\"||w_3<MIN_VIEWPORT||h0_0<MIN_VIEWPORT){traceBegin(\"double-tap\");traceSample(\"step\",{focalX:x,focalY:y,note:f2(s0_0)+\"\\u2192fit\"});traceRelease();resetZoom();return;}const s1_0=target.scale;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.set(withTiming(s1_0));committedScale.set(s1_0);tx.set(withTiming(nx));savedTx.set(nx);ty.set(withTiming(ny));savedTy.set(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();}"}},1176,[788,16,1177,1257,1178,1179,1180,1181,1000,1258,1216,1130]);
|
|
23
|
-
__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})},1177,[]);
|
|
24
|
-
__d(function(g,r,i,
|
|
25
|
-
__d(function(g,r,i,
|
|
26
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
27
|
-
__d(function(g,
|
|
28
|
-
__d(function(g,r,
|
|
29
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e
|
|
30
|
-
__d(function(g,
|
|
31
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
32
|
-
__d(function(g,r,
|
|
33
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
34
|
-
__d(function(g,r,i,a,m,
|
|
35
|
-
__d(function(g,r,
|
|
36
|
-
__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,"
|
|
37
|
-
__d(function(g,r,i,a,m,
|
|
38
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
39
|
-
__d(function(g,r,_i,a,m,
|
|
40
|
-
__d(function(g,r,i,a,m,
|
|
41
|
-
__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}),
|
|
42
|
-
__d(function(g,r,i,a,m,
|
|
43
|
-
__d(function(g,r,
|
|
44
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
45
|
-
__d(function(g,r,i,a,m,
|
|
46
|
-
__d(function(g,r,i,a,m,
|
|
47
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
48
|
-
__d(function(g,r,i,a,m,
|
|
49
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
50
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
51
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.
|
|
52
|
-
__d(function(g,r,i,a,m,
|
|
53
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"
|
|
54
|
-
__d(function(g,r,i,
|
|
55
|
-
__d(function(g,r,i,a,m,
|
|
56
|
-
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),
|
|
57
|
-
__d(function(g,
|
|
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 s}}),Object.defineProperty(e,"ZOOM_IDLE_SCALE",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"swipeRefusal",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"shouldGoBackOnSwipe",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"shouldOpenOverlayOnSwipe",{enumerable:!0,get:function(){return w}});const n=1,t=2,_=80,s=400,o=1.02,u=(function({_worklet_7215403088850_init_data:n,ZOOM_IDLE_SCALE:t,SWIPE_DISTANCE:_,SWIPE_VELOCITY:s}){const o=function(n){return!(n.zoomScale>t)&&(n.translationY>_&&n.velocityY>s)};return o.__closure={ZOOM_IDLE_SCALE:t,SWIPE_DISTANCE:_,SWIPE_VELOCITY:s},o.__workletHash=7215403088850,o.__initData=n,o})({_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:o,SWIPE_DISTANCE:_,SWIPE_VELOCITY:s}),l=(function({_worklet_14976746569804_init_data:n,isDownwardFling:t,BACK_SWIPE_POINTERS:_}){const s=function(n,s){return t(n)?n.pinchSeen?'pinch-seen':'back'===s&&n.maxTouches>_?'multi-touch':null:null};return s.__closure={isDownwardFling:t,BACK_SWIPE_POINTERS:_},s.__workletHash=0xd9f0ba8c04c,s.__initData=n,s})({_worklet_14976746569804_init_data:{code:"function swipeRefusal_streamSwipesTs2(args,kind){const{isDownwardFling,BACK_SWIPE_POINTERS}=this.__closure;if(!isDownwardFling(args))return null;if(args.pinchSeen)return'pinch-seen';if(kind==='back'&&args.maxTouches>BACK_SWIPE_POINTERS)return'multi-touch';return null;}"},isDownwardFling:u,BACK_SWIPE_POINTERS:n}),c=(function({_worklet_1459010039722_init_data:n,isDownwardFling:t,swipeRefusal:_}){const s=function(n){return t(n)&&null===_(n,'back')};return s.__closure={isDownwardFling:t,swipeRefusal:_},s.__workletHash=1459010039722,s.__initData=n,s})({_worklet_1459010039722_init_data:{code:"function shouldGoBackOnSwipe_streamSwipesTs3(args){const{isDownwardFling,swipeRefusal}=this.__closure;return isDownwardFling(args)&&swipeRefusal(args,'back')===null;}"},isDownwardFling:u,swipeRefusal:l}),w=(function({_worklet_1164172830097_init_data:n,isDownwardFling:t,swipeRefusal:_}){const s=function(n){return t(n)&&null===_(n,'overlay')};return s.__closure={isDownwardFling:t,swipeRefusal:_},s.__workletHash=1164172830097,s.__initData=n,s})({_worklet_1164172830097_init_data:{code:"function shouldOpenOverlayOnSwipe_streamSwipesTs4(args){const{isDownwardFling,swipeRefusal}=this.__closure;return isDownwardFling(args)&&swipeRefusal(args,'overlay')===null;}"},isDownwardFling:u,swipeRefusal:l})},1173,[]);
|
|
20
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"VIEWPORT_CHANGE_MIN_PT",{enumerable:!0,get:function(){return t}}),e.classifyViewportChange=function(n,o){const h=Math.round(n.width),u=Math.round(n.height),s=Math.round(o.width),c=Math.round(o.height);return h>u!=s>c?'orientation':Math.max(Math.abs(s-h),Math.abs(c-u))>=t?'resize':'none'};const t=64},1174,[]);
|
|
21
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldReassertRecordedOnReconnect=function(l){return null===l.clipHoldingFrame&&('live'!==l.playbackMode&&null!==l.playheadEpoch)},e.resolveRecordedProfileForReconnect=function(o,t){return null!==t&&t.length>0?t:(0,l.resolvePlaybackEntryProfile)(n(o),'low')};var l=r(d[0]);function n(l){return'profile'===l.kind&&void 0!==l.profile?{kind:'profile',profile:l.profile}:{kind:'adaptive'}}},1175,[1176]);
|
|
22
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DOWNLINK_HIGH_MBPS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DOWNLINK_MID_MBPS",{enumerable:!0,get:function(){return t}}),e.suggestedPlaybackTier=o,e.resolvePlaybackEntryProfile=function(n,t){return'profile'===n.kind?n.profile:'low'},e.resolvePlaybackUpgradeProfile=function(n,t){return'profile'===n.kind?n.profile:o(t)};const n=8,t=2.5;function o(o){return o>=n?'high':o>=t?'mid':'low'}},1176,[]);
|
|
23
|
+
__d(function(g,_r,i,a,m,_e2,d){"use strict";Object.defineProperty(_e2,'__esModule',{value:!0}),_e2.useStreamZoom=function(G){const j=(0,t.c)(268),{contentAspect:Q,fit:tt,viewport:et,trace:at}=G,nt=void 0===Q?w:Q,ot=void 0!==at&&at,{width:ct,heightFor:st}=et,rt=(0,S.useSharedValue)(1),lt=(0,S.useSharedValue)(1),it=(0,S.useSharedValue)(0),ut=(0,S.useSharedValue)(0),_t=(0,S.useSharedValue)(0),ht=(0,S.useSharedValue)(0),dt=(0,S.useSharedValue)(1),mt=(0,S.useSharedValue)(0),pt=(0,S.useSharedValue)(0),vt=(0,S.useSharedValue)(!1),St=(0,S.useSharedValue)(!1),ft=(0,S.useSharedValue)(u.EMPTY_TOUCH_SEQUENCE),Tt=(0,S.useSharedValue)(0);let xt;j[0]!==ot?(xt=(function({_worklet_6438544249440_init_data:t,trace:e,runOnJS:n,reportZoomEvent:o}){const c=function(t,c){e&&n(o)(t,c)};return c.__closure={trace:e,runOnJS:n,reportZoomEvent:o},c.__workletHash=6438544249440,c.__initData=t,c})({_worklet_6438544249440_init_data:k,trace:ot,runOnJS:S.runOnJS,reportZoomEvent:P}),j[0]=ot,j[1]=xt):xt=j[1];const wt=xt;let Et;j[2]!==lt||j[3]!==rt.value||j[4]!==it.value||j[5]!==ut.value?(Et=(function({_worklet_11512102931050_init_data:t,scale:e,committedScale:n,tx:o,ty:c}){const s=function(t){return{scale:Math.round(100*e.value)/100,committed:Math.round(100*n.value)/100,tx:Math.round(o.value),ty:Math.round(c.value),...t}};return s.__closure={scale:e,committedScale:n,tx:o,ty:c},s.__workletHash=0xa785ece4a6a,s.__initData=t,s})({_worklet_11512102931050_init_data:Z,scale:rt,committedScale:lt,tx:it,ty:ut}),j[2]=lt,j[3]=rt.value,j[4]=it.value,j[5]=ut.value,j[6]=Et):Et=j[6];const Mt=Et,At=(0,S.useSharedValue)((0,_.newZoomTraceBuffer)()),yt=(0,S.useSharedValue)("");let gt;j[7]!==At||j[8]!==yt?(gt=()=>{(0,S.runOnUI)((function({_worklet_12080779151314_init_data:t,takeZoomTrace:e,traceBuf:n,traceKind:o,runOnJS:c,reportZoomTrace:s}){const r=function(){const t=e(n.value),r=o.value;t.length>0&&c(s)(r,t)};return r.__closure={takeZoomTrace:e,traceBuf:n,traceKind:o,runOnJS:c,reportZoomTrace:s},r.__workletHash=0xafcc68cc7d2,r.__initData=t,r})({_worklet_12080779151314_init_data:b,takeZoomTrace:_.takeZoomTrace,traceBuf:At,traceKind:yt,runOnJS:S.runOnJS,reportZoomTrace:A}))()},j[7]=At,j[8]=yt,j[9]=gt):gt=j[9];const Pt=gt;let Ot;j[10]!==Pt?(Ot=()=>{setTimeout(Pt,M)},j[10]=Pt,j[11]=Ot):Ot=j[11];const kt=Ot;let Zt;j[12]!==ot||j[13]!==At||j[14]!==yt?(Zt=(function({_worklet_11449076230099_init_data:t,trace:e,takeZoomTrace:n,traceBuf:o,runOnJS:c,reportZoomTrace:s,traceKind:r,beginZoomTrace:l}){const u=function(t){if(!e)return;const u=n(o.value);u.length>0&&c(s)(r.value,u),r.set(t),l(o.value,Date.now())};return u.__closure={trace:e,takeZoomTrace:n,traceBuf:o,runOnJS:c,reportZoomTrace:s,traceKind:r,beginZoomTrace:l},u.__workletHash=0xa69b21f27d3,u.__initData=t,u})({_worklet_11449076230099_init_data:X,trace:ot,takeZoomTrace:_.takeZoomTrace,traceBuf:At,runOnJS:S.runOnJS,reportZoomTrace:A,traceKind:yt,beginZoomTrace:_.beginZoomTrace}),j[12]=ot,j[13]=At,j[14]=yt,j[15]=Zt):Zt=j[15];const bt=Zt;let Xt;j[16]!==lt||j[17]!==st||j[18]!==rt.value||j[19]!==ot||j[20]!==At||j[21]!==it.value||j[22]!==ut.value||j[23]!==ct?(Xt=(function({_worklet_13413815807042_init_data:t,trace:e,traceBuf:n,pushZoomSample:o,zoomTraceElapsed:c,scale:s,committedScale:r,tx:l,ty:u,viewportWidth:_,heightFor:h}){const p=function(t,p){if(!e)return;const v=n.value;0!==v.startedAt&&o(v,{t:c(v,Date.now()),phase:t,live:s.value,committed:r.value,x:l.value,y:u.value,boxW:_,boxH:h(s.value),...p})};return p.__closure={trace:e,traceBuf:n,pushZoomSample:o,zoomTraceElapsed:c,scale:s,committedScale:r,tx:l,ty:u,viewportWidth:_,heightFor:h},p.__workletHash=0xc3325b9ec42,p.__initData=t,p})({_worklet_13413815807042_init_data:L,trace:ot,traceBuf:At,pushZoomSample:_.pushZoomSample,zoomTraceElapsed:_.zoomTraceElapsed,scale:rt,committedScale:lt,tx:it,ty:ut,viewportWidth:ct,heightFor:st}),j[16]=lt,j[17]=st,j[18]=rt.value,j[19]=ot,j[20]=At,j[21]=it.value,j[22]=ut.value,j[23]=ct,j[24]=Xt):Xt=j[24];const Lt=Xt;let Nt;j[25]!==kt||j[26]!==ot?(Nt=(function({_worklet_16358458696741_init_data:t,trace:e,runOnJS:n,armTraceFlush:o}){const c=function(){e&&n(o)()};return c.__closure={trace:e,runOnJS:n,armTraceFlush:o},c.__workletHash=0xee0c01ea425,c.__initData=t,c})({_worklet_16358458696741_init_data:N,trace:ot,runOnJS:S.runOnJS,armTraceFlush:kt}),j[25]=kt,j[26]=ot,j[27]=Nt):Nt=j[27];const It=Nt;let Ft;j[28]!==Lt?(Ft=(function({_worklet_374061100624_init_data:t,traceSample:e}){const n=function(t){e("box",{drawnH:t})};return n.__closure={traceSample:e},n.__workletHash=374061100624,n.__initData=t,n})({_worklet_374061100624_init_data:I,traceSample:Lt}),j[28]=Lt,j[29]=Ft):Ft=j[29];const Yt=Ft;let Wt;j[30]!==lt||j[31]!==_t||j[32]!==ht||j[33]!==rt||j[34]!==Mt||j[35]!==ot||j[36]!==it||j[37]!==ut?(Wt=t=>{const e=void 0===t?"snap":t;ot&&h.log.debug("live:zoom","zoom snap",Mt({reason:e})),rt.set(1),lt.set(1),it.set(0),ut.set(0),_t.set(0),ht.set(0)},j[30]=lt,j[31]=_t,j[32]=ht,j[33]=rt,j[34]=Mt,j[35]=ot,j[36]=it,j[37]=ut,j[38]=Wt):Wt=j[38];const Dt=Wt;let Ct;j[39]!==nt||j[40]!==tt||j[41]!==st||j[42]!==_t||j[43]!==ht||j[44]!==rt.value||j[45]!==Mt||j[46]!==wt||j[47]!==it||j[48]!==ut||j[49]!==ct?(Ct=()=>{(0,S.runOnUI)((function({_worklet_9384776971579_init_data:t,scale:e,MIN_SCALE:n,heightFor:o,viewportWidth:c,MIN_VIEWPORT:s,clampPan:r,tx:l,ty:u,contentAspect:_,fit:h,savedTx:p,savedTy:v,traceEvent:S,snapshot:f}){const T=function(){const t=e.value;if(t<=n)return;const T=o(t);if(c<s||T<s)return;const x=r({tx:l.value,ty:u.value,w:c,h:T,aspect:_,scale:t,fit:h});l.set(x.x),u.set(x.y),p.set(x.x),v.set(x.y),S("zoom reclamp",f({boxH:Math.round(T)}))};return T.__closure={scale:e,MIN_SCALE:n,heightFor:o,viewportWidth:c,MIN_VIEWPORT:s,clampPan:r,tx:l,ty:u,contentAspect:_,fit:h,savedTx:p,savedTy:v,traceEvent:S,snapshot:f},T.__workletHash=9384776971579,T.__initData=t,T})({_worklet_9384776971579_init_data:F,scale:rt,MIN_SCALE:f,heightFor:st,viewportWidth:ct,MIN_VIEWPORT:x,clampPan:n.clampPan,tx:it,ty:ut,contentAspect:nt,fit:tt,savedTx:_t,savedTy:ht,traceEvent:wt,snapshot:Mt}))()},j[39]=nt,j[40]=tt,j[41]=st,j[42]=_t,j[43]=ht,j[44]=rt.value,j[45]=Mt,j[46]=wt,j[47]=it,j[48]=ut,j[49]=ct,j[50]=Ct):Ct=j[50];const Rt=Ct;let Ht;j[51]!==lt||j[52]!==_t||j[53]!==ht||j[54]!==rt||j[55]!==Mt||j[56]!==wt||j[57]!==it||j[58]!==ut?(Ht=(function({_worklet_10837518383193_init_data:t,traceEvent:e,snapshot:n,scale:o,withTiming:c,committedScale:s,tx:r,ty:l,savedTx:u,savedTy:_}){const h=function(t){e("zoom reset",n({reason:void 0===t?"reset":t})),o.set(c(1)),s.set(1),r.set(c(0)),l.set(c(0)),u.set(0),_.set(0)};return h.__closure={traceEvent:e,snapshot:n,scale:o,withTiming:c,committedScale:s,tx:r,ty:l,savedTx:u,savedTy:_},h.__workletHash=0x9db4e6ef859,h.__initData=t,h})({_worklet_10837518383193_init_data:Y,traceEvent:wt,snapshot:Mt,scale:rt,withTiming:S.withTiming,committedScale:lt,tx:it,ty:ut,savedTx:_t,savedTy:ht}),j[51]=lt,j[52]=_t,j[53]=ht,j[54]=rt,j[55]=Mt,j[56]=wt,j[57]=it,j[58]=ut,j[59]=Ht):Ht=j[59];const zt=Ht,Ut=(0,S.useSharedValue)(0);let qt;j[60]!==ft?(qt=v.Gesture.Manual().onTouchesDown((0,p.guardWorklet)("zoom.touch.down",(function({_worklet_9331338947983_init_data:t,touchSequence:e,touchDown:n}){const o=function(t){e.set(n(e.value,t.numberOfTouches,Date.now()))};return o.__closure={touchSequence:e,touchDown:n},o.__workletHash=9331338947983,o.__initData=t,o})({_worklet_9331338947983_init_data:W,touchSequence:ft,touchDown:u.touchDown}))).onTouchesUp((0,p.guardWorklet)("zoom.touch.up",(function({_worklet_7797285998871_init_data:t,touchSequence:e,touchUp:n}){const o=function(){e.set(n(e.value,Date.now()))};return o.__closure={touchSequence:e,touchUp:n},o.__workletHash=7797285998871,o.__initData=t,o})({_worklet_7797285998871_init_data:D,touchSequence:ft,touchUp:u.touchUp}))).onTouchesCancelled((0,p.guardWorklet)("zoom.touch.cancelled",(function({_worklet_13096920251382_init_data:t,touchSequence:e,touchUp:n}){const o=function(){e.set(n(e.value,Date.now()))};return o.__closure={touchSequence:e,touchUp:n},o.__workletHash=0xbe95d477bf6,o.__initData=t,o})({_worklet_13096920251382_init_data:C,touchSequence:ft,touchUp:u.touchUp}))),j[60]=ft,j[61]=qt):qt=j[61];const Bt=qt;let Jt;if(j[62]!==lt||j[63]!==nt||j[64]!==tt||j[65]!==st||j[66]!==Ut||j[67]!==Tt||j[68]!==vt||j[69]!==mt||j[70]!==pt||j[71]!==dt||j[72]!==_t||j[73]!==ht||j[74]!==rt||j[75]!==Mt||j[76]!==ft||j[77]!==ot||j[78]!==bt||j[79]!==wt||j[80]!==It||j[81]!==Lt||j[82]!==it||j[83]!==ut||j[84]!==ct){let t,e,c,s;j[86]!==lt||j[87]!==Tt||j[88]!==vt||j[89]!==mt||j[90]!==pt||j[91]!==dt||j[92]!==_t||j[93]!==ht||j[94]!==rt||j[95]!==Mt||j[96]!==ft||j[97]!==bt||j[98]!==wt||j[99]!==Lt||j[100]!==it||j[101]!==ut?(t=(function({_worklet_3298094249419_init_data:t,cancelAnimation:e,scale:n,tx:o,ty:c,seedFromLive:s,MIN_SCALE:r,MAX_SCALE:l,pinchStartScale:u,committedScale:_,savedTx:h,savedTy:p,pinchFocalX:v,pinchFocalY:S,pinchActive:f,touchSequence:T,markPinch:x,lastUpdateLogMs:w,traceEvent:E,snapshot:M,traceBegin:A,traceSample:y}){const P=function(t){e(n),e(o),e(c);const P=s({scale:n.value,tx:o.value,ty:c.value},r,l);u.set(P.startScale),n.set(P.startScale),_.set(P.startScale),h.set(P.savedTx),p.set(P.savedTy),v.set(t.focalX),S.set(t.focalY),f.set(!0),T.set(x(T.value,Date.now())),w.set(0),E("zoom pinch start",M({pointers:t.numberOfPointers,startScale:P.startScale})),A("pinch"),y("start",{focalX:t.focalX,focalY:t.focalY,pointers:t.numberOfPointers})};return P.__closure={cancelAnimation:e,scale:n,tx:o,ty:c,seedFromLive:s,MIN_SCALE:r,MAX_SCALE:l,pinchStartScale:u,committedScale:_,savedTx:h,savedTy:p,pinchFocalX:v,pinchFocalY:S,pinchActive:f,touchSequence:T,markPinch:x,lastUpdateLogMs:w,traceEvent:E,snapshot:M,traceBegin:A,traceSample:y},P.__workletHash=3298094249419,P.__initData=t,P})({_worklet_3298094249419_init_data:R,cancelAnimation:S.cancelAnimation,scale:rt,tx:it,ty:ut,seedFromLive:l.seedFromLive,MIN_SCALE:f,MAX_SCALE:T,pinchStartScale:dt,committedScale:lt,savedTx:_t,savedTy:ht,pinchFocalX:mt,pinchFocalY:pt,pinchActive:vt,touchSequence:ft,markPinch:u.markPinch,lastUpdateLogMs:Tt,traceEvent:wt,snapshot:Mt,traceBegin:bt,traceSample:Lt}),j[86]=lt,j[87]=Tt,j[88]=vt,j[89]=mt,j[90]=pt,j[91]=dt,j[92]=_t,j[93]=ht,j[94]=rt,j[95]=Mt,j[96]=ft,j[97]=bt,j[98]=wt,j[99]=Lt,j[100]=it,j[101]=ut,j[102]=t):t=j[102],j[103]!==nt||j[104]!==tt||j[105]!==st||j[106]!==Tt||j[107]!==mt||j[108]!==pt||j[109]!==dt||j[110]!==_t||j[111]!==ht||j[112]!==rt||j[113]!==Mt||j[114]!==ot||j[115]!==wt||j[116]!==Lt||j[117]!==it||j[118]!==ut||j[119]!==ct?(e=(function({_worklet_13530468146197_init_data:t,viewportWidth:e,pinchStartScale:n,MIN_SCALE:o,MAX_SCALE:c,heightFor:s,MIN_VIEWPORT:r,scale:l,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:S,contentAspect:f,fit:T,clampPan:x,tx:w,ty:E,trace:M,lastUpdateLogMs:A,TRACE_UPDATE_THROTTLE_MS:y,traceEvent:P,snapshot:O,traceSample:k}){const Z=function(t){if(t.numberOfPointers<2)return;const Z=e,b=n.value,X=Math.max(o,Math.min(c,b*t.scale)),L=s(b),N=s(X);if(Z<r||N<r)return;l.set(X);const I=u({focalNow:t.focalX,focalStart:_.value,center:Z/2,panStart:h.value,scaleStart:b*L,scaleAfter:X*N}),F=u({focalNow:t.focalY,focalStart:p.value,center:L/2,centerAfter:N/2,panStart:v.value,scaleStart:b*L,scaleAfter:X*N}),{x:Y,y:W}=S(Z,N,f,X,T),D=x({tx:I,ty:F,w:Z,h:N,aspect:f,scale:X,fit:T});w.set(D.x),E.set(D.y);const C=Date.now();M&&C-A.value>=y&&(A.set(C),P("zoom pinch update",O({pointers:t.numberOfPointers,gestureScale:Math.round(100*t.scale)/100}))),k("update",{pointers:t.numberOfPointers,focalX:t.focalX,focalY:t.focalY,rawX:I,rawY:F,limX:Y,limY:W})};return Z.__closure={viewportWidth:e,pinchStartScale:n,MIN_SCALE:o,MAX_SCALE:c,heightFor:s,MIN_VIEWPORT:r,scale:l,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:S,contentAspect:f,fit:T,clampPan:x,tx:w,ty:E,trace:M,lastUpdateLogMs:A,TRACE_UPDATE_THROTTLE_MS:y,traceEvent:P,snapshot:O,traceSample:k},Z.__workletHash=0xc4e4ebf5c15,Z.__initData=t,Z})({_worklet_13530468146197_init_data:H,viewportWidth:ct,pinchStartScale:dt,MIN_SCALE:f,MAX_SCALE:T,heightFor:st,MIN_VIEWPORT:x,scale:rt,focalPan:o.focalPan,pinchFocalX:mt,savedTx:_t,pinchFocalY:pt,savedTy:ht,streamPanExtent:n.streamPanExtent,contentAspect:nt,fit:tt,clampPan:n.clampPan,tx:it,ty:ut,trace:ot,lastUpdateLogMs:Tt,TRACE_UPDATE_THROTTLE_MS:y,traceEvent:wt,snapshot:Mt,traceSample:Lt}),j[103]=nt,j[104]=tt,j[105]=st,j[106]=Tt,j[107]=mt,j[108]=pt,j[109]=dt,j[110]=_t,j[111]=ht,j[112]=rt,j[113]=Mt,j[114]=ot,j[115]=wt,j[116]=Lt,j[117]=it,j[118]=ut,j[119]=ct,j[120]=e):e=j[120],j[121]!==lt||j[122]!==nt||j[123]!==tt||j[124]!==st||j[125]!==Ut||j[126]!==vt||j[127]!==_t||j[128]!==ht||j[129]!==rt.value||j[130]!==Mt||j[131]!==wt||j[132]!==It||j[133]!==Lt||j[134]!==it.value||j[135]!==ut.value||j[136]!==ct?(c=(function({_worklet_3232971688836_init_data:t,scale:e,heightFor:n,committedScale:o,savedTx:c,tx:s,savedTy:r,ty:l,viewportWidth:u,streamPanExtent:_,contentAspect:h,fit:p,traceSample:v,lastPinchEndMs:S,pinchActive:f,traceEvent:T,snapshot:x,traceRelease:w,runOnJS:E,reportZoom:M}){const A=function(){const t=e.value,A=n(o.value);o.set(t),c.set(s.value),r.set(l.value);const y=u,P=n(t),{x:O,y:k}=_(y,P,h,t,p);v("end",{rawX:s.value,rawY:l.value,limX:O,limY:k,note:A===P?void 0:`box ${Math.round(A)}\u2192${Math.round(P)}`}),S.set(Date.now()),f.set(!1),T("zoom pinch end",x({pointers:0})),w(),E(M)("pinch",{viewportW:Math.round(y),viewportH:Math.round(P),viewportAspect:P>0?Math.round(y/P*100)/100:0,contentAspect:Math.round(100*h)/100,fitCover:"cover"===p?1:0,scale:Math.round(100*t)/100,panExtentX:Math.round(O),panExtentY:Math.round(k),tx:Math.round(s.value),ty:Math.round(l.value)})};return A.__closure={scale:e,heightFor:n,committedScale:o,savedTx:c,tx:s,savedTy:r,ty:l,viewportWidth:u,streamPanExtent:_,contentAspect:h,fit:p,traceSample:v,lastPinchEndMs:S,pinchActive:f,traceEvent:T,snapshot:x,traceRelease:w,runOnJS:E,reportZoom:M},A.__workletHash=3232971688836,A.__initData=t,A})({_worklet_3232971688836_init_data:z,scale:rt,heightFor:st,committedScale:lt,savedTx:_t,tx:it,savedTy:ht,ty:ut,viewportWidth:ct,streamPanExtent:n.streamPanExtent,contentAspect:nt,fit:tt,traceSample:Lt,lastPinchEndMs:Ut,pinchActive:vt,traceEvent:wt,snapshot:Mt,traceRelease:It,runOnJS:S.runOnJS,reportZoom:E}),j[121]=lt,j[122]=nt,j[123]=tt,j[124]=st,j[125]=Ut,j[126]=vt,j[127]=_t,j[128]=ht,j[129]=rt.value,j[130]=Mt,j[131]=wt,j[132]=It,j[133]=Lt,j[134]=it.value,j[135]=ut.value,j[136]=ct,j[137]=c):c=j[137],j[138]!==lt||j[139]!==Ut||j[140]!==vt||j[141]!==_t||j[142]!==ht||j[143]!==rt.value||j[144]!==Mt||j[145]!==wt||j[146]!==it.value||j[147]!==ut.value?(s=(function({_worklet_2841268193254_init_data:t,pinchActive:e,committedScale:n,scale:o,savedTx:c,tx:s,savedTy:r,ty:l,lastPinchEndMs:u,traceEvent:_,snapshot:h}){const p=function(t,p){e.value&&(e.set(!1),n.set(o.value),c.set(s.value),r.set(l.value),u.set(Date.now()),_("zoom pinch cancel",h({success:p})))};return p.__closure={pinchActive:e,committedScale:n,scale:o,savedTx:c,tx:s,savedTy:r,ty:l,lastPinchEndMs:u,traceEvent:_,snapshot:h},p.__workletHash=2841268193254,p.__initData=t,p})({_worklet_2841268193254_init_data:U,pinchActive:vt,committedScale:lt,scale:rt,savedTx:_t,tx:it,savedTy:ht,ty:ut,lastPinchEndMs:Ut,traceEvent:wt,snapshot:Mt}),j[138]=lt,j[139]=Ut,j[140]=vt,j[141]=_t,j[142]=ht,j[143]=rt.value,j[144]=Mt,j[145]=wt,j[146]=it.value,j[147]=ut.value,j[148]=s):s=j[148],Jt=v.Gesture.Pinch().onStart((0,p.guardWorklet)("zoom.pinch.start",t)).onUpdate((0,p.guardWorklet)("zoom.pinch.update",e)).onEnd((0,p.guardWorklet)("zoom.pinch.end",c)).onFinalize((0,p.guardWorklet)("zoom.pinch.finalize",s)),j[62]=lt,j[63]=nt,j[64]=tt,j[65]=st,j[66]=Ut,j[67]=Tt,j[68]=vt,j[69]=mt,j[70]=pt,j[71]=dt,j[72]=_t,j[73]=ht,j[74]=rt,j[75]=Mt,j[76]=ft,j[77]=ot,j[78]=bt,j[79]=wt,j[80]=It,j[81]=Lt,j[82]=it,j[83]=ut,j[84]=ct,j[85]=Jt}else Jt=j[85];const Vt=Jt;let $t;if(j[149]!==lt||j[150]!==nt||j[151]!==tt||j[152]!==st||j[153]!==Tt||j[154]!==St||j[155]!==_t||j[156]!==ht||j[157]!==rt||j[158]!==Mt||j[159]!==ft||j[160]!==ot||j[161]!==bt||j[162]!==wt||j[163]!==It||j[164]!==Lt||j[165]!==it||j[166]!==ut||j[167]!==ct){let t,e,o,c;j[169]!==lt||j[170]!==Tt||j[171]!==St||j[172]!==_t||j[173]!==ht||j[174]!==rt||j[175]!==Mt||j[176]!==bt||j[177]!==wt||j[178]!==Lt||j[179]!==it||j[180]!==ut?(t=(function({_worklet_17248706653384_init_data:t,scale:e,MIN_SCALE:n,cancelAnimation:o,tx:c,ty:s,committedScale:r,savedTx:l,savedTy:u,panActive:_,lastUpdateLogMs:h,traceEvent:p,snapshot:v,traceBegin:S,traceSample:f}){const T=function(){e.value<=n||(o(e),o(c),o(s),r.set(e.value),l.set(c.value),u.set(s.value),_.set(!0),h.set(0),p("zoom pan start",v({pointers:1})),S("pan"),f("start",{}))};return T.__closure={scale:e,MIN_SCALE:n,cancelAnimation:o,tx:c,ty:s,committedScale:r,savedTx:l,savedTy:u,panActive:_,lastUpdateLogMs:h,traceEvent:p,snapshot:v,traceBegin:S,traceSample:f},T.__workletHash=0xfb007086cc8,T.__initData=t,T})({_worklet_17248706653384_init_data:q,scale:rt,MIN_SCALE:f,cancelAnimation:S.cancelAnimation,tx:it,ty:ut,committedScale:lt,savedTx:_t,savedTy:ht,panActive:St,lastUpdateLogMs:Tt,traceEvent:wt,snapshot:Mt,traceBegin:bt,traceSample:Lt}),j[169]=lt,j[170]=Tt,j[171]=St,j[172]=_t,j[173]=ht,j[174]=rt,j[175]=Mt,j[176]=bt,j[177]=wt,j[178]=Lt,j[179]=it,j[180]=ut,j[181]=t):t=j[181],j[182]!==nt||j[183]!==tt||j[184]!==st||j[185]!==Tt||j[186]!==_t||j[187]!==ht||j[188]!==rt.value||j[189]!==Mt||j[190]!==ft||j[191]!==ot||j[192]!==wt||j[193]!==Lt||j[194]!==it||j[195]!==ut||j[196]!==ct?(e=(function({_worklet_8650070390265_init_data:t,scale:e,MIN_SCALE:n,viewportWidth:o,heightFor:c,streamPanExtent:s,contentAspect:r,fit:l,savedTx:u,savedTy:_,clampPan:h,tx:p,ty:v,touchSequence:S,PAN_SEEN_DISTANCE:f,markPan:T,trace:x,lastUpdateLogMs:w,TRACE_UPDATE_THROTTLE_MS:E,traceEvent:M,snapshot:A,traceSample:y}){const P=function(t){if(e.value<=n)return;const P=o,O=e.value,k=c(O),{x:Z,y:b}=s(P,k,r,O,l),X=u.value+t.translationX,L=_.value+t.translationY,N=h({tx:X,ty:L,w:P,h:k,aspect:r,scale:O,fit:l});p.set(N.x),v.set(N.y),!S.value.panSeen&&Math.abs(t.translationX)+Math.abs(t.translationY)>f&&S.set(T(S.value));const I=Date.now();x&&I-w.value>=E&&(w.set(I),M("zoom pan update",A({pointers:1}))),y("update",{pointers:1,rawX:X,rawY:L,limX:Z,limY:b})};return P.__closure={scale:e,MIN_SCALE:n,viewportWidth:o,heightFor:c,streamPanExtent:s,contentAspect:r,fit:l,savedTx:u,savedTy:_,clampPan:h,tx:p,ty:v,touchSequence:S,PAN_SEEN_DISTANCE:f,markPan:T,trace:x,lastUpdateLogMs:w,TRACE_UPDATE_THROTTLE_MS:E,traceEvent:M,snapshot:A,traceSample:y},P.__workletHash=8650070390265,P.__initData=t,P})({_worklet_8650070390265_init_data:B,scale:rt,MIN_SCALE:f,viewportWidth:ct,heightFor:st,streamPanExtent:n.streamPanExtent,contentAspect:nt,fit:tt,savedTx:_t,savedTy:ht,clampPan:n.clampPan,tx:it,ty:ut,touchSequence:ft,PAN_SEEN_DISTANCE:u.PAN_SEEN_DISTANCE,markPan:u.markPan,trace:ot,lastUpdateLogMs:Tt,TRACE_UPDATE_THROTTLE_MS:y,traceEvent:wt,snapshot:Mt,traceSample:Lt}),j[182]=nt,j[183]=tt,j[184]=st,j[185]=Tt,j[186]=_t,j[187]=ht,j[188]=rt.value,j[189]=Mt,j[190]=ft,j[191]=ot,j[192]=wt,j[193]=Lt,j[194]=it,j[195]=ut,j[196]=ct,j[197]=e):e=j[197],j[198]!==nt||j[199]!==tt||j[200]!==st||j[201]!==St||j[202]!==_t||j[203]!==ht||j[204]!==rt.value||j[205]!==Mt||j[206]!==wt||j[207]!==It||j[208]!==Lt||j[209]!==it.value||j[210]!==ut.value||j[211]!==ct?(o=(function({_worklet_6669007847096_init_data:t,savedTx:e,tx:n,savedTy:o,ty:c,panActive:s,traceEvent:r,snapshot:l,viewportWidth:u,heightFor:_,scale:h,streamPanExtent:p,contentAspect:v,fit:S,traceSample:f,traceRelease:T,runOnJS:x,reportZoom:w}){const E=function(){e.set(n.value),o.set(c.value),s.set(!1),r("zoom pan end",l({pointers:0}));const t=u,E=_(h.value),{x:M,y:A}=p(t,E,v,h.value,S);f("end",{rawX:n.value,rawY:c.value,limX:M,limY:A}),T(),x(w)("pan",{viewportW:Math.round(t),viewportH:Math.round(E),viewportAspect:E>0?Math.round(t/E*100)/100:0,contentAspect:Math.round(100*v)/100,fitCover:"cover"===S?1:0,scale:Math.round(100*h.value)/100,panExtentX:Math.round(M),panExtentY:Math.round(A),tx:Math.round(n.value),ty:Math.round(c.value),atLimitX:Math.abs(Math.abs(n.value)-M)<1?1:0,atLimitY:Math.abs(Math.abs(c.value)-A)<1?1:0})};return E.__closure={savedTx:e,tx:n,savedTy:o,ty:c,panActive:s,traceEvent:r,snapshot:l,viewportWidth:u,heightFor:_,scale:h,streamPanExtent:p,contentAspect:v,fit:S,traceSample:f,traceRelease:T,runOnJS:x,reportZoom:w},E.__workletHash=6669007847096,E.__initData=t,E})({_worklet_6669007847096_init_data:J,savedTx:_t,tx:it,savedTy:ht,ty:ut,panActive:St,traceEvent:wt,snapshot:Mt,viewportWidth:ct,heightFor:st,scale:rt,streamPanExtent:n.streamPanExtent,contentAspect:nt,fit:tt,traceSample:Lt,traceRelease:It,runOnJS:S.runOnJS,reportZoom:E}),j[198]=nt,j[199]=tt,j[200]=st,j[201]=St,j[202]=_t,j[203]=ht,j[204]=rt.value,j[205]=Mt,j[206]=wt,j[207]=It,j[208]=Lt,j[209]=it.value,j[210]=ut.value,j[211]=ct,j[212]=o):o=j[212],j[213]!==lt||j[214]!==St||j[215]!==_t||j[216]!==ht||j[217]!==rt.value||j[218]!==Mt||j[219]!==wt||j[220]!==it.value||j[221]!==ut.value?(c=(function({_worklet_12302730567675_init_data:t,panActive:e,committedScale:n,scale:o,savedTx:c,tx:s,savedTy:r,ty:l,traceEvent:u,snapshot:_}){const h=function(t,h){e.value&&(e.set(!1),n.set(o.value),c.set(s.value),r.set(l.value),u("zoom pan cancel",_({success:h})))};return h.__closure={panActive:e,committedScale:n,scale:o,savedTx:c,tx:s,savedTy:r,ty:l,traceEvent:u,snapshot:_},h.__workletHash=0xb3073e29ffb,h.__initData=t,h})({_worklet_12302730567675_init_data:V,panActive:St,committedScale:lt,scale:rt,savedTx:_t,tx:it,savedTy:ht,ty:ut,traceEvent:wt,snapshot:Mt}),j[213]=lt,j[214]=St,j[215]=_t,j[216]=ht,j[217]=rt.value,j[218]=Mt,j[219]=wt,j[220]=it.value,j[221]=ut.value,j[222]=c):c=j[222],$t=v.Gesture.Pan().maxPointers(1).minDistance(4).onStart((0,p.guardWorklet)("zoom.pan.start",t)).onUpdate((0,p.guardWorklet)("zoom.pan.update",e)).onEnd((0,p.guardWorklet)("zoom.pan.end",o)).onFinalize((0,p.guardWorklet)("zoom.pan.finalize",c)),j[149]=lt,j[150]=nt,j[151]=tt,j[152]=st,j[153]=Tt,j[154]=St,j[155]=_t,j[156]=ht,j[157]=rt,j[158]=Mt,j[159]=ft,j[160]=ot,j[161]=bt,j[162]=wt,j[163]=It,j[164]=Lt,j[165]=it,j[166]=ut,j[167]=ct,j[168]=$t}else $t=j[168];const Kt=$t,Gt=(0,S.useAnimatedStyle)((function({_worklet_5367700047158_init_data:t,scale:e,foldGrowth:n,tx:o,ty:c,heightFor:s,ZOOM_MIN:r}){const l=function(){const t=e.value,l=n({scale:t,tx:o.value,ty:c.value,boxHeight:s(t),restHeight:s(r)});return{transform:[{translateX:l.tx},{translateY:l.ty},{scale:l.scale}]}};return l.__closure={scale:e,foldGrowth:n,tx:o,ty:c,heightFor:s,ZOOM_MIN:r},l.__workletHash=5367700047158,l.__initData=t,l})({_worklet_5367700047158_init_data:$,scale:rt,foldGrowth:s.foldGrowth,tx:it,ty:ut,heightFor:st,ZOOM_MIN:o.ZOOM_MIN}));let jt;j[223]!==lt||j[224]!==nt||j[225]!==tt||j[226]!==st||j[227]!==Ut||j[228]!==zt||j[229]!==_t||j[230]!==ht||j[231]!==rt||j[232]!==Mt||j[233]!==ft||j[234]!==bt||j[235]!==wt||j[236]!==It||j[237]!==Lt||j[238]!==it||j[239]!==ut||j[240]!==ct?(jt=(function({_worklet_6231651485281_init_data:t,doubleTapRefusal:e,lastPinchEndMs:n,touchSequence:o,traceEvent:c,snapshot:s,scale:r,viewportWidth:l,heightFor:u,doubleTapTarget:_,MIN_SCALE:h,MAX_SCALE:p,coverScale:v,contentAspect:S,fit:f,ZOOM_STEPS:T,MIN_VIEWPORT:x,traceBegin:w,traceSample:E,f2:M,traceRelease:A,resetZoom:y,focalPan:P,tx:O,ty:k,streamPanExtent:Z,clampPan:b,withTiming:X,committedScale:L,savedTx:N,savedTy:I}){const F=function(t,F){const Y=e({nowMs:Date.now(),lastPinchEndMs:n.value,sequence:o.value});if(null!==Y)return void c("zoom double-tap refused",s({reason:Y,maxTouches:o.value.maxTouches}));const W=r.value,D=l,C=u(W),R=_({current:W,minScale:h,maxScale:p,cover:v({viewportWidth:D,viewportHeight:C,contentAspect:S,fit:f}),fallbackStep:T[0]??2});if("fit"===R.kind||D<x||C<x)return w("double-tap"),E("step",{focalX:t,focalY:F,note:`${M(W)}\u2192fit`}),A(),void y("double-tap");const H=R.scale,z=u(H),U=P({focalNow:t,focalStart:t,center:D/2,panStart:O.value,scaleStart:W*C,scaleAfter:H*z}),q=P({focalNow:F,focalStart:F,center:C/2,centerAfter:z/2,panStart:k.value,scaleStart:W*C,scaleAfter:H*z}),{x:B,y:J}=Z(D,z,S,H,f),{x:V,y:$}=b({tx:U,ty:q,w:D,h:z,aspect:S,scale:H,fit:f});r.set(X(H)),L.set(H),O.set(X(V)),N.set(V),k.set(X($)),I.set($),w("double-tap"),E("step",{focalX:t,focalY:F,rawX:U,rawY:q,x:V,y:$,limX:B,limY:J,boxH:z,note:C===z?`${M(W)}\u2192${M(H)}`:`${M(W)}\u2192${M(H)} box ${Math.round(C)}\u2192${Math.round(z)}`}),A()};return F.__closure={doubleTapRefusal:e,lastPinchEndMs:n,touchSequence:o,traceEvent:c,snapshot:s,scale:r,viewportWidth:l,heightFor:u,doubleTapTarget:_,MIN_SCALE:h,MAX_SCALE:p,coverScale:v,contentAspect:S,fit:f,ZOOM_STEPS:T,MIN_VIEWPORT:x,traceBegin:w,traceSample:E,f2:M,traceRelease:A,resetZoom:y,focalPan:P,tx:O,ty:k,streamPanExtent:Z,clampPan:b,withTiming:X,committedScale:L,savedTx:N,savedTy:I},F.__workletHash=6231651485281,F.__initData=t,F})({_worklet_6231651485281_init_data:K,doubleTapRefusal:r.doubleTapRefusal,lastPinchEndMs:Ut,touchSequence:ft,traceEvent:wt,snapshot:Mt,scale:rt,viewportWidth:ct,heightFor:st,doubleTapTarget:c.doubleTapTarget,MIN_SCALE:f,MAX_SCALE:T,coverScale:c.coverScale,contentAspect:nt,fit:tt,ZOOM_STEPS:o.ZOOM_STEPS,MIN_VIEWPORT:x,traceBegin:bt,traceSample:Lt,f2:O,traceRelease:It,resetZoom:zt,focalPan:o.focalPan,tx:it,ty:ut,streamPanExtent:n.streamPanExtent,clampPan:n.clampPan,withTiming:S.withTiming,committedScale:lt,savedTx:_t,savedTy:ht}),j[223]=lt,j[224]=nt,j[225]=tt,j[226]=st,j[227]=Ut,j[228]=zt,j[229]=_t,j[230]=ht,j[231]=rt,j[232]=Mt,j[233]=ft,j[234]=bt,j[235]=wt,j[236]=It,j[237]=Lt,j[238]=it,j[239]=ut,j[240]=ct,j[241]=jt):jt=j[241];const Qt=jt;let te;j[242]!==Kt||j[243]!==Vt||j[244]!==Bt?(te=(...t)=>{const e=t;return v.Gesture.Simultaneous(Vt,Kt,Bt,...e)},j[242]=Kt,j[243]=Vt,j[244]=Bt,j[245]=te):te=j[245];const ee=te;let ae,ne,oe;j[246]!==tt||j[247]!==ot||j[248]!==ct?(ae=()=>{ot&&h.log.debug("live:zoom","zoom gestures rebuilt",{width:ct,fit:tt})},j[246]=tt,j[247]=ot,j[248]=ct,j[249]=ae):ae=j[249];j[250]!==tt||j[251]!==Kt||j[252]!==Vt||j[253]!==ot||j[254]!==ct?(ne=[Vt,Kt,ot,ct,tt],j[250]=tt,j[251]=Kt,j[252]=Vt,j[253]=ot,j[254]=ct,j[255]=ne):ne=j[255];(0,e.useEffect)(ae,ne),j[256]!==lt||j[257]!==ee||j[258]!==Qt||j[259]!==Rt||j[260]!==zt||j[261]!==rt||j[262]!==Dt||j[263]!==ft||j[264]!==Yt||j[265]!==wt||j[266]!==Gt?(oe={scale:rt,committedScale:lt,videoStyle:Gt,resetZoom:zt,touchSequence:ft,traceEvent:wt,doubleTapZoomAt:Qt,snapZoom:Dt,reclampZoom:Rt,composeWith:ee,traceBox:Yt},j[256]=lt,j[257]=ee,j[258]=Qt,j[259]=Rt,j[260]=zt,j[261]=rt,j[262]=Dt,j[263]=ft,j[264]=Yt,j[265]=wt,j[266]=Gt,j[267]=oe):oe=j[267];return oe};var t=_r(d[0]),e=_r(d[1]),n=_r(d[2]),o=_r(d[3]),c=_r(d[4]),s=_r(d[5]),r=_r(d[6]),l=_r(d[7]),u=_r(d[8]),_=_r(d[9]),h=_r(d[10]),p=_r(d[11]),v=_r(d[12]),S=_r(d[13]);const f=o.ZOOM_MIN,T=o.ZOOM_MAX,x=10,w=1.7777777777777777;function E(t,e){h.log.debug('live:zoom',`zoom ${t} end`,e)}const M=600;function A(t,e){if(0===e.length)return;const n=e[e.length-1],o=void 0===n?0:Math.round(n.t);h.log.debug('live:zoom',`zoom trace \u2014 ${t}, ${e.length} samples over ${o} ms\n${(0,_.formatZoomTrace)(e)}`)}const y=200;function P(t,e){h.log.debug('live:zoom',t,e)}const O=(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);}"}}),k={code:"function useStreamZoomTs2(msg,data){const{trace,runOnJS,reportZoomEvent}=this.__closure;if(!trace){return;}runOnJS(reportZoomEvent)(msg,data);}"},Z={code:"function useStreamZoomTs3(extra){const{scale,committedScale,tx,ty}=this.__closure;return{scale:Math.round(scale.value*100)/100,committed:Math.round(committedScale.value*100)/100,tx:Math.round(tx.value),ty:Math.round(ty.value),...extra};}"},b={code:"function useStreamZoomTs4(){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);}}"},X={code:"function useStreamZoomTs5(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.set(kind_0);beginZoomTrace(traceBuf.value,Date.now());}"},L={code:"function useStreamZoomTs6(phase,extra_0){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_0});}"},N={code:"function useStreamZoomTs7(){const{trace,runOnJS,armTraceFlush}=this.__closure;if(!trace){return;}runOnJS(armTraceFlush)();}"},I={code:"function useStreamZoomTs8(drawnHeight){const{traceSample}=this.__closure;traceSample(\"box\",{drawnH:drawnHeight});}"},F={code:"function useStreamZoomTs9(){const{scale,MIN_SCALE,heightFor,viewportWidth,MIN_VIEWPORT,clampPan,tx,ty,contentAspect,fit,savedTx,savedTy,traceEvent,snapshot}=this.__closure;const s=scale.value;if(s<=MIN_SCALE){return;}const h=heightFor(s);if(viewportWidth<MIN_VIEWPORT||h<MIN_VIEWPORT){return;}const c=clampPan({tx:tx.value,ty:ty.value,w:viewportWidth,h:h,aspect:contentAspect,scale:s,fit:fit});tx.set(c.x);ty.set(c.y);savedTx.set(c.x);savedTy.set(c.y);traceEvent(\"zoom reclamp\",snapshot({boxH:Math.round(h)}));}"},Y={code:"function useStreamZoomTs10(t14){const{traceEvent,snapshot,scale,withTiming,committedScale,tx,ty,savedTx,savedTy}=this.__closure;const reason_0=t14===undefined?\"reset\":t14;traceEvent(\"zoom reset\",snapshot({reason:reason_0}));scale.set(withTiming(1));committedScale.set(1);tx.set(withTiming(0));ty.set(withTiming(0));savedTx.set(0);savedTy.set(0);}"},W={code:"function useStreamZoomTs11(e){const{touchSequence,touchDown}=this.__closure;touchSequence.set(touchDown(touchSequence.value,e.numberOfTouches,Date.now()));}"},D={code:"function useStreamZoomTs12(){const{touchSequence,touchUp}=this.__closure;touchSequence.set(touchUp(touchSequence.value,Date.now()));}"},C={code:"function useStreamZoomTs13(){const{touchSequence,touchUp}=this.__closure;touchSequence.set(touchUp(touchSequence.value,Date.now()));}"},R={code:"function useStreamZoomTs14(e_0){const{cancelAnimation,scale,tx,ty,seedFromLive,MIN_SCALE,MAX_SCALE,pinchStartScale,committedScale,savedTx,savedTy,pinchFocalX,pinchFocalY,pinchActive,touchSequence,markPinch,lastUpdateLogMs,traceEvent,snapshot,traceBegin,traceSample}=this.__closure;cancelAnimation(scale);cancelAnimation(tx);cancelAnimation(ty);const seed=seedFromLive({scale:scale.value,tx:tx.value,ty:ty.value},MIN_SCALE,MAX_SCALE);pinchStartScale.set(seed.startScale);scale.set(seed.startScale);committedScale.set(seed.startScale);savedTx.set(seed.savedTx);savedTy.set(seed.savedTy);pinchFocalX.set(e_0.focalX);pinchFocalY.set(e_0.focalY);pinchActive.set(true);touchSequence.set(markPinch(touchSequence.value,Date.now()));lastUpdateLogMs.set(0);traceEvent(\"zoom pinch start\",snapshot({pointers:e_0.numberOfPointers,startScale:seed.startScale}));traceBegin(\"pinch\");traceSample(\"start\",{focalX:e_0.focalX,focalY:e_0.focalY,pointers:e_0.numberOfPointers});}"},H={code:"function useStreamZoomTs15(e_1){const{viewportWidth,pinchStartScale,MIN_SCALE,MAX_SCALE,heightFor,MIN_VIEWPORT,scale,focalPan,pinchFocalX,savedTx,pinchFocalY,savedTy,streamPanExtent,contentAspect,fit,clampPan,tx,ty,trace,lastUpdateLogMs,TRACE_UPDATE_THROTTLE_MS,traceEvent,snapshot,traceSample}=this.__closure;if(e_1.numberOfPointers<2){return;}const w=viewportWidth;const s0=pinchStartScale.value;const s1=Math.max(MIN_SCALE,Math.min(MAX_SCALE,s0*e_1.scale));const h0=heightFor(s0);const h_0=heightFor(s1);if(w<MIN_VIEWPORT||h_0<MIN_VIEWPORT){return;}scale.set(s1);const ptx=focalPan({focalNow:e_1.focalX,focalStart:pinchFocalX.value,center:w/2,panStart:savedTx.value,scaleStart:s0*h0,scaleAfter:s1*h_0});const pty=focalPan({focalNow:e_1.focalY,focalStart:pinchFocalY.value,center:h0/2,centerAfter:h_0/2,panStart:savedTy.value,scaleStart:s0*h0,scaleAfter:s1*h_0});const{x:limX,y:limY}=streamPanExtent(w,h_0,contentAspect,s1,fit);const clamped=clampPan({tx:ptx,ty:pty,w:w,h:h_0,aspect:contentAspect,scale:s1,fit:fit});tx.set(clamped.x);ty.set(clamped.y);const nowMs=Date.now();if(trace&&nowMs-lastUpdateLogMs.value>=TRACE_UPDATE_THROTTLE_MS){lastUpdateLogMs.set(nowMs);traceEvent(\"zoom pinch update\",snapshot({pointers:e_1.numberOfPointers,gestureScale:Math.round(e_1.scale*100)/100}));}traceSample(\"update\",{pointers:e_1.numberOfPointers,focalX:e_1.focalX,focalY:e_1.focalY,rawX:ptx,rawY:pty,limX:limX,limY:limY});}"},z={code:"function useStreamZoomTs16(){const{scale,heightFor,committedScale,savedTx,tx,savedTy,ty,viewportWidth,streamPanExtent,contentAspect,fit,traceSample,lastPinchEndMs,pinchActive,traceEvent,snapshot,traceRelease,runOnJS,reportZoom}=this.__closure;const s_0=scale.value;const boxBefore=heightFor(committedScale.value);committedScale.set(s_0);savedTx.set(tx.value);savedTy.set(ty.value);const w_0=viewportWidth;const h_1=heightFor(s_0);const{x:limX_0,y:limY_0}=streamPanExtent(w_0,h_1,contentAspect,s_0,fit);traceSample(\"end\",{rawX:tx.value,rawY:ty.value,limX:limX_0,limY:limY_0,note:boxBefore===h_1?undefined:\"box \"+Math.round(boxBefore)+\"\\u2192\"+Math.round(h_1)});lastPinchEndMs.set(Date.now());pinchActive.set(false);traceEvent(\"zoom pinch end\",snapshot({pointers:0}));traceRelease();runOnJS(reportZoom)(\"pinch\",{viewportW:Math.round(w_0),viewportH:Math.round(h_1),viewportAspect:h_1>0?Math.round(w_0/h_1*100)/100:0,contentAspect:Math.round(contentAspect*100)/100,fitCover:fit===\"cover\"?1:0,scale:Math.round(s_0*100)/100,panExtentX:Math.round(limX_0),panExtentY:Math.round(limY_0),tx:Math.round(tx.value),ty:Math.round(ty.value)});}"},U={code:"function useStreamZoomTs17(_e,success){const{pinchActive,committedScale,scale,savedTx,tx,savedTy,ty,lastPinchEndMs,traceEvent,snapshot}=this.__closure;if(!pinchActive.value){return;}pinchActive.set(false);committedScale.set(scale.value);savedTx.set(tx.value);savedTy.set(ty.value);lastPinchEndMs.set(Date.now());traceEvent(\"zoom pinch cancel\",snapshot({success:success}));}"},q={code:"function useStreamZoomTs18(){const{scale,MIN_SCALE,cancelAnimation,tx,ty,committedScale,savedTx,savedTy,panActive,lastUpdateLogMs,traceEvent,snapshot,traceBegin,traceSample}=this.__closure;if(scale.value<=MIN_SCALE){return;}cancelAnimation(scale);cancelAnimation(tx);cancelAnimation(ty);committedScale.set(scale.value);savedTx.set(tx.value);savedTy.set(ty.value);panActive.set(true);lastUpdateLogMs.set(0);traceEvent(\"zoom pan start\",snapshot({pointers:1}));traceBegin(\"pan\");traceSample(\"start\",{});}"},B={code:"function useStreamZoomTs19(e_2){const{scale,MIN_SCALE,viewportWidth,heightFor,streamPanExtent,contentAspect,fit,savedTx,savedTy,clampPan,tx,ty,touchSequence,PAN_SEEN_DISTANCE,markPan,trace,lastUpdateLogMs,TRACE_UPDATE_THROTTLE_MS,traceEvent,snapshot,traceSample}=this.__closure;if(scale.value<=MIN_SCALE){return;}const w_1=viewportWidth;const s_1=scale.value;const h_2=heightFor(s_1);const{x:limX_1,y:limY_1}=streamPanExtent(w_1,h_2,contentAspect,s_1,fit);const rawX=savedTx.value+e_2.translationX;const rawY=savedTy.value+e_2.translationY;const clamped_0=clampPan({tx:rawX,ty:rawY,w:w_1,h:h_2,aspect:contentAspect,scale:s_1,fit:fit});tx.set(clamped_0.x);ty.set(clamped_0.y);if(!touchSequence.value.panSeen&&Math.abs(e_2.translationX)+Math.abs(e_2.translationY)>PAN_SEEN_DISTANCE){touchSequence.set(markPan(touchSequence.value));}const nowMs_0=Date.now();if(trace&&nowMs_0-lastUpdateLogMs.value>=TRACE_UPDATE_THROTTLE_MS){lastUpdateLogMs.set(nowMs_0);traceEvent(\"zoom pan update\",snapshot({pointers:1}));}traceSample(\"update\",{pointers:1,rawX:rawX,rawY:rawY,limX:limX_1,limY:limY_1});}"},J={code:"function useStreamZoomTs20(){const{savedTx,tx,savedTy,ty,panActive,traceEvent,snapshot,viewportWidth,heightFor,scale,streamPanExtent,contentAspect,fit,traceSample,traceRelease,runOnJS,reportZoom}=this.__closure;savedTx.set(tx.value);savedTy.set(ty.value);panActive.set(false);traceEvent(\"zoom pan end\",snapshot({pointers:0}));const w_2=viewportWidth;const h_3=heightFor(scale.value);const{x:limX_2,y:limY_2}=streamPanExtent(w_2,h_3,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_3),viewportAspect:h_3>0?Math.round(w_2/h_3*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});}"},V={code:"function useStreamZoomTs21(_e_0,success_0){const{panActive,committedScale,scale,savedTx,tx,savedTy,ty,traceEvent,snapshot}=this.__closure;if(!panActive.value){return;}panActive.set(false);committedScale.set(scale.value);savedTx.set(tx.value);savedTy.set(ty.value);traceEvent(\"zoom pan cancel\",snapshot({success:success_0}));}"},$={code:"function useStreamZoomTs22(){const{scale,foldGrowth,tx,ty,heightFor,ZOOM_MIN}=this.__closure;const s_2=scale.value;const r=foldGrowth({scale:s_2,tx:tx.value,ty:ty.value,boxHeight:heightFor(s_2),restHeight:heightFor(ZOOM_MIN)});return{transform:[{translateX:r.tx},{translateY:r.ty},{scale:r.scale}]};}"},K={code:"function useStreamZoomTs23(x,y){const{doubleTapRefusal,lastPinchEndMs,touchSequence,traceEvent,snapshot,scale,viewportWidth,heightFor,doubleTapTarget,MIN_SCALE,MAX_SCALE,coverScale,contentAspect,fit,ZOOM_STEPS,MIN_VIEWPORT,traceBegin,traceSample,f2,traceRelease,resetZoom,focalPan,tx,ty,streamPanExtent,clampPan,withTiming,committedScale,savedTx,savedTy}=this.__closure;var _ZOOM_STEPS$;const refusal=doubleTapRefusal({nowMs:Date.now(),lastPinchEndMs:lastPinchEndMs.value,sequence:touchSequence.value});if(refusal!==null){traceEvent(\"zoom double-tap refused\",snapshot({reason:refusal,maxTouches:touchSequence.value.maxTouches}));return;}const s0_0=scale.value;const w_3=viewportWidth;const h0_0=heightFor(s0_0);const target=doubleTapTarget({current:s0_0,minScale:MIN_SCALE,maxScale:MAX_SCALE,cover:coverScale({viewportWidth:w_3,viewportHeight:h0_0,contentAspect:contentAspect,fit:fit}),fallbackStep:(_ZOOM_STEPS$=ZOOM_STEPS[0])!==null&&_ZOOM_STEPS$!==void 0?_ZOOM_STEPS$:2});if(target.kind===\"fit\"||w_3<MIN_VIEWPORT||h0_0<MIN_VIEWPORT){traceBegin(\"double-tap\");traceSample(\"step\",{focalX:x,focalY:y,note:f2(s0_0)+\"\\u2192fit\"});traceRelease();resetZoom(\"double-tap\");return;}const s1_0=target.scale;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.set(withTiming(s1_0));committedScale.set(s1_0);tx.set(withTiming(nx));savedTx.set(nx);ty.set(withTiming(ny));savedTy.set(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();}"}},1177,[788,16,1178,1261,1179,1180,1181,1182,1183,1184,1000,1262,1220,1130]);
|
|
24
|
+
__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})},1178,[]);
|
|
25
|
+
__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"coverScale",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"DOUBLE_TAP_EPSILON",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"doubleTapTarget",{enumerable:!0,get:function(){return c}});const t=(function({_worklet_12565832045937_init_data:t}){const n=function(t){const{viewportWidth:n,viewportHeight:c,contentAspect:o,fit:a}=t;if('cover'===a)return 1;if(!Number.isFinite(n)||!Number.isFinite(c)||!Number.isFinite(o))return 1;if(n<=0||c<=0||o<=0)return 1;const u=n/c/o;return u>=1?u:1/u};return n.__closure={},n.__workletHash=0xb6db5f49571,n.__initData=t,n})({_worklet_12565832045937_init_data:{code:"function coverScale_doubleTapZoomTs1(input){const{viewportWidth:w,viewportHeight:h,contentAspect:a,fit:fit}=input;if(fit==='cover')return 1;if(!Number.isFinite(w)||!Number.isFinite(h)||!Number.isFinite(a))return 1;if(w<=0||h<=0||a<=0)return 1;const ratio=w/h/a;return ratio>=1?ratio:1/ratio;}"}}),n=.01,c=(function({_worklet_6821251347268_init_data:t,DOUBLE_TAP_EPSILON:n}){const c=function(t){const{minScale:c,maxScale:o,cover:a,fallbackStep:u}=t;if((Number.isFinite(t.current)?t.current:c)>c+n)return{kind:'fit'};const _=Number.isFinite(a)&&a>c+n?a:u;return{kind:'zoom',scale:Math.max(c,Math.min(o,_))}};return c.__closure={DOUBLE_TAP_EPSILON:n},c.__workletHash=6821251347268,c.__initData=t,c})({_worklet_6821251347268_init_data:{code:"function doubleTapTarget_doubleTapZoomTs2(input){const{DOUBLE_TAP_EPSILON}=this.__closure;const{minScale:minScale,maxScale:maxScale,cover:cover,fallbackStep:fallbackStep}=input;const current=Number.isFinite(input.current)?input.current:minScale;if(current>minScale+DOUBLE_TAP_EPSILON)return{kind:'fit'};const wanted=Number.isFinite(cover)&&cover>minScale+DOUBLE_TAP_EPSILON?cover:fallbackStep;return{kind:'zoom',scale:Math.max(minScale,Math.min(maxScale,wanted))};}"},DOUBLE_TAP_EPSILON:n})},1179,[]);
|
|
26
|
+
__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;}"}})},1180,[]);
|
|
27
|
+
__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}}),Object.defineProperty(e,"doubleTapRefusal",{enumerable:!0,get:function(){return c}});const t=350,n=(function({_worklet_8291923632438_init_data:t,TAP_AFTER_PINCH_MS:n}){const c=function(t){const c=t.nowMs-t.lastPinchEndMs;return c<0||c>=n};return c.__closure={TAP_AFTER_PINCH_MS:n},c.__workletHash=8291923632438,c.__initData=t,c})({_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}),c=(function({_worklet_17218118869540_init_data:t,tapStepAccepted:n}){const c=function(t){return t.sequence.pinchSeen?'pinch-seen':t.sequence.maxTouches>1?'multi-touch':t.sequence.panSeen?'pan-seen':n(t)?null:'after-pinch'};return c.__closure={tapStepAccepted:n},c.__workletHash=0xfa8e7dbe224,c.__initData=t,c})({_worklet_17218118869540_init_data:{code:"function doubleTapRefusal_zoomTapGateTs2(input){const{tapStepAccepted}=this.__closure;if(input.sequence.pinchSeen)return'pinch-seen';if(input.sequence.maxTouches>1)return'multi-touch';if(input.sequence.panSeen)return'pan-seen';if(!tapStepAccepted(input))return'after-pinch';return null;}"},tapStepAccepted:n})},1181,[]);
|
|
28
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"seedFromLive",{enumerable:!0,get:function(){return t}});const t=(function({_worklet_2550428373857_init_data:t}){const n=function(t,n,c){return{startScale:Math.max(n,Math.min(c,t.scale)),savedTx:t.tx,savedTy:t.ty}};return n.__closure={},n.__workletHash=2550428373857,n.__initData=t,n})({_worklet_2550428373857_init_data:{code:"function seedFromLive_zoomSeedTs1(live,minScale,maxScale){return{startScale:Math.max(minScale,Math.min(maxScale,live.scale)),savedTx:live.tx,savedTy:live.ty};}"}})},1182,[]);
|
|
29
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SEQUENCE_GAP_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"EMPTY_TOUCH_SEQUENCE",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"touchDown",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"touchUp",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"markPinch",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"markPan",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"PAN_SEEN_DISTANCE",{enumerable:!0,get:function(){return _}});const n=250,t={pinchSeen:!1,panSeen:!1,maxTouches:0,lastTouchMs:0},o=(function({_worklet_11049420633063_init_data:n,SEQUENCE_GAP_MS:t,EMPTY_TOUCH_SEQUENCE:o}){const c=function(n,c,u){const s=c<=1&&u-n.lastTouchMs>t?o:n;return{pinchSeen:s.pinchSeen,panSeen:s.panSeen,maxTouches:Math.max(s.maxTouches,c),lastTouchMs:u}};return c.__closure={SEQUENCE_GAP_MS:t,EMPTY_TOUCH_SEQUENCE:o},c.__workletHash=0xa0ca4cab3e7,c.__initData=n,c})({_worklet_11049420633063_init_data:{code:"function touchDown_zoomTouchSequenceTs1(seq,touches,nowMs){const{SEQUENCE_GAP_MS,EMPTY_TOUCH_SEQUENCE}=this.__closure;const fresh=touches<=1&&nowMs-seq.lastTouchMs>SEQUENCE_GAP_MS;const base=fresh?EMPTY_TOUCH_SEQUENCE:seq;return{pinchSeen:base.pinchSeen,panSeen:base.panSeen,maxTouches:Math.max(base.maxTouches,touches),lastTouchMs:nowMs};}"},SEQUENCE_GAP_MS:n,EMPTY_TOUCH_SEQUENCE:t}),c=(function({_worklet_167148080333_init_data:n}){const t=function(n,t){return{pinchSeen:n.pinchSeen,panSeen:n.panSeen,maxTouches:n.maxTouches,lastTouchMs:t}};return t.__closure={},t.__workletHash=167148080333,t.__initData=n,t})({_worklet_167148080333_init_data:{code:"function touchUp_zoomTouchSequenceTs2(seq,nowMs){return{pinchSeen:seq.pinchSeen,panSeen:seq.panSeen,maxTouches:seq.maxTouches,lastTouchMs:nowMs};}"}}),u=(function({_worklet_2043914915502_init_data:n}){const t=function(n,t){return{pinchSeen:!0,panSeen:n.panSeen,maxTouches:Math.max(n.maxTouches,2),lastTouchMs:t}};return t.__closure={},t.__workletHash=2043914915502,t.__initData=n,t})({_worklet_2043914915502_init_data:{code:"function markPinch_zoomTouchSequenceTs3(seq,nowMs){return{pinchSeen:true,panSeen:seq.panSeen,maxTouches:Math.max(seq.maxTouches,2),lastTouchMs:nowMs};}"}}),s=(function({_worklet_9854814489352_init_data:n}){const t=function(n){return{pinchSeen:n.pinchSeen,panSeen:!0,maxTouches:n.maxTouches,lastTouchMs:n.lastTouchMs}};return t.__closure={},t.__workletHash=9854814489352,t.__initData=n,t})({_worklet_9854814489352_init_data:{code:"function markPan_zoomTouchSequenceTs4(seq){return{pinchSeen:seq.pinchSeen,panSeen:true,maxTouches:seq.maxTouches,lastTouchMs:seq.lastTouchMs};}"}}),_=12},1183,[]);
|
|
30
|
+
__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})`}},1184,[]);
|
|
31
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"zoomBoxHeight",{enumerable:!0,get:function(){return t}});const t=(function({_worklet_7669266679954_init_data:t,growBoxHeight:o}){const n=function(t,n){return n.fill?n.winHeight:n.isWideDetail?n.wideStreamH:n.pinchExpandsHeight?o(t,{rest:n.defaultHeight,max:n.maxHeight,growScale:n.growScale}):n.defaultHeight};return n.__closure={growBoxHeight:o},n.__workletHash=7669266679954,n.__initData=t,n})({_worklet_7669266679954_init_data:{code:"function zoomBoxHeight_zoomBoxTs1(scale,p){const{growBoxHeight}=this.__closure;if(p.fill)return p.winHeight;if(p.isWideDetail)return p.wideStreamH;if(!p.pinchExpandsHeight)return p.defaultHeight;return growBoxHeight(scale,{rest:p.defaultHeight,max:p.maxHeight,growScale:p.growScale});}"},growBoxHeight:r(d[0]).growBoxHeight})},1185,[1180]);
|
|
32
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";function t(t,n){const c=atob(t),o=new Uint8Array(c.length);for(let t=0;t<c.length;t+=1)o[t]=c.charCodeAt(t);return new Blob([o],{type:n})}Object.defineProperty(e,'__esModule',{value:!0}),e.saveSnapshot=async function(n,c){const o='image/jpeg',u=`${c}.jpg`;try{return{uri:URL.createObjectURL(t(n,o)),mime:o,fileName:u}}catch{return null}},r(d[0])},1186,{"0":109,"1":1221,"2":14,"paths":{}});
|
|
33
|
+
__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)(51),{visible:T,onRequestHide:y,paused:f,onTogglePause:v,showPlayPause:h,muted:P,onToggleMute:S,audio:k,hasTwoWayAudio:b,talking:D,onToggleTalk:_,onStartSystemPip:M,fullscreen:w,onToggleFullscreen:z,edgePad:B,timelineToggle:O,ptzToggle:x,activity:j}=c,{t:q}=(0,l.useTranslation)();let A;p[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,n.systemPipSupported)("web"),p[0]=A):A=p[0];const F=A;let H,R;p[1]!==k||p[2]!==P||p[3]!==S||p[4]!==q?(H=(0,n.muteDisc)({muted:P,onToggleMute:S,cluster:"left",t:q,audio:k}),p[1]=k,p[2]=P,p[3]=S,p[4]=q,p[5]=H):H=p[5];if(p[6]!==w||p[7]!==b||p[8]!==M||p[9]!==z||p[10]!==v||p[11]!==_||p[12]!==f||p[13]!==x||p[14]!==h||p[15]!==q||p[16]!==H||p[17]!==D||p[18]!==O){let t;R=[H],p[20]!==b||p[21]!==_||p[22]!==q||p[23]!==D?(t=(0,n.talkDisc)({hasTwoWayAudio:b,talking:D,onToggleTalk:_,cluster:"left",t:q}),p[20]=b,p[21]=_,p[22]=q,p[23]=D,p[24]=t):t=p[24];const l=t;if(l&&R.push(l),O){let t;p[25]!==q||p[26]!==O.dock||p[27]!==O.onSet?(t=(0,n.timelineDockDisc)({dock:O.dock,onSet:O.onSet,cluster:"left",t:q}),p[25]=q,p[26]=O.dock,p[27]=O.onSet,p[28]=t):t=p[28],R.push(t)}if(x){let t;p[29]!==x.onToggle||p[30]!==x.open||p[31]!==q?(t=(0,n.ptzDisc)({open:x.open,onToggle:x.onToggle,cluster:"left",t:q}),p[29]=x.onToggle,p[30]=x.open,p[31]=q,p[32]=t):t=p[32],R.push(t)}let s;h&&R.push({id:"play",icon:f?o.Play:o.Pause,label:q(f?"v2.streamBar.play":"v2.streamBar.pause"),onPress:v,cluster:"right"}),p[33]!==M||p[34]!==q?(s=(0,n.systemPipDisc)({supported:F,onStartSystemPip:M,cluster:"right",t:q}),p[33]=M,p[34]=q,p[35]=s):s=p[35];const u=s;if(u&&R.push(u),void 0!==z){const t=w?o.Minimize2:o.Maximize2;let l,s;p[36]!==w||p[37]!==q?(l=q(w?"v2.streamBar.exitFullscreen":"v2.streamBar.fullscreen"),p[36]=w,p[37]=q,p[38]=l):l=p[38],p[39]!==w||p[40]!==z||p[41]!==t||p[42]!==l?(s={id:"fullscreen",icon:t,label:l,active:w,onPress:z,cluster:"right"},p[39]=w,p[40]=z,p[41]=t,p[42]=l,p[43]=s):s=p[43],R.push(s)}p[6]=w,p[7]=b,p[8]=M,p[9]=z,p[10]=v,p[11]=_,p[12]=f,p[13]=x,p[14]=h,p[15]=q,p[16]=H,p[17]=D,p[18]=O,p[19]=R}else R=p[19];const W=R;let C;p[44]!==j||p[45]!==B||p[46]!==W||p[47]!==y||p[48]!==f||p[49]!==T?(C=(0,u.jsx)(s.OverlayDiscGroup,{visible:T,onRequestHide:y,holdOpen:f,items:W,edgePad:B,activity:j}),p[44]=j,p[45]=B,p[46]=W,p[47]=y,p[48]=f,p[49]=T,p[50]=C):C=p[50];return C};var t=r(d[0]);r(d[1]),r(d[2]);var o=r(d[3]),l=r(d[4]),s=r(d[5]),n=r(d[6]),u=r(d[7])},1187,[788,16,109,838,818,1153,1154,10]);
|
|
34
|
+
__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'}})},1188,[788,16,32,114,974,818,838,836,1263,1264,1153,1265,1189,10]);
|
|
35
|
+
__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},1189,[836]);
|
|
36
|
+
__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,"PTZ_OVERLAY_TEST_ID",{enumerable:!0,get:function(){return I}}),_e.PtzOverlay=function(e){const u=(0,t.c)(16),{deviceId:_,visible:v,edgePad:P,onInteract:S}=e,{width:w,height:j}=(0,c.useViewportSize)(),z=(0,s.useSafeAreaInsets)();if(!v)return null;let O;u[0]!==P||u[1]!==j||u[2]!==z.top||u[3]!==w?(O=(0,p.ptzOverlayLayout)({windowWidth:w,windowHeight:j,edgePad:P,topInset:z.top,discSize:f.OVERLAY_DISC_SIZE}),u[0]=P,u[1]=j,u[2]=z.top,u[3]=w,u[4]=O):O=u[4];const E=O;let H,W,A;u[5]!==E.bottom||u[6]!==E.left||u[7]!==E.maxHeight||u[8]!==E.maxWidth?(H=[y.panel,{left:E.left,bottom:E.bottom,maxWidth:E.maxWidth,maxHeight:E.maxHeight}],u[5]=E.bottom,u[6]=E.left,u[7]=E.maxHeight,u[8]=E.maxWidth,u[9]=H):H=u[9];u[10]!==_||u[11]!==S?(W=(0,x.jsx)(o.default,{contentContainerStyle:y.body,showsVerticalScrollIndicator:!1,bounces:!1,children:(0,x.jsx)(b.PtzControls,{deviceId:_,hasFeature:!0,onInteract:S})}),u[10]=_,u[11]=S,u[12]=W):W=u[12];u[13]!==H||u[14]!==W?(A=(0,x.jsx)(l.default,{style:n.default.absoluteFill,pointerEvents:"box-none",testID:I,children:(0,x.jsx)(h.GlassPanel,{style:H,children:W})}),u[13]=H,u[14]=W,u[15]=A):A=u[15];return A};var t=r(d[0]);r(d[1]);var o=e(r(d[2])),n=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]),f=r(d[9]),b=r(d[10]),p=r(d[11]),x=r(d[12]);const I='ptz-overlay';const y=n.default.create({panel:{position:'absolute'},body:{padding:u.SPACING.lg}})},1190,[788,16,138,32,114,273,974,836,1266,1153,878,1191,10]);
|
|
37
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PTZ_OVERLAY_MAX_WIDTH",{enumerable:!0,get:function(){return n}}),e.ptzOverlayLayout=function(o){const{windowWidth:u,windowHeight:c,edgePad:P,topInset:h,discSize:f}=o,l=P.left+t.SPACING.md,s=P.bottom+t.SPACING.md+f+t.SPACING.lg,A=Math.max(0,Math.min(n,u-l-P.right-t.SPACING.md)),I=Math.max(0,c-s-h-t.SPACING.md);return{left:l,bottom:s,maxWidth:A,maxHeight:I}};var t=r(d[0]);const n=320},1191,[836]);
|
|
38
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.aspectFromSample=c,e.useStreamAspect=function(n){const u=(0,t.c)(2);let l;u[0]!==n?(l=t=>c(t.samples[n]??null),u[0]=n,u[1]=l):l=u[1];return(0,s.useStreamDebugStore)(l)};var t=r(d[0]),n=r(d[1]),s=r(d[2]);const u=.5,l=4;function c(t){const s=t?.stats?.width??null,c=t?.stats?.height??null;if(null===s||null===c||s<=0||c<=0)return n.DEFAULT_VIDEO_ASPECT;const o=s/c;return o>=u&&o<=l?o:n.DEFAULT_VIDEO_ASPECT}},1192,[788,1077,1267]);
|
|
39
|
+
__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 v}});var t=r(d[0]),n=r(d[1]),o=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),f=r(d[8]),y=r(d[9]),b=r(d[10]),p=r(d[11]),x=r(d[12]);const S='#ffffff',j='rgba(0, 0, 0, 0.55)',v=(0,n.memo)(function(e){const b=(0,t.c)(124),{zone:j,onConfirm:v,onCancel:R}=e,{t:z}=(0,c.useTranslation)(),{colors:k}=(0,y.useTheme)();let I;b[0]===Symbol.for("react.memo_cache_sentinel")?(I={width:0,height:0},b[0]=I):I=b[0];const[T,E]=(0,n.useState)(I),[A,M]=(0,n.useState)("rect"===j?.kind?j.rect:null);let G;b[1]!==j?(G="polygon"===j?.kind?j.points:[],b[1]=j,b[2]=G):G=b[2];const[W,$]=(0,n.useState)(G),[D,N]=(0,n.useState)("polygon"===j?.kind?"polygon":"rect");let H;b[3]===Symbol.for("react.memo_cache_sentinel")?(H={x:0,y:0},b[3]=H):H=b[3];const F=(0,n.useRef)(H),O=(0,n.useRef)(!1);let U;b[4]===Symbol.for("react.memo_cache_sentinel")?(U=e=>{const{width:t,height:n}=e.nativeEvent.layout;E({width:t,height:n})},b[4]=U):U=b[4];const V=U;let L;b[5]===Symbol.for("react.memo_cache_sentinel")?(L=e=>{F.current={x:e.nativeEvent.locationX,y:e.nativeEvent.locationY},O.current=!1},b[5]=L):L=b[5];const X=L;let Y;b[6]!==T||b[7]!==D?(Y=e=>{if(O.current=!0,"rect"!==D)return;const t=(0,p.dragToRect)(F.current.x,F.current.y,e.nativeEvent.locationX,e.nativeEvent.locationY,T.width,T.height);null!==t&&M(t)},b[6]=T,b[7]=D,b[8]=Y):Y=b[8];const q=Y;let Z;b[9]!==T||b[10]!==D?(Z=()=>{if("polygon"!==D||O.current)return;if(T.width<=0||T.height<=0)return;const e={x:Math.min(1,Math.max(0,F.current.x/T.width)),y:Math.min(1,Math.max(0,F.current.y/T.height))};$(t=>[...t,e])},b[9]=T,b[10]=D,b[11]=Z):Z=b[11];const B=Z;let J;b[12]===Symbol.for("react.memo_cache_sentinel")?(J=()=>$(_),b[12]=J):J=b[12];const K=J;let Q;b[13]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>$([]),b[13]=Q):Q=b[13];const ee=Q;let te,ne;b[14]!==D||b[15]!==W||b[16]!==A?(te="rect"===D?null===A?null:(0,p.rectShape)(A):W.length>=3?{kind:"polygon",points:W}:null,ne=null!==te&&(0,p.isShapeUsable)(te),b[14]=D,b[15]=W,b[16]=A,b[17]=te,b[18]=ne):(te=b[17],ne=b[18]);const oe=ne;let le;b[19]!==te||b[20]!==v?(le=()=>{null!==te&&(0,p.isShapeUsable)(te)&&v(te)},b[19]=te,b[20]=v,b[21]=le):le=b[21];const ie=le;let re,se,ae,ce,de,ue;b[22]===Symbol.for("react.memo_cache_sentinel")?(re=[s.default.absoluteFill,C.container],b[22]=re):re=b[22],b[23]!==D||b[24]!==z?(se=z("polygon"===D?"v2.theater.zoneHintPolygon":"v2.theater.zoneHint"),b[23]=D,b[24]=z,b[25]=se):se=b[25],b[26]!==se?(ae=(0,x.jsx)(o.default,{style:C.hintPill,pointerEvents:"none",children:(0,x.jsx)(l.default,{style:C.hintText,numberOfLines:2,children:se})}),b[26]=se,b[27]=ae):ae=b[27],b[28]!==k||b[29]!==D?(ce="rect"===D&&{backgroundColor:k.primary},b[28]=k,b[29]=D,b[30]=ce):ce=b[30],b[31]!==ce?(de=[C.modeChip,ce],b[31]=ce,b[32]=de):de=b[32],b[33]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>N("rect"),b[33]=ue):ue=b[33];const he="rect"===D;let fe,ye,ge,me,be,pe,xe,Se;b[34]!==he?(fe={selected:he},b[34]=he,b[35]=fe):fe=b[35],b[36]===Symbol.for("react.memo_cache_sentinel")?(ye=(0,x.jsx)(f.Square,{size:14,color:S}),b[36]=ye):ye=b[36],b[37]!==z?(ge=z("v2.theater.zoneModeRect"),b[37]=z,b[38]=ge):ge=b[38],b[39]!==ge?(me=(0,x.jsx)(l.default,{style:C.modeText,children:ge}),b[39]=ge,b[40]=me):me=b[40],b[41]!==de||b[42]!==fe||b[43]!==me?(be=(0,x.jsxs)(i.default,{style:de,onPress:ue,accessibilityRole:"button",accessibilityState:fe,children:[ye,me]}),b[41]=de,b[42]=fe,b[43]=me,b[44]=be):be=b[44],b[45]!==k||b[46]!==D?(pe="polygon"===D&&{backgroundColor:k.primary},b[45]=k,b[46]=D,b[47]=pe):pe=b[47],b[48]!==pe?(xe=[C.modeChip,pe],b[48]=pe,b[49]=xe):xe=b[49],b[50]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>N("polygon"),b[50]=Se):Se=b[50];const je="polygon"===D;let ve,Ce,we,Pe,Re,ze,ke,Ie,Te,Ee,Ae,Me,Ge,We;b[51]!==je?(ve={selected:je},b[51]=je,b[52]=ve):ve=b[52],b[53]===Symbol.for("react.memo_cache_sentinel")?(Ce=(0,x.jsx)(f.Pentagon,{size:14,color:S}),b[53]=Ce):Ce=b[53],b[54]!==z?(we=z("v2.theater.zoneModePolygon"),b[54]=z,b[55]=we):we=b[55],b[56]!==we?(Pe=(0,x.jsx)(l.default,{style:C.modeText,children:we}),b[56]=we,b[57]=Pe):Pe=b[57],b[58]!==xe||b[59]!==ve||b[60]!==Pe?(Re=(0,x.jsxs)(i.default,{style:xe,onPress:Se,accessibilityRole:"button",accessibilityState:ve,children:[Ce,Pe]}),b[58]=xe,b[59]=ve,b[60]=Pe,b[61]=Re):Re=b[61],b[62]!==be||b[63]!==Re?(ze=(0,x.jsxs)(o.default,{style:C.modeWrap,pointerEvents:"box-none",children:[be,Re]}),b[62]=be,b[63]=Re,b[64]=ze):ze=b[64],b[65]!==ae||b[66]!==ze?(ke=(0,x.jsxs)(o.default,{style:C.topColumn,pointerEvents:"box-none",children:[ae,ze]}),b[65]=ae,b[66]=ze,b[67]=ke):ke=b[67],b[68]!==T||b[69]!==k||b[70]!==D||b[71]!==A?(Ie="rect"===D&&null!==A&&T.width>0?(0,x.jsx)(o.default,{pointerEvents:"none",style:[C.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,b[68]=T,b[69]=k,b[70]=D,b[71]=A,b[72]=Ie):Ie=b[72],b[73]!==T||b[74]!==k||b[75]!==D||b[76]!==W?(Te="polygon"===D&&W.length>0&&T.width>0?(0,x.jsxs)(h.default,{style:s.default.absoluteFill,pointerEvents:"none",children:[W.length>=3?(0,x.jsx)(u.Polygon,{points:W.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:W.map(e=>`${e.x*T.width},${e.y*T.height}`).join(" "),fill:"none",stroke:k.warning,strokeWidth:1.5}),W.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,b[73]=T,b[74]=k,b[75]=D,b[76]=W,b[77]=Te):Te=b[77],b[78]!==D||b[79]!==W||b[80]!==z?(Ee="polygon"===D&&W.length>0?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i.default,{style:C.button,onPress:K,accessibilityRole:"button",children:(0,x.jsx)(f.Undo2,{size:14,color:S})}),(0,x.jsx)(i.default,{style:C.button,onPress:ee,accessibilityRole:"button",children:(0,x.jsx)(l.default,{style:C.buttonText,children:z("v2.theater.zoneClearPoints")})})]}):null,b[78]=D,b[79]=W,b[80]=z,b[81]=Ee):Ee=b[81],b[82]!==z?(Ae=z("v2.theater.zoneCancel"),b[82]=z,b[83]=Ae):Ae=b[83],b[84]!==Ae?(Me=(0,x.jsx)(l.default,{style:C.buttonText,children:Ae}),b[84]=Ae,b[85]=Me):Me=b[85],b[86]!==R||b[87]!==Me?(Ge=(0,x.jsx)(i.default,{style:C.button,onPress:R,accessibilityRole:"button",children:Me}),b[86]=R,b[87]=Me,b[88]=Ge):Ge=b[88],b[89]!==k||b[90]!==oe?(We=oe&&{backgroundColor:k.primary},b[89]=k,b[90]=oe,b[91]=We):We=b[91];const $e=!oe&&C.buttonDisabled;let De;b[92]!==We||b[93]!==$e?(De=[C.button,We,$e],b[92]=We,b[93]=$e,b[94]=De):De=b[94];const Ne=!oe,He=!oe;let Fe,Oe,Ue,Ve,Le,Xe,Ye,qe;return b[95]!==He?(Fe={disabled:He},b[95]=He,b[96]=Fe):Fe=b[96],b[97]!==k||b[98]!==oe?(Oe=oe&&{color:k.primaryForeground},b[97]=k,b[98]=oe,b[99]=Oe):Oe=b[99],b[100]!==Oe?(Ue=[C.buttonText,Oe],b[100]=Oe,b[101]=Ue):Ue=b[101],b[102]!==z?(Ve=z("v2.theater.zoneConfirm"),b[102]=z,b[103]=Ve):Ve=b[103],b[104]!==Ue||b[105]!==Ve?(Le=(0,x.jsx)(l.default,{style:Ue,children:Ve}),b[104]=Ue,b[105]=Ve,b[106]=Le):Le=b[106],b[107]!==ie||b[108]!==De||b[109]!==Ne||b[110]!==Fe||b[111]!==Le?(Xe=(0,x.jsx)(i.default,{style:De,onPress:ie,disabled:Ne,accessibilityRole:"button",accessibilityState:Fe,children:Le}),b[107]=ie,b[108]=De,b[109]=Ne,b[110]=Fe,b[111]=Le,b[112]=Xe):Xe=b[112],b[113]!==Ee||b[114]!==Ge||b[115]!==Xe?(Ye=(0,x.jsxs)(o.default,{style:C.actions,pointerEvents:"box-none",children:[Ee,Ge,Xe]}),b[113]=Ee,b[114]=Ge,b[115]=Xe,b[116]=Ye):Ye=b[116],b[117]!==q||b[118]!==B||b[119]!==ke||b[120]!==Ie||b[121]!==Te||b[122]!==Ye?(qe=(0,x.jsxs)(o.default,{style:re,onLayout:V,onStartShouldSetResponder:w,onMoveShouldSetResponder:P,onResponderGrant:X,onResponderMove:q,onResponderRelease:B,children:[ke,Ie,Te,Ye]}),b[117]=q,b[118]=B,b[119]=ke,b[120]=Ie,b[121]=Te,b[122]=Ye,b[123]=qe):qe=b[123],qe}),C=s.default.create({modeWrap:{alignSelf:'flex-end',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)'},topColumn:{position:'absolute',top:b.SPACING.md,left:b.SPACING.md,right:b.SPACING.md,gap:b.SPACING.sm},hintPill:{alignSelf:'center',backgroundColor:j,paddingHorizontal:b.SPACING.md,paddingVertical:b.SPACING.xs+2,borderRadius:b.RADIUS.lg,maxWidth:'90%'},hintText:{color:S,fontSize:11,fontWeight:'600',textAlign:'center'},zoneRect:{position:'absolute',borderWidth:2,borderRadius:2},actions:{position:'absolute',right:b.SPACING.md,bottom:b.SPACING.md,flexDirection:'row',alignItems:'center',gap:6},button:{flexDirection:'row',alignItems:'center',gap:5,paddingHorizontal:9,paddingVertical:5,borderRadius:999,backgroundColor:j},buttonDisabled:{opacity:.5},buttonText:{color:S,fontSize:11,fontWeight:'600'}});function _(e){return e.slice(0,-1)}function w(){return!0}function P(){return!0}},1193,[788,16,114,193,247,32,818,1268,838,790,836,1269,10]);
|
|
40
|
+
__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}})},1194,[788,16,114,32,1268,790,10]);
|
|
41
|
+
__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'}})},1195,[788,16,114,32,828,1196,1199,1204,10]);
|
|
42
|
+
__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 n}});var s=r(d[0]),o=r(d[1]),t=r(d[2]);function c(s,o){return{workspace:o,wallOptions:0===o.members.length?t.NO_WALL_OPTIONS:s.wallOptions}}const n=(0,s.create)(s=>({workspace:o.EMPTY_WORKSPACE,wallOptions:t.NO_WALL_OPTIONS,setWallOptions:o=>s(s=>({wallOptions:{...s.wallOptions,...o}})),add:t=>s(s=>c(s,(0,o.addMember)(s.workspace,t))),setMembers:t=>s(s=>c(s,(0,o.setMembers)(s.workspace,t))),remove:t=>s(s=>c(s,(0,o.removeMember)(s.workspace,t))),setPrimaryCamera:t=>s(s=>({workspace:(0,o.setPrimary)(s.workspace,t)})),resize:(t,c)=>s(s=>({workspace:(0,o.resizeMember)(s.workspace,t,c)})),reconcile:t=>s(s=>c(s,(0,o.reconcileMembers)(s.workspace,t))),clear:()=>s({workspace:o.EMPTY_WORKSPACE,wallOptions:t.NO_WALL_OPTIONS})}))},1196,[1270,1197,1198]);
|
|
43
|
+
__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={...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:{...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}},1197,[]);
|
|
44
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NO_WALL_OPTIONS",{enumerable:!0,get:function(){return o}}),e.gateLiveHighlight=u,e.resolveWorkspaceWall=function(o,h,c){const s=h.highlightOn??o.highlight.enabled,b={...(y=o.highlight,(0,t.withHighlightDefaults)({motion:y.motion,audio:y.audio,audioDb:y.audioDb,audioHoldSec:y.audioHoldSec,detection:y.detection,detectionHoldSec:y.detectionHoldSec,detectionClasses:y.detectionClasses,clusterLabel:y.clusterLabel})),...h.highlight??{}},f=h.layers??(o.showBoxes?l:n);var y;return{quality:h.quality??o.quality,layout:h.layout??'auto',highlightOn:s,highlightSettings:b,highlight:u({...o.highlight,...b,enabled:s},c),layers:f,showBoxes:f.includes('objects'),activeOnly:h.activeOnly??!1}},e.toggleWallLayer=function(t,o){return t.includes(o)?t.filter(t=>t!==o):[...t,o]},e.toggleWallAudio=function(t,o){return t.length>0?[]:[...o]};var t=r(d[0]);const o={},l=['objects'],n=[];function u(t,o){return o?t:{...t,enabled:!1,motion:!1,detection:!1,audio:'off'}}},1198,[1033]);
|
|
45
|
+
__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}},1199,[788,16,114,193,138,247,32,790,836,828,839,833,832,791,849,851,1271,850,1200,1201,1122,838,834,818,1272,1196,1203,1204,10]);
|
|
46
|
+
__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 p}});var t=r(d[0]),o=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=e(r(d[6])),h=r(d[7]),f=r(d[8]),S=r(d[9]),b=r(d[10]),x=r(d[11]),C=r(d[12]),R=r(d[13]),I=r(d[14]),j=r(d[15]);const p=(0,o.memo)(function(e){const o=(0,t.c)(53),{visible:u,onClose:b}=e,{colors:p}=(0,S.useTheme)(),{t:v}=(0,h.useTranslation)(),G=(0,I.useReelHighlightStore)(H),N=(0,I.useReelHighlightStore)(A),T=(0,I.useReelHighlightStore)(P);let k,B,_,z,D,w,U,E,M,L,O,V,W,X,q,F,J,K,Q;return o[0]!==p.backgroundElevated?(k=[y.sheet,{backgroundColor:p.backgroundElevated}],o[0]=p.backgroundElevated,o[1]=k):k=o[1],o[2]!==p.foreground?(B=[y.title,{color:p.foreground}],o[2]=p.foreground,o[3]=B):B=o[3],o[4]!==v?(_=v("v2.reelHighlight.title"),o[4]=v,o[5]=_):_=o[5],o[6]!==B||o[7]!==_?(z=(0,j.jsx)(l.default,{style:B,children:_}),o[6]=B,o[7]=_,o[8]=z):z=o[8],o[9]!==v?(D=v("v2.reelHighlight.close"),o[9]=v,o[10]=D):D=o[10],o[11]!==p.surface?(w=[y.iconBtn,{backgroundColor:p.surface}],o[11]=p.surface,o[12]=w):w=o[12],o[13]!==p.foreground?(U=(0,j.jsx)(f.X,{size:18,color:p.foreground}),o[13]=p.foreground,o[14]=U):U=o[14],o[15]!==b||o[16]!==D||o[17]!==w||o[18]!==U?(E=(0,j.jsx)(s.default,{onPress:b,hitSlop:10,accessibilityRole:"button",accessibilityLabel:D,style:w,children:U}),o[15]=b,o[16]=D,o[17]=w,o[18]=U,o[19]=E):E=o[19],o[20]!==z||o[21]!==E?(M=(0,j.jsxs)(n.default,{style:y.header,children:[z,E]}),o[20]=z,o[21]=E,o[22]=M):M=o[22],o[23]!==v?(L=v("v2.reelHighlight.section"),o[23]=v,o[24]=L):L=o[24],o[25]!==G||o[26]!==N?(O=(0,j.jsx)(R.HighlightTriggerRows,{highlight:G,onSetHighlight:N}),o[25]=G,o[26]=N,o[27]=O):O=o[27],o[28]!==L||o[29]!==O?(V=(0,j.jsx)(C.Section,{title:L,children:O}),o[28]=L,o[29]=O,o[30]=V):V=o[30],o[31]!==p.surface?(W=[y.resetBtn,{backgroundColor:p.surface}],o[31]=p.surface,o[32]=W):W=o[32],o[33]!==p.foreground?(X=[y.resetText,{color:p.foreground}],o[33]=p.foreground,o[34]=X):X=o[34],o[35]!==v?(q=v("v2.reelHighlight.reset"),o[35]=v,o[36]=q):q=o[36],o[37]!==X||o[38]!==q?(F=(0,j.jsx)(l.default,{style:X,children:q}),o[37]=X,o[38]=q,o[39]=F):F=o[39],o[40]!==T||o[41]!==W||o[42]!==F?(J=(0,j.jsx)(s.default,{onPress:T,accessibilityRole:"button",style:W,children:F}),o[40]=T,o[41]=W,o[42]=F,o[43]=J):J=o[43],o[44]!==V||o[45]!==J?(K=(0,j.jsxs)(c.default,{contentContainerStyle:y.scroll,children:[V,J]}),o[44]=V,o[45]=J,o[46]=K):K=o[46],o[47]!==b||o[48]!==k||o[49]!==K||o[50]!==M||o[51]!==u?(Q=(0,j.jsxs)(x.SheetModal,{visible:u,onClose:b,sheetStyle:k,children:[M,K]}),o[47]=b,o[48]=k,o[49]=K,o[50]=M,o[51]=u,o[52]=Q):Q=o[52],Q}),y=u.default.create({sheet:{maxHeight:'85%',borderTopLeftRadius:b.RADIUS.xl,borderTopRightRadius:b.RADIUS.xl,paddingHorizontal:b.SPACING.md,paddingTop:b.SPACING.md},header:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',paddingBottom:b.SPACING.sm},title:{fontSize:18,fontWeight:'700'},iconBtn:{width:32,height:32,borderRadius:b.RADIUS.md,alignItems:'center',justifyContent:'center'},scroll:{gap:b.SPACING.lg,paddingVertical:b.SPACING.sm,paddingBottom:b.SPACING.xl},resetBtn:{alignItems:'center',paddingVertical:b.SPACING.md,borderRadius:b.RADIUS.md,marginHorizontal:b.SPACING.md},resetText:{fontSize:15,fontWeight:'600'}});function H(e){return e.highlight}function A(e){return e.setHighlight}function P(e){return e.reset}},1200,[788,16,114,193,247,138,32,818,838,790,836,870,871,1273,1122,10]);
|
|
47
|
+
__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])},1201,[788,1247,848,1248,1202,1249,1123]);
|
|
48
|
+
__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])},1202,[788,16]);
|
|
49
|
+
__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},1203,[]);
|
|
50
|
+
__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},1204,[]);
|
|
51
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.WorkspaceStage=function(A){const I=(0,t.c)(91),{devices:C,primary:j,liveOverlaysVisible:G,onGoTo:L,onCellPanel:x}=A,{t:z}=(0,n.useTranslation)(),D=(0,o.useWorkspaceStore)(_),R=(0,o.useWorkspaceStore)(P),E=(0,o.useWorkspaceStore)(w),H=(0,o.useWorkspaceStore)(q),K=(0,o.useWorkspaceStore)(b),M=(0,o.useWorkspaceStore)(k);let B;if(I[0]!==D){B={};for(const t of Object.keys(D))B[t]=D[Number(t)];I[0]=D,I[1]=B}else B=I[1];const F=B,{data:N}=(0,s.useCameras)(),[Q,U]=(0,l.useState)(p),[V,J]=(0,l.useState)(f);let X;if(I[2]!==N||I[3]!==C){let t;I[5]!==N?(t=t=>(N??[]).find(l=>l.id===t),I[5]=N,I[6]=t):t=I[6],X=C.map(t).filter(S),I[2]=N,I[3]=C,I[4]=X}else X=I[4];const Y=X;let Z;I[7]!==Y?(Z=new Set(Y.filter(W).map(T)),I[7]=Y,I[8]=Z):Z=I[8];const $=Z;let ee;if(I[9]!==$||I[10]!==C||I[11]!==Q){let t;I[13]!==$?(t=t=>({id:t,batteryPowered:$.has(t)}),I[13]=$,I[14]=t):t=I[14],ee=(0,c.heldTileIds)(C.map(t),Q),I[9]=$,I[10]=C,I[11]=Q,I[12]=ee}else ee=I[12];const te=ee;let le;I[15]!==$?(le=t=>{U(l=>(0,c.toggleTileTransport)(l,t,$.has(t)))},I[15]=$,I[16]=le):le=I[16];const ie=le;let ne;I[17]===Symbol.for("react.memo_cache_sentinel")?(ne=t=>{J(l=>l.includes(t)?l.filter(l=>l!==t):[...l,t])},I[17]=ne):ne=I[17];const oe=ne;let ae;I[18]!==M?(ae=(t,l,n)=>M(t,{cw:l,ch:n}),I[18]=M,I[19]=ae):ae=I[19];const se=ae;let re;I[20]!==G||I[21]!==j||I[22]!==R?(re=(0,O.resolveWorkspaceWall)(j,R,G),I[20]=G,I[21]=j,I[22]=R,I[23]=re):re=I[23];const ce=re,[ge,ue]=(0,l.useState)(null);let he;I[24]!==V?(he=new Set(V),I[24]=V,I[25]=he):he=I[25];const ye=he,de=ce.quality,Oe=ce.highlight,ve=ce.layers,fe=ce.layout,pe=ce.activeOnly,Se=null!==ge;let me,Te,We;I[26]===Symbol.for("react.memo_cache_sentinel")?(me=()=>ue(null),I[26]=me):me=I[26];I[27]!==z?(Te=z("v2.cameraDetail.close"),I[27]=z,I[28]=Te):Te=I[28];I[29]!==Se||I[30]!==Te?(We=(0,v.jsx)(h.GridTapDismiss,{active:Se,onDismiss:me,accessibilityLabel:Te}),I[29]=Se,I[30]=Te,I[31]=We):We=I[31];const ke=Q.pausedIds.size>0;let be;I[32]!==$||I[33]!==C?(be=()=>U(t=>(0,c.toggleWallTransport)(t,C,$)),I[32]=$,I[33]=C,I[34]=be):be=I[34];const qe=V.length>0;let we,Pe,_e,Ae,Ie,Ce,je,Ge,Le;I[35]!==C?(we=()=>J(t=>(0,O.toggleWallAudio)(t,C)),I[35]=C,I[36]=we):we=I[36];I[37]!==E?(Pe=t=>E({quality:t}),I[37]=E,I[38]=Pe):Pe=I[38];I[39]!==E?(_e=t=>E({layout:t}),I[39]=E,I[40]=_e):_e=I[40];I[41]!==E||I[42]!==ce.highlightOn?(Ae=()=>E({highlightOn:!ce.highlightOn}),I[41]=E,I[42]=ce.highlightOn,I[43]=Ae):Ae=I[43];I[44]!==E||I[45]!==R.highlight?(Ie=t=>E({highlight:{...R.highlight,...t}}),I[44]=E,I[45]=R.highlight,I[46]=Ie):Ie=I[46];I[47]!==E||I[48]!==ce.layers?(Ce=t=>E({layers:(0,O.toggleWallLayer)(ce.layers,t)}),I[47]=E,I[48]=ce.layers,I[49]=Ce):Ce=I[49];I[50]!==E||I[51]!==ce.activeOnly?(je=()=>E({activeOnly:!ce.activeOnly}),I[50]=E,I[51]=ce.activeOnly,I[52]=je):je=I[52];I[53]!==ye||I[54]!==ge||I[55]!==Y||I[56]!==ke||I[57]!==be||I[58]!==qe||I[59]!==we||I[60]!==Pe||I[61]!==_e||I[62]!==Ae||I[63]!==Ie||I[64]!==Ce||I[65]!==je||I[66]!==ce.activeOnly||I[67]!==ce.highlightOn||I[68]!==ce.highlightSettings||I[69]!==ce.layers||I[70]!==ce.layout||I[71]!==ce.quality?(Ge=(0,v.jsx)(u.GridControlBar,{docked:!0,anyPaused:ke,onTogglePause:be,cameras:Y,audioOnIds:ye,onToggleAudio:oe,anyAudioOn:qe,onToggleMassAudio:we,quality:ce.quality,onSelectQuality:Pe,layout:ce.layout,onSelectLayout:_e,highlightOn:ce.highlightOn,onToggleHighlight:Ae,highlightSettings:ce.highlightSettings,onSetHighlightSettings:Ie,layers:ce.layers,onToggleLayer:Ce,activeOnly:ce.activeOnly,onToggleActiveOnly:je,panelKey:ge,onPanelKey:ue}),I[53]=ye,I[54]=ge,I[55]=Y,I[56]=ke,I[57]=be,I[58]=qe,I[59]=we,I[60]=Pe,I[61]=_e,I[62]=Ae,I[63]=Ie,I[64]=Ce,I[65]=je,I[66]=ce.activeOnly,I[67]=ce.highlightOn,I[68]=ce.highlightSettings,I[69]=ce.layers,I[70]=ce.layout,I[71]=ce.quality,I[72]=Ge):Ge=I[72];I[73]!==V||I[74]!==H||I[75]!==C||I[76]!==x||I[77]!==L||I[78]!==ie||I[79]!==se||I[80]!==te||I[81]!==K||I[82]!==F||I[83]!==We||I[84]!==Ge||I[85]!==ce.activeOnly||I[86]!==ce.highlight||I[87]!==ce.layers||I[88]!==ce.layout||I[89]!==ce.quality?(Le=(0,v.jsx)(y.WorkspaceGrid,{devices:C,quality:de,highlight:Oe,layers:ve,layoutChoice:fe,activeOnly:pe,onGoTo:L,onCellPanel:x,onClose:H,onRemove:K,onResize:se,spans:F,audioOnIds:V,pausedIds:te,onAudioToggle:oe,onPauseToggle:ie,cellsOverlay:We,footer:Ge}),I[73]=V,I[74]=H,I[75]=C,I[76]=x,I[77]=L,I[78]=ie,I[79]=se,I[80]=te,I[81]=K,I[82]=F,I[83]=We,I[84]=Ge,I[85]=ce.activeOnly,I[86]=ce.highlight,I[87]=ce.layers,I[88]=ce.layout,I[89]=ce.quality,I[90]=Le):Le=I[90];return Le};var t=r(d[0]),l=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]),c=r(d[5]),u=r(d[6]),h=r(d[7]),y=r(d[8]),O=r(d[9]),v=r(d[10]);const f=[],p={pausedIds:new Set,startedIds:new Set};function S(t){return void 0!==t}function T(t){return t.id}function W(t){return t.features.includes(s.FEATURE.battery)}function k(t){return t.resize}function b(t){return t.remove}function q(t){return t.clear}function w(t){return t.setWallOptions}function P(t){return t.wallOptions}function _(t){return t.workspace.cells}},1205,[788,16,818,1196,828,1229,1274,1275,1206,1198,10]);
|
|
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}),Object.defineProperty(_e,"WORKSPACE_GRID_TEST_ID",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"WORKSPACE_GRID_FOOTER_TEST_ID",{enumerable:!0,get:function(){return R}}),_e.WorkspaceGrid=function({devices:e,quality:t,highlight:s,layers:f,layoutChoice:I,activeOnly:_,onGoTo:A,onCellPanel:E,onClose:M,onRemove:G,onResize:W,spans:k,audioOnIds:D,pausedIds:N,onAudioToggle:L,onPauseToggle:q,cellsOverlay:H,footer:V}){const{t:B}=(0,c.useTranslation)(),{colors:F}=(0,p.useTheme)(),U=(0,l.useMemo)(()=>z(F),[F]),{data:K}=(0,y.useCameras)(),$=(0,v.useCanActuate)(),X=(0,l.useMemo)(()=>{const t=new Map((K??[]).map(e=>[e.id,e]));return e.flatMap(e=>{const l=t.get(e);return void 0===l?[]:[l]})},[K,e]),Y=(0,l.useMemo)(()=>$?X.filter(e=>e.features.includes(y.FEATURE.ptz)).map(e=>e.id):j,[$,X]),J=(0,l.useMemo)(()=>X.map(e=>e.id),[X]),Q=(0,O.useCameraPrefsStore)(e=>e.prefs.byId),Z=(0,O.useCameraPrefsStore)(e=>e.hydrate),ee=(0,P.useDeviceSettingsStore)(e=>e.settings.overlaySize);(0,l.useEffect)(()=>{Z()},[Z]);const te=(0,l.useMemo)(()=>(0,S.buildTileOverlayMap)(J.map(e=>({deviceId:e,overlay:Q[e]?.overlay??x.OVERLAY_DEFAULTS})),ee),[J,Q,ee]),{width:le,height:oe}=(0,u.useViewportSize)(),ne=`${le}x${oe}`,[se,ae]=(0,l.useState)(null),ie=(0,l.useCallback)(e=>{const{width:t,height:l}=e.nativeEvent.layout;t<=0||l<=0||ae(e=>null!==e&&e.w===t&&e.h===l&&e.stamp===ne?e:{w:t,h:l,stamp:ne})},[ne]),re=null!==se&&se.stamp===ne?se:null,ue=Object.keys(k).length>0,de='auto'!==I,ce=(0,l.useMemo)(()=>ue||de||null===re?null:(0,C.resolvePrimaryWallSpan)(J.length,re.w,re.h),[ue,de,re,J.length]),he=J[0],pe=(0,l.useMemo)(()=>null===ce||ce.span<=1||void 0===he?k:{[String(he)]:{cw:ce.span,ch:ce.span}},[ce,he,k]),ge=null!==ce&&ce.span>1?ce.cols:I,fe=f.includes('objects');return(0,T.jsxs)(o.default,{testID:w,style:U.root,children:[(0,T.jsxs)(o.default,{style:U.content,onLayout:ie,children:[(0,T.jsx)(b.GridLiveEmbed,{devices:J,quality:t,layout:ge,showName:!0,audioOnIds:D,pausedIds:N,onAudioToggle:L,onPauseToggle:q,ptzIds:Y,highlight:s,showBoxes:fe,activeOnly:_,overlays:te,onTileOpen:A,onPtzOpen:e=>E('ptz',e),onCellPanelOpen:E,editable:!0,spans:pe,onTileRemove:G,onTileResize:W}),H]}),void 0!==V?(0,T.jsx)(o.default,{testID:R,style:U.footer,children:V}):null,(0,T.jsx)(n.default,{onPress:M,hitSlop:8,accessibilityRole:"button",accessibilityLabel:B('v2.cameraShelf.closeView'),style:({pressed:e})=>[U.close,{opacity:e?.7:1}],children:(0,T.jsx)(h.X,{size:16,color:"#fafaf9"})})]})},_e.NativeWorkspaceWall=_;var t=r(d[0]),l=r(d[1]),o=e(r(d[2])),n=e(r(d[3])),s=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]),v=r(d[12]),b=r(d[13]),I=r(d[14]),C=r(d[15]),S=r(d[16]),x=r(d[17]),O=r(d[18]),P=r(d[19]),T=r(d[20]);const w='workspace-grid',R='workspace-grid-footer';const j=[];function _(e){const l=(0,t.c)(15),{cameras:n,quality:s,ptzIds:u,layers:c,layout:h,audioOnIds:p,pausedIds:f,box:y,onCellPanel:v}=e,b=void 0===h?"auto":h;let S;l[0]!==y||l[1]!==n.length||l[2]!==b?(S=null===y?null:(0,C.computeGridLayout)(n.length,y.w,y.h,b),l[0]=y,l[1]=n.length,l[2]=b,l[3]=S):S=l[3];const x=S;let O,P;return l[4]!==p||l[5]!==n||l[6]!==c||l[7]!==x||l[8]!==v||l[9]!==f||l[10]!==u||l[11]!==s?(O=null!==x&&x.cellW>0?(0,T.jsx)(I.GridWall,{cameras:n,layout:x,showName:!0,quality:s,ptzIds:u,layers:c,muted:0===p.length,paused:f.length>0,onCellPanelOpen:v}):null,l[4]=p,l[5]=n,l[6]=c,l[7]=x,l[8]=v,l[9]=f,l[10]=u,l[11]=s,l[12]=O):O=l[12],l[13]!==O?(P=(0,T.jsx)(o.default,{style:A.nativeBox,children:O}),l[13]=O,l[14]=P):P=l[14],P}const A=s.default.create({nativeBox:{flex:1,minHeight:0,backgroundColor:'#000'}});function z(e){return s.default.create({root:{flex:1,minHeight:0,alignSelf:'stretch',borderRadius:f.RADIUS.md,overflow:'hidden',backgroundColor:'#000',borderWidth:s.default.hairlineWidth,borderColor:e.border},content:{flex:1,minHeight:0},footer:{alignItems:'center',paddingVertical:f.SPACING.xs,paddingHorizontal:f.SPACING.xs},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)'}})}},1206,[788,16,114,247,32,109,974,818,838,790,836,828,833,1276,1277,998,1278,1251,1126,1062,10]);
|
|
53
|
+
__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}},1207,[]);
|
|
54
|
+
__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))}}}},1208,[]);
|
|
55
|
+
__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)}},1209,[]);
|
|
56
|
+
__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}},1210,[1279]);
|
|
57
|
+
__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'},1211,[1279,995,1210,1240]);
|
|
58
|
+
__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}},1212,[788,16,218,109,819,835,848,1247,1280,1281]);
|
|
59
|
+
__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)(83),{deviceId:h,enabled:C}=e,{t:j}=(0,_.useTranslation)(),{colors:D}=(0,b.useTheme)(),E=(0,p.useStyleScaler)(),M=(0,p.useScaledPx)(),{lastPressedAt:P,ringingNow:R}=(0,y.useDoorbell)(h,C),[k,N]=(0,n.useState)(A);let T,G;s[0]!==C||s[1]!==P||s[2]!==R?(T=()=>{if(!C||R||null===P)return;const e=setInterval(()=>N(Date.now()),v);return()=>clearInterval(e)},G=[C,R,P],s[0]=C,s[1]=P,s[2]=R,s[3]=T,s[4]=G):(T=s[3],G=s[4]);(0,n.useEffect)(T,G);const z=(0,u.useSharedValue)(1);let B,O;s[5]!==z||s[6]!==R?(B=()=>{if(R)return z.value=(0,u.withRepeat)((0,u.withSequence)((0,u.withTiming)(.4,{duration:S,easing:u.Easing.inOut(u.Easing.ease)}),(0,u.withTiming)(1,{duration:S,easing:u.Easing.inOut(u.Easing.ease)})),-1,!1),()=>(0,u.cancelAnimation)(z);z.value=(0,u.withTiming)(1,{duration:150})},O=[z,R],s[5]=z,s[6]=R,s[7]=B,s[8]=O):(B=s[7],O=s[8]);(0,n.useEffect)(B,O);const V=(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:z}));if(!C)return null;if(R){let e;s[9]!==E?(e=E(I.badge),s[9]=E,s[10]=e):e=s[10];const t=`${D.primary}26`;let n,u,_,b,h,y,p,S,v,w,A;return s[11]!==t?(n={backgroundColor:t},s[11]=t,s[12]=n):n=s[12],s[13]!==e||s[14]!==n?(u=[e,n],s[13]=e,s[14]=n,s[15]=u):u=s[15],s[16]!==M?(_=M(13),s[16]=M,s[17]=_):_=s[17],s[18]!==D.primary||s[19]!==_?(b=(0,x.jsx)(f.BellRing,{size:_,color:D.primary}),s[18]=D.primary,s[19]=_,s[20]=b):b=s[20],s[21]!==V||s[22]!==b?(h=(0,x.jsx)(c.default.View,{style:V,children:b}),s[21]=V,s[22]=b,s[23]=h):h=s[23],s[24]!==E?(y=E(I.text),s[24]=E,s[25]=y):y=s[25],s[26]!==D.primary?(p={color:D.primary},s[26]=D.primary,s[27]=p):p=s[27],s[28]!==y||s[29]!==p?(S=[y,p],s[28]=y,s[29]=p,s[30]=S):S=s[30],s[31]!==j?(v=j("v2.cameras.doorbellRinging"),s[31]=j,s[32]=v):v=s[32],s[33]!==S||s[34]!==v?(w=(0,x.jsx)(l.default,{style:S,children:v}),s[33]=S,s[34]=v,s[35]=w):w=s[35],s[36]!==h||s[37]!==w||s[38]!==u?(A=(0,x.jsxs)(o.default,{style:u,pointerEvents:"none",children:[h,w]}),s[36]=h,s[37]=w,s[38]=u,s[39]=A):A=s[39],A}let H,$,q,L,U,W,F,J,K,Q;if(s[40]!==D||s[41]!==P||s[42]!==k||s[43]!==M||s[44]!==E||s[45]!==j){q=Symbol.for("react.early_return_sentinel");e:{const e=(0,y.formatRingAgo)(P,k);if(null===e){q=null;break e}let t;$=o.default,s[54]!==E?(t=E(I.badge),s[54]=E,s[55]=t):t=s[55];const n=`${D.background}CC`;let u,c,_,b;s[56]!==n?(u={backgroundColor:n},s[56]=n,s[57]=u):u=s[57],s[58]!==t||s[59]!==u?(W=[t,u],s[58]=t,s[59]=u,s[60]=W):W=s[60],F="none",s[61]!==M?(c=M(12),s[61]=M,s[62]=c):c=s[62],s[63]!==D.foregroundMuted||s[64]!==c?(J=(0,x.jsx)(f.BellRing,{size:c,color:D.foregroundMuted}),s[63]=D.foregroundMuted,s[64]=c,s[65]=J):J=s[65],H=l.default,s[66]!==E?(_=E(I.text),s[66]=E,s[67]=_):_=s[67],s[68]!==D.foregroundMuted?(b={color:D.foregroundMuted},s[68]=D.foregroundMuted,s[69]=b):b=s[69],s[70]!==_||s[71]!==b?(L=[_,b],s[70]=_,s[71]=b,s[72]=L):L=s[72],U=j("v2.cameras.doorbellLastRing",{time:e})}s[40]=D,s[41]=P,s[42]=k,s[43]=M,s[44]=E,s[45]=j,s[46]=H,s[47]=$,s[48]=q,s[49]=L,s[50]=U,s[51]=W,s[52]=F,s[53]=J}else H=s[46],$=s[47],q=s[48],L=s[49],U=s[50],W=s[51],F=s[52],J=s[53];if(q!==Symbol.for("react.early_return_sentinel"))return q;s[73]!==H||s[74]!==L||s[75]!==U?(K=(0,x.jsx)(H,{style:L,children:U}),s[73]=H,s[74]=L,s[75]=U,s[76]=K):K=s[76];s[77]!==$||s[78]!==K||s[79]!==W||s[80]!==F||s[81]!==J?(Q=(0,x.jsxs)($,{style:W,pointerEvents:F,children:[J,K]}),s[77]=$,s[78]=K,s[79]=W,s[80]=F,s[81]=J,s[82]=Q):Q=s[82];return Q};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]),x=r(d[12]);const S=500,v=6e4,w={code:"function DoorbellBadgeTsx1(){const{breathe}=this.__closure;return{opacity:breathe.value,transform:[{scale:0.85+0.15*breathe.value}]};}"};function A(){return Date.now()}const I=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'}})},1213,[788,16,114,193,32,1130,838,818,790,836,1214,1231,10]);
|
|
60
|
+
__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}}},1214,[788,16,854,819,855]);
|
|
61
|
+
__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=L,_e.matchDeviceLiveField=S,_e.OverlayReadouts=function(e){const r=(0,n.c)(22),{deviceId:u,config:p,enabled:y}=e,{t:j}=(0,l.useTranslation)(),x=(0,b.useStyleScaler)();let O;r[0]!==p?(O=L(p),r[0]=p,r[1]=O):O=r[1];const V=O;let A;r[2]===Symbol.for("react.memo_cache_sentinel")?(A={},r[2]=A):A=r[2];const[D,E]=o.default.useState(A);let M;r[3]===Symbol.for("react.memo_cache_sentinel")?(M=(e,n)=>{E(o=>o[e]===n?o:{...o,[e]:n})},r[3]=M):M=r[3];const C=M;let R;r[4]!==p.readouts?(R=p.readouts.some(F),r[4]=p.readouts,r[5]=R):R=r[5];const N=R,z=(0,c.useAudioLevel)(u,y&&N);let H;r[6]!==D||r[7]!==z||r[8]!==j?(H=e=>{if("audioDbfs"===e.source.kind)return null!==z&&Number.isFinite(z)?(0,s.formatLiveValue)(z,{precision:e.precision??1,unit:e.unit??"dBFS",onLabel:j("v2.common.on"),offLabel:j("v2.common.off")}):"\u2014";const n=D[e.source.deviceId]??[],o="deviceField"===e.source.kind?S(n,e.source.sectionId,e.source.fieldKey):void 0;if(!o)return"\u2014";const t={onLabel:j("v2.common.on"),offLabel:j("v2.common.off")},r=e.precision??o.precision;void 0!==r&&(t.precision=r);const u=e.unit??o.unit;return void 0!==u&&(t.unit=u),(0,s.formatLiveValue)(o.value,t)},r[6]=D,r[7]=z,r[8]=j,r[9]=H):H=r[9];const T=H;if(!y||0===p.readouts.length)return null;let w,P,W;if(r[10]!==V||r[11]!==y){let e;r[13]!==y?(e=e=>(0,h.jsx)(_,{deviceId:e,enabled:y,onFields:C},e),r[13]=y,r[14]=e):e=r[14],w=V.map(e),r[10]=V,r[11]=y,r[12]=w}else w=r[12];r[15]!==p||r[16]!==x||r[17]!==T?(P=v.OVERLAY_ANCHORS.map(e=>{const n=(0,f.readoutsAt)(p,e);return 0===n.length?null:(0,h.jsx)(t.default,{pointerEvents:"none",style:[x(I.stack),v.ANCHOR_PLACEMENT[e]],children:n.map(e=>(0,h.jsx)(k,{label:e.label,value:T(e)},e.id))},e)}),r[15]=p,r[16]=x,r[17]=T,r[18]=P):P=r[18];r[19]!==w||r[20]!==P?(W=(0,h.jsxs)(h.Fragment,{children:[w,P]}),r[19]=w,r[20]=P,r[21]=W):W=r[21];return W};var n=_r(d[0]),o=e(_r(d[1])),t=e(_r(d[2])),r=e(_r(d[3])),u=e(_r(d[4])),l=_r(d[5]),c=_r(d[6]),s=_r(d[7]),f=_r(d[8]),v=_r(d[9]),b=_r(d[10]),p=_r(d[11]),h=_r(d[12]);function L(e){const n=new Set;for(const o of e.readouts)'deviceField'===o.source.kind&&n.add(o.source.deviceId);return[...n]}const y=[];function S(e,n,o){return e.find(e=>e.sectionId===n&&e.key===o)}function _(e){const t=(0,n.c)(5),{deviceId:r,enabled:u,onFields:l}=e,{data:c}=(0,s.useDeviceLiveFields)(r,u),f=c??y;let v,b;return t[0]!==r||t[1]!==f||t[2]!==l?(v=()=>{l(r,f)},b=[r,f,l],t[0]=r,t[1]=f,t[2]=l,t[3]=v,t[4]=b):(v=t[3],b=t[4]),o.default.useEffect(v,b),null}function k(e){const o=(0,n.c)(31),{label:u,value:l}=e,{colors:c}=(0,p.useTheme)(),s=(0,b.useStyleScaler)();let f;o[0]!==s?(f=s(I.chip),o[0]=s,o[1]=f):f=o[1];const v=`${c.background}8C`;let L,y,S,_,k,F,j,x,O,V,A;return o[2]!==v?(L={backgroundColor:v},o[2]=v,o[3]=L):L=o[3],o[4]!==f||o[5]!==L?(y=[f,L],o[4]=f,o[5]=L,o[6]=y):y=o[6],o[7]!==s?(S=s(I.chipLabel),o[7]=s,o[8]=S):S=o[8],o[9]!==c.foregroundMuted?(_={color:c.foregroundMuted},o[9]=c.foregroundMuted,o[10]=_):_=o[10],o[11]!==S||o[12]!==_?(k=[S,_],o[11]=S,o[12]=_,o[13]=k):k=o[13],o[14]!==u||o[15]!==k?(F=(0,h.jsx)(r.default,{style:k,numberOfLines:1,children:u}),o[14]=u,o[15]=k,o[16]=F):F=o[16],o[17]!==s?(j=s(I.chipValue),o[17]=s,o[18]=j):j=o[18],o[19]!==c.foreground?(x={color:c.foreground},o[19]=c.foreground,o[20]=x):x=o[20],o[21]!==x||o[22]!==j?(O=[j,x],o[21]=x,o[22]=j,o[23]=O):O=o[23],o[24]!==O||o[25]!==l?(V=(0,h.jsx)(r.default,{style:O,numberOfLines:1,children:l}),o[24]=O,o[25]=l,o[26]=V):V=o[26],o[27]!==V||o[28]!==y||o[29]!==F?(A=(0,h.jsxs)(t.default,{style:y,pointerEvents:"none",children:[F,V]}),o[27]=V,o[28]=y,o[29]=F,o[30]=A):A=o[30],A}function F(e){return"audioDbfs"===e.source.kind}const I=u.default.create({stack:{position:'absolute',gap:4},chip:{flexDirection:'row',alignItems:'baseline',gap:5,paddingHorizontal:7,paddingVertical:3,borderRadius:6},chipLabel:{fontSize:10,fontWeight:'600'},chipValue:{fontSize:12,fontWeight:'700',fontVariant:['tabular-nums']}})},1215,[788,16,114,193,32,818,1248,1282,1251,1283,1231,790,10]);
|