@ohif/app 3.7.0-beta.7 → 3.7.0-beta.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{270.bundle.4564621556b0f963a004.js → 116.bundle.422d1a76d8daccfed61d.js} +1037 -823
  2. package/dist/{917.bundle.37f76105d2e1a70d94cf.js → 12.bundle.078c14f666c71663ae8e.js} +6 -6
  3. package/dist/{295.bundle.957b1159fec14b9199a1.js → 125.bundle.aeaad798561853bf6939.js} +6 -6
  4. package/dist/{208.bundle.21c449bf9b00123e1db3.js → 128.bundle.fdb6d1d5391b79de4936.js} +6 -6
  5. package/dist/{616.bundle.be469f44809e9b2485b2.js → 150.bundle.c99cc2e1df7cd4085265.js} +163 -106
  6. package/dist/{351.bundle.0742237651aef9694a65.js → 181.bundle.73dd6f63fe0ddc52b7eb.js} +225 -203
  7. package/dist/{351.css → 181.css} +1 -1
  8. package/dist/{606.bundle.5d876f5f3dd8287f0a28.js → 202.bundle.591726b6144882ba0ee0.js} +1459 -811
  9. package/dist/{926.bundle.dbc9d0e591cb9217fda2.js → 220.bundle.f7e1c96c94245e70f2be.js} +990 -400
  10. package/dist/{664.bundle.09abae984223969d1bde.js → 23.bundle.e008ad788170f2ed5569.js} +5 -6
  11. package/dist/{976.bundle.c1df3878a015cdf0e51f.js → 236.bundle.226efc38e453a4aeb7dd.js} +72 -83
  12. package/dist/{55.bundle.550a823e75eb608e8d5e.js → 250.bundle.8bc4553ee5c56bf7cf32.js} +51 -35
  13. package/dist/{973.bundle.f4b8ccf7ad2ff9f6041c.js → 281.bundle.e9554f25a9eeac2f43e6.js} +18 -14
  14. package/dist/{744.bundle.d07b9ad7b31de0ba4956.js → 30.bundle.c8dfb82c70ae9ff67f14.js} +185 -174
  15. package/dist/{192.bundle.1efc10937535a37a17f0.js → 348.bundle.e5082a6425f719eb6658.js} +43 -19
  16. package/dist/{404.bundle.d980e423e9670737ef12.js → 359.bundle.8da7f102410ca9c0c999.js} +13 -19
  17. package/dist/{790.bundle.ed28f0930111217b742a.js → 410.bundle.5d03eeef5b705198bf5e.js} +10 -7
  18. package/dist/{151.bundle.31ea35044218837bf73f.js → 417.bundle.6cadc61b8a455776de31.js} +49 -17
  19. package/dist/{569.bundle.21f8ad57c06a210448b5.js → 451.bundle.e59fcdb1f1d3fbe71cd4.js} +83 -101
  20. package/dist/{581.bundle.dc6197189f7c88c27d4c.js → 471.bundle.b598d406ddfc2666851b.js} +65 -93
  21. package/dist/{199.bundle.7cec631fcf4b8475abda.js → 506.bundle.869288177e788d808aaa.js} +86 -10
  22. package/dist/{935.bundle.deeffff0e4f7b528e3c3.js → 604.bundle.a51f83e64004bca5f497.js} +2 -3
  23. package/dist/{984.bundle.b33e9e702a96c5ae9fb7.js → 663.bundle.6a389399e5196510e0de.js} +67 -37
  24. package/dist/{531.bundle.2a82fb1d69e5b57cc72b.js → 677.bundle.ec5f2b4707db33bd4d8e.js} +731 -447
  25. package/dist/{205.bundle.b5a473c200dcf2bbcdb4.js → 686.bundle.b3dbf84eefbef768843f.js} +6 -6
  26. package/dist/{50.bundle.9b5c9aaaf1188ab0794a.js → 687.bundle.67d721785216e064fc52.js} +218 -9
  27. package/dist/{331.bundle.bd0c13931a21d53086c9.js → 754.bundle.a5c9246c77659eab2739.js} +12413 -7539
  28. package/dist/{728.bundle.d13856835357400fef82.js → 774.bundle.8ba82ee206266eb2da5e.js} +90 -63
  29. package/dist/{381.bundle.0905e683605fcbc0895f.js → 775.bundle.2285e7e0e67878948c0d.js} +16 -16
  30. package/dist/{283.bundle.8ffad59b5844a24b2a62.js → 782.bundle.6d57b35a056506c94352.js} +112 -62
  31. package/dist/{642.bundle.88a563313292ae2cdd2e.js → 814.bundle.ad8ebe6cffa96a5cfc1f.js} +6 -6
  32. package/dist/{799.bundle.758558e64147e5aad612.js → 822.bundle.5cdd9439a62e5c7e902f.js} +81 -34
  33. package/dist/{953.bundle.3b0189ebc11cf0946f18.js → 886.bundle.9e526affbd17b0ed96a6.js} +34 -29
  34. package/dist/{82.bundle.b824c7d8ff72de0fc149.js → 90.bundle.d7a1e818bbbd3bce5419.js} +1397 -366
  35. package/dist/945.min.worker.js +1 -1
  36. package/dist/945.min.worker.js.map +1 -1
  37. package/dist/{707.bundle.0b18a871c9eb8df9e992.js → 967.bundle.8b4adf9b5a7392b51d0c.js} +584 -435
  38. package/dist/app-config.js +7 -7
  39. package/dist/{app.bundle.f0885cb776ab9ae8974b.js → app.bundle.1905c07065c4b93afa5a.js} +69865 -67829
  40. package/dist/app.bundle.css +9 -9
  41. package/dist/assets/yandex-browser-manifest.json +1 -1
  42. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  43. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  44. package/dist/{dicom-microscopy-viewer.bundle.aa60bdf008c32c39cfd7.js → dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js} +5 -4
  45. package/dist/es6-shim.min.js +3569 -2
  46. package/dist/google.js +8 -7
  47. package/dist/index.html +1 -1
  48. package/dist/{index.worker.1c69152d710fa7b84bce.worker.js → index.worker.e62ecca63f1a2e124230.worker.js} +2 -2
  49. package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +1 -0
  50. package/dist/init-service-worker.js +3 -5
  51. package/dist/oidc-client.min.js +10857 -39
  52. package/dist/polyfill.min.js +184 -1
  53. package/dist/silent-refresh.html +18 -9
  54. package/dist/sw.js +1 -1
  55. package/package.json +19 -20
  56. package/dist/780.bundle.fd0f13dc92e9caa0581e.js +0 -4769
  57. package/dist/index.worker.1c69152d710fa7b84bce.worker.js.map +0 -1
  58. /package/dist/{55.css → 250.css} +0 -0
  59. /package/dist/{806.css → 579.css} +0 -0
  60. /package/dist/{707.css → 967.css} +0 -0
@@ -1,11 +1,42 @@
1
1
  "use strict";
