@expo/cli 0.18.7 → 0.18.9

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 (25) hide show
  1. package/build/bin/cli +1 -1
  2. package/build/src/login/index.js +1 -2
  3. package/build/src/login/index.js.map +1 -1
  4. package/build/src/run/android/resolveGradlePropsAsync.js +9 -1
  5. package/build/src/run/android/resolveGradlePropsAsync.js.map +1 -1
  6. package/build/src/start/platforms/android/adb.js +2 -0
  7. package/build/src/start/platforms/android/adb.js.map +1 -1
  8. package/build/src/utils/telemetry/getContext.js +1 -1
  9. package/package.json +3 -3
  10. package/static/canary/react-is/cjs/react-is.development.js +200 -0
  11. package/static/canary/react-is/cjs/react-is.production.js +130 -0
  12. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +22899 -24003
  13. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +5190 -4270
  14. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +5206 -4094
  15. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +23165 -24313
  16. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5298 -4377
  17. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11347 -0
  18. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +711 -0
  19. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +415 -0
  20. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +208 -0
  21. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +145 -0
  22. package/static/canary/scheduler/cjs/scheduler.development.js +625 -0
  23. package/static/canary/scheduler/cjs/scheduler.native.development.js +538 -0
  24. package/static/canary/scheduler/cjs/scheduler.native.production.js +329 -0
  25. package/static/canary/scheduler/cjs/scheduler.production.js +341 -0
