@my-react/react-reconciler-compact 0.0.13 → 0.0.15

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 (41) hide show
  1. package/constants.js +1 -1
  2. package/dist/cjs/index.development.js +884 -1171
  3. package/dist/cjs/index.production.js +824 -1122
  4. package/dist/cjs/preload.development.js +548 -0
  5. package/dist/cjs/preload.production.js +548 -0
  6. package/dist/esm/index.mjs +1651 -1844
  7. package/dist/esm/preload.mjs +544 -0
  8. package/dist/types/api/append.d.ts.map +1 -1
  9. package/dist/types/api/create.d.ts.map +1 -1
  10. package/dist/types/api/position.d.ts.map +1 -1
  11. package/dist/types/api/ref.d.ts.map +1 -1
  12. package/dist/types/api/remove.d.ts.map +1 -1
  13. package/dist/types/api/update.d.ts.map +1 -1
  14. package/dist/types/config.d.ts.map +1 -1
  15. package/dist/types/constants.d.ts.map +1 -1
  16. package/dist/types/devtool.d.ts.map +1 -1
  17. package/dist/types/{dispatchFiber.d.ts → dispatch-fiber.d.ts} +1 -1
  18. package/dist/types/dispatch-fiber.d.ts.map +1 -0
  19. package/dist/types/{dispatchMap.d.ts → dispatch-map.d.ts} +1 -1
  20. package/dist/types/dispatch-map.d.ts.map +1 -0
  21. package/dist/types/{dispatchMount.d.ts → dispatch-mount.d.ts} +1 -1
  22. package/dist/types/dispatch-mount.d.ts.map +1 -0
  23. package/dist/types/{dispatchUpdate.d.ts → dispatch-update.d.ts} +1 -1
  24. package/dist/types/dispatch-update.d.ts.map +1 -0
  25. package/dist/types/dispatch.d.ts +35 -207
  26. package/dist/types/dispatch.d.ts.map +1 -1
  27. package/dist/types/feature.d.ts +46 -218
  28. package/dist/types/feature.d.ts.map +1 -1
  29. package/dist/types/hmr.d.ts.map +1 -1
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/polyfill.d.ts.map +1 -1
  32. package/dist/types/portal.d.ts +2 -2
  33. package/dist/types/portal.d.ts.map +1 -1
  34. package/dist/types/preload.d.ts +4 -0
  35. package/dist/types/preload.d.ts.map +1 -0
  36. package/index.d.ts +1 -1
  37. package/package.json +29 -5
  38. package/dist/types/dispatchFiber.d.ts.map +0 -1
  39. package/dist/types/dispatchMap.d.ts.map +0 -1
  40. package/dist/types/dispatchMount.d.ts.map +0 -1
  41. package/dist/types/dispatchUpdate.d.ts.map +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var require$$0 = require('@my-react/react');
5
+ var require$$1 = require('@my-react/react');
6
6
 
7
7
  /******************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -35,17 +35,6 @@ function __extends(d, b) {
35
35
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
36
  }
37
37
 
38
- var __assign = function() {
39
- __assign = Object.assign || function __assign(t) {
40
- for (var s, i = 1, n = arguments.length; i < n; i++) {
41
- s = arguments[i];
42
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
43
- }
44
- return t;
45
- };
46
- return __assign.apply(this, arguments);
47
- };
48
-
49
38
  function __awaiter(thisArg, _arguments, P, generator) {
50
39
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
51
40
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -84,21 +73,23 @@ function __generator(thisArg, body) {
84
73
  }
85
74
  }
86
75
 
87
- function __spreadArray(to, from, pack) {
88
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
89
- if (ar || !(i in from)) {
90
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
91
- ar[i] = from[i];
92
- }
93
- }
94
- return to.concat(ar || Array.prototype.slice.call(from));
95
- }
96
-
97
76
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
98
77
  var e = new Error(message);
99
78
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
100
79
  };
101
80
 
81
+ var type;
82
+ var hasRequiredType;
83
+
84
+ function requireType () {
85
+ if (hasRequiredType) return type;
86
+ hasRequiredType = 1;
87
+ type = require$$1;
88
+ return type;
89
+ }
90
+
91
+ var typeExports = requireType();
92
+
102
93
  var myreactReconciler = {exports: {}};
103
94
 
104
95
  var index_production = {};
@@ -108,9 +99,21 @@ var hasRequiredIndex_production;
108
99
  function requireIndex_production () {
109
100
  if (hasRequiredIndex_production) return index_production;
110
101
  hasRequiredIndex_production = 1;
111
- (function (exports) {
102
+ (function (exports$1) {
103
+
104
+ var require$$0 = require$$1;
112
105
 
113
- var react = require$$0;
106
+ var type;
107
+ var hasRequiredType;
108
+
109
+ function requireType () {
110
+ if (hasRequiredType) return type;
111
+ hasRequiredType = 1;
112
+ type = require$$0;
113
+ return type;
114
+ }
115
+
116
+ var typeExports = requireType();
114
117
 
115
118
  var merge = function (src, rest) {
116
119
  return src | rest;
@@ -153,6 +156,10 @@ function requireIndex_production () {
153
156
  var Comment = Symbol.for("react.comment");
154
157
  var Activity = Symbol.for("react.activity");
155
158
  var Profiler = Symbol.for("react.profiler");
159
+ /**
160
+ * Symbol for server reference type
161
+ */
162
+ var SERVER_REFERENCE_SYMBOL = Symbol.for("react.server.reference");
156
163
 
157
164
  function isObject(target) {
158
165
  return typeof target === "object" && target !== null;
@@ -738,17 +745,17 @@ function requireIndex_production () {
738
745
 
739
746
  var MyWeakMap = typeof WeakMap !== "undefined" ? WeakMap : Map;
740
747
 
741
- var currentRefreshHandler = react.createRef(null);
748
+ var currentRefreshHandler = typeExports.createRef(null);
742
749
  // TODO
743
750
  // need improve
744
- var currentTriggerFiber = react.createRef(null);
745
- var fiberToDispatchMap = react.__my_react_internal__.fiberToDispatchMap;
746
- var enableFiberForLog = react.createRef(false);
747
- var enableDebugUpdateQueue = react.createRef(false);
748
- var enableValidMyReactElement = react.createRef(false);
749
- var enableLogForCurrentFlowIsRunning = react.createRef(false);
751
+ var currentTriggerFiber = typeExports.createRef(null);
752
+ var fiberToDispatchMap = typeExports.__my_react_internal__.fiberToDispatchMap;
753
+ var enableFiberForLog = typeExports.createRef(false);
754
+ var enableDebugUpdateQueue = typeExports.createRef(false);
755
+ var enableValidMyReactElement = typeExports.createRef(false);
756
+ var enableLogForCurrentFlowIsRunning = typeExports.createRef(false);
750
757
 
751
- exports.NODE_TYPE = void 0;
758
+ exports$1.NODE_TYPE = void 0;
752
759
  (function (NODE_TYPE) {
753
760
  NODE_TYPE[NODE_TYPE["__initial__"] = 0] = "__initial__";
754
761
  NODE_TYPE[NODE_TYPE["__class__"] = 1] = "__class__";
@@ -774,24 +781,25 @@ function requireIndex_production () {
774
781
  NODE_TYPE[NODE_TYPE["__scopeLazy__"] = 1048576] = "__scopeLazy__";
775
782
  NODE_TYPE[NODE_TYPE["__scopeSuspense__"] = 2097152] = "__scopeSuspense__";
776
783
  NODE_TYPE[NODE_TYPE["__activity__"] = 4194304] = "__activity__";
777
- })(exports.NODE_TYPE || (exports.NODE_TYPE = {}));
784
+ NODE_TYPE[NODE_TYPE["__serverComponent__"] = 8388608] = "__serverComponent__";
785
+ })(exports$1.NODE_TYPE || (exports$1.NODE_TYPE = {}));
778
786
 
779
- var enableSyncFlush$1 = react.__my_react_shared__.enableSyncFlush;
787
+ var enableSyncFlush$1 = typeExports.__my_react_shared__.enableSyncFlush;
780
788
  /**
781
789
  * @deprecated
782
790
  */
783
- exports.syncFlush = false;
791
+ exports$1.syncFlush = false;
784
792
  /**
785
793
  * @deprecated
786
794
  */
787
795
  var beforeSyncFlush = function () {
788
- exports.syncFlush = true;
796
+ exports$1.syncFlush = true;
789
797
  };
790
798
  /**
791
799
  * @deprecated
792
800
  */
793
801
  var afterSyncFlush = function () {
794
- exports.syncFlush = false;
802
+ exports$1.syncFlush = false;
795
803
  };
796
804
  var stack = [enableSyncFlush$1.current];
797
805
  var beforeSyncUpdate = function () {
@@ -802,7 +810,7 @@ function requireIndex_production () {
802
810
  enableSyncFlush$1.current = stack.pop();
803
811
  };
804
812
 
805
- var currentRunningFiber$5 = react.__my_react_internal__.currentRunningFiber, currentScheduler$h = react.__my_react_internal__.currentScheduler, currentScopeFiber$1 = react.__my_react_internal__.currentScopeFiber, currentError$1 = react.__my_react_internal__.currentError, currentCallingFiber$1 = react.__my_react_internal__.currentCallingFiber;
813
+ var currentRunningFiber$5 = typeExports.__my_react_internal__.currentRunningFiber, currentScheduler$h = typeExports.__my_react_internal__.currentScheduler, currentScopeFiber$1 = typeExports.__my_react_internal__.currentScopeFiber, currentError$1 = typeExports.__my_react_internal__.currentError, currentCallingFiber$1 = typeExports.__my_react_internal__.currentCallingFiber;
806
814
  var safeCall = function (action) {
807
815
  var args = [];
808
816
  for (var _i = 1; _i < arguments.length; _i++) {
@@ -876,8 +884,8 @@ function requireIndex_production () {
876
884
  }
877
885
  };
878
886
 
879
- var currentScheduler$g = react.__my_react_internal__.currentScheduler, currentRunningFiber$4 = react.__my_react_internal__.currentRunningFiber, currentScopeFiber = react.__my_react_internal__.currentScopeFiber, currentCallingFiber = react.__my_react_internal__.currentCallingFiber;
880
- var enableOptimizeTreeLog = react.__my_react_shared__.enableOptimizeTreeLog;
887
+ var currentScheduler$g = typeExports.__my_react_internal__.currentScheduler, currentRunningFiber$4 = typeExports.__my_react_internal__.currentRunningFiber, currentScopeFiber = typeExports.__my_react_internal__.currentScopeFiber, currentCallingFiber = typeExports.__my_react_internal__.currentCallingFiber;
888
+ var enableOptimizeTreeLog = typeExports.__my_react_shared__.enableOptimizeTreeLog;
881
889
  var typeColor = {
882
890
  normal: "rgba(10, 190, 235, 0.8)",
883
891
  plain: "rgba(100, 230, 40, 0.8)",
@@ -1007,74 +1015,76 @@ function requireIndex_production () {
1007
1015
  }
1008
1016
  };
1009
1017
  var shouldIncludeLog = function (fiber) {
1010
- if (include(fiber.type, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
1018
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
1011
1019
  return true;
1012
1020
  }
1013
1021
  return false;
1014
1022
  };
1015
1023
  var getFiberTagName = function (fiber) {
1016
1024
  var tag = [];
1017
- if (fiber.type & exports.NODE_TYPE.__memo__) {
1025
+ if (fiber.type & exports$1.NODE_TYPE.__memo__) {
1018
1026
  tag.push("memo");
1019
1027
  }
1020
- if (fiber.type & exports.NODE_TYPE.__forwardRef__) {
1028
+ if (fiber.type & exports$1.NODE_TYPE.__forwardRef__) {
1021
1029
  tag.push("forwardRef");
1022
1030
  }
1023
- if (fiber.type & exports.NODE_TYPE.__lazy__) {
1031
+ if (fiber.type & exports$1.NODE_TYPE.__lazy__) {
1024
1032
  tag.push("lazy");
1025
1033
  }
1026
- if (fiber.type & exports.NODE_TYPE.__fragment__ && fiber.pendingProps["wrap"]) {
1034
+ if (fiber.type & exports$1.NODE_TYPE.__fragment__ && fiber.pendingProps["wrap"]) {
1027
1035
  tag.push("auto-wrap");
1028
1036
  }
1029
1037
  return tag.join("-");
1030
1038
  };
1031
1039
  var getPlainFiberName = function (fiber) {
1032
- if (fiber.type & exports.NODE_TYPE.__provider__) {
1040
+ if (fiber.type & exports$1.NODE_TYPE.__provider__) {
1033
1041
  var typedElementType = fiber.elementType;
1034
1042
  var name_2 = typedElementType.Context.displayName;
1035
1043
  return "".concat(name_2 || "Context", ".Provider");
1036
1044
  }
1037
- if (fiber.type & exports.NODE_TYPE.__context__) {
1045
+ if (fiber.type & exports$1.NODE_TYPE.__context__) {
1038
1046
  var typedElementType = fiber.elementType;
1039
1047
  var name_3 = typedElementType.displayName;
1040
1048
  return "".concat(name_3 || "Context");
1041
1049
  }
1042
- if (fiber.type & exports.NODE_TYPE.__consumer__) {
1050
+ if (fiber.type & exports$1.NODE_TYPE.__consumer__) {
1043
1051
  var typedElementType = fiber.elementType;
1044
1052
  var name_4 = typedElementType.Context.displayName;
1045
1053
  return "".concat(name_4 || "Context", ".Consumer");
1046
1054
  }
1047
- if (fiber.type & exports.NODE_TYPE.__lazy__) {
1055
+ if (fiber.type & exports$1.NODE_TYPE.__lazy__) {
1048
1056
  var typedElementType = fiber.elementType;
1049
1057
  var typedRender = typedElementType === null || typedElementType === void 0 ? void 0 : typedElementType.render;
1050
1058
  var name_5 = (typedRender === null || typedRender === void 0 ? void 0 : typedRender.displayName) || (typedRender === null || typedRender === void 0 ? void 0 : typedRender.name) || "";
1059
+ var loader = typedElementType.loader;
1060
+ name_5 = loader["displayName"] || name_5;
1051
1061
  return "".concat(name_5 || "Anonymous");
1052
1062
  }
1053
- if (fiber.type & exports.NODE_TYPE.__portal__)
1063
+ if (fiber.type & exports$1.NODE_TYPE.__portal__)
1054
1064
  return "Portal";
1055
- if (fiber.type & exports.NODE_TYPE.__null__)
1065
+ if (fiber.type & exports$1.NODE_TYPE.__null__)
1056
1066
  return "Null";
1057
- if (fiber.type & exports.NODE_TYPE.__empty__)
1067
+ if (fiber.type & exports$1.NODE_TYPE.__empty__)
1058
1068
  return "Empty";
1059
- if (fiber.type & exports.NODE_TYPE.__scope__)
1069
+ if (fiber.type & exports$1.NODE_TYPE.__scope__)
1060
1070
  return "Scope";
1061
- if (fiber.type & exports.NODE_TYPE.__scopeLazy__)
1071
+ if (fiber.type & exports$1.NODE_TYPE.__scopeLazy__)
1062
1072
  return "ScopeLazy";
1063
- if (fiber.type & exports.NODE_TYPE.__scopeSuspense__)
1073
+ if (fiber.type & exports$1.NODE_TYPE.__scopeSuspense__)
1064
1074
  return "ScopeSuspense";
1065
- if (fiber.type & exports.NODE_TYPE.__strict__)
1075
+ if (fiber.type & exports$1.NODE_TYPE.__strict__)
1066
1076
  return "Strict";
1067
- if (fiber.type & exports.NODE_TYPE.__profiler__)
1077
+ if (fiber.type & exports$1.NODE_TYPE.__profiler__)
1068
1078
  return "Profiler";
1069
- if (fiber.type & exports.NODE_TYPE.__suspense__)
1079
+ if (fiber.type & exports$1.NODE_TYPE.__suspense__)
1070
1080
  return "Suspense";
1071
- if (fiber.type & exports.NODE_TYPE.__comment__)
1081
+ if (fiber.type & exports$1.NODE_TYPE.__comment__)
1072
1082
  return "Comment";
1073
- if (fiber.type & exports.NODE_TYPE.__root__)
1083
+ if (fiber.type & exports$1.NODE_TYPE.__root__)
1074
1084
  return "Root";
1075
- if (fiber.type & exports.NODE_TYPE.__fragment__)
1085
+ if (fiber.type & exports$1.NODE_TYPE.__fragment__)
1076
1086
  return "Fragment";
1077
- if (fiber.type & exports.NODE_TYPE.__text__)
1087
+ if (fiber.type & exports$1.NODE_TYPE.__text__)
1078
1088
  return "text";
1079
1089
  if (typeof fiber.elementType === "string")
1080
1090
  return "".concat(fiber.elementType);
@@ -1134,7 +1144,7 @@ function requireIndex_production () {
1134
1144
  while (temp) {
1135
1145
  res ? (res += "\n".concat(preString).concat(getFiberNodeNameWithFiber(temp))) : (res = "".concat(preString).concat(getFiberNodeNameWithFiber(temp)));
1136
1146
  var isMount = temp._debugIsMount;
1137
- var isPlain = temp.type & exports.NODE_TYPE.__plain__;
1147
+ var isPlain = temp.type & exports$1.NODE_TYPE.__plain__;
1138
1148
  arr.push("color: white;background-color: ".concat(isMount ? (isPlain ? typeColor.plain : typeColor.normal) : typeColor.unmount, "; border-radius: 2px; padding: 1px 5px; margin: 1px 0px"));
1139
1149
  arr.push("");
1140
1150
  arr.push(temp);
@@ -1188,7 +1198,7 @@ function requireIndex_production () {
1188
1198
  errorFiber = null;
1189
1199
  };
1190
1200
 
1191
- react.__my_react_shared__.enableHMRForDev;
1201
+ typeExports.__my_react_shared__.enableHMRForDev;
1192
1202
  var emptyProps$1 = {};
1193
1203
  var getElementTypeFromType = function (type) {
1194
1204
  if (typeof type === "object") {
@@ -1201,23 +1211,23 @@ function requireIndex_production () {
1201
1211
  return type;
1202
1212
  };
1203
1213
  var getTypeFromElementNode = function (element) {
1204
- var nodeType = exports.NODE_TYPE.__initial__;
1205
- if (react.isValidElement(element)) {
1214
+ var nodeType = exports$1.NODE_TYPE.__initial__;
1215
+ if (typeExports.isValidElement(element)) {
1206
1216
  return getTypeFromElement(element);
1207
1217
  }
1208
1218
  else {
1209
1219
  if (typeof element === "object" && element !== null) {
1210
- nodeType = merge(nodeType, exports.NODE_TYPE.__empty__);
1220
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__empty__);
1211
1221
  }
1212
1222
  else if (element === null || element === undefined || typeof element === "boolean" || typeof element === "function" || element === "") {
1213
- nodeType = merge(nodeType, exports.NODE_TYPE.__null__);
1223
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__null__);
1214
1224
  }
1215
1225
  else {
1216
1226
  // text element
1217
1227
  return {
1218
1228
  key: null,
1219
1229
  ref: null,
1220
- nodeType: exports.NODE_TYPE.__text__,
1230
+ nodeType: exports$1.NODE_TYPE.__text__,
1221
1231
  elementType: String(element),
1222
1232
  pendingProps: emptyProps$1,
1223
1233
  finalElement: element,
@@ -1229,7 +1239,7 @@ function requireIndex_production () {
1229
1239
  };
1230
1240
  var getTypeFromElement = function (element) {
1231
1241
  var _a, _b, _e, _f, _g;
1232
- var nodeType = exports.NODE_TYPE.__initial__;
1242
+ var nodeType = exports$1.NODE_TYPE.__initial__;
1233
1243
  var elementType = element.type;
1234
1244
  var finalElement = element;
1235
1245
  var pendingProps = element.props;
@@ -1239,105 +1249,105 @@ function requireIndex_production () {
1239
1249
  var typedElementType = elementType;
1240
1250
  switch (typedElementType[TYPEKEY]) {
1241
1251
  case Provider:
1242
- nodeType = merge(nodeType, exports.NODE_TYPE.__provider__);
1252
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__provider__);
1243
1253
  break;
1244
1254
  // support react 19 context api
1245
1255
  case Context:
1246
- nodeType = merge(nodeType, exports.NODE_TYPE.__context__);
1256
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__context__);
1247
1257
  break;
1248
1258
  case Consumer:
1249
- nodeType = merge(nodeType, exports.NODE_TYPE.__consumer__);
1259
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__consumer__);
1250
1260
  break;
1251
1261
  case Memo:
1252
- nodeType = merge(nodeType, exports.NODE_TYPE.__memo__);
1262
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__memo__);
1253
1263
  elementType = typedElementType.render;
1254
1264
  break;
1255
1265
  case ForwardRef:
1256
- nodeType = merge(nodeType, exports.NODE_TYPE.__forwardRef__);
1266
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__forwardRef__);
1257
1267
  elementType = typedElementType.render;
1258
1268
  break;
1259
1269
  case Lazy:
1260
- nodeType = merge(nodeType, exports.NODE_TYPE.__lazy__);
1270
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__lazy__);
1261
1271
  break;
1262
1272
  default:
1263
1273
  throw new Error("[@my-react/react] invalid object element type \"".concat((_e = typedElementType[TYPEKEY]) === null || _e === void 0 ? void 0 : _e.toString(), "\""));
1264
1274
  }
1265
1275
  if (typeof elementType === "object") {
1266
1276
  if (elementType[TYPEKEY] === ForwardRef) {
1267
- nodeType = merge(nodeType, exports.NODE_TYPE.__forwardRef__);
1277
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__forwardRef__);
1268
1278
  elementType = elementType.render;
1269
1279
  }
1270
1280
  if (elementType[TYPEKEY] === Provider) {
1271
- nodeType = merge(nodeType, exports.NODE_TYPE.__provider__);
1281
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__provider__);
1272
1282
  }
1273
1283
  if (elementType[TYPEKEY] === Context) {
1274
- nodeType = merge(nodeType, exports.NODE_TYPE.__context__);
1284
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__context__);
1275
1285
  }
1276
1286
  if (elementType[TYPEKEY] === Consumer) {
1277
- nodeType = merge(nodeType, exports.NODE_TYPE.__consumer__);
1287
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__consumer__);
1278
1288
  }
1279
1289
  }
1280
1290
  if (typeof elementType === "function") {
1281
1291
  if ((_f = elementType.prototype) === null || _f === void 0 ? void 0 : _f.isMyReactComponent) {
1282
- nodeType = merge(nodeType, exports.NODE_TYPE.__class__);
1292
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__class__);
1283
1293
  }
1284
1294
  else {
1285
- nodeType = merge(nodeType, exports.NODE_TYPE.__function__);
1295
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__function__);
1286
1296
  }
1287
1297
  }
1288
1298
  }
1289
1299
  else if (typeof elementType === "function") {
1290
1300
  if ((_g = elementType.prototype) === null || _g === void 0 ? void 0 : _g.isMyReactComponent) {
1291
- nodeType = merge(nodeType, exports.NODE_TYPE.__class__);
1301
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__class__);
1292
1302
  }
1293
1303
  else {
1294
- nodeType = merge(nodeType, exports.NODE_TYPE.__function__);
1304
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__function__);
1295
1305
  }
1296
1306
  }
1297
1307
  else if (typeof elementType === "symbol") {
1298
1308
  switch (elementType) {
1299
1309
  case Root:
1300
- nodeType = merge(nodeType, exports.NODE_TYPE.__root__);
1310
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__root__);
1301
1311
  break;
1302
1312
  case Fragment:
1303
- nodeType = merge(nodeType, exports.NODE_TYPE.__fragment__);
1313
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__fragment__);
1304
1314
  break;
1305
1315
  case Strict:
1306
- nodeType = merge(nodeType, exports.NODE_TYPE.__strict__);
1316
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__strict__);
1307
1317
  break;
1308
1318
  case Suspense:
1309
- nodeType = merge(nodeType, exports.NODE_TYPE.__suspense__);
1319
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__suspense__);
1310
1320
  break;
1311
1321
  case Scope:
1312
- nodeType = merge(nodeType, exports.NODE_TYPE.__scope__);
1322
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__scope__);
1313
1323
  break;
1314
1324
  case ScopeLazy:
1315
- nodeType = merge(nodeType, exports.NODE_TYPE.__scopeLazy__);
1325
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__scopeLazy__);
1316
1326
  break;
1317
1327
  case ScopeSuspense:
1318
- nodeType = merge(nodeType, exports.NODE_TYPE.__scopeSuspense__);
1328
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__scopeSuspense__);
1319
1329
  break;
1320
1330
  case Comment:
1321
- nodeType = merge(nodeType, exports.NODE_TYPE.__comment__);
1331
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__comment__);
1322
1332
  break;
1323
1333
  case Portal:
1324
- nodeType = merge(nodeType, exports.NODE_TYPE.__portal__);
1334
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__portal__);
1325
1335
  break;
