@grafana/scenes 4.30.0--canary.781.9444216593.0 → 4.30.0--canary.785.9463381206.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$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) => {
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) => {
50
50
  for (var prop in b || (b = {}))
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]);
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]);
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$L({}, runtime.locationService.getSearchObject());
65
+ const paramsCopy = __spreadValues$K({}, 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$K = Object.defineProperty;
79
+ var __defProp$J = Object.defineProperty;
80
80
  var __defProps$t = Object.defineProperties;
81
81
  var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
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) => {
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) => {
87
87
  for (var prop in b || (b = {}))
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]);
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]);
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$K({}, plugin.meta), {
103
+ plugin.meta = __spreadProps$t(__spreadValues$J({}, 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$J = Object.defineProperty;
131
+ var __defProp$I = Object.defineProperty;
132
132
  var __defProps$s = Object.defineProperties;
133
133
  var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
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) => {
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) => {
139
139
  for (var prop in b || (b = {}))
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]);
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]);
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$J.call(source, prop) && exclude.indexOf(prop) < 0)
153
+ if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
154
154
  target[prop] = 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))
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))
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$J({}, otherProps), {
175
+ return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$s(__spreadValues$I({}, 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$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) => {
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) => {
227
227
  for (var prop in b || (b = {}))
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]);
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]);
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$I(__spreadValues$I({}, this._state), update);
293
+ const newState = __spreadValues$H(__spreadValues$H({}, 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$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) => {
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) => {
495
495
  for (var prop in b || (b = {}))
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]);
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]);
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$H({}, sceneState);
510
+ const clonedState = __spreadValues$G({}, 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$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) => {
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) => {
694
694
  for (var prop in b || (b = {}))
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]);
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]);
701
701
  }
702
702
  return a;
703
703
  };
