| Server IP : 172.67.187.206 / Your IP : 172.71.28.155 Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30 System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586 User : SYSTEM ( 0) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Inetpub/www/myschool/triamudom/tuprblearn/theme/boost/amd/build/ |
Upload File : |
"use strict";function _typeof2(a){if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof2=function(a){return typeof a}}else{_typeof2=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof2(a)}define ("theme_boost/tooltip",["exports","./sanitizer","jquery","core/popper","./util"],function(a,b,c,d,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var m=f(c),n=f(d),o=f(e);function f(a){return a&&a.__esModule?a:{default:a}}function g(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);if("function"==typeof Object.getOwnPropertySymbols){d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))}d.forEach(function(b){h(a,b,c[b])})}return a}function h(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function i(a){if("function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)){i=function(a){return _typeof2(a)}}else{i=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":_typeof2(a)}}return i(a)}function j(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function k(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function l(a,b,c){if(b)k(a.prototype,b);if(c)k(a,c);return a}var p="bs.tooltip",q=".".concat(p),r=m.default.fn.tooltip,s="bs-tooltip",t=new RegExp("(^|\\s)".concat(s,"\\S+"),"g"),u=["sanitize","whiteList","sanitizeFn"],v={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},w={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},x={animation:!0,template:"<div class=\"tooltip\" role=\"tooltip\"><div class=\"arrow\"></div><div class=\"tooltip-inner\"></div></div>",trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:b.DefaultWhitelist},y={SHOW:"show",OUT:"out"},z={HIDE:"hide".concat(q),HIDDEN:"hidden".concat(q),SHOW:"show".concat(q),SHOWN:"shown".concat(q),INSERTED:"inserted".concat(q),CLICK:"click".concat(q),FOCUSIN:"focusin".concat(q),FOCUSOUT:"focusout".concat(q),MOUSEENTER:"mouseenter".concat(q),MOUSELEAVE:"mouseleave".concat(q)},A={FADE:"fade",SHOW:"show"},B={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},C={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},D=function(){function a(b,c){j(this,a);if("undefined"==typeof n.default){throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)")}this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=b;this.config=this._getConfig(c);this.tip=null;this._setListeners()}l(a,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(a){if(!this._isEnabled){return}if(a){var b=this.constructor.DATA_KEY,c=(0,m.default)(a.currentTarget).data(b);if(!c){c=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,m.default)(a.currentTarget).data(b,c)}c._activeTrigger.click=!c._activeTrigger.click;if(c._isWithActiveTrigger()){c._enter(null,c)}else{c._leave(null,c)}}else{if((0,m.default)(this.getTipElement()).hasClass(A.SHOW)){this._leave(null,this);return}this._enter(null,this)}}},{key:"dispose",value:function(){clearTimeout(this._timeout);m.default.removeData(this.element,this.constructor.DATA_KEY);(0,m.default)(this.element).off(this.constructor.EVENT_KEY);(0,m.default)(this.element).closest(".modal").off("hide.bs.modal");if(this.tip){(0,m.default)(this.tip).remove()}this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;if(null!==this._popper){this._popper.destroy()}this._popper=null;this.element=null;this.config=null;this.tip=null}},{key:"show",value:function(){var a=this;if("none"===(0,m.default)(this.element).css("display")){throw new Error("Please use show on visible elements")}var b=m.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){(0,m.default)(this.element).trigger(b);var c=o.default.findShadowRoot(this.element),d=m.default.contains(null!==c?c:this.element.ownerDocument.documentElement,this.element);if(b.isDefaultPrevented()||!d){return}var e=this.getTipElement(),f=o.default.getUID(this.constructor.NAME);e.setAttribute("id",f);this.element.setAttribute("aria-describedby",f);this.setContent();if(this.config.animation){(0,m.default)(e).addClass(A.FADE)}var g="function"==typeof this.config.placement?this.config.placement.call(this,e,this.element):this.config.placement,h=this._getAttachment(g);this.addAttachmentClass(h);var i=this._getContainer();(0,m.default)(e).data(this.constructor.DATA_KEY,this);if(!m.default.contains(this.element.ownerDocument.documentElement,this.tip)){(0,m.default)(e).appendTo(i)}(0,m.default)(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new n.default(this.element,e,{placement:h,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:B.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(b){if(b.originalPlacement!==b.placement){a._handlePopperPlacementChange(b)}},onUpdate:function(b){return a._handlePopperPlacementChange(b)}});(0,m.default)(e).addClass(A.SHOW);if("ontouchstart"in document.documentElement){(0,m.default)(document.body).children().on("mouseover",null,m.default.noop)}var j=function(){if(a.config.animation){a._fixTransition()}var b=a._hoverState;a._hoverState=null;(0,m.default)(a.element).trigger(a.constructor.Event.SHOWN);if(b===y.OUT){a._leave(null,a)}};if((0,m.default)(this.tip).hasClass(A.FADE)){var k=o.default.getTransitionDurationFromElement(this.tip);(0,m.default)(this.tip).one(o.default.TRANSITION_END,j).emulateTransitionEnd(k)}else{j()}}}},{key:"hide",value:function(a){var b=this,c=this.getTipElement(),d=m.default.Event(this.constructor.Event.HIDE),e=function(){if(b._hoverState!==y.SHOW&&c.parentNode){c.parentNode.removeChild(c)}b._cleanTipClass();b.element.removeAttribute("aria-describedby");(0,m.default)(b.element).trigger(b.constructor.Event.HIDDEN);if(null!==b._popper){b._popper.destroy()}if(a){a()}};(0,m.default)(this.element).trigger(d);if(d.isDefaultPrevented()){return}(0,m.default)(c).removeClass(A.SHOW);if("ontouchstart"in document.documentElement){(0,m.default)(document.body).children().off("mouseover",null,m.default.noop)}this._activeTrigger[C.CLICK]=!1;this._activeTrigger[C.FOCUS]=!1;this._activeTrigger[C.HOVER]=!1;if((0,m.default)(this.tip).hasClass(A.FADE)){var f=o.default.getTransitionDurationFromElement(c);(0,m.default)(c).one(o.default.TRANSITION_END,e).emulateTransitionEnd(f)}else{e()}this._hoverState=""}},{key:"update",value:function(){if(null!==this._popper){this._popper.scheduleUpdate()}}},{key:"isWithContent",value:function(){return!!this.getTitle()}},{key:"addAttachmentClass",value:function(a){(0,m.default)(this.getTipElement()).addClass("".concat(s,"-").concat(a))}},{key:"getTipElement",value:function(){this.tip=this.tip||(0,m.default)(this.config.template)[0];return this.tip}},{key:"setContent",value:function(){var a=this.getTipElement();this.setElementContent((0,m.default)(a.querySelectorAll(B.TOOLTIP_INNER)),this.getTitle());(0,m.default)(a).removeClass("".concat(A.FADE," ").concat(A.SHOW))}},{key:"setElementContent",value:function(a,c){if("object"===i(c)&&(c.nodeType||c.jquery)){if(this.config.html){if(!(0,m.default)(c).parent().is(a)){a.empty().append(c)}}else{a.text((0,m.default)(c).text())}return}if(this.config.html){if(this.config.sanitize){c=(0,b.sanitizeHtml)(c,this.config.whiteList,this.config.sanitizeFn)}a.html(c)}else{a.text(c)}}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");if(!a){a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title}return a}},{key:"_getOffset",value:function(){var a=this,b={};if("function"==typeof this.config.offset){b.fn=function(b){b.offsets=g({},b.offsets,a.config.offset(b.offsets,a.element)||{});return b}}else{b.offset=this.config.offset}return b}},{key:"_getContainer",value:function(){if(!1===this.config.container){return document.body}if(o.default.isElement(this.config.container)){return(0,m.default)(this.config.container)}return(0,m.default)(document).find(this.config.container)}},{key:"_getAttachment",value:function(a){return w[a.toUpperCase()]}},{key:"_setListeners",value:function(){var a=this,b=this.config.trigger.split(" ");b.forEach(function(b){if("click"===b){(0,m.default)(a.element).on(a.constructor.Event.CLICK,a.config.selector,function(b){return a.toggle(b)})}else if(b!==C.MANUAL){var c=b===C.HOVER?a.constructor.Event.MOUSEENTER:a.constructor.Event.FOCUSIN,d=b===C.HOVER?a.constructor.Event.MOUSELEAVE:a.constructor.Event.FOCUSOUT;(0,m.default)(a.element).on(c,a.config.selector,function(b){return a._enter(b)}).on(d,a.config.selector,function(b){return a._leave(b)})}});(0,m.default)(this.element).closest(".modal").on("hide.bs.modal",function(){if(a.element){a.hide()}});if(this.config.selector){this.config=g({},this.config,{trigger:"manual",selector:""})}else{this._fixTitle()}}},{key:"_fixTitle",value:function(){var a=i(this.element.getAttribute("data-original-title"));if(this.element.getAttribute("title")||"string"!==a){this.element.setAttribute("data-original-title",this.element.getAttribute("title")||"");this.element.setAttribute("title","")}}},{key:"_enter",value:function(a,b){var c=this.constructor.DATA_KEY;b=b||(0,m.default)(a.currentTarget).data(c);if(!b){b=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,m.default)(a.currentTarget).data(c,b)}if(a){b._activeTrigger["focusin"===a.type?C.FOCUS:C.HOVER]=!0}if((0,m.default)(b.getTipElement()).hasClass(A.SHOW)||b._hoverState===y.SHOW){b._hoverState=y.SHOW;return}clearTimeout(b._timeout);b._hoverState=y.SHOW;if(!b.config.delay||!b.config.delay.show){b.show();return}b._timeout=setTimeout(function(){if(b._hoverState===y.SHOW){b.show()}},b.config.delay.show)}},{key:"_leave",value:function(a,b){var c=this.constructor.DATA_KEY;b=b||(0,m.default)(a.currentTarget).data(c);if(!b){b=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,m.default)(a.currentTarget).data(c,b)}if(a){b._activeTrigger["focusout"===a.type?C.FOCUS:C.HOVER]=!1}if(b._isWithActiveTrigger()){return}clearTimeout(b._timeout);b._hoverState=y.OUT;if(!b.config.delay||!b.config.delay.hide){b.hide();return}b._timeout=setTimeout(function(){if(b._hoverState===y.OUT){b.hide()}},b.config.delay.hide)}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger){if(this._activeTrigger[a]){return!0}}return!1}},{key:"_getConfig",value:function(a){var c=(0,m.default)(this.element).data();Object.keys(c).forEach(function(a){if(-1!==u.indexOf(a)){delete c[a]}});a=g({},this.constructor.Default,c,"object"===i(a)&&a?a:{});if("number"==typeof a.delay){a.delay={show:a.delay,hide:a.delay}}if("number"==typeof a.title){a.title=a.title.toString()}if("number"==typeof a.content){a.content=a.content.toString()}o.default.typeCheckConfig("tooltip",a,this.constructor.DefaultType);if(a.sanitize){a.template=(0,b.sanitizeHtml)(a.template,a.whiteList,a.sanitizeFn)}return a}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config){for(var b in this.config){if(this.constructor.Default[b]!==this.config[b]){a[b]=this.config[b]}}}return a}},{key:"_cleanTipClass",value:function(){var a=(0,m.default)(this.getTipElement()),b=a.attr("class").match(t);if(null!==b&&b.length){a.removeClass(b.join(""))}}},{key:"_handlePopperPlacementChange",value:function(a){var b=a.instance;this.tip=b.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(a.placement))}},{key:"_fixTransition",value:function(){var a=this.getTipElement(),b=this.config.animation;if(null!==a.getAttribute("x-placement")){return}(0,m.default)(a).removeClass(A.FADE);this.config.animation=!1;this.hide();this.show();this.config.animation=b}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=(0,m.default)(this).data(p),d="object"===i(b)&&b;if(!c&&/dispose|hide/.test(b)){return}if(!c){c=new a(this,d);(0,m.default)(this).data(p,c)}if("string"==typeof b){if("undefined"==typeof c[b]){throw new TypeError("No method named \"".concat(b,"\""))}c[b]()}})}},{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return x}},{key:"NAME",get:function(){return"tooltip"}},{key:"DATA_KEY",get:function(){return p}},{key:"Event",get:function(){return z}},{key:"EVENT_KEY",get:function(){return q}},{key:"DefaultType",get:function(){return v}}]);return a}();m.default.fn.tooltip=D._jQueryInterface;m.default.fn.tooltip.Constructor=D;m.default.fn.tooltip.noConflict=function(){m.default.fn.tooltip=r;return D._jQueryInterface};a.default=D;return a.default});
//# sourceMappingURL=tooltip.min.js.map