import{r as l,h as T,n as S,p as x,R as c,q as v,d as _}from"./react.b0bedc10.js";if(!l.exports.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!T)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function B(e){e()}function O(e){e||(e=B),S({reactionScheduler:e})}function j(e){return x(e)}var E=1e4,F=1e4,P=function(){function e(t){var r=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=E),clearTimeout(r.sweepTimeout),r.sweepTimeout=void 0;var a=Date.now();r.registrations.forEach(function(u,o){a-u.registeredAt>=n&&(r.finalize(u.value),r.registrations.delete(o))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,F))}}),e}(),z=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:P,p=new z(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),b=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,u=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)u.push(a.value)}catch(f){o={error:f}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return u};function m(e){return"observer".concat(e)}var $=function(){function e(){}return e}();function D(){return new $}function I(e,t){t===void 0&&(t="observed");var r=b(c.useState(D),1),n=r[0],a=b(c.useState(),2),u=a[1],o=function(){return u([])},f=c.useRef(null);f.current||(f.current={reaction:null,mounted:!1,changedBeforeMount:!1});var i=f.current;i.reaction||(i.reaction=new v(m(t),function(){i.mounted?o():i.changedBeforeMount=!0}),p.register(n,i,i)),c.useDebugValue(i.reaction,j),c.useEffect(function(){return p.unregister(i),i.mounted=!0,i.reaction?i.changedBeforeMount&&(i.changedBeforeMount=!1,o()):(i.reaction=new v(m(t),function(){o()}),o()),function(){i.reaction.dispose(),i.reaction=null,i.mounted=!1,i.changedBeforeMount=!1}},[]);var y,s;if(i.reaction.track(function(){try{y=e()}catch(R){s=R}}),s)throw s;return y}var g=typeof Symbol=="function"&&Symbol.for,w=g?Symbol.for("react.forward_ref"):typeof l.exports.forwardRef=="function"&&l.exports.forwardRef(function(e){return null}).$$typeof,h=g?Symbol.for("react.memo"):typeof l.exports.memo=="function"&&l.exports.memo(function(e){return null}).$$typeof;function k(e,t){var r;if(h&&e.$$typeof===h)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=t==null?void 0:t.forwardRef)!==null&&r!==void 0?r:!1,a=e,u=e.displayName||e.name;if(w&&e.$$typeof===w&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(f,i){return I(function(){return a(f,i)},u)};return u!==""&&(o.displayName=u),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=l.exports.forwardRef(o)),o=l.exports.memo(o),A(e,o),o}var M={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function A(e,t){Object.keys(e).forEach(function(r){M[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}globalThis&&globalThis.__read;var d;O(_.exports.unstable_batchedUpdates);d=p.finalizeAllImmediately;export{k as o};
