@camstack/addon-pipeline-orchestrator 1.2.656 → 1.2.657

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 (39) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/assets/viewer/.viewer-current-files.json +18 -18
  3. package/assets/viewer/.viewer-version +1 -1
  4. package/assets/viewer/_expo/static/js/web/[frameId]-35c42299530aeeb8af9696a44574d5c2.js +23 -0
  5. package/assets/viewer/_expo/static/js/web/[id]-483ffcfbccae57166106f1a730461293.js +5 -0
  6. package/assets/viewer/_expo/static/js/web/[id]-c457536a2a37016983818811138b3a68.js +7 -0
  7. package/assets/viewer/_expo/static/js/web/[id]-fe77e3abe00340b8cdf3c7df3fb79c24.js +57 -0
  8. package/assets/viewer/_expo/static/js/web/[section]-72a776b38de8eb6487770a1830e6eada.js +31 -0
  9. package/assets/viewer/_expo/static/js/web/{__common-2f84b1ca43bfa1f12ceabf6b143bb44e.js → __common-d6b750942f15f710317cda14c45946b4.js} +1294 -1294
  10. package/assets/viewer/_expo/static/js/web/_layout-5d35df374c084c4635d1323a5e6d8399.js +29 -0
  11. package/assets/viewer/_expo/static/js/web/{_layout-17608b2531640cc566469fddcf1cdbea.js → _layout-daed64c97776d517df8e5f42a7d16b6f.js} +24 -24
  12. package/assets/viewer/_expo/static/js/web/adhoc-bcd88137d4e491b34717e02b4c9d0e32.js +1 -0
  13. package/assets/viewer/_expo/static/js/web/alarm-e5511212fbc4e9bab740e7ec259b5d9e.js +1 -0
  14. package/assets/viewer/_expo/static/js/web/cameras-5471fc1de6356415505bd7f707e6ac77.js +27 -0
  15. package/assets/viewer/_expo/static/js/web/{enroll-2c9af33bd8953e33bfb9034fdef2d63e.js → enroll-aba8aa69276085249ee806a26942194b.js} +19 -19
  16. package/assets/viewer/_expo/static/js/web/history-aa7ea0e4b4b755ec248bf939ade97798.js +3 -0
  17. package/assets/viewer/_expo/static/js/web/{index-7c624c3ed46f4397bb3abd93a9f436ec.js → index-265396a362ea3648a3697c2984d6c244.js} +2 -2
  18. package/assets/viewer/_expo/static/js/web/index-4498d2909e3bfdca3309ff3f3f59c10c.js +1 -0
  19. package/assets/viewer/_expo/static/js/web/index-ef33db09c327e9668346081607160e76.js +1 -0
  20. package/assets/viewer/_expo/static/js/web/new-ba66f0a1a170bf1a3f64c38ed30fcdbb.js +2 -0
  21. package/assets/viewer/_expo/static/js/web/sign-in-657339c48456ee6f863a61a77ff8af56.js +38 -0
  22. package/assets/viewer/index.html +1 -1
  23. package/dist/_stub.js +2 -2
  24. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BlG7DFZv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CHSkS8Be.mjs} +2 -2
  25. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C33x6eba.mjs +26 -0
  26. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D8vih3Xp.mjs +26 -0
  27. package/dist/{hostInit-CNueneOD.mjs → hostInit-DT5XVm61.mjs} +2 -2
  28. package/dist/index.js +256 -202
  29. package/dist/index.mjs +256 -202
  30. package/dist/remoteEntry.js +1 -1
  31. package/package.json +2 -2
  32. package/assets/viewer/_expo/static/js/web/Clipboard-1f1164c412be79bd909a8e53c97a3482.js +0 -8
  33. package/assets/viewer/_expo/static/js/web/Haptics-8bcab636236172ba5f48ae47f6464b1c.js +0 -3
  34. package/assets/viewer/_expo/static/js/web/add-server-9d522e50b831fce3986b69e94e22191a.js +0 -2
  35. package/assets/viewer/_expo/static/js/web/connect-308ac6434caaad2fc6ccf6dbf0aa39d8.js +0 -2
  36. package/assets/viewer/_expo/static/js/web/index-b65eec858e160d6ed7880072a4ed593f.js +0 -4
  37. package/assets/viewer/_expo/static/js/web/index-e0b431ae0b4ca13eb0ab241ae4744574.js +0 -2
  38. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-NEEgITJZ.mjs +0 -26
  39. package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B_KHG4Or.mjs +0 -26
package/dist/index.mjs CHANGED
@@ -5984,7 +5984,7 @@ var ZodIssueCode = {
5984
5984
  var ZodFirstPartyTypeKind;
5985
5985
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5986
5986
  //#endregion
5987
- //#region ../types/dist/sleep-DV4qxEyD.mjs
5987
+ //#region ../types/dist/sleep-hK-Dss3z.mjs
5988
5988
  /**
5989
5989
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5990
5990
  * window to float samples (D455).
@@ -12282,7 +12282,7 @@ function sleep(ms) {
12282
12282
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
12283
12283
  }
12284
12284
  //#endregion
12285
- //#region ../types/dist/composition-CD1GdFuv.mjs
12285
+ //#region ../types/dist/composition-BSGHhcr8.mjs
12286
12286
  /**
12287
12287
  * The ffmpeg build every CamStack node downloads, per platform and arch.
12288
12288
  *
@@ -13174,38 +13174,6 @@ function validateExpressionSource(src) {
13174
13174
  return null;
13175
13175
  }
13176
13176
  /**
13177
- * One power reading becomes a washer, dryer or dishwasher (D944 helper).
13178
- *
13179
- * Standby of the control board is under 5 W; a motor or a heater is far
13180
- * above that, so 5 W is the line. A door lock or a short pump spike is not
13181
- * a cycle, so running starts only after 30 s above the line.
13182
- *
13183
- * A wash, dry or dishwasher pause (soak, heat-wait, heater off between
13184
- * bursts) lasts several minutes. Ending the cycle on the first dip would
13185
- * report "finished" in the middle of the program, so the stop dwell is
13186
- * 10 minutes on every type. The number is stored per type so one machine
13187
- * can move later without moving the others.
13188
- */
13189
- var APPLIANCE_TEMPLATE_ID = "appliance";
13190
- var APPLIANCE_KINDS = [
13191
- "washer",
13192
- "dryer",
13193
- "dishwasher"
13194
- ];
13195
- DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
13196
- /**
13197
- * A dumb plug-in stove or heater, built from a smart plug (a `Heater`).
13198
- *
13199
- * The plug is the actuator: `switch.setState` is a FORWARD to the plug's own
13200
- * (D967), so the heater switches exactly as the plug does. Running is the
13201
- * plug being on; when a power reading is also named, running is the draw
13202
- * staying above the line instead (a plug left on with the stove's own
13203
- * thermostat open is not heating). 50 W is far above any standby and below
13204
- * the smallest radiator.
13205
- */
13206
- var HEATER_TEMPLATE_ID = "heater";
13207
- DeviceType.Heater;
13208
- /**
13209
13177
  * Statistics and integrals over a history read (D944).
13210
13178
  *
13211
13179
  * Pure: the same points always give the same answer, so a restart recomputes
@@ -13349,34 +13317,6 @@ var HelperSpecSchema = discriminatedUnion("kind", [
13349
13317
  /** Actuator groups only. Readings leave this unset. */
13350
13318
  active: ActiveCriterionSchema.optional()
13351
13319
  }),
