Socket
Socket
Sign inDemoInstall

view-launcher

Package Overview
Dependencies
3
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.6 to 1.1.7

1

dist/ElementIndicator.d.ts

@@ -77,2 +77,3 @@ import { Editor } from './editorUrl';

update(): void;
setPopperEventListeners(enabled: boolean): void;
hide(): void;

@@ -79,0 +80,0 @@ show(): void;

37

dist/view-launcher.cjs.development.js

@@ -160,2 +160,5 @@ 'use strict';

}
}, {
name: 'eventListeners',
enabled: false
}]

@@ -181,6 +184,2 @@ });

element.addEventListener('mouseenter', function () {
if (_this.disabled) {
return;
}
var isComponent = !!element.tagInfo.component;

@@ -205,3 +204,3 @@

if (_this.disabled || !(relatedTarget instanceof Element)) {
if (!(relatedTarget instanceof Element)) {
return;

@@ -270,4 +269,4 @@ }

// update on window scroll and resize
window.addEventListener('scroll', this.update);
window.addEventListener('resize', this.update); // update on document mutation
window.addEventListener('scroll', this.update.bind(this));
window.addEventListener('resize', this.update.bind(this)); // update on document mutation

@@ -301,3 +300,2 @@ var targetNode = document.body;

this.element = element;
this.show();
this.update();

@@ -307,3 +305,5 @@ };

_proto.update = function update() {
if (!this.element || this.disabled) {
var element = this.element;
if (!element || this.disabled) {
return;

@@ -313,3 +313,3 @@ }

var indicatorStyle = this.indicator.style;
var rect = this.element.getBoundingClientRect();
var rect = element.getBoundingClientRect();
var windowHeight = document.documentElement.clientHeight;

@@ -322,3 +322,2 @@ var overflowWinBottom = rect.top + rect.height > windowHeight;

indicatorStyle.top = (rect.top > 0 ? rect.top : 0) + 'px';
var element = this.element;
var classes = Array.from(element.classList).join('.');

@@ -340,5 +339,13 @@ var tagName = element.tagName.toLowerCase();

this.popper.update();
this.show();
};
_proto.setPopperEventListeners = function setPopperEventListeners(enabled) {
this.popper.setOptions({
modifiers: [{
name: 'eventListeners',
enabled: enabled
}]
});
};
_proto.hide = function hide() {

@@ -358,3 +365,5 @@ [this.indicator, this.tooltip].forEach(function (elem) {

this._enabled = true;
document.body.classList.add('view-launcher-inspecting');
this.setPopperEventListeners(true);
this.update();
this.show();
};

@@ -365,4 +374,4 @@

this.element = undefined;
this.setPopperEventListeners(false);
this.hide();
document.body.classList.remove('view-launcher-inspecting');
};

@@ -369,0 +378,0 @@

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=(e=require("mousetrap"))&&"object"==typeof e&&"default"in e?e.default:e,n=require("@popperjs/core");function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var o={sublime:"subl://open?url=file://{path}&line={line}&column={column}",textmate:"txmt://open?url=file://{path}&line={line}&column={column}",emacs:"emacs://open?url=file://{path}&line={line}&column={column}",macvim:"mvim://open/?url=file://{path}&line={line}&column={column}",phpstorm:"phpstorm://open?file={path}&line={line}&column={column}",webstorm:"phpstorm://open?file={path}&line={line}&column={column}",idea:"idea://open?file={path}&line={line}&column={column}",vscode:"vscode://file/{path}:{line}:{column}","vscode-insiders":"vscode-insiders://file/{path}:{line}:{column}",atom:"atom://core/open/file?filename={path}&line={line}&column={column}"};function l(e,t){return void 0===t&&(t=function(){return!0}),function e(t,n){return t.parentElement?n(t)?t:e(t.parentElement,n):null}(e,(function(e){return function(e){return e.hasOwnProperty("tagInfo")}(e)&&t(e)}))}function r(e){return l(e,(function(e){return!!e.tagInfo.component}))}function s(e){var t=document.createElement("div");if(t.innerHTML=e,0===t.childElementCount)throw new Error("Couldn't create elements from '"+e+"'");return 1===t.childElementCount?t.firstElementChild:Array.from(t.children)}var a={theme:"light",editor:"vscode",shortcuts:{open:"d",inspect:"a a",inspectComponent:"c c",inspectParent:"e"}},c=function(){function e(e){this._enabled=!1,this.inspectComponentOnly=!1,this.options=i({},a,e),this.createElements(),this.addEventListeners(),this.registerHotkeys(),this.keepUpdatingOnEvents()}var c,u=e.prototype;return u.createElements=function(){var e=this.options.theme,t=document.body,i=s('<div id="view-launcher-indicator" class="--'+e+'" style="visibility: hidden"></div>'),o=s('<div id="view-launcher-tooltip" class="--'+e+'" style="visibility: hidden">\n<div class="__tag-info"></div>\n<div class="__view-name"></div>\n</div>'),l=o.querySelector(".__tag-info"),r=o.querySelector(".__view-name");t.appendChild(i),t.appendChild(o),this.popper=n.createPopper(i,o,{placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.indicator=i,this.tooltip=o,this.tagInfo=l,this.viewName=r},u.addEventListeners=function(){var e=this;Array.from(document.querySelectorAll("[data-tag-info]")).filter((function(e){e.tagInfo=JSON.parse(e.dataset.tagInfo),e.removeAttribute("data-tag-info");var t=getComputedStyle(e);return!(["HTML","HEAD","BODY","SCRIPT","NOSCRIPT","META","LINK","STYLE","TITLE","BASE"].includes(e.tagName)||"none"===t.display||"hidden"===t.visibility)})).forEach((function(t){t.addEventListener("mouseenter",(function(){if(!e.disabled)if(e.inspectComponentOnly&&!t.tagInfo.component){var n=r(t);n&&e.setElement(n)}else e.setElement(t)})),t.addEventListener("mouseleave",(function(t){var n=t.relatedTarget;if(!e.disabled&&n instanceof Element){var i=e.inspectComponentOnly?r(n):l(n);i&&e.setElement(i)}}))}))},u.registerHotkeys=function(){var e=this,n=this.options,i=n.shortcuts,r=n.editor;t.bind(i.inspect,(function(){e.inspectComponentOnly=!1,e.toggleEnable()})),t.bind(i.inspectComponent,(function(){e.inspectComponentOnly=!0,e.toggleEnable()})),t.bind(i.open,(function(){if(e.enabled&&e.element){var t,n,i,l=e.element.tagInfo;window.location.href=(n=(t={editor:r,viewPath:l.view,line:l.line,column:l.column}).line,i=t.column,function(e,t){return t?e.replace("{column}",t.toString()):e.replace("&column={column}","").replace(":{column}","")}(function(e,t){return t?e.replace("{line}",t.toString()):e.replace("&line={line}&column={column}","").replace(":{line}:{column}","")}(o[t.editor].replace("{path}",encodeURIComponent(t.viewPath)),n),i))}})),t.bind(i.inspectParent,(function(){var t;if(null!=(t=e.element)&&t.parentElement){var n=l(e.element.parentElement);n&&e.setElement(n)}})),t.bind("esc",(function(){e.disable()}))},u.keepUpdatingOnEvents=function(){var e=this;window.addEventListener("scroll",this.update),window.addEventListener("resize",this.update);var t=document.body;new MutationObserver((function(){e.addEventListeners()})).observe(t,{attributes:!1,childList:!0,subtree:!0})},e.create=function(t){if(void 0===t&&(t={}),e.instance)return e.instance;var n=new e(t);return e.instance=n},u.setElement=function(e){this.element=e,this.show(),this.update()},u.update=function(){if(this.element&&!this.disabled){var e=this.indicator.style,t=this.element.getBoundingClientRect(),n=document.documentElement.clientHeight,i=t.top+t.height>n,o=t.top>0?i?n-t.top:t.height:i?n:t.height+t.top;e.width=t.width+"px",e.height=o+"px",e.left=t.left+"px",e.top=(t.top>0?t.top:0)+"px";var l=this.element,r=Array.from(l.classList).join("."),s=l.tagName.toLowerCase(),a=l.tagInfo.view.match(/[^/\\]+?$/)[0];this.tagInfo.innerHTML=(l.tagInfo.component?'<i class="__is-component"></i>':"")+(l.tagInfo.component||s+(r?"."+r:"")),this.viewName.innerText=a,this.popper.setOptions({modifiers:[{name:"offset",options:{offset:i&&t.top<0?[6,-(this.tooltip.clientHeight+5)]:[0,5]}}]}),this.popper.update(),this.show()}},u.hide=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="hidden"}))},u.show=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="visible"}))},u.enable=function(){this._enabled=!0,document.body.classList.add("view-launcher-inspecting")},u.disable=function(){this._enabled=!1,this.element=void 0,this.hide(),document.body.classList.remove("view-launcher-inspecting")},u.toggleEnable=function(){this.enabled?this.disable():this.enable()},(c=[{key:"enabled",get:function(){return this._enabled}},{key:"disabled",get:function(){return!this._enabled}}])&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,c),e}();exports.ElementIndicator=c,exports.defaultOptions=a,exports.viewLauncher=function(e){void 0===e&&(e={}),c.create(e)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=(e=require("mousetrap"))&&"object"==typeof e&&"default"in e?e.default:e,n=require("@popperjs/core");function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var o={sublime:"subl://open?url=file://{path}&line={line}&column={column}",textmate:"txmt://open?url=file://{path}&line={line}&column={column}",emacs:"emacs://open?url=file://{path}&line={line}&column={column}",macvim:"mvim://open/?url=file://{path}&line={line}&column={column}",phpstorm:"phpstorm://open?file={path}&line={line}&column={column}",webstorm:"phpstorm://open?file={path}&line={line}&column={column}",idea:"idea://open?file={path}&line={line}&column={column}",vscode:"vscode://file/{path}:{line}:{column}","vscode-insiders":"vscode-insiders://file/{path}:{line}:{column}",atom:"atom://core/open/file?filename={path}&line={line}&column={column}"};function r(e,t){return void 0===t&&(t=function(){return!0}),function e(t,n){return t.parentElement?n(t)?t:e(t.parentElement,n):null}(e,(function(e){return function(e){return e.hasOwnProperty("tagInfo")}(e)&&t(e)}))}function l(e){return r(e,(function(e){return!!e.tagInfo.component}))}function s(e){var t=document.createElement("div");if(t.innerHTML=e,0===t.childElementCount)throw new Error("Couldn't create elements from '"+e+"'");return 1===t.childElementCount?t.firstElementChild:Array.from(t.children)}var a={theme:"light",editor:"vscode",shortcuts:{open:"d",inspect:"a a",inspectComponent:"c c",inspectParent:"e"}},c=function(){function e(e){this._enabled=!1,this.inspectComponentOnly=!1,this.options=i({},a,e),this.createElements(),this.addEventListeners(),this.registerHotkeys(),this.keepUpdatingOnEvents()}var c,p=e.prototype;return p.createElements=function(){var e=this.options.theme,t=document.body,i=s('<div id="view-launcher-indicator" class="--'+e+'" style="visibility: hidden"></div>'),o=s('<div id="view-launcher-tooltip" class="--'+e+'" style="visibility: hidden">\n<div class="__tag-info"></div>\n<div class="__view-name"></div>\n</div>'),r=o.querySelector(".__tag-info"),l=o.querySelector(".__view-name");t.appendChild(i),t.appendChild(o),this.popper=n.createPopper(i,o,{placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"eventListeners",enabled:!1}]}),this.indicator=i,this.tooltip=o,this.tagInfo=r,this.viewName=l},p.addEventListeners=function(){var e=this;Array.from(document.querySelectorAll("[data-tag-info]")).filter((function(e){e.tagInfo=JSON.parse(e.dataset.tagInfo),e.removeAttribute("data-tag-info");var t=getComputedStyle(e);return!(["HTML","HEAD","BODY","SCRIPT","NOSCRIPT","META","LINK","STYLE","TITLE","BASE"].includes(e.tagName)||"none"===t.display||"hidden"===t.visibility)})).forEach((function(t){t.addEventListener("mouseenter",(function(){if(e.inspectComponentOnly&&!t.tagInfo.component){var n=l(t);n&&e.setElement(n)}else e.setElement(t)})),t.addEventListener("mouseleave",(function(t){var n=t.relatedTarget;if(n instanceof Element){var i=e.inspectComponentOnly?l(n):r(n);i&&e.setElement(i)}}))}))},p.registerHotkeys=function(){var e=this,n=this.options,i=n.shortcuts,l=n.editor;t.bind(i.inspect,(function(){e.inspectComponentOnly=!1,e.toggleEnable()})),t.bind(i.inspectComponent,(function(){e.inspectComponentOnly=!0,e.toggleEnable()})),t.bind(i.open,(function(){if(e.enabled&&e.element){var t,n,i,r=e.element.tagInfo;window.location.href=(n=(t={editor:l,viewPath:r.view,line:r.line,column:r.column}).line,i=t.column,function(e,t){return t?e.replace("{column}",t.toString()):e.replace("&column={column}","").replace(":{column}","")}(function(e,t){return t?e.replace("{line}",t.toString()):e.replace("&line={line}&column={column}","").replace(":{line}:{column}","")}(o[t.editor].replace("{path}",encodeURIComponent(t.viewPath)),n),i))}})),t.bind(i.inspectParent,(function(){var t;if(null!=(t=e.element)&&t.parentElement){var n=r(e.element.parentElement);n&&e.setElement(n)}})),t.bind("esc",(function(){e.disable()}))},p.keepUpdatingOnEvents=function(){var e=this;window.addEventListener("scroll",this.update.bind(this)),window.addEventListener("resize",this.update.bind(this));var t=document.body;new MutationObserver((function(){e.addEventListeners()})).observe(t,{attributes:!1,childList:!0,subtree:!0})},e.create=function(t){if(void 0===t&&(t={}),e.instance)return e.instance;var n=new e(t);return e.instance=n},p.setElement=function(e){this.element=e,this.update()},p.update=function(){var e=this.element;if(e&&!this.disabled){var t=this.indicator.style,n=e.getBoundingClientRect(),i=document.documentElement.clientHeight,o=n.top+n.height>i,r=n.top>0?o?i-n.top:n.height:o?i:n.height+n.top;t.width=n.width+"px",t.height=r+"px",t.left=n.left+"px",t.top=(n.top>0?n.top:0)+"px";var l=Array.from(e.classList).join("."),s=e.tagName.toLowerCase(),a=e.tagInfo.view.match(/[^/\\]+?$/)[0];this.tagInfo.innerHTML=(e.tagInfo.component?'<i class="__is-component"></i>':"")+(e.tagInfo.component||s+(l?"."+l:"")),this.viewName.innerText=a,this.popper.setOptions({modifiers:[{name:"offset",options:{offset:o&&n.top<0?[6,-(this.tooltip.clientHeight+5)]:[0,5]}}]}),this.popper.update()}},p.setPopperEventListeners=function(e){this.popper.setOptions({modifiers:[{name:"eventListeners",enabled:e}]})},p.hide=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="hidden"}))},p.show=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="visible"}))},p.enable=function(){this._enabled=!0,this.setPopperEventListeners(!0),this.update(),this.show()},p.disable=function(){this._enabled=!1,this.element=void 0,this.setPopperEventListeners(!1),this.hide()},p.toggleEnable=function(){this.enabled?this.disable():this.enable()},(c=[{key:"enabled",get:function(){return this._enabled}},{key:"disabled",get:function(){return!this._enabled}}])&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,c),e}();exports.ElementIndicator=c,exports.defaultOptions=a,exports.viewLauncher=function(e){void 0===e&&(e={}),c.create(e)};
//# sourceMappingURL=view-launcher.cjs.production.min.js.map

