@camstack/addon-admin-ui 1.2.299 → 1.2.300

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.
Files changed (89) hide show
  1. package/dist/assets/{AddonCollectionPage-Bgk5av4b.js → AddonCollectionPage-Cr-KfwvP.js} +1 -1
  2. package/dist/assets/{Addons-BiAma6AN.js → Addons-DoAs_KfP.js} +1 -1
  3. package/dist/assets/{AdminTabs-C7QmfUqk.js → AdminTabs-nO86C-du.js} +1 -1
  4. package/dist/assets/{AiProfiles-B4z9wywC.js → AiProfiles-DZuK8h7D.js} +1 -1
  5. package/dist/assets/{BrokerForm-lP42jKPi.js → BrokerForm-MOPaJ62m.js} +1 -1
  6. package/dist/assets/{Build-6D08C629.js → Build-fVZjJtBq.js} +3 -3
  7. package/dist/assets/{Capabilities-BSbtmFZi.js → Capabilities-5vhoPQFd.js} +1 -1
  8. package/dist/assets/{CapabilityBadges-Ck0Zi6v3.js → CapabilityBadges-CJnsp_LH.js} +1 -1
  9. package/dist/assets/{Cluster-D8yFB0Np.js → Cluster-BsbJ3J5p.js} +1 -1
  10. package/dist/assets/CompositionEditor-DbDCjW1s.js +1 -0
  11. package/dist/assets/{CompositionEditorPage-CPRkhwhE.js → CompositionEditorPage-BfvnF5_n.js} +1 -1
  12. package/dist/assets/{Data-CPY-GSWR.js → Data-DqV6ClEA.js} +1 -1
  13. package/dist/assets/{DetectionIntelligence-Bfo6e0Fm.js → DetectionIntelligence-XPzIfD-8.js} +1 -1
  14. package/dist/assets/{DeviceAggregateSection-XoINX6MC.js → DeviceAggregateSection-CG9OIoVb.js} +1 -1
  15. package/dist/assets/{DeviceDetail-BkOvR0zE.js → DeviceDetail-BfbO3V0b.js} +2 -2
  16. package/dist/assets/{Devices-CBo87XTe.js → Devices-Dq_iXMXN.js} +1 -1
  17. package/dist/assets/{EmbedPlayerPage-nlk8WGop.js → EmbedPlayerPage-CY5PDgte.js} +1 -1
  18. package/dist/assets/{Events-BTw7o3c3.js → Events-BeWVGaev.js} +1 -1
  19. package/dist/assets/{FormBuilder-DCWIHY3A.js → FormBuilder-B8jus43Y.js} +1 -1
  20. package/dist/assets/{Identity-Z0uQisms.js → Identity-DaJyz-ig.js} +1 -1
  21. package/dist/assets/{IntegrationDetail-CxpJItTw.js → IntegrationDetail-mee6rfl4.js} +1 -1
  22. package/dist/assets/{Integrations-CvQ2Qsiu.js → Integrations-DTrUecHI.js} +1 -1
  23. package/dist/assets/Integrations-e_CGcE53.js +1 -0
  24. package/dist/assets/{Locations-D-vr4FmX.js → Locations-naeoUiMl.js} +1 -1
  25. package/dist/assets/{Logs-MUeTxUBL.js → Logs-DHvS0ZG4.js} +1 -1
  26. package/dist/assets/{ModelLicenses-D4ZI-ieb.js → ModelLicenses-CHF6ETO5.js} +1 -1
  27. package/dist/assets/{MotionZonesSettings-eZjxA7t2.js → MotionZonesSettings-DveHRZ1M.js} +1 -1
  28. package/dist/assets/{MyAccess-BLNO_4Vb.js → MyAccess-ZmbQ_xfb.js} +1 -1
  29. package/dist/assets/{Network-V-sOJFE3.js → Network-C4frL_HE.js} +1 -1
  30. package/dist/assets/{NodeAddonsSettingsPanel-DeYrqSPH.js → NodeAddonsSettingsPanel-11F3P0IK.js} +1 -1
  31. package/dist/assets/{NodeInferenceDevices-BAdCG-8q.js → NodeInferenceDevices-B7lbdDTW.js} +1 -1
  32. package/dist/assets/Notifications-DRLYWjDS.js +1 -0
  33. package/dist/assets/{Pipeline-Dv9QxF4V.js → Pipeline-qSnWQmZ4.js} +1 -1
  34. package/dist/assets/{Plates-BxIKSjrx.js → Plates-B0u-1Qcz.js} +1 -1
  35. package/dist/assets/{PrivacyMaskSettings-1wQ0sX0H.js → PrivacyMaskSettings-CWYULq-y.js} +1 -1
  36. package/dist/assets/{ProviderIcon-BbMyhwcl.js → ProviderIcon-DAp_lMDw.js} +1 -1
  37. package/dist/assets/{Recordings-C7qug-1m.js → Recordings-fNBcOSUc.js} +1 -1
  38. package/dist/assets/{ScanNetworkModal-DK_tyixc.js → ScanNetworkModal-xnOiLGgg.js} +1 -1
  39. package/dist/assets/{SceneMonitorEditor-Ds9agOvV.js → SceneMonitorEditor-gDpt6iKo.js} +1 -1
  40. package/dist/assets/{Scenes-Raq-0hCd.js → Scenes-DDAmEqU9.js} +1 -1
  41. package/dist/assets/{Settings-Ddx30tFk.js → Settings-Dv_5fVj2.js} +1 -1
  42. package/dist/assets/{Showroom-B8b26pPh.js → Showroom-B7D-nKLt.js} +1 -1
  43. package/dist/assets/{StorageLocationsPanel-DfOP9cjP.js → StorageLocationsPanel-BZ5j8c1h.js} +1 -1
  44. package/dist/assets/{Terminal-BQlJcagf.js → Terminal-DR0RmRD6.js} +1 -1
  45. package/dist/assets/{Viewer-Dugm0Lyh.js → Viewer-Cg7A1w4F.js} +1 -1
  46. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BGlzIG7f.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-TK7cnRbq.js} +1 -1
  47. package/dist/assets/{archive-M1NkdyX1.js → archive-CCEAH2-E.js} +1 -1
  48. package/dist/assets/{authed-media-BbclCn8D.js → authed-media-ClZ80rNx.js} +1 -1
  49. package/dist/assets/{boxes-3RvvFSDa.js → boxes-BdtZgTjz.js} +1 -1
  50. package/dist/assets/circle-slash-CgvI8iSv.js +1 -0
  51. package/dist/assets/{debounced-invalidate-Dg1eT_Y-.js → debounced-invalidate-C2eb-Tqo.js} +1 -1
  52. package/dist/assets/{device-integration-icon-CteXz-vc.js → device-integration-icon-Ck2Y2lL5.js} +1 -1
  53. package/dist/assets/{device-picker-model-B29vbIKa.js → device-picker-model-qVKFWw6-.js} +1 -1
  54. package/dist/assets/dist-BXj5mC45.js +349 -0
  55. package/dist/assets/{dist--LXFk-rO.js → dist-Cjkv3uUk.js} +1 -1
  56. package/dist/assets/{face-bbox-D0yJXCw6.js → face-bbox-Co5b1ky_.js} +1 -1
  57. package/dist/assets/{hard-drive-download-DWkfRg_9.js → hard-drive-download-ep0y7LyP.js} +1 -1
  58. package/dist/assets/{hostInit-1ItCQHp9.js → hostInit-BoAo3PhF.js} +1 -1
  59. package/dist/assets/{index-BZ3TdH1g.js → index-C_wdx2NZ.js} +3 -3
  60. package/dist/assets/{layers-DkNaQ1QP.js → layers-BU-FWaJU.js} +1 -1
  61. package/dist/assets/{location-owned-usage-BQ0INIT2.js → location-owned-usage-C3ej6Pj6.js} +1 -1
  62. package/dist/assets/{mf-entry-bootstrap-0-e02cda07.js → mf-entry-bootstrap-0-50975fe6.js} +2 -2
  63. package/dist/assets/{player-overlays-B_uiidR6.js → player-overlays-CjhGPGRH.js} +1 -1
  64. package/dist/assets/remoteEntry-C2_I-Of1.js +1 -0
  65. package/dist/assets/{send-B_CQqzXx.js → send-CEk5WYNt.js} +1 -1
  66. package/dist/assets/{settings-2-BYvhRrnI.js → settings-2-MB6Thalh.js} +1 -1
  67. package/dist/assets/{square-check-big-DvgdtLa5.js → square-check-big-ZL-AwzeA.js} +1 -1
  68. package/dist/assets/src-BiDz1hgC.js +67 -0
  69. package/dist/assets/src-bXB9J58r.js +349 -0
  70. package/dist/assets/{use-scenes-feed-C3EryavW.js → use-scenes-feed-CwP86V7k.js} +1 -1
  71. package/dist/assets/{use-stationary-objects-BM21l4YT.js → use-stationary-objects-eBMDdhXW.js} +1 -1
  72. package/dist/assets/{useDevice-DPvLTx63.js → useDevice-CGj-WKTC.js} +1 -1
  73. package/dist/assets/useEventInvalidation-BaNmc7Ke.js +1 -0
  74. package/dist/assets/{useNodeUrlSelection-DPB3ldG4.js → useNodeUrlSelection-DMCMMjaf.js} +1 -1
  75. package/dist/assets/user-round-CqtnExEW.js +1 -0
  76. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-Bu6krwIe.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-Dt6rtuC7.js} +2 -2
  77. package/dist/index.html +5 -5
  78. package/dist/server/addon.js +83 -14
  79. package/package.json +1 -1
  80. package/dist/assets/CompositionEditor-KckU34Rc.js +0 -1
  81. package/dist/assets/Integrations-CWQ4Bmhh.js +0 -1
  82. package/dist/assets/Notifications-CVMvqEcL.js +0 -1
  83. package/dist/assets/circle-slash-CSI0dVHX.js +0 -1
  84. package/dist/assets/dist-B8s4O5ek.js +0 -349
  85. package/dist/assets/remoteEntry-CqjS7D1o.js +0 -1
  86. package/dist/assets/src-B3pgYpGR.js +0 -67
  87. package/dist/assets/src-BH2M3zRW.js +0 -349
  88. package/dist/assets/useEventInvalidation-B0D6f62J.js +0 -1
  89. package/dist/assets/user-round-BijBSyFY.js +0 -1
