vendor: 7,201 bytes, line 1
1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AOS=t():e.AOS=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=n(1),a=(o(r),n(6)),u=o(a),c=n(7),f=o(c),s=n(8),d=o(s),l=n(9),p=o(l),m=n(10),b=o(m),v=n(11),y=o(v),g=n(14),h=o(g),w=[],k=!1,x={offset:120,delay:0,easing:"ease",duration:400,disable:!1,once:!1,startEvent:"DOMContentLoaded",throttleDelay:99,debounceDelay:50,disableMutationObserver:!1},j=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&(k=!0),k)return w=(0,y.default)(w,x),(0,b.default)(w,x.once),w},O=function(){w=(0,h.default)(),j()},_=function(){w.forEach(function(e,t){e.node.removeAttribute("data-aos"),e.node.removeAttribute("data-aos-easing"),e.node.removeAttribute("data-aos-duration"),e.node.removeAttribute("data-aos-delay")})},S=function(e){return e===!0||"mobile"===e&&p.default.mobile()||"phone"===e&&p.default.phone()||"tablet"===e&&p.default.tablet()||"function"==typeof e&&e()===!0},z=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?_():(document.querySelector("body").setAttribute("data-aos-easing",x.easing),document.querySelector("body").setAttribute("data-aos-duration",x.duration),document.querySelector("body").setAttribute("data-aos-delay",x.delay),"DOMContentLoaded"===x.startEvent&&["complete","interactive"].indexOf(document.readyState)>-1?j(!0):"load"===x.startEvent?window.addEventListener(x.startEvent,function(){j(!0)}):document.addEventListener(x.startEvent,function(){j(!0)}),window.addEventListener("resize",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,f.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||(0,d.default)("[data-aos]",O),w)};e.exports={init:z,refresh:j,refreshHard:O}},function(e,t){},,,,,function(e,t){(function(t){"use strict";function n(e,t,n){function o(t){var n=b,o=v;return b=v=void 0,k=t,g=e.apply(o,n)}function r(e){return k=e,h=setTimeout(s,t),_?o(e):g}function a(e){var n=e-w,o=e-k,i=t-n;return S?j(i,y-o):i}function c(e){var n=e-w,o=e-k;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=O();return c(e)?d(e):void(h=setTimeout(s,a(e)))}function d(e){return h=void 0,z&&b?o(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),k=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(O())}function m(){var e=O(),n=c(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),o(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,k=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(f);return t=u(t)||0,i(n)&&(_=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(f);return i(o)&&(r="leading"in o?!!o.leading:r,a="trailing"in o?!!o.trailing:a),n(e,t,{leading:r,maxWait:t,trailing:a})}function i(e){var t="undefined"==typeof e?"undefined":c(e);return!!e&&("object"==t||"function"==t)}function r(e){return!!e&&"object"==("undefined"==typeof e?"undefined":c(e))}function a(e){return"symbol"==("undefined"==typeof e?"undefined":c(e))||r(e)&&k.call(e)==d}function u(e){if("number"==typeof e)return e;if(a(e))return s;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var n=m.test(e);return n||b.test(e)?v(e.slice(2),n?2:8):p.test(e)?s:+e}var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f="Expected a function",s=NaN,d="[object Symbol]",l=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,b=/^0o[0-7]+$/i,v=parseInt,y="object"==("undefined"==typeof t?"undefined":c(t))&&t&&t.Object===Object&&t,g="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,h=y||g||Function("return this")(),w=Object.prototype,k=w.toString,x=Math.max,j=Math.min,O=function(){return h.Date.now()};e.exports=o}).call(t,function(){return this}())},function(e,t){(function(t){"use strict";function n(e,t,n){function i(t){var n=b,o=v;return b=v=void 0,O=t,g=e.apply(o,n)}function r(e){return O=e,h=setTimeout(s,t),_?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function f(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function s(){var e=j();return f(e)?d(e):void(h=setTimeout(s,u(e)))}function d(e){return h=void 0,z&&b?i(e):(b=v=void 0,g)}function l(){void 0!==h&&clearTimeout(h),O=0,b=w=v=h=void 0}function p(){return void 0===h?g:d(j())}function m(){var e=j(),n=f(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(s,t),i(w)}return void 0===h&&(h=setTimeout(s,t)),g}var b,v,y,g,h,w,O=0,_=!1,S=!1,z=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(_=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,z="trailing"in n?!!n.trailing:z),m.cancel=l,m.flush=p,m}function o(e){var t="undefined"==typeof e?"undefined":u(e);return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==("undefined"==typeof e?"undefined":u(e))}function r(e){return"symbol"==("undefined"==typeof e?"undefined":u(e))||i(e)&&w.call(e)==s}function a(e){if("number"==typeof e)return e;if(r(e))return f;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(d,"");var n=p.test(e);return n||m.test(e)?b(e.slice(2),n?2:8):l.test(e)?f:+e}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c="Expected a function",f=NaN,s="[object Symbol]",d=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,m=/^0o[0-7]+$/i,b=parseInt,v="object"==("undefined"==typeof t?"undefined":u(t))&&t&&t.Object===Object&&t,y="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),h=Object.prototype,w=h.toString,k=Math.max,x=Math.min,j=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t){"use strict";function n(e,t){var n=window.document,r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,a=new r(o);i=t,a.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function o(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),n=Array.prototype.slice.call(e.removedNodes
1),o=t.concat(n).filter(function(e){return e.hasAttribute&&e.hasAttribute("data-aos")}).length;o&&i()})}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){};t.default=n},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(){return navigator.userAgent||navigator.vendor||window.opera||""}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,a=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,u=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i,c=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,f=function(){function e(){n(this,e)}return i(e,[{key:"phone",value:function(){var e=o();return!(!r.test(e)&&!a.test(e.substr(0,4)))}},{key:"mobile",value:function(){var e=o();return!(!u.test(e)&&!c.test(e.substr(0,4)))}},{key:"tablet",value:function(){return this.mobile()&&!this.phone()}}]),e}();t.default=new f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){var o=e.node.getAttribute("data-aos-once");t>e.position?e.node.classList.add("aos-animate"):"undefined"!=typeof o&&("false"===o||!n&&"true"!==o)&&e.node.classList.remove("aos-animate")},o=function(e,t){var o=window.pageYOffset,i=window.innerHeight;e.forEach(function(e,r){n(e,i+o,t)})};t.default=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),r=o(i),a=function(e,t){return e.forEach(function(e,n){e.node.classList.add("aos-init"),e.position=(0,r.default)(e.node,t.offset)}),e};t.default=a},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),r=o(i),a=function(e,t){var n=0,o=0,i=window.innerHeight,a={offset:e.getAttribute("data-aos-offset"),anchor:e.getAttribute("data-aos-anchor"),anchorPlacement:e.getAttribute("data-aos-anchor-placement")};switch(a.offset&&!isNaN(a.offset)&&(o=parseInt(a.offset)),a.anchor&&document.querySelectorAll(a.anchor)&&(e=document.querySelectorAll(a.anchor)[0]),n=(0,r.default)(e).top,a.anchorPlacement){case"top-bottom":break;case"center-bottom":n+=e.offsetHeight/2;break;case"bottom-bottom":n+=e.offsetHeight;break;case"top-center":n+=i/2;break;case"bottom-center":n+=i/2+e.offsetHeight;break;case"center-center":n+=i/2+e.offsetHeight/2;break;case"top-top":n+=i;break;case"bottom-top":n+=e.offsetHeight+i;break;case"center-top":n+=e.offsetHeight/2+i}return a.anchorPlacement||a.offset||isNaN(t)||(o=t),n+o};t.default=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-("BODY"!=e.tagName?e.scrollLeft:0),n+=e.offsetTop-("BODY"!=e.tagName?e.scrollTop:0),e=e.offsetParent;return{top:n,left:t}};t.default=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e=e||document.querySelectorAll("[data-aos]"),Array.prototype.map.call(e,function(e){return{node:e}})};t.default=n}])});; 2/** 3 * This work is licensed under the W3C Software and Document License 4 * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document). 5 */ 6 7 (function() { 8 // Return early if we're not running inside of the browser. 9 if (typeof window === 'undefined') { 10 return; 11 } 12 13 // Convenience function for converting NodeLists. 14 /** @type {typeof Array.prototype.slice} */ 15 const slice = Array.prototype.slice; 16 17 /** 18 * IE has a non-standard name for "matches". 19 * @type {typeof Element.prototype.matches} 20 */ 21 const matches = 22 Element.prototype.matches || Element.prototype.msMatchesSelector; 23 24 /** @type {string} */ 25 const _focusableElementsString = ['a[href]', 26 'area[href]', 27 'input:not([disabled])', 28 'select:not([disabled])', 29 'textarea:not([disabled])', 30 'button:not([disabled])', 31 'details', 32 'summary', 33 'iframe', 34 'object', 35 'embed', 36 '[contenteditable]'].join(','); 37 38 /** 39 * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert` 40 * attribute. 41 * 42 * Its main functions are: 43 * 44 * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the 45 * subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertN
45ode`s via registering 46 * each focusable node in the subtree with the singleton `InertManager` which manages all known 47 * focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode` 48 * instance exists for each focusable node which has at least one inert root as an ancestor. 49 * 50 * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert` 51 * attribute is removed from the root node). This is handled in the destructor, which calls the 52 * `deregister` method on `InertManager` for each managed inert node. 53 */ 54 class InertRoot { 55 /** 56 * @param {!Element} rootElement The Element at the root of the inert subtree. 57 * @param {!InertManager} inertManager The global singleton InertManager object. 58 */ 59 constructor(rootElement, inertManager) { 60 /** @type {!InertManager} */ 61 this._inertManager = inertManager; 62 63 /** @type {!Element} */ 64 this._rootElement = rootElement; 65 66 /** 67 * @type {!Set<!InertNode>} 68 * All managed focusable nodes in this InertRoot's subtree. 69 */ 70 this._managedNodes = new Set(); 71 72 // Make the subtree hidden from assistive technology 73 if (this._rootElement.hasAttribute('aria-hidden')) { 74 /** @type {?string} */ 75 this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden'); 76 } else { 77 this._savedAriaHidden = null; 78 } 79 this._rootElement.setAttribute('aria-hidden', 'true'); 80 81 // Make all focusable elements in the subtree unfocusable and add them to _managedNodes 82 this._makeSubtreeUnfocusable(this._rootElement); 83 84 // Watch for: 85 // - any additions in the subtree: make them unfocusable too 86 // - any removals from the subtree: remove them from this inert root's managed nodes 87 // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable 88 // element, make that node a managed node. 89 this._observer = new MutationObserver(this._onMutation.bind(this)); 90 this._observer.observe(this._rootElement, {attributes: true, childList: true, subtree: true}); 91 } 92 93 /** 94 * Call this whenever this object is about to become obsolete. This unwinds all of the state 95 * stored in this object and updates the state of all of the managed nodes. 96 */ 97 destructor() { 98 this._observer.disconnect(); 99 100 if (this._rootElement) { 101 if (this._savedAriaHidden !== null) { 102 this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden); 103 } else { 104 this._rootElement.removeAttribute('aria-hidden'); 105 } 106 } 107 108 this._managedNodes.forEach(function(inertNode) { 109 this._unmanageNode(inertNode.node); 110 }, this); 111 112 // Note we cast the nulls to the ANY type here because: 113 // 1) We want the class properties to be declared as non-null, or else we 114 // need even more casts throughout this code. All bets are off if an 115 // instance has been destroyed and a method is called. 116 // 2) We don't want to cast "this", because we want type-aware optimizations 117 // to know which properties we're setting. 118 this._observer = /** @type {?} */ (null); 119 this._rootElement = /** @type {?} */ (null); 120 this._managedNodes = /** @type {?} */ (null); 121 this._inertManager = /** @type {?} */ (null); 122 } 123 124 /** 125 * @return {!Set<!InertNode>} A copy of this InertRoot's managed nodes set. 126 */ 127 get managedNodes() { 128 return new Set(this._managedNodes); 129 } 130 131 /** @return {boolean} */ 132 get hasSavedAriaHidden() { 133 return this._savedAriaHidden !== null; 134 } 135 136 /** @param {?string} ariaHidden */ 137 set savedAriaHidden(ariaHidden) { 138 this._savedAriaHidden = ariaHidden; 139 } 140 141 /** @return {?string} */ 142 get savedAriaHidden() { 143 return this._savedAriaHidden; 144 } 145 146 /** 147 * @param {!Node} startNode 148 */ 149 _makeSubtreeUnfocusable(startNode) { 150 composedTreeWalk(startNode, (node) => this._visitNode(node)); 151 152 let activeElement = document.activeElement; 153 154 if (!document.body.contains(startNode)) { 155 // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement. 156 let node = startNode;
157 /** @type {!ShadowRoot|undefined} */ 158 let root = undefined; 159 while (node) { 160 if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { 161 root = /** @type {!ShadowRoot} */ (node); 162 break; 163 } 164 node = node.parentNode; 165 } 166 if (root) { 167 activeElement = root.activeElement; 168 } 169 } 170 if (startNode.contains(activeElement)) { 171 activeElement.blur(); 172 // In IE11, if an element is already focused, and then set to tabindex=-1 173 // calling blur() will not actually move the focus. 174 // To work around this we call focus() on the body instead. 175 if (activeElement === document.activeElement) { 176 document.body.focus(); 177 } 178 } 179 } 180 181 /** 182 * @param {!Node} node 183 */ 184 _visitNode(node) { 185 if (node.nodeType !== Node.ELEMENT_NODE) { 186 return; 187 } 188 const element = /** @type {!Element} */ (node); 189 190 // If a descendant inert root becomes un-inert, its descendants will still be inert because of 191 // this inert root, so all of its managed nodes need to be adopted by this InertRoot. 192 if (element !== this._rootElement && element.hasAttribute('inert')) { 193 this._adoptInertRoot(element); 194 } 195 196 if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) { 197 this._manageNode(element); 198 } 199 } 200 201 /** 202 * Register the given node with this InertRoot and with InertManager. 203 * @param {!Node} node 204 */ 205 _manageNode(node) { 206 const inertNode = this._inertManager.register(node, this); 207 this._managedNodes.add(inertNode); 208 } 209 210 /** 211 * Unregister the given node with this InertRoot and with InertManager. 212 * @param {!Node} node 213 */ 214 _unmanageNode(node) { 215 const inertNode = this._inertManager.deregister(node, this); 216 if (inertNode) { 217 this._managedNodes.delete(inertNode); 218 } 219 } 220 221 /** 222 * Unregister the entire subtree starting at `startNode`. 223 * @param {!Node} startNode 224 */ 225 _unmanageSubtree(startNode) { 226 composedTreeWalk(startNode, (node) => this._unmanageNode(node)); 227 } 228 229 /** 230 * If a descendant node is found with an `inert` attribute, adopt its managed nodes. 231 * @param {!Element} node 232 */ 233 _adoptInertRoot(node) { 234 let inertSubroot = this._inertManager.getInertRoot(node); 235 236 // During initialisation this inert root may not have been registered yet, 237 // so register it now if need be. 238 if (!inertSubroot) { 239 this._inertManager.setInert(node, true); 240 inertSubroot = this._inertManager.getInertRoot(node); 241 } 242 243 inertSubroot.managedNodes.forEach(function(savedInertNode) { 244 this._manageNode(savedInertNode.node); 245 }, this); 246 } 247 248 /** 249 * Callback used when mutation observer detects subtree additions, removals, or attribute changes. 250 * @param {!Array<!MutationRecord>} records 251 * @param {!MutationObserver} self 252 */ 253 _onMutation(records, self) { 254 records.forEach(function(record) {
vendor: 2,097 bytes, lines 255-298
255 const target = /** @type {!Element} */ (record.target); 256 if (record.type === 'childList') { 257 // Manage added nodes 258 slice.call(record.addedNodes).forEach(function(node) { 259 this._makeSubtreeUnfocusable(node); 260 }, this); 261 262 // Un-manage removed nodes 263 slice.call(record.removedNodes).forEach(function(node) { 264 this._unmanageSubtree(node); 265 }, this); 266 } else if (record.type === 'attributes') { 267 if (record.attributeName === 'tabindex') { 268 // Re-initialise inert node if tabindex changes 269 this._manageNode(target); 270 } else if (target !== this._rootElement && 271 record.attributeName === 'inert' && 272 target.hasAttribute('inert')) { 273 // If a new inert root is added, adopt its managed nodes and make sure it knows about the 274 // already managed nodes from this inert subroot. 275 this._adoptInertRoot(target); 276 const inertSubroot = this._inertManager.getInertRoot(target); 277 this._managedNodes.forEach(function(managedNode) { 278 if (target.contains(managedNode.node)) { 279 inertSubroot._manageNode(managedNode.node); 280 } 281 }); 282 } 283 } 284 }, this); 285 } 286 } 287 288 /** 289 * `InertNode` initialises and manages a single inert node. 290 * A node is inert if it is a descendant of one or more inert root elements. 291 * 292 * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and 293 * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element 294 * is intrinsically focusable or not. 295 * 296 * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an 297 * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the 298 * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertN
298ode` if no `InertRoot`s 299 * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists, 300 * or removes the `tabindex` attribute if the element is intrinsically focusable. 301 */ 302 class InertNode { 303 /** 304 * @param {!Node} node A focusable element to be made inert. 305 * @param {!InertRoot} inertRoot The inert root element associated with this inert node. 306 */ 307 constructor(node, inertRoot) { 308 /** @type {!Node} */ 309 this._node = node; 310 311 /** @type {boolean} */ 312 this._overrodeFocusMethod = false; 313 314 /** 315 * @type {!Set<!InertRoot>} The set of descendant inert roots. 316 * If and only if this set becomes empty, this node is no longer inert. 317 */ 318 this._inertRoots = new Set([inertRoot]); 319 320 /** @type {?number} */ 321 this._savedTabIndex = null; 322 323 /** @type {boolean} */ 324 this._destroyed = false; 325 326 // Save any prior tabindex info and make this node untabbable 327 this.ensureUntabbable(); 328 } 329 330 /** 331 * Call this whenever this object is about to become obsolete. 332 * This makes the managed node focusable again and deletes all of the previously stored state. 333 */ 334 destructor() { 335 this._throwIfDestroyed(); 336 337 if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {
338 const element = /** @type {!Element} */ (this._node); 339 if (this._savedTabIndex !== null) { 340 element.setAttribute('tabindex', this._savedTabIndex); 341 } else { 342 element.removeAttribute('tabindex'); 343 } 344 345 // Use `delete` to restore native focus method. 346 if (this._overrodeFocusMethod) { 347 delete element.focus; 348 } 349 } 350 351 // See note in InertRoot.destructor for why we cast these nulls to ANY. 352 this._node = /** @type {?} */ (null); 353 this._inertRoots = /** @type {?} */ (null); 354 this._destroyed = true; 355 } 356 357 /** 358 * @type {boolean} Whether this object is obsolete because the managed node is no longer inert. 359 * If the object has been destroyed, any attempt to access it will cause an exception. 360 */ 361 get destroyed() { 362 return /** @type {!InertNode} */ (this)._destroyed; 363 } 364 365 /** 366 * Throw if user tries to access destroyed InertNode. 367 */ 368 _throwIfDestroyed() { 369 if (this.destroyed) { 370 throw new Error('Trying to access destroyed InertNode'); 371 } 372 } 373 374 /** @return {boolean} */ 375 get hasSavedTabIndex() { 376 return this._savedTabIndex !== null; 377 } 378 379 /** @return {!Node} */ 380 get node() { 381 this._throwIfDestroyed(); 382 return this._node; 383 } 384 385 /** @param {?number} tabIndex */ 386 set savedTabIndex(tabIndex) { 387 this._throwIfDestroyed(); 388 this._savedTabIndex = tabIndex; 389 } 390 391 /** @return {?number} */ 392 get savedTabIndex() { 393 this._throwIfDestroyed(); 394 return this._savedTabIndex; 395 } 396 397 /** Save the existing tabindex value and make the node untabbable and unfocusable */ 398 ensureUntabbable() { 399 if (this.node.nodeType !== Node.ELEMENT_NODE) { 400 return; 401 }
402 const element = /** @type {!Element} */ (this.node); 403 if (matches.call(element, _focusableElementsString)) { 404 if (/** @type {!HTMLElement} */ (element).tabIndex === -1 && 405 this.hasSavedTabIndex) { 406 return; 407 } 408 409 if (element.hasAttribute('tabindex')) { 410 this._savedTabIndex = /** @type {!HTMLElement} */ (element).tabIndex; 411 } 412 element.setAttribute('tabindex', '-1'); 413 if (element.nodeType === Node.ELEMENT_NODE) { 414 element.focus = function() {}; 415 this._overrodeFocusMethod = true; 416 } 417 } else if (element.hasAttribute('tabindex')) { 418 this._savedTabIndex = /** @type {!HTMLElement} */ (element).tabIndex; 419 element.removeAttribute('tabindex'); 420 } 421 } 422 423 /** 424 * Add another inert root to this inert node's set of managing inert roots. 425 * @param {!InertRoot} inertRoot 426 */ 427 addInertRoot(inertRoot) { 428 this._throwIfDestroyed(); 429 this._inertRoots.add(inertRoot); 430 } 431 432 /** 433 * Remove the given inert root from this inert node's set of managing inert roots. 434 * If the set of managing inert roots becomes empty, this node is no longer inert, 435 * so the object should be destroyed. 436 * @param {!InertRoot} inertRoot 437 */ 438 removeInertRoot(inertRoot) { 439 this._throwIfDestroyed(); 440 this._inertRoots.delete(inertRoot); 441 if (this._inertRoots.size === 0) { 442 this.destructor(); 443 } 444 } 445 } 446 447 /** 448 * InertManager is a per-document singleton object which manages all inert roots and nodes. 449 * 450 * When an element becomes an inert root by having an `inert` attribute set and/or its `inert` 451 * property set to `true`, the `setInert` method creates an `InertRoot` object for the element. 452 * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant 453 * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance 454 * is created for each such node, via the `_managedNodes` map. 455 */ 456 class InertManager { 457 /** 458 * @param {!Document} document 459 */ 460 constructor(document) { 461 if (!document) { 462 throw new Error('Missing required argument; InertManager needs to wrap a document.'); 463 } 464 465 /** @type {!Document} */ 466 this._document = document; 467 468 /** 469 * All managed nodes known to this InertManager. In a map to allow looking up by Node. 470 * @type {!Map<!Node, !InertNode>} 471 */ 472 this._managedNodes = new Map(); 473 474 /** 475 * All inert roots known to this InertManager. In a map to allow looking up by Node. 476 * @type {!Map<!Node, !InertRoot>} 477 */ 478 this._inertRoots = new Map(); 479 480 /** 481 * Observer for mutations on `document.body`. 482 * @type {!MutationObserver} 483 */ 484 this._observer = new MutationObserver(this._watchForInert.bind(this)); 485 486 // Add inert style. 487 addInertStyle(document.head || document.body || document.documentElement); 488 489 // Wait for document to be loaded. 490 if (document.readyState === 'loading') { 491 document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this)); 492 } else { 493 this._onDocumentLoaded(); 494 } 495 } 496 497 /** 498 * Set whether the given element should be an inert root or not. 499 * @param {!Element} root 500 * @param {boolean} inert 501 */ 502 setInert(root, inert) { 503 if (inert) { 504 if (this._inertRoots.has(root)) { // element is already inert 505 return; 506 } 507 508 const inertRoot = new InertRoot(root, this); 509 root.setAttribute('inert', ''); 510 this._inertRoots.set(root, inertRoot); 511 // If not contained in the document, it must be in a shadowRoot. 512 // Ensure inert styles are added there. 513 if (!this._document.body.contains(root)) { 514 let parent = root.parentNode; 515 while (parent) { 516 if (parent.nodeType === 11) { 517 addInertStyle(parent); 518 } 519 parent = parent.parentNode; 520 } 521 } 522 } else { 523 if (!this._inertRoots.has(root)) { // element is already non-inert 524 return; 525 } 526 527 const inertRoot = this._inertRoots.get(root);
528 inertRoot.destructor(); 529 this._inertRoots.delete(root); 530 root.removeAttribute('inert'); 531 } 532 } 533 534 /** 535 * Get the InertRoot object corresponding to the given inert root element, if any. 536 * @param {!Node} element 537 * @return {!InertRoot|undefined} 538 */ 539 getInertRoot(element) { 540 return this._inertRoots.get(element); 541 } 542 543 /** 544 * Register the given InertRoot as managing the given node. 545 * In the case where the node has a previously existing inert root, this inert root will 546 * be added to its set of inert roots. 547 * @param {!Node} node 548 * @param {!InertRoot} inertRoot 549 * @return {!InertNode} inertNode 550 */ 551 register(node, inertRoot) { 552 let inertNode = this._managedNodes.get(node); 553 if (inertNode !== undefined) { // node was already in an inert subtree 554 inertNode.addInertRoot(inertRoot); 555 } else { 556 inertNode = new InertNode(node, inertRoot); 557 } 558 559 this._managedNodes.set(node, inertNode); 560 561 return inertNode; 562 } 563 564 /** 565 * De-register the given InertRoot as managing the given inert node. 566 * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert 567 * node from the InertManager's set of managed nodes if it is destroyed. 568 * If the node is not currently managed, this is essentially a no-op. 569 * @param {!Node} node 570 * @param {!InertRoot} inertRoot 571 * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any. 572 */ 573 deregister(node, inertRoot) { 574 const inertNode = this._managedNodes.get(node); 575 if (!inertNode) { 576 return null; 577 } 578 579 inertNode.removeInertRoot(inertRoot); 580 if (inertNode.destroyed) { 581 this._managedNodes.delete(node); 582 } 583 584 return inertNode; 585 } 586 587 /** 588 * Callback used when document has finished loading. 589 */ 590 _onDocumentLoaded() { 591 // Find all inert roots in document and make them actually inert. 592 const inertElements = slice.call(this._document.querySelectorAll('[inert]')); 593 inertElements.forEach(function(inertElement) { 594 this.setInert(inertElement, true); 595 }, this); 596 597 // Comment this out to use programmatic API only. 598 this._observer.observe(this._document.body || this._document.documentElement, {attributes: true, subtree: true, childList: true}); 599 } 600 601 /** 602 * Callback used when mutation observer detects attribute changes. 603 * @param {!Array<!MutationRecord>} records 604 * @param {!MutationObserver} self 605 */ 606 _watchForInert(records, self) { 607 const _this = this; 608 records.forEach(function(record) { 609 switch (record.type) { 610 case 'childList': 611 slice.call(record.addedNodes).forEach(function(node) { 612 if (node.nodeType !== Node.ELEMENT_NODE) { 613 return; 614 } 615 const inertElements = slice.call(node.querySelectorAll('[inert]')); 616 if (matches.call(node, '[inert]')) { 617 inertElements.unshift(node); 618 } 619 inertElements.forEach(function(inertElement) { 620 this.setInert(inertElement, true); 621 }, _this); 622 }, _this); 623 break; 624 case 'attributes': 625 if (record.attributeName !== 'inert') { 626 return; 627 }
628 const target = /** @type {!Element} */ (record.target); 629 const inert = target.hasAttribute('inert'); 630 _this.setInert(target, inert); 631 break; 632 } 633 }, this); 634 } 635 } 636 637 /** 638 * Recursively walk the composed tree from |node|. 639 * @param {!Node} node 640 * @param {(function (!Element))=} callback Callback to be called for each element traversed, 641 * before descending into child nodes. 642 * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any. 643 */ 644 function composedTreeWalk(node, callback, shadowRootAncestor) { 645 if (node.nodeType == Node.ELEMENT_NODE) { 646 const element = /** @type {!Element} */ (node); 647 if (callback) { 648 callback(element); 649 } 650 651 // Descend into node: 652 // If it has a ShadowRoot, ignore all child elements - these will be picked 653 // up by the <content> or <shadow> elements. Descend straight into the 654 // ShadowRoot. 655 const shadowRoot = /** @type {
655!HTMLElement} */ (element).shadowRoot; 656 if (shadowRoot) { 657 composedTreeWalk(shadowRoot, callback, shadowRoot); 658 return; 659 } 660 661 // If it is a <content> element, descend into distributed elements - these 662 // are elements from outside the shadow root which are rendered inside the 663 // shadow DOM. 664 if (element.localName == 'content') { 665 const content = /** @type {!HTMLContentElement} */ (element); 666 // Verifies if ShadowDom v0 is supported. 667 const distributedNodes = content.getDistributedNodes ? 668 content.getDistributedNodes() : []; 669 for (let i = 0; i < distributedNodes.length; i++) { 670 composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor); 671 } 672 return; 673 } 674 675 // If it is a <slot> element, descend into assigned nodes - these 676 // are elements from outside the shadow root which are rendered inside the 677 // shadow DOM. 678 if (element.localName == 'slot') {
679 const slot = /** @type {!HTMLSlotElement} */ (element); 680 // Verify if ShadowDom v1 is supported. 681 const distributedNodes = slot.assignedNodes ? 682 slot.assignedNodes({flatten: true}) : []; 683 for (let i = 0; i < distributedNodes.length; i++) { 684 composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor); 685 } 686 return; 687 } 688 } 689 690 // If it is neither the parent of a ShadowRoot, a <content> element, a <slot> 691 // element, nor a <shadow> element recurse normally. 692 let child = node.firstChild; 693 while (child != null) { 694 composedTreeWalk(child, callback, shadowRootAncestor); 695 child = child.nextSibling; 696 } 697 } 698 699 /** 700 * Adds a style element to the node containing the inert specific styles 701 * @param {!Node} node 702 */ 703 function addInertStyle(node) { 704 if (node.querySelector('style#inert-style, link#inert-style')) { 705 return; 706 } 707 const style = document.createElement('style'); 708 style.setAttribute('id', 'inert-style'); 709 style.textContent = '\n'+ 710 '[inert] {\n' + 711 ' pointer-events: none;\n' + 712 ' cursor: default;\n' + 713 '}\n' + 714 '\n' + 715 '[inert], [inert] * {\n' + 716 ' -webkit-user-select: none;\n' + 717 ' -moz-user-select: none;\n' + 718 ' -ms-user-select: none;\n' + 719 ' user-select: none;\n' + 720 '}\n'; 721 node.appendChild(style); 722 } 723 724 if (!Element.prototype.hasOwnProperty('inert')) { 725 /** @type {!InertManager} */ 726 const inertManager = new InertManager(document); 727 728 Object.defineProperty(Element.prototype, 'inert', { 729 enumerable: true, 730 /** @this {!Element} */ 731 get: function() { 732 return this.hasAttribute('inert'); 733 }, 734 /** @this {!Element} */ 735 set: function(inert) { 736 inertManager.setInert(this, inert); 737 }, 738 }); 739 } 740 })();; 741jQuery(document).ready(oxygen_init_offcanvas); 742function oxygen_init_offcanvas($) { 743 744 let touchEvent = 'click'; 745 let previousFocus = false; 746 747 'use strict'; 748 749 $('.oxy-off-canvas .offcanvas-inner').each(function() { 750 751 var offCanvas = $(this), 752 triggerSelector = offCanvas.data('trigger-selector'), 753 offCanvasOutside = offCanvas.data('click-outside'), 754 offCanvasEsc = offCanvas.data('esc'), 755 offCanvasStart = offCanvas.data('start'), 756 offCanvasBackdrop = offCanvas.data('backdrop'), 757 offCanvasFocusSelector = offCanvas.data('focus-selector'), 758 backdrop = offCanvas.prev('.oxy-offcanvas_backdrop'), 759 menuHashLink = offCanvas.find('a[href*=\\#]').not(".menu-item-has-children > a"), 760 reset = offCanvas.data('reset'), 761 mediaPlayer = offCanvas.find('.oxy-pro-media-player vime-player'), 762 otherOffcanvas = offCanvas.data('second-offcanvas'), 763 maybeHashClose = offCanvas.data('hashclose'), 764 offcanvasPush = offCanvas.data('content-push'), 765 offcanvasPushContent = offCanvas.data('content-selector'), 766 offcanvasPushDuration = offCanvas.data('content-duration'), 767 offcanvasID = offCanvas.parent('.oxy-off-canvas').attr('ID'), 768 burgerSync = offCanvas.data('burger-sync'), 769 maybeOverflow = offCanvas.data('overflow'); 770 771 772 if (false !== offCanvas.data('stagger-menu')) { 773 offCanvas.find('.oxy-slide-menu_list > .menu-item').addClass('aos-animate'); 774 offCanvas.find('.oxy-slide-menu_list > .menu-item').attr( { "data-aos": offCanvas.data('stagger-menu') } ); 775 } 776 777 if (! $(this).hasClass('oxy-off-canvas-toggled') ) { 778 $(this).find(".aos-animate:not(.oxy-off-canvas-toggled .aos-animate)").addClass("aos-animate-disabled").removeClass("aos-animate"); 779 } 780 781 ariaExpandToggle('false'); 782 783 if ( true === offCanvas.data('auto-aria') ) { 784 785 $(triggerSelector).each(function(i,trigger) { 786 787 if ( $(trigger).hasClass('oxy-burger-trigger') && $(trigger).children('.hamburger').length ) { 788 $(trigger).children('.hamburger').attr('aria-controls', offCanvas.attr('id')); 789 } else { 790 $(trigger).attr('aria-controls', offCanvas.attr('id')); 791 } 792 }); 793 } 794 795 if ( true === offCanvas.data('focus-trap') ) { 796
797 const keyboardfocusableElements = offCanvas.find( 798 'a[href], button, input, textarea, select, details, [tabindex]' 799 ); 800 801 if (keyboardfocusableElements.length) { 802 803 keyboardfocusableElements[keyboardfocusableElements.length - 1].addEventListener('keydown', (e) => { 804 805 if (!e.shiftKey && e.key === 'Tab') { 806 e.preventDefault() 807 keyboardfocusableElements[0].focus() 808 } 809 810 }) 811 812 keyboardfocusableElements[0].addEventListener('keydown', (e) => { 813 814 if (e.shiftKey && e.key === 'Tab') { 815 e.preventDefault() 816 keyboardfocusableElements[keyboardfocusableElements.length - 1].focus() 817 } 818 819 }) 820 821 } 822 } 823 824 function doOffCanvas(triggerSelector) { 825 826 if ($(triggerSelector).hasClass('oxy-close-modal')) { 827 oxyCloseModal(); 828 } 829 830 if (!offCanvas.parent().hasClass('oxy-off-canvas-toggled')) { 831 openOffCanvas(); 832 } else { 833 closeOffCanvas(); 834 } 835 } 836 837 if ( $(triggerSelector).hasClass('oxy-burger-trigger') && $(triggerSelector).children('.hamburger').length ) { 838 839 let triggerSelectorTouch = $( triggerSelector ).children('.hamburger').data('touch'); 840 let touchEvent = 'ontouchstart' in window ? triggerSelectorTouch : 'click'; 841 842 $(triggerSelector).on(touchEvent, function(e) { 843 e.stopPropagation(); 844 e.preventDefault(); 845 846 if (true === burgerSync) { 847 $(triggerSelector).not('#' + $(this).attr('ID')).children('.hamburger').toggleClass('is-active'); 848 } 849 850 if ( !e.target.closest('.oxy-off-canvas') ) { 851 previousFocus = e.target.closest(triggerSelector); 852 } 853 854 doOffCanvas(triggerSelector); 855 856 }); 857 } else { 858 859 let triggerSelectorTouch = touchEvent; 860 $(triggerSelector).on(triggerSelectorTouch, function(e) { 861 e.stopPropagation(); 862 e.preventDefault(); 863 doOffCanvas(triggerSelector); 864 }); 865 } 866 867 868 // Backdrop Clicked 869 offCanvas.siblings('.oxy-offcanvas_backdrop').on(touchEvent, function(e) { 870 e.stopPropagation(); 871 if (offCanvasOutside === true) { 872 closeBurger(); 873 closeLottie(); 874 closeOffCanvas(); 875 } 876 877 }); 878 879 // Pressing ESC from inside the offcanvas will close it 880 offCanvas.keyup(function(e) { 881 if (offCanvasEsc === true) { 882 if (e.keyCode === 27) { 883 closeBurger(); 884 closeLottie(); 885 closeOffCanvas(); 886 } 887 } 888 }); 889 890 if (maybeHashClose === true) { 891 892 $(document).on("click", '#' + offcanvasID + ' a[href*=\\#]', function (e) { 893 894 e.stopPropagation(); 895 896 if ( ( !$(this).not(".menu-item-has-children > a") ) || $(this).is('[href="#"]' ) ) { 897 return; 898 } 899 900 if ( $(this).is(".oxy-table-of-contents_list-item > a") ) { 901 return; 902 } 903 904 if ( $(this).is(".mm-btn") || $(this).is(".mm-navbar__title") ) { 905 return; 906 } 907 908 909 910 if (this.pathname === window.location.pathname) { 911 closeBurger(); 912 closeLottie(); 913 closeOffCanvas(); 914 } 915 }); 916 917 } 918 919 if (offcanvasPush) { 920 $(offcanvasPushContent).attr('data-offcanvas-push', '#' + offcanvasID); 921 $(offcanvasPushContent).css({ 922 "--offcanvas-push" : offcanvasPush + "px", 923 "--offcanvas-push-duration" : offcanvasPushDuration + 's', 924 }); 925 926 } 927 928 function ariaExpandToggle($state) { 929 if ( true === offCanvas.data('auto-aria') ) { 930 $(triggerSelector).each(function(i,trigger) { 931 if ( $(trigger).hasClass('oxy-burger-trigger') && $(trigger).children('.hamburger').length ) { 932 $(trigger).children('.hamburger').attr('aria-expanded', $state); 933 } else { 934 $(trigger).attr('aria-expanded', $state); 935 $(trigger).attr('role','button'); 936 } 937 }); 938 } 939 } 940 941 function inertToggle($state) { 942 if ( false !== offCanvas.data('inert') ) { 943 if ('true' === $state) { 944 offCanvas.attr('inert',''); 945 } else { 946 offCanvas.removeAttr('inert'); 947 } 948 } 949 } 950 951 function openOffCanvas() { 952 offCanvas.parent().addClass('oxy-off-canvas-toggled'); 953 $(offcanvasPushContent).addClass('oxy-off-canvas-toggled'); 954 $('body,html').addClass('off-canvas-toggled'); 955 $('body,html').addClass('toggled' + offcanvasID); 956 957 if (true === offCanvasStart) { 958 doClose(); 959 } else { 960 doOpen() 961 } 962 963 } 964 965 function closeOffCanvas() { 966 $('body,html').removeClass('off-canvas-toggled'); 967 $('body,html').removeClass('toggled' + offcanvasID); 968 offCanvas.parent().removeClass('oxy-off-canvas-toggled'); 969 $(offcanvasPushContent).removeClass('oxy-off-canvas-toggled'); 970 971 if (true === offCanvasStart) { 972 doOpen() 973 } else { 974 doClose(); 975 } 976 977 } 978 979 function doOpen() { 980 offCanvas.find(".aos-animate-disabled").removeClass("aos-animate-disabled").addClass("aos-animate"); 981 offCanvas.parent('.oxy-off-canvas').trigger('extras_offcanvas:open'); 982 983 inertToggle('false') 984 setTimeout(function() { 985 offCanvas.attr('aria-hidden','false'); 986 }, 0); 987 988 ariaExpandToggle('true'); 989 990 991 992 if (offCanvasFocusSelector) { 993 setTimeout(function() { 994 offCanvas.parent().find(offCanvasFocusSelector).eq(0).focus(); 995 }, 0); 996 } 997 } 998 999 function doClose() { 1000 inertToggle('true'); 1001 offCanvas.attr('aria-hidden','true'); 1002 1003 setTimeout(function(){ 1004 offCanvas.find(".aos-animate").removeClass("aos-animate").addClass("aos-animate-disabled"); 1005 }, reset); // wait before removing the animate class 1006 1007 $(offCanvas).parent('.oxy-off-canvas').trigger('extras_offcanvas:close'); 1008 if (otherOffcanvas) { 1009 $(otherOffcanvas).children('.offcanvas-inner').attr('aria-hidden','true'); 1010 $(otherOffcanvas).children('.offcanvas-inner').removeAttr('inert'); 1011 $(otherOffcanvas).removeClass('oxy-off-canvas-toggled'); 1012 } 1013 1014 ariaExpandToggle('false'); 1015 1016 mediaPlayer.each(function() { 1017 $(this)[0].pause(); // turn off any pro media players 1018 }); 1019 1020 setTimeout(function() { 1021 1022 if (!!previousFocus) { 1023 1024 if ( $(previousFocus).find('.hamburger') ) { 1025 $(previousFocus).find('.hamburger').focus(); 1026 } else { 1027 $(previousFocus).focus(); 1028 } 1029 } 1030 1031 }, 0); 1032 } 1033 1034 function closeBurger() { 1035
1036 if ( ( $(triggerSelector).children('.hamburger').length > 0) && ($(this).children('.hamburger').data('animation') !== 'disable')) { 1037 $(triggerSelector).children('.hamburger').removeClass('is-active'); 1038 } 1039 } 1040 1041 function closeLottie() { 1042 1043 if ( ( $(triggerSelector).children('lottie-player').length > 0) ) { 1044 $(triggerSelector).children('lottie-player').trigger('click'); 1045 } 1046 } 1047 1048 /* For programmatically opening */ 1049 function extrasOpenOffcanvas($extras_offcanvas) { 1050 1051 var thisOffcanvas = $($extras_offcanvas); 1052 var thisoffcanvasPushContent = thisOffcanvas.children('.offcanvas-inner').data('content-selector'); 1053 var thisoffCanvasFocusSelector = thisOffcanvas.children('.offcanvas-inner').data('focus-selector'); 1054 1055 thisOffcanvas.addClass('oxy-off-canvas-toggled'); 1056 $(offcanvasPushContent).addClass('oxy-off-canvas-toggled'); 1057 offCanvas.attr('aria-hidden','false'); 1058 $('body,html').addClass('off-canvas-toggled'); 1059 thisOffcanvas.find(".aos-animate-disabled").removeClass("aos-animate-disabled").addClass("aos-animate"); 1060 thisOffcanvas.trigger('extras_offcanvas:open'); 1061 1062 if (thisoffCanvasFocusSelector) { 1063 thisOffcanvas.find(thisoffCanvasFocusSelector).eq(0).focus(); 1064 } 1065 1066 } 1067 1068 if (true !== offCanvasStart) { 1069 offCanvas.attr('aria-hidden','true'); 1070 inertToggle('true'); 1071 } else { 1072 offCanvas.attr('aria-hidden','false'); 1073 } 1074 1075 // Expose function 1076 window.extrasOpenOffcanvas = extrasOpenOffcanvas; 1077 1078 var stagger = offCanvas.data('stagger'); 1079 1080 // Make sure AOS animations are reset for elements inside after everything has loaded 1081 setTimeout(function(){ 1082 if (! offCanvas.hasClass('oxy-off-canvas-toggled') ) { 1083 offCanvas.find(".aos-animate:not(.oxy-off-canvas-toggled .aos-animate)").addClass("aos-animate-disabled").removeClass("aos-animate"); 1084 } 1085 }, 40); // wait 1086 1087 if (stagger != null) { 1088 1089 var delay = offCanvas.data('first-delay'); 1090 offCanvas.find('[data-aos]').not('.not-staggered').each(function() { 1091 delay = delay + stagger; 1092 1093 $(this).attr('data-aos-delay', delay); 1094 }); 1095 1096 } 1097 1098 }); 1099} 1100 1101;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.