valine-unpkg-avmin
Version:
A simple comment system based on Leancloud, which the Leancloud component CDN is replaced to UNPKG.
977 lines (975 loc) • 223 kB
JavaScript
!(function (e, t) {
'object' == typeof exports && 'undefined' != typeof module
? t(require('balajs'), require('xss'))
: 'function' == typeof define && define.amd
? define(['balajs', 'xss'], t)
: t(e.balajs, e.xss)
})(this, function (e, t) {
;(e = e && e.hasOwnProperty('default') ? e.default : e),
(t = t && t.hasOwnProperty('default') ? t.default : t)
var n =
'undefined' != typeof globalThis
? globalThis
: 'undefined' != typeof window
? window
: 'undefined' != typeof global
? global
: 'undefined' != typeof self
? self
: {}
function r(e, t) {
return e((t = { exports: {} }), t.exports), t.exports
}
var i = r(function (e) {
!(function (t) {
function n(e, t) {
var n = (65535 & e) + (65535 & t)
return (
(((e >> 16) + (t >> 16) + (n >> 16)) << 16) |
(65535 & n)
)
}
function r(e, t, r, i, o, a) {
return n(
((s = n(n(t, e), n(i, a))) << (l = o)) |
(s >>> (32 - l)),
r
)
var s, l
}
function i(e, t, n, i, o, a, s) {
return r((t & n) | (~t & i), e, t, o, a, s)
}
function o(e, t, n, i, o, a, s) {
return r((t & i) | (n & ~i), e, t, o, a, s)
}
function a(e, t, n, i, o, a, s) {
return r(t ^ n ^ i, e, t, o, a, s)
}
function s(e, t, n, i, o, a, s) {
return r(n ^ (t | ~i), e, t, o, a, s)
}
function l(e, t) {
var r, l, c, p, u
;(e[t >> 5] |= 128 << t % 32),
(e[14 + (((t + 64) >>> 9) << 4)] = t)
var d = 1732584193,
f = -271733879,
h = -1732584194,
g = 271733878
for (r = 0; r < e.length; r += 16)
(l = d),
(c = f),
(p = h),
(u = g),
(d = i(d, f, h, g, e[r], 7, -680876936)),
(g = i(g, d, f, h, e[r + 1], 12, -389564586)),
(h = i(h, g, d, f, e[r + 2], 17, 606105819)),
(f = i(f, h, g, d, e[r + 3], 22, -1044525330)),
(d = i(d, f, h, g, e[r + 4], 7, -176418897)),
(g = i(g, d, f, h, e[r + 5], 12, 1200080426)),
(h = i(h, g, d, f, e[r + 6], 17, -1473231341)),
(f = i(f, h, g, d, e[r + 7], 22, -45705983)),
(d = i(d, f, h, g, e[r + 8], 7, 1770035416)),
(g = i(g, d, f, h, e[r + 9], 12, -1958414417)),
(h = i(h, g, d, f, e[r + 10], 17, -42063)),
(f = i(f, h, g, d, e[r + 11], 22, -1990404162)),
(d = i(d, f, h, g, e[r + 12], 7, 1804603682)),
(g = i(g, d, f, h, e[r + 13], 12, -40341101)),
(h = i(h, g, d, f, e[r + 14], 17, -1502002290)),
(d = o(
d,
(f = i(f, h, g, d, e[r + 15], 22, 1236535329)),
h,
g,
e[r + 1],
5,
-165796510
)),
(g = o(g, d, f, h, e[r + 6], 9, -1069501632)),
(h = o(h, g, d, f, e[r + 11], 14, 643717713)),
(f = o(f, h, g, d, e[r], 20, -373897302)),
(d = o(d, f, h, g, e[r + 5], 5, -701558691)),
(g = o(g, d, f, h, e[r + 10], 9, 38016083)),
(h = o(h, g, d, f, e[r + 15], 14, -660478335)),
(f = o(f, h, g, d, e[r + 4], 20, -405537848)),
(d = o(d, f, h, g, e[r + 9], 5, 568446438)),
(g = o(g, d, f, h, e[r + 14], 9, -1019803690)),
(h = o(h, g, d, f, e[r + 3], 14, -187363961)),
(f = o(f, h, g, d, e[r + 8], 20, 1163531501)),
(d = o(d, f, h, g, e[r + 13], 5, -1444681467)),
(g = o(g, d, f, h, e[r + 2], 9, -51403784)),
(h = o(h, g, d, f, e[r + 7], 14, 1735328473)),
(d = a(
d,
(f = o(f, h, g, d, e[r + 12], 20, -1926607734)),
h,
g,
e[r + 5],
4,
-378558
)),
(g = a(g, d, f, h, e[r + 8], 11, -2022574463)),
(h = a(h, g, d, f, e[r + 11], 16, 1839030562)),
(f = a(f, h, g, d, e[r + 14], 23, -35309556)),
(d = a(d, f, h, g, e[r + 1], 4, -1530992060)),
(g = a(g, d, f, h, e[r + 4], 11, 1272893353)),
(h = a(h, g, d, f, e[r + 7], 16, -155497632)),
(f = a(f, h, g, d, e[r + 10], 23, -1094730640)),
(d = a(d, f, h, g, e[r + 13], 4, 681279174)),
(g = a(g, d, f, h, e[r], 11, -358537222)),
(h = a(h, g, d, f, e[r + 3], 16, -722521979)),
(f = a(f, h, g, d, e[r + 6], 23, 76029189)),
(d = a(d, f, h, g, e[r + 9], 4, -640364487)),
(g = a(g, d, f, h, e[r + 12], 11, -421815835)),
(h = a(h, g, d, f, e[r + 15], 16, 530742520)),
(d = s(
d,
(f = a(f, h, g, d, e[r + 2], 23, -995338651)),
h,
g,
e[r],
6,
-198630844
)),
(g = s(g, d, f, h, e[r + 7], 10, 1126891415)),
(h = s(h, g, d, f, e[r + 14], 15, -1416354905)),
(f = s(f, h, g, d, e[r + 5], 21, -57434055)),
(d = s(d, f, h, g, e[r + 12], 6, 1700485571)),
(g = s(g, d, f, h, e[r + 3], 10, -1894986606)),
(h = s(h, g, d, f, e[r + 10], 15, -1051523)),
(f = s(f, h, g, d, e[r + 1], 21, -2054922799)),
(d = s(d, f, h, g, e[r + 8], 6, 1873313359)),
(g = s(g, d, f, h, e[r + 15], 10, -30611744)),
(h = s(h, g, d, f, e[r + 6], 15, -1560198380)),
(f = s(f, h, g, d, e[r + 13], 21, 1309151649)),
(d = s(d, f, h, g, e[r + 4], 6, -145523070)),
(g = s(g, d, f, h, e[r + 11], 10, -1120210379)),
(h = s(h, g, d, f, e[r + 2], 15, 718787259)),
(f = s(f, h, g, d, e[r + 9], 21, -343485551)),
(d = n(d, l)),
(f = n(f, c)),
(h = n(h, p)),
(g = n(g, u))
return [d, f, h, g]
}
function c(e) {
var t,
n = '',
r = 32 * e.length
for (t = 0; t < r; t += 8)
n += String.fromCharCode((e[t >> 5] >>> t % 32) & 255)
return n
}
function p(e) {
var t,
n = []
for (
n[(e.length >> 2) - 1] = void 0, t = 0;
t < n.length;
t += 1
)
n[t] = 0
var r = 8 * e.length
for (t = 0; t < r; t += 8)
n[t >> 5] |= (255 & e.charCodeAt(t / 8)) << t % 32
return n
}
function u(e) {
var t,
n,
r = ''
for (n = 0; n < e.length; n += 1)
(t = e.charCodeAt(n)),
(r +=
'0123456789abcdef'.charAt((t >>> 4) & 15) +
'0123456789abcdef'.charAt(15 & t))
return r
}
function d(e) {
return unescape(encodeURIComponent(e))
}
function f(e) {
return (function (e) {
return c(l(p(e), 8 * e.length))
})(d(e))
}
function h(e, t) {
return (function (e, t) {
var n,
r,
i = p(e),
o = [],
a = []
for (
o[15] = a[15] = void 0,
i.length > 16 && (i = l(i, 8 * e.length)),
n = 0;
n < 16;
n += 1
)
(o[n] = 909522486 ^ i[n]),
(a[n] = 1549556828 ^ i[n])
return (
(r = l(o.concat(p(t)), 512 + 8 * t.length)),
c(l(a.concat(r), 640))
)
})(d(e), d(t))
}
function g(e, t, n) {
return t ? (n ? h(t, e) : u(h(t, e))) : n ? f(e) : u(f(e))
}
e.exports ? (e.exports = g) : (t.md5 = g)
})(n)
}),
o = r(function (e, t) {
!(function (e, t) {
var n,
r,
i =
'function' == typeof Map
? new Map()
: ((n = []),
(r = []),
{
has: function (e) {
return n.indexOf(e) > -1
},
get: function (e) {
return r[n.indexOf(e)]
},
set: function (e, t) {
;-1 === n.indexOf(e) &&
(n.push(e), r.push(t))
},
delete: function (e) {
var t = n.indexOf(e)
t > -1 && (n.splice(t, 1), r.splice(t, 1))
},
}),
o = function (e) {
return new Event(e, { bubbles: !0 })
}
try {
new Event('test')
} catch (e) {
o = function (e) {
var t = document.createEvent('Event')
return t.initEvent(e, !0, !1), t
}
}
function a(e) {
var t = i.get(e)
t && t.destroy()
}
function s(e) {
var t = i.get(e)
t && t.update()
}
var l = null
'undefined' == typeof window ||
'function' != typeof window.getComputedStyle
? (((l = function (e) {
return e
}).destroy = function (e) {
return e
}),
(l.update = function (e) {
return e
}))
: (((l = function (e, t) {
return (
e &&
Array.prototype.forEach.call(
e.length ? e : [e],
function (e) {
return (function (e) {
if (
e &&
e.nodeName &&
'TEXTAREA' === e.nodeName &&
!i.has(e)
) {
var t = null,
n = null,
r = null,
a = function () {
e.clientWidth !== n &&
u()
},
s = function (t) {
window.removeEventListener(
'resize',
a,
!1
),
e.removeEventListener(
'input',
u,
!1
),
e.removeEventListener(
'keyup',
u,
!1
),
e.removeEventListener(
'autosize:destroy',
s,
!1
),
e.removeEventListener(
'autosize:update',
u,
!1
),
Object.keys(
t
).forEach(
function (n) {
e.style[
n
] = t[n]
}
),
i.delete(e)
}.bind(e, {
height:
e.style.height,
resize:
e.style.resize,
overflowY:
e.style.overflowY,
overflowX:
e.style.overflowX,
wordWrap:
e.style.wordWrap,
})
e.addEventListener(
'autosize:destroy',
s,
!1
),
'onpropertychange' in e &&
'oninput' in e &&
e.addEventListener(
'keyup',
u,
!1
),
window.addEventListener(
'resize',
a,
!1
),
e.addEventListener(
'input',
u,
!1
),
e.addEventListener(
'autosize:update',
u,
!1
),
(e.style.overflowX =
'hidden'),
(e.style.wordWrap =
'break-word'),
i.set(e, {
destroy: s,
update: u,
}),
'vertical' ===
(l = window.getComputedStyle(
e,
null
)).resize
? (e.style.resize =
'none')
: 'both' ===
l.resize &&
(e.style.resize =
'horizontal'),
(t =
'content-box' ===
l.boxSizing
? -(
parseFloat(
l.paddingTop
) +
parseFloat(
l.paddingBottom
)
)
: parseFloat(
l.borderTopWidth
) +
parseFloat(
l.borderBottomWidth
)),
isNaN(t) && (t = 0),
u()
}
var l
function c(t) {
var n = e.style.width
;(e.style.width = '0px'),
(e.style.width = n),
(e.style.overflowY = t)
}
function p() {
if (0 !== e.scrollHeight) {
var r = (function (e) {
for (
var t = [];
e &&
e.parentNode &&
e.parentNode instanceof
Element;
)
e.parentNode
.scrollTop &&
t.push({
node:
e.parentNode,
scrollTop:
e
.parentNode
.scrollTop,
}),
(e =
e.parentNode)
return t
})(e),
i =
document.documentElement &&
document
.documentElement
.scrollTop
;(e.style.height = ''),
(e.style.height =
e.scrollHeight +
t +
'px'),
(n = e.clientWidth),
r.forEach(function (
e
) {
e.node.scrollTop =
e.scrollTop
}),
i &&
(document.documentElement.scrollTop = i)
}
}
function u() {
p()
var t = Math.round(
parseFloat(
e.style.height
)
),
n = window.getComputedStyle(
e,
null
),
i =
'content-box' ===
n.boxSizing
? Math.round(
parseFloat(
n.height
)
)
: e.offsetHeight
if (
(i < t
? 'hidden' ===
n.overflowY &&
(c('scroll'),
p(),
(i =
'content-box' ===
n.boxSizing
? Math.round(
parseFloat(
window.getComputedStyle(
e,
null
)
.height
)
)
: e.offsetHeight))
: 'hidden' !==
n.overflowY &&
(c('hidden'),
p(),
(i =
'content-box' ===
n.boxSizing
? Math.round(
parseFloat(
window.getComputedStyle(
e,
null
)
.height
)
)
: e.offsetHeight)),
r !== i)
) {
r = i
var a = o(
'autosize:resized'
)
try {
e.dispatchEvent(a)
} catch (e) {}
}
}
})(e)
}
),
e
)
}).destroy = function (e) {
return (
e &&
Array.prototype.forEach.call(
e.length ? e : [e],
a
),
e
)
}),
(l.update = function (e) {
return (
e &&
Array.prototype.forEach.call(
e.length ? e : [e],
s
),
e
)
})),
(t.default = l),
(e.exports = t.default)
})(e, t)
}),
a = Function.prototype.toString,
s = /^\s*class\b/,
l = function (e) {
try {
var t = a.call(e)
return s.test(t)
} catch (e) {
return !1
}
},
c = Object.prototype.toString,
p =
'function' == typeof Symbol &&
'symbol' == typeof Symbol.toStringTag,
u = Object.prototype.toString,
d = Object.prototype.hasOwnProperty,
f = function (e, t, n) {
if (
!(function (e) {
if (!e) return !1
if ('function' != typeof e && 'object' != typeof e)
return !1
if ('function' == typeof e && !e.prototype) return !0
if (p)
return (function (e) {
try {
return !l(e) && (a.call(e), !0)
} catch (e) {
return !1
}
})(e)
if (l(e)) return !1
var t = c.call(e)
return (
'[object Function]' === t ||
'[object GeneratorFunction]' === t
)
})(t)
)
throw new TypeError('iterator must be a function')
var r
arguments.length >= 3 && (r = n),
'[object Array]' === u.call(e)
? (function (e, t, n) {
for (var r = 0, i = e.length; r < i; r++)
d.call(e, r) &&
(null == n
? t(e[r], r, e)
: t.call(n, e[r], r, e))
})(e, t, r)
: 'string' == typeof e
? (function (e, t, n) {
for (var r = 0, i = e.length; r < i; r++)
null == n
? t(e.charAt(r), r, e)
: t.call(n, e.charAt(r), r, e)
})(e, t, r)
: (function (e, t, n) {
for (var r in e)
d.call(e, r) &&
(null == n
? t(e[r], r, e)
: t.call(n, e[r], r, e))
})(e, t, r)
},
h = function () {}
'production' !== process.env.NODE_ENV &&
(h = function (e, t, n) {
var r = arguments.length
n = new Array(r > 2 ? r - 2 : 0)
for (var i = 2; i < r; i++) n[i - 2] = arguments[i]
if (void 0 === t)
throw new Error(
'`warning(condition, format, ...args)` requires a warning message argument'
)
e ||
function (e, t) {
var n = arguments.length
t = new Array(n > 1 ? n - 1 : 0)
for (var r = 1; r < n; r++) t[r - 1] = arguments[r]
var i = 0,
o =
'Warning: ' +
e.replace(/%s/g, function () {
return t[i++]
})
'undefined' != typeof console && console.error(o)
try {
throw new Error(o)
} catch (e) {}
}.apply(null, [t].concat(n))
})
var g = h,
y = Array.prototype.slice,
v = Object.prototype.toString,
m =
Function.prototype.bind ||
function (e) {
var t = this
if ('function' != typeof t || '[object Function]' !== v.call(t))
throw new TypeError(
'Function.prototype.bind called on incompatible ' + t
)
for (
var n,
r = y.call(arguments, 1),
i = Math.max(0, t.length - r.length),
o = [],
a = 0;
a < i;
a++
)
o.push('$' + a)
if (
((n = Function(
'binder',
'return function (' +
o.join(',') +
'){ return binder.apply(this,arguments); }'
)(function () {
if (this instanceof n) {
var i = t.apply(this, r.concat(y.call(arguments)))
return Object(i) === i ? i : this
}
return t.apply(e, r.concat(y.call(arguments)))
})),
t.prototype)
) {
var s = function () {}
;(s.prototype = t.prototype),
(n.prototype = new s()),
(s.prototype = null)
}
return n
},
b = m.call(Function.call, Object.prototype.hasOwnProperty),
w = n.Symbol,
x = TypeError,
k = Object.getOwnPropertyDescriptor
if (k)
try {
k({}, '')
} catch (e) {
k = null
}
var A = function () {
throw new x()
},
$ = k
? (function () {
try {
return A
} catch (e) {
try {
return k(arguments, 'callee').get
} catch (e) {
return A
}
}
})()
: A,
S =
'function' == typeof w &&
'function' == typeof Symbol &&
'symbol' == typeof w('foo') &&
'symbol' == typeof Symbol('bar') &&
(function () {
if (
'function' != typeof Symbol ||
'function' != typeof Object.getOwnPropertySymbols
)
return !1
if ('symbol' == typeof Symbol.iterator) return !0
var e = {},
t = Symbol('test'),
n = Object(t)
if ('string' == typeof t) return !1
if ('[object Symbol]' !== Object.prototype.toString.call(t))
return !1
if ('[object Symbol]' !== Object.prototype.toString.call(n))
return !1
for (t in ((e[t] = 42), e)) return !1
if (
'function' == typeof Object.keys &&
0 !== Object.keys(e).length
)
return !1
if (
'function' == typeof Object.getOwnPropertyNames &&
0 !== Object.getOwnPropertyNames(e).length
)
return !1
var r = Object.getOwnPropertySymbols(e)
if (1 !== r.length || r[0] !== t) return !1
if (!Object.prototype.propertyIsEnumerable.call(e, t)) return !1
if ('function' == typeof Object.getOwnPropertyDescriptor) {
var i = Object.getOwnPropertyDescriptor(e, t)
if (42 !== i.value || !0 !== i.enumerable) return !1
}
return !0
})(),
O =
Object.getPrototypeOf ||
function (e) {
return e.__proto__
},
E = 'undefined' == typeof Uint8Array ? void 0 : O(Uint8Array),
_ = {
'%Array%': Array,
'%ArrayBuffer%':
'undefined' == typeof ArrayBuffer ? void 0 : ArrayBuffer,
'%ArrayBufferPrototype%':
'undefined' == typeof ArrayBuffer
? void 0
: ArrayBuffer.prototype,
'%ArrayIteratorPrototype%': S ? O([][Symbol.iterator]()) : void 0,
'%ArrayPrototype%': Array.prototype,
'%ArrayProto_entries%': Array.prototype.entries,
'%ArrayProto_forEach%': Array.prototype.forEach,
'%ArrayProto_keys%': Array.prototype.keys,
'%ArrayProto_values%': Array.prototype.values,
'%AsyncFromSyncIteratorPrototype%': void 0,
'%AsyncFunction%': void 0,
'%AsyncFunctionPrototype%': void 0,
'%AsyncGenerator%': void 0,
'%AsyncGeneratorFunction%': void 0,
'%AsyncGeneratorPrototype%': void 0,
'%AsyncIteratorPrototype%': void 0,
'%Atomics%': 'undefined' == typeof Atomics ? void 0 : Atomics,
'%Boolean%': Boolean,
'%BooleanPrototype%': Boolean.prototype,
'%DataView%': 'undefined' == typeof DataView ? void 0 : DataView,
'%DataViewPrototype%':
'undefined' == typeof DataView ? void 0 : DataView.prototype,
'%Date%': Date,
'%DatePrototype%': Date.prototype,
'%decodeURI%': decodeURI,
'%decodeURIComponent%': decodeURIComponent,
'%encodeURI%': encodeURI,
'%encodeURIComponent%': encodeURIComponent,
'%Error%': Error,
'%ErrorPrototype%': Error.prototype,
'%eval%': eval,
'%EvalError%': EvalError,
'%EvalErrorPrototype%': EvalError.prototype,
'%Float32Array%':
'undefined' == typeof Float32Array ? void 0 : Float32Array,
'%Float32ArrayPrototype%':
'undefined' == typeof Float32Array
? void 0
: Float32Array.prototype,
'%Float64Array%':
'undefined' == typeof Float64Array ? void 0 : Float64Array,
'%Float64ArrayPrototype%':
'undefined' == typeof Float64Array
? void 0
: Float64Array.prototype,
'%Function%': Function,
'%FunctionPrototype%': Function.prototype,
'%Generator%': void 0,
'%GeneratorFunction%': void 0,
'%GeneratorPrototype%': void 0,
'%Int8Array%': 'undefined' == typeof Int8Array ? void 0 : Int8Array,
'%Int8ArrayPrototype%':
'undefined' == typeof Int8Array ? void 0 : Int8Array.prototype,
'%Int16Array%':
'undefined' == typeof Int16Array ? void 0 : Int16Array,
'%Int16ArrayPrototype%':
'undefined' == typeof Int16Array ? void 0 : Int8Array.prototype,
'%Int32Array%':
'undefined' == typeof Int32Array ? void 0 : Int32Array,
'%Int32ArrayPrototype%':
'undefined' == typeof Int32Array
? void 0
: Int32Array.prototype,
'%isFinite%': isFinite,
'%isNaN%': isNaN,
'%IteratorPrototype%': S ? O(O([][Symbol.iterator]())) : void 0,
'%JSON%': 'object' == typeof JSON ? JSON : void 0,
'%JSONParse%': 'object' == typeof JSON ? JSON.parse : void 0,
'%Map%': 'undefined' == typeof Map ? void 0 : Map,
'%MapIteratorPrototype%':
'undefined' != typeof Map && S
? O(new Map()[Symbol.iterator]())
: void 0,
'%MapPrototype%':
'undefined' == typeof Map ? void 0 : Map.prototype,
'%Math%': Math,
'%Number%': Number,
'%NumberPrototype%': Number.prototype,
'%Object%': Object,
'%ObjectPrototype%': Object.prototype,
'%ObjProto_toString%': Object.prototype.toString,
'%ObjProto_valueOf%': Object.prototype.valueOf,
'%parseFloat%': parseFloat,
'%parseInt%': parseInt,
'%Promise%': 'undefined' == typeof Promise ? void 0 : Promise,
'%PromisePrototype%':
'undefined' == typeof Promise ? void 0 : Promise.prototype,
'%PromiseProto_then%':
'undefined' == typeof Promise ? void 0 : Promise.prototype.then,
'%Promise_all%':
'undefined' == typeof Promise ? void 0 : Promise.all,
'%Promise_reject%':
'undefined' == typeof Promise ? void 0 : Promise.reject,
'%Promise_resolve%':
'undefined' == typeof Promise ? void 0 : Promise.resolve,
'%Proxy%': 'undefined' == typeof Proxy ? void 0 : Proxy,
'%RangeError%': RangeError,
'%RangeErrorPrototype%': RangeError.prototype,
'%ReferenceError%': ReferenceError,
'%ReferenceErrorPrototype%': ReferenceError.prototype,
'%Reflect%': 'undefined' == typeof Reflect ? void 0 : Reflect,
'%RegExp%': RegExp,
'%RegExpPrototype%': RegExp.prototype,
'%Set%': 'undefined' == typeof Set ? void 0 : Set,
'%SetIteratorPrototype%':
'undefined' != typeof Set && S
? O(new Set()[Symbol.iterator]())
: void 0,
'%SetPrototype%':
'undefined' == typeof Set ? void 0 : Set.prototype,
'%SharedArrayBuffer%':
'undefined' == typeof SharedArrayBuffer
? void 0
: SharedArrayBuffer,
'%SharedArrayBufferPrototype%':
'undefined' == typeof SharedArrayBuffer
? void 0
: SharedArrayBuffer.prototype,
'%String%': String,
'%StringIteratorPrototype%': S ? O(''[Symbol.iterator]()) : void 0,
'%StringPrototype%': String.prototype,
'%Symbol%': S ? Symbol : void 0,
'%SymbolPrototype%': S ? Symbol.prototype : void 0,
'%SyntaxError%': SyntaxError,
'%SyntaxErrorPrototype%': SyntaxError.prototype,
'%ThrowTypeError%': $,
'%TypedArray%': E,
'%TypedArrayPrototype%': E ? E.prototype : void 0,
'%TypeError%': x,
'%TypeErrorPrototype%': x.prototype,
'%Uint8Array%':
'undefined' == typeof Uint8Array ? void 0 : Uint8Array,
'%Uint8ArrayPrototype%':
'undefined' == typeof Uint8Array
? void 0
: Uint8Array.prototype,
'%Uint8ClampedArray%':
'undefined' == typeof Uint8ClampedArray
? void 0
: Uint8ClampedArray,
'%Uint8ClampedArrayPrototype%':
'undefined' == typeof Uint8ClampedArray
? void 0
: Uint8ClampedArray.prototype,
'%Uint16Array%':
'undefined' == typeof Uint16Array ? void 0 : Uint16Array,
'%Uint16ArrayPrototype%':
'undefined' == typeof Uint16Array
? void 0
: Uint16Array.prototype,
'%Uint32Array%':
'undefined' == typeof Uint32Array ? void 0 : Uint32Array,
'%Uint32ArrayPrototype%':
'undefined' == typeof Uint32Array
? void 0
: Uint32Array.prototype,
'%URIError%': URIError,
'%URIErrorPrototype%': URIError.prototype,
'%WeakMap%': 'undefined' == typeof WeakMap ? void 0 : WeakMap,
'%WeakMapPrototype%':
'undefined' == typeof WeakMap ? void 0 : WeakMap.prototype,
'%WeakSet%': 'undefined' == typeof WeakSet ? void 0 : WeakSet,
'%WeakSetPrototype%':
'undefined' == typeof WeakSet ? void 0 : WeakSet.prototype,
},
P = m.call(Function.call, String.prototype.replace),
j = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,
z = /\\(\\)?/g,
C = function (e, t) {
if ('string' != typeof e || 0 === e.length)
throw new TypeError('intrinsic name must be a non-empty string')
if (arguments.length > 1 && 'boolean' != typeof t)
throw new TypeError('"allowMissing" argument must be a boolean')
for (
var n,
r =
((n = []),
P(e, j, function (e, t, r, i) {
n[n.length] = r ? P(i, z, '$1') : t || e
}),
n),
i = (function (e, t) {
if (!(e in _))
throw new SyntaxError(
'intrinsic ' + e + ' does not exist!'
)
if (void 0 === _[e] && !t)
throw new x(
'intrinsic ' +
e +
' exists, but is not available. Please file an issue!'
)
return _[e]
})('%' + (r.length > 0 ? r[0] : '') + '%', t),
o = 1;
o < r.length;
o += 1
)
if (null != i)
if (k && o + 1 >= r.length) {
var a = k(i, r[o])
if (!(t || r[o] in i))