/* esm.sh - scheduler@0.26.0 */
var __setImmediate$ = (cb, ...args) => ( { $t: setTimeout(cb, 0, ...args), [Symbol.dispose](){ clearTimeout(this.t) } });
var J=Object.create;var F=Object.defineProperty;var K=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var Y=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var x=(e,n,l,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of X(n))!$.call(e,a)&&a!==l&&F(e,a,{get:()=>n[a],enumerable:!(t=K(n,a))||t.enumerable});return e};var h=(e,n,l)=>(l=e!=null?J(Z(e)):{},x(n||!e||!e.__esModule?F(l,"default",{value:e,enumerable:!0}):l,e));var z=Y(r=>{"use strict";function H(e,n){var l=e.length;e.push(n);e:for(;0<l;){var t=l-1>>>1,a=e[t];if(0<w(a,n))e[t]=n,e[l]=a,l=t;else break e}}function o(e){return e.length===0?null:e[0]}function T(e){if(e.length===0)return null;var n=e[0],l=e.pop();if(l!==n){e[0]=l;e:for(var t=0,a=e.length,k=a>>>1;t<k;){var m=2*(t+1)-1,j=e[m],f=m+1,P=e[f];if(0>w(j,l))f<a&&0>w(P,j)?(e[t]=P,e[f]=l,t=f):(e[t]=j,e[m]=l,t=m);else if(f<a&&0>w(P,l))e[t]=P,e[f]=l,t=f;else break e}}return n}function w(e,n){var l=e.sortIndex-n.sortIndex;return l!==0?l:e.id-n.id}r.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(B=performance,r.unstable_now=function(){return B.now()}):(q=Date,D=q.now(),r.unstable_now=function(){return q.now()-D});var B,q,D,i=[],c=[],ee=1,s=null,u=3,N=!1,d=!1,v=!1,R=!1,L=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,E=typeof __setImmediate$<"u"?__setImmediate$:null;function C(e){for(var n=o(c);n!==null;){if(n.callback===null)T(c);else if(n.startTime<=e)T(c),n.sortIndex=n.expirationTime,H(i,n);else break;n=o(c)}}function S(e){if(v=!1,C(e),!d)if(o(i)!==null)d=!0,_||(_=!0,b());else{var n=o(c);n!==null&&U(S,n.startTime-e)}}var _=!1,y=-1,O=5,V=-1;function W(){return R?!0:!(r.unstable_now()-V<O)}function I(){if(R=!1,_){var e=r.unstable_now();V=e;var n=!0;try{e:{d=!1,v&&(v=!1,M(y),y=-1),N=!0;var l=u;try{n:{for(C(e),s=o(i);s!==null&&!(s.expirationTime>e&&W());){var t=s.callback;if(typeof t=="function"){s.callback=null,u=s.priorityLevel;var a=t(s.expirationTime<=e);if(e=r.unstable_now(),typeof a=="function"){s.callback=a,C(e),n=!0;break n}s===o(i)&&T(i),C(e)}else T(i);s=o(i)}if(s!==null)n=!0;else{var k=o(c);k!==null&&U(S,k.startTime-e),n=!1}}break e}finally{s=null,u=l,N=!1}n=void 0}}finally{n?b():_=!1}}}var b;typeof E=="function"?b=function(){E(I)}:typeof MessageChannel<"u"?(p=new MessageChannel,Q=p.port2,p.port1.onmessage=I,b=function(){Q.postMessage(null)}):b=function(){L(I,0)};var p,Q;function U(e,n){y=L(function(){e(r.unstable_now())},n)}r.unstable_IdlePriority=5;r.unstable_ImmediatePriority=1;r.unstable_LowPriority=4;r.unstable_NormalPriority=3;r.unstable_Profiling=null;r.unstable_UserBlockingPriority=2;r.unstable_cancelCallback=function(e){e.callback=null};r.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<e?Math.floor(1e3/e):5};r.unstable_getCurrentPriorityLevel=function(){return u};r.unstable_next=function(e){switch(u){case 1:case 2:case 3:var n=3;break;default:n=u}var l=u;u=n;try{return e()}finally{u=l}};r.unstable_requestPaint=function(){R=!0};r.unstable_runWithPriority=function(e,n){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var l=u;u=e;try{return n()}finally{u=l}};r.unstable_scheduleCallback=function(e,n,l){var t=r.unstable_now();switch(typeof l=="object"&&l!==null?(l=l.delay,l=typeof l=="number"&&0<l?t+l:t):l=t,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return a=l+a,e={id:ee++,callback:n,priorityLevel:e,startTime:l,expirationTime:a,sortIndex:-1},l>t?(e.sortIndex=l,H(c,e),o(i)===null&&e===o(c)&&(v?(M(y),y=-1):v=!0,U(S,l-t))):(e.sortIndex=a,H(i,e),d||N||(d=!0,_||(_=!0,b()))),e};r.unstable_shouldYield=W;r.unstable_wrapCallback=function(e){var n=u;return function(){var l=u;u=n;try{return e.apply(this,arguments)}finally{u=l}}}});var G=Y((te,A)=>{"use strict";A.exports=z()});var g=h(G()),{unstable_now:ae,unstable_IdlePriority:re,unstable_ImmediatePriority:ue,unstable_LowPriority:se,unstable_NormalPriority:oe,unstable_Profiling:ie,unstable_UserBlockingPriority:ce,unstable_cancelCallback:fe,unstable_forceFrameRate:be,unstable_getCurrentPriorityLevel:_e,unstable_next:de,unstable_requestPaint:ve,unstable_runWithPriority:ye,unstable_scheduleCallback:ke,unstable_shouldYield:me,unstable_wrapCallback:Pe}=g,we=g.default??g;export{we as default,re as unstable_IdlePriority,ue as unstable_ImmediatePriority,se as unstable_LowPriority,oe as unstable_NormalPriority,ie as unstable_Profiling,ce as unstable_UserBlockingPriority,fe as unstable_cancelCallback,be as unstable_forceFrameRate,_e as unstable_getCurrentPriorityLevel,de as unstable_next,ae as unstable_now,ve as unstable_requestPaint,ye as unstable_runWithPriority,ke as unstable_scheduleCallback,me as unstable_shouldYield,Pe as unstable_wrapCallback};
/*! Bundled license information:

scheduler/cjs/scheduler.production.js:
  (**
   * @license React
   * scheduler.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/
//# sourceMappingURL=scheduler.mjs.map