UNPKG

@antmove/wx-alipay

Version:

transform wechat miniprogram to alipay miniprogram tool.

2 lines (1 loc) 32.1 kB
!(function(t, e) { typeof exports === 'object' && typeof module === 'object' ? module.exports = e() : typeof define === 'function' && define.amd ? define([], e) : typeof exports === 'object' ? exports['mini-parser'] = e() : t['mini-parser'] = e() }(global, () => { return (function(t) { const e = {}; function s(i) { if (e[i]) { return e[i].exports } const n = e[i] = { i, l: !1, exports: {} }; return t[i].call(n.exports, n, n.exports, s), n.l = !0, n.exports } return s.m = t, s.c = e, s.d = function(t, e, i) { s.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: i }) }, s.r = function(t) { typeof Symbol !== 'undefined' && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }), Object.defineProperty(t, '__esModule', { value: !0 }) }, s.t = function(t, e) { if (1 & e && (t = s(t)), 8 & e) { return t } if (4 & e && typeof t === 'object' && t && t.__esModule) { return t } const i = Object.create(null); if (s.r(i), Object.defineProperty(i, 'default', { enumerable: !0, value: t }), 2 & e && typeof t !== 'string') { for (const n in t) { s.d(i, n, ((e) => { return t[e] }).bind(null, n)) } } return i }, s.n = function(t) { const e = t && t.__esModule ? function() { return t.default } : function() { return t }; return s.d(e, 'a', e), e }, s.o = function(t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, s.p = '', s(s.s = 2) }([function(t, e) { const s = t.exports = { get firstChild() { const t = this.children; return t && t[0] || null }, get lastChild() { const t = this.children; return t && t[t.length - 1] || null }, get nodeType() { return n[this.type] || n.element } }; const i = { tagName: 'name', childNodes: 'children', parentNode: 'parent', previousSibling: 'prev', nextSibling: 'next', nodeValue: 'data' }; var n = { element: 1, text: 3, cdata: 4, comment: 8 }; Object.keys(i).forEach((t) => { const e = i[t]; Object.defineProperty(s, t, { get() { return this[e] || null }, set(t) { return this[e] = t, t } }) }) }, function(t, e, s) { const i = s(3); const n = /\s+/g; const o = s(0); const a = s(4); function r(t, e, s) { typeof t === 'object' ? (s = e, e = t, t = null) : typeof e === 'function' && (s = e, e = h), this._callback = t, this._options = e || h, this._elementCB = s, this.dom = [], this._done = !1, this._tagStack = [], this._parser = this._parser || null } var h = { normalizeWhitespace: !1, withStartIndices: !1, withEndIndices: !1 }; r.prototype.onparserinit = function(t) { this._parser = t }, r.prototype.onreset = function() { r.call(this, this._callback, this._options, this._elementCB) }, r.prototype.onend = function() { this._done || (this._done = !0, this._parser = null, this._handleCallback(null)) }, r.prototype._handleCallback = r.prototype.onerror = function(t) { if (typeof this._callback === 'function') { this._callback(t, this.dom) } else if (t) { throw t } }, r.prototype.onclosetag = function() { const t = this._tagStack.pop(); this._options.withEndIndices && t && (t.endIndex = this._parser.endIndex), this._elementCB && this._elementCB(t) }, r.prototype._createDomElement = function(t) { if (!this._options.withDomLvl1) { return t } let e; for (const s in e = t.type === 'tag' ? Object.create(a) : Object.create(o), t) { t.hasOwnProperty(s) && (e[s] = t[s]) } return e }, r.prototype._addDomElement = function(t) { const e = this._tagStack[this._tagStack.length - 1]; const s = e ? e.children : this.dom; const i = s[s.length - 1]; t.next = null, this._options.withStartIndices && (t.startIndex = this._parser.startIndex), this._options.withEndIndices && (t.endIndex = this._parser.endIndex), i ? (t.prev = i, i.next = t) : t.prev = null, s.push(t), t.parent = e || null }, r.prototype.onopentag = function(t, e) { const s = { type: t === 'script' ? i.Script : t === 'style' ? i.Style : i.Tag, name: t, attribs: e, children: [] }; const n = this._createDomElement(s); this._addDomElement(n), this._tagStack.push(n) }, r.prototype.ontext = function(t) { let e; const s = this._options.normalizeWhitespace || this._options.ignoreWhitespace; if (!this._tagStack.length && this.dom.length && (e = this.dom[this.dom.length - 1]).type === i.Text) { s ? e.data = (e.data + t).replace(n, ' ') : e.data += t } else if (this._tagStack.length && (e = this._tagStack[this._tagStack.length - 1]) && (e = e.children[e.children.length - 1]) && e.type === i.Text) { s ? e.data = (e.data + t).replace(n, ' ') : e.data += t } else { s && (t = t.replace(n, ' ')); const o = this._createDomElement({ data: t, type: i.Text }); this._addDomElement(o) } }, r.prototype.oncomment = function(t) { const e = this._tagStack[this._tagStack.length - 1]; if (e && e.type === i.Comment) { e.data += t } else { const s = { data: t, type: i.Comment }; const n = this._createDomElement(s); this._addDomElement(n), this._tagStack.push(n) } }, r.prototype.oncdatastart = function() { const t = { children: [{ data: '', type: i.Text }], type: i.CDATA }; const e = this._createDomElement(t); this._addDomElement(e), this._tagStack.push(e) }, r.prototype.oncommentend = r.prototype.oncdataend = function() { this._tagStack.pop() }, r.prototype.onprocessinginstruction = function(t, e) { const s = this._createDomElement({ name: t, data: e, type: i.Directive }); this._addDomElement(s) }, t.exports = r }, function(t, e, s) { t.exports = { parse: s(12), name: 'mini-html-parser2' } }, function(t, e) { t.exports = { Text: 'text', Directive: 'directive', Comment: 'comment', Script: 'script', Style: 'style', Tag: 'tag', CDATA: 'cdata', Doctype: 'doctype', isTag(t) { return t.type === 'tag' || t.type === 'script' || t.type === 'style' } } }, function(t, e, s) { const i = s(0); const n = t.exports = Object.create(i); const o = { tagName: 'name' }; Object.keys(o).forEach((t) => { const e = o[t]; Object.defineProperty(n, t, { get() { return this[e] || null }, set(t) { return this[e] = t, t } }) }) }, function(t, e, s) { const i = s(6); const n = {}; const o = s(8); const a = s(9); let r = 0; const h = r++; const _ = r++; const c = r++; const p = r++; const u = r++; const d = r++; const f = r++; const l = r++; const m = r++; const b = r++; const y = r++; const g = r++; const x = r++; const S = r++; const C = r++; const v = r++; const A = r++; const E = r++; const T = r++; const k = r++; const I = r++; const B = r++; const N = r++; const w = r++; const O = r++; const D = r++; const M = r++; const P = r++; const j = r++; const z = r++; const L = r++; const V = r++; const Q = r++; const q = r++; const U = r++; const H = r++; const R = r++; const Y = r++; const J = r++; const W = r++; const G = r++; const F = r++; const X = r++; const Z = r++; const K = r++; const $ = r++; const tt = r++; const et = r++; const st = r++; const it = r++; const nt = r++; const ot = r++; const at = r++; const rt = r++; const ht = r++; let _t = 0; const ct = _t++; const pt = _t++; const ut = _t++; function dt(t) { return t === ' ' || t === '\n' || t === '\t' || t === '\f' || t === '\r' } function ft(t, e, s) { const i = t.toLowerCase(); return t === i ? function(t) { t === i ? this._state = e : (this._state = s, this._index--) } : function(n) { n === i || n === t ? this._state = e : (this._state = s, this._index--) } } function lt(t, e) { const s = t.toLowerCase(); return function(i) { i === s || i === t ? this._state = e : (this._state = c, this._index--) } } function mt(t, e) { this._state = h, this._buffer = '', this._sectionStart = 0, this._index = 0, this._bufferOffset = 0, this._baseState = h, this._special = ct, this._cbs = e, this._running = !0, this._ended = !1, this._xmlMode = !(!t || !t.xmlMode), this._decodeEntities = !(!t || !t.decodeEntities) }mt.prototype._stateText = function(t) { t === '<' ? (this._index > this._sectionStart && this._cbs.ontext(this._getSection()), this._state = _, this._sectionStart = this._index) : this._decodeEntities && this._special === ct && t === '&' && (this._index > this._sectionStart && this._cbs.ontext(this._getSection()), this._baseState = h, this._state = nt, this._sectionStart = this._index) }, mt.prototype._stateBeforeTagName = function(t) { t === '/' ? this._state = u : t === '<' ? (this._cbs.ontext(this._getSection()), this._sectionStart = this._index) : t === '>' || this._special !== ct || dt(t) ? this._state = h : t === '!' ? (this._state = C, this._sectionStart = this._index + 1) : t === '?' ? (this._state = A, this._sectionStart = this._index + 1) : (this._state = this._xmlMode || t !== 's' && t !== 'S' ? c : L, this._sectionStart = this._index) }, mt.prototype._stateInTagName = function(t) { (t === '/' || t === '>' || dt(t)) && (this._emitToken('onopentagname'), this._state = l, this._index--) }, mt.prototype._stateBeforeCloseingTagName = function(t) { dt(t) || (t === '>' ? this._state = h : this._special !== ct ? t === 's' || t === 'S' ? this._state = V : (this._state = h, this._index--) : (this._state = d, this._sectionStart = this._index)) }, mt.prototype._stateInCloseingTagName = function(t) { (t === '>' || dt(t)) && (this._emitToken('onclosetag'), this._state = f, this._index--) }, mt.prototype._stateAfterCloseingTagName = function(t) { t === '>' && (this._state = h, this._sectionStart = this._index + 1) }, mt.prototype._stateBeforeAttributeName = function(t) { t === '>' ? (this._cbs.onopentagend(), this._state = h, this._sectionStart = this._index + 1) : t === '/' ? this._state = p : dt(t) || (this._state = m, this._sectionStart = this._index) }, mt.prototype._stateInSelfClosingTag = function(t) { t === '>' ? (this._cbs.onselfclosingtag(), this._state = h, this._sectionStart = this._index + 1) : dt(t) || (this._state = l, this._index--) }, mt.prototype._stateInAttributeName = function(t) { (t === '=' || t === '/' || t === '>' || dt(t)) && (this._cbs.onattribname(this._getSection()), this._sectionStart = -1, this._state = b, this._index--) }, mt.prototype._stateAfterAttributeName = function(t) { t === '=' ? this._state = y : t === '/' || t === '>' ? (this._cbs.onattribend(), this._state = l, this._index--) : dt(t) || (this._cbs.onattribend(), this._state = m, this._sectionStart = this._index) }, mt.prototype._stateBeforeAttributeValue = function(t) { t === '"' ? (this._state = g, this._sectionStart = this._index + 1) : t === "'" ? (this._state = x, this._sectionStart = this._index + 1) : dt(t) || (this._state = S, this._sectionStart = this._index, this._index--) }, mt.prototype._stateInAttributeValueDoubleQuotes = function(t) { t === '"' ? (this._emitToken('onattribdata'), this._cbs.onattribend(), this._state = l) : this._decodeEntities && t === '&' && (this._emitToken('onattribdata'), this._baseState = this._state, this._state = nt, this._sectionStart = this._index) }, mt.prototype._stateInAttributeValueSingleQuotes = function(t) { t === "'" ? (this._emitToken('onattribdata'), this._cbs.onattribend(), this._state = l) : this._decodeEntities && t === '&' && (this._emitToken('onattribdata'), this._baseState = this._state, this._state = nt, this._sectionStart = this._index) }, mt.prototype._stateInAttributeValueNoQuotes = function(t) { dt(t) || t === '>' ? (this._emitToken('onattribdata'), this._cbs.onattribend(), this._state = l, this._index--) : this._decodeEntities && t === '&' && (this._emitToken('onattribdata'), this._baseState = this._state, this._state = nt, this._sectionStart = this._index) }, mt.prototype._stateBeforeDeclaration = function(t) { this._state = t === '[' ? B : t === '-' ? E : v }, mt.prototype._stateInDeclaration = function(t) { t === '>' && (this._cbs.ondeclaration(this._getSection()), this._state = h, this._sectionStart = this._index + 1) }, mt.prototype._stateInProcessingInstruction = function(t) { t === '>' && (this._cbs.onprocessinginstruction(this._getSection()), this._state = h, this._sectionStart = this._index + 1) }, mt.prototype._stateBeforeComment = function(t) { t === '-' ? (this._state = T, this._sectionStart = this._index + 1) : this._state = v }, mt.prototype._stateInComment = function(t) { t === '-' && (this._state = k) }, mt.prototype._stateAfterComment1 = function(t) { this._state = t === '-' ? I : T }, mt.prototype._stateAfterComment2 = function(t) { t === '>' ? (this._cbs.oncomment(this._buffer.substring(this._sectionStart, this._index - 2)), this._state = h, this._sectionStart = this._index + 1) : t !== '-' && (this._state = T) }, mt.prototype._stateBeforeCdata1 = ft('C', N, v), mt.prototype._stateBeforeCdata2 = ft('D', w, v), mt.prototype._stateBeforeCdata3 = ft('A', O, v), mt.prototype._stateBeforeCdata4 = ft('T', D, v), mt.prototype._stateBeforeCdata5 = ft('A', M, v), mt.prototype._stateBeforeCdata6 = function(t) { t === '[' ? (this._state = P, this._sectionStart = this._index + 1) : (this._state = v, this._index--) }, mt.prototype._stateInCdata = function(t) { t === ']' && (this._state = j) }, mt.prototype._stateAfterCdata1 = function(t) { this._state = t === ']' ? z : P }, mt.prototype._stateAfterCdata2 = function(t) { t === '>' ? (this._cbs.oncdata(this._buffer.substring(this._sectionStart, this._index - 2)), this._state = h, this._sectionStart = this._index + 1) : t !== ']' && (this._state = P) }, mt.prototype._stateBeforeSpecial = function(t) { t === 'c' || t === 'C' ? this._state = Q : t === 't' || t === 'T' ? this._state = X : (this._state = c, this._index--) }, mt.prototype._stateBeforeSpecialEnd = function(t) { this._special !== pt || t !== 'c' && t !== 'C' ? this._special !== ut || t !== 't' && t !== 'T' ? this._state = h : this._state = tt : this._state = Y }, mt.prototype._stateBeforeScript1 = lt('R', q), mt.prototype._stateBeforeScript2 = lt('I', U), mt.prototype._stateBeforeScript3 = lt('P', H), mt.prototype._stateBeforeScript4 = lt('T', R), mt.prototype._stateBeforeScript5 = function(t) { (t === '/' || t === '>' || dt(t)) && (this._special = pt), this._state = c, this._index-- }, mt.prototype._stateAfterScript1 = ft('R', J, h), mt.prototype._stateAfterScript2 = ft('I', W, h), mt.prototype._stateAfterScript3 = ft('P', G, h), mt.prototype._stateAfterScript4 = ft('T', F, h), mt.prototype._stateAfterScript5 = function(t) { t === '>' || dt(t) ? (this._special = ct, this._state = d, this._sectionStart = this._index - 6, this._index--) : this._state = h }, mt.prototype._stateBeforeStyle1 = lt('Y', Z), mt.prototype._stateBeforeStyle2 = lt('L', K), mt.prototype._stateBeforeStyle3 = lt('E', $), mt.prototype._stateBeforeStyle4 = function(t) { (t === '/' || t === '>' || dt(t)) && (this._special = ut), this._state = c, this._index-- }, mt.prototype._stateAfterStyle1 = ft('Y', et, h), mt.prototype._stateAfterStyle2 = ft('L', st, h), mt.prototype._stateAfterStyle3 = ft('E', it, h), mt.prototype._stateAfterStyle4 = function(t) { t === '>' || dt(t) ? (this._special = ct, this._state = d, this._sectionStart = this._index - 5, this._index--) : this._state = h }, mt.prototype._stateBeforeEntity = ft('#', ot, at), mt.prototype._stateBeforeNumericEntity = ft('X', ht, rt), mt.prototype._parseNamedEntityStrict = function() { if (this._sectionStart + 1 < this._index) { const t = this._buffer.substring(this._sectionStart + 1, this._index); const e = this._xmlMode ? a : n; e.hasOwnProperty(t) && (this._emitPartial(e[t]), this._sectionStart = this._index + 1) } }, mt.prototype._parseLegacyEntity = function() { const t = this._sectionStart + 1; let e = this._index - t; for (e > 6 && (e = 6); e >= 2;) { const s = this._buffer.substr(t, e); if (o.hasOwnProperty(s)) { return this._emitPartial(o[s]), void (this._sectionStart += e + 1) } e-- } }, mt.prototype._stateInNamedEntity = function(t) { t === ';' ? (this._parseNamedEntityStrict(), this._sectionStart + 1 < this._index && !this._xmlMode && this._parseLegacyEntity(), this._state = this._baseState) : (t < 'a' || t > 'z') && (t < 'A' || t > 'Z') && (t < '0' || t > '9') && (this._xmlMode || this._sectionStart + 1 === this._index || (this._baseState !== h ? t !== '=' && this._parseNamedEntityStrict() : this._parseLegacyEntity()), this._state = this._baseState, this._index--) }, mt.prototype._decodeNumericEntity = function(t, e) { const s = this._sectionStart + t; if (s !== this._index) { const n = this._buffer.substring(s, this._index); const o = parseInt(n, e); this._emitPartial(i(o)), this._sectionStart = this._index } else { this._sectionStart-- } this._state = this._baseState }, mt.prototype._stateInNumericEntity = function(t) { t === ';' ? (this._decodeNumericEntity(2, 10), this._sectionStart++) : (t < '0' || t > '9') && (this._xmlMode ? this._state = this._baseState : this._decodeNumericEntity(2, 10), this._index--) }, mt.prototype._stateInHexEntity = function(t) { t === ';' ? (this._decodeNumericEntity(3, 16), this._sectionStart++) : (t < 'a' || t > 'f') && (t < 'A' || t > 'F') && (t < '0' || t > '9') && (this._xmlMode ? this._state = this._baseState : this._decodeNumericEntity(3, 16), this._index--) }, mt.prototype._cleanup = function() { this._sectionStart < 0 ? (this._buffer = '', this._bufferOffset += this._index, this._index = 0) : this._running && (this._state === h ? (this._sectionStart !== this._index && this._cbs.ontext(this._buffer.substr(this._sectionStart)), this._buffer = '', this._bufferOffset += this._index, this._index = 0) : this._sectionStart === this._index ? (this._buffer = '', this._bufferOffset += this._index, this._index = 0) : (this._buffer = this._buffer.substr(this._sectionStart), this._index -= this._sectionStart, this._bufferOffset += this._sectionStart), this._sectionStart = 0) }, mt.prototype.write = function(t) { this._ended && this._cbs.onerror(Error('.write() after done!')), this._buffer += t, this._parse() }, mt.prototype._parse = function() { for (;this._index < this._buffer.length && this._running;) { const t = this._buffer.charAt(this._index); this._state === h ? this._stateText(t) : this._state === _ ? this._stateBeforeTagName(t) : this._state === c ? this._stateInTagName(t) : this._state === u ? this._stateBeforeCloseingTagName(t) : this._state === d ? this._stateInCloseingTagName(t) : this._state === f ? this._stateAfterCloseingTagName(t) : this._state === p ? this._stateInSelfClosingTag(t) : this._state === l ? this._stateBeforeAttributeName(t) : this._state === m ? this._stateInAttributeName(t) : this._state === b ? this._stateAfterAttributeName(t) : this._state === y ? this._stateBeforeAttributeValue(t) : this._state === g ? this._stateInAttributeValueDoubleQuotes(t) : this._state === x ? this._stateInAttributeValueSingleQuotes(t) : this._state === S ? this._stateInAttributeValueNoQuotes(t) : this._state === C ? this._stateBeforeDeclaration(t) : this._state === v ? this._stateInDeclaration(t) : this._state === A ? this._stateInProcessingInstruction(t) : this._state === E ? this._stateBeforeComment(t) : this._state === T ? this._stateInComment(t) : this._state === k ? this._stateAfterComment1(t) : this._state === I ? this._stateAfterComment2(t) : this._state === B ? this._stateBeforeCdata1(t) : this._state === N ? this._stateBeforeCdata2(t) : this._state === w ? this._stateBeforeCdata3(t) : this._state === O ? this._stateBeforeCdata4(t) : this._state === D ? this._stateBeforeCdata5(t) : this._state === M ? this._stateBeforeCdata6(t) : this._state === P ? this._stateInCdata(t) : this._state === j ? this._stateAfterCdata1(t) : this._state === z ? this._stateAfterCdata2(t) : this._state === L ? this._stateBeforeSpecial(t) : this._state === V ? this._stateBeforeSpecialEnd(t) : this._state === Q ? this._stateBeforeScript1(t) : this._state === q ? this._stateBeforeScript2(t) : this._state === U ? this._stateBeforeScript3(t) : this._state === H ? this._stateBeforeScript4(t) : this._state === R ? this._stateBeforeScript5(t) : this._state === Y ? this._stateAfterScript1(t) : this._state === J ? this._stateAfterScript2(t) : this._state === W ? this._stateAfterScript3(t) : this._state === G ? this._stateAfterScript4(t) : this._state === F ? this._stateAfterScript5(t) : this._state === X ? this._stateBeforeStyle1(t) : this._state === Z ? this._stateBeforeStyle2(t) : this._state === K ? this._stateBeforeStyle3(t) : this._state === $ ? this._stateBeforeStyle4(t) : this._state === tt ? this._stateAfterStyle1(t) : this._state === et ? this._stateAfterStyle2(t) : this._state === st ? this._stateAfterStyle3(t) : this._state === it ? this._stateAfterStyle4(t) : this._state === nt ? this._stateBeforeEntity(t) : this._state === ot ? this._stateBeforeNumericEntity(t) : this._state === at ? this._stateInNamedEntity(t) : this._state === rt ? this._stateInNumericEntity(t) : this._state === ht ? this._stateInHexEntity(t) : this._cbs.onerror(Error('unknown _state'), this._state), this._index++ } this._cleanup() }, mt.prototype.pause = function() { this._running = !1 }, mt.prototype.resume = function() { this._running = !0, this._index < this._buffer.length && this._parse(), this._ended && this._finish() }, mt.prototype.end = function(t) { this._ended && this._cbs.onerror(Error('.end() after done!')), t && this.write(t), this._ended = !0, this._running && this._finish() }, mt.prototype._finish = function() { this._sectionStart < this._index && this._handleTrailingData(), this._cbs.onend() }, mt.prototype._handleTrailingData = function() { const t = this._buffer.substr(this._sectionStart); this._state === P || this._state === j || this._state === z ? this._cbs.oncdata(t) : this._state === T || this._state === k || this._state === I ? this._cbs.oncomment(t) : this._state !== at || this._xmlMode ? this._state !== rt || this._xmlMode ? this._state !== ht || this._xmlMode ? this._state !== c && this._state !== l && this._state !== y && this._state !== b && this._state !== m && this._state !== x && this._state !== g && this._state !== S && this._state !== d && this._cbs.ontext(t) : (this._decodeNumericEntity(3, 16), this._sectionStart < this._index && (this._state = this._baseState, this._handleTrailingData())) : (this._decodeNumericEntity(2, 10), this._sectionStart < this._index && (this._state = this._baseState, this._handleTrailingData())) : (this._parseLegacyEntity(), this._sectionStart < this._index && (this._state = this._baseState, this._handleTrailingData())) }, mt.prototype.reset = function() { mt.call(this, { xmlMode: this._xmlMode, decodeEntities: this._decodeEntities }, this._cbs) }, mt.prototype.getAbsoluteIndex = function() { return this._bufferOffset + this._index }, mt.prototype._getSection = function() { return this._buffer.substring(this._sectionStart, this._index) }, mt.prototype._emitToken = function(t) { this._cbs[t](this._getSection()), this._sectionStart = -1 }, mt.prototype._emitPartial = function(t) { this._baseState !== h ? this._cbs.onattribdata(t) : this._cbs.ontext(t) }, t.exports = mt }, function(t, e, s) { const i = s(7); t.exports = function(t) { if (t >= 55296 && t <= 57343 || t > 1114111) { return '�' } t in i && (t = i[t]); let e = ''; t > 65535 && (t -= 65536, e += String.fromCharCode(t >>> 10 & 1023 | 55296), t = 56320 | 1023 & t); return e += String.fromCharCode(t) } }, function(t) { t.exports = JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}') }, function(t) { t.exports = JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}') }, function(t) { t.exports = JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}') }, function(t, e) { typeof Object.create === 'function' ? t.exports = function(t, e) { t.super_ = e, t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }) } : t.exports = function(t, e) { t.super_ = e; const s = function() {}; s.prototype = e.prototype, t.prototype = new s(), t.prototype.constructor = t } }, function(t, e) { t.exports = require('events') }, function(t, e, s) { 'use strict'; s.r(e); const i = s(1); const n = s.n(i); let o = s(5); const a = { input: !0, option: !0, optgroup: !0, select: !0, button: !0, datalist: !0, textarea: !0 }; const r = { tr: { tr: !0, th: !0, td: !0 }, th: { th: !0 }, td: { thead: !0, th: !0, td: !0 }, body: { head: !0, link: !0, script: !0 }, li: { li: !0 }, p: { p: !0 }, h1: { p: !0 }, h2: { p: !0 }, h3: { p: !0 }, h4: { p: !0 }, h5: { p: !0 }, h6: { p: !0 }, select: a, input: a, output: a, button: a, datalist: a, textarea: a, option: { option: !0 }, optgroup: { optgroup: !0 } }; const h = { __proto__: null, area: !0, base: !0, basefont: !0, br: !0, col: !0, command: !0, embed: !0, frame: !0, hr: !0, img: !0, input: !0, isindex: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }; const _ = { __proto__: null, math: !0, svg: !0 }; const c = { __proto__: null, mi: !0, mo: !0, mn: !0, ms: !0, mtext: !0, 'annotation-xml': !0, foreignObject: !0, desc: !0, title: !0 }; const p = /\s|\//; function u(t, e) { this._options = e || {}, this._cbs = t || {}, this._tagname = '', this._attribname = '', this._attribvalue = '', this._attribs = null, this._stack = [], this._foreignContext = [], this.startIndex = 0, this.endIndex = null, this._lowerCaseTagNames = 'lowerCaseTags' in this._options ? !!this._options.lowerCaseTags : !this._options.xmlMode, this._lowerCaseAttributeNames = 'lowerCaseAttributeNames' in this._options ? !!this._options.lowerCaseAttributeNames : !this._options.xmlMode, this._options.Tokenizer && (o = this._options.Tokenizer), this._tokenizer = new o(this._options, this), this._cbs.onparserinit && this._cbs.onparserinit(this) }s(10)(u, s(11).EventEmitter), u.prototype._updatePosition = function(t) { this.endIndex === null ? this._tokenizer._sectionStart <= t ? this.startIndex = 0 : this.startIndex = this._tokenizer._sectionStart - t : this.startIndex = this.endIndex + 1, this.endIndex = this._tokenizer.getAbsoluteIndex() }, u.prototype.ontext = function(t) { this._updatePosition(1), this.endIndex--, this._cbs.ontext && this._cbs.ontext(t) }, u.prototype.onopentagname = function(t) { if (this._lowerCaseTagNames && (t = t.toLowerCase()), this._tagname = t, !this._options.xmlMode && t in r) { for (var e; (e = this._stack[this._stack.length - 1]) in r[t]; this.onclosetag(e)) { } }!this._options.xmlMode && t in h || (this._stack.push(t), t in _ ? this._foreignContext.push(!0) : t in c && this._foreignContext.push(!1)), this._cbs.onopentagname && this._cbs.onopentagname(t), this._cbs.onopentag && (this._attribs = {}) }, u.prototype.onopentagend = function() { this._updatePosition(1), this._attribs && (this._cbs.onopentag && this._cbs.onopentag(this._tagname, this._attribs), this._attribs = null), !this._options.xmlMode && this._cbs.onclosetag && this._tagname in h && this._cbs.onclosetag(this._tagname), this._tagname = '' }, u.prototype.onclosetag = function(t) { if (this._updatePosition(1), this._lowerCaseTagNames && (t = t.toLowerCase()), (t in _ || t in c) && this._foreignContext.pop(), !this._stack.length || t in h && !this._options.xmlMode) { this._options.xmlMode || t !== 'br' && t !== 'p' || (this.onopentagname(t), this._closeCurrentTag()) } else { let e = this._stack.lastIndexOf(t); if (e !== -1) { if (this._cbs.onclosetag) { for (e = this._stack.length - e; e--;) { this._cbs.onclosetag(this._stack.pop()) } } else { this._stack.length = e } } else { t !== 'p' || this._options.xmlMode || (this.onopentagname(t), this._closeCurrentTag()) } } }, u.prototype.onselfclosingtag = function() { this._options.xmlMode || this._options.recognizeSelfClosing || this._foreignContext[this._foreignContext.length - 1] ? this._closeCurrentTag() : this.onopentagend() }, u.prototype._closeCurrentTag = function() { const t = this._tagname; this.onopentagend(), this._stack[this._stack.length - 1] === t && (this._cbs.onclosetag && this._cbs.onclosetag(t), this._stack.pop()) }, u.prototype.onattribname = function(t) { this._lowerCaseAttributeNames && (t = t.toLowerCase()), this._attribname = t }, u.prototype.onattribdata = function(t) { this._attribvalue += t }, u.prototype.onattribend = function() { this._cbs.onattribute && this._cbs.onattribute(this._attribname, this._attribvalue), this._attribs && !Object.prototype.hasOwnProperty.call(this._attribs, this._attribname) && (this._attribs[this._attribname] = this._attribvalue), this._attribname = '', this._attribvalue = '' }, u.prototype._getInstructionName = function(t) { const e = t.search(p); let s = e < 0 ? t : t.substr(0, e); return this._lowerCaseTagNames && (s = s.toLowerCase()), s }, u.prototype.ondeclaration = function(t) { if (this._cbs.onprocessinginstruction) { const e = this._getInstructionName(t); this._cbs.onprocessinginstruction(`!${e}`, `!${t}`) } }, u.prototype.onprocessinginstruction = function(t) { if (this._cbs.onprocessinginstruction) { const e = this._getInstructionName(t); this._cbs.onprocessinginstruction(`?${e}`, `?${t}`) } }, u.prototype.oncomment = function(t) { this._updatePosition(4), this._cbs.oncomment && this._cbs.oncomment(t), this._cbs.oncommentend && this._cbs.oncommentend() }, u.prototype.oncdata = function(t) { this._updatePosition(1), this._options.xmlMode || this._options.recognizeCDATA ? (this._cbs.oncdatastart && this._cbs.oncdatastart(), this._cbs.ontext && this._cbs.ontext(t), this._cbs.oncdataend && this._cbs.oncdataend()) : this.oncomment(`[CDATA[${t}]]`) }, u.prototype.onerror = function(t) { this._cbs.onerror && this._cbs.onerror(t) }, u.prototype.onend = function() { if (this._cbs.onclosetag) { for (let t = this._stack.length; t > 0; this._cbs.onclosetag(this._stack[--t])) { } } this._cbs.onend && this._cbs.onend() }, u.prototype.reset = function() { this._cbs.onreset && this._cbs.onreset(), this._tokenizer.reset(), this._tagname = '', this._attribname = '', this._attribs = null, this._stack = [], this._cbs.onparserinit && this._cbs.onparserinit(this) }, u.prototype.parseComplete = function(t) { this.reset(), this.end(t) }, u.prototype.write = function(t) { this._tokenizer.write(t) }, u.prototype.end = function(t) { this._tokenizer.end(t) }, u.prototype.pause = function() { this._tokenizer.pause() }, u.prototype.resume = function() { this._tokenizer.resume() }, u.prototype.parseChunk = u.prototype.write, u.prototype.done = u.prototype.end; const d = u; function f(t) { if (['tag', 'text'].indexOf(t.type) === -1) { throw new Error(`not supported name ${t.name} of type ${t.type}`) } return t.type === 'text' ? { type: t.type, text: t.data } : { name: t.name, children: l(t.children), attrs: t.attribs } } function l(t) { return t.map(f) } function m(t, e) { const s = new n.a(((t, s) => { t && (console.error(t), e(t)); try { e(null, l(s)) } catch (t) { console.error(t), e(t) } }), {}); const i = new d(s, { xmlMode: !0 }); i.write(t), i.done() }s.d(e, 'default', () => { return m }) }])) }))