import{a as e}from"./react-BbQoyxJr.js";import{u as t}from"./use-sync-external-store-EqP_DNu9.js";const n=e=>Symbol.iterator in e,r=e=>"entries"in e,s=(e,t)=>{const n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(const[s,o]of n)if(!Object.is(o,r.get(s)))return!1;return!0};function o(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(n(e)&&n(t)?r(e)&&r(t)?s(e,t):((e,t)=>{const n=e[Symbol.iterator](),r=t[Symbol.iterator]();let s=n.next(),o=r.next();for(;!s.done&&!o.done;){if(!Object.is(s.value,o.value))return!1;s=n.next(),o=r.next()}return!!s.done&&!!o.done})(e,t):s({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)}))}const i=e=>{let t;const n=new Set,r=(e,r)=>{const s="function"==typeof e?e(t):e;if(!Object.is(s,t)){const e=t;t=(null!=r?r:"object"!=typeof s||null===s)?s:Object.assign({},t,s),n.forEach((n=>n(t,e)))}},s=()=>t,o={setState:r,getState:s,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e))},i=t=e(r,s,o);return o},c=e=>e?i(e):i,{useSyncExternalStoreWithSelector:a}=t,u=e=>e;function l(t,n=u,r){const s=a(t.subscribe,t.getState,t.getInitialState,n,r);return e.useDebugValue(s),s}export{c,o as s,l as u};
