You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
18 KiB

  1. !function(t,e){"object"==typeof exports?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t)}(this,function(t){function e(t){this._targetElement=t,this._options={title:"",nextLabel:"Next &rarr;",prevLabel:"&larr; Back",skipLabel:"Skip",doneLabel:"Done",minimizeLabel:"-",tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,buttonClass:"introjs-button",showBullets:!0,showProgress:!1,scrollToElement:!0,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dock:!1,allowMinimize:!1,arrowPadding:0}}function i(i){var t=[],n=this;if(this._options.steps){var e=[],o=0;for(e=this._options.steps.length;o<e;o++){var r=a(this._options.steps[o]);if(r.step=t.length+1,"string"==typeof r.element&&(r.element=document.querySelector(r.element)),void 0===r.element||null==r.element)null==(s=document.querySelector(".introjsFloatingElement"))&&((s=document.createElement("div")).className="introjsFloatingElement",document.body.appendChild(s)),r.element=s,r.position="floating";null!=r.element&&t.push(r)}}else{if((e=i.querySelectorAll("*[data-intro]")).length<1)return!1;for(o=0,r=e.length;o<r;o++){var s=e[o],l=parseInt(s.getAttribute("data-step"),10);0<l&&(t[l-1]={element:s,intro:s.getAttribute("data-intro"),step:parseInt(s.getAttribute("data-step"),10),tooltipClass:s.getAttribute("data-tooltipClass"),highlightClass:s.getAttribute("data-highlightClass"),position:s.getAttribute("data-position")||this._options.tooltipPosition})}for(o=l=0,r=e.length;o<r;o++)if(null==(s=e[o]).getAttribute("data-step")){for(;void 0!==t[l];)l++;t[l]={element:s,intro:s.getAttribute("data-intro"),step:l+1,tooltipClass:s.getAttribute("data-tooltipClass"),highlightClass:s.getAttribute("data-highlightClass"),position:s.getAttribute("data-position")||this._options.tooltipPosition}}}for(o=[],e=0;e<t.length;e++)t[e]&&o.push(t[e]);return(t=o).sort(function(t,e){return t.step-e.step}),n._introItems=t,function(t){var e=document.createElement("div"),i="",n=this;if(e.className="introjs-overlay","body"===t.tagName.toLowerCase())i+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",e.setAttribute("style",i);else{var o=H(t);o&&(i+="width: "+o.width+"px; height:"+o.height+"px; top:"+o.top+"px;left: "+o.left+"px;",e.setAttribute("style",i))}return t.appendChild(e),e.onclick=function(){1==n._options.exitOnOverlayClick&&(L.call(n,t),null!=n._introExitCallback&&n._introExitCallback.call(n))},setTimeout(function(){i+="opacity: "+n._options.overlayOpacity.toString()+";",e.setAttribute("style",i)},10),!0}.call(n,i)&&(k.call(n),i.querySelector(".introjs-skipbutton"),i.querySelector(".introjs-nextbutton"),n._onKeyDown=function(t){if(27===t.keyCode&&1==n._options.exitOnEsc)L.call(n,i),null!=n._introExitCallback&&n._introExitCallback.call(n);else if(37===t.keyCode)E.call(n);else if(39===t.keyCode)k.call(n);else if(13===t.keyCode){var e=t.target||t.srcElement;e&&0<e.className.indexOf("introjs-prevbutton")?E.call(n):e&&0<e.className.indexOf("introjs-skipbutton")?L.call(n,i):k.call(n),t.preventDefault?t.preventDefault():t.returnValue=!1}},n._onResize=function(t){I.call(n,document.querySelector(".introjs-helperLayer")),I.call(n,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",n._onKeyDown,!0),window.addEventListener("resize",n._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",n._onKeyDown),document.attachEvent("onresize",n._onResize))),!1}function a(t){if(null==t||"object"!=typeof t||void 0!==t.nodeType)return t;var e,i={};for(e in t)i[e]=a(t[e]);return i}function k(){if(this._direction="forward",void 0===this._currentStep?this._currentStep=0:++this._currentStep,this._introItems.length<=this._currentStep)"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),L.call(this,this._targetElement);else{var t=this._introItems[this._currentStep];void 0!==this._introB
  2. //# sourceMappingURL=introjs.min.js.map