13352
- object({
13353
- kind: literal("appliance"),
13354
- templateId: literal(APPLIANCE_TEMPLATE_ID),
13355
- appliance: _enum(APPLIANCE_KINDS),
13356
- thresholdWatts: number().positive(),
13357
- startDwellMs: number().int().nonnegative(),
13358
- stopDwellMs: number().int().nonnegative(),
13359
- member: HelperMemberSchema,
13360
- /**
13361
- * The plug that powers the appliance (`switch.on`). Optional: when set, the
13362
- * composition carries a `power-source` feature, so the hub can cut and restore
13363
- * that plug (power-source link of a NEW-target composition).
13364
- */
13365
- powerSwitch: HelperMemberSchema.optional(),
13366
- /** How long a forced restart keeps the plug off; the cap's default when unset. */
13367
- offSeconds: number().optional()
13368
- }),
13369
- object({
13370
- kind: literal("heater"),
13371
- templateId: literal(HEATER_TEMPLATE_ID),
13372
- /** The plug, read and commanded at `switch.on`. */
13373
- plug: HelperMemberSchema,
13374
- /** The plug's power reading, when it has one: running is then the draw, not the switch. */
13375
- meter: HelperMemberSchema.optional(),
13376
- thresholdWatts: number().positive(),
13377
- startDwellMs: number().int().nonnegative(),
13378
- stopDwellMs: number().int().nonnegative()
13379
- }),
13380
13320
  object({
13381
13321
  kind: literal("statistic"),
13382
13322
  stat: _enum(STATISTIC_STATS),
@@ -49601,49 +49541,6 @@ function actuator(input) {
49601
49541
  };
49602
49542
  }
49603
49543
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
49604
- var PowerSourceRefusalReasonSchema = _enum([
49605
- "no-power-source",
49606
- "switch-missing",
49607
- "switch-offline",
49608
- "switch-unknown",
49609
- "restart-in-progress",
49610
- "switch-call-failed"
49611
- ]);
49612
- var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
49613
- accepted: literal(false),
49614
- reason: PowerSourceRefusalReasonSchema,
49615
- /** One line for the operator, naming the switch. */
49616
- message: string()
49617
- })]);
49618
- var PowerSourceInfoSchema = object({
49619
- /** False when the device has no power source linked; the rest is then empty. */
49620
- linked: boolean(),
49621
- switchDeviceId: number().nullable(),
49622
- switchName: string().nullable(),
49623
- /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
49624
- switchOn: boolean().nullable(),
49625
- switchOnline: boolean().nullable(),
49626
- restartInProgress: boolean(),
49627
- offSeconds: number().int()
49628
- });
49629
- object({
49630
- /** Null while the switch has not reported: unknown is never `false` (D393). */
49631
- switchOn: boolean().nullable(),
49632
- offSeconds: number().int(),
49633
- lastFetchedAt: number()
49634
- });
49635
- DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
49636
- var deviceInput$2 = object({ deviceId: number().int().nonnegative() });
49637
- systemMethod(deviceInput$2, PowerSourceInfoSchema, { auth: "admin" }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
49638
- kind: "mutation",
49639
- auth: "admin"
49640
- }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
49641
- kind: "mutation",
49642
- auth: "admin"
49643
- }), systemMethod(deviceInput$2, PowerSourceActionResultSchema, {
49644
- kind: "mutation",
49645
- auth: "admin"
49646
- });
49647
49544
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
49648
49545
  DeviceType.Camera;
49649
49546
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
@@ -49671,6 +49568,165 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
49671
49568
  }).optional()
49672
49569
  })) });
