mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 17:54:15 +03:00
fix(es/minifier): Fix block unwrapping issue (#2570)
swc_ecma_minifier: - Check more before removing `{` and `}`.
This commit is contained in:
parent
4b2903e3b4
commit
69cfa98c50
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2679,7 +2679,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_minifier"
|
||||
version = "0.46.6"
|
||||
version = "0.46.7"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"ansi_term 0.12.1",
|
||||
|
@ -7,7 +7,7 @@ include = ["Cargo.toml", "src/**/*.rs", "src/lists/*.json"]
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_ecma_minifier"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.46.6"
|
||||
version = "0.46.7"
|
||||
|
||||
[features]
|
||||
debug = ["backtrace"]
|
||||
|
@ -1,6 +1,7 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
use self::util::MultiReplacer;
|
||||
use super::util::is_fine_for_if_cons;
|
||||
use crate::{
|
||||
analyzer::{ProgramData, UsageAnalyzer},
|
||||
compress::util::is_pure_undefined,
|
||||
@ -1457,7 +1458,9 @@ where
|
||||
Stmt::Block(block) if block.stmts.is_empty() => {
|
||||
*s = Stmt::Empty(EmptyStmt { span: block.span });
|
||||
}
|
||||
Stmt::Block(block) if block.stmts.len() == 1 => {
|
||||
Stmt::Block(block)
|
||||
if block.stmts.len() == 1 && is_fine_for_if_cons(&block.stmts[0]) =>
|
||||
{
|
||||
*s = block.stmts.take().into_iter().next().unwrap();
|
||||
}
|
||||
_ => {}
|
||||
|
@ -1,6 +1,8 @@
|
||||
use super::Pure;
|
||||
use crate::{compress::util::always_terminates, mode::Mode};
|
||||
use swc_atoms::js_word;
|
||||
use crate::{
|
||||
compress::util::{always_terminates, is_fine_for_if_cons},
|
||||
mode::Mode,
|
||||
};
|
||||
use swc_common::{util::take::Take, DUMMY_SP};
|
||||
use swc_ecma_ast::*;
|
||||
use swc_ecma_utils::{ExprExt, StmtLike, Value};
|
||||
@ -14,31 +16,12 @@ where
|
||||
where
|
||||
T: StmtLike,
|
||||
{
|
||||
fn is_inliable(b: &BlockStmt) -> bool {
|
||||
b.stmts.iter().all(|s| match s {
|
||||
Stmt::Decl(Decl::Fn(FnDecl {
|
||||
ident:
|
||||
Ident {
|
||||
sym: js_word!("undefined"),
|
||||
..
|
||||
},
|
||||
..
|
||||
})) => false,
|
||||
|
||||
Stmt::Decl(
|
||||
Decl::Var(VarDecl {
|
||||
kind: VarDeclKind::Var,
|
||||
..
|
||||
})
|
||||
| Decl::Fn(..),
|
||||
) => true,
|
||||
Stmt::Decl(..) => false,
|
||||
_ => true,
|
||||
})
|
||||
fn is_ok(b: &BlockStmt) -> bool {
|
||||
b.stmts.iter().all(|s| is_fine_for_if_cons(s))
|
||||
}
|
||||
|
||||
if stmts.iter().all(|stmt| match stmt.as_stmt() {
|
||||
Some(Stmt::Block(b)) if is_inliable(b) => false,
|
||||
Some(Stmt::Block(b)) if is_ok(b) => false,
|
||||
_ => true,
|
||||
}) {
|
||||
return;
|
||||
@ -51,7 +34,7 @@ where
|
||||
for stmt in stmts.take() {
|
||||
match stmt.try_into_stmt() {
|
||||
Ok(v) => match v {
|
||||
Stmt::Block(v) if is_inliable(&v) => {
|
||||
Stmt::Block(v) if is_ok(&v) => {
|
||||
new.extend(v.stmts.into_iter().map(T::from_stmt));
|
||||
}
|
||||
_ => new.push(T::from_stmt(v)),
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::compress::util::negate;
|
||||
|
||||
use super::Pure;
|
||||
use crate::compress::util::{is_fine_for_if_cons, negate};
|
||||
use swc_common::{util::take::Take, DUMMY_SP};
|
||||
use swc_ecma_ast::*;
|
||||
|
||||
@ -96,7 +95,7 @@ impl<M> Pure<'_, M> {
|
||||
self.changed = true;
|
||||
negate(&mut s.test, false);
|
||||
|
||||
s.cons = if cons.len() == 1 {
|
||||
s.cons = if cons.len() == 1 && is_fine_for_if_cons(&cons[0]) {
|
||||
Box::new(cons.into_iter().next().unwrap())
|
||||
} else {
|
||||
Box::new(Stmt::Block(BlockStmt {
|
||||
|
@ -33,7 +33,7 @@ pub(crate) fn pure_optimizer<'a, M>(
|
||||
options: &'a CompressOptions,
|
||||
marks: Marks,
|
||||
mode: &'a M,
|
||||
debug_inifinite_loop: bool,
|
||||
debug_infinite_loop: bool,
|
||||
) -> impl 'a + VisitMut + Repeated
|
||||
where
|
||||
M: Mode,
|
||||
@ -44,7 +44,7 @@ where
|
||||
ctx: Default::default(),
|
||||
changed: Default::default(),
|
||||
mode,
|
||||
debug_inifinite_loop,
|
||||
debug_infinite_loop,
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ struct Pure<'a, M> {
|
||||
changed: bool,
|
||||
mode: &'a M,
|
||||
|
||||
debug_inifinite_loop: bool,
|
||||
debug_infinite_loop: bool,
|
||||
}
|
||||
|
||||
impl<M> Repeated for Pure<'_, M> {
|
||||
@ -117,7 +117,7 @@ where
|
||||
ctx: self.ctx,
|
||||
changed: false,
|
||||
mode: self.mode,
|
||||
debug_inifinite_loop: self.debug_inifinite_loop,
|
||||
debug_infinite_loop: self.debug_infinite_loop,
|
||||
};
|
||||
node.visit_mut_with(&mut v);
|
||||
|
||||
@ -136,7 +136,7 @@ where
|
||||
},
|
||||
changed: false,
|
||||
mode: self.mode,
|
||||
debug_inifinite_loop: self.debug_inifinite_loop,
|
||||
debug_infinite_loop: self.debug_infinite_loop,
|
||||
};
|
||||
node.visit_mut_with(&mut v);
|
||||
|
||||
@ -447,7 +447,7 @@ where
|
||||
}
|
||||
|
||||
fn visit_mut_stmt(&mut self, s: &mut Stmt) {
|
||||
let _tracing = if cfg!(feature = "debug") && self.debug_inifinite_loop {
|
||||
let _tracing = if cfg!(feature = "debug") && self.debug_infinite_loop {
|
||||
let text = dump(&*s);
|
||||
|
||||
if text.lines().count() < 10 {
|
||||
@ -470,7 +470,7 @@ where
|
||||
s.visit_mut_children_with(&mut *self.with_ctx(ctx));
|
||||
}
|
||||
|
||||
if cfg!(feature = "debug") && self.debug_inifinite_loop {
|
||||
if cfg!(feature = "debug") && self.debug_infinite_loop {
|
||||
let text = dump(&*s);
|
||||
|
||||
if text.lines().count() < 10 {
|
||||
@ -501,7 +501,7 @@ where
|
||||
_ => {}
|
||||
}
|
||||
|
||||
if cfg!(feature = "debug") && self.debug_inifinite_loop {
|
||||
if cfg!(feature = "debug") && self.debug_infinite_loop {
|
||||
let text = dump(&*s);
|
||||
|
||||
if text.lines().count() < 10 {
|
||||
|
@ -593,3 +593,26 @@ where
|
||||
{
|
||||
node.visit_mut_with(&mut ExprReplacer { op })
|
||||
}
|
||||
|
||||
pub(super) fn is_fine_for_if_cons(s: &Stmt) -> bool {
|
||||
match s {
|
||||
Stmt::Decl(Decl::Fn(FnDecl {
|
||||
ident:
|
||||
Ident {
|
||||
sym: js_word!("undefined"),
|
||||
..
|
||||
},
|
||||
..
|
||||
})) => false,
|
||||
|
||||
Stmt::Decl(
|
||||
Decl::Var(VarDecl {
|
||||
kind: VarDeclKind::Var,
|
||||
..
|
||||
})
|
||||
| Decl::Fn(..),
|
||||
) => true,
|
||||
Stmt::Decl(..) => false,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,162 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import * as React from "react";
|
||||
import invariant from "invariant";
|
||||
import { injectScript } from "./utils/injectscript";
|
||||
import { preventGoogleFonts } from "./utils/prevent-google-fonts";
|
||||
import { isBrowser } from "./utils/isbrowser";
|
||||
import { makeLoadScriptUrl } from "./utils/make-load-script-url";
|
||||
let cleaningUp = false;
|
||||
export function DefaultLoadingElement() {
|
||||
return (/*#__PURE__*/ _jsx("div", {
|
||||
children: `Loading...`
|
||||
}));
|
||||
}
|
||||
export const defaultLoadScriptProps = {
|
||||
id: "script-loader",
|
||||
version: "weekly"
|
||||
};
|
||||
class LoadScript extends React.PureComponent {
|
||||
componentDidMount() {
|
||||
if (isBrowser) {
|
||||
if (window.google && window.google.maps && !cleaningUp) {
|
||||
console.error("google api is already presented");
|
||||
return;
|
||||
}
|
||||
this.isCleaningUp().then(this.injectScript).catch(function error(err) {
|
||||
console.error("Error at injecting script after cleaning up: ", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.libraries !== prevProps.libraries) {
|
||||
console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables");
|
||||
}
|
||||
if (isBrowser && prevProps.language !== this.props.language) {
|
||||
this.cleanup();
|
||||
// TODO: refactor to use gDSFP maybe... wait for hooks refactoring.
|
||||
// eslint-disable-next-line react/no-did-update-set-state
|
||||
this.setState(function setLoaded() {
|
||||
return {
|
||||
loaded: false
|
||||
};
|
||||
}, this.cleanupCallback);
|
||||
}
|
||||
}
|
||||
componentWillUnmount() {
|
||||
if (isBrowser) {
|
||||
this.cleanup();
|
||||
const timeoutCallback = () => {
|
||||
if (!this.check.current) {
|
||||
// @ts-ignore
|
||||
delete window.google;
|
||||
cleaningUp = false;
|
||||
}
|
||||
};
|
||||
window.setTimeout(timeoutCallback, 1);
|
||||
if (this.props.onUnmount) {
|
||||
this.props.onUnmount();
|
||||
}
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return (/*#__PURE__*/ _jsxs(_Fragment, {
|
||||
children: [
|
||||
/*#__PURE__*/ _jsx("div", {
|
||||
ref: this.check
|
||||
}),
|
||||
this.state.loaded ? this.props.children : this.props.loadingElement || /*#__PURE__*/ _jsx(DefaultLoadingElement, {
|
||||
})
|
||||
]
|
||||
}));
|
||||
}
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.check = /*#__PURE__*/ React.createRef();
|
||||
this.state = {
|
||||
loaded: false
|
||||
};
|
||||
this.cleanupCallback = () => {
|
||||
// @ts-ignore
|
||||
delete window.google.maps;
|
||||
this.injectScript();
|
||||
};
|
||||
this.isCleaningUp = async () => {
|
||||
function promiseCallback(resolve) {
|
||||
if (!cleaningUp) {
|
||||
resolve();
|
||||
} else {
|
||||
if (isBrowser) {
|
||||
const timer = window.setInterval(function interval() {
|
||||
if (!cleaningUp) {
|
||||
window.clearInterval(timer);
|
||||
resolve();
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
return new Promise(promiseCallback);
|
||||
};
|
||||
this.cleanup = () => {
|
||||
cleaningUp = true;
|
||||
const script1 = document.getElementById(this.props.id);
|
||||
if (script1 && script1.parentNode) {
|
||||
script1.parentNode.removeChild(script1);
|
||||
}
|
||||
Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function filter(script) {
|
||||
return typeof script.src === "string" && script.src.includes("maps.googleapis");
|
||||
}).forEach(function forEach(script) {
|
||||
if (script.parentNode) {
|
||||
script.parentNode.removeChild(script);
|
||||
}
|
||||
});
|
||||
Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function filter(link) {
|
||||
return link.href === "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans";
|
||||
}).forEach(function forEach(link) {
|
||||
if (link.parentNode) {
|
||||
link.parentNode.removeChild(link);
|
||||
}
|
||||
});
|
||||
Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function filter(style) {
|
||||
return style.innerText !== undefined && style.innerText.length > 0 && style.innerText.includes(".gm-");
|
||||
}).forEach(function forEach(style) {
|
||||
if (style.parentNode) {
|
||||
style.parentNode.removeChild(style);
|
||||
}
|
||||
});
|
||||
};
|
||||
this.injectScript = () => {
|
||||
if (this.props.preventGoogleFontsLoading) {
|
||||
preventGoogleFonts();
|
||||
}
|
||||
invariant(!!this.props.id, 'LoadScript requires "id" prop to be a string: %s', this.props.id);
|
||||
const injectScriptOptions = {
|
||||
id: this.props.id,
|
||||
nonce: this.props.nonce,
|
||||
url: makeLoadScriptUrl(this.props)
|
||||
};
|
||||
injectScript(injectScriptOptions).then(() => {
|
||||
if (this.props.onLoad) {
|
||||
this.props.onLoad();
|
||||
}
|
||||
this.setState(function setLoaded() {
|
||||
return {
|
||||
loaded: true
|
||||
};
|
||||
});
|
||||
return;
|
||||
}).catch((err) => {
|
||||
if (this.props.onError) {
|
||||
this.props.onError(err);
|
||||
}
|
||||
console.error(`
|
||||
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this.props.googleMapsApiKey || "-"}) or Client ID (${this.props.googleMapsClientId || "-"}) to <LoadScript />
|
||||
Otherwise it is a Network issue.
|
||||
`);
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
LoadScript.defaultProps = defaultLoadScriptProps;
|
||||
export default LoadScript;
|
@ -0,0 +1,110 @@
|
||||
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
||||
import * as React from "react";
|
||||
import invariant from "invariant";
|
||||
import { injectScript } from "./utils/injectscript";
|
||||
import { preventGoogleFonts } from "./utils/prevent-google-fonts";
|
||||
import { isBrowser } from "./utils/isbrowser";
|
||||
import { makeLoadScriptUrl } from "./utils/make-load-script-url";
|
||||
let cleaningUp = !1;
|
||||
export function DefaultLoadingElement() {
|
||||
return _jsx("div", {
|
||||
children: "Loading..."
|
||||
});
|
||||
}
|
||||
export const defaultLoadScriptProps;
|
||||
class LoadScript extends React.PureComponent {
|
||||
componentDidMount() {
|
||||
if (isBrowser) {
|
||||
if (window.google && window.google.maps && !cleaningUp) {
|
||||
console.error("google api is already presented");
|
||||
return;
|
||||
}
|
||||
this.isCleaningUp().then(this.injectScript).catch(function(err) {
|
||||
console.error("Error at injecting script after cleaning up: ", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
componentDidUpdate(prevProps) {
|
||||
this.props.libraries !== prevProps.libraries && console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"), isBrowser && prevProps.language !== this.props.language && (this.cleanup(), this.setState(function() {
|
||||
return {
|
||||
loaded: !1
|
||||
};
|
||||
}, this.cleanupCallback));
|
||||
}
|
||||
componentWillUnmount() {
|
||||
if (isBrowser) {
|
||||
this.cleanup();
|
||||
const timeoutCallback = ()=>{
|
||||
this.check.current || (delete window.google, cleaningUp = !1);
|
||||
};
|
||||
window.setTimeout(timeoutCallback, 1), this.props.onUnmount && this.props.onUnmount();
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return _jsxs(_Fragment, {
|
||||
children: [
|
||||
_jsx("div", {
|
||||
ref: this.check
|
||||
}),
|
||||
this.state.loaded ? this.props.children : this.props.loadingElement || _jsx(DefaultLoadingElement, {
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
constructor(...args){
|
||||
super(...args), this.check = React.createRef(), this.state = {
|
||||
loaded: !1
|
||||
}, this.cleanupCallback = ()=>{
|
||||
delete window.google.maps, this.injectScript();
|
||||
}, this.isCleaningUp = async ()=>new Promise(function(resolve) {
|
||||
if (cleaningUp) {
|
||||
if (isBrowser) {
|
||||
const timer = window.setInterval(function() {
|
||||
cleaningUp || (window.clearInterval(timer), resolve());
|
||||
}, 1);
|
||||
}
|
||||
} else resolve();
|
||||
})
|
||||
, this.cleanup = ()=>{
|
||||
cleaningUp = !0;
|
||||
const script1 = document.getElementById(this.props.id);
|
||||
script1 && script1.parentNode && script1.parentNode.removeChild(script1), Array.prototype.slice.call(document.getElementsByTagName("script")).filter(function(script) {
|
||||
return "string" == typeof script.src && script.src.includes("maps.googleapis");
|
||||
}).forEach(function(script) {
|
||||
script.parentNode && script.parentNode.removeChild(script);
|
||||
}), Array.prototype.slice.call(document.getElementsByTagName("link")).filter(function(link) {
|
||||
return "https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans" === link.href;
|
||||
}).forEach(function(link) {
|
||||
link.parentNode && link.parentNode.removeChild(link);
|
||||
}), Array.prototype.slice.call(document.getElementsByTagName("style")).filter(function(style) {
|
||||
return void 0 !== style.innerText && style.innerText.length > 0 && style.innerText.includes(".gm-");
|
||||
}).forEach(function(style) {
|
||||
style.parentNode && style.parentNode.removeChild(style);
|
||||
});
|
||||
}, this.injectScript = ()=>{
|
||||
this.props.preventGoogleFontsLoading && preventGoogleFonts(), invariant(!!this.props.id, "LoadScript requires \"id\" prop to be a string: %s", this.props.id);
|
||||
const injectScriptOptions = {
|
||||
id: this.props.id,
|
||||
nonce: this.props.nonce,
|
||||
url: makeLoadScriptUrl(this.props)
|
||||
};
|
||||
injectScript(injectScriptOptions).then(()=>{
|
||||
this.props.onLoad && this.props.onLoad(), this.setState(function() {
|
||||
return {
|
||||
loaded: !0
|
||||
};
|
||||
});
|
||||
}).catch((err)=>{
|
||||
this.props.onError && this.props.onError(err), console.error(`
|
||||
There has been an Error with loading Google Maps API script, please check that you provided correct google API key (${this.props.googleMapsApiKey || "-"}) or Client ID (${this.props.googleMapsClientId || "-"}) to <LoadScript />
|
||||
Otherwise it is a Network issue.
|
||||
`);
|
||||
});
|
||||
};
|
||||
}
|
||||
}
|
||||
LoadScript.defaultProps = {
|
||||
id: "script-loader",
|
||||
version: "weekly"
|
||||
};
|
||||
export default LoadScript;
|
@ -166,7 +166,7 @@ function _f3() {
|
||||
};
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(o); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(o); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
|
@ -97,7 +97,7 @@ function _f1() {
|
||||
let y;
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -114,7 +114,7 @@ function _f2() {
|
||||
let y;
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -131,7 +131,7 @@ function _f3() {
|
||||
let y;
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -148,7 +148,7 @@ function _f4() {
|
||||
let y;
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -210,7 +210,7 @@ function _f7() {
|
||||
for(;;){
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(y); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
|
@ -90,7 +90,7 @@ function _f1() {
|
||||
})(function*() {
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(asyncIterable); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(asyncIterable); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -102,7 +102,7 @@ function _f1() {
|
||||
}
|
||||
var _iteratorError1, _iteratorAbruptCompletion1 = !1, _didIteratorError1 = !1;
|
||||
try {
|
||||
for(var _step1, _iterator1 = _asyncIterator(iterable); _iteratorAbruptCompletion1 = !(_step1 = yield _iterator1.next()).done; _iteratorAbruptCompletion1 = !1);
|
||||
for(var _step1, _iterator1 = _asyncIterator(iterable); _iteratorAbruptCompletion1 = !(_step1 = yield _iterator1.next()).done; _iteratorAbruptCompletion1 = !1)_step1.value;
|
||||
} catch (err1) {
|
||||
_didIteratorError1 = !0, _iteratorError1 = err1;
|
||||
} finally{
|
||||
@ -114,7 +114,7 @@ function _f1() {
|
||||
}
|
||||
var _iteratorError2, _iteratorAbruptCompletion2 = !1, _didIteratorError2 = !1;
|
||||
try {
|
||||
for(var _step2, _iterator2 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion2 = !(_step2 = yield _iterator2.next()).done; _iteratorAbruptCompletion2 = !1);
|
||||
for(var _step2, _iterator2 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion2 = !(_step2 = yield _iterator2.next()).done; _iteratorAbruptCompletion2 = !1)_step2.value;
|
||||
} catch (err2) {
|
||||
_didIteratorError2 = !0, _iteratorError2 = err2;
|
||||
} finally{
|
||||
@ -126,7 +126,7 @@ function _f1() {
|
||||
}
|
||||
var _iteratorError3, _iteratorAbruptCompletion3 = !1, _didIteratorError3 = !1;
|
||||
try {
|
||||
for(var _step3, _iterator3 = _asyncIterator(asyncIterable); _iteratorAbruptCompletion3 = !(_step3 = yield _iterator3.next()).done; _iteratorAbruptCompletion3 = !1);
|
||||
for(var _step3, _iterator3 = _asyncIterator(asyncIterable); _iteratorAbruptCompletion3 = !(_step3 = yield _iterator3.next()).done; _iteratorAbruptCompletion3 = !1)_step3.value;
|
||||
} catch (err3) {
|
||||
_didIteratorError3 = !0, _iteratorError3 = err3;
|
||||
} finally{
|
||||
@ -138,7 +138,7 @@ function _f1() {
|
||||
}
|
||||
var _iteratorError4, _iteratorAbruptCompletion4 = !1, _didIteratorError4 = !1;
|
||||
try {
|
||||
for(var _step4, _iterator4 = _asyncIterator(iterable); _iteratorAbruptCompletion4 = !(_step4 = yield _iterator4.next()).done; _iteratorAbruptCompletion4 = !1);
|
||||
for(var _step4, _iterator4 = _asyncIterator(iterable); _iteratorAbruptCompletion4 = !(_step4 = yield _iterator4.next()).done; _iteratorAbruptCompletion4 = !1)_step4.value;
|
||||
} catch (err4) {
|
||||
_didIteratorError4 = !0, _iteratorError4 = err4;
|
||||
} finally{
|
||||
@ -150,7 +150,7 @@ function _f1() {
|
||||
}
|
||||
var _iteratorError5, _iteratorAbruptCompletion5 = !1, _didIteratorError5 = !1;
|
||||
try {
|
||||
for(var _step5, _iterator5 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion5 = !(_step5 = yield _iterator5.next()).done; _iteratorAbruptCompletion5 = !1);
|
||||
for(var _step5, _iterator5 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion5 = !(_step5 = yield _iterator5.next()).done; _iteratorAbruptCompletion5 = !1)_step5.value;
|
||||
} catch (err5) {
|
||||
_didIteratorError5 = !0, _iteratorError5 = err5;
|
||||
} finally{
|
||||
@ -170,7 +170,7 @@ function _f2() {
|
||||
})(function*() {
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator(asyncIterable); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1);
|
||||
for(var _step, _iterator = _asyncIterator(asyncIterable); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -182,7 +182,7 @@ function _f2() {
|
||||
}
|
||||
var _iteratorError6, _iteratorAbruptCompletion6 = !1, _didIteratorError6 = !1;
|
||||
try {
|
||||
for(var _step6, _iterator6 = _asyncIterator(iterable); _iteratorAbruptCompletion6 = !(_step6 = yield _awaitAsyncGenerator(_iterator6.next())).done; _iteratorAbruptCompletion6 = !1);
|
||||
for(var _step6, _iterator6 = _asyncIterator(iterable); _iteratorAbruptCompletion6 = !(_step6 = yield _awaitAsyncGenerator(_iterator6.next())).done; _iteratorAbruptCompletion6 = !1)_step6.value;
|
||||
} catch (err6) {
|
||||
_didIteratorError6 = !0, _iteratorError6 = err6;
|
||||
} finally{
|
||||
@ -194,7 +194,7 @@ function _f2() {
|
||||
}
|
||||
var _iteratorError7, _iteratorAbruptCompletion7 = !1, _didIteratorError7 = !1;
|
||||
try {
|
||||
for(var _step7, _iterator7 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion7 = !(_step7 = yield _awaitAsyncGenerator(_iterator7.next())).done; _iteratorAbruptCompletion7 = !1);
|
||||
for(var _step7, _iterator7 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion7 = !(_step7 = yield _awaitAsyncGenerator(_iterator7.next())).done; _iteratorAbruptCompletion7 = !1)_step7.value;
|
||||
} catch (err7) {
|
||||
_didIteratorError7 = !0, _iteratorError7 = err7;
|
||||
} finally{
|
||||
@ -206,7 +206,7 @@ function _f2() {
|
||||
}
|
||||
var _iteratorError8, _iteratorAbruptCompletion8 = !1, _didIteratorError8 = !1;
|
||||
try {
|
||||
for(var _step8, _iterator8 = _asyncIterator(asyncIterable); _iteratorAbruptCompletion8 = !(_step8 = yield _awaitAsyncGenerator(_iterator8.next())).done; _iteratorAbruptCompletion8 = !1);
|
||||
for(var _step8, _iterator8 = _asyncIterator(asyncIterable); _iteratorAbruptCompletion8 = !(_step8 = yield _awaitAsyncGenerator(_iterator8.next())).done; _iteratorAbruptCompletion8 = !1)_step8.value;
|
||||
} catch (err8) {
|
||||
_didIteratorError8 = !0, _iteratorError8 = err8;
|
||||
} finally{
|
||||
@ -218,7 +218,7 @@ function _f2() {
|
||||
}
|
||||
var _iteratorError9, _iteratorAbruptCompletion9 = !1, _didIteratorError9 = !1;
|
||||
try {
|
||||
for(var _step9, _iterator9 = _asyncIterator(iterable); _iteratorAbruptCompletion9 = !(_step9 = yield _awaitAsyncGenerator(_iterator9.next())).done; _iteratorAbruptCompletion9 = !1);
|
||||
for(var _step9, _iterator9 = _asyncIterator(iterable); _iteratorAbruptCompletion9 = !(_step9 = yield _awaitAsyncGenerator(_iterator9.next())).done; _iteratorAbruptCompletion9 = !1)_step9.value;
|
||||
} catch (err9) {
|
||||
_didIteratorError9 = !0, _iteratorError9 = err9;
|
||||
} finally{
|
||||
@ -230,7 +230,7 @@ function _f2() {
|
||||
}
|
||||
var _iteratorError10, _iteratorAbruptCompletion10 = !1, _didIteratorError10 = !1;
|
||||
try {
|
||||
for(var _step10, _iterator10 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion10 = !(_step10 = yield _awaitAsyncGenerator(_iterator10.next())).done; _iteratorAbruptCompletion10 = !1);
|
||||
for(var _step10, _iterator10 = _asyncIterator(iterableOfPromise); _iteratorAbruptCompletion10 = !(_step10 = yield _awaitAsyncGenerator(_iterator10.next())).done; _iteratorAbruptCompletion10 = !1)_step10.value;
|
||||
} catch (err10) {
|
||||
_didIteratorError10 = !0, _iteratorError10 = err10;
|
||||
} finally{
|
||||
|
@ -35,7 +35,7 @@ function _f() {
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator({
|
||||
}); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1);
|
||||
}); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -48,7 +48,7 @@ function _f() {
|
||||
var _iteratorError1, _iteratorAbruptCompletion1 = !1, _didIteratorError1 = !1;
|
||||
try {
|
||||
for(var _step1, _iterator1 = _asyncIterator({
|
||||
}); _iteratorAbruptCompletion1 = !(_step1 = yield _iterator1.next()).done; _iteratorAbruptCompletion1 = !1);
|
||||
}); _iteratorAbruptCompletion1 = !(_step1 = yield _iterator1.next()).done; _iteratorAbruptCompletion1 = !1)_step1.value;
|
||||
} catch (err1) {
|
||||
_didIteratorError1 = !0, _iteratorError1 = err1;
|
||||
} finally{
|
||||
@ -60,7 +60,7 @@ function _f() {
|
||||
}
|
||||
var _iteratorError2, _iteratorAbruptCompletion2 = !1, _didIteratorError2 = !1;
|
||||
try {
|
||||
for(var _step2, _iterator2 = _asyncIterator(asyncIterable); _iteratorAbruptCompletion2 = !(_step2 = yield _iterator2.next()).done; _iteratorAbruptCompletion2 = !1);
|
||||
for(var _step2, _iterator2 = _asyncIterator(asyncIterable); _iteratorAbruptCompletion2 = !(_step2 = yield _iterator2.next()).done; _iteratorAbruptCompletion2 = !1)_step2.value;
|
||||
} catch (err2) {
|
||||
_didIteratorError2 = !0, _iteratorError2 = err2;
|
||||
} finally{
|
||||
@ -72,7 +72,7 @@ function _f() {
|
||||
}
|
||||
var _iteratorError3, _iteratorAbruptCompletion3 = !1, _didIteratorError3 = !1;
|
||||
try {
|
||||
for(var _step3, _iterator3 = _asyncIterator(iterable); _iteratorAbruptCompletion3 = !(_step3 = yield _iterator3.next()).done; _iteratorAbruptCompletion3 = !1);
|
||||
for(var _step3, _iterator3 = _asyncIterator(iterable); _iteratorAbruptCompletion3 = !(_step3 = yield _iterator3.next()).done; _iteratorAbruptCompletion3 = !1)_step3.value;
|
||||
} catch (err3) {
|
||||
_didIteratorError3 = !0, _iteratorError3 = err3;
|
||||
} finally{
|
||||
|
@ -91,7 +91,7 @@ function _f1() {
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator({
|
||||
}); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1);
|
||||
}); _iteratorAbruptCompletion = !(_step = yield _iterator.next()).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -104,7 +104,7 @@ function _f1() {
|
||||
var _iteratorError1, _iteratorAbruptCompletion1 = !1, _didIteratorError1 = !1;
|
||||
try {
|
||||
for(var _step1, _iterator1 = _asyncIterator({
|
||||
}); _iteratorAbruptCompletion1 = !(_step1 = yield _iterator1.next()).done; _iteratorAbruptCompletion1 = !1);
|
||||
}); _iteratorAbruptCompletion1 = !(_step1 = yield _iterator1.next()).done; _iteratorAbruptCompletion1 = !1)_step1.value;
|
||||
} catch (err1) {
|
||||
_didIteratorError1 = !0, _iteratorError1 = err1;
|
||||
} finally{
|
||||
@ -125,7 +125,7 @@ function _f2() {
|
||||
var _iteratorError, _iteratorAbruptCompletion = !1, _didIteratorError = !1;
|
||||
try {
|
||||
for(var _step, _iterator = _asyncIterator({
|
||||
}); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1);
|
||||
}); _iteratorAbruptCompletion = !(_step = yield _awaitAsyncGenerator(_iterator.next())).done; _iteratorAbruptCompletion = !1)_step.value;
|
||||
} catch (err) {
|
||||
_didIteratorError = !0, _iteratorError = err;
|
||||
} finally{
|
||||
@ -138,7 +138,7 @@ function _f2() {
|
||||
var _iteratorError2, _iteratorAbruptCompletion2 = !1, _didIteratorError2 = !1;
|
||||
try {
|
||||
for(var _step2, _iterator2 = _asyncIterator({
|
||||
}); _iteratorAbruptCompletion2 = !(_step2 = yield _awaitAsyncGenerator(_iterator2.next())).done; _iteratorAbruptCompletion2 = !1);
|
||||
}); _iteratorAbruptCompletion2 = !(_step2 = yield _awaitAsyncGenerator(_iterator2.next())).done; _iteratorAbruptCompletion2 = !1)_step2.value;
|
||||
} catch (err2) {
|
||||
_didIteratorError2 = !0, _iteratorError2 = err2;
|
||||
} finally{
|
||||
|
Loading…
Reference in New Issue
Block a user