2
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[531],{
2
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[677],{
3
3
 
4
- /***/ 38531:
5
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
4
+ /***/ 59677:
5
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
+
7
+
8
+ // EXPORTS
9
+ __webpack_require__.d(__webpack_exports__, {
10
+ eO: () => (/* reexport */ useMachine)
11
+ });
12
+
13
+ // UNUSED EXPORTS: createActorContext, shallowEqual, useActor, useInterpret, useSelector, useSpawn
14
+
15
+ // EXTERNAL MODULE: ../../../node_modules/react/index.js
16
+ var react = __webpack_require__(43001);
17
+ // EXTERNAL MODULE: ../../../node_modules/use-sync-external-store/shim/with-selector.js
18
+ var with_selector = __webpack_require__(56901);
19
+ // EXTERNAL MODULE: ../../../node_modules/xstate/es/index.js + 22 modules
20
+ var es = __webpack_require__(261);
21
+ ;// CONCATENATED MODULE: ../../../node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js
22
+
23
+
24
+ var index = react.useLayoutEffect ;
25
+
26
+ /* harmony default export */ const use_isomorphic_layout_effect_browser_esm = (index);
27
+
28
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useConstant.js
6
29
 
30
+ function useConstant_useConstant(fn) {
31
+ var ref = react.useRef();
32
+ if (!ref.current) {
33
+ ref.current = { v: fn() };
34
+ }
35
+ return ref.current.v;
36
+ }
7
37
 
8
- var __assign = (this && this.__assign) || function () {
38
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useInterpret.js
39
+ var __assign = (undefined && undefined.__assign) || function () {
9
40
  __assign = Object.assign || function(t) {
10
41
  for (var s, i = 1, n = arguments.length; i < n; i++) {
11
42
  s = arguments[i];
@@ -16,7 +47,7 @@ var __assign = (this && this.__assign) || function () {
16
47
  };
17
48
  return __assign.apply(this, arguments);
18
49
  };
19
- var __rest = (this && this.__rest) || function (s, e) {
50
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
20
51
  var t = {};
21
52
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
22
53
  t[p] = s[p];
@@ -27,7 +58,7 @@ var __rest = (this && this.__rest) || function (s, e) {
27
58
  }
28
59
  return t;
29
60
  };
30
- var __read = (this && this.__read) || function (o, n) {
61
+ var __read = (undefined && undefined.__read) || function (o, n) {
31
62
  var m = typeof Symbol === "function" && o[Symbol.iterator];
32
63
  if (!m) return o;
33
64
  var i = m.call(o), r, ar = [], e;
@@ -43,105 +74,174 @@ var __read = (this && this.__read) || function (o, n) {
43
74
  }
44
75
  return ar;
45
76
  };
46
- Object.defineProperty(exports, "__esModule", ({ value: true }));
47
- var react_1 = __webpack_require__(32735);
48
- var xstate_1 = __webpack_require__(87519);
49
- var defaultOptions = {
50
- immediate: false
51
- };
52
- function useMachine(machine, options) {
53
- if (options === void 0) { options = defaultOptions; }
54
- var context = options.context, guards = options.guards, actions = options.actions, activities = options.activities, services = options.services, delays = options.delays, immediate = options.immediate, rehydratedState = options.state, interpreterOptions = __rest(options, ["context", "guards", "actions", "activities", "services", "delays", "immediate", "state"]);
55
- var machineConfig = {
56
- context: context,
57
- guards: guards,
58
- actions: actions,
59
- activities: activities,
60
- services: services,
61
- delays: delays
62
- };
63
- // Reference the machine
64
- var machineRef = react_1.useRef(null);
65
- // Create the machine only once
66
- // See https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily
67
- if (machineRef.current === null) {
68
- machineRef.current = machine.withConfig(machineConfig, __assign(__assign({}, machine.context), context));
69
- }
70
- // Reference the service
71
- var serviceRef = react_1.useRef(null);
72
- // Create the service only once
73
- if (serviceRef.current === null) {
74
- serviceRef.current = xstate_1.interpret(machineRef.current, interpreterOptions).onTransition(function (state) {
75
- // Update the current machine state when a transition occurs
76
- if (state.changed) {
77
- setCurrent(state);
78
- }
79
- });
80
- }
81
- var service = serviceRef.current;
82
- // Make sure actions and services are kept updated when they change.
77
+
78
+
79
+
80
+
81
+ function useIdleInterpreter(getMachine, options) {
82
+ var machine = useConstant_useConstant(function () {
83
+ return typeof getMachine === 'function' ? getMachine() : getMachine;
84
+ });
85
+ if (false) { var _a, initialMachine; }
86
+ var context = options.context, guards = options.guards, actions = options.actions, activities = options.activities, services = options.services, delays = options.delays, rehydratedState = options.state, interpreterOptions = __rest(options, ["context", "guards", "actions", "activities", "services", "delays", "state"]);
87
+ var service = useConstant_useConstant(function () {
88
+ var machineConfig = {
89
+ context: context,
90
+ guards: guards,
91
+ actions: actions,
92
+ activities: activities,
93
+ services: services,
94
+ delays: delays
95
+ };
96
+ var machineWithConfig = machine.withConfig(machineConfig, function () { return (__assign(__assign({}, machine.context), context)); });
97
+ return (0,es/* interpret */.kJ)(machineWithConfig, interpreterOptions);
98
+ });
99
+ // Make sure options are kept updated when they change.
83
100
  // This mutation assignment is safe because the service instance is only used
84
101
  // in one place -- this hook's caller.
85
- react_1.useEffect(function () {
102
+ use_isomorphic_layout_effect_browser_esm(function () {
86
103
  Object.assign(service.machine.options.actions, actions);
87
- }, [actions]);
88
- react_1.useEffect(function () {
104
+ Object.assign(service.machine.options.guards, guards);
105
+ Object.assign(service.machine.options.activities, activities);
89
106
  Object.assign(service.machine.options.services, services);
90
- }, [services]);
91
- // Keep track of the current machine state
92
- var initialState = rehydratedState
93
- ? xstate_1.State.create(rehydratedState)
94
- : service.initialState;
95
- var _a = __read(react_1.useState(function () { return initialState; }), 2), current = _a[0], setCurrent = _a[1];
96
- // Start service immediately (before mount) if specified in options
97
- if (immediate) {
98
- service.start();
99
- }
100
- react_1.useEffect(function () {
101
- // Start the service when the component mounts.
102
- // Note: the service will start only if it hasn't started already.
103
- //
104
- // If a rehydrated state was provided, use the resolved `initialState`.
105
- service.start(rehydratedState ? initialState : undefined);
106
- return function () {
107
- // Stop the service when the component unmounts
108
- service.stop();
109
- };
110
- }, []);
111
- return [current, service.send, service];
107
+ Object.assign(service.machine.options.delays, delays);
108
+ }, [actions, guards, activities, services, delays]);
109
+ return service;
112
110
  }
113
- exports.useMachine = useMachine;
114
- function useService(service) {
115
- var _a = __read(react_1.useState(service.state), 2), current = _a[0], setCurrent = _a[1];
116
- react_1.useEffect(function () {
117
- // Set to current service state as there is a possibility
118
- // of a transition occurring between the initial useState()
119
- // initialization and useEffect() commit.
120
- setCurrent(service.state);
121
- var listener = function (state) {
122
- if (state.changed) {
123
- setCurrent(state);
124
- }
125
- };
126
- var sub = service.subscribe(listener);
111
+ function useInterpret_useInterpret(getMachine) {
112
+ var _a = [];
113
+ for (var _i = 1; _i < arguments.length; _i++) {
114
+ _a[_i - 1] = arguments[_i];
115
+ }
116
+ var _b = __read(_a, 2), _c = _b[0], options = _c === void 0 ? {} : _c, observerOrListener = _b[1];
117
+ var service = useIdleInterpreter(getMachine, options);
118
+ useEffect(function () {
119
+ if (!observerOrListener) {
120
+ return;
121
+ }
122
+ var sub = service.subscribe(toObserver(observerOrListener));
127
123
  return function () {
128
124
  sub.unsubscribe();
129
125
  };
130
- }, [service]);
131
- return [current, service.send, service];
126
+ }, [observerOrListener]);
127
+ useEffect(function () {
128
+ var rehydratedState = options.state;
129
+ service.start(rehydratedState ? State.create(rehydratedState) : undefined);
130
+ return function () {
131
+ service.stop();
132
+ service.status = InterpreterStatus.NotStarted;
133
+ };
134
+ }, []);
135
+ return service;
132
136
  }
133
- exports.useService = useService;
134
- var useActor_1 = __webpack_require__(7283);
135
- exports.useActor = useActor_1.useActor;
136
- //# sourceMappingURL=index.js.map
137
-
138
- /***/ }),
139
137
 
140
- /***/ 7283:
141
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
138
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/utils.js
139
+ var utils_read = (undefined && undefined.__read) || function (o, n) {
140
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
141
+ if (!m) return o;
142
+ var i = m.call(o), r, ar = [], e;
143
+ try {
144
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
145
+ }
146
+ catch (error) { e = { error: error }; }
147
+ finally {
148
+ try {
149
+ if (r && !r.done && (m = i["return"])) m.call(i);
150
+ }
151
+ finally { if (e) throw e.error; }
152
+ }
153
+ return ar;
154
+ };
155
+ var __values = (undefined && undefined.__values) || function(o) {
156
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
157
+ if (m) return m.call(o);
158
+ if (o && typeof o.length === "number") return {
159
+ next: function () {
160
+ if (o && i >= o.length) o = void 0;
161
+ return { value: o && o[i++], done: !o };
162
+ }
163
+ };
164
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
165
+ };
142
166
 
167
+ function partition(items, predicate) {
168
+ var e_1, _a;
169
+ var _b = utils_read([[], []], 2), truthy = _b[0], falsy = _b[1];
170
+ try {
171
+ for (var items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
172
+ var item = items_1_1.value;
173
+ if (predicate(item)) {
174
+ truthy.push(item);
175
+ }
176
+ else {
177
+ falsy.push(item);
178
+ }
179
+ }
180
+ }
181
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
182
+ finally {
183
+ try {
184
+ if (items_1_1 && !items_1_1.done && (_a = items_1.return)) _a.call(items_1);
185
+ }
186
+ finally { if (e_1) throw e_1.error; }
187
+ }
188
+ return [truthy, falsy];
189
+ }
190
+ function utils_getServiceSnapshot(service) {
191
+ return service.status !== 0
192
+ ? service.getSnapshot()
193
+ : service.machine.initialState;
194
+ }
195
+ // From https://github.com/reduxjs/react-redux/blob/master/src/utils/shallowEqual.ts
196
+ function is(x, y) {
197
+ if (x === y) {
198
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
199
+ }
200
+ else {
201
+ return x !== x && y !== y;
202
+ }
203
+ }
204
+ function shallowEqual(objA, objB) {
205
+ if (is(objA, objB))
206
+ return true;
207
+ if (typeof objA !== 'object' ||
208
+ objA === null ||
209
+ typeof objB !== 'object' ||
210
+ objB === null) {
211
+ return false;
212
+ }
213
+ var keysA = Object.keys(objA);
214
+ var keysB = Object.keys(objB);
215
+ if (keysA.length !== keysB.length)
216
+ return false;
217
+ for (var i = 0; i < keysA.length; i++) {
218
+ if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) ||
219
+ !is(objA[keysA[i]], objB[keysA[i]])) {
220
+ return false;
221
+ }
222
+ }
223
+ return true;
224
+ }
225
+ function utils_isService(actor) {
226
+ return 'state' in actor && 'machine' in actor;
227
+ }
228
+ function utils_isInterpreterStateEqual(service, prevState, nextState) {
229
+ if (service.status === es/* InterpreterStatus */.TM.NotStarted) {
230
+ return true;
231
+ }
232
+ // Only change the current state if:
233
+ // - the incoming state is the "live" initial state (since it might have new actors)
234
+ // - OR the incoming state actually changed.
235
+ //
236
+ // The "live" initial state will have .changed === undefined.
237
+ var initialStateChanged = nextState.changed === undefined &&
238
+ (Object.keys(nextState.children).length > 0 ||
239
+ typeof prevState.changed === 'boolean');
240
+ return !(nextState.changed || initialStateChanged);
241
+ }
143
242
 
144
- var __read = (this && this.__read) || function (o, n) {
243
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useMachine.js
244
+ var useMachine_read = (undefined && undefined.__read) || function (o, n) {
145
245
  var m = typeof Symbol === "function" && o[Symbol.iterator];
146
246
  if (!m) return o;
147
247
  var i = m.call(o), r, ar = [], e;
@@ -157,126 +257,306 @@ var __read = (this && this.__read) || function (o, n) {
157
257
  }
158
258
  return ar;
159
259
  };
160
- Object.defineProperty(exports, "__esModule", ({ value: true }));
161
- var react_1 = __webpack_require__(32735);
162
- function useActor(actor) {
163
- var _a = __read(react_1.useState(undefined), 2), current = _a[0], setCurrent = _a[1];
164
- var actorRef = react_1.useRef(actor);
165
- react_1.useEffect(function () {
166
- if (actor) {
167
- actorRef.current = actor;
168
- var sub_1 = actor.subscribe(setCurrent);
169
- return function () {
170
- sub_1.unsubscribe();
171
- };
260
+
261
+
262
+
263
+
264
+
265
+ function identity(a) {
266
+ return a;
267
+ }
268
+ function useMachine(getMachine) {
269
+ var _a = [];
270
+ for (var _i = 1; _i < arguments.length; _i++) {
271
+ _a[_i - 1] = arguments[_i];
272
+ }
273
+ var _b = useMachine_read(_a, 1), _c = _b[0], options = _c === void 0 ? {} : _c;
274
+ // using `useIdleInterpreter` allows us to subscribe to the service *before* we start it
275
+ // so we don't miss any notifications
276
+ var service = useIdleInterpreter(getMachine, options);
277
+ var getSnapshot = (0,react.useCallback)(function () {
278
+ if (service.status === es/* InterpreterStatus */.TM.NotStarted) {
279
+ return (options.state
280
+ ? es/* State */.ZM.create(options.state)
281
+ : service.machine.initialState);
282
+ }
283
+ return service.getSnapshot();
284
+ }, [service]);
285
+ var isEqual = (0,react.useCallback)(function (prevState, nextState) {
286
+ return utils_isInterpreterStateEqual(service, prevState, nextState);
287
+ }, [service]);
288
+ var subscribe = (0,react.useCallback)(function (handleStoreChange) {
289
+ var unsubscribe = service.subscribe(handleStoreChange).unsubscribe;
290
+ return unsubscribe;
291
+ }, [service]);
292
+ var storeSnapshot = (0,with_selector.useSyncExternalStoreWithSelector)(subscribe, getSnapshot, getSnapshot, identity, isEqual);
293
+ (0,react.useEffect)(function () {
294
+ var rehydratedState = options.state;
295
+ service.start(rehydratedState ? es/* State */.ZM.create(rehydratedState) : undefined);
296
+ return function () {
297
+ service.stop();
298
+ service.status = es/* InterpreterStatus */.TM.NotStarted;
299
+ };
300
+ }, []);
301
+ return [storeSnapshot, service.send, service];
302
+ }
303
+
304
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useActor.js
305
+
306
+
307
+
308
+
309
+
310
+ function useActor_identity(a) {
311
+ return a;
312
+ }
313
+ function useActor_isActorWithState(actorRef) {
314
+ return 'state' in actorRef;
315
+ }
316
+ function isDeferredActor(actorRef) {
317
+ return 'deferred' in actorRef;
318
+ }
319
+ function defaultGetSnapshot(actorRef) {
320
+ return 'getSnapshot' in actorRef
321
+ ? isService(actorRef)
322
+ ? getServiceSnapshot(actorRef)
323
+ : actorRef.getSnapshot()
324
+ : useActor_isActorWithState(actorRef)
325
+ ? actorRef.state
326
+ : undefined;
327
+ }
328
+ function useActor(actorRef, getSnapshot) {
329
+ if (getSnapshot === void 0) { getSnapshot = defaultGetSnapshot; }
330
+ var actorRefRef = useRef(actorRef);
331
+ var deferredEventsRef = useRef([]);
332
+ var subscribe = useCallback(function (handleStoreChange) {
333
+ var unsubscribe = actorRef.subscribe(handleStoreChange).unsubscribe;
334
+ return unsubscribe;
335
+ }, [actorRef]);
336
+ var boundGetSnapshot = useCallback(function () { return getSnapshot(actorRef); }, [actorRef, getSnapshot]);
337
+ var isEqual = useCallback(function (prevState, nextState) {
338
+ if (isService(actorRef)) {
339
+ return isInterpreterStateEqual(actorRef, prevState, nextState);
340
+ }
341
+ return prevState === nextState;
342
+ }, [actorRef]);
343
+ var storeSnapshot = useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, useActor_identity, isEqual);
344
+ var send = useConstant(function () { return function () {
345
+ var args = [];
346
+ for (var _i = 0; _i < arguments.length; _i++) {
347
+ args[_i] = arguments[_i];
348
+ }
349
+ var event = args[0];
350
+ if (false) {}
351
+ var currentActorRef = actorRefRef.current;
352
+ // If the previous actor is a deferred actor,
353
+ // queue the events so that they can be replayed
354
+ // on the non-deferred actor.
355
+ if (isDeferredActor(currentActorRef) && currentActorRef.deferred) {
356
+ deferredEventsRef.current.push(event);
357
+ }
358
+ else {
359
+ currentActorRef.send(event);
360
+ }
361
+ }; });
362
+ useIsomorphicLayoutEffect(function () {
363
+ actorRefRef.current = actorRef;
364
+ // Dequeue deferred events from the previous deferred actorRef
365
+ while (deferredEventsRef.current.length > 0) {
366
+ var deferredEvent = deferredEventsRef.current.shift();
367
+ actorRef.send(deferredEvent);
368
+ }
369
+ }, [actorRef]);
370
+ return [storeSnapshot, send];
371
+ }
372
+
373
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useSelector.js
374
+
375
+
376
+
377
+
378
+ var defaultCompare = function (a, b) { return a === b; };
379
+ var useSelector_defaultGetSnapshot = function (a, initialStateCacheRef) {
380
+ if (isService(a)) {
381
+ // A status of 0 = interpreter not started
382
+ if (a.status === 0 && initialStateCacheRef.current) {
383
+ return initialStateCacheRef.current;
172
384
  }
385
+ var snapshot = getServiceSnapshot(a);
386
+ initialStateCacheRef.current = a.status === 0 ? snapshot : null;
387
+ return snapshot;
388
+ }
389
+ return isActorWithState(a) ? a.state : undefined;
390
+ };
391
+ function useSelector(actor, selector, compare, getSnapshot) {
392
+ if (compare === void 0) { compare = defaultCompare; }
393
+ var initialStateCacheRef = useRef(null);
394
+ var subscribe = useCallback(function (handleStoreChange) {
395
+ var unsubscribe = actor.subscribe(handleStoreChange).unsubscribe;
396
+ return unsubscribe;
173
397
  }, [actor]);
174
- return [current, actorRef.current ? actorRef.current.send : function () { return void 0; }];
398
+ var boundGetSnapshot = useCallback(function () {
399
+ if (getSnapshot) {
400
+ return getSnapshot(actor);
401
+ }
402
+ return useSelector_defaultGetSnapshot(actor, initialStateCacheRef);
403
+ }, [actor, getSnapshot]);
404
+ var selectedSnapshot = useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);
405
+ return selectedSnapshot;
406
+ }
407
+
408
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/useSpawn.js
409
+
410
+
411
+ /**
412
+ * React hook that spawns an `ActorRef` with the specified `behavior`.
413
+ * The returned `ActorRef` can be used with the `useActor(actorRef)` hook.
414
+ *
415
+ * @param behavior The actor behavior to spawn
416
+ * @returns An ActorRef with the specified `behavior`
417
+ */
418
+ function useSpawn(behavior) {
419
+ var actorRef = useConstant(function () {
420
+ return spawnBehavior(behavior);
421
+ });
422
+ return actorRef;
423
+ }
424
+
425
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/createActorContext.js
426
+ var createActorContext_assign = (undefined && undefined.__assign) || function () {
427
+ createActorContext_assign = Object.assign || function(t) {
428
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
429
+ s = arguments[i];
430
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
431
+ t[p] = s[p];
432
+ }
433
+ return t;
434
+ };
435
+ return createActorContext_assign.apply(this, arguments);
436
+ };
437
+
438
+
439
+
440
+
441
+ function createActorContext(machine, interpreterOptions, observerOrListener) {
442
+ var ReactContext = React.createContext(null);
443
+ var OriginalProvider = ReactContext.Provider;
444
+ function Provider(_a) {
445
+ var children = _a.children, _b = _a.machine, providedMachine = _b === void 0 ? machine : _b, options = _a.options;
446
+ var actor = useInterpret(providedMachine, createActorContext_assign(createActorContext_assign({}, interpreterOptions), options), observerOrListener);
447
+ return React.createElement(OriginalProvider, { value: actor }, children);
448
+ }
449
+ Provider.displayName = "ActorProvider(".concat(machine.id, ")");
450
+ function useContext() {
451
+ var actor = React.useContext(ReactContext);
452
+ if (!actor) {
453
+ throw new Error("You used a hook from \"".concat(Provider.displayName, "\" but it's not inside a <").concat(Provider.displayName, "> component."));
454
+ }
455
+ return actor;
456
+ }
457
+ function useActor() {
458
+ var actor = useContext();
459
+ return useActorUnbound(actor);
460
+ }
461
+ function useSelector(selector, compare) {
462
+ var actor = useContext();
463
+ return useSelectorUnbound(actor, selector, compare);
464
+ }
465
+ return {
466
+ Provider: Provider,
467
+ useActorRef: useContext,
468
+ useActor: useActor,
469
+ useSelector: useSelector
470
+ };
175
471
  }
176
- exports.useActor = useActor;
177
- //# sourceMappingURL=useActor.js.map
472
+
473
+ ;// CONCATENATED MODULE: ../../../node_modules/@xstate/react/es/index.js
474
+
475
+
476
+
477
+
478
+
479
+
480
+
481
+
482
+
483
+ /***/ }),
484
+
485
+ /***/ 17145:
486
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
487
+
488
+ /**
489
+ * @license React
490
+ * use-sync-external-store-shim.production.min.js
491
+ *
492
+ * Copyright (c) Facebook, Inc. and its affiliates.
493
+ *
494
+ * This source code is licensed under the MIT license found in the
495
+ * LICENSE file in the root directory of this source tree.
496
+ */
497
+ var e=__webpack_require__(43001);function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k="function"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}
498
+ function r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;
499
+
500
+
501
+ /***/ }),
502
+
503
+ /***/ 1594:
504
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
505
+
506
+ /**
507
+ * @license React
508
+ * use-sync-external-store-shim/with-selector.production.min.js
509
+ *
510
+ * Copyright (c) Facebook, Inc. and its affiliates.
511
+ *
512
+ * This source code is licensed under the MIT license found in the
513
+ * LICENSE file in the root directory of this source tree.
514
+ */
515
+ var h=__webpack_require__(43001),n=__webpack_require__(75011);function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q="function"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;
516
+ exports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);
517
+ u(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};
518
+
519
+
520
+ /***/ }),
521
+
522
+ /***/ 75011:
523
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
524
+
525
+
526
+
527
+ if (true) {
528
+ module.exports = __webpack_require__(17145);
529
+ } else {}
530
+
531
+
532
+ /***/ }),
533
+
534
+ /***/ 56901:
535
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
536
+
537
+
538
+
539
+ if (true) {
540
+ module.exports = __webpack_require__(1594);
541
+ } else {}
542
+
178
543
 
179
544
  /***/ }),
180
545
 
181
- /***/ 87519:
546
+ /***/ 261:
182
547
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
183
548
 
184
- // ESM COMPAT FLAG
185
- __webpack_require__.r(__webpack_exports__);
186
549
 