1326
1336
  case Profiler:
1327
- nodeType = merge(nodeType, exports.NODE_TYPE.__profiler__);
1337
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__profiler__);
1328
1338
  break;
1329
1339
  case Activity:
1330
- nodeType = merge(nodeType, exports.NODE_TYPE.__activity__);
1340
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__activity__);
1331
1341
  break;
1332
1342
  default:
1333
1343
  throw new Error("[@my-react/react] invalid symbol element type \"".concat(elementType === null || elementType === void 0 ? void 0 : elementType.toString(), "\""));
1334
1344
  }
1335
1345
  }
1336
1346
  else if (typeof elementType === "string" && elementType !== "") {
1337
- nodeType = merge(nodeType, exports.NODE_TYPE.__plain__);
1347
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__plain__);
1338
1348
  }
1339
1349
  else {
1340
- nodeType = merge(nodeType, exports.NODE_TYPE.__empty__);
1350
+ nodeType = merge(nodeType, exports$1.NODE_TYPE.__empty__);
1341
1351
  }
1342
1352
  return { key: key, ref: ref, nodeType: nodeType, elementType: elementType, pendingProps: pendingProps, finalElement: finalElement };
1343
1353
  };
@@ -1347,7 +1357,7 @@ function requireIndex_production () {
1347
1357
  var setRefreshHandler = function (handler) {
1348
1358
  };
1349
1359
  var setRefreshTypeMap = function (fiber) {
1350
- if (include(fiber.type, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
1360
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
1351
1361
  var elementType = fiber.elementType;
1352
1362
  var exist = typeToFibersMap.get(elementType) || new Set();
1353
1363
  exist.add(fiber);
@@ -1390,17 +1400,17 @@ function requireIndex_production () {
1390
1400
  var typeFromRefresh = getCurrentTypeFromRefreshOnly();
1391
1401
  // have a new version elementType from hmr runtime
1392
1402
  if (typeFromRefresh) {
1393
- return react.createElement(typeFromRefresh, __assign(__assign({}, element.props), { key: (_a = element.key) !== null && _a !== void 0 ? _a : undefined, ref: (_b = element.ref) !== null && _b !== void 0 ? _b : undefined }));
1403
+ return typeExports.createElement(typeFromRefresh, __assign(__assign({}, element.props), { key: (_a = element.key) !== null && _a !== void 0 ? _a : undefined, ref: (_b = element.ref) !== null && _b !== void 0 ? _b : undefined }));
1394
1404
  }
1395
1405
  }
1396
1406
  return element;
1397
1407
  };
1398
1408
 
1399
- react.__my_react_internal__.currentComponentFiber;
1409
+ typeExports.__my_react_internal__.currentComponentFiber;
1400
1410
  var initHMR = function (env) {
1401
1411
  };
1402
1412
 
1403
- var currentRunningFiber$3 = react.__my_react_internal__.currentRunningFiber, currentScheduler$f = react.__my_react_internal__.currentScheduler;
1413
+ var currentRunningFiber$3 = typeExports.__my_react_internal__.currentRunningFiber, currentScheduler$f = typeExports.__my_react_internal__.currentScheduler;
1404
1414
  var dispatchHook = function (params) {
1405
1415
  var fiber = currentRunningFiber$3.current;
1406
1416
  if (!fiber) {
@@ -1512,12 +1522,12 @@ function requireIndex_production () {
1512
1522
  scheduler.dispatchSuspensePromise = dispatchSuspensePromise;
1513
1523
  };
1514
1524
 
1515
- react.__my_react_shared__.enableHMRForDev;
1525
+ typeExports.__my_react_shared__.enableHMRForDev;
1516
1526
  function checkIsSameType(p, element) {
1517
1527
  if (p instanceof MyReactFiberNode) {
1518
1528
  var _a = getTypeFromElementNode(element), nodeType = _a.nodeType, elementType = _a.elementType;
1519
1529
  if (p.type === nodeType) {
1520
- if (react.isValidElement(element)) {
1530
+ if (typeExports.isValidElement(element)) {
1521
1531
  {
1522
1532
  return Object.is(p.elementType, elementType);
1523
1533
  }
@@ -1534,7 +1544,7 @@ function requireIndex_production () {
1534
1544
  var existElementType = getTypeFromElementNode(p);
1535
1545
  var incomingElementType = getTypeFromElementNode(element);
1536
1546
  if (existElementType.nodeType === incomingElementType.nodeType) {
1537
- if (react.isValidElement(element)) {
1547
+ if (typeExports.isValidElement(element)) {
1538
1548
  var typedExistElement = p;
1539
1549
  var typedIncomingElement = element;
1540
1550
  {
@@ -1743,7 +1753,7 @@ function requireIndex_production () {
1743
1753
  var _a;
1744
1754
  var parent = fiber.parent;
1745
1755
  while (parent) {
1746
- if (include(parent.type, exports.NODE_TYPE.__suspense__)) {
1756
+ if (include(parent.type, exports$1.NODE_TYPE.__suspense__)) {
1747
1757
  return (_a = parent.pendingProps) === null || _a === void 0 ? void 0 : _a["fallback"];
1748
1758
  }
1749
1759
  parent = parent.parent;
@@ -1753,7 +1763,7 @@ function requireIndex_production () {
1753
1763
  var defaultResolveSuspenseFiber = function (fiber) {
1754
1764
  var parent = fiber.parent;
1755
1765
  while (parent) {
1756
- if (include(parent.type, exports.NODE_TYPE.__suspense__)) {
1766
+ if (include(parent.type, exports$1.NODE_TYPE.__suspense__)) {
1757
1767
  return parent;
1758
1768
  }
1759
1769
  parent = parent.parent;
@@ -1762,14 +1772,14 @@ function requireIndex_production () {
1762
1772
  };
1763
1773
  var defaultResolveAliveSuspenseFiber = function (fiber) {
1764
1774
  while (fiber) {
1765
- if (include(fiber.type, exports.NODE_TYPE.__suspense__) && exclude(fiber.state, STATE_TYPE.__unmount__)) {
1775
+ if (include(fiber.type, exports$1.NODE_TYPE.__suspense__) && exclude(fiber.state, STATE_TYPE.__unmount__)) {
1766
1776
  return fiber;
1767
1777
  }
1768
1778
  fiber = fiber.parent;
1769
1779
  }
1770
1780
  };
1771
1781
 
1772
- var currentRunningFiber$2 = react.__my_react_internal__.currentRunningFiber;
1782
+ var currentRunningFiber$2 = typeExports.__my_react_internal__.currentRunningFiber;
1773
1783
  var mountToNextFiberFromRoot = function (renderDispatch, fiber) {
1774
1784
  if (include(fiber.state, STATE_TYPE.__unmount__) || renderDispatch.isAppCrashed)
1775
1785
  return null;
@@ -1856,8 +1866,8 @@ function requireIndex_production () {
1856
1866
  return null;
1857
1867
  };
1858
1868
 
1859
- var enableSuspenseRoot$3 = react.__my_react_shared__.enableSuspenseRoot;
1860
- var currentScheduler$e = react.__my_react_internal__.currentScheduler;
1869
+ var enableSuspenseRoot$3 = typeExports.__my_react_shared__.enableSuspenseRoot;
1870
+ var currentScheduler$e = typeExports.__my_react_internal__.currentScheduler;
1861
1871
  var mountLoopAllFromScheduler = function (renderDispatch) {
1862
1872
  while (renderDispatch.runtimeFiber.nextWorkingFiber) {
1863
1873
  renderDispatch.runtimeFiber.retriggerFiber = null;
@@ -1885,7 +1895,6 @@ function requireIndex_production () {
1885
1895
  case 0:
1886
1896
  node = renderDispatch.pendingSuspenseFiberArray.uniShift();
1887
1897
  suspenseField = getInstanceFieldByInstance(node.instance);
1888
- renderDispatch.pendingSuspenseFiberArray.clear();
1889
1898
  list = suspenseField.asyncLoadList.getAll();
1890
1899
  return [4 /*yield*/, Promise.all(list.map(function (item) { return __awaiter(void 0, void 0, void 0, function () {
1891
1900
  var set;
@@ -1970,8 +1979,9 @@ function requireIndex_production () {
1970
1979
  }); };
1971
1980
  var processAsyncLoadListOnSyncMount = function (renderDispatch) {
1972
1981
  var _a;
1973
- if ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
1982
+ var _loop_2 = function () {
1974
1983
  var allPendingSuspenseFiberArray = renderDispatch.pendingSuspenseFiberArray.getAll();
1984
+ renderDispatch.pendingSuspenseFiberArray.clear();
1975
1985
  if (renderDispatch.enableAsyncLoad) {
1976
1986
  var allField_1 = [];
1977
1987
  allPendingSuspenseFiberArray.forEach(function (node) {
@@ -1982,7 +1992,9 @@ function requireIndex_production () {
1982
1992
  return typeof item.status !== "string";
1983
1993
  }
1984
1994
  else {
1985
- return !item._loading && !item._loaded && !item._error;
1995
+ // return !item._loading && !item._loaded && !item._error;
1996
+ // return !item._loading;
1997
+ return true;
1986
1998
  }
1987
1999
  });
1988
2000
  if (allPendingLoadArray.length) {
@@ -2030,11 +2042,13 @@ function requireIndex_production () {
2030
2042
  // TODO use hide tree to improve
2031
2043
  mountLoopAll(renderDispatch, root);
2032
2044
  allField_1.forEach(function (field) { return (field.isHidden = false); });
2033
- renderDispatch.pendingSuspenseFiberArray.clear();
2034
2045
  }
2035
2046
  else {
2036
2047
  throw new Error("[@my-react/reconciler] should not process async load list on sync mount without enableAsyncLoad, you may use a wrong renderDispatch instance");
2037
2048
  }
2049
+ };
2050
+ while ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
2051
+ _loop_2();
2038
2052
  }
2039
2053
  if (enableSuspenseRoot$3.current) {
2040
2054
  var suspenseField_2 = getInstanceFieldByInstance(renderDispatch);
@@ -2095,15 +2109,15 @@ function requireIndex_production () {
2095
2109
  }
2096
2110
  };
2097
2111
 
2098
- var enableSuspenseRoot$2 = react.__my_react_shared__.enableSuspenseRoot;
2099
- var currentScheduler$d = react.__my_react_internal__.currentScheduler;
2100
- exports.updateTypeEnum = void 0;
2112
+ var enableSuspenseRoot$2 = typeExports.__my_react_shared__.enableSuspenseRoot;
2113
+ var currentScheduler$d = typeExports.__my_react_internal__.currentScheduler;
2114
+ exports$1.updateTypeEnum = void 0;
2101
2115
  (function (updateTypeEnum) {
2102
2116
  updateTypeEnum[updateTypeEnum["syncFromRoot"] = 0] = "syncFromRoot";
2103
2117
  updateTypeEnum[updateTypeEnum["syncFromTrigger"] = 1] = "syncFromTrigger";
2104
2118
  updateTypeEnum[updateTypeEnum["concurrentFromRoot"] = 2] = "concurrentFromRoot";
2105
2119
  updateTypeEnum[updateTypeEnum["concurrentFromTrigger"] = 3] = "concurrentFromTrigger";
2106
- })(exports.updateTypeEnum || (exports.updateTypeEnum = {}));
2120
+ })(exports$1.updateTypeEnum || (exports$1.updateTypeEnum = {}));
2107
2121
  var triggerFiberUpdateListener = function (renderDispatch, fiber) {
2108
2122
  safeCallWithCurrentFiber({
2109
2123
  fiber: fiber,
@@ -2144,8 +2158,9 @@ function requireIndex_production () {
2144
2158
  };
2145
2159
  var processAsyncLoadListOnUpdate = function (renderDispatch) {
2146
2160
  var _a;
2147
- if ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
2161
+ var _loop_1 = function () {
2148
2162
  var allPendingSuspenseFiberArray = renderDispatch.pendingSuspenseFiberArray.getAll();
2163
+ renderDispatch.pendingSuspenseFiberArray.clear();
2149
2164
  if (renderDispatch.enableAsyncLoad) {
2150
2165
  var allField_1 = [];
2151
2166
  allPendingSuspenseFiberArray.forEach(function (node) {
@@ -2156,7 +2171,9 @@ function requireIndex_production () {
2156
2171
  return typeof item.status !== "string";
2157
2172
  }
2158
2173
  else {
2159
- return !item._loading && !item._loaded && !item._error;
2174
+ // return !item._loading && !item._loaded && !item._error;
2175
+ // return !item._loading;
2176
+ return true;
2160
2177
  }
2161
2178
  });
2162
2179
  if (allPendingLoadArray.length) {
@@ -2205,11 +2222,13 @@ function requireIndex_production () {
2205
2222
  // TODO use hide tree to improve
2206
2223
  mountLoopAll(renderDispatch, root);
2207
2224
  allField_1.forEach(function (field) { return (field.isHidden = false); });
2208
- renderDispatch.pendingSuspenseFiberArray.clear();
2209
2225
  }
2210
2226
  else {
2211
2227
  throw new Error("[@my-react/reconciler] should not process async load list on sync mount without enableAsyncLoad, you may use a wrong renderDispatch instance");
2212
2228
  }
2229
+ };
2230
+ while ((_a = renderDispatch.pendingSuspenseFiberArray) === null || _a === void 0 ? void 0 : _a.length) {
2231
+ _loop_1();
2213
2232
  }
2214
2233
  // TODO update flow
2215
2234
  if (enableSuspenseRoot$2.current) {
@@ -2270,7 +2289,7 @@ function requireIndex_production () {
2270
2289
  return typeof instance.componentDidCatch === "function" || typeof Component.getDerivedStateFromError === "function";
2271
2290
  };
2272
2291
  var isErrorBoundariesComponent = function (fiber) {
2273
- if (include(fiber.type, exports.NODE_TYPE.__class__) && include(fiber.state, STATE_TYPE.__stable__)) {
2292
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__) && include(fiber.state, STATE_TYPE.__stable__)) {
2274
2293
  var Component = fiber.elementType;
2275
2294
  var typedComponent = Component;
2276
2295
  var typedInstance = fiber.instance;
@@ -2310,12 +2329,11 @@ function requireIndex_production () {
2310
2329
  return field;
2311
2330
  };
2312
2331
 
2313
- /* eslint-disable max-lines */
2314
- var enableLegacyLifeCycle = react.__my_react_shared__.enableLegacyLifeCycle;
2332
+ var enableLegacyLifeCycle = typeExports.__my_react_shared__.enableLegacyLifeCycle;
2315
2333
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2316
2334
  // @ts-ignore
2317
- if (!Object.prototype.hasOwnProperty.call(react.Component.prototype, "_reactInternals")) {
2318
- Object.defineProperty(react.Component.prototype, "_reactInternals", {
2335
+ if (!Object.prototype.hasOwnProperty.call(typeExports.Component.prototype, "_reactInternals")) {
2336
+ Object.defineProperty(typeExports.Component.prototype, "_reactInternals", {
2319
2337
  get: function () {
2320
2338
  return getInstanceOwnerFiber(this);
2321
2339
  },
@@ -2396,7 +2414,7 @@ function requireIndex_production () {
2396
2414
  var processComponentDidMountOnMount = function (renderDispatch, fiber) {
2397
2415
  var typedInstance = fiber.instance;
2398
2416
  var effect = getInstanceEffectState(typedInstance);
2399
- if (exclude(effect, Effect_TYPE.__effect__)) {
2417
+ if (typeof effect === "number" && exclude(effect, Effect_TYPE.__effect__)) {
2400
2418
  setEffectForInstance(typedInstance, Effect_TYPE.__effect__);
2401
2419
  renderDispatch.pendingLayoutEffect(fiber, function invokeComponentDidMountOnInstance() {
2402
2420
  var _a;
@@ -2465,7 +2483,7 @@ function requireIndex_production () {
2465
2483
  var baseState = _a.baseState, baseProps = _a.baseProps, snapshot = _a.snapshot;
2466
2484
  var typedInstance = fiber.instance;
2467
2485
  var effect = getInstanceEffectState(typedInstance);
2468
- if (typedInstance.componentDidUpdate && exclude(effect, Effect_TYPE.__effect__)) {
2486
+ if (typedInstance.componentDidUpdate && typeof effect === "number" && exclude(effect, Effect_TYPE.__effect__)) {
2469
2487
  setEffectForInstance(typedInstance, Effect_TYPE.__effect__);
2470
2488
  renderDispatch.pendingLayoutEffect(fiber, function invokeComponentDidUpdateOnInstance() {
2471
2489
  var _a;
@@ -2599,7 +2617,7 @@ function requireIndex_production () {
2599
2617
  var nextContext = processComponentContextOnUpdate(renderDispatch, fiber);
2600
2618
  var shouldUpdate = Boolean(include(fiber.state, STATE_TYPE.__triggerSyncForce__ | STATE_TYPE.__triggerConcurrentForce__));
2601
2619
  if (!shouldUpdate) {
2602
- shouldUpdate = processComponentShouldUpdateOnUpdate(fiber, {
2620
+ shouldUpdate = !!processComponentShouldUpdateOnUpdate(fiber, {
2603
2621
  nextState: nextState,
2604
2622
  nextProps: nextProps,
2605
2623
  nextContext: nextContext,
@@ -2658,13 +2676,13 @@ function requireIndex_production () {
2658
2676
  };
2659
2677
 
2660
2678
  /* eslint-disable max-lines */
2661
- react.__my_react_shared__.enableDebugFiled;
2662
- var currentScheduler$c = react.__my_react_internal__.currentScheduler;
2679
+ typeExports.__my_react_shared__.enableDebugFiled;
2680
+ var currentScheduler$c = typeExports.__my_react_internal__.currentScheduler;
2663
2681
  // TODO 整合
2664
2682
  var processClassComponentUpdateQueueLatest = function (renderDispatch, fiber, enableTaskPriority) {
2665
2683
  if (include(fiber.state, STATE_TYPE.__unmount__))
2666
2684
  return;
2667
- if (exclude(fiber.type, exports.NODE_TYPE.__class__))
2685
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__class__))
2668
2686
  throw new Error("[@my-react/react] current fiber is not a class component, look like a bug for @my-react");
2669
2687
  var renderScheduler = currentScheduler$c.current;
2670
2688
  var allQueue = fiber.updateQueue;
@@ -2793,7 +2811,7 @@ function requireIndex_production () {
2793
2811
  var processClassComponentUpdateQueueLegacy = function (renderDispatch, fiber) {
2794
2812
  if (include(fiber.state, STATE_TYPE.__unmount__))
2795
2813
  return;
2796
- if (exclude(fiber.type, exports.NODE_TYPE.__class__))
2814
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__class__))
2797
2815
  throw new Error("[@my-react/react] current fiber is not a class component, look like a bug for @my-react");
2798
2816
  var renderScheduler = currentScheduler$c.current;
2799
2817
  var allQueue = fiber.updateQueue;
@@ -2864,7 +2882,7 @@ function requireIndex_production () {
2864
2882
  var _a, _b;
2865
2883
  if (include(fiber.state, STATE_TYPE.__unmount__))
2866
2884
  return;
2867
- if (exclude(fiber.type, exports.NODE_TYPE.__function__)) {
2885
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__function__)) {
2868
2886
  throw new Error("[@my-react/react] current fiber is not a function component, look like a bug for @my-react");
2869
2887
  }
2870
2888
  var renderScheduler = currentScheduler$c.current;
@@ -3023,7 +3041,7 @@ function requireIndex_production () {
3023
3041
  var _a;
3024
3042
  if (include(fiber.state, STATE_TYPE.__unmount__))
3025
3043
  return;
3026
- if (exclude(fiber.type, exports.NODE_TYPE.__function__)) {
3044
+ if (exclude(fiber.type, exports$1.NODE_TYPE.__function__)) {
3027
3045
  throw new Error("[@my-react/react] current fiber is not a function component, look like a bug for @my-react");
3028
3046
  }
3029
3047
  var renderScheduler = currentScheduler$c.current;
@@ -3205,8 +3223,8 @@ function requireIndex_production () {
3205
3223
  syncComponentStateToFiber(fiber);
3206
3224
  };
3207
3225
 
3208
- react.__my_react_internal__.currentComponentFiber; var currentRunningFiber$1 = react.__my_react_internal__.currentRunningFiber;
3209
- react.__my_react_shared__.enableDebugFiled;
3226
+ typeExports.__my_react_internal__.currentComponentFiber; var currentRunningFiber$1 = typeExports.__my_react_internal__.currentRunningFiber;
3227
+ typeExports.__my_react_shared__.enableDebugFiled;
3210
3228
  var processState = function (renderDispatch, _params) {
3211
3229
  var ownerFiber = getInstanceOwnerFiber(_params.trigger);
3212
3230
  if (!renderDispatch)
@@ -3323,11 +3341,11 @@ function requireIndex_production () {
3323
3341
  renderDispatch.isAppUnmounted = true;
3324
3342
  };
3325
3343
 
3326
- var globalLoop$3 = react.__my_react_internal__.globalLoop, currentScheduler$b = react.__my_react_internal__.currentScheduler, currentError = react.__my_react_internal__.currentError;
3344
+ var globalLoop$3 = typeExports.__my_react_internal__.globalLoop, currentScheduler$b = typeExports.__my_react_internal__.currentScheduler, currentError = typeExports.__my_react_internal__.currentError;
3327
3345
  var applyTriggerFiberCb = function (renderDispatch, fiber) {
3328
3346
  var _a, _b;
3329
3347
  var cbArray = renderDispatch.runtimeMap.triggerCallbackMap.get(fiber);
3330
- if (include(fiber.type, exports.NODE_TYPE.__class__)) {
3348
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__)) {
3331
3349
  (_a = cbArray === null || cbArray === void 0 ? void 0 : cbArray.listToFoot) === null || _a === void 0 ? void 0 : _a.call(cbArray, function (cb) {
3332
3350
  renderDispatch.pendingLayoutEffect(fiber, cb, { stickyToFoot: true });
3333
3351
  });
@@ -3467,7 +3485,7 @@ function requireIndex_production () {
3467
3485
  }
3468
3486
  };
3469
3487
 
3470
- var globalLoop$2 = react.__my_react_internal__.globalLoop, currentScheduler$a = react.__my_react_internal__.currentScheduler;
3488
+ var globalLoop$2 = typeExports.__my_react_internal__.globalLoop, currentScheduler$a = typeExports.__my_react_internal__.currentScheduler;
3471
3489
  var scheduleUpdateFromRoot = function (renderDispatch) {
3472
3490
  flushEffectCallback();
3473
3491
  var allLive = renderDispatch.pendingUpdateFiberArray.getAll().filter(function (f) { return exclude(f.state, STATE_TYPE.__unmount__); });
@@ -3525,7 +3543,7 @@ function requireIndex_production () {
3525
3543
  }
3526
3544
  };
3527
3545
  var scheduleUpdate = function (renderDispatch) {
3528
- react.__my_react_internal__.recentlyCreatedOwnerStacks.current = 0;
3546
+ typeExports.__my_react_internal__.recentlyCreatedOwnerStacks.current = 0;
3529
3547
  if (renderDispatch.isAppUnmounted) {
3530
3548
  scheduleOther(renderDispatch);
3531
3549
  return;
@@ -3533,8 +3551,8 @@ function requireIndex_production () {
3533
3551
  scheduleUpdateFromRoot(renderDispatch);
3534
3552
  };
3535
3553
 
3536
- var globalLoop$1 = react.__my_react_internal__.globalLoop, currentScheduler$9 = react.__my_react_internal__.currentScheduler;
3537
- react.__my_react_shared__.enableScopeTreeLog;
3554
+ var globalLoop$1 = typeExports.__my_react_internal__.globalLoop, currentScheduler$9 = typeExports.__my_react_internal__.currentScheduler;
3555
+ typeExports.__my_react_shared__.enableScopeTreeLog;
3538
3556
  function finishUpdateSyncFromRoot(renderDispatch) {
3539
3557
  var commitList = renderDispatch.pendingCommitFiberList;
3540
3558
  renderDispatch.resetUpdateFlowRuntimeFiber();
@@ -3626,8 +3644,8 @@ function requireIndex_production () {
3626
3644
  }
3627
3645
  };
3628
3646
 
3629
- var MyReactInternalInstance$4 = react.__my_react_internal__.MyReactInternalInstance, currentScheduler$8 = react.__my_react_internal__.currentScheduler;
3630
- var enableSyncFlush = react.__my_react_shared__.enableSyncFlush;
3647
+ var MyReactInternalInstance$4 = typeExports.__my_react_internal__.MyReactInternalInstance, currentScheduler$8 = typeExports.__my_react_internal__.currentScheduler;
3648
+ var enableSyncFlush = typeExports.__my_react_shared__.enableSyncFlush;
3631
3649
  var defaultPayLoad = function (a) { return a; };
3632
3650
  var MyReactHookNode = /** @class */ (function (_super) {
3633
3651
  __extends(MyReactHookNode, _super);
@@ -3665,7 +3683,7 @@ function requireIndex_production () {
3665
3683
  };
3666
3684
  };
3667
3685
 
3668
- var currentComponentFiber$3 = react.__my_react_internal__.currentComponentFiber;
3686
+ var currentComponentFiber$3 = typeExports.__my_react_internal__.currentComponentFiber;
3669
3687
  var MyReactSignal = /** @class */ (function () {
3670
3688
  function MyReactSignal(_rawValue, _renderDispatch) {
3671
3689
  var _this = this;
@@ -3691,8 +3709,8 @@ function requireIndex_production () {
3691
3709
  return MyReactSignal;
3692
3710
  }());
3693
3711
 
3694
- var enableDebugLog$1 = react.__my_react_shared__.enableDebugLog; react.__my_react_shared__.enableDebugFiled;
3695
- var currentHookTreeNode$2 = react.__my_react_internal__.currentHookTreeNode, currentHookNodeIndex$2 = react.__my_react_internal__.currentHookNodeIndex;
3712
+ var enableDebugLog$1 = typeExports.__my_react_shared__.enableDebugLog; typeExports.__my_react_shared__.enableDebugFiled;
3713
+ var currentHookTreeNode$2 = typeExports.__my_react_internal__.currentHookTreeNode, currentHookNodeIndex$2 = typeExports.__my_react_internal__.currentHookNodeIndex;
3696
3714
  var defaultReducer = function (state, action) {
3697
3715
  return typeof action === "function" ? action(state) : action;
3698
3716
  };
@@ -3708,8 +3726,9 @@ function requireIndex_production () {
3708
3726
  if (currentHookIndex === 0) {
3709
3727
  defaultDeleteChildEffect(renderDispatch, fiber);
3710
3728
  defaultDeleteCurrentEffect(renderDispatch, fiber);
3711
- fiber.hookList.clear();
3712
3729
  }
3730
+ return currentHook;
3731
+ // fiber.hookList.clear();
3713
3732
  }
3714
3733
  else {
3715
3734
  throw new Error("[@my-react/react] should not have a hookList for current node, this is a bug for @my-react");
@@ -3835,17 +3854,17 @@ function requireIndex_production () {
3835
3854
  value: false,
3836
3855
  start: function startTransitionByHook(cb) {
3837
3856
  var loadingCallback = function (cb) {
3838
- react.startTransition(function () {
3857
+ typeExports.startTransition(function () {
3839
3858
  hookNode._update({ isForce: true, isSync: true, callback: cb, payLoad: function (last) { return ({ value: true, start: last.start }); } });
3840
3859
  });
3841
3860
  };
3842
3861
  var loadedCallback = function () {
3843
- react.startTransition(function () {
3862
+ typeExports.startTransition(function () {
3844
3863
  hookNode._update({ isForce: true, isSync: true, payLoad: function (last) { return ({ value: false, start: last.start }); } });
3845
3864
  });
3846
3865
  };
3847
3866
  var taskCallback = function () {
3848
- react.startTransition(function () {
3867
+ typeExports.startTransition(function () {
3849
3868
  safeCallWithCurrentFiber({ fiber: fiber, action: cb });
3850
3869
  loadedCallback();
3851
3870
  });
@@ -3929,8 +3948,8 @@ function requireIndex_production () {
3929
3948
  }
3930
3949
  };
3931
3950
 
3932
- var enableDebugLog = react.__my_react_shared__.enableDebugLog;
3933
- var currentHookTreeNode$1 = react.__my_react_internal__.currentHookTreeNode, currentScheduler$7 = react.__my_react_internal__.currentScheduler;
3951
+ var enableDebugLog = typeExports.__my_react_shared__.enableDebugLog;
3952
+ var currentHookTreeNode$1 = typeExports.__my_react_internal__.currentHookTreeNode, currentScheduler$7 = typeExports.__my_react_internal__.currentScheduler;
3934
3953
  var updateHookNode = function (renderDispatch, _a, fiber, isHMR) {
3935
3954
  var _b, _c, _d;
3936
3955
  var type = _a.type, value = _a.value, reducer = _a.reducer, deps = _a.deps;
@@ -4147,7 +4166,7 @@ function requireIndex_production () {
4147
4166
  });
4148
4167
  };
4149
4168
 
4150
- react.__my_react_shared__.enableDebugFiled;
4169
+ typeExports.__my_react_shared__.enableDebugFiled;
4151
4170
  var clearFiberNode = function (renderDispatch, fiber) {
4152
4171
  hookListUnmount(renderDispatch, fiber);
4153
4172
  processClassComponentUnmount(renderDispatch, fiber);
@@ -4158,7 +4177,7 @@ function requireIndex_production () {
4158
4177
  renderDispatch.commitUnsetRef(fiber);
4159
4178
  };
4160
4179
 
4161
- var currentScheduler$6 = react.__my_react_internal__.currentScheduler;
4180
+ var currentScheduler$6 = typeExports.__my_react_internal__.currentScheduler;
4162
4181
  var hmr = function (fiber, nextType, forceRefresh) {
4163
4182
  {
4164
4183
  throw new Error("[@my-react/react] can not try to dev refresh this app in prod env!");
@@ -4195,15 +4214,15 @@ function requireIndex_production () {
4195
4214
  fiber.constructor.prototype.isMyReactFiberNode);
4196
4215
  };
4197
4216
 
4198
- var currentScheduler$5 = react.__my_react_internal__.currentScheduler;
4217
+ var currentScheduler$5 = typeExports.__my_react_internal__.currentScheduler;
4199
4218
  var processUpdateOnFiber = function (renderDispatch, fiber, _isImmediate, _isRetrigger) {
4200
4219
  var renderScheduler = currentScheduler$5.current;
4201
4220
  var flag = renderDispatch.enableConcurrentMode;
4202
4221
  var updateState = null;
4203
- if (include(fiber.type, exports.NODE_TYPE.__class__)) {
4222
+ if (include(fiber.type, exports$1.NODE_TYPE.__class__)) {
4204
4223
  updateState = flag ? processClassComponentUpdateQueueLatest(renderDispatch, fiber, flag) : processClassComponentUpdateQueueLegacy(renderDispatch, fiber);
4205
4224
  }
4206
- else if (include(fiber.type, exports.NODE_TYPE.__function__)) {
4225
+ else if (include(fiber.type, exports$1.NODE_TYPE.__function__)) {
4207
4226
  updateState = flag
4208
4227
  ? processFunctionComponentUpdateQueueLatest(renderDispatch, fiber, flag)
4209
4228
  : processFunctionComponentUpdateQueueLegacy(renderDispatch, fiber);
@@ -4289,7 +4308,7 @@ function requireIndex_production () {
4289
4308
  function MyReactFiberNode(element) {
4290
4309
  this.state = STATE_TYPE.__initial__;
4291
4310
  this.patch = PATCH_TYPE.__initial__;
4292
- this.type = exports.NODE_TYPE.__initial__;
4311
+ this.type = exports$1.NODE_TYPE.__initial__;
4293
4312
  this.child = null;
4294
4313
  this.parent = null;
4295
4314
  this.sibling = null;
@@ -4304,7 +4323,7 @@ function requireIndex_production () {
4304
4323
  this.key = key;
4305
4324
  this.type = nodeType;
4306
4325
  this.elementType = elementType;
4307
- if (include(nodeType, exports.NODE_TYPE.__function__)) {
4326
+ if (include(nodeType, exports$1.NODE_TYPE.__function__)) {
4308
4327
  this.elementRawType = element === null || element === void 0 ? void 0 : element.type;
4309
4328
  }
4310
4329
  this.pendingProps = pendingProps;
@@ -4390,7 +4409,7 @@ function requireIndex_production () {
4390
4409
  var nextProps = fiber.pendingProps;
4391
4410
  var nextRef = fiber.ref;
4392
4411
  if (prevElementType !== nextElementType || prevProps !== nextProps) {
4393
- if (include(fiber.type, exports.NODE_TYPE.__memo__)) {
4412
+ if (include(fiber.type, exports$1.NODE_TYPE.__memo__)) {
4394
4413
  var typedElement = nextElement;
4395
4414
  var typedElementType = typedElement.type;
4396
4415
  var compare = typedElementType.compare || isNormalEquals;
@@ -4409,12 +4428,12 @@ function requireIndex_production () {
4409
4428
  }
4410
4429
  }
4411
4430
  if (fiber.state !== STATE_TYPE.__stable__) {
4412
- if (include(fiber.type, exports.NODE_TYPE.__plain__)) {
4431
+ if (include(fiber.type, exports$1.NODE_TYPE.__plain__)) {
4413
4432
  if (!isNormalEquals(fiber.pendingProps, fiber.memoizedProps, function (key) { return key === "children"; })) {
4414
4433
  renderDispatch.pendingUpdate(fiber);
4415
4434
  }
4416
4435
  }
4417
- if (include(fiber.type, exports.NODE_TYPE.__text__)) {
4436
+ if (include(fiber.type, exports$1.NODE_TYPE.__text__)) {
4418
4437
  renderDispatch.pendingUpdate(fiber);
4419
4438
  }
4420
4439
  }
@@ -4456,7 +4475,7 @@ function requireIndex_production () {
4456
4475
  return fiber;
4457
4476
  };
4458
4477
 
4459
- react.__my_react_shared__.enableDebugFiled;
4478
+ typeExports.__my_react_shared__.enableDebugFiled;
4460
4479
  var unmountFiberNode = function (renderDispatch, fiber) {
4461
4480
  if (include(fiber.state, STATE_TYPE.__unmount__))
4462
4481
  return;
@@ -4508,7 +4527,7 @@ function requireIndex_production () {
4508
4527
  fiber.state = STATE_TYPE.__unmount__;
4509
4528
  };
4510
4529
 
4511
- react.__my_react_shared__.enableDebugFiled;
4530
+ typeExports.__my_react_shared__.enableDebugFiled;
4512
4531
  var getIsSameTypeNode = function (newChild, draftFiber) {
4513
4532
  if (!draftFiber)
4514
4533
  return false;
@@ -4534,12 +4553,12 @@ function requireIndex_production () {
4534
4553
  var dynamicFragmentProps = { wrap: true };
4535
4554
  var createFragmentWithInitial = function (renderDispatch, newChild, parentFiber) {
4536
4555
  // TODO make there are not a element
4537
- var newElement = react.createElement(Fragment, dynamicFragmentProps, newChild);
4556
+ var newElement = typeExports.createElement(Fragment, dynamicFragmentProps, newChild);
4538
4557
  var newFiber = createFiberNode(renderDispatch, { parent: parentFiber }, newElement);
4539
4558
  return newFiber;
4540
4559
  };
4541
4560
  var createFragmentWithUpdate = function (renderDispatch, newChild, parentFiber) {
4542
- var newElement = react.createElement(Fragment, dynamicFragmentProps, newChild);
4561
+ var newElement = typeExports.createElement(Fragment, dynamicFragmentProps, newChild);
4543
4562
  var newFiber = createFiberNode(renderDispatch, { parent: parentFiber, type: "position" }, newElement);
4544
4563
  return newFiber;
4545
4564
  };
@@ -4561,8 +4580,8 @@ function requireIndex_production () {
4561
4580
  existingChildren.delete(index);
4562
4581
  }
4563
4582
  // same type
4564
- if (include(draftFiber_1 === null || draftFiber_1 === void 0 ? void 0 : draftFiber_1.type, exports.NODE_TYPE.__fragment__)) {
4565
- var newElement = react.createElement(Fragment, dynamicFragmentProps, newChild);
4583
+ if (include(draftFiber_1 === null || draftFiber_1 === void 0 ? void 0 : draftFiber_1.type, exports$1.NODE_TYPE.__fragment__)) {
4584
+ var newElement = typeExports.createElement(Fragment, dynamicFragmentProps, newChild);
4566
4585
  return updateFiberNode(renderDispatch, { fiber: draftFiber_1, parent: parentFiber, prevFiber: prevFiberChild }, newElement);
4567
4586
  }
4568
4587
  else {
@@ -4570,7 +4589,7 @@ function requireIndex_production () {
4570
4589
  return createFragmentWithUpdate(renderDispatch, newChild, parentFiber);
4571
4590
  }
4572
4591
  }
4573
- var keyToGet = react.isValidElement(newChild) && typeof newChild.key === "string" ? newChild.key : index;
4592
+ var keyToGet = typeExports.isValidElement(newChild) && typeof newChild.key === "string" ? newChild.key : index;
4574
4593
  var draftList = existingChildren.get(keyToGet);
4575
4594
  var draftFiber = draftList === null || draftList === void 0 ? void 0 : draftList.shift();
4576
4595
  if (draftList && !draftList.length) {
@@ -4653,7 +4672,7 @@ function requireIndex_production () {
4653
4672
  return null;
4654
4673
  };
4655
4674
 
4656
- var currentComponentFiber$2 = react.__my_react_internal__.currentComponentFiber, MyReactInternalInstance$3 = react.__my_react_internal__.MyReactInternalInstance;
4675
+ var currentComponentFiber$2 = typeExports.__my_react_internal__.currentComponentFiber, MyReactInternalInstance$3 = typeExports.__my_react_internal__.MyReactInternalInstance;
4657
4676
  var processProvider = function (renderDispatch, fiber) {
4658
4677
  if (renderDispatch.isAppMounted) {
4659
4678
  var prevProps = fiber.memoizedProps.value;
@@ -4694,7 +4713,7 @@ function requireIndex_production () {
4694
4713
  return children;
4695
4714
  };
4696
4715
 
4697
- var currentHookTreeNode = react.__my_react_internal__.currentHookTreeNode, currentHookNodeIndex$1 = react.__my_react_internal__.currentHookNodeIndex, currentScheduler$4 = react.__my_react_internal__.currentScheduler;
4716
+ var currentHookTreeNode = typeExports.__my_react_internal__.currentHookTreeNode, currentHookNodeIndex$1 = typeExports.__my_react_internal__.currentHookNodeIndex, currentScheduler$4 = typeExports.__my_react_internal__.currentScheduler, cacheLazy = typeExports.__my_react_internal__.cacheLazy;
4698
4717
  var triggerState = STATE_TYPE.__triggerSync__ |
4699
4718
  STATE_TYPE.__triggerSyncForce__ |
4700
4719
  STATE_TYPE.__triggerConcurrent__ |
@@ -4706,7 +4725,7 @@ function requireIndex_production () {
4706
4725
  currentHookNodeIndex$1.current = 0;
4707
4726
  var typedElementType = fiber.elementType;
4708
4727
  var children = null;
4709
- if (include(fiber.type, exports.NODE_TYPE.__forwardRef__)) {
4728
+ if (include(fiber.type, exports$1.NODE_TYPE.__forwardRef__)) {
4710
4729
  var typedElementTypeWithRef_1 = typedElementType;
4711
4730
  children = safeCallWithCurrentFiber({
4712
4731
  fiber: fiber,
@@ -4714,7 +4733,17 @@ function requireIndex_production () {
4714
4733
  var _a, _b, _c, _d;
4715
4734
  var re = undefined;
4716
4735
  try {
4717
- re = typedElementTypeWithRef_1(fiber.pendingProps, fiber.ref);
4736
+ if (typedElementTypeWithRef_1[TYPEKEY] === SERVER_REFERENCE_SYMBOL) {
4737
+ var cacheFun = typeExports.cache(typedElementTypeWithRef_1);
4738
+ re = cacheFun(fiber.pendingProps, fiber.ref);
4739
+ // support rsc
4740
+ // rsc return promise, so we transform promise to lazy, and try to keep the lazy stable
4741
+ if (isPromise(re))
4742
+ return typeExports.createElement(cacheLazy(re));
4743
+ }
4744
+ else {
4745
+ re = typedElementTypeWithRef_1(fiber.pendingProps, fiber.ref);
4746
+ }
4718
4747
  }
4719
4748
  catch (e) {
4720
4749
  if (isPromise(e)) {
@@ -4741,7 +4770,16 @@ function requireIndex_production () {
4741
4770
  var _a, _b, _c, _d;
4742
4771
  var re = undefined;
4743
4772
  try {
4744
- re = typedElementType(fiber.pendingProps);
4773
+ if (typedElementType[TYPEKEY] === SERVER_REFERENCE_SYMBOL) {
4774
+ var cacheFun = typeExports.cache(typedElementType);
4775
+ re = cacheFun(fiber.pendingProps);
4776
+ // support rsc
4777
+ if (isPromise(re))
4778
+ return typeExports.createElement(cacheLazy(re));
4779
+ }
4780
+ else {
4781
+ re = typedElementType(fiber.pendingProps);
4782
+ }
4745
4783
  }
4746
4784
  catch (e) {
4747
4785
  if (isPromise(e)) {
@@ -4766,11 +4804,11 @@ function requireIndex_production () {
4766
4804
  return children;
4767
4805
  };
4768
4806
 
4769
- var WrapperByLazyScope = function (children) { return react.createElement(ScopeLazy, null, children); };
4807
+ var WrapperByLazyScope = function (children) { return typeExports.createElement(ScopeLazy, null, children); };
4770
4808
  var WrapperBySuspenseScope = function (children) {
4771
- return react.createElement(ScopeSuspense, null, react.createElement(Comment, { mode: "s" }), children, react.createElement(Comment, { mode: "e" }));
4809
+ return typeExports.createElement(ScopeSuspense, null, typeExports.createElement(Comment, { mode: "s" }), children, typeExports.createElement(Comment, { mode: "e" }));
4772
4810
  };
4773
- var isCommentElement = function (fiber) { return include(fiber.type, exports.NODE_TYPE.__comment__); };
4811
+ var isCommentElement = function (fiber) { return include(fiber.type, exports$1.NODE_TYPE.__comment__); };
4774
4812
  var isCommentStartElement = function (fiber) {
4775
4813
  if (isCommentElement(fiber)) {
4776
4814
  return fiber.pendingProps["mode"] === "s";
@@ -4784,8 +4822,8 @@ function requireIndex_production () {
4784
4822
  return false;
4785
4823
  };
4786
4824
 
4787
- var enableSuspenseRoot$1 = react.__my_react_shared__.enableSuspenseRoot;
4788
- var currentScheduler$3 = react.__my_react_internal__.currentScheduler;
4825
+ var enableSuspenseRoot$1 = typeExports.__my_react_shared__.enableSuspenseRoot; typeExports.__my_react_shared__.enableDebugFiled;
4826
+ var currentScheduler$3 = typeExports.__my_react_internal__.currentScheduler;
4789
4827
  var loadLazy = function (renderDispatch, typedElementType) { return __awaiter(void 0, void 0, void 0, function () {
4790
4828
  var loadedPromise, loaded, render, e_1;
4791
4829
  return __generator(this, function (_a) {
@@ -4825,7 +4863,12 @@ function requireIndex_production () {
4825
4863
  }
4826
4864
  if (typedElementType._loaded === true) {
4827
4865
  var render = typedElementType.render;
4828
- return WrapperByLazyScope(react.createElement(render, fiber.pendingProps));
4866
+ if (typeExports.isValidElement(render)) {
4867
+ return WrapperByLazyScope(typeExports.cloneElement(render));
4868
+ }
4869
+ else {
4870
+ return WrapperByLazyScope(typeExports.createElement(render, fiber.pendingProps));
4871
+ }
4829
4872
  }
4830
4873
  typedElementType._list = typedElementType._list || new Set();
4831
4874
  typedElementType._list.add(fiber);
@@ -4873,7 +4916,7 @@ function requireIndex_production () {
4873
4916
  typedField.asyncLoadList = new UniqueArray();
4874
4917
  };
4875
4918
 
4876
- var MyReactInternalInstance$2 = react.__my_react_internal__.MyReactInternalInstance;
4919
+ var MyReactInternalInstance$2 = typeExports.__my_react_internal__.MyReactInternalInstance;
4877
4920
  var processSuspense = function (fiber) {
4878
4921
  var isUpdate = !!fiber.instance;
4879
4922
  fiber.instance = fiber.instance || new MyReactInternalInstance$2();
@@ -4886,7 +4929,7 @@ function requireIndex_production () {
4886
4929
  return children;
4887
4930
  };
4888
4931
 
4889
- react.__my_react_internal__.MyReactInternalInstance; var instanceToInitialFieldMap = react.__my_react_internal__.instanceToInitialFieldMap;
4932
+ typeExports.__my_react_internal__.MyReactInternalInstance; var instanceToInitialFieldMap = typeExports.__my_react_internal__.instanceToInitialFieldMap;
4890
4933
  // support private instance field
4891
4934
  var instanceMap = instanceToInitialFieldMap;
4892
4935
  var initInstance = function (instance) {
@@ -4992,8 +5035,8 @@ function requireIndex_production () {
4992
5035
  return field === null || field === void 0 ? void 0 : field.effect;
4993
5036
  };
4994
5037
 
4995
- var currentComponentFiber$1 = react.__my_react_internal__.currentComponentFiber, MyReactInternalInstance$1 = react.__my_react_internal__.MyReactInternalInstance;
4996
- var enablePerformanceLog = react.__my_react_shared__.enablePerformanceLog, enableDebugFiled = react.__my_react_shared__.enableDebugFiled;
5038
+ var currentComponentFiber$1 = typeExports.__my_react_internal__.currentComponentFiber, MyReactInternalInstance$1 = typeExports.__my_react_internal__.MyReactInternalInstance;
5039
+ var enablePerformanceLog = typeExports.__my_react_shared__.enablePerformanceLog, enableDebugFiled = typeExports.__my_react_shared__.enableDebugFiled;
4997
5040
  var nextWorkCommon = function (renderDispatch, fiber, children) {
4998
5041
  if (exclude(fiber.patch, PATCH_TYPE.__update__)) {
4999
5042
  fiber.memoizedProps = fiber.pendingProps;
@@ -5033,7 +5076,7 @@ function requireIndex_production () {
5033
5076
  nextWorkCommon(renderDispatch, fiber, children);
5034
5077
  };
5035
5078
  var nextWorkComponent = function (renderDispatch, fiber) {
5036
- if (include(fiber.type, exports.NODE_TYPE.__function__)) {
5079
+ if (include(fiber.type, exports$1.NODE_TYPE.__function__)) {
5037
5080
  currentComponentFiber$1.current = fiber;
5038
5081
  nextWorkFunctionComponent(renderDispatch, fiber);
5039
5082
  currentComponentFiber$1.current = null;
@@ -5138,8 +5181,8 @@ function requireIndex_production () {
5138
5181
  });
5139
5182
  };
5140
5183
 
5141
- react.__my_react_shared__.enableDebugFiled;
5142
- var currentRunningFiber = react.__my_react_internal__.currentRunningFiber, MyReactInternalInstance = react.__my_react_internal__.MyReactInternalInstance;
5184
+ typeExports.__my_react_shared__.enableDebugFiled;
5185
+ var currentRunningFiber = typeExports.__my_react_internal__.currentRunningFiber, MyReactInternalInstance = typeExports.__my_react_internal__.MyReactInternalInstance;
5143
5186
  var defaultGetContextValue = function (fiber, ContextObject) {
5144
5187
  var _a;
5145
5188
  if (fiber) {
@@ -5153,14 +5196,14 @@ function requireIndex_production () {
5153
5196
  if ((fiber === null || fiber === void 0 ? void 0 : fiber.parent) && ContextObject) {
5154
5197
  var parent_1 = fiber.parent;
5155
5198
  while (parent_1) {
5156
- if (include(parent_1.type, exports.NODE_TYPE.__provider__)) {
5199
+ if (include(parent_1.type, exports$1.NODE_TYPE.__provider__)) {
5157
5200
  var typedElementType = parent_1.elementType;
5158
5201
  var contextObj = typedElementType["Context"];
5159
5202
  if (contextObj === ContextObject) {
5160
5203
  return parent_1;
5161
5204
  }
5162
5205
  }
5163
- if (include(parent_1.type, exports.NODE_TYPE.__context__)) {
5206
+ if (include(parent_1.type, exports$1.NODE_TYPE.__context__)) {
5164
5207
  var typedElementType = parent_1.elementType;
5165
5208
  var contextObj = typedElementType;
5166
5209
  if (contextObj === ContextObject) {
@@ -5226,8 +5269,8 @@ function requireIndex_production () {
5226
5269
  });
5227
5270
  };
5228
5271
 
5229
- var currentScheduler$2 = react.__my_react_internal__.currentScheduler;
5230
- react.__my_react_shared__.enableScopeTreeLog;
5272
+ var currentScheduler$2 = typeExports.__my_react_internal__.currentScheduler;
5273
+ typeExports.__my_react_shared__.enableScopeTreeLog;
5231
5274
  // TODO improve
5232
5275
  var defaultDispatchMountLatest = function (_dispatch, _fiber) {
5233
5276
  beforeSyncUpdate();
@@ -5291,7 +5334,7 @@ function requireIndex_production () {
5291
5334
  var defaultResolveScope = function (fiber) {
5292
5335
  var parent = fiber.parent;
5293
5336
  while (parent) {
5294
- if (include(parent.type, exports.NODE_TYPE.__scope__) || include(parent.type, exports.NODE_TYPE.__scopeSuspense__)) {
5337
+ if (include(parent.type, exports$1.NODE_TYPE.__scope__) || include(parent.type, exports$1.NODE_TYPE.__scopeSuspense__)) {
5295
5338
  return parent;
5296
5339
  }
5297
5340
  parent = parent.parent;
@@ -5299,13 +5342,13 @@ function requireIndex_production () {
5299
5342
  return null;
5300
5343
  };
5301
5344
 
5302
- react.__my_react_shared__.enableDebugFiled;
5345
+ typeExports.__my_react_shared__.enableDebugFiled;
5303
5346
  var defaultGenerateStrict = function (fiber) {
5304
5347
  return false;
5305
5348
  };
5306
5349
 
5307
- var currentScheduler$1 = react.__my_react_internal__.currentScheduler;
5308
- react.__my_react_shared__.enableScopeTreeLog;
5350
+ var currentScheduler$1 = typeExports.__my_react_internal__.currentScheduler;
5351
+ typeExports.__my_react_shared__.enableScopeTreeLog;
5309
5352
  var defaultDispatchUpdate = function (_dispatch, _list, sync) {
5310
5353
  // TODO maybe need call `insertionEffect` in another function
5311
5354
  beforeSyncUpdate();
@@ -5331,22 +5374,22 @@ function requireIndex_production () {
5331
5374
  });
5332
5375
  }
5333
5376
  });
5334
- _list.listToHead(function invokePositionList(_fiber) {
5377
+ _list.listToFoot(function invokeAppendList(_fiber) {
5335
5378
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
5336
5379
  safeCallWithCurrentFiber({
5337
5380
  fiber: _fiber,
5338
- action: function safeCallPosition() {
5339
- _dispatch.commitPosition(_fiber);
5381
+ action: function safeCallAppendList() {
5382
+ _dispatch.commitAppend(_fiber);
5340
5383
  },
5341
5384
  });
5342
5385
  }
5343
5386
  });
5344
- _list.listToFoot(function invokeAppendList(_fiber) {
5387
+ _list.listToHead(function invokePositionList(_fiber) {
5345
5388
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
5346
5389
  safeCallWithCurrentFiber({
5347
5390
  fiber: _fiber,
5348
- action: function safeCallAppendList() {
5349
- _dispatch.commitAppend(_fiber);
5391
+ action: function safeCallPosition() {
5392
+ _dispatch.commitPosition(_fiber);
5350
5393
  },
5351
5394
  });
5352
5395
  }
@@ -5389,7 +5432,7 @@ function requireIndex_production () {
5389
5432
  }
5390
5433
  };
5391
5434
 
5392
- var currentComponentFiber = react.__my_react_internal__.currentComponentFiber, currentHookNodeIndex = react.__my_react_internal__.currentHookNodeIndex;
5435
+ var currentComponentFiber = typeExports.__my_react_internal__.currentComponentFiber, currentHookNodeIndex = typeExports.__my_react_internal__.currentHookNodeIndex;
5393
5436
  var resolveHookValue = function (hookNode, field) {
5394
5437
  if (hookNode) {
5395
5438
  switch (hookNode.type) {
@@ -5442,8 +5485,8 @@ function requireIndex_production () {
5442
5485
  return resolveHookValue(currentHook, field);
5443
5486
  };
5444
5487
 
5445
- var enableSuspenseRoot = react.__my_react_shared__.enableSuspenseRoot;
5446
- var currentScheduler = react.__my_react_internal__.currentScheduler;
5488
+ var enableSuspenseRoot = typeExports.__my_react_shared__.enableSuspenseRoot; typeExports.__my_react_shared__.enableDebugFiled;
5489
+ var currentScheduler = typeExports.__my_react_internal__.currentScheduler;
5447
5490
  var loadPromise = function (renderDispatch, promise) { return __awaiter(void 0, void 0, void 0, function () {
5448
5491
  var value, reason_1;
5449
5492
  return __generator(this, function (_a) {
@@ -5453,20 +5496,22 @@ function requireIndex_production () {
5453
5496
  return [2 /*return*/];
5454
5497
  _a.label = 1;
5455
5498
  case 1:
5456
- _a.trys.push([1, 3, , 4]);
5499
+ _a.trys.push([1, 3, 4, 5]);
5457
5500
  promise.status = "pending";
5458
5501
  return [4 /*yield*/, Promise.resolve(promise)];
5459
5502
  case 2:
5460
5503
  value = _a.sent();
5461
5504
  promise.status = "fulfilled";
5462
5505
  promise._value = value;
5463
- return [3 /*break*/, 4];
5506
+ return [3 /*break*/, 5];
5464
5507
  case 3:
5465
5508
  reason_1 = _a.sent();
5466
5509
  promise.status = "rejected";
5467
5510
  promise._reason = reason_1;
5468
- return [3 /*break*/, 4];
5469
- case 4: return [2 /*return*/];
5511
+ return [3 /*break*/, 5];
5512
+ case 4:
5513
+ return [7 /*endfinally*/];
5514
+ case 5: return [2 /*return*/];
5470
5515
  }
5471
5516
  });
5472
5517
  }); };
@@ -5554,7 +5599,7 @@ function requireIndex_production () {
5554
5599
  return null;
5555
5600
  };
5556
5601
 
5557
- var Dispatcher = react.__my_react_internal__.Dispatcher, MyReactInternalInstanceClass = react.__my_react_internal__.MyReactInternalInstance, dispatchToListenerMap = react.__my_react_internal__.dispatchToListenerMap;
5602
+ var Dispatcher = typeExports.__my_react_internal__.Dispatcher, MyReactInternalInstanceClass = typeExports.__my_react_internal__.MyReactInternalInstance, dispatchToListenerMap = typeExports.__my_react_internal__.dispatchToListenerMap;
5558
5603
  var getInitialListeners = function () {
5559
5604
  return {
5560
5605
  fiberInitial: new Set(),
@@ -5593,11 +5638,11 @@ function requireIndex_production () {
5593
5638
  retriggerFiber: null,
5594
5639
  }); };
5595
5640
  var initialRef = {
5596
- typeForRef: exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__class__,
5597
- typeForCreate: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__portal__ | exports.NODE_TYPE.__comment__,
5598
- typeForUpdate: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__comment__,
5599
- typeForAppend: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__comment__,
5600
- typeForNativeNode: exports.NODE_TYPE.__text__ | exports.NODE_TYPE.__plain__ | exports.NODE_TYPE.__portal__ | exports.NODE_TYPE.__comment__,
5641
+ typeForRef: exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__class__,
5642
+ typeForCreate: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__portal__ | exports$1.NODE_TYPE.__comment__,
5643
+ typeForUpdate: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__comment__,
5644
+ typeForAppend: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__comment__,
5645
+ typeForNativeNode: exports$1.NODE_TYPE.__text__ | exports$1.NODE_TYPE.__plain__ | exports$1.NODE_TYPE.__portal__ | exports$1.NODE_TYPE.__comment__,
5601
5646
  };
5602
5647
  var listenerMap = dispatchToListenerMap;
5603
5648
  var RenderDispatchEvent = /** @class */ (function (_super) {
@@ -5701,628 +5746,668 @@ function requireIndex_production () {
5701
5746
  RenderDispatchEvent.prototype.resetYield = function () {
5702
5747
  };
5703
5748
  RenderDispatchEvent.prototype.onFiberInitial = function (cb) {
5704
- var set = listenerMap.get(this).fiberInitial;
5705
- set.add(cb);
5706
- return function () { return set.delete(cb); };
5749
+ var _a;
5750
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberInitial;
5751
+ set === null || set === void 0 ? void 0 : set.add(cb);
5752
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
5707
5753
  };
5708
5754
  RenderDispatchEvent.prototype.onceFiberInitial = function (cb) {
5709
- var set = listenerMap.get(this).fiberInitial;
5755
+ var _a;
5756
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberInitial;
5710
5757
  var onceCb = function (_fiber) {
5711
5758
  cb(_fiber);
5712
- set.delete(onceCb);
5759
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
5713
5760
  };
5714
- set.add(onceCb);
5761
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
5715
5762
  };
5716
5763
  RenderDispatchEvent.prototype.callOnFiberInitial = function (_fiber) {
5717
- var _a;
5718
- var set = listenerMap.get(this).fiberInitial;
5719
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
5764
+ var _a, _b;
5765
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberInitial;
5766
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
5720
5767
  };
5721
5768
  RenderDispatchEvent.prototype.onFiberUpdate = function (cb) {
5722
- var set = listenerMap.get(this).fiberUpdate;
5723
- set.add(cb);
5724
- return function () { return set.delete(cb); };
5769
+ var _a;
5770
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUpdate;
5771
+ set === null || set === void 0 ? void 0 : set.add(cb);
5772
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
5725
5773
  };
5726
5774
  RenderDispatchEvent.prototype.onceFiberUpdate = function (cb) {
5727
- var set = listenerMap.get(this).fiberUpdate;
5775
+ var _a;
5776
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUpdate;
5728
5777
  var onceCb = function (_fiber) {
5729
5778
  cb(_fiber);
5730
- set.delete(onceCb);
5779
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
5731
5780
  };
5732
- set.add(onceCb);
5781
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
5733
5782
  };
5734
5783
  RenderDispatchEvent.prototype.callOnFiberUpdate = function (_fiber) {
5735
- var _a;
5736
- var set = listenerMap.get(this).fiberUpdate;
5737
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
5784
+ var _a, _b;
5785
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUpdate;
5786
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
5738
5787
  };
5739
5788
  RenderDispatchEvent.prototype.onFiberChange = function (cb) {
5740
- var set = listenerMap.get(this).fiberHasChange;
5741
- set.add(cb);
5742
- return function () { return set.delete(cb); };
5789
+ var _a;
5790
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHasChange;
5791
+ set === null || set === void 0 ? void 0 : set.add(cb);
5792
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
5743
5793
  };
5744
5794
  RenderDispatchEvent.prototype.onceFiberChange = function (cb) {
5745
- var set = listenerMap.get(this).fiberHasChange;
5795
+ var _a;
5796
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHasChange;
5746
5797
  var onceCb = function (_list) {
5747
5798
  cb(_list);
5748
- set.delete(onceCb);
5799
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
5749
5800
  };
5750
- set.add(onceCb);
5801
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
5751
5802
  };
5752
5803
  RenderDispatchEvent.prototype.callOnFiberChange = function (_list) {
5753
- var _a;
5754
- var set = listenerMap.get(this).fiberHasChange;
5755
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_list); });
5804
+ var _a, _b;
5805
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHasChange;
5806
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_list); });
5756
5807
  };
5757
5808
  RenderDispatchEvent.prototype.onFiberUnmount = function (cb) {
5758
- var set = listenerMap.get(this).fiberUnmount;
5759
- set.add(cb);
5760
- return function () { return set.delete(cb); };
5809
+ var _a;
5810
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUnmount;
5811
+ set === null || set === void 0 ? void 0 : set.add(cb);
5812
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
5761
5813
  };
5762
5814
  RenderDispatchEvent.prototype.onceFiberUnmount = function (cb) {
5763
- var set = listenerMap.get(this).fiberUnmount;
5815
+ var _a;
5816
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUnmount;
5764
5817
  var onceCb = function (_fiber) {
5765
5818
  cb(_fiber);
5766
- set.delete(onceCb);
5819
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
5767
5820
  };
5768
- set.add(onceCb);
5821
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
5769
5822
  };
5770
5823
  RenderDispatchEvent.prototype.callOnFiberUnmount = function (_fiber) {
5771
- var _a;
5772
- var set = listenerMap.get(this).fiberUnmount;
5773
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
5824
+ var _a, _b;
5825
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberUnmount;
5826
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
5774
5827
  };
5775
5828
  RenderDispatchEvent.prototype.onFiberState = function (cb) {
5776
- var set = listenerMap.get(this).fiberState;
5777
- set.add(cb);
5778
- return function () { return set.delete(cb); };
5829
+ var _a;
5830
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberState;
5831
+ set === null || set === void 0 ? void 0 : set.add(cb);
5832
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
5779
5833
  };
5780
5834
  RenderDispatchEvent.prototype.onceFiberState = function (cb) {
5781
- var set = listenerMap.get(this).fiberState;
5835
+ var _a;
5836
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberState;
5782
5837
  var onceCb = function (_fiber, _updater) {
5783
5838
  cb(_fiber, _updater);
5784
- set.delete(onceCb);
5839
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
5785
5840
  };
5786
- set.add(onceCb);
5841
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
5787
5842
  };
5788
5843
  RenderDispatchEvent.prototype.callOnFiberState = function (_fiber, _updater) {
5789
- var _a;
5790
- var set = listenerMap.get(this).fiberState;
5791
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _updater); });
5844
+ var _a, _b;
5845
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberState;
5846
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _updater); });
5792
5847
  };
5793
5848
  RenderDispatchEvent.prototype.onFiberTrigger = function (cb) {
5794
- var set = listenerMap.get(this).fiberTrigger;
5795
- set.add(cb);
5796
- return function () { return set.delete(cb); };
5849
+ var _a;
5850
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberTrigger;
5851
+ set === null || set === void 0 ? void 0 : set.add(cb);
5852
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
5797
5853
  };
5798
5854
  RenderDispatchEvent.prototype.onceFiberTrigger = function (cb) {
5799
- var set = listenerMap.get(this).fiberTrigger;
5855
+ var _a;
5856
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberTrigger;
5800
5857
  var onceCb = function (_fiber, _state) {
5801
5858
  cb(_fiber, _state);
5802
- set.delete(onceCb);
5859
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
5803
5860
  };
5804
- set.add(onceCb);
5861
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
5805
5862
  };
5806
5863
  RenderDispatchEvent.prototype.callOnFiberTrigger = function (_fiber, _state) {
5807
- var _a;
5808
- var set = listenerMap.get(this).fiberTrigger;
5809
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _state); });
5864
+ var _a, _b;
5865
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberTrigger;
5866
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _state); });
5810
5867
  };
5811
5868
  RenderDispatchEvent.prototype.onFiberHMR = function (cb) {
5812
- var _a;
5813
- var set = listenerMap.get(this).fiberHMR;
5814
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
5869
+ var _a, _b;
5870
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHMR;
5871
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5815
5872
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5816
5873
  };
5817
5874
  RenderDispatchEvent.prototype.onceFiberHMR = function (cb) {
5818
- var _a;
5819
- var set = listenerMap.get(this).fiberHMR;
5875
+ var _a, _b;
5876
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHMR;
5820
5877
  var onceCb = function (_fiber, _forceRefresh) {
5821
5878
  var _a;
5822
5879
  cb(_fiber, _forceRefresh);
5823
5880
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5824
5881
  };
5825
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5882
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5826
5883
  };
5827
5884
  RenderDispatchEvent.prototype.callOnFiberHMR = function (_fiber, _forceRefresh) {
5828
- var _a;
5829
- var set = listenerMap.get(this).fiberHMR;
5830
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _forceRefresh); });
5885
+ var _a, _b;
5886
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberHMR;
5887
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _forceRefresh); });
5831
5888
  };
5832
5889
  RenderDispatchEvent.prototype.onFiberWarn = function (cb) {
5833
- var _a;
5834
- var set = listenerMap.get(this).fiberWarn;
5835
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
5890
+ var _a, _b;
5891
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberWarn;
5892
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5836
5893
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5837
5894
  };
5838
5895
  RenderDispatchEvent.prototype.onceFiberWarn = function (cb) {
5839
- var _a;
5840
- var set = listenerMap.get(this).fiberWarn;
5896
+ var _a, _b;
5897
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberWarn;
5841
5898
  var onceCb = function (_fiber) {
5842
5899
  var _a;
5843
5900
  cb(_fiber);
5844
5901
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5845
5902
  };
5846
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5903
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5847
5904
  };
5848
5905
  RenderDispatchEvent.prototype.callOnFiberWarn = function (_fiber) {
5849
- var _a;
5906
+ var _a, _b;
5850
5907
  var args = [];
5851
5908
  for (var _i = 1; _i < arguments.length; _i++) {
5852
5909
  args[_i - 1] = arguments[_i];
5853
5910
  }
5854
- var set = listenerMap.get(this).fiberWarn;
5855
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
5911
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberWarn;
5912
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
5856
5913
  };
5857
5914
  RenderDispatchEvent.prototype.onFiberError = function (cb) {
5858
- var _a;
5859
- var set = listenerMap.get(this).fiberError;
5860
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
5915
+ var _a, _b;
5916
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberError;
5917
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5861
5918
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5862
5919
  };
5863
5920
  RenderDispatchEvent.prototype.onceFiberError = function (cb) {
5864
- var _a;
5865
- var set = listenerMap.get(this).fiberError;
5921
+ var _a, _b;
5922
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberError;
5866
5923
  var onceCb = function (_fiber) {
5867
5924
  var _a;
5868
5925
  cb(_fiber);
5869
5926
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5870
5927
  };
5871
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5928
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5872
5929
  };
5873
5930
  RenderDispatchEvent.prototype.callOnFiberError = function (_fiber) {
5874
- var _a;
5931
+ var _a, _b;
5875
5932
  var args = [];
5876
5933
  for (var _i = 1; _i < arguments.length; _i++) {
5877
5934
  args[_i - 1] = arguments[_i];
5878
5935
  }
5879
- var set = listenerMap.get(this).fiberError;
5880
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
5936
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.fiberError;
5937
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb.apply(void 0, __spreadArray([_fiber], args, false)); });
5881
5938
  };
5882
5939
  RenderDispatchEvent.prototype.onPerformanceWarn = function (cb) {
5883
- var _a;
5884
- var set = listenerMap.get(this).performanceWarn;
5885
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
5940
+ var _a, _b;
5941
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.performanceWarn;
5942
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5886
5943
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5887
5944
  };
5888
5945
  RenderDispatchEvent.prototype.oncePerformanceWarn = function (cb) {
5889
- var _a;
5890
- var set = listenerMap.get(this).performanceWarn;
5946
+ var _a, _b;
5947
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.performanceWarn;
5891
5948
  var onceCb = function (_fiber, _renderTime) {
5892
5949
  var _a;
5893
5950
  cb(_fiber, _renderTime);
5894
5951
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5895
5952
  };
5896
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5953
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5897
5954
  };
5898
5955
  RenderDispatchEvent.prototype.callOnPerformanceWarn = function (_fiber, _renderTime) {
5899
- var _a;
5900
- var set = listenerMap.get(this).performanceWarn;
5901
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber, _renderTime); });
5956
+ var _a, _b;
5957
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.performanceWarn;
5958
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber, _renderTime); });
5902
5959
  };
5903
5960
  RenderDispatchEvent.prototype.onBeforeFiberRun = function (cb) {
5904
- var _a;
5905
- var set = listenerMap.get(this).beforeFiberRun;
5906
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
5961
+ var _a, _b;
5962
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeFiberRun;
5963
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5907
5964
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5908
5965
  };
5909
5966
  RenderDispatchEvent.prototype.onceBeforeFiberRun = function (cb) {
5910
- var _a;
5911
- var set = listenerMap.get(this).beforeFiberRun;
5967
+ var _a, _b;
5968
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeFiberRun;
5912
5969
  var onceCb = function (_fiber) {
5913
5970
  var _a;
5914
5971
  cb(_fiber);
5915
5972
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5916
5973
  };
5917
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5974
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5918
5975
  };
5919
5976
  RenderDispatchEvent.prototype.callOnBeforeFiberRun = function (_fiber) {
5920
- var _a;
5921
- var set = listenerMap.get(this).beforeFiberRun;
5922
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
5977
+ var _a, _b;
5978
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeFiberRun;
5979
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
5923
5980
  };
5924
5981
  RenderDispatchEvent.prototype.onAfterFiberRun = function (cb) {
5925
- var _a;
5926
- var set = listenerMap.get(this).afterFiberRun;
5927
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
5982
+ var _a, _b;
5983
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberRun;
5984
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5928
5985
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5929
5986
  };
5930
5987
  RenderDispatchEvent.prototype.onceAfterFiberRun = function (cb) {
5931
- var _a;
5932
- var set = listenerMap.get(this).afterFiberRun;
5988
+ var _a, _b;
5989
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberRun;
5933
5990
  var onceCb = function (_fiber) {
5934
5991
  var _a;
5935
5992
  cb(_fiber);
5936
5993
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5937
5994
  };
5938
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5995
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5939
5996
  };
5940
5997
  RenderDispatchEvent.prototype.callOnAfterFiberRun = function (_fiber) {
5941
- var _a;
5942
- var set = listenerMap.get(this).afterFiberRun;
5943
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
5998
+ var _a, _b;
5999
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberRun;
6000
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
5944
6001
  };
5945
6002
  RenderDispatchEvent.prototype.onAfterFiberDone = function (cb) {
5946
- var _a;
5947
- var set = listenerMap.get(this).afterFiberDone;
5948
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6003
+ var _a, _b;
6004
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberDone;
6005
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5949
6006
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5950
6007
  };
5951
6008
  RenderDispatchEvent.prototype.onceAfterFiberDone = function (cb) {
5952
- var _a;
5953
- var set = listenerMap.get(this).afterFiberDone;
6009
+ var _a, _b;
6010
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberDone;
5954
6011
  var onceCb = function (_fiber) {
5955
6012
  var _a;
5956
6013
  cb(_fiber);
5957
6014
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5958
6015
  };
5959
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6016
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5960
6017
  };
5961
6018
  RenderDispatchEvent.prototype.callOnAfterFiberDone = function (_fiber) {
5962
- var _a;
5963
- var set = listenerMap.get(this).afterFiberDone;
5964
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_fiber); });
6019
+ var _a, _b;
6020
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterFiberDone;
6021
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_fiber); });
5965
6022
  };
5966
6023
  RenderDispatchEvent.prototype.onBeforeDispatchRender = function (cb) {
5967
- var _a;
5968
- var set = listenerMap.get(this).beforeDispatchRender;
5969
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6024
+ var _a, _b;
6025
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchRender;
6026
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5970
6027
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5971
6028
  };
5972
6029
  RenderDispatchEvent.prototype.onceBeforeDispatchRender = function (cb) {
5973
- var _a;
5974
- var set = listenerMap.get(this).beforeDispatchRender;
6030
+ var _a, _b;
6031
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchRender;
5975
6032
  var onceCb = function (renderDispatch, fiber) {
5976
6033
  var _a;
5977
6034
  cb(renderDispatch, fiber);
5978
6035
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
5979
6036
  };
5980
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6037
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
5981
6038
  };
5982
6039
  RenderDispatchEvent.prototype.callOnBeforeDispatchRender = function (renderDispatch, fiber) {
5983
- var _a;
5984
- var set = listenerMap.get(this).beforeDispatchRender;
5985
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch, fiber); });
6040
+ var _a, _b;
6041
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchRender;
6042
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch, fiber); });
5986
6043
  };
5987
6044
  RenderDispatchEvent.prototype.onAfterDispatchRender = function (cb) {
5988
- var _a;
5989
- var set = listenerMap.get(this).afterDispatchRender;
5990
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6045
+ var _a, _b;
6046
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchRender;
6047
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
5991
6048
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
5992
6049
  };
5993
6050
  RenderDispatchEvent.prototype.onceAfterDispatchRender = function (cb) {
5994
- var _a;
5995
- var set = listenerMap.get(this).afterDispatchRender;
6051
+ var _a, _b;
6052
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchRender;
5996
6053
  var onceCb = function (renderDispatch) {
5997
6054
  var _a;
5998
6055
  cb(renderDispatch);
5999
6056
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6000
6057
  };
6001
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6058
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6002
6059
  };
6003
6060
  RenderDispatchEvent.prototype.callOnAfterDispatchRender = function (renderDispatch) {
6004
- var _a;
6005
- var set = listenerMap.get(this).afterDispatchRender;
6006
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6061
+ var _a, _b;
6062
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchRender;
6063
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6007
6064
  };
6008
6065
  RenderDispatchEvent.prototype.onBeforeDispatchUpdate = function (cb) {
6009
- var _a;
6010
- var set = listenerMap.get(this).beforeDispatchUpdate;
6011
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6066
+ var _a, _b;
6067
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchUpdate;
6068
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6012
6069
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6013
6070
  };
6014
6071
  RenderDispatchEvent.prototype.onceBeforeDispatchUpdate = function (cb) {
6015
- var _a;
6016
- var set = listenerMap.get(this).beforeDispatchUpdate;
6072
+ var _a, _b;
6073
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchUpdate;
6017
6074
  var onceCb = function (renderDispatch, list) {
6018
6075
  var _a;
6019
6076
  cb(renderDispatch, list);
6020
6077
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6021
6078
  };
6022
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6079
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6023
6080
  };
6024
6081
  RenderDispatchEvent.prototype.callOnBeforeDispatchUpdate = function (renderDispatch, list) {
6025
- var _a;
6026
- var set = listenerMap.get(this).beforeDispatchUpdate;
6027
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch, list); });
6082
+ var _a, _b;
6083
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeDispatchUpdate;
6084
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch, list); });
6028
6085
  };
6029
6086
  RenderDispatchEvent.prototype.onAfterDispatchUpdate = function (cb) {
6030
- var _a;
6031
- var set = listenerMap.get(this).afterDispatchUpdate;
6032
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, cb);
6087
+ var _a, _b;
6088
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchUpdate;
6089
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, cb);
6033
6090
  return function () { var _a; return (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, cb); };
6034
6091
  };
6035
6092
  RenderDispatchEvent.prototype.onceAfterDispatchUpdate = function (cb) {
6036
- var _a;
6037
- var set = listenerMap.get(this).afterDispatchUpdate;
6093
+ var _a, _b;
6094
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchUpdate;
6038
6095
  var onceCb = function (renderDispatch) {
6039
6096
  var _a;
6040
6097
  cb(renderDispatch);
6041
6098
  (_a = set === null || set === void 0 ? void 0 : set.delete) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6042
6099
  };
6043
- (_a = set === null || set === void 0 ? void 0 : set.add) === null || _a === void 0 ? void 0 : _a.call(set, onceCb);
6100
+ (_b = set === null || set === void 0 ? void 0 : set.add) === null || _b === void 0 ? void 0 : _b.call(set, onceCb);
6044
6101
  };
6045
6102
  RenderDispatchEvent.prototype.callOnAfterDispatchUpdate = function (renderDispatch) {
6046
- var _a;
6047
- var set = listenerMap.get(this).afterDispatchUpdate;
6048
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6103
+ var _a, _b;
6104
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterDispatchUpdate;
6105
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6049
6106
  };
6050
6107
  RenderDispatchEvent.prototype.onInstanceInitial = function (cb) {
6051
- var set = listenerMap.get(this).instanceInitial;
6052
- set.add(cb);
6053
- return function () { return set.delete(cb); };
6108
+ var _a;
6109
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceInitial;
6110
+ set === null || set === void 0 ? void 0 : set.add(cb);
6111
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6054
6112
  };
6055
6113
  RenderDispatchEvent.prototype.onceInstanceInitial = function (cb) {
6056
- var set = listenerMap.get(this).instanceInitial;
6114
+ var _a;
6115
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceInitial;
6057
6116
  var onceCb = function (_instance, _fiber) {
6058
6117
  cb(_instance, _fiber);
6059
- set.delete(onceCb);
6118
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6060
6119
  };
6061
- set.add(onceCb);
6120
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6062
6121
  };
6063
6122
  RenderDispatchEvent.prototype.callOnInstanceInitial = function (_instance, _fiber) {
6064
- var _a;
6065
- var set = listenerMap.get(this).instanceInitial;
6066
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber); });
6123
+ var _a, _b;
6124
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceInitial;
6125
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber); });
6067
6126
  };
6068
6127
  RenderDispatchEvent.prototype.onInstanceUpdate = function (cb) {
6069
- var set = listenerMap.get(this).instanceUpdate;
6070
- set.add(cb);
6071
- return function () { return set.delete(cb); };
6128
+ var _a;
6129
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUpdate;
6130
+ set === null || set === void 0 ? void 0 : set.add(cb);
6131
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6072
6132
  };
6073
6133
  RenderDispatchEvent.prototype.onceInstanceUpdate = function (cb) {
6074
- var set = listenerMap.get(this).instanceUpdate;
6134
+ var _a;
6135
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUpdate;
6075
6136
  var onceCb = function (_instance, _fiber) {
6076
6137
  cb(_instance, _fiber);
6077
- set.delete(onceCb);
6138
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6078
6139
  };
6079
- set.add(onceCb);
6140
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6080
6141
  };
6081
6142
  RenderDispatchEvent.prototype.callOnInstanceUpdate = function (_instance, _fiber) {
6082
- var _a;
6083
- var set = listenerMap.get(this).instanceUpdate;
6084
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber); });
6143
+ var _a, _b;
6144
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUpdate;
6145
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber); });
6085
6146
  };
6086
6147
  RenderDispatchEvent.prototype.onInstanceState = function (cb) {
6087
- var set = listenerMap.get(this).instanceState;
6088
- set.add(cb);
6089
- return function () { return set.delete(cb); };
6148
+ var _a;
6149
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceState;
6150
+ set === null || set === void 0 ? void 0 : set.add(cb);
6151
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6090
6152
  };
6091
6153
  RenderDispatchEvent.prototype.onceInstanceState = function (cb) {
6092
- var set = listenerMap.get(this).instanceState;
6154
+ var _a;
6155
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceState;
6093
6156
  var onceCb = function (_instance, _fiber, _updater) {
6094
6157
  cb(_instance, _fiber, _updater);
6095
- set.delete(onceCb);
6158
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6096
6159
  };
6097
- set.add(onceCb);
6160
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6098
6161
  };
6099
6162
  RenderDispatchEvent.prototype.callOnInstanceState = function (_instance, _fiber, _updater) {
6100
- var _a;
6101
- var set = listenerMap.get(this).instanceState;
6102
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber, _updater); });
6163
+ var _a, _b;
6164
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceState;
6165
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber, _updater); });
6103
6166
  };
6104
6167
  RenderDispatchEvent.prototype.onInstanceUnmount = function (cb) {
6105
- var set = listenerMap.get(this).instanceUnmount;
6106
- set.add(cb);
6107
- return function () { return set.delete(cb); };
6168
+ var _a;
6169
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUnmount;
6170
+ set === null || set === void 0 ? void 0 : set.add(cb);
6171
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6108
6172
  };
6109
6173
  RenderDispatchEvent.prototype.onceInstanceUnmount = function (cb) {
6110
- var set = listenerMap.get(this).instanceUnmount;
6174
+ var _a;
6175
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUnmount;
6111
6176
  var onceCb = function (_instance, _fiber) {
6112
6177
  cb(_instance, _fiber);
6113
- set.delete(onceCb);
6178
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6114
6179
  };
6115
- set.add(onceCb);
6180
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6116
6181
  };
6117
6182
  RenderDispatchEvent.prototype.callOnInstanceUnmount = function (_instance, _fiber) {
6118
- var _a;
6119
- var set = listenerMap.get(this).instanceUnmount;
6120
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_instance, _fiber); });
6183
+ var _a, _b;
6184
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.instanceUnmount;
6185
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_instance, _fiber); });
6121
6186
  };
6122
6187
  RenderDispatchEvent.prototype.onHookInitial = function (cb) {
6123
- var set = listenerMap.get(this).hookInitial;
6124
- set.add(cb);
6125
- return function () { return set.delete(cb); };
6188
+ var _a;
6189
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookInitial;
6190
+ set === null || set === void 0 ? void 0 : set.add(cb);
6191
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6126
6192
  };
6127
6193
  RenderDispatchEvent.prototype.onceHookInitial = function (cb) {
6128
- var set = listenerMap.get(this).hookInitial;
6194
+ var _a;
6195
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookInitial;
6129
6196
  var onceCb = function (_hook, _fiber) {
6130
6197
  cb(_hook, _fiber);
6131
- set.delete(onceCb);
6198
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6132
6199
  };
6133
- set.add(onceCb);
6200
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6134
6201
  };
6135
6202
  RenderDispatchEvent.prototype.callOnHookInitial = function (_hook, _fiber) {
6136
- var _a;
6137
- var set = listenerMap.get(this).hookInitial;
6138
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber); });
6203
+ var _a, _b;
6204
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookInitial;
6205
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber); });
6139
6206
  };
6140
6207
  RenderDispatchEvent.prototype.onHookUpdate = function (cb) {
6141
- var set = listenerMap.get(this).hookUpdate;
6142
- set.add(cb);
6143
- return function () { return set.delete(cb); };
6208
+ var _a;
6209
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUpdate;
6210
+ set === null || set === void 0 ? void 0 : set.add(cb);
6211
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6144
6212
  };
6145
6213
  RenderDispatchEvent.prototype.onceHookUpdate = function (cb) {
6146
- var set = listenerMap.get(this).hookUpdate;
6214
+ var _a;
6215
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUpdate;
6147
6216
  var onceCb = function (_hook, _fiber) {
6148
6217
  cb(_hook, _fiber);
6149
- set.delete(onceCb);
6218
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6150
6219
  };
6151
- set.add(onceCb);
6220
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6152
6221
  };
6153
6222
  RenderDispatchEvent.prototype.callOnHookUpdate = function (_hook, _fiber) {
6154
- var _a;
6155
- var set = listenerMap.get(this).hookUpdate;
6156
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber); });
6223
+ var _a, _b;
6224
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUpdate;
6225
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber); });
6157
6226
  };
6158
6227
  RenderDispatchEvent.prototype.onHookUnmount = function (cb) {
6159
- var set = listenerMap.get(this).hookUnmount;
6160
- set.add(cb);
6161
- return function () { return set.delete(cb); };
6228
+ var _a;
6229
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUnmount;
6230
+ set === null || set === void 0 ? void 0 : set.add(cb);
6231
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6162
6232
  };
6163
6233
  RenderDispatchEvent.prototype.onceHookUnmount = function (cb) {
6164
- var set = listenerMap.get(this).hookUnmount;
6234
+ var _a;
6235
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUnmount;
6165
6236
  var onceCb = function (_hook, _fiber) {
6166
6237
  cb(_hook, _fiber);
6167
- set.delete(onceCb);
6238
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6168
6239
  };
6169
- set.add(onceCb);
6240
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6170
6241
  };
6171
6242
  RenderDispatchEvent.prototype.callOnHookUnmount = function (_hook, _fiber) {
6172
- var _a;
6173
- var set = listenerMap.get(this).hookUnmount;
6174
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber); });
6243
+ var _a, _b;
6244
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookUnmount;
6245
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber); });
6175
6246
  };
6176
6247
  RenderDispatchEvent.prototype.onHookState = function (cb) {
6177
- var set = listenerMap.get(this).hookState;
6178
- set.add(cb);
6179
- return function () { return set.delete(cb); };
6248
+ var _a;
6249
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookState;
6250
+ set === null || set === void 0 ? void 0 : set.add(cb);
6251
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6180
6252
  };
6181
6253
  RenderDispatchEvent.prototype.onceHookTrigger = function (cb) {
6182
- var set = listenerMap.get(this).hookState;
6254
+ var _a;
6255
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookState;
6183
6256
  var onceCb = function (_hook, _fiber, _updater) {
6184
6257
  cb(_hook, _fiber, _updater);
6185
- set.delete(onceCb);
6258
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6186
6259
  };
6187
- set.add(onceCb);
6260
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6188
6261
  };
6189
6262
  RenderDispatchEvent.prototype.callOnHookState = function (_hook, _fiber, _updater) {
6190
- var _a;
6191
- var set = listenerMap.get(this).hookState;
6192
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(_hook, _fiber, _updater); });
6263
+ var _a, _b;
6264
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.hookState;
6265
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(_hook, _fiber, _updater); });
6193
6266
  };
6194
6267
  RenderDispatchEvent.prototype.onBeforeCommitMount = function (cb) {
6195
- var set = listenerMap.get(this).beforeCommitMount;
6196
- set.add(cb);
6197
- return function () { return set.delete(cb); };
6268
+ var _a;
6269
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitMount;
6270
+ set === null || set === void 0 ? void 0 : set.add(cb);
6271
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6198
6272
  };
6199
6273
  RenderDispatchEvent.prototype.onceBeforeCommitMount = function (cb) {
6200
- var set = listenerMap.get(this).beforeCommitMount;
6274
+ var _a;
6275
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitMount;
6201
6276
  var onceCb = function (renderDispatch) {
6202
6277
  cb(renderDispatch);
6203
- set.delete(onceCb);
6278
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6204
6279
  };
6205
- set.add(onceCb);
6280
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6206
6281
  };
6207
6282
  RenderDispatchEvent.prototype.callOnBeforeCommitMount = function (renderDispatch) {
6208
- var _a;
6209
- var set = listenerMap.get(this).beforeCommitMount;
6210
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6283
+ var _a, _b;
6284
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitMount;
6285
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6211
6286
  };
6212
6287
  RenderDispatchEvent.prototype.onAfterCommitMount = function (cb) {
6213
- var set = listenerMap.get(this).afterCommitMount;
6214
- set.add(cb);
6215
- return function () { return set.delete(cb); };
6288
+ var _a;
6289
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitMount;
6290
+ set === null || set === void 0 ? void 0 : set.add(cb);
6291
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6216
6292
  };
6217
6293
  RenderDispatchEvent.prototype.onceAfterCommitMount = function (cb) {
6218
- var set = listenerMap.get(this).afterCommitMount;
6294
+ var _a;
6295
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitMount;
6219
6296
  var onceCb = function (renderDispatch) {
6220
6297
  cb(renderDispatch);
6221
- set.delete(onceCb);
6298
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6222
6299
  };
6223
- set.add(onceCb);
6300
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6224
6301
  };
6225
6302
  RenderDispatchEvent.prototype.callOnAfterCommitMount = function (renderDispatch) {
6226
- var _a;
6227
- var set = listenerMap.get(this).afterCommitMount;
6228
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6303
+ var _a, _b;
6304
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitMount;
6305
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6229
6306
  };
6230
6307
  RenderDispatchEvent.prototype.onBeforeCommitUpdate = function (cb) {
6231
- var set = listenerMap.get(this).beforeCommitUpdate;
6232
- set.add(cb);
6233
- return function () { return set.delete(cb); };
6308
+ var _a;
6309
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUpdate;
6310
+ set === null || set === void 0 ? void 0 : set.add(cb);
6311
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6234
6312
  };
6235
6313
  RenderDispatchEvent.prototype.onceBeforeCommitUpdate = function (cb) {
6236
- var set = listenerMap.get(this).beforeCommitUpdate;
6314
+ var _a;
6315
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUpdate;
6237
6316
  var onceCb = function (renderDispatch) {
6238
6317
  cb(renderDispatch);
6239
- set.delete(onceCb);
6318
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6240
6319
  };
6241
- set.add(onceCb);
6320
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6242
6321
  };
6243
6322
  RenderDispatchEvent.prototype.callOnBeforeCommitUpdate = function (renderDispatch) {
6244
- var _a;
6245
- var set = listenerMap.get(this).beforeCommitUpdate;
6246
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6323
+ var _a, _b;
6324
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUpdate;
6325
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6247
6326
  };
6248
6327
  RenderDispatchEvent.prototype.onAfterCommitUpdate = function (cb) {
6249
- var set = listenerMap.get(this).afterCommitUpdate;
6250
- set.add(cb);
6251
- return function () { return set.delete(cb); };
6328
+ var _a;
6329
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUpdate;
6330
+ set === null || set === void 0 ? void 0 : set.add(cb);
6331
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6252
6332
  };
6253
6333
  RenderDispatchEvent.prototype.onceAfterCommitUpdate = function (cb) {
6254
- var set = listenerMap.get(this).afterCommitUpdate;
6334
+ var _a;
6335
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUpdate;
6255
6336
  var onceCb = function (renderDispatch) {
6256
6337
  cb(renderDispatch);
6257
- set.delete(onceCb);
6338
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6258
6339
  };
6259
- set.add(onceCb);
6340
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6260
6341
  };
6261
6342
  RenderDispatchEvent.prototype.callOnAfterCommitUpdate = function (renderDispatch) {
6262
- var _a;
6263
- var set = listenerMap.get(this).afterCommitUpdate;
6264
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6343
+ var _a, _b;
6344
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUpdate;
6345
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6265
6346
  };
6266
6347
  RenderDispatchEvent.prototype.onBeforeCommitUnmount = function (cb) {
6267
- var set = listenerMap.get(this).beforeCommitUnmount;
6268
- set.add(cb);
6269
- return function () { return set.delete(cb); };
6348
+ var _a;
6349
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUnmount;
6350
+ set === null || set === void 0 ? void 0 : set.add(cb);
6351
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6270
6352
  };
6271
6353
  RenderDispatchEvent.prototype.onceBeforeCommitUnmount = function (cb) {
6272
- var set = listenerMap.get(this).beforeCommitUnmount;
6354
+ var _a;
6355
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUnmount;
6273
6356
  var onceCb = function (renderDispatch) {
6274
6357
  cb(renderDispatch);
6275
- set.delete(onceCb);
6358
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6276
6359
  };
6277
- set.add(onceCb);
6360
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6278
6361
  };
6279
6362
  RenderDispatchEvent.prototype.callOnBeforeCommitUnmount = function (renderDispatch) {
6280
- var _a;
6281
- var set = listenerMap.get(this).beforeCommitUnmount;
6282
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6363
+ var _a, _b;
6364
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.beforeCommitUnmount;
6365
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6283
6366
  };
6284
6367
  RenderDispatchEvent.prototype.onAfterCommitUnmount = function (cb) {
6285
- var set = listenerMap.get(this).afterCommitUnmount;
6286
- set.add(cb);
6287
- return function () { return set.delete(cb); };
6368
+ var _a;
6369
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUnmount;
6370
+ set === null || set === void 0 ? void 0 : set.add(cb);
6371
+ return function () { return set === null || set === void 0 ? void 0 : set.delete(cb); };
6288
6372
  };
6289
6373
  RenderDispatchEvent.prototype.onceAfterCommitUnmount = function (cb) {
6290
- var set = listenerMap.get(this).afterCommitUnmount;
6374
+ var _a;
6375
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUnmount;
6291
6376
  var onceCb = function (renderDispatch) {
6292
6377
  cb(renderDispatch);
6293
- set.delete(onceCb);
6378
+ set === null || set === void 0 ? void 0 : set.delete(onceCb);
6294
6379
  };
6295
- set.add(onceCb);
6380
+ set === null || set === void 0 ? void 0 : set.add(onceCb);
6296
6381
  };
6297
6382
  RenderDispatchEvent.prototype.callOnAfterCommitUnmount = function (renderDispatch) {
6298
- var _a;
6299
- var set = listenerMap.get(this).afterCommitUnmount;
6300
- (_a = set === null || set === void 0 ? void 0 : set.forEach) === null || _a === void 0 ? void 0 : _a.call(set, function (cb) { return cb(renderDispatch); });
6383
+ var _a, _b;
6384
+ var set = (_a = listenerMap.get(this)) === null || _a === void 0 ? void 0 : _a.afterCommitUnmount;
6385
+ (_b = set === null || set === void 0 ? void 0 : set.forEach) === null || _b === void 0 ? void 0 : _b.call(set, function (cb) { return cb(renderDispatch); });
6301
6386
  };
6302
6387
  return RenderDispatchEvent;
6303
6388
  }(MyReactInternalInstanceClass));
6304
6389
 
6305
6390
  var defaultDispatchFiber = function (renderDispatch, fiber) {
6306
- if (include(fiber.type, exports.NODE_TYPE.__root__)) {
6391
+ if (include(fiber.type, exports$1.NODE_TYPE.__root__)) {
6307
6392
  // TODO
6308
6393
  nextWorkRoot(renderDispatch, fiber);
6309
6394
  }
6310
- else if (include(fiber.type, exports.NODE_TYPE.__class__ | exports.NODE_TYPE.__function__)) {
6395
+ else if (include(fiber.type, exports$1.NODE_TYPE.__class__ | exports$1.NODE_TYPE.__function__)) {
6311
6396
  nextWorkComponent(renderDispatch, fiber);
6312
6397
  }
6313
- else if (include(fiber.type, exports.NODE_TYPE.__lazy__)) {
6398
+ else if (include(fiber.type, exports$1.NODE_TYPE.__lazy__)) {
6314
6399
  nextWorkLazy(renderDispatch, fiber);
6315
6400
  }
6316
- else if (include(fiber.type, exports.NODE_TYPE.__suspense__)) {
6401
+ else if (include(fiber.type, exports$1.NODE_TYPE.__suspense__)) {
6317
6402
  nextWorkSuspense(renderDispatch, fiber);
6318
6403
  }
6319
- else if (include(fiber.type, exports.NODE_TYPE.__consumer__)) {
6404
+ else if (include(fiber.type, exports$1.NODE_TYPE.__consumer__)) {
6320
6405
  nextWorkConsumer(renderDispatch, fiber);
6321
6406
  }
6322
- else if (include(fiber.type, exports.NODE_TYPE.__provider__ | exports.NODE_TYPE.__context__)) {
6407
+ else if (include(fiber.type, exports$1.NODE_TYPE.__provider__ | exports$1.NODE_TYPE.__context__)) {
6323
6408
  nextWorkProvider(renderDispatch, fiber);
6324
6409
  }
6325
- else if (include(fiber.type, exports.NODE_TYPE.__activity__)) {
6410
+ else if (include(fiber.type, exports$1.NODE_TYPE.__activity__)) {
6326
6411
  nextWorkActivity(renderDispatch, fiber);
6327
6412
  }
6328
6413
  else {
@@ -6339,7 +6424,7 @@ function requireIndex_production () {
6339
6424
  _this.isAppMounted = false;
6340
6425
  _this.isAppCrashed = false;
6341
6426
  _this.isAppUnmounted = false;
6342
- _this.version = "0.3.22";
6427
+ _this.version = "0.3.24";
6343
6428
  _this.id = Math.random().toString(16).slice(2);
6344
6429
  _this.mode = "production";
6345
6430
  _this.renderMode = "render";
@@ -6385,7 +6470,7 @@ function requireIndex_production () {
6385
6470
  if (include(_fiber.type, this.runtimeRef.typeForRef)) {
6386
6471
  _fiber.patch = merge(_fiber.patch, PATCH_TYPE.__ref__);
6387
6472
  }
6388
- else if (exclude(_fiber.type, exports.NODE_TYPE.__forwardRef__)) {
6473
+ else if (exclude(_fiber.type, exports$1.NODE_TYPE.__forwardRef__)) {
6389
6474
  onceWarnWithKeyAndFiber(_fiber, "ref", "[@my-react/react] set ref for current element will be ignored");
6390
6475
  }
6391
6476
  }
@@ -6542,8 +6627,8 @@ function requireIndex_production () {
6542
6627
  return CustomRenderDispatch;
6543
6628
  }(RenderDispatchEvent));
6544
6629
 
6545
- var globalLoop = react.__my_react_internal__.globalLoop;
6546
- react.__my_react_shared__.enableScopeTreeLog;
6630
+ var globalLoop = typeExports.__my_react_internal__.globalLoop;
6631
+ typeExports.__my_react_shared__.enableScopeTreeLog;
6547
6632
  function finishMountSync(renderDispatch, fiber) {
6548
6633
  renderDispatch.reconcileCommit(fiber);
6549
6634
  renderDispatch.resetUpdateFlowRuntimeFiber();
@@ -6577,192 +6662,192 @@ function requireIndex_production () {
6577
6662
  });
6578
6663
  }); };
6579
6664
 
6580
- var version = "0.3.22";
6665
+ var version = "0.3.24";
6581
6666
 
6582
- exports.CustomRenderDispatch = CustomRenderDispatch;
6583
- exports.MyReactFiberNode = MyReactFiberNode;
6584
- exports.MyReactHookNode = MyReactHookNode;
6585
- exports.MyWeakMap = MyWeakMap;
6586
- exports.RenderDispatchEvent = RenderDispatchEvent;
6587
- exports.WrapperByLazyScope = WrapperByLazyScope;
6588
- exports.WrapperBySuspenseScope = WrapperBySuspenseScope;
6589
- exports.addEffectCallback = addEffectCallback;
6590
- exports.afterSyncFlush = afterSyncFlush;
6591
- exports.afterSyncUpdate = afterSyncUpdate;
6592
- exports.applyTriggerFiberCb = applyTriggerFiberCb;
6593
- exports.beforeSyncFlush = beforeSyncFlush;
6594
- exports.beforeSyncUpdate = beforeSyncUpdate;
6595
- exports.callWithFiber = callWithFiber;
6596
- exports.checkIsMyReactFiberNode = checkIsMyReactFiberNode;
6597
- exports.checkIsSameType = checkIsSameType;
6598
- exports.clearContainer = clearContainer;
6599
- exports.clearFiberNode = clearFiberNode;
6600
- exports.createFiberNode = createFiberNode;
6601
- exports.createHookNode = createHookNode;
6602
- exports.currentRefreshHandler = currentRefreshHandler;
6603
- exports.currentTriggerFiber = currentTriggerFiber;
6604
- exports.debugWithNode = debugWithNode;
6605
- exports.defaultDeleteChildEffect = defaultDeleteChildEffect;
6606
- exports.defaultDeleteCurrentEffect = defaultDeleteCurrentEffect;
6607
- exports.defaultDispatchMount = defaultDispatchMount;
6608
- exports.defaultDispatchMountLatest = defaultDispatchMountLatest;
6609
- exports.defaultDispatchUnmount = defaultDispatchUnmount;
6610
- exports.defaultDispatchUpdate = defaultDispatchUpdate;
6611
- exports.defaultGenerateEffectMap = defaultGenerateEffectMap;
6612
- exports.defaultGenerateStrict = defaultGenerateStrict;
6613
- exports.defaultGenerateUnmountMap = defaultGenerateUnmountMap;
6614
- exports.defaultGetContextFiber = defaultGetContextFiber;
6615
- exports.defaultGetContextValue = defaultGetContextValue;
6616
- exports.defaultInvokeEffect = defaultInvokeEffect;
6617
- exports.defaultInvokeInsertionEffect = defaultInvokeInsertionEffect;
6618
- exports.defaultInvokeLayoutEffect = defaultInvokeLayoutEffect;
6619
- exports.defaultInvokeUnmountList = defaultInvokeUnmountList;
6620
- exports.defaultReadContext = defaultReadContext;
6621
- exports.defaultReadPromise = defaultReadPromise;
6622
- exports.defaultResolveAliveSuspenseFiber = defaultResolveAliveSuspenseFiber;
6623
- exports.defaultResolveErrorBoundaries = defaultResolveErrorBoundaries;
6624
- exports.defaultResolveScope = defaultResolveScope;
6625
- exports.defaultResolveSuspenseFiber = defaultResolveSuspenseFiber;
6626
- exports.defaultResolveSuspenseValue = defaultResolveSuspenseValue;
6627
- exports.devError = devError;
6628
- exports.devErrorWithFiber = devErrorWithFiber;
6629
- exports.devWarn = devWarn;
6630
- exports.devWarnWithFiber = devWarnWithFiber;
6631
- exports.effect = effect;
6632
- exports.effectHookNode = effectHookNode;
6633
- exports.emptyProps = emptyProps;
6634
- exports.enableDebugUpdateQueue = enableDebugUpdateQueue;
6635
- exports.enableFiberForLog = enableFiberForLog;
6636
- exports.enableLogForCurrentFlowIsRunning = enableLogForCurrentFlowIsRunning;
6637
- exports.enableValidMyReactElement = enableValidMyReactElement;
6638
- exports.fiberToDispatchMap = fiberToDispatchMap;
6639
- exports.flushEffectCallback = flushEffectCallback;
6640
- exports.generateFiberToListWithAction = generateFiberToListWithAction;
6641
- exports.generateFiberToMountList = generateFiberToMountList;
6642
- exports.generateFiberToUnmountList = generateFiberToUnmountList;
6643
- exports.getClassInstanceFieldByInstance = getClassInstanceFieldByInstance;
6644
- exports.getCurrentDispatchFromFiber = getCurrentDispatchFromFiber;
6645
- exports.getCurrentDispatchFromType = getCurrentDispatchFromType;
6646
- exports.getCurrentFibersFromType = getCurrentFibersFromType;
6647
- exports.getCurrentTypeFromRefresh = getCurrentTypeFromRefresh;
6648
- exports.getCurrentTypeFromRefreshOnly = getCurrentTypeFromRefreshOnly;
6649
- exports.getElementFromRefreshIfExist = getElementFromRefreshIfExist;
6650
- exports.getElementName = getElementName;
6651
- exports.getElementTypeFromType = getElementTypeFromType;
6652
- exports.getFiberTree = getFiberTree$1;
6653
- exports.getFiberTreeWithFiber = getFiberTreeWithFiber;
6654
- exports.getHookTree = getHookTree;
6655
- exports.getInstanceContextFiber = getInstanceContextFiber;
6656
- exports.getInstanceEffectState = getInstanceEffectState;
6657
- exports.getInstanceFieldByInstance = getInstanceFieldByInstance;
6658
- exports.getInstanceOwnerFiber = getInstanceOwnerFiber;
6659
- exports.getPlainFiberName = getPlainFiberName;
6660
- exports.getStackTree = getStackTree;
6661
- exports.getTypeFromElement = getTypeFromElement;
6662
- exports.getTypeFromElementNode = getTypeFromElementNode;
6663
- exports.hmr = hmr;
6664
- exports.hmrRevert = hmrRevert;
6665
- exports.hmrUpdate = hmrUpdate;
6666
- exports.hookListUnmount = hookListUnmount;
6667
- exports.initClassInstance = initClassInstance;
6668
- exports.initHMR = initHMR;
6669
- exports.initHookInstance = initHookInstance;
6670
- exports.initInstance = initInstance;
6671
- exports.initScheduler = initScheduler;
6672
- exports.initSuspenseInstance = initSuspenseInstance;
6673
- exports.initVisibleInstance = initVisibleInstance;
6674
- exports.initialFiberNode = initialFiberNode;
6675
- exports.insertionEffect = insertionEffect;
6676
- exports.isCommentElement = isCommentElement;
6677
- exports.isCommentEndElement = isCommentEndElement;
6678
- exports.isCommentStartElement = isCommentStartElement;
6679
- exports.isErrorBoundariesComponent = isErrorBoundariesComponent;
6680
- exports.isErrorBoundariesInstance = isErrorBoundariesInstance;
6681
- exports.layoutEffect = layoutEffect;
6682
- exports.loadLazy = loadLazy;
6683
- exports.loadPromise = loadPromise;
6684
- exports.mountAsync = mountAsync;
6685
- exports.mountClassInstance = mountClassInstance;
6686
- exports.mountLoopAll = mountLoopAll;
6687
- exports.mountLoopAllFromScheduler = mountLoopAllFromScheduler;
6688
- exports.mountSync = mountSync;
6689
- exports.mountToNextFiberFromRoot = mountToNextFiberFromRoot;
6690
- exports.nextWorkActivity = nextWorkActivity;
6691
- exports.nextWorkClassComponent = nextWorkClassComponent;
6692
- exports.nextWorkCommon = nextWorkCommon;
6693
- exports.nextWorkComponent = nextWorkComponent;
6694
- exports.nextWorkConsumer = nextWorkConsumer;
6695
- exports.nextWorkFunctionComponent = nextWorkFunctionComponent;
6696
- exports.nextWorkLazy = nextWorkLazy;
6697
- exports.nextWorkNormal = nextWorkNormal;
6698
- exports.nextWorkProvider = nextWorkProvider;
6699
- exports.nextWorkRoot = nextWorkRoot;
6700
- exports.nextWorkSuspense = nextWorkSuspense;
6701
- exports.onceErrorWithKeyAndFiber = onceErrorWithKeyAndFiber;
6702
- exports.onceWarnWithKeyAndFiber = onceWarnWithKeyAndFiber;
6703
- exports.originalError = originalError;
6704
- exports.originalWarn = originalWarn;
6705
- exports.performToNextFiberFromRoot = performToNextFiberFromRoot;
6706
- exports.prepareUpdateAllDependence = prepareUpdateAllDependence;
6707
- exports.prepareUpdateOnFiber = prepareUpdateOnFiber;
6708
- exports.processAsyncLoadListOnAsyncMount = processAsyncLoadListOnAsyncMount;
6709
- exports.processAsyncLoadListOnSyncMount = processAsyncLoadListOnSyncMount;
6710
- exports.processAsyncLoadListOnUpdate = processAsyncLoadListOnUpdate;
6711
- exports.processClassComponentActive = processClassComponentActive;
6712
- exports.processClassComponentMount = processClassComponentMount;
6713
- exports.processClassComponentUnmount = processClassComponentUnmount;
6714
- exports.processClassComponentUpdate = processClassComponentUpdate;
6715
- exports.processClassComponentUpdateQueueLatest = processClassComponentUpdateQueueLatest;
6716
- exports.processClassComponentUpdateQueueLegacy = processClassComponentUpdateQueueLegacy;
6717
- exports.processConsumer = processConsumer;
6718
- exports.processFunction = processFunction;
6719
- exports.processFunctionComponentUpdateQueueLatest = processFunctionComponentUpdateQueueLatest;
6720
- exports.processFunctionComponentUpdateQueueLegacy = processFunctionComponentUpdateQueueLegacy;
6721
- exports.processHook = processHook;
6722
- exports.processLazy = processLazy;
6723
- exports.processNormalComponentUpdateLatest = processNormalComponentUpdateLatest;
6724
- exports.processNormalComponentUpdateLegacy = processNormalComponentUpdateLegacy;
6725
- exports.processPromise = processPromise;
6726
- exports.processProvider = processProvider;
6727
- exports.processState = processState;
6728
- exports.processSuspense = processSuspense;
6729
- exports.processSuspensePromise = processSuspensePromise;
6730
- exports.resetLogScope = resetLogScope;
6731
- exports.runtimeNextWork = runtimeNextWork;
6732
- exports.runtimeNextWorkDev = runtimeNextWorkDev;
6733
- exports.safeCall = safeCall;
6734
- exports.safeCallWithCurrentFiber = safeCallWithCurrentFiber;
6735
- exports.safeCallWithSync = safeCallWithSync;
6736
- exports.scheduleNext = scheduleNext;
6737
- exports.scheduleUpdate = scheduleUpdate;
6738
- exports.setContextForInstance = setContextForInstance;
6739
- exports.setEffectForInstance = setEffectForInstance;
6740
- exports.setLogScope = setLogScope;
6741
- exports.setOwnerForInstance = setOwnerForInstance;
6742
- exports.setRefreshHandler = setRefreshHandler;
6743
- exports.setRefreshTypeMap = setRefreshTypeMap;
6744
- exports.setSubscribeForInstance = setSubscribeForInstance;
6745
- exports.syncComponentStateToFiber = syncComponentStateToFiber;
6746
- exports.syncFiberStateToComponent = syncFiberStateToComponent;
6747
- exports.syncFlushComponentQueue = syncFlushComponentQueue;
6748
- exports.transformChildrenFiber = transformChildrenFiber;
6749
- exports.triggerError = triggerError;
6750
- exports.triggerFiberUpdateListener = triggerFiberUpdateListener;
6751
- exports.triggerRevert = triggerRevert;
6752
- exports.triggerUpdate = triggerUpdate;
6753
- exports.triggerUpdateOnFiber = triggerUpdateOnFiber;
6754
- exports.typeToFibersMap = typeToFibersMap;
6755
- exports.unmountContainer = unmountContainer;
6756
- exports.unmountFiber = unmountFiber;
6757
- exports.unmountFiberNode = unmountFiberNode;
6758
- exports.unmountInstance = unmountInstance;
6759
- exports.updateConcurrentFromRoot = updateConcurrentFromRoot;
6760
- exports.updateFiberNode = updateFiberNode;
6761
- exports.updateHookNode = updateHookNode;
6762
- exports.updateLoopConcurrentFromRoot = updateLoopConcurrentFromRoot;
6763
- exports.updateLoopSyncFromRoot = updateLoopSyncFromRoot;
6764
- exports.updateSyncFromRoot = updateSyncFromRoot;
6765
- exports.version = version;
6667
+ exports$1.CustomRenderDispatch = CustomRenderDispatch;
6668
+ exports$1.MyReactFiberNode = MyReactFiberNode;
6669
+ exports$1.MyReactHookNode = MyReactHookNode;
6670
+ exports$1.MyWeakMap = MyWeakMap;
6671
+ exports$1.RenderDispatchEvent = RenderDispatchEvent;
6672
+ exports$1.WrapperByLazyScope = WrapperByLazyScope;
6673
+ exports$1.WrapperBySuspenseScope = WrapperBySuspenseScope;
6674
+ exports$1.addEffectCallback = addEffectCallback;
6675
+ exports$1.afterSyncFlush = afterSyncFlush;
6676
+ exports$1.afterSyncUpdate = afterSyncUpdate;
6677
+ exports$1.applyTriggerFiberCb = applyTriggerFiberCb;
6678
+ exports$1.beforeSyncFlush = beforeSyncFlush;
6679
+ exports$1.beforeSyncUpdate = beforeSyncUpdate;
6680
+ exports$1.callWithFiber = callWithFiber;
6681
+ exports$1.checkIsMyReactFiberNode = checkIsMyReactFiberNode;
6682
+ exports$1.checkIsSameType = checkIsSameType;
6683
+ exports$1.clearContainer = clearContainer;
6684
+ exports$1.clearFiberNode = clearFiberNode;
6685
+ exports$1.createFiberNode = createFiberNode;
6686
+ exports$1.createHookNode = createHookNode;
6687
+ exports$1.currentRefreshHandler = currentRefreshHandler;
6688
+ exports$1.currentTriggerFiber = currentTriggerFiber;
6689
+ exports$1.debugWithNode = debugWithNode;
6690
+ exports$1.defaultDeleteChildEffect = defaultDeleteChildEffect;
6691
+ exports$1.defaultDeleteCurrentEffect = defaultDeleteCurrentEffect;
6692
+ exports$1.defaultDispatchMount = defaultDispatchMount;
6693
+ exports$1.defaultDispatchMountLatest = defaultDispatchMountLatest;
6694
+ exports$1.defaultDispatchUnmount = defaultDispatchUnmount;
6695
+ exports$1.defaultDispatchUpdate = defaultDispatchUpdate;
6696
+ exports$1.defaultGenerateEffectMap = defaultGenerateEffectMap;
6697
+ exports$1.defaultGenerateStrict = defaultGenerateStrict;
6698
+ exports$1.defaultGenerateUnmountMap = defaultGenerateUnmountMap;
6699
+ exports$1.defaultGetContextFiber = defaultGetContextFiber;
6700
+ exports$1.defaultGetContextValue = defaultGetContextValue;
6701
+ exports$1.defaultInvokeEffect = defaultInvokeEffect;
6702
+ exports$1.defaultInvokeInsertionEffect = defaultInvokeInsertionEffect;
6703
+ exports$1.defaultInvokeLayoutEffect = defaultInvokeLayoutEffect;
6704
+ exports$1.defaultInvokeUnmountList = defaultInvokeUnmountList;
6705
+ exports$1.defaultReadContext = defaultReadContext;
6706
+ exports$1.defaultReadPromise = defaultReadPromise;
6707
+ exports$1.defaultResolveAliveSuspenseFiber = defaultResolveAliveSuspenseFiber;
6708
+ exports$1.defaultResolveErrorBoundaries = defaultResolveErrorBoundaries;
6709
+ exports$1.defaultResolveScope = defaultResolveScope;
6710
+ exports$1.defaultResolveSuspenseFiber = defaultResolveSuspenseFiber;
6711
+ exports$1.defaultResolveSuspenseValue = defaultResolveSuspenseValue;
6712
+ exports$1.devError = devError;
6713
+ exports$1.devErrorWithFiber = devErrorWithFiber;
6714
+ exports$1.devWarn = devWarn;
6715
+ exports$1.devWarnWithFiber = devWarnWithFiber;
6716
+ exports$1.effect = effect;
6717
+ exports$1.effectHookNode = effectHookNode;
6718
+ exports$1.emptyProps = emptyProps;
6719
+ exports$1.enableDebugUpdateQueue = enableDebugUpdateQueue;
6720
+ exports$1.enableFiberForLog = enableFiberForLog;
6721
+ exports$1.enableLogForCurrentFlowIsRunning = enableLogForCurrentFlowIsRunning;
6722
+ exports$1.enableValidMyReactElement = enableValidMyReactElement;
6723
+ exports$1.fiberToDispatchMap = fiberToDispatchMap;
6724
+ exports$1.flushEffectCallback = flushEffectCallback;
6725
+ exports$1.generateFiberToListWithAction = generateFiberToListWithAction;
6726
+ exports$1.generateFiberToMountList = generateFiberToMountList;
6727
+ exports$1.generateFiberToUnmountList = generateFiberToUnmountList;
6728
+ exports$1.getClassInstanceFieldByInstance = getClassInstanceFieldByInstance;
6729
+ exports$1.getCurrentDispatchFromFiber = getCurrentDispatchFromFiber;
6730
+ exports$1.getCurrentDispatchFromType = getCurrentDispatchFromType;
6731
+ exports$1.getCurrentFibersFromType = getCurrentFibersFromType;
6732
+ exports$1.getCurrentTypeFromRefresh = getCurrentTypeFromRefresh;
6733
+ exports$1.getCurrentTypeFromRefreshOnly = getCurrentTypeFromRefreshOnly;
6734
+ exports$1.getElementFromRefreshIfExist = getElementFromRefreshIfExist;
6735
+ exports$1.getElementName = getElementName;
6736
+ exports$1.getElementTypeFromType = getElementTypeFromType;
6737
+ exports$1.getFiberTree = getFiberTree$1;
6738
+ exports$1.getFiberTreeWithFiber = getFiberTreeWithFiber;
6739
+ exports$1.getHookTree = getHookTree;
6740
+ exports$1.getInstanceContextFiber = getInstanceContextFiber;
6741
+ exports$1.getInstanceEffectState = getInstanceEffectState;
6742
+ exports$1.getInstanceFieldByInstance = getInstanceFieldByInstance;
6743
+ exports$1.getInstanceOwnerFiber = getInstanceOwnerFiber;
6744
+ exports$1.getPlainFiberName = getPlainFiberName;
6745
+ exports$1.getStackTree = getStackTree;
6746
+ exports$1.getTypeFromElement = getTypeFromElement;
6747
+ exports$1.getTypeFromElementNode = getTypeFromElementNode;
6748
+ exports$1.hmr = hmr;
6749
+ exports$1.hmrRevert = hmrRevert;
6750
+ exports$1.hmrUpdate = hmrUpdate;
6751
+ exports$1.hookListUnmount = hookListUnmount;
6752
+ exports$1.initClassInstance = initClassInstance;
6753
+ exports$1.initHMR = initHMR;
6754
+ exports$1.initHookInstance = initHookInstance;
6755
+ exports$1.initInstance = initInstance;
6756
+ exports$1.initScheduler = initScheduler;
6757
+ exports$1.initSuspenseInstance = initSuspenseInstance;
6758
+ exports$1.initVisibleInstance = initVisibleInstance;
6759
+ exports$1.initialFiberNode = initialFiberNode;
6760
+ exports$1.insertionEffect = insertionEffect;
6761
+ exports$1.isCommentElement = isCommentElement;
6762
+ exports$1.isCommentEndElement = isCommentEndElement;
6763
+ exports$1.isCommentStartElement = isCommentStartElement;
6764
+ exports$1.isErrorBoundariesComponent = isErrorBoundariesComponent;
6765
+ exports$1.isErrorBoundariesInstance = isErrorBoundariesInstance;
6766
+ exports$1.layoutEffect = layoutEffect;
6767
+ exports$1.loadLazy = loadLazy;
6768
+ exports$1.loadPromise = loadPromise;
6769
+ exports$1.mountAsync = mountAsync;
6770
+ exports$1.mountClassInstance = mountClassInstance;
6771
+ exports$1.mountLoopAll = mountLoopAll;
6772
+ exports$1.mountLoopAllFromScheduler = mountLoopAllFromScheduler;
6773
+ exports$1.mountSync = mountSync;
6774
+ exports$1.mountToNextFiberFromRoot = mountToNextFiberFromRoot;
6775
+ exports$1.nextWorkActivity = nextWorkActivity;
6776
+ exports$1.nextWorkClassComponent = nextWorkClassComponent;
6777
+ exports$1.nextWorkCommon = nextWorkCommon;
6778
+ exports$1.nextWorkComponent = nextWorkComponent;
6779
+ exports$1.nextWorkConsumer = nextWorkConsumer;
6780
+ exports$1.nextWorkFunctionComponent = nextWorkFunctionComponent;
6781
+ exports$1.nextWorkLazy = nextWorkLazy;
6782
+ exports$1.nextWorkNormal = nextWorkNormal;
6783
+ exports$1.nextWorkProvider = nextWorkProvider;
6784
+ exports$1.nextWorkRoot = nextWorkRoot;
6785
+ exports$1.nextWorkSuspense = nextWorkSuspense;
6786
+ exports$1.onceErrorWithKeyAndFiber = onceErrorWithKeyAndFiber;
6787
+ exports$1.onceWarnWithKeyAndFiber = onceWarnWithKeyAndFiber;
6788
+ exports$1.originalError = originalError;
6789
+ exports$1.originalWarn = originalWarn;
6790
+ exports$1.performToNextFiberFromRoot = performToNextFiberFromRoot;
6791
+ exports$1.prepareUpdateAllDependence = prepareUpdateAllDependence;
6792
+ exports$1.prepareUpdateOnFiber = prepareUpdateOnFiber;
6793
+ exports$1.processAsyncLoadListOnAsyncMount = processAsyncLoadListOnAsyncMount;
6794
+ exports$1.processAsyncLoadListOnSyncMount = processAsyncLoadListOnSyncMount;
6795
+ exports$1.processAsyncLoadListOnUpdate = processAsyncLoadListOnUpdate;
6796
+ exports$1.processClassComponentActive = processClassComponentActive;
6797
+ exports$1.processClassComponentMount = processClassComponentMount;
6798
+ exports$1.processClassComponentUnmount = processClassComponentUnmount;
6799
+ exports$1.processClassComponentUpdate = processClassComponentUpdate;
6800
+ exports$1.processClassComponentUpdateQueueLatest = processClassComponentUpdateQueueLatest;
6801
+ exports$1.processClassComponentUpdateQueueLegacy = processClassComponentUpdateQueueLegacy;
6802
+ exports$1.processConsumer = processConsumer;
6803
+ exports$1.processFunction = processFunction;
6804
+ exports$1.processFunctionComponentUpdateQueueLatest = processFunctionComponentUpdateQueueLatest;
6805
+ exports$1.processFunctionComponentUpdateQueueLegacy = processFunctionComponentUpdateQueueLegacy;
6806
+ exports$1.processHook = processHook;
6807
+ exports$1.processLazy = processLazy;
6808
+ exports$1.processNormalComponentUpdateLatest = processNormalComponentUpdateLatest;
6809
+ exports$1.processNormalComponentUpdateLegacy = processNormalComponentUpdateLegacy;
6810
+ exports$1.processPromise = processPromise;
6811
+ exports$1.processProvider = processProvider;
6812
+ exports$1.processState = processState;
6813
+ exports$1.processSuspense = processSuspense;
6814
+ exports$1.processSuspensePromise = processSuspensePromise;
6815
+ exports$1.resetLogScope = resetLogScope;
6816
+ exports$1.runtimeNextWork = runtimeNextWork;
6817
+ exports$1.runtimeNextWorkDev = runtimeNextWorkDev;
6818
+ exports$1.safeCall = safeCall;
6819
+ exports$1.safeCallWithCurrentFiber = safeCallWithCurrentFiber;
6820
+ exports$1.safeCallWithSync = safeCallWithSync;
6821
+ exports$1.scheduleNext = scheduleNext;
6822
+ exports$1.scheduleUpdate = scheduleUpdate;
6823
+ exports$1.setContextForInstance = setContextForInstance;
6824
+ exports$1.setEffectForInstance = setEffectForInstance;
6825
+ exports$1.setLogScope = setLogScope;
6826
+ exports$1.setOwnerForInstance = setOwnerForInstance;
6827
+ exports$1.setRefreshHandler = setRefreshHandler;
6828
+ exports$1.setRefreshTypeMap = setRefreshTypeMap;
6829
+ exports$1.setSubscribeForInstance = setSubscribeForInstance;
6830
+ exports$1.syncComponentStateToFiber = syncComponentStateToFiber;
6831
+ exports$1.syncFiberStateToComponent = syncFiberStateToComponent;
6832
+ exports$1.syncFlushComponentQueue = syncFlushComponentQueue;
6833
+ exports$1.transformChildrenFiber = transformChildrenFiber;
6834
+ exports$1.triggerError = triggerError;
6835
+ exports$1.triggerFiberUpdateListener = triggerFiberUpdateListener;
6836
+ exports$1.triggerRevert = triggerRevert;
6837
+ exports$1.triggerUpdate = triggerUpdate;
6838
+ exports$1.triggerUpdateOnFiber = triggerUpdateOnFiber;
6839
+ exports$1.typeToFibersMap = typeToFibersMap;
6840
+ exports$1.unmountContainer = unmountContainer;
6841
+ exports$1.unmountFiber = unmountFiber;
6842
+ exports$1.unmountFiberNode = unmountFiberNode;
6843
+ exports$1.unmountInstance = unmountInstance;
6844
+ exports$1.updateConcurrentFromRoot = updateConcurrentFromRoot;
6845
+ exports$1.updateFiberNode = updateFiberNode;
6846
+ exports$1.updateHookNode = updateHookNode;
6847
+ exports$1.updateLoopConcurrentFromRoot = updateLoopConcurrentFromRoot;
6848
+ exports$1.updateLoopSyncFromRoot = updateLoopSyncFromRoot;
6849
+ exports$1.updateSyncFromRoot = updateSyncFromRoot;
6850
+ exports$1.version = version;
6766
6851
  } (index_production));
6767
6852
  return index_production;
6768
6853
  }
@@ -6875,7 +6960,7 @@ var Effect_TYPE;
6875
6960
  Effect_TYPE[Effect_TYPE["__unmount__"] = 2] = "__unmount__";
6876
6961
  })(Effect_TYPE || (Effect_TYPE = {}));
6877
6962
 
6878
- var enableKnownConfigLog = require$$0.createRef(false);
6963
+ var enableKnownConfigLog = typeExports.createRef(false);
6879
6964
 
6880
6965
  var DISPATCH_FIELD = "__@my-react/dispatch__";
6881
6966
  var DEV_TOOL_FIELD = "__@my-react/react-devtool-inject__";
@@ -7055,7 +7140,7 @@ var create = function (_dispatch, _fiber, _config) {
7055
7140
 
7056
7141
  var initialMap = function (dispatch, fiber, config) {
7057
7142
  var parentFiberWithNode = null;
7058
- var parentFiberHostContext = null;
7143
+ var parentFiberWithNodeHostContext = null;
7059
7144
  var hostContext = null;
7060
7145
  if (fiber.parent) {
7061
7146
  var mayFiberContainer = fiber.parent;
@@ -7068,12 +7153,17 @@ var initialMap = function (dispatch, fiber, config) {
7068
7153
  else {
7069
7154
  parentFiberWithNode = dispatch.runtimeDom.elementMap.get(fiber.parent) || dispatch.rootFiber;
7070
7155
  }
7071
- parentFiberHostContext = dispatch.runtimeDom.hostContextMap.get(parentFiberWithNode);
7156
+ parentFiberWithNodeHostContext = dispatch.runtimeDom.hostContextMap.get(parentFiberWithNode);
7072
7157
  if (checkFiberWithNativeNode(dispatch, fiber)) {
7073
- hostContext = config.getChildHostContext(parentFiberHostContext, fiber.elementType, dispatch.rootNode, fiber);
7158
+ hostContext = config.getChildHostContext(parentFiberWithNodeHostContext, fiber.elementType, dispatch.rootNode, fiber);
7074
7159
  }
7075
7160
  else {
7076
- hostContext = parentFiberHostContext;
7161
+ hostContext = parentFiberWithNodeHostContext;
7162
+ }
7163
+ // help for lynx render to set css entry
7164
+ if (config.pathHostContext && typeof config.pathHostContext === "function") {
7165
+ var parentFiberHostContext = dispatch.runtimeDom.hostContextMap.get(mayFiberContainer);
7166
+ hostContext = config.pathHostContext(hostContext, parentFiberHostContext, parentFiberWithNodeHostContext, fiber.elementType, fiber.pendingProps, dispatch.rootNode, fiber);
7077
7167
  }
7078
7168
  }
7079
7169
  else {
@@ -7354,7 +7444,7 @@ var position = function (_dispatch, _fiber, _config) {
7354
7444
  };
7355
7445
 
7356
7446
  var createPortal = function (_element, _container) {
7357
- var portal = require$$0.createElement(Portal, { container: _container }, _element);
7447
+ var portal = typeExports.createElement(Portal, { container: _container }, _element);
7358
7448
  return portal;
7359
7449
  };
7360
7450
  var nextWorkPortal = function (renderDispatch, fiber) {
@@ -7401,8 +7491,8 @@ var ReconcilerDispatchFiber = function (renderDispatch, fiber) {
7401
7491
  }
7402
7492
  };
7403
7493
 
7404
- var currentScheduler$2 = require$$0.__my_react_internal__.currentScheduler;
7405
- require$$0.__my_react_shared__.enableScopeTreeLog;
7494
+ var currentScheduler$2 = typeExports.__my_react_internal__.currentScheduler;
7495
+ typeExports.__my_react_shared__.enableScopeTreeLog;
7406
7496
  var ReconcilerDispatchMount = function (_dispatch, _fiber, config) {
7407
7497
  var pendingCommitFiberArray = [];
7408
7498
  myreactReconcilerExports.beforeSyncUpdate();
@@ -7474,8 +7564,8 @@ var ReconcilerDispatchMount = function (_dispatch, _fiber, config) {
7474
7564
  });
7475
7565
  };
7476
7566
 
7477
- var currentScheduler$1 = require$$0.__my_react_internal__.currentScheduler;
7478
- require$$0.__my_react_shared__.enableScopeTreeLog;
7567
+ var currentScheduler$1 = typeExports.__my_react_internal__.currentScheduler;
7568
+ typeExports.__my_react_shared__.enableScopeTreeLog;
7479
7569
  var ReconcilerDispatchUpdate = function (_dispatch, _list, config, sync) {
7480
7570
  myreactReconcilerExports.beforeSyncUpdate();
7481
7571
  _list.listToFoot(function invokeUnmountPendingAndInsertionEffectList(_fiber) {
@@ -7507,24 +7597,24 @@ var ReconcilerDispatchUpdate = function (_dispatch, _list, config, sync) {
7507
7597
  }
7508
7598
  }
7509
7599
  });
7510
- _list.listToHead(function invokePositionList(_fiber) {
7600
+ _list.listToFoot(function invokeAppendList(_fiber) {
7511
7601
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
7512
7602
  myreactReconcilerExports.safeCallWithCurrentFiber({
7513
7603
  fiber: _fiber,
7514
- action: function safeCallPosition() {
7515
- _dispatch.commitPosition(_fiber);
7604
+ action: function safeCallAppendList() {
7605
+ _dispatch.commitAppend(_fiber);
7516
7606
  var parentFiber = getValidParentFiberWithNode(_dispatch, _fiber);
7517
7607
  parentFiber && pendingFinalizeInitialChildrenFiberSet.add(parentFiber);
7518
7608
  },
7519
7609
  });
7520
7610
  }
7521
7611
  });
7522
- _list.listToFoot(function invokeAppendList(_fiber) {
7612
+ _list.listToHead(function invokePositionList(_fiber) {
7523
7613
  if (exclude(_fiber.state, STATE_TYPE.__unmount__) && !_dispatch.isAppUnmounted) {
7524
7614
  myreactReconcilerExports.safeCallWithCurrentFiber({
7525
7615
  fiber: _fiber,
7526
- action: function safeCallAppendList() {
7527
- _dispatch.commitAppend(_fiber);
7616
+ action: function safeCallPosition() {
7617
+ _dispatch.commitPosition(_fiber);
7528
7618
  var parentFiber = getValidParentFiberWithNode(_dispatch, _fiber);
7529
7619
  parentFiber && pendingFinalizeInitialChildrenFiberSet.add(parentFiber);
7530
7620
  },
@@ -7588,7 +7678,7 @@ var ReconcilerDispatchUpdate = function (_dispatch, _list, config, sync) {
7588
7678
  }
7589
7679
  };
7590
7680
 
7591
- require$$0.__my_react_internal__.currentComponentFiber;
7681
+ typeExports.__my_react_internal__.currentComponentFiber;
7592
7682
  var initialRef = {
7593
7683
  typeForRef: myreactReconcilerExports.NODE_TYPE.__plain__ | myreactReconcilerExports.NODE_TYPE.__class__,
7594
7684
  typeForCreate: myreactReconcilerExports.NODE_TYPE.__text__ | myreactReconcilerExports.NODE_TYPE.__plain__ | myreactReconcilerExports.NODE_TYPE.__portal__,
@@ -7706,381 +7796,7 @@ var createDispatch = function (rootNode, rootFiber, rootElement, config, flag) {
7706
7796
  return dispatch;
7707
7797
  };
7708
7798
 
7709
- /* eslint-disable @typescript-eslint/no-unused-vars */
7710
- /* eslint-disable @typescript-eslint/ban-ts-comment */
7711
- function loadRemoteScript(url, options) {
7712
- if (options === void 0) { options = {}; }
7713
- return __awaiter(this, void 0, void 0, function () {
7714
- var _a, timeout, _b, context, _c, useEval, controller_1, timeoutId, response, code, error_1, errorMsg;
7715
- return __generator(this, function (_d) {
7716
- switch (_d.label) {
7717
- case 0:
7718
- _a = options.timeout, timeout = _a === void 0 ? 10000 : _a, _b = options.context, context = _b === void 0 ? {} : _b, _c = options.useEval, useEval = _c === void 0 ? false : _c;
7719
- _d.label = 1;
7720
- case 1:
7721
- _d.trys.push([1, 5, , 6]);
7722
- controller_1 = new AbortController();
7723
- timeoutId = setTimeout(function () { return controller_1.abort(); }, timeout);
7724
- return [4 /*yield*/, fetch(url, {
7725
- signal: controller_1.signal,
7726
- })];
7727
- case 2:
7728
- response = _d.sent();
7729
- if (!response.ok) {
7730
- throw new Error("HTTP ".concat(response.status, ": ").concat(response.statusText));
7731
- }
7732
- return [4 /*yield*/, response.text()];
7733
- case 3:
7734
- code = _d.sent();
7735
- clearTimeout(timeoutId);
7736
- // 根据环境选择执行方式
7737
- return [4 /*yield*/, executeScript(code, url, { context: context, useEval: useEval })];
7738
- case 4:
7739
- // 根据环境选择执行方式
7740
- _d.sent();
7741
- return [3 /*break*/, 6];
7742
- case 5:
7743
- error_1 = _d.sent();
7744
- if ((error_1 === null || error_1 === void 0 ? void 0 : error_1.name) === "AbortError") {
7745
- throw new Error("\u52A0\u8F7D\u8FDC\u7A0B\u811A\u672C\u8D85\u65F6 (".concat(timeout, "ms)"));
7746
- }
7747
- errorMsg = (error_1 === null || error_1 === void 0 ? void 0 : error_1.message) || String(error_1);
7748
- throw new Error("\u52A0\u8F7D\u8FDC\u7A0B\u811A\u672C\u5931\u8D25: ".concat(errorMsg));
7749
- case 6: return [2 /*return*/];
7750
- }
7751
- });
7752
- });
7753
- }
7754
- function executeScript(code, url, options) {
7755
- return __awaiter(this, void 0, void 0, function () {
7756
- var _a, context, _b, useEval, env, _c;
7757
- return __generator(this, function (_d) {
7758
- switch (_d.label) {
7759
- case 0:
7760
- _a = options.context, context = _a === void 0 ? {} : _a, _b = options.useEval, useEval = _b === void 0 ? false : _b;
7761
- env = detectEnvironment();
7762
- _c = env;
7763
- switch (_c) {
7764
- case "bun": return [3 /*break*/, 1];
7765
- case "node": return [3 /*break*/, 3];
7766
- case "browser": return [3 /*break*/, 5];
7767
- }
7768
- return [3 /*break*/, 7];
7769
- case 1: return [4 /*yield*/, executeInBun(code, url, context)];
7770
- case 2:
7771
- _d.sent();
7772
- return [3 /*break*/, 8];
7773
- case 3: return [4 /*yield*/, executeInNode(code, url, context)];
7774
- case 4:
7775
- _d.sent();
7776
- return [3 /*break*/, 8];
7777
- case 5: return [4 /*yield*/, executeInBrowser(code, url, context, useEval)];
7778
- case 6:
7779
- _d.sent();
7780
- return [3 /*break*/, 8];
7781
- case 7: throw new Error("未知的 JavaScript 环境");
7782
- case 8: return [2 /*return*/];
7783
- }
7784
- });
7785
- });
7786
- }
7787
- function detectEnvironment() {
7788
- // 检测 Bun
7789
- // @ts-ignore
7790
- if (typeof Bun !== "undefined" && typeof Bun === "object") {
7791
- return "bun";
7792
- }
7793
- // 检测 Node.js
7794
- if (typeof process !== "undefined" && process.versions && process.versions.node) {
7795
- return "node";
7796
- }
7797
- // 检测浏览器环境
7798
- if (typeof window !== "undefined" && typeof document !== "undefined") {
7799
- return "browser";
7800
- }
7801
- // 默认为浏览器环境(保守策略)
7802
- return "browser";
7803
- }
7804
- // 安全的 Base64 编码函数(跨环境兼容)
7805
- function safeBase64Encode(str) {
7806
- // Node.js 环境
7807
- if (typeof Buffer !== "undefined") {
7808
- return Buffer.from(str, "utf-8").toString("base64");
7809
- }
7810
- // 浏览器环境
7811
- if (typeof btoa !== "undefined") {
7812
- // 处理 Unicode 字符
7813
- var utf8Bytes_1 = new TextEncoder().encode(str);
7814
- var binary = "";
7815
- for (var i = 0; i < utf8Bytes_1.length; i++) {
7816
- binary += String.fromCharCode(utf8Bytes_1[i]);
7817
- }
7818
- return btoa(binary);
7819
- }
7820
- // 回退方案:手动实现 Base64 编码
7821
- var base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
7822
- var utf8Bytes = new TextEncoder().encode(str);
7823
- var result = "";
7824
- for (var i = 0; i < utf8Bytes.length; i += 3) {
7825
- var a = utf8Bytes[i];
7826
- var b = i + 1 < utf8Bytes.length ? utf8Bytes[i + 1] : 0;
7827
- var c = i + 2 < utf8Bytes.length ? utf8Bytes[i + 2] : 0;
7828
- var bitmap = (a << 16) | (b << 8) | c;
7829
- result += base64Chars[(bitmap >> 18) & 63];
7830
- result += base64Chars[(bitmap >> 12) & 63];
7831
- result += i + 1 < utf8Bytes.length ? base64Chars[(bitmap >> 6) & 63] : "=";
7832
- result += i + 2 < utf8Bytes.length ? base64Chars[bitmap & 63] : "=";
7833
- }
7834
- return result;
7835
- }
7836
- // Bun 环境执行
7837
- function executeInBun(code, url, context) {
7838
- return __awaiter(this, void 0, void 0, function () {
7839
- var base64Code, dataUrl;
7840
- return __generator(this, function (_a) {
7841
- switch (_a.label) {
7842
- case 0:
7843
- _a.trys.push([0, 2, , 4]);
7844
- base64Code = safeBase64Encode(code);
7845
- dataUrl = "data:application/javascript;base64,".concat(base64Code);
7846
- return [4 /*yield*/, import(/* @vite-ignore */ dataUrl)];
7847
- case 1:
7848
- _a.sent();
7849
- return [2 /*return*/];
7850
- case 2:
7851
- _a.sent();
7852
- // 方法2: 使用 VM 回退
7853
- return [4 /*yield*/, executeWithVM(code, url, context)];
7854
- case 3:
7855
- // 方法2: 使用 VM 回退
7856
- _a.sent();
7857
- return [3 /*break*/, 4];
7858
- case 4: return [2 /*return*/];
7859
- }
7860
- });
7861
- });
7862
- }
7863
- // Node.js 环境执行
7864
- function executeInNode(code, url, context) {
7865
- return __awaiter(this, void 0, void 0, function () {
7866
- var error_3, base64Code, dataUrl, importError_1, errorMsg, importErrorMsg;
7867
- return __generator(this, function (_a) {
7868
- switch (_a.label) {
7869
- case 0:
7870
- _a.trys.push([0, 2, , 7]);
7871
- // 方法1: 使用 VM 模块
7872
- return [4 /*yield*/, executeWithVM(code, url, context)];
7873
- case 1:
7874
- // 方法1: 使用 VM 模块
7875
- _a.sent();
7876
- return [3 /*break*/, 7];
7877
- case 2:
7878
- error_3 = _a.sent();
7879
- _a.label = 3;
7880
- case 3:
7881
- _a.trys.push([3, 5, , 6]);
7882
- base64Code = safeBase64Encode(code);
7883
- dataUrl = "data:application/javascript;base64,".concat(base64Code);
7884
- return [4 /*yield*/, import(/* @vite-ignore */ dataUrl)];
7885
- case 4:
7886
- _a.sent();
7887
- return [3 /*break*/, 6];
7888
- case 5:
7889
- importError_1 = _a.sent();
7890
- errorMsg = (error_3 === null || error_3 === void 0 ? void 0 : error_3.message) || String(error_3);
7891
- importErrorMsg = (importError_1 === null || importError_1 === void 0 ? void 0 : importError_1.message) || String(importError_1);
7892
- throw new Error("Node.js \u6267\u884C\u5931\u8D25: ".concat(errorMsg, ", ").concat(importErrorMsg));
7893
- case 6: return [3 /*break*/, 7];
7894
- case 7: return [2 /*return*/];
7895
- }
7896
- });
7897
- });
7898
- }
7899
- // 浏览器环境执行
7900
- function executeInBrowser(code, url, context, useEval) {
7901
- return __awaiter(this, void 0, void 0, function () {
7902
- return __generator(this, function (_a) {
7903
- switch (_a.label) {
7904
- case 0:
7905
- // 浏览器环境的安全考虑
7906
- if (!useEval && isPotentiallyUnsafe(code)) {
7907
- throw new Error("代码包含潜在不安全内容,如需执行请设置 useEval: true");
7908
- }
7909
- _a.label = 1;
7910
- case 1:
7911
- _a.trys.push([1, 3, , 4]);
7912
- // 方法1: 使用 script 标签插入 (最安全)
7913
- return [4 /*yield*/, executeWithScriptTag(code)];
7914
- case 2:
7915
- // 方法1: 使用 script 标签插入 (最安全)
7916
- _a.sent();
7917
- return [3 /*break*/, 4];
7918
- case 3:
7919
- _a.sent();
7920
- // 方法2: 使用 eval (需要显式启用)
7921
- if (useEval) {
7922
- executeWithEval(code, context);
7923
- }
7924
- else {
7925
- throw new Error("浏览器执行失败,请启用 useEval 选项或检查 CSP 设置");
7926
- }
7927
- return [3 /*break*/, 4];
7928
- case 4: return [2 /*return*/];
7929
- }
7930
- });
7931
- });
7932
- }
7933
- // 通用 VM 执行 (Node.js/Bun)
7934
- function executeWithVM(code, url, context) {
7935
- return __awaiter(this, void 0, void 0, function () {
7936
- var vm, sandbox, vmContext, script, error_5, errorMsg;
7937
- return __generator(this, function (_a) {
7938
- switch (_a.label) {
7939
- case 0:
7940
- _a.trys.push([0, 2, , 3]);
7941
- return [4 /*yield*/, import('vm')];
7942
- case 1:
7943
- vm = _a.sent();
7944
- sandbox = __assign(__assign(__assign({
7945
- // 基础全局变量
7946
- console: console, setTimeout: setTimeout, setInterval: setInterval, clearTimeout: clearTimeout, clearInterval: clearInterval, URL: URL, URLSearchParams: URLSearchParams,
7947
- // 内置对象
7948
- Object: Object, Array: Array, String: String, Number: Number, Boolean: Boolean, Symbol: Symbol, Date: Date, RegExp: RegExp, Error: Error, TypeError: TypeError, RangeError: RangeError, SyntaxError: SyntaxError, Map: Map, Set: Set, WeakMap: WeakMap, WeakSet: WeakSet, Promise: Promise, JSON: JSON, Math: Math }, (typeof global !== "undefined" ? { global: global } : {})), (typeof process !== "undefined" ? { process: process } : {})), context);
7949
- vmContext = vm.createContext(sandbox);
7950
- script = new vm.Script(code, {
7951
- filename: url,
7952
- lineOffset: 0,
7953
- columnOffset: 0,
7954
- });
7955
- script.runInContext(vmContext);
7956
- return [3 /*break*/, 3];
7957
- case 2:
7958
- error_5 = _a.sent();
7959
- errorMsg = (error_5 === null || error_5 === void 0 ? void 0 : error_5.message) || String(error_5);
7960
- throw new Error("VM \u6267\u884C\u5931\u8D25: ".concat(errorMsg));
7961
- case 3: return [2 /*return*/];
7962
- }
7963
- });
7964
- });
7965
- }
7966
- // 浏览器 script 标签执行
7967
- function executeWithScriptTag(code, url) {
7968
- // 检查是否在浏览器环境
7969
- if (typeof document === "undefined") {
7970
- throw new Error("document 未定义,不在浏览器环境中");
7971
- }
7972
- return new Promise(function (resolve, reject) {
7973
- // 创建 script 元素
7974
- var script = document.createElement("script");
7975
- // 使用 Blob URL 避免 CSP 问题
7976
- var blob = new Blob([code], { type: "application/javascript" });
7977
- var blobUrl = URL.createObjectURL(blob);
7978
- script.src = blobUrl;
7979
- // 清理函数
7980
- var cleanup = function () {
7981
- URL.revokeObjectURL(blobUrl);
7982
- // 从 DOM 中移除 script 标签以防止内存泄漏
7983
- if (script.parentNode) {
7984
- script.parentNode.removeChild(script);
7985
- }
7986
- };
7987
- // 设置错误处理
7988
- script.onerror = function () {
7989
- cleanup();
7990
- reject(new Error("Script 标签加载失败"));
7991
- };
7992
- script.onload = function () {
7993
- cleanup();
7994
- resolve();
7995
- };
7996
- // 添加到 DOM
7997
- document.head.appendChild(script);
7998
- });
7999
- }
8000
- // 浏览器 eval 执行
8001
- function executeWithEval(code, context) {
8002
- // 在特定上下文中执行
8003
- var contextKeys = Object.keys(context);
8004
- var contextValues = Object.values(context);
8005
- try {
8006
- // 使用 Function 构造函数比直接 eval 稍安全
8007
- var func = new (Function.bind.apply(Function, __spreadArray(__spreadArray([void 0], contextKeys, false), ["\n \"use strict\";\n ".concat(code, "\n ")], false)))();
8008
- func.apply(void 0, contextValues);
8009
- }
8010
- catch (error) {
8011
- // 回退到间接 eval
8012
- try {
8013
- var indirectEval = eval;
8014
- indirectEval(code);
8015
- }
8016
- catch (evalError) {
8017
- var errorMsg = (evalError === null || evalError === void 0 ? void 0 : evalError.message) || String(evalError);
8018
- throw new Error("Eval \u6267\u884C\u5931\u8D25: ".concat(errorMsg));
8019
- }
8020
- }
8021
- }
8022
- // 增强的安全检查
8023
- function isPotentiallyUnsafe(code) {
8024
- var unsafePatterns = [
8025
- // Cookie 和存储访问
8026
- /document\.cookie/i,
8027
- /localStorage/i,
8028
- /sessionStorage/i,
8029
- /indexedDB/i,
8030
- // 动态代码执行
8031
- /\beval\s*\(/i,
8032
- /Function\s*\(/i,
8033
- /setTimeout\s*\(\s*["'`]/i, // setTimeout with string
8034
- /setInterval\s*\(\s*["'`]/i, // setInterval with string
8035
- // 动态脚本和 DOM 操作
8036
- /script\.src/i,
8037
- /\.innerHTML/i,
8038
- /\.outerHTML/i,
8039
- /document\.write/i,
8040
- /document\.writeln/i,
8041
- // 动态属性访问(可能绕过检查)
8042
- /\[["'`]eval["'`]\]/i,
8043
- /\[["'`]cookie["'`]\]/i,
8044
- /\[["'`]localStorage["'`]\]/i,
8045
- // import() 动态导入
8046
- /import\s*\(/i,
8047
- // 危险的 DOM API
8048
- /\.insertAdjacentHTML/i,
8049
- /createContextualFragment/i,
8050
- ];
8051
- return unsafePatterns.some(function (pattern) { return pattern.test(code); });
8052
- }
8053
- // 安全的 require 函数模拟
8054
- function createSafeRequire() {
8055
- if (typeof require !== "undefined") {
8056
- return require;
8057
- }
8058
- // 在浏览器环境中返回一个安全的模拟 require
8059
- return function (id) {
8060
- throw new Error("require('".concat(id, "') \u5728\u6D4F\u89C8\u5668\u73AF\u5883\u4E2D\u4E0D\u53EF\u7528"));
8061
- };
8062
- }
8063
- // 增强的模块加载版本(支持导出)
8064
- function loadRemoteModule(url, options) {
8065
- if (options === void 0) { options = {}; }
8066
- return __awaiter(this, void 0, void 0, function () {
8067
- var _a, context, moduleExports, moduleContext;
8068
- return __generator(this, function (_b) {
8069
- switch (_b.label) {
8070
- case 0:
8071
- _a = options.context, context = _a === void 0 ? {} : _a;
8072
- moduleExports = {};
8073
- moduleContext = __assign({ exports: moduleExports, module: { exports: moduleExports }, require: createSafeRequire() }, context);
8074
- return [4 /*yield*/, loadRemoteScript(url, __assign(__assign({}, options), { context: moduleContext }))];
8075
- case 1:
8076
- _b.sent();
8077
- return [2 /*return*/, moduleContext.module.exports];
8078
- }
8079
- });
8080
- });
8081
- }
8082
-
8083
- var enableDebugFiled$1 = require$$0.__my_react_shared__.enableDebugFiled, enableScopeTreeLog$1 = require$$0.__my_react_shared__.enableScopeTreeLog;
7799
+ var enableDebugFiled$1 = typeExports.__my_react_shared__.enableDebugFiled, enableScopeTreeLog$1 = typeExports.__my_react_shared__.enableScopeTreeLog;
8084
7800
  /**
8085
7801
  * @internal
8086
7802
  */
@@ -8092,8 +7808,8 @@ var prepareScheduler = function () {
8092
7808
  myreactReconcilerExports.initScheduler();
8093
7809
  };
8094
7810
 
8095
- var enableDebugFiled = require$$0.__my_react_shared__.enableDebugFiled, enableScopeTreeLog = require$$0.__my_react_shared__.enableScopeTreeLog;
8096
- var currentScheduler = require$$0.__my_react_internal__.currentScheduler;
7811
+ var enableDebugFiled = typeExports.__my_react_shared__.enableDebugFiled, enableScopeTreeLog = typeExports.__my_react_shared__.enableScopeTreeLog;
7812
+ var currentScheduler = typeExports.__my_react_internal__.currentScheduler;
8097
7813
  // react-reconciler compat implementation
8098
7814
  var Reconciler = function (_config) {
8099
7815
  var rendererPackageName = "@my-react";
@@ -8115,6 +7831,7 @@ var Reconciler = function (_config) {
8115
7831
  return _container;
8116
7832
  };
8117
7833
  var updateContainer = function (_element, _container, _ignore, _cb) {
7834
+ var _a;
8118
7835
  var renderDispatch = _container.__container__;
8119
7836
  var renderScheduler = currentScheduler.current;
8120
7837
  if (renderDispatch instanceof myreactReconcilerExports.CustomRenderDispatch) {
@@ -8132,6 +7849,7 @@ var Reconciler = function (_config) {
8132
7849
  return;
8133
7850
  }
8134
7851
  myreactReconcilerExports.unmountContainer(renderDispatch);
7852
+ (_a = _config === null || _config === void 0 ? void 0 : _config.clearContainer) === null || _a === void 0 ? void 0 : _a.call(_config, _container);
8135
7853
  ReconcilerSet.delete(renderDispatch);
8136
7854
  renderScheduler.dispatchSet.uniDelete(renderDispatch);
8137
7855
  delGlobalDispatch(renderDispatch);
@@ -8149,47 +7867,32 @@ var Reconciler = function (_config) {
8149
7867
  myreactReconcilerExports.mountSync(_renderDispatch, _fiber);
8150
7868
  _renderDispatch.isAppMounted = true;
8151
7869
  };
8152
- var injectIntoDevTools = function (_config) { return __awaiter(void 0, void 0, void 0, function () {
8153
- return __generator(this, function (_a) {
8154
- switch (_a.label) {
8155
- case 0:
8156
- rendererPackageName = _config.rendererPackageName || rendererPackageName;
8157
- ReconcilerSet.forEach(function (renderDispatch) { return (renderDispatch.renderPackage = rendererPackageName); });
8158
- if (globalThis["__MY_REACT_DEVTOOL_INTERNAL__"])
8159
- return [2 /*return*/];
8160
- // load core runtime
8161
- // await loadScript("https://mrwangjusttodo.github.io/myreact-devtools/bundle/hook.js");
8162
- return [4 /*yield*/, loadRemoteModule("https://mrwangjusttodo.github.io/myreact-devtools/bundle/hook.js", { context: { globalThis: globalThis } })];
8163
- case 1:
8164
- // load core runtime
8165
- // await loadScript("https://mrwangjusttodo.github.io/myreact-devtools/bundle/hook.js");
8166
- _a.sent();
8167
- return [2 /*return*/];
8168
- }
8169
- });
8170
- }); };
8171
- var injectIntoDevToolsWithSocketIO = function (url, _config) { return __awaiter(void 0, void 0, void 0, function () {
7870
+ var injectIntoDevTools = function (_config) {
7871
+ rendererPackageName = _config.rendererPackageName || rendererPackageName;
7872
+ ReconcilerSet.forEach(function (renderDispatch) { return (renderDispatch.renderPackage = rendererPackageName); });
7873
+ if (globalThis["__MY_REACT_DEVTOOL_INTERNAL__"])
7874
+ return;
7875
+ };
7876
+ var injectIntoDevToolsAuto = function (url, _config) { return __awaiter(void 0, void 0, void 0, function () {
8172
7877
  var init;
8173
7878
  return __generator(this, function (_b) {
8174
7879
  switch (_b.label) {
8175
- case 0:
8176
- // load core runtime
8177
- return [4 /*yield*/, injectIntoDevTools(_config || {})];
7880
+ case 0:
7881
+ // set core runtime
7882
+ // you should load core runtime by your self, see packages/myreact-reconciler-compact/src/preload.ts
7883
+ injectIntoDevTools(_config || {});
7884
+ init = globalThis["__MY_REACT_DEVTOOL_NODE__"] || globalThis["__MY_REACT_DEVTOOL_BUNDLE__"] || globalThis["__MY_REACT_DEVTOOL_BUNDLE_WS__"];
7885
+ _b.label = 1;
8178
7886
  case 1:
8179
- // load core runtime
8180
- _b.sent();
8181
- init = globalThis["__MY_REACT_DEVTOOL_NODE__"];
8182
- _b.label = 2;
8183
- case 2:
8184
- _b.trys.push([2, 4, , 5]);
7887
+ _b.trys.push([1, 3, , 4]);
8185
7888
  return [4 /*yield*/, init(url)];
8186
- case 3:
7889
+ case 2:
8187
7890
  _b.sent();
8188
- return [3 /*break*/, 5];
8189
- case 4:
7891
+ return [3 /*break*/, 4];
7892
+ case 3:
8190
7893
  _b.sent();
8191
- return [3 /*break*/, 5];
8192
- case 5: return [2 /*return*/];
7894
+ return [3 /*break*/, 4];
7895
+ case 4: return [2 /*return*/];
8193
7896
  }
8194
7897
  });
8195
7898
  }); };
@@ -8202,15 +7905,14 @@ var Reconciler = function (_config) {
8202
7905
  updateContainer: updateContainer,
8203
7906
  injectIntoDevTools: injectIntoDevTools,
8204
7907
  getPublicRootInstance: getPublicRootInstance,
8205
- injectIntoDevToolsWithSocketIO: injectIntoDevToolsWithSocketIO,
7908
+ injectIntoDevToolsAuto: injectIntoDevToolsAuto,
8206
7909
  flushSync: myreactReconcilerExports.safeCallWithSync,
8207
7910
  flushSyncWork: myreactReconcilerExports.safeCallWithSync,
8208
7911
  batchedUpdates: myreactReconcilerExports.safeCallWithSync,
8209
7912
  };
8210
7913
  };
8211
7914
 
8212
- /* eslint-disable import/export */
8213
- var version = "0.0.13";
7915
+ var version = "0.0.15";
8214
7916
  var createReconciler = Reconciler;
8215
7917
 
8216
7918
  exports.createReconciler = createReconciler;