1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[29444],{444(e,t,o){o.r(t),o.d(t,{default:()=>s});let i=window.PluginBaseClass;class s extends i{static #e=this.options={url:null,toggle:!1,title:"",placement:"top",animation:!1,template:null};init(){this._loaded=!1,this._scheduled=null,this._isMouseOverPopover=!1,this._popover=new bootstrap.Popover(this.el,{html:!0,sanitize:!1,animation:this.options.animation,title:this.options.title,placement:this.options.placement,content:()=>this._getTemplateContent()||""}),this._getTemplateContent()&&(this._loaded=!0),this._registerEvents()}_getTemplateContent(){if(!this.options.template)return null;let e=document.querySelector(this.options.template);return e?(e.tagName,e.innerHTML):null}_registerEvents(){if(this.options.toggle){this.el.addEventListener("click",e=>{e.preventDefault(),this._togglePopover()});return}this.el.addEventListener("mouseenter",()=>this._showPopover()),this.el.addEventListener("mouseleave",()=>this._scheduleHidePopover())}_togglePopover(){let e=this._getTemplateContent();if(e){this._popover.setContent({".popover-body":e}),this._popover.toggle(),window.PluginManager.initializePlugins(),this._loaded=!0,this._attachPopoverEvents();return}this._loaded?(this._popover.toggle(),window.PluginManager.initializePlugins()):fetch(this.options.url).then(e=>e.text()).then(e=>{this._popover.setContent({".popover-body":e}),this._popover.show(),window.PluginManager.initializePlugins(),this._loaded=!0})}_showPopover(){if(this._scheduled){clearTimeout(this._scheduled),this._scheduled=null;return}let e=this._getTemplateContent();if(e){this._popover.setContent({".popover-body":e}),this._popover.show(),this._loaded=!0,this._attachPopoverEvents();return}this._loaded?(this._popover.show(),this._attachPopoverEvents()):fetch(this.options.url).then(e=>e.text()).then(e=>{this._popover.setContent({".popover-body":e}),this._popover.show(),this._loaded=!0,this._attachPopoverEvents()})}_scheduleHidePopover(){this._scheduled||(this._scheduled=setTimeout(()=>{this._isMouseOverPopover||(this._popover.hide(),this._scheduled=null)},200))}_attachPopoverEvents(){window.PluginManager.initializePlugins(),setTimeout(()=>{let e=this._popover.tip;e&&(e.addEventListener("mouseenter",()=>{clearTimeout(this._scheduled),this._scheduled=null,this._isMouseOverPopover=!0}),e.addEventListener("mouseleave",()=>{this._isMouseOverPopover=!1,this._scheduleHidePopover()}))},50)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.