187
550
  // EXPORTS
188
551
  __webpack_require__.d(__webpack_exports__, {
189
- ActionTypes: () => (/* reexport */ ActionTypes),
190
- Interpreter: () => (/* reexport */ Interpreter),
191
- InterpreterStatus: () => (/* reexport */ InterpreterStatus),
192
- Machine: () => (/* reexport */ Machine),
193
- SpecialTargets: () => (/* reexport */ SpecialTargets),
194
- State: () => (/* reexport */ State),
195
- StateNode: () => (/* reexport */ StateNode),
196
- actions: () => (/* reexport */ actions_namespaceObject),
197
- assign: () => (/* binding */ es_assign),
198
- createMachine: () => (/* reexport */ createMachine),
199
- createSchema: () => (/* reexport */ createSchema),
200
- doneInvoke: () => (/* binding */ es_doneInvoke),
201
- forwardTo: () => (/* binding */ es_forwardTo),
202
- interpret: () => (/* reexport */ interpret),
203
- mapState: () => (/* reexport */ mapState),
204
- matchState: () => (/* reexport */ matchState),
205
- matchesState: () => (/* reexport */ matchesState),
206
- raise: () => (/* binding */ es_raise),
207
- send: () => (/* binding */ es_send),
208
- sendParent: () => (/* binding */ es_sendParent),
209
- sendTo: () => (/* binding */ es_sendTo),
210
- sendUpdate: () => (/* binding */ es_sendUpdate),
211
- spawn: () => (/* reexport */ spawn),
212
- spawnBehavior: () => (/* reexport */ spawnBehavior),
213
- t: () => (/* reexport */ t),
214
- toActorRef: () => (/* reexport */ toActorRef),
215
- toEventObject: () => (/* reexport */ toEventObject),
216
- toObserver: () => (/* reexport */ toObserver),
217
- toSCXMLEvent: () => (/* reexport */ toSCXMLEvent)
552
+ TM: () => (/* reexport */ InterpreterStatus),
553
+ J: () => (/* reexport */ Machine),
554
+ ZM: () => (/* reexport */ State_State),
555
+ f0: () => (/* binding */ es_assign),
556
+ kJ: () => (/* reexport */ interpret)
218
557
  });
219
558
 
220
- // NAMESPACE OBJECT: ../../../node_modules/xstate/es/actionTypes.js
221
- var actionTypes_namespaceObject = {};
222
- __webpack_require__.r(actionTypes_namespaceObject);
223
- __webpack_require__.d(actionTypes_namespaceObject, {
224
- after: () => (after),
225
- assign: () => (actionTypes_assign),
226
- cancel: () => (cancel),
227
- choose: () => (choose),
228
- doneState: () => (doneState),
229
- error: () => (actionTypes_error),
230
- errorExecution: () => (errorExecution),
231
- errorPlatform: () => (errorPlatform),
232
- init: () => (init),
233
- invoke: () => (invoke),
234
- log: () => (log),
235
- nullEvent: () => (nullEvent),
236
- pure: () => (pure),
237
- raise: () => (raise),
238
- send: () => (send),
239
- start: () => (start),
240
- stop: () => (stop),
241
- update: () => (update)
242
- });
243
-
244
- // NAMESPACE OBJECT: ../../../node_modules/xstate/es/actions.js
245
- var actions_namespaceObject = {};
246
- __webpack_require__.r(actions_namespaceObject);
247
- __webpack_require__.d(actions_namespaceObject, {
248
- actionTypes: () => (actionTypes_namespaceObject),
249
- after: () => (actions_after),
250
- assign: () => (actions_assign),
251
- cancel: () => (actions_cancel),
252
- choose: () => (actions_choose),
253
- done: () => (done),
254
- doneInvoke: () => (actions_doneInvoke),
255
- error: () => (actions_error),
256
- escalate: () => (escalate),
257
- forwardTo: () => (forwardTo),
258
- getActionFunction: () => (getActionFunction),
259
- initEvent: () => (initEvent),
260
- isActionObject: () => (isActionObject),
261
- log: () => (actions_log),
262
- pure: () => (actions_pure),
263
- raise: () => (actions_raise),
264
- resolveActions: () => (resolveActions),
265
- resolveLog: () => (resolveLog),
266
- resolveRaise: () => (resolveRaise),
267
- resolveSend: () => (resolveSend),
268
- resolveStop: () => (resolveStop),
269
- respond: () => (respond),
270
- send: () => (actions_send),
271
- sendParent: () => (sendParent),
272
- sendTo: () => (sendTo),
273
- sendUpdate: () => (sendUpdate),
274
- start: () => (actions_start),
275
- stop: () => (actions_stop),
276
- toActionObject: () => (toActionObject),
277
- toActionObjects: () => (toActionObjects),
278
- toActivityDefinition: () => (toActivityDefinition)
279
- });
559
+ // UNUSED EXPORTS: ActionTypes, Interpreter, SpecialTargets, StateNode, actions, choose, createMachine, createSchema, doneInvoke, forwardTo, log, mapState, matchState, matchesState, pure, raise, send, sendParent, sendTo, sendUpdate, spawn, spawnBehavior, stop, t, toActorRef, toEventObject, toObserver, toSCXMLEvent
280
560
 
281
561
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/_virtual/_tslib.js
282
562
  /*! *****************************************************************************
@@ -294,15 +574,15 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
294
574
  PERFORMANCE OF THIS SOFTWARE.
295
575
  ***************************************************************************** */
296
576
 
