(()=>{"use strict";function e(t){return t?(Object.values(t).forEach(t=>Object.isFrozen(t)||e(t)),Object.freeze(t)):t}function t(e){return Array.from(new Set(e))}function r(e){return function(e){return"object"==typeof e&&null!==e}(e)&&!Array.isArray(e)}const n=Symbol("EQUAL"),c={__delete:!0},s={__deleteAllChildren:!0};function o(e,l){if(e===l)return n;if(typeof e!=typeof l)return l;if(Array.isArray(e)&&Array.isArray(l)&&(u=l,(a=e).length===u.length&&a.every((e,t)=>o(e,u[t])===n)))return n;var a,u;if(!r(e)||!r(l))return l;const i=e,f=l,y=Object.keys(i),d=Object.keys(f);if(!d.length)return y.length?s:n;const p=t(y.concat(d)).reduce((e,t)=>{const r=i[t],s=f[t];if(!f.hasOwnProperty(t))return e[t]=c,e;if(!i.hasOwnProperty(t))return e[t]=s,e;const l=o(r,s);return l!==n&&(e[t]=l),e},{});return 0===Object.keys(p).length?n:p}function l(e,n){return e===n?n:r(n)?r(e)?"__deleteAllChildren"in n?{}:t(Object.keys(e).concat(Object.keys(n))).reduce((t,r)=>{const c=e[r];if(n.hasOwnProperty(r)){const e=n[r];e?.__delete||(t[r]=l(c,e))}else t[r]=c;return t},{}):a(n):n}function a(e){return e.__deleteAllChildren?{}:Object.entries(e).reduce((e,[t,n])=>(n?.__delete||(e[t]=r(n)?a(n):n),e),{})}let u;const i=[];function f(e,t){e.postMessage(t)}self.onconnect=e=>{const t=e.ports[0];i.push(t),t.start(),t.onmessage=e=>{const r=e.data;switch(r.type){case"reqGetFullState":{const e=r.localState;u||(u=e),f(t,{type:"fullState",state:u});break}case"reqUpdateState":{if(!u)return;const e=u;u=l(u,r.update),u.isInitial=void 0;const n=o(e,u);"symbol"!=typeof n&&function(e,t){for(let r=i.length-1;r>=0;r--)if(i[r]!==t)try{f(i[r],e)}catch(e){i.splice(r,1)}}({type:"stateUpdate",update:n},t);break}}}},self.getState=()=>e(u)})();
//# sourceMappingURL=5060.cb672c4533bb0374b3aa.js.map