Commit 3d6c5530 authored by Braulio Bhavamitra's avatar Braulio Bhavamitra
Browse files

Add site_tour plugin from gitlab.com/noosfero-plugins/site_tour

parent 48614ae0
class SiteTourPluginPublicController < PublicController
before_filter :login_required
def mark_action
user.site_tour_plugin_actions += [params[:action_name]].flatten
user.site_tour_plugin_actions.uniq!
render :json => {:ok => user.save}
end
end
require 'csv'
class SiteTourPluginAdminController < PluginAdminController
no_design_blocks
def index
settings = params[:settings]
settings ||= {}
@settings = Noosfero::Plugin::Settings.new(environment, SiteTourPlugin, settings)
@settings.actions_csv = convert_to_csv(@settings.actions)
@settings.group_triggers_csv = convert_to_csv(@settings.group_triggers)
if request.post?
@settings.actions = convert_actions_from_csv(settings[:actions_csv])
@settings.settings.delete(:actions_csv)
@settings.group_triggers = convert_group_triggers_from_csv(settings[:group_triggers_csv])
@settings.settings.delete(:group_triggers_csv)
@settings.save!
session[:notice] = 'Settings succefully saved.'
redirect_to :action => 'index'
end
end
protected
def convert_to_csv(actions)
CSV.generate do |csv|
(actions||[]).each { |action| csv << action.values }
end
end
def convert_actions_from_csv(actions_csv)
return [] if actions_csv.blank?
CSV.parse(actions_csv).map do |action|
{:language => action[0], :group_name => action[1], :selector => action[2], :description => action[3]}
end
end
def convert_group_triggers_from_csv(group_triggers_csv)
return [] if group_triggers_csv.blank?
CSV.parse(group_triggers_csv).map do |group|
{:group_name => group[0], :selector => group[1], :event => group[2]}
end
end
end
class Person
settings_items :site_tour_plugin_actions, :type => Array, :default => []
end
class SiteTourPlugin < Noosfero::Plugin
def self.plugin_name
'SiteTourPlugin'
end
def self.plugin_description
_("A site tour to show users how to use the application.")
end
def stylesheet?
true
end
def js_files
['intro.min.js', 'main.js']
end
def user_data_extras
proc do
logged_in? ? {:site_tour_plugin_actions => user.site_tour_plugin_actions}:{}
end
end
def body_ending
proc do
tour_file = "/plugins/site_tour/tour/#{language}/tour.js"
js_file = File.exists?(Rails.root.join("public#{tour_file}").to_s) ? tour_file : ""
settings = Noosfero::Plugin::Settings.new(environment, SiteTourPlugin)
actions = (settings.actions||[]).select {|action| action[:language] == language}
render(:file => 'tour_actions', :locals => { :actions => actions, :group_triggers => settings.group_triggers, :js_file => js_file})
end
end
def self.extra_blocks
{ SiteTourPlugin::TourBlock => {} }
end
def self.actions_csv_default_setting
'en,tour_plugin,.site-tour-plugin_tour-block .tour-button,"Click to start tour!"'
end
end
module SiteTourPlugin::SiteTourHelper
def parse_tour_description(description)
p = profile rescue nil
if !p.nil? && description.present?
description.gsub('{profile.identifier}', p.identifier).
gsub('{profile.name}', p.name).
gsub('{profile.url}', url_for(p.url))
else
description
end
end
end
class SiteTourPlugin::TourBlock < Block
settings_items :actions, :type => Array, :default => [{:group_name => 'tour_plugin', :selector => '.site-tour-plugin_tour-block .tour-button', :description => _('Click to start tour!')}]
settings_items :group_triggers, :type => Array, :default => []
settings_items :display_button, :type => :boolean, :default => true
attr_accessible :actions, :display_button, :group_triggers
before_save do |block|
block.actions.reject! {|i| i[:group_name].blank? && i[:selector].blank? && i[:description].blank?}
block.group_triggers.reject! {|i| i[:group_name].blank? && i[:selector].blank?}
end
def self.description
_('Site Tour Block')
end
def help
_('Configure a step-by-step tour.')
end
def content(args={})
block = self
proc do
render :file => 'blocks/tour', :locals => {:block => block}
end
end
end
msgid ""
msgstr ""
"Project-Id-Version: 1.2~rc1-2843-g999a037\n"
"POT-Creation-Date: 2015-08-06 08:53-0300\n"
"PO-Revision-Date: 2015-02-03 17:27-0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: plugins/site_tour/lib/site_tour_plugin.rb:8
msgid "A site tour to show users how to use the application."
msgstr "Um plugin para apresentar aos usuários um tour da aplicação"
#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:3
msgid "Click to start tour!"
msgstr "Clique para iniciar o tour!"
#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:15
msgid "Site Tour Block"
msgstr "Bloco para Site Tour"
#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:19
msgid "Configure a step-by-step tour."
msgstr "Configure o passo a passo do tour."
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_item.html.erb:13
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_group_item.html.erb:15
msgid "Delete"
msgstr "Apagar"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:4
msgid "Display help button"
msgstr "Mostrar o botão de ajuda"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:8
msgid "Tooltip Actions"
msgstr "Ações do Tooltip"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:9
msgid ""
"Special fields for description: {profile.name}, {profile.identifier}, "
"{profile.url}."
msgstr ""
"Campos especiais para a descrição: {profile.name}, {profile.identifier}, "
"{profile.url}"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:11
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:29
msgid "Group Name"
msgstr "Nome do Grupo"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:12
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:30
msgid "Selector"
msgstr "Seletor"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:13
msgid "Description"
msgstr "Descrição"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:23
msgid "New Tooltip"
msgstr "Novo Tooltip"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:27
msgid "Group Triggers"
msgstr "Gatilhos dos Grupos"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:31
msgid "Event"
msgstr "Evento"
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:41
msgid "New Group Trigger"
msgstr "Novo Gatilho de Grupo"
#: plugins/site_tour/views/blocks/tour.html.erb:4
msgid "Help"
msgstr "Ajuda"
#: plugins/site_tour/views/tour_actions.html.erb:16
msgid "Next"
msgstr "Próximo"
#: plugins/site_tour/views/tour_actions.html.erb:17
msgid "Back"
msgstr "Anterior"
#: plugins/site_tour/views/tour_actions.html.erb:18
msgid "Skip"
msgstr "Pular"
#: plugins/site_tour/views/tour_actions.html.erb:19
msgid "Finish"
msgstr "Fim"
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:1
msgid "Site Tour Settings"
msgstr "Configurações do Site Tour"
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:5
msgid "Tooltips (CSV format: language, group name, selector, description)"
msgstr "Tooltips (Formato CSV: idioma, nome do grupo, seletor, descrição)"
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:6
msgid ""
"Group Triggers (CSV format: group name, selector, event (e.g. mouseenter, "
"click))"
msgstr ""
"Gatilhos dos grupos (Formato CSV: nome do grupo, seletor, evento (e.g. "
"mouseenter, click))"
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:9
msgid "Save"
msgstr "Salvar"
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 1.2~rc1-2843-g999a037\n"
"POT-Creation-Date: 2015-08-06 08:53-0300\n"
"PO-Revision-Date: 2015-02-03 17:27-0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: plugins/site_tour/lib/site_tour_plugin.rb:8
msgid "A site tour to show users how to use the application."
msgstr ""
#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:3
msgid "Click to start tour!"
msgstr ""
#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:15
msgid "Site Tour Block"
msgstr ""
#: plugins/site_tour/lib/site_tour_plugin/tour_block.rb:19
msgid "Configure a step-by-step tour."
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_item.html.erb:13
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block_group_item.html.erb:15
msgid "Delete"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:4
msgid "Display help button"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:8
msgid "Tooltip Actions"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:9
msgid ""
"Special fields for description: {profile.name}, {profile.identifier}, "
"{profile.url}."
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:11
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:29
msgid "Group Name"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:12
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:30
msgid "Selector"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:13
msgid "Description"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:23
msgid "New Tooltip"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:27
msgid "Group Triggers"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:31
msgid "Event"
msgstr ""
#: plugins/site_tour/views/box_organizer/site_tour_plugin/_tour_block.html.erb:41
msgid "New Group Trigger"
msgstr ""
#: plugins/site_tour/views/blocks/tour.html.erb:4
msgid "Help"
msgstr ""
#: plugins/site_tour/views/tour_actions.html.erb:16
msgid "Next"
msgstr ""
#: plugins/site_tour/views/tour_actions.html.erb:17
msgid "Back"
msgstr ""
#: plugins/site_tour/views/tour_actions.html.erb:18
msgid "Skip"
msgstr ""
#: plugins/site_tour/views/tour_actions.html.erb:19
msgid "Finish"
msgstr ""
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:1
msgid "Site Tour Settings"
msgstr ""
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:5
msgid "Tooltips (CSV format: language, group name, selector, description)"
msgstr ""
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:6
msgid ""
"Group Triggers (CSV format: group name, selector, event (e.g. mouseenter, "
"click))"
msgstr ""
#: plugins/site_tour/views/site_tour_plugin_admin/index.html.erb:9
msgid "Save"
msgstr ""
#edit-tour-block #tooltip-actions h3 {
margin-bottom: 5px;
}
#edit-tour-block .special-attributes {
color: rgb(157, 157, 157);
}
#edit-tour-block .list-items {
margin-bottom: 25px;
}
#edit-tour-block .droppable-items {
padding-left: 0;
margin-top: -12px;
}
#edit-tour-block .droppable-items li {
list-style-type: none;
}
#edit-tour-block .item-row {
line-height: 25px;
margin-bottom: 5px;
padding: 0;
cursor: pointer;
width: 97%;
}
#edit-tour-block .item-row:hover {
background: #ddd url(/images/drag-and-drop.png) no-repeat;
background-position: 98% 15px;
}
#edit-tour-block .item-row li {
list-style-type: none;
display: inline;
margin-left: 5px;
}
#edit-tour-block {
width: 620px;
position: relative;
}
#edit-tour-block #new-template {
display: none;
}
#edit-tour-block .list-header {
width: 98%;
padding: 0 1px 10px 10px;
margin-bottom: 5px;
cursor: pointer;
}
#edit-tour-block .list-header li {
list-style-type: none;
display: inline;
font-weight: bold;
font-size: 12px;
text-align: center;
}
#edit-tour-block .list-header .list-name {
margin-left: 20px;
}
#edit-tour-block .list-header .list-selector {
margin-left: 63px;
}
#edit-tour-block .list-header .list-description, #edit-tour-block .list-header .list-event {
margin-left: 68px;
}
jQuery(document).ready(function(){
jQuery('#edit-tour-block').on('click', '.add-item', function() {
var container = jQuery(this).closest('.list-items');
var new_action = container.find('#new-template>li').clone();
new_action.show();
container.find('.droppable-items').append(new_action);
});
jQuery('#edit-tour-block').on('click', '.delete-tour-block-item', function() {
jQuery(this).parent().parent().remove();
return false;
});
jQuery("#edit-tour-block .droppable-items").sortable({
revert: true,
axis: "y"
});
});
(function(w,p){"object"===typeof exports?p(exports):"function"===typeof define&&define.amd?define(["exports"],p):p(w)})(this,function(w){function p(a){this._targetElement=a;this._options={nextLabel:"Next &rarr;",prevLabel:"&larr; Back",skipLabel:"Skip",doneLabel:"Done",tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,overlayOpacity:0.8,positionPrecedence:["bottom",
"top","right","left"],disableInteraction:!1}}function J(a){var b=[],c=this;if(this._options.steps)for(var d=[],e=0,d=this._options.steps.length;e<d;e++){var f=A(this._options.steps[e]);f.step=b.length+1;"string"===typeof f.element&&(f.element=document.querySelector(f.element));if("undefined"===typeof f.element||null==f.element){var h=document.querySelector(".introjsFloatingElement");null==h&&(h=document.createElement("div"),h.className="introjsFloatingElement",document.body.appendChild(h));f.element=
h;f.position="floating"}null!=f.element&&b.push(f)}else{d=a.querySelectorAll("*[data-intro]");if(1>d.length)return!1;e=0;for(f=d.length;e<f;e++){var h=d[e],k=parseInt(h.getAttribute("data-step"),10);0<k&&(b[k-1]={element:h,intro:h.getAttribute("data-intro"),step:parseInt(h.getAttribute("data-step"),10),tooltipClass:h.getAttribute("data-tooltipClass"),highlightClass:h.getAttribute("data-highlightClass"),position:h.getAttribute("data-position")||this._options.tooltipPosition})}e=k=0;for(f=d.length;e<
f;e++)if(h=d[e],null==h.getAttribute("data-step")){for(;"undefined"!=typeof b[k];)k++;b[k]={element:h,intro:h.getAttribute("data-intro"),step:k+1,tooltipClass:h.getAttribute("data-tooltipClass"),highlightClass:h.getAttribute("data-highlightClass"),position:h.getAttribute("data-position")||this._options.tooltipPosition}}}e=[];for(d=0;d<b.length;d++)b[d]&&e.push(b[d]);b=e;b.sort(function(a,b){return a.step-b.step});c._introItems=b;K.call(c,a)&&(x.call(c),a.querySelector(".introjs-skipbutton"),a.querySelector(".introjs-nextbutton"),
c._onKeyDown=function(b){if(27===b.keyCode&&!0==c._options.exitOnEsc)y.call(c,a),void 0!=c._introExitCallback&&c._introExitCallback.call(c);else if(37===b.keyCode)C.call(c);else if(39===b.keyCode)x.call(c);else if(13===b.keyCode){var d=b.target||b.srcElement;d&&0<d.className.indexOf("introjs-prevbutton")?C.call(c):d&&0<d.className.indexOf("introjs-skipbutton")?y.call(c,a):x.call(c);b.preventDefault?b.preventDefault():b.returnValue=!1}},c._onResize=function(a){t.call(c,document.querySelector(".introjs-helperLayer"));
t.call(c,document.querySelector(".introjs-tooltipReferenceLayer"))},window.addEventListener?(this._options.keyboardNavigation&&window.addEventListener("keydown",c._onKeyDown,!0),window.addEventListener("resize",c._onResize,!0)):document.attachEvent&&(this._options.keyboardNavigation&&document.attachEvent("onkeydown",c._onKeyDown),document.attachEvent("onresize",c._onResize)));return!1}function A(a){if(null==a||"object"!=typeof a||"undefined"!=typeof a.nodeType)return a;var b={},c;for(c in a)b[c]=
A(a[c]);return b}function x(){this._direction="forward";"undefined"===typeof this._currentStep?this._currentStep=0:++this._currentStep;if(this._introItems.length<=this._currentStep)"function"===typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),y.call(this,this._targetElement);else{var a=this._introItems[this._currentStep];"undefined"!==typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element);G.call(this,a)}}function C(){this._direction=
"backward";if(0===this._currentStep)return!1;var a=this._introItems[--this._currentStep];"undefined"!==typeof this._introBeforeChangeCallback&&this._introBeforeChangeCallback.call(this,a.element);G.call(this,a)}function y(a){var b=a.querySelector(".introjs-overlay");if(null!=b){b.style.opacity=0;setTimeout(function(){b.parentNode&&b.parentNode.removeChild(b)},500);var c=a.querySelector(".introjs-helperLayer");c&&c.parentNode.removeChild(c);(c=a.querySelector(".introjs-tooltipReferenceLayer"))&&c.parentNode.removeChild(c);
(a=a.querySelector(".introjs-disableInteraction"))&&a.parentNode.removeChild(a);(a=document.querySelector(".introjsFloatingElement"))&&a.parentNode.removeChild(a);if(a=document.querySelector(".introjs-showElement"))a.className=a.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,"");if((a=document.querySelectorAll(".introjs-fixParent"))&&0<a.length)for(c=a.length-1;0<=c;c--)a[c].className=a[c].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");window.removeEventListener?
window.removeEventListener("keydown",this._onKeyDown,!0):document.detachEvent&&document.detachEvent("onkeydown",this._onKeyDown);this._currentStep=void 0}}function H(a,b,c,d){var e="";b.style.top=null;b.style.right=null;b.style.bottom=null;b.style.left=null;b.style.marginLeft=null;b.style.marginTop=null;c.style.display="inherit";"undefined"!=typeof d&&null!=d&&(d.style.top=null,d.style.left=null);if(this._introItems[this._currentStep]){e=this._introItems[this._currentStep];e="string"===typeof e.tooltipClass?
e.tooltipClass:this._options.tooltipClass;b.className=("introjs-tooltip "+e).replace(/^\s+|\s+$/g,"");currentTooltipPosition=this._introItems[this._currentStep].position;if(("auto"==currentTooltipPosition||"auto"==this._options.tooltipPosition)&&"floating"!=currentTooltipPosition){var e=currentTooltipPosition,f=this._options.positionPrecedence.slice(),h=F(),p=k(b).height+10,s=k(b).width+20,l=k(a),m="floating";l.left+s>h.width||0>l.left+l.width/2-s?(q(f,"bottom"),q(f,"top")):(l.height+l.top+p>h.height&&
q(f,"bottom"),0>l.top-p&&q(f,"top"));l.width+l.left+s>h.width&&q(f,"right");0>l.left-s&&q(f,"left");0<f.length&&(m=f[0]);e&&"auto"!=e&&-1<f.indexOf(e)&&(m=e);currentTooltipPosition=m}e=k(a);f=k(b).height;h=F();switch(currentTooltipPosition){case "top":b.style.left="15px";b.style.top="-"+(f+10)+"px";c.className="introjs-arrow bottom";break;case "right":b.style.left=k(a).width+20+"px";e.top+f>h.height&&(c.className="introjs-arrow left-bottom",b.style.top="-"+(f-e.height-20)+"px");c.className="introjs-arrow left";
break;case "left":!0==this._options.showStepNumbers&&(b.style.top="15px");e.top+f>h.height?(b.style.top="-"+(f-e.height-20)+"px",c.className="introjs-arrow right-bottom"):c.className="introjs-arrow right";b.style.right=e.width+20+"px";break;case "floating":c.style.display="none";a=k(b);b.style.left="50%";b.style.top="50%";b.style.marginLeft="-"+a.width/2+"px";b.style.marginTop="-"+a.height/2+"px";"undefined"!=typeof d&&null!=d&&(d.style.left="-"+(a.width/2+18)+"px",d.style.top="-"+(a.height/2+18)+
"px");break;case "bottom-right-aligned":c.className="introjs-arrow top-right";b.style.right="0px";b.style.bottom="-"+(k(b).height+10)+"px";break;case "bottom-middle-aligned":d=k(a);a=k(b);c.className="introjs-arrow top-middle";b.style.left=d.width/2-a.width/2+"px";b.style.bottom="-"+(a.height+10)+"px";break;default:b.style.bottom="-"+(k(b).height+10)+"px",b.style.left=k(a).width/2-k(b).width/2+"px",c.className="introjs-arrow top"}}}function q(a,b){-1<a.indexOf(b)&&a.splice(a.indexOf(b),1)}function t(a){if(a&&
this._introItems[this._currentStep]){var b=this._introItems[this._currentStep],c=k(b.element),d=10;"floating"==b.position&&(d=0);a.setAttribute("style","width: "+(c.width+d)+"px; height:"+(c.height+d)+"px; top:"+(c.top-5)+"px;left: "+(c.left-5)+"px;")}}function L(){var a=document.querySelector(".introjs-disableInteraction");null===a&&(a=document.createElement("div"),a.className="introjs-disableInteraction",this._targetElement.appendChild(a));t.call(this,a)}function G(a){"undefined"!==typeof this._introChangeCallback&&
this._introChangeCallback.call(this,a.element);var b=this,c=document.querySelector(".introjs-helperLayer"),d=document.querySelector(".introjs-tooltipReferenceLayer"),e="introjs-helperLayer";k(a.element);"string"===typeof a.highlightClass&&(e+=" "+a.highlightClass);"string"===typeof this._options.highlightClass&&(e+=" "+this._options.highlightClass);if(null!=c){var f=d.querySelector(".introjs-helperNumberLayer"),h=d.querySelector(".introjs-tooltiptext"),p=d.querySelector(".introjs-arrow"),s=d.querySelector(".introjs-tooltip"),
l=d.querySelector(".introjs-skipbutton"),m=d.querySelector(".introjs-prevbutton"),r=d.querySelector(".introjs-nextbutton");c.className=e;s.style.opacity=0;s.style.display="none";if(null!=f){var g=this._introItems[0<=a.step-2?a.step-2:0];if(null!=g&&"forward"==this._direction&&"floating"==g.position||"backward"==this._direction&&"floating"==a.position)f.style.opacity=0}t.call(b,c);t.call(b,d);if((g=document.querySelectorAll(".introjs-fixParent"))&&0<g.length)for(e=g.length-1;0<=e;e--)g[e].className=
g[e].className.replace(/introjs-fixParent/g,"").replace(/^\s+|\s+$/g,"");g=document.querySelector(".introjs-showElement");g.className=g.className.replace(/introjs-[a-zA-Z]+/g,"").replace(/^\s+|\s+$/g,"");b._lastShowElementTimer&&clearTimeout(b._lastShowElementTimer);b._lastShowElementTimer=setTimeout(function(){null!=f&&(f.innerHTML=a.step);h.innerHTML=a.intro;s.style.display="block";H.call(b,a.element,s,p,f);d.querySelector(".introjs-bullets li > a.active").className="";d.querySelector('.introjs-bullets li > a[data-stepnumber="'+
a.step+'"]').className="active";d.querySelector(".introjs-progress .introjs-progressbar").setAttribute("style","width:"+I.call(b)+"%;");s.style.opacity=1;f&&(f.style.opacity=1);-1===r.tabIndex?l.focus():r.focus()},350)}else{var q=document.createElement("div"),m=document.createElement("div"),c=document.createElement("div"),n=document.createElement("div"),w=document.createElement("div"),D=document.createElement("div"),E=document.createElement("div"),u=document.createElement("div");q.className=e;m.className=
"introjs-tooltipReferenceLayer";t.call(b,q);t.call(b,m);this._targetElement.appendChild(q);this._targetElement.appendChild(m);c.className="introjs-arrow";w.className="introjs-tooltiptext";w.innerHTML=a.intro;D.className="introjs-bullets";!1===this._options.showBullets&&(D.style.display="none");for(var q=document.createElement("ul"),e=0,B=this._introItems.length;e<B;e++){var A=document.createElement("li"),z=document.createElement("a");z.onclick=function(){b.goToStep(this.getAttribute("data-stepnumber"))};
e===a.step-1&&(z.className="active");z.href="javascript:void(0);";z.innerHTML="&nbsp;";z.setAttribute("data-stepnumber",this._introItems[e].step);A.appendChild(z);q.appendChild(A)}D.appendChild(q);E.className="introjs-progress";!1===this._options.showProgress&&(E.style.display="none");e=document.createElement("div");e.className="introjs-progressbar";e.setAttribute("style","width:"+I.call(this)+"%;");E.appendChild(e);u.className="introjs-tooltipbuttons";!1===this._options.showButtons&&(u.style.display=
"none");n.className="introjs-tooltip";n.appendChild(w);n.appendChild(D);n.appendChild(E);!0==this._options.showStepNumbers&&(g=document.createElement("span"),g.className="introjs-helperNumberLayer",g.innerHTML=a.step,m.appendChild(g));n.appendChild(c);m.appendChild(n);r=document.createElement("a");r.onclick=function(){b._introItems.length-1!=b._currentStep&&x.call(b)};r.href="javascript:void(0);";r.innerHTML=this._options.nextLabel;m=document.createElement("a");m.onclick=function(){0!=b._currentStep&&
C.call(b)};m.href="javascript:void(0);";m.innerHTML=this._options.prevLabel;l=document.createElement("a");l.className="introjs-button introjs-skipbutton";l.href="javascript:void(0);";l.innerHTML=this._options.skipLabel;l.onclick=function(){b._introItems.length-1==b._currentStep&&"function"===typeof b._introCompleteCallback&&b._introCompleteCallback.call(b);b._introItems.length-1!=b._currentStep&&"function"===typeof b._introExitCallback&&b._introExitCallback.call(b);y.call(b,b._targetElement)};u.appendChild(l);
1<this._introItems.length&&(u.appendChild(m),u.appendChild(r));n.appendChild(u);H.call(b,a.element,n,c,g)}!0===this._options.disableInteraction&&L.call(b);m.removeAttribute("tabIndex");r.removeAttribute("tabIndex");0==this._currentStep&&1<this._introItems.length?(m.className="introjs-button introjs-prevbutton introjs-disabled",m.tabIndex="-1",r.className="introjs-button introjs-nextbutton",l.innerHTML=this._options.skipLabel):this._introItems.length-1==this._currentStep||1==this._introItems.length?
(l.innerHTML=this._options.doneLabel,m.className="introjs-button introjs-prevbutton",r.className="introjs-button introjs-nextbutton introjs-disabled",r.tabIndex="-1"):(m.className="introjs-button introjs-prevbutton",r.className="introjs-button introjs-nextbutton",l.innerHTML=this._options.skipLabel);r.focus();a.element.className+=" introjs-showElement";g=v(a.element,"position");"absolute"!==g&&"relative"!==g&&(a.element.className+=" introjs-relativePosition");for(g=a.element.parentNode;null!=g&&"body"!==
g.tagName.toLowerCase();){c=v(g,"z-index");n=parseFloat(v(g,"opacity"));u=v(g,"transform")||v(g,"-webkit-transform")||v(g,"-moz-transform")||v(g,"-ms-transform")||v(g,"-o-transform");if(/[0-9]+/.test(c)||1>n||"none"!==u)g.className+=" introjs-fixParent";g=g.parentNode}M(a.element)||!0!==this._options.scrollToElement||(n=a.element.getBoundingClientRect(),g=F().height,c=n.bottom-(n.bottom-n.top),n=n.bottom-g,0>c||a.element.clientHeight>g?window.scrollBy(0,c-30):window.scrollBy(0,n+100));"undefined"!==
typeof this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,a.element)}function v(a,b){var c="";a.currentStyle?c=a.currentStyle[b]:document.defaultView&&document.defaultView.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b));return c&&c.toLowerCase?c.toLowerCase():c}function F(){if(void 0!=window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var a=document.documentElement;return{width:a.clientWidth,