297
- var __assign = function() {
298
- __assign = Object.assign || function __assign(t) {
577
+ var _tslib_assign = function() {
578
+ _tslib_assign = Object.assign || function __assign(t) {
299
579
  for (var s, i = 1, n = arguments.length; i < n; i++) {
300
580
  s = arguments[i];
301
581
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
302
582
  }
303
583
  return t;
304
584
  };
305
- return __assign.apply(this, arguments);
585
+ return _tslib_assign.apply(this, arguments);
306
586
  };
307
587
 
308
588
  function __rest(s, e) {
@@ -329,7 +609,7 @@ function _tslib_values(o) {
329
609
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
330
610
  }
331
611
 
332
- function __read(o, n) {
612
+ function _tslib_read(o, n) {
333
613
  var m = typeof Symbol === "function" && o[Symbol.iterator];
334
614
  if (!m) return o;
335
615
  var i = m.call(o), r, ar = [], e;
@@ -346,7 +626,7 @@ function __read(o, n) {
346
626
  return ar;
347
627
  }
348
628
 
349
- function __spreadArray(to, from, pack) {
629
+ function _tslib_spreadArray(to, from, pack) {
350
630
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
351
631
  if (ar || !(i in from)) {
352
632
  if (!ar) ar = Array.prototype.slice.call(from, 0, i);
@@ -359,7 +639,7 @@ function __spreadArray(to, from, pack) {
359
639
 
360
640
 
361
641
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/types.js
362
- var ActionTypes;
642
+ var types_ActionTypes;
363
643
 
364
644
  (function (ActionTypes) {
365
645
  ActionTypes["Start"] = "xstate.start";
@@ -382,38 +662,38 @@ var ActionTypes;
382
662
  ActionTypes["Update"] = "xstate.update";
383
663
  ActionTypes["Pure"] = "xstate.pure";
384
664
  ActionTypes["Choose"] = "xstate.choose";
385
- })(ActionTypes || (ActionTypes = {}));
665
+ })(types_ActionTypes || (types_ActionTypes = {}));
386
666
 
387
- var SpecialTargets;
667
+ var types_SpecialTargets;
388
668
 
389
669
  (function (SpecialTargets) {
390
670
  SpecialTargets["Parent"] = "#_parent";
391
671
  SpecialTargets["Internal"] = "#_internal";
392
- })(SpecialTargets || (SpecialTargets = {}));
672
+ })(types_SpecialTargets || (types_SpecialTargets = {}));
393
673
 
394
674
 
395
675
 
396
676
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/actionTypes.js
397
677
 
398
678
 
399
- var start = ActionTypes.Start;
400
- var stop = ActionTypes.Stop;
401
- var raise = ActionTypes.Raise;
402
- var send = ActionTypes.Send;
403
- var cancel = ActionTypes.Cancel;
404
- var nullEvent = ActionTypes.NullEvent;
405
- var actionTypes_assign = ActionTypes.Assign;
406
- var after = ActionTypes.After;
407
- var doneState = ActionTypes.DoneState;
408
- var log = ActionTypes.Log;
409
- var init = ActionTypes.Init;
410
- var invoke = ActionTypes.Invoke;
411
- var errorExecution = ActionTypes.ErrorExecution;
412
- var errorPlatform = ActionTypes.ErrorPlatform;
413
- var actionTypes_error = ActionTypes.ErrorCustom;
414
- var update = ActionTypes.Update;
415
- var choose = ActionTypes.Choose;
416
- var pure = ActionTypes.Pure;
679
+ var start = types_ActionTypes.Start;
680
+ var stop = types_ActionTypes.Stop;
681
+ var raise = types_ActionTypes.Raise;
682
+ var send = types_ActionTypes.Send;
683
+ var cancel = types_ActionTypes.Cancel;
684
+ var nullEvent = types_ActionTypes.NullEvent;
685
+ var actionTypes_assign = types_ActionTypes.Assign;
686
+ var after = types_ActionTypes.After;
687
+ var doneState = types_ActionTypes.DoneState;
688
+ var log = types_ActionTypes.Log;
689
+ var init = types_ActionTypes.Init;
690
+ var invoke = types_ActionTypes.Invoke;
691
+ var errorExecution = types_ActionTypes.ErrorExecution;
692
+ var errorPlatform = types_ActionTypes.ErrorPlatform;
693
+ var actionTypes_error = types_ActionTypes.ErrorCustom;
694
+ var actionTypes_update = types_ActionTypes.Update;
695
+ var choose = types_ActionTypes.Choose;
696
+ var pure = types_ActionTypes.Pure;
417
697
 
418
698
 
419
699
 
@@ -426,7 +706,7 @@ var TARGETLESS_KEY = '';
426
706
 
427
707
 
428
708
  ;// CONCATENATED MODULE: ../../../node_modules/xstate/es/environment.js
429
- var IS_PRODUCTION = "production" === 'production';
709
+ var environment_IS_PRODUCTION = "production" === 'production';
430
710
 
431
711
 
432
712
 
@@ -441,7 +721,7 @@ var _a;
441
721
  function keys(value) {
442
722
  return Object.keys(value);
443
723
  }
444
- function matchesState(parentStateId, childStateId, delimiter) {
724
+ function utils_matchesState(parentStateId, childStateId, delimiter) {
445
725
  if (delimiter === void 0) {
446
726
  delimiter = STATE_DELIMITER;
447
727
  }
@@ -449,8 +729,8 @@ function matchesState(parentStateId, childStateId, delimiter) {
449
729
  var parentStateValue = toStateValue(parentStateId, delimiter);
450
730
  var childStateValue = toStateValue(childStateId, delimiter);
451
731
 
452
- if (isString(childStateValue)) {
453
- if (isString(parentStateValue)) {
732
+ if (utils_isString(childStateValue)) {
733
+ if (utils_isString(parentStateValue)) {
454
734
  return childStateValue === parentStateValue;
455
735
  } // Parent more specific than child
456
736
 
@@ -458,7 +738,7 @@ function matchesState(parentStateId, childStateId, delimiter) {
458
738
  return false;
459
739
  }
460
740
 
461
- if (isString(parentStateValue)) {
741
+ if (utils_isString(parentStateValue)) {
462
742
  return parentStateValue in childStateValue;
463
743
  }
464
744
 
@@ -467,19 +747,19 @@ function matchesState(parentStateId, childStateId, delimiter) {
467
747
  return false;
468
748
  }
469
749
 
470
- return matchesState(parentStateValue[key], childStateValue[key]);
750
+ return utils_matchesState(parentStateValue[key], childStateValue[key]);
471
751
  });
472
752
  }
473
753
  function getEventType(event) {
474
754
  try {
475
- return isString(event) || typeof event === 'number' ? "".concat(event) : event.type;
755
+ return utils_isString(event) || typeof event === 'number' ? "".concat(event) : event.type;
476
756
  } catch (e) {
477
757
  throw new Error('Events must be strings or objects with a string event.type property.');
478
758
  }
479
759
  }
480
760
  function getActionType(action) {
481
761
  try {
482
- return isString(action) || typeof action === 'number' ? "".concat(action) : isFunction(action) ? action.name : action.type;
762
+ return utils_isString(action) || typeof action === 'number' ? "".concat(action) : utils_isFunction(action) ? action.name : action.type;
483
763
  } catch (e) {
484
764
  throw new Error('Actions must be strings or objects with a string action.type property.');
485
765
  }
@@ -641,7 +921,7 @@ function toStatePaths(stateValue) {
641
921
  return [[]];
642
922
  }
643
923
 
644
- if (isString(stateValue)) {
924
+ if (utils_isString(stateValue)) {
645
925
  return [[stateValue]];
646
926
  }
647
927
 
@@ -701,7 +981,7 @@ function pathsToStateValue(paths) {
701
981
  function flatten(array) {
702
982
  var _a;
703
983
 
704
- return (_a = []).concat.apply(_a, __spreadArray([], __read(array), false));
984
+ return (_a = []).concat.apply(_a, _tslib_spreadArray([], _tslib_read(array), false));
705
985
  }
706
986
  function toArrayStrict(value) {
707
987
  if (isArray(value)) {
@@ -720,7 +1000,7 @@ function toArray(value) {
720
1000
  function mapContext(mapper, context, _event) {
721
1001
  var e_5, _a;
722
1002
 
723
- if (isFunction(mapper)) {
1003
+ if (utils_isFunction(mapper)) {
724
1004
  return mapper(context, _event.data);
725
1005
  }
726
1006
 
@@ -731,7 +1011,7 @@ function mapContext(mapper, context, _event) {
731
1011
  var key = _c.value;
732
1012
  var subMapper = mapper[key];
733
1013
 
734
- if (isFunction(subMapper)) {
1014
+ if (utils_isFunction(subMapper)) {
735
1015
  result[key] = subMapper(context, _event.data);
736
1016
  } else {
737
1017
  result[key] = subMapper;
@@ -760,7 +1040,7 @@ function isPromiseLike(value) {
760
1040
  } // Check if shape matches the Promise/A+ specification for a "thenable".
761
1041
 
762
1042
 
763
- if (value !== null && (isFunction(value) || typeof value === 'object') && isFunction(value.then)) {
1043
+ if (value !== null && (utils_isFunction(value) || typeof value === 'object') && utils_isFunction(value.then)) {
764
1044
  return true;
765
1045
  }
766
1046
 
@@ -772,7 +1052,7 @@ function isBehavior(value) {
772
1052
  function partition(items, predicate) {
773
1053
  var e_6, _a;
774
1054
 
775
- var _b = __read([[], []], 2),
1055
+ var _b = _tslib_read([[], []], 2),
776
1056
  truthy = _b[0],
777
1057
  falsy = _b[1];
778
1058
 
@@ -806,7 +1086,7 @@ function updateHistoryStates(hist, stateValue) {
806
1086
  return undefined;
807
1087
  }
808
1088
 
809
- var subStateValue = (isString(stateValue) ? undefined : stateValue[key]) || (subHist ? subHist.current : undefined);
1089
+ var subStateValue = (utils_isString(stateValue) ? undefined : stateValue[key]) || (subHist ? subHist.current : undefined);
810
1090
 
811
1091
  if (!subStateValue) {
812
1092
  return undefined;
@@ -825,8 +1105,8 @@ function updateHistoryValue(hist, stateValue) {
825
1105
  };
826
1106
  }
827
1107
  function updateContext(context, _event, assignActions, state) {
828
- if (!IS_PRODUCTION) {
829
- warn(!!context, 'Attempting to update undefined context');
1108
+ if (!environment_IS_PRODUCTION) {
1109
+ utils_warn(!!context, 'Attempting to update undefined context');
830
1110
  }
831
1111
 
832
1112
  var updatedContext = context ? assignActions.reduce(function (acc, assignAction) {
@@ -840,14 +1120,14 @@ function updateContext(context, _event, assignActions, state) {
840
1120
  };
841
1121
  var partialUpdate = {};
842
1122
 
843
- if (isFunction(assignment)) {
1123
+ if (utils_isFunction(assignment)) {
844
1124
  partialUpdate = assignment(acc, _event.data, meta);
845
1125
  } else {
846
1126
  try {
847
1127
  for (var _b = _tslib_values(Object.keys(assignment)), _c = _b.next(); !_c.done; _c = _b.next()) {
848
1128
  var key = _c.value;
849
1129
  var propAssignment = assignment[key];
850
- partialUpdate[key] = isFunction(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
1130
+ partialUpdate[key] = utils_isFunction(propAssignment) ? propAssignment(acc, _event.data, meta) : propAssignment;
851
1131
  }
852
1132
  } catch (e_7_1) {
853
1133
  e_7 = {
@@ -867,10 +1147,10 @@ function updateContext(context, _event, assignActions, state) {
867
1147
  return updatedContext;
868
1148
  } // tslint:disable-next-line:no-empty
869
1149
 
870
- var warn = function () {};
1150
+ var utils_warn = function () {};
871
1151
 
872
- if (!IS_PRODUCTION) {
873
- warn = function (condition, message) {
1152
+ if (!environment_IS_PRODUCTION) {
1153
+ utils_warn = function (condition, message) {
874
1154
  var error = condition instanceof Error ? condition : undefined;
875
1155
 
876
1156
  if (!error && condition) {
@@ -893,10 +1173,10 @@ function isArray(value) {
893
1173
  return Array.isArray(value);
894
1174
  } // tslint:disable-next-line:ban-types
895
1175
 
896
- function isFunction(value) {
1176
+ function utils_isFunction(value) {
897
1177
  return typeof value === 'function';
898
1178
  }
899
- function isString(value) {
1179
+ function utils_isString(value) {
900
1180
  return typeof value === 'string';
901
1181
  }
902
1182
  function toGuard(condition, guardMap) {
@@ -904,7 +1184,7 @@ function toGuard(condition, guardMap) {
904
1184
  return undefined;
905
1185
  }
906
1186
 
907
- if (isString(condition)) {
1187
+ if (utils_isString(condition)) {
908
1188
  return {
909
1189
  type: DEFAULT_GUARD_TYPE,
910
1190
  name: condition,
@@ -912,7 +1192,7 @@ function toGuard(condition, guardMap) {
912
1192
  };
913
1193
  }
914
1194
 
915
- if (isFunction(condition)) {
1195
+ if (utils_isFunction(condition)) {
916
1196
  return {
917
1197
  type: DEFAULT_GUARD_TYPE,
918
1198
  name: condition.name,
@@ -924,7 +1204,7 @@ function toGuard(condition, guardMap) {
924
1204
  }
925
1205
  function isObservable(value) {
926
1206
  try {
927
- return 'subscribe' in value && isFunction(value.subscribe);
1207
+ return 'subscribe' in value && utils_isFunction(value.subscribe);
928
1208
  } catch (e) {
929
1209
  return false;
930
1210
  }
@@ -938,23 +1218,23 @@ var interopSymbols = (_a = {}, _a[symbolObservable] = function () {
938
1218
  }, _a[Symbol.observable] = function () {
939
1219
  return this;
940
1220
  }, _a);
941
- function isMachine(value) {
1221
+ function utils_isMachine(value) {
942
1222
  return !!value && '__xstatenode' in value;
943
1223
  }
944
1224
  function isActor(value) {
945
1225
  return !!value && typeof value.send === 'function';
946
1226
  }
947
- var uniqueId = /*#__PURE__*/function () {
1227
+ var utils_uniqueId = /*#__PURE__*/(/* unused pure expression or super */ null && (function () {
948
1228
  var currentId = 0;
949
1229
  return function () {
950
1230
  currentId++;
951
1231
  return currentId.toString(16);
952
1232
  };
953
- }();
1233
+ }()));
954
1234
  function toEventObject(event, payload // id?: TEvent['type']
955
1235
  ) {
956
- if (isString(event) || typeof event === 'number') {
957
- return __assign({
1236
+ if (utils_isString(event) || typeof event === 'number') {
1237
+ return _tslib_assign({
958
1238
  type: event
959
1239
  }, payload);
960
1240
  }
@@ -962,12 +1242,12 @@ function toEventObject(event, payload // id?: TEvent['type']
962
1242
  return event;
963
1243
  }
964
1244
  function toSCXMLEvent(event, scxmlEvent) {
965
- if (!isString(event) && '$$type' in event && event.$$type === 'scxml') {
1245
+ if (!utils_isString(event) && '$$type' in event && event.$$type === 'scxml') {
966
1246
  return event;
967
1247
  }
968
1248
 
969
1249
  var eventObject = toEventObject(event);
970
- return __assign({
1250
+ return _tslib_assign({
971
1251
  name: eventObject.type,
972
1252
  data: eventObject,
973
1253
  $$type: 'scxml',
@@ -976,14 +1256,14 @@ function toSCXMLEvent(event, scxmlEvent) {
976
1256
  }
977
1257
  function toTransitionConfigArray(event, configLike) {
978
1258
  var transitions = toArrayStrict(configLike).map(function (transitionLike) {
979
- if (typeof transitionLike === 'undefined' || typeof transitionLike === 'string' || isMachine(transitionLike)) {
1259
+ if (typeof transitionLike === 'undefined' || typeof transitionLike === 'string' || utils_isMachine(transitionLike)) {
980
1260
  return {
981
1261
  target: transitionLike,
982
1262
  event: event
983
1263
  };
984
1264
  }
985
1265
 
986
- return __assign(__assign({}, transitionLike), {
1266
+ return _tslib_assign(_tslib_assign({}, transitionLike), {
987
1267
  event: event
988
1268
  });
989
1269
  });
@@ -997,7 +1277,7 @@ function normalizeTarget(target) {
997
1277
  return toArray(target);
998
1278
  }
999
1279
  function reportUnhandledExceptionOnInvocation(originalError, currentError, id) {
1000
- if (!IS_PRODUCTION) {
1280
+ if (!environment_IS_PRODUCTION) {
1001
1281
  var originalStackTrace = originalError.stack ? " Stacktrace was '".concat(originalError.stack, "'") : '';
1002
1282
 
1003
1283
  if (originalError === currentError) {
@@ -1054,7 +1334,7 @@ function createInvokeId(stateNodeId, index) {
1054
1334
  return "".concat(stateNodeId, ":invocation[").concat(index, "]");
1055
1335
  }
1056
1336
  function isRaisableAction(action) {
1057
- return (action.type === raise || action.type === send && action.to === SpecialTargets.Internal) && typeof action.delay !== 'number';
1337
+ return (action.type === raise || action.type === send && action.to === types_SpecialTargets.Internal) && typeof action.delay !== 'number';
1058
1338
  }
1059
1339
 
1060
1340
 
@@ -1077,10 +1357,10 @@ function getActionFunction(actionType, actionFunctionMap) {
1077
1357
  function toActionObject(action, actionFunctionMap) {
1078
1358
  var actionObject;
1079
1359
 
1080
- if (isString(action) || typeof action === 'number') {
1360
+ if (utils_isString(action) || typeof action === 'number') {
1081
1361
  var exec = getActionFunction(action, actionFunctionMap);
1082
1362
 
1083
- if (isFunction(exec)) {
1363
+ if (utils_isFunction(exec)) {
1084
1364
  actionObject = {
1085
1365
  type: action,
1086
1366
  exec: exec
@@ -1093,7 +1373,7 @@ function toActionObject(action, actionFunctionMap) {
1093
1373
  exec: undefined
1094
1374
  };
1095
1375
  }
1096
- } else if (isFunction(action)) {
1376
+ } else if (utils_isFunction(action)) {
1097
1377
  actionObject = {
1098
1378
  // Convert action to string if unnamed
1099
1379
  type: action.name || action.toString(),
@@ -1102,13 +1382,13 @@ function toActionObject(action, actionFunctionMap) {
1102
1382
  } else {
1103
1383
  var exec = getActionFunction(action.type, actionFunctionMap);
1104
1384
 
1105
- if (isFunction(exec)) {
1106
- actionObject = __assign(__assign({}, action), {
1385
+ if (utils_isFunction(exec)) {
1386
+ actionObject = _tslib_assign(_tslib_assign({}, action), {
1107
1387
  exec: exec
1108
1388
  });
1109
1389
  } else if (exec) {
1110
1390
  var actionType = exec.type || action.type;
1111
- actionObject = __assign(__assign(__assign({}, exec), action), {
1391
+ actionObject = _tslib_assign(_tslib_assign(_tslib_assign({}, exec), action), {
1112
1392
  type: actionType
1113
1393
  });
1114
1394
  } else {
@@ -1130,8 +1410,8 @@ var toActionObjects = function (action, actionFunctionMap) {
1130
1410
  };
1131
1411
  function toActivityDefinition(action) {
1132
1412
  var actionObject = toActionObject(action);
1133
- return __assign(__assign({
1134
- id: isString(action) ? action : actionObject.id
1413
+ return _tslib_assign(_tslib_assign({
1414
+ id: utils_isString(action) ? action : actionObject.id
1135
1415
  }, actionObject), {
1136
1416
  type: actionObject.type
1137
1417
  });
@@ -1155,17 +1435,17 @@ function resolveRaise(action, ctx, _event, delaysMap) {
1155
1435
  var meta = {
1156
1436
  _event: _event
1157
1437
  };
1158
- var resolvedEvent = toSCXMLEvent(isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1438
+ var resolvedEvent = toSCXMLEvent(utils_isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1159
1439
  var resolvedDelay;
1160
1440
 
1161
- if (isString(action.delay)) {
1441
+ if (utils_isString(action.delay)) {
1162
1442
  var configDelay = delaysMap && delaysMap[action.delay];
1163
- resolvedDelay = isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1443
+ resolvedDelay = utils_isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1164
1444
  } else {
1165
- resolvedDelay = isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1445
+ resolvedDelay = utils_isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1166
1446
  }
1167
1447
 
1168
- return __assign(__assign({}, action), {
1448
+ return _tslib_assign(_tslib_assign({}, action), {
1169
1449
  type: raise,
1170
1450
  _event: resolvedEvent,
1171
1451
  delay: resolvedDelay
@@ -1188,11 +1468,11 @@ function actions_send(event, options) {
1188
1468
  return {
1189
1469
  to: options ? options.to : undefined,
1190
1470
  type: send,
1191
- event: isFunction(event) ? event : toEventObject(event),
1471
+ event: utils_isFunction(event) ? event : toEventObject(event),
1192
1472
  delay: options ? options.delay : undefined,
1193
1473
  // TODO: don't auto-generate IDs here like that
1194
1474
  // there is too big chance of the ID collision
1195
- id: options && options.id !== undefined ? options.id : isFunction(event) ? event.name : getEventType(event)
1475
+ id: options && options.id !== undefined ? options.id : utils_isFunction(event) ? event.name : getEventType(event)
1196
1476
  };
1197
1477
  }
1198
1478
  function resolveSend(action, ctx, _event, delaysMap) {
@@ -1200,18 +1480,18 @@ function resolveSend(action, ctx, _event, delaysMap) {
1200
1480
  _event: _event
1201
1481
  }; // TODO: helper function for resolving Expr
1202
1482
 
1203
- var resolvedEvent = toSCXMLEvent(isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1483
+ var resolvedEvent = toSCXMLEvent(utils_isFunction(action.event) ? action.event(ctx, _event.data, meta) : action.event);
1204
1484
  var resolvedDelay;
1205
1485
 
1206
- if (isString(action.delay)) {
1486
+ if (utils_isString(action.delay)) {
1207
1487
  var configDelay = delaysMap && delaysMap[action.delay];
1208
- resolvedDelay = isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1488
+ resolvedDelay = utils_isFunction(configDelay) ? configDelay(ctx, _event.data, meta) : configDelay;
1209
1489
  } else {
1210
- resolvedDelay = isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1490
+ resolvedDelay = utils_isFunction(action.delay) ? action.delay(ctx, _event.data, meta) : action.delay;
1211
1491
  }
1212
1492
 
1213
- var resolvedTarget = isFunction(action.to) ? action.to(ctx, _event.data, meta) : action.to;
1214
- return __assign(__assign({}, action), {
1493
+ var resolvedTarget = utils_isFunction(action.to) ? action.to(ctx, _event.data, meta) : action.to;
1494
+ return _tslib_assign(_tslib_assign({}, action), {
1215
1495
  to: resolvedTarget,
1216
1496
  _event: resolvedEvent,
1217
1497
  event: resolvedEvent.data,
@@ -1289,14 +1569,14 @@ function actions_log(expr, label) {
1289
1569
  }
1290
1570
 
1291
1571
  return {
1292
- type: log,
1572
+ type: log$1,
1293
1573
  label: label,
1294
1574
  expr: expr
1295
1575
  };
1296
1576
  }
1297
1577
  var resolveLog = function (action, ctx, _event) {
1298
- return __assign(__assign({}, action), {
1299
- value: isString(action.expr) ? action.expr : action.expr(ctx, _event.data, {
1578
+ return _tslib_assign(_tslib_assign({}, action), {
1579
+ value: utils_isString(action.expr) ? action.expr : action.expr(ctx, _event.data, {
1300
1580
  _event: _event
1301
1581
  })
1302
1582
  });
@@ -1324,7 +1604,7 @@ var actions_cancel = function (sendId) {
1324
1604
  function actions_start(activity) {
1325
1605
  var activityDef = toActivityDefinition(activity);
1326
1606
  return {
1327
- type: ActionTypes.Start,
1607
+ type: types_ActionTypes.Start,
1328
1608
  activity: activityDef,
1329
1609
  exec: undefined
1330
1610
  };
@@ -1336,20 +1616,20 @@ function actions_start(activity) {
1336
1616
  */
1337
1617
 
1338
1618
  function actions_stop(actorRef) {
1339
- var activity = isFunction(actorRef) ? actorRef : toActivityDefinition(actorRef);
1619
+ var activity = utils_isFunction(actorRef) ? actorRef : toActivityDefinition(actorRef);
1340
1620
  return {
1341
- type: ActionTypes.Stop,
1621
+ type: types_ActionTypes.Stop,
1342
1622
  activity: activity,
1343
1623
  exec: undefined
1344
1624
  };
1345
1625
  }
1346
1626
  function resolveStop(action, context, _event) {
1347
- var actorRefOrString = isFunction(action.activity) ? action.activity(context, _event.data) : action.activity;
1627
+ var actorRefOrString = utils_isFunction(action.activity) ? action.activity(context, _event.data) : action.activity;
1348
1628
  var resolvedActorRef = typeof actorRefOrString === 'string' ? {
1349
1629
  id: actorRefOrString
1350
1630
  } : actorRefOrString;
1351
1631
  var actionObject = {
1352
- type: ActionTypes.Stop,
1632
+ type: types_ActionTypes.Stop,
1353
1633
  activity: resolvedActorRef
1354
1634
  };
1355
1635
  return actionObject;
@@ -1379,7 +1659,7 @@ function isActionObject(action) {
1379
1659
 
1380
1660
  function actions_after(delayRef, id) {
1381
1661
  var idSuffix = id ? "#".concat(id) : '';
1382
- return "".concat(ActionTypes.After, "(").concat(delayRef, ")").concat(idSuffix);
1662
+ return "".concat(types_ActionTypes.After, "(").concat(delayRef, ")").concat(idSuffix);
1383
1663
  }
1384
1664
  /**
1385
1665
  * Returns an event that represents that a final state node
@@ -1390,7 +1670,7 @@ function actions_after(delayRef, id) {
1390
1670
  */
1391
1671
 
1392
1672
  function done(id, data) {
1393
- var type = "".concat(ActionTypes.DoneState, ".").concat(id);
1673
+ var type = "".concat(types_ActionTypes.DoneState, ".").concat(id);
1394
1674
  var eventObject = {
1395
1675
  type: type,
1396
1676
  data: data
@@ -1413,7 +1693,7 @@ function done(id, data) {
1413
1693
  */
1414
1694
 
1415
1695
  function actions_doneInvoke(id, data) {
1416
- var type = "".concat(ActionTypes.DoneInvoke, ".").concat(id);
1696
+ var type = "".concat(types_ActionTypes.DoneInvoke, ".").concat(id);
1417
1697
  var eventObject = {
1418
1698
  type: type,
1419
1699
  data: data
@@ -1426,7 +1706,7 @@ function actions_doneInvoke(id, data) {
1426
1706
  return eventObject;
1427
1707
  }
1428
1708
  function actions_error(id, data) {
1429
- var type = "".concat(ActionTypes.ErrorPlatform, ".").concat(id);
1709
+ var type = "".concat(types_ActionTypes.ErrorPlatform, ".").concat(id);
1430
1710
  var eventObject = {
1431
1711
  type: type,
1432
1712
  data: data
@@ -1489,7 +1769,7 @@ function forwardTo(target, options) {
1489
1769
  function escalate(errorData, options) {
1490
1770
  return sendParent(function (context, event, meta) {
1491
1771
  return {
1492
- type: actionTypes_error,
1772
+ type: error$1,
1493
1773
  data: isFunction(errorData) ? errorData(context, event, meta) : errorData
1494
1774
  };
1495
1775
  }, __assign(__assign({}, options), {
@@ -1566,14 +1846,14 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1566
1846
  case send:
1567
1847
  var sendAction = resolveSend(actionObject, updatedContext, _event, machine.options.delays); // TODO: fix ActionTypes.Init
1568
1848
 
1569
- if (!IS_PRODUCTION) {
1849
+ if (!environment_IS_PRODUCTION) {
1570
1850
  var configuredDelay = actionObject.delay; // warn after resolving as we can create better contextual message here
1571
1851
 
1572
- warn(!isString(configuredDelay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length
1852
+ utils_warn(!utils_isString(configuredDelay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length
1573
1853
  "No delay reference for delay expression '".concat(configuredDelay, "' was found on machine '").concat(machine.id, "'"));
1574
1854
  }
1575
1855
 
1576
- if (predictableExec && sendAction.to !== SpecialTargets.Internal) {
1856
+ if (predictableExec && sendAction.to !== types_SpecialTargets.Internal) {
1577
1857
  if (blockType === 'entry') {
1578
1858
  deferredToBlockEnd.push(sendAction);
1579
1859
  } else {
@@ -1602,7 +1882,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1602
1882
  return [];
1603
1883
  }
1604
1884
 
1605
- var _b = __read(resolveActions(machine, currentState, updatedContext, _event, [{
1885
+ var _b = _tslib_read(resolveActions(machine, currentState, updatedContext, _event, [{
1606
1886
  type: blockType,
1607
1887
  actions: toActionObjects(toArray(matchedActions), machine.options.actions)
1608
1888
  }], predictableExec, preserveActionOrder), 2),
@@ -1622,7 +1902,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1622
1902
  return [];
1623
1903
  }
1624
1904
 
1625
- var _c = __read(resolveActions(machine, currentState, updatedContext, _event, [{
1905
+ var _c = _tslib_read(resolveActions(machine, currentState, updatedContext, _event, [{
1626
1906
  type: blockType,
1627
1907
  actions: toActionObjects(toArray(matchedActions), machine.options.actions)
1628
1908
  }], predictableExec, preserveActionOrder), 2),
@@ -1657,7 +1937,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1657
1937
  } else if (exec_1 && preservedContexts) {
1658
1938
  var contextIndex_1 = preservedContexts.length - 1;
1659
1939
 
1660
- var wrapped = __assign(__assign({}, resolvedActionObject), {
1940
+ var wrapped = _tslib_assign(_tslib_assign({}, resolvedActionObject), {
1661
1941
  exec: function (_ctx) {
1662
1942
  var args = [];
1663
1943
 
@@ -1665,7 +1945,7 @@ function resolveActions(machine, currentState, currentContext, _event, actionBlo
1665
1945
  args[_i - 1] = arguments[_i];
1666
1946
  }
1667
1947
 
1668
- exec_1.apply(void 0, __spreadArray([preservedContexts[contextIndex_1]], __read(args), false));
1948
+ exec_1.apply(void 0, _tslib_spreadArray([preservedContexts[contextIndex_1]], _tslib_read(args), false));
1669
1949
  }
1670
1950
  });
1671
1951
 
@@ -1727,7 +2007,7 @@ var provide = function (service, fn) {
1727
2007
  serviceStack.pop();
1728
2008
  return result;
1729
2009
  };
1730
- var consume = function (fn) {
2010
+ var serviceScope_consume = function (fn) {
1731
2011
  return fn(serviceStack[serviceStack.length - 1]);
1732
2012
  };
1733
2013
 
@@ -1778,17 +2058,17 @@ function createInvocableActor(invokeDefinition, machine, context, _event) {
1778
2058
  var invokeSrc = toInvokeSource(invokeDefinition.src);
1779
2059
  var serviceCreator = (_a = machine === null || machine === void 0 ? void 0 : machine.options.services) === null || _a === void 0 ? void 0 : _a[invokeSrc.type];
1780
2060
  var resolvedData = invokeDefinition.data ? mapContext(invokeDefinition.data, context, _event) : undefined;
1781
- var tempActor = serviceCreator ? createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); // @ts-ignore
2061
+ var tempActor = serviceCreator ? Actor_createDeferredActor(serviceCreator, invokeDefinition.id, resolvedData) : createNullActor(invokeDefinition.id); // @ts-ignore
1782
2062
 
1783
2063
  tempActor.meta = invokeDefinition;
1784
2064
  return tempActor;
1785
2065
  }
1786
- function createDeferredActor(entity, id, data) {
2066
+ function Actor_createDeferredActor(entity, id, data) {
1787
2067
  var tempActor = createNullActor(id); // @ts-ignore
1788
2068
 
1789
2069
  tempActor.deferred = true;
1790
2070
 
1791
- if (isMachine(entity)) {
2071
+ if (utils_isMachine(entity)) {
1792
2072
  // "mute" the existing service scope so potential spawned actors within the `.initialState` stay deferred here
1793
2073
  var initialState_1 = tempActor.state = provide(undefined, function () {
1794
2074
  return (data ? entity.withContext(data) : entity).initialState;
@@ -1815,7 +2095,7 @@ function isSpawnedActor(item) {
1815
2095
  function toActorRef(actorRefLike) {
1816
2096
  var _a;
1817
2097
 
1818
- return __assign((_a = {
2098
+ return _tslib_assign((_a = {
1819
2099
  subscribe: function () {
1820
2100
  return {
1821
2101
  unsubscribe: function () {
@@ -2058,7 +2338,7 @@ function has(iterable, item) {
2058
2338
  return false; // TODO: fix
2059
2339
  }
2060
2340
  function nextEvents(configuration) {
2061
- return __spreadArray([], __read(new Set(flatten(__spreadArray([], __read(configuration.map(function (sn) {
2341
+ return _tslib_spreadArray([], _tslib_read(new Set(flatten(_tslib_spreadArray([], _tslib_read(configuration.map(function (sn) {
2062
2342
  return sn.ownEvents;
2063
2343
  })), false)))), false);
2064
2344
  }
@@ -2115,7 +2395,7 @@ function stateValuesEqual(a, b) {
2115
2395
  return false;
2116
2396
  }
2117
2397
 
2118
- if (isString(a) || isString(b)) {
2398
+ if (utils_isString(a) || utils_isString(b)) {
2119
2399
  return a === b;
2120
2400
  }
2121
2401
 
@@ -2140,7 +2420,7 @@ var isState = (/* unused pure expression or super */ null && (isStateConfig));
2140
2420
  function bindActionToState(action, state) {
2141
2421
  var exec = action.exec;
2142
2422
 
2143
- var boundAction = __assign(__assign({}, action), {
2423
+ var boundAction = _tslib_assign(_tslib_assign({}, action), {
2144
2424
  exec: exec !== undefined ? function () {
2145
2425
  return exec(state.context, state.event, {
2146
2426
  action: action,
@@ -2153,7 +2433,7 @@ function bindActionToState(action, state) {
2153
2433
  return boundAction;
2154
2434
  }
2155
2435
 
2156
- var State =
2436
+ var State_State =
2157
2437
  /*#__PURE__*/
2158
2438
 
2159
2439
  /** @class */
@@ -2308,12 +2588,12 @@ function () {
2308
2588
  delimiter = '.';
2309
2589
  }
2310
2590
 
2311
- if (isString(stateValue)) {
2591
+ if (utils_isString(stateValue)) {
2312
2592
  return [stateValue];
2313
2593
  }
2314
2594
 
2315
2595
  var valueKeys = Object.keys(stateValue);
2316
- return valueKeys.concat.apply(valueKeys, __spreadArray([], __read(valueKeys.map(function (key) {
2596
+ return valueKeys.concat.apply(valueKeys, _tslib_spreadArray([], _tslib_read(valueKeys.map(function (key) {
2317
2597
  return _this.toStrings(stateValue[key], delimiter).map(function (s) {
2318
2598
  return key + delimiter + s;
2319
2599
  });
@@ -2328,13 +2608,13 @@ function () {
2328
2608
  _a.machine;
2329
2609
  var jsonValues = __rest(_a, ["configuration", "transitions", "tags", "machine"]);
2330
2610
 
2331
- return __assign(__assign({}, jsonValues), {
2611
+ return _tslib_assign(_tslib_assign({}, jsonValues), {
2332
2612
  tags: Array.from(tags)
2333
2613
  });
2334
2614
  };
2335
2615
 
2336
2616
  State.prototype.matches = function (parentStateValue) {
2337
- return matchesState(parentStateValue, this.value);
2617
+ return utils_matchesState(parentStateValue, this.value);
2338
2618
  };
2339
2619
  /**
2340
2620
  * Whether the current state configuration has a state node with the specified `tag`.
@@ -2358,8 +2638,8 @@ function () {
2358
2638
  State.prototype.can = function (event) {
2359
2639
  var _a;
2360
2640
 
2361
- if (IS_PRODUCTION) {
2362
- warn(!!this.machine, "state.can(...) used outside of a machine-created State object; this will always return false.");
2641
+ if (environment_IS_PRODUCTION) {
2642
+ utils_warn(!!this.machine, "state.can(...) used outside of a machine-created State object; this will always return false.");
2363
2643
  }
2364
2644
 
2365
2645
  var transitionData = (_a = this.machine) === null || _a === void 0 ? void 0 : _a.getTransitionData(this, event);
@@ -2390,7 +2670,7 @@ function () {
2390
2670
  this.processingEvent = false;
2391
2671
  this.queue = [];
2392
2672
  this.initialized = false;
2393
- this.options = __assign(__assign({}, defaultOptions), options);
2673
+ this.options = _tslib_assign(_tslib_assign({}, defaultOptions), options);
2394
2674
  }
2395
2675
 
2396
2676
  Scheduler.prototype.initialize = function (callback) {
@@ -2496,7 +2776,7 @@ function getGlobal() {
2496
2776
  return __webpack_require__.g;
2497
2777
  }
2498
2778
 
2499
- if (!IS_PRODUCTION) {
2779
+ if (!environment_IS_PRODUCTION) {
2500
2780
  console.warn('XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues');
2501
2781
  }
2502
2782
  }
@@ -2746,8 +3026,8 @@ function () {
2746
3026
 
2747
3027
  if (_this.status === InterpreterStatus.Stopped) {
2748
3028
  // do nothing
2749
- if (!IS_PRODUCTION) {
2750
- warn(false, "Event \"".concat(_event.name, "\" was sent to stopped service \"").concat(_this.machine.id, "\". This service has already reached its final state, and will not transition.\nEvent: ").concat(JSON.stringify(_event.data)));
3029
+ if (!environment_IS_PRODUCTION) {
3030
+ utils_warn(false, "Event \"".concat(_event.name, "\" was sent to stopped service \"").concat(_this.machine.id, "\". This service has already reached its final state, and will not transition.\nEvent: ").concat(JSON.stringify(_event.data)));
2751
3031
  }
2752
3032
 
2753
3033
  return _this.state;
@@ -2772,8 +3052,8 @@ function () {
2772
3052
  };
2773
3053
 
2774
3054
  this.sendTo = function (event, to, immediate) {
2775
- var isParent = _this.parent && (to === SpecialTargets.Parent || _this.parent.id === to);
2776
- var target = isParent ? _this.parent : isString(to) ? to === SpecialTargets.Internal ? _this : _this.children.get(to) || registry.get(to) : isActor(to) ? to : undefined;
3055
+ var isParent = _this.parent && (to === types_SpecialTargets.Parent || _this.parent.id === to);
3056
+ var target = isParent ? _this.parent : utils_isString(to) ? to === types_SpecialTargets.Internal ? _this : _this.children.get(to) || registry.get(to) : isActor(to) ? to : undefined;
2777
3057
 
2778
3058
  if (!target) {
2779
3059
  if (!isParent) {
@@ -2781,8 +3061,8 @@ function () {
2781
3061
  } // tslint:disable-next-line:no-console
2782
3062
 
2783
3063
 
2784
- if (!IS_PRODUCTION) {
2785
- warn(false, "Service '".concat(_this.id, "' has no parent: unable to send event ").concat(event.type));
3064
+ if (!environment_IS_PRODUCTION) {
3065
+ utils_warn(false, "Service '".concat(_this.id, "' has no parent: unable to send event ").concat(event.type));
2786
3066
  }
2787
3067
 
2788
3068
  return;
@@ -2794,7 +3074,7 @@ function () {
2794
3074
  if (_this.status !== InterpreterStatus.Stopped || _this.parent !== target || // we need to send events to the parent from exit handlers of a machine that reached its final state
2795
3075
  _this.state.done) {
2796
3076
  // Send SCXML events to machines
2797
- var scxmlEvent = __assign(__assign({}, event), {
3077
+ var scxmlEvent = _tslib_assign(_tslib_assign({}, event), {
2798
3078
  name: event.name === actionTypes_error ? "".concat(actions_error(_this.id)) : event.name,
2799
3079
  origin: _this.sessionId
2800
3080
  });
@@ -2821,7 +3101,7 @@ function () {
2821
3101
  }
2822
3102
 
2823
3103
  var actionOrExec = action.exec || getActionFunction(action.type, actionFunctionMap);
2824
- var exec = isFunction(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
3104
+ var exec = utils_isFunction(actionOrExec) ? actionOrExec : actionOrExec ? actionOrExec.exec : action.exec;
2825
3105
 
2826
3106
  if (exec) {
2827
3107
  try {
@@ -2894,14 +3174,14 @@ function () {
2894
3174
  } // Invoked services
2895
3175
 
2896
3176
 
2897
- if (activity.type === ActionTypes.Invoke) {
3177
+ if (activity.type === types_ActionTypes.Invoke) {
2898
3178
  var invokeSource = toInvokeSource(activity.src);
2899
3179
  var serviceCreator = _this.machine.options.services ? _this.machine.options.services[invokeSource.type] : undefined;
2900
3180
  var id = activity.id,
2901
3181
  data = activity.data;
2902
3182
 
2903
- if (!IS_PRODUCTION) {
2904
- warn(!('forward' in activity), // tslint:disable-next-line:max-line-length
3183
+ if (!environment_IS_PRODUCTION) {
3184
+ utils_warn(!('forward' in activity), // tslint:disable-next-line:max-line-length
2905
3185
  "`forward` property is deprecated (found in invocation of '".concat(activity.src, "' in in machine '").concat(_this.machine.id, "'). ") + "Please use `autoForward` instead.");
2906
3186
  }
2907
3187
 
@@ -2909,8 +3189,8 @@ function () {
2909
3189
 
2910
3190
  if (!serviceCreator) {
2911
3191
  // tslint:disable-next-line:no-console
2912
- if (!IS_PRODUCTION) {
2913
- warn(false, "No service found for invocation '".concat(activity.src, "' in machine '").concat(_this.machine.id, "'."));
3192
+ if (!environment_IS_PRODUCTION) {
3193
+ utils_warn(false, "No service found for invocation '".concat(activity.src, "' in machine '").concat(_this.machine.id, "'."));
2914
3194
  }
2915
3195
 
2916
3196
  return;
@@ -2923,7 +3203,7 @@ function () {
2923
3203
  return;
2924
3204
  }
2925
3205
 
2926
- var source = isFunction(serviceCreator) ? serviceCreator(context, _event.data, {
3206
+ var source = utils_isFunction(serviceCreator) ? serviceCreator(context, _event.data, {
2927
3207
  data: resolvedData,
2928
3208
  src: invokeSource,
2929
3209
  meta: activity.meta
@@ -2936,7 +3216,7 @@ function () {
2936
3216
 
2937
3217
  var options = void 0;
2938
3218
 
2939
- if (isMachine(source)) {
3219
+ if (utils_isMachine(source)) {
2940
3220
  source = resolvedData ? source.withContext(resolvedData) : source;
2941
3221
  options = {
2942
3222
  autoForward: autoForward
@@ -2972,15 +3252,15 @@ function () {
2972
3252
  break;
2973
3253
 
2974
3254
  default:
2975
- if (!IS_PRODUCTION) {
2976
- warn(false, "No implementation found for action type '".concat(action.type, "'"));
3255
+ if (!environment_IS_PRODUCTION) {
3256
+ utils_warn(false, "No implementation found for action type '".concat(action.type, "'"));
2977
3257
  }
2978
3258
 
2979
3259
  break;
2980
3260
  }
2981
3261
  };
2982
3262
 
2983
- var resolvedOptions = __assign(__assign({}, Interpreter.defaultOptions), options);
3263
+ var resolvedOptions = _tslib_assign(_tslib_assign({}, Interpreter.defaultOptions), options);
2984
3264
 
2985
3265
  var clock = resolvedOptions.clock,
2986
3266
  logger = resolvedOptions.logger,
@@ -3019,8 +3299,8 @@ function () {
3019
3299
  * @deprecated Use `.getSnapshot()` instead.
3020
3300
  */
3021
3301
  get: function () {
3022
- if (!IS_PRODUCTION) {
3023
- warn(this.status !== InterpreterStatus.NotStarted, "Attempted to read state from uninitialized service '".concat(this.id, "'. Make sure the service is started first."));
3302
+ if (!environment_IS_PRODUCTION) {
3303
+ utils_warn(this.status !== InterpreterStatus.NotStarted, "Attempted to read state from uninitialized service '".concat(this.id, "'. Make sure the service is started first."));
3024
3304
  }
3025
3305
 
3026
3306
  return this._state;
@@ -3321,7 +3601,7 @@ function () {
3321
3601
  this.initialized = true;
3322
3602
  this.status = InterpreterStatus.Running;
3323
3603
  var resolvedState = initialState === undefined ? this.initialState : provide(this, function () {
3324
- return isStateConfig(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(State.from(initialState, _this.machine.context));
3604
+ return isStateConfig(initialState) ? _this.machine.resolveState(initialState) : _this.machine.resolveState(State_State.from(initialState, _this.machine.context));
3325
3605
  });
3326
3606
 
3327
3607
  if (this.options.devTools) {
@@ -3337,7 +3617,7 @@ function () {
3337
3617
  Interpreter.prototype._stopChildren = function () {
3338
3618
  // TODO: think about converting those to actions
3339
3619
  this.children.forEach(function (child) {
3340
- if (isFunction(child.stop)) {
3620
+ if (utils_isFunction(child.stop)) {
3341
3621
  child.stop();
3342
3622
  }
3343
3623
  });
@@ -3475,20 +3755,20 @@ function () {
3475
3755
  });
3476
3756
 
3477
3757
  var nextState = provide(_this, function () {
3478
- var exitActions = flatten(__spreadArray([], __read(_this.state.configuration), false).sort(function (a, b) {
3758
+ var exitActions = flatten(_tslib_spreadArray([], _tslib_read(_this.state.configuration), false).sort(function (a, b) {
3479
3759
  return b.order - a.order;
3480
3760
  }).map(function (stateNode) {
3481
3761
  return toActionObjects(stateNode.onExit, _this.machine.options.actions);
3482
3762
  }));
3483
3763
 
3484
- var _a = __read(resolveActions(_this.machine, _this.state, _this.state.context, _event, [{
3764
+ var _a = _tslib_read(resolveActions(_this.machine, _this.state, _this.state.context, _event, [{
3485
3765
  type: 'exit',
3486
3766
  actions: exitActions
3487
3767
  }], _this.machine.config.predictableActionArguments ? _this._exec : undefined, _this.machine.config.predictableActionArguments || _this.machine.config.preserveActionOrder), 2),
3488
3768
  resolvedActions = _a[0],
3489
3769
  updatedContext = _a[1];
3490
3770
 
3491
- var newState = new State({
3771
+ var newState = new State_State({
3492
3772
  value: _this.state.value,
3493
3773
  context: updatedContext,
3494
3774
  _event: _event,
@@ -3525,8 +3805,8 @@ function () {
3525
3805
 
3526
3806
  if (this.status === InterpreterStatus.NotStarted && this.options.deferEvents) {
3527
3807
  // tslint:disable-next-line:no-console
3528
- if (!IS_PRODUCTION) {
3529
- warn(false, "".concat(events.length, " event(s) were sent to uninitialized service \"").concat(this.machine.id, "\" and are deferred. Make sure .start() is called for this service.\nEvent: ").concat(JSON.stringify(event)));
3808
+ if (!environment_IS_PRODUCTION) {
3809
+ utils_warn(false, "".concat(events.length, " event(s) were sent to uninitialized service \"").concat(this.machine.id, "\" and are deferred. Make sure .start() is called for this service.\nEvent: ").concat(JSON.stringify(event)));
3530
3810
  }
3531
3811
  } else if (this.status !== InterpreterStatus.Running) {
3532
3812
  throw new Error( // tslint:disable-next-line:max-line-length
@@ -3553,7 +3833,7 @@ function () {
3553
3833
  nextState = provide(_this, function () {
3554
3834
  return _this.machine.transition(nextState, _event, undefined, exec || undefined);
3555
3835
  });
3556
- batchedActions.push.apply(batchedActions, __spreadArray([], __read(_this.machine.config.predictableActionArguments ? nextState.actions : nextState.actions.map(function (a) {
3836
+ batchedActions.push.apply(batchedActions, _tslib_spreadArray([], _tslib_read(_this.machine.config.predictableActionArguments ? nextState.actions : nextState.actions.map(function (a) {
3557
3837
  return bindActionToState(a, nextState);
3558
3838
  })), false));
3559
3839
  batchChanged = batchChanged || !!nextState.changed;
@@ -3702,26 +3982,26 @@ function () {
3702
3982
 
3703
3983
  this.removeChild(childId);
3704
3984
 
3705
- if (isFunction(child.stop)) {
3985
+ if (utils_isFunction(child.stop)) {
3706
3986
  child.stop();
3707
3987
  }
3708
3988
  };
3709
3989
 
3710
3990
  Interpreter.prototype.spawn = function (entity, name, options) {
3711
3991
  if (this.status !== InterpreterStatus.Running) {
3712
- return createDeferredActor(entity, name);
3992
+ return Actor_createDeferredActor(entity, name);
3713
3993
  }
3714
3994
 
3715
3995
  if (isPromiseLike(entity)) {
3716
3996
  return this.spawnPromise(Promise.resolve(entity), name);
3717
- } else if (isFunction(entity)) {
3997
+ } else if (utils_isFunction(entity)) {
3718
3998
  return this.spawnCallback(entity, name);
3719
3999
  } else if (isSpawnedActor(entity)) {
3720
4000
  return this.spawnActor(entity, name);
3721
4001
  } else if (isObservable(entity)) {
3722
4002
  return this.spawnObservable(entity, name);
3723
- } else if (isMachine(entity)) {
3724
- return this.spawnMachine(entity, __assign(__assign({}, options), {
4003
+ } else if (utils_isMachine(entity)) {
4004
+ return this.spawnMachine(entity, _tslib_assign(_tslib_assign({}, options), {
3725
4005
  id: name
3726
4006
  }));
3727
4007
  } else if (isBehavior(entity)) {
@@ -3738,16 +4018,16 @@ function () {
3738
4018
  options = {};
3739
4019
  }
3740
4020
 
3741
- var childService = new Interpreter(machine, __assign(__assign({}, this.options), {
4021
+ var childService = new Interpreter(machine, _tslib_assign(_tslib_assign({}, this.options), {
3742
4022
  parent: this,
3743
4023
  id: options.id || machine.id
3744
4024
  }));
3745
4025
 
3746
- var resolvedOptions = __assign(__assign({}, DEFAULT_SPAWN_OPTIONS), options);
4026
+ var resolvedOptions = _tslib_assign(_tslib_assign({}, DEFAULT_SPAWN_OPTIONS), options);
3747
4027
 
3748
4028
  if (resolvedOptions.sync) {
3749
4029
  childService.onTransition(function (state) {
3750
- _this.send(update, {
4030
+ _this.send(actionTypes_update, {
3751
4031
  state: state,
3752
4032
  id: childService.id
3753
4033
  });
@@ -3936,7 +4216,7 @@ function () {
3936
4216
  stop: function () {
3937
4217
  canceled = true;
3938
4218
 
3939
- if (isFunction(callbackStop)) {
4219
+ if (utils_isFunction(callbackStop)) {
3940
4220
  callbackStop();
3941
4221
  }
3942
4222
  },
@@ -4015,8 +4295,8 @@ function () {
4015
4295
  var implementation = this.machine.options && this.machine.options.activities ? this.machine.options.activities[activity.type] : undefined;
4016
4296
 
4017
4297
  if (!implementation) {
4018
- if (!IS_PRODUCTION) {
4019
- warn(false, "No implementation found for activity '".concat(activity.type, "'"));
4298
+ if (!environment_IS_PRODUCTION) {
4299
+ utils_warn(false, "No implementation found for activity '".concat(activity.type, "'"));
4020
4300
  } // tslint:disable-next-line:no-console
4021
4301
 
4022
4302
 
@@ -4063,7 +4343,7 @@ function () {
4063
4343
  if (this.options.devTools && global) {
4064
4344
  if (global.__REDUX_DEVTOOLS_EXTENSION__) {
4065
4345
  var devToolsOptions = typeof this.options.devTools === 'object' ? this.options.devTools : undefined;
4066
- this.devTools = global.__REDUX_DEVTOOLS_EXTENSION__.connect(__assign(__assign({
4346
+ this.devTools = global.__REDUX_DEVTOOLS_EXTENSION__.connect(_tslib_assign(_tslib_assign({
4067
4347
  name: this.id,
4068
4348
  autoPause: true,
4069
4349
  stateSanitizer: function (state) {
@@ -4074,7 +4354,7 @@ function () {
4074
4354
  };
4075
4355
  }
4076
4356
  }, devToolsOptions), {
4077
- features: __assign({
4357
+ features: _tslib_assign({
4078
4358
  jump: false,
4079
4359
  skip: false
4080
4360
  }, devToolsOptions ? devToolsOptions.features : undefined)
@@ -4195,7 +4475,7 @@ function invokeUtils_toInvokeSource(src) {
4195
4475
  return src;
4196
4476
  }
4197
4477
  function toInvokeDefinition(invokeConfig) {
4198
- return __assign(__assign({
4478
+ return _tslib_assign(_tslib_assign({
4199
4479
  type: invoke
4200
4480
  }, invokeConfig), {
4201
4481
  toJSON: function () {
@@ -4203,7 +4483,7 @@ function toInvokeDefinition(invokeConfig) {
4203
4483
  invokeConfig.onError;
4204
4484
  var invokeDef = __rest(invokeConfig, ["onDone", "onError"]);
4205
4485
 
4206
- return __assign(__assign({}, invokeDef), {
4486
+ return _tslib_assign(_tslib_assign({}, invokeDef), {
4207
4487
  type: invoke,
4208
4488
  src: invokeUtils_toInvokeSource(invokeConfig.src)
4209
4489
  });
@@ -4246,13 +4526,13 @@ var createDefaultOptions = function () {
4246
4526
 
4247
4527
  var validateArrayifiedTransitions = function (stateNode, event, transitions) {
4248
4528
  var hasNonLastUnguardedTarget = transitions.slice(0, -1).some(function (transition) {
4249
- return !('cond' in transition) && !('in' in transition) && (isString(transition.target) || isMachine(transition.target));
4529
+ return !('cond' in transition) && !('in' in transition) && (utils_isString(transition.target) || utils_isMachine(transition.target));
4250
4530
  });
4251
4531
  var eventText = event === NULL_EVENT ? 'the transient event' : "event '".concat(event, "'");
4252
- warn(!hasNonLastUnguardedTarget, "One or more transitions for ".concat(eventText, " on state '").concat(stateNode.id, "' are unreachable. ") + "Make sure that the default transition is the last one defined.");
4532
+ utils_warn(!hasNonLastUnguardedTarget, "One or more transitions for ".concat(eventText, " on state '").concat(stateNode.id, "' are unreachable. ") + "Make sure that the default transition is the last one defined.");
4253
4533
  };
4254
4534
 
4255
- var StateNode =
4535
+ var StateNode_StateNode =
4256
4536
  /*#__PURE__*/
4257
4537
 
4258
4538
  /** @class */
@@ -4301,14 +4581,14 @@ function () {
4301
4581
  this.machine = this.parent ? this.parent.machine : this;
4302
4582
  this.path = this.parent ? this.parent.path.concat(this.key) : [];
4303
4583
  this.delimiter = this.config.delimiter || (this.parent ? this.parent.delimiter : STATE_DELIMITER);
4304
- this.id = this.config.id || __spreadArray([this.machine.key], __read(this.path), false).join(this.delimiter);
4584
+ this.id = this.config.id || _tslib_spreadArray([this.machine.key], _tslib_read(this.path), false).join(this.delimiter);
4305
4585
  this.version = this.parent ? this.parent.version : this.config.version;
4306
4586
  this.type = this.config.type || (this.config.parallel ? 'parallel' : this.config.states && Object.keys(this.config.states).length ? 'compound' : this.config.history ? 'history' : 'atomic');
4307
4587
  this.schema = this.parent ? this.machine.schema : (_a = this.config.schema) !== null && _a !== void 0 ? _a : {};
4308
4588
  this.description = this.config.description;
4309
4589
 
4310
- if (!IS_PRODUCTION) {
4311
- warn(!('parallel' in this.config), "The \"parallel\" property is deprecated and will be removed in version 4.1. ".concat(this.config.parallel ? "Replace with `type: 'parallel'`" : "Use `type: '".concat(this.type, "'`"), " in the config for state node '").concat(this.id, "' instead."));
4590
+ if (!environment_IS_PRODUCTION) {
4591
+ utils_warn(!('parallel' in this.config), "The \"parallel\" property is deprecated and will be removed in version 4.1. ".concat(this.config.parallel ? "Replace with `type: 'parallel'`" : "Use `type: '".concat(this.type, "'`"), " in the config for state node '").concat(this.id, "' instead."));
4312
4592
  }
4313
4593
 
4314
4594
  this.initial = this.config.initial;
@@ -4319,7 +4599,7 @@ function () {
4319
4599
  parent: _this,
4320
4600
  key: key
4321
4601
  });
4322
- Object.assign(_this.idMap, __assign((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap));
4602
+ Object.assign(_this.idMap, _tslib_assign((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap));
4323
4603
  return stateNode;
4324
4604
  }) : EMPTY_OBJECT; // Document order
4325
4605
 
@@ -4369,30 +4649,30 @@ function () {
4369
4649
  this.invoke = toArray(this.config.invoke).map(function (invokeConfig, i) {
4370
4650
  var _a, _b;
4371
4651
 
4372
- if (isMachine(invokeConfig)) {
4652
+ if (utils_isMachine(invokeConfig)) {
4373
4653
  var invokeId = createInvokeId(_this.id, i);
4374
- _this.machine.options.services = __assign((_a = {}, _a[invokeId] = invokeConfig, _a), _this.machine.options.services);
4654
+ _this.machine.options.services = _tslib_assign((_a = {}, _a[invokeId] = invokeConfig, _a), _this.machine.options.services);
4375
4655
  return toInvokeDefinition({
4376
4656
  src: invokeId,
4377
4657
  id: invokeId
4378
4658
  });
4379
- } else if (isString(invokeConfig.src)) {
4659
+ } else if (utils_isString(invokeConfig.src)) {
4380
4660
  var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
4381
- return toInvokeDefinition(__assign(__assign({}, invokeConfig), {
4661
+ return toInvokeDefinition(_tslib_assign(_tslib_assign({}, invokeConfig), {
4382
4662
  id: invokeId,
4383
4663
  src: invokeConfig.src
4384
4664
  }));
4385
- } else if (isMachine(invokeConfig.src) || isFunction(invokeConfig.src)) {
4665
+ } else if (utils_isMachine(invokeConfig.src) || utils_isFunction(invokeConfig.src)) {
4386
4666
  var invokeId = invokeConfig.id || createInvokeId(_this.id, i);
4387
- _this.machine.options.services = __assign((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
4388
- return toInvokeDefinition(__assign(__assign({
4667
+ _this.machine.options.services = _tslib_assign((_b = {}, _b[invokeId] = invokeConfig.src, _b), _this.machine.options.services);
4668
+ return toInvokeDefinition(_tslib_assign(_tslib_assign({
4389
4669
  id: invokeId
4390
4670
  }, invokeConfig), {
4391
4671
  src: invokeId
4392
4672
  }));
4393
4673
  } else {
4394
4674
  var invokeSource = invokeConfig.src;
4395
- return toInvokeDefinition(__assign(__assign({
4675
+ return toInvokeDefinition(_tslib_assign(_tslib_assign({
4396
4676
  id: createInvokeId(_this.id, i)
4397
4677
  }, invokeConfig), {
4398
4678
  src: invokeSource
@@ -4435,11 +4715,11 @@ function () {
4435
4715
  services = _a.services,
4436
4716
  delays = _a.delays;
4437
4717
  return new StateNode(this.config, {
4438
- actions: __assign(__assign({}, actions), options.actions),
4439
- activities: __assign(__assign({}, activities), options.activities),
4440
- guards: __assign(__assign({}, guards), options.guards),
4441
- services: __assign(__assign({}, services), options.services),
4442
- delays: __assign(__assign({}, delays), options.delays)
4718
+ actions: _tslib_assign(_tslib_assign({}, actions), options.actions),
4719
+ activities: _tslib_assign(_tslib_assign({}, activities), options.activities),
4720
+ guards: _tslib_assign(_tslib_assign({}, guards), options.guards),
4721
+ services: _tslib_assign(_tslib_assign({}, services), options.services),
4722
+ delays: _tslib_assign(_tslib_assign({}, delays), options.delays)
4443
4723
  }, context !== null && context !== void 0 ? context : this.context);
4444
4724
  };
4445
4725
  /**
@@ -4455,7 +4735,7 @@ function () {
4455
4735
 
4456
4736
  Object.defineProperty(StateNode.prototype, "context", {
4457
4737
  get: function () {
4458
- return isFunction(this._context) ? this._context() : this._context;
4738
+ return utils_isFunction(this._context) ? this._context() : this._context;
4459
4739
  },
4460
4740
  enumerable: false,
4461
4741
  configurable: true
@@ -4563,7 +4843,7 @@ function () {
4563
4843
  }
4564
4844
 
4565
4845
  var mutateEntryExit = function (delay, i) {
4566
- var delayRef = isFunction(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
4846
+ var delayRef = utils_isFunction(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
4567
4847
  var eventType = actions_after(delayRef, _this.id);
4568
4848
 
4569
4849
  _this.onEntry.push(actions_send(eventType, {
@@ -4577,18 +4857,18 @@ function () {
4577
4857
 
4578
4858
  var delayedTransitions = isArray(afterConfig) ? afterConfig.map(function (transition, i) {
4579
4859
  var eventType = mutateEntryExit(transition.delay, i);
4580
- return __assign(__assign({}, transition), {
4860
+ return _tslib_assign(_tslib_assign({}, transition), {
4581
4861
  event: eventType
4582
4862
  });
4583
4863
  }) : flatten(Object.keys(afterConfig).map(function (delay, i) {
4584
4864
  var configTransition = afterConfig[delay];
4585
- var resolvedTransition = isString(configTransition) ? {
4865
+ var resolvedTransition = utils_isString(configTransition) ? {
4586
4866
  target: configTransition
4587
4867
  } : configTransition;
4588
4868
  var resolvedDelay = !isNaN(+delay) ? +delay : delay;
4589
4869
  var eventType = mutateEntryExit(resolvedDelay, i);
4590
4870
  return toArray(resolvedTransition).map(function (transition) {
4591
- return __assign(__assign({}, transition), {
4871
+ return _tslib_assign(_tslib_assign({}, transition), {
4592
4872
  event: eventType,
4593
4873
  delay: resolvedDelay
4594
4874
  });
@@ -4596,7 +4876,7 @@ function () {
4596
4876
  }));
4597
4877
  return delayedTransitions.map(function (delayedTransition) {
4598
4878
  var delay = delayedTransition.delay;
4599
- return __assign(__assign({}, _this.formatTransition(delayedTransition)), {
4879
+ return _tslib_assign(_tslib_assign({}, _this.formatTransition(delayedTransition)), {
4600
4880
  delay: delay
4601
4881
  });
4602
4882
  });
@@ -4617,16 +4897,16 @@ function () {
4617
4897
  return [];
4618
4898
  }
4619
4899
 
4620
- var stateValue = state instanceof State ? state.value : toStateValue(state, this.delimiter);
4900
+ var stateValue = state instanceof State_State ? state.value : toStateValue(state, this.delimiter);
4621
4901
 
4622
- if (isString(stateValue)) {
4902
+ if (utils_isString(stateValue)) {
4623
4903
  var initialStateValue = this.getStateNode(stateValue).initial;
4624
4904
  return initialStateValue !== undefined ? this.getStateNodes((_a = {}, _a[stateValue] = initialStateValue, _a)) : [this, this.states[stateValue]];
4625
4905
  }
4626
4906
 
4627
4907
  var subStateKeys = Object.keys(stateValue);
4628
4908
  var subStateNodes = [this];
4629
- subStateNodes.push.apply(subStateNodes, __spreadArray([], __read(flatten(subStateKeys.map(function (subStateKey) {
4909
+ subStateNodes.push.apply(subStateNodes, _tslib_spreadArray([], _tslib_read(flatten(subStateKeys.map(function (subStateKey) {
4630
4910
  return _this.getStateNode(subStateKey).getStateNodes(stateValue[subStateKey]);
4631
4911
  }))), false));
4632
4912
  return subStateNodes;
@@ -4652,9 +4932,9 @@ function () {
4652
4932
 
4653
4933
 
4654
4934
  StateNode.prototype.resolveState = function (state) {
4655
- var stateFromConfig = state instanceof State ? state : State.create(state);
4935
+ var stateFromConfig = state instanceof State_State ? state : State_State.create(state);
4656
4936
  var configuration = Array.from(getConfiguration([], this.getStateNodes(stateFromConfig.value)));
4657
- return new State(__assign(__assign({}, stateFromConfig), {
4937
+ return new State_State(_tslib_assign(_tslib_assign({}, stateFromConfig), {
4658
4938
  value: this.resolve(stateFromConfig.value),
4659
4939
  configuration: configuration,
4660
4940
  done: isInFinalState(configuration, this),
@@ -4753,7 +5033,7 @@ function () {
4753
5033
 
4754
5034
  StateNode.prototype._transition = function (stateValue, state, _event) {
4755
5035
  // leaf node
4756
- if (isString(stateValue)) {
5036
+ if (utils_isString(stateValue)) {
4757
5037
  return this.transitionLeafNode(stateValue, state, _event);
4758
5038
  } // hierarchical node
4759
5039
 
@@ -4786,9 +5066,9 @@ function () {
4786
5066
  var cond = candidate.cond,
4787
5067
  stateIn = candidate.in;
4788
5068
  var resolvedContext = state.context;
4789
- var isInState = stateIn ? isString(stateIn) && isStateId(stateIn) ? // Check if in state by ID
5069
+ var isInState = stateIn ? utils_isString(stateIn) && isStateId(stateIn) ? // Check if in state by ID
4790
5070
  state.matches(toStateValue(this.getStateNodeById(stateIn).path, this.delimiter)) : // Check if in state by relative grandparent
4791
- matchesState(toStateValue(stateIn, this.delimiter), path(this.path.slice(0, -2))(state.value)) : true;
5071
+ utils_matchesState(toStateValue(stateIn, this.delimiter), path(this.path.slice(0, -2))(state.value)) : true;
4792
5072
  var guardPassed = false;
4793
5073
 
4794
5074
  try {
@@ -4802,7 +5082,7 @@ function () {
4802
5082
  nextStateNodes = candidate.target;
4803
5083
  }
4804
5084
 
4805
- actions.push.apply(actions, __spreadArray([], __read(candidate.actions), false));
5085
+ actions.push.apply(actions, _tslib_spreadArray([], _tslib_read(candidate.actions), false));
4806
5086
  selectedTransition = candidate;
4807
5087
  break;
4808
5088
  }
@@ -4966,7 +5246,7 @@ function () {
4966
5246
  });
4967
5247
  return {
4968
5248
  type: 'entry',
4969
- actions: toActionObjects(predictableExec ? __spreadArray(__spreadArray([], __read(entryActions), false), __read(invokeActions), false) : __spreadArray(__spreadArray([], __read(invokeActions), false), __read(entryActions), false), _this.machine.options.actions)
5249
+ actions: toActionObjects(predictableExec ? _tslib_spreadArray(_tslib_spreadArray([], _tslib_read(entryActions), false), _tslib_read(invokeActions), false) : _tslib_spreadArray(_tslib_spreadArray([], _tslib_read(invokeActions), false), _tslib_read(entryActions), false), _this.machine.options.actions)
4970
5250
  };
4971
5251
  }).concat({
4972
5252
  type: 'state_done',
@@ -4977,7 +5257,7 @@ function () {
4977
5257
  var exitActions = Array.from(exitStates).map(function (stateNode) {
4978
5258
  return {
4979
5259
  type: 'exit',
4980
- actions: toActionObjects(__spreadArray(__spreadArray([], __read(stateNode.onExit), false), __read(stateNode.activities.map(function (activity) {
5260
+ actions: toActionObjects(_tslib_spreadArray(_tslib_spreadArray([], _tslib_read(stateNode.onExit), false), _tslib_read(stateNode.activities.map(function (activity) {
4981
5261
  return actions_stop(activity);
4982
5262
  })), false), _this.machine.options.actions)
4983
5263
  };
@@ -4988,7 +5268,7 @@ function () {
4988
5268
  }).concat(entryActions);
4989
5269
 
4990
5270
  if (isDone) {
4991
- var stopActions = toActionObjects(flatten(__spreadArray([], __read(resolvedConfig), false).sort(function (a, b) {
5271
+ var stopActions = toActionObjects(flatten(_tslib_spreadArray([], _tslib_read(resolvedConfig), false).sort(function (a, b) {
4992
5272
  return b.order - a.order;
4993
5273
  }).map(function (stateNode) {
4994
5274
  return stateNode.onExit;
@@ -5021,15 +5301,15 @@ function () {
5021
5301
 
5022
5302
  var currentState;
5023
5303
 
5024
- if (state instanceof State) {
5025
- currentState = context === undefined ? state : this.resolveState(State.from(state, context));
5304
+ if (state instanceof State_State) {
5305
+ currentState = context === undefined ? state : this.resolveState(State_State.from(state, context));
5026
5306
  } else {
5027
- var resolvedStateValue = isString(state) ? this.resolve(pathToStateValue(this.getResolvedPath(state))) : this.resolve(state);
5307
+ var resolvedStateValue = utils_isString(state) ? this.resolve(pathToStateValue(this.getResolvedPath(state))) : this.resolve(state);
5028
5308
  var resolvedContext = context !== null && context !== void 0 ? context : this.machine.context;
5029
- currentState = this.resolveState(State.from(resolvedStateValue, resolvedContext));
5309
+ currentState = this.resolveState(State_State.from(resolvedStateValue, resolvedContext));
5030
5310
  }
5031
5311
 
5032
- if (!IS_PRODUCTION && _event.name === WILDCARD) {
5312
+ if (!environment_IS_PRODUCTION && _event.name === WILDCARD) {
5033
5313
  throw new Error("An event cannot have the wildcard type ('".concat(WILDCARD, "')"));
5034
5314
  }
5035
5315
 
@@ -5048,7 +5328,7 @@ function () {
5048
5328
  };
5049
5329
  var prevConfig = getConfiguration([], this.getStateNodes(currentState.value));
5050
5330
  var resolvedConfig = stateTransition.configuration.length ? getConfiguration(prevConfig, stateTransition.configuration) : prevConfig;
5051
- stateTransition.configuration = __spreadArray([], __read(resolvedConfig), false);
5331
+ stateTransition.configuration = _tslib_spreadArray([], _tslib_read(resolvedConfig), false);
5052
5332
  return this.resolveTransition(stateTransition, currentState, currentState.context, exec, _event);
5053
5333
  };
5054
5334
 
@@ -5062,7 +5342,7 @@ function () {
5062
5342
  state._event = originalEvent;
5063
5343
  state.event = originalEvent.data;
5064
5344
 
5065
- (_a = state.actions).unshift.apply(_a, __spreadArray([], __read(currentActions), false));
5345
+ (_a = state.actions).unshift.apply(_a, _tslib_spreadArray([], _tslib_read(currentActions), false));
5066
5346
 
5067
5347
  return state;
5068
5348
  };
@@ -5086,7 +5366,7 @@ function () {
5086
5366
  var resolvedStateValue = willTransition ? getValue(this.machine, configuration) : undefined;
5087
5367
  var historyValue = currentState ? currentState.historyValue ? currentState.historyValue : stateTransition.source ? this.machine.historyValue(currentState.value) : undefined : undefined;
5088
5368
  var actionBlocks = this.getActions(new Set(resolvedConfiguration), isDone, stateTransition, context, _event, currentState, predictableExec);
5089
- var activities = currentState ? __assign({}, currentState.activities) : {};
5369
+ var activities = currentState ? _tslib_assign({}, currentState.activities) : {};
5090
5370
 
5091
5371
  try {
5092
5372
  for (var actionBlocks_1 = _tslib_values(actionBlocks), actionBlocks_1_1 = actionBlocks_1.next(); !actionBlocks_1_1.done; actionBlocks_1_1 = actionBlocks_1.next()) {
@@ -5126,11 +5406,11 @@ function () {
5126
5406
  }
5127
5407
  }
5128
5408
 
5129
- var _e = __read(resolveActions(this, currentState, context, _event, actionBlocks, predictableExec, this.machine.config.predictableActionArguments || this.machine.config.preserveActionOrder), 2),
5409
+ var _e = _tslib_read(resolveActions(this, currentState, context, _event, actionBlocks, predictableExec, this.machine.config.predictableActionArguments || this.machine.config.preserveActionOrder), 2),
5130
5410
  resolvedActions = _e[0],
5131
5411
  updatedContext = _e[1];
5132
5412
 
5133
- var _f = __read(partition(resolvedActions, isRaisableAction), 2),
5413
+ var _f = _tslib_read(partition(resolvedActions, isRaisableAction), 2),
5134
5414
  raisedEvents = _f[0],
5135
5415
  nonRaisedActions = _f[1];
5136
5416
 
@@ -5142,8 +5422,8 @@ function () {
5142
5422
  var children = invokeActions.reduce(function (acc, action) {
5143
5423
  acc[action.activity.id] = createInvocableActor(action.activity, _this.machine, updatedContext, _event);
5144
5424
  return acc;
5145
- }, currentState ? __assign({}, currentState.children) : {});
5146
- var nextState = new State({
5425
+ }, currentState ? _tslib_assign({}, currentState.children) : {});
5426
+ var nextState = new State_State({
5147
5427
  value: resolvedStateValue || currentState.value,
5148
5428
  context: updatedContext,
5149
5429
  _event: _event,
@@ -5162,7 +5442,7 @@ function () {
5162
5442
  machine: this
5163
5443
  });
5164
5444
  var didUpdateContext = context !== updatedContext;
5165
- nextState.changed = _event.name === update || didUpdateContext; // Dispose of penultimate histories to prevent memory leaks
5445
+ nextState.changed = _event.name === actionTypes_update || didUpdateContext; // Dispose of penultimate histories to prevent memory leaks
5166
5446
 
5167
5447
  var history = nextState.history;
5168
5448
 
@@ -5307,7 +5587,7 @@ function () {
5307
5587
  });
5308
5588
 
5309
5589
  case 'compound':
5310
- if (isString(stateValue)) {
5590
+ if (utils_isString(stateValue)) {
5311
5591
  var subStateNode = this.getStateNode(stateValue);
5312
5592
 
5313
5593
  if (subStateNode.type === 'parallel' || subStateNode.type === 'compound') {
@@ -5420,7 +5700,7 @@ function () {
5420
5700
  if (this.type === 'history') {
5421
5701
  var historyConfig = this.config;
5422
5702
 
5423
- if (isString(historyConfig.target)) {
5703
+ if (utils_isString(historyConfig.target)) {
5424
5704
  target = isStateId(historyConfig.target) ? pathToStateValue(this.machine.getStateNodeById(historyConfig.target).path.slice(this.path.length - 1)) : historyConfig.target;
5425
5705
  } else {
5426
5706
  target = historyConfig.target;
@@ -5458,8 +5738,8 @@ function () {
5458
5738
 
5459
5739
 
5460
5740
  if (this.type === 'compound' && !this.initial) {
5461
- if (!IS_PRODUCTION) {
5462
- warn(false, "Compound state node '".concat(this.id, "' has no initial state."));
5741
+ if (!environment_IS_PRODUCTION) {
5742
+ utils_warn(false, "Compound state node '".concat(this.id, "' has no initial state."));
5463
5743
  }
5464
5744
 
5465
5745
  return [this];
@@ -5485,7 +5765,7 @@ function () {
5485
5765
  return [this];
5486
5766
  }
5487
5767
 
5488
- var _a = __read(relativePath),
5768
+ var _a = _tslib_read(relativePath),
5489
5769
  stateKey = _a[0],
5490
5770
  childStatePath = _a.slice(1);
5491
5771
 
@@ -5518,7 +5798,7 @@ function () {
5518
5798
  return stateNode.historyValue();
5519
5799
  }
5520
5800
 
5521
- var subStateValue = isString(relativeStateValue) ? undefined : relativeStateValue[key];
5801
+ var subStateValue = utils_isString(relativeStateValue) ? undefined : relativeStateValue[key];
5522
5802
  return stateNode.historyValue(subStateValue || stateNode.initialStateValue);
5523
5803
  }, function (stateNode) {
5524
5804
  return !stateNode.history;
@@ -5551,7 +5831,7 @@ function () {
5551
5831
 
5552
5832
  var subHistoryValue = nestedPath(parent.path, 'states')(historyValue).current;
5553
5833
 
5554
- if (isString(subHistoryValue)) {
5834
+ if (utils_isString(subHistoryValue)) {
5555
5835
  return [parent.getStateNode(subHistoryValue)];
5556
5836
  }
5557
5837
 
@@ -5659,7 +5939,7 @@ function () {
5659
5939
  }
5660
5940
 
5661
5941
  return _target.map(function (target) {
5662
- if (!isString(target)) {
5942
+ if (!utils_isString(target)) {
5663
5943
  return target;
5664
5944
  }
5665
5945
 
@@ -5691,12 +5971,12 @@ function () {
5691
5971
 
5692
5972
  var normalizedTarget = normalizeTarget(transitionConfig.target);
5693
5973
  var internal = 'internal' in transitionConfig ? transitionConfig.internal : normalizedTarget ? normalizedTarget.some(function (_target) {
5694
- return isString(_target) && _target[0] === _this.delimiter;
5974
+ return utils_isString(_target) && _target[0] === _this.delimiter;
5695
5975
  }) : true;
5696
5976
  var guards = this.machine.options.guards;
5697
5977
  var target = this.resolveTarget(normalizedTarget);
5698
5978
 
5699
- var transition = __assign(__assign({}, transitionConfig), {
5979
+ var transition = _tslib_assign(_tslib_assign({}, transitionConfig), {
5700
5980
  actions: toActionObjects(toArray(transitionConfig.actions)),
5701
5981
  cond: toGuard(transitionConfig.cond, guards),
5702
5982
  target: target,
@@ -5704,7 +5984,7 @@ function () {
5704
5984
  internal: internal,
5705
5985
  eventType: transitionConfig.event,
5706
5986
  toJSON: function () {
5707
- return __assign(__assign({}, transition), {
5987
+ return _tslib_assign(_tslib_assign({}, transition), {
5708
5988
  target: transition.target ? transition.target.map(function (t) {
5709
5989
  return "#".concat(t.id);
5710
5990
  }) : undefined,
@@ -5735,13 +6015,13 @@ function () {
5735
6015
  strictTransitionConfigs_1 = __rest(_b, [typeof _c === "symbol" ? _c : _c + ""]);
5736
6016
 
5737
6017
  onConfig = flatten(Object.keys(strictTransitionConfigs_1).map(function (key) {
5738
- if (!IS_PRODUCTION && key === NULL_EVENT) {
5739
- warn(false, "Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. " + "Please check the `on` configuration for \"#".concat(_this.id, "\"."));
6018
+ if (!environment_IS_PRODUCTION && key === NULL_EVENT) {
6019
+ utils_warn(false, "Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. " + "Please check the `on` configuration for \"#".concat(_this.id, "\"."));
5740
6020
  }
5741
6021
 
5742
6022
  var transitionConfigArray = toTransitionConfigArray(key, strictTransitionConfigs_1[key]);
5743
6023
 
5744
- if (!IS_PRODUCTION) {
6024
+ if (!environment_IS_PRODUCTION) {
5745
6025
  validateArrayifiedTransitions(_this, key, transitionConfigArray);
5746
6026
  }
5747
6027
 
@@ -5752,25 +6032,25 @@ function () {
5752
6032
  var eventlessConfig = this.config.always ? toTransitionConfigArray('', this.config.always) : [];
5753
6033
  var doneConfig = this.config.onDone ? toTransitionConfigArray(String(done(this.id)), this.config.onDone) : [];
5754
6034
 
5755
- if (!IS_PRODUCTION) {
5756
- warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"".concat(this.id, "\"."));
6035
+ if (!environment_IS_PRODUCTION) {
6036
+ utils_warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"".concat(this.id, "\"."));
5757
6037
  }
5758
6038
 
5759
6039
  var invokeConfig = flatten(this.invoke.map(function (invokeDef) {
5760
6040
  var settleTransitions = [];
5761
6041
 
5762
6042
  if (invokeDef.onDone) {
5763
- settleTransitions.push.apply(settleTransitions, __spreadArray([], __read(toTransitionConfigArray(String(actions_doneInvoke(invokeDef.id)), invokeDef.onDone)), false));
6043
+ settleTransitions.push.apply(settleTransitions, _tslib_spreadArray([], _tslib_read(toTransitionConfigArray(String(actions_doneInvoke(invokeDef.id)), invokeDef.onDone)), false));
5764
6044
  }
5765
6045
 
5766
6046
  if (invokeDef.onError) {
5767
- settleTransitions.push.apply(settleTransitions, __spreadArray([], __read(toTransitionConfigArray(String(actions_error(invokeDef.id)), invokeDef.onError)), false));
6047
+ settleTransitions.push.apply(settleTransitions, _tslib_spreadArray([], _tslib_read(toTransitionConfigArray(String(actions_error(invokeDef.id)), invokeDef.onError)), false));
5768
6048
  }
5769
6049
 
5770
6050
  return settleTransitions;
5771
6051
  }));
5772
6052
  var delayedTransitions = this.after;
5773
- var formattedTransitions = flatten(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(doneConfig), false), __read(invokeConfig), false), __read(onConfig), false), __read(eventlessConfig), false).map(function (transitionConfig) {
6053
+ var formattedTransitions = flatten(_tslib_spreadArray(_tslib_spreadArray(_tslib_spreadArray(_tslib_spreadArray([], _tslib_read(doneConfig), false), _tslib_read(invokeConfig), false), _tslib_read(onConfig), false), _tslib_read(eventlessConfig), false).map(function (transitionConfig) {
5774
6054
  return toArray(transitionConfig).map(function (transition) {
5775
6055
  return _this.formatTransition(transition);
5776
6056
  });
@@ -5811,7 +6091,7 @@ function Machine(config, options, initialContext) {
5811
6091
  initialContext = config.context;
5812
6092
  }
5813
6093
 
5814
- return new StateNode(config, options, initialContext);
6094
+ return new StateNode_StateNode(config, options, initialContext);
5815
6095
  }
5816
6096
  function createMachine(config, options) {
5817
6097
  if (!IS_PRODUCTION && !('predictableActionArguments' in config) && !warned) {
@@ -5834,7 +6114,7 @@ function mapState(stateMap, stateId) {
5834
6114
  var foundStateId;
5835
6115
 
5836
6116
  try {
5837
- for (var _b = _tslib_values(Object.keys(stateMap)), _c = _b.next(); !_c.done; _c = _b.next()) {
6117
+ for (var _b = __values(Object.keys(stateMap)), _c = _b.next(); !_c.done; _c = _b.next()) {
5838
6118
  var mappedStateId = _c.value;
5839
6119
 
5840
6120
  if (matchesState(mappedStateId, stateId) && (!foundStateId || stateId.length > foundStateId.length)) {
@@ -5868,7 +6148,7 @@ function matchState(state, patterns, defaultValue) {
5868
6148
  var resolvedState = State.from(state, state instanceof State ? state.context : undefined);
5869
6149
 
5870
6150
  try {
5871
- for (var patterns_1 = _tslib_values(patterns), patterns_1_1 = patterns_1.next(); !patterns_1_1.done; patterns_1_1 = patterns_1.next()) {
6151
+ for (var patterns_1 = __values(patterns), patterns_1_1 = patterns_1.next(); !patterns_1_1.done; patterns_1_1 = patterns_1.next()) {
5872
6152
  var _b = __read(patterns_1_1.value, 2),
5873
6153
  stateValue = _b[0],
5874
6154
  getValue = _b[1];
@@ -5898,7 +6178,7 @@ function matchState(state, patterns, defaultValue) {
5898
6178
  function createSchema(schema) {
5899
6179
  return schema;
5900
6180
  }
5901
- var t = createSchema;
6181
+ var t = (/* unused pure expression or super */ null && (createSchema));
5902
6182
 
5903
6183
 
5904
6184
 
@@ -5919,13 +6199,17 @@ var t = createSchema;
5919
6199
 
5920
6200
 
5921
6201
  var es_assign = actions_assign,
5922
- es_send = actions_send,
5923
- es_sendTo = sendTo,
5924
- es_sendParent = sendParent,
5925
- es_sendUpdate = sendUpdate,
5926
- es_forwardTo = forwardTo,
5927
- es_doneInvoke = actions_doneInvoke,
5928
- es_raise = actions_raise;
6202
+ es_send = (/* unused pure expression or super */ null && (send$1)),
6203
+ es_sendTo = (/* unused pure expression or super */ null && (sendTo$1)),
6204
+ es_sendParent = (/* unused pure expression or super */ null && (sendParent$1)),
6205
+ es_sendUpdate = (/* unused pure expression or super */ null && (sendUpdate$1)),
6206
+ es_forwardTo = (/* unused pure expression or super */ null && (forwardTo$1)),
6207
+ es_doneInvoke = (/* unused pure expression or super */ null && (doneInvoke$1)),
6208
+ es_raise = (/* unused pure expression or super */ null && (raise$1)),
6209
+ es_log = (/* unused pure expression or super */ null && (log$1)),
6210
+ es_pure = (/* unused pure expression or super */ null && (pure$1)),
6211
+ es_choose = (/* unused pure expression or super */ null && (choose$1)),
6212
+ es_stop = (/* unused pure expression or super */ null && (stop$1));
5929
6213
 
5930
6214
 
5931
6215