@camstack/addon-post-analysis 1.2.320 → 1.2.322
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/dist/{clip-model-registry-C_aKxHpy.js → clip-model-registry-BFbP9U7z.js} +427 -0
- package/dist/{clip-model-registry-C-IEAIQQ.mjs → clip-model-registry-CwK2SLQD.mjs} +374 -1
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-D553qWb_.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Dmt5eh93.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-mzYK6V9S.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CuOcvcK7.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-ByDyL2zi.mjs → hostInit-DtKO_7UT.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +916 -50
- package/dist/pipeline-analytics/index.mjs +916 -50
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-7e_3hsiC.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C1V_UEyk.mjs +0 -26
|
@@ -21955,6 +21955,39 @@ var NcAlarmSettingsSchema = object({
|
|
|
21955
21955
|
modeDelays: NcAlarmModeDelaysListSchema.default([])
|
|
21956
21956
|
});
|
|
21957
21957
|
/**
|
|
21958
|
+
* One named alarm configuration profile — a full {@link NcAlarmSettings} blob
|
|
21959
|
+
* (memberships including secure-on-arm, delays, announce targets). The id is
|
|
21960
|
+
* assigned by the server; clients show the name.
|
|
21961
|
+
*/
|
|
21962
|
+
var NcAlarmProfileMetaSchema = object({
|
|
21963
|
+
id: string().min(1).max(64),
|
|
21964
|
+
name: string().min(1).max(64),
|
|
21965
|
+
/** The seeded Default profile — cannot be deleted. */
|
|
21966
|
+
isDefault: boolean()
|
|
21967
|
+
});
|
|
21968
|
+
/**
|
|
21969
|
+
* Profiles ride on {@link NcAlarmConfig}: one globally active profile, whose
|
|
21970
|
+
* settings are what arm decisions and `settings` already expose. Switching
|
|
21971
|
+
* active applies that profile's blob onto the panel.
|
|
21972
|
+
*/
|
|
21973
|
+
var NcAlarmProfilesViewSchema = object({
|
|
21974
|
+
activeId: string().min(1),
|
|
21975
|
+
items: array(NcAlarmProfileMetaSchema).min(1)
|
|
21976
|
+
});
|
|
21977
|
+
var NcAlarmCreateProfileInputSchema = object({
|
|
21978
|
+
name: string().min(1).max(64),
|
|
21979
|
+
/**
|
|
21980
|
+
* Omit / undefined → system defaults (empty memberships, stock delays).
|
|
21981
|
+
* Set → clone that profile's settings.
|
|
21982
|
+
*/
|
|
21983
|
+
cloneFromId: string().min(1).max(64).optional()
|
|
21984
|
+
});
|
|
21985
|
+
var NcAlarmRenameProfileInputSchema = object({
|
|
21986
|
+
id: string().min(1).max(64),
|
|
21987
|
+
name: string().min(1).max(64)
|
|
21988
|
+
});
|
|
21989
|
+
var NcAlarmProfileIdInputSchema = object({ id: string().min(1).max(64) });
|
|
21990
|
+
/**
|
|
21958
21991
|
* Every field optional — a tab edits one control at a time.
|
|
21959
21992
|
*
|
|
21960
21993
|
* List fields and `modeDelays` are re-declared WITHOUT their defaults:
|
|
@@ -22065,6 +22098,11 @@ var NcAlarmConfigSchema = object({
|
|
|
22065
22098
|
*/
|
|
22066
22099
|
deviceId: number().int().nullable(),
|
|
22067
22100
|
settings: NcAlarmSettingsSchema,
|
|
22101
|
+
/**
|
|
22102
|
+
* Named configuration profiles. Optional so an older hub answer still parses;
|
|
22103
|
+
* a client without this field shows no picker (single implicit Default).
|
|
22104
|
+
*/
|
|
22105
|
+
profiles: NcAlarmProfilesViewSchema.optional(),
|
|
22068
22106
|
coverage: array(NcAlarmModeCoverageSchema),
|
|
22069
22107
|
/**
|
|
22070
22108
|
* The panel as it is NOW — state, what each mode would find open, what is
|
|
@@ -22373,6 +22411,36 @@ var notificationRulesCapability = {
|
|
|
22373
22411
|
auth: "admin"
|
|
22374
22412
|
}),
|
|
22375
22413
|
/**
|
|
22414
|
+
* Create a named profile. Without `cloneFromId` the new profile starts at
|
|
22415
|
+
* system defaults (empty memberships); with it, a copy of that profile.
|
|
22416
|
+
* Does not activate — the operator switches explicitly.
|
|
22417
|
+
*/
|
|
22418
|
+
createAlarmProfile: method(NcAlarmCreateProfileInputSchema, NcAlarmConfigSchema, {
|
|
22419
|
+
kind: "mutation",
|
|
22420
|
+
auth: "admin"
|
|
22421
|
+
}),
|
|
22422
|
+
/** Rename a profile (Default included — only the name, never the id). */
|
|
22423
|
+
renameAlarmProfile: method(NcAlarmRenameProfileInputSchema, NcAlarmConfigSchema, {
|
|
22424
|
+
kind: "mutation",
|
|
22425
|
+
auth: "admin"
|
|
22426
|
+
}),
|
|
22427
|
+
/**
|
|
22428
|
+
* Delete a non-default profile. If it was active, Default becomes active
|
|
22429
|
+
* and its settings are applied for arm decisions.
|
|
22430
|
+
*/
|
|
22431
|
+
deleteAlarmProfile: method(NcAlarmProfileIdInputSchema, NcAlarmConfigSchema, {
|
|
22432
|
+
kind: "mutation",
|
|
22433
|
+
auth: "admin"
|
|
22434
|
+
}),
|
|
22435
|
+
/**
|
|
22436
|
+
* Make this profile active: its membership/delays blob is applied to the
|
|
22437
|
+
* panel so the next arm uses it.
|
|
22438
|
+
*/
|
|
22439
|
+
activateAlarmProfile: method(NcAlarmProfileIdInputSchema, NcAlarmConfigSchema, {
|
|
22440
|
+
kind: "mutation",
|
|
22441
|
+
auth: "admin"
|
|
22442
|
+
}),
|
|
22443
|
+
/**
|
|
22376
22444
|
* The CURRENT state of each asked device as the alarm reads it (D697) — open, closed,
|
|
22377
22445
|
* unknown (why) or not an opening, plus liveness. Classified by the same table the arm
|
|
22378
22446
|
* check uses (`alarm-openings.ts`), so the editor and the arm can never disagree. The
|
|
@@ -31536,6 +31604,65 @@ DeviceType.Button, method(object({ deviceId: number().int().nonnegative() }), _v
|
|
|
31536
31604
|
auth: "protected"
|
|
31537
31605
|
});
|
|
31538
31606
|
/**
|
|
31607
|
+
* `calendar-source` — collection cap exposing per-provider calendars and
|
|
31608
|
+
* their events. Every addon that contributes calendars (Home Assistant,
|
|
31609
|
+
* a future Google Calendar addon, …) registers a provider here. The hub
|
|
31610
|
+
* singleton `calendars` walks the collection and merges the answers.
|
|
31611
|
+
*
|
|
31612
|
+
* Mirrors `addon-pages-source`: the public listing is a different shape
|
|
31613
|
+
* (source-stamped ids) and lives on the aggregator.
|
|
31614
|
+
*/
|
|
31615
|
+
var CalendarSourceKindSchema = _enum(["ha", "addon"]);
|
|
31616
|
+
var CalendarInfoSchema = object({
|
|
31617
|
+
/** Provider-local id (e.g. HA `calendar.family`). The aggregator prefixes. */
|
|
31618
|
+
id: string().min(1),
|
|
31619
|
+
name: string().min(1),
|
|
31620
|
+
source: CalendarSourceKindSchema,
|
|
31621
|
+
enabled: boolean()
|
|
31622
|
+
});
|
|
31623
|
+
var CalendarEventSchema = object({
|
|
31624
|
+
id: string().min(1),
|
|
31625
|
+
calendarId: string().min(1),
|
|
31626
|
+
title: string(),
|
|
31627
|
+
startMs: number().int(),
|
|
31628
|
+
endMs: number().int(),
|
|
31629
|
+
allDay: boolean().optional(),
|
|
31630
|
+
description: string().optional(),
|
|
31631
|
+
location: string().optional()
|
|
31632
|
+
});
|
|
31633
|
+
var CalendarListEventsInputSchema = object({
|
|
31634
|
+
calendarIds: array(string().min(1)).max(64).optional(),
|
|
31635
|
+
startMs: number().int(),
|
|
31636
|
+
endMs: number().int()
|
|
31637
|
+
});
|
|
31638
|
+
method(_void(), array(CalendarInfoSchema).readonly(), { auth: "admin" }), method(CalendarListEventsInputSchema, array(CalendarEventSchema).readonly(), { auth: "admin" });
|
|
31639
|
+
/**
|
|
31640
|
+
* `calendars` — system-scoped singleton. Public surface admin-ui and the
|
|
31641
|
+
* notification-center calendar-events producer consume.
|
|
31642
|
+
*
|
|
31643
|
+
* Walks every `calendar-source` provider, stamps each calendar with a
|
|
31644
|
+
* cluster-stable id (`<sourceAddonId>:<localId>`) and the providing
|
|
31645
|
+
* addon's id, and fans `listEvents` out the same way. Home Assistant
|
|
31646
|
+
* import is a built-in refresh of the HA source rather than a second
|
|
31647
|
+
* registry — `importFromHomeAssistant` asks that source to re-discover.
|
|
31648
|
+
*/
|
|
31649
|
+
var CalendarEntrySchema = CalendarInfoSchema.extend({
|
|
31650
|
+
/** Cluster-stable id: `<providerAddonId>:<localId>`. */
|
|
31651
|
+
id: string().min(1),
|
|
31652
|
+
/** The addon that registered the calendar-source provider. */
|
|
31653
|
+
providerAddonId: string().min(1).optional()
|
|
31654
|
+
});
|
|
31655
|
+
var CalendarImportResultSchema = object({
|
|
31656
|
+
imported: number().int().nonnegative(),
|
|
31657
|
+
/** Absent when no HA calendar-source provider was reachable. */
|
|
31658
|
+
providerAddonId: string().min(1).optional(),
|
|
31659
|
+
error: string().optional()
|
|
31660
|
+
});
|
|
31661
|
+
method(_void(), array(CalendarEntrySchema).readonly(), { auth: "admin" }), method(CalendarListEventsInputSchema, array(CalendarEventSchema).readonly(), { auth: "admin" }), method(_void(), CalendarImportResultSchema, {
|
|
31662
|
+
auth: "admin",
|
|
31663
|
+
kind: "mutation"
|
|
31664
|
+
});
|
|
31665
|
+
/**
|
|
31539
31666
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
31540
31667
|
* + auth surface in a vendor-neutral shape.
|
|
31541
31668
|
*
|
|
@@ -44853,6 +44980,36 @@ Object.freeze({
|
|
|
44853
44980
|
addonId: null,
|
|
44854
44981
|
access: "create"
|
|
44855
44982
|
},
|
|
44983
|
+
"calendars.importFromHomeAssistant": {
|
|
44984
|
+
capName: "calendars",
|
|
44985
|
+
capScope: "system",
|
|
44986
|
+
addonId: null,
|
|
44987
|
+
access: "create"
|
|
44988
|
+
},
|
|
44989
|
+
"calendars.listCalendars": {
|
|
44990
|
+
capName: "calendars",
|
|
44991
|
+
capScope: "system",
|
|
44992
|
+
addonId: null,
|
|
44993
|
+
access: "view"
|
|
44994
|
+
},
|
|
44995
|
+
"calendars.listEvents": {
|
|
44996
|
+
capName: "calendars",
|
|
44997
|
+
capScope: "system",
|
|
44998
|
+
addonId: null,
|
|
44999
|
+
access: "view"
|
|
45000
|
+
},
|
|
45001
|
+
"calendarSource.listCalendars": {
|
|
45002
|
+
capName: "calendar-source",
|
|
45003
|
+
capScope: "system",
|
|
45004
|
+
addonId: null,
|
|
45005
|
+
access: "view"
|
|
45006
|
+
},
|
|
45007
|
+
"calendarSource.listEvents": {
|
|
45008
|
+
capName: "calendar-source",
|
|
45009
|
+
capScope: "system",
|
|
45010
|
+
addonId: null,
|
|
45011
|
+
access: "view"
|
|
45012
|
+
},
|
|
44856
45013
|
"cameraCredentials.getCredentials": {
|
|
44857
45014
|
capName: "camera-credentials",
|
|
44858
45015
|
capScope: "device",
|
|
@@ -47655,12 +47812,24 @@ Object.freeze({
|
|
|
47655
47812
|
addonId: null,
|
|
47656
47813
|
access: "create"
|
|
47657
47814
|
},
|
|
47815
|
+
"notificationRules.activateAlarmProfile": {
|
|
47816
|
+
capName: "notification-rules",
|
|
47817
|
+
capScope: "system",
|
|
47818
|
+
addonId: null,
|
|
47819
|
+
access: "create"
|
|
47820
|
+
},
|
|
47658
47821
|
"notificationRules.cancelSnooze": {
|
|
47659
47822
|
capName: "notification-rules",
|
|
47660
47823
|
capScope: "system",
|
|
47661
47824
|
addonId: null,
|
|
47662
47825
|
access: "create"
|
|
47663
47826
|
},
|
|
47827
|
+
"notificationRules.createAlarmProfile": {
|
|
47828
|
+
capName: "notification-rules",
|
|
47829
|
+
capScope: "system",
|
|
47830
|
+
addonId: null,
|
|
47831
|
+
access: "create"
|
|
47832
|
+
},
|
|
47664
47833
|
"notificationRules.createRule": {
|
|
47665
47834
|
capName: "notification-rules",
|
|
47666
47835
|
capScope: "system",
|
|
@@ -47673,6 +47842,12 @@ Object.freeze({
|
|
|
47673
47842
|
addonId: null,
|
|
47674
47843
|
access: "create"
|
|
47675
47844
|
},
|
|
47845
|
+
"notificationRules.deleteAlarmProfile": {
|
|
47846
|
+
capName: "notification-rules",
|
|
47847
|
+
capScope: "system",
|
|
47848
|
+
addonId: null,
|
|
47849
|
+
access: "delete"
|
|
47850
|
+
},
|
|
47676
47851
|
"notificationRules.deleteRule": {
|
|
47677
47852
|
capName: "notification-rules",
|
|
47678
47853
|
capScope: "system",
|
|
@@ -47757,6 +47932,12 @@ Object.freeze({
|
|
|
47757
47932
|
addonId: null,
|
|
47758
47933
|
access: "view"
|
|
47759
47934
|
},
|
|
47935
|
+
"notificationRules.renameAlarmProfile": {
|
|
47936
|
+
capName: "notification-rules",
|
|
47937
|
+
capScope: "system",
|
|
47938
|
+
addonId: null,
|
|
47939
|
+
access: "create"
|
|
47940
|
+
},
|
|
47760
47941
|
"notificationRules.resolveArtifactUrl": {
|
|
47761
47942
|
capName: "notification-rules",
|
|
47762
47943
|
capScope: "system",
|
|
@@ -54658,6 +54839,198 @@ function applySecureOnArmEdit(lists, edit) {
|
|
|
54658
54839
|
present: !edit.secureOnArm
|
|
54659
54840
|
});
|
|
54660
54841
|
}
|
|
54842
|
+
/** Stable id of the always-present Default profile (migrated from flat settings). */
|
|
54843
|
+
var NC_ALARM_DEFAULT_PROFILE_ID = "default";
|
|
54844
|
+
var NC_ALARM_DEFAULT_PROFILE_NAME = "Default";
|
|
54845
|
+
/** Stock delays — same numbers the panel shipped with before any editor existed. */
|
|
54846
|
+
var NC_ALARM_SYSTEM_DEFAULT_DELAYS = {
|
|
54847
|
+
exitDelaySec: 30,
|
|
54848
|
+
entryDelaySec: 20,
|
|
54849
|
+
triggeredDurationSec: 0
|
|
54850
|
+
};
|
|
54851
|
+
/** Empty memberships + stock delays + no announce targets. */
|
|
54852
|
+
function ncAlarmSystemDefaultSettings() {
|
|
54853
|
+
return {
|
|
54854
|
+
...NC_ALARM_SYSTEM_DEFAULT_DELAYS,
|
|
54855
|
+
announceTargets: [],
|
|
54856
|
+
nonBlocking: [],
|
|
54857
|
+
blocking: [],
|
|
54858
|
+
secureOnArmOff: [],
|
|
54859
|
+
modeDelays: []
|
|
54860
|
+
};
|
|
54861
|
+
}
|
|
54862
|
+
function isDefaultAlarmProfileId(id) {
|
|
54863
|
+
return id === NC_ALARM_DEFAULT_PROFILE_ID;
|
|
54864
|
+
}
|
|
54865
|
+
/** Deep-enough copy of a settings blob (arrays replaced, never mutated). */
|
|
54866
|
+
function cloneAlarmSettings(settings) {
|
|
54867
|
+
return {
|
|
54868
|
+
exitDelaySec: settings.exitDelaySec,
|
|
54869
|
+
entryDelaySec: settings.entryDelaySec,
|
|
54870
|
+
triggeredDurationSec: settings.triggeredDurationSec,
|
|
54871
|
+
...settings.announceArm !== void 0 ? { announceArm: settings.announceArm } : {},
|
|
54872
|
+
announceTargets: [...settings.announceTargets],
|
|
54873
|
+
nonBlocking: settings.nonBlocking.map((l) => ({
|
|
54874
|
+
mode: l.mode,
|
|
54875
|
+
deviceIds: [...l.deviceIds]
|
|
54876
|
+
})),
|
|
54877
|
+
blocking: settings.blocking.map((l) => ({
|
|
54878
|
+
mode: l.mode,
|
|
54879
|
+
deviceIds: [...l.deviceIds]
|
|
54880
|
+
})),
|
|
54881
|
+
secureOnArmOff: settings.secureOnArmOff.map((l) => ({
|
|
54882
|
+
mode: l.mode,
|
|
54883
|
+
deviceIds: [...l.deviceIds]
|
|
54884
|
+
})),
|
|
54885
|
+
modeDelays: settings.modeDelays.map((e) => ({ ...e }))
|
|
54886
|
+
};
|
|
54887
|
+
}
|
|
54888
|
+
/**
|
|
54889
|
+
* Seed Default from the panel's current flat settings when no profiles exist yet
|
|
54890
|
+
* (first boot after this feature, or a wiped profiles key).
|
|
54891
|
+
*/
|
|
54892
|
+
function ensureAlarmProfiles(state, currentSettings) {
|
|
54893
|
+
if (state !== null && state !== void 0 && state.profiles.length > 0) {
|
|
54894
|
+
if (!state.profiles.some((p) => p.id === "default")) return {
|
|
54895
|
+
activeId: state.activeId,
|
|
54896
|
+
profiles: [{
|
|
54897
|
+
id: NC_ALARM_DEFAULT_PROFILE_ID,
|
|
54898
|
+
name: NC_ALARM_DEFAULT_PROFILE_NAME,
|
|
54899
|
+
settings: cloneAlarmSettings(currentSettings)
|
|
54900
|
+
}, ...state.profiles]
|
|
54901
|
+
};
|
|
54902
|
+
return state.profiles.some((p) => p.id === state.activeId) ? state : {
|
|
54903
|
+
activeId: NC_ALARM_DEFAULT_PROFILE_ID,
|
|
54904
|
+
profiles: state.profiles
|
|
54905
|
+
};
|
|
54906
|
+
}
|
|
54907
|
+
return {
|
|
54908
|
+
activeId: NC_ALARM_DEFAULT_PROFILE_ID,
|
|
54909
|
+
profiles: [{
|
|
54910
|
+
id: NC_ALARM_DEFAULT_PROFILE_ID,
|
|
54911
|
+
name: NC_ALARM_DEFAULT_PROFILE_NAME,
|
|
54912
|
+
settings: cloneAlarmSettings(currentSettings)
|
|
54913
|
+
}]
|
|
54914
|
+
};
|
|
54915
|
+
}
|
|
54916
|
+
function normalizeName(name) {
|
|
54917
|
+
return name.trim();
|
|
54918
|
+
}
|
|
54919
|
+
function nameTaken(state, name, exceptId) {
|
|
54920
|
+
const lower = name.toLowerCase();
|
|
54921
|
+
return state.profiles.some((p) => p.id !== exceptId && p.name.trim().toLowerCase() === lower);
|
|
54922
|
+
}
|
|
54923
|
+
function createAlarmProfile(state, input) {
|
|
54924
|
+
const name = normalizeName(input.name);
|
|
54925
|
+
if (name.length === 0) return {
|
|
54926
|
+
kind: "refused",
|
|
54927
|
+
reason: "name-empty"
|
|
54928
|
+
};
|
|
54929
|
+
if (nameTaken(state, name)) return {
|
|
54930
|
+
kind: "refused",
|
|
54931
|
+
reason: "name-taken",
|
|
54932
|
+
detail: name
|
|
54933
|
+
};
|
|
54934
|
+
if (isDefaultAlarmProfileId(input.id)) return {
|
|
54935
|
+
kind: "refused",
|
|
54936
|
+
reason: "cannot-rename-default-id"
|
|
54937
|
+
};
|
|
54938
|
+
let settings;
|
|
54939
|
+
if (input.source.kind === "defaults") settings = ncAlarmSystemDefaultSettings();
|
|
54940
|
+
else {
|
|
54941
|
+
const fromId = input.source.fromId;
|
|
54942
|
+
const src = state.profiles.find((p) => p.id === fromId);
|
|
54943
|
+
if (src === void 0) return {
|
|
54944
|
+
kind: "refused",
|
|
54945
|
+
reason: "clone-source-missing",
|
|
54946
|
+
detail: fromId
|
|
54947
|
+
};
|
|
54948
|
+
settings = cloneAlarmSettings(src.settings);
|
|
54949
|
+
}
|
|
54950
|
+
return {
|
|
54951
|
+
kind: "ok",
|
|
54952
|
+
state: {
|
|
54953
|
+
activeId: state.activeId,
|
|
54954
|
+
profiles: [...state.profiles, {
|
|
54955
|
+
id: input.id,
|
|
54956
|
+
name,
|
|
54957
|
+
settings
|
|
54958
|
+
}]
|
|
54959
|
+
}
|
|
54960
|
+
};
|
|
54961
|
+
}
|
|
54962
|
+
function renameAlarmProfile(state, input) {
|
|
54963
|
+
const name = normalizeName(input.name);
|
|
54964
|
+
if (name.length === 0) return {
|
|
54965
|
+
kind: "refused",
|
|
54966
|
+
reason: "name-empty"
|
|
54967
|
+
};
|
|
54968
|
+
const at = state.profiles.findIndex((p) => p.id === input.id);
|
|
54969
|
+
if (at < 0) return {
|
|
54970
|
+
kind: "refused",
|
|
54971
|
+
reason: "not-found",
|
|
54972
|
+
detail: input.id
|
|
54973
|
+
};
|
|
54974
|
+
if (nameTaken(state, name, input.id)) return {
|
|
54975
|
+
kind: "refused",
|
|
54976
|
+
reason: "name-taken",
|
|
54977
|
+
detail: name
|
|
54978
|
+
};
|
|
54979
|
+
const next = state.profiles.map((p, i) => i === at ? {
|
|
54980
|
+
...p,
|
|
54981
|
+
name
|
|
54982
|
+
} : p);
|
|
54983
|
+
return {
|
|
54984
|
+
kind: "ok",
|
|
54985
|
+
state: {
|
|
54986
|
+
activeId: state.activeId,
|
|
54987
|
+
profiles: next
|
|
54988
|
+
}
|
|
54989
|
+
};
|
|
54990
|
+
}
|
|
54991
|
+
function deleteAlarmProfile(state, id) {
|
|
54992
|
+
if (isDefaultAlarmProfileId(id)) return {
|
|
54993
|
+
kind: "refused",
|
|
54994
|
+
reason: "cannot-delete-default"
|
|
54995
|
+
};
|
|
54996
|
+
if (!state.profiles.some((p) => p.id === id)) return {
|
|
54997
|
+
kind: "refused",
|
|
54998
|
+
reason: "not-found",
|
|
54999
|
+
detail: id
|
|
55000
|
+
};
|
|
55001
|
+
const profiles = state.profiles.filter((p) => p.id !== id);
|
|
55002
|
+
return {
|
|
55003
|
+
kind: "ok",
|
|
55004
|
+
state: {
|
|
55005
|
+
activeId: state.activeId === id ? NC_ALARM_DEFAULT_PROFILE_ID : state.activeId,
|
|
55006
|
+
profiles
|
|
55007
|
+
}
|
|
55008
|
+
};
|
|
55009
|
+
}
|
|
55010
|
+
function activateAlarmProfile(state, id) {
|
|
55011
|
+
if (!state.profiles.some((p) => p.id === id)) return {
|
|
55012
|
+
kind: "refused",
|
|
55013
|
+
reason: "not-found",
|
|
55014
|
+
detail: id
|
|
55015
|
+
};
|
|
55016
|
+
return {
|
|
55017
|
+
kind: "ok",
|
|
55018
|
+
state: {
|
|
55019
|
+
activeId: id,
|
|
55020
|
+
profiles: state.profiles
|
|
55021
|
+
}
|
|
55022
|
+
};
|
|
55023
|
+
}
|
|
55024
|
+
/** Persist the live flat settings into the active profile's blob. */
|
|
55025
|
+
function syncActiveAlarmProfileSettings(state, settings) {
|
|
55026
|
+
return {
|
|
55027
|
+
activeId: state.activeId,
|
|
55028
|
+
profiles: state.profiles.map((p) => p.id === state.activeId ? {
|
|
55029
|
+
...p,
|
|
55030
|
+
settings: cloneAlarmSettings(settings)
|
|
55031
|
+
} : p)
|
|
55032
|
+
};
|
|
55033
|
+
}
|
|
54661
55034
|
/**
|
|
54662
55035
|
* WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
|
|
54663
55036
|
* persists (D640 "a sensor rule fires on the raise, the clear, or both").
|
|
@@ -57393,6 +57766,12 @@ Object.defineProperty(exports, "MotionTriggeredBySchema", {
|
|
|
57393
57766
|
return MotionTriggeredBySchema;
|
|
57394
57767
|
}
|
|
57395
57768
|
});
|
|
57769
|
+
Object.defineProperty(exports, "NC_ALARM_DEFAULT_PROFILE_ID", {
|
|
57770
|
+
enumerable: true,
|
|
57771
|
+
get: function() {
|
|
57772
|
+
return NC_ALARM_DEFAULT_PROFILE_ID;
|
|
57773
|
+
}
|
|
57774
|
+
});
|
|
57396
57775
|
Object.defineProperty(exports, "NC_ALARM_DELAY_FIELDS", {
|
|
57397
57776
|
enumerable: true,
|
|
57398
57777
|
get: function() {
|
|
@@ -57855,6 +58234,12 @@ Object.defineProperty(exports, "_enum", {
|
|
|
57855
58234
|
return _enum;
|
|
57856
58235
|
}
|
|
57857
58236
|
});
|
|
58237
|
+
Object.defineProperty(exports, "activateAlarmProfile", {
|
|
58238
|
+
enumerable: true,
|
|
58239
|
+
get: function() {
|
|
58240
|
+
return activateAlarmProfile;
|
|
58241
|
+
}
|
|
58242
|
+
});
|
|
57858
58243
|
Object.defineProperty(exports, "addonWidgetsSourceCapability", {
|
|
57859
58244
|
enumerable: true,
|
|
57860
58245
|
get: function() {
|
|
@@ -57939,6 +58324,12 @@ Object.defineProperty(exports, "canonicalHash", {
|
|
|
57939
58324
|
return canonicalHash;
|
|
57940
58325
|
}
|
|
57941
58326
|
});
|
|
58327
|
+
Object.defineProperty(exports, "cloneAlarmSettings", {
|
|
58328
|
+
enumerable: true,
|
|
58329
|
+
get: function() {
|
|
58330
|
+
return cloneAlarmSettings;
|
|
58331
|
+
}
|
|
58332
|
+
});
|
|
57942
58333
|
Object.defineProperty(exports, "consumableLowPercentOf", {
|
|
57943
58334
|
enumerable: true,
|
|
57944
58335
|
get: function() {
|
|
@@ -57951,6 +58342,12 @@ Object.defineProperty(exports, "cosineSimilarity", {
|
|
|
57951
58342
|
return cosineSimilarity;
|
|
57952
58343
|
}
|
|
57953
58344
|
});
|
|
58345
|
+
Object.defineProperty(exports, "createAlarmProfile", {
|
|
58346
|
+
enumerable: true,
|
|
58347
|
+
get: function() {
|
|
58348
|
+
return createAlarmProfile;
|
|
58349
|
+
}
|
|
58350
|
+
});
|
|
57954
58351
|
Object.defineProperty(exports, "createEvent", {
|
|
57955
58352
|
enumerable: true,
|
|
57956
58353
|
get: function() {
|
|
@@ -57969,6 +58366,12 @@ Object.defineProperty(exports, "defineCustomActions", {
|
|
|
57969
58366
|
return defineCustomActions;
|
|
57970
58367
|
}
|
|
57971
58368
|
});
|
|
58369
|
+
Object.defineProperty(exports, "deleteAlarmProfile", {
|
|
58370
|
+
enumerable: true,
|
|
58371
|
+
get: function() {
|
|
58372
|
+
return deleteAlarmProfile;
|
|
58373
|
+
}
|
|
58374
|
+
});
|
|
57972
58375
|
Object.defineProperty(exports, "deriveRecordingMode", {
|
|
57973
58376
|
enumerable: true,
|
|
57974
58377
|
get: function() {
|
|
@@ -58029,6 +58432,12 @@ Object.defineProperty(exports, "encodeVectorBase64", {
|
|
|
58029
58432
|
return encodeVectorBase64;
|
|
58030
58433
|
}
|
|
58031
58434
|
});
|
|
58435
|
+
Object.defineProperty(exports, "ensureAlarmProfiles", {
|
|
58436
|
+
enumerable: true,
|
|
58437
|
+
get: function() {
|
|
58438
|
+
return ensureAlarmProfiles;
|
|
58439
|
+
}
|
|
58440
|
+
});
|
|
58032
58441
|
Object.defineProperty(exports, "errMsg", {
|
|
58033
58442
|
enumerable: true,
|
|
58034
58443
|
get: function() {
|
|
@@ -58089,6 +58498,12 @@ Object.defineProperty(exports, "isAudioClassName", {
|
|
|
58089
58498
|
return isAudioClassName;
|
|
58090
58499
|
}
|
|
58091
58500
|
});
|
|
58501
|
+
Object.defineProperty(exports, "isDefaultAlarmProfileId", {
|
|
58502
|
+
enumerable: true,
|
|
58503
|
+
get: function() {
|
|
58504
|
+
return isDefaultAlarmProfileId;
|
|
58505
|
+
}
|
|
58506
|
+
});
|
|
58092
58507
|
Object.defineProperty(exports, "isDetectionMacroClass", {
|
|
58093
58508
|
enumerable: true,
|
|
58094
58509
|
get: function() {
|
|
@@ -58275,6 +58690,12 @@ Object.defineProperty(exports, "record", {
|
|
|
58275
58690
|
return record;
|
|
58276
58691
|
}
|
|
58277
58692
|
});
|
|
58693
|
+
Object.defineProperty(exports, "renameAlarmProfile", {
|
|
58694
|
+
enumerable: true,
|
|
58695
|
+
get: function() {
|
|
58696
|
+
return renameAlarmProfile;
|
|
58697
|
+
}
|
|
58698
|
+
});
|
|
58278
58699
|
Object.defineProperty(exports, "resolveClipSearchMinScore", {
|
|
58279
58700
|
enumerable: true,
|
|
58280
58701
|
get: function() {
|
|
@@ -58383,6 +58804,12 @@ Object.defineProperty(exports, "subKindsOf", {
|
|
|
58383
58804
|
return subKindsOf;
|
|
58384
58805
|
}
|
|
58385
58806
|
});
|
|
58807
|
+
Object.defineProperty(exports, "syncActiveAlarmProfileSettings", {
|
|
58808
|
+
enumerable: true,
|
|
58809
|
+
get: function() {
|
|
58810
|
+
return syncActiveAlarmProfileSettings;
|
|
58811
|
+
}
|
|
58812
|
+
});
|
|
58386
58813
|
Object.defineProperty(exports, "systemEventDeliveryProblems", {
|
|
58387
58814
|
enumerable: true,
|
|
58388
58815
|
get: function() {
|