49673
49570
  /**
49571
+ * A saved Customize assignment (D936). The schema is the type: callers use
49572
+ * `z.infer`, they do not restate the shape.
49573
+ */
49574
+ var OverrideSourceSchema = object({
49575
+ addonId: string().min(1),
49576
+ stableId: string().min(1),
49577
+ cap: string().min(1),
49578
+ fieldPath: string().min(1)
49579
+ });
49580
+ var IdentityTransformDraftSchema = object({ kind: literal("identity") });
49581
+ var InvertTransformDraftSchema = object({ kind: literal("invert") });
49582
+ var ThresholdTransformDraftSchema = object({
49583
+ kind: literal("threshold"),
49584
+ comparison: _enum(["gte", "lte"]),
49585
+ threshold: number(),
49586
+ startDwellMs: number().nonnegative(),
49587
+ stopDwellMs: number().nonnegative()
49588
+ });
49589
+ var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
49590
+ IdentityTransformDraftSchema,
49591
+ InvertTransformDraftSchema,
49592
+ ThresholdTransformDraftSchema,
49593
+ object({
49594
+ kind: literal("linear"),
49595
+ scale: number(),
49596
+ offset: number(),
49597
+ clampMin: number().optional(),
49598
+ clampMax: number().optional()
49599
+ }),
49600
+ object({
49601
+ kind: literal("enum-map"),
49602
+ mapping: record(string(), string().nullable())
49603
+ }),
49604
+ object({ kind: literal("number") })
49605
+ ]);
49606
+ var ScalarOverrideDraftSchema = object({
49607
+ kind: literal("scalar"),
49608
+ cap: string().min(1),
49609
+ targetId: string().min(1),
49610
+ source: OverrideSourceSchema,
49611
+ transform: CustomizeTransformDraftSchema
49612
+ });
49613
+ var KeyedArrayOverrideDraftSchema = object({
49614
+ kind: literal("keyedArray"),
49615
+ cap: string().min(1),
49616
+ targetId: string().min(1),
49617
+ key: string().min(1),
49618
+ label: string().min(1),
49619
+ fieldPath: string().min(1),
49620
+ source: OverrideSourceSchema,
49621
+ transform: CustomizeTransformDraftSchema
49622
+ });
49623
+ var PulseOverrideDraftSchema = object({
49624
+ kind: literal("pulse"),
49625
+ cap: string().min(1),
49626
+ targetId: string().min(1),
49627
+ enabled: boolean(),
49628
+ debounceMs: number().nonnegative(),
49629
+ edges: array(_enum([
49630
+ "rising",
49631
+ "button",
49632
+ "native-event"
49633
+ ])).min(1).optional(),
49634
+ sources: array(OverrideSourceSchema).min(1)
49635
+ });
49636
+ var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
49637
+ "in-addition",
49638
+ "confirm",
49639
+ "replace"
49640
+ ]).optional() });
49641
+ discriminatedUnion("kind", [
49642
+ ScalarOverrideDraftSchema,
49643
+ KeyedArrayOverrideDraftSchema,
49644
+ PulseOverrideDraftSchema,
49645
+ object({
49646
+ kind: literal("span"),
49647
+ cap: string().min(1),
49648
+ targetId: string().min(1),
49649
+ timeoutMs: number().nonnegative(),
49650
+ cooldownMs: number().nonnegative().optional(),
49651
+ sources: array(SpanSourceDraftSchema)
49652
+ })
49653
+ ]);
49654
+ object({
49655
+ targetId: string().min(1),
49656
+ configured: boolean(),
49657
+ source: _enum(["native", "assigned"]),
49658
+ state: _enum([
49659
+ "active",
49660
+ "stale",
49661
+ "released",
49662
+ "unavailable"
49663
+ ]),
49664
+ reason: string().nullable()
49665
+ });
49666
+ /**
49667
+ * What a running-threshold proposal says (planning#405). The schema is the
49668
+ * type: the algorithm, the capability method and the UI all read `z.infer`.
49669
+ *
49670
+ * A proposal is read-only advice: it carries the numbers it was derived from
49671
+ * (`evidence`) so the operator can judge it, and an `insufficient` answer names
49672
+ * WHY with a typed reason and the catalog defaults, never an invented number.
49673
+ */
49674
+ var RunningProposalTierSchema = _enum(["raw", "5m"]);
49675
+ var RunningProposalConfidenceSchema = _enum([
49676
+ "high",
49677
+ "medium",
49678
+ "low"
49679
+ ]);
49680
+ var RunningProposalInsufficientReasonSchema = _enum([
49681
+ "no-history",
49682
+ "span-too-short",
49683
+ "truncated",
49684
+ "no-idle-floor",
49685
+ "no-runs",
49686
+ "no-separation"
49687
+ ]);
49688
+ var RunningProposalReplaySchema = object({
49689
+ /** Intervals the real dwell expression held true over the window. */
49690
+ intervals: number().int().nonnegative(),
49691
+ /** Intervals outside every run, or a second interval inside one. */
49692
+ extra: number().int().nonnegative(),
49693
+ /** Runs without an interval of their own (none, or merged into a neighbour). */
49694
+ missed: number().int().nonnegative()
49695
+ });
49696
+ var RunningProposalEvidenceSchema = object({
49697
+ tier: RunningProposalTierSchema,
49698
+ spanMs: number().nonnegative(),
49699
+ from: number(),
49700
+ to: number(),
49701
+ points: number().int().nonnegative(),
49702
+ runsFound: number().int().nonnegative(),
49703
+ pausesFound: number().int().nonnegative(),
49704
+ longestPauseMs: number().nonnegative(),
49705
+ idleFloorW: number(),
49706
+ noiseCeilingW: number(),
49707
+ plateauW: number(),
49708
+ replay: RunningProposalReplaySchema
49709
+ });
49710
+ var RunningProposalInsufficientEvidenceSchema = object({
49711
+ spanMs: number().nonnegative(),
49712
+ points: number().int().nonnegative(),
49713
+ runsFound: number().int().nonnegative()
49714
+ });
49715
+ var RunningThresholdProposalSchema = discriminatedUnion("state", [object({
49716
+ state: literal("proposal"),
49717
+ transform: ThresholdTransformDraftSchema,
49718
+ evidence: RunningProposalEvidenceSchema,
49719
+ confidence: RunningProposalConfidenceSchema,
49720
+ /** Why the confidence is not higher; empty when nothing held it back. */
49721
+ notes: array(string())
49722
+ }), object({
49723
+ state: literal("insufficient"),
49724
+ reason: RunningProposalInsufficientReasonSchema,
49725
+ evidence: RunningProposalInsufficientEvidenceSchema,
49726
+ /** The catalog defaults, offered as what stands when nothing better is known. */
49727
+ fallback: ThresholdTransformDraftSchema
49728
+ })]);
49729
+ /**
49674
49730
  * The report of a one-shot "move this owner's plaintext secrets into the
49675
49731
  * keychain" run (D878). COUNTS only - never a value, never a ref.
49676
49732
  *
@@ -49960,6 +50016,14 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
49960
50016
  kind: "mutation",
49961
50017
  auth: "admin",
49962
50018
  access: "view"
50019
+ }), method(object({
50020
+ deviceId: number().int(),
50021
+ cap: string().min(1),
50022
+ fieldPath: string().min(1),
50023
+ deviceType: _enum(DeviceType).optional()
50024
+ }), RunningThresholdProposalSchema, {
50025
+ auth: "admin",
50026
+ access: "view"
49963
50027
  }), method(object({
49964
50028
  blockId: string().min(1),
49965
50029
  trace: AutomationRunTraceSchema.optional(),
@@ -54337,15 +54401,15 @@ var FanPresetCaptureResultSchema = object({
54337
54401
  items: array(FanCaptureItemSchema),
54338
54402
  omitted: array(FanCaptureOmissionSchema)
54339
54403
  });
54340
- var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
54404
+ var deviceInput$2 = object({ deviceId: number().int().nonnegative() });
54341
54405
  DeviceType.Fan;
54342
- method(deviceInput$1, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$1.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
54406
+ method(deviceInput$2, array(FanPresetSchema), { auth: "protected" }), method(deviceInput$2.extend({ presets: array(FanPresetSchema).max(12) }), FanPresetsSetResultSchema, {
54343
54407
  kind: "mutation",
54344
54408
  auth: "admin"
54345
- }), method(deviceInput$1.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
54409
+ }), method(deviceInput$2.extend({ presetId: string().min(1) }), FanPresetApplyResultSchema, {
54346
54410
  kind: "mutation",
54347
54411
  auth: "protected"
54348
- }), method(deviceInput$1.extend({
54412
+ }), method(deviceInput$2.extend({
54349
54413
  fields: array(FanCaptureFieldSchema).optional(),
54350
54414
  steps: array(ActionStepSchema).max(20).default([])
54351
54415
  }), FanPresetCaptureResultSchema, { auth: "protected" });
@@ -70054,6 +70118,49 @@ object({
70054
70118
  DeviceType.PetFeeder,
70055
70119
  DeviceType.Heater
70056
70120
  ].filter((type) => type !== DeviceType.Sensor);
70121
+ var PowerSourceRefusalReasonSchema = _enum([
70122
+ "no-power-source",
70123
+ "switch-missing",
70124
+ "switch-offline",
70125
+ "switch-unknown",
70126
+ "restart-in-progress",
70127
+ "switch-call-failed"
70128
+ ]);
70129
+ var PowerSourceActionResultSchema = discriminatedUnion("accepted", [object({ accepted: literal(true) }), object({
70130
+ accepted: literal(false),
70131
+ reason: PowerSourceRefusalReasonSchema,
70132
+ /** One line for the operator, naming the switch. */
70133
+ message: string()
70134
+ })]);
70135
+ var PowerSourceInfoSchema = object({
70136
+ /** False when the device has no power source linked; the rest is then empty. */
70137
+ linked: boolean(),
70138
+ switchDeviceId: number().nullable(),
70139
+ switchName: string().nullable(),
70140
+ /** The switch's on/off state, or null when it is unknown. Never false for unknown (D393). */
70141
+ switchOn: boolean().nullable(),
70142
+ switchOnline: boolean().nullable(),
70143
+ restartInProgress: boolean(),
70144
+ offSeconds: number().int()
70145
+ });
70146
+ object({
70147
+ /** Null while the switch has not reported: unknown is never `false` (D393). */
70148
+ switchOn: boolean().nullable(),
70149
+ offSeconds: number().int(),
70150
+ lastFetchedAt: number()
70151
+ });
70152
+ DeviceType.Gateway, DeviceType.Hub, DeviceType.Camera, DeviceType.Sensor, DeviceType.MediaPlayer, DeviceType.Vacuum, DeviceType.Generic, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.PetFountain, DeviceType.Fan, DeviceType.Humidifier, DeviceType.Climate, DeviceType.WaterHeater;
70153
+ var deviceInput$1 = object({ deviceId: number().int().nonnegative() });
70154
+ systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "admin" }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70155
+ kind: "mutation",
70156
+ auth: "admin"
70157
+ }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70158
+ kind: "mutation",
70159
+ auth: "admin"
70160
+ }), systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
70161
+ kind: "mutation",
70162
+ auth: "admin"
70163
+ });
70057
70164
  /**
70058
70165
  * Presence cap. Models HA `person.*` and `device_tracker.*` entities
70059
70166
  * on `DeviceType.Presence`. Read-only — no setters: presence is
@@ -78328,6 +78435,34 @@ discriminatedUnion("kind", [object({
78328
78435
  kind: literal("pronto"),
78329
78436
  code: string()
78330
78437
  })]);
78438
+ /**
78439
+ * Propose a running threshold from a device's own power history (planning#405).
78440
+ *
78441
+ * Pure and deterministic: the same series gives the same answer. The series is
78442
+ * a HELD-VALUE step series — a point's value stands until the next point — which
78443
+ * is how device-history stores a gauge, so "time at a level" is exact, not a
78444
+ * count of samples.
78445
+ *
78446
+ * 1. idle floor F = time-weighted median; noise ceiling N = highest value seen
78447
+ * near F. A device that is not near one level most of the time has no floor.
78448
+ * 2. coarse activity = above max(2N, N + 5 W); consecutive stretches are episodes.
78449
+ * 3. gaps between episodes split in two by the largest log-scale jump (>= 3x):
78450
+ * the short ones are pauses INSIDE a run (a soak), the long ones separate runs.
78451
+ * 4. T = geometric mean of N and the plateau's 10th percentile, snapped to a
78452
+ * grid a person would type; stop dwell covers the longest pause; start dwell
78453
+ * covers the longest standby blip above T.
78454
+ * 5. the numbers are proved by REPLAY through the real `dwell` evaluation: each
78455
+ * run must hold exactly one true interval and nothing may flap outside.
78456
+ */
78457
+ var SECOND_MS = 1e3;
78458
+ var MINUTE_MS$1 = 60 * SECOND_MS;
78459
+ 24 * (60 * MINUTE_MS$1);
78460
+ 10 * MINUTE_MS$1;
78461
+ 30 * SECOND_MS;
78462
+ 60 * SECOND_MS;
78463
+ 20 * MINUTE_MS$1;
78464
+ 10 * SECOND_MS;
78465
+ 10 * SECOND_MS;
78331
78466
  DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverStoppable, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
