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B3B,KACxBqB,IAAcM,EAAkB5B,OACvCsB,GAAaM,EAAkB5B,OAInCG,EACAqB,EAAIpE,aAAa,SAAU9G,KAAKwI,IAAIyC,IAEpCA,GAAajL,KAAKwI,IAAI0C,EAAIjc,aAAa,WAGvC6a,EACAoB,EAAIpE,aAAa,SAAU9G,KAAKwI,IAAIwC,IAEpCA,GAAahL,KAAKwI,IAAI0C,EAAIjc,aAAa,WAGvCf,EAAMmW,KAAKG,EAAEN,gBACbgH,EAAIlE,MAAMC,KAAO+D,EAAY,KAC7BE,EAAIlE,MAAME,IAAM+D,EAAY,MAE5B7F,MAAMyB,UAAUqE,EAAK,YAAa,eAAiBF,EAAY,OAASC,EAAY,UAGhG,EAEA9G,EAAKrY,UAAUyf,QAAU,WAErB,IAAIrd,EAAQ7C,KAGZ+Z,MAAMoG,IAAItd,EAAMmW,KAAKlN,GAAI,WACzBiO,MAAMoG,IAAIlH,OAAQ,WAClB,IAAK,IAAIjL,EAAI,EAAGA,EAAInL,EAAMmW,KAAK4B,SAAS7O,OAAQiC,IAC5C+L,MAAMoG,IAAItd,EAAMmW,KAAK4B,SAAS5M,GAAI,WAGtC+L,MAAMoG,IAAItd,EAAMmW,KAAKlN,GAAI,aACzBjJ,EAAMkZ,YACNW,aAAa7Z,EAAMyW,iBACnBzW,EAAMyW,iBAAkB,CAC5B,EAEAL,OAAOmH,UAAU1H,KAAOI,CAC5B,GAEA,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,GApsBsW,CAosBlW,EACf,G","sources":["webpack://i4proportal/./node_modules/htmlparser2/lib/FeedHandler.js","webpack://i4proportal/./node_modules/htmlparser2/lib/Parser.js","webpack://i4proportal/./node_modules/htmlparser2/lib/Tokenizer.js","webpack://i4proportal/./node_modules/htmlparser2/lib/index.js","webpack://i4proportal/./node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js","webpack://i4proportal/./node_modules/is-plain-object/dist/is-plain-object.js","webpack://i4proportal/./node_modules/lg-zoom.js/dist/lg-zoom.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseFeed = exports.FeedHandler = void 0;\nvar domhandler_1 = __importDefault(require(\"domhandler\"));\nvar DomUtils = __importStar(require(\"domutils\"));\nvar Parser_1 = require(\"./Parser\");\nvar FeedItemMediaMedium;\n(function (FeedItemMediaMedium) {\n FeedItemMediaMedium[FeedItemMediaMedium[\"image\"] = 0] = \"image\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"audio\"] = 1] = \"audio\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"video\"] = 2] = \"video\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"document\"] = 3] = \"document\";\n FeedItemMediaMedium[FeedItemMediaMedium[\"executable\"] = 4] = \"executable\";\n})(FeedItemMediaMedium || (FeedItemMediaMedium = {}));\nvar FeedItemMediaExpression;\n(function (FeedItemMediaExpression) {\n FeedItemMediaExpression[FeedItemMediaExpression[\"sample\"] = 0] = \"sample\";\n FeedItemMediaExpression[FeedItemMediaExpression[\"full\"] = 1] = \"full\";\n FeedItemMediaExpression[FeedItemMediaExpression[\"nonstop\"] = 2] = \"nonstop\";\n})(FeedItemMediaExpression || (FeedItemMediaExpression = {}));\n// TODO: Consume data as it is coming in\nvar FeedHandler = /** @class */ (function (_super) {\n __extends(FeedHandler, _super);\n /**\n *\n * @param callback\n * @param options\n */\n function FeedHandler(callback, options) {\n var _this = this;\n if (typeof callback === \"object\") {\n callback = undefined;\n options = callback;\n }\n _this = _super.call(this, callback, options) || this;\n return _this;\n }\n FeedHandler.prototype.onend = function () {\n var _a, _b;\n var feedRoot = getOneElement(isValidFeed, this.dom);\n if (!feedRoot) {\n this.handleCallback(new Error(\"couldn't find root of feed\"));\n return;\n }\n var feed = {};\n if (feedRoot.name === \"feed\") {\n var childs = feedRoot.children;\n feed.type = \"atom\";\n addConditionally(feed, \"id\", \"id\", childs);\n addConditionally(feed, \"title\", \"title\", childs);\n var href = getAttribute(\"href\", getOneElement(\"link\", childs));\n if (href) {\n feed.link = href;\n }\n addConditionally(feed, \"description\", \"subtitle\", childs);\n var updated = fetch(\"updated\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"email\", childs, true);\n feed.items = getElements(\"entry\", childs).map(function (item) {\n var entry = {};\n var children = item.children;\n addConditionally(entry, \"id\", \"id\", children);\n addConditionally(entry, \"title\", \"title\", children);\n var href = getAttribute(\"href\", getOneElement(\"link\", children));\n if (href) {\n entry.link = href;\n }\n var description = fetch(\"summary\", children) || fetch(\"content\", children);\n if (description) {\n entry.description = description;\n }\n var pubDate = fetch(\"updated\", children);\n if (pubDate) {\n entry.pubDate = new Date(pubDate);\n }\n entry.media = getMediaElements(children);\n return entry;\n });\n }\n else {\n var childs = (_b = (_a = getOneElement(\"channel\", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];\n feed.type = feedRoot.name.substr(0, 3);\n feed.id = \"\";\n addConditionally(feed, \"title\", \"title\", childs);\n addConditionally(feed, \"link\", \"link\", childs);\n addConditionally(feed, \"description\", \"description\", childs);\n var updated = fetch(\"lastBuildDate\", childs);\n if (updated) {\n feed.updated = new Date(updated);\n }\n addConditionally(feed, \"author\", \"managingEditor\", childs, true);\n feed.items = getElements(\"item\", feedRoot.children).map(function (item) {\n var entry = {};\n var children = item.children;\n addConditionally(entry, \"id\", \"guid\", children);\n addConditionally(entry, \"title\", \"title\", children);\n addConditionally(entry, \"link\", \"link\", children);\n addConditionally(entry, \"description\", \"description\", children);\n var pubDate = fetch(\"pubDate\", children);\n if (pubDate)\n entry.pubDate = new Date(pubDate);\n entry.media = getMediaElements(children);\n return entry;\n });\n }\n this.feed = feed;\n this.handleCallback(null);\n };\n return FeedHandler;\n}(domhandler_1.default));\nexports.FeedHandler = FeedHandler;\nfunction getMediaElements(where) {\n return getElements(\"media:content\", where).map(function (elem) {\n var media = {\n medium: elem.attribs.medium,\n isDefault: !!elem.attribs.isDefault,\n };\n if (elem.attribs.url) {\n media.url = elem.attribs.url;\n }\n if (elem.attribs.fileSize) {\n media.fileSize = parseInt(elem.attribs.fileSize, 10);\n }\n if (elem.attribs.type) {\n media.type = elem.attribs.type;\n }\n if (elem.attribs.expression) {\n media.expression = elem.attribs\n .expression;\n }\n if (elem.attribs.bitrate) {\n media.bitrate = parseInt(elem.attribs.bitrate, 10);\n }\n if (elem.attribs.framerate) {\n media.framerate = parseInt(elem.attribs.framerate, 10);\n }\n if (elem.attribs.samplingrate) {\n media.samplingrate = parseInt(elem.attribs.samplingrate, 10);\n }\n if (elem.attribs.channels) {\n media.channels = parseInt(elem.attribs.channels, 10);\n }\n if (elem.attribs.duration) {\n media.duration = parseInt(elem.attribs.duration, 10);\n }\n if (elem.attribs.height) {\n media.height = parseInt(elem.attribs.height, 10);\n }\n if (elem.attribs.width) {\n media.width = parseInt(elem.attribs.width, 10);\n }\n if (elem.attribs.lang) {\n media.lang = elem.attribs.lang;\n }\n return media;\n });\n}\nfunction getElements(tagName, where) {\n return DomUtils.getElementsByTagName(tagName, where, true);\n}\nfunction getOneElement(tagName, node) {\n return DomUtils.getElementsByTagName(tagName, node, true, 1)[0];\n}\nfunction fetch(tagName, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n return DomUtils.getText(DomUtils.getElementsByTagName(tagName, where, recurse, 1)).trim();\n}\nfunction getAttribute(name, elem) {\n if (!elem) {\n return null;\n }\n var attribs = elem.attribs;\n return attribs[name];\n}\nfunction addConditionally(obj, prop, what, where, recurse) {\n if (recurse === void 0) { recurse = false; }\n var tmp = fetch(what, where, recurse);\n if (tmp)\n obj[prop] = tmp;\n}\nfunction isValidFeed(value) {\n return value === \"rss\" || value === \"feed\" || value === \"rdf:RDF\";\n}\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this option, you should set `xmlMode` to `true`.\n */\nfunction parseFeed(feed, options) {\n if (options === void 0) { options = { xmlMode: true }; }\n var handler = new FeedHandler(options);\n new Parser_1.Parser(handler, options).end(feed);\n return handler.feed;\n}\nexports.parseFeed = parseFeed;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Parser = void 0;\nvar Tokenizer_1 = __importDefault(require(\"./Tokenizer\"));\nvar formTags = new Set([\n \"input\",\n \"option\",\n \"optgroup\",\n \"select\",\n \"button\",\n \"datalist\",\n \"textarea\",\n]);\nvar pTag = new Set([\"p\"]);\nvar openImpliesClose = {\n tr: new Set([\"tr\", \"th\", \"td\"]),\n th: new Set([\"th\"]),\n td: new Set([\"thead\", \"th\", \"td\"]),\n body: new Set([\"head\", \"link\", \"script\"]),\n li: new Set([\"li\"]),\n p: pTag,\n h1: pTag,\n h2: pTag,\n h3: pTag,\n h4: pTag,\n h5: pTag,\n h6: pTag,\n select: formTags,\n input: formTags,\n output: formTags,\n button: formTags,\n datalist: formTags,\n textarea: formTags,\n option: new Set([\"option\"]),\n optgroup: new Set([\"optgroup\", \"option\"]),\n dd: new Set([\"dt\", \"dd\"]),\n dt: new Set([\"dt\", \"dd\"]),\n address: pTag,\n article: pTag,\n aside: pTag,\n blockquote: pTag,\n details: pTag,\n div: pTag,\n dl: pTag,\n fieldset: pTag,\n figcaption: pTag,\n figure: pTag,\n footer: pTag,\n form: pTag,\n header: pTag,\n hr: pTag,\n main: pTag,\n nav: pTag,\n ol: pTag,\n pre: pTag,\n section: pTag,\n table: pTag,\n ul: pTag,\n rt: new Set([\"rt\", \"rp\"]),\n rp: new Set([\"rt\", \"rp\"]),\n tbody: new Set([\"thead\", \"tbody\"]),\n tfoot: new Set([\"thead\", \"tbody\"]),\n};\nvar voidElements = new Set([\n \"area\",\n \"base\",\n \"basefont\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"img\",\n \"input\",\n \"isindex\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\",\n]);\nvar foreignContextElements = new Set([\"math\", \"svg\"]);\nvar htmlIntegrationElements = new Set([\n \"mi\",\n \"mo\",\n \"mn\",\n \"ms\",\n \"mtext\",\n \"annotation-xml\",\n \"foreignObject\",\n \"desc\",\n \"title\",\n]);\nvar reNameEnd = /\\s|\\//;\nvar Parser = /** @class */ (function () {\n function Parser(cbs, options) {\n if (options === void 0) { options = {}; }\n var _a, _b, _c, _d, _e;\n /** The start index of the last event. */\n this.startIndex = 0;\n /** The end index of the last event. */\n this.endIndex = null;\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribvalue = \"\";\n this.attribs = null;\n this.stack = [];\n this.foreignContext = [];\n this.options = options;\n this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};\n this.lowerCaseTagNames = (_a = options.lowerCaseTags) !== null && _a !== void 0 ? _a : !options.xmlMode;\n this.lowerCaseAttributeNames =\n (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;\n this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer_1.default)(this.options, this);\n (_e = (_d = this.cbs).onparserinit) === null || _e === void 0 ? void 0 : _e.call(_d, this);\n }\n Parser.prototype.updatePosition = function (initialOffset) {\n if (this.endIndex === null) {\n if (this.tokenizer.sectionStart <= initialOffset) {\n this.startIndex = 0;\n }\n else {\n this.startIndex = this.tokenizer.sectionStart - initialOffset;\n }\n }\n else {\n this.startIndex = this.endIndex + 1;\n }\n this.endIndex = this.tokenizer.getAbsoluteIndex();\n };\n // Tokenizer event handlers\n Parser.prototype.ontext = function (data) {\n var _a, _b;\n this.updatePosition(1);\n this.endIndex--;\n (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data);\n };\n Parser.prototype.onopentagname = function (name) {\n var _a, _b;\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n this.tagname = name;\n if (!this.options.xmlMode &&\n Object.prototype.hasOwnProperty.call(openImpliesClose, name)) {\n var el = void 0;\n while (this.stack.length > 0 &&\n openImpliesClose[name].has((el = this.stack[this.stack.length - 1]))) {\n this.onclosetag(el);\n }\n }\n if (this.options.xmlMode || !voidElements.has(name)) {\n this.stack.push(name);\n if (foreignContextElements.has(name)) {\n this.foreignContext.push(true);\n }\n else if (htmlIntegrationElements.has(name)) {\n this.foreignContext.push(false);\n }\n }\n (_b = (_a = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n if (this.cbs.onopentag)\n this.attribs = {};\n };\n Parser.prototype.onopentagend = function () {\n var _a, _b;\n this.updatePosition(1);\n if (this.attribs) {\n (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs);\n this.attribs = null;\n }\n if (!this.options.xmlMode &&\n this.cbs.onclosetag &&\n voidElements.has(this.tagname)) {\n this.cbs.onclosetag(this.tagname);\n }\n this.tagname = \"\";\n };\n Parser.prototype.onclosetag = function (name) {\n this.updatePosition(1);\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n if (foreignContextElements.has(name) ||\n htmlIntegrationElements.has(name)) {\n this.foreignContext.pop();\n }\n if (this.stack.length &&\n (this.options.xmlMode || !voidElements.has(name))) {\n var pos = this.stack.lastIndexOf(name);\n if (pos !== -1) {\n if (this.cbs.onclosetag) {\n pos = this.stack.length - pos;\n while (pos--) {\n // We know the stack has sufficient elements.\n this.cbs.onclosetag(this.stack.pop());\n }\n }\n else\n this.stack.length = pos;\n }\n else if (name === \"p\" && !this.options.xmlMode) {\n this.onopentagname(name);\n this.closeCurrentTag();\n }\n }\n else if (!this.options.xmlMode && (name === \"br\" || name === \"p\")) {\n this.onopentagname(name);\n this.closeCurrentTag();\n }\n };\n Parser.prototype.onselfclosingtag = function () {\n if (this.options.xmlMode ||\n this.options.recognizeSelfClosing ||\n this.foreignContext[this.foreignContext.length - 1]) {\n this.closeCurrentTag();\n }\n else {\n this.onopentagend();\n }\n };\n Parser.prototype.closeCurrentTag = function () {\n var _a, _b;\n var name = this.tagname;\n this.onopentagend();\n /*\n * Self-closing tags will be on the top of the stack\n * (cheaper check than in onclosetag)\n */\n if (this.stack[this.stack.length - 1] === name) {\n (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name);\n this.stack.pop();\n }\n };\n Parser.prototype.onattribname = function (name) {\n if (this.lowerCaseAttributeNames) {\n name = name.toLowerCase();\n }\n this.attribname = name;\n };\n Parser.prototype.onattribdata = function (value) {\n this.attribvalue += value;\n };\n Parser.prototype.onattribend = function (quote) {\n var _a, _b;\n (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote);\n if (this.attribs &&\n !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {\n this.attribs[this.attribname] = this.attribvalue;\n }\n this.attribname = \"\";\n this.attribvalue = \"\";\n };\n Parser.prototype.getInstructionName = function (value) {\n var idx = value.search(reNameEnd);\n var name = idx < 0 ? value : value.substr(0, idx);\n if (this.lowerCaseTagNames) {\n name = name.toLowerCase();\n }\n return name;\n };\n Parser.prototype.ondeclaration = function (value) {\n if (this.cbs.onprocessinginstruction) {\n var name_1 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"!\" + name_1, \"!\" + value);\n }\n };\n Parser.prototype.onprocessinginstruction = function (value) {\n if (this.cbs.onprocessinginstruction) {\n var name_2 = this.getInstructionName(value);\n this.cbs.onprocessinginstruction(\"?\" + name_2, \"?\" + value);\n }\n };\n Parser.prototype.oncomment = function (value) {\n var _a, _b, _c, _d;\n this.updatePosition(4);\n (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);\n };\n Parser.prototype.oncdata = function (value) {\n var _a, _b, _c, _d, _e, _f;\n this.updatePosition(1);\n if (this.options.xmlMode || this.options.recognizeCDATA) {\n (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a);\n (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);\n (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e);\n }\n else {\n this.oncomment(\"[CDATA[\" + value + \"]]\");\n }\n };\n Parser.prototype.onerror = function (err) {\n var _a, _b;\n (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n Parser.prototype.onend = function () {\n var _a, _b;\n if (this.cbs.onclosetag) {\n for (var i = this.stack.length; i > 0; this.cbs.onclosetag(this.stack[--i]))\n ;\n }\n (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n /**\n * Resets the parser to a blank state, ready to parse a new HTML document\n */\n Parser.prototype.reset = function () {\n var _a, _b, _c, _d;\n (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a);\n this.tokenizer.reset();\n this.tagname = \"\";\n this.attribname = \"\";\n this.attribs = null;\n this.stack = [];\n (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this);\n };\n /**\n * Resets the parser, then parses a complete document and\n * pushes it to the handler.\n *\n * @param data Document to parse.\n */\n Parser.prototype.parseComplete = function (data) {\n this.reset();\n this.end(data);\n };\n /**\n * Parses a chunk of data and calls the corresponding callbacks.\n *\n * @param chunk Chunk to parse.\n */\n Parser.prototype.write = function (chunk) {\n this.tokenizer.write(chunk);\n };\n /**\n * Parses the end of the buffer and clears the stack, calls onend.\n *\n * @param chunk Optional final chunk to parse.\n */\n Parser.prototype.end = function (chunk) {\n this.tokenizer.end(chunk);\n };\n /**\n * Pauses parsing. The parser won't emit events until `resume` is called.\n */\n Parser.prototype.pause = function () {\n this.tokenizer.pause();\n };\n /**\n * Resumes parsing after `pause` was called.\n */\n Parser.prototype.resume = function () {\n this.tokenizer.resume();\n };\n /**\n * Alias of `write`, for backwards compatibility.\n *\n * @param chunk Chunk to parse.\n * @deprecated\n */\n Parser.prototype.parseChunk = function (chunk) {\n this.write(chunk);\n };\n /**\n * Alias of `end`, for backwards compatibility.\n *\n * @param chunk Optional final chunk to parse.\n * @deprecated\n */\n Parser.prototype.done = function (chunk) {\n this.end(chunk);\n };\n return Parser;\n}());\nexports.Parser = Parser;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_codepoint_1 = __importDefault(require(\"entities/lib/decode_codepoint\"));\nvar entities_json_1 = __importDefault(require(\"entities/lib/maps/entities.json\"));\nvar legacy_json_1 = __importDefault(require(\"entities/lib/maps/legacy.json\"));\nvar xml_json_1 = __importDefault(require(\"entities/lib/maps/xml.json\"));\nfunction whitespace(c) {\n return c === \" \" || c === \"\\n\" || c === \"\\t\" || c === \"\\f\" || c === \"\\r\";\n}\nfunction isASCIIAlpha(c) {\n return (c >= \"a\" && c <= \"z\") || (c >= \"A\" && c <= \"Z\");\n}\nfunction ifElseState(upper, SUCCESS, FAILURE) {\n var lower = upper.toLowerCase();\n if (upper === lower) {\n return function (t, c) {\n if (c === lower) {\n t._state = SUCCESS;\n }\n else {\n t._state = FAILURE;\n t._index--;\n }\n };\n }\n return function (t, c) {\n if (c === lower || c === upper) {\n t._state = SUCCESS;\n }\n else {\n t._state = FAILURE;\n t._index--;\n }\n };\n}\nfunction consumeSpecialNameChar(upper, NEXT_STATE) {\n var lower = upper.toLowerCase();\n return function (t, c) {\n if (c === lower || c === upper) {\n t._state = NEXT_STATE;\n }\n else {\n t._state = 3 /* InTagName */;\n t._index--; // Consume the token again\n }\n };\n}\nvar stateBeforeCdata1 = ifElseState(\"C\", 24 /* BeforeCdata2 */, 16 /* InDeclaration */);\nvar stateBeforeCdata2 = ifElseState(\"D\", 25 /* BeforeCdata3 */, 16 /* InDeclaration */);\nvar stateBeforeCdata3 = ifElseState(\"A\", 26 /* BeforeCdata4 */, 16 /* InDeclaration */);\nvar stateBeforeCdata4 = ifElseState(\"T\", 27 /* BeforeCdata5 */, 16 /* InDeclaration */);\nvar stateBeforeCdata5 = ifElseState(\"A\", 28 /* BeforeCdata6 */, 16 /* InDeclaration */);\nvar stateBeforeScript1 = consumeSpecialNameChar(\"R\", 35 /* BeforeScript2 */);\nvar stateBeforeScript2 = consumeSpecialNameChar(\"I\", 36 /* BeforeScript3 */);\nvar stateBeforeScript3 = consumeSpecialNameChar(\"P\", 37 /* BeforeScript4 */);\nvar stateBeforeScript4 = consumeSpecialNameChar(\"T\", 38 /* BeforeScript5 */);\nvar stateAfterScript1 = ifElseState(\"R\", 40 /* AfterScript2 */, 1 /* Text */);\nvar stateAfterScript2 = ifElseState(\"I\", 41 /* AfterScript3 */, 1 /* Text */);\nvar stateAfterScript3 = ifElseState(\"P\", 42 /* AfterScript4 */, 1 /* Text */);\nvar stateAfterScript4 = ifElseState(\"T\", 43 /* AfterScript5 */, 1 /* Text */);\nvar stateBeforeStyle1 = consumeSpecialNameChar(\"Y\", 45 /* BeforeStyle2 */);\nvar stateBeforeStyle2 = consumeSpecialNameChar(\"L\", 46 /* BeforeStyle3 */);\nvar stateBeforeStyle3 = consumeSpecialNameChar(\"E\", 47 /* BeforeStyle4 */);\nvar stateAfterStyle1 = ifElseState(\"Y\", 49 /* AfterStyle2 */, 1 /* Text */);\nvar stateAfterStyle2 = ifElseState(\"L\", 50 /* AfterStyle3 */, 1 /* Text */);\nvar stateAfterStyle3 = ifElseState(\"E\", 51 /* AfterStyle4 */, 1 /* Text */);\nvar stateBeforeSpecialT = consumeSpecialNameChar(\"I\", 54 /* BeforeTitle1 */);\nvar stateBeforeTitle1 = consumeSpecialNameChar(\"T\", 55 /* BeforeTitle2 */);\nvar stateBeforeTitle2 = consumeSpecialNameChar(\"L\", 56 /* BeforeTitle3 */);\nvar stateBeforeTitle3 = consumeSpecialNameChar(\"E\", 57 /* BeforeTitle4 */);\nvar stateAfterSpecialTEnd = ifElseState(\"I\", 58 /* AfterTitle1 */, 1 /* Text */);\nvar stateAfterTitle1 = ifElseState(\"T\", 59 /* AfterTitle2 */, 1 /* Text */);\nvar stateAfterTitle2 = ifElseState(\"L\", 60 /* AfterTitle3 */, 1 /* Text */);\nvar stateAfterTitle3 = ifElseState(\"E\", 61 /* AfterTitle4 */, 1 /* Text */);\nvar stateBeforeEntity = ifElseState(\"#\", 63 /* BeforeNumericEntity */, 64 /* InNamedEntity */);\nvar stateBeforeNumericEntity = ifElseState(\"X\", 66 /* InHexEntity */, 65 /* InNumericEntity */);\nvar Tokenizer = /** @class */ (function () {\n function Tokenizer(options, cbs) {\n var _a;\n /** The current state the tokenizer is in. */\n this._state = 1 /* Text */;\n /** The read buffer. */\n this.buffer = \"\";\n /** The beginning of the section that is currently being read. */\n this.sectionStart = 0;\n /** The index within the buffer that we are currently looking at. */\n this._index = 0;\n /**\n * Data that has already been processed will be removed from the buffer occasionally.\n * `_bufferOffset` keeps track of how many characters have been removed, to make sure position information is accurate.\n */\n this.bufferOffset = 0;\n /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */\n this.baseState = 1 /* Text */;\n /** For special parsing behavior inside of script and style tags. */\n this.special = 1 /* None */;\n /** Indicates whether the tokenizer has been paused. */\n this.running = true;\n /** Indicates whether the tokenizer has finished running / `.end` has been called. */\n this.ended = false;\n this.cbs = cbs;\n this.xmlMode = !!(options === null || options === void 0 ? void 0 : options.xmlMode);\n this.decodeEntities = (_a = options === null || options === void 0 ? void 0 : options.decodeEntities) !== null && _a !== void 0 ? _a : true;\n }\n Tokenizer.prototype.reset = function () {\n this._state = 1 /* Text */;\n this.buffer = \"\";\n this.sectionStart = 0;\n this._index = 0;\n this.bufferOffset = 0;\n this.baseState = 1 /* Text */;\n this.special = 1 /* None */;\n this.running = true;\n this.ended = false;\n };\n Tokenizer.prototype.write = function (chunk) {\n if (this.ended)\n this.cbs.onerror(Error(\".write() after done!\"));\n this.buffer += chunk;\n this.parse();\n };\n Tokenizer.prototype.end = function (chunk) {\n if (this.ended)\n this.cbs.onerror(Error(\".end() after done!\"));\n if (chunk)\n this.write(chunk);\n this.ended = true;\n if (this.running)\n this.finish();\n };\n Tokenizer.prototype.pause = function () {\n this.running = false;\n };\n Tokenizer.prototype.resume = function () {\n this.running = true;\n if (this._index < this.buffer.length) {\n this.parse();\n }\n if (this.ended) {\n this.finish();\n }\n };\n /**\n * The current index within all of the written data.\n */\n Tokenizer.prototype.getAbsoluteIndex = function () {\n return this.bufferOffset + this._index;\n };\n Tokenizer.prototype.stateText = function (c) {\n if (c === \"<\") {\n if (this._index > this.sectionStart) {\n this.cbs.ontext(this.getSection());\n }\n this._state = 2 /* BeforeTagName */;\n this.sectionStart = this._index;\n }\n else if (this.decodeEntities &&\n c === \"&\" &&\n (this.special === 1 /* None */ || this.special === 4 /* Title */)) {\n if (this._index > this.sectionStart) {\n this.cbs.ontext(this.getSection());\n }\n this.baseState = 1 /* Text */;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n /**\n * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n *\n * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n * We allow anything that wouldn't end the tag.\n */\n Tokenizer.prototype.isTagStartChar = function (c) {\n return (isASCIIAlpha(c) ||\n (this.xmlMode && !whitespace(c) && c !== \"/\" && c !== \">\"));\n };\n Tokenizer.prototype.stateBeforeTagName = function (c) {\n if (c === \"/\") {\n this._state = 5 /* BeforeClosingTagName */;\n }\n else if (c === \"<\") {\n this.cbs.ontext(this.getSection());\n this.sectionStart = this._index;\n }\n else if (c === \">\" ||\n this.special !== 1 /* None */ ||\n whitespace(c)) {\n this._state = 1 /* Text */;\n }\n else if (c === \"!\") {\n this._state = 15 /* BeforeDeclaration */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"?\") {\n this._state = 17 /* InProcessingInstruction */;\n this.sectionStart = this._index + 1;\n }\n else if (!this.isTagStartChar(c)) {\n this._state = 1 /* Text */;\n }\n else {\n this._state =\n !this.xmlMode && (c === \"s\" || c === \"S\")\n ? 32 /* BeforeSpecialS */\n : !this.xmlMode && (c === \"t\" || c === \"T\")\n ? 52 /* BeforeSpecialT */\n : 3 /* InTagName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInTagName = function (c) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this.emitToken(\"onopentagname\");\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n if (whitespace(c)) {\n // Ignore\n }\n else if (c === \">\") {\n this._state = 1 /* Text */;\n }\n else if (this.special !== 1 /* None */) {\n if (this.special !== 4 /* Title */ && (c === \"s\" || c === \"S\")) {\n this._state = 33 /* BeforeSpecialSEnd */;\n }\n else if (this.special === 4 /* Title */ &&\n (c === \"t\" || c === \"T\")) {\n this._state = 53 /* BeforeSpecialTEnd */;\n }\n else {\n this._state = 1 /* Text */;\n this._index--;\n }\n }\n else if (!this.isTagStartChar(c)) {\n this._state = 20 /* InSpecialComment */;\n this.sectionStart = this._index;\n }\n else {\n this._state = 6 /* InClosingTagName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInClosingTagName = function (c) {\n if (c === \">\" || whitespace(c)) {\n this.emitToken(\"onclosetag\");\n this._state = 7 /* AfterClosingTagName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n // Skip everything until \">\"\n if (c === \">\") {\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n if (c === \">\") {\n this.cbs.onopentagend();\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"/\") {\n this._state = 4 /* InSelfClosingTag */;\n }\n else if (!whitespace(c)) {\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n if (c === \">\") {\n this.cbs.onselfclosingtag();\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n this.special = 1 /* None */; // Reset special state, in case of self-closing special tags\n }\n else if (!whitespace(c)) {\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateInAttributeName = function (c) {\n if (c === \"=\" || c === \"/\" || c === \">\" || whitespace(c)) {\n this.cbs.onattribname(this.getSection());\n this.sectionStart = -1;\n this._state = 10 /* AfterAttributeName */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateAfterAttributeName = function (c) {\n if (c === \"=\") {\n this._state = 11 /* BeforeAttributeValue */;\n }\n else if (c === \"/\" || c === \">\") {\n this.cbs.onattribend(undefined);\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n else if (!whitespace(c)) {\n this.cbs.onattribend(undefined);\n this._state = 9 /* InAttributeName */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n if (c === '\"') {\n this._state = 12 /* InAttributeValueDq */;\n this.sectionStart = this._index + 1;\n }\n else if (c === \"'\") {\n this._state = 13 /* InAttributeValueSq */;\n this.sectionStart = this._index + 1;\n }\n else if (!whitespace(c)) {\n this._state = 14 /* InAttributeValueNq */;\n this.sectionStart = this._index;\n this._index--; // Reconsume token\n }\n };\n Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n if (c === quote) {\n this.emitToken(\"onattribdata\");\n this.cbs.onattribend(quote);\n this._state = 8 /* BeforeAttributeName */;\n }\n else if (this.decodeEntities && c === \"&\") {\n this.emitToken(\"onattribdata\");\n this.baseState = this._state;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n this.handleInAttributeValue(c, '\"');\n };\n Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n this.handleInAttributeValue(c, \"'\");\n };\n Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n if (whitespace(c) || c === \">\") {\n this.emitToken(\"onattribdata\");\n this.cbs.onattribend(null);\n this._state = 8 /* BeforeAttributeName */;\n this._index--;\n }\n else if (this.decodeEntities && c === \"&\") {\n this.emitToken(\"onattribdata\");\n this.baseState = this._state;\n this._state = 62 /* BeforeEntity */;\n this.sectionStart = this._index;\n }\n };\n Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n this._state =\n c === \"[\"\n ? 23 /* BeforeCdata1 */\n : c === \"-\"\n ? 18 /* BeforeComment */\n : 16 /* InDeclaration */;\n };\n Tokenizer.prototype.stateInDeclaration = function (c) {\n if (c === \">\") {\n this.cbs.ondeclaration(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n if (c === \">\") {\n this.cbs.onprocessinginstruction(this.getSection());\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeComment = function (c) {\n if (c === \"-\") {\n this._state = 19 /* InComment */;\n this.sectionStart = this._index + 1;\n }\n else {\n this._state = 16 /* InDeclaration */;\n }\n };\n Tokenizer.prototype.stateInComment = function (c) {\n if (c === \"-\")\n this._state = 21 /* AfterComment1 */;\n };\n Tokenizer.prototype.stateInSpecialComment = function (c) {\n if (c === \">\") {\n this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n };\n Tokenizer.prototype.stateAfterComment1 = function (c) {\n if (c === \"-\") {\n this._state = 22 /* AfterComment2 */;\n }\n else {\n this._state = 19 /* InComment */;\n }\n };\n Tokenizer.prototype.stateAfterComment2 = function (c) {\n if (c === \">\") {\n // Remove 2 trailing chars\n this.cbs.oncomment(this.buffer.substring(this.sectionStart, this._index - 2));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c !== \"-\") {\n this._state = 19 /* InComment */;\n }\n // Else: stay in AFTER_COMMENT_2 (`--->`)\n };\n Tokenizer.prototype.stateBeforeCdata6 = function (c) {\n if (c === \"[\") {\n this._state = 29 /* InCdata */;\n this.sectionStart = this._index + 1;\n }\n else {\n this._state = 16 /* InDeclaration */;\n this._index--;\n }\n };\n Tokenizer.prototype.stateInCdata = function (c) {\n if (c === \"]\")\n this._state = 30 /* AfterCdata1 */;\n };\n Tokenizer.prototype.stateAfterCdata1 = function (c) {\n if (c === \"]\")\n this._state = 31 /* AfterCdata2 */;\n else\n this._state = 29 /* InCdata */;\n };\n Tokenizer.prototype.stateAfterCdata2 = function (c) {\n if (c === \">\") {\n // Remove 2 trailing chars\n this.cbs.oncdata(this.buffer.substring(this.sectionStart, this._index - 2));\n this._state = 1 /* Text */;\n this.sectionStart = this._index + 1;\n }\n else if (c !== \"]\") {\n this._state = 29 /* InCdata */;\n }\n // Else: stay in AFTER_CDATA_2 (`]]]>`)\n };\n Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n if (c === \"c\" || c === \"C\") {\n this._state = 34 /* BeforeScript1 */;\n }\n else if (c === \"t\" || c === \"T\") {\n this._state = 44 /* BeforeStyle1 */;\n }\n else {\n this._state = 3 /* InTagName */;\n this._index--; // Consume the token again\n }\n };\n Tokenizer.prototype.stateBeforeSpecialSEnd = function (c) {\n if (this.special === 2 /* Script */ && (c === \"c\" || c === \"C\")) {\n this._state = 39 /* AfterScript1 */;\n }\n else if (this.special === 3 /* Style */ && (c === \"t\" || c === \"T\")) {\n this._state = 48 /* AfterStyle1 */;\n }\n else\n this._state = 1 /* Text */;\n };\n Tokenizer.prototype.stateBeforeSpecialLast = function (c, special) {\n if (c === \"/\" || c === \">\" || whitespace(c)) {\n this.special = special;\n }\n this._state = 3 /* InTagName */;\n this._index--; // Consume the token again\n };\n Tokenizer.prototype.stateAfterSpecialLast = function (c, sectionStartOffset) {\n if (c === \">\" || whitespace(c)) {\n this.special = 1 /* None */;\n this._state = 6 /* InClosingTagName */;\n this.sectionStart = this._index - sectionStartOffset;\n this._index--; // Reconsume the token\n }\n else\n this._state = 1 /* Text */;\n };\n // For entities terminated with a semicolon\n Tokenizer.prototype.parseFixedEntity = function (map) {\n if (map === void 0) { map = this.xmlMode ? xml_json_1.default : entities_json_1.default; }\n // Offset = 1\n if (this.sectionStart + 1 < this._index) {\n var entity = this.buffer.substring(this.sectionStart + 1, this._index);\n if (Object.prototype.hasOwnProperty.call(map, entity)) {\n this.emitPartial(map[entity]);\n this.sectionStart = this._index + 1;\n }\n }\n };\n // Parses legacy entities (without trailing semicolon)\n Tokenizer.prototype.parseLegacyEntity = function () {\n var start = this.sectionStart + 1;\n // The max length of legacy entities is 6\n var limit = Math.min(this._index - start, 6);\n while (limit >= 2) {\n // The min length of legacy entities is 2\n var entity = this.buffer.substr(start, limit);\n if (Object.prototype.hasOwnProperty.call(legacy_json_1.default, entity)) {\n this.emitPartial(legacy_json_1.default[entity]);\n this.sectionStart += limit + 1;\n return;\n }\n limit--;\n }\n };\n Tokenizer.prototype.stateInNamedEntity = function (c) {\n if (c === \";\") {\n this.parseFixedEntity();\n // Retry as legacy entity if entity wasn't parsed\n if (this.baseState === 1 /* Text */ &&\n this.sectionStart + 1 < this._index &&\n !this.xmlMode) {\n this.parseLegacyEntity();\n }\n this._state = this.baseState;\n }\n else if ((c < \"0\" || c > \"9\") && !isASCIIAlpha(c)) {\n if (this.xmlMode || this.sectionStart + 1 === this._index) {\n // Ignore\n }\n else if (this.baseState !== 1 /* Text */) {\n if (c !== \"=\") {\n // Parse as legacy entity, without allowing additional characters.\n this.parseFixedEntity(legacy_json_1.default);\n }\n }\n else {\n this.parseLegacyEntity();\n }\n this._state = this.baseState;\n this._index--;\n }\n };\n Tokenizer.prototype.decodeNumericEntity = function (offset, base, strict) {\n var sectionStart = this.sectionStart + offset;\n if (sectionStart !== this._index) {\n // Parse entity\n var entity = this.buffer.substring(sectionStart, this._index);\n var parsed = parseInt(entity, base);\n this.emitPartial(decode_codepoint_1.default(parsed));\n this.sectionStart = strict ? this._index + 1 : this._index;\n }\n this._state = this.baseState;\n };\n Tokenizer.prototype.stateInNumericEntity = function (c) {\n if (c === \";\") {\n this.decodeNumericEntity(2, 10, true);\n }\n else if (c < \"0\" || c > \"9\") {\n if (!this.xmlMode) {\n this.decodeNumericEntity(2, 10, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n };\n Tokenizer.prototype.stateInHexEntity = function (c) {\n if (c === \";\") {\n this.decodeNumericEntity(3, 16, true);\n }\n else if ((c < \"a\" || c > \"f\") &&\n (c < \"A\" || c > \"F\") &&\n (c < \"0\" || c > \"9\")) {\n if (!this.xmlMode) {\n this.decodeNumericEntity(3, 16, false);\n }\n else {\n this._state = this.baseState;\n }\n this._index--;\n }\n };\n Tokenizer.prototype.cleanup = function () {\n if (this.sectionStart < 0) {\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else if (this.running) {\n if (this._state === 1 /* Text */) {\n if (this.sectionStart !== this._index) {\n this.cbs.ontext(this.buffer.substr(this.sectionStart));\n }\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else if (this.sectionStart === this._index) {\n // The section just started\n this.buffer = \"\";\n this.bufferOffset += this._index;\n this._index = 0;\n }\n else {\n // Remove everything unnecessary\n this.buffer = this.buffer.substr(this.sectionStart);\n this._index -= this.sectionStart;\n this.bufferOffset += this.sectionStart;\n }\n this.sectionStart = 0;\n }\n };\n /**\n * Iterates through the buffer, calling the function corresponding to the current state.\n *\n * States that are more likely to be hit are higher up, as a performance improvement.\n */\n Tokenizer.prototype.parse = function () {\n while (this._index < this.buffer.length && this.running) {\n var c = this.buffer.charAt(this._index);\n if (this._state === 1 /* Text */) {\n this.stateText(c);\n }\n else if (this._state === 12 /* InAttributeValueDq */) {\n this.stateInAttributeValueDoubleQuotes(c);\n }\n else if (this._state === 9 /* InAttributeName */) {\n this.stateInAttributeName(c);\n }\n else if (this._state === 19 /* InComment */) {\n this.stateInComment(c);\n }\n else if (this._state === 20 /* InSpecialComment */) {\n this.stateInSpecialComment(c);\n }\n else if (this._state === 8 /* BeforeAttributeName */) {\n this.stateBeforeAttributeName(c);\n }\n else if (this._state === 3 /* InTagName */) {\n this.stateInTagName(c);\n }\n else if (this._state === 6 /* InClosingTagName */) {\n this.stateInClosingTagName(c);\n }\n else if (this._state === 2 /* BeforeTagName */) {\n this.stateBeforeTagName(c);\n }\n else if (this._state === 10 /* AfterAttributeName */) {\n this.stateAfterAttributeName(c);\n }\n else if (this._state === 13 /* InAttributeValueSq */) {\n this.stateInAttributeValueSingleQuotes(c);\n }\n else if (this._state === 11 /* BeforeAttributeValue */) {\n this.stateBeforeAttributeValue(c);\n }\n else if (this._state === 5 /* BeforeClosingTagName */) {\n this.stateBeforeClosingTagName(c);\n }\n else if (this._state === 7 /* AfterClosingTagName */) {\n this.stateAfterClosingTagName(c);\n }\n else if (this._state === 32 /* BeforeSpecialS */) {\n this.stateBeforeSpecialS(c);\n }\n else if (this._state === 21 /* AfterComment1 */) {\n this.stateAfterComment1(c);\n }\n else if (this._state === 14 /* InAttributeValueNq */) {\n this.stateInAttributeValueNoQuotes(c);\n }\n else if (this._state === 4 /* InSelfClosingTag */) {\n this.stateInSelfClosingTag(c);\n }\n else if (this._state === 16 /* InDeclaration */) {\n this.stateInDeclaration(c);\n }\n else if (this._state === 15 /* BeforeDeclaration */) {\n this.stateBeforeDeclaration(c);\n }\n else if (this._state === 22 /* AfterComment2 */) {\n this.stateAfterComment2(c);\n }\n else if (this._state === 18 /* BeforeComment */) {\n this.stateBeforeComment(c);\n }\n else if (this._state === 33 /* BeforeSpecialSEnd */) {\n this.stateBeforeSpecialSEnd(c);\n }\n else if (this._state === 53 /* BeforeSpecialTEnd */) {\n stateAfterSpecialTEnd(this, c);\n }\n else if (this._state === 39 /* AfterScript1 */) {\n stateAfterScript1(this, c);\n }\n else if (this._state === 40 /* AfterScript2 */) {\n stateAfterScript2(this, c);\n }\n else if (this._state === 41 /* AfterScript3 */) {\n stateAfterScript3(this, c);\n }\n else if (this._state === 34 /* BeforeScript1 */) {\n stateBeforeScript1(this, c);\n }\n else if (this._state === 35 /* BeforeScript2 */) {\n stateBeforeScript2(this, c);\n }\n else if (this._state === 36 /* BeforeScript3 */) {\n stateBeforeScript3(this, c);\n }\n else if (this._state === 37 /* BeforeScript4 */) {\n stateBeforeScript4(this, c);\n }\n else if (this._state === 38 /* BeforeScript5 */) {\n this.stateBeforeSpecialLast(c, 2 /* Script */);\n }\n else if (this._state === 42 /* AfterScript4 */) {\n stateAfterScript4(this, c);\n }\n else if (this._state === 43 /* AfterScript5 */) {\n this.stateAfterSpecialLast(c, 6);\n }\n else if (this._state === 44 /* BeforeStyle1 */) {\n stateBeforeStyle1(this, c);\n }\n else if (this._state === 29 /* InCdata */) {\n this.stateInCdata(c);\n }\n else if (this._state === 45 /* BeforeStyle2 */) {\n stateBeforeStyle2(this, c);\n }\n else if (this._state === 46 /* BeforeStyle3 */) {\n stateBeforeStyle3(this, c);\n }\n else if (this._state === 47 /* BeforeStyle4 */) {\n this.stateBeforeSpecialLast(c, 3 /* Style */);\n }\n else if (this._state === 48 /* AfterStyle1 */) {\n stateAfterStyle1(this, c);\n }\n else if (this._state === 49 /* AfterStyle2 */) {\n stateAfterStyle2(this, c);\n }\n else if (this._state === 50 /* AfterStyle3 */) {\n stateAfterStyle3(this, c);\n }\n else if (this._state === 51 /* AfterStyle4 */) {\n this.stateAfterSpecialLast(c, 5);\n }\n else if (this._state === 52 /* BeforeSpecialT */) {\n stateBeforeSpecialT(this, c);\n }\n else if (this._state === 54 /* BeforeTitle1 */) {\n stateBeforeTitle1(this, c);\n }\n else if (this._state === 55 /* BeforeTitle2 */) {\n stateBeforeTitle2(this, c);\n }\n else if (this._state === 56 /* BeforeTitle3 */) {\n stateBeforeTitle3(this, c);\n }\n else if (this._state === 57 /* BeforeTitle4 */) {\n this.stateBeforeSpecialLast(c, 4 /* Title */);\n }\n else if (this._state === 58 /* AfterTitle1 */) {\n stateAfterTitle1(this, c);\n }\n else if (this._state === 59 /* AfterTitle2 */) {\n stateAfterTitle2(this, c);\n }\n else if (this._state === 60 /* AfterTitle3 */) {\n stateAfterTitle3(this, c);\n }\n else if (this._state === 61 /* AfterTitle4 */) {\n this.stateAfterSpecialLast(c, 5);\n }\n else if (this._state === 17 /* InProcessingInstruction */) {\n this.stateInProcessingInstruction(c);\n }\n else if (this._state === 64 /* InNamedEntity */) {\n this.stateInNamedEntity(c);\n }\n else if (this._state === 23 /* BeforeCdata1 */) {\n stateBeforeCdata1(this, c);\n }\n else if (this._state === 62 /* BeforeEntity */) {\n stateBeforeEntity(this, c);\n }\n else if (this._state === 24 /* BeforeCdata2 */) {\n stateBeforeCdata2(this, c);\n }\n else if (this._state === 25 /* BeforeCdata3 */) {\n stateBeforeCdata3(this, c);\n }\n else if (this._state === 30 /* AfterCdata1 */) {\n this.stateAfterCdata1(c);\n }\n else if (this._state === 31 /* AfterCdata2 */) {\n this.stateAfterCdata2(c);\n }\n else if (this._state === 26 /* BeforeCdata4 */) {\n stateBeforeCdata4(this, c);\n }\n else if (this._state === 27 /* BeforeCdata5 */) {\n stateBeforeCdata5(this, c);\n }\n else if (this._state === 28 /* BeforeCdata6 */) {\n this.stateBeforeCdata6(c);\n }\n else if (this._state === 66 /* InHexEntity */) {\n this.stateInHexEntity(c);\n }\n else if (this._state === 65 /* InNumericEntity */) {\n this.stateInNumericEntity(c);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n }\n else if (this._state === 63 /* BeforeNumericEntity */) {\n stateBeforeNumericEntity(this, c);\n }\n else {\n this.cbs.onerror(Error(\"unknown _state\"), this._state);\n }\n this._index++;\n }\n this.cleanup();\n };\n Tokenizer.prototype.finish = function () {\n // If there is remaining data, emit it in a reasonable way\n if (this.sectionStart < this._index) {\n this.handleTrailingData();\n }\n this.cbs.onend();\n };\n Tokenizer.prototype.handleTrailingData = function () {\n var data = this.buffer.substr(this.sectionStart);\n if (this._state === 29 /* InCdata */ ||\n this._state === 30 /* AfterCdata1 */ ||\n this._state === 31 /* AfterCdata2 */) {\n this.cbs.oncdata(data);\n }\n else if (this._state === 19 /* InComment */ ||\n this._state === 21 /* AfterComment1 */ ||\n this._state === 22 /* AfterComment2 */) {\n this.cbs.oncomment(data);\n }\n else if (this._state === 64 /* InNamedEntity */ && !this.xmlMode) {\n this.parseLegacyEntity();\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state === 65 /* InNumericEntity */ && !this.xmlMode) {\n this.decodeNumericEntity(2, 10, false);\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state === 66 /* InHexEntity */ && !this.xmlMode) {\n this.decodeNumericEntity(3, 16, false);\n if (this.sectionStart < this._index) {\n this._state = this.baseState;\n this.handleTrailingData();\n }\n }\n else if (this._state !== 3 /* InTagName */ &&\n this._state !== 8 /* BeforeAttributeName */ &&\n this._state !== 11 /* BeforeAttributeValue */ &&\n this._state !== 10 /* AfterAttributeName */ &&\n this._state !== 9 /* InAttributeName */ &&\n this._state !== 13 /* InAttributeValueSq */ &&\n this._state !== 12 /* InAttributeValueDq */ &&\n this._state !== 14 /* InAttributeValueNq */ &&\n this._state !== 6 /* InClosingTagName */) {\n this.cbs.ontext(data);\n }\n /*\n * Else, ignore remaining data\n * TODO add a way to remove current tag\n */\n };\n Tokenizer.prototype.getSection = function () {\n return this.buffer.substring(this.sectionStart, this._index);\n };\n Tokenizer.prototype.emitToken = function (name) {\n this.cbs[name](this.getSection());\n this.sectionStart = -1;\n };\n Tokenizer.prototype.emitPartial = function (value) {\n if (this.baseState !== 1 /* Text */) {\n this.cbs.onattribdata(value); // TODO implement the new event\n }\n else {\n this.cbs.ontext(value);\n }\n };\n return Tokenizer;\n}());\nexports.default = Tokenizer;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RssHandler = exports.DefaultHandler = exports.DomUtils = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DomHandler = exports.Parser = void 0;\nvar Parser_1 = require(\"./Parser\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return Parser_1.Parser; } });\nvar domhandler_1 = require(\"domhandler\");\nObject.defineProperty(exports, \"DomHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\nObject.defineProperty(exports, \"DefaultHandler\", { enumerable: true, get: function () { return domhandler_1.DomHandler; } });\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n */\nfunction parseDocument(data, options) {\n var handler = new domhandler_1.DomHandler(undefined, options);\n new Parser_1.Parser(handler, options).end(data);\n return handler.root;\n}\nexports.parseDocument = parseDocument;\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n * @deprecated Use `parseDocument` instead.\n */\nfunction parseDOM(data, options) {\n return parseDocument(data, options).children;\n}\nexports.parseDOM = parseDOM;\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param cb A callback that will be called once parsing has been completed.\n * @param options Optional options for the parser and DOM builder.\n * @param elementCb An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nfunction createDomStream(cb, options, elementCb) {\n var handler = new domhandler_1.DomHandler(cb, options, elementCb);\n return new Parser_1.Parser(handler, options);\n}\nexports.createDomStream = createDomStream;\nvar Tokenizer_1 = require(\"./Tokenizer\");\nObject.defineProperty(exports, \"Tokenizer\", { enumerable: true, get: function () { return __importDefault(Tokenizer_1).default; } });\nvar ElementType = __importStar(require(\"domelementtype\"));\nexports.ElementType = ElementType;\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\n__exportStar(require(\"./FeedHandler\"), exports);\nexports.DomUtils = __importStar(require(\"domutils\"));\nvar FeedHandler_1 = require(\"./FeedHandler\");\nObject.defineProperty(exports, \"RssHandler\", { enumerable: true, get: function () { return FeedHandler_1.FeedHandler; } });\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar decode_json_1 = __importDefault(require(\"./maps/decode.json\"));\n// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119\nvar fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\nString.fromCodePoint ||\n function (codePoint) {\n var output = \"\";\n if (codePoint > 0xffff) {\n codePoint -= 0x10000;\n output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n codePoint = 0xdc00 | (codePoint & 0x3ff);\n }\n output += String.fromCharCode(codePoint);\n return output;\n };\nfunction decodeCodePoint(codePoint) {\n if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n return \"\\uFFFD\";\n }\n if (codePoint in decode_json_1.default) {\n codePoint = decode_json_1.default[codePoint];\n }\n return fromCodePoint(codePoint);\n}\nexports.default = decodeCodePoint;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexports.isPlainObject = isPlainObject;\n","/**!\n * lg-zoom.js | 1.3.0 | October 14th 2020\n * http://sachinchoolur.github.io/lg-zoom.js\n * Copyright (c) 2016 Sachin N; \n * @license GPLv3 \n */(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.LgZoom = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i 1) {\n utils.addClass(_this.core.outer, 'lg-zoomed');\n } else {\n _this.resetZoom();\n }\n\n if (scale < 1) {\n scale = 1;\n }\n\n zoom(scale);\n };\n\n var actualSize = function actualSize(event, image, index, fromIcon) {\n var w = image.clientWidth;\n var nw;\n if (_this.core.s.dynamic) {\n nw = _this.core.s.dynamicEl[index].width || image.naturalWidth || w;\n } else {\n nw = _this.core.items[index].getAttribute('data-width') || image.naturalWidth || w;\n }\n\n var _scale;\n\n if (utils.hasClass(_this.core.outer, 'lg-zoomed')) {\n scale = 1;\n } else {\n if (nw > w) {\n _scale = nw / w;\n scale = _scale || 2;\n }\n }\n\n if (fromIcon) {\n _this.pageX = window.innerWidth / 2;\n _this.pageY = window.innerHeight / 2 + (document.documentElement.scrollTop || document.body.scrollTop);\n } else {\n _this.pageX = event.pageX || event.targetTouches[0].pageX;\n _this.pageY = event.pageY || event.targetTouches[0].pageY;\n }\n\n callScale();\n setTimeout(function () {\n utils.removeClass(_this.core.outer, 'lg-grabbing');\n utils.addClass(_this.core.outer, 'lg-grab');\n }, 10);\n };\n\n var tapped = false;\n\n // event triggered after appending slide content\n utils.on(_this.core.el, 'onAferAppendSlide.lgtmzoom', function (event) {\n\n var index = event.detail.index;\n\n // Get the current element\n var image = _this.core.___slide[index].querySelector('.lg-image');\n\n if (!_this.core.isTouch) {\n utils.on(image, 'dblclick', function (event) {\n actualSize(event, image, index);\n });\n }\n\n if (_this.core.isTouch) {\n utils.on(image, 'touchstart', function (event) {\n if (!tapped) {\n tapped = setTimeout(function () {\n tapped = null;\n }, 300);\n } else {\n clearTimeout(tapped);\n tapped = null;\n actualSize(event, image, index);\n }\n\n event.preventDefault();\n });\n }\n });\n\n // Update zoom on resize and orientationchange\n utils.on(window, 'resize.lgzoom scroll.lgzoom orientationchange.lgzoom', function () {\n _this.pageX = window.innerWidth / 2;\n _this.pageY = window.innerHeight / 2 + (document.documentElement.scrollTop || document.body.scrollTop);\n zoom(scale);\n });\n\n utils.on(document.getElementById('lg-zoom-out'), 'click.lg', function () {\n if (_this.core.outer.querySelector('.lg-current .lg-image')) {\n scale -= _this.core.s.scale;\n callScale();\n }\n });\n\n utils.on(document.getElementById('lg-zoom-in'), 'click.lg', function () {\n if (_this.core.outer.querySelector('.lg-current .lg-image')) {\n scale += _this.core.s.scale;\n callScale();\n }\n });\n\n utils.on(document.getElementById('lg-actual-size'), 'click.lg', function (event) {\n actualSize(event, _this.core.___slide[_this.core.index].querySelector('.lg-image'), _this.core.index, true);\n });\n\n // Reset zoom on slide change\n utils.on(_this.core.el, 'onBeforeSlide.lgtm', function () {\n scale = 1;\n _this.resetZoom();\n });\n\n // Drag option after zoom\n if (!_this.core.isTouch) {\n _this.zoomDrag();\n }\n\n if (_this.core.isTouch) {\n _this.zoomSwipe();\n }\n };\n\n Zoom.prototype.getModifier = function (rotateValue, axis, el) {\n var originalRotate = rotateValue;\n rotateValue = Math.abs(rotateValue);\n var transformValues = this.getCurrentTransform(el);\n if (!transformValues) {\n return 1;\n }\n var modifier = 1;\n if (axis === 'X') {\n var flipHorizontalValue = Math.sign(parseFloat(transformValues[0]));\n if (rotateValue === 0 || rotateValue === 180) {\n modifier = 1;\n } else if (rotateValue === 90) {\n if (originalRotate === -90 && flipHorizontalValue === 1 || originalRotate === 90 && flipHorizontalValue === -1) {\n modifier = -1;\n } else {\n modifier = 1;\n }\n }\n modifier = modifier * flipHorizontalValue;\n } else {\n var flipVerticalValue = Math.sign(parseFloat(transformValues[3]));\n if (rotateValue === 0 || rotateValue === 180) {\n modifier = 1;\n } else if (rotateValue === 90) {\n var sinX = parseFloat(transformValues[1]);\n var sinMinusX = parseFloat(transformValues[2]);\n modifier = Math.sign(sinX * sinMinusX * originalRotate * flipVerticalValue);\n }\n modifier = modifier * flipVerticalValue;\n }\n return modifier;\n };\n\n Zoom.prototype.getImageSize = function ($image, rotateValue, axis) {\n var imageSizes = {\n y: 'offsetHeight',\n x: 'offsetWidth'\n };\n if (rotateValue === 90) {\n // Swap axis \n if (axis === 'x') {\n axis = 'y';\n } else {\n axis = 'x';\n }\n }\n return $image[imageSizes[axis]];\n };\n\n Zoom.prototype.getDragCords = function (e, rotateValue) {\n if (rotateValue === 90) {\n return {\n x: e.pageY,\n y: e.pageX\n };\n } else {\n return {\n x: e.pageX,\n y: e.pageY\n };\n }\n };\n Zoom.prototype.getSwipeCords = function (e, rotateValue) {\n var x = e.targetTouches[0].pageX;\n var y = e.targetTouches[0].pageY;\n if (rotateValue === 90) {\n return {\n x: y,\n y: x\n };\n } else {\n return {\n x: x,\n y: y\n };\n }\n };\n\n Zoom.prototype.getPossibleDragCords = function ($image, rotateValue) {\n\n var minY = (this.core.outer.querySelector('.lg').clientHeight - this.getImageSize($image, rotateValue, 'y')) / 2;\n var maxY = Math.abs(this.getImageSize($image, rotateValue, 'y') * Math.abs($image.getAttribute('data-scale')) - this.core.outer.querySelector('.lg').clientHeight + minY);\n var minX = (this.core.outer.querySelector('.lg').clientWidth - this.getImageSize($image, rotateValue, 'x')) / 2;\n var maxX = Math.abs(this.getImageSize($image, rotateValue, 'x') * Math.abs($image.getAttribute('data-scale')) - this.core.outer.querySelector('.lg').clientWidth + minX);\n if (rotateValue === 90) {\n return {\n minY: minX,\n maxY: maxX,\n minX: minY,\n maxX: maxY\n };\n } else {\n return {\n minY: minY,\n maxY: maxY,\n minX: minX,\n maxX: maxX\n };\n }\n };\n\n Zoom.prototype.getDragAllowedAxises = function ($image, rotateValue) {\n var allowY = this.getImageSize($image, rotateValue, 'y') * $image.getAttribute('data-scale') > this.core.outer.querySelector('.lg').clientHeight;\n var allowX = this.getImageSize($image, rotateValue, 'x') * $image.getAttribute('data-scale') > this.core.outer.querySelector('.lg').clientWidth;\n if (rotateValue === 90) {\n return {\n allowX: allowY,\n allowY: allowX\n };\n } else {\n return {\n allowX: allowX,\n allowY: allowY\n };\n }\n };\n\n /**\n * \n * @param {Element} el \n * @return matrix(cos(X), sin(X), -sin(X), cos(X), 0, 0);\n * Get the current transform value\n */\n Zoom.prototype.getCurrentTransform = function (el) {\n if (!el) {\n return 0;\n }\n var st = window.getComputedStyle(el, null);\n var tm = st.getPropertyValue('-webkit-transform') || st.getPropertyValue('-moz-transform') || st.getPropertyValue('-ms-transform') || st.getPropertyValue('-o-transform') || st.getPropertyValue('transform') || 'none';\n if (tm !== 'none') {\n return tm.split('(')[1].split(')')[0].split(',');\n }\n return 0;\n };\n\n Zoom.prototype.getCurrentRotation = function (el) {\n if (!el) {\n return 0;\n }\n var values = this.getCurrentTransform(el);\n if (values) {\n return Math.round(Math.atan2(values[1], values[0]) * (180 / Math.PI));\n // If you want rotate in 360\n //return (angle < 0 ? angle + 360 : angle);\n }\n return 0;\n };\n\n // Reset zoom effect\n Zoom.prototype.resetZoom = function () {\n utils.removeClass(this.core.outer, 'lg-zoomed');\n for (var i = 0; i < this.core.___slide.length; i++) {\n if (this.core.___slide[i].querySelector('.lg-img-wrap')) {\n this.core.___slide[i].querySelector('.lg-img-wrap').removeAttribute('style');\n this.core.___slide[i].querySelector('.lg-img-wrap').removeAttribute('data-x');\n this.core.___slide[i].querySelector('.lg-img-wrap').removeAttribute('data-y');\n }\n }\n\n for (var j = 0; j < this.core.___slide.length; j++) {\n if (this.core.___slide[j].querySelector('.lg-image')) {\n this.core.___slide[j].querySelector('.lg-image').removeAttribute('style');\n this.core.___slide[j].querySelector('.lg-image').removeAttribute('data-scale');\n }\n }\n\n // Reset pagx pagy values to center\n this.pageX = window.innerWidth / 2;\n this.pageY = window.innerHeight / 2 + (document.documentElement.scrollTop || document.body.scrollTop);\n };\n\n Zoom.prototype.zoomSwipe = function () {\n var _this = this;\n var startCoords = {};\n var endCoords = {};\n var isMoved = false;\n\n // Allow x direction drag\n var allowX = false;\n\n // Allow Y direction drag\n var allowY = false;\n\n var rotateValue = 0;\n var rotateEl;\n\n for (var i = 0; i < _this.core.___slide.length; i++) {\n\n /*jshint loopfunc: true */\n utils.on(_this.core.___slide[i], 'touchstart.lg', function (e) {\n\n if (utils.hasClass(_this.core.outer, 'lg-zoomed')) {\n var $image = _this.core.___slide[_this.core.index].querySelector('.lg-object');\n\n rotateEl = _this.core.___slide[_this.core.index].querySelector('.lg-img-rotate');\n rotateValue = _this.getCurrentRotation(rotateEl);\n\n var dragAllowedAxises = _this.getDragAllowedAxises($image, Math.abs(rotateValue));\n allowY = dragAllowedAxises.allowY;\n allowX = dragAllowedAxises.allowX;\n\n if (allowX || allowY) {\n e.preventDefault();\n startCoords = _this.getSwipeCords(e, Math.abs(rotateValue));\n }\n }\n });\n }\n\n for (var j = 0; j < _this.core.___slide.length; j++) {\n\n /*jshint loopfunc: true */\n utils.on(_this.core.___slide[j], 'touchmove.lg', function (e) {\n\n if (utils.hasClass(_this.core.outer, 'lg-zoomed')) {\n\n var _el = _this.core.___slide[_this.core.index].querySelector('.lg-img-wrap');\n var distanceX;\n var distanceY;\n\n e.preventDefault();\n isMoved = true;\n\n endCoords = _this.getSwipeCords(e, Math.abs(rotateValue));\n\n // reset opacity and transition duration\n utils.addClass(_this.core.outer, 'lg-zoom-dragging');\n\n if (allowY) {\n distanceY = -Math.abs(_el.getAttribute('data-y')) + (endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl);\n } else {\n distanceY = -Math.abs(_el.getAttribute('data-y'));\n }\n\n if (allowX) {\n distanceX = -Math.abs(_el.getAttribute('data-x')) + (endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl);\n } else {\n distanceX = -Math.abs(_el.getAttribute('data-x'));\n }\n\n if (Math.abs(endCoords.x - startCoords.x) > 15 || Math.abs(endCoords.y - startCoords.y) > 15) {\n\n if (_this.core.s.useLeftForZoom) {\n _el.style.left = distanceX + 'px';\n _el.style.top = distanceY + 'px';\n } else {\n utils.setVendor(_el, 'Transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');\n }\n }\n }\n });\n }\n\n for (var k = 0; k < _this.core.___slide.length; k++) {\n\n /*jshint loopfunc: true */\n utils.on(_this.core.___slide[k], 'touchend.lg', function () {\n if (utils.hasClass(_this.core.outer, 'lg-zoomed')) {\n if (isMoved) {\n isMoved = false;\n utils.removeClass(_this.core.outer, 'lg-zoom-dragging');\n _this.touchendZoom(startCoords, endCoords, allowX, allowY, rotateValue);\n }\n }\n });\n }\n };\n\n Zoom.prototype.zoomDrag = function () {\n\n var _this = this;\n var startCoords = {};\n var endCoords = {};\n var isDraging = false;\n var isMoved = false;\n\n // Allow x direction drag\n var allowX = false;\n\n // Allow Y direction drag\n var allowY = false;\n\n var rotateValue = 0;\n var rotateEl;\n\n for (var i = 0; i < _this.core.___slide.length; i++) {\n\n /*jshint loopfunc: true */\n utils.on(_this.core.___slide[i], 'mousedown.lgzoom', function (e) {\n\n // execute only on .lg-object\n var $image = _this.core.___slide[_this.core.index].querySelector('.lg-object');\n\n rotateEl = _this.core.___slide[_this.core.index].querySelector('.lg-img-rotate');\n rotateValue = _this.getCurrentRotation(rotateEl);\n\n var dragAllowedAxises = _this.getDragAllowedAxises($image, Math.abs(rotateValue));\n allowY = dragAllowedAxises.allowY;\n allowX = dragAllowedAxises.allowX;\n\n if (utils.hasClass(_this.core.outer, 'lg-zoomed')) {\n if (utils.hasClass(e.target, 'lg-object') && (allowX || allowY)) {\n e.preventDefault();\n startCoords = _this.getDragCords(e, Math.abs(rotateValue));\n\n isDraging = true;\n\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\n _this.core.outer.scrollLeft += 1;\n _this.core.outer.scrollLeft -= 1;\n\n utils.removeClass(_this.core.outer, 'lg-grab');\n utils.addClass(_this.core.outer, 'lg-grabbing');\n }\n }\n });\n }\n\n utils.on(window, 'mousemove.lgzoom', function (e) {\n if (isDraging) {\n var _el = _this.core.___slide[_this.core.index].querySelector('.lg-img-wrap');\n var distanceX;\n var distanceY;\n\n isMoved = true;\n endCoords = _this.getDragCords(e, Math.abs(rotateValue));\n\n // reset opacity and transition duration\n utils.addClass(_this.core.outer, 'lg-zoom-dragging');\n\n if (allowY) {\n distanceY = -Math.abs(_el.getAttribute('data-y')) + (endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl);\n } else {\n distanceY = -Math.abs(_el.getAttribute('data-y'));\n }\n\n if (allowX) {\n distanceX = -Math.abs(_el.getAttribute('data-x')) + (endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl);\n } else {\n distanceX = -Math.abs(_el.getAttribute('data-x'));\n }\n\n if (_this.core.s.useLeftForZoom) {\n _el.style.left = distanceX + 'px';\n _el.style.top = distanceY + 'px';\n } else {\n utils.setVendor(_el, 'Transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');\n }\n }\n });\n\n utils.on(window, 'mouseup.lgzoom', function (e) {\n\n if (isDraging) {\n isDraging = false;\n utils.removeClass(_this.core.outer, 'lg-zoom-dragging');\n\n // Fix for chrome mouse move on click\n if (isMoved && (startCoords.x !== endCoords.x || startCoords.y !== endCoords.y)) {\n endCoords = _this.getDragCords(e, Math.abs(rotateValue));\n _this.touchendZoom(startCoords, endCoords, allowX, allowY, rotateValue);\n }\n\n isMoved = false;\n }\n\n utils.removeClass(_this.core.outer, 'lg-grabbing');\n utils.addClass(_this.core.outer, 'lg-grab');\n });\n };\n\n Zoom.prototype.touchendZoom = function (startCoords, endCoords, allowX, allowY, rotateValue) {\n\n var _this = this;\n var _el = _this.core.___slide[_this.core.index].querySelector('.lg-img-wrap');\n var image = _this.core.___slide[_this.core.index].querySelector('.lg-object');\n var rotateEl = _this.core.___slide[_this.core.index].querySelector('.lg-img-rotate');\n var distanceX = -Math.abs(_el.getAttribute('data-x')) + (endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl);\n var distanceY = -Math.abs(_el.getAttribute('data-y')) + (endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl);\n var possibleDragCords = _this.getPossibleDragCords(image, Math.abs(rotateValue));\n\n if (Math.abs(endCoords.x - startCoords.x) > 15 || Math.abs(endCoords.y - startCoords.y) > 15) {\n if (allowY) {\n if (distanceY <= -possibleDragCords.maxY) {\n distanceY = -possibleDragCords.maxY;\n } else if (distanceY >= -possibleDragCords.minY) {\n distanceY = -possibleDragCords.minY;\n }\n }\n\n if (allowX) {\n if (distanceX <= -possibleDragCords.maxX) {\n distanceX = -possibleDragCords.maxX;\n } else if (distanceX >= -possibleDragCords.minX) {\n distanceX = -possibleDragCords.minX;\n }\n }\n\n if (allowY) {\n _el.setAttribute('data-y', Math.abs(distanceY));\n } else {\n distanceY = -Math.abs(_el.getAttribute('data-y'));\n }\n\n if (allowX) {\n _el.setAttribute('data-x', Math.abs(distanceX));\n } else {\n distanceX = -Math.abs(_el.getAttribute('data-x'));\n }\n\n if (_this.core.s.useLeftForZoom) {\n _el.style.left = distanceX + 'px';\n _el.style.top = distanceY + 'px';\n } else {\n utils.setVendor(_el, 'Transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');\n }\n }\n };\n\n Zoom.prototype.destroy = function () {\n\n var _this = this;\n\n // Unbind all events added by lightGallery zoom plugin\n utils.off(_this.core.el, '.lgzoom');\n utils.off(window, '.lgzoom');\n for (var i = 0; i < _this.core.___slide.length; i++) {\n utils.off(_this.core.___slide[i], '.lgzoom');\n }\n\n utils.off(_this.core.el, '.lgtmzoom');\n _this.resetZoom();\n clearTimeout(_this.zoomabletimeout);\n _this.zoomabletimeout = false;\n };\n\n window.lgModules.zoom = Zoom;\n});\n\n},{}]},{},[1])(1)\n});\n"],"names":["__extends","this","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","__createBinding","o","m","k","k2","undefined","defineProperty","enumerable","get","__setModuleDefault","v","value","__importStar","mod","__esModule","result","__importDefault","exports","parseFeed","FeedHandler","FeedItemMediaMedium","FeedItemMediaExpression","domhandler_1","DomUtils","Parser_1","_super","callback","options","_this","onend","_a","_b","feedRoot","getOneElement","isValidFeed","dom","feed","name","childs","children","type","addConditionally","href","getAttribute","link","updated","fetch","Date","items","getElements","map","item","entry","description","pubDate","media","getMediaElements","substr","id","handleCallback","Error","default","where","elem","medium","attribs","isDefault","url","fileSize","parseInt","expression","bitrate","framerate","samplingrate","channels","duration","height","width","lang","tagName","getElementsByTagName","node","recurse","getText","trim","obj","prop","what","tmp","xmlMode","handler","Parser","end","Tokenizer_1","formTags","Set","pTag","openImpliesClose","tr","th","td","body","li","h1","h2","h3","h4","h5","h6","select","input","output","button","datalist","textarea","option","optgroup","dd","dt","address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","header","hr","main","nav","ol","pre","section","table","ul","rt","rp","tbody","tfoot","voidElements","foreignContextElements","htmlIntegrationElements","reNameEnd","cbs","_c","_d","_e","startIndex","endIndex","tagname","attribname","attribvalue","stack","foreignContext","lowerCaseTagNames","lowerCaseTags","lowerCaseAttributeNames","tokenizer","Tokenizer","onparserinit","updatePosition","initialOffset","sectionStart","getAbsoluteIndex","ontext","data","onopentagname","toLowerCase","el","length","has","onclosetag","push","onopentag","onopentagend","pop","closeCurrentTag","pos","lastIndexOf","onselfclosingtag","recognizeSelfClosing","onattribname","onattribdata","onattribend","quote","onattribute","getInstructionName","idx","search","ondeclaration","onprocessinginstruction","name_1","name_2","oncomment","oncommentend","oncdata","_f","recognizeCDATA","oncdatastart","oncdataend","onerror","err","i","reset","onreset","parseComplete","write","chunk","pause","resume","parseChunk","done","decode_codepoint_1","entities_json_1","legacy_json_1","xml_json_1","whitespace","c","isASCIIAlpha","ifElseState","upper","SUCCESS","FAILURE","lower","t","_state","_index","consumeSpecialNameChar","NEXT_STATE","stateBeforeCdata1","stateBeforeCdata2","stateBeforeCdata3","stateBeforeCdata4","stateBeforeCdata5","stateBeforeScript1","stateBeforeScript2","stateBeforeScript3","stateBeforeScript4","stateAfterScript1","stateAfterScript2","stateAfterScript3","stateAfterScript4","stateBeforeStyle1","stateBeforeStyle2","stateBeforeStyle3","stateAfterStyle1","stateAfterStyle2","stateAfterStyle3","stateBeforeSpecialT","stateBeforeTitle1","stateBeforeTitle2","stateBeforeTitle3","stateAfterSpecialTEnd","stateAfterTitle1","stateAfterTitle2","stateAfterTitle3","stateBeforeEntity","stateBeforeNumericEntity","buffer","bufferOffset","baseState","special","running","ended","decodeEntities","parse","finish","stateText","getSection","isTagStartChar","stateBeforeTagName","stateInTagName","emitToken","stateBeforeClosingTagName","stateInClosingTagName","stateAfterClosingTagName","stateBeforeAttributeName","stateInSelfClosingTag","stateInAttributeName","stateAfterAttributeName","stateBeforeAttributeValue","handleInAttributeValue","stateInAttributeValueDoubleQuotes","stateInAttributeValueSingleQuotes","stateInAttributeValueNoQuotes","stateBeforeDeclaration","stateInDeclaration","stateInProcessingInstruction","stateBeforeComment","stateInComment","stateInSpecialComment","substring","stateAfterComment1","stateAfterComment2","stateBeforeCdata6","stateInCdata","stateAfterCdata1","stateAfterCdata2","stateBeforeSpecialS","stateBeforeSpecialSEnd","stateBeforeSpecialLast","stateAfterSpecialLast","sectionStartOffset","parseFixedEntity","entity","emitPartial","parseLegacyEntity","start","limit","Math","min","stateInNamedEntity","decodeNumericEntity","offset","base","strict","parsed","stateInNumericEntity","stateInHexEntity","cleanup","charAt","handleTrailingData","__exportStar","RssHandler","DefaultHandler","ElementType","createDomStream","parseDOM","parseDocument","DomHandler","root","cb","elementCb","FeedHandler_1","decode_json_1","fromCodePoint","codePoint","fromCharCode","decodeCodePoint","isObject","toString","isPlainObject","ctor","prot","f","module","define","r","e","n","u","a","code","require","global","factory","amd","lgZoom","_extends","assign","target","arguments","source","key","getUseLeft","useLeft","isChrome","navigator","userAgent","match","zoomDefaults","scale","zoom","actualSize","enableZoomAfter","useLeftForZoom","Zoom","element","core","window","lgData","s","doCss","init","zoomabletimeout","pageX","innerWidth","pageY","innerHeight","document","documentElement","scrollTop","zoomIcons","utils","addClass","outer","querySelector","insertAdjacentHTML","on","event","_speed","detail","delay","hasClass","removeClass","setTimeout","___slide","index","scaleVal","_x","_y","image","offsetX","clientWidth","offsetY","clientHeight","x","y","setVendor","setAttribute","parentElement","style","left","top","callScale","resetZoom","fromIcon","nw","_scale","w","dynamic","dynamicEl","naturalWidth","targetTouches","tapped","isTouch","clearTimeout","preventDefault","getElementById","zoomDrag","zoomSwipe","getModifier","rotateValue","axis","originalRotate","abs","transformValues","getCurrentTransform","modifier","flipHorizontalValue","sign","parseFloat","flipVerticalValue","sinX","sinMinusX","getImageSize","$image","imageSizes","getDragCords","getSwipeCords","getPossibleDragCords","minY","maxY","minX","maxX","getDragAllowedAxises","allowY","allowX","st","getComputedStyle","tm","getPropertyValue","split","getCurrentRotation","values","round","atan2","PI","removeAttribute","j","rotateEl","startCoords","endCoords","isMoved","dragAllowedAxises","distanceX","distanceY","_el","touchendZoom","isDraging","scrollLeft","possibleDragCords","destroy","off","lgModules"],"sourceRoot":""}