{"version":3,"sources":["webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header.chunk.js","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header.scss","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-logo.scss","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-nav.scss","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-account.scss","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-cart.scss","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-buy.scss","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-subnav.scss","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier.svg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-fr.svg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-en.svg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso.svg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-fr.svg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-en.svg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-print.jpg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-print-fr.jpg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-print-en.jpg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-print.jpg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-print-fr.jpg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-print-en.jpg","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/utils/subnav-mobile.js","webpack:///./LeLab.Gcv.Web/src/atomic/organism/o-header/utils/subnav-desktop.js"],"names":["require","AjaxRefresh","$","$header","$headerHeight","$headerStickyClass","$nav","$metaNav","$openNav","$closeNav","openNavActive","navClassOpen","navOpen","isVisible","$toggleWidget","$document","document","$subnav","SubnavMobile","SubnavDesktop","window","scroll","scrollTop","addClass","removeClass","length","on","e","preventDefault","each","$btn","id","closest","attr","Close","$trigger","$link","children","links","linkActiveClass","$container","data","blockClass","timer","off","width","is","Open","link","group","onOpen","requestAnimationFrame","onClose","doBounceAnimationToCounter","setTimeout","$this","bindMenuPackagesEvents","refreshElement","GetRefreshElement","AjaxRefreshUi","init","$window","$html","stack","Subnav","self","$parent","raf","open","cancelAnimationFrame","close","active","inactive","activatePrevious","destroy","i","scrollToTop","$scroll","StackIndexOf","splice","find","stopPropagation","CloseAll","resize","timeout","current","previous","Math","max","documentElement","clientWidth","innerWidth","clearTimeout","target","keyCode","module","exports","push","namespace","opts","extend","onUpdate","addToGroup","indexOf","bind","closeOtherInGroup","addOpenListener","addCloseListener","fnMouseLeave","fnMouseEnter","removeCloseListener"],"mappings":";;;;;;;;AAAA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;;AAGA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;AACA,mBAAAA,CAAQ,GAAR;;AAEA,IAAIC,cAAc,mBAAAD,CAAQ,EAAR,CAAlB;AACA,IAAIE,IAAI,mBAAAF,CAAQ,CAAR,CAAR;;AACI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oBAAY,IAAZ;AACA4F;AACA,YAAI,OAAON,KAAKjD,MAAZ,IAAsB,UAA1B,EAAsC;AAClCiD,iBAAKjD,MAAL;AACH;AACD;AACA;AACAI,mBAAWqD,gBAAX,EAA6B,CAA7B;AACH,KAbD;;AAeA;AACA,QAAIrC,QAAQ,SAARA,KAAQ,GAAY;AACpB,YAAI,CAACzD,SAAL,EAAgB;AACZ;AACH;AACDA,oBAAY,KAAZ;AACAiG;AACA,YAAI,OAAOX,KAAK/C,OAAZ,IAAuB,UAA3B,EAAuC;AACnC+C,iBAAK/C,OAAL;AACH;AACJ,KATD;;AAWA;AACA,KAAC,YAAY;AACTS,gBAAQnC,EAAR,CAAW,YAAYwE,SAAvB,EAAkCf,MAAlC;AACA;AACA;AACAmB;AACAI;AACH,KAND;;AAQA;AACA;AACA,SAAKtC,IAAL,GAAYA,IAAZ;AACA,SAAKE,KAAL,GAAaA,KAAb;AAEH,CAhLD,C","file":"o-header.js","sourcesContent":["require(\"./o-header.scss\");\r\nrequire(\"./o-header-logo.scss\");\r\nrequire(\"./o-header-nav.scss\");\r\nrequire(\"./o-header-account.scss\");\r\nrequire(\"./o-header-cart.scss\");\r\nrequire(\"./o-header-buy.scss\");\r\nrequire(\"./o-header-subnav.scss\");\r\n\r\n\r\nrequire(\"./img/logo-valcartier.svg\");\r\nrequire(\"./img/logo-valcartier-fr.svg\");\r\nrequire(\"./img/logo-valcartier-en.svg\");\r\nrequire(\"./img/logo-calypso.svg\");\r\nrequire(\"./img/logo-calypso-fr.svg\");\r\nrequire(\"./img/logo-calypso-en.svg\");\r\nrequire(\"./img/logo-valcartier-print.jpg\");\r\nrequire(\"./img/logo-valcartier-print-fr.jpg\");\r\nrequire(\"./img/logo-valcartier-print-en.jpg\");\r\nrequire(\"./img/logo-calypso-print.jpg\");\r\nrequire(\"./img/logo-calypso-print-fr.jpg\");\r\nrequire(\"./img/logo-calypso-print-en.jpg\");\r\n\r\nvar AjaxRefresh = require(\"utils/ajax-refresh\");\r\nvar $ = require('jquery'),\r\n //isTouchEvent = require(\"utils/is-touch-event\"),\r\n $header = $('.o-header'),\r\n $headerHeight = 70,\r\n $headerStickyClass = 'o-header--sticky',\r\n $nav = $('.js-header-nav'),\r\n $metaNav = $('.o-header-nav__meta-container'),\r\n $openNav = $('.o-header-nav__open'),\r\n $closeNav = $('.o-header-nav__close'),\r\n openNavActive = \"o-header-nav__open--active\",\r\n navClassOpen = \"o-header-nav--open\",\r\n navOpen = false,\r\n isVisible = false,\r\n $toggleWidget = $('[data-toggle-widget]'),\r\n $document = $(document),\r\n $subnav = $('.o-header-subnav'),\r\n SubnavMobile = require(\"./utils/subnav-mobile.js\"),\r\n SubnavDesktop = require(\"./utils/subnav-desktop.js\");\r\n\r\n// Sticky header\r\n$(window).scroll(function () {\r\n if ($(window).scrollTop() >= $headerHeight) {\r\n $header.addClass($headerStickyClass);\r\n } else {\r\n $header.removeClass($headerStickyClass);\r\n }\r\n});\r\n\r\n\r\n// Mobile navigation\r\nif ($nav.length > 0) {\r\n $openNav.on('click', function (e) {\r\n e.preventDefault();\r\n if (!navOpen) {\r\n $(this).addClass(openNavActive);\r\n $nav.addClass(navClassOpen);\r\n navOpen = true;\r\n } else {\r\n $(this).removeClass(openNavActive);\r\n $nav.removeClass(navClassOpen);\r\n navOpen = false;\r\n }\r\n });\r\n\r\n $closeNav.on('click', function (e) {\r\n e.preventDefault();\r\n $(this).removeClass(openNavActive);\r\n $nav.removeClass(navClassOpen);\r\n $openNav.removeClass(openNavActive);\r\n navOpen = false;\r\n });\r\n\r\n $(window).on('resize', function () {\r\n $openNav.removeClass(openNavActive);\r\n $nav.removeClass(navClassOpen);\r\n navOpen = false;\r\n });\r\n}\r\n\r\n// Subnav\r\n// Back (mobile)\r\n$('.o-header-subnav__back').each(function () {\r\n var $btn = $(this),\r\n id = $btn.closest('.o-header-subnav').attr(\"id\");\r\n $btn.on(\"click\", function (e) {\r\n SubnavMobile.Close(id);\r\n e.preventDefault();\r\n return false;\r\n });\r\n});\r\n\r\n$(window).on('resize', function () {\r\n $subnav.removeClass('o-header-subnav--open');\r\n});\r\n\r\n// Subnav Toggle\r\n$('[data-submenu-id]').each(function () {\r\n var $trigger = $(this),\r\n $link = $trigger.children('.o-header-nav__main-link'),\r\n links = '.o-header-nav__main-link',\r\n linkActiveClass = 'o-header-nav__main-link--active',\r\n $container = $('.o-header-nav__main'),\r\n id = $trigger.data('submenu-id'),\r\n $subnav = $(\"#\" + id),\r\n blockClass = $subnav.attr(\"class\"),\r\n timer;\r\n\r\n $trigger\r\n .off('click.submenu')\r\n .on('click.submenu', function (e) {\r\n if ($(window).width() < 992) {\r\n if ($('.o-header-nav__open').is(':visible')) {\r\n // Phone / tablet\r\n if (!isVisible) {\r\n e.preventDefault\r\n SubnavMobile.Open(id);\r\n return false;\r\n }\r\n }\r\n }\r\n });\r\n\r\n new SubnavDesktop({\r\n link: this,\r\n id: id,\r\n group: \"header\",\r\n onOpen: function () {\r\n $link.addClass(linkActiveClass);\r\n $subnav.off('transitionend.subnav-close');\r\n $subnav.addClass(blockClass + \"--display\");\r\n window.requestAnimationFrame(function () {\r\n $subnav.addClass(blockClass + \"--open\");\r\n });\r\n },\r\n onClose: function () {\r\n $link.removeClass(linkActiveClass);\r\n $subnav.removeClass(blockClass + \"--open\");\r\n $subnav.on('transitionend.subnav-close', function () {\r\n $subnav.removeClass(blockClass + \"--display\");\r\n });\r\n }\r\n });\r\n\r\n $link\r\n .off('click.submenu')\r\n .on('click.submenu', function (e) {\r\n if ($(window).width() >= 992) {\r\n e.preventDefault();\r\n return false;\r\n }\r\n });\r\n});\r\n\r\n\r\n// Widget Cart animation\r\nvar doBounceAnimationToCounter = function () {\r\n $('.o-header-cart__btn-counter').addClass('o-header-cart__btn-counter--bouncing');\r\n setTimeout(function () {\r\n $('.o-header-cart__btn-counter').removeClass('o-header-cart__btn-counter--bouncing');\r\n }, 600);\r\n};\r\n\r\n// Add To Cart\r\n$toggleWidget.each(function () {\r\n var $this = $(this);\r\n\r\n $this.on('click.addToCart', function () {\r\n doBounceAnimationToCounter();\r\n });\r\n});\r\n\r\n$document.off('animationBounceCounter.header');\r\n$document.on('animationBounceCounter.header', function () {\r\n doBounceAnimationToCounter();\r\n});\r\n\r\n// Package\r\nvar bindMenuPackagesEvents = function () {\r\n $(\"[data-menu-package]\").each(function () {\r\n var $this = $(this);\r\n if ($(window).width() >= 992) {\r\n $this.on(\"mouseenter.menu-package\",\r\n function () {\r\n //Unbind events\r\n $this.off(\"mouseenter.menu-package\");\r\n //Get from ajax request\r\n var refreshElement = AjaxRefresh.GetRefreshElement($this);\r\n //Refresh UI\r\n AjaxRefresh.AjaxRefreshUi([refreshElement],\r\n 60,\r\n () => {\r\n //$document.trigger(\"jsInitAllScripts\");\r\n //Rebind events ??\r\n });\r\n });\r\n }\r\n });\r\n};\r\n\r\nvar init = function () {\r\n bindMenuPackagesEvents();\r\n}\r\n\r\ninit();\r\n\n\n\n// WEBPACK FOOTER //\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header.chunk.js","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header.scss\n// module id = 558\n// module chunks = 3","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-logo.scss\n// module id = 559\n// module chunks = 3","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-nav.scss\n// module id = 560\n// module chunks = 3","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-account.scss\n// module id = 561\n// module chunks = 3","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-cart.scss\n// module id = 562\n// module chunks = 3","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-buy.scss\n// module id = 563\n// module chunks = 3","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/o-header-subnav.scss\n// module id = 564\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-valcartier.svg?v=ef2612\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier.svg\n// module id = 565\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-valcartier-fr.svg?v=ef2612\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-fr.svg\n// module id = 566\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-valcartier-en.svg?v=40e07a\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-en.svg\n// module id = 567\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-calypso.svg?v=9d09a3\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso.svg\n// module id = 568\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-calypso-fr.svg?v=9d09a3\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-fr.svg\n// module id = 569\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-calypso-en.svg?v=9d09a3\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-en.svg\n// module id = 570\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-valcartier-print.jpg?v=c557c5\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-print.jpg\n// module id = 571\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-valcartier-print-fr.jpg?v=c557c5\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-print-fr.jpg\n// module id = 572\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-valcartier-print-en.jpg?v=fc8356\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-valcartier-print-en.jpg\n// module id = 573\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-calypso-print.jpg?v=0344f5\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-print.jpg\n// module id = 574\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-calypso-print-fr.jpg?v=0344f5\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-print-fr.jpg\n// module id = 575\n// module chunks = 3","module.exports = __webpack_public_path__ + \"atomic/organism/o-header/img/logo-calypso-print-en.jpg?v=0344f5\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/img/logo-calypso-print-en.jpg\n// module id = 576\n// module chunks = 3","var $ = require(\"jquery\"),\r\n $window = $(window),\r\n $html = $('html'),\r\n stack = [];\r\n\r\n// Nav Instance\r\nvar Subnav = function (id) {\r\n\r\n // Variables\r\n var self = this,\r\n $subnav = $(\"#\" + id),\r\n $parent = $('[data-submenu-id=\"' + id + '\"]'),\r\n //$scroll = $('[data-nav-scrollable]', $nav),\r\n blockClass = 'o-header-subnav',\r\n raf = null;\r\n\r\n // ID (Public)\r\n this.id = id;\r\n\r\n // Open (Public)\r\n this.open = function () {\r\n window.cancelAnimationFrame(raf);\r\n raf = window.requestAnimationFrame(open);\r\n };\r\n\r\n // Close (Public)\r\n this.close = function () {\r\n window.cancelAnimationFrame(raf);\r\n raf = window.requestAnimationFrame(close);\r\n };\r\n\r\n // Set as currently active (Public)\r\n this.active = function () {\r\n active();\r\n };\r\n\r\n // Set as currently inactive (Public)\r\n this.inactive = function () {\r\n inactive();\r\n };\r\n\r\n // Open animation\r\n function open() {\r\n $subnav.off(\"transitionend.subnav-close\");\r\n $subnav.addClass(blockClass + '--display');\r\n //scrollToTop();\r\n window.requestAnimationFrame(function () {\r\n $subnav.addClass(blockClass + '--open');\r\n active();\r\n });\r\n };\r\n\r\n // Close animation\r\n // (Trigger destroy at the end)\r\n function close() {\r\n $subnav.removeClass(blockClass + '--open');\r\n inactive();\r\n activatePrevious();\r\n $subnav.on(\"transitionend.subnav-close\", function () {\r\n $subnav.removeClass(blockClass + '--display');\r\n destroy();\r\n });\r\n };\r\n\r\n // Active\r\n function active() {\r\n for (var i = 0; i < stack.length; i++) {\r\n if (this !== stack[i]) {\r\n stack[i].inactive();\r\n }\r\n }\r\n $subnav.addClass(blockClass + '--active');\r\n };\r\n\r\n // Inactive\r\n function inactive() {\r\n $('.o-header-subnav').removeClass(blockClass + '--active');\r\n }\r\n\r\n // Scroll bar to the top\r\n function scrollToTop() {\r\n $scroll.scrollTop(0);\r\n }\r\n\r\n // Activate previous stack subnav\r\n function activatePrevious() {\r\n var i = stack.length - 1;\r\n if (self === stack[i]) {\r\n i--;\r\n }\r\n if (stack[i]) {\r\n stack[i].active();\r\n }\r\n }\r\n\r\n // Destroy this JS instance\r\n function destroy() {\r\n\r\n // Remove from stack array\r\n var i = StackIndexOf(id);\r\n if (i !== false) {\r\n stack.splice(i, 1);\r\n }\r\n i = null;\r\n\r\n // Stop listener and differ\r\n window.cancelAnimationFrame(raf);\r\n $subnav.off(\"transitionend.subnav-close\");\r\n $subnav.off(\"click.subnav\");\r\n\r\n // Remove class\r\n $subnav.removeClass(blockClass + '--display');\r\n $subnav.removeClass(blockClass + '--open');\r\n $subnav.removeClass(blockClass + '--active');\r\n\r\n // Delete reference\r\n $subnav = null;\r\n //$scroll = null;\r\n blockClass = null;\r\n raf = null;\r\n id = null;\r\n\r\n };\r\n\r\n // Open by default on creation\r\n this.open();\r\n\r\n // Stop click propagation\r\n $subnav.find('.o-header-subnav__link').on(\"click.subnav\", function (e) {\r\n e.stopPropagation();\r\n });\r\n\r\n};\r\n\r\n// Si la subnav est dans la stack des subnavs ouvertes\r\nvar StackIndexOf = function (id) {\r\n for (var i = 0; i < stack.length; i++) {\r\n if (id === stack[i].id) {\r\n return i;\r\n }\r\n }\r\n return false;\r\n}\r\n\r\n// Fermer toutes les subnavs\r\nvar CloseAll = function (id) {\r\n for (var i = (stack.length - 1); i >= 0; i--) {\r\n stack[i].close();\r\n }\r\n}\r\n\r\n// Fermer toutes les subnavs lors d'un resize\r\nvar resize = (function () {\r\n var timeout,\r\n current,\r\n previous = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\r\n return function () {\r\n clearTimeout(timeout);\r\n timeout = setTimeout(function () {\r\n current = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\r\n if (previous !== current) {\r\n previous = current;\r\n CloseAll();\r\n }\r\n }, 250);\r\n };\r\n})();\r\n$window.on('resize.subnav', resize);\r\n\r\n// Fermer toutes les subnavs lors d'un clic à l'extérieur\r\n//$html.on('click.subnav', CloseAll);\r\n$(document).on('click', function (e) {\r\n if ($(e.target).closest('.o-header-subnav').length === 0) {\r\n CloseAll();\r\n }\r\n});\r\n$(document).on('keydown', function (e) {\r\n if (e.keyCode === 27) { // ESC\r\n CloseAll();\r\n }\r\n});\r\n\r\n// Mobile public function\r\nmodule.exports = {\r\n \"Open\": function (id) {\r\n //if (StackIndexOf(id) === false) {\r\n stack.push(new Subnav(id));\r\n //}\r\n },\r\n \"Close\": function (id) {\r\n var i = StackIndexOf(id);\r\n if (i !== false) {\r\n stack[i].close();\r\n }\r\n },\r\n \"CloseAll\": CloseAll\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/utils/subnav-mobile.js","var $ = require(\"jquery\");\r\nvar $window = $(window);\r\nvar $document = $(document);\r\nvar $html = $('html');\r\nvar namespace = \"subnav\";\r\nvar group = {};\r\n//var isTouchEvent = require(\"utils/is-touch-event\");\r\n\r\nmodule.exports = function (opts) {\r\n\r\n // Extend options\r\n opts = $.extend({\r\n // HtmlElement du lien (ou bouton)\r\n link: null,\r\n // ID du dropdown html\r\n id: null,\r\n // Wich group of dropdown this one belong to\r\n group: \"default\",\r\n // Callback function on update\r\n onUpdate: null,\r\n // Callback function on open\r\n onOpen: null,\r\n // Callback function on close\r\n onClose: null\r\n }, opts);\r\n\r\n // Variables\r\n var $link = $(opts.link),\r\n id = opts.id,\r\n $subnav = $(\"#\" + id),\r\n isVisible = false,\r\n timeout = null;\r\n\r\n // Add the current dropdown to the dropdown group\r\n var addToGroup = (function () {\r\n if (typeof group[opts.group] !== \"object\") {\r\n group[opts.group] = []\r\n }\r\n if (group[opts.group].indexOf(this) == -1) {\r\n group[opts.group].push(this);\r\n }\r\n }).bind(this);\r\n\r\n // Close all other dropdown in the same group\r\n var closeOtherInGroup = (function () {\r\n for (var i = 0; i < group[opts.group].length; i++) {\r\n if (group[opts.group][i] !== this) {\r\n group[opts.group][i].close();\r\n }\r\n }\r\n }).bind(this);\r\n\r\n // Resize event\r\n var resize = (function () {\r\n var timeout,\r\n current,\r\n previous = 0;\r\n return function () {\r\n clearTimeout(timeout);\r\n timeout = setTimeout(function () {\r\n //update();\r\n current = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\r\n if (previous != current) {\r\n previous = current;\r\n close();\r\n }\r\n }, 250);\r\n };\r\n })();\r\n\r\n // Add open event listener\r\n var addOpenListener = function () {\r\n $link.children('.o-header-nav__main-link').on('click.' + namespace, function (e) {\r\n if ($(window).width() >= 992) {\r\n e.preventDefault();\r\n open();\r\n }\r\n });\r\n $link.on('mouseenter.' + namespace, function (e) {\r\n e.preventDefault();\r\n if (!isVisible && $(window).width() >= 992) {\r\n open();\r\n }\r\n });\r\n };\r\n\r\n // Add close event listener\r\n var addCloseListener = function () {\r\n $link.on('click.' + namespace + '-close', function (e) {\r\n if ($(window).width() < 992 || !$link.is('[href]')) {\r\n e.preventDefault();\r\n if (isVisible) {\r\n close();\r\n }\r\n }\r\n });\r\n // Click outside\r\n $subnav.on('click.' + namespace + '-close', function (e) {\r\n e.stopPropagation();\r\n });\r\n $html.on('click.' + namespace + '-close', function (e) {\r\n if (isVisible) {\r\n close();\r\n }\r\n });\r\n // Mouseleave\r\n // Mouseleave will be trigger on touch device\r\n // when we \"click\" outside.\r\n var fnMouseLeave = function (e) {\r\n e.preventDefault();\r\n clearTimeout(timeout);\r\n timeout = setTimeout(close, 1); // Delay close trigger\r\n };\r\n var fnMouseEnter = function (e) {\r\n e.preventDefault();\r\n clearTimeout(timeout);\r\n };\r\n $link.on('mouseleave.' + namespace + '-close', fnMouseLeave);\r\n $link.on('mouseenter.' + namespace + '-close', fnMouseEnter);\r\n $subnav.on('mouseleave.' + namespace + '-close', fnMouseLeave);\r\n $subnav.on('mouseenter.' + namespace + '-close', fnMouseEnter);\r\n };\r\n\r\n // Remove close listener\r\n var removeCloseListener = function () {\r\n clearTimeout(timeout);\r\n $html.off('click.' + namespace + '-close');\r\n $link.off('click.' + namespace + '-close');\r\n $link.off('mouseleave.' + namespace + '-close');\r\n $link.off('mouseenter.' + namespace + '-close');\r\n $subnav.off('click.' + namespace + '-close');\r\n $subnav.off('mouseleave.' + namespace + '-close');\r\n $subnav.off('mouseenter.' + namespace + '-close');\r\n };\r\n\r\n // Update\r\n /*var update = function () {\r\n if (typeof opts.onUpdate == \"function\") {\r\n opts.onUpdate();\r\n }\r\n };*/\r\n\r\n // Open\r\n var open = function () {\r\n if (isVisible) {\r\n return;\r\n }\r\n //update(); // Hotfix for position glitch caused by webfont loading\r\n isVisible = true;\r\n closeOtherInGroup();\r\n if (typeof opts.onOpen == \"function\") {\r\n opts.onOpen();\r\n }\r\n // It is required to differ the addition of closing listener.\r\n // \"open\" and \"close\" would trigger on the same touch event oterwise.\r\n setTimeout(addCloseListener, 1);\r\n };\r\n\r\n // Close\r\n var close = function () {\r\n if (!isVisible) {\r\n return;\r\n }\r\n isVisible = false;\r\n removeCloseListener();\r\n if (typeof opts.onClose == \"function\") {\r\n opts.onClose();\r\n }\r\n };\r\n\r\n // Constructor\r\n (function () {\r\n $window.on('resize.' + namespace, resize);\r\n //$document.on('webfontactive.' + namespace, update);\r\n //update();\r\n addToGroup();\r\n addOpenListener();\r\n })();\r\n\r\n // Public method\r\n //this.update = update;\r\n this.open = open;\r\n this.close = close;\r\n\r\n};\n\n\n// WEBPACK FOOTER //\n// ./LeLab.Gcv.Web/src/atomic/organism/o-header/utils/subnav-desktop.js"],"sourceRoot":""}