78332
78467
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
78333
78468
  String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
@@ -79869,6 +80004,13 @@ Object.freeze({
79869
80004
  access: "create",
79870
80005
  role: "admin"
79871
80006
  },
80007
+ "coreBlocks.proposeRunningThreshold": {
80008
+ capName: "core-blocks",
80009
+ capScope: "system",
80010
+ addonId: null,
80011
+ access: "view",
80012
+ role: "admin"
80013
+ },
79872
80014
  "coreBlocks.reportAutomationRun": {
79873
80015
  capName: "core-blocks",
79874
80016
  capScope: "system",
@@ -89355,6 +89497,11 @@ Object.freeze({
89355
89497
  form: "single",
89356
89498
  optional: false
89357
89499
  }],
89500
+ "coreBlocks.proposeRunningThreshold": [{
89501
+ name: "deviceId",
89502
+ form: "single",
89503
+ optional: false
89504
+ }],
89358
89505
  "cover.close": [{
89359
89506
  name: "deviceId",
89360
89507
  form: "single",
@@ -92115,99 +92262,6 @@ var BucketAccumulator = class {
92115
92262
  return n;
92116
92263
  }
92117
92264
  };
92118
- /**
92119
- * A saved Customize assignment (D936). The schema is the type: callers use
92120
- * `z.infer`, they do not restate the shape.
92121
- */
92122
- var OverrideSourceSchema = object({
92123
- addonId: string().min(1),
92124
- stableId: string().min(1),
92125
- cap: string().min(1),
92126
- fieldPath: string().min(1)
92127
- });
92128
- var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
92129
- object({ kind: literal("identity") }),
92130
- object({ kind: literal("invert") }),
92131
- object({
92132
- kind: literal("threshold"),
92133
- comparison: _enum(["gte", "lte"]),
92134
- threshold: number(),
92135
- startDwellMs: number().nonnegative(),
92136
- stopDwellMs: number().nonnegative()
92137
- }),
92138
- object({
92139
- kind: literal("linear"),
92140
- scale: number(),
92141
- offset: number(),
92142
- clampMin: number().optional(),
92143
- clampMax: number().optional()
92144
- }),
92145
- object({
92146
- kind: literal("enum-map"),
92147
- mapping: record(string(), string().nullable())
92148
- }),
92149
- object({ kind: literal("number") })
92150
- ]);
92151
- var ScalarOverrideDraftSchema = object({
92152
- kind: literal("scalar"),
92153
- cap: string().min(1),
92154
- targetId: string().min(1),
92155
- source: OverrideSourceSchema,
92156
- transform: CustomizeTransformDraftSchema
92157
- });
92158
- var KeyedArrayOverrideDraftSchema = object({
92159
- kind: literal("keyedArray"),
92160
- cap: string().min(1),
92161
- targetId: string().min(1),
92162
- key: string().min(1),
92163
- label: string().min(1),
92164
- fieldPath: string().min(1),
92165
- source: OverrideSourceSchema,
92166
- transform: CustomizeTransformDraftSchema
92167
- });
92168
- var PulseOverrideDraftSchema = object({
92169
- kind: literal("pulse"),
92170
- cap: string().min(1),
92171
- targetId: string().min(1),
92172
- enabled: boolean(),
92173
- debounceMs: number().nonnegative(),
92174
- edges: array(_enum([
92175
- "rising",
92176
- "button",
92177
- "native-event"
92178
- ])).min(1).optional(),
92179
- sources: array(OverrideSourceSchema).min(1)
92180
- });
92181
- var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
92182
- "in-addition",
92183
- "confirm",
92184
- "replace"
92185
- ]).optional() });
92186
- discriminatedUnion("kind", [
92187
- ScalarOverrideDraftSchema,
92188
- KeyedArrayOverrideDraftSchema,
92189
- PulseOverrideDraftSchema,
92190
- object({
92191
- kind: literal("span"),
92192
- cap: string().min(1),
92193
- targetId: string().min(1),
92194
- timeoutMs: number().nonnegative(),
92195
- cooldownMs: number().nonnegative().optional(),
92196
- sources: array(SpanSourceDraftSchema)
92197
- })
92198
- ]);
92199
- object({
92200
- targetId: string().min(1),
92201
- configured: boolean(),
92202
- source: _enum(["native", "assigned"]),
92203
- state: _enum([
92204
- "active",
92205
- "stale",
92206
- "released",
92207
- "unavailable"
92208
- ]),
92209
- reason: string().nullable()
92210
- });
92211
92265
  var G711_SCALE_CORRECTION_DB = {
92212
92266
  PCMU: 20 * Math.log10(4),
92213
92267
  PCMA: 20 * Math.log10(8)
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BlG7DFZv.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CHSkS8Be.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-pipeline-orchestrator",
3
- "version": "1.2.656",
3
+ "version": "1.2.657",
4
4
  "description": "Hub-side camera-to-agent load balancer — tracks runner capacity and dispatches attachCamera calls to the optimal pipeline-runner instance",
5
5
  "keywords": [
6
6
  "camstack",
@@ -76,7 +76,7 @@
76
76
  }
77
77
  ],
78
78
  "requires": {
79
- "server": ">=1.2.750"
79
+ "server": ">=1.2.753"
80
80
  }
81
81
  },
82
82
  "files": [
@@ -1,8 +0,0 @@
1
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"ClipboardPasteButton",{enumerable:!0,get:function(){return c.ClipboardPasteButton}}),_e.getStringAsync=async function(t={}){if(!s.default.getStringAsync)throw new n.UnavailabilityError('Clipboard','getStringAsync');return await s.default.getStringAsync(t)},_e.setStringAsync=async function(t,e={}){if(!s.default.setStringAsync)throw new n.UnavailabilityError('Clipboard','setStringAsync');return s.default.setStringAsync(t,e)},_e.hasStringAsync=function(){if(!s.default.hasStringAsync)throw new n.UnavailabilityError('Clipboard','hasStringAsync');return s.default.hasStringAsync()},_e.getUrlAsync=async function(){if(!s.default.getUrlAsync)throw new n.UnavailabilityError('Clipboard','getUrlAsync');return await s.default.getUrlAsync()},_e.setUrlAsync=async function(t){if(!s.default.setUrlAsync)throw new n.UnavailabilityError('Clipboard','setUrlAsync');return s.default.setUrlAsync(t)},_e.hasUrlAsync=async function(){if(!s.default.hasUrlAsync)throw new n.UnavailabilityError('Clipboard','hasUrlAsync');return await s.default.hasUrlAsync()},_e.getImageAsync=async function(t){if(!s.default.getImageAsync)throw new n.UnavailabilityError('Clipboard','getImageAsync');return await s.default.getImageAsync(t)},_e.setImageAsync=async function(t){if(!s.default.setImageAsync)throw new n.UnavailabilityError('Clipboard','setImageAsync');return s.default.setImageAsync(t)},_e.hasImageAsync=async function(){if(!s.default.hasImageAsync)throw new n.UnavailabilityError('Clipboard','hasImageAsync');return s.default.hasImageAsync()},_e.addClipboardListener=function(t){return s.default.addListener(e.clipboardEventName,t)},_e.removeClipboardListener=function(t){t.remove()},Object.defineProperty(_e,"isPasteButtonAvailable",{enumerable:!0,get:function(){return o}});var t,n=r(d[0]),e=r(d[1]),s=(t=e)&&t.__esModule?t:{default:t},l=r(d[2]);Object.keys(l).forEach(function(t){'default'===t||Object.prototype.hasOwnProperty.call(_e,t)||Object.defineProperty(_e,t,{enumerable:!0,get:function(){return l[t]}})});var c=r(d[3]);const o=!1},1541,[438,1542,1546,1547]);
2
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"default",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(_e,"clipboardEventName",{enumerable:!0,get:function(){return u}});var e,t=r(d[0]),n=(e=t)&&e.__esModule?e:{default:e};const u='onClipboardChanged'},1542,[1543]);
3
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return c}});var t=r(d[0]),n=r(d[1]),o=r(d[2]),c={async getStringAsync(c){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{if(c.preferredFormat===o.StringFormat.HTML){const t=await navigator.clipboard.read(),o=await(0,n.findHtmlInClipboardAsync)(t);return o?await new Response(o).text():await navigator.clipboard.readText()}{let t=await navigator.clipboard.readText();if(!t||''===t){const o=await navigator.clipboard.read(),c=await(0,n.findHtmlInClipboardAsync)(o),l=await(c?.text());t=(0,n.htmlToPlainText)(l??'')}return t}}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;try{return window.clipboardData.getData('Text')}catch{return Promise.reject(new Error('Unable to retrieve item from clipboard'))}}},async setStringAsync(c,l){if(l.inputFormat===o.StringFormat.HTML){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{const t=(p=c,new ClipboardItem({'text/html':new Blob([p],{type:'text/html'}),'text/plain':new Blob([(0,n.htmlToPlainText)(p)],{type:'text/plain'})}));return await navigator.clipboard.write([t]),!0}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;throw new t.CopyFailureException(o.message)}}try{if(!navigator.clipboard)throw new Error;return await navigator.clipboard.writeText(c),!0}catch{return s(c)}var p},hasStringAsync:async()=>await l(['text/plain','text/html']),async getImageAsync(o){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{const t=await navigator.clipboard.read(),o=await(0,n.findImageInClipboardAsync)(t);if(!o)return null;const[c,l]=await Promise.all([(0,n.blobToBase64Async)(o),(0,n.getImageSizeFromBlobAsync)(o)]);return{data:c,size:l}}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;throw new t.PasteFailureException(o.message)}},async setImageAsync(o){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{const t=(0,n.base64toBlob)(o,'image/png');await navigator.clipboard.write([new ClipboardItem({[t.type]:t})])}catch(n){throw new t.CopyFailureException(n.message)}},hasImageAsync:async()=>await l(['image/png','image/jpeg']),addClipboardListener(){},removeClipboardListener(){}};async function l(o){if(!navigator.clipboard)throw new t.ClipboardUnavailableException;try{return(await navigator.clipboard.read()).flatMap(t=>t.types).some(t=>o.includes(t))}catch(o){if('object'==typeof o&&'NotAllowedError'===o?.name||await(0,n.isClipboardPermissionDeniedAsync)())throw new t.NoPermissionException;throw o}}function s(t){const n=document.createElement('textarea');n.textContent=t,document.body.appendChild(n),n.select();try{return document.execCommand('copy'),!0}catch{return!1}finally{document.body.removeChild(n)}}},1543,[1544,1545,1546]);
4
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ClipboardUnavailableException",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"CopyFailureException",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PasteFailureException",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"NoPermissionException",{enumerable:!0,get:function(){return c}});var o=r(d[0]);class t extends o.CodedError{constructor(){super('ERR_CLIPBOARD_UNAVAILABLE',"The 'AsyncClipboard' API is not available on this browser")}}class n extends o.CodedError{constructor(o){super('ERR_COPY_FAILURE',`Failed to copy to clipboard: ${o}`)}}class s extends o.CodedError{constructor(o){super('ERR_COPY_FAILURE',`Failed to paste from clipboard: ${o}`)}}class c extends o.CodedError{constructor(){super('ERR_NO_PERMISSION','User denied permission to access clipboard')}}},1544,[438]);
5
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.base64toBlob=function(n,t){t=t||'';const o=1024,i=atob(n),s=i.length,c=Math.ceil(s/o),l=new Array(c);for(let n=0;n<c;++n){const t=n*o,c=Math.min(t+o,s),u=new Array(c-t);for(let n=t,o=0;n<c;++o,++n){const t=i[n];null!=t&&(u[o]=t.charCodeAt(0))}l[n]=new Uint8Array(u)}return new Blob(l,{type:t})},e.blobToBase64Async=function(n){return new Promise((t,o)=>{const i=new FileReader;i.onloadend=()=>t(i.result),i.readAsDataURL(n)})},e.htmlToPlainText=function(n){const t=document.createElement('div');return t.innerHTML=n,t.textContent||t.innerText||''},e.getImageSizeFromBlobAsync=function(n){return new Promise((t,o)=>{const i=URL.createObjectURL(n),s=document.createElement('img');s.src=i,s.onload=function(){t({width:s.width,height:s.height})}})},e.findImageInClipboardAsync=async function(n){for(const t of n){if(t.types.some(n=>'image/png'===n))return await t.getType('image/png');if(t.types.some(n=>'image/jpeg'===n))return await t.getType('image/jpeg')}return null},e.findHtmlInClipboardAsync=async function(n){for(const t of n)if(t.types.some(n=>'text/html'===n))return await t.getType('text/html');return null},e.isClipboardPermissionDeniedAsync=async function(){return'denied'===(await navigator.permissions.query({name:'clipboard-read'})).state}},1545,[]);
6
- __d(function(g,r,i,a,m,e,d){"use strict";var t,n;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ContentType",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"StringFormat",{enumerable:!0,get:function(){return n}}),(function(t){t.PLAIN_TEXT="plain-text",t.HTML="html",t.IMAGE="image",t.URL="url"})(t||(t={})),(function(t){t.PLAIN_TEXT="plainText",t.HTML="html"})(n||(n={}))},1546,[]);
7
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.ClipboardPasteButton=function({onPress:e,...n}){if(!u.default)return null;return(0,t.jsx)(u.default,{onPastePressed:({nativeEvent:t})=>{e(t)},...n})};var e,t=r(d[0]),n=r(d[1]),u=(e=n)&&e.__esModule?e:{default:e}},1547,[10,1548]);
8
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t}}),r(d[0]),r(d[1]);var t=void 0},1548,[438,109]);
@@ -1,3 +0,0 @@
1
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.notificationAsync=async function(e=o.NotificationFeedbackType.Success){if(!c.default?.notificationAsync)throw new t.UnavailabilityError('Haptics','notificationAsync');await c.default.notificationAsync(e)},_e.impactAsync=async function(e=o.ImpactFeedbackStyle.Medium){if(!c.default?.impactAsync)throw new t.UnavailabilityError('Haptic','impactAsync');await c.default.impactAsync(e)},_e.selectionAsync=async function(){if(!c.default?.selectionAsync)throw new t.UnavailabilityError('Haptic','selectionAsync');await c.default.selectionAsync()},_e.performAndroidHapticsAsync=async function(e){return},Object.defineProperty(_e,"NotificationFeedbackType",{enumerable:!0,get:function(){return o.NotificationFeedbackType}}),Object.defineProperty(_e,"ImpactFeedbackStyle",{enumerable:!0,get:function(){return o.ImpactFeedbackStyle}}),Object.defineProperty(_e,"AndroidHaptics",{enumerable:!0,get:function(){return o.AndroidHaptics}});var e,t=r(d[0]),n=r(d[1]),c=(e=n)&&e.__esModule?e:{default:e},o=r(d[2])},1538,[438,1539,1540]);
2
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return u}});var t=r(d[0]);const n={[t.NotificationFeedbackType.Success]:[40,100,40],[t.NotificationFeedbackType.Warning]:[50,100,50],[t.NotificationFeedbackType.Error]:[60,100,60,100,60],[t.ImpactFeedbackStyle.Light]:[40],[t.ImpactFeedbackStyle.Medium]:[50],[t.ImpactFeedbackStyle.Heavy]:[60],[t.ImpactFeedbackStyle.Soft]:[35],[t.ImpactFeedbackStyle.Rigid]:[45],selection:[50]};function i(){return'undefined'!=typeof window&&'navigator'in window&&'vibrate'in navigator}function c(){try{const t=document.createElement('label');t.ariaHidden='true',t.style.display='none';const n=document.createElement('input');n.type='checkbox',n.setAttribute('switch',''),t.appendChild(n),document.head.appendChild(t),t.click(),document.head.removeChild(t)}catch{}}const o='undefined'!=typeof window&&window.matchMedia('(pointer: coarse)').matches;function s(t){i()?navigator.vibrate(t):o&&c()}var u={async notificationAsync(s){if(i())return void navigator.vibrate(n[s]);if(!o)return;const u=s===t.NotificationFeedbackType.Error?3:2;for(let t=0;t<u;t++)t>0&&await new Promise(t=>setTimeout(t,120)),c()},async impactAsync(t){s(n[t])},async selectionAsync(){s(n.selection)}}},1539,[1540]);
3
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NotificationFeedbackType",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ImpactFeedbackStyle",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"AndroidHaptics",{enumerable:!0,get:function(){return o}});let t=(function(t){return t.Success="success",t.Warning="warning",t.Error="error",t})({}),n=(function(t){return t.Light="light",t.Medium="medium",t.Heavy="heavy",t.Soft="soft",t.Rigid="rigid",t})({}),o=(function(t){return t.Confirm="confirm",t.Reject="reject",t.Gesture_Start="gesture-start",t.Gesture_End="gesture-end",t.Toggle_On="toggle-on",t.Toggle_Off="toggle-off",t.Clock_Tick="clock-tick",t.Context_Click="context-click",t.Drag_Start="drag-start",t.Keyboard_Tap="keyboard-tap",t.Keyboard_Press="keyboard-press",t.Keyboard_Release="keyboard-release",t.Long_Press="long-press",t.Virtual_Key="virtual-key",t.Virtual_Key_Release="virtual-key-release",t.No_Haptics="no-haptics",t.Segment_Tick="segment-tick",t.Segment_Frequent_Tick="segment-frequent-tick",t.Text_Handle_Move="text-handle-move",t})({})},1540,[]);
@@ -1,2 +0,0 @@
1
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]),c=r(d[2]);function o(){const o=(0,t.c)(1);let u;return o[0]===Symbol.for("react.memo_cache_sentinel")?(u=(0,c.jsx)(n.AddServerScreen,{}),o[0]=u):u=o[0],u}},772,[787,1504,10]);
2
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.AddServerScreen=function(){const f=(0,n.c)(22),{t:p}=(0,l.useTranslation)(),b=(0,t.useLocalSearchParams)(),{servers:L}=(0,c.useServer)();let U,_,k,j,y,B,O;if(f[0]!==b.then||f[1]!==b.url||f[2]!==L||f[3]!==p){let n;f[8]!==b.url?(n=n=>n.serverUrl===b.url,f[8]=b.url,f[9]=n):n=f[9];const t=L.find(n),l=t?.serverUrl??(0,o.parseHubOrigin)(b.url);let c;f[10]!==b.then?(c=(0,s.deepLinkLanding)(b.then),f[10]=b.then,f[11]=c):c=f[11],_=c,U=u.LoginScreen,k=l??"https://",j=null!==l?p("v2.connect.addTitle",{name:(0,v.serverLabelForUrl)(L,l)}):p("v2.servers.add"),f[0]=b.then,f[1]=b.url,f[2]=L,f[3]=p,f[4]=U,f[5]=_,f[6]=k,f[7]=j}else U=f[4],_=f[5],k=f[6],j=f[7];f[12]!==p?(y=p("v2.connect.addBody"),f[12]=p,f[13]=y):y=f[13];f[14]!==_?(B=()=>t.router.replace(_),f[14]=_,f[15]=B):B=f[15];f[16]!==U||f[17]!==k||f[18]!==j||f[19]!==y||f[20]!==B?(O=(0,h.jsx)(U,{initialServerUrl:k,heading:j,subheading:y,onCancel:S,onSignedIn:B}),f[16]=U,f[17]=k,f[18]=j,f[19]=y,f[20]=B,f[21]=O):O=f[21];return O};var n=r(d[0]);r(d[1]);var t=r(d[2]),l=r(d[3]),u=r(d[4]),c=r(d[5]),s=r(d[6]),o=r(d[7]),v=r(d[8]),h=r(d[9]);function S(){t.router.canGoBack()?t.router.back():t.router.replace("/")}},1504,[787,16,788,817,1505,987,1117,1131,1066,10]);
@@ -1,2 +0,0 @@
1
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});var t=r(d[0]),n=r(d[1]),c=r(d[2]);function o(){const o=(0,t.c)(1);let u;return o[0]===Symbol.for("react.memo_cache_sentinel")?(u=(0,c.jsx)(n.ConnectScreen,{}),o[0]=u):u=o[0],u}},773,[787,1506,10]);
2
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ConnectScreen=function(){const e=(0,n.c)(52),{t:o}=(0,f.useTranslation)(),{colors:l}=(0,S.useTheme)(),c=(0,u.useLocalSearchParams)(),{loading:x,servers:p,server:_,token:w,switchServer:A}=(0,b.useServer)();if(x){let n,o,c;return e[0]!==l.background?(n={flex:1,backgroundColor:l.background,alignItems:"center",justifyContent:"center"},e[0]=l.background,e[1]=n):n=e[1],e[2]!==l.primary?(o=(0,k.jsx)(t.default,{color:l.primary}),e[2]=l.primary,e[3]=o):o=e[3],e[4]!==n||e[5]!==o?(c=(0,k.jsx)(s.default,{style:n,children:o}),e[4]=n,e[5]=o,e[6]=c):c=e[6],c}let R,G,N,B,F,T,z,O,W;if(e[7]!==l||e[8]!==c||e[9]!==_||e[10]!==p||e[11]!==A||e[12]!==o||e[13]!==w){T=Symbol.for("react.early_return_sentinel");e:{const n=(0,y.hubParamOf)(c);G=null!==_&&null!==w;const t=(0,y.decideHubLink)({hub:n,servers:p,activeServerId:G?_.id:null});if("active"===t.kind){let n;e[20]===Symbol.for("react.memo_cache_sentinel")?(n=(0,k.jsx)(u.Redirect,{href:"/cameras"}),e[20]=n):n=e[20],T=n;break e}if("invalid"===t.kind){let n,t,c,s;e[21]!==o?(n=o("v2.connect.invalidTitle"),e[21]=o,e[22]=n):n=e[22],e[23]!==o?(t=o("v2.connect.invalidBody"),e[23]=o,e[24]=t):t=e[24],e[25]!==o?(c=o("v2.connect.continue"),e[25]=o,e[26]=c):c=e[26],e[27]!==l||e[28]!==n||e[29]!==t||e[30]!==c?(s=(0,k.jsx)(U,{colors:l,title:n,body:t,primaryLabel:c,onPrimary:L}),e[27]=l,e[28]=n,e[29]=t,e[30]=c,e[31]=s):s=e[31],T=s;break e}if("switch"===t.kind){const n=(0,h.serverLabelForUrl)(p,t.serverUrl);let c;e[32]!==_||e[33]!==G||e[34]!==o?(c=G?o("v2.connect.switchBody",{current:(0,h.serverLabelOf)(_)}):o("v2.connect.switchBodyNoCurrent"),e[32]=_,e[33]=G,e[34]=o,e[35]=c):c=e[35];const s=c,u=o("v2.connect.switchTitle",{name:n});let f,b;e[36]!==o?(f=o("v2.connect.switch"),e[36]=o,e[37]=f):f=e[37],e[38]!==o?(b=o("v2.connect.stay"),e[38]=o,e[39]=b):b=e[39],T=(0,k.jsx)(U,{colors:l,title:u,body:s,primaryLabel:f,onPrimary:()=>{A(t.serverId).then(P)},secondaryLabel:b,onSecondary:I});break e}const s=p.some(e=>(0,v.sameHubOrigin)(e.serverUrl,t.serverUrl)),f=(0,h.serverLabelForUrl)(p,t.serverUrl);R=j.LoginScreen,N=t.serverUrl,B=t.serverUrl,F=s?{}:{heading:o("v2.connect.addTitle",{name:f})}}e[7]=l,e[8]=c,e[9]=_,e[10]=p,e[11]=A,e[12]=o,e[13]=w,e[14]=R,e[15]=G,e[16]=N,e[17]=B,e[18]=F,e[19]=T}else R=e[14],G=e[15],N=e[16],B=e[17],F=e[18],T=e[19];if(T!==Symbol.for("react.early_return_sentinel"))return T;e[40]!==G||e[41]!==o?(z=G?{subheading:o("v2.connect.addBody")}:{},e[40]=G,e[41]=o,e[42]=z):z=e[42];e[43]!==G?(O=G?{onCancel:C}:{},e[43]=G,e[44]=O):O=e[44];e[45]!==R||e[46]!==N||e[47]!==B||e[48]!==F||e[49]!==z||e[50]!==O?(W=(0,k.jsx)(R,{initialServerUrl:B,...F,...z,...O},N),e[45]=R,e[46]=N,e[47]=B,e[48]=F,e[49]=z,e[50]=O,e[51]=W):W=e[51];return W};var n=r(d[0]);r(d[1]);var t=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),c=e(r(d[5])),s=e(r(d[6])),u=r(d[7]),f=r(d[8]),b=r(d[9]),y=r(d[10]),v=r(d[11]),h=r(d[12]),S=r(d[13]),x=r(d[14]),p=r(d[15]),j=r(d[16]),k=r(d[17]);const _='/';function C(){return u.router.replace(_)}function I(){return u.router.replace(_)}function P(e){"switched"!==e.status&&"already-active"!==e.status||u.router.replace("/cameras")}function L(){return u.router.replace(_)}function U(e){const t=(0,n.c)(42),{colors:u,title:f,body:b,primaryLabel:y,onPrimary:v,secondaryLabel:h,onSecondary:S}=e;let j,_,C,I,P,L,U,w,A,R,G,N,B,F,T,z;return t[0]!==u.background?(j={flex:1,backgroundColor:u.background},t[0]=u.background,t[1]=j):j=t[1],t[2]===Symbol.for("react.memo_cache_sentinel")?(_={flexGrow:1,justifyContent:"center",alignItems:"center",padding:x.SPACING["2xl"]},t[2]=_):_=t[2],t[3]===Symbol.for("react.memo_cache_sentinel")?(C={width:"100%",maxWidth:420,gap:x.SPACING["2xl"]},t[3]=C):C=t[3],t[4]===Symbol.for("react.memo_cache_sentinel")?(I=(0,k.jsx)(s.default,{style:{alignItems:"center"},children:(0,k.jsx)(p.BrandLogo,{width:220})}),t[4]=I):I=t[4],t[5]!==u.border||t[6]!==u.surface?(P={backgroundColor:u.surface,borderColor:u.border,borderWidth:1,borderRadius:x.RADIUS.lg,padding:x.SPACING["2xl"],gap:x.SPACING.xl},t[5]=u.border,t[6]=u.surface,t[7]=P):P=t[7],t[8]!==u.foreground?(L={color:u.foreground,fontSize:17,fontWeight:"700"},t[8]=u.foreground,t[9]=L):L=t[9],t[10]!==L||t[11]!==f?(U=(0,k.jsx)(c.default,{style:L,children:f}),t[10]=L,t[11]=f,t[12]=U):U=t[12],t[13]!==u.foregroundSubtle?(w={color:u.foregroundSubtle,fontSize:14},t[13]=u.foregroundSubtle,t[14]=w):w=t[14],t[15]!==b||t[16]!==w?(A=(0,k.jsx)(c.default,{style:w,children:b}),t[15]=b,t[16]=w,t[17]=A):A=t[17],t[18]!==u.primary?(R={backgroundColor:u.primary,borderRadius:x.RADIUS.md,paddingVertical:x.SPACING.lg,alignItems:"center"},t[18]=u.primary,t[19]=R):R=t[19],t[20]!==u.primaryForeground?(G={color:u.primaryForeground,fontSize:16,fontWeight:"600"},t[20]=u.primaryForeground,t[21]=G):G=t[21],t[22]!==y||t[23]!==G?(N=(0,k.jsx)(c.default,{style:G,children:y}),t[22]=y,t[23]=G,t[24]=N):N=t[24],t[25]!==v||t[26]!==R||t[27]!==N?(B=(0,k.jsx)(o.default,{accessibilityRole:"button",onPress:v,style:R,children:N}),t[25]=v,t[26]=R,t[27]=N,t[28]=B):B=t[28],t[29]!==u.foregroundSubtle||t[30]!==S||t[31]!==h?(F=void 0!==h&&void 0!==S&&(0,k.jsx)(o.default,{accessibilityRole:"button",onPress:S,style:{alignItems:"center"},children:(0,k.jsx)(c.default,{style:{color:u.foregroundSubtle,fontSize:14},children:h})}),t[29]=u.foregroundSubtle,t[30]=S,t[31]=h,t[32]=F):F=t[32],t[33]!==B||t[34]!==F||t[35]!==P||t[36]!==U||t[37]!==A?(T=(0,k.jsxs)(s.default,{style:C,children:[I,(0,k.jsxs)(s.default,{style:P,children:[U,A,B,F]})]}),t[33]=B,t[34]=F,t[35]=P,t[36]=U,t[37]=A,t[38]=T):T=t[38],t[39]!==j||t[40]!==T?(z=(0,k.jsx)(l.default,{style:j,contentContainerStyle:_,children:T}),t[39]=j,t[40]=T,t[41]=z):z=t[41],z}},1506,[787,16,232,247,138,193,114,788,817,987,1128,1131,1066,789,835,1507,1505,10]);