@@ -154,2 +154,5 @@ import Mousetrap from 'mousetrap';

}
}, {
name: 'eventListeners',
enabled: false
}]

@@ -175,6 +178,2 @@ });

element.addEventListener('mouseenter', function () {
if (_this.disabled) {
return;
}
var isComponent = !!element.tagInfo.component;

@@ -199,3 +198,3 @@

if (_this.disabled || !(relatedTarget instanceof Element)) {
if (!(relatedTarget instanceof Element)) {
return;

@@ -264,4 +263,4 @@ }

// update on window scroll and resize
window.addEventListener('scroll', this.update);
window.addEventListener('resize', this.update); // update on document mutation
window.addEventListener('scroll', this.update.bind(this));
window.addEventListener('resize', this.update.bind(this)); // update on document mutation

@@ -295,3 +294,2 @@ var targetNode = document.body;

this.element = element;
this.show();
this.update();

@@ -301,3 +299,5 @@ };

_proto.update = function update() {
if (!this.element || this.disabled) {
var element = this.element;
if (!element || this.disabled) {
return;

@@ -307,3 +307,3 @@ }

var indicatorStyle = this.indicator.style;
var rect = this.element.getBoundingClientRect();
var rect = element.getBoundingClientRect();
var windowHeight = document.documentElement.clientHeight;

@@ -316,3 +316,2 @@ var overflowWinBottom = rect.top + rect.height > windowHeight;

indicatorStyle.top = (rect.top > 0 ? rect.top : 0) + 'px';
var element = this.element;
var classes = Array.from(element.classList).join('.');

@@ -334,5 +333,13 @@ var tagName = element.tagName.toLowerCase();

this.popper.update();
this.show();
};
_proto.setPopperEventListeners = function setPopperEventListeners(enabled) {
this.popper.setOptions({
modifiers: [{
name: 'eventListeners',
enabled: enabled
}]
});
};
_proto.hide = function hide() {

@@ -352,3 +359,5 @@ [this.indicator, this.tooltip].forEach(function (elem) {

this._enabled = true;
document.body.classList.add('view-launcher-inspecting');
this.setPopperEventListeners(true);
this.update();
this.show();
};

@@ -359,4 +368,4 @@

this.element = undefined;
this.setPopperEventListeners(false);
this.hide();
document.body.classList.remove('view-launcher-inspecting');
};

@@ -363,0 +372,0 @@

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self)["view-launcher"]={})}(this,(function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var n=function(e,t){return function(e){!function(t,n,o){if(t){for(var i,r={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},a={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},c={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},f=1;f<20;++f)r[111+f]="f"+f;for(f=0;f<=9;++f)r[f+96]=f.toString();m.prototype.bind=function(e,t,n){return this._bindMultiple.call(this,e=e instanceof Array?e:[e],t,n),this},m.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},m.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},m.prototype.reset=function(){return this._callbacks={},this._directMap={},this},m.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function e(t,o){return null!==t&&t!==n&&(t===o||e(t.parentNode,o))}(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var o=e.composedPath()[0];o!==e.target&&(t=o)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},m.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},m.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);i=null},m.init=function(){var e=m(n);for(var t in e)"_"!==t.charAt(0)&&(m[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},m.init(),t.Mousetrap=m,e.exports&&(e.exports=m)}function l(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function p(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return r[e.which]?r[e.which]:a[e.which]?a[e.which]:String.fromCharCode(e.which).toLowerCase()}function u(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function d(e,t,n){return n||(n=function(){if(!i)for(var e in i={},r)e>95&&e<112||r.hasOwnProperty(e)&&(i[r[e]]=e);return i}()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function h(e,t){var n,o,i,r=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),i=0;i<n.length;++i)c[o=n[i]]&&(o=c[o]),t&&"keypress"!=t&&s[o]&&(o=s[o],r.push("shift")),u(o)&&r.push(o);return{key:o,modifiers:r,action:t=d(o,r,t)}}function m(e){var t=this;if(e=e||n,!(t instanceof m))return new m(e);t.target=e,t._callbacks={},t._directMap={};var o,i={},r=!1,a=!1,s=!1;function c(e){e=e||{};var t,n=!1;for(t in i)e[t]?n=!0:i[t]=0;n||(s=!1)}function f(e,n,o,r,a,s){var c,f,l,p=[],d=o.type;if(!t._callbacks[e])return[];for("keyup"==d&&u(e)&&(n=[e]),c=0;c<t._callbacks[e].length;++c)f=t._callbacks[e][c],(r||!f.seq||i[f.seq]==f.level)&&d==f.action&&(("keypress"!=d||o.metaKey||o.ctrlKey)&&(l=f.modifiers,n.sort().join(",")!==l.sort().join(","))||((!r&&f.combo==a||r&&f.seq==r&&f.level==s)&&t._callbacks[e].splice(c,1),p.push(f)));return p}function d(e,n,o,i){t.stopCallback(n,n.target||n.srcElement,o,i)||!1===e(n,o)&&(function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}(n),function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}(n))}function v(e){"number"!=typeof e.which&&(e.which=e.keyCode);var n=p(e);n&&("keyup"!=e.type||r!==n?t.handleKey(n,function(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}(e),e):r=!1)}function y(e,n,a,l,u){t._directMap[e+":"+a]=n;var m,v=(e=e.replace(/\s+/g," ")).split(" ");v.length>1?function(e,t,n,a){function f(t){return function(){s=t,++i[e],clearTimeout(o),o=setTimeout(c,1e3)}}function l(t){d(n,t,e),"keyup"!==a&&(r=p(t)),setTimeout(c,10)}i[e]=0;for(var u=0;u<t.length;++u){var m=u+1===t.length?l:f(a||h(t[u+1]).action);y(t[u],m,a,e,u)}}(e,v,n,a):(m=h(e,a),t._callbacks[m.key]=t._callbacks[m.key]||[],f(m.key,m.modifiers,{type:m.action},l,e,u),t._callbacks[m.key][l?"unshift":"push"]({callback:n,modifiers:m.modifiers,action:m.action,seq:l,level:u,combo:e}))}t._handleKey=function(e,t,n){var o,i=f(e,t,n),r={},l=0,p=!1;for(o=0;o<i.length;++o)i[o].seq&&(l=Math.max(l,i[o].level));for(o=0;o<i.length;++o)if(i[o].seq){if(i[o].level!=l)continue;p=!0,r[i[o].seq]=1,d(i[o].callback,n,i[o].combo,i[o].seq)}else p||d(i[o].callback,n,i[o].combo);var h="keypress"==n.type&&a;n.type!=s||u(e)||h||c(r),a=p&&"keydown"==n.type},t._bindMultiple=function(e,t,n){for(var o=0;o<e.length;++o)y(e[o],t,n)},l(e,"keypress",v),l(e,"keydown",v),l(e,"keyup",v)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)}(t={exports:{}}),t.exports}(),o={sublime:"subl://open?url=file://{path}&line={line}&column={column}",textmate:"txmt://open?url=file://{path}&line={line}&column={column}",emacs:"emacs://open?url=file://{path}&line={line}&column={column}",macvim:"mvim://open/?url=file://{path}&line={line}&column={column}",phpstorm:"phpstorm://open?file={path}&line={line}&column={column}",webstorm:"phpstorm://open?file={path}&line={line}&column={column}",idea:"idea://open?file={path}&line={line}&column={column}",vscode:"vscode://file/{path}:{line}:{column}","vscode-insiders":"vscode-insiders://file/{path}:{line}:{column}",atom:"atom://core/open/file?filename={path}&line={line}&column={column}"};function i(e,t){return void 0===t&&(t=function(){return!0}),function e(t,n){return t.parentElement?n(t)?t:e(t.parentElement,n):null}(e,(function(e){return function(e){return e.hasOwnProperty("tagInfo")}(e)&&t(e)}))}function r(e){return i(e,(function(e){return!!e.tagInfo.component}))}function a(e){var t=document.createElement("div");if(t.innerHTML=e,0===t.childElementCount)throw new Error("Couldn't create elements from '"+e+"'");return 1===t.childElementCount?t.firstElementChild:Array.from(t.children)}var s="top",c="bottom",f="right",l="left",p=[s,c,f,l],u=p.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),d=[].concat(p,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),h=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function m(e){return e?(e.nodeName||"").toLowerCase():null}function v(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function y(e){return e instanceof v(e).Element||e instanceof Element}function g(e){return e instanceof v(e).HTMLElement||e instanceof HTMLElement}function b(e){return"undefined"!=typeof ShadowRoot&&(e instanceof v(e).ShadowRoot||e instanceof ShadowRoot)}function w(e){return e.split("-")[0]}function O(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function x(e){var t=O(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function E(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function k(e){return v(e).getComputedStyle(e)}function L(e){return["table","td","th"].indexOf(m(e))>=0}function j(e){return((y(e)?e.ownerDocument:e.document)||window.document).documentElement}function C(e){return"html"===m(e)?e:e.assignedSlot||e.parentNode||(b(e)?e.host:null)||j(e)}function P(e){return g(e)&&"fixed"!==k(e).position?e.offsetParent:null}function _(e){for(var t=v(e),n=P(e);n&&L(n)&&"static"===k(n).position;)n=P(n);return n&&("html"===m(n)||"body"===m(n)&&"static"===k(n).position)?t:n||function(e){for(var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),n=C(e);g(n)&&["html","body"].indexOf(m(n))<0;){var o=k(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function M(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var D=Math.max,T=Math.min,A=Math.round;function S(e,t,n){return D(e,T(t,n))}function I(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function H(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function B(e){var t,n=e.popper,o=e.popperRect,i=e.placement,r=e.offsets,a=e.position,p=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=!0===d?function(e){var t=e.y,n=window.devicePixelRatio||1;return{x:A(A(e.x*n)/n)||0,y:A(A(t*n)/n)||0}}(r):"function"==typeof d?d(r):r,m=h.x,y=void 0===m?0:m,g=h.y,b=void 0===g?0:g,w=r.hasOwnProperty("x"),O=r.hasOwnProperty("y"),x=l,E=s,L=window;if(u){var C=_(n),P="clientHeight",M="clientWidth";C===v(n)&&"static"!==k(C=j(n)).position&&(P="scrollHeight",M="scrollWidth"),C=C,i===s&&(E=c,b-=C[P]-o.height,b*=p?1:-1),i===l&&(x=f,y-=C[M]-o.width,y*=p?1:-1)}var D,T=Object.assign({position:a},u&&q);return Object.assign({},T,p?((D={})[E]=O?"0":"",D[x]=w?"0":"",D.transform=(L.devicePixelRatio||1)<2?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",D):((t={})[E]=O?b+"px":"",t[x]=w?y+"px":"",t.transform="",t))}var N={passive:!0},R={left:"right",right:"left",bottom:"top",top:"bottom"};function W(e){return e.replace(/left|right|bottom|top/g,(function(e){return R[e]}))}var K={start:"end",end:"start"};function U(e){return e.replace(/start|end/g,(function(e){return K[e]}))}function V(e){var t=v(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function z(e){return O(j(e)).left+V(e).scrollLeft}function Y(e){var t=k(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function X(e,t){var n;void 0===t&&(t=[]);var o=function e(t){return["html","body","#document"].indexOf(m(t))>=0?t.ownerDocument.body:g(t)&&Y(t)?t:e(C(t))}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),r=v(o),a=i?[r].concat(r.visualViewport||[],Y(o)?o:[]):o,s=t.concat(a);return i?s:s.concat(X(C(a)))}function F(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function $(e,t){return"viewport"===t?F(function(e){var t=v(e),n=j(e),o=t.visualViewport,i=n.clientWidth,r=n.clientHeight,a=0,s=0;return o&&(i=o.width,r=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=o.offsetLeft,s=o.offsetTop)),{width:i,height:r,x:a+z(e),y:s}}(e)):g(t)?function(e){var t=O(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):F(function(e){var t,n=j(e),o=V(e),i=null==(t=e.ownerDocument)?void 0:t.body,r=D(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=D(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-o.scrollLeft+z(e),c=-o.scrollTop;return"rtl"===k(i||n).direction&&(s+=D(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:s,y:c}}(j(e)))}function J(e){return e.split("-")[1]}function G(e){var t,n=e.reference,o=e.element,i=e.placement,r=i?w(i):null,a=i?J(i):null,p=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2;switch(r){case s:t={x:p,y:n.y-o.height};break;case c:t={x:p,y:n.y+n.height};break;case f:t={x:n.x+n.width,y:u};break;case l:t={x:n.x-o.width,y:u};break;default:t={x:n.x,y:n.y}}var d=r?M(r):null;if(null!=d){var h="y"===d?"height":"width";switch(a){case"start":t[d]=t[d]-(n[h]/2-o[h]/2);break;case"end":t[d]=t[d]+(n[h]/2-o[h]/2)}}return t}function Q(e,t){void 0===t&&(t={});var n=t.placement,o=void 0===n?e.placement:n,i=t.boundary,r=void 0===i?"clippingParents":i,a=t.rootBoundary,l=void 0===a?"viewport":a,u=t.elementContext,d=void 0===u?"popper":u,h=t.altBoundary,v=void 0!==h&&h,b=t.padding,w=void 0===b?0:b,x=I("number"!=typeof w?w:H(w,p)),L=e.elements.reference,P=e.rects.popper,M=e.elements[v?"popper"===d?"reference":"popper":d],A=function(e,t,n){var o="clippingParents"===t?function(e){var t=X(C(e)),n=["absolute","fixed"].indexOf(k(e).position)>=0&&g(e)?_(e):e;return y(n)?t.filter((function(e){return y(e)&&E(e,n)&&"body"!==m(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),r=i.reduce((function(t,n){var o=$(e,n);return t.top=D(o.top,t.top),t.right=T(o.right,t.right),t.bottom=T(o.bottom,t.bottom),t.left=D(o.left,t.left),t}),$(e,i[0]));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(y(M)?M:M.contextElement||j(e.elements.popper),r,l),S=O(L),q=G({reference:S,element:P,strategy:"absolute",placement:o}),B=F(Object.assign({},P,q)),N="popper"===d?B:S,R={top:A.top-N.top+x.top,bottom:N.bottom-A.bottom+x.bottom,left:A.left-N.left+x.left,right:N.right-A.right+x.right},W=e.modifiersData.offset;if("popper"===d&&W){var K=W[o];Object.keys(R).forEach((function(e){var t=[f,c].indexOf(e)>=0?1:-1,n=[s,c].indexOf(e)>=0?"y":"x";R[e]+=K[n]*t}))}return R}function Z(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,i=t.padding,r=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?d:a,c=J(t.placement),f=c?r?u:u.filter((function(e){return J(e)===c})):p,l=f.filter((function(e){return s.indexOf(e)>=0}));0===l.length&&(l=f);var h=l.reduce((function(t,r){return t[r]=Q(e,{placement:r,boundary:n,rootBoundary:o,padding:i})[w(r)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}function ee(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function te(e){return[s,f,c,l].some((function(t){return e[t]>=0}))}function ne(e,t,n){void 0===n&&(n=!1);var o,i,r=j(t),a=O(e),s=g(t),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(s||!s&&!n)&&(("body"!==m(t)||Y(r))&&(c=(o=t)!==v(o)&&g(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:V(o)),g(t)?((f=O(t)).x+=t.clientLeft,f.y+=t.clientTop):r&&(f.x=z(r))),{x:a.left+c.scrollLeft-f.x,y:a.top+c.scrollTop-f.y,width:a.width,height:a.height}}var oe={placement:"bottom",modifiers:[],strategy:"absolute"};function ie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function re(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,o=e.defaultOptions,i=void 0===o?oe:o;return function(e,t,o){void 0===o&&(o=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},oe,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,l={state:s,setOptions:function(o){p(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:y(e)?X(e):e.contextElement?X(e.contextElement):[],popper:X(t)};var r,a,f=function(e){var t=function(e){var t=new Map,n=new Set,o=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(o){if(!n.has(o)){var i=t.get(o);i&&e(i)}})),o.push(i)}(e)})),o}(e);return h.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((r=[].concat(n,s.options.modifiers),a=r.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(a).map((function(e){return a[e]}))));return s.orderedModifiers=f.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.options,n=e.effect;if("function"==typeof n){var o=n({state:s,name:e.name,instance:l,options:void 0===t?{}:t});c.push(o||function(){})}})),l.update()},forceUpdate:function(){if(!f){var e=s.elements,t=e.reference,n=e.popper;if(ie(t,n)){s.rects={reference:ne(t,_(n),"fixed"===s.options.strategy),popper:x(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var i=s.orderedModifiers[o],r=i.fn,a=i.options;"function"==typeof r&&(s=r({state:s,options:void 0===a?{}:a,name:i.name,instance:l})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise((function(e){l.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(r())}))}))),a}),destroy:function(){p(),f=!0}};if(!ie(e,t))return l;function p(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(o).then((function(e){!f&&o.onFirstUpdate&&o.onFirstUpdate(e)})),l}}var ae=re({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,i=o.scroll,r=void 0===i||i,a=o.resize,s=void 0===a||a,c=v(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&f.forEach((function(e){e.addEventListener("scroll",n.update,N)})),s&&c.addEventListener("resize",n.update,N),function(){r&&f.forEach((function(e){e.removeEventListener("scroll",n.update,N)})),s&&c.removeEventListener("resize",n.update,N)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=G({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,a=void 0===r||r,s=n.roundOffsets,c=void 0===s||s,f={placement:w(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,B(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,B(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];g(i)&&m(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});g(o)&&m(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=e.options.offset,i=void 0===o?[0,0]:o,r=d.reduce((function(e,n){return e[n]=function(e,t,n){var o=w(e),i=[l,s].indexOf(o)>=0?-1:1,r="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=r[0],c=r[1];return a=a||0,c=(c||0)*i,[l,f].indexOf(o)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,i),e}),{}),a=r[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=r}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=n.mainAxis,r=void 0===i||i,a=n.altAxis,p=void 0===a||a,u=n.fallbackPlacements,d=n.padding,h=n.boundary,m=n.rootBoundary,v=n.altBoundary,y=n.flipVariations,g=void 0===y||y,b=n.allowedAutoPlacements,O=t.options.placement,x=w(O),E=u||(x!==O&&g?function(e){if("auto"===w(e))return[];var t=W(e);return[U(e),t,U(t)]}(O):[W(O)]),k=[O].concat(E).reduce((function(e,n){return e.concat("auto"===w(n)?Z(t,{placement:n,boundary:h,rootBoundary:m,padding:d,flipVariations:g,allowedAutoPlacements:b}):n)}),[]),L=t.rects.reference,j=t.rects.popper,C=new Map,P=!0,_=k[0],M=0;M<k.length;M++){var D=k[M],T=w(D),A="start"===J(D),S=[s,c].indexOf(T)>=0,I=S?"width":"height",H=Q(t,{placement:D,boundary:h,rootBoundary:m,altBoundary:v,padding:d}),q=S?A?f:l:A?c:s;L[I]>j[I]&&(q=W(q));var B=W(q),N=[];if(r&&N.push(H[T]<=0),p&&N.push(H[q]<=0,H[B]<=0),N.every((function(e){return e}))){_=D,P=!1;break}C.set(D,N)}if(P)for(var R=function(e){var t=k.find((function(t){var n=C.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return _=t,"break"},K=g?3:1;K>0&&"break"!==R(K);K--);t.placement!==_&&(t.modifiersData[o]._skip=!0,t.placement=_,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,i=n.mainAxis,r=void 0===i||i,a=n.altAxis,p=void 0!==a&&a,u=n.tether,d=void 0===u||u,h=n.tetherOffset,m=void 0===h?0:h,v=Q(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),y=w(t.placement),g=J(t.placement),b=!g,O=M(y),E="x"===O?"y":"x",k=t.modifiersData.popperOffsets,L=t.rects.reference,j=t.rects.popper,C="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,P={x:0,y:0};if(k){if(r||p){var A="y"===O?s:l,I="y"===O?c:f,H="y"===O?"height":"width",q=k[O],B=k[O]+v[A],N=k[O]-v[I],R=d?-j[H]/2:0,W="start"===g?L[H]:j[H],K="start"===g?-j[H]:-L[H],U=t.elements.arrow,V=d&&U?x(U):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=z[A],X=z[I],F=S(0,L[H],V[H]),$=b?L[H]/2-R-F-Y-C:W-F-Y-C,G=b?-L[H]/2+R+F+X+C:K+F+X+C,Z=t.elements.arrow&&_(t.elements.arrow),ee=t.modifiersData.offset?t.modifiersData.offset[t.placement][O]:0,te=k[O]+$-ee-(Z?"y"===O?Z.clientTop||0:Z.clientLeft||0:0),ne=k[O]+G-ee;if(r){var oe=S(d?T(B,te):B,q,d?D(N,ne):N);k[O]=oe,P[O]=oe-q}if(p){var ie=k[E],re=ie+v["x"===O?s:l],ae=ie-v["x"===O?c:f],se=S(d?T(re,te):re,ie,d?D(ae,ne):ae);k[E]=se,P[E]=se-ie}}t.modifiersData[o]=P}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,i=e.options,r=n.elements.arrow,a=n.modifiersData.popperOffsets,u=w(n.placement),d=M(u),h=[l,f].indexOf(u)>=0?"height":"width";if(r&&a){var m=function(e,t){return I("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:H(e,p))}(i.padding,n),v=x(r),y="y"===d?s:l,g="y"===d?c:f,b=n.rects.reference[h]+n.rects.reference[d]-a[d]-n.rects.popper[h],O=a[d]-n.rects.reference[d],E=_(r),k=E?"y"===d?E.clientHeight||0:E.clientWidth||0:0,L=k/2-v[h]/2+(b/2-O/2),j=S(m[y],L,k-v[h]-m[g]);n.modifiersData[o]=((t={})[d]=j,t.centerOffset=j-L,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&E(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,a=Q(t,{elementContext:"reference"}),s=Q(t,{altBoundary:!0}),c=ee(a,o),f=ee(s,i,r),l=te(c),p=te(f);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}}]}),se={theme:"light",editor:"vscode",shortcuts:{open:"d",inspect:"a a",inspectComponent:"c c",inspectParent:"e"}},ce=function(){function e(e){this._enabled=!1,this.inspectComponentOnly=!1,this.options=t({},se,e),this.createElements(),this.addEventListeners(),this.registerHotkeys(),this.keepUpdatingOnEvents()}var s,c=e.prototype;return c.createElements=function(){var e=this.options.theme,t=document.body,n=a('<div id="view-launcher-indicator" class="--'+e+'" style="visibility: hidden"></div>'),o=a('<div id="view-launcher-tooltip" class="--'+e+'" style="visibility: hidden">\n<div class="__tag-info"></div>\n<div class="__view-name"></div>\n</div>'),i=o.querySelector(".__tag-info"),r=o.querySelector(".__view-name");t.appendChild(n),t.appendChild(o),this.popper=ae(n,o,{placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.indicator=n,this.tooltip=o,this.tagInfo=i,this.viewName=r},c.addEventListeners=function(){var e=this;Array.from(document.querySelectorAll("[data-tag-info]")).filter((function(e){e.tagInfo=JSON.parse(e.dataset.tagInfo),e.removeAttribute("data-tag-info");var t=getComputedStyle(e);return!(["HTML","HEAD","BODY","SCRIPT","NOSCRIPT","META","LINK","STYLE","TITLE","BASE"].includes(e.tagName)||"none"===t.display||"hidden"===t.visibility)})).forEach((function(t){t.addEventListener("mouseenter",(function(){if(!e.disabled)if(e.inspectComponentOnly&&!t.tagInfo.component){var n=r(t);n&&e.setElement(n)}else e.setElement(t)})),t.addEventListener("mouseleave",(function(t){var n=t.relatedTarget;if(!e.disabled&&n instanceof Element){var o=e.inspectComponentOnly?r(n):i(n);o&&e.setElement(o)}}))}))},c.registerHotkeys=function(){var e=this,t=this.options,r=t.shortcuts,a=t.editor;n.bind(r.inspect,(function(){e.inspectComponentOnly=!1,e.toggleEnable()})),n.bind(r.inspectComponent,(function(){e.inspectComponentOnly=!0,e.toggleEnable()})),n.bind(r.open,(function(){if(e.enabled&&e.element){var t,n,i,r=e.element.tagInfo;window.location.href=(n=(t={editor:a,viewPath:r.view,line:r.line,column:r.column}).line,i=t.column,function(e,t){return t?e.replace("{column}",t.toString()):e.replace("&column={column}","").replace(":{column}","")}(function(e,t){return t?e.replace("{line}",t.toString()):e.replace("&line={line}&column={column}","").replace(":{line}:{column}","")}(o[t.editor].replace("{path}",encodeURIComponent(t.viewPath)),n),i))}})),n.bind(r.inspectParent,(function(){var t;if(null!=(t=e.element)&&t.parentElement){var n=i(e.element.parentElement);n&&e.setElement(n)}})),n.bind("esc",(function(){e.disable()}))},c.keepUpdatingOnEvents=function(){var e=this;window.addEventListener("scroll",this.update),window.addEventListener("resize",this.update);var t=document.body;new MutationObserver((function(){e.addEventListeners()})).observe(t,{attributes:!1,childList:!0,subtree:!0})},e.create=function(t){if(void 0===t&&(t={}),e.instance)return e.instance;var n=new e(t);return e.instance=n},c.setElement=function(e){this.element=e,this.show(),this.update()},c.update=function(){if(this.element&&!this.disabled){var e=this.indicator.style,t=this.element.getBoundingClientRect(),n=document.documentElement.clientHeight,o=t.top+t.height>n,i=t.top>0?o?n-t.top:t.height:o?n:t.height+t.top;e.width=t.width+"px",e.height=i+"px",e.left=t.left+"px",e.top=(t.top>0?t.top:0)+"px";var r=this.element,a=Array.from(r.classList).join("."),s=r.tagName.toLowerCase(),c=r.tagInfo.view.match(/[^/\\]+?$/)[0];this.tagInfo.innerHTML=(r.tagInfo.component?'<i class="__is-component"></i>':"")+(r.tagInfo.component||s+(a?"."+a:"")),this.viewName.innerText=c,this.popper.setOptions({modifiers:[{name:"offset",options:{offset:o&&t.top<0?[6,-(this.tooltip.clientHeight+5)]:[0,5]}}]}),this.popper.update(),this.show()}},c.hide=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="hidden"}))},c.show=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="visible"}))},c.enable=function(){this._enabled=!0,document.body.classList.add("view-launcher-inspecting")},c.disable=function(){this._enabled=!1,this.element=void 0,this.hide(),document.body.classList.remove("view-launcher-inspecting")},c.toggleEnable=function(){this.enabled?this.disable():this.enable()},(s=[{key:"enabled",get:function(){return this._enabled}},{key:"disabled",get:function(){return!this._enabled}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,s),e}();e.ElementIndicator=ce,e.defaultOptions=se,e.viewLauncher=function(e){void 0===e&&(e={}),ce.create(e)},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self)["view-launcher"]={})}(this,(function(e){"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}var n=function(e,t){return function(e){!function(t,n,o){if(t){for(var i,r={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},a={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},c={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},f=1;f<20;++f)r[111+f]="f"+f;for(f=0;f<=9;++f)r[f+96]=f.toString();m.prototype.bind=function(e,t,n){return this._bindMultiple.call(this,e=e instanceof Array?e:[e],t,n),this},m.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},m.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},m.prototype.reset=function(){return this._callbacks={},this._directMap={},this},m.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(function e(t,o){return null!==t&&t!==n&&(t===o||e(t.parentNode,o))}(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var o=e.composedPath()[0];o!==e.target&&(t=o)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},m.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},m.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);i=null},m.init=function(){var e=m(n);for(var t in e)"_"!==t.charAt(0)&&(m[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},m.init(),t.Mousetrap=m,e.exports&&(e.exports=m)}function l(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function p(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return r[e.which]?r[e.which]:a[e.which]?a[e.which]:String.fromCharCode(e.which).toLowerCase()}function u(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function d(e,t,n){return n||(n=function(){if(!i)for(var e in i={},r)e>95&&e<112||r.hasOwnProperty(e)&&(i[r[e]]=e);return i}()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function h(e,t){var n,o,i,r=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),i=0;i<n.length;++i)c[o=n[i]]&&(o=c[o]),t&&"keypress"!=t&&s[o]&&(o=s[o],r.push("shift")),u(o)&&r.push(o);return{key:o,modifiers:r,action:t=d(o,r,t)}}function m(e){var t=this;if(e=e||n,!(t instanceof m))return new m(e);t.target=e,t._callbacks={},t._directMap={};var o,i={},r=!1,a=!1,s=!1;function c(e){e=e||{};var t,n=!1;for(t in i)e[t]?n=!0:i[t]=0;n||(s=!1)}function f(e,n,o,r,a,s){var c,f,l,p=[],d=o.type;if(!t._callbacks[e])return[];for("keyup"==d&&u(e)&&(n=[e]),c=0;c<t._callbacks[e].length;++c)f=t._callbacks[e][c],(r||!f.seq||i[f.seq]==f.level)&&d==f.action&&(("keypress"!=d||o.metaKey||o.ctrlKey)&&(l=f.modifiers,n.sort().join(",")!==l.sort().join(","))||((!r&&f.combo==a||r&&f.seq==r&&f.level==s)&&t._callbacks[e].splice(c,1),p.push(f)));return p}function d(e,n,o,i){t.stopCallback(n,n.target||n.srcElement,o,i)||!1===e(n,o)&&(function(e){e.preventDefault?e.preventDefault():e.returnValue=!1}(n),function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}(n))}function v(e){"number"!=typeof e.which&&(e.which=e.keyCode);var n=p(e);n&&("keyup"!=e.type||r!==n?t.handleKey(n,function(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}(e),e):r=!1)}function y(e,n,a,l,u){t._directMap[e+":"+a]=n;var m,v=(e=e.replace(/\s+/g," ")).split(" ");v.length>1?function(e,t,n,a){function f(t){return function(){s=t,++i[e],clearTimeout(o),o=setTimeout(c,1e3)}}function l(t){d(n,t,e),"keyup"!==a&&(r=p(t)),setTimeout(c,10)}i[e]=0;for(var u=0;u<t.length;++u){var m=u+1===t.length?l:f(a||h(t[u+1]).action);y(t[u],m,a,e,u)}}(e,v,n,a):(m=h(e,a),t._callbacks[m.key]=t._callbacks[m.key]||[],f(m.key,m.modifiers,{type:m.action},l,e,u),t._callbacks[m.key][l?"unshift":"push"]({callback:n,modifiers:m.modifiers,action:m.action,seq:l,level:u,combo:e}))}t._handleKey=function(e,t,n){var o,i=f(e,t,n),r={},l=0,p=!1;for(o=0;o<i.length;++o)i[o].seq&&(l=Math.max(l,i[o].level));for(o=0;o<i.length;++o)if(i[o].seq){if(i[o].level!=l)continue;p=!0,r[i[o].seq]=1,d(i[o].callback,n,i[o].combo,i[o].seq)}else p||d(i[o].callback,n,i[o].combo);var h="keypress"==n.type&&a;n.type!=s||u(e)||h||c(r),a=p&&"keydown"==n.type},t._bindMultiple=function(e,t,n){for(var o=0;o<e.length;++o)y(e[o],t,n)},l(e,"keypress",v),l(e,"keydown",v),l(e,"keyup",v)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)}(t={exports:{}}),t.exports}(),o={sublime:"subl://open?url=file://{path}&line={line}&column={column}",textmate:"txmt://open?url=file://{path}&line={line}&column={column}",emacs:"emacs://open?url=file://{path}&line={line}&column={column}",macvim:"mvim://open/?url=file://{path}&line={line}&column={column}",phpstorm:"phpstorm://open?file={path}&line={line}&column={column}",webstorm:"phpstorm://open?file={path}&line={line}&column={column}",idea:"idea://open?file={path}&line={line}&column={column}",vscode:"vscode://file/{path}:{line}:{column}","vscode-insiders":"vscode-insiders://file/{path}:{line}:{column}",atom:"atom://core/open/file?filename={path}&line={line}&column={column}"};function i(e,t){return void 0===t&&(t=function(){return!0}),function e(t,n){return t.parentElement?n(t)?t:e(t.parentElement,n):null}(e,(function(e){return function(e){return e.hasOwnProperty("tagInfo")}(e)&&t(e)}))}function r(e){return i(e,(function(e){return!!e.tagInfo.component}))}function a(e){var t=document.createElement("div");if(t.innerHTML=e,0===t.childElementCount)throw new Error("Couldn't create elements from '"+e+"'");return 1===t.childElementCount?t.firstElementChild:Array.from(t.children)}var s="top",c="bottom",f="right",l="left",p=[s,c,f,l],u=p.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),d=[].concat(p,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),h=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function m(e){return e?(e.nodeName||"").toLowerCase():null}function v(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function y(e){return e instanceof v(e).Element||e instanceof Element}function g(e){return e instanceof v(e).HTMLElement||e instanceof HTMLElement}function b(e){return"undefined"!=typeof ShadowRoot&&(e instanceof v(e).ShadowRoot||e instanceof ShadowRoot)}function w(e){return e.split("-")[0]}function O(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function x(e){var t=O(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function E(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&b(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function k(e){return v(e).getComputedStyle(e)}function L(e){return["table","td","th"].indexOf(m(e))>=0}function P(e){return((y(e)?e.ownerDocument:e.document)||window.document).documentElement}function j(e){return"html"===m(e)?e:e.assignedSlot||e.parentNode||(b(e)?e.host:null)||P(e)}function C(e){return g(e)&&"fixed"!==k(e).position?e.offsetParent:null}function _(e){for(var t=v(e),n=C(e);n&&L(n)&&"static"===k(n).position;)n=C(n);return n&&("html"===m(n)||"body"===m(n)&&"static"===k(n).position)?t:n||function(e){for(var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),n=j(e);g(n)&&["html","body"].indexOf(m(n))<0;){var o=k(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||t}function M(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var D=Math.max,T=Math.min,A=Math.round;function S(e,t,n){return D(e,T(t,n))}function I(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function H(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function B(e){var t,n=e.popper,o=e.popperRect,i=e.placement,r=e.offsets,a=e.position,p=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=!0===d?function(e){var t=e.y,n=window.devicePixelRatio||1;return{x:A(A(e.x*n)/n)||0,y:A(A(t*n)/n)||0}}(r):"function"==typeof d?d(r):r,m=h.x,y=void 0===m?0:m,g=h.y,b=void 0===g?0:g,w=r.hasOwnProperty("x"),O=r.hasOwnProperty("y"),x=l,E=s,L=window;if(u){var j=_(n),C="clientHeight",M="clientWidth";j===v(n)&&"static"!==k(j=P(n)).position&&(C="scrollHeight",M="scrollWidth"),j=j,i===s&&(E=c,b-=j[C]-o.height,b*=p?1:-1),i===l&&(x=f,y-=j[M]-o.width,y*=p?1:-1)}var D,T=Object.assign({position:a},u&&q);return Object.assign({},T,p?((D={})[E]=O?"0":"",D[x]=w?"0":"",D.transform=(L.devicePixelRatio||1)<2?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",D):((t={})[E]=O?b+"px":"",t[x]=w?y+"px":"",t.transform="",t))}var N={passive:!0},R={left:"right",right:"left",bottom:"top",top:"bottom"};function W(e){return e.replace(/left|right|bottom|top/g,(function(e){return R[e]}))}var K={start:"end",end:"start"};function U(e){return e.replace(/start|end/g,(function(e){return K[e]}))}function V(e){var t=v(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function z(e){return O(P(e)).left+V(e).scrollLeft}function Y(e){var t=k(e);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function X(e,t){var n;void 0===t&&(t=[]);var o=function e(t){return["html","body","#document"].indexOf(m(t))>=0?t.ownerDocument.body:g(t)&&Y(t)?t:e(j(t))}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),r=v(o),a=i?[r].concat(r.visualViewport||[],Y(o)?o:[]):o,s=t.concat(a);return i?s:s.concat(X(j(a)))}function F(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function $(e,t){return"viewport"===t?F(function(e){var t=v(e),n=P(e),o=t.visualViewport,i=n.clientWidth,r=n.clientHeight,a=0,s=0;return o&&(i=o.width,r=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=o.offsetLeft,s=o.offsetTop)),{width:i,height:r,x:a+z(e),y:s}}(e)):g(t)?function(e){var t=O(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):F(function(e){var t,n=P(e),o=V(e),i=null==(t=e.ownerDocument)?void 0:t.body,r=D(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=D(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-o.scrollLeft+z(e),c=-o.scrollTop;return"rtl"===k(i||n).direction&&(s+=D(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:s,y:c}}(P(e)))}function J(e){return e.split("-")[1]}function G(e){var t,n=e.reference,o=e.element,i=e.placement,r=i?w(i):null,a=i?J(i):null,p=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2;switch(r){case s:t={x:p,y:n.y-o.height};break;case c:t={x:p,y:n.y+n.height};break;case f:t={x:n.x+n.width,y:u};break;case l:t={x:n.x-o.width,y:u};break;default:t={x:n.x,y:n.y}}var d=r?M(r):null;if(null!=d){var h="y"===d?"height":"width";switch(a){case"start":t[d]=t[d]-(n[h]/2-o[h]/2);break;case"end":t[d]=t[d]+(n[h]/2-o[h]/2)}}return t}function Q(e,t){void 0===t&&(t={});var n=t.placement,o=void 0===n?e.placement:n,i=t.boundary,r=void 0===i?"clippingParents":i,a=t.rootBoundary,l=void 0===a?"viewport":a,u=t.elementContext,d=void 0===u?"popper":u,h=t.altBoundary,v=void 0!==h&&h,b=t.padding,w=void 0===b?0:b,x=I("number"!=typeof w?w:H(w,p)),L=e.elements.reference,C=e.rects.popper,M=e.elements[v?"popper"===d?"reference":"popper":d],A=function(e,t,n){var o="clippingParents"===t?function(e){var t=X(j(e)),n=["absolute","fixed"].indexOf(k(e).position)>=0&&g(e)?_(e):e;return y(n)?t.filter((function(e){return y(e)&&E(e,n)&&"body"!==m(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),r=i.reduce((function(t,n){var o=$(e,n);return t.top=D(o.top,t.top),t.right=T(o.right,t.right),t.bottom=T(o.bottom,t.bottom),t.left=D(o.left,t.left),t}),$(e,i[0]));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(y(M)?M:M.contextElement||P(e.elements.popper),r,l),S=O(L),q=G({reference:S,element:C,strategy:"absolute",placement:o}),B=F(Object.assign({},C,q)),N="popper"===d?B:S,R={top:A.top-N.top+x.top,bottom:N.bottom-A.bottom+x.bottom,left:A.left-N.left+x.left,right:N.right-A.right+x.right},W=e.modifiersData.offset;if("popper"===d&&W){var K=W[o];Object.keys(R).forEach((function(e){var t=[f,c].indexOf(e)>=0?1:-1,n=[s,c].indexOf(e)>=0?"y":"x";R[e]+=K[n]*t}))}return R}function Z(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,i=t.padding,r=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?d:a,c=J(t.placement),f=c?r?u:u.filter((function(e){return J(e)===c})):p,l=f.filter((function(e){return s.indexOf(e)>=0}));0===l.length&&(l=f);var h=l.reduce((function(t,r){return t[r]=Q(e,{placement:r,boundary:n,rootBoundary:o,padding:i})[w(r)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}function ee(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function te(e){return[s,f,c,l].some((function(t){return e[t]>=0}))}function ne(e,t,n){void 0===n&&(n=!1);var o,i,r=P(t),a=O(e),s=g(t),c={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(s||!s&&!n)&&(("body"!==m(t)||Y(r))&&(c=(o=t)!==v(o)&&g(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:V(o)),g(t)?((f=O(t)).x+=t.clientLeft,f.y+=t.clientTop):r&&(f.x=z(r))),{x:a.left+c.scrollLeft-f.x,y:a.top+c.scrollTop-f.y,width:a.width,height:a.height}}var oe={placement:"bottom",modifiers:[],strategy:"absolute"};function ie(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function re(e){void 0===e&&(e={});var t=e.defaultModifiers,n=void 0===t?[]:t,o=e.defaultOptions,i=void 0===o?oe:o;return function(e,t,o){void 0===o&&(o=i);var r,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},oe,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},c=[],f=!1,l={state:s,setOptions:function(o){p(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:y(e)?X(e):e.contextElement?X(e.contextElement):[],popper:X(t)};var r,a,f=function(e){var t=function(e){var t=new Map,n=new Set,o=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||function e(i){n.add(i.name),[].concat(i.requires||[],i.requiresIfExists||[]).forEach((function(o){if(!n.has(o)){var i=t.get(o);i&&e(i)}})),o.push(i)}(e)})),o}(e);return h.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((r=[].concat(n,s.options.modifiers),a=r.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(a).map((function(e){return a[e]}))));return s.orderedModifiers=f.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.options,n=e.effect;if("function"==typeof n){var o=n({state:s,name:e.name,instance:l,options:void 0===t?{}:t});c.push(o||function(){})}})),l.update()},forceUpdate:function(){if(!f){var e=s.elements,t=e.reference,n=e.popper;if(ie(t,n)){s.rects={reference:ne(t,_(n),"fixed"===s.options.strategy),popper:x(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var o=0;o<s.orderedModifiers.length;o++)if(!0!==s.reset){var i=s.orderedModifiers[o],r=i.fn,a=i.options;"function"==typeof r&&(s=r({state:s,options:void 0===a?{}:a,name:i.name,instance:l})||s)}else s.reset=!1,o=-1}}},update:(r=function(){return new Promise((function(e){l.forceUpdate(),e(s)}))},function(){return a||(a=new Promise((function(e){Promise.resolve().then((function(){a=void 0,e(r())}))}))),a}),destroy:function(){p(),f=!0}};if(!ie(e,t))return l;function p(){c.forEach((function(e){return e()})),c=[]}return l.setOptions(o).then((function(e){!f&&o.onFirstUpdate&&o.onFirstUpdate(e)})),l}}var ae=re({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=e.options,i=o.scroll,r=void 0===i||i,a=o.resize,s=void 0===a||a,c=v(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&f.forEach((function(e){e.addEventListener("scroll",n.update,N)})),s&&c.addEventListener("resize",n.update,N),function(){r&&f.forEach((function(e){e.removeEventListener("scroll",n.update,N)})),s&&c.removeEventListener("resize",n.update,N)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=G({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,o=n.gpuAcceleration,i=void 0===o||o,r=n.adaptive,a=void 0===r||r,s=n.roundOffsets,c=void 0===s||s,f={placement:w(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,B(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,B(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];g(i)&&m(i)&&(Object.assign(i.style,n),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});g(o)&&m(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=e.options.offset,i=void 0===o?[0,0]:o,r=d.reduce((function(e,n){return e[n]=function(e,t,n){var o=w(e),i=[l,s].indexOf(o)>=0?-1:1,r="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=r[0],c=r[1];return a=a||0,c=(c||0)*i,[l,f].indexOf(o)>=0?{x:c,y:a}:{x:a,y:c}}(n,t.rects,i),e}),{}),a=r[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=r}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var i=n.mainAxis,r=void 0===i||i,a=n.altAxis,p=void 0===a||a,u=n.fallbackPlacements,d=n.padding,h=n.boundary,m=n.rootBoundary,v=n.altBoundary,y=n.flipVariations,g=void 0===y||y,b=n.allowedAutoPlacements,O=t.options.placement,x=w(O),E=u||(x!==O&&g?function(e){if("auto"===w(e))return[];var t=W(e);return[U(e),t,U(t)]}(O):[W(O)]),k=[O].concat(E).reduce((function(e,n){return e.concat("auto"===w(n)?Z(t,{placement:n,boundary:h,rootBoundary:m,padding:d,flipVariations:g,allowedAutoPlacements:b}):n)}),[]),L=t.rects.reference,P=t.rects.popper,j=new Map,C=!0,_=k[0],M=0;M<k.length;M++){var D=k[M],T=w(D),A="start"===J(D),S=[s,c].indexOf(T)>=0,I=S?"width":"height",H=Q(t,{placement:D,boundary:h,rootBoundary:m,altBoundary:v,padding:d}),q=S?A?f:l:A?c:s;L[I]>P[I]&&(q=W(q));var B=W(q),N=[];if(r&&N.push(H[T]<=0),p&&N.push(H[q]<=0,H[B]<=0),N.every((function(e){return e}))){_=D,C=!1;break}j.set(D,N)}if(C)for(var R=function(e){var t=k.find((function(t){var n=j.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return _=t,"break"},K=g?3:1;K>0&&"break"!==R(K);K--);t.placement!==_&&(t.modifiersData[o]._skip=!0,t.placement=_,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,o=e.name,i=n.mainAxis,r=void 0===i||i,a=n.altAxis,p=void 0!==a&&a,u=n.tether,d=void 0===u||u,h=n.tetherOffset,m=void 0===h?0:h,v=Q(t,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),y=w(t.placement),g=J(t.placement),b=!g,O=M(y),E="x"===O?"y":"x",k=t.modifiersData.popperOffsets,L=t.rects.reference,P=t.rects.popper,j="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,C={x:0,y:0};if(k){if(r||p){var A="y"===O?s:l,I="y"===O?c:f,H="y"===O?"height":"width",q=k[O],B=k[O]+v[A],N=k[O]-v[I],R=d?-P[H]/2:0,W="start"===g?L[H]:P[H],K="start"===g?-P[H]:-L[H],U=t.elements.arrow,V=d&&U?x(U):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Y=z[A],X=z[I],F=S(0,L[H],V[H]),$=b?L[H]/2-R-F-Y-j:W-F-Y-j,G=b?-L[H]/2+R+F+X+j:K+F+X+j,Z=t.elements.arrow&&_(t.elements.arrow),ee=t.modifiersData.offset?t.modifiersData.offset[t.placement][O]:0,te=k[O]+$-ee-(Z?"y"===O?Z.clientTop||0:Z.clientLeft||0:0),ne=k[O]+G-ee;if(r){var oe=S(d?T(B,te):B,q,d?D(N,ne):N);k[O]=oe,C[O]=oe-q}if(p){var ie=k[E],re=ie+v["x"===O?s:l],ae=ie-v["x"===O?c:f],se=S(d?T(re,te):re,ie,d?D(ae,ne):ae);k[E]=se,C[E]=se-ie}}t.modifiersData[o]=C}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,o=e.name,i=e.options,r=n.elements.arrow,a=n.modifiersData.popperOffsets,u=w(n.placement),d=M(u),h=[l,f].indexOf(u)>=0?"height":"width";if(r&&a){var m=function(e,t){return I("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:H(e,p))}(i.padding,n),v=x(r),y="y"===d?s:l,g="y"===d?c:f,b=n.rects.reference[h]+n.rects.reference[d]-a[d]-n.rects.popper[h],O=a[d]-n.rects.reference[d],E=_(r),k=E?"y"===d?E.clientHeight||0:E.clientWidth||0:0,L=k/2-v[h]/2+(b/2-O/2),P=S(m[y],L,k-v[h]-m[g]);n.modifiersData[o]=((t={})[d]=P,t.centerOffset=P-L,t)}},effect:function(e){var t=e.state,n=e.options.element,o=void 0===n?"[data-popper-arrow]":n;null!=o&&("string"!=typeof o||(o=t.elements.popper.querySelector(o)))&&E(t.elements.popper,o)&&(t.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,o=t.rects.reference,i=t.rects.popper,r=t.modifiersData.preventOverflow,a=Q(t,{elementContext:"reference"}),s=Q(t,{altBoundary:!0}),c=ee(a,o),f=ee(s,i,r),l=te(c),p=te(f);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":p})}}]}),se={theme:"light",editor:"vscode",shortcuts:{open:"d",inspect:"a a",inspectComponent:"c c",inspectParent:"e"}},ce=function(){function e(e){this._enabled=!1,this.inspectComponentOnly=!1,this.options=t({},se,e),this.createElements(),this.addEventListeners(),this.registerHotkeys(),this.keepUpdatingOnEvents()}var s,c=e.prototype;return c.createElements=function(){var e=this.options.theme,t=document.body,n=a('<div id="view-launcher-indicator" class="--'+e+'" style="visibility: hidden"></div>'),o=a('<div id="view-launcher-tooltip" class="--'+e+'" style="visibility: hidden">\n<div class="__tag-info"></div>\n<div class="__view-name"></div>\n</div>'),i=o.querySelector(".__tag-info"),r=o.querySelector(".__view-name");t.appendChild(n),t.appendChild(o),this.popper=ae(n,o,{placement:"top-start",modifiers:[{name:"offset",options:{offset:[0,5]}},{name:"eventListeners",enabled:!1}]}),this.indicator=n,this.tooltip=o,this.tagInfo=i,this.viewName=r},c.addEventListeners=function(){var e=this;Array.from(document.querySelectorAll("[data-tag-info]")).filter((function(e){e.tagInfo=JSON.parse(e.dataset.tagInfo),e.removeAttribute("data-tag-info");var t=getComputedStyle(e);return!(["HTML","HEAD","BODY","SCRIPT","NOSCRIPT","META","LINK","STYLE","TITLE","BASE"].includes(e.tagName)||"none"===t.display||"hidden"===t.visibility)})).forEach((function(t){t.addEventListener("mouseenter",(function(){if(e.inspectComponentOnly&&!t.tagInfo.component){var n=r(t);n&&e.setElement(n)}else e.setElement(t)})),t.addEventListener("mouseleave",(function(t){var n=t.relatedTarget;if(n instanceof Element){var o=e.inspectComponentOnly?r(n):i(n);o&&e.setElement(o)}}))}))},c.registerHotkeys=function(){var e=this,t=this.options,r=t.shortcuts,a=t.editor;n.bind(r.inspect,(function(){e.inspectComponentOnly=!1,e.toggleEnable()})),n.bind(r.inspectComponent,(function(){e.inspectComponentOnly=!0,e.toggleEnable()})),n.bind(r.open,(function(){if(e.enabled&&e.element){var t,n,i,r=e.element.tagInfo;window.location.href=(n=(t={editor:a,viewPath:r.view,line:r.line,column:r.column}).line,i=t.column,function(e,t){return t?e.replace("{column}",t.toString()):e.replace("&column={column}","").replace(":{column}","")}(function(e,t){return t?e.replace("{line}",t.toString()):e.replace("&line={line}&column={column}","").replace(":{line}:{column}","")}(o[t.editor].replace("{path}",encodeURIComponent(t.viewPath)),n),i))}})),n.bind(r.inspectParent,(function(){var t;if(null!=(t=e.element)&&t.parentElement){var n=i(e.element.parentElement);n&&e.setElement(n)}})),n.bind("esc",(function(){e.disable()}))},c.keepUpdatingOnEvents=function(){var e=this;window.addEventListener("scroll",this.update.bind(this)),window.addEventListener("resize",this.update.bind(this));var t=document.body;new MutationObserver((function(){e.addEventListeners()})).observe(t,{attributes:!1,childList:!0,subtree:!0})},e.create=function(t){if(void 0===t&&(t={}),e.instance)return e.instance;var n=new e(t);return e.instance=n},c.setElement=function(e){this.element=e,this.update()},c.update=function(){var e=this.element;if(e&&!this.disabled){var t=this.indicator.style,n=e.getBoundingClientRect(),o=document.documentElement.clientHeight,i=n.top+n.height>o,r=n.top>0?i?o-n.top:n.height:i?o:n.height+n.top;t.width=n.width+"px",t.height=r+"px",t.left=n.left+"px",t.top=(n.top>0?n.top:0)+"px";var a=Array.from(e.classList).join("."),s=e.tagName.toLowerCase(),c=e.tagInfo.view.match(/[^/\\]+?$/)[0];this.tagInfo.innerHTML=(e.tagInfo.component?'<i class="__is-component"></i>':"")+(e.tagInfo.component||s+(a?"."+a:"")),this.viewName.innerText=c,this.popper.setOptions({modifiers:[{name:"offset",options:{offset:i&&n.top<0?[6,-(this.tooltip.clientHeight+5)]:[0,5]}}]}),this.popper.update()}},c.setPopperEventListeners=function(e){this.popper.setOptions({modifiers:[{name:"eventListeners",enabled:e}]})},c.hide=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="hidden"}))},c.show=function(){[this.indicator,this.tooltip].forEach((function(e){e.style.visibility="visible"}))},c.enable=function(){this._enabled=!0,this.setPopperEventListeners(!0),this.update(),this.show()},c.disable=function(){this._enabled=!1,this.element=void 0,this.setPopperEventListeners(!1),this.hide()},c.toggleEnable=function(){this.enabled?this.disable():this.enable()},(s=[{key:"enabled",get:function(){return this._enabled}},{key:"disabled",get:function(){return!this._enabled}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(e.prototype,s),e}();e.ElementIndicator=ce,e.defaultOptions=se,e.viewLauncher=function(e){void 0===e&&(e={}),ce.create(e)},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=view-launcher.umd.production.min.js.map
{
"name": "view-launcher",
"author": "yaquawa",
"version": "1.1.6",
"version": "1.1.7",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -13,7 +13,9 @@ <div align="center">

## Table of Contents
- [Motivation](#motivation)
- [Usage](#usage)
- [Options](#options)
- [Demo](#demo)
- [Usage](#-usage)
- [Options](#%EF%B8%8F-options)
- [Supported Editors](#%EF%B8%8F-supported-editors)
- [How does it work?](#how-does-it-work)
- [How does it work?](#-how-does-it-work)
- [Contribution](#contribution)

@@ -32,9 +34,23 @@

## Demo
A full demo(for [Vue.js](https://vuejs.org/) using [Vite](https://vitejs.dev/)) can be found at the [playground](https://github.com/view-launcher/view-launcher/tree/master/playground) directory.
If you'd like to have it a try, just cd into `playground` run `yarn dev`.
The default shortcuts for inspecting elements are:
| Key | Action |
|-------|----------------------------------------------------------|
| `A A` | Toggle inspect mode |
| `C C` | Toggle inspect mode, but only inspect components |
| `D` | Open with your editor(the default setting is VSCode) |
| `E` | Inspect the parent element of current inspecting element |
## 🔰 Usage
Notice: This is the usage guide for client-side lib of ViewLauncher.
Notice: This is the usage guide for client-side lib of ViewLauncher.
For framework specific installation guide see:
* [Vue.js](https://github.com/view-launcher/vue-view-launcher)(Rollup/Vite/Webpack)
* [Laravel Blade](https://github.com/view-launcher/blade-view-launcher)
* [Vue.js](https://github.com/view-launcher/vue) (Rollup/Vite/Webpack)
* [Laravel Blade](https://github.com/view-launcher/blade)
You can ignore this if you are using one of the above packages, you are going to have the same option in there.
You can ignore this if you are using one of the above packages, you are going to have the same options in there.

@@ -127,4 +143,4 @@ ```js

ViewLauncher(client-side lib) is going to use the information taken from `data-tag-info` to open the view files.
The `data-tag-info` attribute should be injected automatically at the compile-time of view file.
ViewLauncher(client-side lib) is going to use the information taken from `data-tag-info` to open the view files.
The `data-tag-info` attribute should be injected automatically at the compile-time of view file.
For instance, in the case of Vue-SFC, `data-tag-info` attributes are injected at the load/transform stage of your bundler.

@@ -131,0 +147,0 @@

@@ -127,2 +127,3 @@ import Mousetrap from 'mousetrap'

},
{ name: 'eventListeners', enabled: false },
],

@@ -165,6 +166,2 @@ })

element.addEventListener('mouseenter', () => {
if (this.disabled) {
return
}
const isComponent = !!(element as InspectableElement).tagInfo.component

@@ -187,3 +184,3 @@

if (this.disabled || !(relatedTarget instanceof Element)) {
if (!(relatedTarget instanceof Element)) {
return

@@ -249,4 +246,4 @@ }

// update on window scroll and resize
window.addEventListener('scroll', this.update)
window.addEventListener('resize', this.update)
window.addEventListener('scroll', this.update.bind(this))
window.addEventListener('resize', this.update.bind(this))

@@ -275,3 +272,3 @@ // update on document mutation

this.element = element
this.show()
this.update()

@@ -281,3 +278,4 @@ }

update() {
if (!this.element || this.disabled) {
const element = this.element
if (!element || this.disabled) {
return

@@ -287,3 +285,3 @@ }

const indicatorStyle = this.indicator.style
const rect = this.element.getBoundingClientRect()
const rect = element.getBoundingClientRect()
const windowHeight = document.documentElement.clientHeight

@@ -305,3 +303,2 @@ const overflowWinBottom = rect.top + rect.height > windowHeight

const element = this.element
const classes = Array.from(element.classList).join('.')

@@ -328,4 +325,8 @@ const tagName = element.tagName.toLowerCase()

this.popper.update()
}
this.show()
setPopperEventListeners(enabled: boolean) {
this.popper.setOptions({
modifiers: [{ name: 'eventListeners', enabled }],
})
}

@@ -347,3 +348,5 @@

this._enabled = true
document.body.classList.add('view-launcher-inspecting')
this.setPopperEventListeners(true)
this.update()
this.show()
}

@@ -354,4 +357,4 @@

this.element = undefined
this.setPopperEventListeners(false)
this.hide()
document.body.classList.remove('view-launcher-inspecting')
}

@@ -358,0 +361,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc