mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
feat(es/minifier): Drop variable from the sequential inliner (#5896)
**Description:** We now drop variable declarations if we are going to eliminate the only usage. **Related issue:** - Closes https://github.com/swc-project/swc/issues/5693.
This commit is contained in:
parent
89f0a4c5ac
commit
4e656af1ec
@ -1 +1,2 @@
|
||||
//// [bug24252.js]
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
|
@ -1,5 +1,4 @@
|
||||
//// [classExpression4.ts]
|
||||
var C;
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
(new (function() {
|
||||
"use strict";
|
||||
|
@ -1,28 +1 @@
|
||||
//// [genericCallWithGenericSignatureArguments.ts]
|
||||
var a, b;
|
||||
function foo(a, b) {}
|
||||
foo(function(x) {
|
||||
return 1;
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), foo(function(x) {
|
||||
return null;
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), foo(function(x) {
|
||||
return 1;
|
||||
}, function(x) {
|
||||
return null;
|
||||
}), foo(function(x) {
|
||||
return 1;
|
||||
}, function(x) {
|
||||
return 1;
|
||||
}), foo(function(x) {
|
||||
return a;
|
||||
}, function(x) {
|
||||
return b;
|
||||
}), foo(function(x) {
|
||||
return b;
|
||||
}, function(x) {
|
||||
return a;
|
||||
});
|
||||
|
@ -1,61 +1,7 @@
|
||||
//// [genericCallWithGenericSignatureArguments3.ts]
|
||||
var E, F, x;
|
||||
function foo(x, a, b) {}
|
||||
function foo2(x, a, b) {}
|
||||
foo("", function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return null;
|
||||
}), foo("", function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return null;
|
||||
}), foo("", function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), foo(null, function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), foo(null, function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), foo({}, function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), function(E) {
|
||||
var E, F;
|
||||
!function(E) {
|
||||
E[E.A = 0] = "A";
|
||||
}(E || (E = {})), function(F) {
|
||||
F[F.A = 0] = "A";
|
||||
}(F || (F = {})), foo(E.A, function(x) {
|
||||
return E.A;
|
||||
}, function(x) {
|
||||
return F.A;
|
||||
}), foo2("", function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return null;
|
||||
}), foo2(null, function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), foo2(null, function(x) {
|
||||
return "";
|
||||
}, function(x) {
|
||||
return "";
|
||||
}), foo2(x, function(a1) {
|
||||
return function(n) {
|
||||
return 1;
|
||||
};
|
||||
}, function(a2) {
|
||||
return 2;
|
||||
}), foo2(x, function(a1) {
|
||||
return function(n) {
|
||||
return 1;
|
||||
};
|
||||
}, function(a2) {
|
||||
return 2;
|
||||
});
|
||||
}(F || (F = {})), E.A;
|
||||
|
@ -1,4 +1 @@
|
||||
//// [genericCallWithNonSymmetricSubtypes.ts]
|
||||
var a, b, x, y, s1, s2;
|
||||
function foo(x, y) {}
|
||||
foo(a, b), foo(b, a), foo(a, x), foo(x, a), foo(a, y), foo(y, a), foo(x, y), foo(y, x), foo(s1, s2), foo(s2, s1);
|
||||
|
@ -4,6 +4,4 @@ var X = function X() {
|
||||
"use strict";
|
||||
_class_call_check(this, X);
|
||||
};
|
||||
function foo(t, t2) {}
|
||||
var c1 = new X(), d1 = new X();
|
||||
foo(c1, d1), foo(c1, c1);
|
||||
new X(), new X();
|
||||
|
@ -4,7 +4,4 @@ var X = function X() {
|
||||
"use strict";
|
||||
_class_call_check(this, X);
|
||||
};
|
||||
function foo(t, t2) {}
|
||||
var c1 = new X(), d1 = new X();
|
||||
function foo2(t, t2) {}
|
||||
foo(c1, d1), foo(c1, c1), foo2(c1, d1), foo2(c1, c1);
|
||||
new X(), new X();
|
||||
|
@ -25,9 +25,9 @@ import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
}
|
||||
if (null != indentationInfo) {
|
||||
var edit = this.GetIndentEdit(indentationInfo, token.Span.startPosition(), sameLineIndent);
|
||||
null != edit && (this.RegisterIndentation(edit, sameLineIndent), result.add(edit), token.Token == AuthorTokenKind.atkComment) && this.GetCommentIndentationEdits(token).foreach(function(item) {
|
||||
null != edit && (this.RegisterIndentation(edit, sameLineIndent), result.add(edit), token.Token == AuthorTokenKind.atkComment && this.GetCommentIndentationEdits(token).foreach(function(item) {
|
||||
result.add(item);
|
||||
});
|
||||
}));
|
||||
}
|
||||
return result;
|
||||
}, _proto.GetCommentIndentationEdits = function(token) {
|
||||
|
@ -2,3 +2,4 @@
|
||||
var x;
|
||||
Outer.Inner.Message = function() {}, new Outer.Inner().name, x.name;
|
||||
//// [def.js]
|
||||
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
|
||||
|
@ -1890,7 +1890,19 @@ where
|
||||
);
|
||||
|
||||
let to = match a {
|
||||
Mergable::Var(a) => a.init.take().unwrap_or_else(|| undefined(DUMMY_SP)),
|
||||
Mergable::Var(a) => {
|
||||
if self.options.unused {
|
||||
if let Some(usage) = self.data.vars.get(&left_id.to_id()) {
|
||||
// We are eliminating one usage, so we use 1 instead of 0
|
||||
if usage.usage_count == 1 {
|
||||
report_change!("sequences: Dropping inlined variable");
|
||||
a.name.take();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a.init.take().unwrap_or_else(|| undefined(DUMMY_SP))
|
||||
}
|
||||
Mergable::Expr(a) => Box::new(a.take()),
|
||||
};
|
||||
|
||||
|
@ -9,7 +9,6 @@ createCommonjsModule(function(module, exports) {
|
||||
}), createCommonjsModule(function(module) {
|
||||
module.exports = {
|
||||
findConfig: function(from) {
|
||||
var resolved;
|
||||
return function(dir) {
|
||||
throw Error("");
|
||||
};
|
||||
|
@ -0,0 +1,160 @@
|
||||
TestSnapshot {
|
||||
vars: [
|
||||
(
|
||||
(
|
||||
Atom('API' type=inline),
|
||||
#1,
|
||||
),
|
||||
VarUsageInfo {
|
||||
inline_prevented: false,
|
||||
ref_count: 1,
|
||||
cond_init: false,
|
||||
declared: false,
|
||||
declared_count: 0,
|
||||
declared_as_fn_param: false,
|
||||
declared_as_fn_expr: false,
|
||||
assign_count: 0,
|
||||
mutation_by_call_count: 0,
|
||||
usage_count: 1,
|
||||
reassigned_with_assignment: false,
|
||||
reassigned_with_var_decl: false,
|
||||
mutated: true,
|
||||
has_property_access: true,
|
||||
has_property_mutation: true,
|
||||
accessed_props: {},
|
||||
exported: false,
|
||||
used_above_decl: true,
|
||||
is_fn_local: true,
|
||||
used_by_nested_fn: false,
|
||||
executed_multiple_time: false,
|
||||
used_in_cond: false,
|
||||
var_kind: None,
|
||||
var_initialized: false,
|
||||
declared_as_catch_param: false,
|
||||
no_side_effect_for_member_access: false,
|
||||
used_as_callee: false,
|
||||
used_as_arg: false,
|
||||
pure_fn: false,
|
||||
infects: [],
|
||||
},
|
||||
),
|
||||
(
|
||||
(
|
||||
Atom('base' type=static),
|
||||
#2,
|
||||
),
|
||||
VarUsageInfo {
|
||||
inline_prevented: false,
|
||||
ref_count: 1,
|
||||
cond_init: false,
|
||||
declared: true,
|
||||
declared_count: 1,
|
||||
declared_as_fn_param: false,
|
||||
declared_as_fn_expr: false,
|
||||
assign_count: 0,
|
||||
mutation_by_call_count: 0,
|
||||
usage_count: 1,
|
||||
reassigned_with_assignment: false,
|
||||
reassigned_with_var_decl: false,
|
||||
mutated: false,
|
||||
has_property_access: false,
|
||||
has_property_mutation: false,
|
||||
accessed_props: {},
|
||||
exported: false,
|
||||
used_above_decl: false,
|
||||
is_fn_local: true,
|
||||
used_by_nested_fn: true,
|
||||
executed_multiple_time: false,
|
||||
used_in_cond: false,
|
||||
var_kind: Some(
|
||||
"var",
|
||||
),
|
||||
var_initialized: true,
|
||||
declared_as_catch_param: false,
|
||||
no_side_effect_for_member_access: false,
|
||||
used_as_callee: false,
|
||||
used_as_arg: false,
|
||||
pure_fn: false,
|
||||
infects: [],
|
||||
},
|
||||
),
|
||||
(
|
||||
(
|
||||
Atom('dsn' type=inline),
|
||||
#2,
|
||||
),
|
||||
VarUsageInfo {
|
||||
inline_prevented: false,
|
||||
ref_count: 1,
|
||||
cond_init: false,
|
||||
declared: true,
|
||||
declared_count: 1,
|
||||
declared_as_fn_param: false,
|
||||
declared_as_fn_expr: false,
|
||||
assign_count: 0,
|
||||
mutation_by_call_count: 0,
|
||||
usage_count: 1,
|
||||
reassigned_with_assignment: false,
|
||||
reassigned_with_var_decl: false,
|
||||
mutated: false,
|
||||
has_property_access: true,
|
||||
has_property_mutation: false,
|
||||
accessed_props: {},
|
||||
exported: false,
|
||||
used_above_decl: false,
|
||||
is_fn_local: true,
|
||||
used_by_nested_fn: true,
|
||||
executed_multiple_time: false,
|
||||
used_in_cond: false,
|
||||
var_kind: Some(
|
||||
"var",
|
||||
),
|
||||
var_initialized: true,
|
||||
declared_as_catch_param: false,
|
||||
no_side_effect_for_member_access: false,
|
||||
used_as_callee: false,
|
||||
used_as_arg: false,
|
||||
pure_fn: false,
|
||||
infects: [],
|
||||
},
|
||||
),
|
||||
(
|
||||
(
|
||||
Atom('target' type=static),
|
||||
#2,
|
||||
),
|
||||
VarUsageInfo {
|
||||
inline_prevented: false,
|
||||
ref_count: 1,
|
||||
cond_init: false,
|
||||
declared: true,
|
||||
declared_count: 1,
|
||||
declared_as_fn_param: true,
|
||||
declared_as_fn_expr: false,
|
||||
assign_count: 0,
|
||||
mutation_by_call_count: 0,
|
||||
usage_count: 1,
|
||||
reassigned_with_assignment: false,
|
||||
reassigned_with_var_decl: false,
|
||||
mutated: false,
|
||||
has_property_access: false,
|
||||
has_property_mutation: false,
|
||||
accessed_props: {},
|
||||
exported: false,
|
||||
used_above_decl: false,
|
||||
is_fn_local: true,
|
||||
used_by_nested_fn: true,
|
||||
executed_multiple_time: false,
|
||||
used_in_cond: false,
|
||||
var_kind: None,
|
||||
var_initialized: false,
|
||||
declared_as_catch_param: false,
|
||||
no_side_effect_for_member_access: false,
|
||||
used_as_callee: false,
|
||||
used_as_arg: false,
|
||||
pure_fn: false,
|
||||
infects: [],
|
||||
},
|
||||
),
|
||||
],
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"defaults": true,
|
||||
"toplevel": true,
|
||||
"passes": 2
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
API.prototype._getIngestEndpoint = function (target) {
|
||||
var base = this.getBaseApiEndpoint();
|
||||
var dsn = this._dsnObject;
|
||||
return "" + base + dsn.projectId + "/" + target + "/";
|
||||
};
|
@ -0,0 +1,3 @@
|
||||
API.prototype._getIngestEndpoint = function(target) {
|
||||
return "" + this.getBaseApiEndpoint() + this._dsnObject.projectId + "/" + target + "/";
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
API.prototype._getIngestEndpoint = function(t) {
|
||||
var n = this.getBaseApiEndpoint();
|
||||
var e = this._dsnObject;
|
||||
return "" + n + e.projectId + "/" + t + "/";
|
||||
};
|
@ -749,7 +749,7 @@
|
||||
} else config._isValid = !1;
|
||||
}
|
||||
function configFromRFC2822(config) {
|
||||
var weekdayStr, parsedInput, config1, year, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr, result, parsedArray, match = rfc2822.exec((0, config._i).replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""));
|
||||
var year, weekdayStr, parsedInput, config1, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr, result, parsedArray, match = rfc2822.exec((0, config._i).replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""));
|
||||
if (match) {
|
||||
if (yearStr = match[4], monthStr = match[3], dayStr = match[2], hourStr = match[5], minuteStr = match[6], secondStr = match[7], result = [
|
||||
(year = parseInt(yearStr, 10)) <= 49 ? 2000 + year : year <= 999 ? 1900 + year : year,
|
||||
|
@ -5854,7 +5854,7 @@
|
||||
var endInfo = this._findEnd();
|
||||
if (!endInfo) return null;
|
||||
var counters = this._fillCounters(startInfo.end, endInfo.start, !1);
|
||||
return this._verifyCounterLength(counters) ? !this._decodePayload(counters, result, decodedCodes) || result.length % 2 != 0 || result.length < 6 ? null : (decodedCodes.push(endInfo), {
|
||||
return this._verifyCounterLength(counters) && this._decodePayload(counters, result, decodedCodes) && result.length % 2 == 0 && !(result.length < 6) ? (decodedCodes.push(endInfo), {
|
||||
code: result.join(""),
|
||||
start: startInfo.start,
|
||||
end: endInfo.end,
|
||||
|
@ -6630,7 +6630,7 @@
|
||||
var playlist = master.playlists[i], CODECS = playlist.attributes && playlist.attributes.CODECS;
|
||||
return CODECS && CODECS.split(",").every(function(c) {
|
||||
return (0, _videojs_vhs_utils_es_codecs_js__WEBPACK_IMPORTED_MODULE_8__.KL)(c);
|
||||
}) ? "continue" : someAudioVariant(master, function(variant) {
|
||||
}) || someAudioVariant(master, function(variant) {
|
||||
return playlistMatch(playlist, variant);
|
||||
}) ? "continue" : {
|
||||
v: !1
|
||||
|
@ -463,12 +463,12 @@
|
||||
}) : [
|
||||
ebml_helpers_normalizePath(paths1)
|
||||
], bytes = (0, byte_helpers.Ki)(bytes);
|
||||
var results = [];
|
||||
var paths1, results = [];
|
||||
if (!paths.length) return results;
|
||||
for(var i = 0; i < bytes.length;){
|
||||
var id = getvint(bytes, i, !1), dataHeader = getvint(bytes, i + id.length), dataStart = i + id.length + dataHeader.length;
|
||||
0x7f === dataHeader.value && (dataHeader.value = getInfinityDataSize(id, bytes, dataStart), dataHeader.value !== bytes.length && (dataHeader.value -= dataStart));
|
||||
var paths1, dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value, data = bytes.subarray(dataStart, dataEnd);
|
||||
var dataEnd = dataStart + dataHeader.value > bytes.length ? bytes.length : dataStart + dataHeader.value, data = bytes.subarray(dataStart, dataEnd);
|
||||
(0, byte_helpers.G3)(paths[0], id.bytes) && (1 === paths.length ? results.push(data) : results = results.concat(findEbml(data, paths.slice(1)))), i += id.length + dataHeader.length + data.length;
|
||||
}
|
||||
return results;
|
||||
|
@ -752,7 +752,7 @@
|
||||
}
|
||||
if (last) for(var i$1 = 0; i$1 < last.length; ++i$1){
|
||||
var span$1 = last[i$1];
|
||||
(null != span$1.to && (span$1.to += offset), null == span$1.from) ? !getMarkedSpanFor(first, span$1.marker) && (span$1.from = offset, sameLine && (first || (first = [])).push(span$1)) : (span$1.from += offset, sameLine && (first || (first = [])).push(span$1));
|
||||
null != span$1.to && (span$1.to += offset), null == span$1.from ? !getMarkedSpanFor(first, span$1.marker) && (span$1.from = offset, sameLine && (first || (first = [])).push(span$1)) : (span$1.from += offset, sameLine && (first || (first = [])).push(span$1));
|
||||
}
|
||||
first && (first = clearEmptySpans(first)), last && last != first && (last = clearEmptySpans(last));
|
||||
var newMarkers = [
|
||||
|
@ -1091,7 +1091,7 @@
|
||||
var prevScroll = this.$lastScroll, t = ev.domEvent.timeStamp, dt = t - prevScroll.t, vx = dt ? ev.wheelX / dt : prevScroll.vx, vy = dt ? ev.wheelY / dt : prevScroll.vy;
|
||||
dt < 550 && (vx = (vx + prevScroll.vx) / 2, vy = (vy + prevScroll.vy) / 2);
|
||||
var direction = Math.abs(vx / vy), canScroll = !1;
|
||||
if ((direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0) && (canScroll = !0), direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed) && (canScroll = !0), canScroll) ? prevScroll.allowed = t : t - prevScroll.allowed < 550 && (Math.abs(vx) <= 1.5 * Math.abs(prevScroll.vx) && Math.abs(vy) <= 1.5 * Math.abs(prevScroll.vy) ? (canScroll = !0, prevScroll.allowed = t) : prevScroll.allowed = 0), prevScroll.t = t, prevScroll.vx = vx, prevScroll.vy = vy, canScroll) return editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed), ev.stop();
|
||||
if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0) && (canScroll = !0), direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed) && (canScroll = !0), canScroll ? prevScroll.allowed = t : t - prevScroll.allowed < 550 && (Math.abs(vx) <= 1.5 * Math.abs(prevScroll.vx) && Math.abs(vy) <= 1.5 * Math.abs(prevScroll.vy) ? (canScroll = !0, prevScroll.allowed = t) : prevScroll.allowed = 0), prevScroll.t = t, prevScroll.vx = vx, prevScroll.vy = vy, canScroll) return editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed), ev.stop();
|
||||
}
|
||||
};
|
||||
}).call(DefaultHandlers.prototype), exports.DefaultHandlers = DefaultHandlers;
|
||||
@ -1258,11 +1258,11 @@
|
||||
}, this), editor.on("mousedown", this.onMouseDown.bind(mouseHandler));
|
||||
var dragSelectionMarker, x, y, timerId, range, dragCursor, mouseTarget = editor.container, counter = 0;
|
||||
function onDragInterval() {
|
||||
var cursor, now, lineHeight, characterWidth, editorRect, offsets, nearestXOffset, nearestYOffset, scrollCursor, vScroll, hScroll, vMovement, cursor1, now1, vMovement1, hMovement, prevCursor = dragCursor;
|
||||
cursor1 = dragCursor = editor.renderer.screenToTextCoordinates(x, y), now1 = Date.now(), vMovement1 = !prevCursor || cursor1.row != prevCursor.row, hMovement = !prevCursor || cursor1.column != prevCursor.column, !cursorMovedTime || vMovement1 || hMovement ? (editor.moveCursorToPosition(cursor1), cursorMovedTime = now1, cursorPointOnCaretMoved = {
|
||||
var cursor, now, vMovement, hMovement, cursor1, now1, lineHeight, characterWidth, editorRect, offsets, nearestXOffset, nearestYOffset, scrollCursor, vScroll, hScroll, vMovement1, prevCursor = dragCursor;
|
||||
cursor = dragCursor = editor.renderer.screenToTextCoordinates(x, y), now = Date.now(), vMovement = !prevCursor || cursor.row != prevCursor.row, hMovement = !prevCursor || cursor.column != prevCursor.column, !cursorMovedTime || vMovement || hMovement ? (editor.moveCursorToPosition(cursor), cursorMovedTime = now, cursorPointOnCaretMoved = {
|
||||
x: x,
|
||||
y: y
|
||||
}) : calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y) > 5 ? cursorMovedTime = null : now1 - cursorMovedTime >= 200 && (editor.renderer.scrollCursorIntoView(), cursorMovedTime = null), cursor = dragCursor, now = Date.now(), lineHeight = editor.renderer.layerConfig.lineHeight, characterWidth = editor.renderer.layerConfig.characterWidth, nearestXOffset = Math.min((offsets = {
|
||||
}) : calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y) > 5 ? cursorMovedTime = null : now - cursorMovedTime >= 200 && (editor.renderer.scrollCursorIntoView(), cursorMovedTime = null), cursor1 = dragCursor, now1 = Date.now(), lineHeight = editor.renderer.layerConfig.lineHeight, characterWidth = editor.renderer.layerConfig.characterWidth, nearestXOffset = Math.min((offsets = {
|
||||
x: {
|
||||
left: x - (editorRect = editor.renderer.scroller.getBoundingClientRect()).left,
|
||||
right: editorRect.right - x
|
||||
@ -1272,9 +1272,9 @@
|
||||
bottom: editorRect.bottom - y
|
||||
}
|
||||
}).x.left, offsets.x.right), nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom), scrollCursor = {
|
||||
row: cursor.row,
|
||||
column: cursor.column
|
||||
}, nearestXOffset / characterWidth <= 2 && (scrollCursor.column += offsets.x.left < offsets.x.right ? -3 : 2), nearestYOffset / lineHeight <= 1 && (scrollCursor.row += offsets.y.top < offsets.y.bottom ? -1 : 1), vScroll = cursor.row != scrollCursor.row, hScroll = cursor.column != scrollCursor.column, vMovement = !prevCursor || cursor.row != prevCursor.row, vScroll || hScroll && !vMovement ? autoScrollStartTime ? now - autoScrollStartTime >= 200 && editor.renderer.scrollCursorIntoView(scrollCursor) : autoScrollStartTime = now : autoScrollStartTime = null;
|
||||
row: cursor1.row,
|
||||
column: cursor1.column
|
||||
}, nearestXOffset / characterWidth <= 2 && (scrollCursor.column += offsets.x.left < offsets.x.right ? -3 : 2), nearestYOffset / lineHeight <= 1 && (scrollCursor.row += offsets.y.top < offsets.y.bottom ? -1 : 1), vScroll = cursor1.row != scrollCursor.row, hScroll = cursor1.column != scrollCursor.column, vMovement1 = !prevCursor || cursor1.row != prevCursor.row, vScroll || hScroll && !vMovement1 ? autoScrollStartTime ? now1 - autoScrollStartTime >= 200 && editor.renderer.scrollCursorIntoView(scrollCursor) : autoScrollStartTime = now1 : autoScrollStartTime = null;
|
||||
}
|
||||
function addDragMarker() {
|
||||
range = editor.selection.toOrientedRange(), dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()), editor.clearSelection(), editor.isFocused() && editor.renderer.$cursorLayer.setBlinking(!1), clearInterval(timerId), onDragInterval(), timerId = setInterval(onDragInterval, 20), counter = 0, event.addListener(document, "mousemove", onMouseMove);
|
||||
@ -1395,7 +1395,7 @@
|
||||
if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) return;
|
||||
this.mousedownEvent.time = Date.now();
|
||||
var eventTarget = e.domEvent.target || e.domEvent.srcElement;
|
||||
("unselectable" in eventTarget && (eventTarget.unselectable = "on"), editor.getDragDelay()) ? (useragent.isWebKit && (this.cancelDrag = !0, editor.container.draggable = !0), this.setState("dragWait")) : this.startDrag(), this.captureMouse(e, this.onMouseDrag.bind(this)), e.defaultPrevented = !0;
|
||||
"unselectable" in eventTarget && (eventTarget.unselectable = "on"), editor.getDragDelay() ? (useragent.isWebKit && (this.cancelDrag = !0, editor.container.draggable = !0), this.setState("dragWait")) : this.startDrag(), this.captureMouse(e, this.onMouseDrag.bind(this)), e.defaultPrevented = !0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -21093,12 +21093,12 @@
|
||||
375: function(e, t, i) {
|
||||
"use strict";
|
||||
e.exports = A, A.ReadableState = S, i(361).EventEmitter;
|
||||
var o = function(e, t) {
|
||||
var o, a, u, l, s, c = function(e, t) {
|
||||
return e.listeners(t).length;
|
||||
}, a = i(919), u = i(300).Buffer, l = r.g.Uint8Array || function() {}, s = i(837);
|
||||
f = s && s.debuglog ? s.debuglog("stream") : function() {};
|
||||
var c, f, d, p, h, y = i(914), g = i(364), v = i(322).getHighWaterMark, b = i(833).q, m = b.ERR_INVALID_ARG_TYPE, D = b.ERR_STREAM_PUSH_AFTER_EOF, w = b.ERR_METHOD_NOT_IMPLEMENTED, E = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
||||
i(526)(A, a);
|
||||
}, f = i(919), d = i(300).Buffer, p = r.g.Uint8Array || function() {}, h = i(837);
|
||||
a = h && h.debuglog ? h.debuglog("stream") : function() {};
|
||||
var y = i(914), g = i(364), v = i(322).getHighWaterMark, b = i(833).q, m = b.ERR_INVALID_ARG_TYPE, D = b.ERR_STREAM_PUSH_AFTER_EOF, w = b.ERR_METHOD_NOT_IMPLEMENTED, E = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
||||
i(526)(A, f);
|
||||
var _ = g.errorOrDestroy, x = [
|
||||
"error",
|
||||
"close",
|
||||
@ -21107,39 +21107,39 @@
|
||||
"resume"
|
||||
];
|
||||
function S(e, t, r) {
|
||||
c = c || i(239), e = e || {}, "boolean" != typeof r && (r = t instanceof c), this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.readableObjectMode), this.highWaterMark = v(this, e, "readableHighWaterMark", r), this.buffer = new y(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (d || (d = i(313).s), this.decoder = new d(e.encoding), this.encoding = e.encoding);
|
||||
o = o || i(239), e = e || {}, "boolean" != typeof r && (r = t instanceof o), this.objectMode = !!e.objectMode, r && (this.objectMode = this.objectMode || !!e.readableObjectMode), this.highWaterMark = v(this, e, "readableHighWaterMark", r), this.buffer = new y(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = !1 !== e.emitClose, this.autoDestroy = !!e.autoDestroy, this.destroyed = !1, this.defaultEncoding = e.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, e.encoding && (u || (u = i(313).s), this.decoder = new u(e.encoding), this.encoding = e.encoding);
|
||||
}
|
||||
function A(e) {
|
||||
if (c = c || i(239), !(this instanceof A)) return new A(e);
|
||||
var t = this instanceof c;
|
||||
this._readableState = new S(e, this, t), this.readable = !0, e && ("function" == typeof e.read && (this._read = e.read), "function" == typeof e.destroy && (this._destroy = e.destroy)), a.call(this);
|
||||
if (o = o || i(239), !(this instanceof A)) return new A(e);
|
||||
var t = this instanceof o;
|
||||
this._readableState = new S(e, this, t), this.readable = !0, e && ("function" == typeof e.read && (this._read = e.read), "function" == typeof e.destroy && (this._destroy = e.destroy)), f.call(this);
|
||||
}
|
||||
function k(e, t, r, n, i) {
|
||||
f("readableAddChunk", t);
|
||||
var o, a, s, c, d = e._readableState;
|
||||
if (null === t) d.reading = !1, function(e, t) {
|
||||
if (f("onEofChunk"), !t.ended) {
|
||||
a("readableAddChunk", t);
|
||||
var o, u, l, s, c = e._readableState;
|
||||
if (null === t) c.reading = !1, function(e, t) {
|
||||
if (a("onEofChunk"), !t.ended) {
|
||||
if (t.decoder) {
|
||||
var r = t.decoder.end();
|
||||
r && r.length && (t.buffer.push(r), t.length += t.objectMode ? 1 : r.length);
|
||||
}
|
||||
t.ended = !0, t.sync ? C(e) : (t.needReadable = !1, t.emittedReadable || (t.emittedReadable = !0, P(e)));
|
||||
}
|
||||
}(e, d);
|
||||
else if (i || (o = t, u.isBuffer(o) || o instanceof l || "string" == typeof o || void 0 === o || d.objectMode || (a = new m("chunk", [
|
||||
}(e, c);
|
||||
else if (i || (o = t, d.isBuffer(o) || o instanceof p || "string" == typeof o || void 0 === o || c.objectMode || (u = new m("chunk", [
|
||||
"string",
|
||||
"Buffer",
|
||||
"Uint8Array"
|
||||
], o)), c = a), c) _(e, c);
|
||||
else if (d.objectMode || t && t.length > 0) {
|
||||
if ("string" == typeof t || d.objectMode || Object.getPrototypeOf(t) === u.prototype || (s = t, t = u.from(s)), n) d.endEmitted ? _(e, new E()) : T(e, d, t, !0);
|
||||
else if (d.ended) _(e, new D());
|
||||
], o)), s = u), s) _(e, s);
|
||||
else if (c.objectMode || t && t.length > 0) {
|
||||
if ("string" == typeof t || c.objectMode || Object.getPrototypeOf(t) === d.prototype || (l = t, t = d.from(l)), n) c.endEmitted ? _(e, new E()) : T(e, c, t, !0);
|
||||
else if (c.ended) _(e, new D());
|
||||
else {
|
||||
if (d.destroyed) return !1;
|
||||
d.reading = !1, d.decoder && !r ? (t = d.decoder.write(t), d.objectMode || 0 !== t.length ? T(e, d, t, !1) : F(e, d)) : T(e, d, t, !1);
|
||||
if (c.destroyed) return !1;
|
||||
c.reading = !1, c.decoder && !r ? (t = c.decoder.write(t), c.objectMode || 0 !== t.length ? T(e, c, t, !1) : F(e, c)) : T(e, c, t, !1);
|
||||
}
|
||||
} else n || (d.reading = !1, F(e, d));
|
||||
return !d.ended && (d.length < d.highWaterMark || 0 === d.length);
|
||||
} else n || (c.reading = !1, F(e, c));
|
||||
return !c.ended && (c.length < c.highWaterMark || 0 === c.length);
|
||||
}
|
||||
function T(e, t, r, n) {
|
||||
t.flowing && 0 === t.length && !t.sync ? (t.awaitDrain = 0, e.emit("data", r)) : (t.length += t.objectMode ? 1 : r.length, n ? t.buffer.unshift(r) : t.buffer.push(r), t.needReadable && C(e)), F(e, t);
|
||||
@ -21156,11 +21156,11 @@
|
||||
}
|
||||
function C(e) {
|
||||
var t = e._readableState;
|
||||
f("emitReadable", t.needReadable, t.emittedReadable), t.needReadable = !1, t.emittedReadable || (f("emitReadable", t.flowing), t.emittedReadable = !0, n.nextTick(P, e));
|
||||
a("emitReadable", t.needReadable, t.emittedReadable), t.needReadable = !1, t.emittedReadable || (a("emitReadable", t.flowing), t.emittedReadable = !0, n.nextTick(P, e));
|
||||
}
|
||||
function P(e) {
|
||||
var t = e._readableState;
|
||||
f("emitReadable_", t.destroyed, t.length, t.ended), !t.destroyed && (t.length || t.ended) && (e.emit("readable"), t.emittedReadable = !1), t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark, M(e);
|
||||
a("emitReadable_", t.destroyed, t.length, t.ended), !t.destroyed && (t.length || t.ended) && (e.emit("readable"), t.emittedReadable = !1), t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark, M(e);
|
||||
}
|
||||
function F(e, t) {
|
||||
t.readingMore || (t.readingMore = !0, n.nextTick(R, e, t));
|
||||
@ -21168,7 +21168,7 @@
|
||||
function R(e, t) {
|
||||
for(; !t.reading && !t.ended && (t.length < t.highWaterMark || t.flowing && 0 === t.length);){
|
||||
var r = t.length;
|
||||
if (f("maybeReadMore read 0"), e.read(0), r === t.length) break;
|
||||
if (a("maybeReadMore read 0"), e.read(0), r === t.length) break;
|
||||
}
|
||||
t.readingMore = !1;
|
||||
}
|
||||
@ -21177,14 +21177,14 @@
|
||||
t.readableListening = e.listenerCount("readable") > 0, t.resumeScheduled && !t.paused ? t.flowing = !0 : e.listenerCount("data") > 0 && e.resume();
|
||||
}
|
||||
function j(e) {
|
||||
f("readable nexttick read 0"), e.read(0);
|
||||
a("readable nexttick read 0"), e.read(0);
|
||||
}
|
||||
function B(e, t) {
|
||||
f("resume", t.reading), t.reading || e.read(0), t.resumeScheduled = !1, e.emit("resume"), M(e), t.flowing && !t.reading && e.read(0);
|
||||
a("resume", t.reading), t.reading || e.read(0), t.resumeScheduled = !1, e.emit("resume"), M(e), t.flowing && !t.reading && e.read(0);
|
||||
}
|
||||
function M(e) {
|
||||
var t = e._readableState;
|
||||
for(f("flow", t.flowing); t.flowing && null !== e.read(););
|
||||
for(a("flow", t.flowing); t.flowing && null !== e.read(););
|
||||
}
|
||||
function N(e, t) {
|
||||
var r;
|
||||
@ -21192,10 +21192,10 @@
|
||||
}
|
||||
function L(e) {
|
||||
var t = e._readableState;
|
||||
f("endReadable", t.endEmitted), t.endEmitted || (t.ended = !0, n.nextTick(U, t, e));
|
||||
a("endReadable", t.endEmitted), t.endEmitted || (t.ended = !0, n.nextTick(U, t, e));
|
||||
}
|
||||
function U(e, t) {
|
||||
if (f("endReadableNT", e.endEmitted, e.length), !e.endEmitted && 0 === e.length && (e.endEmitted = !0, t.readable = !1, t.emit("end"), e.autoDestroy)) {
|
||||
if (a("endReadableNT", e.endEmitted, e.length), !e.endEmitted && 0 === e.length && (e.endEmitted = !0, t.readable = !1, t.emit("end"), e.autoDestroy)) {
|
||||
var r = t._writableState;
|
||||
(!r || r.autoDestroy && r.finished) && t.destroy();
|
||||
}
|
||||
@ -21216,24 +21216,24 @@
|
||||
t(e);
|
||||
}, A.prototype.push = function(e, t) {
|
||||
var r, n = this._readableState;
|
||||
return n.objectMode ? r = !0 : "string" == typeof e && ((t = t || n.defaultEncoding) !== n.encoding && (e = u.from(e, t), t = ""), r = !0), k(this, e, t, !1, r);
|
||||
return n.objectMode ? r = !0 : "string" == typeof e && ((t = t || n.defaultEncoding) !== n.encoding && (e = d.from(e, t), t = ""), r = !0), k(this, e, t, !1, r);
|
||||
}, A.prototype.unshift = function(e) {
|
||||
return k(this, e, null, !0, !1);
|
||||
}, A.prototype.isPaused = function() {
|
||||
return !1 === this._readableState.flowing;
|
||||
}, A.prototype.setEncoding = function(e) {
|
||||
d || (d = i(313).s);
|
||||
var t = new d(e);
|
||||
u || (u = i(313).s);
|
||||
var t = new u(e);
|
||||
this._readableState.decoder = t, this._readableState.encoding = this._readableState.decoder.encoding;
|
||||
for(var r = this._readableState.buffer.head, n = ""; null !== r;)n += t.write(r.data), r = r.next;
|
||||
return this._readableState.buffer.clear(), "" !== n && this._readableState.buffer.push(n), this._readableState.length = n.length, this;
|
||||
}, A.prototype.read = function(e) {
|
||||
f("read", e), e = parseInt(e, 10);
|
||||
a("read", e), e = parseInt(e, 10);
|
||||
var t, r = this._readableState, n = e;
|
||||
if (0 !== e && (r.emittedReadable = !1), 0 === e && r.needReadable && ((0 !== r.highWaterMark ? r.length >= r.highWaterMark : r.length > 0) || r.ended)) return f("read: emitReadable", r.length, r.ended), 0 === r.length && r.ended ? L(this) : C(this), null;
|
||||
if (0 !== e && (r.emittedReadable = !1), 0 === e && r.needReadable && ((0 !== r.highWaterMark ? r.length >= r.highWaterMark : r.length > 0) || r.ended)) return a("read: emitReadable", r.length, r.ended), 0 === r.length && r.ended ? L(this) : C(this), null;
|
||||
if (0 === (e = O(e, r)) && r.ended) return 0 === r.length && L(this), null;
|
||||
var i = r.needReadable;
|
||||
return f("need readable", i), (0 === r.length || r.length - e < r.highWaterMark) && f("length less than watermark", i = !0), r.ended || r.reading ? f("reading or ended", i = !1) : i && (f("do read"), r.reading = !0, r.sync = !0, 0 === r.length && (r.needReadable = !0), this._read(r.highWaterMark), r.sync = !1, r.reading || (e = O(n, r))), null === (t = e > 0 ? N(e, r) : null) ? (r.needReadable = r.length <= r.highWaterMark, e = 0) : (r.length -= e, r.awaitDrain = 0), 0 === r.length && (r.ended || (r.needReadable = !0), n !== e && r.ended && L(this)), null !== t && this.emit("data", t), t;
|
||||
return a("need readable", i), (0 === r.length || r.length - e < r.highWaterMark) && a("length less than watermark", i = !0), r.ended || r.reading ? a("reading or ended", i = !1) : i && (a("do read"), r.reading = !0, r.sync = !0, 0 === r.length && (r.needReadable = !0), this._read(r.highWaterMark), r.sync = !1, r.reading || (e = O(n, r))), null === (t = e > 0 ? N(e, r) : null) ? (r.needReadable = r.length <= r.highWaterMark, e = 0) : (r.length -= e, r.awaitDrain = 0), 0 === r.length && (r.ended || (r.needReadable = !0), n !== e && r.ended && L(this)), null !== t && this.emit("data", t), t;
|
||||
}, A.prototype._read = function(e) {
|
||||
_(this, new w("_read()"));
|
||||
}, A.prototype.pipe = function(e, t) {
|
||||
@ -21251,37 +21251,37 @@
|
||||
default:
|
||||
i.pipes.push(e);
|
||||
}
|
||||
i.pipesCount += 1, f("pipe count=%d opts=%j", i.pipesCount, t);
|
||||
var a = t && !1 === t.end || e === n.stdout || e === n.stderr ? g : l;
|
||||
i.pipesCount += 1, a("pipe count=%d opts=%j", i.pipesCount, t);
|
||||
var o = t && !1 === t.end || e === n.stdout || e === n.stderr ? g : l;
|
||||
function u(t, n) {
|
||||
f("onunpipe"), t === r && n && !1 === n.hasUnpiped && (n.hasUnpiped = !0, f("cleanup"), e.removeListener("close", h), e.removeListener("finish", y), e.removeListener("drain", s), e.removeListener("error", p), e.removeListener("unpipe", u), r.removeListener("end", l), r.removeListener("end", g), r.removeListener("data", d), c = !0, i.awaitDrain && (!e._writableState || e._writableState.needDrain) && s());
|
||||
a("onunpipe"), t === r && n && !1 === n.hasUnpiped && (n.hasUnpiped = !0, a("cleanup"), e.removeListener("close", h), e.removeListener("finish", y), e.removeListener("drain", s), e.removeListener("error", p), e.removeListener("unpipe", u), r.removeListener("end", l), r.removeListener("end", g), r.removeListener("data", d), f = !0, i.awaitDrain && (!e._writableState || e._writableState.needDrain) && s());
|
||||
}
|
||||
function l() {
|
||||
f("onend"), e.end();
|
||||
a("onend"), e.end();
|
||||
}
|
||||
i.endEmitted ? n.nextTick(a) : r.once("end", a), e.on("unpipe", u);
|
||||
i.endEmitted ? n.nextTick(o) : r.once("end", o), e.on("unpipe", u);
|
||||
var s = function() {
|
||||
var e = r._readableState;
|
||||
f("pipeOnDrain", e.awaitDrain), e.awaitDrain && e.awaitDrain--, 0 === e.awaitDrain && o(r, "data") && (e.flowing = !0, M(r));
|
||||
a("pipeOnDrain", e.awaitDrain), e.awaitDrain && e.awaitDrain--, 0 === e.awaitDrain && c(r, "data") && (e.flowing = !0, M(r));
|
||||
};
|
||||
e.on("drain", s);
|
||||
var c = !1;
|
||||
var f = !1;
|
||||
function d(t) {
|
||||
f("ondata");
|
||||
a("ondata");
|
||||
var n = e.write(t);
|
||||
f("dest.write", n), !1 === n && ((1 === i.pipesCount && i.pipes === e || i.pipesCount > 1 && -1 !== z(i.pipes, e)) && !c && (f("false write response, pause", i.awaitDrain), i.awaitDrain++), r.pause());
|
||||
a("dest.write", n), !1 === n && ((1 === i.pipesCount && i.pipes === e || i.pipesCount > 1 && -1 !== z(i.pipes, e)) && !f && (a("false write response, pause", i.awaitDrain), i.awaitDrain++), r.pause());
|
||||
}
|
||||
function p(t) {
|
||||
f("onerror", t), g(), e.removeListener("error", p), 0 === o(e, "error") && _(e, t);
|
||||
a("onerror", t), g(), e.removeListener("error", p), 0 === c(e, "error") && _(e, t);
|
||||
}
|
||||
function h() {
|
||||
e.removeListener("finish", y), g();
|
||||
}
|
||||
function y() {
|
||||
f("onfinish"), e.removeListener("close", h), g();
|
||||
a("onfinish"), e.removeListener("close", h), g();
|
||||
}
|
||||
function g() {
|
||||
f("unpipe"), r.unpipe(e);
|
||||
a("unpipe"), r.unpipe(e);
|
||||
}
|
||||
return r.on("data", d), function(e, t, r) {
|
||||
if ("function" == typeof e.prependListener) return e.prependListener(t, r);
|
||||
@ -21289,7 +21289,7 @@
|
||||
r,
|
||||
e._events[t]
|
||||
] : e.on(t, r);
|
||||
}(e, "error", p), e.once("close", h), e.once("finish", y), e.emit("pipe", r), i.flowing || (f("pipe resume"), r.resume()), e;
|
||||
}(e, "error", p), e.once("close", h), e.once("finish", y), e.emit("pipe", r), i.flowing || (a("pipe resume"), r.resume()), e;
|
||||
}, A.prototype.unpipe = function(e) {
|
||||
var t = this._readableState, r = {
|
||||
hasUnpiped: !1
|
||||
@ -21307,29 +21307,29 @@
|
||||
var a = z(t.pipes, e);
|
||||
return -1 === a || (t.pipes.splice(a, 1), t.pipesCount -= 1, 1 === t.pipesCount && (t.pipes = t.pipes[0]), e.emit("unpipe", this, r)), this;
|
||||
}, A.prototype.on = function(e, t) {
|
||||
var r = a.prototype.on.call(this, e, t), i = this._readableState;
|
||||
return "data" === e ? (i.readableListening = this.listenerCount("readable") > 0, !1 !== i.flowing && this.resume()) : "readable" !== e || i.endEmitted || i.readableListening || (i.readableListening = i.needReadable = !0, i.flowing = !1, i.emittedReadable = !1, f("on readable", i.length, i.reading), i.length ? C(this) : i.reading || n.nextTick(j, this)), r;
|
||||
var r = f.prototype.on.call(this, e, t), i = this._readableState;
|
||||
return "data" === e ? (i.readableListening = this.listenerCount("readable") > 0, !1 !== i.flowing && this.resume()) : "readable" !== e || i.endEmitted || i.readableListening || (i.readableListening = i.needReadable = !0, i.flowing = !1, i.emittedReadable = !1, a("on readable", i.length, i.reading), i.length ? C(this) : i.reading || n.nextTick(j, this)), r;
|
||||
}, A.prototype.addListener = A.prototype.on, A.prototype.removeListener = function(e, t) {
|
||||
var r = a.prototype.removeListener.call(this, e, t);
|
||||
var r = f.prototype.removeListener.call(this, e, t);
|
||||
return "readable" === e && n.nextTick(I, this), r;
|
||||
}, A.prototype.removeAllListeners = function(e) {
|
||||
var t = a.prototype.removeAllListeners.apply(this, arguments);
|
||||
var t = f.prototype.removeAllListeners.apply(this, arguments);
|
||||
return ("readable" === e || void 0 === e) && n.nextTick(I, this), t;
|
||||
}, A.prototype.resume = function() {
|
||||
var e, t = this._readableState;
|
||||
return t.flowing || (f("resume"), t.flowing = !t.readableListening, (e = t).resumeScheduled || (e.resumeScheduled = !0, n.nextTick(B, this, e))), t.paused = !1, this;
|
||||
return t.flowing || (a("resume"), t.flowing = !t.readableListening, (e = t).resumeScheduled || (e.resumeScheduled = !0, n.nextTick(B, this, e))), t.paused = !1, this;
|
||||
}, A.prototype.pause = function() {
|
||||
return f("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (f("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
||||
return a("call pause flowing=%j", this._readableState.flowing), !1 !== this._readableState.flowing && (a("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
|
||||
}, A.prototype.wrap = function(e) {
|
||||
var t = this, r = this._readableState, n = !1;
|
||||
for(var i in e.on("end", function() {
|
||||
if (f("wrapped end"), r.decoder && !r.ended) {
|
||||
if (a("wrapped end"), r.decoder && !r.ended) {
|
||||
var e = r.decoder.end();
|
||||
e && e.length && t.push(e);
|
||||
}
|
||||
t.push(null);
|
||||
}), e.on("data", function(i) {
|
||||
f("wrapped data"), r.decoder && (i = r.decoder.write(i)), (!r.objectMode || null != i) && (r.objectMode || i && i.length) && (t.push(i) || (n = !0, e.pause()));
|
||||
a("wrapped data"), r.decoder && (i = r.decoder.write(i)), (!r.objectMode || null != i) && (r.objectMode || i && i.length) && (t.push(i) || (n = !0, e.pause()));
|
||||
}), e)void 0 === this[i] && "function" == typeof e[i] && (this[i] = function(t) {
|
||||
return function() {
|
||||
return e[t].apply(e, arguments);
|
||||
@ -21337,10 +21337,10 @@
|
||||
}(i));
|
||||
for(var o = 0; o < x.length; o++)e.on(x[o], this.emit.bind(this, x[o]));
|
||||
return this._read = function(t) {
|
||||
f("wrapped _read", t), n && (n = !1, e.resume());
|
||||
a("wrapped _read", t), n && (n = !1, e.resume());
|
||||
}, this;
|
||||
}, "function" == typeof Symbol && (A.prototype[Symbol.asyncIterator] = function() {
|
||||
return void 0 === p && (p = i(771)), p(this);
|
||||
return void 0 === l && (l = i(771)), l(this);
|
||||
}), Object.defineProperty(A.prototype, "readableHighWaterMark", {
|
||||
enumerable: !1,
|
||||
get: function() {
|
||||
@ -21365,7 +21365,7 @@
|
||||
return this._readableState.length;
|
||||
}
|
||||
}), "function" == typeof Symbol && (A.from = function(e, t) {
|
||||
return void 0 === h && (h = i(16)), h(A, e, t);
|
||||
return void 0 === s && (s = i(16)), s(A, e, t);
|
||||
});
|
||||
},
|
||||
786: function(e, t, r) {
|
||||
|
@ -13941,7 +13941,7 @@
|
||||
}
|
||||
return method;
|
||||
}, nodeWrap = function(method, is224) {
|
||||
var nodeMethod, crypto = eval("require('crypto')"), Buffer = eval("require('buffer').Buffer"), algorithm = is224 ? 'sha224' : 'sha256';
|
||||
var crypto = eval("require('crypto')"), Buffer = eval("require('buffer').Buffer"), algorithm = is224 ? 'sha224' : 'sha256';
|
||||
return function(message) {
|
||||
if ('string' == typeof message) return crypto.createHash(algorithm).update(message, 'utf8').digest('hex');
|
||||
if (null == message) throw Error(ERROR);
|
||||
@ -16257,7 +16257,7 @@
|
||||
787: function(e, t, r) {
|
||||
"use strict";
|
||||
e.exports = Readable, Readable.ReadableState = ReadableState, r(361).EventEmitter;
|
||||
var a = function(e, t) {
|
||||
var n, u, w, m, S, a = function(e, t) {
|
||||
return e.listeners(t).length;
|
||||
}, o = r(455), s = r(300).Buffer, f = __webpack_require__.g.Uint8Array || function() {};
|
||||
function _uint8ArrayToBuffer(e) {
|
||||
@ -16268,7 +16268,7 @@
|
||||
}
|
||||
var l = r(837);
|
||||
u = l && l.debuglog ? l.debuglog("stream") : function() {};
|
||||
var n, u, w, m, S, d = r(41), c = r(289), p = r(483).getHighWaterMark, b = r(349).q, g = b.ERR_INVALID_ARG_TYPE, y = b.ERR_STREAM_PUSH_AFTER_EOF, _ = b.ERR_METHOD_NOT_IMPLEMENTED, v = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
||||
var d = r(41), c = r(289), p = r(483).getHighWaterMark, b = r(349).q, g = b.ERR_INVALID_ARG_TYPE, y = b.ERR_STREAM_PUSH_AFTER_EOF, _ = b.ERR_METHOD_NOT_IMPLEMENTED, v = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
|
||||
r(140)(Readable, o);
|
||||
var R = c.errorOrDestroy, E = [
|
||||
"error",
|
||||
|
@ -1341,6 +1341,7 @@ sequences/issue_1685/input.js
|
||||
sequences/issue_2313/input.js
|
||||
sequences/issue_27/input.js
|
||||
sequences/lift_sequences_1/input.js
|
||||
sequences/lift_sequences_2/input.js
|
||||
sequences/lift_sequences_3/input.js
|
||||
sequences/lift_sequences_4/input.js
|
||||
sequences/lift_sequences_5/input.js
|
||||
|
@ -730,7 +730,7 @@
|
||||
makeUrlAbsolute: function(relUrl, absUrl) {
|
||||
if (!path.isRelativeUrl(relUrl)) return relUrl;
|
||||
absUrl === undefined2 && (absUrl = this.documentBase);
|
||||
var pathname, relObj = path.parseUrl(relUrl), absObj = path.parseUrl(absUrl), protocol = relObj.protocol || absObj.protocol, doubleSlash = relObj.protocol ? relObj.doubleSlash : relObj.doubleSlash || absObj.doubleSlash, authority = relObj.authority || absObj.authority, hasPath = "" !== relObj.pathname;
|
||||
var relObj = path.parseUrl(relUrl), absObj = path.parseUrl(absUrl), protocol = relObj.protocol || absObj.protocol, doubleSlash = relObj.protocol ? relObj.doubleSlash : relObj.doubleSlash || absObj.doubleSlash, authority = relObj.authority || absObj.authority, hasPath = "" !== relObj.pathname;
|
||||
return protocol + doubleSlash + authority + path.makePathAbsolute(relObj.pathname || absObj.filename, absObj.pathname) + (relObj.search || !hasPath && absObj.search || "") + relObj.hash;
|
||||
},
|
||||
addSearchParams: function(url, params) {
|
||||
|
@ -1948,7 +1948,7 @@ Elements.prototype = {
|
||||
return inserter(document.id(el, !0), this), this;
|
||||
}, Element.implement(methods);
|
||||
});
|
||||
var types, propertyGetters = {}, propertySetters = {}, properties = {};
|
||||
var propertyGetters = {}, propertySetters = {}, properties = {};
|
||||
Array.forEach([
|
||||
"type",
|
||||
"value",
|
||||
@ -2019,7 +2019,7 @@ Elements.prototype = {
|
||||
"button" != el.type && (propertySetters.type = function(node, value) {
|
||||
node.setAttribute("type", value);
|
||||
}), el = null;
|
||||
var div, input = document.createElement("input");
|
||||
var types, div, input = document.createElement("input");
|
||||
input.value = "t", input.type = "submit", "t" != input.value && (propertySetters.type = function(node, type) {
|
||||
var value = node.value;
|
||||
node.type = type, node.value = value;
|
||||
|
@ -580,7 +580,7 @@
|
||||
if (!validType) {
|
||||
var typeString, source, info = "";
|
||||
(void 0 === type || "object" == typeof type && null !== type && 0 === Object.keys(type).length) && (info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
||||
var sourceInfo = null != props ? (source = props.__source, void 0 !== source ? "\n\nCheck your code at " + source.fileName.replace(/^.*[\\\/]/, "") + ":" + source.lineNumber + "." : "") : "";
|
||||
var sourceInfo = null != props && void 0 !== (source = props.__source) ? "\n\nCheck your code at " + source.fileName.replace(/^.*[\\\/]/, "") + ":" + source.lineNumber + "." : "";
|
||||
sourceInfo ? info += sourceInfo : info += getDeclarationErrorAddendum(), null === type ? typeString = "null" : Array.isArray(type) ? typeString = "array" : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE ? (typeString = "<" + (getComponentName(type.type) || "Unknown") + " />", info = " Did you accidentally export a JSX literal instead of a component?") : typeString = typeof type, error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
||||
}
|
||||
var element = createElement.apply(this, arguments);
|
||||
|
@ -4110,7 +4110,6 @@
|
||||
return didPerformWorkStackCursor.current;
|
||||
}
|
||||
function isContextProvider(type) {
|
||||
var childContextTypes;
|
||||
return null != type.childContextTypes;
|
||||
}
|
||||
function popContext(fiber) {
|
||||
@ -4332,7 +4331,7 @@
|
||||
function prepareToReadContext(workInProgress, renderLanes) {
|
||||
currentlyRenderingFiber = workInProgress, lastContextDependency = null, lastContextWithAllBitsObserved = null;
|
||||
var a, b, dependencies = workInProgress.dependencies;
|
||||
null !== dependencies && null !== dependencies.firstContext && (a = dependencies.lanes, (a & (b = renderLanes)) != 0 && markWorkInProgressReceivedUpdate(), dependencies.firstContext = null);
|
||||
null !== dependencies && null !== dependencies.firstContext && (((a = dependencies.lanes) & renderLanes) != 0 && markWorkInProgressReceivedUpdate(), dependencies.firstContext = null);
|
||||
}
|
||||
function readContext(context, observedBits) {
|
||||
if (isDisallowedContextReadInDEV && error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."), lastContextWithAllBitsObserved === context) ;
|
||||
@ -4623,17 +4622,13 @@
|
||||
instance.updater = classComponentUpdater, workInProgress.stateNode = instance, instance._reactInternals = workInProgress, instance._reactInternalInstance = fakeInternalInstance;
|
||||
}
|
||||
function constructClassInstance(workInProgress, ctor, props) {
|
||||
var contextTypes, isLegacyContextConsumer = !1, unmaskedContext = emptyContextObject, context = emptyContextObject, contextType = ctor.contextType;
|
||||
var isLegacyContextConsumer = !1, unmaskedContext = emptyContextObject, context = emptyContextObject, contextType = ctor.contextType;
|
||||
if ("contextType" in ctor && !(null === contextType || void 0 !== contextType && contextType.$$typeof === REACT_CONTEXT_TYPE && void 0 === contextType._context) && !didWarnAboutInvalidateContextType.has(ctor)) {
|
||||
didWarnAboutInvalidateContextType.add(ctor);
|
||||
var addendum = "";
|
||||
addendum = void 0 === contextType ? " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file." : "object" != typeof contextType ? " However, it is set to a " + typeof contextType + "." : contextType.$$typeof === REACT_PROVIDER_TYPE ? " Did you accidentally pass the Context.Provider instead?" : void 0 !== contextType._context ? " Did you accidentally pass the Context.Consumer instead?" : " However, it is set to an object with keys {" + Object.keys(contextType).join(", ") + "}.", error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", getComponentName(ctor) || "Component", addendum);
|
||||
}
|
||||
if ("object" == typeof contextType && null !== contextType) context = readContext(contextType);
|
||||
else {
|
||||
unmaskedContext = getUnmaskedContext(workInProgress, ctor, !0), context = (isLegacyContextConsumer = null != ctor.contextTypes) ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
|
||||
}
|
||||
if (1 & workInProgress.mode) {
|
||||
if ("object" == typeof contextType && null !== contextType ? context = readContext(contextType) : (unmaskedContext = getUnmaskedContext(workInProgress, ctor, !0), context = (isLegacyContextConsumer = null != ctor.contextTypes) ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject), 1 & workInProgress.mode) {
|
||||
disableLogs();
|
||||
try {
|
||||
new ctor(props, context);
|
||||
@ -5096,7 +5091,7 @@
|
||||
function insertNonHydratedInstance(returnFiber, fiber) {
|
||||
switch(fiber.flags = -1025 & fiber.flags | 2, returnFiber.tag){
|
||||
case 3:
|
||||
var text, parentContainer = returnFiber.stateNode.containerInfo;
|
||||
var parentContainer = returnFiber.stateNode.containerInfo;
|
||||
switch(fiber.tag){
|
||||
case 5:
|
||||
var type = fiber.type;
|
||||
@ -5135,7 +5130,7 @@
|
||||
if (null !== instance) return fiber.stateNode = instance, !0;
|
||||
return !1;
|
||||
case 6:
|
||||
var text, textInstance = "" === fiber.pendingProps || 3 !== nextInstance.nodeType ? null : nextInstance;
|
||||
var textInstance = "" === fiber.pendingProps || 3 !== nextInstance.nodeType ? null : nextInstance;
|
||||
if (null !== textInstance) return fiber.stateNode = textInstance, !0;
|
||||
return !1;
|
||||
default:
|
||||
@ -6851,7 +6846,7 @@
|
||||
case 9:
|
||||
return current7 = current, workInProgress7 = workInProgress, renderLanes6 = renderLanes, void 0 === (context = workInProgress7.type)._context ? context === context.Consumer || hasWarnedAboutUsingContextAsConsumer || (hasWarnedAboutUsingContextAsConsumer = !0, error("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")) : context = context._context, "function" != typeof (render = (newProps = workInProgress7.pendingProps).children) && error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."), prepareToReadContext(workInProgress7, renderLanes6), newValue1 = readContext(context, newProps.unstable_observedBits), ReactCurrentOwner$1.current = workInProgress7, isRendering = !0, newChildren = render(newValue1), isRendering = !1, workInProgress7.flags |= 1, reconcileChildren(current7, workInProgress7, newChildren, renderLanes6), workInProgress7.child;
|
||||
case 14:
|
||||
var current1, workInProgress1, renderLanes1, type1, nextProps, prevProps, nextChildren, current2, workInProgress2, current3, workInProgress3, renderLanes2, nextChildren1, current4, workInProgress4, renderLanes3, nextChildren2, current5, workInProgress5, renderLanes4, nextChildren3, current6, workInProgress6, renderLanes5, stateNode1, nextChildren4, current7, workInProgress7, renderLanes6, newChildren, context, newProps, render, newValue1, _type2 = workInProgress.type, _resolvedProps3 = resolveDefaultProps(_type2, workInProgress.pendingProps);
|
||||
var _type2 = workInProgress.type, _resolvedProps3 = resolveDefaultProps(_type2, workInProgress.pendingProps);
|
||||
if (workInProgress.type !== workInProgress.elementType) {
|
||||
var outerPropTypes = _type2.propTypes;
|
||||
outerPropTypes && checkPropTypes(outerPropTypes, _resolvedProps3, "prop", getComponentName(_type2));
|
||||
@ -6860,7 +6855,7 @@
|
||||
case 15:
|
||||
return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);
|
||||
case 17:
|
||||
var _current, workInProgress8, hasContext, _Component3 = workInProgress.type, _unresolvedProps4 = workInProgress.pendingProps, _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
|
||||
var current1, workInProgress1, renderLanes1, type1, nextProps, prevProps, nextChildren, current2, workInProgress2, current3, workInProgress3, renderLanes2, nextChildren1, current4, workInProgress4, renderLanes3, nextChildren2, current5, workInProgress5, renderLanes4, nextChildren3, current6, workInProgress6, renderLanes5, stateNode1, nextChildren4, current7, workInProgress7, renderLanes6, newChildren, context, newProps, render, newValue1, _current, workInProgress8, hasContext, _Component3 = workInProgress.type, _unresolvedProps4 = workInProgress.pendingProps, _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
|
||||
return _current = current, workInProgress8 = workInProgress, null !== _current && (_current.alternate = null, workInProgress8.alternate = null, workInProgress8.flags |= 2), workInProgress8.tag = 1, isContextProvider(_Component3) ? (hasContext = !0, pushContextProvider(workInProgress8)) : hasContext = !1, prepareToReadContext(workInProgress8, renderLanes), constructClassInstance(workInProgress8, _Component3, _resolvedProps4), mountClassInstance(workInProgress8, _Component3, _resolvedProps4, renderLanes), finishClassComponent(null, workInProgress8, _Component3, !0, hasContext, renderLanes);
|
||||
case 19:
|
||||
return updateSuspenseListComponent(current, workInProgress, renderLanes);
|
||||
@ -6911,7 +6906,7 @@
|
||||
case 3:
|
||||
popHostContainer(workInProgress), popTopLevelContextObject(workInProgress), resetWorkInProgressVersions();
|
||||
var fiberRoot = workInProgress.stateNode;
|
||||
return fiberRoot.pendingContext && (fiberRoot.context = fiberRoot.pendingContext, fiberRoot.pendingContext = null), (null === current || null === current.child) && (popHydrationState(workInProgress) ? markUpdate(workInProgress) : fiberRoot.hydrate || (workInProgress.flags |= 256)), updateHostContainer(workInProgress), null;
|
||||
return fiberRoot.pendingContext && (fiberRoot.context = fiberRoot.pendingContext, fiberRoot.pendingContext = null), null !== current && null !== current.child || (popHydrationState(workInProgress) ? markUpdate(workInProgress) : fiberRoot.hydrate || (workInProgress.flags |= 256)), updateHostContainer(workInProgress), null;
|
||||
case 5:
|
||||
popHostContext(workInProgress);
|
||||
var rootContainerInstance = getRootHostContainer(), type = workInProgress.type;
|
||||
@ -7258,7 +7253,6 @@
|
||||
function unwindInterruptedWork(interruptedWork) {
|
||||
switch(interruptedWork.tag){
|
||||
case 1:
|
||||
var childContextTypes;
|
||||
null != interruptedWork.type.childContextTypes && popContext(interruptedWork);
|
||||
break;
|
||||
case 3:
|
||||
@ -7322,7 +7316,7 @@
|
||||
}, updateHostContainer = function(workInProgress) {}, updateHostComponent$1 = function(current, workInProgress, type, newProps, rootContainerInstance) {
|
||||
var oldProps = current.memoizedProps;
|
||||
if (oldProps !== newProps) {
|
||||
var domElement, type1, oldProps1, newProps1, rootContainerInstance1, hostContext, instance = workInProgress.stateNode, currentHostContext = getHostContext(), updatePayload = (domElement = instance, type1 = type, oldProps1 = oldProps, newProps1 = newProps, rootContainerInstance1 = rootContainerInstance, hostContext = currentHostContext, typeof newProps1.children != typeof oldProps1.children && ("string" == typeof newProps1.children || "number" == typeof newProps1.children) && validateDOMNesting(null, "" + newProps1.children, updatedAncestorInfo(hostContext.ancestorInfo, type1)), function(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
|
||||
var domElement, type1, oldProps1, newProps1, hostContext, instance = workInProgress.stateNode, currentHostContext = getHostContext(), updatePayload = (typeof newProps.children != typeof oldProps.children && ("string" == typeof newProps.children || "number" == typeof newProps.children) && validateDOMNesting(null, "" + newProps.children, updatedAncestorInfo(currentHostContext.ancestorInfo, type)), function(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
|
||||
validatePropertiesInDevelopment(tag, nextRawProps);
|
||||
var lastProps, nextProps, propKey, styleName, updatePayload = null;
|
||||
switch(tag){
|
||||
@ -7376,7 +7370,7 @@
|
||||
}
|
||||
}
|
||||
}(styleUpdates, nextProps[STYLE]), (updatePayload = updatePayload || []).push(STYLE, styleUpdates)), updatePayload;
|
||||
}(domElement, type1, oldProps1, newProps1));
|
||||
}(instance, type, oldProps, newProps));
|
||||
workInProgress.updateQueue = updatePayload, updatePayload && markUpdate(workInProgress);
|
||||
}
|
||||
}, updateHostText$1 = function(current, workInProgress, oldText, newText) {
|
||||
@ -7578,7 +7572,7 @@
|
||||
case 5:
|
||||
var _instance2 = finishedWork.stateNode;
|
||||
if (null === current && 4 & finishedWork.flags) {
|
||||
var props, type = finishedWork.type;
|
||||
var type = finishedWork.type;
|
||||
shouldAutoFocusHostComponent(type, finishedWork.memoizedProps) && _instance2.focus();
|
||||
}
|
||||
return;
|
||||
@ -7673,8 +7667,8 @@
|
||||
return;
|
||||
case 1:
|
||||
safelyDetachRef(current);
|
||||
var current1, instance, instance1 = current.stateNode;
|
||||
"function" != typeof instance1.componentWillUnmount || (invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance1), hasError && captureCommitPhaseError(current, clearCaughtError()));
|
||||
var current1, instance = current.stateNode;
|
||||
"function" == typeof instance.componentWillUnmount && (invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance), hasError && captureCommitPhaseError(current, clearCaughtError()));
|
||||
return;
|
||||
case 5:
|
||||
safelyDetachRef(current);
|
||||
@ -7930,7 +7924,7 @@
|
||||
return (48 & executionContext) != 0 ? now() : -1 !== currentEventTime ? currentEventTime : currentEventTime = now();
|
||||
}
|
||||
function requestUpdateLane(fiber) {
|
||||
var lanes, lanes1, lanes2, wipLanes, lane, lane1, mode = fiber.mode;
|
||||
var lanes, lanes1, lanes2, wipLanes, lane, mode = fiber.mode;
|
||||
if ((2 & mode) == 0) return 1;
|
||||
if ((4 & mode) == 0) return 99 === getCurrentPriorityLevel() ? 1 : 2;
|
||||
if (0 === currentEventWipLanes && (currentEventWipLanes = workInProgressRootIncludedLanes), 0 !== ReactCurrentBatchConfig.transition) {
|
||||
@ -8006,7 +8000,7 @@
|
||||
var a, a1, a2, a3, alternate = sourceFiber.alternate;
|
||||
null !== alternate && (alternate.lanes = (a1 = alternate.lanes) | lane), null === alternate && (1026 & sourceFiber.flags) != 0 && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
|
||||
for(var node = sourceFiber, parent = sourceFiber.return; null !== parent;)(parent.childLanes = (a2 = parent.childLanes) | lane, null !== (alternate = parent.alternate)) ? alternate.childLanes = (a3 = alternate.childLanes) | lane : (1026 & parent.flags) != 0 && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), node = parent, parent = parent.return;
|
||||
return 3 !== node.tag ? null : node.stateNode;
|
||||
return 3 === node.tag ? node.stateNode : null;
|
||||
}
|
||||
function ensureRootIsScheduled(root, currentTime) {
|
||||
var callback, newCallbackNode, existingCallbackNode = root.callbackNode;
|
||||
@ -8973,7 +8967,7 @@
|
||||
function createFiberFromElement(element, mode, lanes) {
|
||||
var owner = null;
|
||||
owner = element._owner;
|
||||
var type, fiber = createFiberFromTypeAndProps(element.type, element.key, element.props, owner, mode, lanes);
|
||||
var fiber = createFiberFromTypeAndProps(element.type, element.key, element.props, owner, mode, lanes);
|
||||
return fiber._debugSource = element._source, fiber._debugOwner = element._owner, fiber;
|
||||
}
|
||||
function createFiberFromFragment(elements, mode, lanes, key) {
|
||||
@ -9378,7 +9372,7 @@
|
||||
]
|
||||
}, exports1.createPortal = createPortal$1, exports1.findDOMNode = function(componentOrElement) {
|
||||
var owner = ReactCurrentOwner$3.current;
|
||||
return null !== owner && null !== owner.stateNode && (owner.stateNode._warnedAboutRefsInRender || error("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", getComponentName(owner.type) || "A component"), owner.stateNode._warnedAboutRefsInRender = !0), null == componentOrElement ? null : 1 === componentOrElement.nodeType ? componentOrElement : function(component, methodName) {
|
||||
return (null !== owner && null !== owner.stateNode && (owner.stateNode._warnedAboutRefsInRender || error("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", getComponentName(owner.type) || "A component"), owner.stateNode._warnedAboutRefsInRender = !0), null == componentOrElement) ? null : 1 === componentOrElement.nodeType ? componentOrElement : function(component, methodName) {
|
||||
var fiber = get(component);
|
||||
if (void 0 === fiber) {
|
||||
if ("function" == typeof component.render) throw Error("Unable to find node on an unmounted component.");
|
||||
|
@ -14,6 +14,5 @@ define([
|
||||
var prop = g1();
|
||||
return g2()[prop] = hb;
|
||||
}), def(function(hb) {
|
||||
var win;
|
||||
return g2()[g1()] = hb;
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
var foo;
|
||||
!(function (x) {
|
||||
!function(x) {
|
||||
console.log(x);
|
||||
})(bar());
|
||||
}(bar());
|
||||
|
Loading…
Reference in New Issue
Block a user