Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/cca472eae023de0b20b594456b2a3e48.json
2020-12-31 20:18:50 +00:00

1 line
29 KiB
JSON

{"ast":null,"code":"/** @license React v0.18.0\n * scheduler.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function () {\n 'use strict';\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n var enableSchedulerDebugging = false;\n var enableIsInputPending = false;\n var enableProfiling = true;\n\n var _requestHostCallback;\n\n var requestHostTimeout;\n var cancelHostTimeout;\n var shouldYieldToHost;\n var requestPaint;\n\n if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive\n // implementation using setTimeout.\n typeof window === 'undefined' || // Check if MessageChannel is supported, too.\n typeof MessageChannel !== 'function') {\n // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,\n // fallback to a naive implementation.\n var _callback = null;\n var _timeoutID = null;\n\n var _flushCallback = function _flushCallback() {\n if (_callback !== null) {\n try {\n var currentTime = exports.unstable_now();\n var hasRemainingTime = true;\n\n _callback(hasRemainingTime, currentTime);\n\n _callback = null;\n } catch (e) {\n setTimeout(_flushCallback, 0);\n throw e;\n }\n }\n };\n\n var initialTime = Date.now();\n\n exports.unstable_now = function () {\n return Date.now() - initialTime;\n };\n\n _requestHostCallback = function requestHostCallback(cb) {\n if (_callback !== null) {\n // Protect against re-entrancy.\n setTimeout(_requestHostCallback, 0, cb);\n } else {\n _callback = cb;\n setTimeout(_flushCallback, 0);\n }\n };\n\n requestHostTimeout = function requestHostTimeout(cb, ms) {\n _timeoutID = setTimeout(cb, ms);\n };\n\n cancelHostTimeout = function cancelHostTimeout() {\n clearTimeout(_timeoutID);\n };\n\n shouldYieldToHost = function shouldYieldToHost() {\n return false;\n };\n\n requestPaint = exports.unstable_forceFrameRate = function () {};\n } else {\n // Capture local references to native APIs, in case a polyfill overrides them.\n var performance = window.performance;\n var _Date = window.Date;\n var _setTimeout = window.setTimeout;\n var _clearTimeout = window.clearTimeout;\n\n if (typeof console !== 'undefined') {\n // TODO: Scheduler no longer requires these methods to be polyfilled. But\n // maybe we want to continue warning if they don't exist, to preserve the\n // option to rely on it in the future?\n var requestAnimationFrame = window.requestAnimationFrame;\n var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link\n\n if (typeof requestAnimationFrame !== 'function') {\n console.error(\"This browser doesn't support requestAnimationFrame. \" + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');\n }\n\n if (typeof cancelAnimationFrame !== 'function') {\n console.error(\"This browser doesn't support cancelAnimationFrame. \" + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');\n }\n }\n\n if (typeof performance === 'object' && typeof performance.now === 'function') {\n exports.unstable_now = function () {\n return performance.now();\n };\n } else {\n var _initialTime = _Date.now();\n\n exports.unstable_now = function () {\n return _Date.now() - _initialTime;\n };\n }\n\n var isMessageLoopRunning = false;\n var scheduledHostCallback = null;\n var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main\n // thread, like user events. By default, it yields multiple times per frame.\n // It does not attempt to align with frame boundaries, since most tasks don't\n // need to be frame aligned; for those that do, use requestAnimationFrame.\n\n var yieldInterval = 5;\n var deadline = 0; // TODO: Make this configurable\n // TODO: Adjust this based on priority?\n\n var maxYieldInterval = 300;\n var needsPaint = false;\n\n if (enableIsInputPending && navigator !== undefined && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined) {\n var scheduling = navigator.scheduling;\n\n shouldYieldToHost = function shouldYieldToHost() {\n var currentTime = exports.unstable_now();\n\n if (currentTime >= deadline) {\n // There's no time left. We may want to yield control of the main\n // thread, so the browser can perform high priority tasks. The main ones\n // are painting and user input. If there's a pending paint or a pending\n // input, then we should yield. But if there's neither, then we can\n // yield less often while remaining responsive. We'll eventually yield\n // regardless, since there could be a pending paint that wasn't\n // accompanied by a call to `requestPaint`, or other main thread tasks\n // like network events.\n if (needsPaint || scheduling.isInputPending()) {\n // There is either a pending paint or a pending input.\n return true;\n } // There's no pending input. Only yield if we've reached the max\n // yield interval.\n\n\n return currentTime >= maxYieldInterval;\n } else {\n // There's still time left in the frame.\n return false;\n }\n };\n\n requestPaint = function requestPaint() {\n needsPaint = true;\n };\n } else {\n // `isInputPending` is not available. Since we have no way of knowing if\n // there's pending input, always yield at the end of the frame.\n shouldYieldToHost = function shouldYieldToHost() {\n return exports.unstable_now() >= deadline;\n }; // Since we yield every frame regardless, `requestPaint` has no effect.\n\n\n requestPaint = function requestPaint() {};\n }\n\n exports.unstable_forceFrameRate = function (fps) {\n if (fps < 0 || fps > 125) {\n console.error('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');\n return;\n }\n\n if (fps > 0) {\n yieldInterval = Math.floor(1000 / fps);\n } else {\n // reset the framerate\n yieldInterval = 5;\n }\n };\n\n var performWorkUntilDeadline = function performWorkUntilDeadline() {\n if (scheduledHostCallback !== null) {\n var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync\n // cycle. This means there's always time remaining at the beginning of\n // the message event.\n\n deadline = currentTime + yieldInterval;\n var hasTimeRemaining = true;\n\n try {\n var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);\n\n if (!hasMoreWork) {\n isMessageLoopRunning = false;\n scheduledHostCallback = null;\n } else {\n // If there's more work, schedule the next message event at the end\n // of the preceding one.\n port.postMessage(null);\n }\n } catch (error) {\n // If a scheduler task throws, exit the current browser task so the\n // error can be observed.\n port.postMessage(null);\n throw error;\n }\n } else {\n isMessageLoopRunning = false;\n } // Yielding to the browser will give it a chance to paint, so we can\n // reset this.\n\n\n needsPaint = false;\n };\n\n var channel = new MessageChannel();\n var port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n\n _requestHostCallback = function _requestHostCallback(callback) {\n scheduledHostCallback = callback;\n\n if (!isMessageLoopRunning) {\n isMessageLoopRunning = true;\n port.postMessage(null);\n }\n };\n\n requestHostTimeout = function requestHostTimeout(callback, ms) {\n taskTimeoutID = _setTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n };\n\n cancelHostTimeout = function cancelHostTimeout() {\n _clearTimeout(taskTimeoutID);\n\n taskTimeoutID = -1;\n };\n }\n\n function push(heap, node) {\n var index = heap.length;\n heap.push(node);\n siftUp(heap, node, index);\n }\n\n function peek(heap) {\n var first = heap[0];\n return first === undefined ? null : first;\n }\n\n function pop(heap) {\n var first = heap[0];\n\n if (first !== undefined) {\n var last = heap.pop();\n\n if (last !== first) {\n heap[0] = last;\n siftDown(heap, last, 0);\n }\n\n return first;\n } else {\n return null;\n }\n }\n\n function siftUp(heap, node, i) {\n var index = i;\n\n while (true) {\n var parentIndex = Math.floor((index - 1) / 2);\n var parent = heap[parentIndex];\n\n if (parent !== undefined && compare(parent, node) > 0) {\n // The parent is larger. Swap positions.\n heap[parentIndex] = node;\n heap[index] = parent;\n index = parentIndex;\n } else {\n // The parent is smaller. Exit.\n return;\n }\n }\n }\n\n function siftDown(heap, node, i) {\n var index = i;\n var length = heap.length;\n\n while (index < length) {\n var leftIndex = (index + 1) * 2 - 1;\n var left = heap[leftIndex];\n var rightIndex = leftIndex + 1;\n var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.\n\n if (left !== undefined && compare(left, node) < 0) {\n if (right !== undefined && compare(right, left) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n heap[index] = left;\n heap[leftIndex] = node;\n index = leftIndex;\n }\n } else if (right !== undefined && compare(right, node) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n // Neither child is smaller. Exit.\n return;\n }\n }\n }\n\n function compare(a, b) {\n // Compare sort index first, then task id.\n var diff = a.sortIndex - b.sortIndex;\n return diff !== 0 ? diff : a.id - b.id;\n } // TODO: Use symbols?\n\n\n var NoPriority = 0;\n var ImmediatePriority = 1;\n var UserBlockingPriority = 2;\n var NormalPriority = 3;\n var LowPriority = 4;\n var IdlePriority = 5;\n var runIdCounter = 0;\n var mainThreadIdCounter = 0;\n var profilingStateSize = 4;\n var sharedProfilingBuffer = enableProfiling ? // $FlowFixMe Flow doesn't know about SharedArrayBuffer\n typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : // $FlowFixMe Flow doesn't know about ArrayBuffer\n typeof ArrayBuffer === 'function' ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : null // Don't crash the init path on IE9\n : null;\n var profilingState = enableProfiling && sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks\n\n var PRIORITY = 0;\n var CURRENT_TASK_ID = 1;\n var CURRENT_RUN_ID = 2;\n var QUEUE_SIZE = 3;\n\n if (enableProfiling) {\n profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue\n // array might include canceled tasks.\n\n profilingState[QUEUE_SIZE] = 0;\n profilingState[CURRENT_TASK_ID] = 0;\n } // Bytes per element is 4\n\n\n var INITIAL_EVENT_LOG_SIZE = 131072;\n var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes\n\n var eventLogSize = 0;\n var eventLogBuffer = null;\n var eventLog = null;\n var eventLogIndex = 0;\n var TaskStartEvent = 1;\n var TaskCompleteEvent = 2;\n var TaskErrorEvent = 3;\n var TaskCancelEvent = 4;\n var TaskRunEvent = 5;\n var TaskYieldEvent = 6;\n var SchedulerSuspendEvent = 7;\n var SchedulerResumeEvent = 8;\n\n function logEvent(entries) {\n if (eventLog !== null) {\n var offset = eventLogIndex;\n eventLogIndex += entries.length;\n\n if (eventLogIndex + 1 > eventLogSize) {\n eventLogSize *= 2;\n\n if (eventLogSize > MAX_EVENT_LOG_SIZE) {\n console.error(\"Scheduler Profiling: Event log exceeded maximum size. Don't \" + 'forget to call `stopLoggingProfilingEvents()`.');\n stopLoggingProfilingEvents();\n return;\n }\n\n var newEventLog = new Int32Array(eventLogSize * 4);\n newEventLog.set(eventLog);\n eventLogBuffer = newEventLog.buffer;\n eventLog = newEventLog;\n }\n\n eventLog.set(entries, offset);\n }\n }\n\n function startLoggingProfilingEvents() {\n eventLogSize = INITIAL_EVENT_LOG_SIZE;\n eventLogBuffer = new ArrayBuffer(eventLogSize * 4);\n eventLog = new Int32Array(eventLogBuffer);\n eventLogIndex = 0;\n }\n\n function stopLoggingProfilingEvents() {\n var buffer = eventLogBuffer;\n eventLogSize = 0;\n eventLogBuffer = null;\n eventLog = null;\n eventLogIndex = 0;\n return buffer;\n }\n\n function markTaskStart(task, ms) {\n if (enableProfiling) {\n profilingState[QUEUE_SIZE]++;\n\n if (eventLog !== null) {\n // performance.now returns a float, representing milliseconds. When the\n // event is logged, it's coerced to an int. Convert to microseconds to\n // maintain extra degrees of precision.\n logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);\n }\n }\n }\n\n function markTaskCompleted(task, ms) {\n if (enableProfiling) {\n profilingState[PRIORITY] = NoPriority;\n profilingState[CURRENT_TASK_ID] = 0;\n profilingState[QUEUE_SIZE]--;\n\n if (eventLog !== null) {\n logEvent([TaskCompleteEvent, ms * 1000, task.id]);\n }\n }\n }\n\n function markTaskCanceled(task, ms) {\n if (enableProfiling) {\n profilingState[QUEUE_SIZE]--;\n\n if (eventLog !== null) {\n logEvent([TaskCancelEvent, ms * 1000, task.id]);\n }\n }\n }\n\n function markTaskErrored(task, ms) {\n if (enableProfiling) {\n profilingState[PRIORITY] = NoPriority;\n profilingState[CURRENT_TASK_ID] = 0;\n profilingState[QUEUE_SIZE]--;\n\n if (eventLog !== null) {\n logEvent([TaskErrorEvent, ms * 1000, task.id]);\n }\n }\n }\n\n function markTaskRun(task, ms) {\n if (enableProfiling) {\n runIdCounter++;\n profilingState[PRIORITY] = task.priorityLevel;\n profilingState[CURRENT_TASK_ID] = task.id;\n profilingState[CURRENT_RUN_ID] = runIdCounter;\n\n if (eventLog !== null) {\n logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);\n }\n }\n }\n\n function markTaskYield(task, ms) {\n if (enableProfiling) {\n profilingState[PRIORITY] = NoPriority;\n profilingState[CURRENT_TASK_ID] = 0;\n profilingState[CURRENT_RUN_ID] = 0;\n\n if (eventLog !== null) {\n logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);\n }\n }\n }\n\n function markSchedulerSuspended(ms) {\n if (enableProfiling) {\n mainThreadIdCounter++;\n\n if (eventLog !== null) {\n logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);\n }\n }\n }\n\n function markSchedulerUnsuspended(ms) {\n if (enableProfiling) {\n if (eventLog !== null) {\n logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);\n }\n }\n }\n /* eslint-disable no-var */\n // Math.pow(2, 30) - 1\n // 0b111111111111111111111111111111\n\n\n var maxSigned31BitInt = 1073741823; // Times out immediately\n\n var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out\n\n var USER_BLOCKING_PRIORITY = 250;\n var NORMAL_PRIORITY_TIMEOUT = 5000;\n var LOW_PRIORITY_TIMEOUT = 10000; // Never times out\n\n var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap\n\n var taskQueue = [];\n var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.\n\n var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.\n\n var isSchedulerPaused = false;\n var currentTask = null;\n var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.\n\n var isPerformingWork = false;\n var isHostCallbackScheduled = false;\n var isHostTimeoutScheduled = false;\n\n function advanceTimers(currentTime) {\n // Check for tasks that are no longer delayed and add them to the queue.\n var timer = peek(timerQueue);\n\n while (timer !== null) {\n if (timer.callback === null) {\n // Timer was cancelled.\n pop(timerQueue);\n } else if (timer.startTime <= currentTime) {\n // Timer fired. Transfer to the task queue.\n pop(timerQueue);\n timer.sortIndex = timer.expirationTime;\n push(taskQueue, timer);\n\n if (enableProfiling) {\n markTaskStart(timer, currentTime);\n timer.isQueued = true;\n }\n } else {\n // Remaining timers are pending.\n return;\n }\n\n timer = peek(timerQueue);\n }\n }\n\n function handleTimeout(currentTime) {\n isHostTimeoutScheduled = false;\n advanceTimers(currentTime);\n\n if (!isHostCallbackScheduled) {\n if (peek(taskQueue) !== null) {\n isHostCallbackScheduled = true;\n\n _requestHostCallback(flushWork);\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n }\n }\n }\n\n function flushWork(hasTimeRemaining, initialTime) {\n if (enableProfiling) {\n markSchedulerUnsuspended(initialTime);\n } // We'll need a host callback the next time work is scheduled.\n\n\n isHostCallbackScheduled = false;\n\n if (isHostTimeoutScheduled) {\n // We scheduled a timeout but it's no longer needed. Cancel it.\n isHostTimeoutScheduled = false;\n cancelHostTimeout();\n }\n\n isPerformingWork = true;\n var previousPriorityLevel = currentPriorityLevel;\n\n try {\n if (enableProfiling) {\n try {\n return workLoop(hasTimeRemaining, initialTime);\n } catch (error) {\n if (currentTask !== null) {\n var currentTime = exports.unstable_now();\n markTaskErrored(currentTask, currentTime);\n currentTask.isQueued = false;\n }\n\n throw error;\n }\n } else {\n // No catch in prod codepath.\n return workLoop(hasTimeRemaining, initialTime);\n }\n } finally {\n currentTask = null;\n currentPriorityLevel = previousPriorityLevel;\n isPerformingWork = false;\n\n if (enableProfiling) {\n var _currentTime = exports.unstable_now();\n\n markSchedulerSuspended(_currentTime);\n }\n }\n }\n\n function workLoop(hasTimeRemaining, initialTime) {\n var currentTime = initialTime;\n advanceTimers(currentTime);\n currentTask = peek(taskQueue);\n\n while (currentTask !== null && !(enableSchedulerDebugging && isSchedulerPaused)) {\n if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {\n // This currentTask hasn't expired, and we've reached the deadline.\n break;\n }\n\n var callback = currentTask.callback;\n\n if (callback !== null) {\n currentTask.callback = null;\n currentPriorityLevel = currentTask.priorityLevel;\n var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n markTaskRun(currentTask, currentTime);\n var continuationCallback = callback(didUserCallbackTimeout);\n currentTime = exports.unstable_now();\n\n if (typeof continuationCallback === 'function') {\n currentTask.callback = continuationCallback;\n markTaskYield(currentTask, currentTime);\n } else {\n if (enableProfiling) {\n markTaskCompleted(currentTask, currentTime);\n currentTask.isQueued = false;\n }\n\n if (currentTask === peek(taskQueue)) {\n pop(taskQueue);\n }\n }\n\n advanceTimers(currentTime);\n } else {\n pop(taskQueue);\n }\n\n currentTask = peek(taskQueue);\n } // Return whether there's additional work\n\n\n if (currentTask !== null) {\n return true;\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n\n return false;\n }\n }\n\n function unstable_runWithPriority(priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n case LowPriority:\n case IdlePriority:\n break;\n\n default:\n priorityLevel = NormalPriority;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n }\n\n function unstable_next(eventHandler) {\n var priorityLevel;\n\n switch (currentPriorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n // Shift down to normal priority\n priorityLevel = NormalPriority;\n break;\n\n default:\n // Anything lower than normal priority should remain at the current level.\n priorityLevel = currentPriorityLevel;\n break;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n }\n\n function unstable_wrapCallback(callback) {\n var parentPriorityLevel = currentPriorityLevel;\n return function () {\n // This is a fork of runWithPriority, inlined for performance.\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n }\n\n function timeoutForPriorityLevel(priorityLevel) {\n switch (priorityLevel) {\n case ImmediatePriority:\n return IMMEDIATE_PRIORITY_TIMEOUT;\n\n case UserBlockingPriority:\n return USER_BLOCKING_PRIORITY;\n\n case IdlePriority:\n return IDLE_PRIORITY;\n\n case LowPriority:\n return LOW_PRIORITY_TIMEOUT;\n\n case NormalPriority:\n default:\n return NORMAL_PRIORITY_TIMEOUT;\n }\n }\n\n function unstable_scheduleCallback(priorityLevel, callback, options) {\n var currentTime = exports.unstable_now();\n var startTime;\n var timeout;\n\n if (typeof options === 'object' && options !== null) {\n var delay = options.delay;\n\n if (typeof delay === 'number' && delay > 0) {\n startTime = currentTime + delay;\n } else {\n startTime = currentTime;\n }\n\n timeout = typeof options.timeout === 'number' ? options.timeout : timeoutForPriorityLevel(priorityLevel);\n } else {\n timeout = timeoutForPriorityLevel(priorityLevel);\n startTime = currentTime;\n }\n\n var expirationTime = startTime + timeout;\n var newTask = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: startTime,\n expirationTime: expirationTime,\n sortIndex: -1\n };\n\n if (enableProfiling) {\n newTask.isQueued = false;\n }\n\n if (startTime > currentTime) {\n // This is a delayed task.\n newTask.sortIndex = startTime;\n push(timerQueue, newTask);\n\n if (peek(taskQueue) === null && newTask === peek(timerQueue)) {\n // All tasks are delayed, and this is the task with the earliest delay.\n if (isHostTimeoutScheduled) {\n // Cancel an existing timeout.\n cancelHostTimeout();\n } else {\n isHostTimeoutScheduled = true;\n } // Schedule a timeout.\n\n\n requestHostTimeout(handleTimeout, startTime - currentTime);\n }\n } else {\n newTask.sortIndex = expirationTime;\n push(taskQueue, newTask);\n\n if (enableProfiling) {\n markTaskStart(newTask, currentTime);\n newTask.isQueued = true;\n } // Schedule a host callback, if needed. If we're already performing work,\n // wait until the next time we yield.\n\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n\n _requestHostCallback(flushWork);\n }\n }\n\n return newTask;\n }\n\n function unstable_pauseExecution() {\n isSchedulerPaused = true;\n }\n\n function unstable_continueExecution() {\n isSchedulerPaused = false;\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n\n _requestHostCallback(flushWork);\n }\n }\n\n function unstable_getFirstCallbackNode() {\n return peek(taskQueue);\n }\n\n function unstable_cancelCallback(task) {\n if (enableProfiling) {\n if (task.isQueued) {\n var currentTime = exports.unstable_now();\n markTaskCanceled(task, currentTime);\n task.isQueued = false;\n }\n } // Null out the callback to indicate the task has been canceled. (Can't\n // remove from the queue because you can't remove arbitrary nodes from an\n // array based heap, only the first one.)\n\n\n task.callback = null;\n }\n\n function unstable_getCurrentPriorityLevel() {\n return currentPriorityLevel;\n }\n\n function unstable_shouldYield() {\n var currentTime = exports.unstable_now();\n advanceTimers(currentTime);\n var firstTask = peek(taskQueue);\n return firstTask !== currentTask && currentTask !== null && firstTask !== null && firstTask.callback !== null && firstTask.startTime <= currentTime && firstTask.expirationTime < currentTask.expirationTime || shouldYieldToHost();\n }\n\n var unstable_requestPaint = requestPaint;\n var unstable_Profiling = enableProfiling ? {\n startLoggingProfilingEvents: startLoggingProfilingEvents,\n stopLoggingProfilingEvents: stopLoggingProfilingEvents,\n sharedProfilingBuffer: sharedProfilingBuffer\n } : null;\n exports.unstable_ImmediatePriority = ImmediatePriority;\n exports.unstable_UserBlockingPriority = UserBlockingPriority;\n exports.unstable_NormalPriority = NormalPriority;\n exports.unstable_IdlePriority = IdlePriority;\n exports.unstable_LowPriority = LowPriority;\n exports.unstable_runWithPriority = unstable_runWithPriority;\n exports.unstable_next = unstable_next;\n exports.unstable_scheduleCallback = unstable_scheduleCallback;\n exports.unstable_cancelCallback = unstable_cancelCallback;\n exports.unstable_wrapCallback = unstable_wrapCallback;\n exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;\n exports.unstable_shouldYield = unstable_shouldYield;\n exports.unstable_requestPaint = unstable_requestPaint;\n exports.unstable_continueExecution = unstable_continueExecution;\n exports.unstable_pauseExecution = unstable_pauseExecution;\n exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;\n exports.unstable_Profiling = unstable_Profiling;\n })();\n}","map":null,"metadata":{},"sourceType":"script"}