UNPKG

videojs-contextmenu-pt

Version:

A cross-device context menu UI for video.js players.

2,593 lines (2,538 loc) 66.6 kB
/*! @name videojs-contextmenu-pt @version 5.4.1 @license Apache-2.0 */ (function (QUnit,sinon,videojs) { 'use strict'; QUnit = QUnit && QUnit.hasOwnProperty('default') ? QUnit['default'] : QUnit; sinon = sinon && sinon.hasOwnProperty('default') ? sinon['default'] : sinon; videojs = videojs && videojs.hasOwnProperty('default') ? videojs['default'] : videojs; var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; var minDoc = {}; var topLevel = typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof window !== 'undefined' ? window : {}; var doccy; if (typeof document !== 'undefined') { doccy = document; } else { doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4']; if (!doccy) { doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc; } } var document_1 = doccy; function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } var win; if (typeof window !== "undefined") { win = window; } else if (typeof commonjsGlobal !== "undefined") { win = commonjsGlobal; } else if (typeof self !== "undefined"){ win = self; } else { win = {}; } var window_1 = win; var cov_14bn5jyli0 = function () { var path = '/home/rigelk/code/videojs-contextmenu-pt/src/context-menu-item.js', hash = '58f58b486b53c645004b724d9f205cd49dd8c75b', Function = function () {}.constructor, global = new Function('return this')(), gcv = '__coverage__', coverageData = { path: '/home/rigelk/code/videojs-contextmenu-pt/src/context-menu-item.js', statementMap: { '0': { start: { line: 4, column: 17 }, end: { line: 4, column: 49 } }, '1': { start: { line: 9, column: 4 }, end: { line: 9, column: 24 } }, '2': { start: { line: 10, column: 4 }, end: { line: 10, column: 29 } }, '3': { start: { line: 13, column: 4 }, end: { line: 15, column: 10 } }, '4': { start: { line: 14, column: 6 }, end: { line: 14, column: 49 } } }, fnMap: { '0': { name: '(anonymous_0)', decl: { start: { line: 8, column: 2 }, end: { line: 8, column: 3 } }, loc: { start: { line: 8, column: 17 }, end: { line: 16, column: 3 } }, line: 8 }, '1': { name: '(anonymous_1)', decl: { start: { line: 13, column: 22 }, end: { line: 13, column: 23 } }, loc: { start: { line: 13, column: 28 }, end: { line: 15, column: 5 } }, line: 13 } }, branchMap: {}, s: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0 }, f: { '0': 0, '1': 0 }, b: {}, _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c' }, coverage = global[gcv] || (global[gcv] = {}); if (coverage[path] && coverage[path].hash === hash) { return coverage[path]; } coverageData.hash = hash; return coverage[path] = coverageData; }(); var MenuItem = (cov_14bn5jyli0.s[0]++, videojs.getComponent('MenuItem')); var ContextMenuItem = /*#__PURE__*/ function (_MenuItem) { _inheritsLoose(ContextMenuItem, _MenuItem); function ContextMenuItem() { return _MenuItem.apply(this, arguments) || this; } var _proto = ContextMenuItem.prototype; _proto.handleClick = function handleClick(e) { var _this = this; cov_14bn5jyli0.f[0]++; cov_14bn5jyli0.s[1]++; _MenuItem.prototype.handleClick.call(this); cov_14bn5jyli0.s[2]++; this.options_.listener(); cov_14bn5jyli0.s[3]++; window_1.setTimeout(function () { cov_14bn5jyli0.f[1]++; cov_14bn5jyli0.s[4]++; _this.player().contextmenuUI.menu.dispose(); }, 1); }; return ContextMenuItem; }(MenuItem); var cov_pycmby1i0 = function () { var path = '/home/rigelk/code/videojs-contextmenu-pt/src/context-menu.js', hash = '2b5799c1851f60a511627d33fa7e22aaf0430e91', Function = function () {}.constructor, global = new Function('return this')(), gcv = '__coverage__', coverageData = { path: '/home/rigelk/code/videojs-contextmenu-pt/src/context-menu.js', statementMap: { '0': { start: { line: 5, column: 13 }, end: { line: 5, column: 41 } }, '1': { start: { line: 7, column: 12 }, end: { line: 7, column: 34 } }, '2': { start: { line: 12, column: 4 }, end: { line: 12, column: 27 } }, '3': { start: { line: 16, column: 4 }, end: { line: 16, column: 52 } }, '4': { start: { line: 18, column: 4 }, end: { line: 31, column: 7 } }, '5': { start: { line: 19, column: 15 }, end: { line: 19, column: 28 } }, '6': { start: { line: 21, column: 6 }, end: { line: 25, column: 7 } }, '7': { start: { line: 22, column: 8 }, end: { line: 22, column: 24 } }, '8': { start: { line: 23, column: 13 }, end: { line: 25, column: 7 } }, '9': { start: { line: 24, column: 8 }, end: { line: 24, column: 39 } }, '10': { start: { line: 24, column: 19 }, end: { line: 24, column: 38 } }, '11': { start: { line: 27, column: 6 }, end: { line: 30, column: 10 } }, '12': { start: { line: 35, column: 15 }, end: { line: 35, column: 31 } }, '13': { start: { line: 37, column: 4 }, end: { line: 37, column: 48 } }, '14': { start: { line: 38, column: 4 }, end: { line: 38, column: 55 } }, '15': { start: { line: 39, column: 4 }, end: { line: 39, column: 53 } }, '16': { start: { line: 41, column: 4 }, end: { line: 41, column: 14 } } }, fnMap: { '0': { name: '(anonymous_0)', decl: { start: { line: 11, column: 2 }, end: { line: 11, column: 3 } }, loc: { start: { line: 11, column: 31 }, end: { line: 32, column: 3 } }, line: 11 }, '1': { name: '(anonymous_1)', decl: { start: { line: 18, column: 28 }, end: { line: 18, column: 29 } }, loc: { start: { line: 18, column: 33 }, end: { line: 31, column: 5 } }, line: 18 }, '2': { name: '(anonymous_2)', decl: { start: { line: 19, column: 15 }, end: { line: 19, column: 16 } }, loc: { start: { line: 19, column: 26 }, end: { line: 19, column: 28 } }, line: 19 }, '3': { name: '(anonymous_3)', decl: { start: { line: 24, column: 13 }, end: { line: 24, column: 14 } }, loc: { start: { line: 24, column: 19 }, end: { line: 24, column: 38 } }, line: 24 }, '4': { name: '(anonymous_4)', decl: { start: { line: 34, column: 2 }, end: { line: 34, column: 3 } }, loc: { start: { line: 34, column: 13 }, end: { line: 42, column: 3 } }, line: 34 } }, branchMap: { '0': { loc: { start: { line: 7, column: 12 }, end: { line: 7, column: 34 } }, type: 'binary-expr', locations: [{ start: { line: 7, column: 12 }, end: { line: 7, column: 23 } }, { start: { line: 7, column: 27 }, end: { line: 7, column: 34 } }], line: 7 }, '1': { loc: { start: { line: 21, column: 6 }, end: { line: 25, column: 7 } }, type: 'if', locations: [{ start: { line: 21, column: 6 }, end: { line: 25, column: 7 } }, { start: { line: 21, column: 6 }, end: { line: 25, column: 7 } }], line: 21 }, '2': { loc: { start: { line: 23, column: 13 }, end: { line: 25, column: 7 } }, type: 'if', locations: [{ start: { line: 23, column: 13 }, end: { line: 25, column: 7 } }, { start: { line: 23, column: 13 }, end: { line: 25, column: 7 } }], line: 23 } }, s: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 0, '9': 0, '10': 0, '11': 0, '12': 0, '13': 0, '14': 0, '15': 0, '16': 0 }, f: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0 }, b: { '0': [0, 0], '1': [0, 0], '2': [0, 0] }, _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c' }, coverage = global[gcv] || (global[gcv] = {}); if (coverage[path] && coverage[path].hash === hash) { return coverage[path]; } coverageData.hash = hash; return coverage[path] = coverageData; }(); var Menu = (cov_pycmby1i0.s[0]++, videojs.getComponent('Menu')); var dom = (cov_pycmby1i0.s[1]++, (cov_pycmby1i0.b[0][0]++, videojs.dom) || (cov_pycmby1i0.b[0][1]++, videojs)); var ContextMenu = /*#__PURE__*/ function (_Menu) { _inheritsLoose(ContextMenu, _Menu); function ContextMenu(player, options) { var _this; cov_pycmby1i0.f[0]++; cov_pycmby1i0.s[2]++; _this = _Menu.call(this, player, options) || this; cov_pycmby1i0.s[3]++; _this.dispose = videojs.bind(_assertThisInitialized(_this), _this.dispose); cov_pycmby1i0.s[4]++; options.content.forEach(function (c) { cov_pycmby1i0.f[1]++; cov_pycmby1i0.s[5]++; var fn = function fn() { cov_pycmby1i0.f[2]++; }; cov_pycmby1i0.s[6]++; if (typeof c.listener === 'function') { cov_pycmby1i0.b[1][0]++; cov_pycmby1i0.s[7]++; fn = c.listener; } else { cov_pycmby1i0.b[1][1]++; cov_pycmby1i0.s[8]++; if (typeof c.href === 'string') { cov_pycmby1i0.b[2][0]++; cov_pycmby1i0.s[9]++; fn = function fn() { cov_pycmby1i0.f[3]++; cov_pycmby1i0.s[10]++; return window_1.open(c.href); }; } else { cov_pycmby1i0.b[2][1]++; } } cov_pycmby1i0.s[11]++; _this.addItem(new ContextMenuItem(player, { label: c.label, listener: videojs.bind(player, fn) })); }); return _this; } var _proto = ContextMenu.prototype; _proto.createEl = function createEl() { cov_pycmby1i0.f[4]++; var el = (cov_pycmby1i0.s[12]++, _Menu.prototype.createEl.call(this)); cov_pycmby1i0.s[13]++; dom.addClass(el, 'vjs-contextmenu-ui-menu'); cov_pycmby1i0.s[14]++; el.style.left = this.options_.position.left + 'px'; cov_pycmby1i0.s[15]++; el.style.top = this.options_.position.top + 'px'; cov_pycmby1i0.s[16]++; return el; }; return ContextMenu; }(Menu); var cov_xsl29i8xr = function () { var path = '/home/rigelk/code/videojs-contextmenu-pt/src/util.js', hash = '6e8b124259337e3140031fb9653a9af5b70ceffe', Function = function () {}.constructor, global = new Function('return this')(), gcv = '__coverage__', coverageData = { path: '/home/rigelk/code/videojs-contextmenu-pt/src/util.js', statementMap: { '0': { start: { line: 18, column: 2 }, end: { line: 20, column: 3 } }, '1': { start: { line: 19, column: 4 }, end: { line: 19, column: 37 } }, '2': { start: { line: 22, column: 2 }, end: { line: 27, column: 3 } }, '3': { start: { line: 23, column: 4 }, end: { line: 26, column: 6 } }, '4': { start: { line: 29, column: 16 }, end: { line: 29, column: 40 } }, '5': { start: { line: 30, column: 15 }, end: { line: 30, column: 28 } }, '6': { start: { line: 32, column: 21 }, end: { line: 32, column: 61 } }, '7': { start: { line: 33, column: 21 }, end: { line: 33, column: 58 } }, '8': { start: { line: 34, column: 15 }, end: { line: 34, column: 49 } }, '9': { start: { line: 36, column: 20 }, end: { line: 36, column: 58 } }, '10': { start: { line: 37, column: 20 }, end: { line: 37, column: 56 } }, '11': { start: { line: 38, column: 14 }, end: { line: 38, column: 45 } }, '12': { start: { line: 41, column: 2 }, end: { line: 44, column: 4 } }, '13': { start: { line: 60, column: 19 }, end: { line: 60, column: 21 } }, '14': { start: { line: 61, column: 14 }, end: { line: 61, column: 32 } }, '15': { start: { line: 62, column: 15 }, end: { line: 62, column: 29 } }, '16': { start: { line: 63, column: 15 }, end: { line: 63, column: 30 } }, '17': { start: { line: 64, column: 15 }, end: { line: 64, column: 22 } }, '18': { start: { line: 65, column: 15 }, end: { line: 65, column: 23 } }, '19': { start: { line: 66, column: 14 }, end: { line: 66, column: 25 } }, '20': { start: { line: 67, column: 14 }, end: { line: 67, column: 25 } }, '21': { start: { line: 69, column: 2 }, end: { line: 72, column: 3 } }, '22': { start: { line: 70, column: 4 }, end: { line: 70, column: 42 } }, '23': { start: { line: 71, column: 4 }, end: { line: 71, column: 42 } }, '24': { start: { line: 74, column: 2 }, end: { line: 74, column: 72 } }, '25': { start: { line: 75, column: 2 }, end: { line: 75, column: 63 } }, '26': { start: { line: 77, column: 2 }, end: { line: 77, column: 18 } }, '27': { start: { line: 81, column: 2 }, end: { line: 81, column: 86 } } }, fnMap: { '0': { name: 'findElPosition', decl: { start: { line: 15, column: 16 }, end: { line: 15, column: 30 } }, loc: { start: { line: 15, column: 35 }, end: { line: 45, column: 1 } }, line: 15 }, '1': { name: 'getPointerPosition', decl: { start: { line: 59, column: 16 }, end: { line: 59, column: 34 } }, loc: { start: { line: 59, column: 46 }, end: { line: 78, column: 1 } }, line: 59 }, '2': { name: 'isFunction', decl: { start: { line: 80, column: 16 }, end: { line: 80, column: 26 } }, loc: { start: { line: 80, column: 44 }, end: { line: 82, column: 1 } }, line: 80 } }, branchMap: { '0': { loc: { start: { line: 18, column: 2 }, end: { line: 20, column: 3 } }, type: 'if', locations: [{ start: { line: 18, column: 2 }, end: { line: 20, column: 3 } }, { start: { line: 18, column: 2 }, end: { line: 20, column: 3 } }], line: 18 }, '1': { loc: { start: { line: 18, column: 6 }, end: { line: 18, column: 47 } }, type: 'binary-expr', locations: [{ start: { line: 18, column: 6 }, end: { line: 18, column: 30 } }, { start: { line: 18, column: 34 }, end: { line: 18, column: 47 } }], line: 18 }, '2': { loc: { start: { line: 22, column: 2 }, end: { line: 27, column: 3 } }, type: 'if', locations: [{ start: { line: 22, column: 2 }, end: { line: 27, column: 3 } }, { start: { line: 22, column: 2 }, end: { line: 27, column: 3 } }], line: 22 }, '3': { loc: { start: { line: 32, column: 21 }, end: { line: 32, column: 61 } }, type: 'binary-expr', locations: [{ start: { line: 32, column: 21 }, end: { line: 32, column: 37 } }, { start: { line: 32, column: 41 }, end: { line: 32, column: 56 } }, { start: { line: 32, column: 60 }, end: { line: 32, column: 61 } }], line: 32 }, '4': { loc: { start: { line: 33, column: 21 }, end: { line: 33, column: 58 } }, type: 'binary-expr', locations: [{ start: { line: 33, column: 21 }, end: { line: 33, column: 39 } }, { start: { line: 33, column: 43 }, end: { line: 33, column: 58 } }], line: 33 }, '5': { loc: { start: { line: 36, column: 20 }, end: { line: 36, column: 58 } }, type: 'binary-expr', locations: [{ start: { line: 36, column: 20 }, end: { line: 36, column: 35 } }, { start: { line: 36, column: 39 }, end: { line: 36, column: 53 } }, { start: { line: 36, column: 57 }, end: { line: 36, column: 58 } }], line: 36 }, '6': { loc: { start: { line: 37, column: 20 }, end: { line: 37, column: 56 } }, type: 'binary-expr', locations: [{ start: { line: 37, column: 20 }, end: { line: 37, column: 38 } }, { start: { line: 37, column: 42 }, end: { line: 37, column: 56 } }], line: 37 }, '7': { loc: { start: { line: 69, column: 2 }, end: { line: 72, column: 3 } }, type: 'if', locations: [{ start: { line: 69, column: 2 }, end: { line: 72, column: 3 } }, { start: { line: 69, column: 2 }, end: { line: 72, column: 3 } }], line: 69 }, '8': { loc: { start: { line: 81, column: 9 }, end: { line: 81, column: 85 } }, type: 'binary-expr', locations: [{ start: { line: 81, column: 9 }, end: { line: 81, column: 24 } }, { start: { line: 81, column: 28 }, end: { line: 81, column: 85 } }], line: 81 } }, s: { '0': 0, '1': 0, '2': 0, '3': 0, '4': 0, '5': 0, '6': 0, '7': 0, '8': 0, '9': 0, '10': 0, '11': 0, '12': 0, '13': 0, '14': 0, '15': 0, '16': 0, '17': 0, '18': 0, '19': 0, '20': 0, '21': 0, '22': 0, '23': 0, '24': 0, '25': 0, '26': 0, '27': 0 }, f: { '0': 0, '1': 0, '2': 0 }, b: { '0': [0, 0], '1': [0, 0], '2': [0, 0], '3': [0, 0, 0], '4': [0, 0], '5': [0, 0, 0], '6': [0, 0], '7': [0, 0], '8': [0, 0] }, _coverageSchema: '332fd63041d2c1bcb487cc26dd0d5f7d97098a6c' }, coverage = global[gcv] || (global[gcv] = {}); if (coverage[path] && coverage[path].hash === hash) { return coverage[path]; } coverageData.hash = hash; return coverage[path] = coverageData; }(); function findElPosition(el) { cov_xsl29i8xr.f[0]++; var box; cov_xsl29i8xr.s[0]++; if ((cov_xsl29i8xr.b[1][0]++, el.getBoundingClientRect) && (cov_xsl29i8xr.b[1][1]++, el.parentNode)) { cov_xsl29i8xr.b[0][0]++; cov_xsl29i8xr.s[1]++; box = el.getBoundingClientRect(); } else { cov_xsl29i8xr.b[0][1]++; } cov_xsl29i8xr.s[2]++; if (!box) { cov_xsl29i8xr.b[2][0]++; cov_xsl29i8xr.s[3]++; return { left: 0, top: 0 }; } else { cov_xsl29i8xr.b[2][1]++; } var docEl = (cov_xsl29i8xr.s[4]++, document_1.documentElement); var body = (cov_xsl29i8xr.s[5]++, document_1.body); var clientLeft = (cov_xsl29i8xr.s[6]++, (cov_xsl29i8xr.b[3][0]++, docEl.clientLeft) || (cov_xsl29i8xr.b[3][1]++, body.clientLeft) || (cov_xsl29i8xr.b[3][2]++, 0)); var scrollLeft = (cov_xsl29i8xr.s[7]++, (cov_xsl29i8xr.b[4][0]++, window_1.pageXOffset) || (cov_xsl29i8xr.b[4][1]++, body.scrollLeft)); var left = (cov_xsl29i8xr.s[8]++, box.left + scrollLeft - clientLeft); var clientTop = (cov_xsl29i8xr.s[9]++, (cov_xsl29i8xr.b[5][0]++, docEl.clientTop) || (cov_xsl29i8xr.b[5][1]++, body.clientTop) || (cov_xsl29i8xr.b[5][2]++, 0)); var scrollTop = (cov_xsl29i8xr.s[10]++, (cov_xsl29i8xr.b[6][0]++, window_1.pageYOffset) || (cov_xsl29i8xr.b[6][1]++, body.scrollTop)); var top = (cov_xsl29i8xr.s[11]++, box.top + scrollTop - clientTop); cov_xsl29i8xr.s[12]++; return { left: Math.round(left), top: Math.round(top) }; } function getPointerPosition(el, event) { cov_xsl29i8xr.f[1]++; var position = (cov_xsl29i8xr.s[13]++, {}); var box = (cov_xsl29i8xr.s[14]++, findElPosition(el)); var boxW = (cov_xsl29i8xr.s[15]++, el.offsetWidth); var boxH = (cov_xsl29i8xr.s[16]++, el.offsetHeight); var boxY = (cov_xsl29i8xr.s[17]++, box.top); var boxX = (cov_xsl29i8xr.s[18]++, box.left); var pageY = (cov_xsl29i8xr.s[19]++, event.pageY); var pageX = (cov_xsl29i8xr.s[20]++, event.pageX); cov_xsl29i8xr.s[21]++; if (event.changedTouches) { cov_xsl29i8xr.b[7][0]++; cov_xsl29i8xr.s[22]++; pageX = event.changedTouches[0].pageX; cov_xsl29i8xr.s[23]++; pageY = event.changedTouches[0].pageY; } else { cov_xsl29i8xr.b[7][1]++; } cov_xsl29i8xr.s[24]++; position.y = Math.max(0, Math.min(1, (boxY - pageY + boxH) / boxH)); cov_xsl29i8xr.s[25]++; position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW)); cov_xsl29i8xr.s[26]++; return position; } function isFunction(functionToCheck) { cov_xsl29i8xr.f[2]++; cov_xsl29i8xr.s[27]++; return (cov_xsl29i8xr.b[8][0]++, functionToCheck) && (cov_xsl29i8xr.b[8][1]++, {}.toString.call(functionToCheck) === '[object Function]'); } var version = "5.4.1"; var cov_7knq6adkw = function () { var path = '/home/rigelk/code/videojs-contextmenu-pt/src/plugin.js', hash = '9ff4be93b50d38b5ace3d2901ede516451126c69', Function = function () {}.constructor, global = new Function('return this')(), gcv = '__coverage__', coverageData = { path: '/home/rigelk/code/videojs-contextmenu-pt/src/plugin.js', statementMap: { '0': { start: { line: 14, column: 2 }, end: { line: 16, column: 35 } }, '1': { start: { line: 26, column: 18 }, end: { line: 26, column: 48 } }, '2': { start: { line: 28, column: 2 }, end: { line: 28, column: 55 } }, '3': { start: { line: 40, column: 2 }, end: { line: 43, column: 4 } }, '4': { start: { line: 57, column: 2 }, end: { line: 60, column: 3 } }, '5': { start: { line: 58, column: 4 }, end: { line: 58, column: 38 } }, '6': { start: { line: 59, column: 4 }, end: { line: 59, column: 11 } }, '7': { start: { line: 62, column: 2 }, end: { line: 64, column: 3 } }, '8': { start: { line: 63, column: 4 }, end: { line: 63, column: 11 } }, '9': { start: { line: 68, column: 26 }, end: { line: 68, column: 58 } }, '10': { start: { line: 69, column: 21 }, end: { line: 69, column: 54 } }, '11': { start: { line: 70, column: 23 }, end: { line: 70, column: 68 } }, '12': { start: { line: 73, column: 21 }, end: { line: 73, column: 85 } }, '13': { start: { line: 75, column: 2 }, end: { line: 75, column: 21 } }, '14': { start: { line: 77, column: 15 }, end: { line: 80, column: 4 } }, '15': { start: { line: 84, column: 2 }, end: { line: 87, column: 4 } }, '16': { start: { line: 85, column: 4 }, end: { line: 85, column: 128 } }, '17': { start: { line: 86, column: 4 }, end: { line: 86, column: 19 } }, '18': { start: { line: 89, column: 2 }, end: { line: 93, column: 5 } }, '19': { start: { line: 90, column: 4 }, end: { line: 90, column: 60 } }, '20': { start: { line: 91, column: 4 }, end: { line: 91, column: 27 } }, '21': { start: { line: 92, column: 4 }, end: { line: 92, column: 35 } }, '22': { start: { line: 95, column: 2 }, end: { line: 95, column: 22 } }, '23': { start: { line: 97, column: 19 }, end: { line: 97, column: 51 } }, '24': { start: { line: 98, column: 19 }, end: { line: 98, column: 56 } }, '25': { start: { line: 100, column: 2 }, end: { line: 111, column: 3 } }, '26': { start: { line: 103, column: 4 }, end: { line: 106, column: 14 } }, '27': { start: { line: 107, column: 4 }, end: { line: 110, column: 14 } }, '28': { start: { line: 113, column: 2 }, end: { line: 113, column: 57 } }, '29': { start: { line: 129, column: 19 }, end: { line: 132, column: 3 } }, '30': { start: { line: 134, column: 2 }, end: { line: 134, column: 52 } }, '31': { start: { line: 136, column: 2 }, end: { line: 138, column: 3 } }, '32': { start: { line: 137, column: 4 }, end: { line: 137, column: 42 } }, '33': { start: { line: 141, column: 2 }, end: { line: 148, column: 3 } }, '34': { start: { line: 142, column: 4 }, end: { line: 142, column: 38 } }, '35': { start: { line: 143, column: 4 }, end: { line: 143, column: 62 } }, '36': { start: { line: 147, column: 4 }, end: { line: 147, column: 30 } }, '37': { start: { line: 153, column: 15 }, end: { line: 155, column: 3 } }, '38': { start: { line: 154, column: 4 }, end: { line: 154, column: 41 } }, '39': { start: { line: 157, column: 2 }, end: { line: 157, column: 57 } }, '40': { start: { line: 158, column: 2 }, end: { line: 158, column: 33 } }, '41': { start: { line: 159, column: 2 }, end: { line: 159, column: 39 } }, '42': { start: { line: 160, column: 2 }, end: { line: 160, column: 26 } }, '43': { start: { line: 161, column: 2 }, end: { line: 161, column: 25 } }, '44': { start: { line: 163, column: 2 }, end: { line: 163, column: 45 } }, '45': { start: { line: 164, column: 2 }, end: { line: 164, column: 56 } }, '46': { start: { line: 164, column: 19 }, end: { line: 164, column: 54 } }, '47': { start: { line: 167, column: 0 }, end: { line: 167, column: 55 } }, '48': { start: { line: 168, column: 0 }, end: { line: 168, column: 32 } } }, fnMap: { '0': { name: 'hasMenu', decl: { start: { line: 13, column: 9 }, end: { line: 13, column: 16 } }, loc: { start: { line: 13, column: 25 }, end: { line: 17, column: 1 } }, line: 13 }, '1': { name: 'excludeElements', decl: { start: { line: 25, column: 9 }, end: { line: 25, column: 24 } }, loc: { start: { line: 25, column: 35 }, end: { line: 29, column: 1 } }, line: 25 }, '2': { name: 'findMenuPosition', decl: { start: { line: 39, column: 9 }, end: { line: 39, column: 25 } }, loc: { start: { line: 39, column: 55 }, end: { line: 44, column: 1 } }, line: 39 }, '3': { name: 'onContextMenu', decl: { start: { line: 51, column: 9 }, end: { line: 51, column: 22 } }, loc: { start: { line: 51, column: 26 }, end: { line: 114, column: 1 } }, line: 51 }, '4': { name: '(anonymous_4)', decl: { start: { line: 84, column: 33 }, end: { line: 84, column: 34 } }, loc: { start: { line: 84, column: 39 }, end: { line: 87, column: 3 } }, line: 84 }, '5': { name: '(anonymous_5)', decl: { start: { line: 89, column: 21 }, end: { line: 89, column: 22 } }, loc: { start: { line: 89, column: 27 }, end: { line: 93, column: 3 } }, line: 89 }, '6': { name: 'contextmenuUI', decl: { start: { line: 128, column: 9 }, end: { line: 128, column: 22 } }, loc: { start: { line: 128, column: 32 }, end: { line: 165, column: 1 } }, line: 128 }, '7': { name: '(anonymous_7)', decl: { start: { line: 153, column: 36 }, end: { line: 153, column: 37 } }, loc: { start: { line: 153, column: 47 }, end: { line: 155, column: 3 } }, line: 153 }, '8': { name: '(anonymous_8)', decl: { start: { line: 164, column: 13 }, end: { line: 164, column: 14 } }, loc: { start: { line: 164, column: 19 }, end: { line: 164, column: 54 } }, line: 164 } }, branchMap: { '0': { loc: { start: { line: 14, column: 9 }, end: { line: 16, column: 34 } }, type: 'binary-expr', locations: [{ start: { line: 14, column: 9 }, end: { line: 14, column: 47 } }, { start: { line: 15, column: 4 }, end: { line: 15, column: 47 } }, { start: { line: 16, column: 4 }, end: { line: 16, column: 34 } }], line: 14 }, '1': { loc: { start: { line: 28, column: 9 }, end: { line: 28, column: 54 } }, type: 'binary-expr', locations: [{ start: { line: 28, column: 9 }, end: { line: 28, column: 28 } }, { start: { line: 28, column: 32 }, end: { line: 28, column: 54 } }], line: 28 }, '2': { loc: { start: { line: 57, column: 2 }, end: { line: 60, column: 3 } }, type: 'if', locations: [{ start: { line: 57, column: 2 }, end: { line: 60, column: 3 } }, { start: { line: 57, column: 2 }, end: { line: 60, column: 3 } }], line: 57 }, '3': { loc: { start: { line: 62, column: 2 }, end: { line: 64, column: 3 } }, type: 'if', locations: [{ start: { line: 62, column: 2 }, end: { line: 64, column: 3 } }, { start: { line: 62, column: 2 }, end: { line: 64, column: 3 } }], line: 62 }, '4': { loc: { start: { line: 73, column: 21 }, end: { line: 73, column: 85 } }, type: 'cond-expr', locations: [{ start: { line: 73, column: 50 }, end: { line: 73, column: 74 } }, { start: { line: 73, column: 77 }, end: { line: 73, column: 85 } }], line: 73 }, '5': { loc: { start: { line: 78, column: 13 }, end: { line: 78, column: 113 } }, type: 'binary-expr', locations: [{ start: { line: 78, column: 13 }, end: { line: 78, column: 51 } }, { start: { line: 78, column: 55 }, end: { line: 78, column: 83 } }, { start: { line: 78, column: 87 }, end: { line: 78, column: 113 } }], line: 78 }, '6': { loc: { start: { line: 100, column: 2 }, end: { line: 111, column: 3 } }, type: 'if', locations: [{ start: { line: 100, column: 2 }, end: { line: 111, column: 3 } }, { start: { line: 100, column: 2 }, end: { line: 111, column: 3 } }], line: 100 }, '7': { loc: { start: { line: 100, column: 6 }, end: { line: 102, column: 39 } }, type: 'binary-expr', locations: [{ start: { line: 100, column: 6 }, end: { line: 100, column: 35 } }, { start: { line: 101, column: 6 }, end: { line: 101, column: 37 } }, { start: { line: 102, column: 6 }, end: { line: 102, column: 39 } }], line: 100 }, '8': { loc: { start: { line: 136, column: 2 }, end: { line: 138, column: 3 } }, type: 'if', locations: [{ start: { line: 136, column: 2 }, end: {