@getontime/cli 4.0.0 → 4.1.0
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/client/assets/{Backstage-ZSqb8OU6.js → Backstage-BhtXVpms.js} +2 -2
- package/client/assets/Backstage-BhtXVpms.js.br +0 -0
- package/client/assets/Backstage-BhtXVpms.js.gz +0 -0
- package/client/assets/{Backstage-ZSqb8OU6.js.map → Backstage-BhtXVpms.js.map} +1 -1
- package/client/assets/{Countdown-DVRZbeRP.js → Countdown-NmGi1KMx.js} +2 -2
- package/client/assets/Countdown-NmGi1KMx.js.br +0 -0
- package/client/assets/Countdown-NmGi1KMx.js.gz +0 -0
- package/client/assets/Countdown-NmGi1KMx.js.map +1 -0
- package/client/assets/{CustomTranslationModal-D_Cy0d_H.js → CustomTranslationModal-BBNxpds0.js} +2 -2
- package/client/assets/CustomTranslationModal-BBNxpds0.js.br +0 -0
- package/client/assets/CustomTranslationModal-BBNxpds0.js.gz +0 -0
- package/client/assets/{CustomTranslationModal-D_Cy0d_H.js.map → CustomTranslationModal-BBNxpds0.js.map} +1 -1
- package/client/assets/{DelayIndicator-B_JKLKYW.js → DelayIndicator-CFCDQ7FN.js} +2 -2
- package/client/assets/DelayIndicator-CFCDQ7FN.js.br +0 -0
- package/client/assets/DelayIndicator-CFCDQ7FN.js.gz +0 -0
- package/client/assets/{DelayIndicator-B_JKLKYW.js.map → DelayIndicator-CFCDQ7FN.js.map} +1 -1
- package/client/assets/{EditorFeatureWrapper-DzBxDvRn.js → EditorFeatureWrapper-D55c8JBz.js} +2 -2
- package/client/assets/EditorFeatureWrapper-D55c8JBz.js.br +0 -0
- package/client/assets/EditorFeatureWrapper-D55c8JBz.js.gz +0 -0
- package/client/assets/{EditorFeatureWrapper-DzBxDvRn.js.map → EditorFeatureWrapper-D55c8JBz.js.map} +1 -1
- package/client/assets/{EditorUtils-De0umjb-.js → EditorUtils-CFE106qQ.js} +2 -2
- package/client/assets/EditorUtils-CFE106qQ.js.br +0 -0
- package/client/assets/EditorUtils-CFE106qQ.js.gz +0 -0
- package/client/assets/{EditorUtils-De0umjb-.js.map → EditorUtils-CFE106qQ.js.map} +1 -1
- package/client/assets/{Empty-BYF0tVRk.js → Empty-C-JO_XAr.js} +2 -2
- package/client/assets/Empty-C-JO_XAr.js.br +2 -0
- package/client/assets/Empty-C-JO_XAr.js.gz +0 -0
- package/client/assets/{Empty-BYF0tVRk.js.map → Empty-C-JO_XAr.js.map} +1 -1
- package/client/assets/{EmptyPage-DYH2bswA.js → EmptyPage-BSzsxpGg.js} +2 -2
- package/client/assets/EmptyPage-BSzsxpGg.js.br +1 -0
- package/client/assets/EmptyPage-BSzsxpGg.js.gz +0 -0
- package/client/assets/{EmptyPage-DYH2bswA.js.map → EmptyPage-BSzsxpGg.js.map} +1 -1
- package/client/assets/{FollowButton-DyWsvyFF.js → FollowButton-Mox6N4JW.js} +2 -2
- package/client/assets/FollowButton-Mox6N4JW.js.br +0 -0
- package/client/assets/FollowButton-Mox6N4JW.js.gz +0 -0
- package/client/assets/{FollowButton-DyWsvyFF.js.map → FollowButton-Mox6N4JW.js.map} +1 -1
- package/client/assets/MessageControlExport-BL2ip9qN.js +2 -0
- package/client/assets/MessageControlExport-BL2ip9qN.js.br +0 -0
- package/client/assets/MessageControlExport-BL2ip9qN.js.gz +0 -0
- package/client/assets/{MessageControlExport-yLGU2dMq.js.map → MessageControlExport-BL2ip9qN.js.map} +1 -1
- package/client/assets/{MilestoneEditor-GkzJ-h1C.js → MilestoneEditor-DcWPGKNK.js} +2 -2
- package/client/assets/MilestoneEditor-DcWPGKNK.js.br +0 -0
- package/client/assets/MilestoneEditor-DcWPGKNK.js.gz +0 -0
- package/client/assets/{MilestoneEditor-GkzJ-h1C.js.map → MilestoneEditor-DcWPGKNK.js.map} +1 -1
- package/client/assets/Modal-D3tAPV2u.css +1 -0
- package/client/assets/Modal-D3tAPV2u.css.br +0 -0
- package/client/assets/Modal-D3tAPV2u.css.gz +0 -0
- package/client/assets/Modal-krcwDRb-.js +2 -0
- package/client/assets/Modal-krcwDRb-.js.br +0 -0
- package/client/assets/Modal-krcwDRb-.js.gz +0 -0
- package/client/assets/Modal-krcwDRb-.js.map +1 -0
- package/client/assets/{MultiPartProgressBar-BITERKS0.js → MultiPartProgressBar-BXQbpM-j.js} +2 -2
- package/client/assets/MultiPartProgressBar-BXQbpM-j.js.br +0 -0
- package/client/assets/MultiPartProgressBar-BXQbpM-j.js.gz +0 -0
- package/client/assets/{MultiPartProgressBar-BITERKS0.js.map → MultiPartProgressBar-BXQbpM-j.js.map} +1 -1
- package/client/assets/{OperatorExport-DMZ6eQfT.js → OperatorExport-C50KHBrD.js} +2 -2
- package/client/assets/OperatorExport-C50KHBrD.js.br +0 -0
- package/client/assets/OperatorExport-C50KHBrD.js.gz +0 -0
- package/client/assets/{OperatorExport-DMZ6eQfT.js.map → OperatorExport-C50KHBrD.js.map} +1 -1
- package/client/assets/OverviewWrapper-MGJ1uE5W.js +2 -0
- package/client/assets/OverviewWrapper-MGJ1uE5W.js.br +0 -0
- package/client/assets/OverviewWrapper-MGJ1uE5W.js.gz +0 -0
- package/client/assets/{OverviewWrapper-riM6vPno.js.map → OverviewWrapper-MGJ1uE5W.js.map} +1 -1
- package/client/assets/{ProjectInfo-DxtMq70a.js → ProjectInfo-CJ-GLvVG.js} +2 -2
- package/client/assets/ProjectInfo-CJ-GLvVG.js.br +0 -0
- package/client/assets/ProjectInfo-CJ-GLvVG.js.gz +0 -0
- package/client/assets/{ProjectInfo-DxtMq70a.js.map → ProjectInfo-CJ-GLvVG.js.map} +1 -1
- package/client/assets/{ProtectRoute-p1fmtLeu.js → ProtectRoute-DJ9xZnPI.js} +2 -2
- package/client/assets/ProtectRoute-DJ9xZnPI.js.br +0 -0
- package/client/assets/ProtectRoute-DJ9xZnPI.js.gz +0 -0
- package/client/assets/{ProtectRoute-p1fmtLeu.js.map → ProtectRoute-DJ9xZnPI.js.map} +1 -1
- package/client/assets/{ProtectedCuesheet-CvRnqT0z.js → ProtectedCuesheet-B8tg6Mmo.js} +2 -2
- package/client/assets/ProtectedCuesheet-B8tg6Mmo.js.br +0 -0
- package/client/assets/ProtectedCuesheet-B8tg6Mmo.js.gz +0 -0
- package/client/assets/{ProtectedCuesheet-CvRnqT0z.js.map → ProtectedCuesheet-B8tg6Mmo.js.map} +1 -1
- package/client/assets/ProtectedEditor-Bl4wV72N.js +3 -0
- package/client/assets/ProtectedEditor-Bl4wV72N.js.br +0 -0
- package/client/assets/ProtectedEditor-Bl4wV72N.js.gz +0 -0
- package/client/assets/ProtectedEditor-Bl4wV72N.js.map +1 -0
- package/client/assets/{RundownEntry-B1dSz1wu.js → RundownEntry-D9tXNXPy.js} +2 -2
- package/client/assets/RundownEntry-D9tXNXPy.js.br +0 -0
- package/client/assets/RundownEntry-D9tXNXPy.js.gz +0 -0
- package/client/assets/{RundownEntry-B1dSz1wu.js.map → RundownEntry-D9tXNXPy.js.map} +1 -1
- package/client/assets/RundownExport-1zBZurIG.css +1 -0
- package/client/assets/RundownExport-1zBZurIG.css.br +0 -0
- package/client/assets/RundownExport-1zBZurIG.css.gz +0 -0
- package/client/assets/RundownExport-D6uAmFbb.js +3 -0
- package/client/assets/RundownExport-D6uAmFbb.js.br +0 -0
- package/client/assets/RundownExport-D6uAmFbb.js.gz +0 -0
- package/client/assets/RundownExport-D6uAmFbb.js.map +1 -0
- package/client/assets/{Select-niU9Razm.js → Select-BLA-yQMq.js} +2 -2
- package/client/assets/Select-BLA-yQMq.js.br +0 -0
- package/client/assets/Select-BLA-yQMq.js.gz +0 -0
- package/client/assets/{Select-niU9Razm.js.map → Select-BLA-yQMq.js.map} +1 -1
- package/client/assets/{Studio-CWdJq4bx.js → Studio-DbP92DTf.js} +2 -2
- package/client/assets/Studio-DbP92DTf.js.br +0 -0
- package/client/assets/Studio-DbP92DTf.js.gz +0 -0
- package/client/assets/{Studio-CWdJq4bx.js.map → Studio-DbP92DTf.js.map} +1 -1
- package/client/assets/{StyleEditor-BIFjHsgD.js → StyleEditor-DNjZ46Qf.js} +2 -2
- package/client/assets/StyleEditor-DNjZ46Qf.js.br +0 -0
- package/client/assets/StyleEditor-DNjZ46Qf.js.gz +0 -0
- package/client/assets/{StyleEditor-BIFjHsgD.js.map → StyleEditor-DNjZ46Qf.js.map} +1 -1
- package/client/assets/{SuperscriptTime-DCTyUARx.js → SuperscriptTime-C8ypTVpH.js} +2 -2
- package/client/assets/SuperscriptTime-C8ypTVpH.js.br +0 -0
- package/client/assets/SuperscriptTime-C8ypTVpH.js.gz +0 -0
- package/client/assets/{SuperscriptTime-DCTyUARx.js.map → SuperscriptTime-C8ypTVpH.js.map} +1 -1
- package/client/assets/{TimeElements-DBVGVx71.js → TimeElements-DlEBhXe0.js} +2 -2
- package/client/assets/TimeElements-DlEBhXe0.js.br +0 -0
- package/client/assets/TimeElements-DlEBhXe0.js.gz +0 -0
- package/client/assets/{TimeElements-DBVGVx71.js.map → TimeElements-DlEBhXe0.js.map} +1 -1
- package/client/assets/{TimeInput-wQ67FbW6.js → TimeInput-DU09ewqh.js} +2 -2
- package/client/assets/TimeInput-DU09ewqh.js.br +0 -0
- package/client/assets/TimeInput-DU09ewqh.js.gz +0 -0
- package/client/assets/{TimeInput-wQ67FbW6.js.map → TimeInput-DU09ewqh.js.map} +1 -1
- package/client/assets/{TimelinePage-DZefE2vQ.js → TimelinePage-DTwqRihn.js} +2 -2
- package/client/assets/TimelinePage-DTwqRihn.js.br +0 -0
- package/client/assets/TimelinePage-DTwqRihn.js.gz +0 -0
- package/client/assets/{TimelinePage-DZefE2vQ.js.map → TimelinePage-DTwqRihn.js.map} +1 -1
- package/client/assets/Timer-B7nk3TMf.css +1 -0
- package/client/assets/Timer-B7nk3TMf.css.br +0 -0
- package/client/assets/Timer-B7nk3TMf.css.gz +0 -0
- package/client/assets/Timer-jjWAunJc.js +2 -0
- package/client/assets/Timer-jjWAunJc.js.br +0 -0
- package/client/assets/Timer-jjWAunJc.js.gz +0 -0
- package/client/assets/Timer-jjWAunJc.js.map +1 -0
- package/client/assets/TimerControlExport-i0ZDpUx7.js +2 -0
- package/client/assets/TimerControlExport-i0ZDpUx7.js.br +0 -0
- package/client/assets/TimerControlExport-i0ZDpUx7.js.gz +0 -0
- package/client/assets/{TimerControlExport-C1C_vBX4.js.map → TimerControlExport-i0ZDpUx7.js.map} +1 -1
- package/client/assets/{TitleCard-B4N-kCM3.js → TitleCard-BgOtucv6.js} +2 -2
- package/client/assets/TitleCard-BgOtucv6.js.br +0 -0
- package/client/assets/TitleCard-BgOtucv6.js.gz +0 -0
- package/client/assets/{TitleCard-B4N-kCM3.js.map → TitleCard-BgOtucv6.js.map} +1 -1
- package/client/assets/{Tooltip-DJ8Y4CO4.js → Tooltip-C0rGHLsB.js} +2 -2
- package/client/assets/Tooltip-C0rGHLsB.js.br +0 -0
- package/client/assets/Tooltip-C0rGHLsB.js.gz +0 -0
- package/client/assets/{Tooltip-DJ8Y4CO4.js.map → Tooltip-C0rGHLsB.js.map} +1 -1
- package/client/assets/{ViewLogo-Dd60EREE.js → ViewLogo--9miplQv.js} +2 -2
- package/client/assets/ViewLogo--9miplQv.js.br +0 -0
- package/client/assets/ViewLogo--9miplQv.js.gz +0 -0
- package/client/assets/{ViewLogo-Dd60EREE.js.map → ViewLogo--9miplQv.js.map} +1 -1
- package/client/assets/{ViewParamsEditor-BWEYbq_S.js → ViewParamsEditor-BFu_0oIb.js} +2 -2
- package/client/assets/ViewParamsEditor-BFu_0oIb.js.br +0 -0
- package/client/assets/ViewParamsEditor-BFu_0oIb.js.gz +0 -0
- package/client/assets/{ViewParamsEditor-BWEYbq_S.js.map → ViewParamsEditor-BFu_0oIb.js.map} +1 -1
- package/client/assets/{dateConfig-8rhb0Dbh.js → dateConfig-WYqMzV9D.js} +2 -2
- package/client/assets/dateConfig-WYqMzV9D.js.br +0 -0
- package/client/assets/dateConfig-WYqMzV9D.js.gz +0 -0
- package/client/assets/{dateConfig-8rhb0Dbh.js.map → dateConfig-WYqMzV9D.js.map} +1 -1
- package/client/assets/{editorSettings-LMnfWux6.js → editorSettings-CCHx-wCx.js} +2 -2
- package/client/assets/editorSettings-CCHx-wCx.js.br +0 -0
- package/client/assets/editorSettings-CCHx-wCx.js.gz +0 -0
- package/client/assets/{editorSettings-LMnfWux6.js.map → editorSettings-CCHx-wCx.js.map} +1 -1
- package/client/assets/{getProgress-CyJTu6f5.js → getProgress-B94Ieskb.js} +2 -2
- package/client/assets/getProgress-B94Ieskb.js.br +0 -0
- package/client/assets/getProgress-B94Ieskb.js.gz +0 -0
- package/client/assets/{getProgress-CyJTu6f5.js.map → getProgress-B94Ieskb.js.map} +1 -1
- package/client/assets/{index-5QAOtSTh.js → index-njXwwjfn.js} +3 -3
- package/client/assets/index-njXwwjfn.js.br +0 -0
- package/client/assets/index-njXwwjfn.js.gz +0 -0
- package/client/assets/{index-5QAOtSTh.js.map → index-njXwwjfn.js.map} +1 -1
- package/client/assets/{offset-CLDSqOP5.js → offset-D1q-72D-.js} +2 -2
- package/client/assets/offset-D1q-72D-.js.br +0 -0
- package/client/assets/offset-D1q-72D-.js.gz +0 -0
- package/client/assets/{offset-CLDSqOP5.js.map → offset-D1q-72D-.js.map} +1 -1
- package/client/assets/{parseUserTime-CCDHpp7D.js → parseUserTime-Bc1pSJR2.js} +2 -2
- package/client/assets/parseUserTime-Bc1pSJR2.js.br +0 -0
- package/client/assets/parseUserTime-Bc1pSJR2.js.gz +0 -0
- package/client/assets/{parseUserTime-CCDHpp7D.js.map → parseUserTime-Bc1pSJR2.js.map} +1 -1
- package/client/assets/{playbackstate-6lBh6omZ.js → playbackstate-BpzbtG9F.js} +2 -2
- package/client/assets/playbackstate-BpzbtG9F.js.br +0 -0
- package/client/assets/playbackstate-BpzbtG9F.js.gz +0 -0
- package/client/assets/{playbackstate-6lBh6omZ.js.map → playbackstate-BpzbtG9F.js.map} +1 -1
- package/client/assets/{presentation.utils-BUIuV_2e.js → presentation.utils-B2baBe3j.js} +2 -2
- package/client/assets/presentation.utils-B2baBe3j.js.br +0 -0
- package/client/assets/presentation.utils-B2baBe3j.js.gz +0 -0
- package/client/assets/{presentation.utils-BUIuV_2e.js.map → presentation.utils-B2baBe3j.js.map} +1 -1
- package/client/assets/{rundownUtils-Cnd2prRX.js → rundownUtils-H6xvQyre.js} +2 -2
- package/client/assets/rundownUtils-H6xvQyre.js.br +0 -0
- package/client/assets/rundownUtils-H6xvQyre.js.gz +0 -0
- package/client/assets/{rundownUtils-Cnd2prRX.js.map → rundownUtils-H6xvQyre.js.map} +1 -1
- package/client/assets/{useCustomFields-BuxKsqGS.js → useCustomFields-Da0Li7nQ.js} +2 -2
- package/client/assets/useCustomFields-Da0Li7nQ.js.br +0 -0
- package/client/assets/useCustomFields-Da0Li7nQ.js.gz +0 -0
- package/client/assets/{useCustomFields-BuxKsqGS.js.map → useCustomFields-Da0Li7nQ.js.map} +1 -1
- package/client/assets/{useFollowComponent-iGQv4zoS.js → useFollowComponent-Qo3FobyV.js} +2 -2
- package/client/assets/useFollowComponent-Qo3FobyV.js.br +0 -0
- package/client/assets/useFollowComponent-Qo3FobyV.js.gz +0 -0
- package/client/assets/{useFollowComponent-iGQv4zoS.js.map → useFollowComponent-Qo3FobyV.js.map} +1 -1
- package/client/assets/{useProjectData-CetvEK9E.js → useProjectData-DW06zQvF.js} +2 -2
- package/client/assets/useProjectData-DW06zQvF.js.br +0 -0
- package/client/assets/useProjectData-DW06zQvF.js.gz +0 -0
- package/client/assets/{useProjectData-CetvEK9E.js.map → useProjectData-DW06zQvF.js.map} +1 -1
- package/client/assets/{useReport-PEFRsOhF.js → useReport-DhFY2L8v.js} +2 -2
- package/client/assets/useReport-DhFY2L8v.js.br +0 -0
- package/client/assets/useReport-DhFY2L8v.js.gz +0 -0
- package/client/assets/{useReport-PEFRsOhF.js.map → useReport-DhFY2L8v.js.map} +1 -1
- package/client/assets/useRundown-ihoU8qBi.js +2 -0
- package/client/assets/useRundown-ihoU8qBi.js.br +0 -0
- package/client/assets/useRundown-ihoU8qBi.js.gz +0 -0
- package/client/assets/useRundown-ihoU8qBi.js.map +1 -0
- package/client/assets/{useWindowTitle-b5fN0StF.js → useWindowTitle-B2UzPuki.js} +2 -2
- package/client/assets/useWindowTitle-B2UzPuki.js.br +0 -0
- package/client/assets/useWindowTitle-B2UzPuki.js.gz +0 -0
- package/client/assets/{useWindowTitle-b5fN0StF.js.map → useWindowTitle-B2UzPuki.js.map} +1 -1
- package/client/assets/{validateEvent-Bvgk1E-Y.js → validateEvent-BJMwP_mq.js} +2 -2
- package/client/assets/validateEvent-BJMwP_mq.js.br +0 -0
- package/client/assets/validateEvent-BJMwP_mq.js.gz +0 -0
- package/client/assets/{validateEvent-Bvgk1E-Y.js.map → validateEvent-BJMwP_mq.js.map} +1 -1
- package/client/assets/{vendor-Cu5xgv5K.js → vendor-9UkPSc5K.js} +3 -3
- package/client/assets/vendor-9UkPSc5K.js.br +0 -0
- package/client/assets/vendor-9UkPSc5K.js.gz +0 -0
- package/client/assets/{vendor-Cu5xgv5K.js.map → vendor-9UkPSc5K.js.map} +1 -1
- package/client/assets/{viewLoader.utils-BPhACxyG.js → viewLoader.utils-DQGhrjSp.js} +2 -2
- package/client/assets/viewLoader.utils-DQGhrjSp.js.br +0 -0
- package/client/assets/viewLoader.utils-DQGhrjSp.js.gz +0 -0
- package/client/assets/{viewLoader.utils-BPhACxyG.js.map → viewLoader.utils-DQGhrjSp.js.map} +1 -1
- package/client/index.html +2 -2
- package/external/demo/app.js +2 -2
- package/package.json +1 -1
- package/server/index.cjs +97 -88
- package/client/assets/Backstage-ZSqb8OU6.js.br +0 -0
- package/client/assets/Backstage-ZSqb8OU6.js.gz +0 -0
- package/client/assets/Countdown-DVRZbeRP.js.br +0 -0
- package/client/assets/Countdown-DVRZbeRP.js.gz +0 -0
- package/client/assets/Countdown-DVRZbeRP.js.map +0 -1
- package/client/assets/CustomTranslationModal-D_Cy0d_H.js.br +0 -0
- package/client/assets/CustomTranslationModal-D_Cy0d_H.js.gz +0 -0
- package/client/assets/DelayIndicator-B_JKLKYW.js.br +0 -0
- package/client/assets/DelayIndicator-B_JKLKYW.js.gz +0 -0
- package/client/assets/EditorFeatureWrapper-DzBxDvRn.js.br +0 -0
- package/client/assets/EditorFeatureWrapper-DzBxDvRn.js.gz +0 -0
- package/client/assets/EditorUtils-De0umjb-.js.br +0 -0
- package/client/assets/EditorUtils-De0umjb-.js.gz +0 -0
- package/client/assets/Empty-BYF0tVRk.js.br +0 -2
- package/client/assets/Empty-BYF0tVRk.js.gz +0 -0
- package/client/assets/EmptyPage-DYH2bswA.js.br +0 -0
- package/client/assets/EmptyPage-DYH2bswA.js.gz +0 -0
- package/client/assets/FollowButton-DyWsvyFF.js.br +0 -0
- package/client/assets/FollowButton-DyWsvyFF.js.gz +0 -0
- package/client/assets/MessageControlExport-yLGU2dMq.js +0 -2
- package/client/assets/MessageControlExport-yLGU2dMq.js.br +0 -0
- package/client/assets/MessageControlExport-yLGU2dMq.js.gz +0 -0
- package/client/assets/MilestoneEditor-GkzJ-h1C.js.br +0 -0
- package/client/assets/MilestoneEditor-GkzJ-h1C.js.gz +0 -0
- package/client/assets/Modal-BKL-5GzU.js +0 -2
- package/client/assets/Modal-BKL-5GzU.js.br +0 -0
- package/client/assets/Modal-BKL-5GzU.js.gz +0 -0
- package/client/assets/Modal-BKL-5GzU.js.map +0 -1
- package/client/assets/Modal-BgJx3SNK.css +0 -1
- package/client/assets/Modal-BgJx3SNK.css.br +0 -0
- package/client/assets/Modal-BgJx3SNK.css.gz +0 -0
- package/client/assets/MultiPartProgressBar-BITERKS0.js.br +0 -0
- package/client/assets/MultiPartProgressBar-BITERKS0.js.gz +0 -0
- package/client/assets/OperatorExport-DMZ6eQfT.js.br +0 -0
- package/client/assets/OperatorExport-DMZ6eQfT.js.gz +0 -0
- package/client/assets/OverviewWrapper-riM6vPno.js +0 -2
- package/client/assets/OverviewWrapper-riM6vPno.js.br +0 -0
- package/client/assets/OverviewWrapper-riM6vPno.js.gz +0 -0
- package/client/assets/ProjectInfo-DxtMq70a.js.br +0 -0
- package/client/assets/ProjectInfo-DxtMq70a.js.gz +0 -0
- package/client/assets/ProtectRoute-p1fmtLeu.js.br +0 -0
- package/client/assets/ProtectRoute-p1fmtLeu.js.gz +0 -0
- package/client/assets/ProtectedCuesheet-CvRnqT0z.js.br +0 -0
- package/client/assets/ProtectedCuesheet-CvRnqT0z.js.gz +0 -0
- package/client/assets/ProtectedEditor-D4UXj1xL.js +0 -3
- package/client/assets/ProtectedEditor-D4UXj1xL.js.br +0 -0
- package/client/assets/ProtectedEditor-D4UXj1xL.js.gz +0 -0
- package/client/assets/ProtectedEditor-D4UXj1xL.js.map +0 -1
- package/client/assets/RundownEntry-B1dSz1wu.js.br +0 -0
- package/client/assets/RundownEntry-B1dSz1wu.js.gz +0 -0
- package/client/assets/RundownExport-CUtaG16H.css +0 -1
- package/client/assets/RundownExport-CUtaG16H.css.br +0 -0
- package/client/assets/RundownExport-CUtaG16H.css.gz +0 -0
- package/client/assets/RundownExport-WjLpncYT.js +0 -3
- package/client/assets/RundownExport-WjLpncYT.js.br +0 -0
- package/client/assets/RundownExport-WjLpncYT.js.gz +0 -0
- package/client/assets/RundownExport-WjLpncYT.js.map +0 -1
- package/client/assets/Select-niU9Razm.js.br +0 -0
- package/client/assets/Select-niU9Razm.js.gz +0 -0
- package/client/assets/Studio-CWdJq4bx.js.br +0 -0
- package/client/assets/Studio-CWdJq4bx.js.gz +0 -0
- package/client/assets/StyleEditor-BIFjHsgD.js.br +0 -0
- package/client/assets/StyleEditor-BIFjHsgD.js.gz +0 -0
- package/client/assets/SuperscriptTime-DCTyUARx.js.br +0 -0
- package/client/assets/SuperscriptTime-DCTyUARx.js.gz +0 -0
- package/client/assets/TimeElements-DBVGVx71.js.br +0 -0
- package/client/assets/TimeElements-DBVGVx71.js.gz +0 -0
- package/client/assets/TimeInput-wQ67FbW6.js.br +0 -0
- package/client/assets/TimeInput-wQ67FbW6.js.gz +0 -0
- package/client/assets/TimelinePage-DZefE2vQ.js.br +0 -0
- package/client/assets/TimelinePage-DZefE2vQ.js.gz +0 -0
- package/client/assets/Timer-Bs450x86.js +0 -2
- package/client/assets/Timer-Bs450x86.js.br +0 -0
- package/client/assets/Timer-Bs450x86.js.gz +0 -0
- package/client/assets/Timer-Bs450x86.js.map +0 -1
- package/client/assets/Timer-DGNfbBKM.css +0 -1
- package/client/assets/Timer-DGNfbBKM.css.br +0 -0
- package/client/assets/Timer-DGNfbBKM.css.gz +0 -0
- package/client/assets/TimerControlExport-C1C_vBX4.js +0 -2
- package/client/assets/TimerControlExport-C1C_vBX4.js.br +0 -0
- package/client/assets/TimerControlExport-C1C_vBX4.js.gz +0 -0
- package/client/assets/TitleCard-B4N-kCM3.js.br +0 -0
- package/client/assets/TitleCard-B4N-kCM3.js.gz +0 -0
- package/client/assets/Tooltip-DJ8Y4CO4.js.br +0 -0
- package/client/assets/Tooltip-DJ8Y4CO4.js.gz +0 -0
- package/client/assets/ViewLogo-Dd60EREE.js.br +0 -0
- package/client/assets/ViewLogo-Dd60EREE.js.gz +0 -0
- package/client/assets/ViewParamsEditor-BWEYbq_S.js.br +0 -0
- package/client/assets/ViewParamsEditor-BWEYbq_S.js.gz +0 -0
- package/client/assets/dateConfig-8rhb0Dbh.js.br +0 -0
- package/client/assets/dateConfig-8rhb0Dbh.js.gz +0 -0
- package/client/assets/editorSettings-LMnfWux6.js.br +0 -0
- package/client/assets/editorSettings-LMnfWux6.js.gz +0 -0
- package/client/assets/getProgress-CyJTu6f5.js.br +0 -0
- package/client/assets/getProgress-CyJTu6f5.js.gz +0 -0
- package/client/assets/index-5QAOtSTh.js.br +0 -0
- package/client/assets/index-5QAOtSTh.js.gz +0 -0
- package/client/assets/offset-CLDSqOP5.js.br +0 -0
- package/client/assets/offset-CLDSqOP5.js.gz +0 -0
- package/client/assets/parseUserTime-CCDHpp7D.js.br +0 -0
- package/client/assets/parseUserTime-CCDHpp7D.js.gz +0 -0
- package/client/assets/playbackstate-6lBh6omZ.js.br +0 -0
- package/client/assets/playbackstate-6lBh6omZ.js.gz +0 -0
- package/client/assets/presentation.utils-BUIuV_2e.js.br +0 -0
- package/client/assets/presentation.utils-BUIuV_2e.js.gz +0 -0
- package/client/assets/rundownUtils-Cnd2prRX.js.br +0 -0
- package/client/assets/rundownUtils-Cnd2prRX.js.gz +0 -0
- package/client/assets/useCustomFields-BuxKsqGS.js.br +0 -0
- package/client/assets/useCustomFields-BuxKsqGS.js.gz +0 -0
- package/client/assets/useFollowComponent-iGQv4zoS.js.br +0 -0
- package/client/assets/useFollowComponent-iGQv4zoS.js.gz +0 -0
- package/client/assets/useProjectData-CetvEK9E.js.br +0 -0
- package/client/assets/useProjectData-CetvEK9E.js.gz +0 -0
- package/client/assets/useReport-PEFRsOhF.js.br +0 -0
- package/client/assets/useReport-PEFRsOhF.js.gz +0 -0
- package/client/assets/useRundown-D8CYATNi.js +0 -2
- package/client/assets/useRundown-D8CYATNi.js.br +0 -0
- package/client/assets/useRundown-D8CYATNi.js.gz +0 -0
- package/client/assets/useRundown-D8CYATNi.js.map +0 -1
- package/client/assets/useWindowTitle-b5fN0StF.js.br +0 -0
- package/client/assets/useWindowTitle-b5fN0StF.js.gz +0 -0
- package/client/assets/validateEvent-Bvgk1E-Y.js.br +0 -0
- package/client/assets/validateEvent-Bvgk1E-Y.js.gz +0 -0
- package/client/assets/vendor-Cu5xgv5K.js.br +0 -0
- package/client/assets/vendor-Cu5xgv5K.js.gz +0 -0
- package/client/assets/viewLoader.utils-BPhACxyG.js.br +0 -0
- package/client/assets/viewLoader.utils-BPhACxyG.js.gz +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Timer-Bs450x86.js","sources":["../../src/common/components/fit-text/fitText.utils.ts","../../src/common/components/fit-text/FitText.tsx","../../src/views/timer/timer.options.ts","../../src/views/timer/timer.utils.ts","../../src/views/timer/useTimerData.ts","../../src/views/timer/Timer.tsx"],"sourcesContent":["/**\n * @param low inclusive, must be true on predicate function\n * @param high exclusive,\n * @param predicate predicate function\n */\nexport const bsearch = (low: number, high: number, predicate: (mid: number) => boolean): number => {\n while (low < high) {\n const mid = Math.floor((low + high) / 2);\n if (mid === low) break;\n\n if (predicate(mid)) {\n low = mid;\n } else {\n high = mid;\n }\n }\n return low;\n};\n","/**\n * Copied from\n * https://github.com/namhong2001/react-textfit/blob/master/index.tsx\n */\n\nimport { HTMLAttributes, PropsWithChildren, useCallback, useEffect, useRef } from 'react';\n\nimport { bsearch } from './fitText.utils';\n\ninterface FitTextProps extends HTMLAttributes<HTMLDivElement> {\n mode?: 'single' | 'multi';\n min?: number; // inclusive\n max?: number; // inclusive\n}\n\nexport function FitText({\n children,\n mode = 'multi',\n min = 16,\n max = 256,\n ...elementProps\n}: PropsWithChildren<FitTextProps>) {\n const ref = useRef<HTMLDivElement>(null);\n\n const isOverflown = useCallback(() => {\n const el = ref.current;\n if (!el) return false;\n return el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth;\n }, []);\n\n const setFontSize = useCallback(() => {\n const el = ref.current;\n if (!el) return;\n\n const originVisibility = el.style.visibility;\n\n el.style.visibility = 'hidden';\n const fontSize = bsearch(min, max + 1, (mid) => {\n el.style.fontSize = `${mid}px`;\n return !isOverflown();\n });\n el.style.fontSize = `${fontSize}px`;\n el.style.visibility = originVisibility;\n }, [isOverflown, min, max]);\n\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n\n setFontSize();\n const observer = new ResizeObserver(setFontSize);\n observer.observe(el);\n\n return () => observer.disconnect();\n }, [children, mode, setFontSize]);\n\n return (\n <div\n ref={ref}\n style={{\n whiteSpace: mode === 'single' ? 'nowrap' : 'normal',\n }}\n {...elementProps}\n >\n {children}\n </div>\n );\n}\n","import { use, useMemo } from 'react';\nimport { useSearchParams } from 'react-router';\nimport { CustomFields, OntimeEvent, TimerType } from 'ontime-types';\nimport { validateTimerType } from 'ontime-utils';\n\nimport type { SelectOption } from '../../common/components/select/Select';\nimport {\n getTimeOption,\n hideTimerSeconds,\n showLeadingZeros,\n} from '../../common/components/view-params-editor/common.options';\nimport { OptionTitle } from '../../common/components/view-params-editor/constants';\nimport { ViewOption } from '../../common/components/view-params-editor/viewParams.types';\nimport { makeOptionsFromCustomFields } from '../../common/components/view-params-editor/viewParams.utils';\nimport { PresetContext } from '../../common/context/PresetContext';\nimport { isStringBoolean, makeColourString } from '../../features/viewers/common/viewUtils';\n\n// manually match the properties of TimerType excluding the None\nconst timerDisplayOptions: SelectOption[] = [\n { value: 'no-overrides', label: 'No Overrides' },\n { value: TimerType.CountUp, label: 'Count Up' },\n { value: TimerType.CountDown, label: 'Count Down' },\n { value: TimerType.Clock, label: 'Clock' },\n];\n\nexport const getTimerOptions = (timeFormat: string, customFields: CustomFields): ViewOption[] => {\n const mainOptions = makeOptionsFromCustomFields(customFields, [\n { value: 'none', label: 'None' },\n { value: 'title', label: 'Title' },\n { value: 'note', label: 'Note' },\n ]);\n const secondaryOptions = makeOptionsFromCustomFields(customFields, [\n { value: 'none', label: 'None' },\n { value: 'title', label: 'Title' },\n { value: 'note', label: 'Note' },\n ]);\n\n return [\n { title: OptionTitle.ClockOptions, collapsible: true, options: [getTimeOption(timeFormat)] },\n {\n title: OptionTitle.TimerOptions,\n collapsible: true,\n options: [\n hideTimerSeconds,\n showLeadingZeros,\n {\n id: 'timerType',\n title: 'Timer type',\n description: 'Override the timer type',\n type: 'option',\n values: timerDisplayOptions,\n defaultValue: 'no-overrides',\n },\n {\n id: 'freezeOvertime',\n title: 'Freeze Overtime',\n description: 'If active, the timer will not count into negative numbers',\n type: 'boolean',\n defaultValue: false,\n },\n {\n id: 'freezeMessage',\n title: 'Freeze Message',\n description:\n 'An optional message to show when the timer is in overtime (must be set in combination with Freeze Overtime)',\n type: 'string',\n defaultValue: '',\n placeholder: 'e.g. Time is up!',\n },\n {\n id: 'hidePhase',\n title: 'Hide progress styles',\n description: 'Whether to suppress the progress styles (warning, danger and overtime)',\n type: 'boolean',\n defaultValue: false,\n },\n ],\n },\n {\n title: OptionTitle.DataSources,\n collapsible: true,\n options: [\n {\n id: 'main',\n title: 'Main text',\n description: 'Select the data source for the main text',\n type: 'option',\n values: mainOptions,\n defaultValue: 'title',\n },\n {\n id: 'secondary-src',\n title: 'Secondary text',\n description: 'Select the data source for the secondary text',\n type: 'option',\n values: secondaryOptions,\n defaultValue: 'none',\n },\n ],\n },\n {\n title: OptionTitle.ElementVisibility,\n collapsible: true,\n options: [\n {\n id: 'hideClock',\n title: 'Hide Time Now',\n description: 'Hides the Time Now field',\n type: 'boolean',\n defaultValue: false,\n },\n {\n id: 'hideCards',\n title: 'Hide Cards',\n description: 'Hides the Now and Next cards',\n type: 'boolean',\n defaultValue: false,\n },\n {\n id: 'hideProgress',\n title: 'Hide progress bar',\n description: 'Hides the progress bar',\n type: 'boolean',\n defaultValue: false,\n },\n {\n id: 'hideMessage',\n title: 'Hide Timer Message',\n description: 'Prevents displaying fullscreen messages in the timer',\n type: 'boolean',\n defaultValue: false,\n },\n {\n id: 'hideSecondary',\n title: 'Hide Auxiliary timer / Secondary message',\n description: 'Prevents the screen from displaying the secondary timer field',\n type: 'boolean',\n defaultValue: false,\n },\n {\n id: 'hideLogo',\n title: 'Hide the project logo',\n description: 'Prevents the screen from displaying the given project logo',\n type: 'boolean',\n defaultValue: false,\n },\n ],\n },\n {\n title: OptionTitle.StyleOverride,\n collapsible: true,\n options: [\n {\n id: 'font',\n title: 'Font',\n description: 'Font family, will use the fonts available in the system',\n type: 'string',\n placeholder: 'Open Sans (default)',\n },\n {\n id: 'keyColour',\n title: 'Key Colour',\n description: 'Background or key colour for entire view. Default: #101010',\n type: 'colour',\n defaultValue: '101010',\n },\n {\n id: 'timerColour',\n title: 'Timer Colour',\n description: 'Timer colour. Default: #f6f6f6',\n type: 'colour',\n defaultValue: 'f6f6f6',\n },\n ],\n },\n ];\n};\n\ntype TimerOptions = {\n hideClock: boolean;\n hideCards: boolean;\n hideProgress: boolean;\n hideMessage: boolean;\n hideSecondary: boolean;\n hideLogo: boolean;\n hideTimerSeconds: boolean;\n removeLeadingZeros: boolean;\n mainSource: keyof OntimeEvent | null;\n secondarySource: keyof OntimeEvent | null;\n timerType?: TimerType;\n freezeOvertime: boolean;\n freezeMessage: string;\n hidePhase: boolean;\n font?: string;\n keyColour?: string;\n timerColour?: string;\n};\n\n/**\n * Utility extract the view options from URL Params\n * the names and fallbacks are manually matched with timerOptions\n */\nfunction getOptionsFromParams(searchParams: URLSearchParams, defaultValues?: URLSearchParams): TimerOptions {\n // Helper to get value from either source, prioritizing defaultValues\n const getValue = (key: string) => defaultValues?.get(key) ?? searchParams.get(key);\n\n // Get timerType from either source\n const timerType = validateTimerType(getValue('timerType'), TimerType.None);\n\n return {\n hideClock: isStringBoolean(getValue('hideClock')),\n hideCards: isStringBoolean(getValue('hideCards')),\n hideProgress: isStringBoolean(getValue('hideProgress')),\n hideMessage: isStringBoolean(getValue('hideMessage')),\n hideSecondary: isStringBoolean(getValue('hideSecondary')),\n hideLogo: isStringBoolean(getValue('hideLogo')),\n hideTimerSeconds: isStringBoolean(getValue('hideTimerSeconds')),\n removeLeadingZeros: !isStringBoolean(getValue('showLeadingZeros')),\n\n mainSource: getValue('main') as keyof OntimeEvent | null,\n secondarySource: getValue('secondary-src') as keyof OntimeEvent | null,\n\n // none doesnt make sense as a configuration of the view\n timerType: timerType === TimerType.None ? undefined : timerType,\n freezeOvertime: isStringBoolean(getValue('freezeOvertime')),\n freezeMessage: getValue('freezeMessage') ?? '',\n hidePhase: isStringBoolean(getValue('hidePhase')),\n\n font: getValue('font') ?? undefined,\n keyColour: makeColourString(getValue('keyColour')),\n timerColour: makeColourString(getValue('timerColour')),\n };\n}\n\n/**\n * Hook exposes the timer view options\n */\nexport function useTimerOptions(): TimerOptions {\n const [searchParams] = useSearchParams();\n const maybePreset = use(PresetContext);\n\n const options = useMemo(() => {\n const defaultValues = maybePreset ? new URLSearchParams(maybePreset.search) : undefined;\n return getOptionsFromParams(searchParams, defaultValues);\n }, [maybePreset, searchParams]);\n\n return options;\n}\n","import { MaybeNumber, MessageState, OntimeEvent, Playback, TimerMessage, TimerPhase, TimerType } from 'ontime-types';\nimport { isPlaybackActive } from 'ontime-utils';\n\nimport { getFormattedTimer, getPropertyValue } from '../../features/viewers/common/viewUtils';\n\n/**\n * Whether a message should be shown\n */\nexport function getShowMessage(message: TimerMessage): boolean {\n return message.text !== '' && message.visible;\n}\n\n/**\n * Whether the playback is playing\n */\nexport function getIsPlaying(playback: Playback): boolean {\n return playback === Playback.Play || playback === Playback.Roll;\n}\n\n/**\n * Gets the total time from the duration and added time of an event\n */\nexport function getTotalTime(duration: MaybeNumber, addedTime: MaybeNumber): number {\n return (duration ?? 0) + (addedTime ?? 0);\n}\n\n/**\n * Whether the progress bar should be shown for this timer type\n */\nexport function getShowProgressBar(timerType: TimerType) {\n return timerType !== TimerType.None && timerType !== TimerType.Clock;\n}\n\n/**\n * Whether the clock should be shown with this timer type\n */\nexport function getShowClock(timerType: TimerType) {\n return timerType !== TimerType.Clock;\n}\n\nconst fontSizeMap: { [key: number]: number } = {\n 4: 28, // 9:01\n 5: 28, // -9:01, 10:01, 9 min\n 6: 25, // -10:01, 10 min\n 8: 18, // 23:01:01\n 9: 18, // -23:01:01\n};\n\n/**\n * Finds a font size that fits the timer in the screen\n * Unfortunately hand tweaked\n */\nexport function getEstimatedFontSize(stageTimer: string, secondaryContent?: string) {\n const stageTimerCharacters = stageTimer.length;\n let timerFontSize = (100 / (stageTimerCharacters - 1)) * 1.25;\n\n if (fontSizeMap[stageTimerCharacters]) {\n timerFontSize = fontSizeMap[stageTimerCharacters];\n }\n\n let externalFontSize = timerFontSize * 0.325;\n if (secondaryContent) {\n // we need to shrink the timer if the external is going to be there\n // this number has been tweaked to fit in a landscape mobile screen\n timerFontSize *= 0.6;\n if (secondaryContent.length > 25) {\n externalFontSize = (100 / (secondaryContent.length - 1)) * 1.8;\n }\n }\n\n return {\n timerFontSize,\n externalFontSize,\n };\n}\n\n/**\n * which, if any, modifier should be shown at any time\n */\nexport function getShowModifiers(\n timerType: TimerType,\n countToEnd: boolean,\n phase: TimerPhase,\n freezeOvertime: boolean,\n freezeMessage: string,\n hidePhase: boolean,\n) {\n if (hidePhase) {\n return {\n showEndMessage: false,\n showFinished: false,\n showWarning: false,\n showDanger: false,\n };\n }\n\n const showModifiers = timerType === TimerType.CountDown || countToEnd;\n if (!showModifiers) {\n return {\n showEndMessage: false,\n showFinished: false,\n showWarning: false,\n showDanger: false,\n };\n }\n\n return {\n showEndMessage: freezeOvertime && freezeMessage !== '',\n showFinished: phase === TimerPhase.Overtime,\n showWarning: phase === TimerPhase.Warning,\n showDanger: phase === TimerPhase.Danger,\n };\n}\n\n/**\n * What, if anything, should be displayed in the secondary field\n */\nexport function getSecondaryDisplay(\n message: MessageState,\n currentAux: MaybeNumber,\n localisedMinutes: string,\n removeSeconds: boolean,\n removeLeadingZero: boolean,\n hideSecondary: boolean,\n): string | undefined {\n if (hideSecondary) {\n return;\n }\n if (\n message.timer.secondarySource === 'aux1' ||\n message.timer.secondarySource === 'aux2' ||\n message.timer.secondarySource === 'aux3'\n ) {\n return getFormattedTimer(currentAux, TimerType.CountDown, localisedMinutes, {\n removeSeconds,\n removeLeadingZero,\n });\n }\n if (message.timer.secondarySource === 'secondary' && message.secondary) {\n return message.secondary;\n }\n return;\n}\n\n/**\n * What should we be showing in the cards?\n */\nexport function getCardData(\n eventNow: OntimeEvent | null,\n eventNext: OntimeEvent | null,\n mainSource: keyof OntimeEvent | null,\n secondarySource: keyof OntimeEvent | null,\n playback: Playback,\n phase: TimerPhase,\n) {\n if (playback === Playback.Stop) {\n return {\n showNow: false,\n nowMain: undefined,\n nowSecondary: undefined,\n showNext: false,\n nextMain: undefined,\n nextSecondary: undefined,\n };\n }\n\n // pending roll timers would be classified as active\n const hasActiveTimer = isPlaybackActive(playback) && phase !== TimerPhase.Pending;\n\n // if we are loaded, we show the upcoming event as next\n const nowMain = hasActiveTimer ? getPropertyValue(eventNow, mainSource ?? 'title') : undefined;\n const nowSecondary = hasActiveTimer ? getPropertyValue(eventNow, secondarySource) : undefined;\n const nextMain = hasActiveTimer\n ? getPropertyValue(eventNext, mainSource ?? 'title')\n : getPropertyValue(eventNow, mainSource ?? 'title');\n const nextSecondary = hasActiveTimer\n ? getPropertyValue(eventNext, secondarySource)\n : getPropertyValue(eventNow, secondarySource);\n\n return {\n showNow: Boolean(nowMain) || Boolean(nowSecondary),\n nowMain,\n nowSecondary,\n showNext: Boolean(nextMain) || Boolean(nextSecondary),\n nextMain,\n nextSecondary,\n };\n}\n","import { CustomFields, ProjectData, Settings, ViewSettings } from 'ontime-types';\n\nimport useCustomFields from '../../common/hooks-query/useCustomFields';\nimport useProjectData from '../../common/hooks-query/useProjectData';\nimport useSettings from '../../common/hooks-query/useSettings';\nimport useViewSettings from '../../common/hooks-query/useViewSettings';\nimport { useViewOptionsStore } from '../../common/stores/viewOptions';\nimport { aggregateQueryStatus, ViewData } from '../utils/viewLoader.utils';\n\nexport interface TimerData {\n customFields: CustomFields;\n projectData: ProjectData;\n isMirrored: boolean;\n settings: Settings;\n viewSettings: ViewSettings;\n}\n\nexport function useTimerData(): ViewData<TimerData> {\n // persisted app state\n const isMirrored = useViewOptionsStore((state) => state.mirror);\n\n // HTTP API data\n const { data: projectData, status: projectDataStatus } = useProjectData();\n const { data: viewSettings, status: viewSettingsStatus } = useViewSettings();\n const { data: settings, status: settingsStatus } = useSettings();\n const { data: customFields, status: customFieldsStatus } = useCustomFields();\n\n return {\n data: {\n customFields,\n projectData,\n isMirrored,\n settings,\n viewSettings,\n },\n status: aggregateQueryStatus([projectDataStatus, viewSettingsStatus, settingsStatus, customFieldsStatus]),\n };\n}\n","import { useMemo } from 'react';\nimport { OntimeView } from 'ontime-types';\n\nimport { FitText } from '../../common/components/fit-text/FitText';\nimport MultiPartProgressBar from '../../common/components/multi-part-progress-bar/MultiPartProgressBar';\nimport EmptyPage from '../../common/components/state/EmptyPage';\nimport TitleCard from '../../common/components/title-card/TitleCard';\nimport ViewLogo from '../../common/components/view-logo/ViewLogo';\nimport ViewParamsEditor from '../../common/components/view-params-editor/ViewParamsEditor';\nimport { useTimerSocket } from '../../common/hooks/useSocket';\nimport { useWindowTitle } from '../../common/hooks/useWindowTitle';\nimport { cx } from '../../common/utils/styleUtils';\nimport { formatTime, getDefaultFormat } from '../../common/utils/time';\nimport SuperscriptTime from '../../features/viewers/common/superscript-time/SuperscriptTime';\nimport { getFormattedTimer, getTimerByType } from '../../features/viewers/common/viewUtils';\nimport { useTranslation } from '../../translation/TranslationProvider';\nimport Loader from '../common/loader/Loader';\nimport { getTimerColour } from '../utils/presentation.utils';\n\nimport { getTimerOptions, useTimerOptions } from './timer.options';\nimport {\n getCardData,\n getEstimatedFontSize,\n getIsPlaying,\n getSecondaryDisplay,\n getShowClock,\n getShowMessage,\n getShowModifiers,\n getShowProgressBar,\n getTotalTime,\n} from './timer.utils';\nimport { TimerData, useTimerData } from './useTimerData';\n\nimport './Timer.scss';\n\nexport default function TimerLoader() {\n const { data, status } = useTimerData();\n\n useWindowTitle('Timer');\n\n if (status === 'pending') {\n return <Loader />;\n }\n\n if (status === 'error') {\n return <EmptyPage text='There was an error fetching data, please refresh the page.' />;\n }\n\n return <Timer {...data} />;\n}\n\nfunction Timer({ customFields, projectData, isMirrored, settings, viewSettings }: TimerData) {\n const { eventNext, eventNow, message, time, clock, timerTypeNow, countToEndNow, auxTimer } = useTimerSocket();\n const {\n hideClock,\n hideCards,\n hideProgress,\n hideMessage,\n hideSecondary,\n hideLogo,\n hideTimerSeconds,\n removeLeadingZeros,\n mainSource,\n secondarySource,\n timerType,\n freezeOvertime,\n freezeMessage,\n hidePhase,\n font,\n keyColour,\n timerColour,\n } = useTimerOptions();\n\n const { getLocalizedString } = useTranslation();\n const localisedMinutes = getLocalizedString('common.minutes');\n\n // gather modifiers\n const viewTimerType = timerType ?? timerTypeNow;\n const showOverlay = getShowMessage(message.timer);\n const { showEndMessage, showFinished, showWarning, showDanger } = getShowModifiers(\n timerTypeNow,\n countToEndNow,\n time.phase,\n freezeOvertime,\n freezeMessage,\n hidePhase,\n );\n const isPlaying = getIsPlaying(time.playback);\n const showClock = !hideClock && getShowClock(viewTimerType);\n const showProgressBar = !hideProgress && getShowProgressBar(viewTimerType);\n\n // gather card data\n const { showNow, nowMain, nowSecondary, showNext, nextMain, nextSecondary } = getCardData(\n eventNow,\n eventNext,\n mainSource,\n secondarySource,\n time.playback,\n time.phase,\n );\n\n // gather timer data\n const totalTime = getTotalTime(time.duration, time.addedTime);\n const formattedClock = formatTime(clock);\n const stageTimer = getTimerByType(freezeOvertime, timerTypeNow, countToEndNow, clock, time, timerType);\n const display = getFormattedTimer(stageTimer, viewTimerType, localisedMinutes, {\n removeSeconds: hideTimerSeconds,\n removeLeadingZero: removeLeadingZeros,\n });\n\n const currentAux = (() => {\n if (message.timer.secondarySource === 'aux1') {\n return auxTimer.aux1;\n }\n if (message.timer.secondarySource === 'aux2') {\n return auxTimer.aux2;\n }\n if (message.timer.secondarySource === 'aux3') {\n return auxTimer.aux3;\n }\n return null;\n })();\n\n const secondaryContent = getSecondaryDisplay(\n message,\n currentAux,\n localisedMinutes,\n hideTimerSeconds,\n removeLeadingZeros,\n hideSecondary,\n );\n\n // gather presentation styles\n const resolvedTimerColour = getTimerColour(viewSettings, timerColour, showWarning, showDanger);\n const { timerFontSize, externalFontSize } = getEstimatedFontSize(display, secondaryContent);\n const userStyles = {\n ...(keyColour && { '--timer-bg': keyColour }),\n ...(resolvedTimerColour && { '--timer-colour': resolvedTimerColour }),\n ...(font && { '--timer-font': font }),\n };\n\n // gather option data\n const defaultFormat = getDefaultFormat(settings?.timeFormat);\n const timerOptions = useMemo(() => getTimerOptions(defaultFormat, customFields), [customFields, defaultFormat]);\n\n return (\n <div\n data-testid='timer-view'\n className={cx(['stage-timer', isMirrored && 'mirror', showFinished && 'stage-timer--finished'])}\n style={userStyles}\n >\n {!hideLogo && projectData?.logo && <ViewLogo name={projectData.logo} className='logo' />}\n\n <ViewParamsEditor target={OntimeView.Timer} viewOptions={timerOptions} />\n\n <div className={cx(['blackout', message.timer.blackout && 'blackout--active'])} />\n\n {!hideMessage && (\n <div className={cx(['message-overlay', showOverlay && 'message-overlay--active'])}>\n <FitText mode='multi' min={32} max={256} className={cx(['message', message.timer.blink && 'blink'])}>\n {message.timer.text}\n </FitText>\n </div>\n )}\n\n {showClock && (\n <div className='clock-container'>\n <div className='label'>{getLocalizedString('common.time_now')}</div>\n <SuperscriptTime time={formattedClock} className='clock' />\n </div>\n )}\n\n <div className={cx(['timer-container', message.timer.blink && !showOverlay && 'blink'])}>\n {showEndMessage ? (\n <FitText mode='multi' min={64} max={256} className='end-message'>\n {freezeMessage}\n </FitText>\n ) : (\n <div\n className={cx(['timer', !isPlaying && 'timer--paused', showFinished && 'timer--finished'])}\n style={{ fontSize: `${timerFontSize}vw` }}\n data-phase={time.phase}\n >\n {display}\n </div>\n )}\n <div\n className={cx(['secondary', !secondaryContent && 'secondary--hidden'])}\n style={{ fontSize: `${externalFontSize}vw` }}\n >\n {secondaryContent}\n </div>\n </div>\n\n {showProgressBar && (\n <MultiPartProgressBar\n className={cx(['progress-container', !isPlaying && 'progress-container--paused'])}\n now={time.current}\n complete={totalTime}\n normalColor={viewSettings.normalColor}\n warning={eventNow?.timeWarning}\n warningColor={viewSettings.warningColor}\n danger={eventNow?.timeDanger}\n dangerColor={viewSettings.dangerColor}\n hideOvertime={!showFinished}\n />\n )}\n\n {!hideCards && (\n <>\n {showNow && <TitleCard className='event now' label='now' title={nowMain} secondary={nowSecondary} />}\n {showNext && <TitleCard className='event next' label='next' title={nextMain} secondary={nextSecondary} />}\n </>\n )}\n </div>\n );\n}\n"],"names":["bsearch","low","high","predicate","mid","FitText","children","mode","min","max","elementProps","ref","useRef","isOverflown","useCallback","el","setFontSize","originVisibility","fontSize","useEffect","observer","jsx","timerDisplayOptions","TimerType","getTimerOptions","timeFormat","customFields","mainOptions","makeOptionsFromCustomFields","secondaryOptions","OptionTitle","getTimeOption","hideTimerSeconds","showLeadingZeros","getOptionsFromParams","searchParams","defaultValues","getValue","key","timerType","validateTimerType","isStringBoolean","makeColourString","useTimerOptions","useSearchParams","maybePreset","use","PresetContext","useMemo","getShowMessage","message","getIsPlaying","playback","Playback","getTotalTime","duration","addedTime","getShowProgressBar","getShowClock","fontSizeMap","getEstimatedFontSize","stageTimer","secondaryContent","stageTimerCharacters","timerFontSize","externalFontSize","getShowModifiers","countToEnd","phase","freezeOvertime","freezeMessage","hidePhase","TimerPhase","getSecondaryDisplay","currentAux","localisedMinutes","removeSeconds","removeLeadingZero","hideSecondary","getFormattedTimer","getCardData","eventNow","eventNext","mainSource","secondarySource","hasActiveTimer","isPlaybackActive","nowMain","getPropertyValue","nowSecondary","nextMain","nextSecondary","useTimerData","isMirrored","useViewOptionsStore","state","projectData","projectDataStatus","useProjectData","viewSettings","viewSettingsStatus","useViewSettings","settings","settingsStatus","useSettings","customFieldsStatus","useCustomFields","aggregateQueryStatus","TimerLoader","data","status","useWindowTitle","Loader","EmptyPage","Timer","time","clock","timerTypeNow","countToEndNow","auxTimer","useTimerSocket","hideClock","hideCards","hideProgress","hideMessage","hideLogo","removeLeadingZeros","font","keyColour","timerColour","getLocalizedString","useTranslation","viewTimerType","showOverlay","showEndMessage","showFinished","showWarning","showDanger","isPlaying","showClock","showProgressBar","showNow","showNext","totalTime","formattedClock","formatTime","getTimerByType","display","resolvedTimerColour","getTimerColour","userStyles","defaultFormat","getDefaultFormat","timerOptions","jsxs","cx","ViewLogo","ViewParamsEditor","OntimeView","SuperscriptTime","MultiPartProgressBar","Fragment","TitleCard"],"mappings":"s0CAKO,MAAMA,GAAU,CAACC,EAAaC,EAAcC,IAAgD,CACjG,KAAOF,EAAMC,GAAM,CACjB,MAAME,EAAM,KAAK,OAAOH,EAAMC,GAAQ,CAAC,EACvC,GAAIE,IAAQH,EAAK,MAEbE,EAAUC,CAAG,EACTH,EAAAG,EAECF,EAAAE,CACT,CAEK,OAAA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F,GAAe,OAAO,CAAC,EACnF,SAAA,CACCC,GAAAjH,EAAA,IAAChB,EAAQ,CAAA,KAAK,QAAQ,IAAK,GAAI,IAAK,IAAK,UAAU,cAChD,SAAAiE,CACH,CAAA,EAEAjD,EAAA,IAAC,MAAA,CACC,UAAWsI,EAAG,CAAC,QAAS,CAACjB,GAAa,gBAAiBH,GAAgB,iBAAiB,CAAC,EACzF,MAAO,CAAE,SAAU,GAAGvE,EAAa,IAAK,EACxC,aAAYmD,EAAK,MAEhB,SAAAgC,CAAA,CACH,EAEF9H,EAAA,IAAC,MAAA,CACC,UAAWsI,EAAG,CAAC,YAAa,CAAC7F,GAAoB,mBAAmB,CAAC,EACrE,MAAO,CAAE,SAAU,GAAGG,EAAgB,IAAK,EAE1C,SAAAH,CAAA,CAAA,CACH,EACF,EAEC8E,IACCvH,EAAA,IAAC2I,GAAA,CACC,UAAWL,EAAG,CAAC,qBAAsB,CAACjB,GAAa,4BAA4B,CAAC,EAChF,IAAKvB,EAAK,QACV,SAAU4B,GACV,YAAa5C,EAAa,YAC1B,QAASlB,GAAA,YAAAA,EAAU,YACnB,aAAckB,EAAa,aAC3B,OAAQlB,GAAA,YAAAA,EAAU,WAClB,YAAakB,EAAa,YAC1B,aAAc,CAACoC,CAAA,CACjB,EAGD,CAACb,GAEGgC,EAAAA,KAAAO,EAAA,SAAA,CAAA,SAAA,CAAWpB,IAAAxH,EAAA,IAAC6I,GAAU,UAAU,YAAY,MAAM,MAAM,MAAO3E,GAAS,UAAWE,EAAc,CAAA,EACjGqD,IAAazH,EAAA,IAAA6I,EAAA,CAAU,UAAU,aAAa,MAAM,OAAO,MAAOxE,GAAU,UAAWC,EAAe,CAAA,CAAA,CACzG,CAAA,CAAA,CAAA,CAEJ,CAEJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.blink{animation:blink 1s step-start infinite}@keyframes blink{0%{opacity:100%}50%{opacity:20%}}.fourtyfive{transform:rotate(45deg)}.mirror{transform:rotate(180deg)}.stage-timer{margin:0;box-sizing:border-box;overflow:hidden;width:100%;height:100vh;transition:opacity .5s ease-in-out;font-family:var(--font-family-override, "Open Sans", "Segoe UI", sans-serif);background:var(--timer-bg, var(--background-color-override, #101010));color:var(--color-override, rgba(255, 255, 255, .8));gap:min(2vh,16px);padding:min(2vh,16px) clamp(16px,2vw,24px);display:flex;flex-direction:column}.stage-timer--finished{outline:clamp(4px,1vw,16px) solid var(--timer-overtime-color-override, #FA5656);outline-offset:calc(clamp(4px,1vw,16px)*-1);transition:.5s}.stage-timer .blackout{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;background-color:#000;opacity:0;transition:opacity .5s}.stage-timer .blackout--active{z-index:101;opacity:1}.stage-timer .clock-container{margin-left:auto;font-weight:600;transition:opacity .5s}.stage-timer .clock-container .label{font-size:clamp(12px,1.25vw,20px);color:var(--label-color-override, rgba(255, 255, 255, .25));text-transform:uppercase}.stage-timer .clock-container .clock{font-size:clamp(24px,2.5vw,48px);color:var(--secondary-color-override, rgba(255, 255, 255, .45));letter-spacing:.05em;line-height:.95em}.stage-timer .clock-container--hidden{opacity:0}.stage-timer .event{background-color:var(--card-background-color-override, rgba(255, 255, 255, .05));padding:min(2vh,8px) clamp(16px,2vw,24px);border-radius:4px}.stage-timer .event.now{grid-area:now}.stage-timer .event.next{grid-area:next}.stage-timer .timer-container{flex:1;align-content:center;justify-self:center;align-self:center;width:100%;overflow:hidden}.stage-timer .timer-container .end-message{text-align:center;font-size:11.5vw;line-height:.9em;font-weight:600;color:var(--timer-overtime-color-override, #FA5656);padding:0}.stage-timer .timer-container .timer{opacity:1;font-family:var(--timer-font, var(--font-family-override, "Open Sans", "Segoe UI", sans-serif));color:var(--timer-colour, var(--timer-color-override, #f6f6f6));line-height:.9em;text-align:center;letter-spacing:.05em;font-weight:600;transition-property:font-size;transition-duration:.5s}.stage-timer .timer-container .timer--paused{opacity:.6;transition:.5s}.stage-timer .timer-container .timer--finished{color:var(--timer-colour, var(--timer-overtime-color-override, #FA5656))}.stage-timer .timer-container .timer[data-phase=warning]{color:var(--timer-colour, var(--timer-warning-color-override))}.stage-timer .timer-container .timer[data-phase=danger]{color:var(--timer-colour, var(--timer-danger-color-override))}.stage-timer .secondary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:.125em;padding-block:.125em;font-weight:600;text-align:center;color:var(--external-color-override, rgba(255, 255, 255, .85));letter-spacing:.5px;line-height:1em;transition-property:opacity,height;transition-duration:.5s;border-top:1px solid color-mix(in srgb,var(--external-color-override, rgba(255, 255, 255, .85)) 10%,transparent)}.stage-timer .secondary--hidden{opacity:0;height:0}.stage-timer .progress-container{width:100%;margin:0 auto;opacity:1;transition:.5s}.stage-timer .progress-container--paused{opacity:.6;transition:.5s}.stage-timer .message-overlay{position:fixed;top:0;right:0;bottom:0;left:0;padding:2vw;background:var(--background-color-override, #101010);opacity:0;transition:opacity .5s}.stage-timer .message-overlay--active{z-index:100;opacity:1}.stage-timer .message{display:grid;place-content:center;height:100%;width:100%;color:var(--color-override, rgba(255, 255, 255, .8));text-align:center;font-weight:600}.stage-timer .logo{position:absolute;top:min(2vh,16px);left:clamp(16px,2vw,24px);max-width:min(200px,20vw)}@media screen and (max-width: 768px){.stage-timer .logo img{height:min(50px,10vh)}}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{h as w,j as t,aw as W,bK as Y,T as Z,aL as tt,x as et,bL as $,bM as q,bN as E,bO as st,bP as at,bQ as nt}from"./vendor-Cu5xgv5K.js";import{C as ot}from"./EditorUtils-De0umjb-.js";import{b as n,a as N,i as M,H as it,bB as c,bC as lt,bD as P,bE as h,bF as I,bG as rt,y as g,bg as S,J as ct,l as A,r as dt,bH as mt,av as ut,bv as xt,bw as pt}from"./index-5QAOtSTh.js";import{P as _t}from"./ProtectRoute-p1fmtLeu.js";import{T as z,A as bt}from"./TimeInput-wQ67FbW6.js";import{p as L}from"./parseUserTime-CCDHpp7D.js";import{T as R}from"./Tooltip-DJ8Y4CO4.js";import{u as ht}from"./useReport-PEFRsOhF.js";import{s as B}from"./Editor.module-DvV2efYs.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="433bb1cb-2fe3-4ba7-b99b-e94a3d0f8d76",e._sentryDebugIdIdentifier="sentry-dbid-433bb1cb-2fe3-4ba7-b99b-e94a3d0f8d76")}catch{}})();function yt(e,s){return{start:e!==n.Stop&&e!==n.Play,pause:e===n.Play,roll:e!==n.Roll&&s!==N.Overtime,stop:e!==n.Stop,reload:e!==n.Stop&&e!==n.Roll}}const jt="_blink_yewzx_1",ft="_fourtyfive_yewzx_13",vt="_tapButton_yewzx_17",gt="_neutral_yewzx_29",Ct="_active_yewzx_51",kt="_play_yewzx_66",Tt="_roll_yewzx_93",Nt="_pause_yewzx_120",wt="_ontime_yewzx_147",It="_stop_yewzx_174",Pt="_square_yewzx_201",St="_tight_yewzx_206",At="_fill_yewzx_211",f={blink:jt,fourtyfive:ft,tapButton:vt,neutral:gt,active:Ct,play:kt,roll:Tt,pause:Nt,ontime:wt,stop:It,square:Pt,tight:St,fill:At},r=w.forwardRef((e,s)=>{const{children:a,disabled:o,onClick:l,theme:i="neutral",aspect:m="normal",active:u,className:x}=e;return t.jsx("button",{className:M([f.tapButton,x,f[i],f[m],u&&f.active]),disabled:o,type:"button",onClick:l,ref:s,children:a})});r.displayName="TabButton";const Rt="_addTime_18oax_17",Bt="_addButtons_18oax_24",Dt="_tallButtons_18oax_30",v={addTime:Rt,addButtons:Bt,tallButtons:Dt};function $t(e){const{playback:s}=e,[a,o]=W({key:"add-time",defaultValue:3e5}),l=(x,C)=>{const _=L(C);o(Math.min(_,it))},i=x=>{x==="add"?c.addTime(a):c.addTime(-1*a)},u=!(s===n.Play||s===n.Pause)||a===0;return t.jsxs("div",{className:v.addTime,children:[t.jsx(z,{name:"addtime",submitHandler:l,time:a,placeholder:"Add time"}),t.jsxs("div",{className:v.addButtons,children:[t.jsx(r,{onClick:()=>i("remove"),disabled:u,className:v.tallButtons,children:t.jsx(Y,{})}),t.jsx(r,{onClick:()=>i("add"),disabled:u,className:v.tallButtons,children:t.jsx(Z,{})})]})]})}const qt="_label_u5jlo_17",Et="_controls_u5jlo_24",Mt="_input_u5jlo_28",zt="_twoSides_u5jlo_34",Lt="_fakeInput_u5jlo_42",y={label:qt,controls:Et,input:Mt,twoSides:zt,fakeInput:Lt};function k({index:e}){const{playback:s,direction:a}=lt(e),{stop:o,setDirection:l}=I,i=()=>{const x=a===h.CountDown?h.CountUp:h.CountDown;l(e,x)},m=s!==P.Stop,u=s===P.Start?"pause":"play";return t.jsxs("label",{className:y.label,children:["Aux Timer ",e,t.jsxs("div",{className:y.controls,children:[t.jsxs("div",{className:y.input,children:[t.jsx(Ft,{index:e,isActive:m}),t.jsxs(r,{onClick:i,aspect:"tight",disabled:m,children:[a===h.CountDown&&t.jsx(tt,{"data-testid":`aux-timer-direction-${e}`}),a===h.CountUp&&t.jsx(et,{"data-testid":`aux-timer-direction-${e}`})]})]}),t.jsxs("div",{className:y.twoSides,children:[t.jsx(Ot,{index:e,action:u}),t.jsx(r,{onClick:()=>o(e),theme:n.Stop,disabled:!m,children:t.jsx($,{"data-testid":`aux-timer-stop-${e}`})})]})]})]})}function Ft({index:e,isActive:s}){const a=rt(e),{setDuration:o}=I,l=(i,m)=>{const u=L(m);o(e,u)};return s?t.jsx("div",{className:y.fakeInput,"data-testid":`time-label-aux${e}`,children:g(a)}):t.jsx(z,{submitHandler:l,name:`aux${e}`,time:a,placeholder:`Aux ${e}`})}function Ot({index:e,action:s}){const{start:a,pause:o}=I;return s==="play"?t.jsx(r,{onClick:()=>a(e),theme:n.Play,children:t.jsx(q,{"data-testid":`aux-timer-start-${e}`})}):t.jsx(r,{onClick:()=>o(e),theme:n.Pause,children:t.jsx(E,{"data-testid":`aux-timer-pause-${e}`})})}const Ut="_buttonContainer_1mqxq_17",Ht="_go_1mqxq_25",Xt="_playbackContainer_1mqxq_30",Gt="_transportContainer_1mqxq_37",Vt="_extra_1mqxq_44",Jt="_invertX_1mqxq_51",p={buttonContainer:Ut,go:Ht,playbackContainer:Xt,transportContainer:Gt,extra:Vt,invertX:Jt};function Kt(e){const{playback:s,numEvents:a,selectedEventIndex:o,timerPhase:l}=e,i=s===n.Roll,m=s===n.Play,u=s===n.Pause,x=s===n.Armed,C=o===0,_=o===a-1,j=a===0,F=i||j,O=i||j||_,U=i||j||C,b=yt(s,l),H=!b.start,X=!b.pause,G=!b.roll||j,V=!b.stop,J=!b.reload,[K,Q]=w.useMemo(()=>x?[c.start,"Start"]:_?[c.stop,"Finish"]:o===null?[c.startNext,"Start"]:[c.startNext,"Next"],[x,_,o]);return t.jsxs("div",{className:p.buttonContainer,children:[t.jsx(r,{disabled:F,onClick:K,aspect:"fill",className:p.go,children:Q}),t.jsxs("div",{className:p.playbackContainer,children:[t.jsx(r,{onClick:c.start,disabled:H,theme:n.Play,active:m,children:t.jsx(q,{})}),t.jsx(r,{onClick:c.pause,disabled:X,theme:n.Pause,active:u,children:t.jsx(E,{})})]}),t.jsxs("div",{className:p.transportContainer,children:[t.jsx(r,{onClick:c.previous,disabled:U,children:t.jsx(st,{})}),t.jsx(r,{onClick:c.next,disabled:O,children:t.jsx(at,{})})]}),t.jsxs("div",{className:p.extra,children:[t.jsx(r,{onClick:c.roll,disabled:G,theme:n.Roll,active:i,children:"Roll"}),t.jsx(r,{onClick:c.reload,disabled:J,children:t.jsx(nt,{className:p.invertX})}),t.jsx(r,{onClick:c.stop,disabled:V,theme:n.Stop,children:t.jsx($,{})})]})]})}const Qt="_timer_1f17d_21",Wt="_finished_1f17d_33",Yt="_muted_1f17d_36",T={timer:Qt,finished:Wt,muted:Yt};function Zt(e){const{time:s}=e,a=(s??0)<0,o=s==null?S:g(s,{fallback:S}).replace("-",""),l=M([T.timer,a?T.finished:null,s===null&&T.muted]);return t.jsx("div",{className:l,children:o})}const te="_timeContainer_g12ye_17",ee="_indicators_g12ye_25",se="_indicatorRoll_g12ye_34",ae="_indicatorDelay_g12ye_35",ne="_indicatorNegative_g12ye_36",oe="_status_g12ye_65",ie="_tag_g12ye_73",le="_time_g12ye_17",re="_rolltag_g12ye_84",d={timeContainer:te,indicators:ee,indicatorRoll:se,indicatorDelay:ae,indicatorNegative:ne,status:oe,tag:ie,time:le,rolltag:re};function ce(e){return e>0?`Added ${A(e,!1)}`:e<0?`Removed ${A(Math.abs(e),!1)}`:""}function de({children:e}){const s=ct(),a=s.playback===n.Roll,o=s.phase===N.Pending,l=s.phase===N.Overtime,i=!!s.addedTime,m=a?"Roll mode active":"",u=ce(s.addedTime);return t.jsxs("div",{className:d.timeContainer,children:[t.jsxs("div",{className:d.indicators,children:[t.jsx(R,{text:m,render:t.jsx("div",{}),className:d.indicatorRoll,"data-active":a}),t.jsx("div",{className:d.indicatorNegative,"data-active":l}),t.jsx(R,{text:u,render:t.jsx("div",{}),className:d.indicatorDelay,"data-active":i})]}),t.jsx(Zt,{time:o?s.secondaryTimer:s.current}),t.jsx("div",{className:d.status,children:o?t.jsx("span",{className:d.rolltag,children:"Roll: Countdown to start"}):t.jsx(me,{startedAt:s.startedAt,expectedFinish:s.expectedFinish,playback:s.playback})}),e]})}function me({startedAt:e,expectedFinish:s,playback:a}){if(a===n.Stop)return t.jsx(ue,{});const o=g(e),l=s!==null?s%dt:null,i=g(l);return t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:d.start,children:[t.jsx("span",{className:d.tag,children:"Started at"}),t.jsx("span",{className:d.time,children:o})]}),t.jsxs("span",{className:d.finish,children:[t.jsx("span",{className:d.tag,children:"Expect end"}),t.jsx("span",{className:d.time,children:i})]})]})}function ue(){const{data:e}=ht();return Object.keys(e).length>0?t.jsx(bt,{search:"settings=sharing__report",children:"Go to report management"}):null}const xe="_mainContainer_1qlxm_17",pe="_auxTimers_1qlxm_22",D={mainContainer:xe,auxTimers:pe};function _e(){const e=mt();return t.jsxs("div",{className:D.mainContainer,children:[t.jsx(de,{children:t.jsx($t,{playback:e.playback})}),t.jsx(Kt,{playback:e.playback,numEvents:e.numEvents,selectedEventIndex:e.selectedEventIndex,timerPhase:e.timerPhase}),t.jsxs("div",{className:D.auxTimers,children:[t.jsx(k,{index:1}),t.jsx(k,{index:2}),t.jsx(k,{index:3})]})]})}const Ne=w.memo(be);function be(){const e=window.location.pathname.includes("/timercontrol");return t.jsx(_t,{permission:"editor",children:t.jsxs("div",{className:B.playback,"data-testid":"panel-timer-control",children:[!e&&t.jsx(ot,{onClick:s=>ut("timercontrol",s)}),e&&t.jsx(xt,{suppressSettings:!0}),t.jsx("div",{className:B.content,children:t.jsx(pt,{children:t.jsx(_e,{})})})]})})}export{Ne as default};
|
|
2
|
-
//# sourceMappingURL=TimerControlExport-C1C_vBX4.js.map
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e as a,k as $,h as i}from"./vendor-Cu5xgv5K.js";import{r as p,aw as g,o as y,aE as m,ax as R}from"./index-5QAOtSTh.js";import{u as I}from"./useProjectData-CetvEK9E.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="0f7e61a8-bf75-49b8-b046-7e30c2f14635",t._sentryDebugIdIdentifier="sentry-dbid-0f7e61a8-bf75-49b8-b046-7e30c2f14635")}catch{}})();var c=(t=>(t.Event="event",t.Delay="delay",t.Group="group",t.Milestone="milestone",t))(c||{});function M(t){return(t==null?void 0:t.type)===c.Event}function v(t){return!t.skip}function G(t){return(t==null?void 0:t.type)===c.Delay}function O(t){return(t==null?void 0:t.type)===c.Group}function N(t){return(t==null?void 0:t.type)===c.Milestone}function W(t,n){return t in n}function _(t){return t.type==="osc"}function B(t){return t.type==="http"}function K(t){return t.type==="ontime"}function b(t,n){return!(!n||t.dayOffset<=n.dayOffset||n.timeStart+n.duration>p)}function D(t,n){if(!n)return!0;const s=t.timeStart+t.duration+t.dayOffset*p,e=n.timeStart+n.duration+n.dayOffset*p;return s>=e}const r=`${g}/rundowns`;async function U(){return(await a.get(r)).data}async function L(){return(await a.get(`${r}/current`)).data}async function Q(t){return a.post(`${r}/${t}/load`)}async function j(t){return a.post(r,{title:t})}async function z(t){return a.delete(`${r}/${t}`)}async function H(t,n){return a.post(`${r}/${t}/entry`,n)}async function J(t,n){return a.put(`${r}/${t}/entry`,n)}async function V(t,n){return a.put(`${r}/${t}/batch`,n)}async function X(t,n){return a.patch(`${r}/${t}/reorder`,n)}async function Y(t,n,s){return a.patch(`${r}/${t}/swap`,{from:n,to:s})}async function Z(t,n){return a.patch(`${r}/${t}/applydelay/${n}`)}async function tt(t,n){return a.post(`${r}/${t}/clone/${n}`)}async function nt(t,n){return a.post(`${r}/${t}/group`,{ids:n})}async function et(t,n){return a.post(`${r}/${t}/ungroup/${n}`)}async function st(t,n){return a.delete(`${r}/${t}/entries`,{data:{ids:n}})}async function at(t){return a.delete(`${r}/${t}/all`)}const P="LAST";function x(t,n){const{metadata:s,process:e}=w(n);let o=s;const u={};for(const d of t.flatOrder){const l=t.entries[d];o=e(l),u[d]=o}return u[P]=o,u}function T(t,n){const{process:s}=w(n),e=[];for(const o of t.flatOrder){const u=t.entries[o],d={...u,...s(u)};e.push(d)}return e}function w(t){let n={previousEvent:null,latestEvent:null,previousEntryId:null,thisId:null,eventIndex:0,isPast:!!t,isNextDay:!1,totalGap:0,isLinkedToLoaded:!1,isLoaded:!1,groupId:null,groupColour:void 0,groupEntries:void 0,isFirstAfterGroup:!1};function s(e){return n=k(n,t,e),n}return{metadata:n,process:s}}function k(t,n,s){var o,u;const e={...t};return e.isNextDay=!1,e.isLoaded=!1,e.previousEntryId=e.thisId,e.thisId=s.id,e.previousEvent=e.latestEvent,s.id===n&&(e.isLoaded=!0,e.isPast=!1,e.isLinkedToLoaded=!0),O(s)?(e.groupId=s.id,e.groupColour=s.colour,e.groupEntries=s.entries.length):(s.parent!==e.groupId&&(e.groupId=s.parent,e.groupEntries=void 0,s.parent===null&&(e.groupColour=void 0)),M(s)&&(e.eventIndex+=1,e.isFirstAfterGroup=!!((o=e.previousEvent)!=null&&o.parent)&&s.parent===null,v(s)&&(e.isNextDay=b(s,e.previousEvent),e.totalGap+=s.gap,!e.isPast&&!e.isLoaded&&(e.isLinkedToLoaded=s.linkStart&&!((u=e.previousEvent)!=null&&u.countToEnd)&&e.isLinkedToLoaded),D(s,e.latestEvent)&&(e.latestEvent=s)))),e}const S={id:"default",title:"",order:[],flatOrder:[],entries:{},revision:-1};function f(){const{data:t,status:n,isError:s,refetch:e,isFetching:o}=$({queryKey:R,queryFn:L,placeholderData:(u,d)=>u,refetchInterval:m});return{data:t??S,status:n,isError:s,refetch:e,isFetching:o}}function rt(){const{data:t,status:n}=f(),{selectedEventId:s}=y(),e=i.useMemo(()=>x(t,s),[t,s]);return{data:t,status:n,rundownMetadata:e}}function ot(){const{data:t,status:n}=f(),{data:s}=I(),e=i.useRef(""),[o,u]=i.useState(-1),[d,l]=i.useState([]);return i.useEffect(()=>{if(t.revision!==-1||t.revision!==o){const E=t.order.map(h=>t.entries[h]);l(E),u(t.revision)}},[t.entries,t.flatOrder,t.revision,o]),i.useEffect(()=>{(s==null?void 0:s.title)!==e.current&&(u(-1),e.current=(s==null?void 0:s.title)??"")},[s]),{data:d,rundownId:t.id,status:n}}function q(){const{data:t,status:n}=f(),{selectedEventId:s}=y();return{data:i.useMemo(()=>T(t,s),[t,s]),status:n}}function ut(t){const{data:n,status:s}=q();return{data:i.useMemo(()=>n.filter(t),[n,t]),status:s}}function it(t){const{data:n}=f();return i.useMemo(()=>t===null?null:n.entries[t],[t,n.entries])}export{at as A,Z as B,et as C,nt as D,X as E,Y as F,c as S,v as a,ut as b,ot as c,D as d,_ as e,B as f,K as g,f as h,M as i,O as j,N as k,j as l,z as m,Q as n,U as o,W as p,G as q,rt as r,it as s,P as t,q as u,H as v,tt as w,J as x,V as y,st as z};
|
|
2
|
-
//# sourceMappingURL=useRundown-D8CYATNi.js.map
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRundown-D8CYATNi.js","sources":["../../../../packages/types/src/definitions/core/OntimeEntry.ts","../../../../packages/types/src/utils/guards.ts","../../../../packages/utils/src/date-utils/checkIsNextDay.ts","../../../../packages/utils/src/date-utils/isNewLatest.ts","../../src/common/api/rundown.ts","../../src/common/utils/rundownMetadata.ts","../../src/common/hooks-query/useRundown.ts"],"sourcesContent":["import type { MaybeNumber } from '../../utils/utils.type.js';\nimport type { EndAction } from '../EndAction.type.js';\nimport type { TimerType } from '../TimerType.type.js';\nimport type { TimeStrategy } from '../TimeStrategy.type.js';\nimport type { Trigger } from './Automation.type.js';\nimport type { EntryCustomFields } from './CustomFields.type.js';\n\nexport type EntryId = string;\n\nexport enum SupportedEntry {\n Event = 'event',\n Delay = 'delay',\n Group = 'group',\n Milestone = 'milestone',\n}\n\nexport type OntimeBaseEvent = {\n type: SupportedEntry;\n id: EntryId;\n};\n\nexport type OntimeDelay = OntimeBaseEvent & {\n type: SupportedEntry.Delay;\n duration: number;\n parent: EntryId | null;\n};\n\nexport type OntimeMilestone = OntimeBaseEvent & {\n type: SupportedEntry.Milestone;\n cue: string;\n title: string;\n note: string;\n colour: string;\n custom: EntryCustomFields;\n parent: EntryId | null;\n // !==== RUNTIME METADATA ====! //\n revision: number;\n};\n\nexport type OntimeGroup = OntimeBaseEvent & {\n type: SupportedEntry.Group;\n title: string;\n note: string;\n entries: EntryId[];\n targetDuration: MaybeNumber;\n colour: string;\n custom: EntryCustomFields;\n // !==== RUNTIME METADATA ====! //\n revision: number;\n timeStart: MaybeNumber; // calculated at runtime\n timeEnd: MaybeNumber; // calculated at runtime\n duration: number; // calculated at runtime\n isFirstLinked: boolean; // calculated at runtime, whether the first event is linked\n};\n\nexport type OntimeEvent = OntimeBaseEvent & {\n type: SupportedEntry.Event;\n flag: boolean;\n cue: string;\n title: string;\n note: string;\n endAction: EndAction;\n timerType: TimerType;\n countToEnd: boolean;\n linkStart: boolean;\n timeStrategy: TimeStrategy;\n timeStart: number;\n timeEnd: number;\n duration: number;\n skip: boolean;\n colour: string;\n timeWarning: number;\n timeDanger: number;\n custom: EntryCustomFields;\n triggers: Trigger[];\n parent: EntryId | null;\n // !==== RUNTIME METADATA ====! //\n revision: number;\n delay: number; // calculated at runtime\n dayOffset: number; // calculated at runtime\n gap: number; // calculated at runtime\n};\n\nexport type PlayableEvent = OntimeEvent & { skip: false };\nexport type TimeField = 'timeStart' | 'timeEnd' | 'duration';\nexport type OntimeEntry = OntimeDelay | OntimeGroup | OntimeEvent | OntimeMilestone;\n\n// we need to create a manual union type since keys cannot be used in type unions\nexport type OntimeEntryCommonKeys = keyof OntimeEvent | keyof OntimeDelay | keyof OntimeGroup | keyof OntimeMilestone;\n","import type { AutomationOutput, HTTPOutput, OntimeAction, OSCOutput } from '../definitions/core/Automation.type.js';\nimport type {\n OntimeDelay,\n OntimeEntry,\n OntimeEvent,\n OntimeGroup,\n OntimeMilestone,\n PlayableEvent,\n} from '../definitions/core/OntimeEntry.js';\nimport { SupportedEntry } from '../definitions/core/OntimeEntry.js';\nimport { type TimerLifeCycle, timerLifecycleValues } from '../definitions/core/TimerLifecycle.type.js';\n\ntype MaybeEvent = OntimeEntry | Partial<OntimeEntry> | null | undefined;\n\nexport function isOntimeEvent(event: MaybeEvent): event is OntimeEvent {\n return event?.type === SupportedEntry.Event;\n}\n\nexport function isPlayableEvent(event: OntimeEvent): event is PlayableEvent {\n return !event.skip;\n}\n\nexport function isOntimeDelay(event: MaybeEvent): event is OntimeDelay {\n return event?.type === SupportedEntry.Delay;\n}\n\nexport function isOntimeGroup(event: MaybeEvent): event is OntimeGroup {\n return event?.type === SupportedEntry.Group;\n}\n\nexport function isOntimeMilestone(event: MaybeEvent): event is OntimeMilestone {\n return event?.type === SupportedEntry.Milestone;\n}\n\ntype AnyKeys<T> = keyof T;\n\nexport function isKeyOfType<T extends object>(key: PropertyKey, obj: T): key is AnyKeys<T> {\n return key in obj;\n}\n\nexport function isOSCOutput(output: AutomationOutput): output is OSCOutput {\n return output.type === 'osc';\n}\n\nexport function isHTTPOutput(output: AutomationOutput): output is HTTPOutput {\n return output.type === 'http';\n}\n\nexport function isOntimeAction(output: AutomationOutput): output is OntimeAction {\n return output.type === 'ontime';\n}\n\nexport function isTimerLifeCycle(maybeCycle: unknown): maybeCycle is TimerLifeCycle {\n if (typeof maybeCycle !== 'string') return false;\n return timerLifecycleValues.includes(maybeCycle);\n}\n","import type { OntimeEvent } from 'ontime-types';\n\nimport { dayInMs } from './conversionUtils.js';\n\n/**\n * Utility function checks whether a given event is the day after from its predecessor\n */\nexport function checkIsNextDay(\n current: Pick<OntimeEvent, 'timeStart' | 'dayOffset'>,\n previous: Pick<OntimeEvent, 'timeStart' | 'duration' | 'dayOffset'> | null,\n): boolean {\n if (!previous) {\n return false;\n }\n\n // if the day offsets are the same it can't be the next day\n if (current.dayOffset <= previous.dayOffset) {\n return false;\n }\n\n // if the previous event crossed midnight then the current is the same day\n if (previous.timeStart + previous.duration > dayInMs) {\n return false;\n }\n\n return true;\n}\n","import type { OntimeEvent } from 'ontime-types';\n\nimport { dayInMs } from './conversionUtils.js';\n\n/**\n * Checks whether a new element is the latest in the list\n */\nexport function isNewLatest(\n currentEvent: Pick<OntimeEvent, 'timeStart' | 'duration' | 'dayOffset'>,\n previousEvent: Pick<OntimeEvent, 'timeStart' | 'duration' | 'dayOffset'> | null,\n) {\n // true if there is no previous\n if (!previousEvent) {\n return true;\n }\n\n const normalisedCurrentEnd = currentEvent.timeStart + currentEvent.duration + currentEvent.dayOffset * dayInMs;\n const normalisedPreviousEnd = previousEvent.timeStart + previousEvent.duration + previousEvent.dayOffset * dayInMs;\n\n return normalisedCurrentEnd >= normalisedPreviousEnd;\n}\n","import axios, { AxiosResponse } from 'axios';\nimport { EntryId, OntimeEntry, OntimeEvent, ProjectRundownsList, Rundown, TransientEventPayload } from 'ontime-types';\n\nimport { apiEntryUrl } from './constants';\n\nconst rundownPath = `${apiEntryUrl}/rundowns`;\n\n// #region operations on project rundowns =========================\n\n/**\n * HTTP request to fetch a list of existing rundowns\n */\nexport async function fetchProjectRundownList(): Promise<ProjectRundownsList> {\n const res = await axios.get(rundownPath);\n return res.data;\n}\n\n/**\n * HTTP request to fetch all entries in the currently loaded rundown\n */\nexport async function fetchCurrentRundown(): Promise<Rundown> {\n const res = await axios.get(`${rundownPath}/current`);\n return res.data;\n}\n\n/**\n * HTTP request to switch the currently loaded rundown\n */\nexport async function loadRundown(id: string): Promise<AxiosResponse<ProjectRundownsList>> {\n return axios.post(`${rundownPath}/${id}/load`);\n}\n\n/**\n * HTTP request to create a new rundown\n */\nexport async function createRundown(title: string): Promise<AxiosResponse<ProjectRundownsList>> {\n return axios.post(rundownPath, { title });\n}\n\n/**\n * HTTP request to delete a rundown\n */\nexport async function deleteRundown(id: string): Promise<AxiosResponse<ProjectRundownsList>> {\n return axios.delete(`${rundownPath}/${id}`);\n}\n\n// #endregion operations on project rundowns ======================\n// #region operations on rundown entries ==========================\n\n/**\n * HTTP request to post new entry\n */\nexport async function postAddEntry(\n rundownId: string,\n data: TransientEventPayload,\n): Promise<AxiosResponse<OntimeEntry>> {\n return axios.post(`${rundownPath}/${rundownId}/entry`, data);\n}\n\n/**\n * HTTP request to edit an entry\n */\nexport async function putEditEntry(rundownId: string, data: Partial<OntimeEntry>): Promise<AxiosResponse<OntimeEntry>> {\n return axios.put(`${rundownPath}/${rundownId}/entry`, data);\n}\n\nexport type BatchEditEntry = {\n data: Partial<OntimeEvent>;\n ids: EntryId[];\n};\n\n/**\n * HTTP request to edit multiple events\n */\nexport async function putBatchEditEvents(rundownId: string, data: BatchEditEntry): Promise<AxiosResponse<Rundown>> {\n return axios.put(`${rundownPath}/${rundownId}/batch`, data);\n}\n\nexport type ReorderEntry = {\n entryId: EntryId;\n destinationId: EntryId;\n order: 'before' | 'after' | 'insert';\n};\n\n/**\n * HTTP request to reorder an entry\n */\nexport async function patchReorderEntry(rundownId: string, data: ReorderEntry): Promise<AxiosResponse<Rundown>> {\n return axios.patch(`${rundownPath}/${rundownId}/reorder`, data);\n}\n\n/**\n * HTTP request to swap two events\n */\nexport async function requestEventSwap(rundownId: string, from: EntryId, to: EntryId): Promise<AxiosResponse<Rundown>> {\n return axios.patch(`${rundownPath}/${rundownId}/swap`, { from, to });\n}\n\n/**\n * HTTP request to request application of delay\n */\nexport async function requestApplyDelay(rundownId: string, delayId: EntryId): Promise<AxiosResponse<Rundown>> {\n return axios.patch(`${rundownPath}/${rundownId}/applydelay/${delayId}`);\n}\n\n/**\n * HTTP request for cloning an entry\n */\nexport async function postCloneEntry(rundownId: string, entryId: EntryId): Promise<AxiosResponse<Rundown>> {\n return axios.post(`${rundownPath}/${rundownId}/clone/${entryId}`);\n}\n\n/**\n * HTTP request for grouping a list of entries into a group\n */\nexport async function requestGroupEntries(rundownId: string, entryIds: EntryId[]): Promise<AxiosResponse<Rundown>> {\n return axios.post(`${rundownPath}/${rundownId}/group`, { ids: entryIds });\n}\n\n/**\n * HTTP request for dissolving of a group\n */\nexport async function requestUngroup(rundownId: string, groupId: EntryId): Promise<AxiosResponse<Rundown>> {\n return axios.post(`${rundownPath}/${rundownId}/ungroup/${groupId}`);\n}\n\n/**\n * HTTP request to delete entries of a given rundown\n */\nexport async function deleteEntries(rundownId: string, entryIds: EntryId[]): Promise<AxiosResponse<Rundown>> {\n return axios.delete(`${rundownPath}/${rundownId}/entries`, { data: { ids: entryIds } });\n}\n\n/**\n * HTTP request to delete all entries of a given rundown\n */\nexport async function requestDeleteAll(rundownId: string): Promise<AxiosResponse<Rundown>> {\n return axios.delete(`${rundownPath}/${rundownId}/all`);\n}\n\n// #endregion operations on rundown entries =======================\n","import {\n isOntimeEvent,\n isOntimeGroup,\n isPlayableEvent,\n MaybeString,\n OntimeDelay,\n OntimeEntry,\n OntimeEvent,\n OntimeMilestone,\n PlayableEvent,\n Rundown,\n} from 'ontime-types';\nimport { checkIsNextDay, isNewLatest } from 'ontime-utils';\n\nexport type RundownMetadata = {\n previousEvent: PlayableEvent | null; // The playableEvent from the previous iteration, used by indicators\n latestEvent: PlayableEvent | null; // The playableEvent most forwards in time processed so far\n previousEntryId: MaybeString; // previous entry is used to infer position in the rundown for new events\n thisId: MaybeString;\n eventIndex: number;\n isPast: boolean;\n isNextDay: boolean;\n totalGap: number;\n isLinkedToLoaded: boolean; // check if the event can link all the way back to the currently playing event\n isLoaded: boolean;\n groupId: MaybeString;\n groupColour: string | undefined;\n groupEntries: number | undefined;\n isFirstAfterGroup: boolean;\n};\n\nexport type ExtendedEntry<T extends OntimeEntry = OntimeEntry> = T & RundownMetadata;\n\nexport const lastMetadataKey = 'LAST';\n\nexport type RundownMetadataObject = Record<string, Readonly<RundownMetadata>>;\n\n/**\n * Generates a Rundown Metadata object from a rundown\n */\nexport function getRundownMetadata(\n data: Pick<Rundown, 'entries' | 'flatOrder'>,\n selectedEventId: MaybeString,\n): RundownMetadataObject {\n const { metadata, process } = initRundownMetadata(selectedEventId);\n // keep a single reference to the metadata which we override for every entry\n let lastSnapshot = metadata;\n const rundownMetadata: RundownMetadataObject = {};\n\n for (const id of data.flatOrder) {\n const entry = data.entries[id];\n lastSnapshot = process(entry);\n rundownMetadata[id] = lastSnapshot;\n }\n\n // ensure some blank data even for empty rundowns\n rundownMetadata[lastMetadataKey] = lastSnapshot;\n\n return rundownMetadata;\n}\n\nexport function getFlatRundownMetadata(\n data: Pick<Rundown, 'entries' | 'flatOrder'>,\n selectedEventId: MaybeString,\n): ExtendedEntry[] {\n const { process } = initRundownMetadata(selectedEventId);\n const flatRundown: ExtendedEntry[] = [];\n\n for (const id of data.flatOrder) {\n const entry = data.entries[id];\n const extendedEntry = { ...entry, ...process(entry) };\n flatRundown.push(extendedEntry);\n }\n\n return flatRundown;\n}\n\n/**\n * Creates a process function which aggregates the rundown metadata and event metadata\n */\nexport function initRundownMetadata(selectedEventId: MaybeString) {\n let rundownMeta: RundownMetadata = {\n previousEvent: null,\n latestEvent: null,\n previousEntryId: null,\n thisId: null,\n eventIndex: 0,\n isPast: Boolean(selectedEventId), // all events before the current selected are in the past\n isNextDay: false,\n totalGap: 0,\n isLinkedToLoaded: false,\n isLoaded: false,\n groupId: null,\n groupColour: undefined,\n groupEntries: undefined,\n isFirstAfterGroup: false,\n };\n\n function process(entry: OntimeEntry): Readonly<RundownMetadata> {\n const processedRundownMetadata = processEntry(rundownMeta, selectedEventId, entry);\n rundownMeta = processedRundownMetadata;\n return rundownMeta;\n }\n\n return { metadata: rundownMeta, process };\n}\n\n/**\n * Receives a rundown entry and processes its place in the rundown\n */\nfunction processEntry(\n rundownMetadata: RundownMetadata,\n selectedEventId: MaybeString,\n entry: Readonly<OntimeEntry>,\n): Readonly<RundownMetadata> {\n const processedData = { ...rundownMetadata };\n // initialise data to be overridden below\n processedData.isNextDay = false;\n processedData.isLoaded = false;\n\n processedData.previousEntryId = processedData.thisId; // thisId comes from the previous iteration\n processedData.thisId = entry.id; // we reassign thisId\n processedData.previousEvent = processedData.latestEvent;\n\n if (entry.id === selectedEventId) {\n processedData.isLoaded = true;\n processedData.isPast = false;\n processedData.isLinkedToLoaded = true;\n }\n\n if (isOntimeGroup(entry)) {\n processedData.groupId = entry.id;\n processedData.groupColour = entry.colour;\n processedData.groupEntries = entry.entries.length;\n } else {\n // for delays and groups, we insert the group metadata\n if ((entry as OntimeEvent | OntimeDelay | OntimeMilestone).parent !== processedData.groupId) {\n // if the parent is not the current group, we need to update the groupId\n processedData.groupId = (entry as OntimeEvent | OntimeDelay | OntimeMilestone).parent;\n processedData.groupEntries = undefined;\n if ((entry as OntimeEvent | OntimeDelay | OntimeMilestone).parent === null) {\n // if the entry has no parent, it cannot have a group colour\n processedData.groupColour = undefined;\n }\n }\n\n if (isOntimeEvent(entry)) {\n // event indexes are 1 based in UI\n processedData.eventIndex += 1;\n processedData.isFirstAfterGroup = Boolean(processedData.previousEvent?.parent) && entry.parent === null;\n\n if (isPlayableEvent(entry)) {\n processedData.isNextDay = checkIsNextDay(entry, processedData.previousEvent);\n processedData.totalGap += entry.gap;\n\n if (!processedData.isPast && !processedData.isLoaded) {\n /**\n * isLinkToLoaded is a chain value that we maintain until we\n * a) find an unlinked event\n * b) find a countToEnd event\n */\n processedData.isLinkedToLoaded =\n entry.linkStart && !processedData.previousEvent?.countToEnd && processedData.isLinkedToLoaded;\n }\n\n if (isNewLatest(entry, processedData.latestEvent)) {\n // this event is the forward most event in rundown, for next iteration\n processedData.latestEvent = entry;\n }\n }\n }\n }\n\n return processedData;\n}\n","import { useEffect, useMemo, useRef, useState } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { EntryId, OntimeEntry, Rundown } from 'ontime-types';\n\nimport { queryRefetchIntervalSlow } from '../../ontimeConfig';\nimport { RUNDOWN } from '../api/constants';\nimport { fetchCurrentRundown } from '../api/rundown';\nimport { useSelectedEventId } from '../hooks/useSocket';\nimport { ExtendedEntry, getFlatRundownMetadata, getRundownMetadata } from '../utils/rundownMetadata';\n\nimport useProjectData from './useProjectData';\n\n// revision is -1 so that the remote revision is higher\nconst cachedRundownPlaceholder: Rundown = {\n id: 'default',\n title: '',\n order: [],\n flatOrder: [],\n entries: {},\n revision: -1,\n};\n\n/**\n * Normalised rundown data\n */\nexport default function useRundown() {\n const { data, status, isError, refetch, isFetching } = useQuery<Rundown>({\n queryKey: RUNDOWN,\n queryFn: fetchCurrentRundown,\n placeholderData: (previousData, _previousQuery) => previousData,\n refetchInterval: queryRefetchIntervalSlow,\n });\n return { data: data ?? cachedRundownPlaceholder, status, isError, refetch, isFetching };\n}\n\nexport function useRundownWithMetadata() {\n const { data, status } = useRundown();\n const { selectedEventId } = useSelectedEventId();\n const rundownMetadata = useMemo(() => getRundownMetadata(data, selectedEventId), [data, selectedEventId]);\n return { data, status, rundownMetadata };\n}\n\n/**\n * Provides access to a flat rundown\n * built from the order and rundown fields\n */\nexport function useFlatRundown() {\n const { data, status } = useRundown();\n const { data: projectData } = useProjectData();\n\n const loadedProject = useRef<string>('');\n const [prevRevision, setPrevRevision] = useState<number>(-1);\n const [flatRundown, setFlatRundown] = useState<OntimeEntry[]>([]);\n\n // update data whenever the revision changes\n useEffect(() => {\n if (data.revision !== -1 || data.revision !== prevRevision) {\n const flatRundown = data.order.map((id) => data.entries[id]);\n setFlatRundown(flatRundown);\n setPrevRevision(data.revision);\n }\n }, [data.entries, data.flatOrder, data.revision, prevRevision]);\n\n // TODO: should we have a project id field?\n // TODO(v4): cleanup as part of load multiple rundowns\n // invalidate current version if project changes\n useEffect(() => {\n if (projectData?.title !== loadedProject.current) {\n setPrevRevision(-1);\n loadedProject.current = projectData?.title ?? '';\n }\n }, [projectData]);\n\n return { data: flatRundown, rundownId: data.id, status };\n}\n\nexport function useFlatRundownWithMetadata() {\n const { data, status } = useRundown();\n const { selectedEventId } = useSelectedEventId();\n\n const rundownWithMetadata = useMemo(() => getFlatRundownMetadata(data, selectedEventId), [data, selectedEventId]);\n return { data: rundownWithMetadata, status };\n}\n\n/**\n * Provides access to a partial rundown based on a filter callback\n */\nexport function usePartialRundown(cb: (event: ExtendedEntry<OntimeEntry>) => boolean) {\n const { data, status } = useFlatRundownWithMetadata();\n const filteredData = useMemo(() => {\n return data.filter(cb);\n }, [data, cb]);\n\n return { data: filteredData, status };\n}\n\n/**\n * Hook to get a specific entry by ID from the rundown\n */\nexport function useEntry(entryId: EntryId | null): OntimeEntry | null {\n const { data: rundown } = useRundown();\n\n // track the specific entry we care about\n const entry = useMemo(() => {\n if (entryId === null) return null;\n return rundown.entries[entryId];\n }, [entryId, rundown.entries]);\n\n return entry;\n}\n"],"names":["SupportedEntry","isOntimeEvent","event","isPlayableEvent","isOntimeDelay","isOntimeGroup","isOntimeMilestone","isKeyOfType","key","obj","isOSCOutput","output","isHTTPOutput","isOntimeAction","checkIsNextDay","current","previous","dayInMs","isNewLatest","currentEvent","previousEvent","normalisedCurrentEnd","normalisedPreviousEnd","rundownPath","apiEntryUrl","fetchProjectRundownList","axios","fetchCurrentRundown","loadRundown","id","createRundown","title","deleteRundown","postAddEntry","rundownId","data","putEditEntry","putBatchEditEvents","patchReorderEntry","requestEventSwap","from","to","requestApplyDelay","delayId","postCloneEntry","entryId","requestGroupEntries","entryIds","requestUngroup","groupId","deleteEntries","requestDeleteAll","lastMetadataKey","getRundownMetadata","selectedEventId","metadata","process","initRundownMetadata","lastSnapshot","rundownMetadata","entry","getFlatRundownMetadata","flatRundown","extendedEntry","rundownMeta","processEntry","processedData","_a","_b","cachedRundownPlaceholder","useRundown","status","isError","refetch","isFetching","useQuery","RUNDOWN","previousData","_previousQuery","queryRefetchIntervalSlow","useRundownWithMetadata","useSelectedEventId","useMemo","useFlatRundown","projectData","useProjectData","loadedProject","useRef","prevRevision","setPrevRevision","useState","setFlatRundown","useEffect","useFlatRundownWithMetadata","usePartialRundown","cb","useEntry","rundown"],"mappings":"ygBASY,IAAAA,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QACRA,EAAA,UAAY,YAJFA,IAAAA,GAAA,CAAA,CAAA,ECKL,SAASC,EAAcC,EAAyC,CAC9D,OAAAA,GAAA,YAAAA,EAAO,QAASF,EAAe,KACxC,CAEO,SAASG,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