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AgOEmF,OAAQC,OAAQ,UAAW,Y","sources":["webpack://website/./node_modules/responsive-bp/src/js/responsive.tabs.js"],"sourcesContent":["/*\r\n * Responsive tabs\r\n */\r\n\r\n/*global jQuery*/\r\n/*jshint expr:true*/\r\n(function ($, w, ns, da) {\r\n\r\n \"use strict\";\r\n\r\n if (w.RESPONSIVE_TABS) {\r\n return;\r\n }\r\n\r\n // General variables.\r\n var rtl = $.support.rtl,\r\n einit = \"RBPinit\" + ns + da,\r\n echanged = [\"RBPchanged\" + ns + da, \"shown.r.modal\" + da].join(\" \"),\r\n eclick = \"click\",\r\n ekeydown = \"keydown\",\r\n eshow = \"show\" + ns,\r\n eshown = \"shown\" + ns;\r\n\r\n var keys = {\r\n SPACE: 32,\r\n LEFT: 37,\r\n RIGHT: 39\r\n };\r\n\r\n // Tabs class definition\r\n var Tabs = function (element) {\r\n\r\n this.$element = $(element);\r\n this.tabbing = null;\r\n\r\n // Add accessibility features.\r\n var $tablist = this.$element.children(\"ul:first\").attr(\"role\", \"tablist\"),\r\n $triggers = $tablist.children().attr(\"role\", \"presentation\"),\r\n $panes = this.$element.children(\":not(ul)\"),\r\n id = $.pseudoUnique(),\r\n activeIndex = $tablist.find(\"[aria-selected=true]\").parent().index(),\r\n hasActive = activeIndex > -1;\r\n\r\n $triggers.each(function (index) {\r\n var $this = $(this),\r\n $tab = $this.children(\"a\"),\r\n isActive = (hasActive && index === activeIndex) || (!hasActive && index === 0);\r\n\r\n $tab.attr({\r\n \"role\": \"tab\",\r\n \"id\": \"tab-\" + id + \"-\" + index,\r\n \"aria-controls\": \"pane-\" + id + \"-\" + index,\r\n \"aria-selected\": isActive ? true : false,\r\n \"tabindex\": 0\r\n });\r\n\r\n $panes.eq(index).attr({\r\n \"role\": \"tabpanel\",\r\n \"id\": \"pane-\" + id + \"-\" + index,\r\n \"aria-labelledby\": \"tab-\" + id + \"-\" + index,\r\n \"tabindex\": isActive ? 0 : -1\r\n });\r\n });\r\n\r\n // Bind events.\r\n $(this.$element).on(eclick, \"ul[role=tablist] > li > [role=tab]\", $.proxy(this.click, this))\r\n .on(ekeydown, \"ul[role=tablist] > li > [role=tab]\", $.proxy(this.keydown, this));\r\n };\r\n\r\n Tabs.prototype.show = function (position) {\r\n\r\n var $activeItem = this.$element.children(\"ul\").find(\"[aria-selected=true]\"),\r\n $children = $activeItem.closest(\"ul\").children(),\r\n activePosition = $activeItem.parent().index(),\r\n self = this;\r\n\r\n if (position > ($children.length - 1) || position < 0) {\r\n\r\n return false;\r\n }\r\n\r\n if (activePosition === position) {\r\n return false;\r\n }\r\n\r\n // Call the function with the callback\r\n return this.tab(activePosition, position, function ($item) {\r\n\r\n var complete = function () {\r\n self.tabbing = false;\r\n $item.siblings().addBack().removeClass(\"fade-out fade-in\");\r\n self.$element.trigger($.Event(eshown, { relatedTarget: $item[0] }));\r\n };\r\n\r\n // Do our callback\r\n $item.onTransitionEnd(complete);\r\n });\r\n };\r\n\r\n Tabs.prototype.tab = function (activePosition, postion, callback) {\r\n\r\n var showEvent = $.Event(eshow),\r\n $element = this.$element,\r\n $childTabs = $element.children(\"ul\").children(\"li\"),\r\n $childPanes = $element.children(\":not(ul)\"),\r\n $nextTab = $childTabs.eq(postion),\r\n $currentPane = $childPanes.eq(activePosition),\r\n $nextPane = $childPanes.eq(postion);\r\n\r\n $element.trigger(showEvent);\r\n\r\n if (this.tabbing || showEvent.isDefaultPrevented()) {\r\n return;\r\n }\r\n\r\n this.tabbing = true;\r\n\r\n $childTabs.children(\"a\").attr({ \"aria-selected\": false });\r\n $nextTab.children(\"a\").attr({ \"aria-selected\": true }).focus();\r\n\r\n // Do some class shuffling to allow the transition.\r\n $currentPane.addClass(\"fade-out fade-in\");\r\n $nextPane.attr({ \"tabIndex\": 0 }).addClass(\"fade-out\");\r\n $childPanes.filter(\".fade-in\").attr({ \"tabIndex\": -1 }).removeClass(\"fade-in\");\r\n\r\n // Force redraw.\r\n $nextPane.redraw().addClass(\"fade-in\");\r\n\r\n // Do the callback\r\n callback.call(this, $nextPane);\r\n };\r\n\r\n Tabs.prototype.click = function (event) {\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n var $this = $(event.target),\r\n $li = $this.parent(),\r\n index = $li.index();\r\n\r\n this.show(index);\r\n };\r\n\r\n Tabs.prototype.keydown = function (event) {\r\n\r\n var which = event.which;\r\n // Ignore anything but left and right.\r\n if (which === keys.SPACE || which === keys.LEFT || which === keys.RIGHT) {\r\n\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n var $this = $(event.target),\r\n $li = $this.parent(),\r\n $all = $li.siblings().addBack(),\r\n length = $all.length,\r\n index = $li.index();\r\n\r\n if (which === keys.SPACE) {\r\n this.show(index);\r\n return;\r\n }\r\n\r\n // Select the correct index.\r\n index = which === keys.LEFT ? (rtl ? index + 1 : index - 1) : (rtl ? index - 1 : index + 1);\r\n\r\n // Ensure that the index stays within bounds.\r\n if (index === length) {\r\n index = 0;\r\n }\r\n\r\n if (index < 0) {\r\n index = length - 1;\r\n }\r\n\r\n this.show(index);\r\n }\r\n };\r\n\r\n // No conflict.\r\n var old = $.fn.tabs;\r\n\r\n // Plug-in definition \r\n $.fn.tabs = function (options) {\r\n\r\n return this.each(function () {\r\n\r\n var $this = $(this),\r\n data = $this.data(\"r.tabs\");\r\n\r\n if (!data) {\r\n // Check the data and reassign if not present.\r\n $this.data(\"r.tabs\", (data = new Tabs(this)));\r\n }\r\n\r\n // Show the given number.\r\n if (typeof options === \"number\") {\r\n data.show(options);\r\n }\r\n });\r\n };\r\n\r\n // Set the public constructor.\r\n $.fn.tabs.Constructor = Tabs;\r\n\r\n $.fn.tabs.noConflict = function () {\r\n $.fn.tabs = old;\r\n return this;\r\n };\r\n\r\n // Data API\r\n var init = function () {\r\n $(\"[data-tabs]\").each(function () {\r\n var $this = $(this),\r\n loaded = $this.data(\"r.tabsLoaded\");\r\n if (!loaded) {\r\n $this.data(\"r.tabsLoaded\", true);\r\n $this.tabs();\r\n }\r\n });\r\n },\r\n debouncedInit = $.debounce(init, 500);\r\n\r\n $(document).on([einit, echanged].join(\" \"), function (event) {\r\n event.type === \"RBPinit\" ? init() : debouncedInit();\r\n }).ready(function(){$(this).trigger(einit);});\r\n\r\n w.RESPONSIVE_TABS = true;\r\n\r\n}(jQuery, window, \".r.tabs\", \".data-api\"));\r\n"],"names":["$","w","ns","da","RESPONSIVE_TABS","rtl","support","einit","echanged","join","Tabs","element","this","$element","tabbing","$tablist","children","attr","$triggers","$panes","id","pseudoUnique","activeIndex","find","parent","index","hasActive","each","$tab","isActive","eq","on","proxy","click","keydown","prototype","show","position","$activeItem","$children","closest","activePosition","self","length","tab","$item","onTransitionEnd","siblings","addBack","removeClass","trigger","Event","relatedTarget","postion","callback","showEvent","$childTabs","$childPanes","$nextTab","$currentPane","$nextPane","isDefaultPrevented","focus","addClass","filter","redraw","call","event","preventDefault","stopPropagation","target","which","$li","old","fn","tabs","options","$this","data","Constructor","noConflict","init","debouncedInit","debounce","document","type","ready","jQuery","window"],"sourceRoot":""}