@@ -0,0 +1 @@
1
+ import{yt as e}from"./player-overlays-CjhGPGRH.js";var t=e(`circle-slash`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`9`,x2:`15`,y1:`15`,y2:`9`,key:`1dfufj`}]]);export{t};
@@ -1 +1 @@
1
- import{K as e,Q as t,S as n,W as r,q as i,x as a,z as o}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{_t as s,gt as c,vt as l}from"./player-overlays-B_uiidR6.js";import{Bu as u,Vu as d}from"./src-B3pgYpGR.js";t();var f={fromMs:null,toMs:null},p=36e5,m=24*p;function h(e,t){switch(e){case`24h`:return{fromMs:t-m,toMs:null};case`7d`:return{fromMs:t-7*m,toMs:null};case`30d`:return{fromMs:t-30*m,toMs:null};case`all`:return f}}function g(e){return e.fromMs!==null||e.toMs!==null}function _(e,t){return g(t)?e.filter(e=>!(t.fromMs!==null&&e.timestamp<t.fromMs||t.toMs!==null&&e.timestamp>t.toMs)):[...e]}function v(e,t){return t.size===0?[...e]:e.filter(e=>t.has(e.deviceId))}function y(e){let t=new Set,n=[];for(let r of e)t.has(r.deviceId)||(t.add(r.deviceId),n.push(r.deviceId));return n}function b(e){if(!e)return null;let t=Date.parse(`${e}T00:00:00`);return Number.isNaN(t)?null:t}function x(e){if(!e)return null;let t=Date.parse(`${e}T23:59:59.999`);return Number.isNaN(t)?null:t}function S(e,t){if(!Number.isFinite(e)||e<=0)return`—`;let n=t-e;return n<6e4?`just now`:n<p?`${String(Math.floor(n/6e4))}m ago`:n<m?`${String(Math.floor(n/p))}h ago`:n<7*m?`${String(Math.floor(n/m))}d ago`:new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function C(e){return!Number.isFinite(e)||e<=0?`—`:new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function w(e){return!Number.isFinite(e)||e<=0?`—`:new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function T(e,t,n){let[a,s]=i(1);o(()=>{s(1)},[n]);let c=e.length,l=Math.max(1,Math.ceil(c/t)),u=Math.min(a,l);return o(()=>{u!==a&&s(u)},[u,a]),{page:u,setPage:s,pageItems:r(()=>{let n=(u-1)*t;return e.slice(n,n+t)},[e,u,t]),totalPages:l,totalItems:c,pageSize:t}}var E=2;function D(e,t){if(t<=1)return[{kind:`page`,n:1}];if(t<=7){let e=[];for(let n=1;n<=t;n++)e.push({kind:`page`,n});return e}let n=[],r=Math.max(2,e-E),i=Math.min(t-1,e+E);n.push({kind:`page`,n:1}),r>2&&n.push({kind:`ellipsis`,side:`left`});for(let e=r;e<=i;e++)n.push({kind:`page`,n:e});return i<t-1&&n.push({kind:`ellipsis`,side:`right`}),n.push({kind:`page`,n:t}),n}function O({currentPage:e,totalItems:t,pageSize:r,onPageChange:i,itemNoun:o=`items`}){if(t<=r)return null;let s=Math.ceil(t/r),l=(e-1)*r+1,d=Math.min(e*r,t),f=D(e,s),p=`inline-flex h-7 min-w-7 items-center justify-center rounded-md px-2 text-[11px] transition-colors disabled:opacity-40`;return n(`div`,{className:`flex items-center justify-between gap-4 flex-wrap pt-2 text-[11px] text-foreground-subtle`,children:[n(`span`,{children:[`Showing `,l,`–`,d,` of `,t,` `,o]}),n(`div`,{className:`flex items-center gap-1`,children:[a(`button`,{type:`button`,className:`${p} hover:bg-surface-hover`,onClick:()=>i(e-1),disabled:e<=1,"aria-label":`Previous page`,children:a(u,{className:`h-3.5 w-3.5`})}),f.map(t=>t.kind===`ellipsis`?a(`span`,{className:`px-1 opacity-60`,children:`…`},`ellipsis-${t.side}`):a(`button`,{type:`button`,className:`${p} ${t.n===e?`bg-primary/12 text-primary font-medium`:`hover:bg-surface-hover hover:text-foreground`}`,onClick:()=>i(t.n),"aria-current":t.n===e?`page`:void 0,children:t.n},t.n)),a(`button`,{type:`button`,className:`${p} hover:bg-surface-hover`,onClick:()=>i(e+1),disabled:e>=s,"aria-label":`Next page`,children:a(c,{className:`h-3.5 w-3.5`})})]})]})}t();function k({cameras:t,selected:r,onChange:c}){let[u,f]=i(!1),p=e(null);o(()=>{if(!u)return;function e(e){p.current&&e.target instanceof Node&&!p.current.contains(e.target)&&f(!1)}function t(e){e.key===`Escape`&&f(!1)}return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[u]);function m(e){let t=new Set(r);t.has(e)?t.delete(e):t.add(e),c(t)}let h=r.size,g=h===0?`All cameras`:h===1?t.find(e=>r.has(e.id))?.name??`1 camera`:`${String(h)} cameras`;return n(`div`,{ref:p,className:`relative`,children:[n(`button`,{type:`button`,onClick:()=>f(e=>!e),disabled:t.length===0,className:`flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs transition-colors disabled:opacity-40 ${h>0?`border-primary/40 bg-primary/8 text-primary`:`border-border text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:[a(l,{className:`h-3.5 w-3.5`}),a(`span`,{className:`max-w-[10rem] truncate`,children:g}),a(s,{className:`h-3 w-3 opacity-70`})]}),u&&n(`div`,{className:`absolute left-0 z-30 mt-1 max-h-64 w-[min(15rem,calc(100vw-1.5rem))] overflow-y-auto rounded-md border border-border bg-surface p-1 shadow-lg shadow-black/30`,children:[h>0&&a(`button`,{type:`button`,onClick:()=>c(new Set),className:`mb-1 w-full rounded px-2 py-1 text-left text-[11px] text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,children:`Clear selection`}),t.map(e=>{let t=r.has(e.id);return n(`button`,{type:`button`,onClick:()=>m(e.id),className:`flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs transition-colors ${t?`bg-primary/10 text-primary`:`text-foreground hover:bg-surface-hover`}`,children:[a(`span`,{className:`flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border ${t?`border-primary bg-primary text-white`:`border-border`}`,children:t&&a(d,{className:`h-2.5 w-2.5`})}),a(`span`,{className:`truncate`,children:e.name})]},e.id)})]})]})}t();var A=[{label:`24h`,value:`24h`},{label:`7d`,value:`7d`},{label:`30d`,value:`30d`},{label:`All`,value:`all`}];function j({onChange:e}){let[t,r]=i(`all`),[o,s]=i(``),[c,l]=i(``);function u(t){r(t),s(``),l(``),e(h(t,Date.now()))}function d(t,n){r(`custom`),s(t),l(n),e({fromMs:b(t),toMs:x(n)})}let f=`rounded-md border border-border bg-surface px-2 py-1.5 text-[11px] text-foreground outline-none focus:border-primary [color-scheme:light] dark:[color-scheme:dark]`;return n(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[a(`div`,{className:`flex items-center gap-1 rounded-md border border-border p-0.5`,children:A.map(e=>a(`button`,{type:`button`,onClick:()=>u(e.value),className:`rounded px-2.5 py-1 text-[11px] transition-colors ${t===e.value?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:e.label},e.value))}),n(`div`,{className:`flex items-center gap-1`,children:[a(`input`,{type:`date`,"aria-label":`From date`,value:o,max:c||void 0,onChange:e=>d(e.target.value,c),className:`${f} ${t===`custom`&&o?`border-primary/50`:``}`}),a(`span`,{className:`text-[11px] text-foreground-subtle`,children:`→`}),a(`input`,{type:`date`,"aria-label":`To date`,value:c,min:o||void 0,onChange:e=>d(o,e.target.value),className:`${f} ${t===`custom`&&c?`border-primary/50`:``}`})]})]})}t();var M=2.6;function N({src:e,alt:t,className:r,overlay:s,fit:c=`contain`}){let[l,u]=i(!1),[d,f]=i(`50% 50%`);o(()=>{u(!1),f(`50% 50%`)},[e]);function p(e){if(!l){let t=e.currentTarget.getBoundingClientRect(),n=(e.clientX-t.left)/t.width*100,r=(e.clientY-t.top)/t.height*100;f(`${String(n)}% ${String(r)}%`)}u(e=>!e)}let m=c===`natural`;return a(`div`,{className:`relative overflow-hidden bg-background ${r??``}`,onClick:p,children:n(`div`,{className:`relative select-none transition-transform duration-200 ease-out ${m?`w-full`:`h-full w-full`} ${l?`cursor-zoom-out`:`cursor-zoom-in`}`,style:{transformOrigin:d,transform:l?`scale(${String(M)})`:`scale(1)`},children:[a(`img`,{src:e,alt:t,draggable:!1,className:m?`block h-auto w-full object-contain`:`h-full w-full object-contain`}),s]})})}function P(e){let{delayMs:t,invalidate:n,setTimeoutFn:r=setTimeout,clearTimeoutFn:i=clearTimeout}=e,a;function o(){a===void 0&&(a=r(()=>{a=void 0,n()},t))}function s(){a!==void 0&&(i(a),a=void 0)}return{trigger:o,cancel:s}}export{O as a,y as c,C as d,S as f,k as i,v as l,N as n,T as o,w as p,j as r,f as s,P as t,_ as u};
1
+ import{K as e,Q as t,S as n,W as r,q as i,x as a,z as o}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{_t as s,gt as c,vt as l}from"./player-overlays-CjhGPGRH.js";import{Bu as u,Vu as d}from"./src-BiDz1hgC.js";t();var f={fromMs:null,toMs:null},p=36e5,m=24*p;function h(e,t){switch(e){case`24h`:return{fromMs:t-m,toMs:null};case`7d`:return{fromMs:t-7*m,toMs:null};case`30d`:return{fromMs:t-30*m,toMs:null};case`all`:return f}}function g(e){return e.fromMs!==null||e.toMs!==null}function _(e,t){return g(t)?e.filter(e=>!(t.fromMs!==null&&e.timestamp<t.fromMs||t.toMs!==null&&e.timestamp>t.toMs)):[...e]}function v(e,t){return t.size===0?[...e]:e.filter(e=>t.has(e.deviceId))}function y(e){let t=new Set,n=[];for(let r of e)t.has(r.deviceId)||(t.add(r.deviceId),n.push(r.deviceId));return n}function b(e){if(!e)return null;let t=Date.parse(`${e}T00:00:00`);return Number.isNaN(t)?null:t}function x(e){if(!e)return null;let t=Date.parse(`${e}T23:59:59.999`);return Number.isNaN(t)?null:t}function S(e,t){if(!Number.isFinite(e)||e<=0)return`—`;let n=t-e;return n<6e4?`just now`:n<p?`${String(Math.floor(n/6e4))}m ago`:n<m?`${String(Math.floor(n/p))}h ago`:n<7*m?`${String(Math.floor(n/m))}d ago`:new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function C(e){return!Number.isFinite(e)||e<=0?`—`:new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function w(e){return!Number.isFinite(e)||e<=0?`—`:new Date(e).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function T(e,t,n){let[a,s]=i(1);o(()=>{s(1)},[n]);let c=e.length,l=Math.max(1,Math.ceil(c/t)),u=Math.min(a,l);return o(()=>{u!==a&&s(u)},[u,a]),{page:u,setPage:s,pageItems:r(()=>{let n=(u-1)*t;return e.slice(n,n+t)},[e,u,t]),totalPages:l,totalItems:c,pageSize:t}}var E=2;function D(e,t){if(t<=1)return[{kind:`page`,n:1}];if(t<=7){let e=[];for(let n=1;n<=t;n++)e.push({kind:`page`,n});return e}let n=[],r=Math.max(2,e-E),i=Math.min(t-1,e+E);n.push({kind:`page`,n:1}),r>2&&n.push({kind:`ellipsis`,side:`left`});for(let e=r;e<=i;e++)n.push({kind:`page`,n:e});return i<t-1&&n.push({kind:`ellipsis`,side:`right`}),n.push({kind:`page`,n:t}),n}function O({currentPage:e,totalItems:t,pageSize:r,onPageChange:i,itemNoun:o=`items`}){if(t<=r)return null;let s=Math.ceil(t/r),l=(e-1)*r+1,d=Math.min(e*r,t),f=D(e,s),p=`inline-flex h-7 min-w-7 items-center justify-center rounded-md px-2 text-[11px] transition-colors disabled:opacity-40`;return n(`div`,{className:`flex items-center justify-between gap-4 flex-wrap pt-2 text-[11px] text-foreground-subtle`,children:[n(`span`,{children:[`Showing `,l,`–`,d,` of `,t,` `,o]}),n(`div`,{className:`flex items-center gap-1`,children:[a(`button`,{type:`button`,className:`${p} hover:bg-surface-hover`,onClick:()=>i(e-1),disabled:e<=1,"aria-label":`Previous page`,children:a(u,{className:`h-3.5 w-3.5`})}),f.map(t=>t.kind===`ellipsis`?a(`span`,{className:`px-1 opacity-60`,children:`…`},`ellipsis-${t.side}`):a(`button`,{type:`button`,className:`${p} ${t.n===e?`bg-primary/12 text-primary font-medium`:`hover:bg-surface-hover hover:text-foreground`}`,onClick:()=>i(t.n),"aria-current":t.n===e?`page`:void 0,children:t.n},t.n)),a(`button`,{type:`button`,className:`${p} hover:bg-surface-hover`,onClick:()=>i(e+1),disabled:e>=s,"aria-label":`Next page`,children:a(c,{className:`h-3.5 w-3.5`})})]})]})}t();function k({cameras:t,selected:r,onChange:c}){let[u,f]=i(!1),p=e(null);o(()=>{if(!u)return;function e(e){p.current&&e.target instanceof Node&&!p.current.contains(e.target)&&f(!1)}function t(e){e.key===`Escape`&&f(!1)}return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[u]);function m(e){let t=new Set(r);t.has(e)?t.delete(e):t.add(e),c(t)}let h=r.size,g=h===0?`All cameras`:h===1?t.find(e=>r.has(e.id))?.name??`1 camera`:`${String(h)} cameras`;return n(`div`,{ref:p,className:`relative`,children:[n(`button`,{type:`button`,onClick:()=>f(e=>!e),disabled:t.length===0,className:`flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs transition-colors disabled:opacity-40 ${h>0?`border-primary/40 bg-primary/8 text-primary`:`border-border text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:[a(l,{className:`h-3.5 w-3.5`}),a(`span`,{className:`max-w-[10rem] truncate`,children:g}),a(s,{className:`h-3 w-3 opacity-70`})]}),u&&n(`div`,{className:`absolute left-0 z-30 mt-1 max-h-64 w-[min(15rem,calc(100vw-1.5rem))] overflow-y-auto rounded-md border border-border bg-surface p-1 shadow-lg shadow-black/30`,children:[h>0&&a(`button`,{type:`button`,onClick:()=>c(new Set),className:`mb-1 w-full rounded px-2 py-1 text-left text-[11px] text-foreground-subtle hover:bg-surface-hover hover:text-foreground`,children:`Clear selection`}),t.map(e=>{let t=r.has(e.id);return n(`button`,{type:`button`,onClick:()=>m(e.id),className:`flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs transition-colors ${t?`bg-primary/10 text-primary`:`text-foreground hover:bg-surface-hover`}`,children:[a(`span`,{className:`flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-sm border ${t?`border-primary bg-primary text-white`:`border-border`}`,children:t&&a(d,{className:`h-2.5 w-2.5`})}),a(`span`,{className:`truncate`,children:e.name})]},e.id)})]})]})}t();var A=[{label:`24h`,value:`24h`},{label:`7d`,value:`7d`},{label:`30d`,value:`30d`},{label:`All`,value:`all`}];function j({onChange:e}){let[t,r]=i(`all`),[o,s]=i(``),[c,l]=i(``);function u(t){r(t),s(``),l(``),e(h(t,Date.now()))}function d(t,n){r(`custom`),s(t),l(n),e({fromMs:b(t),toMs:x(n)})}let f=`rounded-md border border-border bg-surface px-2 py-1.5 text-[11px] text-foreground outline-none focus:border-primary [color-scheme:light] dark:[color-scheme:dark]`;return n(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[a(`div`,{className:`flex items-center gap-1 rounded-md border border-border p-0.5`,children:A.map(e=>a(`button`,{type:`button`,onClick:()=>u(e.value),className:`rounded px-2.5 py-1 text-[11px] transition-colors ${t===e.value?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:e.label},e.value))}),n(`div`,{className:`flex items-center gap-1`,children:[a(`input`,{type:`date`,"aria-label":`From date`,value:o,max:c||void 0,onChange:e=>d(e.target.value,c),className:`${f} ${t===`custom`&&o?`border-primary/50`:``}`}),a(`span`,{className:`text-[11px] text-foreground-subtle`,children:`→`}),a(`input`,{type:`date`,"aria-label":`To date`,value:c,min:o||void 0,onChange:e=>d(o,e.target.value),className:`${f} ${t===`custom`&&c?`border-primary/50`:``}`})]})]})}t();var M=2.6;function N({src:e,alt:t,className:r,overlay:s,fit:c=`contain`}){let[l,u]=i(!1),[d,f]=i(`50% 50%`);o(()=>{u(!1),f(`50% 50%`)},[e]);function p(e){if(!l){let t=e.currentTarget.getBoundingClientRect(),n=(e.clientX-t.left)/t.width*100,r=(e.clientY-t.top)/t.height*100;f(`${String(n)}% ${String(r)}%`)}u(e=>!e)}let m=c===`natural`;return a(`div`,{className:`relative overflow-hidden bg-background ${r??``}`,onClick:p,children:n(`div`,{className:`relative select-none transition-transform duration-200 ease-out ${m?`w-full`:`h-full w-full`} ${l?`cursor-zoom-out`:`cursor-zoom-in`}`,style:{transformOrigin:d,transform:l?`scale(${String(M)})`:`scale(1)`},children:[a(`img`,{src:e,alt:t,draggable:!1,className:m?`block h-auto w-full object-contain`:`h-full w-full object-contain`}),s]})})}function P(e){let{delayMs:t,invalidate:n,setTimeoutFn:r=setTimeout,clearTimeoutFn:i=clearTimeout}=e,a;function o(){a===void 0&&(a=r(()=>{a=void 0,n()},t))}function s(){a!==void 0&&(i(a),a=void 0)}return{trigger:o,cancel:s}}export{O as a,y as c,C as d,S as f,k as i,v as l,N as n,T as o,w as p,j as r,f as s,P as t,_ as u};
@@ -1 +1 @@
1
- import{x as e}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{t}from"./ProviderIcon-BbMyhwcl.js";function n(n,r){switch(r.kind){case`resolved`:return e(t,{type:r.integration.addonId,size:`sm`});case`orphan`:return e(t,{type:n.addonId,size:`sm`});case`unknown`:case`unlinked`:return null}}export{n as t};
1
+ import{x as e}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{t}from"./ProviderIcon-DAp_lMDw.js";function n(n,r){switch(r.kind){case`resolved`:return e(t,{type:r.integration.addonId,size:`sm`});case`orphan`:return e(t,{type:n.addonId,size:`sm`});case`unknown`:case`unlinked`:return null}}export{n as t};
@@ -1 +1 @@
1
- function e(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function t(e){return`${[e.name,e.location??``,e.type??``,e.detail??``].join(` `)} ${String(e.id)}`.toLowerCase()}function n(e){return e.trim().toLowerCase().split(/\s+/).filter(e=>e.length>0)}function r(e,r){let i=n(r);return i.length===0?e:e.filter(e=>{let n=t(e);return i.every(e=>n.includes(e))})}function i(e,t){return e===t?0:e===null?1:t===null?-1:e.localeCompare(t)}function a(e){return e==null||e.trim()===``?null:e}function o(e,t){return`${e??``}|${t??``}`}function s(t,n){let r=new Set(n),s=new Map;for(let e of t){let t=a(e.type),n=a(e.location),r=o(t,n),i=s.get(r);i===void 0?s.set(r,{type:t,location:n,devices:[e]}):i.devices.push(e)}let c=[];for(let[t,n]of s){let i=[...n.devices].sort((t,n)=>t.name.localeCompare(n.name)||e(t.id,n.id));c.push({key:t,type:n.type,location:n.location,devices:i,selectedCount:i.filter(e=>r.has(e.id)).length})}return c.sort((e,t)=>i(e.type,t.type)||i(e.location,t.location))}function c(e,t,n){let r=t.get(e.key);return r===void 0?n||e.selectedCount>0?!0:e.devices.length<=8:r}function l(e,t,n,r){let i=new Set(t),a=[];for(let t of e){let e=c(t,n,r);if(a.push({kind:`header`,key:`h:${t.key}`,group:t,expanded:e}),e)for(let e of t.devices)a.push({kind:`device`,key:`d:${String(e.id)}`,device:e,groupKey:t.key,selected:i.has(e.id)})}return a}function u(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function d(e,t){let n=[...e],r=new Set(e);for(let e of t.devices)r.has(e.id)||n.push(e.id);return n}function f(e,t){let n=new Set(t.devices.map(e=>e.id));return e.filter(e=>!n.has(e))}function p(e,t){return t||e.length<=6?{shown:e,hidden:0}:{shown:e.slice(0,6),hidden:e.length-6}}function m(e,t){let n=Math.max(0,Math.min(e.length,t));return{rows:e.slice(0,n),remaining:e.length-n}}var h=[`zone`,`location`,`none`],g=`zone`;function _(e){return e===`zone`||e===`location`||e===`none`?e:g}function v(e){return e.trim().toLowerCase()}var y=1,b=2;function x(t,n){return t.name.localeCompare(n.name)||e(t.id,n.id)}function S(e){return e.kind===`zone`||e.kind===`location`?e.label:``}var C={key:`-location`,heading:{kind:`no-location`},rank:b},w={key:`-zone`,heading:{kind:`no-zone`},rank:y};function T(e){let t=new Map;for(let n of e)for(let e of n.locationKeys){let r=v(e);t.has(r)||t.set(r,n)}return t}function E(e){return e===null?C:{key:`l:${v(e)}`,heading:{kind:`location`,label:e.trim()},rank:0}}function D(e,t){if(e===null)return C;let n=t.get(v(e));return n===void 0?w:{key:`z:${n.zoneKey}`,heading:{kind:`zone`,label:n.label},rank:0}}function O(e,t,n,r){let i=new Set(t),o=[...e].sort(x),s=e=>e.filter(e=>i.has(e.id)).length;if(n===`none`)return{groupBy:n,fallback:null,flat:!0,groups:[{key:`all`,type:null,location:null,devices:o,selectedCount:s(o)}]};let c=n===`zone`&&r.state!==`answered`?r.state:null,l=c===null?n:`location`,u=r.state===`answered`?T(r.zones):new Map,d=new Map;for(let e of o){let t=a(e.location),n=l===`zone`?D(t,u):E(t),r=d.get(n.key);r===void 0?d.set(n.key,{heading:n.heading,rank:n.rank,devices:[e]}):r.devices.push(e)}return{groupBy:l,fallback:c,flat:!1,groups:[...d].sort(([,e],[,t])=>e.rank-t.rank||S(e.heading).localeCompare(S(t.heading))).map(([e,t])=>({key:e,type:null,location:t.heading.kind===`location`?t.heading.label:null,devices:t.devices,selectedCount:s(t.devices),heading:t.heading}))}}function k(e,t,n,r){if(!e.flat)return l(e.groups,t,n,r);let i=new Set(t),a=[];for(let t of e.groups)for(let e of t.devices)a.push({kind:`device`,key:`d:${String(e.id)}`,device:e,groupKey:t.key,selected:i.has(e.id)});return a}function A(e,t){return{location:t===`location`?null:a(e.location),type:a(e.type)}}export{r as a,s as c,_ as d,n as f,u as g,d as h,f as i,O as l,t as m,h as n,k as o,A as p,p as r,l as s,g as t,m as u};
1
+ function e(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function t(e){return`${[e.name,e.location??``,e.type??``,e.detail??``].join(` `)} ${String(e.id)}`.toLowerCase()}function n(e){return e.trim().toLowerCase().split(/\s+/).filter(e=>e.length>0)}function r(e,r){let i=n(r);return i.length===0?e:e.filter(e=>{let n=t(e);return i.every(e=>n.includes(e))})}function i(e,t){return e===t?0:e===null?1:t===null?-1:e.localeCompare(t)}function a(e){return e==null||e.trim()===``?null:e}function o(e,t){return`${e??``}|${t??``}`}function s(t,n){let r=new Set(n),s=new Map;for(let e of t){let t=a(e.type),n=a(e.location),r=o(t,n),i=s.get(r);i===void 0?s.set(r,{type:t,location:n,devices:[e]}):i.devices.push(e)}let c=[];for(let[t,n]of s){let i=[...n.devices].sort((t,n)=>t.name.localeCompare(n.name)||e(t.id,n.id));c.push({key:t,type:n.type,location:n.location,devices:i,selectedCount:i.filter(e=>r.has(e.id)).length})}return c.sort((e,t)=>i(e.type,t.type)||i(e.location,t.location))}function c(e,t,n){let r=t.get(e.key);return r===void 0?n||e.selectedCount>0?!0:e.devices.length<=8:r}function l(e,t,n,r){let i=new Set(t),a=[];for(let t of e){let e=c(t,n,r);if(a.push({kind:`header`,key:`h:${t.key}`,group:t,expanded:e}),e)for(let e of t.devices)a.push({kind:`device`,key:`d:${String(e.id)}`,device:e,groupKey:t.key,selected:i.has(e.id)})}return a}function u(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function d(e,t){let n=[...e],r=new Set(e);for(let e of t.devices)r.has(e.id)||n.push(e.id);return n}function f(e,t){let n=new Set(t.devices.map(e=>e.id));return e.filter(e=>!n.has(e))}function p(e,t){return t||e.length<=6?{shown:e,hidden:0}:{shown:e.slice(0,6),hidden:e.length-6}}function m(e,t){let n=Math.max(0,Math.min(e.length,t));return{rows:e.slice(0,n),remaining:e.length-n}}var h=[`zone`,`location`,`none`],g=`zone`;function _(e){return e===`zone`||e===`location`||e===`none`?e:g}function v(e){return e.trim().toLowerCase()}var y=1,b=2;function x(t,n){return t.name.localeCompare(n.name)||e(t.id,n.id)}function S(e){return e.kind===`zone`||e.kind===`location`?e.label:``}var C={key:`-location`,heading:{kind:`no-location`},rank:b},w={key:`-zone`,heading:{kind:`no-zone`},rank:y};function T(e){let t=new Map;for(let n of e)for(let e of n.locationKeys){let r=v(e);t.has(r)||t.set(r,n)}return t}function E(e){return e===null?C:{key:`l:${v(e)}`,heading:{kind:`location`,label:e.trim()},rank:0}}function D(e,t){if(e===null)return C;let n=t.get(v(e));return n===void 0?w:{key:`z:${n.zoneKey}`,heading:{kind:`zone`,label:n.label},rank:0}}function O(e,t,n,r){let i=new Set(t),o=[...e].sort(x),s=e=>e.filter(e=>i.has(e.id)).length;if(n===`none`)return{groupBy:n,fallback:null,flat:!0,groups:[{key:`all`,type:null,location:null,devices:o,selectedCount:s(o)}]};let c=n===`zone`&&r.state!==`answered`?r.state:null,l=c===null?n:`location`,u=r.state===`answered`?T(r.zones):new Map,d=new Map;for(let e of o){let t=a(e.location),n=l===`zone`?D(t,u):E(t),r=d.get(n.key);r===void 0?d.set(n.key,{heading:n.heading,rank:n.rank,devices:[e]}):r.devices.push(e)}return{groupBy:l,fallback:c,flat:!1,groups:[...d].sort(([,e],[,t])=>e.rank-t.rank||S(e.heading).localeCompare(S(t.heading))).map(([e,t])=>({key:e,type:null,location:t.heading.kind===`location`?t.heading.label:null,devices:t.devices,selectedCount:s(t.devices),heading:t.heading}))}}function k(e,t,n,r){if(!e.flat)return l(e.groups,t,n,r);let i=new Set(t),a=[];for(let t of e.groups)for(let e of t.devices)a.push({kind:`device`,key:`d:${String(e.id)}`,device:e,groupKey:t.key,selected:i.has(e.id)});return a}function A(e,t){return{location:t===`location`?null:a(e.location),type:a(e.type)}}var j=`(none)`,M={query:``,types:[],zones:[],locations:[]},N={key:j,label:null};function P(e,t,n){if(t===`type`){let t=a(e.type);return t===null?N:{key:t,label:t}}let r=a(e.location);if(r===null)return N;if(t===`location`)return{key:v(r),label:r.trim()};if(n.state!==`answered`)return N;let i=T(n.zones).get(v(r));return i===void 0?N:{key:i.zoneKey,label:i.label}}function F(e,t,n){return P(e,t,n).key}function I(e,t){return e.key===`(none)`||t.key===`(none)`?e.key===t.key?0:e.key===`(none)`?1:-1:(e.label??``).localeCompare(t.label??``)}function L(e,t,n,r){if(t===`zone`&&r.state!==`answered`)return[];let i=new Map;for(let n of e){let e=P(n,t,r),a=i.get(e.key);a===void 0?i.set(e.key,{label:e.label,count:1}):a.count++}for(let e of n)i.has(e)||i.set(e,{label:e===`(none)`?null:e,count:0});let a=[];for(let[e,t]of i)a.push({key:e,label:t.label,count:t.count});return a.sort(I)}function R(e,t){return e.zones.length>0&&t.state!==`answered`}function z(e,t,n,r){return n.length===0?e:e.filter(e=>n.includes(F(e,t,r)))}function B(e,t,n){let i=z(r(e,t.query),`type`,t.types,n);return z(n.state===`answered`?z(i,`zone`,t.zones,n):i,`location`,t.locations,n)}function V(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function H(e){return e.query.trim()!==``||e.types.length>0||e.zones.length>0||e.locations.length>0}function U(){return M}function W(e,t,n){let r=new Set(t.map(e=>e.id)),i=new Set(n.map(e=>e.id));return e.filter(e=>r.has(e)&&!i.has(e)).length}function G(e,t){return e.length>=2||t.length>0}export{U as C,V as E,R as S,u as T,W as _,B as a,A as b,k as c,O as d,m as f,H as g,L as h,M as i,l,G as m,h as n,p as o,_ as p,j as r,f as s,g as t,s as u,v,d as w,t as x,n as y};