- md5
- 559731a01a7533775fc2cfafadb28421
- sha1
- 74f4cf8f7d824156e43bb446f14ee23d0cb1c5da
- sha256
- cf09b7a6412ac34b812ec8abcf1363f553040d34b6c4aeca7f509be66c521cfc
import{o as onDOMContentLoaded,B as BaseComponent,D as Data,E as EventHandler,j as findShadowRoot,k as getUID,n as noop,a as getTransitionDurationFromElement,T as TRANSITION_END,e as emulateTransitionEnd,S as SelectorEngine,f as isElement,M as Manipulator,c as typeCheckConfig,b as getjQuery,h as isRTL}from"./dom-8eef6b5f.js";import{P as Popper,c as createPopper}from"./popper-5304749a.js";const uriAttrs=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,allowedAttribute=(t,e)=>{const o=t.nodeName.toLowerCase();if(e.includes(o))return!uriAttrs.has(o)||Boolean(t.nodeValue.match(SAFE_URL_PATTERN)||t.nodeValue.match(DATA_URL_PATTERN));const n=e.filter((t=>t instanceof RegExp));for(let t=0,e=n.length;t<e;t++)if(o.match(n[t]))return!0;return!1},DefaultAllowlist={"*":["class","dir","id","lang","role",ARIA_ATTRIBUTE_PATTERN],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function sanitizeHtml(t,e,o){if(!t.length)return t;if(o&&"function"==typeof o)return o(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),i=Object.keys(e),s=[].concat(...n.body.querySelectorAll("*"));for(let t=0,o=s.length;t<o;t++){const o=s[t],n=o.nodeName.toLowerCase();if(!i.includes(n)){o.parentNode.removeChild(o);continue}const a=[].concat(...o.attributes),r=[].concat(e["*"]||[],e[n]||[]);a.forEach((t=>{allowedAttribute(t,r)||o.removeAttribute(t.nodeName)}))}return n.body.innerHTML}const NAME="tooltip",DATA_KEY="bs.tooltip",EVENT_KEY=".bs.tooltip",CLASS_PREFIX="bs-tooltip",BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)bs-tooltip\\S+","g"),DISALLOWED_ATTRIBUTES=new Set(["sanitize","allowList","sanitizeFn"]),DefaultType={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",container:"(string|element|boolean)",fallbackPlacements:"(null|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object)"},AttachmentMap={AUTO:"auto",TOP:"top",RIGHT:isRTL?"left":"right",BOTTOM:"bottom",LEFT:isRTL?"right":"left"},Default={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",container:!1,fallbackPlacements:null,boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:DefaultAllowlist,popperConfig:null},Event={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},CLASS_NAME_FADE="fade",CLASS_NAME_MODAL="modal",CLASS_NAME_SHOW="show",HOVER_STATE_SHOW="show",HOVER_STATE_OUT="out",SELECTOR_TOOLTIP_INNER=".tooltip-inner",TRIGGER_HOVER="hover",TRIGGER_FOCUS="focus",TRIGGER_CLICK="click",TRIGGER_MANUAL="manual";class Tooltip extends BaseComponent{constructor(t,e){if(void 0===Popper)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Default}static get NAME(){return NAME}static get DATA_KEY(){return DATA_KEY}static get Event(){return Event}static get EVENT_KEY(){return EVENT_KEY}static get DefaultType(){return DefaultType}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this.constructor.DATA_KEY;let o=Data.getData(t.delegateTarget,e);o||(o=new this.constructor(t.delegateTarget,this._getDelegateConfig()),Data.setData(t.delegateTarget,e,o)),o._activeTrigger.click=!o._activeTrigger.click,o._isWithActiveTrigger()?o._enter(null,o):o._leave(null,o)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),EventHandler.off(this._element,this.constructor.EVENT_KEY),EventHandler.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode.removeChild(this.tip),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.config=null,this.tip=null,super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(this.isWithContent()&&this._isEnabled){const t=EventHandler.trigger(this._element,this.constructor.Event.SHOW),e=findShadowRoot(this._element),o=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!o)return;const n=this.getTipElement(),i=getUID(this.constructor.NAME);n.setAttribute("id",i),this._element.setAttribute("aria-describedby",i),this.setContent(),this.config.animation&&n.classList.add("fade");const s="function"==typeof this.config.placement?this.config.placement.call(this,n,this._element):this.config.placement,a=this._getAttachment(s);this._addAttachmentClass(a);const r=this._getContainer();Data.setData(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||r.appendChild(n),EventHandler.trigger(this._element,this.constructor.Event.INSERTED),this._popper=createPopper(this._element,n,this._getPopperConfig(a)),n.classList.add("show");const l="function"==typeof this.config.customClass?this.config.customClass():this.config.customClass;l&&n.classList.add(...l.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{EventHandler.on(t,"mouseover",noop())}));const c=()=>{const t=this._hoverState;this._hoverState=null,EventHandler.trigger(this._element,this.constructor.Event.SHOWN),"out"===t&&this._leave(null,this)};if(this.tip.classList.contains("fade")){const t=getTransitionDurationFromElement(this.tip);EventHandler.one(this.tip,TRANSITION_END,c),emulateTransitionEnd(this.tip,t)}else c()}}hide(){if(!this._popper)return;const t=this.getTipElement(),e=()=>{"show"!==this._hoverState&&t.parentNode&&t.parentNode.removeChild(t),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),EventHandler.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null)};if(!EventHandler.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented){if(t.classList.remove("show"),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>EventHandler.off(t,"mouseover",noop))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this.tip.classList.contains("fade")){const o=getTransitionDurationFromElement(t);EventHandler.one(t,TRANSITION_END,e),emulateTransitionEnd(t,o)}else e();this._hoverState=""}}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");return t.innerHTML=this.config.template,this.tip=t.children[0],this.tip}setContent(){const t=this.getTipElement();this.setElementContent(SelectorEngine.findOne(".tooltip-inner",t),this.getTitle()),t.classList.remove("fade","show")}setElementContent(t,e){if(null!==t)return"object"==typeof e&&isElement(e)?(e.jquery&&(e=e[0]),void(this.config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this.config.html?(this.config.sanitize&&(e=sanitizeHtml(e,this.config.allowList,this.config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){let t=this._element.getAttribute("data-bs-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this._element):this.config.title),t}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_getPopperConfig(t){const e={name:"flip",options:{altBoundary:!0}};this.config.fallbackPlacements&&(e.options.fallbackPlacements=this.config.fallbackPlacements);return{...{placement:t,modifiers:[e,{name:"preventOverflow",options:{rootBoundary:this.config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}},...this.config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`bs-tooltip-${this.updateAttachment(t)}`)}_getContainer(){return!1===this.config.container?document.body:isElement(this.config.container)?this.config.container:SelectorEngine.findOne(this.config.container)}_getAttachment(t){return AttachmentMap[t.toUpperCase()]}_setListeners(){this.config.trigger.split(" ").forEach((t=>{if("click"===t)EventHandler.on(this._element,this.constructor.Event.CLICK,this.config.selector,(t=>this.toggle(t)));else if("manual"!==t){const e="hover"===t?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,o="hover"===t?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;EventHandler.on(this._element,e,this.config.selector,(t=>this._enter(t))),EventHandler.on(this._element,o,this.config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},EventHandler.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.config.selector?this.config={...this.config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){const o=this.constructor.DATA_KEY;(e=e||Data.getData(t.delegateTarget,o))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),Data.setData(t.delegateTarget,o,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((()=>{"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())}_leave(t,e){const o=this.constructor.DATA_KEY;(e=e||Data.getData(t.delegateTarget,o))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),Data.setData(t.delegateTarget,o,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((()=>{"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=Manipulator.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{DISALLOWED_ATTRIBUTES.has(t)&&delete e[t]})),t&&"object"==typeof t.container&&t.container.jquery&&(t.container=t.container[0]),"number"==typeof(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),typeCheckConfig(NAME,t,this.constructor.DefaultType),t.sanitize&&(t.template=sanitizeHtml(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};if(this.config)for(const e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=t.getAttribute("class").match(BSCLS_PREFIX_REGEX);null!==e&&e.length>0&&e.map((t=>t.trim())).forEach((e=>t.classList.remove(e)))}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}static jQueryInterface(t){return this.each((function(){let e=Data.getData(this,DATA_KEY);const o="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new Tooltip(this,o)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}onDOMContentLoaded((()=>{const t=getjQuery();if(t){const e=t.fn[NAME];t.fn[NAME]=Tooltip.jQueryInterface,t.fn[NAME].Constructor=Tooltip,t.fn[NAME].noConflict=()=>(t.fn[NAME]=e,Tooltip.jQueryInterface)}}));const NAME$1="popover",DATA_KEY$1="bs.popover",EVENT_KEY$1=".bs.popover",CLASS_PREFIX$1="bs-popover",BSCLS_PREFIX_REGEX$1=new RegExp("(^|\\s)bs-popover\\S+","g"),Default$1={...Tooltip.Default,placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},DefaultType$1={...Tooltip.DefaultType,content:"(string|element|function)"},Event$1={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},CLASS_NAME_FADE$1="fade",CLASS_NAME_SHOW$1="show",SELECTOR_TITLE=".popover-header",SELECTOR_CONTENT=".popover-body";class Popover extends Tooltip{static get Default(){return Default$1}static get NAME(){return NAME$1}static get DATA_KEY(){return DATA_KEY$1}static get Event(){return Event$1}static get EVENT_KEY(){return EVENT_KEY$1}static get DefaultType(){return DefaultType$1}isWithContent(){return this.getTitle()||this._getContent()}setContent(){const t=this.getTipElement();this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE,t),this.getTitle());let e=this._getContent();"function"==typeof e&&(e=e.call(this._element)),this.setElementContent(SelectorEngine.findOne(".popover-body",t),e),t.classList.remove("fade","show")}_addAttachmentClass(t){this.getTipElement().classList.add(`bs-popover-${this.updateAttachment(t)}`)}_getContent(){return this._element.getAttribute("data-bs-content")||this.config.content}_cleanTipClass(){const t=this.getTipElement(),e=t.getAttribute("class").match(BSCLS_PREFIX_REGEX$1);null!==e&&e.length>0&&e.map((t=>t.trim())).forEach((e=>t.classList.remove(e)))}static jQueryInterface(t){return this.each((function(){let e=Data.getData(this,DATA_KEY$1);const o="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new Popover(this,o),Data.setData(this,DATA_KEY$1,e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}if(onDOMContentLoaded((()=>{const t=getjQuery();if(t){const e=t.fn.popover;t.fn.popover=Popover.jQueryInterface,t.fn.popover.Constructor=Popover,t.fn.popover.noConflict=()=>(t.fn.popover=e,Popover.jQueryInterface)}})),window.bootstrap=window.bootstrap||{},window.bootstrap.Popover=Popover,window.bootstrap.Tooltip=Tooltip,Object.prototype.hasOwnProperty.call(document.body.dataset,"bsNoJquery")||(document.body.dataset.bsNoJquery=""),Joomla&&Joomla.getOptions){const t=Joomla.getOptions("bootstrap.tooltip"),e=Joomla.getOptions("bootstrap.popover");"object"==typeof e&&null!==e&&Object.keys(e).forEach((t=>{const o=e[t],n={animation:!o.animation||o.animation,container:!!o.container&&o.container,content:o.content?o.content:"",delay:o.delay?o.delay:0,html:!!o.html&&o.html,placement:o.placement?o.placement:"top",selector:!!o.selector&&o.selector,title:o.title?o.title:"",trigger:o.trigger?o.trigger:"click",offset:o.offset?o.offset:0,fallbackPlacement:o.fallbackPlacement?o.fallbackPlacement:"flip",boundary:o.boundary?o.boundary:"scrollParent",customClass:o.customClass?o.customClass:"",sanitize:!o.sanitize||o.sanitize,sanitizeFn:o.sanitizeFn?o.sanitizeFn:null,popperConfig:o.popperConfig?o.popperConfig:null};o.template&&(n.template=o.template),o.allowList&&(n.allowList=o.allowList);const i=Array.from(document.querySelectorAll(t));i.length&&i.map((t=>new window.bootstrap.Popover(t,n)))})),"object"==typeof t&&null!==t&&Object.keys(t).forEach((e=>{const o=t[e],n={animation:!o.animation||o.animation,container:!!o.container&&o.container,delay:o.delay?o.delay:0,html:!!o.html&&o.html,selector:!!o.selector&&o.selector,trigger:o.trigger?o.trigger:"hover focus",fallbackPlacement:o.fallbackPlacement?o.fallbackPlacement:null,boundary:o.boundary?o.boundary:"clippingParents",title:o.title?o.title:"",customClass:o.customClass?o.customClass:"",sanitize:!o.sanitize||o.sanitize,sanitizeFn:o.sanitizeFn?o.sanitizeFn:null,popperConfig:o.popperConfig?o.popperConfig:null};o.placement&&(n.placement=o.placement),o.template&&(n.template=o.template),o.allowList&&(n.allowList=o.allowList);const i=Array.from(document.querySelectorAll(e));i.length&&i.map((t=>new window.bootstrap.Tooltip(t,n)))}))}export{Popover as P};
No other release has this exact content. See every version of this file.