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
29 KiB

  1. define(["introjs","jquery","lodash","moment","session"],function(t,a,r,e,o){"use strict";function n(t,e){return c&&(void 0===e?window.localStorage.getItem(t):window.localStorage.setItem(t,e))}function l(t){if(window.btoa)return window.btoa(t);var e=0;if(0===t.length)return e;for(var o=0;o<t.length;o++){e=(e<<5)-e+t.charCodeAt(o),e&=e}return e+""}function i(){this.intro=t(),this._init(u,s)}var s={_:{click:function(t){var e=document.querySelector(t);e&&e.click&&e.click()},showTray:function(){var t=a(".utility-tray");return t.show(),t},hideTray:function(){var t=a(".utility-tray");return t.hide(),t},getTourElements:function(){return a(".introjs-overlay, .introjs-helperLayer, .introjs-tooltipReferenceLayer")},hideTour:function(){this.getTourElements().hide()},showTour:function(){this.getTourElements().show()},waitForElement:function(t,e,o){0!==o&&(void 0===o&&(o=50),a(t).is(":visible")?e(document.querySelector(t)):setTimeout(r.bind(this.waitForElement,this,t,e,o--),500))}},resetMega:function(){if(document.querySelector(".mega-menu.active")){var t=document.querySelector(".primary-nav .active > a");t&&t.click&&t.click()}this._.hideTray()},reset:function(t,e,o){this.resetMega(t,e,o);var i=a(document.body),s="introjs-docked",n="introjs-docked-position";i.removeAttr(n),t&&t.docked?(i.addClass(s),t.dockposition&&i.attr(n,t.dockposition)):i.removeClass(s);var r=i.data("introjs-step-class");r&&i.removeClass(r),t&&t.stepClass&&(i.data("introjs-step-class",t.stepClass),i.addClass(t.stepClass))},openProducts:function(){this._.hideTray(),this._.click("#nav-products > a")},openTools:function(){this._.click("#nav-tools > a")},openSecurity:function(){this._.click("#nav-security > a")},openCommunity:function(){this._.click("#nav-community > a")},openProfile:function(){this._.showTray().children().hide(),a("#account-info").css("opacity","1").show()},openLanguages:function(){this._.showTray().children().hide(),a("#language").css("opacity","1").show()},stripFixParents:function(){a(".introjs-fixParent").removeClass("introjs-fixParent")},returnToLaunch:function(t,e,o){null!==o.currentTour.redirectOnExit&&!1===o.currentTour.redirectOnExit||("www.redhat.com"===window.location.host?window.location="https://access.redhat.com/start/":window.location="/start/")},ensurePath:function(o,i){function t(){var t=h();a(document.body).addClass("introjs-hidden");var e=o.path+"?tour="+t.tour+"&step="+i;if(o.hash&&(e+=o.hash),o.hostname)return window.location=window.location.protocol+"//"+o.hostname+e;window.location=e}var e=window.location.pathname,s=window.location.hash;o&&o.path&&e&&e!==o.path&&t(),o&&o.hash&&s&&s!==o.hash&&t()},waitThenRefresh:function(e,o,i){var s="introjs-loading",n=this.refreshPosition,r=a(document.body);r.addClass(s),this._.waitForElement(e._element,function(t){i.intro._introItems[i.intro._currentStep].element=t,n(e,o,i),r.removeClass(s)})},refreshPosition:function(t,e,o){setTimeout(function(){o&&o.intro&&o.intro.refresh()},600)},loadRecommendations:function(i,s,n){this._.waitForElement(i.element,r.bind(function(){try{var t=angular.element("#rha-product-select").scope(),e=t.ProductsService.products[0];t.CaseService.kase.product=e.value||e.code,t.CaseService.onProductSelectChange(),t.RecommendationsService.getRecommendations();var o=this.refreshPosition;this._.waitForElement("#rha-recommendation-section",function(){o(i,s,n)})}catch(t){}},this))},scrollTop:function(){window.scrollTo(0,0)},affixScrollTop:function(t,e,o){window.scrollTo(0,0),t.affix&&a(t.affix).affix("checkPosition"),this.refreshPosition(t,e,o)},showCloseButton:function(){a(".introjs-skipbutton").css("display","block")},addRemindMeLaterButton:function(){var e=this;a(".introjs-skipbutton").after('<a class="btn btn-sm btn-primary introjs-remindmebutton" href="javascript:void(0);">'+this.remindMeLaterLabel+"</a>"),a(".introjs-remindmebutton").on("click",function(){e._.hideTour(),e._.hideTray();var t=window.localStorage.getItem(p);t=t.replace(e.momento+",",""),window.localStorage.setItem(p,t)})},removeRemindMeLaterButton:function(){a(".introjs-remindmebutton").css("display","none
  2. //# sourceMappingURL=tour.js.map