@@ -0,0 +1,329 @@
1
+ /**
2
+ * @license React
3
+ * scheduler.native.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ "use strict";
12
+ function push(heap, node) {
13
+ var index = heap.length;
14
+ heap.push(node);
15
+ a: for (; 0 < index; ) {
16
+ var parentIndex = (index - 1) >>> 1,
17
+ parent = heap[parentIndex];
18
+ if (0 < compare(parent, node))
19
+ (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
20
+ else break a;
21
+ }
22
+ }
23
+ function peek(heap) {
24
+ return 0 === heap.length ? null : heap[0];
25
+ }
26
+ function pop(heap) {
27
+ if (0 === heap.length) return null;
28
+ var first = heap[0],
29
+ last = heap.pop();
30
+ if (last !== first) {
31
+ heap[0] = last;
32
+ a: for (
33
+ var index = 0, length = heap.length, halfLength = length >>> 1;
34
+ index < halfLength;
35
+
36
+ ) {
37
+ var leftIndex = 2 * (index + 1) - 1,
38
+ left = heap[leftIndex],
39
+ rightIndex = leftIndex + 1,
40
+ right = heap[rightIndex];
41
+ if (0 > compare(left, last))
42
+ rightIndex < length && 0 > compare(right, left)
43
+ ? ((heap[index] = right),
44
+ (heap[rightIndex] = last),
45
+ (index = rightIndex))
46
+ : ((heap[index] = left),
47
+ (heap[leftIndex] = last),
48
+ (index = leftIndex));
49
+ else if (rightIndex < length && 0 > compare(right, last))
50
+ (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
51
+ else break a;
52
+ }
53
+ }
54
+ return first;
55
+ }
56
+ function compare(a, b) {
57
+ var diff = a.sortIndex - b.sortIndex;
58
+ return 0 !== diff ? diff : a.id - b.id;
59
+ }
60
+ var getCurrentTime;
61
+ if ("object" === typeof performance && "function" === typeof performance.now) {
62
+ var localPerformance = performance;
63
+ getCurrentTime = function () {
64
+ return localPerformance.now();
65
+ };
66
+ } else {
67
+ var localDate = Date,
68
+ initialTime = localDate.now();
69
+ getCurrentTime = function () {
70
+ return localDate.now() - initialTime;
71
+ };
72
+ }
73
+ var taskQueue = [],
74
+ timerQueue = [],
75
+ taskIdCounter = 1,
76
+ currentTask = null,
77
+ currentPriorityLevel = 3,
78
+ isPerformingWork = !1,
79
+ isHostCallbackScheduled = !1,
80
+ isHostTimeoutScheduled = !1,
81
+ localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
82
+ localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
83
+ localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
84
+ function advanceTimers(currentTime) {
85
+ for (var timer = peek(timerQueue); null !== timer; ) {
86
+ if (null === timer.callback) pop(timerQueue);
87
+ else if (timer.startTime <= currentTime)
88
+ pop(timerQueue),
89
+ (timer.sortIndex = timer.expirationTime),
90
+ push(taskQueue, timer);
91
+ else break;
92
+ timer = peek(timerQueue);
93
+ }
94
+ }
95
+ function handleTimeout(currentTime) {
96
+ isHostTimeoutScheduled = !1;
97
+ advanceTimers(currentTime);
98
+ if (!isHostCallbackScheduled)
99
+ if (null !== peek(taskQueue))
100
+ (isHostCallbackScheduled = !0),
101
+ isMessageLoopRunning ||
102
+ ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
103
+ else {
104
+ var firstTimer = peek(timerQueue);
105
+ null !== firstTimer &&
106
+ requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
107
+ }
108
+ }
109
+ function unstable_scheduleCallback$1(priorityLevel, callback, options) {
110
+ var currentTime = getCurrentTime();
111
+ "object" === typeof options && null !== options
112
+ ? ((options = options.delay),
113
+ (options =
114
+ "number" === typeof options && 0 < options
115
+ ? currentTime + options
116
+ : currentTime))
117
+ : (options = currentTime);
118
+ switch (priorityLevel) {
119
+ case 1:
120
+ var timeout = -1;
121
+ break;
122
+ case 2:
123
+ timeout = 250;
124
+ break;
125
+ case 5:
126
+ timeout = 1073741823;
127
+ break;
128
+ case 4:
129
+ timeout = 1e4;
130
+ break;
131
+ default:
132
+ timeout = 5e3;
133
+ }
134
+ timeout = options + timeout;
135
+ priorityLevel = {
136
+ id: taskIdCounter++,
137
+ callback: callback,
138
+ priorityLevel: priorityLevel,
139
+ startTime: options,
140
+ expirationTime: timeout,
141
+ sortIndex: -1
142
+ };
143
+ options > currentTime
144
+ ? ((priorityLevel.sortIndex = options),
145
+ push(timerQueue, priorityLevel),
146
+ null === peek(taskQueue) &&
147
+ priorityLevel === peek(timerQueue) &&
148
+ (isHostTimeoutScheduled
149
+ ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
150
+ : (isHostTimeoutScheduled = !0),
151
+ requestHostTimeout(handleTimeout, options - currentTime)))
152
+ : ((priorityLevel.sortIndex = timeout),
153
+ push(taskQueue, priorityLevel),
154
+ isHostCallbackScheduled ||
155
+ isPerformingWork ||
156
+ ((isHostCallbackScheduled = !0),
157
+ isMessageLoopRunning ||
158
+ ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));
159
+ return priorityLevel;
160
+ }
161
+ function unstable_cancelCallback$1(task) {
162
+ task.callback = null;
163
+ }
164
+ function unstable_getCurrentPriorityLevel$1() {
165
+ return currentPriorityLevel;
166
+ }
167
+ var isMessageLoopRunning = !1,
168
+ taskTimeoutID = -1,
169
+ startTime = -1;
170
+ function shouldYieldToHost() {
171
+ return 5 > getCurrentTime() - startTime ? !1 : !0;
172
+ }
173
+ function requestPaint() {}
174
+ function performWorkUntilDeadline() {
175
+ if (isMessageLoopRunning) {
176
+ var currentTime = getCurrentTime();
177
+ startTime = currentTime;
178
+ var hasMoreWork = !0;
179
+ try {
180
+ a: {
181
+ isHostCallbackScheduled = !1;
182
+ isHostTimeoutScheduled &&
183
+ ((isHostTimeoutScheduled = !1),
184
+ localClearTimeout(taskTimeoutID),
185
+ (taskTimeoutID = -1));
186
+ isPerformingWork = !0;
187
+ var previousPriorityLevel = currentPriorityLevel;
188
+ try {
189
+ b: {
190
+ advanceTimers(currentTime);
191
+ for (
192
+ currentTask = peek(taskQueue);
193
+ null !== currentTask &&
194
+ !(
195
+ currentTask.expirationTime > currentTime && shouldYieldToHost()
196
+ );
197
+
198
+ ) {
199
+ var callback = currentTask.callback;
200
+ if ("function" === typeof callback) {
201
+ currentTask.callback = null;
202
+ currentPriorityLevel = currentTask.priorityLevel;
203
+ var continuationCallback = callback(
204
+ currentTask.expirationTime <= currentTime
205
+ );
206
+ currentTime = getCurrentTime();
207
+ if ("function" === typeof continuationCallback) {
208
+ currentTask.callback = continuationCallback;
209
+ advanceTimers(currentTime);
210
+ hasMoreWork = !0;
211
+ break b;
212
+ }
213
+ currentTask === peek(taskQueue) && pop(taskQueue);
214
+ advanceTimers(currentTime);
215
+ } else pop(taskQueue);
216
+ currentTask = peek(taskQueue);
217
+ }
218
+ if (null !== currentTask) hasMoreWork = !0;
219
+ else {
220
+ var firstTimer = peek(timerQueue);
221
+ null !== firstTimer &&
222
+ requestHostTimeout(
223
+ handleTimeout,
224
+ firstTimer.startTime - currentTime
225
+ );
226
+ hasMoreWork = !1;
227
+ }
228
+ }
229
+ break a;
230
+ } finally {
231
+ (currentTask = null),
232
+ (currentPriorityLevel = previousPriorityLevel),
233
+ (isPerformingWork = !1);
234
+ }
235
+ hasMoreWork = void 0;
236
+ }
237
+ } finally {
238
+ hasMoreWork
239
+ ? schedulePerformWorkUntilDeadline()
240
+ : (isMessageLoopRunning = !1);
241
+ }
242
+ }
243
+ }
244
+ var schedulePerformWorkUntilDeadline;
245
+ if ("function" === typeof localSetImmediate)
246
+ schedulePerformWorkUntilDeadline = function () {
247
+ localSetImmediate(performWorkUntilDeadline);
248
+ };
249
+ else if ("undefined" !== typeof MessageChannel) {
250
+ var channel = new MessageChannel(),
251
+ port = channel.port2;
252
+ channel.port1.onmessage = performWorkUntilDeadline;
253
+ schedulePerformWorkUntilDeadline = function () {
254
+ port.postMessage(null);
255
+ };
256
+ } else
257
+ schedulePerformWorkUntilDeadline = function () {
258
+ localSetTimeout(performWorkUntilDeadline, 0);
259
+ };
260
+ function requestHostTimeout(callback, ms) {
261
+ taskTimeoutID = localSetTimeout(function () {
262
+ callback(getCurrentTime());
263
+ }, ms);
264
+ }
265
+ var unstable_UserBlockingPriority =
266
+ "undefined" !== typeof nativeRuntimeScheduler
267
+ ? nativeRuntimeScheduler.unstable_UserBlockingPriority
268
+ : 2,
269
+ unstable_NormalPriority =
270
+ "undefined" !== typeof nativeRuntimeScheduler
271
+ ? nativeRuntimeScheduler.unstable_NormalPriority
272
+ : 3,
273
+ unstable_LowPriority =
274
+ "undefined" !== typeof nativeRuntimeScheduler
275
+ ? nativeRuntimeScheduler.unstable_LowPriority
276
+ : 4,
277
+ unstable_ImmediatePriority =
278
+ "undefined" !== typeof nativeRuntimeScheduler
279
+ ? nativeRuntimeScheduler.unstable_ImmediatePriority
280
+ : 1,
281
+ unstable_scheduleCallback =
282
+ "undefined" !== typeof nativeRuntimeScheduler
283
+ ? nativeRuntimeScheduler.unstable_scheduleCallback
284
+ : unstable_scheduleCallback$1,
285
+ unstable_cancelCallback =
286
+ "undefined" !== typeof nativeRuntimeScheduler
287
+ ? nativeRuntimeScheduler.unstable_cancelCallback
288
+ : unstable_cancelCallback$1,
289
+ unstable_getCurrentPriorityLevel =
290
+ "undefined" !== typeof nativeRuntimeScheduler
291
+ ? nativeRuntimeScheduler.unstable_getCurrentPriorityLevel
292
+ : unstable_getCurrentPriorityLevel$1,
293
+ unstable_shouldYield =
294
+ "undefined" !== typeof nativeRuntimeScheduler
295
+ ? nativeRuntimeScheduler.unstable_shouldYield
296
+ : shouldYieldToHost,
297
+ unstable_requestPaint =
298
+ "undefined" !== typeof nativeRuntimeScheduler
299
+ ? nativeRuntimeScheduler.unstable_requestPaint
300
+ : requestPaint,
301
+ unstable_now =
302
+ "undefined" !== typeof nativeRuntimeScheduler
303
+ ? nativeRuntimeScheduler.unstable_now
304
+ : getCurrentTime;
305
+ function throwNotImplemented() {
306
+ throw Error("Not implemented.");
307
+ }
308
+ exports.unstable_IdlePriority =
309
+ "undefined" !== typeof nativeRuntimeScheduler
310
+ ? nativeRuntimeScheduler.unstable_IdlePriority
311
+ : 5;
312
+ exports.unstable_ImmediatePriority = unstable_ImmediatePriority;
313
+ exports.unstable_LowPriority = unstable_LowPriority;
314
+ exports.unstable_NormalPriority = unstable_NormalPriority;
315
+ exports.unstable_Profiling = null;
316
+ exports.unstable_UserBlockingPriority = unstable_UserBlockingPriority;
317
+ exports.unstable_cancelCallback = unstable_cancelCallback;
318
+ exports.unstable_continueExecution = throwNotImplemented;
319
+ exports.unstable_forceFrameRate = throwNotImplemented;
320
+ exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
321
+ exports.unstable_getFirstCallbackNode = throwNotImplemented;
322
+ exports.unstable_next = throwNotImplemented;
323
+ exports.unstable_now = unstable_now;
324
+ exports.unstable_pauseExecution = throwNotImplemented;
325
+ exports.unstable_requestPaint = unstable_requestPaint;
326
+ exports.unstable_runWithPriority = throwNotImplemented;
327
+ exports.unstable_scheduleCallback = unstable_scheduleCallback;
328
+ exports.unstable_shouldYield = unstable_shouldYield;
329
+ exports.unstable_wrapCallback = throwNotImplemented;
@@ -0,0 +1,341 @@
1
+ /**
2
+ * @license React
3
+ * scheduler.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ "use strict";
12
+ function push(heap, node) {
13
+ var index = heap.length;
14
+ heap.push(node);
15
+ a: for (; 0 < index; ) {
16
+ var parentIndex = (index - 1) >>> 1,
17
+ parent = heap[parentIndex];
18
+ if (0 < compare(parent, node))
19
+ (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);
20
+ else break a;
21
+ }
22
+ }
23
+ function peek(heap) {
24
+ return 0 === heap.length ? null : heap[0];
25
+ }
26
+ function pop(heap) {
27
+ if (0 === heap.length) return null;
28
+ var first = heap[0],
29
+ last = heap.pop();
30
+ if (last !== first) {
31
+ heap[0] = last;
32
+ a: for (
33
+ var index = 0, length = heap.length, halfLength = length >>> 1;
34
+ index < halfLength;
35
+
36
+ ) {
37
+ var leftIndex = 2 * (index + 1) - 1,
38
+ left = heap[leftIndex],
39
+ rightIndex = leftIndex + 1,
40
+ right = heap[rightIndex];
41
+ if (0 > compare(left, last))
42
+ rightIndex < length && 0 > compare(right, left)
43
+ ? ((heap[index] = right),
44
+ (heap[rightIndex] = last),
45
+ (index = rightIndex))
46
+ : ((heap[index] = left),
47
+ (heap[leftIndex] = last),
48
+ (index = leftIndex));
49
+ else if (rightIndex < length && 0 > compare(right, last))
50
+ (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);
51
+ else break a;
52
+ }
53
+ }
54
+ return first;
55
+ }
56
+ function compare(a, b) {
57
+ var diff = a.sortIndex - b.sortIndex;
58
+ return 0 !== diff ? diff : a.id - b.id;
59
+ }
60
+ exports.unstable_now = void 0;
61
+ if ("object" === typeof performance && "function" === typeof performance.now) {
62
+ var localPerformance = performance;
63
+ exports.unstable_now = function () {
64
+ return localPerformance.now();
65
+ };
66
+ } else {
67
+ var localDate = Date,
68
+ initialTime = localDate.now();
69
+ exports.unstable_now = function () {
70
+ return localDate.now() - initialTime;
71
+ };
72
+ }
73
+ var taskQueue = [],
74
+ timerQueue = [],
75
+ taskIdCounter = 1,
76
+ currentTask = null,
77
+ currentPriorityLevel = 3,
78
+ isPerformingWork = !1,
79
+ isHostCallbackScheduled = !1,
80
+ isHostTimeoutScheduled = !1,
81
+ localSetTimeout = "function" === typeof setTimeout ? setTimeout : null,
82
+ localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null,
83
+ localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null;
84
+ function advanceTimers(currentTime) {
85
+ for (var timer = peek(timerQueue); null !== timer; ) {
86
+ if (null === timer.callback) pop(timerQueue);
87
+ else if (timer.startTime <= currentTime)
88
+ pop(timerQueue),
89
+ (timer.sortIndex = timer.expirationTime),
90
+ push(taskQueue, timer);
91
+ else break;
92
+ timer = peek(timerQueue);
93
+ }
94
+ }
95
+ function handleTimeout(currentTime) {
96
+ isHostTimeoutScheduled = !1;
97
+ advanceTimers(currentTime);
98
+ if (!isHostCallbackScheduled)
99
+ if (null !== peek(taskQueue))
100
+ (isHostCallbackScheduled = !0), requestHostCallback();
101
+ else {
102
+ var firstTimer = peek(timerQueue);
103
+ null !== firstTimer &&
104
+ requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
105
+ }
106
+ }
107
+ var isMessageLoopRunning = !1,
108
+ taskTimeoutID = -1,
109
+ frameInterval = 5,
110
+ startTime = -1;
111
+ function shouldYieldToHost() {
112
+ return exports.unstable_now() - startTime < frameInterval ? !1 : !0;
113
+ }
114
+ function performWorkUntilDeadline() {
115
+ if (isMessageLoopRunning) {
116
+ var currentTime = exports.unstable_now();
117
+ startTime = currentTime;
118
+ var hasMoreWork = !0;
119
+ try {
120
+ a: {
121
+ isHostCallbackScheduled = !1;
122
+ isHostTimeoutScheduled &&
123
+ ((isHostTimeoutScheduled = !1),
124
+ localClearTimeout(taskTimeoutID),
125
+ (taskTimeoutID = -1));
126
+ isPerformingWork = !0;
127
+ var previousPriorityLevel = currentPriorityLevel;
128
+ try {
129
+ b: {
130
+ advanceTimers(currentTime);
131
+ for (
132
+ currentTask = peek(taskQueue);
133
+ null !== currentTask &&
134
+ !(
135
+ currentTask.expirationTime > currentTime && shouldYieldToHost()
136
+ );
137
+
138
+ ) {
139
+ var callback = currentTask.callback;
140
+ if ("function" === typeof callback) {
141
+ currentTask.callback = null;
142
+ currentPriorityLevel = currentTask.priorityLevel;
143
+ var continuationCallback = callback(
144
+ currentTask.expirationTime <= currentTime
145
+ );
146
+ currentTime = exports.unstable_now();
147
+ if ("function" === typeof continuationCallback) {
148
+ currentTask.callback = continuationCallback;
149
+ advanceTimers(currentTime);
150
+ hasMoreWork = !0;
151
+ break b;
152
+ }
153
+ currentTask === peek(taskQueue) && pop(taskQueue);
154
+ advanceTimers(currentTime);
155
+ } else pop(taskQueue);
156
+ currentTask = peek(taskQueue);
157
+ }
158
+ if (null !== currentTask) hasMoreWork = !0;
159
+ else {
160
+ var firstTimer = peek(timerQueue);
161
+ null !== firstTimer &&
162
+ requestHostTimeout(
163
+ handleTimeout,
164
+ firstTimer.startTime - currentTime
165
+ );
166
+ hasMoreWork = !1;
167
+ }
168
+ }
169
+ break a;
170
+ } finally {
171
+ (currentTask = null),
172
+ (currentPriorityLevel = previousPriorityLevel),
173
+ (isPerformingWork = !1);
174
+ }
175
+ hasMoreWork = void 0;
176
+ }
177
+ } finally {
178
+ hasMoreWork
179
+ ? schedulePerformWorkUntilDeadline()
180
+ : (isMessageLoopRunning = !1);
181
+ }
182
+ }
183
+ }
184
+ var schedulePerformWorkUntilDeadline;
185
+ if ("function" === typeof localSetImmediate)
186
+ schedulePerformWorkUntilDeadline = function () {
187
+ localSetImmediate(performWorkUntilDeadline);
188
+ };
189
+ else if ("undefined" !== typeof MessageChannel) {
190
+ var channel = new MessageChannel(),
191
+ port = channel.port2;
192
+ channel.port1.onmessage = performWorkUntilDeadline;
193
+ schedulePerformWorkUntilDeadline = function () {
194
+ port.postMessage(null);
195
+ };
196
+ } else
197
+ schedulePerformWorkUntilDeadline = function () {
198
+ localSetTimeout(performWorkUntilDeadline, 0);
199
+ };
200
+ function requestHostCallback() {
201
+ isMessageLoopRunning ||
202
+ ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());
203
+ }
204
+ function requestHostTimeout(callback, ms) {
205
+ taskTimeoutID = localSetTimeout(function () {
206
+ callback(exports.unstable_now());
207
+ }, ms);
208
+ }
209
+ exports.unstable_IdlePriority = 5;
210
+ exports.unstable_ImmediatePriority = 1;
211
+ exports.unstable_LowPriority = 4;
212
+ exports.unstable_NormalPriority = 3;
213
+ exports.unstable_Profiling = null;
214
+ exports.unstable_UserBlockingPriority = 2;
215
+ exports.unstable_cancelCallback = function (task) {
216
+ task.callback = null;
217
+ };
218
+ exports.unstable_continueExecution = function () {
219
+ isHostCallbackScheduled ||
220
+ isPerformingWork ||
221
+ ((isHostCallbackScheduled = !0), requestHostCallback());
222
+ };
223
+ exports.unstable_forceFrameRate = function (fps) {
224
+ 0 > fps || 125 < fps
225
+ ? console.error(
226
+ "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
227
+ )
228
+ : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);
229
+ };
230
+ exports.unstable_getCurrentPriorityLevel = function () {
231
+ return currentPriorityLevel;
232
+ };
233
+ exports.unstable_getFirstCallbackNode = function () {
234
+ return peek(taskQueue);
235
+ };
236
+ exports.unstable_next = function (eventHandler) {
237
+ switch (currentPriorityLevel) {
238
+ case 1:
239
+ case 2:
240
+ case 3:
241
+ var priorityLevel = 3;
242
+ break;
243
+ default:
244
+ priorityLevel = currentPriorityLevel;
245
+ }
246
+ var previousPriorityLevel = currentPriorityLevel;
247
+ currentPriorityLevel = priorityLevel;
248
+ try {
249
+ return eventHandler();
250
+ } finally {
251
+ currentPriorityLevel = previousPriorityLevel;
252
+ }
253
+ };
254
+ exports.unstable_pauseExecution = function () {};
255
+ exports.unstable_requestPaint = function () {};
256
+ exports.unstable_runWithPriority = function (priorityLevel, eventHandler) {
257
+ switch (priorityLevel) {
258
+ case 1:
259
+ case 2:
260
+ case 3:
261
+ case 4:
262
+ case 5:
263
+ break;
264
+ default:
265
+ priorityLevel = 3;
266
+ }
267
+ var previousPriorityLevel = currentPriorityLevel;
268
+ currentPriorityLevel = priorityLevel;
269
+ try {
270
+ return eventHandler();
271
+ } finally {
272
+ currentPriorityLevel = previousPriorityLevel;
273
+ }
274
+ };
275
+ exports.unstable_scheduleCallback = function (
276
+ priorityLevel,
277
+ callback,
278
+ options
279
+ ) {
280
+ var currentTime = exports.unstable_now();
281
+ "object" === typeof options && null !== options
282
+ ? ((options = options.delay),
283
+ (options =
284
+ "number" === typeof options && 0 < options
285
+ ? currentTime + options
286
+ : currentTime))
287
+ : (options = currentTime);
288
+ switch (priorityLevel) {
289
+ case 1:
290
+ var timeout = -1;
291
+ break;
292
+ case 2:
293
+ timeout = 250;
294
+ break;
295
+ case 5:
296
+ timeout = 1073741823;
297
+ break;
298
+ case 4:
299
+ timeout = 1e4;
300
+ break;
301
+ default:
302
+ timeout = 5e3;
303
+ }
304
+ timeout = options + timeout;
305
+ priorityLevel = {
306
+ id: taskIdCounter++,
307
+ callback: callback,
308
+ priorityLevel: priorityLevel,
309
+ startTime: options,
310
+ expirationTime: timeout,
311
+ sortIndex: -1
312
+ };
313
+ options > currentTime
314
+ ? ((priorityLevel.sortIndex = options),
315
+ push(timerQueue, priorityLevel),
316
+ null === peek(taskQueue) &&
317
+ priorityLevel === peek(timerQueue) &&
318
+ (isHostTimeoutScheduled
319
+ ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))
320
+ : (isHostTimeoutScheduled = !0),
321
+ requestHostTimeout(handleTimeout, options - currentTime)))
322
+ : ((priorityLevel.sortIndex = timeout),
323
+ push(taskQueue, priorityLevel),
324
+ isHostCallbackScheduled ||
325
+ isPerformingWork ||
326
+ ((isHostCallbackScheduled = !0), requestHostCallback()));
327
+ return priorityLevel;
328
+ };
329
+ exports.unstable_shouldYield = shouldYieldToHost;
330
+ exports.unstable_wrapCallback = function (callback) {
331
+ var parentPriorityLevel = currentPriorityLevel;
332
+ return function () {
333
+ var previousPriorityLevel = currentPriorityLevel;
334
+ currentPriorityLevel = parentPriorityLevel;
335
+ try {
336
+ return callback.apply(this, arguments);
337
+ } finally {
338
+ currentPriorityLevel = previousPriorityLevel;
339
+ }
340
+ };
341
+ };