Socket
Socket
Sign inDemoInstall

immer

Package Overview
Dependencies
Maintainers
2
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immer - npm Package Compare versions

Comparing version 6.0.0-fix-425 to 6.0.0-fix-425-2

2

dist/immer.cjs.development.js

@@ -125,3 +125,3 @@ 'use strict';

/* istanbul ignore next */
Object.getOwnPropertyNames;
Object.getOwnPropertyNames || Object.keys;
function each(obj, iter) {

@@ -128,0 +128,0 @@ if (getArchtype(obj) === ArchtypeObject) {

@@ -1,2 +0,2 @@

function t(t){for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function n(t){return!!t&&!!t[X]}function r(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var n=Object.getPrototypeOf(t);return!n||n===Object.prototype}(t)||Array.isArray(t)||!!t[W]||!!t.constructor[W]||a(t)||c(t))}function e(t,n){0===i(t)?B(t).forEach((function(r){return n(r,t[r],t)})):t.forEach((function(r,e){return n(e,r,t)}))}function i(t){var n=t[X];return n?n.t>3?n.t-4:n.t:Array.isArray(t)?1:a(t)?2:c(t)?3:0}function u(t,n){return 2===i(t)?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function o(t,n){return 2===i(t)?t.get(n):t[n]}function f(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}function a(t){return N&&t instanceof Map}function c(t){return $&&t instanceof Set}function s(t){return t.i||t.u}function v(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var i=Object.create(Object.getPrototypeOf(n));return e(n,(function(e){if(e!==X){var u=Object.getOwnPropertyDescriptor(n,e),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?i[e]=o:Object.defineProperty(i,e,{value:o,writable:!0,configurable:!0})}})),i}function p(t,u){n(t)||Object.isFrozen(t)||!r(t)||(i(t)>1&&(t.set=t.add=t.clear=t.delete=h),Object.freeze(t),u&&e(t,(function(t,n){return p(n,!0)})))}function h(){t(2)}function l(n){var r=G[n];return r||t(19,n),r}function d(t,n){G[t]=n}function _(){return J}function y(t,n){n&&(l("Patches"),t.o=[],t.s=[],t.v=n)}function b(t){m(t),t.p.forEach(j),t.p=null}function m(t){t===J&&(J=t.h)}function O(t){return J={p:[],h:J,l:t,_:!0,m:0}}function j(t){var n=t[X];0===n.t||1===n.t?n.O():n.j=!0}function x(n,e){e.m=e.p.length;var i=e.p[0],u=void 0!==n&&n!==i;return e.l.S||l("ES5").P(e,n,u),u?(i[X].M&&(b(e),t(4)),r(n)&&(n=w(e,n),e.h||P(e,n)),e.o&&l("Patches").g(i[X],n,e.o,e.s)):n=w(e,i,[]),b(e),e.o&&e.v(e.o,e.s),n!==I?n:void 0}function w(t,n,r){if(Object.isFrozen(n))return n;var i=n[X];if(!i)return e(n,(function(e,u){return S(t,i,n,e,u,r)})),n;if(i.A!==t)return n;if(!i.M)return P(t,i.u,!0),i.u;if(!i.k){i.k=!0,i.A.m--;var u=4===i.t||5===i.t?i.i=v(i.R,!0):i.i;e(u,(function(n,e){return S(t,i,u,n,e,r)})),P(t,u,!1),r&&t.o&&l("Patches").F(i,r,t.o,t.s)}return i.i}function S(t,e,a,c,s,v){if(n(s)){var p=w(t,s,v&&e&&3!==e.t&&!u(e.D,c)?v.concat(c):void 0);if(l=c,d=p,2===(_=i(h=a))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!n(p))return;t._=!1}var h,l,d,_;if((!e||!f(s,o(e.u,c)))&&r(s)){if(!t.l.J&&t.m<1)return;w(t,s),e&&e.A.h||P(t,s)}}function P(t,n,r){void 0===r&&(r=!1),t.l.J&&t._&&p(n,r)}function M(t,n){var r=t[X],e=Reflect.getOwnPropertyDescriptor(r?s(r):t,n);return e&&e.value}function g(t){if(!t.M){if(t.M=!0,0===t.t||1===t.t){var n=t.i=v(t.u);e(t.p,(function(t,r){n[t]=r})),t.p=void 0}t.h&&g(t.h)}}function A(t){t.i||(t.i=v(t.u))}function z(t,n,r){var e=a(n)?l("MapSet").K(n,r):c(n)?l("MapSet").N(n,r):t.S?function(t,n){var r=Array.isArray(t),e={t:r?1:0,A:n?n.A:_(),M:!1,k:!1,D:{},h:n,u:t,R:null,p:{},i:null,O:null,$:!1},i=e,u=H;r&&(i=[e],u=L);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.R=a,e.O=f,a}(n,r):l("ES5").C(n,r);return(r?r.A:_()).p.push(e),e}function E(t,n){t.S?g(n):l("ES5").I(n)}function k(){function i(t,n){var r=t[X];if(r&&!r.W){r.W=!0;var e=t[n];return r.W=!1,e}return t[n]}function o(t){t.M||(t.M=!0,t.h&&o(t.h))}function a(t){t.i||(t.i=c(t.u))}function c(t){var n=t&&t[X];if(n){n.W=!0;var r=v(n.R,!0);return n.W=!1,r}return v(t)}function p(t){for(var n=t.length-1;n>=0;n--){var r=t[n][X];if(!r.M)switch(r.t){case 5:l(r)&&o(r);break;case 4:h(r)&&o(r)}}}function h(t){for(var n=t.u,r=t.R,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=n[o];if(void 0===a&&!u(n,o))return!0;var c=r[o],s=c&&c[X];if(s?s.u!==a:!f(c,a))return!0}return e.length!==Object.keys(n).length}function l(t){var n=t.R;if(n.length!==t.u.length)return!0;var r=Object.getOwnPropertyDescriptor(n,n.length-1);return!(!r||r.get)}function y(n){n.j&&t(3,JSON.stringify(s(n)))}var b={};d("ES5",{C:function(t,n){var u=Array.isArray(t),v=c(t);e(v,(function(n){!function(t,n,e){var u=b[n];u?u.enumerable=e:b[n]=u={enumerable:e,get:function(){return function(t,n){y(t);var e=i(s(t),n);return t.W?e:e===i(t.u,n)&&r(e)?(a(t),t.i[n]=z(t.A.l,e,t)):e}(this[X],n)},set:function(t){!function(t,n,r){if(y(t),t.D[n]=!0,!t.M){if(f(r,i(s(t),n)))return;o(t),a(t)}t.i[n]=r}(this[X],n,t)}},Object.defineProperty(t,n,u)}(v,n,u||function(t,n){var r=Object.getOwnPropertyDescriptor(t,n);return!(!r||!r.enumerable)}(t,n))}));var p={t:u?5:4,A:n?n.A:_(),M:!1,W:!1,k:!1,D:{},h:n,u:t,R:v,i:null,j:!1,$:!1};return Object.defineProperty(v,X,{value:p,writable:!0}),v},I:o,P:function(t,r,i){t.p.forEach((function(t){t[X].W=!0})),i?n(r)&&r[X].A===t&&p(t.p):(t.o&&function t(n){if(n&&"object"==typeof n){var r=n[X];if(r){var i=r.u,f=r.R,a=r.D,c=r.t;if(4===c)e(f,(function(n){n!==X&&(void 0!==i[n]||u(i,n)?a[n]||t(f[n]):(a[n]=!0,o(r)))})),e(i,(function(t){void 0!==f[t]||u(f,t)||(a[t]=!1,o(r))}));else if(5===c){if(l(r)&&(o(r),a.length=!0),f.length<i.length)for(var s=f.length;s<i.length;s++)a[s]=!1;else for(var v=i.length;v<f.length;v++)a[v]=!0;for(var p=Math.min(f.length,i.length),h=0;h<p;h++)void 0===a[h]&&t(f[h])}}}}(t.p[0]),p(t.p))}})}function R(){function n(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(n);if(a(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],n(t[1])]})));if(c(t))return new Set(Array.from(t).map(n));var r=Object.create(Object.getPrototypeOf(t));for(var e in t)r[e]=n(t[e]);return r}var r="add";d("Patches",{X:function(e,u){return u.forEach((function(u){for(var f=u.path,a=u.op,c=e,s=0;s<f.length-1;s++)"object"!=typeof(c=o(c,f[s]))&&t(15,f.join("/"));var v=i(c),p=n(u.value),h=f[f.length-1];switch(a){case"replace":switch(v){case 2:return c.set(h,p);case 3:t(16);default:return c[h]=p}case r:switch(v){case 1:return c.splice(h,0,p);case 2:return c.set(h,p);case 3:return c.add(p);default:return c[h]=p}case"remove":switch(v){case 1:return c.splice(h,1);case 2:return c.delete(h);case 3:return c.delete(u.value);default:return delete c[h]}default:t(17,a)}})),e},F:function(t,n,i,f){switch(t.t){case 0:case 4:case 2:return function(t,n,i,f){var a=t.u,c=t.i;e(t.D,(function(t,e){var s=o(a,t),v=o(c,t),p=e?u(a,t)?"replace":r:"remove";if(s!==v||"replace"!==p){var h=n.concat(t);i.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:v}),f.push(p===r?{op:"remove",path:h}:"remove"===p?{op:r,path:h,value:s}:{op:"replace",path:h,value:s})}}))}(t,n,i,f);case 5:case 1:return function(t,n,e,i){var u=t.u,o=t.D,f=t.i;if(f.length<u.length){var a=[f,u];u=a[0],f=a[1];var c=[i,e];e=c[0],i=c[1]}for(var s=f.length-u.length,v=0;u[v]===f[v]&&v<u.length;)++v;for(var p=u.length;p>v&&u[p-1]===f[p+s-1];)--p;for(var h=v;h<p;++h)if(o[h]&&f[h]!==u[h]){var l=n.concat([h]);e.push({op:"replace",path:l,value:f[h]}),i.push({op:"replace",path:l,value:u[h]})}for(var d=e.length,_=p+s-1;_>=p;--_){var y=n.concat([_]);e[d+_-p]={op:r,path:y,value:f[_]},i.push({op:"remove",path:y})}}(t,n,i,f);case 3:return function(t,n,e,i){var u=t.u,o=t.i,f=0;u.forEach((function(t){if(!o.has(t)){var u=n.concat([f]);e.push({op:"remove",path:u,value:t}),i.unshift({op:r,path:u,value:t})}f++})),f=0,o.forEach((function(t){if(!u.has(t)){var o=n.concat([f]);e.push({op:r,path:o,value:t}),i.unshift({op:"remove",path:o,value:t})}f++}))}(t,n,i,f)}},g:function(t,n,r,e){r.push({op:"replace",path:[],value:n}),e.push({op:"replace",path:[],value:t.u})}})}function F(){function n(t,n){function r(){this.constructor=t}o(t,n),t.prototype=(r.prototype=n.prototype,new r)}function e(t){t.i||(t.D=new Map,t.i=new Map(t.u))}function i(t){t.i||(t.i=new Set,t.u.forEach((function(n){if(r(n)){var e=z(t.A.l,n,t);t.p.set(n,e),t.i.add(e)}else t.i.add(n)})))}function u(n){n.j&&t(3,JSON.stringify(s(n)))}var o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(t,n)},f=function(){function t(t,n){return this[X]={t:2,h:n,A:n?n.A:_(),M:!1,k:!1,i:void 0,D:void 0,u:t,R:this,$:!1,j:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[X]).size}}),i.has=function(t){return s(this[X]).has(t)},i.set=function(t,n){var r=this[X];return u(r),s(r).get(t)!==n&&(e(r),E(r.A.l,r),r.D.set(t,!0),r.i.set(t,n),r.D.set(t,!0)),this},i.delete=function(t){if(!this.has(t))return!1;var n=this[X];return u(n),e(n),E(n.A.l,n),n.D.set(t,!1),n.i.delete(t),!0},i.clear=function(){var t=this[X];return u(t),e(t),E(t.A.l,t),t.D=new Map,t.i.clear()},i.forEach=function(t,n){var r=this;s(this[X]).forEach((function(e,i){t.call(n,r.get(i),i,r)}))},i.get=function(t){var n=this[X];u(n);var i=s(n).get(t);if(n.k||!r(i))return i;if(i!==n.u.get(t))return i;var o=z(n.A.l,i,n);return e(n),n.i.set(t,o),o},i.keys=function(){return s(this[X]).keys()},i.values=function(){var t,n=this,r=this.keys();return(t={})[q]=function(){return n.values()},t.next=function(){var t=r.next();return t.done?t:{done:!1,value:n.get(t.value)}},t},i.entries=function(){var t,n=this,r=this.keys();return(t={})[q]=function(){return n.entries()},t.next=function(){var t=r.next();if(t.done)return t;var e=n.get(t.value);return{done:!1,value:[t.value,e]}},t},i[q]=function(){return this.entries()},t}(),a=function(){function t(t,n){return this[X]={t:3,h:n,A:n?n.A:_(),M:!1,k:!1,i:void 0,u:t,R:this,p:new Map,j:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[X]).size}}),r.has=function(t){var n=this[X];return u(n),n.i?!!n.i.has(t)||!(!n.p.has(t)||!n.i.has(n.p.get(t))):n.u.has(t)},r.add=function(t){var n=this[X];return u(n),n.i?n.i.add(t):n.u.has(t)||(i(n),E(n.A.l,n),n.i.add(t)),this},r.delete=function(t){if(!this.has(t))return!1;var n=this[X];return u(n),i(n),E(n.A.l,n),n.i.delete(t)||!!n.p.has(t)&&n.i.delete(n.p.get(t))},r.clear=function(){var t=this[X];return u(t),i(t),E(t.A.l,t),t.i.clear()},r.values=function(){var t=this[X];return u(t),i(t),t.i.values()},r.entries=function(){var t=this[X];return u(t),i(t),t.i.entries()},r.keys=function(){return this.values()},r[q]=function(){return this.values()},r.forEach=function(t,n){for(var r=this.values(),e=r.next();!e.done;)t.call(n,e.value,e.value,this),e=r.next()},t}();d("MapSet",{K:function(t,n){return new f(t,n)},N:function(t,n){return new a(t,n)}})}var D;Object.defineProperty(exports,"__esModule",{value:!0});var J,K="undefined"!=typeof Symbol,N="undefined"!=typeof Map,$="undefined"!=typeof Set,C="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,I=K?Symbol("immer-nothing"):((D={})["immer-nothing"]=!0,D),W=K?Symbol("immer-draftable"):"__$immer_draftable",X=K?Symbol("immer-state"):"__$immer_state",q=K?Symbol.iterator:"@@iterator",B="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,G={},H={get:function(t,n){if(n===X)return t;var e=t.p;if(!t.M&&u(e,n))return e[n];var i=s(t)[n];if(t.k||!r(i))return i;if(t.M){if(i!==M(t.u,n))return i;e=t.i}return e[n]=z(t.A.l,i,t)},has:function(t,n){return n in s(t)},ownKeys:function(t){return B(s(t))},set:function(t,n,r){if(!t.M){var e=M(t.u,n);if(r?f(e,r)||r===t.p[n]:f(e,r)&&n in t.u)return!0;A(t),g(t)}return t.D[n]=!0,t.i[n]=r,!0},deleteProperty:function(t,n){return void 0!==M(t.u,n)||n in t.u?(t.D[n]=!1,A(t),g(t)):t.D[n]&&delete t.D[n],t.i&&delete t.i[n],!0},getOwnPropertyDescriptor:function(t,n){var r=s(t),e=Reflect.getOwnPropertyDescriptor(r,n);return e&&(e.writable=!0,e.configurable=1!==t.t||"length"!==n),e},defineProperty:function(){t(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.u)},setPrototypeOf:function(){t(12)}},L={};e(H,(function(t,n){L[t]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}})),L.deleteProperty=function(t,n){return H.deleteProperty.call(this,t[0],n)},L.set=function(t,n,r){return H.set.call(this,t[0],n,r,t[0])};var Q=function(){function e(t){this.S=C,this.J=!1,"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(n,e,i){if("function"==typeof n&&"function"!=typeof e){var u=e;e=n;var o=this;return function(t){var n=this;void 0===t&&(t=u);for(var r=arguments.length,i=Array(r>1?r-1:0),f=1;f<r;f++)i[f-1]=arguments[f];return o.produce(t,(function(t){var r;return(r=e).call.apply(r,[n,t].concat(i))}))}}var f;if("function"!=typeof e&&t(6),void 0!==i&&"function"!=typeof i&&t(7),r(n)){var a=O(this),c=z(this,n,void 0),s=!0;try{f=e(c),s=!1}finally{s?b(a):m(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(t){return y(a,i),x(t,a)}),(function(t){throw b(a),t})):(y(a,i),x(f,a))}if((f=e(n))!==I)return void 0===f&&(f=n),this.J&&p(f,!0),f},i.produceWithPatches=function(t,n){var r,e,i=this;return"function"==typeof t?function(n){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(n,(function(n){return t.apply(void 0,[n].concat(e))}))}:[this.produce(t,n,(function(t,n){r=t,e=n})),r,e]},i.createDraft=function(n){r(n)||t(8);var e=O(this),i=z(this,n,void 0);return i[X].$=!0,m(e),i},i.finishDraft=function(t,n){var r=(t&&t[X]).A;return y(r,n),x(void 0,r)},i.setAutoFreeze=function(t){this.J=t},i.setUseProxies=function(n){C||t(20),this.S=n},i.applyPatches=function(t,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}var u=l("Patches").X;return n(t)?u(t,r):this.produce(t,(function(t){return u(t,r.slice(e+1))}))},e}(),T=new Q,U=T.produce,V=T.produceWithPatches.bind(T),Y=T.setAutoFreeze.bind(T),Z=T.setUseProxies.bind(T),tt=T.applyPatches.bind(T),nt=T.createDraft.bind(T),rt=T.finishDraft.bind(T);exports.Immer=Q,exports.applyPatches=tt,exports.castDraft=function(t){return t},exports.castImmutable=function(t){return t},exports.createDraft=nt,exports.default=U,exports.enableAllPlugins=function(){k(),F(),R()},exports.enableES5=k,exports.enableMapSet=F,exports.enablePatches=R,exports.finishDraft=rt,exports.immerable=W,exports.isDraft=n,exports.isDraftable=r,exports.nothing=I,exports.original=function(t){if(t&&t[X])return t[X].u},exports.produce=U,exports.produceWithPatches=V,exports.setAutoFreeze=Y,exports.setUseProxies=Z;
function t(t){for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;e<n;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function n(t){return!!t&&!!t[X]}function r(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var n=Object.getPrototypeOf(t);return!n||n===Object.prototype}(t)||Array.isArray(t)||!!t[W]||!!t.constructor[W]||a(t)||c(t))}function e(t,n){0===i(t)?B(t).forEach((function(r){return n(r,t[r],t)})):t.forEach((function(r,e){return n(e,r,t)}))}function i(t){var n=t[X];return n?n.t>3?n.t-4:n.t:Array.isArray(t)?1:a(t)?2:c(t)?3:0}function u(t,n){return 2===i(t)?t.has(n):Object.prototype.hasOwnProperty.call(t,n)}function o(t,n){return 2===i(t)?t.get(n):t[n]}function f(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}function a(t){return N&&t instanceof Map}function c(t){return $&&t instanceof Set}function s(t){return t.i||t.u}function v(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var i=Object.create(Object.getPrototypeOf(n));return e(n,(function(e){if(e!==X){var u=Object.getOwnPropertyDescriptor(n,e),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?i[e]=o:Object.defineProperty(i,e,{value:o,writable:!0,configurable:!0})}})),i}function p(t,u){n(t)||Object.isFrozen(t)||!r(t)||(i(t)>1&&(t.set=t.add=t.clear=t.delete=h),Object.freeze(t),u&&e(t,(function(t,n){return p(n,!0)})))}function h(){t(2)}function l(n){var r=G[n];return r||t(19,n),r}function d(t,n){G[t]=n}function _(){return J}function y(t,n){n&&(l("Patches"),t.o=[],t.s=[],t.v=n)}function b(t){m(t),t.p.forEach(j),t.p=null}function m(t){t===J&&(J=t.h)}function O(t){return J={p:[],h:J,l:t,_:!0,m:0}}function j(t){var n=t[X];0===n.t||1===n.t?n.O():n.j=!0}function x(n,e){e.m=e.p.length;var i=e.p[0],u=void 0!==n&&n!==i;return e.l.S||l("ES5").P(e,n,u),u?(i[X].M&&(b(e),t(4)),r(n)&&(n=w(e,n),e.h||P(e,n)),e.o&&l("Patches").g(i[X],n,e.o,e.s)):n=w(e,i,[]),b(e),e.o&&e.v(e.o,e.s),n!==I?n:void 0}function w(t,n,r){if(Object.isFrozen(n))return n;var i=n[X];if(!i)return e(n,(function(e,u){return S(t,i,n,e,u,r)})),n;if(i.A!==t)return n;if(!i.M)return P(t,i.u,!0),i.u;if(!i.k){i.k=!0,i.A.m--;var u=4===i.t||5===i.t?i.i=v(i.R,!0):i.i;e(u,(function(n,e){return S(t,i,u,n,e,r)})),P(t,u,!1),r&&t.o&&l("Patches").F(i,r,t.o,t.s)}return i.i}function S(t,e,a,c,s,v){if(n(s)){var p=w(t,s,v&&e&&3!==e.t&&!u(e.D,c)?v.concat(c):void 0);if(l=c,d=p,2===(_=i(h=a))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!n(p))return;t._=!1}var h,l,d,_;if((!e||!f(s,o(e.u,c)))&&r(s)){if(!t.l.J&&t.m<1)return;w(t,s),e&&e.A.h||P(t,s)}}function P(t,n,r){void 0===r&&(r=!1),t.l.J&&t._&&p(n,r)}function M(t,n){var r=t[X],e=Reflect.getOwnPropertyDescriptor(r?s(r):t,n);return e&&e.value}function g(t){if(!t.M){if(t.M=!0,0===t.t||1===t.t){var n=t.i=v(t.u);e(t.p,(function(t,r){n[t]=r})),t.p=void 0}t.h&&g(t.h)}}function A(t){t.i||(t.i=v(t.u))}function z(t,n,r){var e=a(n)?l("MapSet").K(n,r):c(n)?l("MapSet").N(n,r):t.S?function(t,n){var r=Array.isArray(t),e={t:r?1:0,A:n?n.A:_(),M:!1,k:!1,D:{},h:n,u:t,R:null,p:{},i:null,O:null,$:!1},i=e,u=H;r&&(i=[e],u=L);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.R=a,e.O=f,a}(n,r):l("ES5").C(n,r);return(r?r.A:_()).p.push(e),e}function E(t,n){t.S?g(n):l("ES5").I(n)}function k(){function i(t,n){var r=t[X];if(r&&!r.W){r.W=!0;var e=t[n];return r.W=!1,e}return t[n]}function o(t){t.M||(t.M=!0,t.h&&o(t.h))}function a(t){t.i||(t.i=c(t.u))}function c(t){var n=t&&t[X];if(n){n.W=!0;var r=v(n.R,!0);return n.W=!1,r}return v(t)}function p(t){for(var n=t.length-1;n>=0;n--){var r=t[n][X];if(!r.M)switch(r.t){case 5:l(r)&&o(r);break;case 4:h(r)&&o(r)}}}function h(t){for(var n=t.u,r=t.R,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=n[o];if(void 0===a&&!u(n,o))return!0;var c=r[o],s=c&&c[X];if(s?s.u!==a:!f(c,a))return!0}return e.length!==Object.keys(n).length}function l(t){var n=t.R;if(n.length!==t.u.length)return!0;var r=Object.getOwnPropertyDescriptor(n,n.length-1);return!(!r||r.get)}function y(n){n.j&&t(3,JSON.stringify(s(n)))}var b={};d("ES5",{C:function(t,n){var u=Array.isArray(t),v=c(t);e(v,(function(n){!function(t,n,e){var u=b[n];u?u.enumerable=e:b[n]=u={enumerable:e,get:function(){return function(t,n){y(t);var e=i(s(t),n);return t.W?e:e===i(t.u,n)&&r(e)?(a(t),t.i[n]=z(t.A.l,e,t)):e}(this[X],n)},set:function(t){!function(t,n,r){if(y(t),t.D[n]=!0,!t.M){if(f(r,i(s(t),n)))return;o(t),a(t)}t.i[n]=r}(this[X],n,t)}},Object.defineProperty(t,n,u)}(v,n,u||function(t,n){var r=Object.getOwnPropertyDescriptor(t,n);return!(!r||!r.enumerable)}(t,n))}));var p={t:u?5:4,A:n?n.A:_(),M:!1,W:!1,k:!1,D:{},h:n,u:t,R:v,i:null,j:!1,$:!1};return Object.defineProperty(v,X,{value:p,writable:!0}),v},I:o,P:function(t,r,i){t.p.forEach((function(t){t[X].W=!0})),i?n(r)&&r[X].A===t&&p(t.p):(t.o&&function t(n){if(n&&"object"==typeof n){var r=n[X];if(r){var i=r.u,f=r.R,a=r.D,c=r.t;if(4===c)e(f,(function(n){n!==X&&(void 0!==i[n]||u(i,n)?a[n]||t(f[n]):(a[n]=!0,o(r)))})),e(i,(function(t){void 0!==f[t]||u(f,t)||(a[t]=!1,o(r))}));else if(5===c){if(l(r)&&(o(r),a.length=!0),f.length<i.length)for(var s=f.length;s<i.length;s++)a[s]=!1;else for(var v=i.length;v<f.length;v++)a[v]=!0;for(var p=Math.min(f.length,i.length),h=0;h<p;h++)void 0===a[h]&&t(f[h])}}}}(t.p[0]),p(t.p))}})}function R(){function n(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(n);if(a(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],n(t[1])]})));if(c(t))return new Set(Array.from(t).map(n));var r=Object.create(Object.getPrototypeOf(t));for(var e in t)r[e]=n(t[e]);return r}var r="add";d("Patches",{X:function(e,u){return u.forEach((function(u){for(var f=u.path,a=u.op,c=e,s=0;s<f.length-1;s++)"object"!=typeof(c=o(c,f[s]))&&t(15,f.join("/"));var v=i(c),p=n(u.value),h=f[f.length-1];switch(a){case"replace":switch(v){case 2:return c.set(h,p);case 3:t(16);default:return c[h]=p}case r:switch(v){case 1:return c.splice(h,0,p);case 2:return c.set(h,p);case 3:return c.add(p);default:return c[h]=p}case"remove":switch(v){case 1:return c.splice(h,1);case 2:return c.delete(h);case 3:return c.delete(u.value);default:return delete c[h]}default:t(17,a)}})),e},F:function(t,n,i,f){switch(t.t){case 0:case 4:case 2:return function(t,n,i,f){var a=t.u,c=t.i;e(t.D,(function(t,e){var s=o(a,t),v=o(c,t),p=e?u(a,t)?"replace":r:"remove";if(s!==v||"replace"!==p){var h=n.concat(t);i.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:v}),f.push(p===r?{op:"remove",path:h}:"remove"===p?{op:r,path:h,value:s}:{op:"replace",path:h,value:s})}}))}(t,n,i,f);case 5:case 1:return function(t,n,e,i){var u=t.u,o=t.D,f=t.i;if(f.length<u.length){var a=[f,u];u=a[0],f=a[1];var c=[i,e];e=c[0],i=c[1]}for(var s=f.length-u.length,v=0;u[v]===f[v]&&v<u.length;)++v;for(var p=u.length;p>v&&u[p-1]===f[p+s-1];)--p;for(var h=v;h<p;++h)if(o[h]&&f[h]!==u[h]){var l=n.concat([h]);e.push({op:"replace",path:l,value:f[h]}),i.push({op:"replace",path:l,value:u[h]})}for(var d=e.length,_=p+s-1;_>=p;--_){var y=n.concat([_]);e[d+_-p]={op:r,path:y,value:f[_]},i.push({op:"remove",path:y})}}(t,n,i,f);case 3:return function(t,n,e,i){var u=t.u,o=t.i,f=0;u.forEach((function(t){if(!o.has(t)){var u=n.concat([f]);e.push({op:"remove",path:u,value:t}),i.unshift({op:r,path:u,value:t})}f++})),f=0,o.forEach((function(t){if(!u.has(t)){var o=n.concat([f]);e.push({op:r,path:o,value:t}),i.unshift({op:"remove",path:o,value:t})}f++}))}(t,n,i,f)}},g:function(t,n,r,e){r.push({op:"replace",path:[],value:n}),e.push({op:"replace",path:[],value:t.u})}})}function F(){function n(t,n){function r(){this.constructor=t}o(t,n),t.prototype=(r.prototype=n.prototype,new r)}function e(t){t.i||(t.D=new Map,t.i=new Map(t.u))}function i(t){t.i||(t.i=new Set,t.u.forEach((function(n){if(r(n)){var e=z(t.A.l,n,t);t.p.set(n,e),t.i.add(e)}else t.i.add(n)})))}function u(n){n.j&&t(3,JSON.stringify(s(n)))}var o=function(t,n){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])})(t,n)},f=function(){function t(t,n){return this[X]={t:2,h:n,A:n?n.A:_(),M:!1,k:!1,i:void 0,D:void 0,u:t,R:this,$:!1,j:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[X]).size}}),i.has=function(t){return s(this[X]).has(t)},i.set=function(t,n){var r=this[X];return u(r),s(r).get(t)!==n&&(e(r),E(r.A.l,r),r.D.set(t,!0),r.i.set(t,n),r.D.set(t,!0)),this},i.delete=function(t){if(!this.has(t))return!1;var n=this[X];return u(n),e(n),E(n.A.l,n),n.D.set(t,!1),n.i.delete(t),!0},i.clear=function(){var t=this[X];return u(t),e(t),E(t.A.l,t),t.D=new Map,t.i.clear()},i.forEach=function(t,n){var r=this;s(this[X]).forEach((function(e,i){t.call(n,r.get(i),i,r)}))},i.get=function(t){var n=this[X];u(n);var i=s(n).get(t);if(n.k||!r(i))return i;if(i!==n.u.get(t))return i;var o=z(n.A.l,i,n);return e(n),n.i.set(t,o),o},i.keys=function(){return s(this[X]).keys()},i.values=function(){var t,n=this,r=this.keys();return(t={})[q]=function(){return n.values()},t.next=function(){var t=r.next();return t.done?t:{done:!1,value:n.get(t.value)}},t},i.entries=function(){var t,n=this,r=this.keys();return(t={})[q]=function(){return n.entries()},t.next=function(){var t=r.next();if(t.done)return t;var e=n.get(t.value);return{done:!1,value:[t.value,e]}},t},i[q]=function(){return this.entries()},t}(),a=function(){function t(t,n){return this[X]={t:3,h:n,A:n?n.A:_(),M:!1,k:!1,i:void 0,u:t,R:this,p:new Map,j:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[X]).size}}),r.has=function(t){var n=this[X];return u(n),n.i?!!n.i.has(t)||!(!n.p.has(t)||!n.i.has(n.p.get(t))):n.u.has(t)},r.add=function(t){var n=this[X];return u(n),n.i?n.i.add(t):n.u.has(t)||(i(n),E(n.A.l,n),n.i.add(t)),this},r.delete=function(t){if(!this.has(t))return!1;var n=this[X];return u(n),i(n),E(n.A.l,n),n.i.delete(t)||!!n.p.has(t)&&n.i.delete(n.p.get(t))},r.clear=function(){var t=this[X];return u(t),i(t),E(t.A.l,t),t.i.clear()},r.values=function(){var t=this[X];return u(t),i(t),t.i.values()},r.entries=function(){var t=this[X];return u(t),i(t),t.i.entries()},r.keys=function(){return this.values()},r[q]=function(){return this.values()},r.forEach=function(t,n){for(var r=this.values(),e=r.next();!e.done;)t.call(n,e.value,e.value,this),e=r.next()},t}();d("MapSet",{K:function(t,n){return new f(t,n)},N:function(t,n){return new a(t,n)}})}var D;Object.defineProperty(exports,"__esModule",{value:!0});var J,K="undefined"!=typeof Symbol,N="undefined"!=typeof Map,$="undefined"!=typeof Set,C="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,I=K?Symbol("immer-nothing"):((D={})["immer-nothing"]=!0,D),W=K?Symbol("immer-draftable"):"__$immer_draftable",X=K?Symbol("immer-state"):"__$immer_state",q=K?Symbol.iterator:"@@iterator",B="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames||Object.keys,G={},H={get:function(t,n){if(n===X)return t;var e=t.p;if(!t.M&&u(e,n))return e[n];var i=s(t)[n];if(t.k||!r(i))return i;if(t.M){if(i!==M(t.u,n))return i;e=t.i}return e[n]=z(t.A.l,i,t)},has:function(t,n){return n in s(t)},ownKeys:function(t){return B(s(t))},set:function(t,n,r){if(!t.M){var e=M(t.u,n);if(r?f(e,r)||r===t.p[n]:f(e,r)&&n in t.u)return!0;A(t),g(t)}return t.D[n]=!0,t.i[n]=r,!0},deleteProperty:function(t,n){return void 0!==M(t.u,n)||n in t.u?(t.D[n]=!1,A(t),g(t)):t.D[n]&&delete t.D[n],t.i&&delete t.i[n],!0},getOwnPropertyDescriptor:function(t,n){var r=s(t),e=Reflect.getOwnPropertyDescriptor(r,n);return e&&(e.writable=!0,e.configurable=1!==t.t||"length"!==n),e},defineProperty:function(){t(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.u)},setPrototypeOf:function(){t(12)}},L={};e(H,(function(t,n){L[t]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}})),L.deleteProperty=function(t,n){return H.deleteProperty.call(this,t[0],n)},L.set=function(t,n,r){return H.set.call(this,t[0],n,r,t[0])};var Q=function(){function e(t){this.S=C,this.J=!1,"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(n,e,i){if("function"==typeof n&&"function"!=typeof e){var u=e;e=n;var o=this;return function(t){var n=this;void 0===t&&(t=u);for(var r=arguments.length,i=Array(r>1?r-1:0),f=1;f<r;f++)i[f-1]=arguments[f];return o.produce(t,(function(t){var r;return(r=e).call.apply(r,[n,t].concat(i))}))}}var f;if("function"!=typeof e&&t(6),void 0!==i&&"function"!=typeof i&&t(7),r(n)){var a=O(this),c=z(this,n,void 0),s=!0;try{f=e(c),s=!1}finally{s?b(a):m(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(t){return y(a,i),x(t,a)}),(function(t){throw b(a),t})):(y(a,i),x(f,a))}if((f=e(n))!==I)return void 0===f&&(f=n),this.J&&p(f,!0),f},i.produceWithPatches=function(t,n){var r,e,i=this;return"function"==typeof t?function(n){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(n,(function(n){return t.apply(void 0,[n].concat(e))}))}:[this.produce(t,n,(function(t,n){r=t,e=n})),r,e]},i.createDraft=function(n){r(n)||t(8);var e=O(this),i=z(this,n,void 0);return i[X].$=!0,m(e),i},i.finishDraft=function(t,n){var r=(t&&t[X]).A;return y(r,n),x(void 0,r)},i.setAutoFreeze=function(t){this.J=t},i.setUseProxies=function(n){C||t(20),this.S=n},i.applyPatches=function(t,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){t=i.value;break}}var u=l("Patches").X;return n(t)?u(t,r):this.produce(t,(function(t){return u(t,r.slice(e+1))}))},e}(),T=new Q,U=T.produce,V=T.produceWithPatches.bind(T),Y=T.setAutoFreeze.bind(T),Z=T.setUseProxies.bind(T),tt=T.applyPatches.bind(T),nt=T.createDraft.bind(T),rt=T.finishDraft.bind(T);exports.Immer=Q,exports.applyPatches=tt,exports.castDraft=function(t){return t},exports.castImmutable=function(t){return t},exports.createDraft=nt,exports.default=U,exports.enableAllPlugins=function(){k(),F(),R()},exports.enableES5=k,exports.enableMapSet=F,exports.enablePatches=R,exports.finishDraft=rt,exports.immerable=W,exports.isDraft=n,exports.isDraftable=r,exports.nothing=I,exports.original=function(t){if(t&&t[X])return t[X].u},exports.produce=U,exports.produceWithPatches=V,exports.setAutoFreeze=Y,exports.setUseProxies=Z;
//# sourceMappingURL=immer.cjs.production.min.js.map

@@ -1,2 +0,2 @@

function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=H[n],o=i?"function"==typeof i?i.apply(null,r):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(n){return!!n&&!!n[B]}function r(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[q]||!!n.constructor[q]||c(n)||s(n))}function e(n){if(n&&n[B])return n[B].t}function i(n,t){0===o(n)?L(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function o(n){var t=n[B];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:c(n)?2:s(n)?3:0}function u(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return $&&n instanceof Map}function s(n){return U&&n instanceof Set}function v(n){return n.o||n.t}function p(t,r){if(void 0===r&&(r=!1),Array.isArray(t))return t.slice();var e=Object.create(Object.getPrototypeOf(t));return i(t,(function(i){if(i!==B){var o=Object.getOwnPropertyDescriptor(t,i),u=o.value;o.get&&(r||n(1),u=o.get.call(t)),o.enumerable?e[i]=u:Object.defineProperty(e,i,{value:u,writable:!0,configurable:!0})}})),e}function d(n,e){t(n)||Object.isFrozen(n)||!r(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,t){return d(t,!0)})))}function h(){n(2)}function l(t){var r=Q[t];return r||n("production"!==process.env.NODE_ENV?18:19,t),r}function y(n,t){Q[n]=t}function m(){return"production"===process.env.NODE_ENV||J||n(0),J}function b(n,t){t&&(l("Patches"),n.u=[],n.s=[],n.v=t)}function _(n){j(n),n.p.forEach(g),n.p=null}function j(n){n===J&&(J=n.h)}function O(n){return J={p:[],h:J,l:n,m:!0,_:0}}function g(n){var t=n[B];0===t.i||1===t.i?t.j():t.O=!0}function w(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.l.g||l("ES5").S(e,t,o),o?(i[B].P&&(_(e),n(4)),r(t)&&(t=S(e,t),e.h||M(e,t)),e.u&&l("Patches").M(i[B],t,e.u,e.s)):t=S(e,i,[]),_(e),e.u&&e.v(e.u,e.s),t!==X?t:void 0}function S(n,t,r){if(Object.isFrozen(t))return t;var e=t[B];if(!e)return i(t,(function(i,o){return P(n,e,t,i,o,r)})),t;if(e.A!==n)return t;if(!e.P)return M(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=p(e.k,!0):e.o;i(o,(function(t,i){return P(n,e,o,t,i,r)})),M(n,o,!1),r&&n.u&&l("Patches").R(e,r,n.u,n.s)}return e.o}function P(e,i,c,s,v,p){if("production"!==process.env.NODE_ENV&&v===c&&n(5),t(v)){var d=S(e,v,p&&i&&3!==i.i&&!u(i.D,s)?p.concat(s):void 0);if(l=s,y=d,2===(m=o(h=c))?h.set(l,y):3===m?(h.delete(l),h.add(y)):h[l]=y,!t(d))return;e.m=!1}var h,l,y,m;if((!i||!f(v,a(i.t,s)))&&r(v)){if(!e.l.N&&e._<1)return;S(e,v),i&&i.A.h||M(e,v)}}function M(n,t,r){void 0===r&&(r=!1),n.l.N&&n.m&&d(t,r)}function A(n,t){var r=n[B],e=Reflect.getOwnPropertyDescriptor(r?v(r):n,t);return e&&e.value}function z(n){if(!n.P){if(n.P=!0,0===n.i||1===n.i){var t=n.o=p(n.t);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.h&&z(n.h)}}function x(n){n.o||(n.o=p(n.t))}function I(n,t,r){var e=c(t)?l("MapSet").T(t,r):s(t)?l("MapSet").F(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:m(),P:!1,I:!1,D:{},h:t,t:n,k:null,p:{},o:null,j:null,C:!1},i=e,o=V;r&&(i=[e],o=Y);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):l("ES5").J(t,r);return(r?r.A:m()).p.push(e),e}function E(n,t){n.g?z(t):l("ES5").K(t)}function k(){function e(n,t){var r=n[B];if(r&&!r.$){r.$=!0;var e=n[t];return r.$=!1,e}return n[t]}function o(n){n.P||(n.P=!0,n.h&&o(n.h))}function a(n){n.o||(n.o=c(n.t))}function c(n){var t=n&&n[B];if(t){t.$=!0;var r=p(t.k,!0);return t.$=!1,r}return p(n)}function s(n){for(var t=n.length-1;t>=0;t--){var r=n[t][B];if(!r.P)switch(r.i){case 5:h(r)&&o(r);break;case 4:d(r)&&o(r)}}}function d(n){for(var t=n.t,r=n.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=t[o];if(void 0===a&&!u(t,o))return!0;var c=r[o],s=c&&c[B];if(s?s.t!==a:!f(c,a))return!0}return e.length!==Object.keys(t).length}function h(n){var t=n.k;if(t.length!==n.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function l(t){t.O&&n(3,JSON.stringify(v(t)))}var b={};y("ES5",{J:function(n,t){var u=Array.isArray(n),s=c(n);i(s,(function(t){!function(n,t,i){var u=b[t];u?u.enumerable=i:b[t]=u={enumerable:i,get:function(){return function(n,t){l(n);var i=e(v(n),t);return n.$?i:i===e(n.t,t)&&r(i)?(a(n),n.o[t]=I(n.A.l,i,n)):i}(this[B],t)},set:function(n){!function(n,t,r){if(l(n),n.D[t]=!0,!n.P){if(f(r,e(v(n),t)))return;o(n),a(n)}n.o[t]=r}(this[B],t,n)}},Object.defineProperty(n,t,u)}(s,t,u||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(n,t))}));var p={i:u?5:4,A:t?t.A:m(),P:!1,$:!1,I:!1,D:{},h:t,t:n,k:s,o:null,O:!1,C:!1};return Object.defineProperty(s,B,{value:p,writable:!0}),s},K:o,S:function(n,r,e){n.p.forEach((function(n){n[B].$=!0})),e?t(r)&&r[B].A===n&&s(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[B];if(r){var e=r.t,a=r.k,f=r.D,c=r.i;if(4===c)i(a,(function(t){t!==B&&(void 0!==e[t]||u(e,t)?f[t]||n(a[t]):(f[t]=!0,o(r)))})),i(e,(function(n){void 0!==a[n]||u(a,n)||(f[n]=!1,o(r))}));else if(5===c){if(h(r)&&(o(r),f.length=!0),a.length<e.length)for(var s=a.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<a.length;v++)f[v]=!0;for(var p=Math.min(a.length,e.length),d=0;d<p;d++)void 0===f[d]&&n(a[d])}}}}(n.p[0]),s(n.p))}})}function R(){function t(n){if(!n||"object"!=typeof n)return n;if(Array.isArray(n))return n.map(t);if(c(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],t(n[1])]})));if(s(n))return new Set(Array.from(n).map(t));var r=Object.create(Object.getPrototypeOf(n));for(var e in n)r[e]=t(n[e]);return r}var r="add";y("Patches",{U:function(e,i){return i.forEach((function(i){for(var u=i.path,f=i.op,c=e,s=0;s<u.length-1;s++)"object"!=typeof(c=a(c,u[s]))&&n(15,u.join("/"));var v=o(c),p=t(i.value),d=u[u.length-1];switch(f){case"replace":switch(v){case 2:return c.set(d,p);case 3:n(16);default:return c[d]=p}case r:switch(v){case 1:return c.splice(d,0,p);case 2:return c.set(d,p);case 3:return c.add(p);default:return c[d]=p}case"remove":switch(v){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(i.value);default:return delete c[d]}default:n(17,f)}})),e},R:function(n,t,e,o){switch(n.i){case 0:case 4:case 2:return function(n,t,e,o){var f=n.t,c=n.o;i(n.D,(function(n,i){var s=a(f,n),v=a(c,n),p=i?u(f,n)?"replace":r:"remove";if(s!==v||"replace"!==p){var d=t.concat(n);e.push("remove"===p?{op:p,path:d}:{op:p,path:d,value:v}),o.push(p===r?{op:"remove",path:d}:"remove"===p?{op:r,path:d,value:s}:{op:"replace",path:d,value:s})}}))}(n,t,e,o);case 5:case 1:return function(n,t,e,i){var o=n.t,u=n.D,a=n.o;if(a.length<o.length){var f=[a,o];o=f[0],a=f[1];var c=[i,e];e=c[0],i=c[1]}for(var s=a.length-o.length,v=0;o[v]===a[v]&&v<o.length;)++v;for(var p=o.length;p>v&&o[p-1]===a[p+s-1];)--p;for(var d=v;d<p;++d)if(u[d]&&a[d]!==o[d]){var h=t.concat([d]);e.push({op:"replace",path:h,value:a[d]}),i.push({op:"replace",path:h,value:o[d]})}for(var l=e.length,y=p+s-1;y>=p;--y){var m=t.concat([y]);e[l+y-p]={op:r,path:m,value:a[y]},i.push({op:"remove",path:m})}}(n,t,e,o);case 3:return function(n,t,e,i){var o=n.t,u=n.o,a=0;o.forEach((function(n){if(!u.has(n)){var o=t.concat([a]);e.push({op:"remove",path:o,value:n}),i.unshift({op:r,path:o,value:n})}a++})),a=0,u.forEach((function(n){if(!o.has(n)){var u=t.concat([a]);e.push({op:r,path:u,value:n}),i.unshift({op:"remove",path:u,value:n})}a++}))}(n,t,e,o)}},M:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.t})}})}function D(){function t(n,t){function r(){this.constructor=n}u(n,t),n.prototype=(r.prototype=t.prototype,new r)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function i(n){n.o||(n.o=new Set,n.t.forEach((function(t){if(r(t)){var e=I(n.A.l,t,n);n.p.set(t,e),n.o.add(e)}else n.o.add(t)})))}function o(t){t.O&&n(3,JSON.stringify(v(t)))}var u=function(n,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},a=function(){function n(n,t){return this[B]={i:2,h:t,A:t?t.A:m(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}t(n,Map);var i=n.prototype;return Object.defineProperty(i,"size",{get:function(){return v(this[B]).size}}),i.has=function(n){return v(this[B]).has(n)},i.set=function(n,t){var r=this[B];return o(r),v(r).get(n)!==t&&(e(r),E(r.A.l,r),r.D.set(n,!0),r.o.set(n,t),r.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[B];return o(t),e(t),E(t.A.l,t),t.D.set(n,!1),t.o.delete(n),!0},i.clear=function(){var n=this[B];return o(n),e(n),E(n.A.l,n),n.D=new Map,n.o.clear()},i.forEach=function(n,t){var r=this;v(this[B]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[B];o(t);var i=v(t).get(n);if(t.I||!r(i))return i;if(i!==t.t.get(n))return i;var u=I(t.A.l,i,t);return e(t),t.o.set(n,u),u},i.keys=function(){return v(this[B]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[G]=function(){return this.entries()},n}(),f=function(){function n(n,t){return this[B]={i:3,h:t,A:t?t.A:m(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[B]).size}}),r.has=function(n){var t=this[B];return o(t),t.o?!!t.o.has(n)||!(!t.p.has(n)||!t.o.has(t.p.get(n))):t.t.has(n)},r.add=function(n){var t=this[B];return o(t),t.o?t.o.add(n):t.t.has(n)||(i(t),E(t.A.l,t),t.o.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[B];return o(t),i(t),E(t.A.l,t),t.o.delete(n)||!!t.p.has(n)&&t.o.delete(t.p.get(n))},r.clear=function(){var n=this[B];return o(n),i(n),E(n.A.l,n),n.o.clear()},r.values=function(){var n=this[B];return o(n),i(n),n.o.values()},r.entries=function(){var n=this[B];return o(n),i(n),n.o.entries()},r.keys=function(){return this.values()},r[G]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},n}();y("MapSet",{T:function(n,t){return new a(n,t)},F:function(n,t){return new f(n,t)}})}function N(){k(),D(),R()}function T(n){return n}function F(n){return n}var C,J,K="undefined"!=typeof Symbol,$="undefined"!=typeof Map,U="undefined"!=typeof Set,W="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,X=K?Symbol("immer-nothing"):((C={})["immer-nothing"]=!0,C),q=K?Symbol("immer-draftable"):"__$immer_draftable",B=K?Symbol("immer-state"):"__$immer_state",G=K?Symbol.iterator:"@@iterator",H={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},19:"plugin not loaded",20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available"},L="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,Q={},V={get:function(n,t){if(t===B)return n;var e=n.p;if(!n.P&&u(e,t))return e[t];var i=v(n)[t];if(n.I||!r(i))return i;if(n.P){if(i!==A(n.t,t))return i;e=n.o}return e[t]=I(n.A.l,i,n)},has:function(n,t){return t in v(n)},ownKeys:function(n){return L(v(n))},set:function(n,t,r){if(!n.P){var e=A(n.t,t);if(r?f(e,r)||r===n.p[t]:f(e,r)&&t in n.t)return!0;x(n),z(n)}return n.D[t]=!0,n.o[t]=r,!0},deleteProperty:function(n,t){return void 0!==A(n.t,t)||t in n.t?(n.D[t]=!1,x(n),z(n)):n.D[t]&&delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=v(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.i||"length"!==t),e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},Y={};i(V,(function(n,t){Y[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Y.deleteProperty=function(t,r){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(r))&&n(13),V.deleteProperty.call(this,t[0],r)},Y.set=function(t,r,e){return"production"!==process.env.NODE_ENV&&"length"!==r&&isNaN(parseInt(r))&&n(14),V.set.call(this,t[0],r,e,t[0])};var Z=function(){function e(n){this.g=W,this.N="production"!==process.env.NODE_ENV,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(t,e,i){if("function"==typeof t&&"function"!=typeof e){var o=e;e=t;var u=this;return function(n){var t=this;void 0===n&&(n=o);for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return u.produce(n,(function(n){var r;return(r=e).call.apply(r,[t,n].concat(i))}))}}var a;if("function"!=typeof e&&n(6),void 0!==i&&"function"!=typeof i&&n(7),r(t)){var f=O(this),c=I(this,t,void 0),s=!0;try{a=e(c),s=!1}finally{s?_(f):j(f)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(n){return b(f,i),w(n,f)}),(function(n){throw _(f),n})):(b(f,i),w(a,f))}if((a=e(t))!==X)return void 0===a&&(a=t),this.N&&d(a,!0),a},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(t){r(t)||n(8);var e=O(this),i=I(this,t,void 0);return i[B].C=!0,j(e),i},i.finishDraft=function(t,r){var e=t&&t[B];"production"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return b(i,r),w(void 0,i)},i.setAutoFreeze=function(n){this.N=n},i.setUseProxies=function(t){W||n(20),this.g=t},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=l("Patches").U;return t(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),nn=new Z,tn=nn.produce,rn=nn.produceWithPatches.bind(nn),en=nn.setAutoFreeze.bind(nn),on=nn.setUseProxies.bind(nn),un=nn.applyPatches.bind(nn),an=nn.createDraft.bind(nn),fn=nn.finishDraft.bind(nn);export default tn;export{Z as Immer,un as applyPatches,T as castDraft,F as castImmutable,an as createDraft,N as enableAllPlugins,k as enableES5,D as enableMapSet,R as enablePatches,fn as finishDraft,q as immerable,t as isDraft,r as isDraftable,X as nothing,e as original,tn as produce,rn as produceWithPatches,en as setAutoFreeze,on as setUseProxies};
function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];if("production"!==process.env.NODE_ENV){var i=H[n],o=i?"function"==typeof i?i.apply(null,r):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(n){return!!n&&!!n[B]}function r(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[q]||!!n.constructor[q]||c(n)||s(n))}function e(n){if(n&&n[B])return n[B].t}function i(n,t){0===o(n)?L(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function o(n){var t=n[B];return t?t.i>3?t.i-4:t.i:Array.isArray(n)?1:c(n)?2:s(n)?3:0}function u(n,t){return 2===o(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function a(n,t){return 2===o(n)?n.get(t):n[t]}function f(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return $&&n instanceof Map}function s(n){return U&&n instanceof Set}function v(n){return n.o||n.t}function p(t,r){if(void 0===r&&(r=!1),Array.isArray(t))return t.slice();var e=Object.create(Object.getPrototypeOf(t));return i(t,(function(i){if(i!==B){var o=Object.getOwnPropertyDescriptor(t,i),u=o.value;o.get&&(r||n(1),u=o.get.call(t)),o.enumerable?e[i]=u:Object.defineProperty(e,i,{value:u,writable:!0,configurable:!0})}})),e}function d(n,e){t(n)||Object.isFrozen(n)||!r(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,t){return d(t,!0)})))}function h(){n(2)}function l(t){var r=Q[t];return r||n("production"!==process.env.NODE_ENV?18:19,t),r}function y(n,t){Q[n]=t}function b(){return"production"===process.env.NODE_ENV||J||n(0),J}function m(n,t){t&&(l("Patches"),n.u=[],n.s=[],n.v=t)}function _(n){j(n),n.p.forEach(g),n.p=null}function j(n){n===J&&(J=n.h)}function O(n){return J={p:[],h:J,l:n,m:!0,_:0}}function g(n){var t=n[B];0===t.i||1===t.i?t.j():t.O=!0}function w(t,e){e._=e.p.length;var i=e.p[0],o=void 0!==t&&t!==i;return e.l.g||l("ES5").S(e,t,o),o?(i[B].P&&(_(e),n(4)),r(t)&&(t=S(e,t),e.h||M(e,t)),e.u&&l("Patches").M(i[B],t,e.u,e.s)):t=S(e,i,[]),_(e),e.u&&e.v(e.u,e.s),t!==X?t:void 0}function S(n,t,r){if(Object.isFrozen(t))return t;var e=t[B];if(!e)return i(t,(function(i,o){return P(n,e,t,i,o,r)})),t;if(e.A!==n)return t;if(!e.P)return M(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=p(e.k,!0):e.o;i(o,(function(t,i){return P(n,e,o,t,i,r)})),M(n,o,!1),r&&n.u&&l("Patches").R(e,r,n.u,n.s)}return e.o}function P(e,i,c,s,v,p){if("production"!==process.env.NODE_ENV&&v===c&&n(5),t(v)){var d=S(e,v,p&&i&&3!==i.i&&!u(i.D,s)?p.concat(s):void 0);if(l=s,y=d,2===(b=o(h=c))?h.set(l,y):3===b?(h.delete(l),h.add(y)):h[l]=y,!t(d))return;e.m=!1}var h,l,y,b;if((!i||!f(v,a(i.t,s)))&&r(v)){if(!e.l.N&&e._<1)return;S(e,v),i&&i.A.h||M(e,v)}}function M(n,t,r){void 0===r&&(r=!1),n.l.N&&n.m&&d(t,r)}function A(n,t){var r=n[B],e=Reflect.getOwnPropertyDescriptor(r?v(r):n,t);return e&&e.value}function z(n){if(!n.P){if(n.P=!0,0===n.i||1===n.i){var t=n.o=p(n.t);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.h&&z(n.h)}}function x(n){n.o||(n.o=p(n.t))}function I(n,t,r){var e=c(t)?l("MapSet").T(t,r):s(t)?l("MapSet").F(t,r):n.g?function(n,t){var r=Array.isArray(n),e={i:r?1:0,A:t?t.A:b(),P:!1,I:!1,D:{},h:t,t:n,k:null,p:{},o:null,j:null,C:!1},i=e,o=V;r&&(i=[e],o=Y);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(t,r):l("ES5").J(t,r);return(r?r.A:b()).p.push(e),e}function E(n,t){n.g?z(t):l("ES5").K(t)}function k(){function e(n,t){var r=n[B];if(r&&!r.$){r.$=!0;var e=n[t];return r.$=!1,e}return n[t]}function o(n){n.P||(n.P=!0,n.h&&o(n.h))}function a(n){n.o||(n.o=c(n.t))}function c(n){var t=n&&n[B];if(t){t.$=!0;var r=p(t.k,!0);return t.$=!1,r}return p(n)}function s(n){for(var t=n.length-1;t>=0;t--){var r=n[t][B];if(!r.P)switch(r.i){case 5:h(r)&&o(r);break;case 4:d(r)&&o(r)}}}function d(n){for(var t=n.t,r=n.k,e=Object.keys(r),i=e.length-1;i>=0;i--){var o=e[i],a=t[o];if(void 0===a&&!u(t,o))return!0;var c=r[o],s=c&&c[B];if(s?s.t!==a:!f(c,a))return!0}return e.length!==Object.keys(t).length}function h(n){var t=n.k;if(t.length!==n.t.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function l(t){t.O&&n(3,JSON.stringify(v(t)))}var m={};y("ES5",{J:function(n,t){var u=Array.isArray(n),s=c(n);i(s,(function(t){!function(n,t,i){var u=m[t];u?u.enumerable=i:m[t]=u={enumerable:i,get:function(){return function(n,t){l(n);var i=e(v(n),t);return n.$?i:i===e(n.t,t)&&r(i)?(a(n),n.o[t]=I(n.A.l,i,n)):i}(this[B],t)},set:function(n){!function(n,t,r){if(l(n),n.D[t]=!0,!n.P){if(f(r,e(v(n),t)))return;o(n),a(n)}n.o[t]=r}(this[B],t,n)}},Object.defineProperty(n,t,u)}(s,t,u||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(n,t))}));var p={i:u?5:4,A:t?t.A:b(),P:!1,$:!1,I:!1,D:{},h:t,t:n,k:s,o:null,O:!1,C:!1};return Object.defineProperty(s,B,{value:p,writable:!0}),s},K:o,S:function(n,r,e){n.p.forEach((function(n){n[B].$=!0})),e?t(r)&&r[B].A===n&&s(n.p):(n.u&&function n(t){if(t&&"object"==typeof t){var r=t[B];if(r){var e=r.t,a=r.k,f=r.D,c=r.i;if(4===c)i(a,(function(t){t!==B&&(void 0!==e[t]||u(e,t)?f[t]||n(a[t]):(f[t]=!0,o(r)))})),i(e,(function(n){void 0!==a[n]||u(a,n)||(f[n]=!1,o(r))}));else if(5===c){if(h(r)&&(o(r),f.length=!0),a.length<e.length)for(var s=a.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<a.length;v++)f[v]=!0;for(var p=Math.min(a.length,e.length),d=0;d<p;d++)void 0===f[d]&&n(a[d])}}}}(n.p[0]),s(n.p))}})}function R(){function t(n){if(!n||"object"!=typeof n)return n;if(Array.isArray(n))return n.map(t);if(c(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],t(n[1])]})));if(s(n))return new Set(Array.from(n).map(t));var r=Object.create(Object.getPrototypeOf(n));for(var e in n)r[e]=t(n[e]);return r}var r="add";y("Patches",{U:function(e,i){return i.forEach((function(i){for(var u=i.path,f=i.op,c=e,s=0;s<u.length-1;s++)"object"!=typeof(c=a(c,u[s]))&&n(15,u.join("/"));var v=o(c),p=t(i.value),d=u[u.length-1];switch(f){case"replace":switch(v){case 2:return c.set(d,p);case 3:n(16);default:return c[d]=p}case r:switch(v){case 1:return c.splice(d,0,p);case 2:return c.set(d,p);case 3:return c.add(p);default:return c[d]=p}case"remove":switch(v){case 1:return c.splice(d,1);case 2:return c.delete(d);case 3:return c.delete(i.value);default:return delete c[d]}default:n(17,f)}})),e},R:function(n,t,e,o){switch(n.i){case 0:case 4:case 2:return function(n,t,e,o){var f=n.t,c=n.o;i(n.D,(function(n,i){var s=a(f,n),v=a(c,n),p=i?u(f,n)?"replace":r:"remove";if(s!==v||"replace"!==p){var d=t.concat(n);e.push("remove"===p?{op:p,path:d}:{op:p,path:d,value:v}),o.push(p===r?{op:"remove",path:d}:"remove"===p?{op:r,path:d,value:s}:{op:"replace",path:d,value:s})}}))}(n,t,e,o);case 5:case 1:return function(n,t,e,i){var o=n.t,u=n.D,a=n.o;if(a.length<o.length){var f=[a,o];o=f[0],a=f[1];var c=[i,e];e=c[0],i=c[1]}for(var s=a.length-o.length,v=0;o[v]===a[v]&&v<o.length;)++v;for(var p=o.length;p>v&&o[p-1]===a[p+s-1];)--p;for(var d=v;d<p;++d)if(u[d]&&a[d]!==o[d]){var h=t.concat([d]);e.push({op:"replace",path:h,value:a[d]}),i.push({op:"replace",path:h,value:o[d]})}for(var l=e.length,y=p+s-1;y>=p;--y){var b=t.concat([y]);e[l+y-p]={op:r,path:b,value:a[y]},i.push({op:"remove",path:b})}}(n,t,e,o);case 3:return function(n,t,e,i){var o=n.t,u=n.o,a=0;o.forEach((function(n){if(!u.has(n)){var o=t.concat([a]);e.push({op:"remove",path:o,value:n}),i.unshift({op:r,path:o,value:n})}a++})),a=0,u.forEach((function(n){if(!o.has(n)){var u=t.concat([a]);e.push({op:r,path:u,value:n}),i.unshift({op:"remove",path:u,value:n})}a++}))}(n,t,e,o)}},M:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.t})}})}function D(){function t(n,t){function r(){this.constructor=n}u(n,t),n.prototype=(r.prototype=t.prototype,new r)}function e(n){n.o||(n.D=new Map,n.o=new Map(n.t))}function i(n){n.o||(n.o=new Set,n.t.forEach((function(t){if(r(t)){var e=I(n.A.l,t,n);n.p.set(t,e),n.o.add(e)}else n.o.add(t)})))}function o(t){t.O&&n(3,JSON.stringify(v(t)))}var u=function(n,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},a=function(){function n(n,t){return this[B]={i:2,h:t,A:t?t.A:b(),P:!1,I:!1,o:void 0,D:void 0,t:n,k:this,C:!1,O:!1},this}t(n,Map);var i=n.prototype;return Object.defineProperty(i,"size",{get:function(){return v(this[B]).size}}),i.has=function(n){return v(this[B]).has(n)},i.set=function(n,t){var r=this[B];return o(r),v(r).get(n)!==t&&(e(r),E(r.A.l,r),r.D.set(n,!0),r.o.set(n,t),r.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[B];return o(t),e(t),E(t.A.l,t),t.D.set(n,!1),t.o.delete(n),!0},i.clear=function(){var n=this[B];return o(n),e(n),E(n.A.l,n),n.D=new Map,n.o.clear()},i.forEach=function(n,t){var r=this;v(this[B]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[B];o(t);var i=v(t).get(n);if(t.I||!r(i))return i;if(i!==t.t.get(n))return i;var u=I(t.A.l,i,t);return e(t),t.o.set(n,u),u},i.keys=function(){return v(this[B]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[G]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[G]=function(){return this.entries()},n}(),f=function(){function n(n,t){return this[B]={i:3,h:t,A:t?t.A:b(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,O:!1,C:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[B]).size}}),r.has=function(n){var t=this[B];return o(t),t.o?!!t.o.has(n)||!(!t.p.has(n)||!t.o.has(t.p.get(n))):t.t.has(n)},r.add=function(n){var t=this[B];return o(t),t.o?t.o.add(n):t.t.has(n)||(i(t),E(t.A.l,t),t.o.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[B];return o(t),i(t),E(t.A.l,t),t.o.delete(n)||!!t.p.has(n)&&t.o.delete(t.p.get(n))},r.clear=function(){var n=this[B];return o(n),i(n),E(n.A.l,n),n.o.clear()},r.values=function(){var n=this[B];return o(n),i(n),n.o.values()},r.entries=function(){var n=this[B];return o(n),i(n),n.o.entries()},r.keys=function(){return this.values()},r[G]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},n}();y("MapSet",{T:function(n,t){return new a(n,t)},F:function(n,t){return new f(n,t)}})}function N(){k(),D(),R()}function T(n){return n}function F(n){return n}var C,J,K="undefined"!=typeof Symbol,$="undefined"!=typeof Map,U="undefined"!=typeof Set,W="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,X=K?Symbol("immer-nothing"):((C={})["immer-nothing"]=!0,C),q=K?Symbol("immer-draftable"):"__$immer_draftable",B=K?Symbol("immer-state"):"__$immer_state",G=K?Symbol.iterator:"@@iterator",H={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},19:"plugin not loaded",20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available"},L="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames||Object.keys,Q={},V={get:function(n,t){if(t===B)return n;var e=n.p;if(!n.P&&u(e,t))return e[t];var i=v(n)[t];if(n.I||!r(i))return i;if(n.P){if(i!==A(n.t,t))return i;e=n.o}return e[t]=I(n.A.l,i,n)},has:function(n,t){return t in v(n)},ownKeys:function(n){return L(v(n))},set:function(n,t,r){if(!n.P){var e=A(n.t,t);if(r?f(e,r)||r===n.p[t]:f(e,r)&&t in n.t)return!0;x(n),z(n)}return n.D[t]=!0,n.o[t]=r,!0},deleteProperty:function(n,t){return void 0!==A(n.t,t)||t in n.t?(n.D[t]=!1,x(n),z(n)):n.D[t]&&delete n.D[t],n.o&&delete n.o[t],!0},getOwnPropertyDescriptor:function(n,t){var r=v(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.i||"length"!==t),e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},Y={};i(V,(function(n,t){Y[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Y.deleteProperty=function(t,r){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(r))&&n(13),V.deleteProperty.call(this,t[0],r)},Y.set=function(t,r,e){return"production"!==process.env.NODE_ENV&&"length"!==r&&isNaN(parseInt(r))&&n(14),V.set.call(this,t[0],r,e,t[0])};var Z=function(){function e(n){this.g=W,this.N="production"!==process.env.NODE_ENV,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=e.prototype;return i.produce=function(t,e,i){if("function"==typeof t&&"function"!=typeof e){var o=e;e=t;var u=this;return function(n){var t=this;void 0===n&&(n=o);for(var r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return u.produce(n,(function(n){var r;return(r=e).call.apply(r,[t,n].concat(i))}))}}var a;if("function"!=typeof e&&n(6),void 0!==i&&"function"!=typeof i&&n(7),r(t)){var f=O(this),c=I(this,t,void 0),s=!0;try{a=e(c),s=!1}finally{s?_(f):j(f)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(n){return m(f,i),w(n,f)}),(function(n){throw _(f),n})):(m(f,i),w(a,f))}if((a=e(t))!==X)return void 0===a&&(a=t),this.N&&d(a,!0),a},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),o=1;o<r;o++)e[o-1]=arguments[o];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(t){r(t)||n(8);var e=O(this),i=I(this,t,void 0);return i[B].C=!0,j(e),i},i.finishDraft=function(t,r){var e=t&&t[B];"production"!==process.env.NODE_ENV&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return m(i,r),w(void 0,i)},i.setAutoFreeze=function(n){this.N=n},i.setUseProxies=function(t){W||n(20),this.g=t},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var o=l("Patches").U;return t(n)?o(n,r):this.produce(n,(function(n){return o(n,r.slice(e+1))}))},e}(),nn=new Z,tn=nn.produce,rn=nn.produceWithPatches.bind(nn),en=nn.setAutoFreeze.bind(nn),on=nn.setUseProxies.bind(nn),un=nn.applyPatches.bind(nn),an=nn.createDraft.bind(nn),fn=nn.finishDraft.bind(nn);export default tn;export{Z as Immer,un as applyPatches,T as castDraft,F as castImmutable,an as createDraft,N as enableAllPlugins,k as enableES5,D as enableMapSet,R as enablePatches,fn as finishDraft,q as immerable,t as isDraft,r as isDraftable,X as nothing,e as original,tn as produce,rn as produceWithPatches,en as setAutoFreeze,on as setUseProxies};
//# sourceMappingURL=immer.esm.js.map

@@ -127,3 +127,3 @@ (function (global, factory) {

/* istanbul ignore next */
Object.getOwnPropertyNames;
Object.getOwnPropertyNames || Object.keys;
function each(obj, iter) {

@@ -130,0 +130,0 @@ if (getArchtype(obj) === ArchtypeObject) {

@@ -1,2 +0,2 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).immer={})}(this,(function(n){function t(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return!!n&&!!n[q]}function e(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[X]||!!n.constructor[X]||c(n)||v(n))}function i(n,t){0===u(n)?G(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function u(n){var t=n[q];return t?t.t>3?t.t-4:t.t:Array.isArray(n)?1:c(n)?2:v(n)?3:0}function o(n,t){return 2===u(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function f(n,t){return 2===u(n)?n.get(t):n[t]}function a(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return $&&n instanceof Map}function v(n){return C&&n instanceof Set}function s(n){return n.i||n.u}function p(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var e=Object.create(Object.getPrototypeOf(n));return i(n,(function(i){if(i!==q){var u=Object.getOwnPropertyDescriptor(n,i),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?e[i]=o:Object.defineProperty(e,i,{value:o,writable:!0,configurable:!0})}})),e}function h(n,t){r(n)||Object.isFrozen(n)||!e(n)||(u(n)>1&&(n.set=n.add=n.clear=n.delete=l),Object.freeze(n),t&&i(n,(function(n,t){return h(t,!0)})))}function l(){t(2)}function d(n){var r=H[n];return r||t(19,n),r}function _(n,t){H[n]=t}function y(){return K}function b(n,t){t&&(d("Patches"),n.o=[],n.v=[],n.s=t)}function m(n){j(n),n.p.forEach(w),n.p=null}function j(n){n===K&&(K=n.h)}function O(n){return K={p:[],h:K,l:n,_:!0,m:0}}function w(n){var t=n[q];0===t.t||1===t.t?t.j():t.O=!0}function S(n,r){r.m=r.p.length;var i=r.p[0],u=void 0!==n&&n!==i;return r.l.S||d("ES5").P(r,n,u),u?(i[q].M&&(m(r),t(4)),e(n)&&(n=P(r,n),r.h||g(r,n)),r.o&&d("Patches").g(i[q],n,r.o,r.v)):n=P(r,i,[]),m(r),r.o&&r.s(r.o,r.v),n!==W?n:void 0}function P(n,t,r){if(Object.isFrozen(t))return t;var e=t[q];if(!e)return i(t,(function(i,u){return M(n,e,t,i,u,r)})),t;if(e.A!==n)return t;if(!e.M)return g(n,e.u,!0),e.u;if(!e.k){e.k=!0,e.A.m--;var u=4===e.t||5===e.t?e.i=p(e.R,!0):e.i;i(u,(function(t,i){return M(n,e,u,t,i,r)})),g(n,u,!1),r&&n.o&&d("Patches").F(e,r,n.o,n.v)}return e.i}function M(n,t,i,c,v,s){if(r(v)){var p=P(n,v,s&&t&&3!==t.t&&!o(t.D,c)?s.concat(c):void 0);if(l=c,d=p,2===(_=u(h=i))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!r(p))return;n._=!1}var h,l,d,_;if((!t||!a(v,f(t.u,c)))&&e(v)){if(!n.l.J&&n.m<1)return;P(n,v),t&&t.A.h||g(n,v)}}function g(n,t,r){void 0===r&&(r=!1),n.l.J&&n._&&h(t,r)}function A(n,t){var r=n[q],e=Reflect.getOwnPropertyDescriptor(r?s(r):n,t);return e&&e.value}function z(n){if(!n.M){if(n.M=!0,0===n.t||1===n.t){var t=n.i=p(n.u);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.h&&z(n.h)}}function x(n){n.i||(n.i=p(n.u))}function E(n,t,r){var e=c(t)?d("MapSet").K(t,r):v(t)?d("MapSet").N(t,r):n.S?function(n,t){var r=Array.isArray(n),e={t:r?1:0,A:t?t.A:y(),M:!1,k:!1,D:{},h:t,u:n,R:null,p:{},i:null,j:null,$:!1},i=e,u=L;r&&(i=[e],u=Q);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.R=a,e.j=f,a}(t,r):d("ES5").C(t,r);return(r?r.A:y()).p.push(e),e}function k(n,t){n.S?z(t):d("ES5").I(t)}function R(){function n(n,t){var r=n[q];if(r&&!r.W){r.W=!0;var e=n[t];return r.W=!1,e}return n[t]}function u(n){n.M||(n.M=!0,n.h&&u(n.h))}function f(n){n.i||(n.i=c(n.u))}function c(n){var t=n&&n[q];if(t){t.W=!0;var r=p(t.R,!0);return t.W=!1,r}return p(n)}function v(n){for(var t=n.length-1;t>=0;t--){var r=n[t][q];if(!r.M)switch(r.t){case 5:l(r)&&u(r);break;case 4:h(r)&&u(r)}}}function h(n){for(var t=n.u,r=n.R,e=Object.keys(r),i=e.length-1;i>=0;i--){var u=e[i],f=t[u];if(void 0===f&&!o(t,u))return!0;var c=r[u],v=c&&c[q];if(v?v.u!==f:!a(c,f))return!0}return e.length!==Object.keys(t).length}function l(n){var t=n.R;if(t.length!==n.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function d(n){n.O&&t(3,JSON.stringify(s(n)))}var b={};_("ES5",{C:function(t,r){var o=Array.isArray(t),v=c(t);i(v,(function(r){!function(t,r,i){var o=b[r];o?o.enumerable=i:b[r]=o={enumerable:i,get:function(){return function(t,r){d(t);var i=n(s(t),r);return t.W?i:i===n(t.u,r)&&e(i)?(f(t),t.i[r]=E(t.A.l,i,t)):i}(this[q],r)},set:function(t){!function(t,r,e){if(d(t),t.D[r]=!0,!t.M){if(a(e,n(s(t),r)))return;u(t),f(t)}t.i[r]=e}(this[q],r,t)}},Object.defineProperty(t,r,o)}(v,r,o||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(t,r))}));var p={t:o?5:4,A:r?r.A:y(),M:!1,W:!1,k:!1,D:{},h:r,u:t,R:v,i:null,O:!1,$:!1};return Object.defineProperty(v,q,{value:p,writable:!0}),v},I:u,P:function(n,t,e){n.p.forEach((function(n){n[q].W=!0})),e?r(t)&&t[q].A===n&&v(n.p):(n.o&&function n(t){if(t&&"object"==typeof t){var r=t[q];if(r){var e=r.u,f=r.R,a=r.D,c=r.t;if(4===c)i(f,(function(t){t!==q&&(void 0!==e[t]||o(e,t)?a[t]||n(f[t]):(a[t]=!0,u(r)))})),i(e,(function(n){void 0!==f[n]||o(f,n)||(a[n]=!1,u(r))}));else if(5===c){if(l(r)&&(u(r),a.length=!0),f.length<e.length)for(var v=f.length;v<e.length;v++)a[v]=!1;else for(var s=e.length;s<f.length;s++)a[s]=!0;for(var p=Math.min(f.length,e.length),h=0;h<p;h++)void 0===a[h]&&n(f[h])}}}}(n.p[0]),v(n.p))}})}function F(){function n(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(n);if(c(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],n(t[1])]})));if(v(t))return new Set(Array.from(t).map(n));var r=Object.create(Object.getPrototypeOf(t));for(var e in t)r[e]=n(t[e]);return r}var r="add";_("Patches",{X:function(e,i){return i.forEach((function(i){for(var o=i.path,a=i.op,c=e,v=0;v<o.length-1;v++)"object"!=typeof(c=f(c,o[v]))&&t(15,o.join("/"));var s=u(c),p=n(i.value),h=o[o.length-1];switch(a){case"replace":switch(s){case 2:return c.set(h,p);case 3:t(16);default:return c[h]=p}case r:switch(s){case 1:return c.splice(h,0,p);case 2:return c.set(h,p);case 3:return c.add(p);default:return c[h]=p}case"remove":switch(s){case 1:return c.splice(h,1);case 2:return c.delete(h);case 3:return c.delete(i.value);default:return delete c[h]}default:t(17,a)}})),e},F:function(n,t,e,u){switch(n.t){case 0:case 4:case 2:return function(n,t,e,u){var a=n.u,c=n.i;i(n.D,(function(n,i){var v=f(a,n),s=f(c,n),p=i?o(a,n)?"replace":r:"remove";if(v!==s||"replace"!==p){var h=t.concat(n);e.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:s}),u.push(p===r?{op:"remove",path:h}:"remove"===p?{op:r,path:h,value:v}:{op:"replace",path:h,value:v})}}))}(n,t,e,u);case 5:case 1:return function(n,t,e,i){var u=n.u,o=n.D,f=n.i;if(f.length<u.length){var a=[f,u];u=a[0],f=a[1];var c=[i,e];e=c[0],i=c[1]}for(var v=f.length-u.length,s=0;u[s]===f[s]&&s<u.length;)++s;for(var p=u.length;p>s&&u[p-1]===f[p+v-1];)--p;for(var h=s;h<p;++h)if(o[h]&&f[h]!==u[h]){var l=t.concat([h]);e.push({op:"replace",path:l,value:f[h]}),i.push({op:"replace",path:l,value:u[h]})}for(var d=e.length,_=p+v-1;_>=p;--_){var y=t.concat([_]);e[d+_-p]={op:r,path:y,value:f[_]},i.push({op:"remove",path:y})}}(n,t,e,u);case 3:return function(n,t,e,i){var u=n.u,o=n.i,f=0;u.forEach((function(n){if(!o.has(n)){var u=t.concat([f]);e.push({op:"remove",path:u,value:n}),i.unshift({op:r,path:u,value:n})}f++})),f=0,o.forEach((function(n){if(!u.has(n)){var o=t.concat([f]);e.push({op:r,path:o,value:n}),i.unshift({op:"remove",path:o,value:n})}f++}))}(n,t,e,u)}},g:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.u})}})}function D(){function n(n,t){function r(){this.constructor=n}o(n,t),n.prototype=(r.prototype=t.prototype,new r)}function r(n){n.i||(n.D=new Map,n.i=new Map(n.u))}function i(n){n.i||(n.i=new Set,n.u.forEach((function(t){if(e(t)){var r=E(n.A.l,t,n);n.p.set(t,r),n.i.add(r)}else n.i.add(t)})))}function u(n){n.O&&t(3,JSON.stringify(s(n)))}var o=function(n,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},f=function(){function t(n,t){return this[q]={t:2,h:t,A:t?t.A:y(),M:!1,k:!1,i:void 0,D:void 0,u:n,R:this,$:!1,O:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[q]).size}}),i.has=function(n){return s(this[q]).has(n)},i.set=function(n,t){var e=this[q];return u(e),s(e).get(n)!==t&&(r(e),k(e.A.l,e),e.D.set(n,!0),e.i.set(n,t),e.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[q];return u(t),r(t),k(t.A.l,t),t.D.set(n,!1),t.i.delete(n),!0},i.clear=function(){var n=this[q];return u(n),r(n),k(n.A.l,n),n.D=new Map,n.i.clear()},i.forEach=function(n,t){var r=this;s(this[q]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[q];u(t);var i=s(t).get(n);if(t.k||!e(i))return i;if(i!==t.u.get(n))return i;var o=E(t.A.l,i,t);return r(t),t.i.set(n,o),o},i.keys=function(){return s(this[q]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[B]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[B]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[B]=function(){return this.entries()},t}(),a=function(){function t(n,t){return this[q]={t:3,h:t,A:t?t.A:y(),M:!1,k:!1,i:void 0,u:n,R:this,p:new Map,O:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[q]).size}}),r.has=function(n){var t=this[q];return u(t),t.i?!!t.i.has(n)||!(!t.p.has(n)||!t.i.has(t.p.get(n))):t.u.has(n)},r.add=function(n){var t=this[q];return u(t),t.i?t.i.add(n):t.u.has(n)||(i(t),k(t.A.l,t),t.i.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[q];return u(t),i(t),k(t.A.l,t),t.i.delete(n)||!!t.p.has(n)&&t.i.delete(t.p.get(n))},r.clear=function(){var n=this[q];return u(n),i(n),k(n.A.l,n),n.i.clear()},r.values=function(){var n=this[q];return u(n),i(n),n.i.values()},r.entries=function(){var n=this[q];return u(n),i(n),n.i.entries()},r.keys=function(){return this.values()},r[B]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},t}();_("MapSet",{K:function(n,t){return new f(n,t)},N:function(n,t){return new a(n,t)}})}var J,K,N="undefined"!=typeof Symbol,$="undefined"!=typeof Map,C="undefined"!=typeof Set,I="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=N?Symbol("immer-nothing"):((J={})["immer-nothing"]=!0,J),X=N?Symbol("immer-draftable"):"__$immer_draftable",q=N?Symbol("immer-state"):"__$immer_state",B=N?Symbol.iterator:"@@iterator",G="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,H={},L={get:function(n,t){if(t===q)return n;var r=n.p;if(!n.M&&o(r,t))return r[t];var i=s(n)[t];if(n.k||!e(i))return i;if(n.M){if(i!==A(n.u,t))return i;r=n.i}return r[t]=E(n.A.l,i,n)},has:function(n,t){return t in s(n)},ownKeys:function(n){return G(s(n))},set:function(n,t,r){if(!n.M){var e=A(n.u,t);if(r?a(e,r)||r===n.p[t]:a(e,r)&&t in n.u)return!0;x(n),z(n)}return n.D[t]=!0,n.i[t]=r,!0},deleteProperty:function(n,t){return void 0!==A(n.u,t)||t in n.u?(n.D[t]=!1,x(n),z(n)):n.D[t]&&delete n.D[t],n.i&&delete n.i[t],!0},getOwnPropertyDescriptor:function(n,t){var r=s(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.t||"length"!==t),e},defineProperty:function(){t(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.u)},setPrototypeOf:function(){t(12)}},Q={};i(L,(function(n,t){Q[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Q.deleteProperty=function(n,t){return L.deleteProperty.call(this,n[0],t)},Q.set=function(n,t,r){return L.set.call(this,n[0],t,r,n[0])};var T=function(){function n(n){this.S=I,this.J=!1,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=n.prototype;return i.produce=function(n,r,i){if("function"==typeof n&&"function"!=typeof r){var u=r;r=n;var o=this;return function(n){var t=this;void 0===n&&(n=u);for(var e=arguments.length,i=Array(e>1?e-1:0),f=1;f<e;f++)i[f-1]=arguments[f];return o.produce(n,(function(n){var e;return(e=r).call.apply(e,[t,n].concat(i))}))}}var f;if("function"!=typeof r&&t(6),void 0!==i&&"function"!=typeof i&&t(7),e(n)){var a=O(this),c=E(this,n,void 0),v=!0;try{f=r(c),v=!1}finally{v?m(a):j(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return b(a,i),S(n,a)}),(function(n){throw m(a),n})):(b(a,i),S(f,a))}if((f=r(n))!==W)return void 0===f&&(f=n),this.J&&h(f,!0),f},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(n){e(n)||t(8);var r=O(this),i=E(this,n,void 0);return i[q].$=!0,j(r),i},i.finishDraft=function(n,t){var r=(n&&n[q]).A;return b(r,t),S(void 0,r)},i.setAutoFreeze=function(n){this.J=n},i.setUseProxies=function(n){I||t(20),this.S=n},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var u=d("Patches").X;return r(n)?u(n,t):this.produce(n,(function(n){return u(n,t.slice(e+1))}))},n}(),U=new T,V=U.produce,Y=U.produceWithPatches.bind(U),Z=U.setAutoFreeze.bind(U),nn=U.setUseProxies.bind(U),tn=U.applyPatches.bind(U),rn=U.createDraft.bind(U),en=U.finishDraft.bind(U);n.Immer=T,n.applyPatches=tn,n.castDraft=function(n){return n},n.castImmutable=function(n){return n},n.createDraft=rn,n.default=V,n.enableAllPlugins=function(){R(),D(),F()},n.enableES5=R,n.enableMapSet=D,n.enablePatches=F,n.finishDraft=en,n.immerable=X,n.isDraft=r,n.isDraftable=e,n.nothing=W,n.original=function(n){if(n&&n[q])return n[q].u},n.produce=V,n.produceWithPatches=Y,n.setAutoFreeze=Z,n.setUseProxies=nn,Object.defineProperty(n,"__esModule",{value:!0})}));
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).immer={})}(this,(function(n){function t(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function r(n){return!!n&&!!n[q]}function e(n){return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var t=Object.getPrototypeOf(n);return!t||t===Object.prototype}(n)||Array.isArray(n)||!!n[X]||!!n.constructor[X]||c(n)||v(n))}function i(n,t){0===u(n)?G(n).forEach((function(r){return t(r,n[r],n)})):n.forEach((function(r,e){return t(e,r,n)}))}function u(n){var t=n[q];return t?t.t>3?t.t-4:t.t:Array.isArray(n)?1:c(n)?2:v(n)?3:0}function o(n,t){return 2===u(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function f(n,t){return 2===u(n)?n.get(t):n[t]}function a(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return $&&n instanceof Map}function v(n){return C&&n instanceof Set}function s(n){return n.i||n.u}function p(n,r){if(void 0===r&&(r=!1),Array.isArray(n))return n.slice();var e=Object.create(Object.getPrototypeOf(n));return i(n,(function(i){if(i!==q){var u=Object.getOwnPropertyDescriptor(n,i),o=u.value;u.get&&(r||t(1),o=u.get.call(n)),u.enumerable?e[i]=o:Object.defineProperty(e,i,{value:o,writable:!0,configurable:!0})}})),e}function h(n,t){r(n)||Object.isFrozen(n)||!e(n)||(u(n)>1&&(n.set=n.add=n.clear=n.delete=l),Object.freeze(n),t&&i(n,(function(n,t){return h(t,!0)})))}function l(){t(2)}function d(n){var r=H[n];return r||t(19,n),r}function _(n,t){H[n]=t}function y(){return K}function b(n,t){t&&(d("Patches"),n.o=[],n.v=[],n.s=t)}function m(n){j(n),n.p.forEach(w),n.p=null}function j(n){n===K&&(K=n.h)}function O(n){return K={p:[],h:K,l:n,_:!0,m:0}}function w(n){var t=n[q];0===t.t||1===t.t?t.j():t.O=!0}function S(n,r){r.m=r.p.length;var i=r.p[0],u=void 0!==n&&n!==i;return r.l.S||d("ES5").P(r,n,u),u?(i[q].M&&(m(r),t(4)),e(n)&&(n=P(r,n),r.h||g(r,n)),r.o&&d("Patches").g(i[q],n,r.o,r.v)):n=P(r,i,[]),m(r),r.o&&r.s(r.o,r.v),n!==W?n:void 0}function P(n,t,r){if(Object.isFrozen(t))return t;var e=t[q];if(!e)return i(t,(function(i,u){return M(n,e,t,i,u,r)})),t;if(e.A!==n)return t;if(!e.M)return g(n,e.u,!0),e.u;if(!e.k){e.k=!0,e.A.m--;var u=4===e.t||5===e.t?e.i=p(e.R,!0):e.i;i(u,(function(t,i){return M(n,e,u,t,i,r)})),g(n,u,!1),r&&n.o&&d("Patches").F(e,r,n.o,n.v)}return e.i}function M(n,t,i,c,v,s){if(r(v)){var p=P(n,v,s&&t&&3!==t.t&&!o(t.D,c)?s.concat(c):void 0);if(l=c,d=p,2===(_=u(h=i))?h.set(l,d):3===_?(h.delete(l),h.add(d)):h[l]=d,!r(p))return;n._=!1}var h,l,d,_;if((!t||!a(v,f(t.u,c)))&&e(v)){if(!n.l.J&&n.m<1)return;P(n,v),t&&t.A.h||g(n,v)}}function g(n,t,r){void 0===r&&(r=!1),n.l.J&&n._&&h(t,r)}function A(n,t){var r=n[q],e=Reflect.getOwnPropertyDescriptor(r?s(r):n,t);return e&&e.value}function z(n){if(!n.M){if(n.M=!0,0===n.t||1===n.t){var t=n.i=p(n.u);i(n.p,(function(n,r){t[n]=r})),n.p=void 0}n.h&&z(n.h)}}function x(n){n.i||(n.i=p(n.u))}function E(n,t,r){var e=c(t)?d("MapSet").K(t,r):v(t)?d("MapSet").N(t,r):n.S?function(n,t){var r=Array.isArray(n),e={t:r?1:0,A:t?t.A:y(),M:!1,k:!1,D:{},h:t,u:n,R:null,p:{},i:null,j:null,$:!1},i=e,u=L;r&&(i=[e],u=Q);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.R=a,e.j=f,a}(t,r):d("ES5").C(t,r);return(r?r.A:y()).p.push(e),e}function k(n,t){n.S?z(t):d("ES5").I(t)}function R(){function n(n,t){var r=n[q];if(r&&!r.W){r.W=!0;var e=n[t];return r.W=!1,e}return n[t]}function u(n){n.M||(n.M=!0,n.h&&u(n.h))}function f(n){n.i||(n.i=c(n.u))}function c(n){var t=n&&n[q];if(t){t.W=!0;var r=p(t.R,!0);return t.W=!1,r}return p(n)}function v(n){for(var t=n.length-1;t>=0;t--){var r=n[t][q];if(!r.M)switch(r.t){case 5:l(r)&&u(r);break;case 4:h(r)&&u(r)}}}function h(n){for(var t=n.u,r=n.R,e=Object.keys(r),i=e.length-1;i>=0;i--){var u=e[i],f=t[u];if(void 0===f&&!o(t,u))return!0;var c=r[u],v=c&&c[q];if(v?v.u!==f:!a(c,f))return!0}return e.length!==Object.keys(t).length}function l(n){var t=n.R;if(t.length!==n.u.length)return!0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!r||r.get)}function d(n){n.O&&t(3,JSON.stringify(s(n)))}var b={};_("ES5",{C:function(t,r){var o=Array.isArray(t),v=c(t);i(v,(function(r){!function(t,r,i){var o=b[r];o?o.enumerable=i:b[r]=o={enumerable:i,get:function(){return function(t,r){d(t);var i=n(s(t),r);return t.W?i:i===n(t.u,r)&&e(i)?(f(t),t.i[r]=E(t.A.l,i,t)):i}(this[q],r)},set:function(t){!function(t,r,e){if(d(t),t.D[r]=!0,!t.M){if(a(e,n(s(t),r)))return;u(t),f(t)}t.i[r]=e}(this[q],r,t)}},Object.defineProperty(t,r,o)}(v,r,o||function(n,t){var r=Object.getOwnPropertyDescriptor(n,t);return!(!r||!r.enumerable)}(t,r))}));var p={t:o?5:4,A:r?r.A:y(),M:!1,W:!1,k:!1,D:{},h:r,u:t,R:v,i:null,O:!1,$:!1};return Object.defineProperty(v,q,{value:p,writable:!0}),v},I:u,P:function(n,t,e){n.p.forEach((function(n){n[q].W=!0})),e?r(t)&&t[q].A===n&&v(n.p):(n.o&&function n(t){if(t&&"object"==typeof t){var r=t[q];if(r){var e=r.u,f=r.R,a=r.D,c=r.t;if(4===c)i(f,(function(t){t!==q&&(void 0!==e[t]||o(e,t)?a[t]||n(f[t]):(a[t]=!0,u(r)))})),i(e,(function(n){void 0!==f[n]||o(f,n)||(a[n]=!1,u(r))}));else if(5===c){if(l(r)&&(u(r),a.length=!0),f.length<e.length)for(var v=f.length;v<e.length;v++)a[v]=!1;else for(var s=e.length;s<f.length;s++)a[s]=!0;for(var p=Math.min(f.length,e.length),h=0;h<p;h++)void 0===a[h]&&n(f[h])}}}}(n.p[0]),v(n.p))}})}function F(){function n(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(n);if(c(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],n(t[1])]})));if(v(t))return new Set(Array.from(t).map(n));var r=Object.create(Object.getPrototypeOf(t));for(var e in t)r[e]=n(t[e]);return r}var r="add";_("Patches",{X:function(e,i){return i.forEach((function(i){for(var o=i.path,a=i.op,c=e,v=0;v<o.length-1;v++)"object"!=typeof(c=f(c,o[v]))&&t(15,o.join("/"));var s=u(c),p=n(i.value),h=o[o.length-1];switch(a){case"replace":switch(s){case 2:return c.set(h,p);case 3:t(16);default:return c[h]=p}case r:switch(s){case 1:return c.splice(h,0,p);case 2:return c.set(h,p);case 3:return c.add(p);default:return c[h]=p}case"remove":switch(s){case 1:return c.splice(h,1);case 2:return c.delete(h);case 3:return c.delete(i.value);default:return delete c[h]}default:t(17,a)}})),e},F:function(n,t,e,u){switch(n.t){case 0:case 4:case 2:return function(n,t,e,u){var a=n.u,c=n.i;i(n.D,(function(n,i){var v=f(a,n),s=f(c,n),p=i?o(a,n)?"replace":r:"remove";if(v!==s||"replace"!==p){var h=t.concat(n);e.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:s}),u.push(p===r?{op:"remove",path:h}:"remove"===p?{op:r,path:h,value:v}:{op:"replace",path:h,value:v})}}))}(n,t,e,u);case 5:case 1:return function(n,t,e,i){var u=n.u,o=n.D,f=n.i;if(f.length<u.length){var a=[f,u];u=a[0],f=a[1];var c=[i,e];e=c[0],i=c[1]}for(var v=f.length-u.length,s=0;u[s]===f[s]&&s<u.length;)++s;for(var p=u.length;p>s&&u[p-1]===f[p+v-1];)--p;for(var h=s;h<p;++h)if(o[h]&&f[h]!==u[h]){var l=t.concat([h]);e.push({op:"replace",path:l,value:f[h]}),i.push({op:"replace",path:l,value:u[h]})}for(var d=e.length,_=p+v-1;_>=p;--_){var y=t.concat([_]);e[d+_-p]={op:r,path:y,value:f[_]},i.push({op:"remove",path:y})}}(n,t,e,u);case 3:return function(n,t,e,i){var u=n.u,o=n.i,f=0;u.forEach((function(n){if(!o.has(n)){var u=t.concat([f]);e.push({op:"remove",path:u,value:n}),i.unshift({op:r,path:u,value:n})}f++})),f=0,o.forEach((function(n){if(!u.has(n)){var o=t.concat([f]);e.push({op:r,path:o,value:n}),i.unshift({op:"remove",path:o,value:n})}f++}))}(n,t,e,u)}},g:function(n,t,r,e){r.push({op:"replace",path:[],value:t}),e.push({op:"replace",path:[],value:n.u})}})}function D(){function n(n,t){function r(){this.constructor=n}o(n,t),n.prototype=(r.prototype=t.prototype,new r)}function r(n){n.i||(n.D=new Map,n.i=new Map(n.u))}function i(n){n.i||(n.i=new Set,n.u.forEach((function(t){if(e(t)){var r=E(n.A.l,t,n);n.p.set(t,r),n.i.add(r)}else n.i.add(t)})))}function u(n){n.O&&t(3,JSON.stringify(s(n)))}var o=function(n,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,t)},f=function(){function t(n,t){return this[q]={t:2,h:t,A:t?t.A:y(),M:!1,k:!1,i:void 0,D:void 0,u:n,R:this,$:!1,O:!1},this}n(t,Map);var i=t.prototype;return Object.defineProperty(i,"size",{get:function(){return s(this[q]).size}}),i.has=function(n){return s(this[q]).has(n)},i.set=function(n,t){var e=this[q];return u(e),s(e).get(n)!==t&&(r(e),k(e.A.l,e),e.D.set(n,!0),e.i.set(n,t),e.D.set(n,!0)),this},i.delete=function(n){if(!this.has(n))return!1;var t=this[q];return u(t),r(t),k(t.A.l,t),t.D.set(n,!1),t.i.delete(n),!0},i.clear=function(){var n=this[q];return u(n),r(n),k(n.A.l,n),n.D=new Map,n.i.clear()},i.forEach=function(n,t){var r=this;s(this[q]).forEach((function(e,i){n.call(t,r.get(i),i,r)}))},i.get=function(n){var t=this[q];u(t);var i=s(t).get(n);if(t.k||!e(i))return i;if(i!==t.u.get(n))return i;var o=E(t.A.l,i,t);return r(t),t.i.set(n,o),o},i.keys=function(){return s(this[q]).keys()},i.values=function(){var n,t=this,r=this.keys();return(n={})[B]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},i.entries=function(){var n,t=this,r=this.keys();return(n={})[B]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return{done:!1,value:[n.value,e]}},n},i[B]=function(){return this.entries()},t}(),a=function(){function t(n,t){return this[q]={t:3,h:t,A:t?t.A:y(),M:!1,k:!1,i:void 0,u:n,R:this,p:new Map,O:!1,$:!1},this}n(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[q]).size}}),r.has=function(n){var t=this[q];return u(t),t.i?!!t.i.has(n)||!(!t.p.has(n)||!t.i.has(t.p.get(n))):t.u.has(n)},r.add=function(n){var t=this[q];return u(t),t.i?t.i.add(n):t.u.has(n)||(i(t),k(t.A.l,t),t.i.add(n)),this},r.delete=function(n){if(!this.has(n))return!1;var t=this[q];return u(t),i(t),k(t.A.l,t),t.i.delete(n)||!!t.p.has(n)&&t.i.delete(t.p.get(n))},r.clear=function(){var n=this[q];return u(n),i(n),k(n.A.l,n),n.i.clear()},r.values=function(){var n=this[q];return u(n),i(n),n.i.values()},r.entries=function(){var n=this[q];return u(n),i(n),n.i.entries()},r.keys=function(){return this.values()},r[B]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next()},t}();_("MapSet",{K:function(n,t){return new f(n,t)},N:function(n,t){return new a(n,t)}})}var J,K,N="undefined"!=typeof Symbol,$="undefined"!=typeof Map,C="undefined"!=typeof Set,I="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,W=N?Symbol("immer-nothing"):((J={})["immer-nothing"]=!0,J),X=N?Symbol("immer-draftable"):"__$immer_draftable",q=N?Symbol("immer-state"):"__$immer_state",B=N?Symbol.iterator:"@@iterator",G="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames||Object.keys,H={},L={get:function(n,t){if(t===q)return n;var r=n.p;if(!n.M&&o(r,t))return r[t];var i=s(n)[t];if(n.k||!e(i))return i;if(n.M){if(i!==A(n.u,t))return i;r=n.i}return r[t]=E(n.A.l,i,n)},has:function(n,t){return t in s(n)},ownKeys:function(n){return G(s(n))},set:function(n,t,r){if(!n.M){var e=A(n.u,t);if(r?a(e,r)||r===n.p[t]:a(e,r)&&t in n.u)return!0;x(n),z(n)}return n.D[t]=!0,n.i[t]=r,!0},deleteProperty:function(n,t){return void 0!==A(n.u,t)||t in n.u?(n.D[t]=!1,x(n),z(n)):n.D[t]&&delete n.D[t],n.i&&delete n.i[t],!0},getOwnPropertyDescriptor:function(n,t){var r=s(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e&&(e.writable=!0,e.configurable=1!==n.t||"length"!==t),e},defineProperty:function(){t(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.u)},setPrototypeOf:function(){t(12)}},Q={};i(L,(function(n,t){Q[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Q.deleteProperty=function(n,t){return L.deleteProperty.call(this,n[0],t)},Q.set=function(n,t,r){return L.set.call(this,n[0],t,r,n[0])};var T=function(){function n(n){this.S=I,this.J=!1,"boolean"==typeof(null==n?void 0:n.useProxies)&&this.setUseProxies(n.useProxies),"boolean"==typeof(null==n?void 0:n.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),this.produce=this.produce.bind(this),this.produceWithPatches=this.produceWithPatches.bind(this)}var i=n.prototype;return i.produce=function(n,r,i){if("function"==typeof n&&"function"!=typeof r){var u=r;r=n;var o=this;return function(n){var t=this;void 0===n&&(n=u);for(var e=arguments.length,i=Array(e>1?e-1:0),f=1;f<e;f++)i[f-1]=arguments[f];return o.produce(n,(function(n){var e;return(e=r).call.apply(e,[t,n].concat(i))}))}}var f;if("function"!=typeof r&&t(6),void 0!==i&&"function"!=typeof i&&t(7),e(n)){var a=O(this),c=E(this,n,void 0),v=!0;try{f=r(c),v=!1}finally{v?m(a):j(a)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return b(a,i),S(n,a)}),(function(n){throw m(a),n})):(b(a,i),S(f,a))}if((f=r(n))!==W)return void 0===f&&(f=n),this.J&&h(f,!0),f},i.produceWithPatches=function(n,t){var r,e,i=this;return"function"==typeof n?function(t){for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return i.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(e))}))}:[this.produce(n,t,(function(n,t){r=n,e=t})),r,e]},i.createDraft=function(n){e(n)||t(8);var r=O(this),i=E(this,n,void 0);return i[q].$=!0,j(r),i},i.finishDraft=function(n,t){var r=(n&&n[q]).A;return b(r,t),S(void 0,r)},i.setAutoFreeze=function(n){this.J=n},i.setUseProxies=function(n){I||t(20),this.S=n},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}var u=d("Patches").X;return r(n)?u(n,t):this.produce(n,(function(n){return u(n,t.slice(e+1))}))},n}(),U=new T,V=U.produce,Y=U.produceWithPatches.bind(U),Z=U.setAutoFreeze.bind(U),nn=U.setUseProxies.bind(U),tn=U.applyPatches.bind(U),rn=U.createDraft.bind(U),en=U.finishDraft.bind(U);n.Immer=T,n.applyPatches=tn,n.castDraft=function(n){return n},n.castImmutable=function(n){return n},n.createDraft=rn,n.default=V,n.enableAllPlugins=function(){R(),D(),F()},n.enableES5=R,n.enableMapSet=D,n.enablePatches=F,n.finishDraft=en,n.immerable=X,n.isDraft=r,n.isDraftable=e,n.nothing=W,n.original=function(n){if(n&&n[q])return n[q].u},n.produce=V,n.produceWithPatches=Y,n.setAutoFreeze=Z,n.setUseProxies=nn,Object.defineProperty(n,"__esModule",{value:!0})}));
//# sourceMappingURL=immer.umd.production.min.js.map
{
"name": "immer",
"version": "6.0.0-fix-425",
"version": "6.0.0-fix-425-2",
"description": "Create your next immutable state by mutating the current one",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -66,3 +66,3 @@ import {

)
: /* istanbul ignore next */ Object.getOwnPropertyNames
: /* istanbul ignore next */ (Object.getOwnPropertyNames || Object.keys)

@@ -69,0 +69,0 @@ export function each<T extends Objectish>(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc