@babel/runtime
Advanced tools
Comparing version 7.22.10 to 7.22.11
var _typeof = require("./typeof.js")["default"]; | ||
function old_createMetadataMethodsForProperty(metadataMap, kind, property, decoratorFinishedRef) { | ||
function old_createMetadataMethodsForProperty(e, t, a, r) { | ||
return { | ||
getMetadata: function getMetadata(key) { | ||
old_assertNotFinished(decoratorFinishedRef, "getMetadata"), old_assertMetadataKey(key); | ||
var metadataForKey = metadataMap[key]; | ||
if (void 0 !== metadataForKey) if (1 === kind) { | ||
var pub = metadataForKey["public"]; | ||
if (void 0 !== pub) return pub[property]; | ||
} else if (2 === kind) { | ||
var priv = metadataForKey["private"]; | ||
if (void 0 !== priv) return priv.get(property); | ||
} else if (Object.hasOwnProperty.call(metadataForKey, "constructor")) return metadataForKey.constructor; | ||
getMetadata: function getMetadata(o) { | ||
old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o); | ||
var i = e[o]; | ||
if (void 0 !== i) if (1 === t) { | ||
var n = i["public"]; | ||
if (void 0 !== n) return n[a]; | ||
} else if (2 === t) { | ||
var l = i["private"]; | ||
if (void 0 !== l) return l.get(a); | ||
} else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor; | ||
}, | ||
setMetadata: function setMetadata(key, value) { | ||
old_assertNotFinished(decoratorFinishedRef, "setMetadata"), old_assertMetadataKey(key); | ||
var metadataForKey = metadataMap[key]; | ||
if (void 0 === metadataForKey && (metadataForKey = metadataMap[key] = {}), 1 === kind) { | ||
var pub = metadataForKey["public"]; | ||
void 0 === pub && (pub = metadataForKey["public"] = {}), pub[property] = value; | ||
} else if (2 === kind) { | ||
var priv = metadataForKey.priv; | ||
void 0 === priv && (priv = metadataForKey["private"] = new Map()), priv.set(property, value); | ||
} else metadataForKey.constructor = value; | ||
setMetadata: function setMetadata(o, i) { | ||
old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o); | ||
var n = e[o]; | ||
if (void 0 === n && (n = e[o] = {}), 1 === t) { | ||
var l = n["public"]; | ||
void 0 === l && (l = n["public"] = {}), l[a] = i; | ||
} else if (2 === t) { | ||
var s = n.priv; | ||
void 0 === s && (s = n["private"] = new Map()), s.set(a, i); | ||
} else n.constructor = i; | ||
} | ||
}; | ||
} | ||
function old_convertMetadataMapToFinal(obj, metadataMap) { | ||
var parentMetadataMap = obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")], | ||
metadataKeys = Object.getOwnPropertySymbols(metadataMap); | ||
if (0 !== metadataKeys.length) { | ||
for (var i = 0; i < metadataKeys.length; i++) { | ||
var key = metadataKeys[i], | ||
metaForKey = metadataMap[key], | ||
parentMetaForKey = parentMetadataMap ? parentMetadataMap[key] : null, | ||
pub = metaForKey["public"], | ||
parentPub = parentMetaForKey ? parentMetaForKey["public"] : null; | ||
pub && parentPub && Object.setPrototypeOf(pub, parentPub); | ||
var priv = metaForKey["private"]; | ||
if (priv) { | ||
var privArr = Array.from(priv.values()), | ||
parentPriv = parentMetaForKey ? parentMetaForKey["private"] : null; | ||
parentPriv && (privArr = privArr.concat(parentPriv)), metaForKey["private"] = privArr; | ||
function old_convertMetadataMapToFinal(e, t) { | ||
var a = e[Symbol.metadata || Symbol["for"]("Symbol.metadata")], | ||
r = Object.getOwnPropertySymbols(t); | ||
if (0 !== r.length) { | ||
for (var o = 0; o < r.length; o++) { | ||
var i = r[o], | ||
n = t[i], | ||
l = a ? a[i] : null, | ||
s = n["public"], | ||
c = l ? l["public"] : null; | ||
s && c && Object.setPrototypeOf(s, c); | ||
var d = n["private"]; | ||
if (d) { | ||
var u = Array.from(d.values()), | ||
f = l ? l["private"] : null; | ||
f && (u = u.concat(f)), n["private"] = u; | ||
} | ||
parentMetaForKey && Object.setPrototypeOf(metaForKey, parentMetaForKey); | ||
l && Object.setPrototypeOf(n, l); | ||
} | ||
parentMetadataMap && Object.setPrototypeOf(metadataMap, parentMetadataMap), obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = metadataMap; | ||
a && Object.setPrototypeOf(t, a), e[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = t; | ||
} | ||
} | ||
function old_createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
old_assertNotFinished(decoratorFinishedRef, "addInitializer"), old_assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function old_createAddInitializerMethod(e, t) { | ||
return function (a) { | ||
old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a); | ||
}; | ||
} | ||
function old_memberDec(dec, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value) { | ||
var kindStr; | ||
switch (kind) { | ||
function old_memberDec(e, t, a, r, o, i, n, l, s) { | ||
var c; | ||
switch (i) { | ||
case 1: | ||
kindStr = "accessor"; | ||
c = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
c = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
c = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
c = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
c = "field"; | ||
} | ||
var metadataKind, | ||
metadataName, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
isStatic: isStatic, | ||
isPrivate: isPrivate | ||
var d, | ||
u, | ||
f = { | ||
kind: c, | ||
name: l ? "#" + t : t, | ||
isStatic: n, | ||
isPrivate: l | ||
}, | ||
decoratorFinishedRef = { | ||
p = { | ||
v: !1 | ||
}; | ||
if (0 !== kind && (ctx.addInitializer = old_createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate) { | ||
metadataKind = 2, metadataName = Symbol(name); | ||
var access = {}; | ||
0 === kind ? (access.get = desc.get, access.set = desc.set) : 2 === kind ? access.get = function () { | ||
return desc.value; | ||
} : (1 !== kind && 3 !== kind || (access.get = function () { | ||
return desc.get.call(this); | ||
}), 1 !== kind && 4 !== kind || (access.set = function (v) { | ||
desc.set.call(this, v); | ||
})), ctx.access = access; | ||
} else metadataKind = 1, metadataName = name; | ||
if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) { | ||
d = 2, u = Symbol(t); | ||
var v = {}; | ||
0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () { | ||
return a.value; | ||
} : (1 !== i && 3 !== i || (v.get = function () { | ||
return a.get.call(this); | ||
}), 1 !== i && 4 !== i || (v.set = function (e) { | ||
a.set.call(this, e); | ||
})), f.access = v; | ||
} else d = 1, u = t; | ||
try { | ||
return dec(value, Object.assign(ctx, old_createMetadataMethodsForProperty(metadataMap, metadataKind, metadataName, decoratorFinishedRef))); | ||
return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p))); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
p.v = !0; | ||
} | ||
} | ||
function old_assertNotFinished(decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
function old_assertNotFinished(e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
} | ||
function old_assertMetadataKey(key) { | ||
if ("symbol" != _typeof(key)) throw new TypeError("Metadata keys must be symbols, received: " + key); | ||
function old_assertMetadataKey(e) { | ||
if ("symbol" != _typeof(e)) throw new TypeError("Metadata keys must be symbols, received: " + e); | ||
} | ||
function old_assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function old_assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function old_assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && old_assertCallable(value.get, "accessor.get"), void 0 !== value.set && old_assertCallable(value.set, "accessor.set"), void 0 !== value.init && old_assertCallable(value.init, "accessor.init"), void 0 !== value.initializer && old_assertCallable(value.initializer, "accessor.initializer"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function old_assertValidReturnValue(e, t) { | ||
var a = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); | ||
} else if ("function" !== a) { | ||
var r; | ||
throw r = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(r + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function old_getInit(desc) { | ||
var initializer; | ||
return null == (initializer = desc.init) && (initializer = desc.initializer) && "undefined" != typeof console && console.warn(".initializer has been renamed to .init as of March 2022"), initializer; | ||
function old_getInit(e) { | ||
var t; | ||
return null == (t = e.init) && (t = e.initializer) && "undefined" != typeof console && console.warn(".initializer has been renamed to .init as of March 2022"), t; | ||
} | ||
function old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers) { | ||
var desc, | ||
initializer, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: decInfo[3], | ||
set: decInfo[4] | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function old_applyMemberDec(e, t, a, r, o, i, n, l, s) { | ||
var c, | ||
d, | ||
u, | ||
f, | ||
p, | ||
v, | ||
h = a[0]; | ||
if (n ? c = 0 === o || 1 === o ? { | ||
get: a[3], | ||
set: a[4] | ||
} : 3 === o ? { | ||
get: a[3] | ||
} : 4 === o ? { | ||
set: a[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = old_memberDec(decs, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value)) && (old_assertValidReturnValue(kind, newValue), 0 === kind ? initializer = newValue : 1 === kind ? (initializer = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = old_memberDec(decs[i], name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value))) old_assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === initializer ? initializer = newInit : "function" == typeof initializer ? initializer = [initializer, newInit] : initializer.push(newInit)); | ||
value: a[3] | ||
} : 0 !== o && (c = Object.getOwnPropertyDescriptor(t, r)), 1 === o ? u = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === o ? u = c.value : 3 === o ? u = c.get : 4 === o && (u = c.set), "function" == typeof h) void 0 !== (f = old_memberDec(h, r, c, l, s, o, i, n, u)) && (old_assertValidReturnValue(o, f), 0 === o ? d = f : 1 === o ? (d = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f);else for (var y = h.length - 1; y >= 0; y--) { | ||
var b; | ||
if (void 0 !== (f = old_memberDec(h[y], r, c, l, s, o, i, n, u))) old_assertValidReturnValue(o, f), 0 === o ? b = f : 1 === o ? (b = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === initializer) initializer = function initializer(instance, init) { | ||
return init; | ||
};else if ("function" != typeof initializer) { | ||
var ownInitializers = initializer; | ||
initializer = function initializer(instance, init) { | ||
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === o || 1 === o) { | ||
if (void 0 === d) d = function d(e, t) { | ||
return t; | ||
};else if ("function" != typeof d) { | ||
var g = d; | ||
d = function d(e, t) { | ||
for (var a = t, r = 0; r < g.length; r++) a = g[r].call(e, a); | ||
return a; | ||
}; | ||
} else { | ||
var originalInitializer = initializer; | ||
initializer = function initializer(instance, init) { | ||
return originalInitializer.call(instance, init); | ||
var m = d; | ||
d = function d(e, t) { | ||
return m.call(e, t); | ||
}; | ||
} | ||
ret.push(initializer); | ||
e.push(d); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== o && (1 === o ? (c.get = u.get, c.set = u.set) : 2 === o ? c.value = u : 3 === o ? c.get = u : 4 === o && (c.set = u), n ? 1 === o ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === o ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
}) : Object.defineProperty(t, r, c)); | ||
} | ||
function old_applyMemberDecs(ret, Class, protoMetadataMap, staticMetadataMap, decInfos) { | ||
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
metadataMap, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5; | ||
if (isStatic ? (base = Class, metadataMap = staticMetadataMap, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, metadataMap = protoMetadataMap, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
function old_applyMemberDecs(e, t, a, r, o) { | ||
for (var i, n, l = new Map(), s = new Map(), c = 0; c < o.length; c++) { | ||
var d = o[c]; | ||
if (Array.isArray(d)) { | ||
var u, | ||
f, | ||
p, | ||
v = d[1], | ||
h = d[2], | ||
y = d.length > 3, | ||
b = v >= 5; | ||
if (b ? (u = t, f = r, 0 !== (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !y) { | ||
var g = b ? s : l, | ||
m = g.get(h) || 0; | ||
if (!0 === m || 3 === m && 4 !== v || 4 === m && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
!m && v > 2 ? g.set(h, v) : g.set(h, !0); | ||
} | ||
old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers); | ||
old_applyMemberDec(e, u, d, h, v, b, y, f, p); | ||
} | ||
} | ||
old_pushInitializers(ret, protoInitializers), old_pushInitializers(ret, staticInitializers); | ||
old_pushInitializers(e, i), old_pushInitializers(e, n); | ||
} | ||
function old_pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function old_pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var a = 0; a < t.length; a++) t[a].call(e); | ||
return e; | ||
}); | ||
} | ||
function old_applyClassDecs(ret, targetClass, metadataMap, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
function old_applyClassDecs(e, t, a, r) { | ||
if (r.length > 0) { | ||
for (var o = [], i = t, n = t.name, l = r.length - 1; l >= 0; l--) { | ||
var s = { | ||
v: !1 | ||
}; | ||
try { | ||
var ctx = Object.assign({ | ||
var c = Object.assign({ | ||
kind: "class", | ||
name: name, | ||
addInitializer: old_createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
}, old_createMetadataMethodsForProperty(metadataMap, 0, name, decoratorFinishedRef)), | ||
nextNewClass = classDecs[i](newClass, ctx); | ||
name: n, | ||
addInitializer: old_createAddInitializerMethod(o, s) | ||
}, old_createMetadataMethodsForProperty(a, 0, n, s)), | ||
d = r[l](i, c); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
s.v = !0; | ||
} | ||
void 0 !== nextNewClass && (old_assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== d && (old_assertValidReturnValue(10, d), i = d); | ||
} | ||
ret.push(newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
e.push(i, function () { | ||
for (var e = 0; e < o.length; e++) o[e].call(i); | ||
}); | ||
} | ||
} | ||
function applyDecs(targetClass, memberDecs, classDecs) { | ||
var ret = [], | ||
staticMetadataMap = {}, | ||
protoMetadataMap = {}; | ||
return old_applyMemberDecs(ret, targetClass, protoMetadataMap, staticMetadataMap, memberDecs), old_convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap), old_applyClassDecs(ret, targetClass, staticMetadataMap, classDecs), old_convertMetadataMapToFinal(targetClass, staticMetadataMap), ret; | ||
function applyDecs(e, t, a) { | ||
var r = [], | ||
o = {}, | ||
i = {}; | ||
return old_applyMemberDecs(r, e, i, o, t), old_convertMetadataMapToFinal(e.prototype, i), old_applyClassDecs(r, e, o, a), old_convertMetadataMapToFinal(e, o), r; | ||
} | ||
module.exports = applyDecs, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _typeof = require("./typeof.js")["default"]; | ||
function applyDecs2203Factory() { | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
!function (decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, a, n, i, s, o) { | ||
var c; | ||
switch (n) { | ||
case 1: | ||
kindStr = "accessor"; | ||
c = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
c = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
c = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
c = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
c = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var l, | ||
u, | ||
f = { | ||
kind: c, | ||
name: s ? "#" + t : t, | ||
"static": i, | ||
"private": s | ||
}, | ||
decoratorFinishedRef = { | ||
p = { | ||
v: !1 | ||
}; | ||
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() { | ||
return this[name]; | ||
}, set = function set(v) { | ||
this[name] = v; | ||
}) : 2 === kind ? get = function get() { | ||
return desc.value; | ||
} : (1 !== kind && 3 !== kind || (get = function get() { | ||
return desc.get.call(this); | ||
}), 1 !== kind && 4 !== kind || (set = function set(v) { | ||
desc.set.call(this, v); | ||
})), ctx.access = get && set ? { | ||
get: get, | ||
set: set | ||
} : get ? { | ||
get: get | ||
0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() { | ||
return this[t]; | ||
}, u = function u(e) { | ||
this[t] = e; | ||
}) : 2 === n ? l = function l() { | ||
return r.value; | ||
} : (1 !== n && 3 !== n || (l = function l() { | ||
return r.get.call(this); | ||
}), 1 !== n && 4 !== n || (u = function u(e) { | ||
r.set.call(this, e); | ||
})), f.access = l && u ? { | ||
get: l, | ||
set: u | ||
} : l ? { | ||
get: l | ||
} : { | ||
set: set | ||
set: u | ||
}; | ||
try { | ||
return dec(value, ctx); | ||
return e(o, f); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
p.v = !0; | ||
} | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var a; | ||
throw a = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(a + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) { | ||
var desc, | ||
init, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: decInfo[3], | ||
set: decInfo[4] | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function applyMemberDec(e, t, r, a, n, i, s, o) { | ||
var c, | ||
l, | ||
u, | ||
f, | ||
p, | ||
d, | ||
h = r[0]; | ||
if (s ? c = 0 === n || 1 === n ? { | ||
get: r[3], | ||
set: r[4] | ||
} : 3 === n ? { | ||
get: r[3] | ||
} : 4 === n ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u))) assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === n || 1 === n) { | ||
if (void 0 === l) l = function l(e, t) { | ||
return t; | ||
};else if ("function" != typeof l) { | ||
var y = l; | ||
l = function l(e, t) { | ||
for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var m = l; | ||
l = function l(e, t) { | ||
return m.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(l); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === n ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
}) : Object.defineProperty(t, a, c)); | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
return function (targetClass, memberDecs, classDecs) { | ||
var ret = []; | ||
return function (ret, Class, decInfos) { | ||
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5; | ||
if (isStatic ? (base = Class, 0 != (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
return function (e, t, r) { | ||
var a = []; | ||
return function (e, t, r) { | ||
for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) { | ||
var c = r[o]; | ||
if (Array.isArray(c)) { | ||
var l, | ||
u, | ||
f = c[1], | ||
p = c[2], | ||
d = c.length > 3, | ||
h = f >= 5; | ||
if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) { | ||
var v = h ? s : i, | ||
g = v.get(p) || 0; | ||
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); | ||
!g && f > 2 ? v.set(p, f) : v.set(p, !0); | ||
} | ||
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers); | ||
applyMemberDec(e, l, c, p, f, h, d, u); | ||
} | ||
} | ||
pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers); | ||
}(ret, targetClass, memberDecs), function (ret, targetClass, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
pushInitializers(e, a), pushInitializers(e, n); | ||
}(a, e, t), function (e, t, r) { | ||
if (r.length > 0) { | ||
for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) { | ||
var o = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i](newClass, { | ||
var c = r[s](n, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: i, | ||
addInitializer: createAddInitializerMethod(a, o) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
o.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== c && (assertValidReturnValue(10, c), n = c); | ||
} | ||
ret.push(newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
e.push(n, function () { | ||
for (var e = 0; e < a.length; e++) a[e].call(n); | ||
}); | ||
} | ||
}(ret, targetClass, classDecs), ret; | ||
}(a, e, r), a; | ||
}; | ||
} | ||
var applyDecs2203Impl; | ||
function applyDecs2203(targetClass, memberDecs, classDecs) { | ||
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(targetClass, memberDecs, classDecs); | ||
function applyDecs2203(e, t, r) { | ||
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r); | ||
} | ||
module.exports = applyDecs2203, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _typeof = require("./typeof.js")["default"]; | ||
function applyDecs2203RFactory() { | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
!function (decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, n, a, i, s, o) { | ||
var c; | ||
switch (a) { | ||
case 1: | ||
kindStr = "accessor"; | ||
c = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
c = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
c = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
c = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
c = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var l, | ||
u, | ||
f = { | ||
kind: c, | ||
name: s ? "#" + t : t, | ||
"static": i, | ||
"private": s | ||
}, | ||
decoratorFinishedRef = { | ||
p = { | ||
v: !1 | ||
}; | ||
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() { | ||
return this[name]; | ||
}, set = function set(v) { | ||
this[name] = v; | ||
}) : 2 === kind ? get = function get() { | ||
return desc.value; | ||
} : (1 !== kind && 3 !== kind || (get = function get() { | ||
return desc.get.call(this); | ||
}), 1 !== kind && 4 !== kind || (set = function set(v) { | ||
desc.set.call(this, v); | ||
})), ctx.access = get && set ? { | ||
get: get, | ||
set: set | ||
} : get ? { | ||
get: get | ||
0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? s ? (l = r.get, u = r.set) : (l = function l() { | ||
return this[t]; | ||
}, u = function u(e) { | ||
this[t] = e; | ||
}) : 2 === a ? l = function l() { | ||
return r.value; | ||
} : (1 !== a && 3 !== a || (l = function l() { | ||
return r.get.call(this); | ||
}), 1 !== a && 4 !== a || (u = function u(e) { | ||
r.set.call(this, e); | ||
})), f.access = l && u ? { | ||
get: l, | ||
set: u | ||
} : l ? { | ||
get: l | ||
} : { | ||
set: set | ||
set: u | ||
}; | ||
try { | ||
return dec(value, ctx); | ||
return e(o, f); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
p.v = !0; | ||
} | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) { | ||
var desc, | ||
init, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: decInfo[3], | ||
set: decInfo[4] | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function applyMemberDec(e, t, r, n, a, i, s, o) { | ||
var c, | ||
l, | ||
u, | ||
f, | ||
p, | ||
d, | ||
h = r[0]; | ||
if (s ? c = 0 === a || 1 === a ? { | ||
get: r[3], | ||
set: r[4] | ||
} : 3 === a ? { | ||
get: r[3] | ||
} : 4 === a ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== a && (c = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? u = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === a ? u = c.value : 3 === a ? u = c.get : 4 === a && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, n, c, o, a, i, s, u)) && (assertValidReturnValue(a, f), 0 === a ? l = f : 1 === a ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], n, c, o, a, i, s, u))) assertValidReturnValue(a, f), 0 === a ? g = f : 1 === a ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === a || 1 === a) { | ||
if (void 0 === l) l = function l(e, t) { | ||
return t; | ||
};else if ("function" != typeof l) { | ||
var y = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < y.length; n++) r = y[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var m = l; | ||
l = function l(e, t) { | ||
return m.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(l); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== a && (1 === a ? (c.get = u.get, c.set = u.set) : 2 === a ? c.value = u : 3 === a ? c.get = u : 4 === a && (c.set = u), s ? 1 === a ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === a ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
}) : Object.defineProperty(t, n, c)); | ||
} | ||
function applyMemberDecs(Class, decInfos) { | ||
for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5; | ||
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
function applyMemberDecs(e, t) { | ||
for (var r, n, a = [], i = new Map(), s = new Map(), o = 0; o < t.length; o++) { | ||
var c = t[o]; | ||
if (Array.isArray(c)) { | ||
var l, | ||
u, | ||
f = c[1], | ||
p = c[2], | ||
d = c.length > 3, | ||
h = f >= 5; | ||
if (h ? (l = e, 0 !== (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { | ||
var v = h ? s : i, | ||
g = v.get(p) || 0; | ||
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); | ||
!g && f > 2 ? v.set(p, f) : v.set(p, !0); | ||
} | ||
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers); | ||
applyMemberDec(a, l, c, p, f, h, d, u); | ||
} | ||
} | ||
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret; | ||
return pushInitializers(a, r), pushInitializers(a, n), a; | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
return function (targetClass, memberDecs, classDecs) { | ||
return function (e, t, r) { | ||
return { | ||
e: applyMemberDecs(targetClass, memberDecs), | ||
e: applyMemberDecs(e, t), | ||
get c() { | ||
return function (targetClass, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
return function (e, t) { | ||
if (t.length > 0) { | ||
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { | ||
var s = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i](newClass, { | ||
var o = t[i](n, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: a, | ||
addInitializer: createAddInitializerMethod(r, s) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
s.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== o && (assertValidReturnValue(10, o), n = o); | ||
} | ||
return [newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
return [n, function () { | ||
for (var e = 0; e < r.length; e++) r[e].call(n); | ||
}]; | ||
} | ||
}(targetClass, classDecs); | ||
}(e, r); | ||
} | ||
@@ -188,5 +188,5 @@ }; | ||
} | ||
function applyDecs2203R(targetClass, memberDecs, classDecs) { | ||
return (module.exports = applyDecs2203R = applyDecs2203RFactory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(targetClass, memberDecs, classDecs); | ||
function applyDecs2203R(e, t, r) { | ||
return (module.exports = applyDecs2203R = applyDecs2203RFactory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r); | ||
} | ||
module.exports = applyDecs2203R, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _typeof = require("./typeof.js")["default"]; | ||
var checkInRHS = require("./checkInRHS.js"); | ||
function applyDecs2301Factory() { | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
!function (decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function assertInstanceIfPrivate(has, target) { | ||
if (!has(target)) throw new TypeError("Attempted to access private element on non-instance"); | ||
function assertInstanceIfPrivate(e, t) { | ||
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); | ||
} | ||
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, n, a, i, s, o, c) { | ||
var u; | ||
switch (a) { | ||
case 1: | ||
kindStr = "accessor"; | ||
u = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
u = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
u = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
u = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
u = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var l, | ||
f, | ||
p = { | ||
kind: u, | ||
name: s ? "#" + t : t, | ||
"static": i, | ||
"private": s | ||
}, | ||
decoratorFinishedRef = { | ||
d = { | ||
v: !1 | ||
}; | ||
if (0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate || 0 !== kind && 2 !== kind) { | ||
if (2 === kind) get = function get(target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.value; | ||
if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) { | ||
if (2 === a) l = function l(e) { | ||
return assertInstanceIfPrivate(c, e), r.value; | ||
};else { | ||
var t = 0 === kind || 1 === kind; | ||
(t || 3 === kind) && (get = isPrivate ? function (target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.get.call(target); | ||
} : function (target) { | ||
return desc.get.call(target); | ||
}), (t || 4 === kind) && (set = isPrivate ? function (target, value) { | ||
assertInstanceIfPrivate(hasPrivateBrand, target), desc.set.call(target, value); | ||
} : function (target, value) { | ||
desc.set.call(target, value); | ||
var h = 0 === a || 1 === a; | ||
(h || 3 === a) && (l = s ? function (e) { | ||
return assertInstanceIfPrivate(c, e), r.get.call(e); | ||
} : function (e) { | ||
return r.get.call(e); | ||
}), (h || 4 === a) && (f = s ? function (e, t) { | ||
assertInstanceIfPrivate(c, e), r.set.call(e, t); | ||
} : function (e, t) { | ||
r.set.call(e, t); | ||
}); | ||
} | ||
} else get = function get(target) { | ||
return target[name]; | ||
}, 0 === kind && (set = function set(target, v) { | ||
target[name] = v; | ||
} else l = function l(e) { | ||
return e[t]; | ||
}, 0 === a && (f = function f(e, r) { | ||
e[t] = r; | ||
}); | ||
var has = isPrivate ? hasPrivateBrand.bind() : function (target) { | ||
return name in target; | ||
var v = s ? c.bind() : function (e) { | ||
return t in e; | ||
}; | ||
ctx.access = get && set ? { | ||
get: get, | ||
set: set, | ||
has: has | ||
} : get ? { | ||
get: get, | ||
has: has | ||
p.access = l && f ? { | ||
get: l, | ||
set: f, | ||
has: v | ||
} : l ? { | ||
get: l, | ||
has: v | ||
} : { | ||
set: set, | ||
has: has | ||
set: f, | ||
has: v | ||
}; | ||
try { | ||
return dec(value, ctx); | ||
return e(o, p); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
d.v = !0; | ||
} | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function curryThis2(fn) { | ||
return function (value) { | ||
fn(this, value); | ||
function curryThis2(e) { | ||
return function (t) { | ||
e(this, t); | ||
}; | ||
} | ||
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand) { | ||
var desc, | ||
init, | ||
value, | ||
fn, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: (fn = decInfo[3], function () { | ||
return fn(this); | ||
function applyMemberDec(e, t, r, n, a, i, s, o, c) { | ||
var u, | ||
l, | ||
f, | ||
p, | ||
d, | ||
h, | ||
v, | ||
g = r[0]; | ||
if (s ? u = 0 === a || 1 === a ? { | ||
get: (p = r[3], function () { | ||
return p(this); | ||
}), | ||
set: curryThis2(decInfo[4]) | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
set: curryThis2(r[4]) | ||
} : 3 === a ? { | ||
get: r[3] | ||
} : 4 === a ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? f = { | ||
get: u.get, | ||
set: u.set | ||
} : 2 === a ? f = u.value : 3 === a ? f = u.get : 4 === a && (f = u.set), "function" == typeof g) void 0 !== (d = memberDec(g, n, u, o, a, i, s, f, c)) && (assertValidReturnValue(a, d), 0 === a ? l = d : 1 === a ? (l = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d);else for (var y = g.length - 1; y >= 0; y--) { | ||
var m; | ||
if (void 0 !== (d = memberDec(g[y], n, u, o, a, i, s, f, c))) assertValidReturnValue(a, d), 0 === a ? m = d : 1 === a ? (m = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d, void 0 !== m && (void 0 === l ? l = m : "function" == typeof l ? l = [l, m] : l.push(m)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === a || 1 === a) { | ||
if (void 0 === l) l = function l(e, t) { | ||
return t; | ||
};else if ("function" != typeof l) { | ||
var b = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < b.length; n++) r = b[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var I = l; | ||
l = function l(e, t) { | ||
return I.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(l); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== a && (1 === a ? (u.get = f.get, u.set = f.set) : 2 === a ? u.value = f : 3 === a ? u.get = f : 4 === a && (u.set = f), s ? 1 === a ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return f.set.call(e, t); | ||
})) : 2 === a ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
}) : Object.defineProperty(t, n, u)); | ||
} | ||
function applyMemberDecs(Class, decInfos, instanceBrand) { | ||
for (var protoInitializers, staticInitializers, staticBrand, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5, | ||
hasPrivateBrand = instanceBrand; | ||
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || []), isPrivate && !staticBrand && (staticBrand = function staticBrand(_) { | ||
return checkInRHS(_) === Class; | ||
}), hasPrivateBrand = staticBrand) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
function applyMemberDecs(e, t, r) { | ||
for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) { | ||
var l = t[u]; | ||
if (Array.isArray(l)) { | ||
var f, | ||
p, | ||
d = l[1], | ||
h = l[2], | ||
v = l.length > 3, | ||
g = d >= 5, | ||
y = r; | ||
if (g ? (f = e, 0 !== (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { | ||
return checkInRHS(t) === e; | ||
}), y = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { | ||
var m = g ? c : o, | ||
b = m.get(h) || 0; | ||
if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
!b && d > 2 ? m.set(h, d) : m.set(h, !0); | ||
} | ||
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand); | ||
applyMemberDec(s, f, l, h, d, g, v, p, y); | ||
} | ||
} | ||
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret; | ||
return pushInitializers(s, n), pushInitializers(s, a), s; | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
return function (targetClass, memberDecs, classDecs, instanceBrand) { | ||
return function (e, t, r, n) { | ||
return { | ||
e: applyMemberDecs(targetClass, memberDecs, instanceBrand), | ||
e: applyMemberDecs(e, t, n), | ||
get c() { | ||
return function (targetClass, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
return function (e, t) { | ||
if (t.length > 0) { | ||
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { | ||
var s = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i](newClass, { | ||
var o = t[i](n, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: a, | ||
addInitializer: createAddInitializerMethod(r, s) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
s.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== o && (assertValidReturnValue(10, o), n = o); | ||
} | ||
return [newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
return [n, function () { | ||
for (var e = 0; e < r.length; e++) r[e].call(n); | ||
}]; | ||
} | ||
}(targetClass, classDecs); | ||
}(e, r); | ||
} | ||
@@ -219,5 +219,5 @@ }; | ||
} | ||
function applyDecs2301(targetClass, memberDecs, classDecs, instanceBrand) { | ||
return (module.exports = applyDecs2301 = applyDecs2301Factory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(targetClass, memberDecs, classDecs, instanceBrand); | ||
function applyDecs2301(e, t, r, n) { | ||
return (module.exports = applyDecs2301 = applyDecs2301Factory(), module.exports.__esModule = true, module.exports["default"] = module.exports)(e, t, r, n); | ||
} | ||
module.exports = applyDecs2301, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _typeof = require("./typeof.js")["default"]; | ||
var checkInRHS = require("./checkInRHS.js"); | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
assertNotFinished(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function assertInstanceIfPrivate(has, target) { | ||
if (!has(target)) throw new TypeError("Attempted to access private element on non-instance"); | ||
function assertInstanceIfPrivate(e, t) { | ||
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); | ||
} | ||
function memberDec(dec, thisArg, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, n, a, i, s, o, c, l) { | ||
var u; | ||
switch (i) { | ||
case 1: | ||
kindStr = "accessor"; | ||
u = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
u = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
u = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
u = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
u = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var f, | ||
d, | ||
p = { | ||
kind: u, | ||
name: o ? "#" + r : r, | ||
"static": s, | ||
"private": o | ||
}, | ||
decoratorFinishedRef = { | ||
h = { | ||
v: !1 | ||
}; | ||
if (0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate || 0 !== kind && 2 !== kind) { | ||
if (2 === kind) get = function get(target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.value; | ||
if (0 !== i && (p.addInitializer = createAddInitializerMethod(a, h)), o || 0 !== i && 2 !== i) { | ||
if (2 === i) f = function f(e) { | ||
return assertInstanceIfPrivate(l, e), n.value; | ||
};else { | ||
var t = 0 === kind || 1 === kind; | ||
(t || 3 === kind) && (get = isPrivate ? function (target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.get.call(target); | ||
} : function (target) { | ||
return desc.get.call(target); | ||
}), (t || 4 === kind) && (set = isPrivate ? function (target, value) { | ||
assertInstanceIfPrivate(hasPrivateBrand, target), desc.set.call(target, value); | ||
} : function (target, value) { | ||
desc.set.call(target, value); | ||
var v = 0 === i || 1 === i; | ||
(v || 3 === i) && (f = o ? function (e) { | ||
return assertInstanceIfPrivate(l, e), n.get.call(e); | ||
} : function (e) { | ||
return n.get.call(e); | ||
}), (v || 4 === i) && (d = o ? function (e, t) { | ||
assertInstanceIfPrivate(l, e), n.set.call(e, t); | ||
} : function (e, t) { | ||
n.set.call(e, t); | ||
}); | ||
} | ||
} else get = function get(target) { | ||
return target[name]; | ||
}, 0 === kind && (set = function set(target, v) { | ||
target[name] = v; | ||
} else f = function f(e) { | ||
return e[r]; | ||
}, 0 === i && (d = function d(e, t) { | ||
e[r] = t; | ||
}); | ||
var has = isPrivate ? hasPrivateBrand.bind() : function (target) { | ||
return name in target; | ||
var y = o ? l.bind() : function (e) { | ||
return r in e; | ||
}; | ||
ctx.access = get && set ? { | ||
get: get, | ||
set: set, | ||
has: has | ||
} : get ? { | ||
get: get, | ||
has: has | ||
p.access = f && d ? { | ||
get: f, | ||
set: d, | ||
has: y | ||
} : f ? { | ||
get: f, | ||
has: y | ||
} : { | ||
set: set, | ||
has: has | ||
set: d, | ||
has: y | ||
}; | ||
try { | ||
return dec.call(thisArg, value, ctx); | ||
return e.call(t, c, p); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
h.v = !0; | ||
} | ||
} | ||
function assertNotFinished(decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
function assertNotFinished(e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 5 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 5 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function curryThis1(fn) { | ||
function curryThis1(e) { | ||
return function () { | ||
return fn(this); | ||
return e(this); | ||
}; | ||
} | ||
function curryThis2(fn) { | ||
return function (value) { | ||
fn(this, value); | ||
function curryThis2(e) { | ||
return function (t) { | ||
e(this, t); | ||
}; | ||
} | ||
function applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand) { | ||
var desc, | ||
init, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
decoratorsHaveThis || Array.isArray(decs) || (decs = [decs]), isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: curryThis1(decInfo[3]), | ||
set: curryThis2(decInfo[4]) | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function applyMemberDec(e, t, r, n, a, i, s, o, c, l) { | ||
var u, | ||
f, | ||
d, | ||
p, | ||
h, | ||
v, | ||
y = r[0]; | ||
n || Array.isArray(y) || (y = [y]), o ? u = 0 === i || 1 === i ? { | ||
get: curryThis1(r[3]), | ||
set: curryThis2(r[4]) | ||
} : 3 === i ? { | ||
get: r[3] | ||
} : 4 === i ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set); | ||
for (var inc = decoratorsHaveThis ? 2 : 1, i = decs.length - 1; i >= 0; i -= inc) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], decoratorsHaveThis ? decs[i - 1] : void 0, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== i && (u = Object.getOwnPropertyDescriptor(t, a)), 1 === i ? d = { | ||
get: u.get, | ||
set: u.set | ||
} : 2 === i ? d = u.value : 3 === i ? d = u.get : 4 === i && (d = u.set); | ||
for (var g = n ? 2 : 1, m = y.length - 1; m >= 0; m -= g) { | ||
var b; | ||
if (void 0 !== (p = memberDec(y[m], n ? y[m - 1] : void 0, a, u, c, i, s, o, d, l))) assertValidReturnValue(i, p), 0 === i ? b = p : 1 === i ? (b = p.init, h = p.get || d.get, v = p.set || d.set, d = { | ||
get: h, | ||
set: v | ||
}) : d = p, void 0 !== b && (void 0 === f ? f = b : "function" == typeof f ? f = [f, b] : f.push(b)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = ownInitializers.length - 1; i >= 0; i--) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === i || 1 === i) { | ||
if (void 0 === f) f = function f(e, t) { | ||
return t; | ||
};else if ("function" != typeof f) { | ||
var I = f; | ||
f = function f(e, t) { | ||
for (var r = t, n = I.length - 1; n >= 0; n--) r = I[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var w = f; | ||
f = function f(e, t) { | ||
return w.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(f); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== i && (1 === i ? (u.get = d.get, u.set = d.set) : 2 === i ? u.value = d : 3 === i ? u.get = d : 4 === i && (u.set = d), o ? 1 === i ? (e.push(function (e, t) { | ||
return d.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return d.set.call(e, t); | ||
})) : 2 === i ? e.push(d) : e.push(function (e, t) { | ||
return d.call(e, t); | ||
}) : Object.defineProperty(t, a, u)); | ||
} | ||
function applyMemberDecs(Class, decInfos, instanceBrand) { | ||
for (var protoInitializers, staticInitializers, staticBrand, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
decoratorsHaveThis = 16 & kind, | ||
isStatic = !!(8 & kind), | ||
hasPrivateBrand = instanceBrand; | ||
if (kind &= 7, isStatic ? (base = Class, 0 !== kind && (initializers = staticInitializers = staticInitializers || []), isPrivate && !staticBrand && (staticBrand = function staticBrand(_) { | ||
return checkInRHS(_) === Class; | ||
}), hasPrivateBrand = staticBrand) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
existingNonFields.set(name, !(!existingKind && kind > 2) || kind); | ||
function applyMemberDecs(e, t, r) { | ||
for (var n, a, i, s = [], o = new Map(), c = new Map(), l = 0; l < t.length; l++) { | ||
var u = t[l]; | ||
if (Array.isArray(u)) { | ||
var f, | ||
d, | ||
p = u[1], | ||
h = u[2], | ||
v = u.length > 3, | ||
y = 16 & p, | ||
g = !!(8 & p), | ||
m = r; | ||
if (p &= 7, g ? (f = e, 0 !== p && (d = a = a || []), v && !i && (i = function i(t) { | ||
return checkInRHS(t) === e; | ||
}), m = i) : (f = e.prototype, 0 !== p && (d = n = n || [])), 0 !== p && !v) { | ||
var b = g ? c : o, | ||
I = b.get(h) || 0; | ||
if (!0 === I || 3 === I && 4 !== p || 4 === I && 3 !== p) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
b.set(h, !(!I && p > 2) || p); | ||
} | ||
applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand); | ||
applyMemberDec(s, f, u, y, h, p, g, v, d, m); | ||
} | ||
} | ||
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret; | ||
return pushInitializers(s, n), pushInitializers(s, a), s; | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
function applyClassDecs(targetClass, classDecs, decoratorsHaveThis) { | ||
if (classDecs.length) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, inc = decoratorsHaveThis ? 2 : 1, i = classDecs.length - 1; i >= 0; i -= inc) { | ||
var decoratorFinishedRef = { | ||
function applyClassDecs(e, t, r) { | ||
if (t.length) { | ||
for (var n = [], a = e, i = e.name, s = r ? 2 : 1, o = t.length - 1; o >= 0; o -= s) { | ||
var c = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i].call(decoratorsHaveThis ? classDecs[i - 1] : void 0, newClass, { | ||
var l = t[o].call(r ? t[o - 1] : void 0, a, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: i, | ||
addInitializer: createAddInitializerMethod(n, c) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
c.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(5, nextNewClass), newClass = nextNewClass); | ||
void 0 !== l && (assertValidReturnValue(5, l), a = l); | ||
} | ||
return [newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
return [a, function () { | ||
for (var e = 0; e < n.length; e++) n[e].call(a); | ||
}]; | ||
} | ||
} | ||
function applyDecs2305(targetClass, memberDecs, classDecs, classDecsHaveThis, instanceBrand) { | ||
function applyDecs2305(e, t, r, n, a) { | ||
return { | ||
e: applyMemberDecs(targetClass, memberDecs, instanceBrand), | ||
e: applyMemberDecs(e, t, a), | ||
get c() { | ||
return applyClassDecs(targetClass, classDecs, classDecsHaveThis); | ||
return applyClassDecs(e, r, n); | ||
} | ||
@@ -218,0 +218,0 @@ }; |
var OverloadYield = require("./OverloadYield.js"); | ||
function AsyncGenerator(gen) { | ||
var front, back; | ||
function resume(key, arg) { | ||
function AsyncGenerator(e) { | ||
var r, t; | ||
function resume(r, t) { | ||
try { | ||
var result = gen[key](arg), | ||
value = result.value, | ||
overloaded = value instanceof OverloadYield; | ||
Promise.resolve(overloaded ? value.v : value).then(function (arg) { | ||
if (overloaded) { | ||
var nextKey = "return" === key ? "return" : "next"; | ||
if (!value.k || arg.done) return resume(nextKey, arg); | ||
arg = gen[nextKey](arg).value; | ||
var n = e[r](t), | ||
o = n.value, | ||
u = o instanceof OverloadYield; | ||
Promise.resolve(u ? o.v : o).then(function (t) { | ||
if (u) { | ||
var i = "return" === r ? "return" : "next"; | ||
if (!o.k || t.done) return resume(i, t); | ||
t = e[i](t).value; | ||
} | ||
settle(result.done ? "return" : "normal", arg); | ||
}, function (err) { | ||
resume("throw", err); | ||
settle(n.done ? "return" : "normal", t); | ||
}, function (e) { | ||
resume("throw", e); | ||
}); | ||
} catch (err) { | ||
settle("throw", err); | ||
} catch (e) { | ||
settle("throw", e); | ||
} | ||
} | ||
function settle(type, value) { | ||
switch (type) { | ||
function settle(e, n) { | ||
switch (e) { | ||
case "return": | ||
front.resolve({ | ||
value: value, | ||
r.resolve({ | ||
value: n, | ||
done: !0 | ||
@@ -32,34 +32,34 @@ }); | ||
case "throw": | ||
front.reject(value); | ||
r.reject(n); | ||
break; | ||
default: | ||
front.resolve({ | ||
value: value, | ||
r.resolve({ | ||
value: n, | ||
done: !1 | ||
}); | ||
} | ||
(front = front.next) ? resume(front.key, front.arg) : back = null; | ||
(r = r.next) ? resume(r.key, r.arg) : t = null; | ||
} | ||
this._invoke = function (key, arg) { | ||
return new Promise(function (resolve, reject) { | ||
var request = { | ||
key: key, | ||
arg: arg, | ||
resolve: resolve, | ||
reject: reject, | ||
this._invoke = function (e, n) { | ||
return new Promise(function (o, u) { | ||
var i = { | ||
key: e, | ||
arg: n, | ||
resolve: o, | ||
reject: u, | ||
next: null | ||
}; | ||
back ? back = back.next = request : (front = back = request, resume(key, arg)); | ||
t ? t = t.next = i : (r = t = i, resume(e, n)); | ||
}); | ||
}, "function" != typeof gen["return"] && (this["return"] = void 0); | ||
}, "function" != typeof e["return"] && (this["return"] = void 0); | ||
} | ||
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { | ||
return this; | ||
}, AsyncGenerator.prototype.next = function (arg) { | ||
return this._invoke("next", arg); | ||
}, AsyncGenerator.prototype["throw"] = function (arg) { | ||
return this._invoke("throw", arg); | ||
}, AsyncGenerator.prototype["return"] = function (arg) { | ||
return this._invoke("return", arg); | ||
}, AsyncGenerator.prototype.next = function (e) { | ||
return this._invoke("next", e); | ||
}, AsyncGenerator.prototype["throw"] = function (e) { | ||
return this._invoke("throw", e); | ||
}, AsyncGenerator.prototype["return"] = function (e) { | ||
return this._invoke("return", e); | ||
}; | ||
module.exports = AsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var OverloadYield = require("./OverloadYield.js"); | ||
function _asyncGeneratorDelegate(inner) { | ||
var iter = {}, | ||
waiting = !1; | ||
function pump(key, value) { | ||
return waiting = !0, value = new Promise(function (resolve) { | ||
resolve(inner[key](value)); | ||
function _asyncGeneratorDelegate(t) { | ||
var e = {}, | ||
n = !1; | ||
function pump(e, r) { | ||
return n = !0, r = new Promise(function (n) { | ||
n(t[e](r)); | ||
}), { | ||
done: !1, | ||
value: new OverloadYield(value, 1) | ||
value: new OverloadYield(r, 1) | ||
}; | ||
} | ||
return iter["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { | ||
return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { | ||
return this; | ||
}, iter.next = function (value) { | ||
return waiting ? (waiting = !1, value) : pump("next", value); | ||
}, "function" == typeof inner["throw"] && (iter["throw"] = function (value) { | ||
if (waiting) throw waiting = !1, value; | ||
return pump("throw", value); | ||
}), "function" == typeof inner["return"] && (iter["return"] = function (value) { | ||
return waiting ? (waiting = !1, value) : pump("return", value); | ||
}), iter; | ||
}, e.next = function (t) { | ||
return n ? (n = !1, t) : pump("next", t); | ||
}, "function" == typeof t["throw"] && (e["throw"] = function (t) { | ||
if (n) throw n = !1, t; | ||
return pump("throw", t); | ||
}), "function" == typeof t["return"] && (e["return"] = function (t) { | ||
return n ? (n = !1, t) : pump("return", t); | ||
}), e; | ||
} | ||
module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -1,26 +0,26 @@ | ||
function _asyncIterator(iterable) { | ||
var method, | ||
async, | ||
sync, | ||
retry = 2; | ||
for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { | ||
if (async && null != (method = iterable[async])) return method.call(iterable); | ||
if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); | ||
async = "@@asyncIterator", sync = "@@iterator"; | ||
function _asyncIterator(r) { | ||
var n, | ||
t, | ||
o, | ||
e = 2; | ||
for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { | ||
if (t && null != (n = r[t])) return n.call(r); | ||
if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); | ||
t = "@@asyncIterator", o = "@@iterator"; | ||
} | ||
throw new TypeError("Object is not async iterable"); | ||
} | ||
function AsyncFromSyncIterator(s) { | ||
function AsyncFromSyncIterator(r) { | ||
function AsyncFromSyncIteratorContinuation(r) { | ||
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); | ||
var done = r.done; | ||
return Promise.resolve(r.value).then(function (value) { | ||
var n = r.done; | ||
return Promise.resolve(r.value).then(function (r) { | ||
return { | ||
value: value, | ||
done: done | ||
value: r, | ||
done: n | ||
}; | ||
}); | ||
} | ||
return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { | ||
this.s = s, this.n = s.next; | ||
return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { | ||
this.s = r, this.n = r.next; | ||
}, AsyncFromSyncIterator.prototype = { | ||
@@ -32,15 +32,15 @@ s: null, | ||
}, | ||
"return": function _return(value) { | ||
var ret = this.s["return"]; | ||
return void 0 === ret ? Promise.resolve({ | ||
value: value, | ||
"return": function _return(r) { | ||
var n = this.s["return"]; | ||
return void 0 === n ? Promise.resolve({ | ||
value: r, | ||
done: !0 | ||
}) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); | ||
}) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); | ||
}, | ||
"throw": function _throw(value) { | ||
var thr = this.s["return"]; | ||
return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); | ||
"throw": function _throw(r) { | ||
var n = this.s["return"]; | ||
return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); | ||
} | ||
}, new AsyncFromSyncIterator(s); | ||
}, new AsyncFromSyncIterator(r); | ||
} | ||
module.exports = _asyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var OverloadYield = require("./OverloadYield.js"); | ||
function _awaitAsyncGenerator(value) { | ||
return new OverloadYield(value, 0); | ||
function _awaitAsyncGenerator(e) { | ||
return new OverloadYield(e, 0); | ||
} | ||
module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _typeof = require("./typeof.js")["default"]; | ||
function _checkInRHS(value) { | ||
if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== value ? _typeof(value) : "null")); | ||
return value; | ||
function _checkInRHS(e) { | ||
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); | ||
return e; | ||
} | ||
module.exports = _checkInRHS, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -1,8 +0,8 @@ | ||
function _defineAccessor(type, obj, key, fn) { | ||
var desc = { | ||
function _defineAccessor(e, r, n, t) { | ||
var c = { | ||
configurable: !0, | ||
enumerable: !0 | ||
}; | ||
return desc[type] = fn, Object.defineProperty(obj, key, desc); | ||
return c[e] = t, Object.defineProperty(r, n, c); | ||
} | ||
module.exports = _defineAccessor, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -1,4 +0,4 @@ | ||
function dispose_SuppressedError(suppressed, error) { | ||
return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(suppressed, error) { | ||
this.suppressed = suppressed, this.error = error, this.stack = new Error().stack; | ||
function dispose_SuppressedError(r, e) { | ||
return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) { | ||
this.suppressed = r, this.error = e, this.stack = new Error().stack; | ||
}, dispose_SuppressedError.prototype = Object.create(Error.prototype, { | ||
@@ -10,17 +10,17 @@ constructor: { | ||
} | ||
})), new dispose_SuppressedError(suppressed, error); | ||
})), new dispose_SuppressedError(r, e); | ||
} | ||
function _dispose(stack, error, hasError) { | ||
function _dispose(r, e, s) { | ||
function next() { | ||
for (; stack.length > 0;) try { | ||
var r = stack.pop(), | ||
p = r.d.call(r.v); | ||
if (r.a) return Promise.resolve(p).then(next, err); | ||
} catch (e) { | ||
return err(e); | ||
for (; r.length > 0;) try { | ||
var o = r.pop(), | ||
p = o.d.call(o.v); | ||
if (o.a) return Promise.resolve(p).then(next, err); | ||
} catch (r) { | ||
return err(r); | ||
} | ||
if (hasError) throw error; | ||
if (s) throw e; | ||
} | ||
function err(e) { | ||
return error = hasError ? new dispose_SuppressedError(e, error) : e, hasError = !0, next(); | ||
function err(r) { | ||
return e = s ? new dispose_SuppressedError(r, e) : r, s = !0, next(); | ||
} | ||
@@ -27,0 +27,0 @@ return next(); |
import _typeof from "./typeof.js"; | ||
function old_createMetadataMethodsForProperty(metadataMap, kind, property, decoratorFinishedRef) { | ||
function old_createMetadataMethodsForProperty(e, t, a, r) { | ||
return { | ||
getMetadata: function getMetadata(key) { | ||
old_assertNotFinished(decoratorFinishedRef, "getMetadata"), old_assertMetadataKey(key); | ||
var metadataForKey = metadataMap[key]; | ||
if (void 0 !== metadataForKey) if (1 === kind) { | ||
var pub = metadataForKey["public"]; | ||
if (void 0 !== pub) return pub[property]; | ||
} else if (2 === kind) { | ||
var priv = metadataForKey["private"]; | ||
if (void 0 !== priv) return priv.get(property); | ||
} else if (Object.hasOwnProperty.call(metadataForKey, "constructor")) return metadataForKey.constructor; | ||
getMetadata: function getMetadata(o) { | ||
old_assertNotFinished(r, "getMetadata"), old_assertMetadataKey(o); | ||
var i = e[o]; | ||
if (void 0 !== i) if (1 === t) { | ||
var n = i["public"]; | ||
if (void 0 !== n) return n[a]; | ||
} else if (2 === t) { | ||
var l = i["private"]; | ||
if (void 0 !== l) return l.get(a); | ||
} else if (Object.hasOwnProperty.call(i, "constructor")) return i.constructor; | ||
}, | ||
setMetadata: function setMetadata(key, value) { | ||
old_assertNotFinished(decoratorFinishedRef, "setMetadata"), old_assertMetadataKey(key); | ||
var metadataForKey = metadataMap[key]; | ||
if (void 0 === metadataForKey && (metadataForKey = metadataMap[key] = {}), 1 === kind) { | ||
var pub = metadataForKey["public"]; | ||
void 0 === pub && (pub = metadataForKey["public"] = {}), pub[property] = value; | ||
} else if (2 === kind) { | ||
var priv = metadataForKey.priv; | ||
void 0 === priv && (priv = metadataForKey["private"] = new Map()), priv.set(property, value); | ||
} else metadataForKey.constructor = value; | ||
setMetadata: function setMetadata(o, i) { | ||
old_assertNotFinished(r, "setMetadata"), old_assertMetadataKey(o); | ||
var n = e[o]; | ||
if (void 0 === n && (n = e[o] = {}), 1 === t) { | ||
var l = n["public"]; | ||
void 0 === l && (l = n["public"] = {}), l[a] = i; | ||
} else if (2 === t) { | ||
var s = n.priv; | ||
void 0 === s && (s = n["private"] = new Map()), s.set(a, i); | ||
} else n.constructor = i; | ||
} | ||
}; | ||
} | ||
function old_convertMetadataMapToFinal(obj, metadataMap) { | ||
var parentMetadataMap = obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")], | ||
metadataKeys = Object.getOwnPropertySymbols(metadataMap); | ||
if (0 !== metadataKeys.length) { | ||
for (var i = 0; i < metadataKeys.length; i++) { | ||
var key = metadataKeys[i], | ||
metaForKey = metadataMap[key], | ||
parentMetaForKey = parentMetadataMap ? parentMetadataMap[key] : null, | ||
pub = metaForKey["public"], | ||
parentPub = parentMetaForKey ? parentMetaForKey["public"] : null; | ||
pub && parentPub && Object.setPrototypeOf(pub, parentPub); | ||
var priv = metaForKey["private"]; | ||
if (priv) { | ||
var privArr = Array.from(priv.values()), | ||
parentPriv = parentMetaForKey ? parentMetaForKey["private"] : null; | ||
parentPriv && (privArr = privArr.concat(parentPriv)), metaForKey["private"] = privArr; | ||
function old_convertMetadataMapToFinal(e, t) { | ||
var a = e[Symbol.metadata || Symbol["for"]("Symbol.metadata")], | ||
r = Object.getOwnPropertySymbols(t); | ||
if (0 !== r.length) { | ||
for (var o = 0; o < r.length; o++) { | ||
var i = r[o], | ||
n = t[i], | ||
l = a ? a[i] : null, | ||
s = n["public"], | ||
c = l ? l["public"] : null; | ||
s && c && Object.setPrototypeOf(s, c); | ||
var d = n["private"]; | ||
if (d) { | ||
var u = Array.from(d.values()), | ||
f = l ? l["private"] : null; | ||
f && (u = u.concat(f)), n["private"] = u; | ||
} | ||
parentMetaForKey && Object.setPrototypeOf(metaForKey, parentMetaForKey); | ||
l && Object.setPrototypeOf(n, l); | ||
} | ||
parentMetadataMap && Object.setPrototypeOf(metadataMap, parentMetadataMap), obj[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = metadataMap; | ||
a && Object.setPrototypeOf(t, a), e[Symbol.metadata || Symbol["for"]("Symbol.metadata")] = t; | ||
} | ||
} | ||
function old_createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
old_assertNotFinished(decoratorFinishedRef, "addInitializer"), old_assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function old_createAddInitializerMethod(e, t) { | ||
return function (a) { | ||
old_assertNotFinished(t, "addInitializer"), old_assertCallable(a, "An initializer"), e.push(a); | ||
}; | ||
} | ||
function old_memberDec(dec, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value) { | ||
var kindStr; | ||
switch (kind) { | ||
function old_memberDec(e, t, a, r, o, i, n, l, s) { | ||
var c; | ||
switch (i) { | ||
case 1: | ||
kindStr = "accessor"; | ||
c = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
c = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
c = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
c = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
c = "field"; | ||
} | ||
var metadataKind, | ||
metadataName, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
isStatic: isStatic, | ||
isPrivate: isPrivate | ||
var d, | ||
u, | ||
f = { | ||
kind: c, | ||
name: l ? "#" + t : t, | ||
isStatic: n, | ||
isPrivate: l | ||
}, | ||
decoratorFinishedRef = { | ||
p = { | ||
v: !1 | ||
}; | ||
if (0 !== kind && (ctx.addInitializer = old_createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate) { | ||
metadataKind = 2, metadataName = Symbol(name); | ||
var access = {}; | ||
0 === kind ? (access.get = desc.get, access.set = desc.set) : 2 === kind ? access.get = function () { | ||
return desc.value; | ||
} : (1 !== kind && 3 !== kind || (access.get = function () { | ||
return desc.get.call(this); | ||
}), 1 !== kind && 4 !== kind || (access.set = function (v) { | ||
desc.set.call(this, v); | ||
})), ctx.access = access; | ||
} else metadataKind = 1, metadataName = name; | ||
if (0 !== i && (f.addInitializer = old_createAddInitializerMethod(o, p)), l) { | ||
d = 2, u = Symbol(t); | ||
var v = {}; | ||
0 === i ? (v.get = a.get, v.set = a.set) : 2 === i ? v.get = function () { | ||
return a.value; | ||
} : (1 !== i && 3 !== i || (v.get = function () { | ||
return a.get.call(this); | ||
}), 1 !== i && 4 !== i || (v.set = function (e) { | ||
a.set.call(this, e); | ||
})), f.access = v; | ||
} else d = 1, u = t; | ||
try { | ||
return dec(value, Object.assign(ctx, old_createMetadataMethodsForProperty(metadataMap, metadataKind, metadataName, decoratorFinishedRef))); | ||
return e(s, Object.assign(f, old_createMetadataMethodsForProperty(r, d, u, p))); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
p.v = !0; | ||
} | ||
} | ||
function old_assertNotFinished(decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
function old_assertNotFinished(e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
} | ||
function old_assertMetadataKey(key) { | ||
if ("symbol" != _typeof(key)) throw new TypeError("Metadata keys must be symbols, received: " + key); | ||
function old_assertMetadataKey(e) { | ||
if ("symbol" != _typeof(e)) throw new TypeError("Metadata keys must be symbols, received: " + e); | ||
} | ||
function old_assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function old_assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function old_assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && old_assertCallable(value.get, "accessor.get"), void 0 !== value.set && old_assertCallable(value.set, "accessor.set"), void 0 !== value.init && old_assertCallable(value.init, "accessor.init"), void 0 !== value.initializer && old_assertCallable(value.initializer, "accessor.initializer"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function old_assertValidReturnValue(e, t) { | ||
var a = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== a || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && old_assertCallable(t.get, "accessor.get"), void 0 !== t.set && old_assertCallable(t.set, "accessor.set"), void 0 !== t.init && old_assertCallable(t.init, "accessor.init"), void 0 !== t.initializer && old_assertCallable(t.initializer, "accessor.initializer"); | ||
} else if ("function" !== a) { | ||
var r; | ||
throw r = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(r + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function old_getInit(desc) { | ||
var initializer; | ||
return null == (initializer = desc.init) && (initializer = desc.initializer) && "undefined" != typeof console && console.warn(".initializer has been renamed to .init as of March 2022"), initializer; | ||
function old_getInit(e) { | ||
var t; | ||
return null == (t = e.init) && (t = e.initializer) && "undefined" != typeof console && console.warn(".initializer has been renamed to .init as of March 2022"), t; | ||
} | ||
function old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers) { | ||
var desc, | ||
initializer, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: decInfo[3], | ||
set: decInfo[4] | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function old_applyMemberDec(e, t, a, r, o, i, n, l, s) { | ||
var c, | ||
d, | ||
u, | ||
f, | ||
p, | ||
v, | ||
h = a[0]; | ||
if (n ? c = 0 === o || 1 === o ? { | ||
get: a[3], | ||
set: a[4] | ||
} : 3 === o ? { | ||
get: a[3] | ||
} : 4 === o ? { | ||
set: a[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = old_memberDec(decs, name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value)) && (old_assertValidReturnValue(kind, newValue), 0 === kind ? initializer = newValue : 1 === kind ? (initializer = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = old_memberDec(decs[i], name, desc, metadataMap, initializers, kind, isStatic, isPrivate, value))) old_assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = old_getInit(newValue), get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === initializer ? initializer = newInit : "function" == typeof initializer ? initializer = [initializer, newInit] : initializer.push(newInit)); | ||
value: a[3] | ||
} : 0 !== o && (c = Object.getOwnPropertyDescriptor(t, r)), 1 === o ? u = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === o ? u = c.value : 3 === o ? u = c.get : 4 === o && (u = c.set), "function" == typeof h) void 0 !== (f = old_memberDec(h, r, c, l, s, o, i, n, u)) && (old_assertValidReturnValue(o, f), 0 === o ? d = f : 1 === o ? (d = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f);else for (var y = h.length - 1; y >= 0; y--) { | ||
var b; | ||
if (void 0 !== (f = old_memberDec(h[y], r, c, l, s, o, i, n, u))) old_assertValidReturnValue(o, f), 0 === o ? b = f : 1 === o ? (b = old_getInit(f), p = f.get || u.get, v = f.set || u.set, u = { | ||
get: p, | ||
set: v | ||
}) : u = f, void 0 !== b && (void 0 === d ? d = b : "function" == typeof d ? d = [d, b] : d.push(b)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === initializer) initializer = function initializer(instance, init) { | ||
return init; | ||
};else if ("function" != typeof initializer) { | ||
var ownInitializers = initializer; | ||
initializer = function initializer(instance, init) { | ||
for (var value = init, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === o || 1 === o) { | ||
if (void 0 === d) d = function d(e, t) { | ||
return t; | ||
};else if ("function" != typeof d) { | ||
var g = d; | ||
d = function d(e, t) { | ||
for (var a = t, r = 0; r < g.length; r++) a = g[r].call(e, a); | ||
return a; | ||
}; | ||
} else { | ||
var originalInitializer = initializer; | ||
initializer = function initializer(instance, init) { | ||
return originalInitializer.call(instance, init); | ||
var m = d; | ||
d = function d(e, t) { | ||
return m.call(e, t); | ||
}; | ||
} | ||
ret.push(initializer); | ||
e.push(d); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== o && (1 === o ? (c.get = u.get, c.set = u.set) : 2 === o ? c.value = u : 3 === o ? c.get = u : 4 === o && (c.set = u), n ? 1 === o ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === o ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
}) : Object.defineProperty(t, r, c)); | ||
} | ||
function old_applyMemberDecs(ret, Class, protoMetadataMap, staticMetadataMap, decInfos) { | ||
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
metadataMap, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5; | ||
if (isStatic ? (base = Class, metadataMap = staticMetadataMap, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, metadataMap = protoMetadataMap, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
function old_applyMemberDecs(e, t, a, r, o) { | ||
for (var i, n, l = new Map(), s = new Map(), c = 0; c < o.length; c++) { | ||
var d = o[c]; | ||
if (Array.isArray(d)) { | ||
var u, | ||
f, | ||
p, | ||
v = d[1], | ||
h = d[2], | ||
y = d.length > 3, | ||
b = v >= 5; | ||
if (b ? (u = t, f = r, 0 !== (v -= 5) && (p = n = n || [])) : (u = t.prototype, f = a, 0 !== v && (p = i = i || [])), 0 !== v && !y) { | ||
var g = b ? s : l, | ||
m = g.get(h) || 0; | ||
if (!0 === m || 3 === m && 4 !== v || 4 === m && 3 !== v) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
!m && v > 2 ? g.set(h, v) : g.set(h, !0); | ||
} | ||
old_applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers); | ||
old_applyMemberDec(e, u, d, h, v, b, y, f, p); | ||
} | ||
} | ||
old_pushInitializers(ret, protoInitializers), old_pushInitializers(ret, staticInitializers); | ||
old_pushInitializers(e, i), old_pushInitializers(e, n); | ||
} | ||
function old_pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function old_pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var a = 0; a < t.length; a++) t[a].call(e); | ||
return e; | ||
}); | ||
} | ||
function old_applyClassDecs(ret, targetClass, metadataMap, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
function old_applyClassDecs(e, t, a, r) { | ||
if (r.length > 0) { | ||
for (var o = [], i = t, n = t.name, l = r.length - 1; l >= 0; l--) { | ||
var s = { | ||
v: !1 | ||
}; | ||
try { | ||
var ctx = Object.assign({ | ||
var c = Object.assign({ | ||
kind: "class", | ||
name: name, | ||
addInitializer: old_createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
}, old_createMetadataMethodsForProperty(metadataMap, 0, name, decoratorFinishedRef)), | ||
nextNewClass = classDecs[i](newClass, ctx); | ||
name: n, | ||
addInitializer: old_createAddInitializerMethod(o, s) | ||
}, old_createMetadataMethodsForProperty(a, 0, n, s)), | ||
d = r[l](i, c); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
s.v = !0; | ||
} | ||
void 0 !== nextNewClass && (old_assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== d && (old_assertValidReturnValue(10, d), i = d); | ||
} | ||
ret.push(newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
e.push(i, function () { | ||
for (var e = 0; e < o.length; e++) o[e].call(i); | ||
}); | ||
} | ||
} | ||
export default function applyDecs(targetClass, memberDecs, classDecs) { | ||
var ret = [], | ||
staticMetadataMap = {}, | ||
protoMetadataMap = {}; | ||
return old_applyMemberDecs(ret, targetClass, protoMetadataMap, staticMetadataMap, memberDecs), old_convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap), old_applyClassDecs(ret, targetClass, staticMetadataMap, classDecs), old_convertMetadataMapToFinal(targetClass, staticMetadataMap), ret; | ||
export default function applyDecs(e, t, a) { | ||
var r = [], | ||
o = {}, | ||
i = {}; | ||
return old_applyMemberDecs(r, e, i, o, t), old_convertMetadataMapToFinal(e.prototype, i), old_applyClassDecs(r, e, o, a), old_convertMetadataMapToFinal(e, o), r; | ||
} |
import _typeof from "./typeof.js"; | ||
function applyDecs2203Factory() { | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
!function (decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, a, n, i, s, o) { | ||
var c; | ||
switch (n) { | ||
case 1: | ||
kindStr = "accessor"; | ||
c = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
c = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
c = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
c = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
c = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var l, | ||
u, | ||
f = { | ||
kind: c, | ||
name: s ? "#" + t : t, | ||
"static": i, | ||
"private": s | ||
}, | ||
decoratorFinishedRef = { | ||
p = { | ||
v: !1 | ||
}; | ||
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() { | ||
return this[name]; | ||
}, set = function set(v) { | ||
this[name] = v; | ||
}) : 2 === kind ? get = function get() { | ||
return desc.value; | ||
} : (1 !== kind && 3 !== kind || (get = function get() { | ||
return desc.get.call(this); | ||
}), 1 !== kind && 4 !== kind || (set = function set(v) { | ||
desc.set.call(this, v); | ||
})), ctx.access = get && set ? { | ||
get: get, | ||
set: set | ||
} : get ? { | ||
get: get | ||
0 !== n && (f.addInitializer = createAddInitializerMethod(a, p)), 0 === n ? s ? (l = r.get, u = r.set) : (l = function l() { | ||
return this[t]; | ||
}, u = function u(e) { | ||
this[t] = e; | ||
}) : 2 === n ? l = function l() { | ||
return r.value; | ||
} : (1 !== n && 3 !== n || (l = function l() { | ||
return r.get.call(this); | ||
}), 1 !== n && 4 !== n || (u = function u(e) { | ||
r.set.call(this, e); | ||
})), f.access = l && u ? { | ||
get: l, | ||
set: u | ||
} : l ? { | ||
get: l | ||
} : { | ||
set: set | ||
set: u | ||
}; | ||
try { | ||
return dec(value, ctx); | ||
return e(o, f); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
p.v = !0; | ||
} | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var a; | ||
throw a = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(a + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) { | ||
var desc, | ||
init, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: decInfo[3], | ||
set: decInfo[4] | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function applyMemberDec(e, t, r, a, n, i, s, o) { | ||
var c, | ||
l, | ||
u, | ||
f, | ||
p, | ||
d, | ||
h = r[0]; | ||
if (s ? c = 0 === n || 1 === n ? { | ||
get: r[3], | ||
set: r[4] | ||
} : 3 === n ? { | ||
get: r[3] | ||
} : 4 === n ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== n && (c = Object.getOwnPropertyDescriptor(t, a)), 1 === n ? u = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === n ? u = c.value : 3 === n ? u = c.get : 4 === n && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, a, c, o, n, i, s, u)) && (assertValidReturnValue(n, f), 0 === n ? l = f : 1 === n ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], a, c, o, n, i, s, u))) assertValidReturnValue(n, f), 0 === n ? g = f : 1 === n ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === n || 1 === n) { | ||
if (void 0 === l) l = function l(e, t) { | ||
return t; | ||
};else if ("function" != typeof l) { | ||
var y = l; | ||
l = function l(e, t) { | ||
for (var r = t, a = 0; a < y.length; a++) r = y[a].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var m = l; | ||
l = function l(e, t) { | ||
return m.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(l); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== n && (1 === n ? (c.get = u.get, c.set = u.set) : 2 === n ? c.value = u : 3 === n ? c.get = u : 4 === n && (c.set = u), s ? 1 === n ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === n ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
}) : Object.defineProperty(t, a, c)); | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
return function (targetClass, memberDecs, classDecs) { | ||
var ret = []; | ||
return function (ret, Class, decInfos) { | ||
for (var protoInitializers, staticInitializers, existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5; | ||
if (isStatic ? (base = Class, 0 != (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
return function (e, t, r) { | ||
var a = []; | ||
return function (e, t, r) { | ||
for (var a, n, i = new Map(), s = new Map(), o = 0; o < r.length; o++) { | ||
var c = r[o]; | ||
if (Array.isArray(c)) { | ||
var l, | ||
u, | ||
f = c[1], | ||
p = c[2], | ||
d = c.length > 3, | ||
h = f >= 5; | ||
if (h ? (l = t, 0 != (f -= 5) && (u = n = n || [])) : (l = t.prototype, 0 !== f && (u = a = a || [])), 0 !== f && !d) { | ||
var v = h ? s : i, | ||
g = v.get(p) || 0; | ||
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); | ||
!g && f > 2 ? v.set(p, f) : v.set(p, !0); | ||
} | ||
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers); | ||
applyMemberDec(e, l, c, p, f, h, d, u); | ||
} | ||
} | ||
pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers); | ||
}(ret, targetClass, memberDecs), function (ret, targetClass, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
pushInitializers(e, a), pushInitializers(e, n); | ||
}(a, e, t), function (e, t, r) { | ||
if (r.length > 0) { | ||
for (var a = [], n = t, i = t.name, s = r.length - 1; s >= 0; s--) { | ||
var o = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i](newClass, { | ||
var c = r[s](n, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: i, | ||
addInitializer: createAddInitializerMethod(a, o) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
o.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== c && (assertValidReturnValue(10, c), n = c); | ||
} | ||
ret.push(newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
e.push(n, function () { | ||
for (var e = 0; e < a.length; e++) a[e].call(n); | ||
}); | ||
} | ||
}(ret, targetClass, classDecs), ret; | ||
}(a, e, r), a; | ||
}; | ||
} | ||
var applyDecs2203Impl; | ||
export default function applyDecs2203(targetClass, memberDecs, classDecs) { | ||
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(targetClass, memberDecs, classDecs); | ||
export default function applyDecs2203(e, t, r) { | ||
return (applyDecs2203Impl = applyDecs2203Impl || applyDecs2203Factory())(e, t, r); | ||
} |
import _typeof from "./typeof.js"; | ||
function applyDecs2203RFactory() { | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
!function (decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, n, a, i, s, o) { | ||
var c; | ||
switch (a) { | ||
case 1: | ||
kindStr = "accessor"; | ||
c = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
c = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
c = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
c = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
c = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var l, | ||
u, | ||
f = { | ||
kind: c, | ||
name: s ? "#" + t : t, | ||
"static": i, | ||
"private": s | ||
}, | ||
decoratorFinishedRef = { | ||
p = { | ||
v: !1 | ||
}; | ||
0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), 0 === kind ? isPrivate ? (get = desc.get, set = desc.set) : (get = function get() { | ||
return this[name]; | ||
}, set = function set(v) { | ||
this[name] = v; | ||
}) : 2 === kind ? get = function get() { | ||
return desc.value; | ||
} : (1 !== kind && 3 !== kind || (get = function get() { | ||
return desc.get.call(this); | ||
}), 1 !== kind && 4 !== kind || (set = function set(v) { | ||
desc.set.call(this, v); | ||
})), ctx.access = get && set ? { | ||
get: get, | ||
set: set | ||
} : get ? { | ||
get: get | ||
0 !== a && (f.addInitializer = createAddInitializerMethod(n, p)), 0 === a ? s ? (l = r.get, u = r.set) : (l = function l() { | ||
return this[t]; | ||
}, u = function u(e) { | ||
this[t] = e; | ||
}) : 2 === a ? l = function l() { | ||
return r.value; | ||
} : (1 !== a && 3 !== a || (l = function l() { | ||
return r.get.call(this); | ||
}), 1 !== a && 4 !== a || (u = function u(e) { | ||
r.set.call(this, e); | ||
})), f.access = l && u ? { | ||
get: l, | ||
set: u | ||
} : l ? { | ||
get: l | ||
} : { | ||
set: set | ||
set: u | ||
}; | ||
try { | ||
return dec(value, ctx); | ||
return e(o, f); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
p.v = !0; | ||
} | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers) { | ||
var desc, | ||
init, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: decInfo[3], | ||
set: decInfo[4] | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function applyMemberDec(e, t, r, n, a, i, s, o) { | ||
var c, | ||
l, | ||
u, | ||
f, | ||
p, | ||
d, | ||
h = r[0]; | ||
if (s ? c = 0 === a || 1 === a ? { | ||
get: r[3], | ||
set: r[4] | ||
} : 3 === a ? { | ||
get: r[3] | ||
} : 4 === a ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== a && (c = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? u = { | ||
get: c.get, | ||
set: c.set | ||
} : 2 === a ? u = c.value : 3 === a ? u = c.get : 4 === a && (u = c.set), "function" == typeof h) void 0 !== (f = memberDec(h, n, c, o, a, i, s, u)) && (assertValidReturnValue(a, f), 0 === a ? l = f : 1 === a ? (l = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f);else for (var v = h.length - 1; v >= 0; v--) { | ||
var g; | ||
if (void 0 !== (f = memberDec(h[v], n, c, o, a, i, s, u))) assertValidReturnValue(a, f), 0 === a ? g = f : 1 === a ? (g = f.init, p = f.get || u.get, d = f.set || u.set, u = { | ||
get: p, | ||
set: d | ||
}) : u = f, void 0 !== g && (void 0 === l ? l = g : "function" == typeof l ? l = [l, g] : l.push(g)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === a || 1 === a) { | ||
if (void 0 === l) l = function l(e, t) { | ||
return t; | ||
};else if ("function" != typeof l) { | ||
var y = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < y.length; n++) r = y[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var m = l; | ||
l = function l(e, t) { | ||
return m.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(l); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== a && (1 === a ? (c.get = u.get, c.set = u.set) : 2 === a ? c.value = u : 3 === a ? c.get = u : 4 === a && (c.set = u), s ? 1 === a ? (e.push(function (e, t) { | ||
return u.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return u.set.call(e, t); | ||
})) : 2 === a ? e.push(u) : e.push(function (e, t) { | ||
return u.call(e, t); | ||
}) : Object.defineProperty(t, n, c)); | ||
} | ||
function applyMemberDecs(Class, decInfos) { | ||
for (var protoInitializers, staticInitializers, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5; | ||
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || [])) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
function applyMemberDecs(e, t) { | ||
for (var r, n, a = [], i = new Map(), s = new Map(), o = 0; o < t.length; o++) { | ||
var c = t[o]; | ||
if (Array.isArray(c)) { | ||
var l, | ||
u, | ||
f = c[1], | ||
p = c[2], | ||
d = c.length > 3, | ||
h = f >= 5; | ||
if (h ? (l = e, 0 !== (f -= 5) && (u = n = n || [])) : (l = e.prototype, 0 !== f && (u = r = r || [])), 0 !== f && !d) { | ||
var v = h ? s : i, | ||
g = v.get(p) || 0; | ||
if (!0 === g || 3 === g && 4 !== f || 4 === g && 3 !== f) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + p); | ||
!g && f > 2 ? v.set(p, f) : v.set(p, !0); | ||
} | ||
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers); | ||
applyMemberDec(a, l, c, p, f, h, d, u); | ||
} | ||
} | ||
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret; | ||
return pushInitializers(a, r), pushInitializers(a, n), a; | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
return function (targetClass, memberDecs, classDecs) { | ||
return function (e, t, r) { | ||
return { | ||
e: applyMemberDecs(targetClass, memberDecs), | ||
e: applyMemberDecs(e, t), | ||
get c() { | ||
return function (targetClass, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
return function (e, t) { | ||
if (t.length > 0) { | ||
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { | ||
var s = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i](newClass, { | ||
var o = t[i](n, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: a, | ||
addInitializer: createAddInitializerMethod(r, s) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
s.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== o && (assertValidReturnValue(10, o), n = o); | ||
} | ||
return [newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
return [n, function () { | ||
for (var e = 0; e < r.length; e++) r[e].call(n); | ||
}]; | ||
} | ||
}(targetClass, classDecs); | ||
}(e, r); | ||
} | ||
@@ -188,4 +188,4 @@ }; | ||
} | ||
export default function applyDecs2203R(targetClass, memberDecs, classDecs) { | ||
return (applyDecs2203R = applyDecs2203RFactory())(targetClass, memberDecs, classDecs); | ||
export default function applyDecs2203R(e, t, r) { | ||
return (applyDecs2203R = applyDecs2203RFactory())(e, t, r); | ||
} |
import _typeof from "./typeof.js"; | ||
import checkInRHS from "./checkInRHS.js"; | ||
function applyDecs2301Factory() { | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
!function (decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
}(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
!function (e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
}(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function assertInstanceIfPrivate(has, target) { | ||
if (!has(target)) throw new TypeError("Attempted to access private element on non-instance"); | ||
function assertInstanceIfPrivate(e, t) { | ||
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); | ||
} | ||
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, n, a, i, s, o, c) { | ||
var u; | ||
switch (a) { | ||
case 1: | ||
kindStr = "accessor"; | ||
u = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
u = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
u = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
u = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
u = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var l, | ||
f, | ||
p = { | ||
kind: u, | ||
name: s ? "#" + t : t, | ||
"static": i, | ||
"private": s | ||
}, | ||
decoratorFinishedRef = { | ||
d = { | ||
v: !1 | ||
}; | ||
if (0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate || 0 !== kind && 2 !== kind) { | ||
if (2 === kind) get = function get(target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.value; | ||
if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) { | ||
if (2 === a) l = function l(e) { | ||
return assertInstanceIfPrivate(c, e), r.value; | ||
};else { | ||
var t = 0 === kind || 1 === kind; | ||
(t || 3 === kind) && (get = isPrivate ? function (target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.get.call(target); | ||
} : function (target) { | ||
return desc.get.call(target); | ||
}), (t || 4 === kind) && (set = isPrivate ? function (target, value) { | ||
assertInstanceIfPrivate(hasPrivateBrand, target), desc.set.call(target, value); | ||
} : function (target, value) { | ||
desc.set.call(target, value); | ||
var h = 0 === a || 1 === a; | ||
(h || 3 === a) && (l = s ? function (e) { | ||
return assertInstanceIfPrivate(c, e), r.get.call(e); | ||
} : function (e) { | ||
return r.get.call(e); | ||
}), (h || 4 === a) && (f = s ? function (e, t) { | ||
assertInstanceIfPrivate(c, e), r.set.call(e, t); | ||
} : function (e, t) { | ||
r.set.call(e, t); | ||
}); | ||
} | ||
} else get = function get(target) { | ||
return target[name]; | ||
}, 0 === kind && (set = function set(target, v) { | ||
target[name] = v; | ||
} else l = function l(e) { | ||
return e[t]; | ||
}, 0 === a && (f = function f(e, r) { | ||
e[t] = r; | ||
}); | ||
var has = isPrivate ? hasPrivateBrand.bind() : function (target) { | ||
return name in target; | ||
var v = s ? c.bind() : function (e) { | ||
return t in e; | ||
}; | ||
ctx.access = get && set ? { | ||
get: get, | ||
set: set, | ||
has: has | ||
} : get ? { | ||
get: get, | ||
has: has | ||
p.access = l && f ? { | ||
get: l, | ||
set: f, | ||
has: v | ||
} : l ? { | ||
get: l, | ||
has: v | ||
} : { | ||
set: set, | ||
has: has | ||
set: f, | ||
has: v | ||
}; | ||
try { | ||
return dec(value, ctx); | ||
return e(o, p); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
d.v = !0; | ||
} | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 10 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 10 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function curryThis2(fn) { | ||
return function (value) { | ||
fn(this, value); | ||
function curryThis2(e) { | ||
return function (t) { | ||
e(this, t); | ||
}; | ||
} | ||
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand) { | ||
var desc, | ||
init, | ||
value, | ||
fn, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
if (isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: (fn = decInfo[3], function () { | ||
return fn(this); | ||
function applyMemberDec(e, t, r, n, a, i, s, o, c) { | ||
var u, | ||
l, | ||
f, | ||
p, | ||
d, | ||
h, | ||
v, | ||
g = r[0]; | ||
if (s ? u = 0 === a || 1 === a ? { | ||
get: (p = r[3], function () { | ||
return p(this); | ||
}), | ||
set: curryThis2(decInfo[4]) | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
set: curryThis2(r[4]) | ||
} : 3 === a ? { | ||
get: r[3] | ||
} : 4 === a ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set), "function" == typeof decs) void 0 !== (newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand)) && (assertValidReturnValue(kind, newValue), 0 === kind ? init = newValue : 1 === kind ? (init = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue);else for (var i = decs.length - 1; i >= 0; i--) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? f = { | ||
get: u.get, | ||
set: u.set | ||
} : 2 === a ? f = u.value : 3 === a ? f = u.get : 4 === a && (f = u.set), "function" == typeof g) void 0 !== (d = memberDec(g, n, u, o, a, i, s, f, c)) && (assertValidReturnValue(a, d), 0 === a ? l = d : 1 === a ? (l = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d);else for (var y = g.length - 1; y >= 0; y--) { | ||
var m; | ||
if (void 0 !== (d = memberDec(g[y], n, u, o, a, i, s, f, c))) assertValidReturnValue(a, d), 0 === a ? m = d : 1 === a ? (m = d.init, h = d.get || f.get, v = d.set || f.set, f = { | ||
get: h, | ||
set: v | ||
}) : f = d, void 0 !== m && (void 0 === l ? l = m : "function" == typeof l ? l = [l, m] : l.push(m)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === a || 1 === a) { | ||
if (void 0 === l) l = function l(e, t) { | ||
return t; | ||
};else if ("function" != typeof l) { | ||
var b = l; | ||
l = function l(e, t) { | ||
for (var r = t, n = 0; n < b.length; n++) r = b[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var I = l; | ||
l = function l(e, t) { | ||
return I.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(l); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== a && (1 === a ? (u.get = f.get, u.set = f.set) : 2 === a ? u.value = f : 3 === a ? u.get = f : 4 === a && (u.set = f), s ? 1 === a ? (e.push(function (e, t) { | ||
return f.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return f.set.call(e, t); | ||
})) : 2 === a ? e.push(f) : e.push(function (e, t) { | ||
return f.call(e, t); | ||
}) : Object.defineProperty(t, n, u)); | ||
} | ||
function applyMemberDecs(Class, decInfos, instanceBrand) { | ||
for (var protoInitializers, staticInitializers, staticBrand, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
isStatic = kind >= 5, | ||
hasPrivateBrand = instanceBrand; | ||
if (isStatic ? (base = Class, 0 !== (kind -= 5) && (initializers = staticInitializers = staticInitializers || []), isPrivate && !staticBrand && (staticBrand = function staticBrand(_) { | ||
return checkInRHS(_) === Class; | ||
}), hasPrivateBrand = staticBrand) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
!existingKind && kind > 2 ? existingNonFields.set(name, kind) : existingNonFields.set(name, !0); | ||
function applyMemberDecs(e, t, r) { | ||
for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) { | ||
var l = t[u]; | ||
if (Array.isArray(l)) { | ||
var f, | ||
p, | ||
d = l[1], | ||
h = l[2], | ||
v = l.length > 3, | ||
g = d >= 5, | ||
y = r; | ||
if (g ? (f = e, 0 !== (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) { | ||
return checkInRHS(t) === e; | ||
}), y = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) { | ||
var m = g ? c : o, | ||
b = m.get(h) || 0; | ||
if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
!b && d > 2 ? m.set(h, d) : m.set(h, !0); | ||
} | ||
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand); | ||
applyMemberDec(s, f, l, h, d, g, v, p, y); | ||
} | ||
} | ||
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret; | ||
return pushInitializers(s, n), pushInitializers(s, a), s; | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
return function (targetClass, memberDecs, classDecs, instanceBrand) { | ||
return function (e, t, r, n) { | ||
return { | ||
e: applyMemberDecs(targetClass, memberDecs, instanceBrand), | ||
e: applyMemberDecs(e, t, n), | ||
get c() { | ||
return function (targetClass, classDecs) { | ||
if (classDecs.length > 0) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, i = classDecs.length - 1; i >= 0; i--) { | ||
var decoratorFinishedRef = { | ||
return function (e, t) { | ||
if (t.length > 0) { | ||
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) { | ||
var s = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i](newClass, { | ||
var o = t[i](n, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: a, | ||
addInitializer: createAddInitializerMethod(r, s) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
s.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(10, nextNewClass), newClass = nextNewClass); | ||
void 0 !== o && (assertValidReturnValue(10, o), n = o); | ||
} | ||
return [newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
return [n, function () { | ||
for (var e = 0; e < r.length; e++) r[e].call(n); | ||
}]; | ||
} | ||
}(targetClass, classDecs); | ||
}(e, r); | ||
} | ||
@@ -219,4 +219,4 @@ }; | ||
} | ||
export default function applyDecs2301(targetClass, memberDecs, classDecs, instanceBrand) { | ||
return (applyDecs2301 = applyDecs2301Factory())(targetClass, memberDecs, classDecs, instanceBrand); | ||
export default function applyDecs2301(e, t, r, n) { | ||
return (applyDecs2301 = applyDecs2301Factory())(e, t, r, n); | ||
} |
import _typeof from "./typeof.js"; | ||
import checkInRHS from "./checkInRHS.js"; | ||
function createAddInitializerMethod(initializers, decoratorFinishedRef) { | ||
return function (initializer) { | ||
assertNotFinished(decoratorFinishedRef, "addInitializer"), assertCallable(initializer, "An initializer"), initializers.push(initializer); | ||
function createAddInitializerMethod(e, t) { | ||
return function (r) { | ||
assertNotFinished(t, "addInitializer"), assertCallable(r, "An initializer"), e.push(r); | ||
}; | ||
} | ||
function assertInstanceIfPrivate(has, target) { | ||
if (!has(target)) throw new TypeError("Attempted to access private element on non-instance"); | ||
function assertInstanceIfPrivate(e, t) { | ||
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance"); | ||
} | ||
function memberDec(dec, thisArg, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand) { | ||
var kindStr; | ||
switch (kind) { | ||
function memberDec(e, t, r, n, a, i, s, o, c, l) { | ||
var u; | ||
switch (i) { | ||
case 1: | ||
kindStr = "accessor"; | ||
u = "accessor"; | ||
break; | ||
case 2: | ||
kindStr = "method"; | ||
u = "method"; | ||
break; | ||
case 3: | ||
kindStr = "getter"; | ||
u = "getter"; | ||
break; | ||
case 4: | ||
kindStr = "setter"; | ||
u = "setter"; | ||
break; | ||
default: | ||
kindStr = "field"; | ||
u = "field"; | ||
} | ||
var get, | ||
set, | ||
ctx = { | ||
kind: kindStr, | ||
name: isPrivate ? "#" + name : name, | ||
"static": isStatic, | ||
"private": isPrivate | ||
var f, | ||
d, | ||
p = { | ||
kind: u, | ||
name: o ? "#" + r : r, | ||
"static": s, | ||
"private": o | ||
}, | ||
decoratorFinishedRef = { | ||
h = { | ||
v: !1 | ||
}; | ||
if (0 !== kind && (ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef)), isPrivate || 0 !== kind && 2 !== kind) { | ||
if (2 === kind) get = function get(target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.value; | ||
if (0 !== i && (p.addInitializer = createAddInitializerMethod(a, h)), o || 0 !== i && 2 !== i) { | ||
if (2 === i) f = function f(e) { | ||
return assertInstanceIfPrivate(l, e), n.value; | ||
};else { | ||
var t = 0 === kind || 1 === kind; | ||
(t || 3 === kind) && (get = isPrivate ? function (target) { | ||
return assertInstanceIfPrivate(hasPrivateBrand, target), desc.get.call(target); | ||
} : function (target) { | ||
return desc.get.call(target); | ||
}), (t || 4 === kind) && (set = isPrivate ? function (target, value) { | ||
assertInstanceIfPrivate(hasPrivateBrand, target), desc.set.call(target, value); | ||
} : function (target, value) { | ||
desc.set.call(target, value); | ||
var v = 0 === i || 1 === i; | ||
(v || 3 === i) && (f = o ? function (e) { | ||
return assertInstanceIfPrivate(l, e), n.get.call(e); | ||
} : function (e) { | ||
return n.get.call(e); | ||
}), (v || 4 === i) && (d = o ? function (e, t) { | ||
assertInstanceIfPrivate(l, e), n.set.call(e, t); | ||
} : function (e, t) { | ||
n.set.call(e, t); | ||
}); | ||
} | ||
} else get = function get(target) { | ||
return target[name]; | ||
}, 0 === kind && (set = function set(target, v) { | ||
target[name] = v; | ||
} else f = function f(e) { | ||
return e[r]; | ||
}, 0 === i && (d = function d(e, t) { | ||
e[r] = t; | ||
}); | ||
var has = isPrivate ? hasPrivateBrand.bind() : function (target) { | ||
return name in target; | ||
var y = o ? l.bind() : function (e) { | ||
return r in e; | ||
}; | ||
ctx.access = get && set ? { | ||
get: get, | ||
set: set, | ||
has: has | ||
} : get ? { | ||
get: get, | ||
has: has | ||
p.access = f && d ? { | ||
get: f, | ||
set: d, | ||
has: y | ||
} : f ? { | ||
get: f, | ||
has: y | ||
} : { | ||
set: set, | ||
has: has | ||
set: d, | ||
has: y | ||
}; | ||
try { | ||
return dec.call(thisArg, value, ctx); | ||
return e.call(t, c, p); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
h.v = !0; | ||
} | ||
} | ||
function assertNotFinished(decoratorFinishedRef, fnName) { | ||
if (decoratorFinishedRef.v) throw new Error("attempted to call " + fnName + " after decoration was finished"); | ||
function assertNotFinished(e, t) { | ||
if (e.v) throw new Error("attempted to call " + t + " after decoration was finished"); | ||
} | ||
function assertCallable(fn, hint) { | ||
if ("function" != typeof fn) throw new TypeError(hint + " must be a function"); | ||
function assertCallable(e, t) { | ||
if ("function" != typeof e) throw new TypeError(t + " must be a function"); | ||
} | ||
function assertValidReturnValue(kind, value) { | ||
var type = _typeof(value); | ||
if (1 === kind) { | ||
if ("object" !== type || null === value) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== value.get && assertCallable(value.get, "accessor.get"), void 0 !== value.set && assertCallable(value.set, "accessor.set"), void 0 !== value.init && assertCallable(value.init, "accessor.init"); | ||
} else if ("function" !== type) { | ||
var hint; | ||
throw hint = 0 === kind ? "field" : 5 === kind ? "class" : "method", new TypeError(hint + " decorators must return a function or void 0"); | ||
function assertValidReturnValue(e, t) { | ||
var r = _typeof(t); | ||
if (1 === e) { | ||
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); | ||
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init"); | ||
} else if ("function" !== r) { | ||
var n; | ||
throw n = 0 === e ? "field" : 5 === e ? "class" : "method", new TypeError(n + " decorators must return a function or void 0"); | ||
} | ||
} | ||
function curryThis1(fn) { | ||
function curryThis1(e) { | ||
return function () { | ||
return fn(this); | ||
return e(this); | ||
}; | ||
} | ||
function curryThis2(fn) { | ||
return function (value) { | ||
fn(this, value); | ||
function curryThis2(e) { | ||
return function (t) { | ||
e(this, t); | ||
}; | ||
} | ||
function applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand) { | ||
var desc, | ||
init, | ||
value, | ||
newValue, | ||
get, | ||
set, | ||
decs = decInfo[0]; | ||
decoratorsHaveThis || Array.isArray(decs) || (decs = [decs]), isPrivate ? desc = 0 === kind || 1 === kind ? { | ||
get: curryThis1(decInfo[3]), | ||
set: curryThis2(decInfo[4]) | ||
} : 3 === kind ? { | ||
get: decInfo[3] | ||
} : 4 === kind ? { | ||
set: decInfo[3] | ||
function applyMemberDec(e, t, r, n, a, i, s, o, c, l) { | ||
var u, | ||
f, | ||
d, | ||
p, | ||
h, | ||
v, | ||
y = r[0]; | ||
n || Array.isArray(y) || (y = [y]), o ? u = 0 === i || 1 === i ? { | ||
get: curryThis1(r[3]), | ||
set: curryThis2(r[4]) | ||
} : 3 === i ? { | ||
get: r[3] | ||
} : 4 === i ? { | ||
set: r[3] | ||
} : { | ||
value: decInfo[3] | ||
} : 0 !== kind && (desc = Object.getOwnPropertyDescriptor(base, name)), 1 === kind ? value = { | ||
get: desc.get, | ||
set: desc.set | ||
} : 2 === kind ? value = desc.value : 3 === kind ? value = desc.get : 4 === kind && (value = desc.set); | ||
for (var inc = decoratorsHaveThis ? 2 : 1, i = decs.length - 1; i >= 0; i -= inc) { | ||
var newInit; | ||
if (void 0 !== (newValue = memberDec(decs[i], decoratorsHaveThis ? decs[i - 1] : void 0, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand))) assertValidReturnValue(kind, newValue), 0 === kind ? newInit = newValue : 1 === kind ? (newInit = newValue.init, get = newValue.get || value.get, set = newValue.set || value.set, value = { | ||
get: get, | ||
set: set | ||
}) : value = newValue, void 0 !== newInit && (void 0 === init ? init = newInit : "function" == typeof init ? init = [init, newInit] : init.push(newInit)); | ||
value: r[3] | ||
} : 0 !== i && (u = Object.getOwnPropertyDescriptor(t, a)), 1 === i ? d = { | ||
get: u.get, | ||
set: u.set | ||
} : 2 === i ? d = u.value : 3 === i ? d = u.get : 4 === i && (d = u.set); | ||
for (var g = n ? 2 : 1, m = y.length - 1; m >= 0; m -= g) { | ||
var b; | ||
if (void 0 !== (p = memberDec(y[m], n ? y[m - 1] : void 0, a, u, c, i, s, o, d, l))) assertValidReturnValue(i, p), 0 === i ? b = p : 1 === i ? (b = p.init, h = p.get || d.get, v = p.set || d.set, d = { | ||
get: h, | ||
set: v | ||
}) : d = p, void 0 !== b && (void 0 === f ? f = b : "function" == typeof f ? f = [f, b] : f.push(b)); | ||
} | ||
if (0 === kind || 1 === kind) { | ||
if (void 0 === init) init = function init(instance, _init) { | ||
return _init; | ||
};else if ("function" != typeof init) { | ||
var ownInitializers = init; | ||
init = function init(instance, _init2) { | ||
for (var value = _init2, i = ownInitializers.length - 1; i >= 0; i--) value = ownInitializers[i].call(instance, value); | ||
return value; | ||
if (0 === i || 1 === i) { | ||
if (void 0 === f) f = function f(e, t) { | ||
return t; | ||
};else if ("function" != typeof f) { | ||
var I = f; | ||
f = function f(e, t) { | ||
for (var r = t, n = I.length - 1; n >= 0; n--) r = I[n].call(e, r); | ||
return r; | ||
}; | ||
} else { | ||
var originalInitializer = init; | ||
init = function init(instance, _init3) { | ||
return originalInitializer.call(instance, _init3); | ||
var w = f; | ||
f = function f(e, t) { | ||
return w.call(e, t); | ||
}; | ||
} | ||
ret.push(init); | ||
e.push(f); | ||
} | ||
0 !== kind && (1 === kind ? (desc.get = value.get, desc.set = value.set) : 2 === kind ? desc.value = value : 3 === kind ? desc.get = value : 4 === kind && (desc.set = value), isPrivate ? 1 === kind ? (ret.push(function (instance, args) { | ||
return value.get.call(instance, args); | ||
}), ret.push(function (instance, args) { | ||
return value.set.call(instance, args); | ||
})) : 2 === kind ? ret.push(value) : ret.push(function (instance, args) { | ||
return value.call(instance, args); | ||
}) : Object.defineProperty(base, name, desc)); | ||
0 !== i && (1 === i ? (u.get = d.get, u.set = d.set) : 2 === i ? u.value = d : 3 === i ? u.get = d : 4 === i && (u.set = d), o ? 1 === i ? (e.push(function (e, t) { | ||
return d.get.call(e, t); | ||
}), e.push(function (e, t) { | ||
return d.set.call(e, t); | ||
})) : 2 === i ? e.push(d) : e.push(function (e, t) { | ||
return d.call(e, t); | ||
}) : Object.defineProperty(t, a, u)); | ||
} | ||
function applyMemberDecs(Class, decInfos, instanceBrand) { | ||
for (var protoInitializers, staticInitializers, staticBrand, ret = [], existingProtoNonFields = new Map(), existingStaticNonFields = new Map(), i = 0; i < decInfos.length; i++) { | ||
var decInfo = decInfos[i]; | ||
if (Array.isArray(decInfo)) { | ||
var base, | ||
initializers, | ||
kind = decInfo[1], | ||
name = decInfo[2], | ||
isPrivate = decInfo.length > 3, | ||
decoratorsHaveThis = 16 & kind, | ||
isStatic = !!(8 & kind), | ||
hasPrivateBrand = instanceBrand; | ||
if (kind &= 7, isStatic ? (base = Class, 0 !== kind && (initializers = staticInitializers = staticInitializers || []), isPrivate && !staticBrand && (staticBrand = function staticBrand(_) { | ||
return checkInRHS(_) === Class; | ||
}), hasPrivateBrand = staticBrand) : (base = Class.prototype, 0 !== kind && (initializers = protoInitializers = protoInitializers || [])), 0 !== kind && !isPrivate) { | ||
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields, | ||
existingKind = existingNonFields.get(name) || 0; | ||
if (!0 === existingKind || 3 === existingKind && 4 !== kind || 4 === existingKind && 3 !== kind) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name); | ||
existingNonFields.set(name, !(!existingKind && kind > 2) || kind); | ||
function applyMemberDecs(e, t, r) { | ||
for (var n, a, i, s = [], o = new Map(), c = new Map(), l = 0; l < t.length; l++) { | ||
var u = t[l]; | ||
if (Array.isArray(u)) { | ||
var f, | ||
d, | ||
p = u[1], | ||
h = u[2], | ||
v = u.length > 3, | ||
y = 16 & p, | ||
g = !!(8 & p), | ||
m = r; | ||
if (p &= 7, g ? (f = e, 0 !== p && (d = a = a || []), v && !i && (i = function i(t) { | ||
return checkInRHS(t) === e; | ||
}), m = i) : (f = e.prototype, 0 !== p && (d = n = n || [])), 0 !== p && !v) { | ||
var b = g ? c : o, | ||
I = b.get(h) || 0; | ||
if (!0 === I || 3 === I && 4 !== p || 4 === I && 3 !== p) throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); | ||
b.set(h, !(!I && p > 2) || p); | ||
} | ||
applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand); | ||
applyMemberDec(s, f, u, y, h, p, g, v, d, m); | ||
} | ||
} | ||
return pushInitializers(ret, protoInitializers), pushInitializers(ret, staticInitializers), ret; | ||
return pushInitializers(s, n), pushInitializers(s, a), s; | ||
} | ||
function pushInitializers(ret, initializers) { | ||
initializers && ret.push(function (instance) { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance); | ||
return instance; | ||
function pushInitializers(e, t) { | ||
t && e.push(function (e) { | ||
for (var r = 0; r < t.length; r++) t[r].call(e); | ||
return e; | ||
}); | ||
} | ||
function applyClassDecs(targetClass, classDecs, decoratorsHaveThis) { | ||
if (classDecs.length) { | ||
for (var initializers = [], newClass = targetClass, name = targetClass.name, inc = decoratorsHaveThis ? 2 : 1, i = classDecs.length - 1; i >= 0; i -= inc) { | ||
var decoratorFinishedRef = { | ||
function applyClassDecs(e, t, r) { | ||
if (t.length) { | ||
for (var n = [], a = e, i = e.name, s = r ? 2 : 1, o = t.length - 1; o >= 0; o -= s) { | ||
var c = { | ||
v: !1 | ||
}; | ||
try { | ||
var nextNewClass = classDecs[i].call(decoratorsHaveThis ? classDecs[i - 1] : void 0, newClass, { | ||
var l = t[o].call(r ? t[o - 1] : void 0, a, { | ||
kind: "class", | ||
name: name, | ||
addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) | ||
name: i, | ||
addInitializer: createAddInitializerMethod(n, c) | ||
}); | ||
} finally { | ||
decoratorFinishedRef.v = !0; | ||
c.v = !0; | ||
} | ||
void 0 !== nextNewClass && (assertValidReturnValue(5, nextNewClass), newClass = nextNewClass); | ||
void 0 !== l && (assertValidReturnValue(5, l), a = l); | ||
} | ||
return [newClass, function () { | ||
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass); | ||
return [a, function () { | ||
for (var e = 0; e < n.length; e++) n[e].call(a); | ||
}]; | ||
} | ||
} | ||
export default function applyDecs2305(targetClass, memberDecs, classDecs, classDecsHaveThis, instanceBrand) { | ||
export default function applyDecs2305(e, t, r, n, a) { | ||
return { | ||
e: applyMemberDecs(targetClass, memberDecs, instanceBrand), | ||
e: applyMemberDecs(e, t, a), | ||
get c() { | ||
return applyClassDecs(targetClass, classDecs, classDecsHaveThis); | ||
return applyClassDecs(e, r, n); | ||
} | ||
}; | ||
} |
import OverloadYield from "./OverloadYield.js"; | ||
export default function AsyncGenerator(gen) { | ||
var front, back; | ||
function resume(key, arg) { | ||
export default function AsyncGenerator(e) { | ||
var r, t; | ||
function resume(r, t) { | ||
try { | ||
var result = gen[key](arg), | ||
value = result.value, | ||
overloaded = value instanceof OverloadYield; | ||
Promise.resolve(overloaded ? value.v : value).then(function (arg) { | ||
if (overloaded) { | ||
var nextKey = "return" === key ? "return" : "next"; | ||
if (!value.k || arg.done) return resume(nextKey, arg); | ||
arg = gen[nextKey](arg).value; | ||
var n = e[r](t), | ||
o = n.value, | ||
u = o instanceof OverloadYield; | ||
Promise.resolve(u ? o.v : o).then(function (t) { | ||
if (u) { | ||
var i = "return" === r ? "return" : "next"; | ||
if (!o.k || t.done) return resume(i, t); | ||
t = e[i](t).value; | ||
} | ||
settle(result.done ? "return" : "normal", arg); | ||
}, function (err) { | ||
resume("throw", err); | ||
settle(n.done ? "return" : "normal", t); | ||
}, function (e) { | ||
resume("throw", e); | ||
}); | ||
} catch (err) { | ||
settle("throw", err); | ||
} catch (e) { | ||
settle("throw", e); | ||
} | ||
} | ||
function settle(type, value) { | ||
switch (type) { | ||
function settle(e, n) { | ||
switch (e) { | ||
case "return": | ||
front.resolve({ | ||
value: value, | ||
r.resolve({ | ||
value: n, | ||
done: !0 | ||
@@ -32,33 +32,33 @@ }); | ||
case "throw": | ||
front.reject(value); | ||
r.reject(n); | ||
break; | ||
default: | ||
front.resolve({ | ||
value: value, | ||
r.resolve({ | ||
value: n, | ||
done: !1 | ||
}); | ||
} | ||
(front = front.next) ? resume(front.key, front.arg) : back = null; | ||
(r = r.next) ? resume(r.key, r.arg) : t = null; | ||
} | ||
this._invoke = function (key, arg) { | ||
return new Promise(function (resolve, reject) { | ||
var request = { | ||
key: key, | ||
arg: arg, | ||
resolve: resolve, | ||
reject: reject, | ||
this._invoke = function (e, n) { | ||
return new Promise(function (o, u) { | ||
var i = { | ||
key: e, | ||
arg: n, | ||
resolve: o, | ||
reject: u, | ||
next: null | ||
}; | ||
back ? back = back.next = request : (front = back = request, resume(key, arg)); | ||
t ? t = t.next = i : (r = t = i, resume(e, n)); | ||
}); | ||
}, "function" != typeof gen["return"] && (this["return"] = void 0); | ||
}, "function" != typeof e["return"] && (this["return"] = void 0); | ||
} | ||
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { | ||
return this; | ||
}, AsyncGenerator.prototype.next = function (arg) { | ||
return this._invoke("next", arg); | ||
}, AsyncGenerator.prototype["throw"] = function (arg) { | ||
return this._invoke("throw", arg); | ||
}, AsyncGenerator.prototype["return"] = function (arg) { | ||
return this._invoke("return", arg); | ||
}, AsyncGenerator.prototype.next = function (e) { | ||
return this._invoke("next", e); | ||
}, AsyncGenerator.prototype["throw"] = function (e) { | ||
return this._invoke("throw", e); | ||
}, AsyncGenerator.prototype["return"] = function (e) { | ||
return this._invoke("return", e); | ||
}; |
import OverloadYield from "./OverloadYield.js"; | ||
export default function _asyncGeneratorDelegate(inner) { | ||
var iter = {}, | ||
waiting = !1; | ||
function pump(key, value) { | ||
return waiting = !0, value = new Promise(function (resolve) { | ||
resolve(inner[key](value)); | ||
export default function _asyncGeneratorDelegate(t) { | ||
var e = {}, | ||
n = !1; | ||
function pump(e, r) { | ||
return n = !0, r = new Promise(function (n) { | ||
n(t[e](r)); | ||
}), { | ||
done: !1, | ||
value: new OverloadYield(value, 1) | ||
value: new OverloadYield(r, 1) | ||
}; | ||
} | ||
return iter["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { | ||
return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { | ||
return this; | ||
}, iter.next = function (value) { | ||
return waiting ? (waiting = !1, value) : pump("next", value); | ||
}, "function" == typeof inner["throw"] && (iter["throw"] = function (value) { | ||
if (waiting) throw waiting = !1, value; | ||
return pump("throw", value); | ||
}), "function" == typeof inner["return"] && (iter["return"] = function (value) { | ||
return waiting ? (waiting = !1, value) : pump("return", value); | ||
}), iter; | ||
}, e.next = function (t) { | ||
return n ? (n = !1, t) : pump("next", t); | ||
}, "function" == typeof t["throw"] && (e["throw"] = function (t) { | ||
if (n) throw n = !1, t; | ||
return pump("throw", t); | ||
}), "function" == typeof t["return"] && (e["return"] = function (t) { | ||
return n ? (n = !1, t) : pump("return", t); | ||
}), e; | ||
} |
@@ -1,26 +0,26 @@ | ||
export default function _asyncIterator(iterable) { | ||
var method, | ||
async, | ||
sync, | ||
retry = 2; | ||
for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { | ||
if (async && null != (method = iterable[async])) return method.call(iterable); | ||
if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); | ||
async = "@@asyncIterator", sync = "@@iterator"; | ||
export default function _asyncIterator(r) { | ||
var n, | ||
t, | ||
o, | ||
e = 2; | ||
for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { | ||
if (t && null != (n = r[t])) return n.call(r); | ||
if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); | ||
t = "@@asyncIterator", o = "@@iterator"; | ||
} | ||
throw new TypeError("Object is not async iterable"); | ||
} | ||
function AsyncFromSyncIterator(s) { | ||
function AsyncFromSyncIterator(r) { | ||
function AsyncFromSyncIteratorContinuation(r) { | ||
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); | ||
var done = r.done; | ||
return Promise.resolve(r.value).then(function (value) { | ||
var n = r.done; | ||
return Promise.resolve(r.value).then(function (r) { | ||
return { | ||
value: value, | ||
done: done | ||
value: r, | ||
done: n | ||
}; | ||
}); | ||
} | ||
return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { | ||
this.s = s, this.n = s.next; | ||
return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { | ||
this.s = r, this.n = r.next; | ||
}, AsyncFromSyncIterator.prototype = { | ||
@@ -32,14 +32,14 @@ s: null, | ||
}, | ||
"return": function _return(value) { | ||
var ret = this.s["return"]; | ||
return void 0 === ret ? Promise.resolve({ | ||
value: value, | ||
"return": function _return(r) { | ||
var n = this.s["return"]; | ||
return void 0 === n ? Promise.resolve({ | ||
value: r, | ||
done: !0 | ||
}) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); | ||
}) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); | ||
}, | ||
"throw": function _throw(value) { | ||
var thr = this.s["return"]; | ||
return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); | ||
"throw": function _throw(r) { | ||
var n = this.s["return"]; | ||
return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); | ||
} | ||
}, new AsyncFromSyncIterator(s); | ||
}, new AsyncFromSyncIterator(r); | ||
} |
import OverloadYield from "./OverloadYield.js"; | ||
export default function _awaitAsyncGenerator(value) { | ||
return new OverloadYield(value, 0); | ||
export default function _awaitAsyncGenerator(e) { | ||
return new OverloadYield(e, 0); | ||
} |
import _typeof from "./typeof.js"; | ||
export default function _checkInRHS(value) { | ||
if (Object(value) !== value) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== value ? _typeof(value) : "null")); | ||
return value; | ||
export default function _checkInRHS(e) { | ||
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); | ||
return e; | ||
} |
@@ -1,7 +0,7 @@ | ||
export default function _defineAccessor(type, obj, key, fn) { | ||
var desc = { | ||
export default function _defineAccessor(e, r, n, t) { | ||
var c = { | ||
configurable: !0, | ||
enumerable: !0 | ||
}; | ||
return desc[type] = fn, Object.defineProperty(obj, key, desc); | ||
return c[e] = t, Object.defineProperty(r, n, c); | ||
} |
@@ -1,4 +0,4 @@ | ||
function dispose_SuppressedError(suppressed, error) { | ||
return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(suppressed, error) { | ||
this.suppressed = suppressed, this.error = error, this.stack = new Error().stack; | ||
function dispose_SuppressedError(r, e) { | ||
return "undefined" != typeof SuppressedError ? dispose_SuppressedError = SuppressedError : (dispose_SuppressedError = function dispose_SuppressedError(r, e) { | ||
this.suppressed = r, this.error = e, this.stack = new Error().stack; | ||
}, dispose_SuppressedError.prototype = Object.create(Error.prototype, { | ||
@@ -10,19 +10,19 @@ constructor: { | ||
} | ||
})), new dispose_SuppressedError(suppressed, error); | ||
})), new dispose_SuppressedError(r, e); | ||
} | ||
export default function _dispose(stack, error, hasError) { | ||
export default function _dispose(r, e, s) { | ||
function next() { | ||
for (; stack.length > 0;) try { | ||
var r = stack.pop(), | ||
p = r.d.call(r.v); | ||
if (r.a) return Promise.resolve(p).then(next, err); | ||
} catch (e) { | ||
return err(e); | ||
for (; r.length > 0;) try { | ||
var o = r.pop(), | ||
p = o.d.call(o.v); | ||
if (o.a) return Promise.resolve(p).then(next, err); | ||
} catch (r) { | ||
return err(r); | ||
} | ||
if (hasError) throw error; | ||
if (s) throw e; | ||
} | ||
function err(e) { | ||
return error = hasError ? new dispose_SuppressedError(e, error) : e, hasError = !0, next(); | ||
function err(r) { | ||
return e = s ? new dispose_SuppressedError(r, e) : r, s = !0, next(); | ||
} | ||
return next(); | ||
} |
@@ -1,27 +0,27 @@ | ||
export default function _iterableToArrayLimit(arr, i) { | ||
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; | ||
if (null != _i) { | ||
var _s, | ||
_e, | ||
_x, | ||
_r, | ||
_arr = [], | ||
_n = !0, | ||
_d = !1; | ||
export default function _iterableToArrayLimit(r, l) { | ||
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | ||
if (null != t) { | ||
var e, | ||
n, | ||
i, | ||
u, | ||
a = [], | ||
f = !0, | ||
o = !1; | ||
try { | ||
if (_x = (_i = _i.call(arr)).next, 0 === i) { | ||
if (Object(_i) !== _i) return; | ||
_n = !1; | ||
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); | ||
} catch (err) { | ||
_d = !0, _e = err; | ||
if (i = (t = t.call(r)).next, 0 === l) { | ||
if (Object(t) !== t) return; | ||
f = !1; | ||
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | ||
} catch (r) { | ||
o = !0, n = r; | ||
} finally { | ||
try { | ||
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; | ||
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | ||
} finally { | ||
if (_d) throw _e; | ||
if (o) throw n; | ||
} | ||
} | ||
return _arr; | ||
return a; | ||
} | ||
} |
@@ -1,9 +0,9 @@ | ||
export default function _iterableToArrayLimitLoose(arr, i) { | ||
var _i = arr && ("undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]); | ||
if (null != _i) { | ||
var _s, | ||
_arr = []; | ||
for (_i = _i.call(arr); arr.length < i && !(_s = _i.next()).done;) _arr.push(_s.value); | ||
return _arr; | ||
export default function _iterableToArrayLimitLoose(e, r) { | ||
var t = e && ("undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]); | ||
if (null != t) { | ||
var o, | ||
l = []; | ||
for (t = t.call(e); e.length < r && !(o = t.next()).done;) l.push(o.value); | ||
return l; | ||
} | ||
} |
var REACT_ELEMENT_TYPE; | ||
export default function _createRawReactElement(type, props, key, children) { | ||
export default function _createRawReactElement(e, r, E, l) { | ||
REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); | ||
var defaultProps = type && type.defaultProps, | ||
childrenLength = arguments.length - 3; | ||
if (props || 0 === childrenLength || (props = { | ||
var o = e && e.defaultProps, | ||
n = arguments.length - 3; | ||
if (r || 0 === n || (r = { | ||
children: void 0 | ||
}), 1 === childrenLength) props.children = children;else if (childrenLength > 1) { | ||
for (var childArray = new Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3]; | ||
props.children = childArray; | ||
}), 1 === n) r.children = l;else if (n > 1) { | ||
for (var t = new Array(n), f = 0; f < n; f++) t[f] = arguments[f + 3]; | ||
r.children = t; | ||
} | ||
if (props && defaultProps) for (var propName in defaultProps) void 0 === props[propName] && (props[propName] = defaultProps[propName]);else props || (props = defaultProps || {}); | ||
if (r && o) for (var i in o) void 0 === r[i] && (r[i] = o[i]);else r || (r = o || {}); | ||
return { | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
type: type, | ||
key: void 0 === key ? null : "" + key, | ||
type: e, | ||
key: void 0 === E ? null : "" + E, | ||
ref: null, | ||
props: props, | ||
props: r, | ||
_owner: null | ||
}; | ||
} |
import defineProperty from "./defineProperty.js"; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
function ownKeys(e, r) { | ||
var t = Object.keys(e); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
var o = Object.getOwnPropertySymbols(e); | ||
r && (o = o.filter(function (r) { | ||
return Object.getOwnPropertyDescriptor(e, r).enumerable; | ||
})), t.push.apply(t, o); | ||
} | ||
return keys; | ||
return t; | ||
} | ||
export default function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
export default function _objectSpread2(e) { | ||
for (var r = 1; r < arguments.length; r++) { | ||
var t = null != arguments[r] ? arguments[r] : {}; | ||
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { | ||
defineProperty(e, r, t[r]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { | ||
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | ||
}); | ||
} | ||
return target; | ||
return e; | ||
} |
@@ -1,3 +0,3 @@ | ||
export default function _OverloadYield(value, kind) { | ||
this.v = value, this.k = kind; | ||
export default function _OverloadYield(t, e) { | ||
this.v = t, this.k = e; | ||
} |
@@ -5,247 +5,252 @@ import _typeof from "./typeof.js"; | ||
_regeneratorRuntime = function _regeneratorRuntime() { | ||
return exports; | ||
return e; | ||
}; | ||
var exports = {}, | ||
Op = Object.prototype, | ||
hasOwn = Op.hasOwnProperty, | ||
defineProperty = Object.defineProperty || function (obj, key, desc) { | ||
obj[key] = desc.value; | ||
var t, | ||
e = {}, | ||
r = Object.prototype, | ||
n = r.hasOwnProperty, | ||
o = Object.defineProperty || function (t, e, r) { | ||
t[e] = r.value; | ||
}, | ||
$Symbol = "function" == typeof Symbol ? Symbol : {}, | ||
iteratorSymbol = $Symbol.iterator || "@@iterator", | ||
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", | ||
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; | ||
function define(obj, key, value) { | ||
return Object.defineProperty(obj, key, { | ||
value: value, | ||
i = "function" == typeof Symbol ? Symbol : {}, | ||
a = i.iterator || "@@iterator", | ||
c = i.asyncIterator || "@@asyncIterator", | ||
u = i.toStringTag || "@@toStringTag"; | ||
function define(t, e, r) { | ||
return Object.defineProperty(t, e, { | ||
value: r, | ||
enumerable: !0, | ||
configurable: !0, | ||
writable: !0 | ||
}), obj[key]; | ||
}), t[e]; | ||
} | ||
try { | ||
define({}, ""); | ||
} catch (err) { | ||
define = function define(obj, key, value) { | ||
return obj[key] = value; | ||
} catch (t) { | ||
define = function define(t, e, r) { | ||
return t[e] = r; | ||
}; | ||
} | ||
function wrap(innerFn, outerFn, self, tryLocsList) { | ||
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, | ||
generator = Object.create(protoGenerator.prototype), | ||
context = new Context(tryLocsList || []); | ||
return defineProperty(generator, "_invoke", { | ||
value: makeInvokeMethod(innerFn, self, context) | ||
}), generator; | ||
function wrap(t, e, r, n) { | ||
var i = e && e.prototype instanceof Generator ? e : Generator, | ||
a = Object.create(i.prototype), | ||
c = new Context(n || []); | ||
return o(a, "_invoke", { | ||
value: makeInvokeMethod(t, r, c) | ||
}), a; | ||
} | ||
function tryCatch(fn, obj, arg) { | ||
function tryCatch(t, e, r) { | ||
try { | ||
return { | ||
type: "normal", | ||
arg: fn.call(obj, arg) | ||
arg: t.call(e, r) | ||
}; | ||
} catch (err) { | ||
} catch (t) { | ||
return { | ||
type: "throw", | ||
arg: err | ||
arg: t | ||
}; | ||
} | ||
} | ||
exports.wrap = wrap; | ||
var ContinueSentinel = {}; | ||
e.wrap = wrap; | ||
var h = "suspendedStart", | ||
l = "suspendedYield", | ||
f = "executing", | ||
s = "completed", | ||
y = {}; | ||
function Generator() {} | ||
function GeneratorFunction() {} | ||
function GeneratorFunctionPrototype() {} | ||
var IteratorPrototype = {}; | ||
define(IteratorPrototype, iteratorSymbol, function () { | ||
var p = {}; | ||
define(p, a, function () { | ||
return this; | ||
}); | ||
var getProto = Object.getPrototypeOf, | ||
NativeIteratorPrototype = getProto && getProto(getProto(values([]))); | ||
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); | ||
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); | ||
function defineIteratorMethods(prototype) { | ||
["next", "throw", "return"].forEach(function (method) { | ||
define(prototype, method, function (arg) { | ||
return this._invoke(method, arg); | ||
var d = Object.getPrototypeOf, | ||
v = d && d(d(values([]))); | ||
v && v !== r && n.call(v, a) && (p = v); | ||
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | ||
function defineIteratorMethods(t) { | ||
["next", "throw", "return"].forEach(function (e) { | ||
define(t, e, function (t) { | ||
return this._invoke(e, t); | ||
}); | ||
}); | ||
} | ||
function AsyncIterator(generator, PromiseImpl) { | ||
function invoke(method, arg, resolve, reject) { | ||
var record = tryCatch(generator[method], generator, arg); | ||
if ("throw" !== record.type) { | ||
var result = record.arg, | ||
value = result.value; | ||
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { | ||
invoke("next", value, resolve, reject); | ||
}, function (err) { | ||
invoke("throw", err, resolve, reject); | ||
}) : PromiseImpl.resolve(value).then(function (unwrapped) { | ||
result.value = unwrapped, resolve(result); | ||
}, function (error) { | ||
return invoke("throw", error, resolve, reject); | ||
function AsyncIterator(t, e) { | ||
function invoke(r, o, i, a) { | ||
var c = tryCatch(t[r], t, o); | ||
if ("throw" !== c.type) { | ||
var u = c.arg, | ||
h = u.value; | ||
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | ||
invoke("next", t, i, a); | ||
}, function (t) { | ||
invoke("throw", t, i, a); | ||
}) : e.resolve(h).then(function (t) { | ||
u.value = t, i(u); | ||
}, function (t) { | ||
return invoke("throw", t, i, a); | ||
}); | ||
} | ||
reject(record.arg); | ||
a(c.arg); | ||
} | ||
var previousPromise; | ||
defineProperty(this, "_invoke", { | ||
value: function value(method, arg) { | ||
var r; | ||
o(this, "_invoke", { | ||
value: function value(t, n) { | ||
function callInvokeWithMethodAndArg() { | ||
return new PromiseImpl(function (resolve, reject) { | ||
invoke(method, arg, resolve, reject); | ||
return new e(function (e, r) { | ||
invoke(t, n, e, r); | ||
}); | ||
} | ||
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | ||
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | ||
} | ||
}); | ||
} | ||
function makeInvokeMethod(innerFn, self, context) { | ||
var state = "suspendedStart"; | ||
return function (method, arg) { | ||
if ("executing" === state) throw new Error("Generator is already running"); | ||
if ("completed" === state) { | ||
if ("throw" === method) throw arg; | ||
function makeInvokeMethod(e, r, n) { | ||
var o = h; | ||
return function (i, a) { | ||
if (o === f) throw new Error("Generator is already running"); | ||
if (o === s) { | ||
if ("throw" === i) throw a; | ||
return { | ||
value: void 0, | ||
value: t, | ||
done: !0 | ||
}; | ||
} | ||
for (context.method = method, context.arg = arg;;) { | ||
var delegate = context.delegate; | ||
if (delegate) { | ||
var delegateResult = maybeInvokeDelegate(delegate, context); | ||
if (delegateResult) { | ||
if (delegateResult === ContinueSentinel) continue; | ||
return delegateResult; | ||
for (n.method = i, n.arg = a;;) { | ||
var c = n.delegate; | ||
if (c) { | ||
var u = maybeInvokeDelegate(c, n); | ||
if (u) { | ||
if (u === y) continue; | ||
return u; | ||
} | ||
} | ||
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { | ||
if ("suspendedStart" === state) throw state = "completed", context.arg; | ||
context.dispatchException(context.arg); | ||
} else "return" === context.method && context.abrupt("return", context.arg); | ||
state = "executing"; | ||
var record = tryCatch(innerFn, self, context); | ||
if ("normal" === record.type) { | ||
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; | ||
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | ||
if (o === h) throw o = s, n.arg; | ||
n.dispatchException(n.arg); | ||
} else "return" === n.method && n.abrupt("return", n.arg); | ||
o = f; | ||
var p = tryCatch(e, r, n); | ||
if ("normal" === p.type) { | ||
if (o = n.done ? s : l, p.arg === y) continue; | ||
return { | ||
value: record.arg, | ||
done: context.done | ||
value: p.arg, | ||
done: n.done | ||
}; | ||
} | ||
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); | ||
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | ||
} | ||
}; | ||
} | ||
function maybeInvokeDelegate(delegate, context) { | ||
var methodName = context.method, | ||
method = delegate.iterator[methodName]; | ||
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; | ||
var record = tryCatch(method, delegate.iterator, context.arg); | ||
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; | ||
var info = record.arg; | ||
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); | ||
function maybeInvokeDelegate(e, r) { | ||
var n = r.method, | ||
o = e.iterator[n]; | ||
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; | ||
var i = tryCatch(o, e.iterator, r.arg); | ||
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | ||
var a = i.arg; | ||
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); | ||
} | ||
function pushTryEntry(locs) { | ||
var entry = { | ||
tryLoc: locs[0] | ||
function pushTryEntry(t) { | ||
var e = { | ||
tryLoc: t[0] | ||
}; | ||
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); | ||
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | ||
} | ||
function resetTryEntry(entry) { | ||
var record = entry.completion || {}; | ||
record.type = "normal", delete record.arg, entry.completion = record; | ||
function resetTryEntry(t) { | ||
var e = t.completion || {}; | ||
e.type = "normal", delete e.arg, t.completion = e; | ||
} | ||
function Context(tryLocsList) { | ||
function Context(t) { | ||
this.tryEntries = [{ | ||
tryLoc: "root" | ||
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); | ||
}], t.forEach(pushTryEntry, this), this.reset(!0); | ||
} | ||
function values(iterable) { | ||
if (iterable || "" === iterable) { | ||
var iteratorMethod = iterable[iteratorSymbol]; | ||
if (iteratorMethod) return iteratorMethod.call(iterable); | ||
if ("function" == typeof iterable.next) return iterable; | ||
if (!isNaN(iterable.length)) { | ||
var i = -1, | ||
next = function next() { | ||
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; | ||
return next.value = undefined, next.done = !0, next; | ||
function values(e) { | ||
if (e || "" === e) { | ||
var r = e[a]; | ||
if (r) return r.call(e); | ||
if ("function" == typeof e.next) return e; | ||
if (!isNaN(e.length)) { | ||
var o = -1, | ||
i = function next() { | ||
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | ||
return next.value = t, next.done = !0, next; | ||
}; | ||
return next.next = next; | ||
return i.next = i; | ||
} | ||
} | ||
throw new TypeError(_typeof(iterable) + " is not iterable"); | ||
throw new TypeError(_typeof(e) + " is not iterable"); | ||
} | ||
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { | ||
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | ||
value: GeneratorFunctionPrototype, | ||
configurable: !0 | ||
}), defineProperty(GeneratorFunctionPrototype, "constructor", { | ||
}), o(GeneratorFunctionPrototype, "constructor", { | ||
value: GeneratorFunction, | ||
configurable: !0 | ||
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { | ||
var ctor = "function" == typeof genFun && genFun.constructor; | ||
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); | ||
}, exports.mark = function (genFun) { | ||
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; | ||
}, exports.awrap = function (arg) { | ||
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | ||
var e = "function" == typeof t && t.constructor; | ||
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | ||
}, e.mark = function (t) { | ||
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | ||
}, e.awrap = function (t) { | ||
return { | ||
__await: arg | ||
__await: t | ||
}; | ||
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { | ||
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | ||
return this; | ||
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { | ||
void 0 === PromiseImpl && (PromiseImpl = Promise); | ||
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); | ||
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { | ||
return result.done ? result.value : iter.next(); | ||
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | ||
void 0 === i && (i = Promise); | ||
var a = new AsyncIterator(wrap(t, r, n, o), i); | ||
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | ||
return t.done ? t.value : a.next(); | ||
}); | ||
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { | ||
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | ||
return this; | ||
}), define(Gp, "toString", function () { | ||
}), define(g, "toString", function () { | ||
return "[object Generator]"; | ||
}), exports.keys = function (val) { | ||
var object = Object(val), | ||
keys = []; | ||
for (var key in object) keys.push(key); | ||
return keys.reverse(), function next() { | ||
for (; keys.length;) { | ||
var key = keys.pop(); | ||
if (key in object) return next.value = key, next.done = !1, next; | ||
}), e.keys = function (t) { | ||
var e = Object(t), | ||
r = []; | ||
for (var n in e) r.push(n); | ||
return r.reverse(), function next() { | ||
for (; r.length;) { | ||
var t = r.pop(); | ||
if (t in e) return next.value = t, next.done = !1, next; | ||
} | ||
return next.done = !0, next; | ||
}; | ||
}, exports.values = values, Context.prototype = { | ||
}, e.values = values, Context.prototype = { | ||
constructor: Context, | ||
reset: function reset(skipTempReset) { | ||
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); | ||
reset: function reset(e) { | ||
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); | ||
}, | ||
stop: function stop() { | ||
this.done = !0; | ||
var rootRecord = this.tryEntries[0].completion; | ||
if ("throw" === rootRecord.type) throw rootRecord.arg; | ||
var t = this.tryEntries[0].completion; | ||
if ("throw" === t.type) throw t.arg; | ||
return this.rval; | ||
}, | ||
dispatchException: function dispatchException(exception) { | ||
if (this.done) throw exception; | ||
var context = this; | ||
function handle(loc, caught) { | ||
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; | ||
dispatchException: function dispatchException(e) { | ||
if (this.done) throw e; | ||
var r = this; | ||
function handle(n, o) { | ||
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | ||
} | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i], | ||
record = entry.completion; | ||
if ("root" === entry.tryLoc) return handle("end"); | ||
if (entry.tryLoc <= this.prev) { | ||
var hasCatch = hasOwn.call(entry, "catchLoc"), | ||
hasFinally = hasOwn.call(entry, "finallyLoc"); | ||
if (hasCatch && hasFinally) { | ||
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); | ||
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); | ||
} else if (hasCatch) { | ||
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); | ||
for (var o = this.tryEntries.length - 1; o >= 0; --o) { | ||
var i = this.tryEntries[o], | ||
a = i.completion; | ||
if ("root" === i.tryLoc) return handle("end"); | ||
if (i.tryLoc <= this.prev) { | ||
var c = n.call(i, "catchLoc"), | ||
u = n.call(i, "finallyLoc"); | ||
if (c && u) { | ||
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | ||
if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | ||
} else if (c) { | ||
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | ||
} else { | ||
if (!hasFinally) throw new Error("try statement without catch or finally"); | ||
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); | ||
if (!u) throw new Error("try statement without catch or finally"); | ||
if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | ||
} | ||
@@ -255,34 +260,34 @@ } | ||
}, | ||
abrupt: function abrupt(type, arg) { | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { | ||
var finallyEntry = entry; | ||
abrupt: function abrupt(t, e) { | ||
for (var r = this.tryEntries.length - 1; r >= 0; --r) { | ||
var o = this.tryEntries[r]; | ||
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | ||
var i = o; | ||
break; | ||
} | ||
} | ||
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); | ||
var record = finallyEntry ? finallyEntry.completion : {}; | ||
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); | ||
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | ||
var a = i ? i.completion : {}; | ||
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | ||
}, | ||
complete: function complete(record, afterLoc) { | ||
if ("throw" === record.type) throw record.arg; | ||
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; | ||
complete: function complete(t, e) { | ||
if ("throw" === t.type) throw t.arg; | ||
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; | ||
}, | ||
finish: function finish(finallyLoc) { | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; | ||
finish: function finish(t) { | ||
for (var e = this.tryEntries.length - 1; e >= 0; --e) { | ||
var r = this.tryEntries[e]; | ||
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | ||
} | ||
}, | ||
"catch": function _catch(tryLoc) { | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.tryLoc === tryLoc) { | ||
var record = entry.completion; | ||
if ("throw" === record.type) { | ||
var thrown = record.arg; | ||
resetTryEntry(entry); | ||
"catch": function _catch(t) { | ||
for (var e = this.tryEntries.length - 1; e >= 0; --e) { | ||
var r = this.tryEntries[e]; | ||
if (r.tryLoc === t) { | ||
var n = r.completion; | ||
if ("throw" === n.type) { | ||
var o = n.arg; | ||
resetTryEntry(r); | ||
} | ||
return thrown; | ||
return o; | ||
} | ||
@@ -292,10 +297,10 @@ } | ||
}, | ||
delegateYield: function delegateYield(iterable, resultName, nextLoc) { | ||
delegateYield: function delegateYield(e, r, n) { | ||
return this.delegate = { | ||
iterator: values(iterable), | ||
resultName: resultName, | ||
nextLoc: nextLoc | ||
}, "next" === this.method && (this.arg = undefined), ContinueSentinel; | ||
iterator: values(e), | ||
resultName: r, | ||
nextLoc: n | ||
}, "next" === this.method && (this.arg = t), y; | ||
} | ||
}, exports; | ||
}, e; | ||
} |
@@ -1,9 +0,9 @@ | ||
export default function _typeof(obj) { | ||
export default function _typeof(o) { | ||
"@babel/helpers - typeof"; | ||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | ||
return typeof obj; | ||
} : function (obj) { | ||
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | ||
}, _typeof(obj); | ||
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | ||
return typeof o; | ||
} : function (o) { | ||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | ||
}, _typeof(o); | ||
} |
import _typeof from "./typeof.js"; | ||
export default function _using(stack, value, isAwait) { | ||
if (null == value) return value; | ||
if ("object" != _typeof(value)) throw new TypeError("using declarations can only be used with objects, null, or undefined."); | ||
if (isAwait) var dispose = value[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; | ||
if (null == dispose && (dispose = value[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof dispose) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
return stack.push({ | ||
v: value, | ||
d: dispose, | ||
a: isAwait | ||
}), value; | ||
export default function _using(o, e, n) { | ||
if (null == e) return e; | ||
if ("object" != _typeof(e)) throw new TypeError("using declarations can only be used with objects, null, or undefined."); | ||
if (n) var r = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; | ||
if (null == r && (r = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
return o.push({ | ||
v: e, | ||
d: r, | ||
a: n | ||
}), e; | ||
} |
@@ -5,47 +5,47 @@ import _typeof from "./typeof.js"; | ||
export default function _wrapRegExp() { | ||
_wrapRegExp = function _wrapRegExp(re, groups) { | ||
return new BabelRegExp(re, void 0, groups); | ||
_wrapRegExp = function _wrapRegExp(e, r) { | ||
return new BabelRegExp(e, void 0, r); | ||
}; | ||
var _super = RegExp.prototype, | ||
_groups = new WeakMap(); | ||
function BabelRegExp(re, flags, groups) { | ||
var _this = new RegExp(re, flags); | ||
return _groups.set(_this, groups || _groups.get(re)), setPrototypeOf(_this, BabelRegExp.prototype); | ||
var e = RegExp.prototype, | ||
r = new WeakMap(); | ||
function BabelRegExp(e, t, p) { | ||
var o = new RegExp(e, t); | ||
return r.set(o, p || r.get(e)), setPrototypeOf(o, BabelRegExp.prototype); | ||
} | ||
function buildGroups(result, re) { | ||
var g = _groups.get(re); | ||
return Object.keys(g).reduce(function (groups, name) { | ||
var i = g[name]; | ||
if ("number" == typeof i) groups[name] = result[i];else { | ||
for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++; | ||
groups[name] = result[i[k]]; | ||
function buildGroups(e, t) { | ||
var p = r.get(t); | ||
return Object.keys(p).reduce(function (r, t) { | ||
var o = p[t]; | ||
if ("number" == typeof o) r[t] = e[o];else { | ||
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; | ||
r[t] = e[o[i]]; | ||
} | ||
return groups; | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { | ||
var result = _super.exec.call(this, str); | ||
if (result) { | ||
result.groups = buildGroups(result, this); | ||
var indices = result.indices; | ||
indices && (indices.groups = buildGroups(indices, this)); | ||
return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { | ||
var t = e.exec.call(this, r); | ||
if (t) { | ||
t.groups = buildGroups(t, this); | ||
var p = t.indices; | ||
p && (p.groups = buildGroups(p, this)); | ||
} | ||
return result; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { | ||
if ("string" == typeof substitution) { | ||
var groups = _groups.get(this); | ||
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { | ||
var group = groups[name]; | ||
return "$" + (Array.isArray(group) ? group.join("$") : group); | ||
return t; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) { | ||
if ("string" == typeof p) { | ||
var o = r.get(this); | ||
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { | ||
var t = o[r]; | ||
return "$" + (Array.isArray(t) ? t.join("$") : t); | ||
})); | ||
} | ||
if ("function" == typeof substitution) { | ||
var _this = this; | ||
return _super[Symbol.replace].call(this, str, function () { | ||
var args = arguments; | ||
return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); | ||
if ("function" == typeof p) { | ||
var i = this; | ||
return e[Symbol.replace].call(this, t, function () { | ||
var e = arguments; | ||
return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); | ||
}); | ||
} | ||
return _super[Symbol.replace].call(this, str, substitution); | ||
return e[Symbol.replace].call(this, t, p); | ||
}, _wrapRegExp.apply(this, arguments); | ||
} |
@@ -1,28 +0,28 @@ | ||
function _iterableToArrayLimit(arr, i) { | ||
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; | ||
if (null != _i) { | ||
var _s, | ||
_e, | ||
_x, | ||
_r, | ||
_arr = [], | ||
_n = !0, | ||
_d = !1; | ||
function _iterableToArrayLimit(r, l) { | ||
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | ||
if (null != t) { | ||
var e, | ||
n, | ||
i, | ||
u, | ||
a = [], | ||
f = !0, | ||
o = !1; | ||
try { | ||
if (_x = (_i = _i.call(arr)).next, 0 === i) { | ||
if (Object(_i) !== _i) return; | ||
_n = !1; | ||
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); | ||
} catch (err) { | ||
_d = !0, _e = err; | ||
if (i = (t = t.call(r)).next, 0 === l) { | ||
if (Object(t) !== t) return; | ||
f = !1; | ||
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | ||
} catch (r) { | ||
o = !0, n = r; | ||
} finally { | ||
try { | ||
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; | ||
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | ||
} finally { | ||
if (_d) throw _e; | ||
if (o) throw n; | ||
} | ||
} | ||
return _arr; | ||
return a; | ||
} | ||
} | ||
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -1,10 +0,10 @@ | ||
function _iterableToArrayLimitLoose(arr, i) { | ||
var _i = arr && ("undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]); | ||
if (null != _i) { | ||
var _s, | ||
_arr = []; | ||
for (_i = _i.call(arr); arr.length < i && !(_s = _i.next()).done;) _arr.push(_s.value); | ||
return _arr; | ||
function _iterableToArrayLimitLoose(e, r) { | ||
var t = e && ("undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]); | ||
if (null != t) { | ||
var o, | ||
l = []; | ||
for (t = t.call(e); e.length < r && !(o = t.next()).done;) l.push(o.value); | ||
return l; | ||
} | ||
} | ||
module.exports = _iterableToArrayLimitLoose, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var REACT_ELEMENT_TYPE; | ||
function _createRawReactElement(type, props, key, children) { | ||
function _createRawReactElement(e, r, E, l) { | ||
REACT_ELEMENT_TYPE || (REACT_ELEMENT_TYPE = "function" == typeof Symbol && Symbol["for"] && Symbol["for"]("react.element") || 60103); | ||
var defaultProps = type && type.defaultProps, | ||
childrenLength = arguments.length - 3; | ||
if (props || 0 === childrenLength || (props = { | ||
var o = e && e.defaultProps, | ||
n = arguments.length - 3; | ||
if (r || 0 === n || (r = { | ||
children: void 0 | ||
}), 1 === childrenLength) props.children = children;else if (childrenLength > 1) { | ||
for (var childArray = new Array(childrenLength), i = 0; i < childrenLength; i++) childArray[i] = arguments[i + 3]; | ||
props.children = childArray; | ||
}), 1 === n) r.children = l;else if (n > 1) { | ||
for (var t = new Array(n), f = 0; f < n; f++) t[f] = arguments[f + 3]; | ||
r.children = t; | ||
} | ||
if (props && defaultProps) for (var propName in defaultProps) void 0 === props[propName] && (props[propName] = defaultProps[propName]);else props || (props = defaultProps || {}); | ||
if (r && o) for (var i in o) void 0 === r[i] && (r[i] = o[i]);else r || (r = o || {}); | ||
return { | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
type: type, | ||
key: void 0 === key ? null : "" + key, | ||
type: e, | ||
key: void 0 === E ? null : "" + E, | ||
ref: null, | ||
props: props, | ||
props: r, | ||
_owner: null | ||
@@ -20,0 +20,0 @@ }; |
var defineProperty = require("./defineProperty.js"); | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
function ownKeys(e, r) { | ||
var t = Object.keys(e); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
enumerableOnly && (symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
})), keys.push.apply(keys, symbols); | ||
var o = Object.getOwnPropertySymbols(e); | ||
r && (o = o.filter(function (r) { | ||
return Object.getOwnPropertyDescriptor(e, r).enumerable; | ||
})), t.push.apply(t, o); | ||
} | ||
return keys; | ||
return t; | ||
} | ||
function _objectSpread2(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = null != arguments[i] ? arguments[i] : {}; | ||
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | ||
defineProperty(target, key, source[key]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | ||
function _objectSpread2(e) { | ||
for (var r = 1; r < arguments.length; r++) { | ||
var t = null != arguments[r] ? arguments[r] : {}; | ||
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { | ||
defineProperty(e, r, t[r]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { | ||
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | ||
}); | ||
} | ||
return target; | ||
return e; | ||
} | ||
module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -1,4 +0,4 @@ | ||
function _OverloadYield(value, kind) { | ||
this.v = value, this.k = kind; | ||
function _OverloadYield(t, e) { | ||
this.v = t, this.k = e; | ||
} | ||
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -5,247 +5,252 @@ var _typeof = require("./typeof.js")["default"]; | ||
module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | ||
return exports; | ||
return e; | ||
}, module.exports.__esModule = true, module.exports["default"] = module.exports; | ||
var exports = {}, | ||
Op = Object.prototype, | ||
hasOwn = Op.hasOwnProperty, | ||
defineProperty = Object.defineProperty || function (obj, key, desc) { | ||
obj[key] = desc.value; | ||
var t, | ||
e = {}, | ||
r = Object.prototype, | ||
n = r.hasOwnProperty, | ||
o = Object.defineProperty || function (t, e, r) { | ||
t[e] = r.value; | ||
}, | ||
$Symbol = "function" == typeof Symbol ? Symbol : {}, | ||
iteratorSymbol = $Symbol.iterator || "@@iterator", | ||
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", | ||
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; | ||
function define(obj, key, value) { | ||
return Object.defineProperty(obj, key, { | ||
value: value, | ||
i = "function" == typeof Symbol ? Symbol : {}, | ||
a = i.iterator || "@@iterator", | ||
c = i.asyncIterator || "@@asyncIterator", | ||
u = i.toStringTag || "@@toStringTag"; | ||
function define(t, e, r) { | ||
return Object.defineProperty(t, e, { | ||
value: r, | ||
enumerable: !0, | ||
configurable: !0, | ||
writable: !0 | ||
}), obj[key]; | ||
}), t[e]; | ||
} | ||
try { | ||
define({}, ""); | ||
} catch (err) { | ||
define = function define(obj, key, value) { | ||
return obj[key] = value; | ||
} catch (t) { | ||
define = function define(t, e, r) { | ||
return t[e] = r; | ||
}; | ||
} | ||
function wrap(innerFn, outerFn, self, tryLocsList) { | ||
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, | ||
generator = Object.create(protoGenerator.prototype), | ||
context = new Context(tryLocsList || []); | ||
return defineProperty(generator, "_invoke", { | ||
value: makeInvokeMethod(innerFn, self, context) | ||
}), generator; | ||
function wrap(t, e, r, n) { | ||
var i = e && e.prototype instanceof Generator ? e : Generator, | ||
a = Object.create(i.prototype), | ||
c = new Context(n || []); | ||
return o(a, "_invoke", { | ||
value: makeInvokeMethod(t, r, c) | ||
}), a; | ||
} | ||
function tryCatch(fn, obj, arg) { | ||
function tryCatch(t, e, r) { | ||
try { | ||
return { | ||
type: "normal", | ||
arg: fn.call(obj, arg) | ||
arg: t.call(e, r) | ||
}; | ||
} catch (err) { | ||
} catch (t) { | ||
return { | ||
type: "throw", | ||
arg: err | ||
arg: t | ||
}; | ||
} | ||
} | ||
exports.wrap = wrap; | ||
var ContinueSentinel = {}; | ||
e.wrap = wrap; | ||
var h = "suspendedStart", | ||
l = "suspendedYield", | ||
f = "executing", | ||
s = "completed", | ||
y = {}; | ||
function Generator() {} | ||
function GeneratorFunction() {} | ||
function GeneratorFunctionPrototype() {} | ||
var IteratorPrototype = {}; | ||
define(IteratorPrototype, iteratorSymbol, function () { | ||
var p = {}; | ||
define(p, a, function () { | ||
return this; | ||
}); | ||
var getProto = Object.getPrototypeOf, | ||
NativeIteratorPrototype = getProto && getProto(getProto(values([]))); | ||
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); | ||
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); | ||
function defineIteratorMethods(prototype) { | ||
["next", "throw", "return"].forEach(function (method) { | ||
define(prototype, method, function (arg) { | ||
return this._invoke(method, arg); | ||
var d = Object.getPrototypeOf, | ||
v = d && d(d(values([]))); | ||
v && v !== r && n.call(v, a) && (p = v); | ||
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | ||
function defineIteratorMethods(t) { | ||
["next", "throw", "return"].forEach(function (e) { | ||
define(t, e, function (t) { | ||
return this._invoke(e, t); | ||
}); | ||
}); | ||
} | ||
function AsyncIterator(generator, PromiseImpl) { | ||
function invoke(method, arg, resolve, reject) { | ||
var record = tryCatch(generator[method], generator, arg); | ||
if ("throw" !== record.type) { | ||
var result = record.arg, | ||
value = result.value; | ||
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { | ||
invoke("next", value, resolve, reject); | ||
}, function (err) { | ||
invoke("throw", err, resolve, reject); | ||
}) : PromiseImpl.resolve(value).then(function (unwrapped) { | ||
result.value = unwrapped, resolve(result); | ||
}, function (error) { | ||
return invoke("throw", error, resolve, reject); | ||
function AsyncIterator(t, e) { | ||
function invoke(r, o, i, a) { | ||
var c = tryCatch(t[r], t, o); | ||
if ("throw" !== c.type) { | ||
var u = c.arg, | ||
h = u.value; | ||
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | ||
invoke("next", t, i, a); | ||
}, function (t) { | ||
invoke("throw", t, i, a); | ||
}) : e.resolve(h).then(function (t) { | ||
u.value = t, i(u); | ||
}, function (t) { | ||
return invoke("throw", t, i, a); | ||
}); | ||
} | ||
reject(record.arg); | ||
a(c.arg); | ||
} | ||
var previousPromise; | ||
defineProperty(this, "_invoke", { | ||
value: function value(method, arg) { | ||
var r; | ||
o(this, "_invoke", { | ||
value: function value(t, n) { | ||
function callInvokeWithMethodAndArg() { | ||
return new PromiseImpl(function (resolve, reject) { | ||
invoke(method, arg, resolve, reject); | ||
return new e(function (e, r) { | ||
invoke(t, n, e, r); | ||
}); | ||
} | ||
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | ||
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | ||
} | ||
}); | ||
} | ||
function makeInvokeMethod(innerFn, self, context) { | ||
var state = "suspendedStart"; | ||
return function (method, arg) { | ||
if ("executing" === state) throw new Error("Generator is already running"); | ||
if ("completed" === state) { | ||
if ("throw" === method) throw arg; | ||
function makeInvokeMethod(e, r, n) { | ||
var o = h; | ||
return function (i, a) { | ||
if (o === f) throw new Error("Generator is already running"); | ||
if (o === s) { | ||
if ("throw" === i) throw a; | ||
return { | ||
value: void 0, | ||
value: t, | ||
done: !0 | ||
}; | ||
} | ||
for (context.method = method, context.arg = arg;;) { | ||
var delegate = context.delegate; | ||
if (delegate) { | ||
var delegateResult = maybeInvokeDelegate(delegate, context); | ||
if (delegateResult) { | ||
if (delegateResult === ContinueSentinel) continue; | ||
return delegateResult; | ||
for (n.method = i, n.arg = a;;) { | ||
var c = n.delegate; | ||
if (c) { | ||
var u = maybeInvokeDelegate(c, n); | ||
if (u) { | ||
if (u === y) continue; | ||
return u; | ||
} | ||
} | ||
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { | ||
if ("suspendedStart" === state) throw state = "completed", context.arg; | ||
context.dispatchException(context.arg); | ||
} else "return" === context.method && context.abrupt("return", context.arg); | ||
state = "executing"; | ||
var record = tryCatch(innerFn, self, context); | ||
if ("normal" === record.type) { | ||
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; | ||
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | ||
if (o === h) throw o = s, n.arg; | ||
n.dispatchException(n.arg); | ||
} else "return" === n.method && n.abrupt("return", n.arg); | ||
o = f; | ||
var p = tryCatch(e, r, n); | ||
if ("normal" === p.type) { | ||
if (o = n.done ? s : l, p.arg === y) continue; | ||
return { | ||
value: record.arg, | ||
done: context.done | ||
value: p.arg, | ||
done: n.done | ||
}; | ||
} | ||
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); | ||
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | ||
} | ||
}; | ||
} | ||
function maybeInvokeDelegate(delegate, context) { | ||
var methodName = context.method, | ||
method = delegate.iterator[methodName]; | ||
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; | ||
var record = tryCatch(method, delegate.iterator, context.arg); | ||
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; | ||
var info = record.arg; | ||
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); | ||
function maybeInvokeDelegate(e, r) { | ||
var n = r.method, | ||
o = e.iterator[n]; | ||
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; | ||
var i = tryCatch(o, e.iterator, r.arg); | ||
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | ||
var a = i.arg; | ||
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); | ||
} | ||
function pushTryEntry(locs) { | ||
var entry = { | ||
tryLoc: locs[0] | ||
function pushTryEntry(t) { | ||
var e = { | ||
tryLoc: t[0] | ||
}; | ||
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); | ||
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | ||
} | ||
function resetTryEntry(entry) { | ||
var record = entry.completion || {}; | ||
record.type = "normal", delete record.arg, entry.completion = record; | ||
function resetTryEntry(t) { | ||
var e = t.completion || {}; | ||
e.type = "normal", delete e.arg, t.completion = e; | ||
} | ||
function Context(tryLocsList) { | ||
function Context(t) { | ||
this.tryEntries = [{ | ||
tryLoc: "root" | ||
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); | ||
}], t.forEach(pushTryEntry, this), this.reset(!0); | ||
} | ||
function values(iterable) { | ||
if (iterable || "" === iterable) { | ||
var iteratorMethod = iterable[iteratorSymbol]; | ||
if (iteratorMethod) return iteratorMethod.call(iterable); | ||
if ("function" == typeof iterable.next) return iterable; | ||
if (!isNaN(iterable.length)) { | ||
var i = -1, | ||
next = function next() { | ||
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; | ||
return next.value = undefined, next.done = !0, next; | ||
function values(e) { | ||
if (e || "" === e) { | ||
var r = e[a]; | ||
if (r) return r.call(e); | ||
if ("function" == typeof e.next) return e; | ||
if (!isNaN(e.length)) { | ||
var o = -1, | ||
i = function next() { | ||
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | ||
return next.value = t, next.done = !0, next; | ||
}; | ||
return next.next = next; | ||
return i.next = i; | ||
} | ||
} | ||
throw new TypeError(_typeof(iterable) + " is not iterable"); | ||
throw new TypeError(_typeof(e) + " is not iterable"); | ||
} | ||
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { | ||
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | ||
value: GeneratorFunctionPrototype, | ||
configurable: !0 | ||
}), defineProperty(GeneratorFunctionPrototype, "constructor", { | ||
}), o(GeneratorFunctionPrototype, "constructor", { | ||
value: GeneratorFunction, | ||
configurable: !0 | ||
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { | ||
var ctor = "function" == typeof genFun && genFun.constructor; | ||
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); | ||
}, exports.mark = function (genFun) { | ||
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; | ||
}, exports.awrap = function (arg) { | ||
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | ||
var e = "function" == typeof t && t.constructor; | ||
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | ||
}, e.mark = function (t) { | ||
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | ||
}, e.awrap = function (t) { | ||
return { | ||
__await: arg | ||
__await: t | ||
}; | ||
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { | ||
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | ||
return this; | ||
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { | ||
void 0 === PromiseImpl && (PromiseImpl = Promise); | ||
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); | ||
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { | ||
return result.done ? result.value : iter.next(); | ||
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | ||
void 0 === i && (i = Promise); | ||
var a = new AsyncIterator(wrap(t, r, n, o), i); | ||
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | ||
return t.done ? t.value : a.next(); | ||
}); | ||
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { | ||
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | ||
return this; | ||
}), define(Gp, "toString", function () { | ||
}), define(g, "toString", function () { | ||
return "[object Generator]"; | ||
}), exports.keys = function (val) { | ||
var object = Object(val), | ||
keys = []; | ||
for (var key in object) keys.push(key); | ||
return keys.reverse(), function next() { | ||
for (; keys.length;) { | ||
var key = keys.pop(); | ||
if (key in object) return next.value = key, next.done = !1, next; | ||
}), e.keys = function (t) { | ||
var e = Object(t), | ||
r = []; | ||
for (var n in e) r.push(n); | ||
return r.reverse(), function next() { | ||
for (; r.length;) { | ||
var t = r.pop(); | ||
if (t in e) return next.value = t, next.done = !1, next; | ||
} | ||
return next.done = !0, next; | ||
}; | ||
}, exports.values = values, Context.prototype = { | ||
}, e.values = values, Context.prototype = { | ||
constructor: Context, | ||
reset: function reset(skipTempReset) { | ||
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); | ||
reset: function reset(e) { | ||
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); | ||
}, | ||
stop: function stop() { | ||
this.done = !0; | ||
var rootRecord = this.tryEntries[0].completion; | ||
if ("throw" === rootRecord.type) throw rootRecord.arg; | ||
var t = this.tryEntries[0].completion; | ||
if ("throw" === t.type) throw t.arg; | ||
return this.rval; | ||
}, | ||
dispatchException: function dispatchException(exception) { | ||
if (this.done) throw exception; | ||
var context = this; | ||
function handle(loc, caught) { | ||
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; | ||
dispatchException: function dispatchException(e) { | ||
if (this.done) throw e; | ||
var r = this; | ||
function handle(n, o) { | ||
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | ||
} | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i], | ||
record = entry.completion; | ||
if ("root" === entry.tryLoc) return handle("end"); | ||
if (entry.tryLoc <= this.prev) { | ||
var hasCatch = hasOwn.call(entry, "catchLoc"), | ||
hasFinally = hasOwn.call(entry, "finallyLoc"); | ||
if (hasCatch && hasFinally) { | ||
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); | ||
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); | ||
} else if (hasCatch) { | ||
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); | ||
for (var o = this.tryEntries.length - 1; o >= 0; --o) { | ||
var i = this.tryEntries[o], | ||
a = i.completion; | ||
if ("root" === i.tryLoc) return handle("end"); | ||
if (i.tryLoc <= this.prev) { | ||
var c = n.call(i, "catchLoc"), | ||
u = n.call(i, "finallyLoc"); | ||
if (c && u) { | ||
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | ||
if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | ||
} else if (c) { | ||
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | ||
} else { | ||
if (!hasFinally) throw new Error("try statement without catch or finally"); | ||
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); | ||
if (!u) throw new Error("try statement without catch or finally"); | ||
if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | ||
} | ||
@@ -255,34 +260,34 @@ } | ||
}, | ||
abrupt: function abrupt(type, arg) { | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { | ||
var finallyEntry = entry; | ||
abrupt: function abrupt(t, e) { | ||
for (var r = this.tryEntries.length - 1; r >= 0; --r) { | ||
var o = this.tryEntries[r]; | ||
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | ||
var i = o; | ||
break; | ||
} | ||
} | ||
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); | ||
var record = finallyEntry ? finallyEntry.completion : {}; | ||
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); | ||
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | ||
var a = i ? i.completion : {}; | ||
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | ||
}, | ||
complete: function complete(record, afterLoc) { | ||
if ("throw" === record.type) throw record.arg; | ||
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; | ||
complete: function complete(t, e) { | ||
if ("throw" === t.type) throw t.arg; | ||
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; | ||
}, | ||
finish: function finish(finallyLoc) { | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; | ||
finish: function finish(t) { | ||
for (var e = this.tryEntries.length - 1; e >= 0; --e) { | ||
var r = this.tryEntries[e]; | ||
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | ||
} | ||
}, | ||
"catch": function _catch(tryLoc) { | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.tryLoc === tryLoc) { | ||
var record = entry.completion; | ||
if ("throw" === record.type) { | ||
var thrown = record.arg; | ||
resetTryEntry(entry); | ||
"catch": function _catch(t) { | ||
for (var e = this.tryEntries.length - 1; e >= 0; --e) { | ||
var r = this.tryEntries[e]; | ||
if (r.tryLoc === t) { | ||
var n = r.completion; | ||
if ("throw" === n.type) { | ||
var o = n.arg; | ||
resetTryEntry(r); | ||
} | ||
return thrown; | ||
return o; | ||
} | ||
@@ -292,11 +297,11 @@ } | ||
}, | ||
delegateYield: function delegateYield(iterable, resultName, nextLoc) { | ||
delegateYield: function delegateYield(e, r, n) { | ||
return this.delegate = { | ||
iterator: values(iterable), | ||
resultName: resultName, | ||
nextLoc: nextLoc | ||
}, "next" === this.method && (this.arg = undefined), ContinueSentinel; | ||
iterator: values(e), | ||
resultName: r, | ||
nextLoc: n | ||
}, "next" === this.method && (this.arg = t), y; | ||
} | ||
}, exports; | ||
}, e; | ||
} | ||
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -1,10 +0,10 @@ | ||
function _typeof(obj) { | ||
function _typeof(o) { | ||
"@babel/helpers - typeof"; | ||
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | ||
return typeof obj; | ||
} : function (obj) { | ||
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | ||
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); | ||
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | ||
return typeof o; | ||
} : function (o) { | ||
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | ||
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); | ||
} | ||
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
var _typeof = require("./typeof.js")["default"]; | ||
function _using(stack, value, isAwait) { | ||
if (null == value) return value; | ||
if ("object" != _typeof(value)) throw new TypeError("using declarations can only be used with objects, null, or undefined."); | ||
if (isAwait) var dispose = value[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; | ||
if (null == dispose && (dispose = value[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof dispose) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
return stack.push({ | ||
v: value, | ||
d: dispose, | ||
a: isAwait | ||
}), value; | ||
function _using(o, e, n) { | ||
if (null == e) return e; | ||
if ("object" != _typeof(e)) throw new TypeError("using declarations can only be used with objects, null, or undefined."); | ||
if (n) var r = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")]; | ||
if (null == r && (r = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function."); | ||
return o.push({ | ||
v: e, | ||
d: r, | ||
a: n | ||
}), e; | ||
} | ||
module.exports = _using, module.exports.__esModule = true, module.exports["default"] = module.exports; |
@@ -5,48 +5,48 @@ var _typeof = require("./typeof.js")["default"]; | ||
function _wrapRegExp() { | ||
module.exports = _wrapRegExp = function _wrapRegExp(re, groups) { | ||
return new BabelRegExp(re, void 0, groups); | ||
module.exports = _wrapRegExp = function _wrapRegExp(e, r) { | ||
return new BabelRegExp(e, void 0, r); | ||
}, module.exports.__esModule = true, module.exports["default"] = module.exports; | ||
var _super = RegExp.prototype, | ||
_groups = new WeakMap(); | ||
function BabelRegExp(re, flags, groups) { | ||
var _this = new RegExp(re, flags); | ||
return _groups.set(_this, groups || _groups.get(re)), setPrototypeOf(_this, BabelRegExp.prototype); | ||
var e = RegExp.prototype, | ||
r = new WeakMap(); | ||
function BabelRegExp(e, t, p) { | ||
var o = new RegExp(e, t); | ||
return r.set(o, p || r.get(e)), setPrototypeOf(o, BabelRegExp.prototype); | ||
} | ||
function buildGroups(result, re) { | ||
var g = _groups.get(re); | ||
return Object.keys(g).reduce(function (groups, name) { | ||
var i = g[name]; | ||
if ("number" == typeof i) groups[name] = result[i];else { | ||
for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) k++; | ||
groups[name] = result[i[k]]; | ||
function buildGroups(e, t) { | ||
var p = r.get(t); | ||
return Object.keys(p).reduce(function (r, t) { | ||
var o = p[t]; | ||
if ("number" == typeof o) r[t] = e[o];else { | ||
for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; | ||
r[t] = e[o[i]]; | ||
} | ||
return groups; | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { | ||
var result = _super.exec.call(this, str); | ||
if (result) { | ||
result.groups = buildGroups(result, this); | ||
var indices = result.indices; | ||
indices && (indices.groups = buildGroups(indices, this)); | ||
return inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { | ||
var t = e.exec.call(this, r); | ||
if (t) { | ||
t.groups = buildGroups(t, this); | ||
var p = t.indices; | ||
p && (p.groups = buildGroups(p, this)); | ||
} | ||
return result; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { | ||
if ("string" == typeof substitution) { | ||
var groups = _groups.get(this); | ||
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { | ||
var group = groups[name]; | ||
return "$" + (Array.isArray(group) ? group.join("$") : group); | ||
return t; | ||
}, BabelRegExp.prototype[Symbol.replace] = function (t, p) { | ||
if ("string" == typeof p) { | ||
var o = r.get(this); | ||
return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { | ||
var t = o[r]; | ||
return "$" + (Array.isArray(t) ? t.join("$") : t); | ||
})); | ||
} | ||
if ("function" == typeof substitution) { | ||
var _this = this; | ||
return _super[Symbol.replace].call(this, str, function () { | ||
var args = arguments; | ||
return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); | ||
if ("function" == typeof p) { | ||
var i = this; | ||
return e[Symbol.replace].call(this, t, function () { | ||
var e = arguments; | ||
return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); | ||
}); | ||
} | ||
return _super[Symbol.replace].call(this, str, substitution); | ||
return e[Symbol.replace].call(this, t, p); | ||
}, _wrapRegExp.apply(this, arguments); | ||
} | ||
module.exports = _wrapRegExp, module.exports.__esModule = true, module.exports["default"] = module.exports; |
{ | ||
"name": "@babel/runtime", | ||
"version": "7.22.10", | ||
"version": "7.22.11", | ||
"description": "babel's modular runtime helpers", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
244147
5530