@ynput/ayon-frontend-shared 0.3.25 → 0.3.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/_virtual/index.cjs14.js +1 -1
  2. package/dist/_virtual/index.cjs15.js +1 -1
  3. package/dist/_virtual/index.cjs19.js +1 -1
  4. package/dist/_virtual/index.cjs4.js +1 -1
  5. package/dist/_virtual/index.cjs5.js +1 -1
  6. package/dist/_virtual/index.cjs9.js +1 -1
  7. package/dist/_virtual/index.es10.js +2 -2
  8. package/dist/_virtual/index.es11.js +2 -2
  9. package/dist/_virtual/index.es13.js +2 -2
  10. package/dist/_virtual/index.es14.js +2 -5
  11. package/dist/_virtual/index.es14.js.map +1 -1
  12. package/dist/_virtual/index.es15.js +2 -2
  13. package/dist/_virtual/index.es16.js +2 -2
  14. package/dist/_virtual/index.es17.js +2 -2
  15. package/dist/_virtual/index.es18.js +2 -2
  16. package/dist/_virtual/index.es19.js +2 -2
  17. package/dist/_virtual/index.es4.js +5 -2
  18. package/dist/_virtual/index.es4.js.map +1 -1
  19. package/dist/_virtual/index.es5.js +2 -5
  20. package/dist/_virtual/index.es5.js.map +1 -1
  21. package/dist/_virtual/index.es9.js +5 -2
  22. package/dist/_virtual/index.es9.js.map +1 -1
  23. package/dist/api.cjs.js +1 -1
  24. package/dist/api.es.js +378 -377
  25. package/dist/node_modules/decode-named-character-reference/index.dom.cjs.js.map +1 -1
  26. package/dist/node_modules/decode-named-character-reference/index.dom.es.js +1 -5
  27. package/dist/node_modules/decode-named-character-reference/index.dom.es.js.map +1 -1
  28. package/dist/node_modules/immer/dist/immer.cjs.js +1 -1
  29. package/dist/node_modules/immer/dist/immer.cjs.js.map +1 -1
  30. package/dist/node_modules/immer/dist/immer.es.js +373 -359
  31. package/dist/node_modules/immer/dist/immer.es.js.map +1 -1
  32. package/dist/node_modules/match-sorter/dist/match-sorter.esm.cjs.js +1 -1
  33. package/dist/node_modules/match-sorter/dist/match-sorter.esm.es.js +1 -1
  34. package/dist/node_modules/parse-numeric-range/index.cjs.js +1 -1
  35. package/dist/node_modules/parse-numeric-range/index.es.js +1 -1
  36. package/dist/shared/node_modules/@module-federation/runtime/dist/index.cjs.js +1 -1
  37. package/dist/shared/node_modules/@module-federation/runtime/dist/index.es.js +1 -1
  38. package/dist/shared/node_modules/@module-federation/runtime-core/dist/module/index.cjs.js +1 -1
  39. package/dist/shared/node_modules/@module-federation/runtime-core/dist/module/index.es.js +1 -1
  40. package/dist/shared/node_modules/@module-federation/runtime-core/dist/plugins/snapshot/index.cjs.js +1 -1
  41. package/dist/shared/node_modules/@module-federation/runtime-core/dist/plugins/snapshot/index.es.js +1 -1
  42. package/dist/shared/node_modules/@module-federation/runtime-core/dist/remote/index.cjs.js +1 -1
  43. package/dist/shared/node_modules/@module-federation/runtime-core/dist/remote/index.es.js +1 -1
  44. package/dist/shared/node_modules/@module-federation/runtime-core/dist/shared/index.cjs.js +1 -1
  45. package/dist/shared/node_modules/@module-federation/runtime-core/dist/shared/index.es.js +1 -1
  46. package/dist/shared/node_modules/@module-federation/runtime-core/dist/type/index.cjs.js +1 -1
  47. package/dist/shared/node_modules/@module-federation/runtime-core/dist/type/index.es.js +1 -1
  48. package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/hooks/index.cjs.js +1 -1
  49. package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/hooks/index.es.js +1 -1
  50. package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/index.cjs.js +1 -1
  51. package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/index.es.js +1 -1
  52. package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/semver/index.cjs.js +1 -1
  53. package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/semver/index.cjs.js.map +1 -1
  54. package/dist/shared/node_modules/@module-federation/runtime-core/dist/utils/semver/index.es.js +1 -1
  55. package/dist/shared/node_modules/@module-federation/sdk/dist/index.cjs.js +1 -1
  56. package/dist/shared/node_modules/@module-federation/sdk/dist/index.es.js +1 -1
  57. package/dist/shared/node_modules/prop-types/index.cjs.js +1 -1
  58. package/dist/shared/node_modules/prop-types/index.es.js +1 -1
  59. package/dist/shared/node_modules/react-is/index.cjs.js +1 -1
  60. package/dist/shared/node_modules/react-is/index.es.js +1 -1
  61. package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.cjs.js +1 -1
  62. package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.cjs.js.map +1 -1
  63. package/dist/shared/node_modules/react-transition-group/esm/CSSTransition.es.js +1 -1
  64. package/dist/shared/node_modules/react-transition-group/esm/Transition.cjs.js +1 -1
  65. package/dist/shared/node_modules/react-transition-group/esm/Transition.cjs.js.map +1 -1
  66. package/dist/shared/node_modules/react-transition-group/esm/Transition.es.js +1 -1
  67. package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.cjs.js +1 -1
  68. package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.cjs.js.map +1 -1
  69. package/dist/shared/node_modules/react-transition-group/esm/utils/PropTypes.es.js +1 -1
  70. package/dist/shared/src/api/base/client.cjs.js +1 -1
  71. package/dist/shared/src/api/base/client.cjs.js.map +1 -1
  72. package/dist/shared/src/api/base/client.es.js +4 -4
  73. package/dist/shared/src/api/base/client.es.js.map +1 -1
  74. package/dist/shared/src/api/generated/graphql.cjs.js +50 -50
  75. package/dist/shared/src/api/generated/graphql.cjs.js.map +1 -1
  76. package/dist/shared/src/api/generated/graphql.es.js +162 -151
  77. package/dist/shared/src/api/generated/graphql.es.js.map +1 -1
  78. package/dist/shared/src/api/generated/graphqlLinks.cjs.js +21 -21
  79. package/dist/shared/src/api/generated/graphqlLinks.cjs.js.map +1 -1
  80. package/dist/shared/src/api/generated/graphqlLinks.es.js +80 -69
  81. package/dist/shared/src/api/generated/graphqlLinks.es.js.map +1 -1
  82. package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js +1 -1
  83. package/dist/shared/src/components/RemotePage/RemotePageWrapper.cjs.js.map +1 -1
  84. package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js +16 -16
  85. package/dist/shared/src/components/RemotePage/RemotePageWrapper.es.js.map +1 -1
  86. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js +1 -1
  87. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.cjs.js.map +1 -1
  88. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js +29 -24
  89. package/dist/shared/src/containers/Views/utils/viewUpdateHelper.es.js.map +1 -1
  90. package/dist/types/api/base/client.d.ts +5 -2
  91. package/dist/types/api/generated/access.d.ts +32 -8
  92. package/dist/types/api/generated/actions.d.ts +28 -7
  93. package/dist/types/api/generated/activityFeed.d.ts +40 -10
  94. package/dist/types/api/generated/addons.d.ts +116 -29
  95. package/dist/types/api/generated/anatomy.d.ts +36 -9
  96. package/dist/types/api/generated/attributes.d.ts +28 -7
  97. package/dist/types/api/generated/authentication.d.ts +28 -7
  98. package/dist/types/api/generated/bundles.d.ts +32 -8
  99. package/dist/types/api/generated/configuration.d.ts +32 -8
  100. package/dist/types/api/generated/dataImport.d.ts +20 -5
  101. package/dist/types/api/generated/desktop.d.ts +52 -13
  102. package/dist/types/api/generated/entityLists.d.ts +72 -18
  103. package/dist/types/api/generated/enums.d.ts +8 -2
  104. package/dist/types/api/generated/events.d.ts +36 -9
  105. package/dist/types/api/generated/files.d.ts +36 -9
  106. package/dist/types/api/generated/folders.d.ts +40 -10
  107. package/dist/types/api/generated/graphql.d.ts +192 -84
  108. package/dist/types/api/generated/graphqlLinks.d.ts +103 -40
  109. package/dist/types/api/generated/grouping.d.ts +8 -2
  110. package/dist/types/api/generated/inbox.d.ts +8 -2
  111. package/dist/types/api/generated/links.d.ts +24 -6
  112. package/dist/types/api/generated/market.d.ts +28 -7
  113. package/dist/types/api/generated/onboarding.d.ts +16 -4
  114. package/dist/types/api/generated/operations.d.ts +24 -6
  115. package/dist/types/api/generated/products.d.ts +28 -7
  116. package/dist/types/api/generated/projectDashboard.d.ts +20 -5
  117. package/dist/types/api/generated/projectFolders.d.ts +28 -7
  118. package/dist/types/api/generated/projects.d.ts +176 -44
  119. package/dist/types/api/generated/representations.d.ts +24 -6
  120. package/dist/types/api/generated/reviewables.d.ts +32 -8
  121. package/dist/types/api/generated/services.d.ts +28 -7
  122. package/dist/types/api/generated/system.d.ts +56 -14
  123. package/dist/types/api/generated/tasks.d.ts +36 -9
  124. package/dist/types/api/generated/teams.d.ts +28 -7
  125. package/dist/types/api/generated/thumbnails.d.ts +48 -12
  126. package/dist/types/api/generated/uRIs.d.ts +12 -3
  127. package/dist/types/api/generated/users.d.ts +108 -27
  128. package/dist/types/api/generated/versions.d.ts +28 -7
  129. package/dist/types/api/generated/views.d.ts +40 -10
  130. package/dist/types/api/generated/workfiles.d.ts +28 -7
  131. package/dist/types/api/generated/ynputCloud.d.ts +24 -6
  132. package/dist/types/api/queries/actions/getActions.d.ts +248 -77
  133. package/dist/types/api/queries/activities/getActivities.d.ts +416 -104
  134. package/dist/types/api/queries/activities/getCategories.d.ts +60 -15
  135. package/dist/types/api/queries/activities/getMentions.d.ts +104 -26
  136. package/dist/types/api/queries/activities/updateActivities.d.ts +346 -109
  137. package/dist/types/api/queries/activities/updateReaction.d.ts +68 -32
  138. package/dist/types/api/queries/addons/getAddons.d.ts +368 -92
  139. package/dist/types/api/queries/addons/updateAddons.d.ts +164 -56
  140. package/dist/types/api/queries/attributes/getAttributes.d.ts +148 -37
  141. package/dist/types/api/queries/attributes/updateAttributes.d.ts +84 -36
  142. package/dist/types/api/queries/authentication/getAuthentication.d.ts +102 -33
  143. package/dist/types/api/queries/cloud/cloud.d.ts +172 -58
  144. package/dist/types/api/queries/config/getConfig.d.ts +272 -68
  145. package/dist/types/api/queries/config/updateConfig.d.ts +46 -19
  146. package/dist/types/api/queries/entities/getEntity.d.ts +448 -112
  147. package/dist/types/api/queries/entities/getEntityPanel.d.ts +260 -65
  148. package/dist/types/api/queries/entities/updateEntity.d.ts +184 -61
  149. package/dist/types/api/queries/entityLists/getLists.d.ts +556 -139
  150. package/dist/types/api/queries/entityLists/getListsAttributes.d.ts +132 -33
  151. package/dist/types/api/queries/entityLists/listFolders.d.ts +102 -48
  152. package/dist/types/api/queries/entityLists/updateLists.d.ts +188 -107
  153. package/dist/types/api/queries/entityLists/updateListsAttributes.d.ts +86 -29
  154. package/dist/types/api/queries/folders/getFolders.d.ts +160 -40
  155. package/dist/types/api/queries/grouping/getGrouping.d.ts +68 -17
  156. package/dist/types/api/queries/links/getEntityLinks.d.ts +104 -26
  157. package/dist/types/api/queries/links/getLinks.d.ts +32 -8
  158. package/dist/types/api/queries/links/updateLinks.d.ts +28 -22
  159. package/dist/types/api/queries/overview/getOverview.d.ts +484 -121
  160. package/dist/types/api/queries/overview/updateOverview.d.ts +14 -11
  161. package/dist/types/api/queries/permissions/getPermissions.d.ts +228 -57
  162. package/dist/types/api/queries/products/createProduct.d.ts +14 -11
  163. package/dist/types/api/queries/products/getFolderProducts.d.ts +60 -15
  164. package/dist/types/api/queries/project/getProject.d.ts +356 -89
  165. package/dist/types/api/queries/project/updateProject.d.ts +70 -55
  166. package/dist/types/api/queries/projectFolders/projectFolders.d.ts +130 -70
  167. package/dist/types/api/queries/review/getReview.d.ts +220 -55
  168. package/dist/types/api/queries/review/updateReview.d.ts +86 -44
  169. package/dist/types/api/queries/share/share.d.ts +92 -23
  170. package/dist/types/api/queries/system/getSystem.d.ts +236 -59
  171. package/dist/types/api/queries/tasks/getTasks.d.ts +60 -15
  172. package/dist/types/api/queries/tasks/updateTasks.d.ts +14 -11
  173. package/dist/types/api/queries/teams/getTeams.d.ts +158 -77
  174. package/dist/types/api/queries/uris/getUris.d.ts +14 -11
  175. package/dist/types/api/queries/userDashboard/getUserDashboard.d.ts +320 -80
  176. package/dist/types/api/queries/users/getUsers.d.ts +748 -187
  177. package/dist/types/api/queries/users/guests.d.ts +88 -37
  178. package/dist/types/api/queries/users/updateUsers.d.ts +276 -144
  179. package/dist/types/api/queries/versions/getVersionsProducts.d.ts +532 -133
  180. package/dist/types/api/queries/versions/updateVersions.d.ts +176 -59
  181. package/dist/types/api/queries/views/getViews.d.ts +340 -85
  182. package/dist/types/api/queries/views/updateViews.d.ts +136 -64
  183. package/dist/types/api/queries/watchers/getWatchers.d.ts +122 -38
  184. package/dist/types/containers/Views/utils/viewUpdateHelper.d.ts +2 -0
  185. package/dist/types/hooks/useGetEntityGroups.d.ts +1 -1
  186. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- var pe = /* @__PURE__ */ Symbol.for("immer-nothing"), U = /* @__PURE__ */ Symbol.for("immer-draftable"), g = /* @__PURE__ */ Symbol.for("immer-state"), ze = process.env.NODE_ENV !== "production" ? [
1
+ var ye = /* @__PURE__ */ Symbol.for("immer-nothing"), x = /* @__PURE__ */ Symbol.for("immer-draftable"), g = /* @__PURE__ */ Symbol.for("immer-state"), Ce = process.env.NODE_ENV !== "production" ? [
2
2
  // All error codes, starting by 0:
3
3
  function(e) {
4
4
  return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
@@ -31,118 +31,123 @@ var pe = /* @__PURE__ */ Symbol.for("immer-nothing"), U = /* @__PURE__ */ Symbol
31
31
  ] : [];
32
32
  function m(e, ...t) {
33
33
  if (process.env.NODE_ENV !== "production") {
34
- const r = ze[e], n = D(r) ? r.apply(null, t) : r;
34
+ const r = Ce[e], n = F(r) ? r.apply(null, t) : r;
35
35
  throw new Error(`[Immer] ${n}`);
36
36
  }
37
37
  throw new Error(
38
38
  `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
39
39
  );
40
40
  }
41
- var v = Object, I = v.getPrototypeOf, $ = "constructor", Y = "prototype", ae = "configurable", j = "enumerable", Q = "writable", W = "value", z = (e) => !!e && !!e[g];
42
- function C(e) {
43
- return e ? Ce(e) || H(e) || !!e[U] || !!e[$]?.[U] || X(e) || q(e) : !1;
41
+ var v = Object, D = v.getPrototypeOf, L = "constructor", K = "prototype", ue = "configurable", j = "enumerable", Q = "writable", W = "value", z = (e) => !!e && !!e[g];
42
+ function I(e) {
43
+ return e ? Ee(e) || H(e) || !!e[x] || !!e[L]?.[x] || X(e) || q(e) : !1;
44
44
  }
45
- var Ne = v[Y][$].toString(), ge = /* @__PURE__ */ new WeakMap();
46
- function Ce(e) {
47
- if (!e || !T(e))
45
+ var Te = v[K][L].toString(), Se = /* @__PURE__ */ new WeakMap();
46
+ function Ee(e) {
47
+ if (!e || !V(e))
48
48
  return !1;
49
- const t = I(e);
50
- if (t === null || t === v[Y])
49
+ const t = D(e);
50
+ if (t === null || t === v[K])
51
51
  return !0;
52
- const r = v.hasOwnProperty.call(t, $) && t[$];
52
+ const r = v.hasOwnProperty.call(t, L) && t[L];
53
53
  if (r === Object)
54
54
  return !0;
55
- if (!D(r))
55
+ if (!F(r))
56
56
  return !1;
57
- let n = ge.get(r);
58
- return n === void 0 && (n = Function.toString.call(r), ge.set(r, n)), n === Ne;
57
+ let n = Se.get(r);
58
+ return n === void 0 && (n = Function.toString.call(r), Se.set(r, n)), n === Te;
59
59
  }
60
- function qe(e) {
60
+ function Ze(e) {
61
61
  return z(e) || m(15, e), e[g].base_;
62
62
  }
63
- function V(e, t, r = !0) {
64
- A(e) === 0 ? (r ? Reflect.ownKeys(e) : v.keys(e)).forEach((i) => {
63
+ function Y(e, t, r = !0) {
64
+ M(e) === 0 ? (r ? Reflect.ownKeys(e) : v.keys(e)).forEach((i) => {
65
65
  t(i, e[i], e);
66
66
  }) : e.forEach((n, i) => t(i, n, e));
67
67
  }
68
- function A(e) {
68
+ function M(e) {
69
69
  const t = e[g];
70
70
  return t ? t.type_ : H(e) ? 1 : X(e) ? 2 : q(e) ? 3 : 0;
71
71
  }
72
- var L = (e, t, r = A(e)) => r === 2 ? e.has(t) : v[Y].hasOwnProperty.call(e, t), E = (e, t, r = A(e)) => (
72
+ var U = (e, t, r = M(e)) => r === 2 ? e.has(t) : v[K].hasOwnProperty.call(e, t), A = (e, t, r = M(e)) => (
73
73
  // @ts-ignore
74
74
  r === 2 ? e.get(t) : e[t]
75
- ), ee = (e, t, r, n = A(e)) => {
75
+ ), ee = (e, t, r, n = M(e)) => {
76
76
  n === 2 ? e.set(t, r) : n === 3 ? e.add(r) : e[t] = r;
77
77
  };
78
- function Re(e, t) {
78
+ function Ve(e, t) {
79
79
  return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
80
80
  }
81
- var H = Array.isArray, X = (e) => e instanceof Map, q = (e) => e instanceof Set, T = (e) => typeof e == "object", D = (e) => typeof e == "function", ce = (e) => typeof e == "boolean", Te = (e) => T(e) ? e?.[g] : null, k = (e) => e.copy_ || e.base_, he = (e) => e.modified_ ? e.copy_ : e.base_;
82
- function fe(e, t) {
81
+ var H = Array.isArray, X = (e) => e instanceof Map, q = (e) => e instanceof Set, V = (e) => typeof e == "object", F = (e) => typeof e == "function", ae = (e) => typeof e == "boolean";
82
+ function xe(e) {
83
+ const t = +e;
84
+ return Number.isInteger(t) && String(t) === e;
85
+ }
86
+ var Ue = (e) => V(e) ? e?.[g] : null, C = (e) => e.copy_ || e.base_, me = (e) => e.modified_ ? e.copy_ : e.base_;
87
+ function le(e, t) {
83
88
  if (X(e))
84
89
  return new Map(e);
85
90
  if (q(e))
86
91
  return new Set(e);
87
92
  if (H(e))
88
- return Array[Y].slice.call(e);
89
- const r = Ce(e);
93
+ return Array[K].slice.call(e);
94
+ const r = Ee(e);
90
95
  if (t === !0 || t === "class_only" && !r) {
91
96
  const n = v.getOwnPropertyDescriptors(e);
92
97
  delete n[g];
93
98
  let i = Reflect.ownKeys(n);
94
- for (let c = 0; c < i.length; c++) {
95
- const _ = i[c], p = n[_];
96
- p[Q] === !1 && (p[Q] = !0, p[ae] = !0), (p.get || p.set) && (n[_] = {
97
- [ae]: !0,
99
+ for (let o = 0; o < i.length; o++) {
100
+ const u = i[o], _ = n[u];
101
+ _[Q] === !1 && (_[Q] = !0, _[ue] = !0), (_.get || _.set) && (n[u] = {
102
+ [ue]: !0,
98
103
  [Q]: !0,
99
104
  // could live with !!desc.set as well here...
100
- [j]: p[j],
101
- [W]: e[_]
105
+ [j]: _[j],
106
+ [W]: e[u]
102
107
  });
103
108
  }
104
- return v.create(I(e), n);
109
+ return v.create(D(e), n);
105
110
  } else {
106
- const n = I(e);
111
+ const n = D(e);
107
112
  if (n !== null && r)
108
113
  return { ...e };
109
114
  const i = v.create(n);
110
115
  return v.assign(i, e);
111
116
  }
112
117
  }
113
- function ye(e, t = !1) {
114
- return ie(e) || z(e) || !C(e) || (A(e) > 1 && v.defineProperties(e, {
118
+ function ge(e, t = !1) {
119
+ return ce(e) || z(e) || !I(e) || (M(e) > 1 && v.defineProperties(e, {
115
120
  set: J,
116
121
  add: J,
117
122
  clear: J,
118
123
  delete: J
119
- }), v.freeze(e), t && V(
124
+ }), v.freeze(e), t && Y(
120
125
  e,
121
126
  (r, n) => {
122
- ye(n, !0);
127
+ ge(n, !0);
123
128
  },
124
129
  !1
125
130
  )), e;
126
131
  }
127
- function Me() {
132
+ function Le() {
128
133
  m(2);
129
134
  }
130
135
  var J = {
131
- [W]: Me
136
+ [W]: Le
132
137
  };
133
- function ie(e) {
134
- return e === null || !T(e) ? !0 : v.isFrozen(e);
138
+ function ce(e) {
139
+ return e === null || !V(e) ? !0 : v.isFrozen(e);
135
140
  }
136
- var te = "MapSet", re = "Patches", ne = {};
137
- function M(e) {
141
+ var te = "MapSet", re = "Patches", ve = "ArrayMethods", ne = {};
142
+ function b(e) {
138
143
  const t = ne[e];
139
144
  return t || m(0, e), t;
140
145
  }
141
- var Ve = (e) => !!ne[e];
142
- function xe(e, t) {
146
+ var we = (e) => !!ne[e];
147
+ function We(e, t) {
143
148
  ne[e] || (ne[e] = t);
144
149
  }
145
- var B, Ee = () => B, Ue = (e, t) => ({
150
+ var $, ke = () => $, $e = (e, t) => ({
146
151
  drafts_: [],
147
152
  parent_: e,
148
153
  immer_: t,
@@ -152,27 +157,28 @@ var B, Ee = () => B, Ue = (e, t) => ({
152
157
  unfinalizedDrafts_: 0,
153
158
  handledSet_: /* @__PURE__ */ new Set(),
154
159
  processedForPatches_: /* @__PURE__ */ new Set(),
155
- mapSetPlugin_: Ve(te) ? M(te) : void 0
160
+ mapSetPlugin_: we(te) ? b(te) : void 0,
161
+ arrayMethodsPlugin_: we(ve) ? b(ve) : void 0
156
162
  });
157
- function ve(e, t) {
158
- t && (e.patchPlugin_ = M(re), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
163
+ function Oe(e, t) {
164
+ t && (e.patchPlugin_ = b(re), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
159
165
  }
160
- function ue(e) {
161
- le(e), e.drafts_.forEach(Le), e.drafts_ = null;
166
+ function de(e) {
167
+ _e(e), e.drafts_.forEach(Be), e.drafts_ = null;
162
168
  }
163
- function le(e) {
164
- e === B && (B = e.parent_);
169
+ function _e(e) {
170
+ e === $ && ($ = e.parent_);
165
171
  }
166
- var Se = (e) => B = Ue(B, e);
167
- function Le(e) {
172
+ var ze = (e) => $ = $e($, e);
173
+ function Be(e) {
168
174
  const t = e[g];
169
175
  t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
170
176
  }
171
- function we(e, t) {
177
+ function Ie(e, t) {
172
178
  t.unfinalizedDrafts_ = t.drafts_.length;
173
179
  const r = t.drafts_[0];
174
180
  if (e !== void 0 && e !== r) {
175
- r[g].modified_ && (ue(t), m(4)), C(e) && (e = Oe(t, e));
181
+ r[g].modified_ && (de(t), m(4)), I(e) && (e = Ae(t, e));
176
182
  const { patchPlugin_: i } = t;
177
183
  i && i.generateReplacementPatches_(
178
184
  r[g].base_,
@@ -180,16 +186,16 @@ function we(e, t) {
180
186
  t
181
187
  );
182
188
  } else
183
- e = Oe(t, r);
184
- return $e(t, e, !0), ue(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== pe ? e : void 0;
189
+ e = Ae(t, r);
190
+ return Ge(t, e, !0), de(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== ye ? e : void 0;
185
191
  }
186
- function Oe(e, t) {
187
- if (ie(t))
192
+ function Ae(e, t) {
193
+ if (ce(t))
188
194
  return t;
189
195
  const r = t[g];
190
196
  if (!r)
191
- return me(t, e.handledSet_, e);
192
- if (!oe(r, e))
197
+ return ie(t, e.handledSet_, e);
198
+ if (!se(r, e))
193
199
  return t;
194
200
  if (!r.modified_)
195
201
  return r.base_;
@@ -198,90 +204,90 @@ function Oe(e, t) {
198
204
  if (n)
199
205
  for (; n.length > 0; )
200
206
  n.pop()(e);
201
- De(r, e);
207
+ Me(r, e);
202
208
  }
203
209
  return r.copy_;
204
210
  }
205
- function $e(e, t, r = !1) {
206
- !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && ye(t, r);
211
+ function Ge(e, t, r = !1) {
212
+ !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && ge(t, r);
207
213
  }
208
- function ke(e) {
214
+ function Fe(e) {
209
215
  e.finalized_ = !0, e.scope_.unfinalizedDrafts_--;
210
216
  }
211
- var oe = (e, t) => e.scope_ === t, We = [];
212
- function Fe(e, t, r, n) {
213
- const i = k(e), c = e.type_;
214
- if (n !== void 0 && E(i, n, c) === t) {
215
- ee(i, n, r, c);
217
+ var se = (e, t) => e.scope_ === t, Ke = [];
218
+ function De(e, t, r, n) {
219
+ const i = C(e), o = e.type_;
220
+ if (n !== void 0 && A(i, n, o) === t) {
221
+ ee(i, n, r, o);
216
222
  return;
217
223
  }
218
224
  if (!e.draftLocations_) {
219
- const p = e.draftLocations_ = /* @__PURE__ */ new Map();
220
- V(i, (S, w) => {
221
- if (z(w)) {
222
- const b = p.get(w) || [];
223
- b.push(S), p.set(w, b);
225
+ const _ = e.draftLocations_ = /* @__PURE__ */ new Map();
226
+ Y(i, (w, O) => {
227
+ if (z(O)) {
228
+ const N = _.get(O) || [];
229
+ N.push(w), _.set(O, N);
224
230
  }
225
231
  });
226
232
  }
227
- const _ = e.draftLocations_.get(t) ?? We;
228
- for (const p of _)
229
- ee(i, p, r, c);
233
+ const u = e.draftLocations_.get(t) ?? Ke;
234
+ for (const _ of u)
235
+ ee(i, _, r, o);
230
236
  }
231
- function Be(e, t, r) {
237
+ function Ye(e, t, r) {
232
238
  e.callbacks_.push(function(i) {
233
- const c = t;
234
- if (!c || !oe(c, i))
239
+ const o = t;
240
+ if (!o || !se(o, i))
235
241
  return;
236
- i.mapSetPlugin_?.fixSetContents(c);
237
- const _ = he(c);
238
- Fe(e, c.draft_ ?? c, _, r), De(c, i);
242
+ i.mapSetPlugin_?.fixSetContents(o);
243
+ const u = me(o);
244
+ De(e, o.draft_ ?? o, u, r), Me(o, i);
239
245
  });
240
246
  }
241
- function De(e, t) {
242
- if (e.modified_ && !e.finalized_ && (e.type_ === 3 || (e.assigned_?.size ?? 0) > 0)) {
247
+ function Me(e, t) {
248
+ if (e.modified_ && !e.finalized_ && (e.type_ === 3 || e.type_ === 1 && e.allIndicesReassigned_ || (e.assigned_?.size ?? 0) > 0)) {
243
249
  const { patchPlugin_: n } = t;
244
250
  if (n) {
245
251
  const i = n.getPath(e);
246
252
  i && n.generatePatches_(e, i, t);
247
253
  }
248
- ke(e);
254
+ Fe(e);
249
255
  }
250
256
  }
251
- function Ge(e, t, r) {
257
+ function He(e, t, r) {
252
258
  const { scope_: n } = e;
253
259
  if (z(r)) {
254
260
  const i = r[g];
255
- oe(i, n) && i.callbacks_.push(function() {
261
+ se(i, n) && i.callbacks_.push(function() {
256
262
  Z(e);
257
- const _ = he(i);
258
- Fe(e, r, _, t);
263
+ const u = me(i);
264
+ De(e, r, u, t);
259
265
  });
260
- } else C(r) && e.callbacks_.push(function() {
261
- const c = k(e);
262
- E(c, t, e.type_) === r && n.drafts_.length > 1 && (e.assigned_.get(t) ?? !1) === !0 && e.copy_ && me(
263
- E(e.copy_, t, e.type_),
266
+ } else I(r) && e.callbacks_.push(function() {
267
+ const o = C(e);
268
+ e.type_ === 3 ? o.has(r) && ie(r, n.handledSet_, n) : A(o, t, e.type_) === r && n.drafts_.length > 1 && (e.assigned_.get(t) ?? !1) === !0 && e.copy_ && ie(
269
+ A(e.copy_, t, e.type_),
264
270
  n.handledSet_,
265
271
  n
266
272
  );
267
273
  });
268
274
  }
269
- function me(e, t, r) {
270
- return !r.immer_.autoFreeze_ && r.unfinalizedDrafts_ < 1 || z(e) || t.has(e) || !C(e) || ie(e) || (t.add(e), V(e, (n, i) => {
275
+ function ie(e, t, r) {
276
+ return !r.immer_.autoFreeze_ && r.unfinalizedDrafts_ < 1 || z(e) || t.has(e) || !I(e) || ce(e) || (t.add(e), Y(e, (n, i) => {
271
277
  if (z(i)) {
272
- const c = i[g];
273
- if (oe(c, r)) {
274
- const _ = he(c);
275
- ee(e, n, _, e.type_), ke(c);
278
+ const o = i[g];
279
+ if (se(o, r)) {
280
+ const u = me(o);
281
+ ee(e, n, u, e.type_), Fe(o);
276
282
  }
277
- } else C(i) && me(i, t, r);
283
+ } else I(i) && ie(i, t, r);
278
284
  })), e;
279
285
  }
280
- function Ke(e, t) {
286
+ function Xe(e, t) {
281
287
  const r = H(e), n = {
282
288
  type_: r ? 1 : 0,
283
289
  // Track which produce call this is associated with.
284
- scope_: t ? t.scope_ : Ee(),
290
+ scope_: t ? t.scope_ : ke(),
285
291
  // True for both shallow and deep changes.
286
292
  modified_: !1,
287
293
  // Used during finalization.
@@ -304,60 +310,66 @@ function Ke(e, t) {
304
310
  // `callbacks` actually gets assigned in `createProxy`
305
311
  callbacks_: void 0
306
312
  };
307
- let i = n, c = Pe;
308
- r && (i = [n], c = G);
309
- const { revoke: _, proxy: p } = Proxy.revocable(i, c);
310
- return n.draft_ = p, n.revoke_ = _, [p, n];
313
+ let i = n, o = oe;
314
+ r && (i = [n], o = B);
315
+ const { revoke: u, proxy: _ } = Proxy.revocable(i, o);
316
+ return n.draft_ = _, n.revoke_ = u, [_, n];
311
317
  }
312
- var Pe = {
318
+ var oe = {
313
319
  get(e, t) {
314
320
  if (t === g)
315
321
  return e;
316
- const r = k(e);
317
- if (!L(r, t, e.type_))
318
- return Ye(e, r, t);
319
- const n = r[t];
320
- if (e.finalized_ || !C(n))
321
- return n;
322
- if (n === se(e.base_, t)) {
322
+ let r = e.scope_.arrayMethodsPlugin_;
323
+ const n = e.type_ === 1 && typeof t == "string";
324
+ if (n && r?.isArrayOperationMethod(t))
325
+ return r.createMethodInterceptor(e, t);
326
+ const i = C(e);
327
+ if (!U(i, t, e.type_))
328
+ return qe(e, i, t);
329
+ const o = i[t];
330
+ if (e.finalized_ || !I(o) || n && e.operationMethod && r?.isMutatingArrayMethod(
331
+ e.operationMethod
332
+ ) && xe(t))
333
+ return o;
334
+ if (o === fe(e.base_, t)) {
323
335
  Z(e);
324
- const i = e.type_ === 1 ? +t : t, c = de(e.scope_, n, e, i);
325
- return e.copy_[i] = c;
336
+ const u = e.type_ === 1 ? +t : t, _ = he(e.scope_, o, e, u);
337
+ return e.copy_[u] = _;
326
338
  }
327
- return n;
339
+ return o;
328
340
  },
329
341
  has(e, t) {
330
- return t in k(e);
342
+ return t in C(e);
331
343
  },
332
344
  ownKeys(e) {
333
- return Reflect.ownKeys(k(e));
345
+ return Reflect.ownKeys(C(e));
334
346
  },
335
347
  set(e, t, r) {
336
- const n = Ie(k(e), t);
348
+ const n = be(C(e), t);
337
349
  if (n?.set)
338
350
  return n.set.call(e.draft_, r), !0;
339
351
  if (!e.modified_) {
340
- const i = se(k(e), t), c = i?.[g];
341
- if (c && c.base_ === r)
352
+ const i = fe(C(e), t), o = i?.[g];
353
+ if (o && o.base_ === r)
342
354
  return e.copy_[t] = r, e.assigned_.set(t, !1), !0;
343
- if (Re(r, i) && (r !== void 0 || L(e.base_, t, e.type_)))
355
+ if (Ve(r, i) && (r !== void 0 || U(e.base_, t, e.type_)))
344
356
  return !0;
345
- Z(e), _e(e);
357
+ Z(e), pe(e);
346
358
  }
347
359
  return e.copy_[t] === r && // special case: handle new props with value 'undefined'
348
360
  (r !== void 0 || t in e.copy_) || // special case: NaN
349
- Number.isNaN(r) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = r, e.assigned_.set(t, !0), Ge(e, t, r)), !0;
361
+ Number.isNaN(r) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = r, e.assigned_.set(t, !0), He(e, t, r)), !0;
350
362
  },
351
363
  deleteProperty(e, t) {
352
- return Z(e), se(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), _e(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
364
+ return Z(e), fe(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), pe(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
353
365
  },
354
366
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
355
367
  // the same guarantee in ES5 mode.
356
368
  getOwnPropertyDescriptor(e, t) {
357
- const r = k(e), n = Reflect.getOwnPropertyDescriptor(r, t);
369
+ const r = C(e), n = Reflect.getOwnPropertyDescriptor(r, t);
358
370
  return n && {
359
371
  [Q]: !0,
360
- [ae]: e.type_ !== 1 || t !== "length",
372
+ [ue]: e.type_ !== 1 || t !== "length",
361
373
  [j]: n[j],
362
374
  [W]: r[t]
363
375
  };
@@ -366,108 +378,109 @@ var Pe = {
366
378
  m(11);
367
379
  },
368
380
  getPrototypeOf(e) {
369
- return I(e.base_);
381
+ return D(e.base_);
370
382
  },
371
383
  setPrototypeOf() {
372
384
  m(12);
373
385
  }
374
- }, G = {};
375
- V(Pe, (e, t) => {
376
- G[e] = function() {
386
+ }, B = {};
387
+ for (let e in oe) {
388
+ let t = oe[e];
389
+ B[e] = function() {
377
390
  const r = arguments;
378
391
  return r[0] = r[0][0], t.apply(this, r);
379
392
  };
380
- });
381
- G.deleteProperty = function(e, t) {
382
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && m(13), G.set.call(this, e, t, void 0);
393
+ }
394
+ B.deleteProperty = function(e, t) {
395
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && m(13), B.set.call(this, e, t, void 0);
383
396
  };
384
- G.set = function(e, t, r) {
385
- return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && m(14), Pe.set.call(this, e[0], t, r, e[0]);
397
+ B.set = function(e, t, r) {
398
+ return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && m(14), oe.set.call(this, e[0], t, r, e[0]);
386
399
  };
387
- function se(e, t) {
400
+ function fe(e, t) {
388
401
  const r = e[g];
389
- return (r ? k(r) : e)[t];
402
+ return (r ? C(r) : e)[t];
390
403
  }
391
- function Ye(e, t, r) {
392
- const n = Ie(t, r);
404
+ function qe(e, t, r) {
405
+ const n = be(t, r);
393
406
  return n ? W in n ? n[W] : (
394
407
  // This is a very special case, if the prop is a getter defined by the
395
408
  // prototype, we should invoke it with the draft as context!
396
409
  n.get?.call(e.draft_)
397
410
  ) : void 0;
398
411
  }
399
- function Ie(e, t) {
412
+ function be(e, t) {
400
413
  if (!(t in e))
401
414
  return;
402
- let r = I(e);
415
+ let r = D(e);
403
416
  for (; r; ) {
404
417
  const n = Object.getOwnPropertyDescriptor(r, t);
405
418
  if (n)
406
419
  return n;
407
- r = I(r);
420
+ r = D(r);
408
421
  }
409
422
  }
410
- function _e(e) {
411
- e.modified_ || (e.modified_ = !0, e.parent_ && _e(e.parent_));
423
+ function pe(e) {
424
+ e.modified_ || (e.modified_ = !0, e.parent_ && pe(e.parent_));
412
425
  }
413
426
  function Z(e) {
414
- e.copy_ || (e.assigned_ = /* @__PURE__ */ new Map(), e.copy_ = fe(
427
+ e.copy_ || (e.assigned_ = /* @__PURE__ */ new Map(), e.copy_ = le(
415
428
  e.base_,
416
429
  e.scope_.immer_.useStrictShallowCopy_
417
430
  ));
418
431
  }
419
- var He = class {
432
+ var Je = class {
420
433
  constructor(e) {
421
434
  this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (t, r, n) => {
422
- if (D(t) && !D(r)) {
423
- const c = r;
435
+ if (F(t) && !F(r)) {
436
+ const o = r;
424
437
  r = t;
425
- const _ = this;
426
- return function(S = c, ...w) {
427
- return _.produce(S, (b) => r.call(this, b, ...w));
438
+ const u = this;
439
+ return function(w = o, ...O) {
440
+ return u.produce(w, (N) => r.call(this, N, ...O));
428
441
  };
429
442
  }
430
- D(r) || m(6), n !== void 0 && !D(n) && m(7);
443
+ F(r) || m(6), n !== void 0 && !F(n) && m(7);
431
444
  let i;
432
- if (C(t)) {
433
- const c = Se(this), _ = de(c, t, void 0);
434
- let p = !0;
445
+ if (I(t)) {
446
+ const o = ze(this), u = he(o, t, void 0);
447
+ let _ = !0;
435
448
  try {
436
- i = r(_), p = !1;
449
+ i = r(u), _ = !1;
437
450
  } finally {
438
- p ? ue(c) : le(c);
451
+ _ ? de(o) : _e(o);
439
452
  }
440
- return ve(c, n), we(i, c);
441
- } else if (!t || !T(t)) {
442
- if (i = r(t), i === void 0 && (i = t), i === pe && (i = void 0), this.autoFreeze_ && ye(i, !0), n) {
443
- const c = [], _ = [];
444
- M(re).generateReplacementPatches_(t, i, {
445
- patches_: c,
446
- inversePatches_: _
447
- }), n(c, _);
453
+ return Oe(o, n), Ie(i, o);
454
+ } else if (!t || !V(t)) {
455
+ if (i = r(t), i === void 0 && (i = t), i === ye && (i = void 0), this.autoFreeze_ && ge(i, !0), n) {
456
+ const o = [], u = [];
457
+ b(re).generateReplacementPatches_(t, i, {
458
+ patches_: o,
459
+ inversePatches_: u
460
+ }), n(o, u);
448
461
  }
449
462
  return i;
450
463
  } else
451
464
  m(1, t);
452
465
  }, this.produceWithPatches = (t, r) => {
453
- if (D(t))
454
- return (_, ...p) => this.produceWithPatches(_, (S) => t(S, ...p));
466
+ if (F(t))
467
+ return (u, ..._) => this.produceWithPatches(u, (w) => t(w, ..._));
455
468
  let n, i;
456
- return [this.produce(t, r, (_, p) => {
457
- n = _, i = p;
469
+ return [this.produce(t, r, (u, _) => {
470
+ n = u, i = _;
458
471
  }), n, i];
459
- }, ce(e?.autoFreeze) && this.setAutoFreeze(e.autoFreeze), ce(e?.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), ce(e?.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
472
+ }, ae(e?.autoFreeze) && this.setAutoFreeze(e.autoFreeze), ae(e?.useStrictShallowCopy) && this.setUseStrictShallowCopy(e.useStrictShallowCopy), ae(e?.useStrictIteration) && this.setUseStrictIteration(e.useStrictIteration);
460
473
  }
461
474
  createDraft(e) {
462
- C(e) || m(8), z(e) && (e = Xe(e));
463
- const t = Se(this), r = de(t, e, void 0);
464
- return r[g].isManual_ = !0, le(t), r;
475
+ I(e) || m(8), z(e) && (e = Qe(e));
476
+ const t = ze(this), r = he(t, e, void 0);
477
+ return r[g].isManual_ = !0, _e(t), r;
465
478
  }
466
479
  finishDraft(e, t) {
467
480
  const r = e && e[g];
468
481
  (!r || !r.isManual_) && m(9);
469
482
  const { scope_: n } = r;
470
- return ve(n, t), we(void 0, n);
483
+ return Oe(n, t), Ie(void 0, n);
471
484
  }
472
485
  /**
473
486
  * Pass true to automatically freeze all copies created by Immer.
@@ -507,308 +520,309 @@ var He = class {
507
520
  }
508
521
  }
509
522
  r > -1 && (t = t.slice(r + 1));
510
- const n = M(re).applyPatches_;
523
+ const n = b(re).applyPatches_;
511
524
  return z(e) ? n(e, t) : this.produce(
512
525
  e,
513
526
  (i) => n(i, t)
514
527
  );
515
528
  }
516
529
  };
517
- function de(e, t, r, n) {
518
- const [i, c] = X(t) ? M(te).proxyMap_(t, r) : q(t) ? M(te).proxySet_(t, r) : Ke(t, r);
519
- return (r?.scope_ ?? Ee()).drafts_.push(i), c.callbacks_ = r?.callbacks_ ?? [], c.key_ = n, r && n !== void 0 ? Be(r, c, n) : c.callbacks_.push(function(S) {
520
- S.mapSetPlugin_?.fixSetContents(c);
521
- const { patchPlugin_: w } = S;
522
- c.modified_ && w && w.generatePatches_(c, [], S);
530
+ function he(e, t, r, n) {
531
+ const [i, o] = X(t) ? b(te).proxyMap_(t, r) : q(t) ? b(te).proxySet_(t, r) : Xe(t, r);
532
+ return (r?.scope_ ?? ke()).drafts_.push(i), o.callbacks_ = r?.callbacks_ ?? [], o.key_ = n, r && n !== void 0 ? Ye(r, o, n) : o.callbacks_.push(function(w) {
533
+ w.mapSetPlugin_?.fixSetContents(o);
534
+ const { patchPlugin_: O } = w;
535
+ o.modified_ && O && O.generatePatches_(o, [], w);
523
536
  }), i;
524
537
  }
525
- function Xe(e) {
526
- return z(e) || m(10, e), Ae(e);
538
+ function Qe(e) {
539
+ return z(e) || m(10, e), Ne(e);
527
540
  }
528
- function Ae(e) {
529
- if (!C(e) || ie(e))
541
+ function Ne(e) {
542
+ if (!I(e) || ce(e))
530
543
  return e;
531
544
  const t = e[g];
532
545
  let r, n = !0;
533
546
  if (t) {
534
547
  if (!t.modified_)
535
548
  return t.base_;
536
- t.finalized_ = !0, r = fe(e, t.scope_.immer_.useStrictShallowCopy_), n = t.scope_.immer_.shouldUseStrictIteration();
549
+ t.finalized_ = !0, r = le(e, t.scope_.immer_.useStrictShallowCopy_), n = t.scope_.immer_.shouldUseStrictIteration();
537
550
  } else
538
- r = fe(e, !0);
539
- return V(
551
+ r = le(e, !0);
552
+ return Y(
540
553
  r,
541
- (i, c) => {
542
- ee(r, i, Ae(c));
554
+ (i, o) => {
555
+ ee(r, i, Ne(o));
543
556
  },
544
557
  n
545
558
  ), t && (t.finalized_ = !1), r;
546
559
  }
547
- function Je() {
548
- process.env.NODE_ENV !== "production" && ze.push(
560
+ function je() {
561
+ process.env.NODE_ENV !== "production" && Ce.push(
549
562
  'Sets cannot have "replace" patches.',
550
- function(o) {
551
- return "Unsupported patch operation: " + o;
563
+ function(c) {
564
+ return "Unsupported patch operation: " + c;
552
565
  },
553
- function(o) {
554
- return "Cannot apply patch, path doesn't resolve: " + o;
566
+ function(c) {
567
+ return "Cannot apply patch, path doesn't resolve: " + c;
555
568
  },
556
569
  "Patching reserved attributes like __proto__, prototype and constructor is not allowed"
557
570
  );
558
- function t(o, f = []) {
559
- if ("key_" in o && o.key_ !== void 0) {
560
- const a = o.parent_.copy_ ?? o.parent_.base_, u = Te(E(a, o.key_)), l = E(a, o.key_);
561
- if (l === void 0 || l !== o.draft_ && l !== o.base_ && l !== o.copy_ || u != null && u.base_ !== o.base_)
571
+ function t(c, f = []) {
572
+ if (c.key_ !== void 0) {
573
+ const s = c.parent_.copy_ ?? c.parent_.base_, l = Ue(A(s, c.key_)), d = A(s, c.key_);
574
+ if (d === void 0 || d !== c.draft_ && d !== c.base_ && d !== c.copy_ || l != null && l.base_ !== c.base_)
562
575
  return null;
563
- const d = o.parent_.type_ === 3;
576
+ const p = c.parent_.type_ === 3;
564
577
  let h;
565
- if (d) {
566
- const s = o.parent_;
567
- h = Array.from(s.drafts_.keys()).indexOf(o.key_);
578
+ if (p) {
579
+ const y = c.parent_;
580
+ h = Array.from(y.drafts_.keys()).indexOf(c.key_);
568
581
  } else
569
- h = o.key_;
570
- if (!(d && a.size > h || L(a, h)))
582
+ h = c.key_;
583
+ if (!(p && s.size > h || U(s, h)))
571
584
  return null;
572
585
  f.push(h);
573
586
  }
574
- if (o.parent_)
575
- return t(o.parent_, f);
587
+ if (c.parent_)
588
+ return t(c.parent_, f);
576
589
  f.reverse();
577
590
  try {
578
- r(o.copy_, f);
591
+ r(c.copy_, f);
579
592
  } catch {
580
593
  return null;
581
594
  }
582
595
  return f;
583
596
  }
584
- function r(o, f) {
585
- let a = o;
586
- for (let u = 0; u < f.length - 1; u++) {
587
- const l = f[u];
588
- if (a = E(a, l), !T(a) || a === null)
597
+ function r(c, f) {
598
+ let s = c;
599
+ for (let l = 0; l < f.length - 1; l++) {
600
+ const d = f[l];
601
+ if (s = A(s, d), !V(s) || s === null)
589
602
  throw new Error(`Cannot resolve path at '${f.join("/")}'`);
590
603
  }
591
- return a;
604
+ return s;
592
605
  }
593
- const n = "replace", i = "add", c = "remove";
594
- function _(o, f, a) {
595
- if (o.scope_.processedForPatches_.has(o))
606
+ const n = "replace", i = "add", o = "remove";
607
+ function u(c, f, s) {
608
+ if (c.scope_.processedForPatches_.has(c))
596
609
  return;
597
- o.scope_.processedForPatches_.add(o);
598
- const { patches_: u, inversePatches_: l } = a;
599
- switch (o.type_) {
610
+ c.scope_.processedForPatches_.add(c);
611
+ const { patches_: l, inversePatches_: d } = s;
612
+ switch (c.type_) {
600
613
  case 0:
601
614
  case 2:
602
- return S(
603
- o,
615
+ return w(
616
+ c,
604
617
  f,
605
- u,
606
- l
618
+ l,
619
+ d
607
620
  );
608
621
  case 1:
609
- return p(
610
- o,
622
+ return _(
623
+ c,
611
624
  f,
612
- u,
613
- l
625
+ l,
626
+ d
614
627
  );
615
628
  case 3:
616
- return w(
617
- o,
629
+ return O(
630
+ c,
618
631
  f,
619
- u,
620
- l
632
+ l,
633
+ d
621
634
  );
622
635
  }
623
636
  }
624
- function p(o, f, a, u) {
625
- let { base_: l, assigned_: d } = o, h = o.copy_;
626
- h.length < l.length && ([l, h] = [h, l], [a, u] = [u, a]);
627
- for (let s = 0; s < l.length; s++) {
628
- const y = h[s], O = l[s];
629
- if (d?.get(s.toString()) && y !== O) {
630
- const F = y?.[g];
631
- if (F && F.modified_)
637
+ function _(c, f, s, l) {
638
+ let { base_: d, assigned_: p } = c, h = c.copy_;
639
+ h.length < d.length && ([d, h] = [h, d], [s, l] = [l, s]);
640
+ const y = c.allIndicesReassigned_ === !0;
641
+ for (let a = 0; a < d.length; a++) {
642
+ const S = h[a], E = d[a];
643
+ if ((y || p?.get(a.toString())) && S !== E) {
644
+ const k = S?.[g];
645
+ if (k && k.modified_)
632
646
  continue;
633
- const P = f.concat([s]);
634
- a.push({
647
+ const Pe = f.concat([a]);
648
+ s.push({
635
649
  op: n,
636
- path: P,
650
+ path: Pe,
637
651
  // Need to maybe clone it, as it can in fact be the original value
638
652
  // due to the base/copy inversion at the start of this function
639
- value: R(y)
640
- }), u.push({
653
+ value: T(S)
654
+ }), l.push({
641
655
  op: n,
642
- path: P,
643
- value: R(O)
656
+ path: Pe,
657
+ value: T(E)
644
658
  });
645
659
  }
646
660
  }
647
- for (let s = l.length; s < h.length; s++) {
648
- const y = f.concat([s]);
649
- a.push({
661
+ for (let a = d.length; a < h.length; a++) {
662
+ const S = f.concat([a]);
663
+ s.push({
650
664
  op: i,
651
- path: y,
665
+ path: S,
652
666
  // Need to maybe clone it, as it can in fact be the original value
653
667
  // due to the base/copy inversion at the start of this function
654
- value: R(h[s])
668
+ value: T(h[a])
655
669
  });
656
670
  }
657
- for (let s = h.length - 1; l.length <= s; --s) {
658
- const y = f.concat([s]);
659
- u.push({
660
- op: c,
661
- path: y
671
+ for (let a = h.length - 1; d.length <= a; --a) {
672
+ const S = f.concat([a]);
673
+ l.push({
674
+ op: o,
675
+ path: S
662
676
  });
663
677
  }
664
678
  }
665
- function S(o, f, a, u) {
666
- const { base_: l, copy_: d, type_: h } = o;
667
- V(o.assigned_, (s, y) => {
668
- const O = E(l, s, h), F = E(d, s, h), P = y ? L(l, s) ? n : i : c;
669
- if (O === F && P === n)
679
+ function w(c, f, s, l) {
680
+ const { base_: d, copy_: p, type_: h } = c;
681
+ Y(c.assigned_, (y, a) => {
682
+ const S = A(d, y, h), E = A(p, y, h), P = a ? U(d, y) ? n : i : o;
683
+ if (S === E && P === n)
670
684
  return;
671
- const x = f.concat(s);
672
- a.push(
673
- P === c ? { op: P, path: x } : { op: P, path: x, value: R(F) }
674
- ), u.push(
675
- P === i ? { op: c, path: x } : P === c ? { op: i, path: x, value: R(O) } : { op: n, path: x, value: R(O) }
685
+ const k = f.concat(y);
686
+ s.push(
687
+ P === o ? { op: P, path: k } : { op: P, path: k, value: T(E) }
688
+ ), l.push(
689
+ P === i ? { op: o, path: k } : P === o ? { op: i, path: k, value: T(S) } : { op: n, path: k, value: T(S) }
676
690
  );
677
691
  });
678
692
  }
679
- function w(o, f, a, u) {
680
- let { base_: l, copy_: d } = o, h = 0;
681
- l.forEach((s) => {
682
- if (!d.has(s)) {
683
- const y = f.concat([h]);
684
- a.push({
685
- op: c,
686
- path: y,
687
- value: s
688
- }), u.unshift({
693
+ function O(c, f, s, l) {
694
+ let { base_: d, copy_: p } = c, h = 0;
695
+ d.forEach((y) => {
696
+ if (!p.has(y)) {
697
+ const a = f.concat([h]);
698
+ s.push({
699
+ op: o,
700
+ path: a,
701
+ value: y
702
+ }), l.unshift({
689
703
  op: i,
690
- path: y,
691
- value: s
704
+ path: a,
705
+ value: y
692
706
  });
693
707
  }
694
708
  h++;
695
- }), h = 0, d.forEach((s) => {
696
- if (!l.has(s)) {
697
- const y = f.concat([h]);
698
- a.push({
709
+ }), h = 0, p.forEach((y) => {
710
+ if (!d.has(y)) {
711
+ const a = f.concat([h]);
712
+ s.push({
699
713
  op: i,
700
- path: y,
701
- value: s
702
- }), u.unshift({
703
- op: c,
704
- path: y,
705
- value: s
714
+ path: a,
715
+ value: y
716
+ }), l.unshift({
717
+ op: o,
718
+ path: a,
719
+ value: y
706
720
  });
707
721
  }
708
722
  h++;
709
723
  });
710
724
  }
711
- function b(o, f, a) {
712
- const { patches_: u, inversePatches_: l } = a;
713
- u.push({
725
+ function N(c, f, s) {
726
+ const { patches_: l, inversePatches_: d } = s;
727
+ l.push({
714
728
  op: n,
715
729
  path: [],
716
- value: f === pe ? void 0 : f
717
- }), l.push({
730
+ value: f === ye ? void 0 : f
731
+ }), d.push({
718
732
  op: n,
719
733
  path: [],
720
- value: o
734
+ value: c
721
735
  });
722
736
  }
723
- function be(o, f) {
724
- return f.forEach((a) => {
725
- const { path: u, op: l } = a;
726
- let d = o;
727
- for (let O = 0; O < u.length - 1; O++) {
728
- const F = A(d);
729
- let P = u[O];
730
- typeof P != "string" && typeof P != "number" && (P = "" + P), (F === 0 || F === 1) && (P === "__proto__" || P === $) && m(19), D(d) && P === Y && m(19), d = E(d, P), T(d) || m(18, u.join("/"));
737
+ function Re(c, f) {
738
+ return f.forEach((s) => {
739
+ const { path: l, op: d } = s;
740
+ let p = c;
741
+ for (let S = 0; S < l.length - 1; S++) {
742
+ const E = M(p);
743
+ let P = l[S];
744
+ typeof P != "string" && typeof P != "number" && (P = "" + P), (E === 0 || E === 1) && (P === "__proto__" || P === L) && m(19), F(p) && P === K && m(19), p = A(p, P), V(p) || m(18, l.join("/"));
731
745
  }
732
- const h = A(d), s = N(a.value), y = u[u.length - 1];
733
- switch (l) {
746
+ const h = M(p), y = R(s.value), a = l[l.length - 1];
747
+ switch (d) {
734
748
  case n:
735
749
  switch (h) {
736
750
  case 2:
737
- return d.set(y, s);
751
+ return p.set(a, y);
738
752
  case 3:
739
753
  m(16);
740
754
  default:
741
- return d[y] = s;
755
+ return p[a] = y;
742
756
  }
743
757
  case i:
744
758
  switch (h) {
745
759
  case 1:
746
- return y === "-" ? d.push(s) : d.splice(y, 0, s);
760
+ return a === "-" ? p.push(y) : p.splice(a, 0, y);
747
761
  case 2:
748
- return d.set(y, s);
762
+ return p.set(a, y);
749
763
  case 3:
750
- return d.add(s);
764
+ return p.add(y);
751
765
  default:
752
- return d[y] = s;
766
+ return p[a] = y;
753
767
  }
754
- case c:
768
+ case o:
755
769
  switch (h) {
756
770
  case 1:
757
- return d.splice(y, 1);
771
+ return p.splice(a, 1);
758
772
  case 2:
759
- return d.delete(y);
773
+ return p.delete(a);
760
774
  case 3:
761
- return d.delete(a.value);
775
+ return p.delete(s.value);
762
776
  default:
763
- return delete d[y];
777
+ return delete p[a];
764
778
  }
765
779
  default:
766
- m(17, l);
780
+ m(17, d);
767
781
  }
768
- }), o;
782
+ }), c;
769
783
  }
770
- function N(o) {
771
- if (!C(o))
772
- return o;
773
- if (H(o))
774
- return o.map(N);
775
- if (X(o))
784
+ function R(c) {
785
+ if (!I(c))
786
+ return c;
787
+ if (H(c))
788
+ return c.map(R);
789
+ if (X(c))
776
790
  return new Map(
777
- Array.from(o.entries()).map(([a, u]) => [a, N(u)])
791
+ Array.from(c.entries()).map(([s, l]) => [s, R(l)])
778
792
  );
779
- if (q(o))
780
- return new Set(Array.from(o).map(N));
781
- const f = Object.create(I(o));
782
- for (const a in o)
783
- f[a] = N(o[a]);
784
- return L(o, U) && (f[U] = o[U]), f;
793
+ if (q(c))
794
+ return new Set(Array.from(c).map(R));
795
+ const f = Object.create(D(c));
796
+ for (const s in c)
797
+ f[s] = R(c[s]);
798
+ return U(c, x) && (f[x] = c[x]), f;
785
799
  }
786
- function R(o) {
787
- return z(o) ? N(o) : o;
800
+ function T(c) {
801
+ return z(c) ? R(c) : c;
788
802
  }
789
- xe(re, {
790
- applyPatches_: be,
791
- generatePatches_: _,
792
- generateReplacementPatches_: b,
803
+ We(re, {
804
+ applyPatches_: Re,
805
+ generatePatches_: u,
806
+ generateReplacementPatches_: N,
793
807
  getPath: t
794
808
  });
795
809
  }
796
- var K = new He();
797
- K.produce;
798
- var Qe = /* @__PURE__ */ K.produceWithPatches.bind(
799
- K
800
- ), Ze = /* @__PURE__ */ K.applyPatches.bind(K);
810
+ var G = new Je();
811
+ G.produce;
812
+ var et = /* @__PURE__ */ G.produceWithPatches.bind(
813
+ G
814
+ ), tt = /* @__PURE__ */ G.applyPatches.bind(G);
801
815
  export {
802
- He as Immer,
803
- Ze as applyPatches,
804
- Xe as current,
805
- Je as enablePatches,
806
- ye as freeze,
807
- U as immerable,
816
+ Je as Immer,
817
+ tt as applyPatches,
818
+ Qe as current,
819
+ je as enablePatches,
820
+ ge as freeze,
821
+ x as immerable,
808
822
  z as isDraft,
809
- C as isDraftable,
810
- pe as nothing,
811
- qe as original,
812
- Qe as produceWithPatches
823
+ I as isDraftable,
824
+ ye as nothing,
825
+ Ze as original,
826
+ et as produceWithPatches
813
827
  };
814
828
  //# sourceMappingURL=immer.es.js.map