@grafana/scenes 4.29.0 → 4.30.0--canary.781.9444216593.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -41,19 +41,19 @@ var uFuzzy__default = /*#__PURE__*/_interopDefaultLegacy(uFuzzy);
41
41
  var ReactGridLayout__default = /*#__PURE__*/_interopDefaultLegacy(ReactGridLayout);
42
42
  var AutoSizer__default = /*#__PURE__*/_interopDefaultLegacy(AutoSizer);
43
43
 
44
- var __defProp$K = Object.defineProperty;
45
- var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
46
- var __hasOwnProp$K = Object.prototype.hasOwnProperty;
47
- var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
48
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
49
- var __spreadValues$K = (a, b) => {
44
+ var __defProp$L = Object.defineProperty;
45
+ var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
46
+ var __hasOwnProp$L = Object.prototype.hasOwnProperty;
47
+ var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
48
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
49
+ var __spreadValues$L = (a, b) => {
50
50
  for (var prop in b || (b = {}))
51
- if (__hasOwnProp$K.call(b, prop))
52
- __defNormalProp$K(a, prop, b[prop]);
53
- if (__getOwnPropSymbols$K)
54
- for (var prop of __getOwnPropSymbols$K(b)) {
55
- if (__propIsEnum$K.call(b, prop))
56
- __defNormalProp$K(a, prop, b[prop]);
51
+ if (__hasOwnProp$L.call(b, prop))
52
+ __defNormalProp$L(a, prop, b[prop]);
53
+ if (__getOwnPropSymbols$L)
54
+ for (var prop of __getOwnPropSymbols$L(b)) {
55
+ if (__propIsEnum$L.call(b, prop))
56
+ __defNormalProp$L(a, prop, b[prop]);
57
57
  }
58
58
  return a;
59
59
  };
@@ -62,7 +62,7 @@ function useAppQueryParams() {
62
62
  return runtime.locationSearchToObject(location.search || "");
63
63
  }
64
64
  function getUrlWithAppState(path, preserveParams) {
65
- const paramsCopy = __spreadValues$K({}, runtime.locationService.getSearchObject());
65
+ const paramsCopy = __spreadValues$L({}, runtime.locationService.getSearchObject());
66
66
  if (preserveParams) {
67
67
  for (const key of Object.keys(paramsCopy)) {
68
68
  if (!preserveParams.includes(key)) {
@@ -76,21 +76,21 @@ function renderSceneComponentWithRouteProps(sceneObject, routeProps) {
76
76
  return React__default["default"].createElement(sceneObject.Component, { model: sceneObject, routeProps });
77
77
  }
78
78
 
79
- var __defProp$J = Object.defineProperty;
79
+ var __defProp$K = Object.defineProperty;
80
80
  var __defProps$t = Object.defineProperties;
81
81
  var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
82
- var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
83
- var __hasOwnProp$J = Object.prototype.hasOwnProperty;
84
- var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
85
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
- var __spreadValues$J = (a, b) => {
82
+ var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
83
+ var __hasOwnProp$K = Object.prototype.hasOwnProperty;
84
+ var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
85
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
86
+ var __spreadValues$K = (a, b) => {
87
87
  for (var prop in b || (b = {}))
88
- if (__hasOwnProp$J.call(b, prop))
89
- __defNormalProp$J(a, prop, b[prop]);
90
- if (__getOwnPropSymbols$J)
91
- for (var prop of __getOwnPropSymbols$J(b)) {
92
- if (__propIsEnum$J.call(b, prop))
93
- __defNormalProp$J(a, prop, b[prop]);
88
+ if (__hasOwnProp$K.call(b, prop))
89
+ __defNormalProp$K(a, prop, b[prop]);
90
+ if (__getOwnPropSymbols$K)
91
+ for (var prop of __getOwnPropSymbols$K(b)) {
92
+ if (__propIsEnum$K.call(b, prop))
93
+ __defNormalProp$K(a, prop, b[prop]);
94
94
  }
95
95
  return a;
96
96
  };
@@ -100,7 +100,7 @@ function registerRuntimePanelPlugin({ pluginId, plugin }) {
100
100
  if (runtimePanelPlugins.has(pluginId)) {
101
101
  throw new Error(`A runtime panel plugin with id ${pluginId} has already been registered`);
102
102
  }
103
- plugin.meta = __spreadProps$t(__spreadValues$J({}, plugin.meta), {
103
+ plugin.meta = __spreadProps$t(__spreadValues$K({}, plugin.meta), {
104
104
  id: pluginId,
105
105
  name: pluginId,
106
106
  module: "runtime plugin",
@@ -128,21 +128,21 @@ function loadPanelPluginSync(pluginId) {
128
128
  return (_a = getPanelPluginFromCache(pluginId)) != null ? _a : runtimePanelPlugins.get(pluginId);
129
129
  }
130
130
 
131
- var __defProp$I = Object.defineProperty;
131
+ var __defProp$J = Object.defineProperty;
132
132
  var __defProps$s = Object.defineProperties;
133
133
  var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
134
- var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
135
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
136
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
137
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
138
- var __spreadValues$I = (a, b) => {
134
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
135
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
136
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
137
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
138
+ var __spreadValues$J = (a, b) => {
139
139
  for (var prop in b || (b = {}))
140
- if (__hasOwnProp$I.call(b, prop))
141
- __defNormalProp$I(a, prop, b[prop]);
142
- if (__getOwnPropSymbols$I)
143
- for (var prop of __getOwnPropSymbols$I(b)) {
144
- if (__propIsEnum$I.call(b, prop))
145
- __defNormalProp$I(a, prop, b[prop]);
140
+ if (__hasOwnProp$J.call(b, prop))
141
+ __defNormalProp$J(a, prop, b[prop]);
142
+ if (__getOwnPropSymbols$J)
143
+ for (var prop of __getOwnPropSymbols$J(b)) {
144
+ if (__propIsEnum$J.call(b, prop))
145
+ __defNormalProp$J(a, prop, b[prop]);
146
146
  }
147
147
  return a;
148
148
  };
@@ -150,11 +150,11 @@ var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
150
150
  var __objRest$4 = (source, exclude) => {
151
151
  var target = {};
152
152
  for (var prop in source)
153
- if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
153
+ if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0)
154
154
  target[prop] = source[prop];
155
- if (source != null && __getOwnPropSymbols$I)
156
- for (var prop of __getOwnPropSymbols$I(source)) {
157
- if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
155
+ if (source != null && __getOwnPropSymbols$J)
156
+ for (var prop of __getOwnPropSymbols$J(source)) {
157
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
158
158
  target[prop] = source[prop];
159
159
  }
160
160
  return target;
@@ -172,7 +172,7 @@ function SceneComponentWrapperWithoutMemo(_a) {
172
172
  if (!model.isActive) {
173
173
  return null;
174
174
  }
175
- return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$s(__spreadValues$I({}, otherProps), {
175
+ return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$s(__spreadValues$J({}, otherProps), {
176
176
  model
177
177
  }));
178
178
  }
@@ -218,19 +218,19 @@ class SceneObjectRef {
218
218
  }
219
219
  _ref = new WeakMap();
220
220
 
221
- var __defProp$H = Object.defineProperty;
222
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
223
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
224
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
225
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
226
- var __spreadValues$H = (a, b) => {
221
+ var __defProp$I = Object.defineProperty;
222
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
223
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
224
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
225
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
226
+ var __spreadValues$I = (a, b) => {
227
227
  for (var prop in b || (b = {}))
228
- if (__hasOwnProp$H.call(b, prop))
229
- __defNormalProp$H(a, prop, b[prop]);
230
- if (__getOwnPropSymbols$H)
231
- for (var prop of __getOwnPropSymbols$H(b)) {
232
- if (__propIsEnum$H.call(b, prop))
233
- __defNormalProp$H(a, prop, b[prop]);
228
+ if (__hasOwnProp$I.call(b, prop))
229
+ __defNormalProp$I(a, prop, b[prop]);
230
+ if (__getOwnPropSymbols$I)
231
+ for (var prop of __getOwnPropSymbols$I(b)) {
232
+ if (__propIsEnum$I.call(b, prop))
233
+ __defNormalProp$I(a, prop, b[prop]);
234
234
  }
235
235
  return a;
236
236
  };
@@ -290,7 +290,7 @@ class SceneObjectBase {
290
290
  }
291
291
  setState(update) {
292
292
  const prevState = this._state;
293
- const newState = __spreadValues$H(__spreadValues$H({}, this._state), update);
293
+ const newState = __spreadValues$I(__spreadValues$I({}, this._state), update);
294
294
  this._state = Object.freeze(newState);
295
295
  this._setParent(update);
296
296
  this._handleActivationOfChangedStateProps(prevState, newState);
@@ -486,19 +486,19 @@ function forEachChild(state, callback) {
486
486
  }
487
487
  }
488
488
 
489
- var __defProp$G = Object.defineProperty;
490
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
491
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
492
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
493
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
494
- var __spreadValues$G = (a, b) => {
489
+ var __defProp$H = Object.defineProperty;
490
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
491
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
492
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
493
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
494
+ var __spreadValues$H = (a, b) => {
495
495
  for (var prop in b || (b = {}))
496
- if (__hasOwnProp$G.call(b, prop))
497
- __defNormalProp$G(a, prop, b[prop]);
498
- if (__getOwnPropSymbols$G)
499
- for (var prop of __getOwnPropSymbols$G(b)) {
500
- if (__propIsEnum$G.call(b, prop))
501
- __defNormalProp$G(a, prop, b[prop]);
496
+ if (__hasOwnProp$H.call(b, prop))
497
+ __defNormalProp$H(a, prop, b[prop]);
498
+ if (__getOwnPropSymbols$H)
499
+ for (var prop of __getOwnPropSymbols$H(b)) {
500
+ if (__propIsEnum$H.call(b, prop))
501
+ __defNormalProp$H(a, prop, b[prop]);
502
502
  }
503
503
  return a;
504
504
  };
@@ -507,7 +507,7 @@ function cloneSceneObject(sceneObject, withState) {
507
507
  return new sceneObject.constructor(clonedState);
508
508
  }
509
509
  function cloneSceneObjectState(sceneState, withState) {
510
- const clonedState = __spreadValues$G({}, sceneState);
510
+ const clonedState = __spreadValues$H({}, sceneState);
511
511
  for (const key in clonedState) {
512
512
  const propValue = clonedState[key];
513
513
  if (propValue instanceof SceneObjectBase) {
@@ -685,25 +685,25 @@ function isUrlValueEqual(currentUrlValue, newUrlValue) {
685
685
  return lodash.isEqual(currentUrlValue, newUrlValue);
686
686
  }
687
687
 
688
- var __defProp$F = Object.defineProperty;
689
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
690
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
691
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
692
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
693
- var __spreadValues$F = (a, b) => {
688
+ var __defProp$G = Object.defineProperty;
689
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
690
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
691
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
692
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
693
+ var __spreadValues$G = (a, b) => {
694
694
  for (var prop in b || (b = {}))
695
- if (__hasOwnProp$F.call(b, prop))
696
- __defNormalProp$F(a, prop, b[prop]);
697
- if (__getOwnPropSymbols$F)
698
- for (var prop of __getOwnPropSymbols$F(b)) {
699
- if (__propIsEnum$F.call(b, prop))
700
- __defNormalProp$F(a, prop, b[prop]);
695
+ if (__hasOwnProp$G.call(b, prop))
696
+ __defNormalProp$G(a, prop, b[prop]);
697
+ if (__getOwnPropSymbols$G)
698
+ for (var prop of __getOwnPropSymbols$G(b)) {
699
+ if (__propIsEnum$G.call(b, prop))
700
+ __defNormalProp$G(a, prop, b[prop]);
701
701
  }
702
702
  return a;
703
703
  };
704
704
  class SceneDataNode extends SceneObjectBase {
705
705
  constructor(state) {
706
- super(__spreadValues$F({
706
+ super(__spreadValues$G({
707
707
  data: emptyPanelData
708
708
  }, state));
709
709
  }
@@ -784,19 +784,19 @@ function evaluateTimeRange(from, to, timeZone, fiscalYearStartMonth, delay) {
784
784
  };
785
785
  }
786
786
 
787
- var __defProp$E = Object.defineProperty;
788
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
789
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
790
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
791
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
792
- var __spreadValues$E = (a, b) => {
787
+ var __defProp$F = Object.defineProperty;
788
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
789
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
790
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
791
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
792
+ var __spreadValues$F = (a, b) => {
793
793
  for (var prop in b || (b = {}))
794
- if (__hasOwnProp$E.call(b, prop))
795
- __defNormalProp$E(a, prop, b[prop]);
796
- if (__getOwnPropSymbols$E)
797
- for (var prop of __getOwnPropSymbols$E(b)) {
798
- if (__propIsEnum$E.call(b, prop))
799
- __defNormalProp$E(a, prop, b[prop]);
794
+ if (__hasOwnProp$F.call(b, prop))
795
+ __defNormalProp$F(a, prop, b[prop]);
796
+ if (__getOwnPropSymbols$F)
797
+ for (var prop of __getOwnPropSymbols$F(b)) {
798
+ if (__propIsEnum$F.call(b, prop))
799
+ __defNormalProp$F(a, prop, b[prop]);
800
800
  }
801
801
  return a;
802
802
  };
@@ -813,7 +813,7 @@ class SceneTimeRange extends SceneObjectBase {
813
813
  state.fiscalYearStartMonth,
814
814
  state.UNSAFE_nowDelay
815
815
  );
816
- super(__spreadValues$E({ from, to, timeZone, value }, state));
816
+ super(__spreadValues$F({ from, to, timeZone, value }, state));
817
817
  this._urlSync = new SceneObjectUrlSyncConfig(this, { keys: ["from", "to", "timezone"] });
818
818
  this.onTimeRangeChange = (timeRange) => {
819
819
  const update = {};
@@ -1751,21 +1751,21 @@ function collectAllVariables(sceneObject, record = {}) {
1751
1751
  return record;
1752
1752
  }
1753
1753
 
1754
- var __defProp$D = Object.defineProperty;
1754
+ var __defProp$E = Object.defineProperty;
1755
1755
  var __defProps$r = Object.defineProperties;
1756
1756
  var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
1757
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
1758
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
1759
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
1760
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1761
- var __spreadValues$D = (a, b) => {
1757
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
1758
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
1759
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
1760
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1761
+ var __spreadValues$E = (a, b) => {
1762
1762
  for (var prop in b || (b = {}))
1763
- if (__hasOwnProp$D.call(b, prop))
1764
- __defNormalProp$D(a, prop, b[prop]);
1765
- if (__getOwnPropSymbols$D)
1766
- for (var prop of __getOwnPropSymbols$D(b)) {
1767
- if (__propIsEnum$D.call(b, prop))
1768
- __defNormalProp$D(a, prop, b[prop]);
1763
+ if (__hasOwnProp$E.call(b, prop))
1764
+ __defNormalProp$E(a, prop, b[prop]);
1765
+ if (__getOwnPropSymbols$E)
1766
+ for (var prop of __getOwnPropSymbols$E(b)) {
1767
+ if (__propIsEnum$E.call(b, prop))
1768
+ __defNormalProp$E(a, prop, b[prop]);
1769
1769
  }
1770
1770
  return a;
1771
1771
  };
@@ -1785,7 +1785,7 @@ function getTemplateProxyForField(field, frame, frames) {
1785
1785
  if (!field.labels) {
1786
1786
  return "";
1787
1787
  }
1788
- return __spreadProps$r(__spreadValues$D({}, field.labels), {
1788
+ return __spreadProps$r(__spreadValues$E({}, field.labels), {
1789
1789
  __values: Object.values(field.labels).sort().join(", "),
1790
1790
  toString: () => {
1791
1791
  return data.formatLabels(field.labels, "", true);
@@ -2266,21 +2266,21 @@ function isExtraQueryProvider(obj) {
2266
2266
  return typeof obj === "object" && "getExtraQueries" in obj;
2267
2267
  }
2268
2268
 
2269
- var __defProp$C = Object.defineProperty;
2269
+ var __defProp$D = Object.defineProperty;
2270
2270
  var __defProps$q = Object.defineProperties;
2271
2271
  var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
2272
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
2273
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
2274
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
2275
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2276
- var __spreadValues$C = (a, b) => {
2272
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
2273
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
2274
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
2275
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2276
+ var __spreadValues$D = (a, b) => {
2277
2277
  for (var prop in b || (b = {}))
2278
- if (__hasOwnProp$C.call(b, prop))
2279
- __defNormalProp$C(a, prop, b[prop]);
2280
- if (__getOwnPropSymbols$C)
2281
- for (var prop of __getOwnPropSymbols$C(b)) {
2282
- if (__propIsEnum$C.call(b, prop))
2283
- __defNormalProp$C(a, prop, b[prop]);
2278
+ if (__hasOwnProp$D.call(b, prop))
2279
+ __defNormalProp$D(a, prop, b[prop]);
2280
+ if (__getOwnPropSymbols$D)
2281
+ for (var prop of __getOwnPropSymbols$D(b)) {
2282
+ if (__propIsEnum$D.call(b, prop))
2283
+ __defNormalProp$D(a, prop, b[prop]);
2284
2284
  }
2285
2285
  return a;
2286
2286
  };
@@ -2297,7 +2297,7 @@ const extraQueryProcessingOperator = (processors) => (data) => {
2297
2297
  }),
2298
2298
  rxjs.map(([primary, ...processedSecondaries]) => {
2299
2299
  var _a;
2300
- return __spreadProps$q(__spreadValues$C({}, primary), {
2300
+ return __spreadProps$q(__spreadValues$D({}, primary), {
2301
2301
  series: [...primary.series, ...processedSecondaries.flatMap((s) => s.series)],
2302
2302
  annotations: [...(_a = primary.annotations) != null ? _a : [], ...processedSecondaries.flatMap((s) => {
2303
2303
  var _a2;
@@ -2308,21 +2308,21 @@ const extraQueryProcessingOperator = (processors) => (data) => {
2308
2308
  );
2309
2309
  };
2310
2310
 
2311
- var __defProp$B = Object.defineProperty;
2311
+ var __defProp$C = Object.defineProperty;
2312
2312
  var __defProps$p = Object.defineProperties;
2313
2313
  var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
2314
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
2315
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
2316
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
2317
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2318
- var __spreadValues$B = (a, b) => {
2314
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
2315
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
2316
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
2317
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2318
+ var __spreadValues$C = (a, b) => {
2319
2319
  for (var prop in b || (b = {}))
2320
- if (__hasOwnProp$B.call(b, prop))
2321
- __defNormalProp$B(a, prop, b[prop]);
2322
- if (__getOwnPropSymbols$B)
2323
- for (var prop of __getOwnPropSymbols$B(b)) {
2324
- if (__propIsEnum$B.call(b, prop))
2325
- __defNormalProp$B(a, prop, b[prop]);
2320
+ if (__hasOwnProp$C.call(b, prop))
2321
+ __defNormalProp$C(a, prop, b[prop]);
2322
+ if (__getOwnPropSymbols$C)
2323
+ for (var prop of __getOwnPropSymbols$C(b)) {
2324
+ if (__propIsEnum$C.call(b, prop))
2325
+ __defNormalProp$C(a, prop, b[prop]);
2326
2326
  }
2327
2327
  return a;
2328
2328
  };
@@ -2377,11 +2377,11 @@ function filterAnnotations(data, filters) {
2377
2377
  continue;
2378
2378
  }
2379
2379
  }
2380
- fields.push(__spreadProps$p(__spreadValues$B({}, field), {
2380
+ fields.push(__spreadProps$p(__spreadValues$C({}, field), {
2381
2381
  values: buffer
2382
2382
  }));
2383
2383
  }
2384
- processed.push(__spreadProps$p(__spreadValues$B({}, frame), {
2384
+ processed.push(__spreadProps$p(__spreadValues$C({}, frame), {
2385
2385
  fields,
2386
2386
  length: frameLength
2387
2387
  }));
@@ -2807,21 +2807,21 @@ function getOptionSearcher(options, includeAll) {
2807
2807
  };
2808
2808
  }
2809
2809
 
2810
- var __defProp$A = Object.defineProperty;
2810
+ var __defProp$B = Object.defineProperty;
2811
2811
  var __defProps$o = Object.defineProperties;
2812
2812
  var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
2813
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
2814
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
2815
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
2816
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2817
- var __spreadValues$A = (a, b) => {
2813
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
2814
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
2815
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
2816
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2817
+ var __spreadValues$B = (a, b) => {
2818
2818
  for (var prop in b || (b = {}))
2819
- if (__hasOwnProp$A.call(b, prop))
2820
- __defNormalProp$A(a, prop, b[prop]);
2821
- if (__getOwnPropSymbols$A)
2822
- for (var prop of __getOwnPropSymbols$A(b)) {
2823
- if (__propIsEnum$A.call(b, prop))
2824
- __defNormalProp$A(a, prop, b[prop]);
2819
+ if (__hasOwnProp$B.call(b, prop))
2820
+ __defNormalProp$B(a, prop, b[prop]);
2821
+ if (__getOwnPropSymbols$B)
2822
+ for (var prop of __getOwnPropSymbols$B(b)) {
2823
+ if (__propIsEnum$B.call(b, prop))
2824
+ __defNormalProp$B(a, prop, b[prop]);
2825
2825
  }
2826
2826
  return a;
2827
2827
  };
@@ -2829,11 +2829,11 @@ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
2829
2829
  var __objRest$3 = (source, exclude) => {
2830
2830
  var target = {};
2831
2831
  for (var prop in source)
2832
- if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
2832
+ if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
2833
2833
  target[prop] = source[prop];
2834
- if (source != null && __getOwnPropSymbols$A)
2835
- for (var prop of __getOwnPropSymbols$A(source)) {
2836
- if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
2834
+ if (source != null && __getOwnPropSymbols$B)
2835
+ for (var prop of __getOwnPropSymbols$B(source)) {
2836
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
2837
2837
  target[prop] = source[prop];
2838
2838
  }
2839
2839
  return target;
@@ -2846,14 +2846,11 @@ function toSelectableValue$1(value, label) {
2846
2846
  };
2847
2847
  }
2848
2848
  function VariableValueSelect({ model }) {
2849
- const { value, text, key, options, includeAll } = model.useState();
2849
+ const { value, text, key, options, includeAll, isReadOnly } = model.useState();
2850
2850
  const [inputValue, setInputValue] = React.useState("");
2851
2851
  const [hasCustomValue, setHasCustomValue] = React.useState(false);
2852
2852
  const selectValue = toSelectableValue$1(value, String(text));
2853
- const optionSearcher = React.useMemo(
2854
- () => getOptionSearcher(options, includeAll),
2855
- [options, includeAll]
2856
- );
2853
+ const optionSearcher = React.useMemo(() => getOptionSearcher(options, includeAll), [options, includeAll]);
2857
2854
  const onInputChange = (value2, { action }) => {
2858
2855
  if (action === "input-change") {
2859
2856
  setInputValue(value2);
@@ -2878,6 +2875,7 @@ function VariableValueSelect({ model }) {
2878
2875
  isValidNewOption: (inputValue2) => inputValue2.trim().length > 0,
2879
2876
  placeholder: "Select value",
2880
2877
  width: "auto",
2878
+ disabled: isReadOnly,
2881
2879
  value: selectValue,
2882
2880
  inputValue,
2883
2881
  allowCustomValue: true,
@@ -2898,14 +2896,11 @@ function VariableValueSelect({ model }) {
2898
2896
  });
2899
2897
  }
2900
2898
  function VariableValueSelectMulti({ model }) {
2901
- const { value, options, key, maxVisibleValues, noValueOnClear, includeAll } = model.useState();
2899
+ const { value, options, key, maxVisibleValues, noValueOnClear, includeAll, isReadOnly } = model.useState();
2902
2900
  const arrayValue = React.useMemo(() => lodash.isArray(value) ? value : [value], [value]);
2903
2901
  const [uncommittedValue, setUncommittedValue] = React.useState(arrayValue);
2904
2902
  const [inputValue, setInputValue] = React.useState("");
2905
- const optionSearcher = React.useMemo(
2906
- () => getOptionSearcher(options, includeAll),
2907
- [options, includeAll]
2908
- );
2903
+ const optionSearcher = React.useMemo(() => getOptionSearcher(options, includeAll), [options, includeAll]);
2909
2904
  React.useEffect(() => {
2910
2905
  setUncommittedValue(arrayValue);
2911
2906
  }, [arrayValue]);
@@ -2930,6 +2925,7 @@ function VariableValueSelectMulti({ model }) {
2930
2925
  placeholder,
2931
2926
  width: "auto",
2932
2927
  inputValue,
2928
+ disabled: isReadOnly,
2933
2929
  value: uncommittedValue,
2934
2930
  noMultiValueWrap: true,
2935
2931
  maxVisibleValues: maxVisibleValues != null ? maxVisibleValues : 5,
@@ -2969,7 +2965,7 @@ const OptionWithCheckbox = ({
2969
2965
  const theme = ui.useTheme2();
2970
2966
  const selectStyles = ui.getSelectStyles(theme);
2971
2967
  const optionStyles = ui.useStyles2(getOptionStyles);
2972
- return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$o(__spreadValues$A({
2968
+ return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$o(__spreadValues$B({
2973
2969
  ref: innerRef,
2974
2970
  className: css.cx(selectStyles.option, isFocused && selectStyles.optionFocused)
2975
2971
  }, rest), {
@@ -3071,28 +3067,28 @@ function getEnrichedFiltersRequest(sourceRunner) {
3071
3067
  return null;
3072
3068
  }
3073
3069
 
3074
- var __defProp$z = Object.defineProperty;
3070
+ var __defProp$A = Object.defineProperty;
3075
3071
  var __defProps$n = Object.defineProperties;
3076
3072
  var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
3077
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
3078
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
3079
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
3080
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3081
- var __spreadValues$z = (a, b) => {
3073
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
3074
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
3075
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
3076
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3077
+ var __spreadValues$A = (a, b) => {
3082
3078
  for (var prop in b || (b = {}))
3083
- if (__hasOwnProp$z.call(b, prop))
3084
- __defNormalProp$z(a, prop, b[prop]);
3085
- if (__getOwnPropSymbols$z)
3086
- for (var prop of __getOwnPropSymbols$z(b)) {
3087
- if (__propIsEnum$z.call(b, prop))
3088
- __defNormalProp$z(a, prop, b[prop]);
3079
+ if (__hasOwnProp$A.call(b, prop))
3080
+ __defNormalProp$A(a, prop, b[prop]);
3081
+ if (__getOwnPropSymbols$A)
3082
+ for (var prop of __getOwnPropSymbols$A(b)) {
3083
+ if (__propIsEnum$A.call(b, prop))
3084
+ __defNormalProp$A(a, prop, b[prop]);
3089
3085
  }
3090
3086
  return a;
3091
3087
  };
3092
3088
  var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
3093
3089
  class GroupByVariable extends MultiValueVariable {
3094
3090
  constructor(initialState) {
3095
- super(__spreadProps$n(__spreadValues$z({
3091
+ super(__spreadProps$n(__spreadValues$A({
3096
3092
  isMulti: true,
3097
3093
  name: "",
3098
3094
  value: [],
@@ -3123,7 +3119,7 @@ class GroupByVariable extends MultiValueVariable {
3123
3119
  const queries = getQueriesForVariables(this);
3124
3120
  const otherFilters = this.state.baseFilters || [];
3125
3121
  const timeRange = sceneGraph.getTimeRange(this).state.value;
3126
- let keys = await ds.getTagKeys(__spreadValues$z({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3122
+ let keys = await ds.getTagKeys(__spreadValues$A({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3127
3123
  if (override) {
3128
3124
  keys = keys.concat(override.values);
3129
3125
  }
@@ -3672,21 +3668,21 @@ function isFilter(filter) {
3672
3668
  return filter !== null && typeof filter.key === "string" && typeof filter.value === "string";
3673
3669
  }
3674
3670
 
3675
- var __defProp$y = Object.defineProperty;
3671
+ var __defProp$z = Object.defineProperty;
3676
3672
  var __defProps$m = Object.defineProperties;
3677
3673
  var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
3678
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
3679
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
3680
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
3681
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3682
- var __spreadValues$y = (a, b) => {
3674
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
3675
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
3676
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
3677
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3678
+ var __spreadValues$z = (a, b) => {
3683
3679
  for (var prop in b || (b = {}))
3684
- if (__hasOwnProp$y.call(b, prop))
3685
- __defNormalProp$y(a, prop, b[prop]);
3686
- if (__getOwnPropSymbols$y)
3687
- for (var prop of __getOwnPropSymbols$y(b)) {
3688
- if (__propIsEnum$y.call(b, prop))
3689
- __defNormalProp$y(a, prop, b[prop]);
3680
+ if (__hasOwnProp$z.call(b, prop))
3681
+ __defNormalProp$z(a, prop, b[prop]);
3682
+ if (__getOwnPropSymbols$z)
3683
+ for (var prop of __getOwnPropSymbols$z(b)) {
3684
+ if (__propIsEnum$z.call(b, prop))
3685
+ __defNormalProp$z(a, prop, b[prop]);
3690
3686
  }
3691
3687
  return a;
3692
3688
  };
@@ -3694,7 +3690,7 @@ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
3694
3690
  class AdHocFiltersVariable extends SceneObjectBase {
3695
3691
  constructor(state) {
3696
3692
  var _a, _b;
3697
- super(__spreadValues$y({
3693
+ super(__spreadValues$z({
3698
3694
  type: "adhoc",
3699
3695
  name: (_a = state.name) != null ? _a : "Filters",
3700
3696
  filters: [],
@@ -3731,15 +3727,15 @@ class AdHocFiltersVariable extends SceneObjectBase {
3731
3727
  const propLabelKey = `${prop}Label`;
3732
3728
  if (filter === _wip) {
3733
3729
  if (prop === "value") {
3734
- this.setState({ filters: [...filters, __spreadProps$m(__spreadValues$y({}, _wip), { [prop]: value, [propLabelKey]: label })], _wip: void 0 });
3730
+ this.setState({ filters: [...filters, __spreadProps$m(__spreadValues$z({}, _wip), { [prop]: value, [propLabelKey]: label })], _wip: void 0 });
3735
3731
  } else {
3736
- this.setState({ _wip: __spreadProps$m(__spreadValues$y({}, filter), { [prop]: value, [propLabelKey]: label }) });
3732
+ this.setState({ _wip: __spreadProps$m(__spreadValues$z({}, filter), { [prop]: value, [propLabelKey]: label }) });
3737
3733
  }
3738
3734
  return;
3739
3735
  }
3740
3736
  const updatedFilters = this.state.filters.map((f) => {
3741
3737
  if (f === filter) {
3742
- const updatedFilter = __spreadProps$m(__spreadValues$y({}, f), { [prop]: value, [propLabelKey]: label });
3738
+ const updatedFilter = __spreadProps$m(__spreadValues$z({}, f), { [prop]: value, [propLabelKey]: label });
3743
3739
  if (prop === "key" && filter[prop] !== value) {
3744
3740
  updatedFilter.value = "";
3745
3741
  updatedFilter.valueLabel = "";
@@ -3773,7 +3769,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
3773
3769
  const otherFilters = this.state.filters.filter((f) => f.key !== currentKey).concat((_c = this.state.baseFilters) != null ? _c : []);
3774
3770
  const timeRange = sceneGraph.getTimeRange(this).state.value;
3775
3771
  const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : void 0;
3776
- let keys = await ds.getTagKeys(__spreadValues$y({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3772
+ let keys = await ds.getTagKeys(__spreadValues$z({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3777
3773
  if (override) {
3778
3774
  keys = keys.concat(override.values);
3779
3775
  }
@@ -3796,7 +3792,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
3796
3792
  const otherFilters = this.state.filters.filter((f) => f.key !== filter.key).concat((_c = this.state.baseFilters) != null ? _c : []);
3797
3793
  const timeRange = sceneGraph.getTimeRange(this).state.value;
3798
3794
  const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : void 0;
3799
- let values = await ds.getTagValues(__spreadValues$y({
3795
+ let values = await ds.getTagValues(__spreadValues$z({
3800
3796
  key: filter.key,
3801
3797
  filters: otherFilters,
3802
3798
  timeRange,
@@ -3923,21 +3919,21 @@ function areDifferentLayers(a, b) {
3923
3919
  return false;
3924
3920
  }
3925
3921
 
3926
- var __defProp$x = Object.defineProperty;
3922
+ var __defProp$y = Object.defineProperty;
3927
3923
  var __defProps$l = Object.defineProperties;
3928
3924
  var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
3929
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
3930
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
3931
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
3932
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3933
- var __spreadValues$x = (a, b) => {
3925
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
3926
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
3927
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
3928
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3929
+ var __spreadValues$y = (a, b) => {
3934
3930
  for (var prop in b || (b = {}))
3935
- if (__hasOwnProp$x.call(b, prop))
3936
- __defNormalProp$x(a, prop, b[prop]);
3937
- if (__getOwnPropSymbols$x)
3938
- for (var prop of __getOwnPropSymbols$x(b)) {
3939
- if (__propIsEnum$x.call(b, prop))
3940
- __defNormalProp$x(a, prop, b[prop]);
3931
+ if (__hasOwnProp$y.call(b, prop))
3932
+ __defNormalProp$y(a, prop, b[prop]);
3933
+ if (__getOwnPropSymbols$y)
3934
+ for (var prop of __getOwnPropSymbols$y(b)) {
3935
+ if (__propIsEnum$y.call(b, prop))
3936
+ __defNormalProp$y(a, prop, b[prop]);
3941
3937
  }
3942
3938
  return a;
3943
3939
  };
@@ -4039,9 +4035,9 @@ class SceneQueryRunner extends SceneObjectBase {
4039
4035
  return;
4040
4036
  }
4041
4037
  this._layerAnnotations = annotations;
4042
- const baseStateUpdate = this.state.data ? this.state.data : __spreadProps$l(__spreadValues$x({}, emptyPanelData), { timeRange: timeRange.state.value });
4038
+ const baseStateUpdate = this.state.data ? this.state.data : __spreadProps$l(__spreadValues$y({}, emptyPanelData), { timeRange: timeRange.state.value });
4043
4039
  this.setState({
4044
- data: __spreadProps$l(__spreadValues$x({}, baseStateUpdate), {
4040
+ data: __spreadProps$l(__spreadValues$y({}, baseStateUpdate), {
4045
4041
  annotations: [...(_d = this._resultAnnotations) != null ? _d : [], ...annotations],
4046
4042
  alertState: alertState != null ? alertState : (_e = this.state.data) == null ? void 0 : _e.alertState
4047
4043
  })
@@ -4160,7 +4156,7 @@ class SceneQueryRunner extends SceneObjectBase {
4160
4156
  this._dataLayersSub = void 0;
4161
4157
  }
4162
4158
  this.setState({
4163
- data: __spreadProps$l(__spreadValues$x({}, this.state.data), { state: schema.LoadingState.Done })
4159
+ data: __spreadProps$l(__spreadValues$y({}, this.state.data), { state: schema.LoadingState.Done })
4164
4160
  });
4165
4161
  }
4166
4162
  async runWithTimeRange(timeRange) {
@@ -4174,7 +4170,7 @@ class SceneQueryRunner extends SceneObjectBase {
4174
4170
  (_a = this._querySub) == null ? void 0 : _a.unsubscribe();
4175
4171
  if (this._variableDependency.hasDependencyInLoadingState()) {
4176
4172
  writeSceneLog("SceneQueryRunner", "Variable dependency is in loading state, skipping query execution");
4177
- this.setState({ data: __spreadProps$l(__spreadValues$x({}, this.state.data), { state: schema.LoadingState.Loading }) });
4173
+ this.setState({ data: __spreadProps$l(__spreadValues$y({}, this.state.data), { state: schema.LoadingState.Loading }) });
4178
4174
  return;
4179
4175
  }
4180
4176
  const { queries } = this.state;
@@ -4206,7 +4202,7 @@ class SceneQueryRunner extends SceneObjectBase {
4206
4202
  this._querySub = stream.subscribe(this.onDataReceived);
4207
4203
  } catch (err) {
4208
4204
  console.error("PanelQueryRunner Error", err);
4209
- this.onDataReceived(__spreadProps$l(__spreadValues$x(__spreadValues$x({}, emptyPanelData), this.state.data), {
4205
+ this.onDataReceived(__spreadProps$l(__spreadValues$y(__spreadValues$y({}, emptyPanelData), this.state.data), {
4210
4206
  state: schema.LoadingState.Error,
4211
4207
  errors: [runtime.toDataQueryError(err)]
4212
4208
  }));
@@ -4216,10 +4212,10 @@ class SceneQueryRunner extends SceneObjectBase {
4216
4212
  var _a;
4217
4213
  const clone = super.clone(withState);
4218
4214
  if (this._resultAnnotations) {
4219
- clone["_resultAnnotations"] = this._resultAnnotations.map((frame) => __spreadValues$x({}, frame));
4215
+ clone["_resultAnnotations"] = this._resultAnnotations.map((frame) => __spreadValues$y({}, frame));
4220
4216
  }
4221
4217
  if (this._layerAnnotations) {
4222
- clone["_layerAnnotations"] = this._layerAnnotations.map((frame) => __spreadValues$x({}, frame));
4218
+ clone["_layerAnnotations"] = this._layerAnnotations.map((frame) => __spreadValues$y({}, frame));
4223
4219
  }
4224
4220
  clone["_variableValueRecorder"] = this._variableValueRecorder.cloneAndRecordCurrentValuesForSceneObject(this);
4225
4221
  clone["_containerWidth"] = this._containerWidth;
@@ -4229,7 +4225,7 @@ class SceneQueryRunner extends SceneObjectBase {
4229
4225
  prepareRequests(timeRange, ds) {
4230
4226
  var _a;
4231
4227
  const { minInterval, queries } = this.state;
4232
- let request = __spreadValues$x({
4228
+ let request = __spreadValues$y({
4233
4229
  app: "scenes",
4234
4230
  requestId: getNextRequestId$1(),
4235
4231
  timezone: timeRange.getTimeZone(),
@@ -4275,7 +4271,7 @@ class SceneQueryRunner extends SceneObjectBase {
4275
4271
  for (const provider of (_a = this.getClosestExtraQueryProviders()) != null ? _a : []) {
4276
4272
  for (const { req, processor } of provider.getExtraQueries(request)) {
4277
4273
  const requestId = getNextRequestId$1();
4278
- secondaryRequests.push(__spreadProps$l(__spreadValues$x({}, req), { requestId }));
4274
+ secondaryRequests.push(__spreadProps$l(__spreadValues$y({}, req), { requestId }));
4279
4275
  secondaryProcessors.set(requestId, processor != null ? processor : passthroughProcessor);
4280
4276
  }
4281
4277
  }
@@ -4511,28 +4507,28 @@ class ActWhenVariableChanged extends SceneObjectBase {
4511
4507
  }
4512
4508
  }
4513
4509
 
4514
- var __defProp$w = Object.defineProperty;
4510
+ var __defProp$x = Object.defineProperty;
4515
4511
  var __defProps$k = Object.defineProperties;
4516
4512
  var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
4517
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
4518
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
4519
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
4520
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4521
- var __spreadValues$w = (a, b) => {
4513
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
4514
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
4515
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
4516
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4517
+ var __spreadValues$x = (a, b) => {
4522
4518
  for (var prop in b || (b = {}))
4523
- if (__hasOwnProp$w.call(b, prop))
4524
- __defNormalProp$w(a, prop, b[prop]);
4525
- if (__getOwnPropSymbols$w)
4526
- for (var prop of __getOwnPropSymbols$w(b)) {
4527
- if (__propIsEnum$w.call(b, prop))
4528
- __defNormalProp$w(a, prop, b[prop]);
4519
+ if (__hasOwnProp$x.call(b, prop))
4520
+ __defNormalProp$x(a, prop, b[prop]);
4521
+ if (__getOwnPropSymbols$x)
4522
+ for (var prop of __getOwnPropSymbols$x(b)) {
4523
+ if (__propIsEnum$x.call(b, prop))
4524
+ __defNormalProp$x(a, prop, b[prop]);
4529
4525
  }
4530
4526
  return a;
4531
4527
  };
4532
4528
  var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
4533
4529
  class CursorSync extends SceneObjectBase {
4534
4530
  constructor(state) {
4535
- super(__spreadProps$k(__spreadValues$w({}, state), {
4531
+ super(__spreadProps$k(__spreadValues$x({}, state), {
4536
4532
  sync: state.sync || schema.DashboardCursorSync.Off
4537
4533
  }));
4538
4534
  this.getEventsBus = (panel) => {
@@ -4796,21 +4792,21 @@ const getAlertStateStyles = (theme) => {
4796
4792
  };
4797
4793
  };
4798
4794
 
4799
- var __defProp$v = Object.defineProperty;
4795
+ var __defProp$w = Object.defineProperty;
4800
4796
  var __defProps$j = Object.defineProperties;
4801
4797
  var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
4802
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
4803
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
4804
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
4805
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4806
- var __spreadValues$v = (a, b) => {
4798
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
4799
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
4800
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
4801
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4802
+ var __spreadValues$w = (a, b) => {
4807
4803
  for (var prop in b || (b = {}))
4808
- if (__hasOwnProp$v.call(b, prop))
4809
- __defNormalProp$v(a, prop, b[prop]);
4810
- if (__getOwnPropSymbols$v)
4811
- for (var prop of __getOwnPropSymbols$v(b)) {
4812
- if (__propIsEnum$v.call(b, prop))
4813
- __defNormalProp$v(a, prop, b[prop]);
4804
+ if (__hasOwnProp$w.call(b, prop))
4805
+ __defNormalProp$w(a, prop, b[prop]);
4806
+ if (__getOwnPropSymbols$w)
4807
+ for (var prop of __getOwnPropSymbols$w(b)) {
4808
+ if (__propIsEnum$w.call(b, prop))
4809
+ __defNormalProp$w(a, prop, b[prop]);
4814
4810
  }
4815
4811
  return a;
4816
4812
  };
@@ -4824,13 +4820,13 @@ function seriesVisibilityConfigFactory(label, mode, fieldConfig, data) {
4824
4820
  if (currentIndex < 0) {
4825
4821
  if (mode === ui.SeriesVisibilityChangeMode.ToggleSelection) {
4826
4822
  const override3 = createOverride$1([displayName, ...getNamesOfHiddenFields(overrides, data)]);
4827
- return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4823
+ return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4828
4824
  overrides: [...fieldConfig.overrides, override3]
4829
4825
  });
4830
4826
  }
4831
4827
  const displayNames = getDisplayNames(data, displayName);
4832
4828
  const override2 = createOverride$1(displayNames);
4833
- return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4829
+ return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4834
4830
  overrides: [...fieldConfig.overrides, override2]
4835
4831
  });
4836
4832
  }
@@ -4843,22 +4839,22 @@ function seriesVisibilityConfigFactory(label, mode, fieldConfig, data) {
4843
4839
  existing = existing.filter((el) => nameOfHiddenFields.indexOf(el) < 0);
4844
4840
  }
4845
4841
  if (existing[0] === displayName && existing.length === 1) {
4846
- return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4842
+ return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4847
4843
  overrides: overridesCopy
4848
4844
  });
4849
4845
  }
4850
4846
  const override2 = createOverride$1([displayName, ...nameOfHiddenFields]);
4851
- return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4847
+ return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4852
4848
  overrides: [...overridesCopy, override2]
4853
4849
  });
4854
4850
  }
4855
4851
  const override = createExtendedOverride(current, displayName);
4856
4852
  if (allFieldsAreExcluded(override, data)) {
4857
- return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4853
+ return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4858
4854
  overrides: overridesCopy
4859
4855
  });
4860
4856
  }
4861
- return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4857
+ return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4862
4858
  overrides: [...overridesCopy, override]
4863
4859
  });
4864
4860
  }
@@ -4883,7 +4879,7 @@ function createOverride$1(names, mode = data.ByNamesMatcherMode.exclude, propert
4883
4879
  }
4884
4880
  },
4885
4881
  properties: [
4886
- __spreadProps$j(__spreadValues$v({}, property), {
4882
+ __spreadProps$j(__spreadValues$w({}, property), {
4887
4883
  value: {
4888
4884
  viz: true,
4889
4885
  legend: false,
@@ -4955,21 +4951,21 @@ const getNamesOfHiddenFields = (overrides, data$1) => {
4955
4951
  return names;
4956
4952
  };
4957
4953
 
4958
- var __defProp$u = Object.defineProperty;
4954
+ var __defProp$v = Object.defineProperty;
4959
4955
  var __defProps$i = Object.defineProperties;
4960
4956
  var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
4961
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
4962
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
4963
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
4964
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4965
- var __spreadValues$u = (a, b) => {
4957
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
4958
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
4959
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
4960
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4961
+ var __spreadValues$v = (a, b) => {
4966
4962
  for (var prop in b || (b = {}))
4967
- if (__hasOwnProp$u.call(b, prop))
4968
- __defNormalProp$u(a, prop, b[prop]);
4969
- if (__getOwnPropSymbols$u)
4970
- for (var prop of __getOwnPropSymbols$u(b)) {
4971
- if (__propIsEnum$u.call(b, prop))
4972
- __defNormalProp$u(a, prop, b[prop]);
4963
+ if (__hasOwnProp$v.call(b, prop))
4964
+ __defNormalProp$v(a, prop, b[prop]);
4965
+ if (__getOwnPropSymbols$v)
4966
+ for (var prop of __getOwnPropSymbols$v(b)) {
4967
+ if (__propIsEnum$v.call(b, prop))
4968
+ __defNormalProp$v(a, prop, b[prop]);
4973
4969
  }
4974
4970
  return a;
4975
4971
  };
@@ -4980,7 +4976,7 @@ const changeSeriesColorConfigFactory = (label, color, fieldConfig) => {
4980
4976
  return override.matcher.id === data.FieldMatcherID.byName && override.matcher.options === label;
4981
4977
  });
4982
4978
  if (currentIndex < 0) {
4983
- return __spreadProps$i(__spreadValues$u({}, fieldConfig), {
4979
+ return __spreadProps$i(__spreadValues$v({}, fieldConfig), {
4984
4980
  overrides: [...fieldConfig.overrides, createOverride(label, color)]
4985
4981
  });
4986
4982
  }
@@ -4988,19 +4984,19 @@ const changeSeriesColorConfigFactory = (label, color, fieldConfig) => {
4988
4984
  const existing = overridesCopy[currentIndex];
4989
4985
  const propertyIndex = existing.properties.findIndex((p) => p.id === "color");
4990
4986
  if (propertyIndex < 0) {
4991
- overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$u({}, existing), {
4987
+ overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$v({}, existing), {
4992
4988
  properties: [...existing.properties, createProperty(color)]
4993
4989
  });
4994
- return __spreadProps$i(__spreadValues$u({}, fieldConfig), {
4990
+ return __spreadProps$i(__spreadValues$v({}, fieldConfig), {
4995
4991
  overrides: overridesCopy
4996
4992
  });
4997
4993
  }
4998
4994
  const propertiesCopy = Array.from(existing.properties);
4999
4995
  propertiesCopy[propertyIndex] = createProperty(color);
5000
- overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$u({}, existing), {
4996
+ overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$v({}, existing), {
5001
4997
  properties: propertiesCopy
5002
4998
  });
5003
- return __spreadProps$i(__spreadValues$u({}, fieldConfig), {
4999
+ return __spreadProps$i(__spreadValues$v({}, fieldConfig), {
5004
5000
  overrides: overridesCopy
5005
5001
  });
5006
5002
  };
@@ -5023,21 +5019,21 @@ const createProperty = (color) => {
5023
5019
  };
5024
5020
  };
5025
5021
 
5026
- var __defProp$t = Object.defineProperty;
5022
+ var __defProp$u = Object.defineProperty;
5027
5023
  var __defProps$h = Object.defineProperties;
5028
5024
  var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
5029
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
5030
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
5031
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
5032
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5033
- var __spreadValues$t = (a, b) => {
5025
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
5026
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
5027
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
5028
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5029
+ var __spreadValues$u = (a, b) => {
5034
5030
  for (var prop in b || (b = {}))
5035
- if (__hasOwnProp$t.call(b, prop))
5036
- __defNormalProp$t(a, prop, b[prop]);
5037
- if (__getOwnPropSymbols$t)
5038
- for (var prop of __getOwnPropSymbols$t(b)) {
5039
- if (__propIsEnum$t.call(b, prop))
5040
- __defNormalProp$t(a, prop, b[prop]);
5031
+ if (__hasOwnProp$u.call(b, prop))
5032
+ __defNormalProp$u(a, prop, b[prop]);
5033
+ if (__getOwnPropSymbols$u)
5034
+ for (var prop of __getOwnPropSymbols$u(b)) {
5035
+ if (__propIsEnum$u.call(b, prop))
5036
+ __defNormalProp$u(a, prop, b[prop]);
5041
5037
  }
5042
5038
  return a;
5043
5039
  };
@@ -5045,7 +5041,7 @@ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
5045
5041
  class VizPanel extends SceneObjectBase {
5046
5042
  constructor(state) {
5047
5043
  var _a;
5048
- super(__spreadValues$t({
5044
+ super(__spreadValues$u({
5049
5045
  options: {},
5050
5046
  fieldConfig: { defaults: {}, overrides: [] },
5051
5047
  title: "Title",
@@ -5158,7 +5154,7 @@ class VizPanel extends SceneObjectBase {
5158
5154
  };
5159
5155
  this._onInstanceStateChange = (state) => {
5160
5156
  if (this._panelContext) {
5161
- this._panelContext = __spreadProps$h(__spreadValues$t({}, this._panelContext), {
5157
+ this._panelContext = __spreadProps$h(__spreadValues$u({}, this._panelContext), {
5162
5158
  instanceState: state
5163
5159
  });
5164
5160
  }
@@ -5182,8 +5178,8 @@ class VizPanel extends SceneObjectBase {
5182
5178
  sortBy = sortKey;
5183
5179
  }
5184
5180
  this.onOptionsChange(
5185
- __spreadProps$h(__spreadValues$t({}, this.state.options), {
5186
- legend: __spreadProps$h(__spreadValues$t({}, legendOptions), { sortBy, sortDesc })
5181
+ __spreadProps$h(__spreadValues$u({}, this.state.options), {
5182
+ legend: __spreadProps$h(__spreadValues$u({}, legendOptions), { sortBy, sortDesc })
5187
5183
  }),
5188
5184
  true
5189
5185
  );
@@ -5293,7 +5289,7 @@ class VizPanel extends SceneObjectBase {
5293
5289
  if (!data.compareArrayValues(newFrames, prevFrames, data.compareDataFrameStructures)) {
5294
5290
  this._structureRev++;
5295
5291
  }
5296
- this._dataWithFieldConfig = __spreadProps$h(__spreadValues$t({}, rawData), {
5292
+ this._dataWithFieldConfig = __spreadProps$h(__spreadValues$u({}, rawData), {
5297
5293
  structureRev: this._structureRev,
5298
5294
  series: newFrames
5299
5295
  });
@@ -5436,25 +5432,25 @@ function getMessageFromError(err) {
5436
5432
  return JSON.stringify(err);
5437
5433
  }
5438
5434
 
5439
- var __defProp$s = Object.defineProperty;
5440
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
5441
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
5442
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
5443
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5444
- var __spreadValues$s = (a, b) => {
5435
+ var __defProp$t = Object.defineProperty;
5436
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
5437
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
5438
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
5439
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5440
+ var __spreadValues$t = (a, b) => {
5445
5441
  for (var prop in b || (b = {}))
5446
- if (__hasOwnProp$s.call(b, prop))
5447
- __defNormalProp$s(a, prop, b[prop]);
5448
- if (__getOwnPropSymbols$s)
5449
- for (var prop of __getOwnPropSymbols$s(b)) {
5450
- if (__propIsEnum$s.call(b, prop))
5451
- __defNormalProp$s(a, prop, b[prop]);
5442
+ if (__hasOwnProp$t.call(b, prop))
5443
+ __defNormalProp$t(a, prop, b[prop]);
5444
+ if (__getOwnPropSymbols$t)
5445
+ for (var prop of __getOwnPropSymbols$t(b)) {
5446
+ if (__propIsEnum$t.call(b, prop))
5447
+ __defNormalProp$t(a, prop, b[prop]);
5452
5448
  }
5453
5449
  return a;
5454
5450
  };
5455
5451
  class SceneDataLayerBase extends SceneObjectBase {
5456
5452
  constructor(initialState, variableDependencyStatePaths = []) {
5457
- super(__spreadValues$s({
5453
+ super(__spreadValues$t({
5458
5454
  isEnabled: true
5459
5455
  }, initialState));
5460
5456
  this._results = new rxjs.ReplaySubject(1);
@@ -5576,21 +5572,21 @@ function DataLayerControlSwitch({ layer }) {
5576
5572
  }
5577
5573
  const containerStyle$1 = css.css({ display: "flex" });
5578
5574
 
5579
- var __defProp$r = Object.defineProperty;
5575
+ var __defProp$s = Object.defineProperty;
5580
5576
  var __defProps$g = Object.defineProperties;
5581
5577
  var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
5582
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
5583
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
5584
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
5585
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5586
- var __spreadValues$r = (a, b) => {
5578
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
5579
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
5580
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
5581
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5582
+ var __spreadValues$s = (a, b) => {
5587
5583
  for (var prop in b || (b = {}))
5588
- if (__hasOwnProp$r.call(b, prop))
5589
- __defNormalProp$r(a, prop, b[prop]);
5590
- if (__getOwnPropSymbols$r)
5591
- for (var prop of __getOwnPropSymbols$r(b)) {
5592
- if (__propIsEnum$r.call(b, prop))
5593
- __defNormalProp$r(a, prop, b[prop]);
5584
+ if (__hasOwnProp$s.call(b, prop))
5585
+ __defNormalProp$s(a, prop, b[prop]);
5586
+ if (__getOwnPropSymbols$s)
5587
+ for (var prop of __getOwnPropSymbols$s(b)) {
5588
+ if (__propIsEnum$s.call(b, prop))
5589
+ __defNormalProp$s(a, prop, b[prop]);
5594
5590
  }
5595
5591
  return a;
5596
5592
  };
@@ -5598,11 +5594,11 @@ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
5598
5594
  var __objRest$2 = (source, exclude) => {
5599
5595
  var target = {};
5600
5596
  for (var prop in source)
5601
- if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
5597
+ if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
5602
5598
  target[prop] = source[prop];
5603
- if (source != null && __getOwnPropSymbols$r)
5604
- for (var prop of __getOwnPropSymbols$r(source)) {
5605
- if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
5599
+ if (source != null && __getOwnPropSymbols$s)
5600
+ for (var prop of __getOwnPropSymbols$s(source)) {
5601
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
5606
5602
  target[prop] = source[prop];
5607
5603
  }
5608
5604
  return target;
@@ -5611,7 +5607,7 @@ const standardAnnotationSupport = {
5611
5607
  prepareAnnotation: (json) => {
5612
5608
  if (lodash.isString(json == null ? void 0 : json.query)) {
5613
5609
  const _a = json, { query } = _a, rest = __objRest$2(_a, ["query"]);
5614
- return __spreadProps$g(__spreadValues$r({}, rest), {
5610
+ return __spreadProps$g(__spreadValues$s({}, rest), {
5615
5611
  target: {
5616
5612
  refId: "annotation_query",
5617
5613
  query
@@ -5779,21 +5775,21 @@ function shouldUseLegacyRunner(datasource) {
5779
5775
  return !datasource.annotations || legacyRunner.includes(type);
5780
5776
  }
5781
5777
 
5782
- var __defProp$q = Object.defineProperty;
5778
+ var __defProp$r = Object.defineProperty;
5783
5779
  var __defProps$f = Object.defineProperties;
5784
5780
  var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
5785
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
5786
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
5787
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
5788
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5789
- var __spreadValues$q = (a, b) => {
5781
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
5782
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
5783
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
5784
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5785
+ var __spreadValues$r = (a, b) => {
5790
5786
  for (var prop in b || (b = {}))
5791
- if (__hasOwnProp$q.call(b, prop))
5792
- __defNormalProp$q(a, prop, b[prop]);
5793
- if (__getOwnPropSymbols$q)
5794
- for (var prop of __getOwnPropSymbols$q(b)) {
5795
- if (__propIsEnum$q.call(b, prop))
5796
- __defNormalProp$q(a, prop, b[prop]);
5787
+ if (__hasOwnProp$r.call(b, prop))
5788
+ __defNormalProp$r(a, prop, b[prop]);
5789
+ if (__getOwnPropSymbols$r)
5790
+ for (var prop of __getOwnPropSymbols$r(b)) {
5791
+ if (__propIsEnum$r.call(b, prop))
5792
+ __defNormalProp$r(a, prop, b[prop]);
5797
5793
  }
5798
5794
  return a;
5799
5795
  };
@@ -5820,8 +5816,8 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5820
5816
  }))
5821
5817
  );
5822
5818
  }
5823
- const processor = __spreadValues$q(__spreadValues$q({}, standardAnnotationSupport), datasource.annotations);
5824
- const annotationWithDefaults = __spreadValues$q(__spreadValues$q({}, (_a = processor.getDefaultQuery) == null ? void 0 : _a.call(processor)), query);
5819
+ const processor = __spreadValues$r(__spreadValues$r({}, standardAnnotationSupport), datasource.annotations);
5820
+ const annotationWithDefaults = __spreadValues$r(__spreadValues$r({}, (_a = processor.getDefaultQuery) == null ? void 0 : _a.call(processor)), query);
5825
5821
  const annotation = processor.prepareAnnotation(annotationWithDefaults);
5826
5822
  if (!annotation) {
5827
5823
  return rxjs.of({
@@ -5844,7 +5840,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5844
5840
  __annotation: { text: annotation.name, value: annotation },
5845
5841
  __sceneObject: { text: "__sceneObject", value: layer }
5846
5842
  };
5847
- const queryRequest = __spreadValues$q(__spreadProps$f(__spreadValues$q({
5843
+ const queryRequest = __spreadValues$r(__spreadProps$f(__spreadValues$r({
5848
5844
  startTime: Date.now(),
5849
5845
  requestId: getNextRequestId(),
5850
5846
  range: timeRange.state.value,
@@ -5854,7 +5850,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5854
5850
  app: data.CoreApp.Dashboard,
5855
5851
  timezone: timeRange.getTimeZone(),
5856
5852
  targets: [
5857
- __spreadProps$f(__spreadValues$q({}, processedQuery), {
5853
+ __spreadProps$f(__spreadValues$r({}, processedQuery), {
5858
5854
  refId: "Anno"
5859
5855
  })
5860
5856
  ]
@@ -5872,7 +5868,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5872
5868
  data$1.forEach((frame) => {
5873
5869
  var _a2;
5874
5870
  if (!((_a2 = frame.meta) == null ? void 0 : _a2.dataTopic)) {
5875
- frame.meta = __spreadProps$f(__spreadValues$q({}, frame.meta || {}), { dataTopic: data.DataTopic.Annotations });
5871
+ frame.meta = __spreadProps$f(__spreadValues$r({}, frame.meta || {}), { dataTopic: data.DataTopic.Annotations });
5876
5872
  }
5877
5873
  });
5878
5874
  return processor.processEvents(annotation, data$1).pipe(
@@ -5887,19 +5883,19 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5887
5883
  );
5888
5884
  }
5889
5885
 
5890
- var __defProp$p = Object.defineProperty;
5891
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
5892
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
5893
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
5894
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5895
- var __spreadValues$p = (a, b) => {
5886
+ var __defProp$q = Object.defineProperty;
5887
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
5888
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
5889
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
5890
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5891
+ var __spreadValues$q = (a, b) => {
5896
5892
  for (var prop in b || (b = {}))
5897
- if (__hasOwnProp$p.call(b, prop))
5898
- __defNormalProp$p(a, prop, b[prop]);
5899
- if (__getOwnPropSymbols$p)
5900
- for (var prop of __getOwnPropSymbols$p(b)) {
5901
- if (__propIsEnum$p.call(b, prop))
5902
- __defNormalProp$p(a, prop, b[prop]);
5893
+ if (__hasOwnProp$q.call(b, prop))
5894
+ __defNormalProp$q(a, prop, b[prop]);
5895
+ if (__getOwnPropSymbols$q)
5896
+ for (var prop of __getOwnPropSymbols$q(b)) {
5897
+ if (__propIsEnum$q.call(b, prop))
5898
+ __defNormalProp$q(a, prop, b[prop]);
5903
5899
  }
5904
5900
  return a;
5905
5901
  };
@@ -5910,7 +5906,7 @@ function postProcessQueryResult(annotation, results) {
5910
5906
  }
5911
5907
  const processed = results.map((item) => {
5912
5908
  var _a;
5913
- const processedItem = __spreadValues$p({}, item);
5909
+ const processedItem = __spreadValues$q({}, item);
5914
5910
  processedItem.source = annotation;
5915
5911
  processedItem.color = runtime.config.theme2.visualization.getColorByName(annotation.iconColor);
5916
5912
  processedItem.type = annotation.name;
@@ -5959,21 +5955,21 @@ function isPanelAlert(event) {
5959
5955
  return event.eventType === "panel-alert";
5960
5956
  }
5961
5957
 
5962
- var __defProp$o = Object.defineProperty;
5958
+ var __defProp$p = Object.defineProperty;
5963
5959
  var __defProps$e = Object.defineProperties;
5964
5960
  var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
5965
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
5966
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
5967
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
5968
- var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5969
- var __spreadValues$o = (a, b) => {
5961
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
5962
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
5963
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
5964
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5965
+ var __spreadValues$p = (a, b) => {
5970
5966
  for (var prop in b || (b = {}))
5971
- if (__hasOwnProp$o.call(b, prop))
5972
- __defNormalProp$o(a, prop, b[prop]);
5973
- if (__getOwnPropSymbols$o)
5974
- for (var prop of __getOwnPropSymbols$o(b)) {
5975
- if (__propIsEnum$o.call(b, prop))
5976
- __defNormalProp$o(a, prop, b[prop]);
5967
+ if (__hasOwnProp$p.call(b, prop))
5968
+ __defNormalProp$p(a, prop, b[prop]);
5969
+ if (__getOwnPropSymbols$p)
5970
+ for (var prop of __getOwnPropSymbols$p(b)) {
5971
+ if (__propIsEnum$p.call(b, prop))
5972
+ __defNormalProp$p(a, prop, b[prop]);
5977
5973
  }
5978
5974
  return a;
5979
5975
  };
@@ -5981,7 +5977,7 @@ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
5981
5977
  class AnnotationsDataLayer extends SceneDataLayerBase {
5982
5978
  constructor(initialState) {
5983
5979
  super(
5984
- __spreadValues$o({
5980
+ __spreadValues$p({
5985
5981
  isEnabled: true
5986
5982
  }, initialState),
5987
5983
  ["query"]
@@ -6029,7 +6025,7 @@ class AnnotationsDataLayer extends SceneDataLayerBase {
6029
6025
  this.publishResults(stateUpdate);
6030
6026
  });
6031
6027
  } catch (e) {
6032
- this.publishResults(__spreadProps$e(__spreadValues$o({}, emptyPanelData), {
6028
+ this.publishResults(__spreadProps$e(__spreadValues$p({}, emptyPanelData), {
6033
6029
  state: schema.LoadingState.Error,
6034
6030
  errors: [
6035
6031
  {
@@ -6046,9 +6042,9 @@ class AnnotationsDataLayer extends SceneDataLayerBase {
6046
6042
  processEvents(query, events) {
6047
6043
  let processedEvents = postProcessQueryResult(query, events.events || []);
6048
6044
  processedEvents = dedupAnnotations(processedEvents);
6049
- const stateUpdate = __spreadProps$e(__spreadValues$o({}, emptyPanelData), { state: events.state });
6045
+ const stateUpdate = __spreadProps$e(__spreadValues$p({}, emptyPanelData), { state: events.state });
6050
6046
  const df = data.arrayToDataFrame(processedEvents);
6051
- df.meta = __spreadProps$e(__spreadValues$o({}, df.meta), {
6047
+ df.meta = __spreadProps$e(__spreadValues$p({}, df.meta), {
6052
6048
  dataTopic: data.DataTopic.Annotations
6053
6049
  });
6054
6050
  stateUpdate.series = [df];
@@ -6101,28 +6097,28 @@ class SceneTimeRangeTransformerBase extends SceneObjectBase {
6101
6097
  }
6102
6098
  }
6103
6099
 
6104
- var __defProp$n = Object.defineProperty;
6100
+ var __defProp$o = Object.defineProperty;
6105
6101
  var __defProps$d = Object.defineProperties;
6106
6102
  var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
6107
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
6108
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
6109
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
6110
- var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6111
- var __spreadValues$n = (a, b) => {
6103
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
6104
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
6105
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
6106
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6107
+ var __spreadValues$o = (a, b) => {
6112
6108
  for (var prop in b || (b = {}))
6113
- if (__hasOwnProp$n.call(b, prop))
6114
- __defNormalProp$n(a, prop, b[prop]);
6115
- if (__getOwnPropSymbols$n)
6116
- for (var prop of __getOwnPropSymbols$n(b)) {
6117
- if (__propIsEnum$n.call(b, prop))
6118
- __defNormalProp$n(a, prop, b[prop]);
6109
+ if (__hasOwnProp$o.call(b, prop))
6110
+ __defNormalProp$o(a, prop, b[prop]);
6111
+ if (__getOwnPropSymbols$o)
6112
+ for (var prop of __getOwnPropSymbols$o(b)) {
6113
+ if (__propIsEnum$o.call(b, prop))
6114
+ __defNormalProp$o(a, prop, b[prop]);
6119
6115
  }
6120
6116
  return a;
6121
6117
  };
6122
6118
  var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
6123
6119
  class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
6124
6120
  constructor(state) {
6125
- super(__spreadProps$d(__spreadValues$n({}, state), {
6121
+ super(__spreadProps$d(__spreadValues$o({}, state), {
6126
6122
  timeZone: state.timeZone,
6127
6123
  from: "now-6h",
6128
6124
  to: "now",
@@ -6130,7 +6126,7 @@ class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
6130
6126
  }));
6131
6127
  }
6132
6128
  ancestorTimeRangeChanged(timeRange) {
6133
- this.setState(__spreadProps$d(__spreadValues$n({}, timeRange), {
6129
+ this.setState(__spreadProps$d(__spreadValues$o({}, timeRange), {
6134
6130
  timeZone: this.state.timeZone,
6135
6131
  value: evaluateTimeRange(
6136
6132
  timeRange.from,
@@ -6158,21 +6154,21 @@ class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
6158
6154
  }
6159
6155
  }
6160
6156
 
6161
- var __defProp$m = Object.defineProperty;
6157
+ var __defProp$n = Object.defineProperty;
6162
6158
  var __defProps$c = Object.defineProperties;
6163
6159
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
6164
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
6165
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
6166
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
6167
- var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6168
- var __spreadValues$m = (a, b) => {
6160
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
6161
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
6162
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
6163
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6164
+ var __spreadValues$n = (a, b) => {
6169
6165
  for (var prop in b || (b = {}))
6170
- if (__hasOwnProp$m.call(b, prop))
6171
- __defNormalProp$m(a, prop, b[prop]);
6172
- if (__getOwnPropSymbols$m)
6173
- for (var prop of __getOwnPropSymbols$m(b)) {
6174
- if (__propIsEnum$m.call(b, prop))
6175
- __defNormalProp$m(a, prop, b[prop]);
6166
+ if (__hasOwnProp$n.call(b, prop))
6167
+ __defNormalProp$n(a, prop, b[prop]);
6168
+ if (__getOwnPropSymbols$n)
6169
+ for (var prop of __getOwnPropSymbols$n(b)) {
6170
+ if (__propIsEnum$n.call(b, prop))
6171
+ __defNormalProp$n(a, prop, b[prop]);
6176
6172
  }
6177
6173
  return a;
6178
6174
  };
@@ -6200,7 +6196,7 @@ class SceneDataLayerSetBase extends SceneObjectBase {
6200
6196
  series = series.concat(result.data.series);
6201
6197
  }
6202
6198
  }
6203
- const combinedData = __spreadProps$c(__spreadValues$m({}, emptyPanelData), { series });
6199
+ const combinedData = __spreadProps$c(__spreadValues$n({}, emptyPanelData), { series });
6204
6200
  this._results.next({ origin: this, data: combinedData });
6205
6201
  this.setStateHelper({ data: combinedData });
6206
6202
  }
@@ -6249,21 +6245,21 @@ SceneDataLayerSet.Component = ({ model }) => {
6249
6245
  })));
6250
6246
  };
6251
6247
 
6252
- var __defProp$l = Object.defineProperty;
6248
+ var __defProp$m = Object.defineProperty;
6253
6249
  var __defProps$b = Object.defineProperties;
6254
6250
  var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
6255
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
6256
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
6257
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
6258
- var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6259
- var __spreadValues$l = (a, b) => {
6251
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
6252
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
6253
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
6254
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6255
+ var __spreadValues$m = (a, b) => {
6260
6256
  for (var prop in b || (b = {}))
6261
- if (__hasOwnProp$l.call(b, prop))
6262
- __defNormalProp$l(a, prop, b[prop]);
6263
- if (__getOwnPropSymbols$l)
6264
- for (var prop of __getOwnPropSymbols$l(b)) {
6265
- if (__propIsEnum$l.call(b, prop))
6266
- __defNormalProp$l(a, prop, b[prop]);
6257
+ if (__hasOwnProp$m.call(b, prop))
6258
+ __defNormalProp$m(a, prop, b[prop]);
6259
+ if (__getOwnPropSymbols$m)
6260
+ for (var prop of __getOwnPropSymbols$m(b)) {
6261
+ if (__propIsEnum$m.call(b, prop))
6262
+ __defNormalProp$m(a, prop, b[prop]);
6267
6263
  }
6268
6264
  return a;
6269
6265
  };
@@ -6344,7 +6340,7 @@ class SceneDataTransformer extends SceneObjectBase {
6344
6340
  const { series, annotations } = this._prevDataFromSource;
6345
6341
  if (data.series === series && data.annotations === annotations) {
6346
6342
  if (this.state.data && data.state !== this.state.data.state) {
6347
- this.setState({ data: __spreadProps$b(__spreadValues$l({}, this.state.data), { state: data.state }) });
6343
+ this.setState({ data: __spreadProps$b(__spreadValues$m({}, this.state.data), { state: data.state }) });
6348
6344
  }
6349
6345
  return true;
6350
6346
  }
@@ -6392,7 +6388,7 @@ class SceneDataTransformer extends SceneObjectBase {
6392
6388
  rxjs.map((values) => {
6393
6389
  const transformedSeries = values[0];
6394
6390
  const transformedAnnotations = values[1];
6395
- return __spreadProps$b(__spreadValues$l({}, data$1), {
6391
+ return __spreadProps$b(__spreadValues$m({}, data$1), {
6396
6392
  series: transformedSeries,
6397
6393
  annotations: transformedAnnotations != null ? transformedAnnotations : data$1.annotations
6398
6394
  });
@@ -6403,7 +6399,7 @@ class SceneDataTransformer extends SceneObjectBase {
6403
6399
  const sourceErr = ((_a2 = this.getSourceData().state.data) == null ? void 0 : _a2.errors) || [];
6404
6400
  const transformationError = runtime.toDataQueryError(err);
6405
6401
  transformationError.message = `Error transforming data: ${transformationError.message}`;
6406
- const result = __spreadProps$b(__spreadValues$l({}, data$1), {
6402
+ const result = __spreadProps$b(__spreadValues$m({}, data$1), {
6407
6403
  state: data.LoadingState.Error,
6408
6404
  errors: [...sourceErr, transformationError]
6409
6405
  });
@@ -6738,9 +6734,41 @@ class SceneVariableSetVariableDependencyHandler {
6738
6734
  }
6739
6735
  }
6740
6736
 
6741
- var __defProp$k = Object.defineProperty;
6737
+ var __defProp$l = Object.defineProperty;
6742
6738
  var __defProps$a = Object.defineProperties;
6743
6739
  var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
6740
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
6741
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
6742
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
6743
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6744
+ var __spreadValues$l = (a, b) => {
6745
+ for (var prop in b || (b = {}))
6746
+ if (__hasOwnProp$l.call(b, prop))
6747
+ __defNormalProp$l(a, prop, b[prop]);
6748
+ if (__getOwnPropSymbols$l)
6749
+ for (var prop of __getOwnPropSymbols$l(b)) {
6750
+ if (__propIsEnum$l.call(b, prop))
6751
+ __defNormalProp$l(a, prop, b[prop]);
6752
+ }
6753
+ return a;
6754
+ };
6755
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
6756
+ class ConstantVariable extends SceneObjectBase {
6757
+ constructor(initialState) {
6758
+ super(__spreadProps$a(__spreadValues$l({
6759
+ type: "constant",
6760
+ value: "",
6761
+ name: ""
6762
+ }, initialState), {
6763
+ skipUrlSync: true
6764
+ }));
6765
+ }
6766
+ getValue() {
6767
+ return this.state.value;
6768
+ }
6769
+ }
6770
+
6771
+ var __defProp$k = Object.defineProperty;
6744
6772
  var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
6745
6773
  var __hasOwnProp$k = Object.prototype.hasOwnProperty;
6746
6774
  var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
@@ -6756,21 +6784,41 @@ var __spreadValues$k = (a, b) => {
6756
6784
  }
6757
6785
  return a;
6758
6786
  };
6759
- var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
6760
- class ConstantVariable extends SceneObjectBase {
6787
+ class CustomVariable extends MultiValueVariable {
6761
6788
  constructor(initialState) {
6762
- super(__spreadProps$a(__spreadValues$k({
6763
- type: "constant",
6789
+ super(__spreadValues$k({
6790
+ type: "custom",
6791
+ query: "",
6764
6792
  value: "",
6793
+ text: "",
6794
+ options: [],
6765
6795
  name: ""
6766
- }, initialState), {
6767
- skipUrlSync: true
6768
- }));
6796
+ }, initialState));
6797
+ this._variableDependency = new VariableDependencyConfig(this, {
6798
+ statePaths: ["query"]
6799
+ });
6769
6800
  }
6770
- getValue() {
6771
- return this.state.value;
6801
+ getValueOptions(args) {
6802
+ var _a;
6803
+ const interpolated = sceneGraph.interpolate(this, this.state.query);
6804
+ const match = (_a = interpolated.match(/(?:\\,|[^,])+/g)) != null ? _a : [];
6805
+ const options = match.map((text) => {
6806
+ var _a2;
6807
+ text = text.replace(/\\,/g, ",");
6808
+ const textMatch = (_a2 = /^(.+)\s:\s(.+)$/g.exec(text)) != null ? _a2 : [];
6809
+ if (textMatch.length === 3) {
6810
+ const [, key, value] = textMatch;
6811
+ return { label: key.trim(), value: value.trim() };
6812
+ } else {
6813
+ return { label: text.trim(), value: text.trim() };
6814
+ }
6815
+ });
6816
+ return rxjs.of(options);
6772
6817
  }
6773
6818
  }
6819
+ CustomVariable.Component = ({ model }) => {
6820
+ return renderSelectForVariable(model);
6821
+ };
6774
6822
 
6775
6823
  var __defProp$j = Object.defineProperty;
6776
6824
  var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
@@ -6788,10 +6836,11 @@ var __spreadValues$j = (a, b) => {
6788
6836
  }
6789
6837
  return a;
6790
6838
  };
6791
- class CustomVariable extends MultiValueVariable {
6839
+ class SnapshotVariable extends MultiValueVariable {
6792
6840
  constructor(initialState) {
6793
6841
  super(__spreadValues$j({
6794
6842
  type: "custom",
6843
+ isReadOnly: true,
6795
6844
  query: "",
6796
6845
  value: "",
6797
6846
  text: "",
@@ -6819,8 +6868,26 @@ class CustomVariable extends MultiValueVariable {
6819
6868
  });
6820
6869
  return rxjs.of(options);
6821
6870
  }
6871
+ validateAndUpdate() {
6872
+ return this.getValueOptions({}).pipe(
6873
+ rxjs.map((options) => {
6874
+ this._updateValueGivenNewOptions(options);
6875
+ return {};
6876
+ })
6877
+ );
6878
+ }
6879
+ _updateValueGivenNewOptions(options) {
6880
+ const { value: currentValue, text: currentText } = this.state;
6881
+ const stateUpdate = {
6882
+ options,
6883
+ loading: false,
6884
+ value: currentValue != null ? currentValue : [],
6885
+ text: currentText != null ? currentText : []
6886
+ };
6887
+ this.setState(stateUpdate);
6888
+ }
6822
6889
  }
6823
- CustomVariable.Component = ({ model }) => {
6890
+ SnapshotVariable.Component = ({ model }) => {
6824
6891
  return renderSelectForVariable(model);
6825
6892
  };
6826
6893
 
@@ -11429,6 +11496,7 @@ exports.SceneToolbarButton = SceneToolbarButton;
11429
11496
  exports.SceneToolbarInput = SceneToolbarInput;
11430
11497
  exports.SceneVariableSet = SceneVariableSet;
11431
11498
  exports.SceneVariableValueChangedEvent = SceneVariableValueChangedEvent;
11499
+ exports.SnapshotVariable = SnapshotVariable;
11432
11500
  exports.SplitLayout = SplitLayout;
11433
11501
  exports.TestVariable = TestVariable;
11434
11502
  exports.TextBoxVariable = TextBoxVariable;