Build 555975stable
Module 441014
3,458 characters · in no known chunkDependencies
Source Raw
function(e,t){"use strict";function n(e,t){var n=e.length;for(e.push(t);0<n;){var i=n-1>>>1,r=e[i];if(0<s(r,t))e[i]=t,e[n]=r,n=i;else break}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var i=0,r=e.length,a=r>>>1;i<a;){var o=2*(i+1)-1,l=e[o],u=o+1,c=e[u];if(0>s(l,n))u<r&&0>s(c,l)?(e[i]=c,e[u]=n,i=u):(e[i]=l,e[o]=n,i=o);else if(u<r&&0>s(c,n))e[i]=c,e[u]=n,i=u;else break}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var a,o=performance;t.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}var c=[],d=[],_=1,h=null,f=3,p=!1,E=!1,m=!1,g=!1,A="function"==typeof setTimeout?setTimeout:null,I="function"==typeof clearTimeout?clearTimeout:null,T="u">typeof setImmediate?setImmediate:null;function S(e){for(var t=i(d);null!==t;){if(null===t.callback)r(d);else if(t.startTime<=e)r(d),t.sortIndex=t.expirationTime,n(c,t);else break;t=i(d)}}function y(e){if(m=!1,S(e),!E)if(null!==i(c))E=!0,N||(N=!0,a());else{var t=i(d);null!==t&&w(y,t.startTime-e)}}var N=!1,v=-1,C=5,R=-1;function O(){return!!g||!(t.unstable_now()-R<C)}function b(){if(g=!1,N){var e=t.unstable_now();R=e;var n=!0;try{e:{E=!1,m&&(m=!1,I(v),v=-1),p=!0;var s=f;try{s:{for(S(e),h=i(c);null!==h&&!(h.expirationTime>e&&O());){var o=h.callback;if("function"==typeof o){h.callback=null,f=h.priorityLevel;var l=o(h.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){h.callback=l,S(e),n=!0;break s}h===i(c)&&r(c),S(e)}else r(c);h=i(c)}if(null!==h)n=!0;else{var u=i(d);null!==u&&w(y,u.startTime-e),n=!1}}break e}finally{h=null,f=s,p=!1}}}finally{n?a():N=!1}}}if("function"==typeof T)a=function(){T(b)};else if("u">typeof MessageChannel){var D=new MessageChannel,L=D.port2;D.port1.onmessage=b,a=function(){L.postMessage(null)}}else a=function(){A(b,0)};function w(e,n){v=A(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.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"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_requestPaint=function(){g=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,r,s){var o=t.unstable_now();switch(s="object"==typeof s&&null!==s&&"number"==typeof(s=s.delay)&&0<s?o+s:o,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=0x3fffffff;break;case 4:l=1e4;break;default:l=5e3}return l=s+l,e={id:_++,callback:r,priorityLevel:e,startTime:s,expirationTime:l,sortIndex:-1},s>o?(e.sortIndex=s,n(d,e),null===i(c)&&e===i(d)&&(m?(I(v),v=-1):m=!0,w(y,s-o))):(e.sortIndex=l,n(c,e),E||p||(E=!0,N||(N=!0,a()))),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}