@storix-js/react 0.1.0 → 0.2.0
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.
- package/README.md +23 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +143 -143
- package/package.json +9 -2
- package/src/index.ts +0 -25
- package/tsconfig.build.json +0 -8
- package/tsconfig.json +0 -4
- package/vite.config.ts +0 -15
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @storix-js/react
|
|
2
|
+
|
|
3
|
+
React adapter for Storix using `useSyncExternalStore`.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @storix-js/core @storix-js/react react
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { useStore } from '@storix-js/react';
|
|
15
|
+
import { useCounterStore } from './store';
|
|
16
|
+
|
|
17
|
+
export function Counter() {
|
|
18
|
+
const counter = useStore(useCounterStore);
|
|
19
|
+
return <button onClick={() => counter.increment()}>{counter.count}</button>;
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This adapter subscribes React components to Storix updates with React 18-compatible semantics.
|
package/dist/index.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Or;function
|
|
9
|
+
*/var Or;function Ft(){if(Or)return d;Or=1;var j=Symbol.for("react.element"),l=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),te=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),K=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),W=Symbol.iterator;function oe(t){return t===null||typeof t!="object"?null:(t=W&&t[W]||t["@@iterator"],typeof t=="function"?t:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,de={};function F(t,o,p){this.props=t,this.context=o,this.refs=de,this.updater=p||D}F.prototype.isReactComponent={},F.prototype.setState=function(t,o){if(typeof t!="object"&&typeof t!="function"&&t!=null)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,t,o,"setState")},F.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function pe(){}pe.prototype=F.prototype;function G(t,o,p){this.props=t,this.context=o,this.refs=de,this.updater=p||D}var Q=G.prototype=new pe;Q.constructor=G,Y(Q,F.prototype),Q.isPureReactComponent=!0;var x=Array.isArray,O=Object.prototype.hasOwnProperty,A={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function z(t,o,p){var y,h={},w=null,R=null;if(o!=null)for(y in o.ref!==void 0&&(R=o.ref),o.key!==void 0&&(w=""+o.key),o)O.call(o,y)&&!L.hasOwnProperty(y)&&(h[y]=o[y]);var E=arguments.length-2;if(E===1)h.children=p;else if(1<E){for(var _=Array(E),k=0;k<E;k++)_[k]=arguments[k+2];h.children=_}if(t&&t.defaultProps)for(y in E=t.defaultProps,E)h[y]===void 0&&(h[y]=E[y]);return{$$typeof:j,type:t,key:w,ref:R,props:h,_owner:A.current}}function ve(t,o){return{$$typeof:j,type:t.type,key:o,ref:t.ref,props:t.props,_owner:t._owner}}function ue(t){return typeof t=="object"&&t!==null&&t.$$typeof===j}function Pe(t){var o={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(p){return o[p]})}var ye=/\/+/g;function ie(t,o){return typeof t=="object"&&t!==null&&t.key!=null?Pe(""+t.key):o.toString(36)}function X(t,o,p,y,h){var w=typeof t;(w==="undefined"||w==="boolean")&&(t=null);var R=!1;if(t===null)R=!0;else switch(w){case"string":case"number":R=!0;break;case"object":switch(t.$$typeof){case j:case l:R=!0}}if(R)return R=t,h=h(R),t=y===""?"."+ie(R,0):y,x(h)?(p="",t!=null&&(p=t.replace(ye,"$&/")+"/"),X(h,o,p,"",function(k){return k})):h!=null&&(ue(h)&&(h=ve(h,p+(!h.key||R&&R.key===h.key?"":(""+h.key).replace(ye,"$&/")+"/")+t)),o.push(h)),1;if(R=0,y=y===""?".":y+":",x(t))for(var E=0;E<t.length;E++){w=t[E];var _=y+ie(w,E);R+=X(w,o,p,_,h)}else if(_=oe(t),typeof _=="function")for(t=_.call(t),E=0;!(w=t.next()).done;)w=w.value,_=y+ie(w,E++),R+=X(w,o,p,_,h);else if(w==="object")throw o=String(t),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.");return R}function I(t,o,p){if(t==null)return t;var y=[],h=0;return X(t,y,"","",function(w){return o.call(p,w,h++)}),y}function M(t){if(t._status===-1){var o=t._result;o=o(),o.then(function(p){(t._status===0||t._status===-1)&&(t._status=1,t._result=p)},function(p){(t._status===0||t._status===-1)&&(t._status=2,t._result=p)}),t._status===-1&&(t._status=0,t._result=o)}if(t._status===1)return t._result.default;throw t._result}var c={current:null},B={transition:null},he={ReactCurrentDispatcher:c,ReactCurrentBatchConfig:B,ReactCurrentOwner:A};function J(){throw Error("act(...) is not supported in production builds of React.")}return d.Children={map:I,forEach:function(t,o,p){I(t,function(){o.apply(this,arguments)},p)},count:function(t){var o=0;return I(t,function(){o++}),o},toArray:function(t){return I(t,function(o){return o})||[]},only:function(t){if(!ue(t))throw Error("React.Children.only expected to receive a single React element child.");return t}},d.Component=F,d.Fragment=V,d.Profiler=q,d.PureComponent=G,d.StrictMode=$,d.Suspense=ae,d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=he,d.act=J,d.cloneElement=function(t,o,p){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var y=Y({},t.props),h=t.key,w=t.ref,R=t._owner;if(o!=null){if(o.ref!==void 0&&(w=o.ref,R=A.current),o.key!==void 0&&(h=""+o.key),t.type&&t.type.defaultProps)var E=t.type.defaultProps;for(_ in o)O.call(o,_)&&!L.hasOwnProperty(_)&&(y[_]=o[_]===void 0&&E!==void 0?E[_]:o[_])}var _=arguments.length-2;if(_===1)y.children=p;else if(1<_){E=Array(_);for(var k=0;k<_;k++)E[k]=arguments[k+2];y.children=E}return{$$typeof:j,type:t.type,key:h,ref:w,props:y,_owner:R}},d.createContext=function(t){return t={$$typeof:te,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:H,_context:t},t.Consumer=t},d.createElement=z,d.createFactory=function(t){var o=z.bind(null,t);return o.type=t,o},d.createRef=function(){return{current:null}},d.forwardRef=function(t){return{$$typeof:ne,render:t}},d.isValidElement=ue,d.lazy=function(t){return{$$typeof:U,_payload:{_status:-1,_result:t},_init:M}},d.memo=function(t,o){return{$$typeof:K,type:t,compare:o===void 0?null:o}},d.startTransition=function(t){var o=B.transition;B.transition={};try{t()}finally{B.transition=o}},d.unstable_act=J,d.useCallback=function(t,o){return c.current.useCallback(t,o)},d.useContext=function(t){return c.current.useContext(t)},d.useDebugValue=function(){},d.useDeferredValue=function(t){return c.current.useDeferredValue(t)},d.useEffect=function(t,o){return c.current.useEffect(t,o)},d.useId=function(){return c.current.useId()},d.useImperativeHandle=function(t,o,p){return c.current.useImperativeHandle(t,o,p)},d.useInsertionEffect=function(t,o){return c.current.useInsertionEffect(t,o)},d.useLayoutEffect=function(t,o){return c.current.useLayoutEffect(t,o)},d.useMemo=function(t,o){return c.current.useMemo(t,o)},d.useReducer=function(t,o,p){return c.current.useReducer(t,o,p)},d.useRef=function(t){return c.current.useRef(t)},d.useState=function(t){return c.current.useState(t)},d.useSyncExternalStore=function(t,o,p){return c.current.useSyncExternalStore(t,o,p)},d.useTransition=function(){return c.current.useTransition()},d.version="18.3.1",d}var le={exports:{}};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.development.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/le.exports;var Tr;function Lt(){return Tr||(Tr=1,(function(j,l){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var U="18.3.1",D=Symbol.for("react.element"),q=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),ae=Symbol.for("react.provider"),K=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),x=Symbol.iterator,pe="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var r=x&&e[x]||e[pe];return typeof r=="function"?r:null}var Q={current:null},L={transition:null},O={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},A={current:null},M={},z=null;function ve(e){z=e}M.setExtraStackFrame=function(e){z=e},M.getCurrentStack=null,M.getStackAddendum=function(){var e="";z&&(e+=z);var r=M.getCurrentStack;return r&&(e+=r()||""),e};var ue=!1,Pe=!1,ye=!1,ie=!1,X=!1,I={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:L,ReactCurrentOwner:A};I.ReactDebugCurrentFrame=M,I.ReactCurrentActQueue=O;function N(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];B("warn",e,n)}}function c(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];B("error",e,n)}}function B(e,r,n){{var a=I.ReactDebugCurrentFrame,u=a.getStackAddendum();u!==""&&(r+="%s",n=n.concat([u]));var s=n.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var he={};function J(e,r){{var n=e.constructor,a=n&&(n.displayName||n.name)||"ReactClass",u=a+"."+r;if(he[u])return;c("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",r,a),he[u]=!0}}var t={isMounted:function(e){return!1},enqueueForceUpdate:function(e,r,n){J(e,"forceUpdate")},enqueueReplaceState:function(e,r,n,a){J(e,"replaceState")},enqueueSetState:function(e,r,n,a){J(e,"setState")}},o=Object.assign,p={};Object.freeze(p);function y(e,r,n){this.props=e,this.context=r,this.refs=p,this.updater=n||t}y.prototype.isReactComponent={},y.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw new 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,r,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};{var h={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},w=function(e,r){Object.defineProperty(y.prototype,e,{get:function(){N("%s(...) is deprecated in plain JavaScript React classes. %s",r[0],r[1])}})};for(var R in h)h.hasOwnProperty(R)&&w(R,h[R])}function E(){}E.prototype=y.prototype;function _(e,r,n){this.props=e,this.context=r,this.refs=p,this.updater=n||t}var k=_.prototype=new E;k.constructor=_,o(k,y.prototype),k.isPureReactComponent=!0;function Pr(){var e={current:null};return Object.seal(e),e}var Ar=Array.isArray;function me(e){return Ar(e)}function jr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Ir(e){try{return $e(e),!1}catch{return!0}}function $e(e){return""+e}function _e(e){if(Ir(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",jr(e)),$e(e)}function Dr(e,r,n){var a=e.displayName;if(a)return a;var u=r.displayName||r.name||"";return u!==""?n+"("+u+")":n}function ze(e){return e.displayName||"Context"}function V(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case q:return"Portal";case ne:return"Profiler";case te:return"StrictMode";case Y:return"Suspense";case oe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case K:var r=e;return ze(r)+".Consumer";case ae:var n=e;return ze(n._context)+".Provider";case W:return Dr(e,e.render,"ForwardRef");case F:var a=e.displayName||null;return a!==null?a:V(e.type)||"Memo";case $:{var u=e,s=u._payload,i=u._init;try{return V(i(s))}catch{return null}}}return null}var se=Object.prototype.hasOwnProperty,Be={key:!0,ref:!0,__self:!0,__source:!0},qe,He,Ae;Ae={};function Ke(e){if(se.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ge(e){if(se.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Fr(e,r){var n=function(){qe||(qe=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function xr(e,r){var n=function(){He||(He=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}function Lr(e){if(typeof e.ref=="string"&&A.current&&e.__self&&A.current.stateNode!==e.__self){var r=V(A.current.type);Ae[r]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',r,e.ref),Ae[r]=!0)}}var je=function(e,r,n,a,u,s,i){var f={$$typeof:D,type:e,key:r,ref:n,props:i,_owner:s};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Mr(e,r,n){var a,u={},s=null,i=null,f=null,v=null;if(r!=null){Ke(r)&&(i=r.ref,Lr(r)),Ge(r)&&(_e(r.key),s=""+r.key),f=r.__self===void 0?null:r.__self,v=r.__source===void 0?null:r.__source;for(a in r)se.call(r,a)&&!Be.hasOwnProperty(a)&&(u[a]=r[a])}var m=arguments.length-2;if(m===1)u.children=n;else if(m>1){for(var g=Array(m),b=0;b<m;b++)g[b]=arguments[b+2];Object.freeze&&Object.freeze(g),u.children=g}if(e&&e.defaultProps){var C=e.defaultProps;for(a in C)u[a]===void 0&&(u[a]=C[a])}if(s||i){var S=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&Fr(u,S),i&&xr(u,S)}return je(e,s,i,f,v,A.current,u)}function Nr(e,r){var n=je(e.type,r,e.ref,e._self,e._source,e._owner,e.props);return n}function Vr(e,r,n){if(e==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a,u=o({},e.props),s=e.key,i=e.ref,f=e._self,v=e._source,m=e._owner;if(r!=null){Ke(r)&&(i=r.ref,m=A.current),Ge(r)&&(_e(r.key),s=""+r.key);var g;e.type&&e.type.defaultProps&&(g=e.type.defaultProps);for(a in r)se.call(r,a)&&!Be.hasOwnProperty(a)&&(r[a]===void 0&&g!==void 0?u[a]=g[a]:u[a]=r[a])}var b=arguments.length-2;if(b===1)u.children=n;else if(b>1){for(var C=Array(b),S=0;S<b;S++)C[S]=arguments[S+2];u.children=C}return je(e.type,s,i,f,v,m,u)}function Z(e){return typeof e=="object"&&e!==null&&e.$$typeof===D}var Qe=".",Ur=":";function Wr(e){var r=/[=:]/g,n={"=":"=0",":":"=2"},a=e.replace(r,function(u){return n[u]});return"$"+a}var Xe=!1,Yr=/\/+/g;function Je(e){return e.replace(Yr,"$&/")}function Ie(e,r){return typeof e=="object"&&e!==null&&e.key!=null?(_e(e.key),Wr(""+e.key)):r.toString(36)}function ge(e,r,n,a,u){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case D:case q:i=!0}}if(i){var f=e,v=u(f),m=a===""?Qe+Ie(f,0):a;if(me(v)){var g="";m!=null&&(g=Je(m)+"/"),ge(v,r,g,"",function(Ft){return Ft})}else v!=null&&(Z(v)&&(v.key&&(!f||f.key!==v.key)&&_e(v.key),v=Nr(v,n+(v.key&&(!f||f.key!==v.key)?Je(""+v.key)+"/":"")+m)),r.push(v));return 1}var b,C,S=0,T=a===""?Qe:a+Ur;if(me(e))for(var Te=0;Te<e.length;Te++)b=e[Te],C=T+Ie(b,Te),S+=ge(b,r,n,C,u);else{var We=G(e);if(typeof We=="function"){var Cr=e;We===Cr.entries&&(Xe||N("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Xe=!0);for(var It=We.call(Cr),wr,Dt=0;!(wr=It.next()).done;)b=wr.value,C=T+Ie(b,Dt++),S+=ge(b,r,n,C,u)}else if(s==="object"){var Sr=String(e);throw new Error("Objects are not valid as a React child (found: "+(Sr==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":Sr)+"). If you meant to render a collection of children, use an array instead.")}}return S}function be(e,r,n){if(e==null)return e;var a=[],u=0;return ge(e,a,"","",function(s){return r.call(n,s,u++)}),a}function $r(e){var r=0;return be(e,function(){r++}),r}function zr(e,r,n){be(e,function(){r.apply(this,arguments)},n)}function Br(e){return be(e,function(r){return r})||[]}function qr(e){if(!Z(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}function Hr(e){var r={$$typeof:K,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};r.Provider={$$typeof:ae,_context:r};var n=!1,a=!1,u=!1;{var s={$$typeof:K,_context:r};Object.defineProperties(s,{Provider:{get:function(){return a||(a=!0,c("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(i){r.Provider=i}},_currentValue:{get:function(){return r._currentValue},set:function(i){r._currentValue=i}},_currentValue2:{get:function(){return r._currentValue2},set:function(i){r._currentValue2=i}},_threadCount:{get:function(){return r._threadCount},set:function(i){r._threadCount=i}},Consumer:{get:function(){return n||(n=!0,c("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}},displayName:{get:function(){return r.displayName},set:function(i){u||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",i),u=!0)}}}),r.Consumer=s}return r._currentRenderer=null,r._currentRenderer2=null,r}var ce=-1,De=0,Ze=1,Kr=2;function Gr(e){if(e._status===ce){var r=e._result,n=r();if(n.then(function(s){if(e._status===De||e._status===ce){var i=e;i._status=Ze,i._result=s}},function(s){if(e._status===De||e._status===ce){var i=e;i._status=Kr,i._result=s}}),e._status===ce){var a=e;a._status=De,a._result=n}}if(e._status===Ze){var u=e._result;return u===void 0&&c(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
17
|
+
*/le.exports;var Tr;function xt(){return Tr||(Tr=1,(function(j,l){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var V="18.3.1",$=Symbol.for("react.element"),q=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),te=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),ae=Symbol.for("react.provider"),K=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),de=Symbol.for("react.offscreen"),F=Symbol.iterator,pe="@@iterator";function G(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[pe];return typeof r=="function"?r:null}var Q={current:null},x={transition:null},O={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},A={current:null},L={},z=null;function ve(e){z=e}L.setExtraStackFrame=function(e){z=e},L.getCurrentStack=null,L.getStackAddendum=function(){var e="";z&&(e+=z);var r=L.getCurrentStack;return r&&(e+=r()||""),e};var ue=!1,Pe=!1,ye=!1,ie=!1,X=!1,I={ReactCurrentDispatcher:Q,ReactCurrentBatchConfig:x,ReactCurrentOwner:A};I.ReactDebugCurrentFrame=L,I.ReactCurrentActQueue=O;function M(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];B("warn",e,n)}}function c(e){{for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];B("error",e,n)}}function B(e,r,n){{var a=I.ReactDebugCurrentFrame,u=a.getStackAddendum();u!==""&&(r+="%s",n=n.concat([u]));var s=n.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var he={};function J(e,r){{var n=e.constructor,a=n&&(n.displayName||n.name)||"ReactClass",u=a+"."+r;if(he[u])return;c("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",r,a),he[u]=!0}}var t={isMounted:function(e){return!1},enqueueForceUpdate:function(e,r,n){J(e,"forceUpdate")},enqueueReplaceState:function(e,r,n,a){J(e,"replaceState")},enqueueSetState:function(e,r,n,a){J(e,"setState")}},o=Object.assign,p={};Object.freeze(p);function y(e,r,n){this.props=e,this.context=r,this.refs=p,this.updater=n||t}y.prototype.isReactComponent={},y.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw new 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,r,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};{var h={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},w=function(e,r){Object.defineProperty(y.prototype,e,{get:function(){M("%s(...) is deprecated in plain JavaScript React classes. %s",r[0],r[1])}})};for(var R in h)h.hasOwnProperty(R)&&w(R,h[R])}function E(){}E.prototype=y.prototype;function _(e,r,n){this.props=e,this.context=r,this.refs=p,this.updater=n||t}var k=_.prototype=new E;k.constructor=_,o(k,y.prototype),k.isPureReactComponent=!0;function Pr(){var e={current:null};return Object.seal(e),e}var Ar=Array.isArray;function me(e){return Ar(e)}function jr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,n=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n}}function Ir(e){try{return Ye(e),!1}catch{return!0}}function Ye(e){return""+e}function _e(e){if(Ir(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",jr(e)),Ye(e)}function $r(e,r,n){var a=e.displayName;if(a)return a;var u=r.displayName||r.name||"";return u!==""?n+"("+u+")":n}function ze(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case q:return"Portal";case ne:return"Profiler";case te:return"StrictMode";case W:return"Suspense";case oe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case K:var r=e;return ze(r)+".Consumer";case ae:var n=e;return ze(n._context)+".Provider";case U:return $r(e,e.render,"ForwardRef");case D:var a=e.displayName||null;return a!==null?a:N(e.type)||"Memo";case Y:{var u=e,s=u._payload,i=u._init;try{return N(i(s))}catch{return null}}}return null}var se=Object.prototype.hasOwnProperty,Be={key:!0,ref:!0,__self:!0,__source:!0},qe,He,Ae;Ae={};function Ke(e){if(se.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ge(e){if(se.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Dr(e,r){var n=function(){qe||(qe=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function Fr(e,r){var n=function(){He||(He=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}function xr(e){if(typeof e.ref=="string"&&A.current&&e.__self&&A.current.stateNode!==e.__self){var r=N(A.current.type);Ae[r]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',r,e.ref),Ae[r]=!0)}}var je=function(e,r,n,a,u,s,i){var f={$$typeof:$,type:e,key:r,ref:n,props:i,_owner:s};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function Lr(e,r,n){var a,u={},s=null,i=null,f=null,v=null;if(r!=null){Ke(r)&&(i=r.ref,xr(r)),Ge(r)&&(_e(r.key),s=""+r.key),f=r.__self===void 0?null:r.__self,v=r.__source===void 0?null:r.__source;for(a in r)se.call(r,a)&&!Be.hasOwnProperty(a)&&(u[a]=r[a])}var m=arguments.length-2;if(m===1)u.children=n;else if(m>1){for(var g=Array(m),b=0;b<m;b++)g[b]=arguments[b+2];Object.freeze&&Object.freeze(g),u.children=g}if(e&&e.defaultProps){var C=e.defaultProps;for(a in C)u[a]===void 0&&(u[a]=C[a])}if(s||i){var S=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&Dr(u,S),i&&Fr(u,S)}return je(e,s,i,f,v,A.current,u)}function Mr(e,r){var n=je(e.type,r,e.ref,e._self,e._source,e._owner,e.props);return n}function Nr(e,r,n){if(e==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a,u=o({},e.props),s=e.key,i=e.ref,f=e._self,v=e._source,m=e._owner;if(r!=null){Ke(r)&&(i=r.ref,m=A.current),Ge(r)&&(_e(r.key),s=""+r.key);var g;e.type&&e.type.defaultProps&&(g=e.type.defaultProps);for(a in r)se.call(r,a)&&!Be.hasOwnProperty(a)&&(r[a]===void 0&&g!==void 0?u[a]=g[a]:u[a]=r[a])}var b=arguments.length-2;if(b===1)u.children=n;else if(b>1){for(var C=Array(b),S=0;S<b;S++)C[S]=arguments[S+2];u.children=C}return je(e.type,s,i,f,v,m,u)}function Z(e){return typeof e=="object"&&e!==null&&e.$$typeof===$}var Qe=".",Vr=":";function Ur(e){var r=/[=:]/g,n={"=":"=0",":":"=2"},a=e.replace(r,function(u){return n[u]});return"$"+a}var Xe=!1,Wr=/\/+/g;function Je(e){return e.replace(Wr,"$&/")}function Ie(e,r){return typeof e=="object"&&e!==null&&e.key!=null?(_e(e.key),Ur(""+e.key)):r.toString(36)}function ge(e,r,n,a,u){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case $:case q:i=!0}}if(i){var f=e,v=u(f),m=a===""?Qe+Ie(f,0):a;if(me(v)){var g="";m!=null&&(g=Je(m)+"/"),ge(v,r,g,"",function(Dt){return Dt})}else v!=null&&(Z(v)&&(v.key&&(!f||f.key!==v.key)&&_e(v.key),v=Mr(v,n+(v.key&&(!f||f.key!==v.key)?Je(""+v.key)+"/":"")+m)),r.push(v));return 1}var b,C,S=0,T=a===""?Qe:a+Vr;if(me(e))for(var Te=0;Te<e.length;Te++)b=e[Te],C=T+Ie(b,Te),S+=ge(b,r,n,C,u);else{var Ue=G(e);if(typeof Ue=="function"){var Cr=e;Ue===Cr.entries&&(Xe||M("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Xe=!0);for(var It=Ue.call(Cr),wr,$t=0;!(wr=It.next()).done;)b=wr.value,C=T+Ie(b,$t++),S+=ge(b,r,n,C,u)}else if(s==="object"){var Sr=String(e);throw new Error("Objects are not valid as a React child (found: "+(Sr==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":Sr)+"). If you meant to render a collection of children, use an array instead.")}}return S}function be(e,r,n){if(e==null)return e;var a=[],u=0;return ge(e,a,"","",function(s){return r.call(n,s,u++)}),a}function Yr(e){var r=0;return be(e,function(){r++}),r}function zr(e,r,n){be(e,function(){r.apply(this,arguments)},n)}function Br(e){return be(e,function(r){return r})||[]}function qr(e){if(!Z(e))throw new Error("React.Children.only expected to receive a single React element child.");return e}function Hr(e){var r={$$typeof:K,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};r.Provider={$$typeof:ae,_context:r};var n=!1,a=!1,u=!1;{var s={$$typeof:K,_context:r};Object.defineProperties(s,{Provider:{get:function(){return a||(a=!0,c("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),r.Provider},set:function(i){r.Provider=i}},_currentValue:{get:function(){return r._currentValue},set:function(i){r._currentValue=i}},_currentValue2:{get:function(){return r._currentValue2},set:function(i){r._currentValue2=i}},_threadCount:{get:function(){return r._threadCount},set:function(i){r._threadCount=i}},Consumer:{get:function(){return n||(n=!0,c("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),r.Consumer}},displayName:{get:function(){return r.displayName},set:function(i){u||(M("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",i),u=!0)}}}),r.Consumer=s}return r._currentRenderer=null,r._currentRenderer2=null,r}var ce=-1,$e=0,Ze=1,Kr=2;function Gr(e){if(e._status===ce){var r=e._result,n=r();if(n.then(function(s){if(e._status===$e||e._status===ce){var i=e;i._status=Ze,i._result=s}},function(s){if(e._status===$e||e._status===ce){var i=e;i._status=Kr,i._result=s}}),e._status===ce){var a=e;a._status=$e,a._result=n}}if(e._status===Ze){var u=e._result;return u===void 0&&c(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
18
18
|
|
|
19
19
|
Your code should look like:
|
|
20
20
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
@@ -22,18 +22,18 @@ Your code should look like:
|
|
|
22
22
|
Did you accidentally put curly braces around the import?`,u),"default"in u||c(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
23
23
|
|
|
24
24
|
Your code should look like:
|
|
25
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,u),u.default}else throw e._result}function Qr(e){var r={_status:ce,_result:e},n={$$typeof
|
|
25
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,u),u.default}else throw e._result}function Qr(e){var r={_status:ce,_result:e},n={$$typeof:Y,_payload:r,_init:Gr};{var a,u;Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return a},set:function(s){c("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),a=s,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return u},set:function(s){c("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),u=s,Object.defineProperty(n,"propTypes",{enumerable:!0})}}})}return n}function Xr(e){e!=null&&e.$$typeof===D?c("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?c("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&c("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&(e.defaultProps!=null||e.propTypes!=null)&&c("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var r={$$typeof:U,render:e};{var n;Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(a){n=a,!e.name&&!e.displayName&&(e.displayName=a)}})}return r}var er;er=Symbol.for("react.module.reference");function rr(e){return!!(typeof e=="string"||typeof e=="function"||e===H||e===ne||X||e===te||e===W||e===oe||ie||e===de||ue||Pe||ye||typeof e=="object"&&e!==null&&(e.$$typeof===Y||e.$$typeof===D||e.$$typeof===ae||e.$$typeof===K||e.$$typeof===U||e.$$typeof===er||e.getModuleId!==void 0))}function Jr(e,r){rr(e)||c("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e);var n={$$typeof:D,type:e,compare:r===void 0?null:r};{var a;Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return a},set:function(u){a=u,!e.name&&!e.displayName&&(e.displayName=u)}})}return n}function P(){var e=Q.current;return e===null&&c(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
26
26
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
27
27
|
2. You might be breaking the Rules of Hooks
|
|
28
28
|
3. You might have more than one copy of React in the same app
|
|
29
|
-
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function Zr(e){var r=P();if(e._context!==void 0){var n=e._context;n.Consumer===e?c("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&c("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return r.useContext(e)}function et(e){var r=P();return r.useState(e)}function rt(e,r,n){var a=P();return a.useReducer(e,r,n)}function tt(e){var r=P();return r.useRef(e)}function nt(e,r){var n=P();return n.useEffect(e,r)}function at(e,r){var n=P();return n.useInsertionEffect(e,r)}function ot(e,r){var n=P();return n.useLayoutEffect(e,r)}function ut(e,r){var n=P();return n.useCallback(e,r)}function it(e,r){var n=P();return n.useMemo(e,r)}function st(e,r,n){var a=P();return a.useImperativeHandle(e,r,n)}function ct(e,r){{var n=P();return n.useDebugValue(e,r)}}function ft(){var e=P();return e.useTransition()}function lt(e){var r=P();return r.useDeferredValue(e)}function dt(){var e=P();return e.useId()}function pt(e,r,n){var a=P();return a.useSyncExternalStore(e,r,n)}var fe=0,tr,nr,ar,or,ur,ir,sr;function cr(){}cr.__reactDisabledLog=!0;function vt(){{if(fe===0){tr=console.log,nr=console.info,ar=console.warn,or=console.error,ur=console.group,ir=console.groupCollapsed,sr=console.groupEnd;var e={configurable:!0,enumerable:!0,value:cr,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}fe++}}function yt(){{if(fe--,fe===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:o({},e,{value:tr}),info:o({},e,{value:nr}),warn:o({},e,{value:ar}),error:o({},e,{value:or}),group:o({},e,{value:ur}),groupCollapsed:o({},e,{value:ir}),groupEnd:o({},e,{value:sr})})}fe<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var
|
|
30
|
-
`+
|
|
29
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function Zr(e){var r=P();if(e._context!==void 0){var n=e._context;n.Consumer===e?c("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&c("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return r.useContext(e)}function et(e){var r=P();return r.useState(e)}function rt(e,r,n){var a=P();return a.useReducer(e,r,n)}function tt(e){var r=P();return r.useRef(e)}function nt(e,r){var n=P();return n.useEffect(e,r)}function at(e,r){var n=P();return n.useInsertionEffect(e,r)}function ot(e,r){var n=P();return n.useLayoutEffect(e,r)}function ut(e,r){var n=P();return n.useCallback(e,r)}function it(e,r){var n=P();return n.useMemo(e,r)}function st(e,r,n){var a=P();return a.useImperativeHandle(e,r,n)}function ct(e,r){{var n=P();return n.useDebugValue(e,r)}}function ft(){var e=P();return e.useTransition()}function lt(e){var r=P();return r.useDeferredValue(e)}function dt(){var e=P();return e.useId()}function pt(e,r,n){var a=P();return a.useSyncExternalStore(e,r,n)}var fe=0,tr,nr,ar,or,ur,ir,sr;function cr(){}cr.__reactDisabledLog=!0;function vt(){{if(fe===0){tr=console.log,nr=console.info,ar=console.warn,or=console.error,ur=console.group,ir=console.groupCollapsed,sr=console.groupEnd;var e={configurable:!0,enumerable:!0,value:cr,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}fe++}}function yt(){{if(fe--,fe===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:o({},e,{value:tr}),info:o({},e,{value:nr}),warn:o({},e,{value:ar}),error:o({},e,{value:or}),group:o({},e,{value:ur}),groupCollapsed:o({},e,{value:ir}),groupEnd:o({},e,{value:sr})})}fe<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var De=I.ReactCurrentDispatcher,Fe;function Re(e,r,n){{if(Fe===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);Fe=a&&a[1]||""}return`
|
|
30
|
+
`+Fe+e}}var xe=!1,Ee;{var ht=typeof WeakMap=="function"?WeakMap:Map;Ee=new ht}function fr(e,r){if(!e||xe)return"";{var n=Ee.get(e);if(n!==void 0)return n}var a;xe=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=De.current,De.current=null,vt();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(T){a=T}Reflect.construct(e,[],i)}else{try{i.call()}catch(T){a=T}e.call(i.prototype)}}else{try{throw Error()}catch(T){a=T}e()}}catch(T){if(T&&a&&typeof T.stack=="string"){for(var f=T.stack.split(`
|
|
31
31
|
`),v=a.stack.split(`
|
|
32
32
|
`),m=f.length-1,g=v.length-1;m>=1&&g>=0&&f[m]!==v[g];)g--;for(;m>=1&&g>=0;m--,g--)if(f[m]!==v[g]){if(m!==1||g!==1)do if(m--,g--,g<0||f[m]!==v[g]){var b=`
|
|
33
|
-
`+f[m].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&Ee.set(e,b),b}while(m>=1&&g>=0);break}}}finally{
|
|
33
|
+
`+f[m].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&Ee.set(e,b),b}while(m>=1&&g>=0);break}}}finally{xe=!1,De.current=s,yt(),Error.prepareStackTrace=u}var C=e?e.displayName||e.name:"",S=C?Re(C):"";return typeof e=="function"&&Ee.set(e,S),S}function mt(e,r,n){return fr(e,!1)}function _t(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function Ce(e,r,n){if(e==null)return"";if(typeof e=="function")return fr(e,_t(e));if(typeof e=="string")return Re(e);switch(e){case W:return Re("Suspense");case oe:return Re("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case U:return mt(e.render);case D:return Ce(e.type,r,n);case Y:{var a=e,u=a._payload,s=a._init;try{return Ce(s(u),r,n)}catch{}}}return""}var lr={},dr=I.ReactDebugCurrentFrame;function we(e){if(e){var r=e._owner,n=Ce(e.type,e._source,r?r.type:null);dr.setExtraStackFrame(n)}else dr.setExtraStackFrame(null)}function gt(e,r,n,a,u){{var s=Function.call.bind(se);for(var i in e)if(s(e,i)){var f=void 0;try{if(typeof e[i]!="function"){var v=Error((a||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}f=e[i](r,i,a,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){f=m}f&&!(f instanceof Error)&&(we(u),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",n,i,typeof f),we(null)),f instanceof Error&&!(f.message in lr)&&(lr[f.message]=!0,we(u),c("Failed %s type: %s",n,f.message),we(null))}}}function ee(e){if(e){var r=e._owner,n=Ce(e.type,e._source,r?r.type:null);ve(n)}else ve(null)}var Le;Le=!1;function pr(){if(A.current){var e=N(A.current.type);if(e)return`
|
|
34
34
|
|
|
35
35
|
Check the render method of \``+e+"`."}return""}function bt(e){if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),n=e.lineNumber;return`
|
|
36
36
|
|
|
37
37
|
Check your code at `+r+":"+n+"."}return""}function Rt(e){return e!=null?bt(e.__source):""}var vr={};function Et(e){var r=pr();if(!r){var n=typeof e=="string"?e:e.displayName||e.name;n&&(r=`
|
|
38
38
|
|
|
39
|
-
Check the top-level render call using <`+n+">.")}return r}function yr(e,r){if(!(!e._store||e._store.validated||e.key!=null)){e._store.validated=!0;var n=Et(r);if(!vr[n]){vr[n]=!0;var a="";e&&e._owner&&e._owner!==A.current&&(a=" It was passed a child from "+
|
|
39
|
+
Check the top-level render call using <`+n+">.")}return r}function yr(e,r){if(!(!e._store||e._store.validated||e.key!=null)){e._store.validated=!0;var n=Et(r);if(!vr[n]){vr[n]=!0;var a="";e&&e._owner&&e._owner!==A.current&&(a=" It was passed a child from "+N(e._owner.type)+"."),ee(e),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,a),ee(null)}}}function hr(e,r){if(typeof e=="object"){if(me(e))for(var n=0;n<e.length;n++){var a=e[n];Z(a)&&yr(a,r)}else if(Z(e))e._store&&(e._store.validated=!0);else if(e){var u=G(e);if(typeof u=="function"&&u!==e.entries)for(var s=u.call(e),i;!(i=s.next()).done;)Z(i.value)&&yr(i.value,r)}}}function mr(e){{var r=e.type;if(r==null||typeof r=="string")return;var n;if(typeof r=="function")n=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===U||r.$$typeof===D))n=r.propTypes;else return;if(n){var a=N(r);gt(n,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!Le){Le=!0;var u=N(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ct(e){{for(var r=Object.keys(e.props),n=0;n<r.length;n++){var a=r[n];if(a!=="children"&&a!=="key"){ee(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),ee(null);break}}e.ref!==null&&(ee(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),ee(null))}}function _r(e,r,n){var a=rr(e);if(!a){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var s=Rt(r);s?u+=s:u+=pr();var i;e===null?i="null":me(e)?i="array":e!==void 0&&e.$$typeof===$?(i="<"+(N(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):i=typeof e,c("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",i,u)}var f=Lr.apply(this,arguments);if(f==null)return f;if(a)for(var v=2;v<arguments.length;v++)hr(arguments[v],e);return e===H?Ct(f):mr(f),f}var gr=!1;function wt(e){var r=_r.bind(null,e);return r.type=e,gr||(gr=!0,M("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(r,"type",{enumerable:!1,get:function(){return M("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),r}function St(e,r,n){for(var a=Nr.apply(this,arguments),u=2;u<arguments.length;u++)hr(arguments[u],a.type);return mr(a),a}function Ot(e,r){var n=x.transition;x.transition={};var a=x.transition;x.transition._updatedFibers=new Set;try{e()}finally{if(x.transition=n,n===null&&a._updatedFibers){var u=a._updatedFibers.size;u>10&&M("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),a._updatedFibers.clear()}}}var br=!1,Se=null;function Tt(e){if(Se===null)try{var r=("require"+Math.random()).slice(0,7),n=j&&j[r];Se=n.call(j,"timers").setImmediate}catch{Se=function(u){br===!1&&(br=!0,typeof MessageChannel>"u"&&c("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var s=new MessageChannel;s.port1.onmessage=u,s.port2.postMessage(void 0)}}return Se(e)}var re=0,Rr=!1;function Er(e){{var r=re;re++,O.current===null&&(O.current=[]);var n=O.isBatchingLegacy,a;try{if(O.isBatchingLegacy=!0,a=e(),!n&&O.didScheduleLegacyUpdate){var u=O.current;u!==null&&(O.didScheduleLegacyUpdate=!1,Ve(u))}}catch(C){throw Oe(r),C}finally{O.isBatchingLegacy=n}if(a!==null&&typeof a=="object"&&typeof a.then=="function"){var s=a,i=!1,f={then:function(C,S){i=!0,s.then(function(T){Oe(r),re===0?Me(T,C,S):C(T)},function(T){Oe(r),S(T)})}};return!Rr&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){i||(Rr=!0,c("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),f}else{var v=a;if(Oe(r),re===0){var m=O.current;m!==null&&(Ve(m),O.current=null);var g={then:function(C,S){O.current===null?(O.current=[],Me(v,C,S)):C(v)}};return g}else{var b={then:function(C,S){C(v)}};return b}}}}function Oe(e){e!==re-1&&c("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),re=e}function Me(e,r,n){{var a=O.current;if(a!==null)try{Ve(a),Tt(function(){a.length===0?(O.current=null,r(e)):Me(e,r,n)})}catch(u){n(u)}else r(e)}}var Ne=!1;function Ve(e){if(!Ne){Ne=!0;var r=0;try{for(;r<e.length;r++){var n=e[r];do n=n(!0);while(n!==null)}e.length=0}catch(a){throw e=e.slice(r+1),a}finally{Ne=!1}}}var kt=_r,Pt=St,At=wt,jt={map:be,forEach:zr,count:Yr,toArray:Br,only:qr};l.Children=jt,l.Component=y,l.Fragment=H,l.Profiler=ne,l.PureComponent=_,l.StrictMode=te,l.Suspense=W,l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,l.act=Er,l.cloneElement=Pt,l.createContext=Hr,l.createElement=kt,l.createFactory=At,l.createRef=Pr,l.forwardRef=Xr,l.isValidElement=Z,l.lazy=Qr,l.memo=Jr,l.startTransition=Ot,l.unstable_act=Er,l.useCallback=ut,l.useContext=Zr,l.useDebugValue=ct,l.useDeferredValue=lt,l.useEffect=nt,l.useId=dt,l.useImperativeHandle=st,l.useInsertionEffect=at,l.useLayoutEffect=ot,l.useMemo=it,l.useReducer=rt,l.useRef=tt,l.useState=et,l.useSyncExternalStore=pt,l.useTransition=ft,l.version=V,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(le,le.exports)),le.exports}var kr;function Lt(){return kr||(kr=1,process.env.NODE_ENV==="production"?ke.exports=Ft():ke.exports=xt()),ke.exports}var We=Lt();function Mt(j){const l=We.useRef(null),V=We.useRef(0);l.current||(l.current=j());const $=l.current;return We.useSyncExternalStore(q=>$.$subscribe(()=>{V.current+=1,q()}),()=>V.current,()=>V.current),$}exports.useStore=Mt;
|
package/dist/index.js
CHANGED
|
@@ -9,40 +9,40 @@ var ke = { exports: {} }, d = {};
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
11
|
var Or;
|
|
12
|
-
function
|
|
12
|
+
function Ft() {
|
|
13
13
|
if (Or) return d;
|
|
14
14
|
Or = 1;
|
|
15
|
-
var j = Symbol.for("react.element"), l = Symbol.for("react.portal"),
|
|
15
|
+
var j = Symbol.for("react.element"), l = Symbol.for("react.portal"), V = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), q = Symbol.for("react.profiler"), H = Symbol.for("react.provider"), te = Symbol.for("react.context"), ne = Symbol.for("react.forward_ref"), ae = Symbol.for("react.suspense"), K = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), W = Symbol.iterator;
|
|
16
16
|
function oe(t) {
|
|
17
|
-
return t === null || typeof t != "object" ? null : (t =
|
|
17
|
+
return t === null || typeof t != "object" ? null : (t = W && t[W] || t["@@iterator"], typeof t == "function" ? t : null);
|
|
18
18
|
}
|
|
19
|
-
var
|
|
19
|
+
var D = { isMounted: function() {
|
|
20
20
|
return !1;
|
|
21
21
|
}, enqueueForceUpdate: function() {
|
|
22
22
|
}, enqueueReplaceState: function() {
|
|
23
23
|
}, enqueueSetState: function() {
|
|
24
|
-
} },
|
|
25
|
-
function
|
|
26
|
-
this.props = t, this.context = o, this.refs = de, this.updater = p ||
|
|
24
|
+
} }, Y = Object.assign, de = {};
|
|
25
|
+
function F(t, o, p) {
|
|
26
|
+
this.props = t, this.context = o, this.refs = de, this.updater = p || D;
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
F.prototype.isReactComponent = {}, F.prototype.setState = function(t, o) {
|
|
29
29
|
if (typeof t != "object" && typeof t != "function" && t != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
30
30
|
this.updater.enqueueSetState(this, t, o, "setState");
|
|
31
|
-
},
|
|
31
|
+
}, F.prototype.forceUpdate = function(t) {
|
|
32
32
|
this.updater.enqueueForceUpdate(this, t, "forceUpdate");
|
|
33
33
|
};
|
|
34
34
|
function pe() {
|
|
35
35
|
}
|
|
36
|
-
pe.prototype =
|
|
36
|
+
pe.prototype = F.prototype;
|
|
37
37
|
function G(t, o, p) {
|
|
38
|
-
this.props = t, this.context = o, this.refs = de, this.updater = p ||
|
|
38
|
+
this.props = t, this.context = o, this.refs = de, this.updater = p || D;
|
|
39
39
|
}
|
|
40
40
|
var Q = G.prototype = new pe();
|
|
41
|
-
Q.constructor = G,
|
|
42
|
-
var
|
|
41
|
+
Q.constructor = G, Y(Q, F.prototype), Q.isPureReactComponent = !0;
|
|
42
|
+
var x = Array.isArray, O = Object.prototype.hasOwnProperty, A = { current: null }, L = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
43
43
|
function z(t, o, p) {
|
|
44
44
|
var y, h = {}, w = null, R = null;
|
|
45
|
-
if (o != null) for (y in o.ref !== void 0 && (R = o.ref), o.key !== void 0 && (w = "" + o.key), o) O.call(o, y) && !
|
|
45
|
+
if (o != null) for (y in o.ref !== void 0 && (R = o.ref), o.key !== void 0 && (w = "" + o.key), o) O.call(o, y) && !L.hasOwnProperty(y) && (h[y] = o[y]);
|
|
46
46
|
var E = arguments.length - 2;
|
|
47
47
|
if (E === 1) h.children = p;
|
|
48
48
|
else if (1 < E) {
|
|
@@ -85,10 +85,10 @@ function xt() {
|
|
|
85
85
|
R = !0;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
if (R) return R = t, h = h(R), t = y === "" ? "." + ie(R, 0) : y,
|
|
88
|
+
if (R) return R = t, h = h(R), t = y === "" ? "." + ie(R, 0) : y, x(h) ? (p = "", t != null && (p = t.replace(ye, "$&/") + "/"), X(h, o, p, "", function(k) {
|
|
89
89
|
return k;
|
|
90
90
|
})) : h != null && (ue(h) && (h = ve(h, p + (!h.key || R && R.key === h.key ? "" : ("" + h.key).replace(ye, "$&/") + "/") + t)), o.push(h)), 1;
|
|
91
|
-
if (R = 0, y = y === "" ? "." : y + ":",
|
|
91
|
+
if (R = 0, y = y === "" ? "." : y + ":", x(t)) for (var E = 0; E < t.length; E++) {
|
|
92
92
|
w = t[E];
|
|
93
93
|
var _ = y + ie(w, E);
|
|
94
94
|
R += X(w, o, p, _, h);
|
|
@@ -104,7 +104,7 @@ function xt() {
|
|
|
104
104
|
return o.call(p, w, h++);
|
|
105
105
|
}), y;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function M(t) {
|
|
108
108
|
if (t._status === -1) {
|
|
109
109
|
var o = t._result;
|
|
110
110
|
o = o(), o.then(function(p) {
|
|
@@ -136,12 +136,12 @@ function xt() {
|
|
|
136
136
|
}, only: function(t) {
|
|
137
137
|
if (!ue(t)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
138
138
|
return t;
|
|
139
|
-
} }, d.Component =
|
|
139
|
+
} }, d.Component = F, d.Fragment = V, d.Profiler = q, d.PureComponent = G, d.StrictMode = $, d.Suspense = ae, d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = he, d.act = J, d.cloneElement = function(t, o, p) {
|
|
140
140
|
if (t == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + t + ".");
|
|
141
|
-
var y =
|
|
141
|
+
var y = Y({}, t.props), h = t.key, w = t.ref, R = t._owner;
|
|
142
142
|
if (o != null) {
|
|
143
143
|
if (o.ref !== void 0 && (w = o.ref, R = A.current), o.key !== void 0 && (h = "" + o.key), t.type && t.type.defaultProps) var E = t.type.defaultProps;
|
|
144
|
-
for (_ in o) O.call(o, _) && !
|
|
144
|
+
for (_ in o) O.call(o, _) && !L.hasOwnProperty(_) && (y[_] = o[_] === void 0 && E !== void 0 ? E[_] : o[_]);
|
|
145
145
|
}
|
|
146
146
|
var _ = arguments.length - 2;
|
|
147
147
|
if (_ === 1) y.children = p;
|
|
@@ -161,7 +161,7 @@ function xt() {
|
|
|
161
161
|
}, d.forwardRef = function(t) {
|
|
162
162
|
return { $$typeof: ne, render: t };
|
|
163
163
|
}, d.isValidElement = ue, d.lazy = function(t) {
|
|
164
|
-
return { $$typeof:
|
|
164
|
+
return { $$typeof: U, _payload: { _status: -1, _result: t }, _init: M };
|
|
165
165
|
}, d.memo = function(t, o) {
|
|
166
166
|
return { $$typeof: K, type: t, compare: o === void 0 ? null : o };
|
|
167
167
|
}, d.startTransition = function(t) {
|
|
@@ -215,15 +215,15 @@ var le = { exports: {} };
|
|
|
215
215
|
*/
|
|
216
216
|
le.exports;
|
|
217
217
|
var Tr;
|
|
218
|
-
function
|
|
218
|
+
function xt() {
|
|
219
219
|
return Tr || (Tr = 1, (function(j, l) {
|
|
220
220
|
process.env.NODE_ENV !== "production" && (function() {
|
|
221
221
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
222
|
-
var
|
|
222
|
+
var V = "18.3.1", $ = Symbol.for("react.element"), q = Symbol.for("react.portal"), H = Symbol.for("react.fragment"), te = Symbol.for("react.strict_mode"), ne = Symbol.for("react.profiler"), ae = Symbol.for("react.provider"), K = Symbol.for("react.context"), U = Symbol.for("react.forward_ref"), W = Symbol.for("react.suspense"), oe = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), de = Symbol.for("react.offscreen"), F = Symbol.iterator, pe = "@@iterator";
|
|
223
223
|
function G(e) {
|
|
224
224
|
if (e === null || typeof e != "object")
|
|
225
225
|
return null;
|
|
226
|
-
var r =
|
|
226
|
+
var r = F && e[F] || e[pe];
|
|
227
227
|
return typeof r == "function" ? r : null;
|
|
228
228
|
}
|
|
229
229
|
var Q = {
|
|
@@ -232,7 +232,7 @@ function Lt() {
|
|
|
232
232
|
* @type {ReactComponent}
|
|
233
233
|
*/
|
|
234
234
|
current: null
|
|
235
|
-
},
|
|
235
|
+
}, x = {
|
|
236
236
|
transition: null
|
|
237
237
|
}, O = {
|
|
238
238
|
current: null,
|
|
@@ -245,25 +245,25 @@ function Lt() {
|
|
|
245
245
|
* @type {ReactComponent}
|
|
246
246
|
*/
|
|
247
247
|
current: null
|
|
248
|
-
},
|
|
248
|
+
}, L = {}, z = null;
|
|
249
249
|
function ve(e) {
|
|
250
250
|
z = e;
|
|
251
251
|
}
|
|
252
|
-
|
|
252
|
+
L.setExtraStackFrame = function(e) {
|
|
253
253
|
z = e;
|
|
254
|
-
},
|
|
254
|
+
}, L.getCurrentStack = null, L.getStackAddendum = function() {
|
|
255
255
|
var e = "";
|
|
256
256
|
z && (e += z);
|
|
257
|
-
var r =
|
|
257
|
+
var r = L.getCurrentStack;
|
|
258
258
|
return r && (e += r() || ""), e;
|
|
259
259
|
};
|
|
260
260
|
var ue = !1, Pe = !1, ye = !1, ie = !1, X = !1, I = {
|
|
261
261
|
ReactCurrentDispatcher: Q,
|
|
262
|
-
ReactCurrentBatchConfig:
|
|
262
|
+
ReactCurrentBatchConfig: x,
|
|
263
263
|
ReactCurrentOwner: A
|
|
264
264
|
};
|
|
265
|
-
I.ReactDebugCurrentFrame =
|
|
266
|
-
function
|
|
265
|
+
I.ReactDebugCurrentFrame = L, I.ReactCurrentActQueue = O;
|
|
266
|
+
function M(e) {
|
|
267
267
|
{
|
|
268
268
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
269
269
|
n[a - 1] = arguments[a];
|
|
@@ -375,7 +375,7 @@ function Lt() {
|
|
|
375
375
|
}, w = function(e, r) {
|
|
376
376
|
Object.defineProperty(y.prototype, e, {
|
|
377
377
|
get: function() {
|
|
378
|
-
|
|
378
|
+
M("%s(...) is deprecated in plain JavaScript React classes. %s", r[0], r[1]);
|
|
379
379
|
}
|
|
380
380
|
});
|
|
381
381
|
};
|
|
@@ -408,19 +408,19 @@ function Lt() {
|
|
|
408
408
|
}
|
|
409
409
|
function Ir(e) {
|
|
410
410
|
try {
|
|
411
|
-
return
|
|
411
|
+
return Ye(e), !1;
|
|
412
412
|
} catch {
|
|
413
413
|
return !0;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Ye(e) {
|
|
417
417
|
return "" + e;
|
|
418
418
|
}
|
|
419
419
|
function _e(e) {
|
|
420
420
|
if (Ir(e))
|
|
421
|
-
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", jr(e)),
|
|
421
|
+
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", jr(e)), Ye(e);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function $r(e, r, n) {
|
|
424
424
|
var a = e.displayName;
|
|
425
425
|
if (a)
|
|
426
426
|
return a;
|
|
@@ -430,7 +430,7 @@ function Lt() {
|
|
|
430
430
|
function ze(e) {
|
|
431
431
|
return e.displayName || "Context";
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function N(e) {
|
|
434
434
|
if (e == null)
|
|
435
435
|
return null;
|
|
436
436
|
if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -446,7 +446,7 @@ function Lt() {
|
|
|
446
446
|
return "Profiler";
|
|
447
447
|
case te:
|
|
448
448
|
return "StrictMode";
|
|
449
|
-
case
|
|
449
|
+
case W:
|
|
450
450
|
return "Suspense";
|
|
451
451
|
case oe:
|
|
452
452
|
return "SuspenseList";
|
|
@@ -459,15 +459,15 @@ function Lt() {
|
|
|
459
459
|
case ae:
|
|
460
460
|
var n = e;
|
|
461
461
|
return ze(n._context) + ".Provider";
|
|
462
|
-
case
|
|
463
|
-
return
|
|
464
|
-
case
|
|
462
|
+
case U:
|
|
463
|
+
return $r(e, e.render, "ForwardRef");
|
|
464
|
+
case D:
|
|
465
465
|
var a = e.displayName || null;
|
|
466
|
-
return a !== null ? a :
|
|
467
|
-
case
|
|
466
|
+
return a !== null ? a : N(e.type) || "Memo";
|
|
467
|
+
case Y: {
|
|
468
468
|
var u = e, s = u._payload, i = u._init;
|
|
469
469
|
try {
|
|
470
|
-
return
|
|
470
|
+
return N(i(s));
|
|
471
471
|
} catch {
|
|
472
472
|
return null;
|
|
473
473
|
}
|
|
@@ -498,7 +498,7 @@ function Lt() {
|
|
|
498
498
|
}
|
|
499
499
|
return e.key !== void 0;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Dr(e, r) {
|
|
502
502
|
var n = function() {
|
|
503
503
|
qe || (qe = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
504
504
|
};
|
|
@@ -507,7 +507,7 @@ function Lt() {
|
|
|
507
507
|
configurable: !0
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Fr(e, r) {
|
|
511
511
|
var n = function() {
|
|
512
512
|
He || (He = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
513
513
|
};
|
|
@@ -516,16 +516,16 @@ function Lt() {
|
|
|
516
516
|
configurable: !0
|
|
517
517
|
});
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function xr(e) {
|
|
520
520
|
if (typeof e.ref == "string" && A.current && e.__self && A.current.stateNode !== e.__self) {
|
|
521
|
-
var r =
|
|
521
|
+
var r = N(A.current.type);
|
|
522
522
|
Ae[r] || (c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', r, e.ref), Ae[r] = !0);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
var je = function(e, r, n, a, u, s, i) {
|
|
526
526
|
var f = {
|
|
527
527
|
// This tag allows us to uniquely identify this as a React Element
|
|
528
|
-
$$typeof:
|
|
528
|
+
$$typeof: $,
|
|
529
529
|
// Built-in properties that belong on the element
|
|
530
530
|
type: e,
|
|
531
531
|
key: r,
|
|
@@ -551,10 +551,10 @@ function Lt() {
|
|
|
551
551
|
value: u
|
|
552
552
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
553
553
|
};
|
|
554
|
-
function
|
|
554
|
+
function Lr(e, r, n) {
|
|
555
555
|
var a, u = {}, s = null, i = null, f = null, v = null;
|
|
556
556
|
if (r != null) {
|
|
557
|
-
Ke(r) && (i = r.ref,
|
|
557
|
+
Ke(r) && (i = r.ref, xr(r)), Ge(r) && (_e(r.key), s = "" + r.key), f = r.__self === void 0 ? null : r.__self, v = r.__source === void 0 ? null : r.__source;
|
|
558
558
|
for (a in r)
|
|
559
559
|
se.call(r, a) && !Be.hasOwnProperty(a) && (u[a] = r[a]);
|
|
560
560
|
}
|
|
@@ -573,15 +573,15 @@ function Lt() {
|
|
|
573
573
|
}
|
|
574
574
|
if (s || i) {
|
|
575
575
|
var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
576
|
-
s &&
|
|
576
|
+
s && Dr(u, S), i && Fr(u, S);
|
|
577
577
|
}
|
|
578
578
|
return je(e, s, i, f, v, A.current, u);
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function Mr(e, r) {
|
|
581
581
|
var n = je(e.type, r, e.ref, e._self, e._source, e._owner, e.props);
|
|
582
582
|
return n;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function Nr(e, r, n) {
|
|
585
585
|
if (e == null)
|
|
586
586
|
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
587
587
|
var a, u = o({}, e.props), s = e.key, i = e.ref, f = e._self, v = e._source, m = e._owner;
|
|
@@ -603,10 +603,10 @@ function Lt() {
|
|
|
603
603
|
return je(e.type, s, i, f, v, m, u);
|
|
604
604
|
}
|
|
605
605
|
function Z(e) {
|
|
606
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
606
|
+
return typeof e == "object" && e !== null && e.$$typeof === $;
|
|
607
607
|
}
|
|
608
|
-
var Qe = ".",
|
|
609
|
-
function
|
|
608
|
+
var Qe = ".", Vr = ":";
|
|
609
|
+
function Ur(e) {
|
|
610
610
|
var r = /[=:]/g, n = {
|
|
611
611
|
"=": "=0",
|
|
612
612
|
":": "=2"
|
|
@@ -615,12 +615,12 @@ function Lt() {
|
|
|
615
615
|
});
|
|
616
616
|
return "$" + a;
|
|
617
617
|
}
|
|
618
|
-
var Xe = !1,
|
|
618
|
+
var Xe = !1, Wr = /\/+/g;
|
|
619
619
|
function Je(e) {
|
|
620
|
-
return e.replace(
|
|
620
|
+
return e.replace(Wr, "$&/");
|
|
621
621
|
}
|
|
622
622
|
function Ie(e, r) {
|
|
623
|
-
return typeof e == "object" && e !== null && e.key != null ? (_e(e.key),
|
|
623
|
+
return typeof e == "object" && e !== null && e.key != null ? (_e(e.key), Ur("" + e.key)) : r.toString(36);
|
|
624
624
|
}
|
|
625
625
|
function ge(e, r, n, a, u) {
|
|
626
626
|
var s = typeof e;
|
|
@@ -636,7 +636,7 @@ function Lt() {
|
|
|
636
636
|
break;
|
|
637
637
|
case "object":
|
|
638
638
|
switch (e.$$typeof) {
|
|
639
|
-
case
|
|
639
|
+
case $:
|
|
640
640
|
case q:
|
|
641
641
|
i = !0;
|
|
642
642
|
}
|
|
@@ -645,10 +645,10 @@ function Lt() {
|
|
|
645
645
|
var f = e, v = u(f), m = a === "" ? Qe + Ie(f, 0) : a;
|
|
646
646
|
if (me(v)) {
|
|
647
647
|
var g = "";
|
|
648
|
-
m != null && (g = Je(m) + "/"), ge(v, r, g, "", function(
|
|
649
|
-
return
|
|
648
|
+
m != null && (g = Je(m) + "/"), ge(v, r, g, "", function(Dt) {
|
|
649
|
+
return Dt;
|
|
650
650
|
});
|
|
651
|
-
} else v != null && (Z(v) && (v.key && (!f || f.key !== v.key) && _e(v.key), v =
|
|
651
|
+
} else v != null && (Z(v) && (v.key && (!f || f.key !== v.key) && _e(v.key), v = Mr(
|
|
652
652
|
v,
|
|
653
653
|
// Keep both the (mapped) and old keys if they differ, just as
|
|
654
654
|
// traverseAllChildren used to do for objects as children
|
|
@@ -661,17 +661,17 @@ function Lt() {
|
|
|
661
661
|
)), r.push(v));
|
|
662
662
|
return 1;
|
|
663
663
|
}
|
|
664
|
-
var b, C, S = 0, T = a === "" ? Qe : a +
|
|
664
|
+
var b, C, S = 0, T = a === "" ? Qe : a + Vr;
|
|
665
665
|
if (me(e))
|
|
666
666
|
for (var Te = 0; Te < e.length; Te++)
|
|
667
667
|
b = e[Te], C = T + Ie(b, Te), S += ge(b, r, n, C, u);
|
|
668
668
|
else {
|
|
669
|
-
var
|
|
670
|
-
if (typeof
|
|
669
|
+
var Ue = G(e);
|
|
670
|
+
if (typeof Ue == "function") {
|
|
671
671
|
var Cr = e;
|
|
672
|
-
|
|
673
|
-
for (var It =
|
|
674
|
-
b = wr.value, C = T + Ie(b,
|
|
672
|
+
Ue === Cr.entries && (Xe || M("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), Xe = !0);
|
|
673
|
+
for (var It = Ue.call(Cr), wr, $t = 0; !(wr = It.next()).done; )
|
|
674
|
+
b = wr.value, C = T + Ie(b, $t++), S += ge(b, r, n, C, u);
|
|
675
675
|
} else if (s === "object") {
|
|
676
676
|
var Sr = String(e);
|
|
677
677
|
throw new Error("Objects are not valid as a React child (found: " + (Sr === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : Sr) + "). If you meant to render a collection of children, use an array instead.");
|
|
@@ -687,7 +687,7 @@ function Lt() {
|
|
|
687
687
|
return r.call(n, s, u++);
|
|
688
688
|
}), a;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function Yr(e) {
|
|
691
691
|
var r = 0;
|
|
692
692
|
return be(e, function() {
|
|
693
693
|
r++;
|
|
@@ -781,30 +781,30 @@ function Lt() {
|
|
|
781
781
|
return r.displayName;
|
|
782
782
|
},
|
|
783
783
|
set: function(i) {
|
|
784
|
-
u || (
|
|
784
|
+
u || (M("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", i), u = !0);
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
}), r.Consumer = s;
|
|
788
788
|
}
|
|
789
789
|
return r._currentRenderer = null, r._currentRenderer2 = null, r;
|
|
790
790
|
}
|
|
791
|
-
var ce = -1,
|
|
791
|
+
var ce = -1, $e = 0, Ze = 1, Kr = 2;
|
|
792
792
|
function Gr(e) {
|
|
793
793
|
if (e._status === ce) {
|
|
794
794
|
var r = e._result, n = r();
|
|
795
795
|
if (n.then(function(s) {
|
|
796
|
-
if (e._status ===
|
|
796
|
+
if (e._status === $e || e._status === ce) {
|
|
797
797
|
var i = e;
|
|
798
798
|
i._status = Ze, i._result = s;
|
|
799
799
|
}
|
|
800
800
|
}, function(s) {
|
|
801
|
-
if (e._status ===
|
|
801
|
+
if (e._status === $e || e._status === ce) {
|
|
802
802
|
var i = e;
|
|
803
803
|
i._status = Kr, i._result = s;
|
|
804
804
|
}
|
|
805
805
|
}), e._status === ce) {
|
|
806
806
|
var a = e;
|
|
807
|
-
a._status =
|
|
807
|
+
a._status = $e, a._result = n;
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
810
|
if (e._status === Ze) {
|
|
@@ -827,7 +827,7 @@ Your code should look like:
|
|
|
827
827
|
_status: ce,
|
|
828
828
|
_result: e
|
|
829
829
|
}, n = {
|
|
830
|
-
$$typeof:
|
|
830
|
+
$$typeof: Y,
|
|
831
831
|
_payload: r,
|
|
832
832
|
_init: Gr
|
|
833
833
|
};
|
|
@@ -861,9 +861,9 @@ Your code should look like:
|
|
|
861
861
|
return n;
|
|
862
862
|
}
|
|
863
863
|
function Xr(e) {
|
|
864
|
-
e != null && e.$$typeof ===
|
|
864
|
+
e != null && e.$$typeof === D ? c("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? c("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && c("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && c("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
865
865
|
var r = {
|
|
866
|
-
$$typeof:
|
|
866
|
+
$$typeof: U,
|
|
867
867
|
render: e
|
|
868
868
|
};
|
|
869
869
|
{
|
|
@@ -884,7 +884,7 @@ Your code should look like:
|
|
|
884
884
|
var er;
|
|
885
885
|
er = Symbol.for("react.module.reference");
|
|
886
886
|
function rr(e) {
|
|
887
|
-
return !!(typeof e == "string" || typeof e == "function" || e === H || e === ne || X || e === te || e ===
|
|
887
|
+
return !!(typeof e == "string" || typeof e == "function" || e === H || e === ne || X || e === te || e === W || e === oe || ie || e === de || ue || Pe || ye || typeof e == "object" && e !== null && (e.$$typeof === Y || e.$$typeof === D || e.$$typeof === ae || e.$$typeof === K || e.$$typeof === U || // This needs to include all possible module reference object
|
|
888
888
|
// types supported by any Flight configuration anywhere since
|
|
889
889
|
// we don't know which Flight build this will end up being used
|
|
890
890
|
// with.
|
|
@@ -893,7 +893,7 @@ Your code should look like:
|
|
|
893
893
|
function Jr(e, r) {
|
|
894
894
|
rr(e) || c("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
|
|
895
895
|
var n = {
|
|
896
|
-
$$typeof:
|
|
896
|
+
$$typeof: D,
|
|
897
897
|
type: e,
|
|
898
898
|
compare: r === void 0 ? null : r
|
|
899
899
|
};
|
|
@@ -1048,27 +1048,27 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1048
1048
|
fe < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
var
|
|
1051
|
+
var De = I.ReactCurrentDispatcher, Fe;
|
|
1052
1052
|
function Re(e, r, n) {
|
|
1053
1053
|
{
|
|
1054
|
-
if (
|
|
1054
|
+
if (Fe === void 0)
|
|
1055
1055
|
try {
|
|
1056
1056
|
throw Error();
|
|
1057
1057
|
} catch (u) {
|
|
1058
1058
|
var a = u.stack.trim().match(/\n( *(at )?)/);
|
|
1059
|
-
|
|
1059
|
+
Fe = a && a[1] || "";
|
|
1060
1060
|
}
|
|
1061
1061
|
return `
|
|
1062
|
-
` +
|
|
1062
|
+
` + Fe + e;
|
|
1063
1063
|
}
|
|
1064
1064
|
}
|
|
1065
|
-
var
|
|
1065
|
+
var xe = !1, Ee;
|
|
1066
1066
|
{
|
|
1067
1067
|
var ht = typeof WeakMap == "function" ? WeakMap : Map;
|
|
1068
1068
|
Ee = new ht();
|
|
1069
1069
|
}
|
|
1070
1070
|
function fr(e, r) {
|
|
1071
|
-
if (!e ||
|
|
1071
|
+
if (!e || xe)
|
|
1072
1072
|
return "";
|
|
1073
1073
|
{
|
|
1074
1074
|
var n = Ee.get(e);
|
|
@@ -1076,11 +1076,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1076
1076
|
return n;
|
|
1077
1077
|
}
|
|
1078
1078
|
var a;
|
|
1079
|
-
|
|
1079
|
+
xe = !0;
|
|
1080
1080
|
var u = Error.prepareStackTrace;
|
|
1081
1081
|
Error.prepareStackTrace = void 0;
|
|
1082
1082
|
var s;
|
|
1083
|
-
s =
|
|
1083
|
+
s = De.current, De.current = null, vt();
|
|
1084
1084
|
try {
|
|
1085
1085
|
if (r) {
|
|
1086
1086
|
var i = function() {
|
|
@@ -1133,7 +1133,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
} finally {
|
|
1136
|
-
|
|
1136
|
+
xe = !1, De.current = s, yt(), Error.prepareStackTrace = u;
|
|
1137
1137
|
}
|
|
1138
1138
|
var C = e ? e.displayName || e.name : "", S = C ? Re(C) : "";
|
|
1139
1139
|
return typeof e == "function" && Ee.set(e, S), S;
|
|
@@ -1153,18 +1153,18 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1153
1153
|
if (typeof e == "string")
|
|
1154
1154
|
return Re(e);
|
|
1155
1155
|
switch (e) {
|
|
1156
|
-
case
|
|
1156
|
+
case W:
|
|
1157
1157
|
return Re("Suspense");
|
|
1158
1158
|
case oe:
|
|
1159
1159
|
return Re("SuspenseList");
|
|
1160
1160
|
}
|
|
1161
1161
|
if (typeof e == "object")
|
|
1162
1162
|
switch (e.$$typeof) {
|
|
1163
|
-
case
|
|
1163
|
+
case U:
|
|
1164
1164
|
return mt(e.render);
|
|
1165
|
-
case
|
|
1165
|
+
case D:
|
|
1166
1166
|
return Ce(e.type, r, n);
|
|
1167
|
-
case
|
|
1167
|
+
case Y: {
|
|
1168
1168
|
var a = e, u = a._payload, s = a._init;
|
|
1169
1169
|
try {
|
|
1170
1170
|
return Ce(s(u), r, n);
|
|
@@ -1208,11 +1208,11 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1208
1208
|
} else
|
|
1209
1209
|
ve(null);
|
|
1210
1210
|
}
|
|
1211
|
-
var
|
|
1212
|
-
|
|
1211
|
+
var Le;
|
|
1212
|
+
Le = !1;
|
|
1213
1213
|
function pr() {
|
|
1214
1214
|
if (A.current) {
|
|
1215
|
-
var e =
|
|
1215
|
+
var e = N(A.current.type);
|
|
1216
1216
|
if (e)
|
|
1217
1217
|
return `
|
|
1218
1218
|
|
|
@@ -1250,7 +1250,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1250
1250
|
if (!vr[n]) {
|
|
1251
1251
|
vr[n] = !0;
|
|
1252
1252
|
var a = "";
|
|
1253
|
-
e && e._owner && e._owner !== A.current && (a = " It was passed a child from " +
|
|
1253
|
+
e && e._owner && e._owner !== A.current && (a = " It was passed a child from " + N(e._owner.type) + "."), ee(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, a), ee(null);
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
@@ -1279,18 +1279,18 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1279
1279
|
var n;
|
|
1280
1280
|
if (typeof r == "function")
|
|
1281
1281
|
n = r.propTypes;
|
|
1282
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
1282
|
+
else if (typeof r == "object" && (r.$$typeof === U || // Note: Memo only checks outer props here.
|
|
1283
1283
|
// Inner props are checked in the reconciler.
|
|
1284
|
-
r.$$typeof ===
|
|
1284
|
+
r.$$typeof === D))
|
|
1285
1285
|
n = r.propTypes;
|
|
1286
1286
|
else
|
|
1287
1287
|
return;
|
|
1288
1288
|
if (n) {
|
|
1289
|
-
var a =
|
|
1289
|
+
var a = N(r);
|
|
1290
1290
|
gt(n, e.props, "prop", a, e);
|
|
1291
|
-
} else if (r.PropTypes !== void 0 && !
|
|
1292
|
-
|
|
1293
|
-
var u =
|
|
1291
|
+
} else if (r.PropTypes !== void 0 && !Le) {
|
|
1292
|
+
Le = !0;
|
|
1293
|
+
var u = N(r);
|
|
1294
1294
|
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
1295
1295
|
}
|
|
1296
1296
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -1316,9 +1316,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1316
1316
|
var s = Rt(r);
|
|
1317
1317
|
s ? u += s : u += pr();
|
|
1318
1318
|
var i;
|
|
1319
|
-
e === null ? i = "null" : me(e) ? i = "array" : e !== void 0 && e.$$typeof ===
|
|
1319
|
+
e === null ? i = "null" : me(e) ? i = "array" : e !== void 0 && e.$$typeof === $ ? (i = "<" + (N(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : i = typeof e, c("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", i, u);
|
|
1320
1320
|
}
|
|
1321
|
-
var f =
|
|
1321
|
+
var f = Lr.apply(this, arguments);
|
|
1322
1322
|
if (f == null)
|
|
1323
1323
|
return f;
|
|
1324
1324
|
if (a)
|
|
@@ -1329,31 +1329,31 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1329
1329
|
var gr = !1;
|
|
1330
1330
|
function wt(e) {
|
|
1331
1331
|
var r = _r.bind(null, e);
|
|
1332
|
-
return r.type = e, gr || (gr = !0,
|
|
1332
|
+
return r.type = e, gr || (gr = !0, M("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(r, "type", {
|
|
1333
1333
|
enumerable: !1,
|
|
1334
1334
|
get: function() {
|
|
1335
|
-
return
|
|
1335
|
+
return M("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
|
|
1336
1336
|
value: e
|
|
1337
1337
|
}), e;
|
|
1338
1338
|
}
|
|
1339
1339
|
}), r;
|
|
1340
1340
|
}
|
|
1341
1341
|
function St(e, r, n) {
|
|
1342
|
-
for (var a =
|
|
1342
|
+
for (var a = Nr.apply(this, arguments), u = 2; u < arguments.length; u++)
|
|
1343
1343
|
hr(arguments[u], a.type);
|
|
1344
1344
|
return mr(a), a;
|
|
1345
1345
|
}
|
|
1346
1346
|
function Ot(e, r) {
|
|
1347
|
-
var n =
|
|
1348
|
-
|
|
1349
|
-
var a =
|
|
1350
|
-
|
|
1347
|
+
var n = x.transition;
|
|
1348
|
+
x.transition = {};
|
|
1349
|
+
var a = x.transition;
|
|
1350
|
+
x.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
1351
1351
|
try {
|
|
1352
1352
|
e();
|
|
1353
1353
|
} finally {
|
|
1354
|
-
if (
|
|
1354
|
+
if (x.transition = n, n === null && a._updatedFibers) {
|
|
1355
1355
|
var u = a._updatedFibers.size;
|
|
1356
|
-
u > 10 &&
|
|
1356
|
+
u > 10 && M("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), a._updatedFibers.clear();
|
|
1357
1357
|
}
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
@@ -1381,7 +1381,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1381
1381
|
try {
|
|
1382
1382
|
if (O.isBatchingLegacy = !0, a = e(), !n && O.didScheduleLegacyUpdate) {
|
|
1383
1383
|
var u = O.current;
|
|
1384
|
-
u !== null && (O.didScheduleLegacyUpdate = !1,
|
|
1384
|
+
u !== null && (O.didScheduleLegacyUpdate = !1, Ve(u));
|
|
1385
1385
|
}
|
|
1386
1386
|
} catch (C) {
|
|
1387
1387
|
throw Oe(r), C;
|
|
@@ -1392,7 +1392,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1392
1392
|
var s = a, i = !1, f = {
|
|
1393
1393
|
then: function(C, S) {
|
|
1394
1394
|
i = !0, s.then(function(T) {
|
|
1395
|
-
Oe(r), re === 0 ?
|
|
1395
|
+
Oe(r), re === 0 ? Me(T, C, S) : C(T);
|
|
1396
1396
|
}, function(T) {
|
|
1397
1397
|
Oe(r), S(T);
|
|
1398
1398
|
});
|
|
@@ -1406,10 +1406,10 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1406
1406
|
var v = a;
|
|
1407
1407
|
if (Oe(r), re === 0) {
|
|
1408
1408
|
var m = O.current;
|
|
1409
|
-
m !== null && (
|
|
1409
|
+
m !== null && (Ve(m), O.current = null);
|
|
1410
1410
|
var g = {
|
|
1411
1411
|
then: function(C, S) {
|
|
1412
|
-
O.current === null ? (O.current = [],
|
|
1412
|
+
O.current === null ? (O.current = [], Me(v, C, S)) : C(v);
|
|
1413
1413
|
}
|
|
1414
1414
|
};
|
|
1415
1415
|
return g;
|
|
@@ -1427,13 +1427,13 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1427
1427
|
function Oe(e) {
|
|
1428
1428
|
e !== re - 1 && c("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), re = e;
|
|
1429
1429
|
}
|
|
1430
|
-
function
|
|
1430
|
+
function Me(e, r, n) {
|
|
1431
1431
|
{
|
|
1432
1432
|
var a = O.current;
|
|
1433
1433
|
if (a !== null)
|
|
1434
1434
|
try {
|
|
1435
|
-
|
|
1436
|
-
a.length === 0 ? (O.current = null, r(e)) :
|
|
1435
|
+
Ve(a), Tt(function() {
|
|
1436
|
+
a.length === 0 ? (O.current = null, r(e)) : Me(e, r, n);
|
|
1437
1437
|
});
|
|
1438
1438
|
} catch (u) {
|
|
1439
1439
|
n(u);
|
|
@@ -1442,10 +1442,10 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1442
1442
|
r(e);
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
|
-
var
|
|
1446
|
-
function
|
|
1447
|
-
if (!
|
|
1448
|
-
|
|
1445
|
+
var Ne = !1;
|
|
1446
|
+
function Ve(e) {
|
|
1447
|
+
if (!Ne) {
|
|
1448
|
+
Ne = !0;
|
|
1449
1449
|
var r = 0;
|
|
1450
1450
|
try {
|
|
1451
1451
|
for (; r < e.length; r++) {
|
|
@@ -1458,38 +1458,38 @@ Check the top-level render call using <` + n + ">.");
|
|
|
1458
1458
|
} catch (a) {
|
|
1459
1459
|
throw e = e.slice(r + 1), a;
|
|
1460
1460
|
} finally {
|
|
1461
|
-
|
|
1461
|
+
Ne = !1;
|
|
1462
1462
|
}
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
1465
|
var kt = _r, Pt = St, At = wt, jt = {
|
|
1466
1466
|
map: be,
|
|
1467
1467
|
forEach: zr,
|
|
1468
|
-
count:
|
|
1468
|
+
count: Yr,
|
|
1469
1469
|
toArray: Br,
|
|
1470
1470
|
only: qr
|
|
1471
1471
|
};
|
|
1472
|
-
l.Children = jt, l.Component = y, l.Fragment = H, l.Profiler = ne, l.PureComponent = _, l.StrictMode = te, l.Suspense =
|
|
1472
|
+
l.Children = jt, l.Component = y, l.Fragment = H, l.Profiler = ne, l.PureComponent = _, l.StrictMode = te, l.Suspense = W, l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = I, l.act = Er, l.cloneElement = Pt, l.createContext = Hr, l.createElement = kt, l.createFactory = At, l.createRef = Pr, l.forwardRef = Xr, l.isValidElement = Z, l.lazy = Qr, l.memo = Jr, l.startTransition = Ot, l.unstable_act = Er, l.useCallback = ut, l.useContext = Zr, l.useDebugValue = ct, l.useDeferredValue = lt, l.useEffect = nt, l.useId = dt, l.useImperativeHandle = st, l.useInsertionEffect = at, l.useLayoutEffect = ot, l.useMemo = it, l.useReducer = rt, l.useRef = tt, l.useState = et, l.useSyncExternalStore = pt, l.useTransition = ft, l.version = V, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1473
1473
|
})();
|
|
1474
1474
|
})(le, le.exports)), le.exports;
|
|
1475
1475
|
}
|
|
1476
1476
|
var kr;
|
|
1477
|
-
function
|
|
1478
|
-
return kr || (kr = 1, process.env.NODE_ENV === "production" ? ke.exports =
|
|
1477
|
+
function Lt() {
|
|
1478
|
+
return kr || (kr = 1, process.env.NODE_ENV === "production" ? ke.exports = Ft() : ke.exports = xt()), ke.exports;
|
|
1479
1479
|
}
|
|
1480
|
-
var
|
|
1481
|
-
function
|
|
1482
|
-
const l =
|
|
1480
|
+
var We = Lt();
|
|
1481
|
+
function Mt(j) {
|
|
1482
|
+
const l = We.useRef(null), V = We.useRef(0);
|
|
1483
1483
|
l.current || (l.current = j());
|
|
1484
|
-
const
|
|
1485
|
-
return
|
|
1486
|
-
(q) =>
|
|
1487
|
-
|
|
1484
|
+
const $ = l.current;
|
|
1485
|
+
return We.useSyncExternalStore(
|
|
1486
|
+
(q) => $.$subscribe(() => {
|
|
1487
|
+
V.current += 1, q();
|
|
1488
1488
|
}),
|
|
1489
|
-
() =>
|
|
1490
|
-
() =>
|
|
1491
|
-
),
|
|
1489
|
+
() => V.current,
|
|
1490
|
+
() => V.current
|
|
1491
|
+
), $;
|
|
1492
1492
|
}
|
|
1493
1493
|
export {
|
|
1494
|
-
|
|
1494
|
+
Mt as useStore
|
|
1495
1495
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storix-js/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
8
15
|
"exports": {
|
|
9
16
|
".": {
|
|
10
17
|
"types": "./dist/index.d.ts",
|
|
@@ -15,7 +22,7 @@
|
|
|
15
22
|
"scripts": {
|
|
16
23
|
"build": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
17
24
|
"dev": "vite build --watch",
|
|
18
|
-
"test": "vitest run",
|
|
25
|
+
"test": "vitest run --passWithNoTests",
|
|
19
26
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
20
27
|
},
|
|
21
28
|
"peerDependencies": {
|
package/src/index.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { StoreInstance } from '@storix-js/core';
|
|
2
|
-
import { useRef, useSyncExternalStore } from 'react';
|
|
3
|
-
|
|
4
|
-
export function useStore<T extends (...args: never[]) => StoreInstance>(factory: T): ReturnType<T> {
|
|
5
|
-
const storeRef = useRef<ReturnType<T> | null>(null);
|
|
6
|
-
const versionRef = useRef(0);
|
|
7
|
-
|
|
8
|
-
if (!storeRef.current) {
|
|
9
|
-
storeRef.current = factory() as ReturnType<T>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const store = storeRef.current as ReturnType<T>;
|
|
13
|
-
|
|
14
|
-
useSyncExternalStore(
|
|
15
|
-
(onStoreChange) =>
|
|
16
|
-
store.$subscribe(() => {
|
|
17
|
-
versionRef.current += 1;
|
|
18
|
-
onStoreChange();
|
|
19
|
-
}),
|
|
20
|
-
() => versionRef.current,
|
|
21
|
-
() => versionRef.current
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
return store;
|
|
25
|
-
}
|
package/tsconfig.build.json
DELETED
package/tsconfig.json
DELETED
package/vite.config.ts
DELETED