704
704
  class SceneDataNode extends SceneObjectBase {
705
705
  constructor(state) {
706
- super(__spreadValues$G({
706
+ super(__spreadValues$F({
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$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) => {
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) => {
793
793
  for (var prop in b || (b = {}))
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]);
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]);
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$F({ from, to, timeZone, value }, state));
816
+ super(__spreadValues$E({ 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 = {};
@@ -1355,16 +1355,19 @@ function sceneInterpolator(sceneObject, target, scopedVars, format, interpolatio
1355
1355
  });
1356
1356
  }
1357
1357
  function lookupFormatVariable(name, match, scopedVars, sceneObject) {
1358
- const scopedVar = scopedVars == null ? void 0 : scopedVars[name];
1359
- if (scopedVar) {
1360
- return getSceneVariableForScopedVar(name, scopedVar);
1358
+ if (scopedVars && scopedVars.hasOwnProperty(name)) {
1359
+ const scopedVar = scopedVars[name];
1360
+ if (scopedVar) {
1361
+ return getSceneVariableForScopedVar(name, scopedVar);
1362
+ }
1361
1363
  }
1362
1364
  const variable = lookupVariable(name, sceneObject);
1363
1365
  if (variable) {
1364
1366
  return variable;
1365
1367
  }
1366
- if (macrosIndex[name]) {
1367
- return new macrosIndex[name](name, sceneObject, match, scopedVars);
1368
+ const Macro = macrosIndex.get(name);
1369
+ if (Macro) {
1370
+ return new Macro(name, sceneObject, match, scopedVars);
1368
1371
  }
1369
1372
  return null;
1370
1373
  }
@@ -1751,21 +1754,21 @@ function collectAllVariables(sceneObject, record = {}) {
1751
1754
  return record;
1752
1755
  }
1753
1756
 
1754
- var __defProp$E = Object.defineProperty;
1757
+ var __defProp$D = Object.defineProperty;
1755
1758
  var __defProps$r = Object.defineProperties;
1756
1759
  var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
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) => {
1760
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
1761
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
1762
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
1763
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1764
+ var __spreadValues$D = (a, b) => {
1762
1765
  for (var prop in b || (b = {}))
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]);
1766
+ if (__hasOwnProp$D.call(b, prop))
1767
+ __defNormalProp$D(a, prop, b[prop]);
1768
+ if (__getOwnPropSymbols$D)
1769
+ for (var prop of __getOwnPropSymbols$D(b)) {
1770
+ if (__propIsEnum$D.call(b, prop))
1771
+ __defNormalProp$D(a, prop, b[prop]);
1769
1772
  }
1770
1773
  return a;
1771
1774
  };
@@ -1785,7 +1788,7 @@ function getTemplateProxyForField(field, frame, frames) {
1785
1788
  if (!field.labels) {
1786
1789
  return "";
1787
1790
  }
1788
- return __spreadProps$r(__spreadValues$E({}, field.labels), {
1791
+ return __spreadProps$r(__spreadValues$D({}, field.labels), {
1789
1792
  __values: Object.values(field.labels).sort().join(", "),
1790
1793
  toString: () => {
1791
1794
  return data.formatLabels(field.labels, "", true);
@@ -2017,29 +2020,29 @@ class OrgMacro {
2017
2020
  }
2018
2021
  }
2019
2022
 
2020
- const macrosIndex = {
2021
- [data.DataLinkBuiltInVars.includeVars]: AllVariablesMacro,
2022
- [data.DataLinkBuiltInVars.keepTime]: UrlTimeRangeMacro,
2023
- ["__value"]: ValueMacro,
2024
- ["__data"]: DataMacro,
2025
- ["__series"]: SeriesMacro,
2026
- ["__field"]: FieldMacro,
2027
- ["__url"]: UrlMacro,
2028
- ["__from"]: TimeFromAndToMacro,
2029
- ["__to"]: TimeFromAndToMacro,
2030
- ["__timezone"]: TimezoneMacro,
2031
- ["__user"]: UserMacro,
2032
- ["__org"]: OrgMacro,
2033
- ["__interval"]: IntervalMacro,
2034
- ["__interval_ms"]: IntervalMacro
2035
- };
2023
+ const macrosIndex = /* @__PURE__ */ new Map([
2024
+ [data.DataLinkBuiltInVars.includeVars, AllVariablesMacro],
2025
+ [data.DataLinkBuiltInVars.keepTime, UrlTimeRangeMacro],
2026
+ ["__value", ValueMacro],
2027
+ ["__data", DataMacro],
2028
+ ["__series", SeriesMacro],
2029
+ ["__field", FieldMacro],
2030
+ ["__url", UrlMacro],
2031
+ ["__from", TimeFromAndToMacro],
2032
+ ["__to", TimeFromAndToMacro],
2033
+ ["__timezone", TimezoneMacro],
2034
+ ["__user", UserMacro],
2035
+ ["__org", OrgMacro],
2036
+ ["__interval", IntervalMacro],
2037
+ ["__interval_ms", IntervalMacro]
2038
+ ]);
2036
2039
  function registerVariableMacro(name, macro) {
2037
- if (macrosIndex[name]) {
2040
+ if (macrosIndex.get(name)) {
2038
2041
  throw new Error(`Macro already registered ${name}`);
2039
2042
  }
2040
- macrosIndex[name] = macro;
2043
+ macrosIndex.set(name, macro);
2041
2044
  return () => {
2042
- delete macrosIndex[name];
2045
+ macrosIndex.delete(name);
2043
2046
  };
2044
2047
  }
2045
2048
 
@@ -2266,21 +2269,21 @@ function isExtraQueryProvider(obj) {
2266
2269
  return typeof obj === "object" && "getExtraQueries" in obj;
2267
2270
  }
2268
2271
 
2269
- var __defProp$D = Object.defineProperty;
2272
+ var __defProp$C = Object.defineProperty;
2270
2273
  var __defProps$q = Object.defineProperties;
2271
2274
  var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
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) => {
2275
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
2276
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
2277
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
2278
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2279
+ var __spreadValues$C = (a, b) => {
2277
2280
  for (var prop in b || (b = {}))
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]);
2281
+ if (__hasOwnProp$C.call(b, prop))
2282
+ __defNormalProp$C(a, prop, b[prop]);
2283
+ if (__getOwnPropSymbols$C)
2284
+ for (var prop of __getOwnPropSymbols$C(b)) {
2285
+ if (__propIsEnum$C.call(b, prop))
2286
+ __defNormalProp$C(a, prop, b[prop]);
2284
2287
  }
2285
2288
  return a;
2286
2289
  };
@@ -2297,7 +2300,7 @@ const extraQueryProcessingOperator = (processors) => (data) => {
2297
2300
  }),
2298
2301
  rxjs.map(([primary, ...processedSecondaries]) => {
2299
2302
  var _a;
2300
- return __spreadProps$q(__spreadValues$D({}, primary), {
2303
+ return __spreadProps$q(__spreadValues$C({}, primary), {
2301
2304
  series: [...primary.series, ...processedSecondaries.flatMap((s) => s.series)],
2302
2305
  annotations: [...(_a = primary.annotations) != null ? _a : [], ...processedSecondaries.flatMap((s) => {
2303
2306
  var _a2;
@@ -2308,21 +2311,21 @@ const extraQueryProcessingOperator = (processors) => (data) => {
2308
2311
  );
2309
2312
  };
2310
2313
 
2311
- var __defProp$C = Object.defineProperty;
2314
+ var __defProp$B = Object.defineProperty;
2312
2315
  var __defProps$p = Object.defineProperties;
2313
2316
  var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
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) => {
2317
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
2318
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
2319
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
2320
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2321
+ var __spreadValues$B = (a, b) => {
2319
2322
  for (var prop in b || (b = {}))
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]);
2323
+ if (__hasOwnProp$B.call(b, prop))
2324
+ __defNormalProp$B(a, prop, b[prop]);
2325
+ if (__getOwnPropSymbols$B)
2326
+ for (var prop of __getOwnPropSymbols$B(b)) {
2327
+ if (__propIsEnum$B.call(b, prop))
2328
+ __defNormalProp$B(a, prop, b[prop]);
2326
2329
  }
2327
2330
  return a;
2328
2331
  };
@@ -2377,11 +2380,11 @@ function filterAnnotations(data, filters) {
2377
2380
  continue;
2378
2381
  }
2379
2382
  }
2380
- fields.push(__spreadProps$p(__spreadValues$C({}, field), {
2383
+ fields.push(__spreadProps$p(__spreadValues$B({}, field), {
2381
2384
  values: buffer
2382
2385
  }));
2383
2386
  }
2384
- processed.push(__spreadProps$p(__spreadValues$C({}, frame), {
2387
+ processed.push(__spreadProps$p(__spreadValues$B({}, frame), {
2385
2388
  fields,
2386
2389
  length: frameLength
2387
2390
  }));
@@ -2807,21 +2810,21 @@ function getOptionSearcher(options, includeAll) {
2807
2810
  };
2808
2811
  }
2809
2812
 
2810
- var __defProp$B = Object.defineProperty;
2813
+ var __defProp$A = Object.defineProperty;
2811
2814
  var __defProps$o = Object.defineProperties;
2812
2815
  var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
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) => {
2816
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
2817
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
2818
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
2819
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2820
+ var __spreadValues$A = (a, b) => {
2818
2821
  for (var prop in b || (b = {}))
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]);
2822
+ if (__hasOwnProp$A.call(b, prop))
2823
+ __defNormalProp$A(a, prop, b[prop]);
2824
+ if (__getOwnPropSymbols$A)
2825
+ for (var prop of __getOwnPropSymbols$A(b)) {
2826
+ if (__propIsEnum$A.call(b, prop))
2827
+ __defNormalProp$A(a, prop, b[prop]);
2825
2828
  }
2826
2829
  return a;
2827
2830
  };
@@ -2829,11 +2832,11 @@ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
2829
2832
  var __objRest$3 = (source, exclude) => {
2830
2833
  var target = {};
2831
2834
  for (var prop in source)
2832
- if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
2835
+ if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
2833
2836
  target[prop] = 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
+ if (source != null && __getOwnPropSymbols$A)
2838
+ for (var prop of __getOwnPropSymbols$A(source)) {
2839
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
2837
2840
  target[prop] = source[prop];
2838
2841
  }
2839
2842
  return target;
@@ -2846,12 +2849,15 @@ function toSelectableValue$1(value, label) {
2846
2849
  };
2847
2850
  }
2848
2851
  function VariableValueSelect({ model }) {
2849
- const { value, text, key, options, includeAll, isReadOnly } = model.useState();
2852
+ const { value, text, key, options, includeAll } = model.useState();
2850
2853
  const [inputValue, setInputValue] = React.useState("");
2851
2854
  const [hasCustomValue, setHasCustomValue] = React.useState(false);
2852
2855
  const selectValue = toSelectableValue$1(value, String(text));
2853
- const optionSearcher = React.useMemo(() => getOptionSearcher(options, includeAll), [options, includeAll]);
2854
- const onInputChange = (value2, { action }) => {
2856
+ const optionSearcher = React.useMemo(
2857
+ () => getOptionSearcher(options, includeAll),
2858
+ [options, includeAll]
2859
+ );
2860
+ const onInputChange = (value2, { action }) => {
2855
2861
  if (action === "input-change") {
2856
2862
  setInputValue(value2);
2857
2863
  if (model.onSearchChange) {
@@ -2875,7 +2881,6 @@ function VariableValueSelect({ model }) {
2875
2881
  isValidNewOption: (inputValue2) => inputValue2.trim().length > 0,
2876
2882
  placeholder: "Select value",
2877
2883
  width: "auto",
2878
- disabled: isReadOnly,
2879
2884
  value: selectValue,
2880
2885
  inputValue,
2881
2886
  allowCustomValue: true,
@@ -2896,11 +2901,14 @@ function VariableValueSelect({ model }) {
2896
2901
  });
2897
2902
  }
2898
2903
  function VariableValueSelectMulti({ model }) {
2899
- const { value, options, key, maxVisibleValues, noValueOnClear, includeAll, isReadOnly } = model.useState();
2904
+ const { value, options, key, maxVisibleValues, noValueOnClear, includeAll } = model.useState();
2900
2905
  const arrayValue = React.useMemo(() => lodash.isArray(value) ? value : [value], [value]);
2901
2906
  const [uncommittedValue, setUncommittedValue] = React.useState(arrayValue);
2902
2907
  const [inputValue, setInputValue] = React.useState("");
2903
- const optionSearcher = React.useMemo(() => getOptionSearcher(options, includeAll), [options, includeAll]);
2908
+ const optionSearcher = React.useMemo(
2909
+ () => getOptionSearcher(options, includeAll),
2910
+ [options, includeAll]
2911
+ );
2904
2912
  React.useEffect(() => {
2905
2913
  setUncommittedValue(arrayValue);
2906
2914
  }, [arrayValue]);
@@ -2925,7 +2933,6 @@ function VariableValueSelectMulti({ model }) {
2925
2933
  placeholder,
2926
2934
  width: "auto",
2927
2935
  inputValue,
2928
- disabled: isReadOnly,
2929
2936
  value: uncommittedValue,
2930
2937
  noMultiValueWrap: true,
2931
2938
  maxVisibleValues: maxVisibleValues != null ? maxVisibleValues : 5,
@@ -2965,7 +2972,7 @@ const OptionWithCheckbox = ({
2965
2972
  const theme = ui.useTheme2();
2966
2973
  const selectStyles = ui.getSelectStyles(theme);
2967
2974
  const optionStyles = ui.useStyles2(getOptionStyles);
2968
- return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$o(__spreadValues$B({
2975
+ return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$o(__spreadValues$A({
2969
2976
  ref: innerRef,
2970
2977
  className: css.cx(selectStyles.option, isFocused && selectStyles.optionFocused)
2971
2978
  }, rest), {
@@ -3067,28 +3074,28 @@ function getEnrichedFiltersRequest(sourceRunner) {
3067
3074
  return null;
3068
3075
  }
3069
3076
 
3070
- var __defProp$A = Object.defineProperty;
3077
+ var __defProp$z = Object.defineProperty;
3071
3078
  var __defProps$n = Object.defineProperties;
3072
3079
  var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
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) => {
3080
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
3081
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
3082
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
3083
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3084
+ var __spreadValues$z = (a, b) => {
3078
3085
  for (var prop in b || (b = {}))
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]);
3086
+ if (__hasOwnProp$z.call(b, prop))
3087
+ __defNormalProp$z(a, prop, b[prop]);
3088
+ if (__getOwnPropSymbols$z)
3089
+ for (var prop of __getOwnPropSymbols$z(b)) {
3090
+ if (__propIsEnum$z.call(b, prop))
3091
+ __defNormalProp$z(a, prop, b[prop]);
3085
3092
  }
3086
3093
  return a;
3087
3094
  };
3088
3095
  var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
3089
3096
  class GroupByVariable extends MultiValueVariable {
3090
3097
  constructor(initialState) {
3091
- super(__spreadProps$n(__spreadValues$A({
3098
+ super(__spreadProps$n(__spreadValues$z({
3092
3099
  isMulti: true,
3093
3100
  name: "",
3094
3101
  value: [],
@@ -3119,7 +3126,7 @@ class GroupByVariable extends MultiValueVariable {
3119
3126
  const queries = getQueriesForVariables(this);
3120
3127
  const otherFilters = this.state.baseFilters || [];
3121
3128
  const timeRange = sceneGraph.getTimeRange(this).state.value;
3122
- let keys = await ds.getTagKeys(__spreadValues$A({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3129
+ let keys = await ds.getTagKeys(__spreadValues$z({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3123
3130
  if (override) {
3124
3131
  keys = keys.concat(override.values);
3125
3132
  }
@@ -3668,21 +3675,21 @@ function isFilter(filter) {
3668
3675
  return filter !== null && typeof filter.key === "string" && typeof filter.value === "string";
3669
3676
  }
3670
3677
 
3671
- var __defProp$z = Object.defineProperty;
3678
+ var __defProp$y = Object.defineProperty;
3672
3679
  var __defProps$m = Object.defineProperties;
3673
3680
  var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
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) => {
3681
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
3682
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
3683
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
3684
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3685
+ var __spreadValues$y = (a, b) => {
3679
3686
  for (var prop in b || (b = {}))
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]);
3687
+ if (__hasOwnProp$y.call(b, prop))
3688
+ __defNormalProp$y(a, prop, b[prop]);
3689
+ if (__getOwnPropSymbols$y)
3690
+ for (var prop of __getOwnPropSymbols$y(b)) {
3691
+ if (__propIsEnum$y.call(b, prop))
3692
+ __defNormalProp$y(a, prop, b[prop]);
3686
3693
  }
3687
3694
  return a;
3688
3695
  };
@@ -3690,7 +3697,7 @@ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
3690
3697
  class AdHocFiltersVariable extends SceneObjectBase {
3691
3698
  constructor(state) {
3692
3699
  var _a, _b;
3693
- super(__spreadValues$z({
3700
+ super(__spreadValues$y({
3694
3701
  type: "adhoc",
3695
3702
  name: (_a = state.name) != null ? _a : "Filters",
3696
3703
  filters: [],
@@ -3727,15 +3734,15 @@ class AdHocFiltersVariable extends SceneObjectBase {
3727
3734
  const propLabelKey = `${prop}Label`;
3728
3735
  if (filter === _wip) {
3729
3736
  if (prop === "value") {
3730
- this.setState({ filters: [...filters, __spreadProps$m(__spreadValues$z({}, _wip), { [prop]: value, [propLabelKey]: label })], _wip: void 0 });
3737
+ this.setState({ filters: [...filters, __spreadProps$m(__spreadValues$y({}, _wip), { [prop]: value, [propLabelKey]: label })], _wip: void 0 });
3731
3738
  } else {
3732
- this.setState({ _wip: __spreadProps$m(__spreadValues$z({}, filter), { [prop]: value, [propLabelKey]: label }) });
3739
+ this.setState({ _wip: __spreadProps$m(__spreadValues$y({}, filter), { [prop]: value, [propLabelKey]: label }) });
3733
3740
  }
3734
3741
  return;
3735
3742
  }
3736
3743
  const updatedFilters = this.state.filters.map((f) => {
3737
3744
  if (f === filter) {
3738
- const updatedFilter = __spreadProps$m(__spreadValues$z({}, f), { [prop]: value, [propLabelKey]: label });
3745
+ const updatedFilter = __spreadProps$m(__spreadValues$y({}, f), { [prop]: value, [propLabelKey]: label });
3739
3746
  if (prop === "key" && filter[prop] !== value) {
3740
3747
  updatedFilter.value = "";
3741
3748
  updatedFilter.valueLabel = "";
@@ -3769,7 +3776,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
3769
3776
  const otherFilters = this.state.filters.filter((f) => f.key !== currentKey).concat((_c = this.state.baseFilters) != null ? _c : []);
3770
3777
  const timeRange = sceneGraph.getTimeRange(this).state.value;
3771
3778
  const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : void 0;
3772
- let keys = await ds.getTagKeys(__spreadValues$z({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3779
+ let keys = await ds.getTagKeys(__spreadValues$y({ filters: otherFilters, queries, timeRange }, getEnrichedFiltersRequest(this)));
3773
3780
  if (override) {
3774
3781
  keys = keys.concat(override.values);
3775
3782
  }
@@ -3792,7 +3799,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
3792
3799
  const otherFilters = this.state.filters.filter((f) => f.key !== filter.key).concat((_c = this.state.baseFilters) != null ? _c : []);
3793
3800
  const timeRange = sceneGraph.getTimeRange(this).state.value;
3794
3801
  const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : void 0;
3795
- let values = await ds.getTagValues(__spreadValues$z({
3802
+ let values = await ds.getTagValues(__spreadValues$y({
3796
3803
  key: filter.key,
3797
3804
  filters: otherFilters,
3798
3805
  timeRange,
@@ -3919,21 +3926,21 @@ function areDifferentLayers(a, b) {
3919
3926
  return false;
3920
3927
  }
3921
3928
 
3922
- var __defProp$y = Object.defineProperty;
3929
+ var __defProp$x = Object.defineProperty;
3923
3930
  var __defProps$l = Object.defineProperties;
3924
3931
  var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
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) => {
3932
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
3933
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
3934
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
3935
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3936
+ var __spreadValues$x = (a, b) => {
3930
3937
  for (var prop in b || (b = {}))
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]);
3938
+ if (__hasOwnProp$x.call(b, prop))
3939
+ __defNormalProp$x(a, prop, b[prop]);
3940
+ if (__getOwnPropSymbols$x)
3941
+ for (var prop of __getOwnPropSymbols$x(b)) {
3942
+ if (__propIsEnum$x.call(b, prop))
3943
+ __defNormalProp$x(a, prop, b[prop]);
3937
3944
  }
3938
3945
  return a;
3939
3946
  };
@@ -4035,9 +4042,9 @@ class SceneQueryRunner extends SceneObjectBase {
4035
4042
  return;
4036
4043
  }
4037
4044
  this._layerAnnotations = annotations;
4038
- const baseStateUpdate = this.state.data ? this.state.data : __spreadProps$l(__spreadValues$y({}, emptyPanelData), { timeRange: timeRange.state.value });
4045
+ const baseStateUpdate = this.state.data ? this.state.data : __spreadProps$l(__spreadValues$x({}, emptyPanelData), { timeRange: timeRange.state.value });
4039
4046
  this.setState({
4040
- data: __spreadProps$l(__spreadValues$y({}, baseStateUpdate), {
4047
+ data: __spreadProps$l(__spreadValues$x({}, baseStateUpdate), {
4041
4048
  annotations: [...(_d = this._resultAnnotations) != null ? _d : [], ...annotations],
4042
4049
  alertState: alertState != null ? alertState : (_e = this.state.data) == null ? void 0 : _e.alertState
4043
4050
  })
@@ -4156,7 +4163,7 @@ class SceneQueryRunner extends SceneObjectBase {
4156
4163
  this._dataLayersSub = void 0;
4157
4164
  }
4158
4165
  this.setState({
4159
- data: __spreadProps$l(__spreadValues$y({}, this.state.data), { state: schema.LoadingState.Done })
4166
+ data: __spreadProps$l(__spreadValues$x({}, this.state.data), { state: schema.LoadingState.Done })
4160
4167
  });
4161
4168
  }
4162
4169
  async runWithTimeRange(timeRange) {
@@ -4170,7 +4177,7 @@ class SceneQueryRunner extends SceneObjectBase {
4170
4177
  (_a = this._querySub) == null ? void 0 : _a.unsubscribe();
4171
4178
  if (this._variableDependency.hasDependencyInLoadingState()) {
4172
4179
  writeSceneLog("SceneQueryRunner", "Variable dependency is in loading state, skipping query execution");
4173
- this.setState({ data: __spreadProps$l(__spreadValues$y({}, this.state.data), { state: schema.LoadingState.Loading }) });
4180
+ this.setState({ data: __spreadProps$l(__spreadValues$x({}, this.state.data), { state: schema.LoadingState.Loading }) });
4174
4181
  return;
4175
4182
  }
4176
4183
  const { queries } = this.state;
@@ -4202,7 +4209,7 @@ class SceneQueryRunner extends SceneObjectBase {
4202
4209
  this._querySub = stream.subscribe(this.onDataReceived);
4203
4210
  } catch (err) {
4204
4211
  console.error("PanelQueryRunner Error", err);
4205
- this.onDataReceived(__spreadProps$l(__spreadValues$y(__spreadValues$y({}, emptyPanelData), this.state.data), {
4212
+ this.onDataReceived(__spreadProps$l(__spreadValues$x(__spreadValues$x({}, emptyPanelData), this.state.data), {
4206
4213
  state: schema.LoadingState.Error,
4207
4214
  errors: [runtime.toDataQueryError(err)]
4208
4215
  }));
@@ -4212,10 +4219,10 @@ class SceneQueryRunner extends SceneObjectBase {
4212
4219
  var _a;
4213
4220
  const clone = super.clone(withState);
4214
4221
  if (this._resultAnnotations) {
4215
- clone["_resultAnnotations"] = this._resultAnnotations.map((frame) => __spreadValues$y({}, frame));
4222
+ clone["_resultAnnotations"] = this._resultAnnotations.map((frame) => __spreadValues$x({}, frame));
4216
4223
  }
4217
4224
  if (this._layerAnnotations) {
4218
- clone["_layerAnnotations"] = this._layerAnnotations.map((frame) => __spreadValues$y({}, frame));
4225
+ clone["_layerAnnotations"] = this._layerAnnotations.map((frame) => __spreadValues$x({}, frame));
4219
4226
  }
4220
4227
  clone["_variableValueRecorder"] = this._variableValueRecorder.cloneAndRecordCurrentValuesForSceneObject(this);
4221
4228
  clone["_containerWidth"] = this._containerWidth;
@@ -4225,7 +4232,7 @@ class SceneQueryRunner extends SceneObjectBase {
4225
4232
  prepareRequests(timeRange, ds) {
4226
4233
  var _a;
4227
4234
  const { minInterval, queries } = this.state;
4228
- let request = __spreadValues$y({
4235
+ let request = __spreadValues$x({
4229
4236
  app: "scenes",
4230
4237
  requestId: getNextRequestId$1(),
4231
4238
  timezone: timeRange.getTimeZone(),
@@ -4271,7 +4278,7 @@ class SceneQueryRunner extends SceneObjectBase {
4271
4278
  for (const provider of (_a = this.getClosestExtraQueryProviders()) != null ? _a : []) {
4272
4279
  for (const { req, processor } of provider.getExtraQueries(request)) {
4273
4280
  const requestId = getNextRequestId$1();
4274
- secondaryRequests.push(__spreadProps$l(__spreadValues$y({}, req), { requestId }));
4281
+ secondaryRequests.push(__spreadProps$l(__spreadValues$x({}, req), { requestId }));
4275
4282
  secondaryProcessors.set(requestId, processor != null ? processor : passthroughProcessor);
4276
4283
  }
4277
4284
  }
@@ -4507,28 +4514,28 @@ class ActWhenVariableChanged extends SceneObjectBase {
4507
4514
  }
4508
4515
  }
4509
4516
 
4510
- var __defProp$x = Object.defineProperty;
4517
+ var __defProp$w = Object.defineProperty;
4511
4518
  var __defProps$k = Object.defineProperties;
4512
4519
  var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
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) => {
4520
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
4521
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
4522
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
4523
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4524
+ var __spreadValues$w = (a, b) => {
4518
4525
  for (var prop in b || (b = {}))
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]);
4526
+ if (__hasOwnProp$w.call(b, prop))
4527
+ __defNormalProp$w(a, prop, b[prop]);
4528
+ if (__getOwnPropSymbols$w)
4529
+ for (var prop of __getOwnPropSymbols$w(b)) {
4530
+ if (__propIsEnum$w.call(b, prop))
4531
+ __defNormalProp$w(a, prop, b[prop]);
4525
4532
  }
4526
4533
  return a;
4527
4534
  };
4528
4535
  var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
4529
4536
  class CursorSync extends SceneObjectBase {
4530
4537
  constructor(state) {
4531
- super(__spreadProps$k(__spreadValues$x({}, state), {
4538
+ super(__spreadProps$k(__spreadValues$w({}, state), {
4532
4539
  sync: state.sync || schema.DashboardCursorSync.Off
4533
4540
  }));
4534
4541
  this.getEventsBus = (panel) => {
@@ -4792,21 +4799,21 @@ const getAlertStateStyles = (theme) => {
4792
4799
  };
4793
4800
  };
4794
4801
 
4795
- var __defProp$w = Object.defineProperty;
4802
+ var __defProp$v = Object.defineProperty;
4796
4803
  var __defProps$j = Object.defineProperties;
4797
4804
  var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
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) => {
4805
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
4806
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
4807
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
4808
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4809
+ var __spreadValues$v = (a, b) => {
4803
4810
  for (var prop in b || (b = {}))
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]);
4811
+ if (__hasOwnProp$v.call(b, prop))
4812
+ __defNormalProp$v(a, prop, b[prop]);
4813
+ if (__getOwnPropSymbols$v)
4814
+ for (var prop of __getOwnPropSymbols$v(b)) {
4815
+ if (__propIsEnum$v.call(b, prop))
4816
+ __defNormalProp$v(a, prop, b[prop]);
4810
4817
  }
4811
4818
  return a;
4812
4819
  };
@@ -4820,13 +4827,13 @@ function seriesVisibilityConfigFactory(label, mode, fieldConfig, data) {
4820
4827
  if (currentIndex < 0) {
4821
4828
  if (mode === ui.SeriesVisibilityChangeMode.ToggleSelection) {
4822
4829
  const override3 = createOverride$1([displayName, ...getNamesOfHiddenFields(overrides, data)]);
4823
- return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4830
+ return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4824
4831
  overrides: [...fieldConfig.overrides, override3]
4825
4832
  });
4826
4833
  }
4827
4834
  const displayNames = getDisplayNames(data, displayName);
4828
4835
  const override2 = createOverride$1(displayNames);
4829
- return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4836
+ return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4830
4837
  overrides: [...fieldConfig.overrides, override2]
4831
4838
  });
4832
4839
  }
@@ -4839,22 +4846,22 @@ function seriesVisibilityConfigFactory(label, mode, fieldConfig, data) {
4839
4846
  existing = existing.filter((el) => nameOfHiddenFields.indexOf(el) < 0);
4840
4847
  }
4841
4848
  if (existing[0] === displayName && existing.length === 1) {
4842
- return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4849
+ return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4843
4850
  overrides: overridesCopy
4844
4851
  });
4845
4852
  }
4846
4853
  const override2 = createOverride$1([displayName, ...nameOfHiddenFields]);
4847
- return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4854
+ return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4848
4855
  overrides: [...overridesCopy, override2]
4849
4856
  });
4850
4857
  }
4851
4858
  const override = createExtendedOverride(current, displayName);
4852
4859
  if (allFieldsAreExcluded(override, data)) {
4853
- return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4860
+ return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4854
4861
  overrides: overridesCopy
4855
4862
  });
4856
4863
  }
4857
- return __spreadProps$j(__spreadValues$w({}, fieldConfig), {
4864
+ return __spreadProps$j(__spreadValues$v({}, fieldConfig), {
4858
4865
  overrides: [...overridesCopy, override]
4859
4866
  });
4860
4867
  }
@@ -4879,7 +4886,7 @@ function createOverride$1(names, mode = data.ByNamesMatcherMode.exclude, propert
4879
4886
  }
4880
4887
  },
4881
4888
  properties: [
4882
- __spreadProps$j(__spreadValues$w({}, property), {
4889
+ __spreadProps$j(__spreadValues$v({}, property), {
4883
4890
  value: {
4884
4891
  viz: true,
4885
4892
  legend: false,
@@ -4951,21 +4958,21 @@ const getNamesOfHiddenFields = (overrides, data$1) => {
4951
4958
  return names;
4952
4959
  };
4953
4960
 
4954
- var __defProp$v = Object.defineProperty;
4961
+ var __defProp$u = Object.defineProperty;
4955
4962
  var __defProps$i = Object.defineProperties;
4956
4963
  var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
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) => {
4964
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
4965
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
4966
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
4967
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4968
+ var __spreadValues$u = (a, b) => {
4962
4969
  for (var prop in b || (b = {}))
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]);
4970
+ if (__hasOwnProp$u.call(b, prop))
4971
+ __defNormalProp$u(a, prop, b[prop]);
4972
+ if (__getOwnPropSymbols$u)
4973
+ for (var prop of __getOwnPropSymbols$u(b)) {
4974
+ if (__propIsEnum$u.call(b, prop))
4975
+ __defNormalProp$u(a, prop, b[prop]);
4969
4976
  }
4970
4977
  return a;
4971
4978
  };
@@ -4976,7 +4983,7 @@ const changeSeriesColorConfigFactory = (label, color, fieldConfig) => {
4976
4983
  return override.matcher.id === data.FieldMatcherID.byName && override.matcher.options === label;
4977
4984
  });
4978
4985
  if (currentIndex < 0) {
4979
- return __spreadProps$i(__spreadValues$v({}, fieldConfig), {
4986
+ return __spreadProps$i(__spreadValues$u({}, fieldConfig), {
4980
4987
  overrides: [...fieldConfig.overrides, createOverride(label, color)]
4981
4988
  });
4982
4989
  }
@@ -4984,19 +4991,19 @@ const changeSeriesColorConfigFactory = (label, color, fieldConfig) => {
4984
4991
  const existing = overridesCopy[currentIndex];
4985
4992
  const propertyIndex = existing.properties.findIndex((p) => p.id === "color");
4986
4993
  if (propertyIndex < 0) {
4987
- overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$v({}, existing), {
4994
+ overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$u({}, existing), {
4988
4995
  properties: [...existing.properties, createProperty(color)]
4989
4996
  });
4990
- return __spreadProps$i(__spreadValues$v({}, fieldConfig), {
4997
+ return __spreadProps$i(__spreadValues$u({}, fieldConfig), {
4991
4998
  overrides: overridesCopy
4992
4999
  });
4993
5000
  }
4994
5001
  const propertiesCopy = Array.from(existing.properties);
4995
5002
  propertiesCopy[propertyIndex] = createProperty(color);
4996
- overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$v({}, existing), {
5003
+ overridesCopy[currentIndex] = __spreadProps$i(__spreadValues$u({}, existing), {
4997
5004
  properties: propertiesCopy
4998
5005
  });
4999
- return __spreadProps$i(__spreadValues$v({}, fieldConfig), {
5006
+ return __spreadProps$i(__spreadValues$u({}, fieldConfig), {
5000
5007
  overrides: overridesCopy
5001
5008
  });
5002
5009
  };
@@ -5019,21 +5026,21 @@ const createProperty = (color) => {
5019
5026
  };
5020
5027
  };
5021
5028
 
5022
- var __defProp$u = Object.defineProperty;
5029
+ var __defProp$t = Object.defineProperty;
5023
5030
  var __defProps$h = Object.defineProperties;
5024
5031
  var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
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) => {
5032
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
5033
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
5034
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
5035
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5036
+ var __spreadValues$t = (a, b) => {
5030
5037
  for (var prop in b || (b = {}))
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]);
5038
+ if (__hasOwnProp$t.call(b, prop))
5039
+ __defNormalProp$t(a, prop, b[prop]);
5040
+ if (__getOwnPropSymbols$t)
5041
+ for (var prop of __getOwnPropSymbols$t(b)) {
5042
+ if (__propIsEnum$t.call(b, prop))
5043
+ __defNormalProp$t(a, prop, b[prop]);
5037
5044
  }
5038
5045
  return a;
5039
5046
  };
@@ -5041,7 +5048,7 @@ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
5041
5048
  class VizPanel extends SceneObjectBase {
5042
5049
  constructor(state) {
5043
5050
  var _a;
5044
- super(__spreadValues$u({
5051
+ super(__spreadValues$t({
5045
5052
  options: {},
5046
5053
  fieldConfig: { defaults: {}, overrides: [] },
5047
5054
  title: "Title",
@@ -5154,7 +5161,7 @@ class VizPanel extends SceneObjectBase {
5154
5161
  };
5155
5162
  this._onInstanceStateChange = (state) => {
5156
5163
  if (this._panelContext) {
5157
- this._panelContext = __spreadProps$h(__spreadValues$u({}, this._panelContext), {
5164
+ this._panelContext = __spreadProps$h(__spreadValues$t({}, this._panelContext), {
5158
5165
  instanceState: state
5159
5166
  });
5160
5167
  }
@@ -5178,8 +5185,8 @@ class VizPanel extends SceneObjectBase {
5178
5185
  sortBy = sortKey;
5179
5186
  }
5180
5187
  this.onOptionsChange(
5181
- __spreadProps$h(__spreadValues$u({}, this.state.options), {
5182
- legend: __spreadProps$h(__spreadValues$u({}, legendOptions), { sortBy, sortDesc })
5188
+ __spreadProps$h(__spreadValues$t({}, this.state.options), {
5189
+ legend: __spreadProps$h(__spreadValues$t({}, legendOptions), { sortBy, sortDesc })
5183
5190
  }),
5184
5191
  true
5185
5192
  );
@@ -5289,7 +5296,7 @@ class VizPanel extends SceneObjectBase {
5289
5296
  if (!data.compareArrayValues(newFrames, prevFrames, data.compareDataFrameStructures)) {
5290
5297
  this._structureRev++;
5291
5298
  }
5292
- this._dataWithFieldConfig = __spreadProps$h(__spreadValues$u({}, rawData), {
5299
+ this._dataWithFieldConfig = __spreadProps$h(__spreadValues$t({}, rawData), {
5293
5300
  structureRev: this._structureRev,
5294
5301
  series: newFrames
5295
5302
  });
@@ -5432,25 +5439,25 @@ function getMessageFromError(err) {
5432
5439
  return JSON.stringify(err);
5433
5440
  }
5434
5441
 
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) => {
5442
+ var __defProp$s = Object.defineProperty;
5443
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
5444
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
5445
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
5446
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5447
+ var __spreadValues$s = (a, b) => {
5441
5448
  for (var prop in b || (b = {}))
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]);
5449
+ if (__hasOwnProp$s.call(b, prop))
5450
+ __defNormalProp$s(a, prop, b[prop]);
5451
+ if (__getOwnPropSymbols$s)
5452
+ for (var prop of __getOwnPropSymbols$s(b)) {
5453
+ if (__propIsEnum$s.call(b, prop))
5454
+ __defNormalProp$s(a, prop, b[prop]);
5448
5455
  }
5449
5456
  return a;
5450
5457
  };
5451
5458
  class SceneDataLayerBase extends SceneObjectBase {
5452
5459
  constructor(initialState, variableDependencyStatePaths = []) {
5453
- super(__spreadValues$t({
5460
+ super(__spreadValues$s({
5454
5461
  isEnabled: true
5455
5462
  }, initialState));
5456
5463
  this._results = new rxjs.ReplaySubject(1);
@@ -5572,21 +5579,21 @@ function DataLayerControlSwitch({ layer }) {
5572
5579
  }
5573
5580
  const containerStyle$1 = css.css({ display: "flex" });
5574
5581
 
5575
- var __defProp$s = Object.defineProperty;
5582
+ var __defProp$r = Object.defineProperty;
5576
5583
  var __defProps$g = Object.defineProperties;
5577
5584
  var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
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) => {
5585
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
5586
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
5587
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
5588
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5589
+ var __spreadValues$r = (a, b) => {
5583
5590
  for (var prop in b || (b = {}))
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]);
5591
+ if (__hasOwnProp$r.call(b, prop))
5592
+ __defNormalProp$r(a, prop, b[prop]);
5593
+ if (__getOwnPropSymbols$r)
5594
+ for (var prop of __getOwnPropSymbols$r(b)) {
5595
+ if (__propIsEnum$r.call(b, prop))
5596
+ __defNormalProp$r(a, prop, b[prop]);
5590
5597
  }
5591
5598
  return a;
5592
5599
  };
@@ -5594,11 +5601,11 @@ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
5594
5601
  var __objRest$2 = (source, exclude) => {
5595
5602
  var target = {};
5596
5603
  for (var prop in source)
5597
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
5604
+ if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
5598
5605
  target[prop] = 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
+ if (source != null && __getOwnPropSymbols$r)
5607
+ for (var prop of __getOwnPropSymbols$r(source)) {
5608
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
5602
5609
  target[prop] = source[prop];
5603
5610
  }
5604
5611
  return target;
@@ -5607,7 +5614,7 @@ const standardAnnotationSupport = {
5607
5614
  prepareAnnotation: (json) => {
5608
5615
  if (lodash.isString(json == null ? void 0 : json.query)) {
5609
5616
  const _a = json, { query } = _a, rest = __objRest$2(_a, ["query"]);
5610
- return __spreadProps$g(__spreadValues$s({}, rest), {
5617
+ return __spreadProps$g(__spreadValues$r({}, rest), {
5611
5618
  target: {
5612
5619
  refId: "annotation_query",
5613
5620
  query
@@ -5775,21 +5782,21 @@ function shouldUseLegacyRunner(datasource) {
5775
5782
  return !datasource.annotations || legacyRunner.includes(type);
5776
5783
  }
5777
5784
 
5778
- var __defProp$r = Object.defineProperty;
5785
+ var __defProp$q = Object.defineProperty;
5779
5786
  var __defProps$f = Object.defineProperties;
5780
5787
  var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
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) => {
5788
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
5789
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
5790
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
5791
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5792
+ var __spreadValues$q = (a, b) => {
5786
5793
  for (var prop in b || (b = {}))
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]);
5794
+ if (__hasOwnProp$q.call(b, prop))
5795
+ __defNormalProp$q(a, prop, b[prop]);
5796
+ if (__getOwnPropSymbols$q)
5797
+ for (var prop of __getOwnPropSymbols$q(b)) {
5798
+ if (__propIsEnum$q.call(b, prop))
5799
+ __defNormalProp$q(a, prop, b[prop]);
5793
5800
  }
5794
5801
  return a;
5795
5802
  };
@@ -5816,8 +5823,8 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5816
5823
  }))
5817
5824
  );
5818
5825
  }
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);
5826
+ const processor = __spreadValues$q(__spreadValues$q({}, standardAnnotationSupport), datasource.annotations);
5827
+ const annotationWithDefaults = __spreadValues$q(__spreadValues$q({}, (_a = processor.getDefaultQuery) == null ? void 0 : _a.call(processor)), query);
5821
5828
  const annotation = processor.prepareAnnotation(annotationWithDefaults);
5822
5829
  if (!annotation) {
5823
5830
  return rxjs.of({
@@ -5840,7 +5847,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5840
5847
  __annotation: { text: annotation.name, value: annotation },
5841
5848
  __sceneObject: { text: "__sceneObject", value: layer }
5842
5849
  };
5843
- const queryRequest = __spreadValues$r(__spreadProps$f(__spreadValues$r({
5850
+ const queryRequest = __spreadValues$q(__spreadProps$f(__spreadValues$q({
5844
5851
  startTime: Date.now(),
5845
5852
  requestId: getNextRequestId(),
5846
5853
  range: timeRange.state.value,
@@ -5850,7 +5857,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5850
5857
  app: data.CoreApp.Dashboard,
5851
5858
  timezone: timeRange.getTimeZone(),
5852
5859
  targets: [
5853
- __spreadProps$f(__spreadValues$r({}, processedQuery), {
5860
+ __spreadProps$f(__spreadValues$q({}, processedQuery), {
5854
5861
  refId: "Anno"
5855
5862
  })
5856
5863
  ]
@@ -5868,7 +5875,7 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5868
5875
  data$1.forEach((frame) => {
5869
5876
  var _a2;
5870
5877
  if (!((_a2 = frame.meta) == null ? void 0 : _a2.dataTopic)) {
5871
- frame.meta = __spreadProps$f(__spreadValues$r({}, frame.meta || {}), { dataTopic: data.DataTopic.Annotations });
5878
+ frame.meta = __spreadProps$f(__spreadValues$q({}, frame.meta || {}), { dataTopic: data.DataTopic.Annotations });
5872
5879
  }
5873
5880
  });
5874
5881
  return processor.processEvents(annotation, data$1).pipe(
@@ -5883,19 +5890,19 @@ function executeAnnotationQuery(datasource, timeRange, query, layer) {
5883
5890
  );
5884
5891
  }
5885
5892
 
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) => {
5893
+ var __defProp$p = Object.defineProperty;
5894
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
5895
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
5896
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
5897
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5898
+ var __spreadValues$p = (a, b) => {
5892
5899
  for (var prop in b || (b = {}))
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]);
5900
+ if (__hasOwnProp$p.call(b, prop))
5901
+ __defNormalProp$p(a, prop, b[prop]);
5902
+ if (__getOwnPropSymbols$p)
5903
+ for (var prop of __getOwnPropSymbols$p(b)) {
5904
+ if (__propIsEnum$p.call(b, prop))
5905
+ __defNormalProp$p(a, prop, b[prop]);
5899
5906
  }
5900
5907
  return a;
5901
5908
  };
@@ -5906,7 +5913,7 @@ function postProcessQueryResult(annotation, results) {
5906
5913
  }
5907
5914
  const processed = results.map((item) => {
5908
5915
  var _a;
5909
- const processedItem = __spreadValues$q({}, item);
5916
+ const processedItem = __spreadValues$p({}, item);
5910
5917
  processedItem.source = annotation;
5911
5918
  processedItem.color = runtime.config.theme2.visualization.getColorByName(annotation.iconColor);
5912
5919
  processedItem.type = annotation.name;
@@ -5955,21 +5962,21 @@ function isPanelAlert(event) {
5955
5962
  return event.eventType === "panel-alert";
5956
5963
  }
5957
5964
 
5958
- var __defProp$p = Object.defineProperty;
5965
+ var __defProp$o = Object.defineProperty;
5959
5966
  var __defProps$e = Object.defineProperties;
5960
5967
  var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
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) => {
5968
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
5969
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
5970
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
5971
+ var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5972
+ var __spreadValues$o = (a, b) => {
5966
5973
  for (var prop in b || (b = {}))
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]);
5974
+ if (__hasOwnProp$o.call(b, prop))
5975
+ __defNormalProp$o(a, prop, b[prop]);
5976
+ if (__getOwnPropSymbols$o)
5977
+ for (var prop of __getOwnPropSymbols$o(b)) {
5978
+ if (__propIsEnum$o.call(b, prop))
5979
+ __defNormalProp$o(a, prop, b[prop]);
5973
5980
  }
5974
5981
  return a;
5975
5982
  };
@@ -5977,7 +5984,7 @@ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
5977
5984
  class AnnotationsDataLayer extends SceneDataLayerBase {
5978
5985
  constructor(initialState) {
5979
5986
  super(
5980
- __spreadValues$p({
5987
+ __spreadValues$o({
5981
5988
  isEnabled: true
5982
5989
  }, initialState),
5983
5990
  ["query"]
@@ -6025,7 +6032,7 @@ class AnnotationsDataLayer extends SceneDataLayerBase {
6025
6032
  this.publishResults(stateUpdate);
6026
6033
  });
6027
6034
  } catch (e) {
6028
- this.publishResults(__spreadProps$e(__spreadValues$p({}, emptyPanelData), {
6035
+ this.publishResults(__spreadProps$e(__spreadValues$o({}, emptyPanelData), {
6029
6036
  state: schema.LoadingState.Error,
6030
6037
  errors: [
6031
6038
  {
@@ -6042,9 +6049,9 @@ class AnnotationsDataLayer extends SceneDataLayerBase {
6042
6049
  processEvents(query, events) {
6043
6050
  let processedEvents = postProcessQueryResult(query, events.events || []);
6044
6051
  processedEvents = dedupAnnotations(processedEvents);
6045
- const stateUpdate = __spreadProps$e(__spreadValues$p({}, emptyPanelData), { state: events.state });
6052
+ const stateUpdate = __spreadProps$e(__spreadValues$o({}, emptyPanelData), { state: events.state });
6046
6053
  const df = data.arrayToDataFrame(processedEvents);
6047
- df.meta = __spreadProps$e(__spreadValues$p({}, df.meta), {
6054
+ df.meta = __spreadProps$e(__spreadValues$o({}, df.meta), {
6048
6055
  dataTopic: data.DataTopic.Annotations
6049
6056
  });
6050
6057
  stateUpdate.series = [df];
@@ -6097,28 +6104,28 @@ class SceneTimeRangeTransformerBase extends SceneObjectBase {
6097
6104
  }
6098
6105
  }
6099
6106
 
6100
- var __defProp$o = Object.defineProperty;
6107
+ var __defProp$n = Object.defineProperty;
6101
6108
  var __defProps$d = Object.defineProperties;
6102
6109
  var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
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) => {
6110
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
6111
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
6112
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
6113
+ var __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6114
+ var __spreadValues$n = (a, b) => {
6108
6115
  for (var prop in b || (b = {}))
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]);
6116
+ if (__hasOwnProp$n.call(b, prop))
6117
+ __defNormalProp$n(a, prop, b[prop]);
6118
+ if (__getOwnPropSymbols$n)
6119
+ for (var prop of __getOwnPropSymbols$n(b)) {
6120
+ if (__propIsEnum$n.call(b, prop))
6121
+ __defNormalProp$n(a, prop, b[prop]);
6115
6122
  }
6116
6123
  return a;
6117
6124
  };
6118
6125
  var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
6119
6126
  class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
6120
6127
  constructor(state) {
6121
- super(__spreadProps$d(__spreadValues$o({}, state), {
6128
+ super(__spreadProps$d(__spreadValues$n({}, state), {
6122
6129
  timeZone: state.timeZone,
6123
6130
  from: "now-6h",
6124
6131
  to: "now",
@@ -6126,7 +6133,7 @@ class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
6126
6133
  }));
6127
6134
  }
6128
6135
  ancestorTimeRangeChanged(timeRange) {
6129
- this.setState(__spreadProps$d(__spreadValues$o({}, timeRange), {
6136
+ this.setState(__spreadProps$d(__spreadValues$n({}, timeRange), {
6130
6137
  timeZone: this.state.timeZone,
6131
6138
  value: evaluateTimeRange(
6132
6139
  timeRange.from,
@@ -6154,21 +6161,21 @@ class SceneTimeZoneOverride extends SceneTimeRangeTransformerBase {
6154
6161
  }
6155
6162
  }
6156
6163
 
6157
- var __defProp$n = Object.defineProperty;
6164
+ var __defProp$m = Object.defineProperty;
6158
6165
  var __defProps$c = Object.defineProperties;
6159
6166
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
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) => {
6167
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
6168
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
6169
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
6170
+ var __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6171
+ var __spreadValues$m = (a, b) => {
6165
6172
  for (var prop in b || (b = {}))
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]);
6173
+ if (__hasOwnProp$m.call(b, prop))
6174
+ __defNormalProp$m(a, prop, b[prop]);
6175
+ if (__getOwnPropSymbols$m)
6176
+ for (var prop of __getOwnPropSymbols$m(b)) {
6177
+ if (__propIsEnum$m.call(b, prop))
6178
+ __defNormalProp$m(a, prop, b[prop]);
6172
6179
  }
6173
6180
  return a;
6174
6181
  };
@@ -6196,7 +6203,7 @@ class SceneDataLayerSetBase extends SceneObjectBase {
6196
6203
  series = series.concat(result.data.series);
6197
6204
  }
6198
6205
  }
6199
- const combinedData = __spreadProps$c(__spreadValues$n({}, emptyPanelData), { series });
6206
+ const combinedData = __spreadProps$c(__spreadValues$m({}, emptyPanelData), { series });
6200
6207
  this._results.next({ origin: this, data: combinedData });
6201
6208
  this.setStateHelper({ data: combinedData });
6202
6209
  }
@@ -6245,21 +6252,21 @@ SceneDataLayerSet.Component = ({ model }) => {
6245
6252
  })));
6246
6253
  };
6247
6254
 
6248
- var __defProp$m = Object.defineProperty;
6255
+ var __defProp$l = Object.defineProperty;
6249
6256
  var __defProps$b = Object.defineProperties;
6250
6257
  var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
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) => {
6258
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
6259
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
6260
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
6261
+ var __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6262
+ var __spreadValues$l = (a, b) => {
6256
6263
  for (var prop in b || (b = {}))
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]);
6264
+ if (__hasOwnProp$l.call(b, prop))
6265
+ __defNormalProp$l(a, prop, b[prop]);
6266
+ if (__getOwnPropSymbols$l)
6267
+ for (var prop of __getOwnPropSymbols$l(b)) {
6268
+ if (__propIsEnum$l.call(b, prop))
6269
+ __defNormalProp$l(a, prop, b[prop]);
6263
6270
  }
6264
6271
  return a;
6265
6272
  };
@@ -6340,7 +6347,7 @@ class SceneDataTransformer extends SceneObjectBase {
6340
6347
  const { series, annotations } = this._prevDataFromSource;
6341
6348
  if (data.series === series && data.annotations === annotations) {
6342
6349
  if (this.state.data && data.state !== this.state.data.state) {
6343
- this.setState({ data: __spreadProps$b(__spreadValues$m({}, this.state.data), { state: data.state }) });
6350
+ this.setState({ data: __spreadProps$b(__spreadValues$l({}, this.state.data), { state: data.state }) });
6344
6351
  }
6345
6352
  return true;
6346
6353
  }
@@ -6388,7 +6395,7 @@ class SceneDataTransformer extends SceneObjectBase {
6388
6395
  rxjs.map((values) => {
6389
6396
  const transformedSeries = values[0];
6390
6397
  const transformedAnnotations = values[1];
6391
- return __spreadProps$b(__spreadValues$m({}, data$1), {
6398
+ return __spreadProps$b(__spreadValues$l({}, data$1), {
6392
6399
  series: transformedSeries,
6393
6400
  annotations: transformedAnnotations != null ? transformedAnnotations : data$1.annotations
6394
6401
  });
@@ -6399,7 +6406,7 @@ class SceneDataTransformer extends SceneObjectBase {
6399
6406
  const sourceErr = ((_a2 = this.getSourceData().state.data) == null ? void 0 : _a2.errors) || [];
6400
6407
  const transformationError = runtime.toDataQueryError(err);
6401
6408
  transformationError.message = `Error transforming data: ${transformationError.message}`;
6402
- const result = __spreadProps$b(__spreadValues$m({}, data$1), {
6409
+ const result = __spreadProps$b(__spreadValues$l({}, data$1), {
6403
6410
  state: data.LoadingState.Error,
6404
6411
  errors: [...sourceErr, transformationError]
6405
6412
  });
@@ -6734,41 +6741,9 @@ class SceneVariableSetVariableDependencyHandler {
6734
6741
  }
6735
6742
  }
6736
6743
 
6737
- var __defProp$l = Object.defineProperty;
6744
+ var __defProp$k = Object.defineProperty;
6738
6745
  var __defProps$a = Object.defineProperties;
6739
6746
  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;
6772
6747
  var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
6773
6748
  var __hasOwnProp$k = Object.prototype.hasOwnProperty;
6774
6749
  var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
@@ -6784,41 +6759,21 @@ var __spreadValues$k = (a, b) => {
6784
6759
  }
6785
6760
  return a;
6786
6761
  };
6787
- class CustomVariable extends MultiValueVariable {
6762
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
6763
+ class ConstantVariable extends SceneObjectBase {
6788
6764
  constructor(initialState) {
6789
- super(__spreadValues$k({
6790
- type: "custom",
6791
- query: "",
6765
+ super(__spreadProps$a(__spreadValues$k({
6766
+ type: "constant",
6792
6767
  value: "",
6793
- text: "",
6794
- options: [],
6795
6768
  name: ""
6796
- }, initialState));
6797
- this._variableDependency = new VariableDependencyConfig(this, {
6798
- statePaths: ["query"]
6799
- });
6769
+ }, initialState), {
6770
+ skipUrlSync: true
6771
+ }));
6800
6772
  }
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);
6773
+ getValue() {
6774
+ return this.state.value;
6817
6775
  }
6818
6776
  }
6819
- CustomVariable.Component = ({ model }) => {
6820
- return renderSelectForVariable(model);
6821
- };
6822
6777
 
6823
6778
  var __defProp$j = Object.defineProperty;
6824
6779
  var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
@@ -6836,11 +6791,10 @@ var __spreadValues$j = (a, b) => {
6836
6791
  }
6837
6792
  return a;
6838
6793
  };
6839
- class SnapshotVariable extends MultiValueVariable {
6794
+ class CustomVariable extends MultiValueVariable {
6840
6795
  constructor(initialState) {
6841
6796
  super(__spreadValues$j({
6842
6797
  type: "custom",
6843
- isReadOnly: true,
6844
6798
  query: "",
6845
6799
  value: "",
6846
6800
  text: "",
@@ -6868,26 +6822,8 @@ class SnapshotVariable extends MultiValueVariable {
6868
6822
  });
6869
6823
  return rxjs.of(options);
6870
6824
  }
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
- }
6889
6825
  }
6890
- SnapshotVariable.Component = ({ model }) => {
6826
+ CustomVariable.Component = ({ model }) => {
6891
6827
  return renderSelectForVariable(model);
6892
6828
  };
6893
6829
 
@@ -11496,7 +11432,6 @@ exports.SceneToolbarButton = SceneToolbarButton;
11496
11432
  exports.SceneToolbarInput = SceneToolbarInput;
11497
11433
  exports.SceneVariableSet = SceneVariableSet;
11498
11434
  exports.SceneVariableValueChangedEvent = SceneVariableValueChangedEvent;
11499
- exports.SnapshotVariable = SnapshotVariable;
11500
11435
  exports.SplitLayout = SplitLayout;
11501
11436
  exports.TestVariable = TestVariable;
11502
11437
  exports.TextBoxVariable = TextBoxVariable;