From c376aa6c299f405c2f548cf2984351e2cc74a592 Mon Sep 17 00:00:00 2001 From: CanisMinor Date: Tue, 12 Dec 2023 23:50:23 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20Refactor=20inj?= =?UTF-8?q?ect=20with=20react=20hook=20(#489)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ♻️ refactor: Refactor inject with react hook * ♻️ refactor: Refactor inject with react hook * ♻️ refactor: Refactor inject --- .husky/pre-commit | 3 +- javascript/main.js | 306 +++++++++--------- package.json | 6 +- src/app/index.tsx | 2 + src/components/Giscus/index.tsx | 49 ++- src/components/VersionTag/index.tsx | 4 +- src/const/url.ts | 11 + src/features/Content/index.tsx | 50 +-- .../Content/removePromptScrollHide.ts | 10 + src/features/Content/style.ts | 180 +++++------ src/features/ExtraNetworkSidebar/Inner.tsx | 105 +----- .../refreshExtraNetwork.ts | 6 + src/features/ExtraNetworkSidebar/style.ts | 4 + .../useCivitaiHelperFix.ts | 60 ++++ .../useInjectExtraNetwork.ts | 21 ++ src/features/Footer/data.tsx | 30 +- src/features/Footer/index.tsx | 34 +- src/features/Header/Nav.tsx | 71 +--- src/features/Header/genNavList.ts | 32 ++ src/features/Header/index.tsx | 6 +- src/features/Header/useNavBar.tsx | 40 +++ src/features/PromptFormator/createButton.ts | 12 + src/features/PromptFormator/index.tsx | 11 + .../PromptFormator/useInjectPromptFormator.ts | 11 + src/features/QuickSettingSidebar/Inner.tsx | 17 +- src/features/Setting/index.tsx | 4 +- src/features/Share/Preview.tsx | 4 +- src/features/Share/addShareButton.ts | 19 -- src/features/Share/createButton.ts | 10 + src/features/Share/index.tsx | 24 +- src/hooks/useInject.ts | 55 ++++ src/hooks/useSelectorHide.ts | 9 + src/hooks/useSelectorRef.ts | 5 + src/modules/ImageInfo/index.tsx | 9 +- src/scripts/draggablePanel.ts | 85 ----- src/scripts/formatPrompt.ts | 56 +--- src/store/action.test.ts | 98 ++++++ src/store/api.ts | 8 +- tests/setup.ts | 12 + vitest.config.ts | 12 +- 40 files changed, 800 insertions(+), 691 deletions(-) create mode 100644 src/const/url.ts create mode 100644 src/features/Content/removePromptScrollHide.ts create mode 100644 src/features/ExtraNetworkSidebar/refreshExtraNetwork.ts create mode 100644 src/features/ExtraNetworkSidebar/useCivitaiHelperFix.ts create mode 100644 src/features/ExtraNetworkSidebar/useInjectExtraNetwork.ts create mode 100644 src/features/Header/genNavList.ts create mode 100644 src/features/Header/useNavBar.tsx create mode 100644 src/features/PromptFormator/createButton.ts create mode 100644 src/features/PromptFormator/index.tsx create mode 100644 src/features/PromptFormator/useInjectPromptFormator.ts delete mode 100644 src/features/Share/addShareButton.ts create mode 100644 src/features/Share/createButton.ts create mode 100644 src/hooks/useInject.ts create mode 100644 src/hooks/useSelectorHide.ts create mode 100644 src/hooks/useSelectorRef.ts delete mode 100644 src/scripts/draggablePanel.ts create mode 100644 src/store/action.test.ts create mode 100644 tests/setup.ts diff --git a/.husky/pre-commit b/.husky/pre-commit index 1e989541..c62a325d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -3,5 +3,4 @@ git add . npx --no-install lint-staged -npm run test -git add . \ No newline at end of file +git add . diff --git a/javascript/main.js b/javascript/main.js index 983791f5..b699c95d 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -1,4 +1,4 @@ -function e(e,t){for(var n=0;nr[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var o={exports:{}},i={},a={exports:{}},l={},s=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function k(e,t,n){this.props=e,this.context=t,this.refs=S,this.updater=n||w}function C(){}function E(e,t,n){this.props=e,this.context=t,this.refs=S,this.updater=n||w}k.prototype.isReactComponent={},k.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},k.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=k.prototype;var O=E.prototype=new C;O.constructor=E,x(O,k.prototype),O.isPureReactComponent=!0;var D=Array.isArray,$=Object.prototype.hasOwnProperty,j={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)$.call(t,r)&&!P.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var o={exports:{}},i={},a={exports:{}},l={},s=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function k(e,t,n){this.props=e,this.context=t,this.refs=S,this.updater=n||w}function C(){}function E(e,t,n){this.props=e,this.context=t,this.refs=S,this.updater=n||w}k.prototype.isReactComponent={},k.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},k.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=k.prototype;var D=E.prototype=new C;D.constructor=E,x(D,k.prototype),D.isPureReactComponent=!0;var O=Array.isArray,$=Object.prototype.hasOwnProperty,_={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function j(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)$.call(t,r)&&!P.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1e.reduce(((e,t)=>te(e,t,"",re)),{});var re;function oe(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let ie=!1;const ae=[];class le{constructor(e={}){const t=e.types||Z;this.options=ne({...e,defaults:{...e.defaults},level:se(e.level,t),reporters:[...e.reporters||[]]},{types:Z,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const n in t){const e={type:n,...this.options.defaults,...t[n]};this[n]=this._wrapLogFn(e),this[n].raw=this._wrapLogFn(e,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=se(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,t)}create(e){const t=new le({...this.options,...e});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){const t=this.options.reporters.indexOf(e);if(t>=0)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this.options.types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this.options.types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){ie=!0}resumeLogs(){ie=!1;const e=ae.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){const t=e||this.options.mockFn;if(this._mockFn=t,"function"==typeof t)for(const n in this.options.types)this[n]=t(n,this.options.types[n])||this[n],this[n].raw=this[n]}_wrapLogFn(e,t){return(...n)=>{if(!ie)return this._logFn(e,n,t);ae.push([this,e,n,t])}}_logFn(e,t,n){if((e.level||0)>this.level)return!1;const r={date:new Date,args:[],...e,level:se(e.level,this.options.types)};!n&&1===t.length&&oe(t[0])?Object.assign(r,t[0]):r.args=[...t],r.message&&(r.args.unshift(r.message),delete r.message),r.additional&&(Array.isArray(r.additional)||(r.additional=r.additional.split("\n")),r.args.push("\n"+r.additional.join("\n")),delete r.additional),r.type="string"==typeof r.type?r.type.toLowerCase():"log",r.tag="string"==typeof r.tag?r.tag:"";const o=(e=!1)=>{const t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){const e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=r,this._log(r))};clearTimeout(this._lastLog.timeout);const i=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,ithis.options.throttleMin))return void(this._lastLog.timeout=setTimeout(o,this.options.throttle))}catch{}o(!0)}_log(e){for(const t of this.options.reporters)t.log(e,{options:this.options})}}function se(e,t={},n=3){return void 0===e?n:"number"==typeof e?e:t[e]&&void 0!==t[e].level?t[e].level:n}le.prototype.add=le.prototype.addReporter,le.prototype.remove=le.prototype.removeReporter,le.prototype.clear=le.prototype.removeReporter,le.prototype.withScope=le.prototype.withTag,le.prototype.mock=le.prototype.mockTypes,le.prototype.pause=le.prototype.pauseLogs,le.prototype.resume=le.prototype.resumeLogs;class ce{constructor(e){this.options={...e},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(e){return e<1?console.__error||console.error:1===e?console.__warn||console.warn:console.__log||console.log}log(e){const t=this._getLogFn(e.level),n="log"===e.type?"":e.type,r=e.tag||"",o=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,i=`%c${[r,n].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${i}%c ${e.args[0]}`,o,"",...e.args.slice(1)):t(i,o,...e.args)}}const ue=function(e={}){return function(e={}){return new le(e)}({reporters:e.reporters||[new ce({})],prompt:(e,t={})=>"confirm"===t.type?Promise.resolve(confirm(e)):Promise.resolve(prompt(e)),...e})}();var de={exports:{}},fe={},pe={exports:{}},he={}; +var U=B,V=Symbol.for("react.element"),G=Symbol.for("react.fragment"),q=Object.prototype.hasOwnProperty,X=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,K={key:!0,ref:!0,__self:!0,__source:!0};function Y(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)q.call(t,r)&&!K.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:V,type:e,key:i,ref:a,props:o,_owner:X.current}}i.Fragment=G,i.jsx=Y,i.jsxs=Y,o.exports=i;var Q=o.exports;const J={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},Z={silent:{level:-1},fatal:{level:J.fatal},error:{level:J.error},warn:{level:J.warn},log:{level:J.log},info:{level:J.info},success:{level:J.success},fail:{level:J.fail},ready:{level:J.info},start:{level:J.info},box:{level:J.info},debug:{level:J.debug},trace:{level:J.trace},verbose:{level:J.verbose}};function ee(e){return null!==e&&"object"==typeof e}function te(e,t,n=".",r){if(!ee(t))return te(e,{},n,r);const o=Object.assign({},t);for(const i in e){if("__proto__"===i||"constructor"===i)continue;const t=e[i];null!=t&&(r&&r(o,i,t,n)||(Array.isArray(t)&&Array.isArray(o[i])?o[i]=[...t,...o[i]]:ee(t)&&ee(o[i])?o[i]=te(t,o[i],(n?`${n}.`:"")+i.toString(),r):o[i]=t))}return o}const ne=(...e)=>e.reduce(((e,t)=>te(e,t,"",re)),{});var re;function oe(e){return t=e,"[object Object]"===Object.prototype.toString.call(t)&&(!(!e.message&&!e.args)&&!e.stack);var t}let ie=!1;const ae=[];class le{constructor(e={}){const t=e.types||Z;this.options=ne({...e,defaults:{...e.defaults},level:se(e.level,t),reporters:[...e.reporters||[]]},{types:Z,throttle:1e3,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(const n in t){const e={type:n,...this.options.defaults,...t[n]};this[n]=this._wrapLogFn(e),this[n].raw=this._wrapLogFn(e,!0)}this.options.mockFn&&this.mockTypes(),this._lastLog={}}get level(){return this.options.level}set level(e){this.options.level=se(e,this.options.types,this.options.level)}prompt(e,t){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(e,t)}create(e){const t=new le({...this.options,...e});return this._mockFn&&t.mockTypes(this._mockFn),t}withDefaults(e){return this.create({...this.options,defaults:{...this.options.defaults,...e}})}withTag(e){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+e:e})}addReporter(e){return this.options.reporters.push(e),this}removeReporter(e){if(e){const t=this.options.reporters.indexOf(e);if(t>=0)return this.options.reporters.splice(t,1)}else this.options.reporters.splice(0);return this}setReporters(e){return this.options.reporters=Array.isArray(e)?e:[e],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const e in this.options.types)console["__"+e]||(console["__"+e]=console[e]),console[e]=this[e].raw}restoreConsole(){for(const e in this.options.types)console["__"+e]&&(console[e]=console["__"+e],delete console["__"+e])}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(e,t){e&&(e.__write||(e.__write=e.write),e.write=e=>{this[t].raw(String(e).trim())})}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}pauseLogs(){ie=!0}resumeLogs(){ie=!1;const e=ae.splice(0);for(const t of e)t[0]._logFn(t[1],t[2])}mockTypes(e){const t=e||this.options.mockFn;if(this._mockFn=t,"function"==typeof t)for(const n in this.options.types)this[n]=t(n,this.options.types[n])||this[n],this[n].raw=this[n]}_wrapLogFn(e,t){return(...n)=>{if(!ie)return this._logFn(e,n,t);ae.push([this,e,n,t])}}_logFn(e,t,n){if((e.level||0)>this.level)return!1;const r={date:new Date,args:[],...e,level:se(e.level,this.options.types)};!n&&1===t.length&&oe(t[0])?Object.assign(r,t[0]):r.args=[...t],r.message&&(r.args.unshift(r.message),delete r.message),r.additional&&(Array.isArray(r.additional)||(r.additional=r.additional.split("\n")),r.args.push("\n"+r.additional.join("\n")),delete r.additional),r.type="string"==typeof r.type?r.type.toLowerCase():"log",r.tag="string"==typeof r.tag?r.tag:"";const o=(e=!1)=>{const t=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&t>0){const e=[...this._lastLog.object.args];t>1&&e.push(`(repeated ${t} times)`),this._log({...this._lastLog.object,args:e}),this._lastLog.count=1}e&&(this._lastLog.object=r,this._log(r))};clearTimeout(this._lastLog.timeout);const i=this._lastLog.time&&r.date?r.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=r.date,ithis.options.throttleMin))return void(this._lastLog.timeout=setTimeout(o,this.options.throttle))}catch{}o(!0)}_log(e){for(const t of this.options.reporters)t.log(e,{options:this.options})}}function se(e,t={},n=3){return void 0===e?n:"number"==typeof e?e:t[e]&&void 0!==t[e].level?t[e].level:n}le.prototype.add=le.prototype.addReporter,le.prototype.remove=le.prototype.removeReporter,le.prototype.clear=le.prototype.removeReporter,le.prototype.withScope=le.prototype.withTag,le.prototype.mock=le.prototype.mockTypes,le.prototype.pause=le.prototype.pauseLogs,le.prototype.resume=le.prototype.resumeLogs;class ce{constructor(e){this.options={...e},this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}_getLogFn(e){return e<1?console.__error||console.error:1===e?console.__warn||console.warn:console.__log||console.log}log(e){const t=this._getLogFn(e.level),n="log"===e.type?"":e.type,r=e.tag||"",o=`\n background: ${this.typeColorMap[e.type]||this.levelColorMap[e.level]||this.defaultColor};\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n `,i=`%c${[r,n].filter(Boolean).join(":")}`;"string"==typeof e.args[0]?t(`${i}%c ${e.args[0]}`,o,"",...e.args.slice(1)):t(i,o,...e.args)}}const ue=function(e={}){return function(e={}){return new le(e)}({reporters:e.reporters||[new ce({})],prompt:(e,t={})=>"confirm"===t.type?Promise.resolve(confirm(e)):Promise.resolve(prompt(e)),...e})}();var de={exports:{}},pe={},fe={exports:{}},he={}; /** * @license React * scheduler.production.min.js @@ -18,7 +18,7 @@ var U=B,V=Symbol.for("react.element"),G=Symbol.for("react.fragment"),q=Object.pr * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ro(s,n))co(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(co(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],u=1,d=null,f=3,p=!1,h=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(s,o)}o=n(c)}}function w(e){if(g=!1,y(e),!h)if(null!==n(s))h=!0,I(x);else{var t=n(c);null!==t&&_(w,t.startTime-e)}}function x(t,o){h=!1,g&&(g=!1,b(E),E=-1),p=!0;var i=f;try{for(y(o),d=n(s);null!==d&&(!(d.expirationTime>o)||t&&!$());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var l=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?d.callback=l:d===n(s)&&r(s),y(o)}else r(s);d=n(s)}if(null!==d)var u=!0;else{var m=n(c);null!==m&&_(w,m.startTime-o),u=!1}return u}finally{d=null,f=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,k=!1,C=null,E=-1,O=5,D=-1;function $(){return!(e.unstable_now()-De||125a?(r.sortIndex=i,t(c,r),null===n(s)&&r===n(c)&&(g?(b(E),E=-1):g=!0,_(w,i-a))):(r.sortIndex=l,t(s,r),h||p||(h=!0,I(x))),r},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(he),pe.exports=he;var ge=pe.exports,me=B,be=ge; +!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ro(s,n))co(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else{if(!(co(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],c=[],u=1,d=null,p=3,f=!1,h=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function y(e){for(var o=n(c);null!==o;){if(null===o.callback)r(c);else{if(!(o.startTime<=e))break;r(c),o.sortIndex=o.expirationTime,t(s,o)}o=n(c)}}function w(e){if(g=!1,y(e),!h)if(null!==n(s))h=!0,I(x);else{var t=n(c);null!==t&&N(w,t.startTime-e)}}function x(t,o){h=!1,g&&(g=!1,b(E),E=-1),f=!0;var i=p;try{for(y(o),d=n(s);null!==d&&(!(d.expirationTime>o)||t&&!$());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var l=a(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?d.callback=l:d===n(s)&&r(s),y(o)}else r(s);d=n(s)}if(null!==d)var u=!0;else{var m=n(c);null!==m&&N(w,m.startTime-o),u=!1}return u}finally{d=null,p=i,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,k=!1,C=null,E=-1,D=5,O=-1;function $(){return!(e.unstable_now()-Oe||125a?(r.sortIndex=i,t(c,r),null===n(s)&&r===n(c)&&(g?(b(E),E=-1):g=!0,N(w,i-a))):(r.sortIndex=l,t(s,r),h||f||(h=!0,I(x))),r},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}(he),fe.exports=he;var ge=fe.exports,me=B,be=ge; /** * @license React * react-dom.production.min.js @@ -27,25 +27,25 @@ var U=B,V=Symbol.for("react.element"),G=Symbol.for("react.fragment"),q=Object.pr * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function ve(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n