vendor: 78 bytes, lines 1-3
1/******/ (() => { // webpackBootstrap 2/******/ var __webpack_modules__ = ({ 3
vendor: 14,757 bytes, lines 4-13
4/***/ "./node_modules/aos/dist/aos.js": 5/*!**************************************!*\ 6 !*** ./node_modules/aos/dist/aos.js ***! 7 \**************************************/ 8/***/ (function(module) { 9 10!function(e,t){ true?module.exports=t():0}(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),s=o(c),f=n(8),d=o(f),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()},M=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},_=function(e){x=i(x,e),w=(0,h.default)();var t=document.all&&!window.atob;return S(x.disable)||t?M():(x.disableMutationObserver||d.default.isSupported()||(console.info('\n aos: MutationObserver is not supported on this browser,\n code mutations observing has been disabled.\n You may have to call "refreshHard()" by yourself.\n '),x.disableMutationObserver=!0),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,s.default)(j,x.debounceDelay,!0)),window.addEventListener("orientationchange",(0,s.default)(j,x.debounceDelay,!0)),window.addEventListener("scroll",(0,u.default)(function(){(0,b.default)(w,x.once)},x.throttleDelay)),x.disableMutationObserver||d.default.ready("[data-aos]",O),w)};e.exports={init:_,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(f,t),M?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 f(){var e=O();return c(e)?d(e):void(h=setTimeout(f,a(e)))}function d(e){return h=void 0,_&&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(f,t),o(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,k=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(s);return t=u(t)||0,i(n)&&(M=!!n.leading,S="maxWait"in n,y=S?x(u(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),m.cancel=l,m.flush=p,m}function o(e,t,o){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError(s);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 f;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)?f:+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},s="Expected a function",f=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(f,t),M?i(e):g}function u(e){var n=e-w,o=e-O,i=t-n;return S?x(i,y-o):i}function s(e){var n=e-w,o=e-O;return void 0===w||n>=t||n<0||S&&o>=y}function f(){var e=j();return s(e)?d(e):void(h=setTimeout(f,u(e)))}function d(e){return h=void 0,_&&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=s(e);if(b=arguments,v=this,w=e,n){if(void 0===h)return r(w);if(S)return h=setTimeout(f,t),i(w)}return void 0===h&&(h=setTimeout(f,t)),g}var b,v,y,g,h,w,O=0,M=!1,S=!1,_=!0;if("function"!=typeof e)throw new TypeError(c);return t=a(t)||0,o(n)&&(M=!!n.leading,S="maxWait"in n,y=S?k(a(n.maxWait)||0,t):y,_="trailing"in n?!!n.trailing:_),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)==f}function a(e){if("number"==typeof e)return e;if(r(e))return s;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)?s:+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",s=NaN,f="[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){var t=void 0,o=void 0,i=void 0;for(t=0;t<e.length;t+=1){if(o=e[t],o.dataset&&o.dataset.aos)return!0;if(i=o.children&&n(o.children))return!0}return!1}function o(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function i(){return!!o()}function r(e,t){var n=window.document,i=o(),r=new i(a);u=t,r.observe(n.documentElement,{childList:!0,subtree:!0,removedNodes:!0})}function a(e){e&&e.forEach(function(e){var t=Array.prototype.slice.call(e.addedNodes),o=Array.prototype.slice.call(e.removedNodes),i=t.concat(o);if(n(i))return u()})}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){};t.default={isSupported:i,ready:r}},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 )|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,s=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 s},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}])}); 11 12/***/ }), 13
14/***/ "./src/js/_components.js": 15/*!*******************************!*\ 16 !*** ./src/js/_components.js ***! 17 \*******************************/ 18/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 19 20"use strict"; 21__webpack_require__.r(__webpack_exports__); 22/* harmony import */ var _components_sliders__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/sliders */ "./src/js/components/sliders.js"); 23/* harmony import */ var _components_more__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/more */ "./src/js/components/more.js"); 24/* harmony import */ var _components_more__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_components_more__WEBPACK_IMPORTED_MODULE_1__); 25/* harmony import */ var _components_mix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/mix */ "./src/js/components/mix.js"); 26/* harmony import */ var _components_validate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/validate */ "./src/js/components/validate.js"); 27/* harmony import */ var _components_scroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/scroll */ "./src/js/components/scroll.js"); 28/* harmony import */ var _components_scroll__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_components_scroll__WEBPACK_IMPORTED_MODULE_4__); 29/* harmony import */ var _components_map__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/map */ "./src/js/components/map.js"); 30/* harmony import */ var _components_map__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_components_map__WEBPACK_IMPORTED_MODULE_5__); 31 32 33 34 35 36 37 38/***/ }), 39
40/***/ "./src/js/_functions.js": 41/*!******************************!*\ 42 !*** ./src/js/_functions.js ***! 43 \******************************/ 44/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 45 46"use strict"; 47__webpack_require__.r(__webpack_exports__); 48/* harmony import */ var _functions_mobile_check__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./functions/mobile-check */ "./src/js/functions/mobile-check.js"); 49/* harmony import */ var _functions_burger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./functions/burger */ "./src/js/functions/burger.js"); 50/* harmony import */ var graph_modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graph-modal */ "./node_modules/graph-modal/src/graph-modal.js"); 51/* harmony import */ var aos__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! aos */ "./node_modules/aos/dist/aos.js"); 52/* harmony import */ var aos__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(aos__WEBPACK_IMPORTED_MODULE_3__); 53/* harmony import */ var smooth_scroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! smooth-scroll */ "./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js"); 54/* harmony import */ var smooth_scroll__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(smooth_scroll__WEBPACK_IMPORTED_MODULE_4__); 55// ÐаннÑй Ñайл - лиÑÑ ÑобÑание подклÑÑений гоÑовÑÑ ÐºÐ¾Ð¼Ð¿Ð¾Ð½ÐµÐ½Ñов. 56// РекомендÑеÑÑÑ ÑоздаваÑÑ Ð¾ÑделÑнÑй Ñайл в папке components и подклÑÑаÑÑ Ð²Ñе Ñам 57// ÐпÑеделение опеÑаÑионной ÑиÑÑÐµÐ¼Ñ Ð½Ð° мобилÑнÑÑ 58 59console.log((0,_functions_mobile_check__WEBPACK_IMPORTED_MODULE_0__.mobileCheck)()); // ÐпÑеделение ÑиÑÐ¸Ð½Ñ ÑкÑана 60// import { isMobile, isTablet, isDesktop } from './functions/check-viewport'; 61// if (isDesktop()) { 62// console.log('...') 63// } 64// ТÑоÑÑлинг ÑÑнкÑии (Ð´Ð»Ñ ÑеÑайза, ввода в инпÑÑ, ÑкÑолла и Ñ.д.) 65// import { throttle } from './functions/throttle'; 66// let yourFunc = () => { console.log('throttle') }; 67// let func = throttle(yourFunc); 68// window.addEventListener('resize', func); 69// Ð¤Ð¸ÐºÑ ÑÑлÑкÑин-блоков 70// import './functions/fix-fullheight'; 71// РеализаÑÐ¸Ñ Ð±ÑÑгеÑ-Ð¼ÐµÐ½Ñ 72 73 // РеализаÑÐ¸Ñ Ð¾ÑÑановки ÑкÑолла (не забÑдÑÑе вÑзваÑÑ ÑÑнкÑиÑ) 74// import { disableScroll } from './functions/disable-scroll'; 75// РеализаÑÐ¸Ñ Ð²ÐºÐ»ÑÑÐµÐ½Ð¸Ñ ÑкÑолла (не забÑдÑÑе вÑзваÑÑ ÑÑнкÑиÑ) 76// import { enableScroll } from './functions/enable-scroll'; 77// РеализаÑÐ¸Ñ Ð¼Ð¾Ð´Ð°Ð»Ñного окна 78 79 80const modal = new graph_modal__WEBPACK_IMPORTED_MODULE_2__["default"](); // РеализаÑÐ¸Ñ Ñабов 81// import GraphTabs from 'graph-tabs'; 82// const tabs = new GraphTabs('tab'); 83// ÐолÑÑение вÑÑоÑÑ Ñапки ÑайÑа (не забÑдÑÑе вÑзваÑÑ ÑÑнкÑиÑ) 84// import { getHeaderHeight } from './functions/header-height'; 85// ÐодклÑÑение плагина каÑÑом-ÑкÑолла 86// import 'simplebar'; 87// ÐодклÑÑение плагина Ð´Ð»Ñ Ð¿Ð¾Ð·Ð¸ÑиониÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑÑлÑипов 88// import { createPopper, right} from '@popperjs/core'; 89// createPopper(el, tooltip, { 90// placement: 'right' 91// }); 92// ÐодклÑÑение ÑвайпеÑа 93// import Swiper, { Navigation, Pagination } from 'swiper'; 94// Swiper.use([Navigation, Pagination]); 95// const swiper = new Swiper(el, { 96// slidesPerView: 'auto', 97// }); 98// ÐодклÑÑение анимаÑий по ÑкÑÐ¾Ð»Ð»Ñ 99 100 101aos__WEBPACK_IMPORTED_MODULE_3___default().init(); // ÐодклÑÑение паÑаллакÑа блоков пÑи ÑкÑолле 102// import Rellax from 'rellax'; 103// const rellax = new Rellax('.rellax'); 104// ÐодклÑÑение плавной пÑокÑÑÑки к ÑкоÑÑм 105 106 107const scroll = new (smooth_scroll__WEBPACK_IMPORTED_MODULE_4___default())('a[href*="#"]'); // ÐодклÑÑение ÑобÑÑий Ñвайпа на мобилÑнÑÑ 108// import 'swiped-events'; 109// document.addEventListener('swiped', function(e) { 110// console.log(e.target); 111// console.log(e.detail); 112// console.log(e.detail.dir); 113// }); 114// import { validateForms } from './functions/validate-forms'; 115// const rules1 = [...]; 116// const afterForm = () => { 117// console.log('ÐÑоизоÑла оÑпÑавка, ÑÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ пиÑаÑÑ Ð»ÑбÑе дейÑÑвиÑ'); 118// }; 119// validateForms('.form-1', rules1, afterForm); 120 121/***/ }), 122
123/***/ "./src/js/_vars.js": 124/*!*************************!*\ 125 !*** ./src/js/_vars.js ***! 126 \*************************/ 127/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 128 129"use strict"; 130__webpack_require__.r(__webpack_exports__); 131/* harmony export */ __webpack_require__.d(__webpack_exports__, { 132/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 133/* harmony export */ }); 134/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 135 windowEl: window, 136 documentEl: document, 137 htmlEl: document.documentElement, 138 bodyEl: document.body 139}); 140 141/***/ }), 142
143/***/ "./src/js/_vendor.js": 144/*!***************************!*\ 145 !*** ./src/js/_vendor.js ***! 146 \***************************/ 147/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 148 149"use strict"; 150__webpack_require__.r(__webpack_exports__); 151/* harmony import */ var _vendor_focus_visible_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vendor/focus-visible.js */ "./src/js/vendor/focus-visible.js"); 152/* harmony import */ var _vendor_focus_visible_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vendor_focus_visible_js__WEBPACK_IMPORTED_MODULE_0__); 153/* harmony import */ var _vendor_fslightbox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vendor/fslightbox.js */ "./src/js/vendor/fslightbox.js"); 154/* harmony import */ var _vendor_fslightbox_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vendor_fslightbox_js__WEBPACK_IMPORTED_MODULE_1__); 155 156 157 158/***/ }), 159
160/***/ "./src/js/components/map.js": 161/*!**********************************!*\ 162 !*** ./src/js/components/map.js ***! 163 \**********************************/ 164/***/ (() => { 165 166const map = document.querySelector('#map'); 167 168if (map) { 169 let map_container = document.getElementById('map'); 170 let options_map = { 171 once: true, 172 //запÑÑк один Ñаз, и Ñдаление наблÑдаÑÐµÐ»Ñ ÑÑÐ°Ð·Ñ 173 passive: true, 174 capture: true 175 }; 176 let map_loaded = false; 177 178 function start_lazy_map() { 179 if (!map_loaded) { 180 map_loaded = true; 181 ymaps.ready(init); 182 183 function init() { 184 // Создание каÑÑÑ. 185 const center = [53.188978, 50.131967]; 186 var myMap = new ymaps.Map("map", { 187 // ÐооÑдинаÑÑ ÑенÑÑа каÑÑÑ. 188 // ÐоÑÑдок по ÑмолÑаниÑ: «ÑиÑоÑа, долгоÑа». 189 // ЧÑÐ¾Ð±Ñ Ð½Ðµ опÑеделÑÑÑ ÐºÐ¾Ð¾ÑдинаÑÑ ÑенÑÑа каÑÑÑ Ð²ÑÑÑнÑÑ, 190 // воÑполÑзÑйÑеÑÑ Ð¸Ð½ÑÑÑÑменÑом ÐпÑеделение кооÑдинаÑ. 191 center: center, 192 // УÑÐ¾Ð²ÐµÐ½Ñ Ð¼Ð°ÑÑÑабиÑованиÑ. ÐопÑÑÑимÑе знаÑениÑ: 193 // Ð¾Ñ 0 (веÑÑ Ð¼Ð¸Ñ) до 19. 194 zoom: 14 195 }); 196 let placemark = new ymaps.Placemark(center, { 197 balloonContent: "\n <div class=\"balloon\">\n <div class=\"balloon__address\">443111, \u0420\u043E\u0441\u0441\u0438\u044F, \u0433. \u0421\u0430\u043C\u0430\u0440\u0430, \u0443\u043B. \u0423\u0440\u0438\u0446\u043A\u043E\u0433\u043E 19, \u043E\u0444\u0438\u0441 502</div>\n </div>\n " 198 }, { 199 iconLayout: 'default#image', 200 iconImageHref: 'img/map-icon.svg', 201 iconImageSize: [20, 23], 202 iconImageOffset: [0, 0] 203 }); 204 myMap.geoObjects.add(placemark); 205 placemark.balloon.open(); 206 } 207 } 208 } 209 210 start_lazy_map(); 211} 212 213/***/ }), 214
215/***/ "./src/js/components/mix.js": 216/*!**********************************!*\ 217 !*** ./src/js/components/mix.js ***! 218 \**********************************/ 219/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 220 221"use strict"; 222__webpack_require__.r(__webpack_exports__); 223/* harmony import */ var mixitup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mixitup */ "./node_modules/mixitup/dist/mixitup.js"); 224/* harmony import */ var mixitup__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(mixitup__WEBPACK_IMPORTED_MODULE_0__); 225 226const mixContainer = document.querySelector('.mix__container'); 227 228if (mixContainer) { 229 var mixer = mixitup__WEBPACK_IMPORTED_MODULE_0___default()('.mix__container'); 230} 231 232/***/ }), 233
234/***/ "./src/js/components/more.js": 235/*!***********************************!*\ 236 !*** ./src/js/components/more.js ***! 237 \***********************************/ 238/***/ (() => { 239 240const moreBtn = document.querySelector('.blockquote__more'); 241 242if (moreBtn) { 243 const moreContent = document.querySelector('.blockquote__hidden'); 244 moreBtn.addEventListener('click', () => { 245 moreContent.style.display = 'block'; 246 moreBtn.style.display = 'none'; 247 }); 248} 249 250/***/ }), 251
252/***/ "./src/js/components/scroll.js": 253/*!*************************************!*\ 254 !*** ./src/js/components/scroll.js ***! 255 \*************************************/ 256/***/ (() => { 257 258const ancor = document.querySelector('.top__link'); 259 260function scrollMove() { 261 if (window.pageYOffset > 500) { 262 ancor.style.display = 'flex'; 263 } else { 264 ancor.style.display = 'none'; 265 } 266} 267 268scrollMove(); 269window.addEventListener("scroll", () => { 270 scrollMove(); 271}); 272 273/***/ }), 274
275/***/ "./src/js/components/sliders.js": 276/*!**************************************!*\ 277 !*** ./src/js/components/sliders.js ***! 278 \**************************************/ 279/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 280 281"use strict"; 282__webpack_require__.r(__webpack_exports__); 283/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/swiper.esm.js"); 284 285swiper__WEBPACK_IMPORTED_MODULE_0__.Swiper.use([swiper__WEBPACK_IMPORTED_MODULE_0__.EffectFade, swiper__WEBPACK_IMPORTED_MODULE_0__.Navigation, swiper__WEBPACK_IMPORTED_MODULE_0__.Pagination, swiper__WEBPACK_IMPORTED_MODULE_0__.Thumbs, swiper__WEBPACK_IMPORTED_MODULE_0__.Autoplay]); 286const slider1 = document.querySelector('.hero-slider'); 287let mySwiper1 = new swiper__WEBPACK_IMPORTED_MODULE_0__.Swiper(slider1, { 288 slidesPerView: 1, 289 spaceBetween: 10, 290 loop: true, 291 autoplay: { 292 delay: 8000, 293 pauseOnMouseEnter: true, 294 disableOnInteraction: false 295 }, 296 navigation: { 297 nextEl: '.swiper-button-next', 298 prevEl: '.swiper-button-prev' 299 }, 300 breakpoints: { 301 1025: { 302 slidesPerView: 1 303 } 304 } 305}); 306const slider2 = document.querySelector('.done-slider'); 307 308if (slider2) { 309 let mySwiper2; 310 311 function mobileSlider() { 312 if (window.innerWidth <= 1000 && slider2.dataset.mobile == 'false') { 313 mySwiper2 = new swiper__WEBPACK_IMPORTED_MODULE_0__.Swiper(slider2, { 314 slidesPerView: 1.2, 315 spaceBetween: 10, 316 centeredSlides: false, 317 loop: true, 318 slideClass: 'done__item' 319 }); 320 slider2.dataset.mobile = 'true'; 321 } 322 323 if (window.innerWidth > 1000) { 324 slider2.dataset.mobile = 'false'; 325 326 if (slider2.classList.contains('swiper-container-initialized')) { 327 mySwiper2.destroy(); 328 } 329 } 330 } 331 332 mobileSlider(); 333 window.addEventListener('resize', () => { 334 mobileSlider(); 335 }); 336} 337 338const slider3 = document.querySelector('.slider-main'); 339const sliderNav = document.querySelector('.slider-nav'); 340let mySwiperNav = new swiper__WEBPACK_IMPORTED_MODULE_0__.Swiper(sliderNav, { 341 slidesPerView: 3, 342 spaceBetween: 4, 343 freeMode: true, 344 breakpoints: { 345 360: { 346 slidesPerView: 4 347 } 348 }, 349 watchSlidesProgress: true 350}); 351let mySwiper3 = new swiper__WEBPACK_IMPORTED_MODULE_0__.Swiper(slider3, { 352 spaceBetween: 10, 353 navigation: { 354 nextEl: '.swiper-button-next', 355 prevEl: '.swiper-button-prev' 356 }, 357 thumbs: { 358 swiper: mySwiperNav 359 } 360}); 361const slider4 = document.querySelector('.other-slider'); 362 363if (slider4) { 364 let mySwiper4; 365 366 function mobileSlider2() { 367 if (window.innerWidth <= 1000 && slider4.dataset.mobile == 'false') { 368 mySwiper4 = new swiper__WEBPACK_IMPORTED_MODULE_0__.Swiper(slider4, { 369 slidesPerView: 1.2, 370 spaceBetween: 10, 371 centeredSlides: false, 372 loop: true, 373 slideClass: 'other-slide' 374 }); 375 slider4.dataset.mobile = 'true'; 376 } 377 378 if (window.innerWidth > 1000) { 379 slider4.dataset.mobile = 'false'; 380 381 if (slider4.classList.contains('swiper-container-initialized')) { 382 mySwiper4.destroy(); 383 } 384 } 385 } 386 387 mobileSlider2(); 388 window.addEventListener('resize', () => { 389 mobileSlider2(); 390 }); 391} 392 393/***/ }), 394
395/***/ "./src/js/components/validate.js": 396/*!***************************************!*\ 397 !*** ./src/js/components/validate.js ***! 398 \***************************************/ 399/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 400 401"use strict"; 402__webpack_require__.r(__webpack_exports__); 403/* harmony import */ var _functions_validate_forms_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../functions/validate-forms.js */ "./src/js/functions/validate-forms.js"); 404 405 406const afterForm = () => { 407 // console.log('ÐÑоизоÑла оÑпÑавка, ÑÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ пиÑаÑÑ Ð»ÑбÑе дейÑÑвиÑ'); 408 document.querySelector('[data-graph-path="thanks-modal"]').click(); 409}; 410 411const rules1 = [{ 412 ruleSelector: '.contacts-form__input1', 413 rules: [{ 414 rule: 'minLength', 415 value: 1 416 }, { 417 rule: 'required', 418 value: true, 419 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 420 }] 421}, { 422 ruleSelector: '.contacts-form__input-tel1', 423 tel: true, 424 telError: 'ÐведиÑе коÑÑекÑнÑй ÑелеÑон', 425 rules: [{ 426 rule: 'required', 427 value: true, 428 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 429 }] 430}]; 431const rules2 = [{ 432 ruleSelector: '.contacts-form__input2', 433 rules: [{ 434 rule: 'minLength', 435 value: 1 436 }, { 437 rule: 'required', 438 value: true, 439 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 440 }] 441}, { 442 ruleSelector: '.contacts-form__input-tel2', 443 tel: true, 444 telError: 'ÐведиÑе коÑÑекÑнÑй ÑелеÑон', 445 rules: [{ 446 rule: 'required', 447 value: true, 448 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 449 }] 450}]; 451const rules3 = [{ 452 ruleSelector: '.contacts-form__input3', 453 rules: [{ 454 rule: 'minLength', 455 value: 1 456 }, { 457 rule: 'required', 458 value: true, 459 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 460 }] 461}, { 462 ruleSelector: '.contacts-form__input-tel3', 463 tel: true, 464 telError: 'ÐведиÑе коÑÑекÑнÑй ÑелеÑон', 465 rules: [{ 466 rule: 'required', 467 value: true, 468 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 469 }] 470}]; 471const rules4 = [{ 472 ruleSelector: '.contacts-form__input4', 473 rules: [{ 474 rule: 'minLength', 475 value: 1 476 }, { 477 rule: 'required', 478 value: true, 479 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 480 }] 481}, { 482 ruleSelector: '.contacts-form__input5', 483 rules: [{ 484 rule: 'minLength', 485 value: 1 486 }, { 487 rule: 'required', 488 value: true, 489 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 490 }] 491}, { 492 ruleSelector: '.contacts-form__input6', 493 rules: [{ 494 rule: 'minLength', 495 value: 1 496 }, { 497 rule: 'required', 498 value: true, 499 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 500 }] 501}, { 502 ruleSelector: '.contacts-form__input7', 503 rules: [{ 504 rule: 'minLength', 505 value: 1 506 }, { 507 rule: 'required', 508 value: true, 509 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 510 }] 511}, { 512 ruleSelector: '.contacts-form__input-tel4', 513 tel: true, 514 telError: 'ÐведиÑе коÑÑекÑнÑй ÑелеÑон', 515 rules: [{ 516 rule: 'required', 517 value: true, 518 errorMessage: 'ÐожалÑйÑÑа, заполниÑе поле' 519 }] 520}]; 521(0,_functions_validate_forms_js__WEBPACK_IMPORTED_MODULE_0__.validateForms)('.contacts-form', rules1, afterForm); 522(0,_functions_validate_forms_js__WEBPACK_IMPORTED_MODULE_0__.validateForms)('.offer-form', rules3, afterForm); 523(0,_functions_validate_forms_js__WEBPACK_IMPORTED_MODULE_0__.validateForms)('.question-form', rules2, afterForm); 524(0,_functions_validate_forms_js__WEBPACK_IMPORTED_MODULE_0__.validateForms)('.type-form', rules4, afterForm); 525const clearButtons = document.querySelectorAll('.btn__clear'); 526clearButtons.forEach(el => { 527 el.addEventListener('click', e => { 528 e.currentTarget.closest('.form__label').querySelector('input').value = ''; 529 el.classList.remove('btn__clear--active'); 530 }); 531}); 532const inputsList = document.querySelectorAll('.form__input'); 533inputsList.forEach(el => { 534 el.addEventListener('input', e => { 535 if (e.currentTarget.value === '') { 536 e.currentTarget.closest('.form__label').querySelector('.btn__clear').classList.remove('btn__clear--active'); 537 } else { 538 e.currentTarget.closest('.form__label').querySelector('.btn__clear').classList.add('btn__clear--active'); 539 } 540 }); 541}); 542 543/***/ }), 544
545/***/ "./src/js/functions/burger.js": 546/*!************************************!*\ 547 !*** ./src/js/functions/burger.js ***! 548 \************************************/ 549/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 550 551"use strict"; 552__webpack_require__.r(__webpack_exports__); 553/* harmony import */ var _functions_disable_scroll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../functions/disable-scroll */ "./src/js/functions/disable-scroll.js"); 554/* harmony import */ var _functions_enable_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../functions/enable-scroll */ "./src/js/functions/enable-scroll.js"); 555 556 557 558(function () { 559 var _document, _document2, _document3, _document4; 560 561 const burger = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector('[data-burger]'); 562 const menu = (_document2 = document) === null || _document2 === void 0 ? void 0 : _document2.querySelector('[data-menu]'); 563 const menuItems = (_document3 = document) === null || _document3 === void 0 ? void 0 : _document3.querySelectorAll('[data-menu-item]'); 564 const overlay = (_document4 = document) === null || _document4 === void 0 ? void 0 : _document4.querySelector('[data-menu-overlay]'); 565 burger === null || burger === void 0 ? void 0 : burger.addEventListener('click', e => { 566 burger === null || burger === void 0 ? void 0 : burger.classList.toggle('burger--active'); 567 menu === null || menu === void 0 ? void 0 : menu.classList.toggle('menu--active'); 568 569 if (menu !== null && menu !== void 0 && menu.classList.contains('menu--active')) { 570 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-expanded', 'true'); 571 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-label', 'ÐакÑÑÑÑ Ð¼ÐµÐ½Ñ'); 572 (0,_functions_disable_scroll__WEBPACK_IMPORTED_MODULE_0__.disableScroll)(); 573 } else { 574 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-expanded', 'false'); 575 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-label', 'ÐÑкÑÑÑÑ Ð¼ÐµÐ½Ñ'); 576 (0,_functions_enable_scroll__WEBPACK_IMPORTED_MODULE_1__.enableScroll)(); 577 } 578 }); 579 overlay === null || overlay === void 0 ? void 0 : overlay.addEventListener('click', () => { 580 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-expanded', 'false'); 581 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-label', 'ÐÑкÑÑÑÑ Ð¼ÐµÐ½Ñ'); 582 burger.classList.remove('burger--active'); 583 menu.classList.remove('menu--active'); 584 (0,_functions_enable_scroll__WEBPACK_IMPORTED_MODULE_1__.enableScroll)(); 585 }); 586 menuItems === null || menuItems === void 0 ? void 0 : menuItems.forEach(el => { 587 el.addEventListener('click', () => { 588 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-expanded', 'false'); 589 burger === null || burger === void 0 ? void 0 : burger.setAttribute('aria-label', 'ÐÑкÑÑÑÑ Ð¼ÐµÐ½Ñ'); 590 burger.classList.remove('burger--active'); 591 menu.classList.remove('menu--active'); 592 (0,_functions_enable_scroll__WEBPACK_IMPORTED_MODULE_1__.enableScroll)(); 593 }); 594 }); 595})(); 596 597/***/ }), 598
599/***/ "./src/js/functions/disable-scroll.js": 600/*!********************************************!*\ 601 !*** ./src/js/functions/disable-scroll.js ***! 602 \********************************************/ 603/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 604 605"use strict"; 606__webpack_require__.r(__webpack_exports__); 607/* harmony export */ __webpack_require__.d(__webpack_exports__, { 608/* harmony export */ "disableScroll": () => (/* binding */ disableScroll) 609/* harmony export */ }); 610/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_vars */ "./src/js/_vars.js"); 611 612const disableScroll = () => { 613 var _document; 614 615 const fixBlocks = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelectorAll('.fixed-block'); 616 const pagePosition = window.scrollY; 617 const paddingOffset = "".concat(window.innerWidth - _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.offsetWidth, "px"); 618 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].htmlEl.style.scrollBehavior = 'none'; 619 fixBlocks.forEach(el => { 620 el.style.paddingRight = paddingOffset; 621 }); 622 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.style.paddingRight = paddingOffset; 623 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.classList.add('dis-scroll'); 624 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.dataset.position = pagePosition; 625 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.style.top = "-".concat(pagePosition, "px"); 626}; 627 628/***/ }), 629
630/***/ "./src/js/functions/enable-scroll.js": 631/*!*******************************************!*\ 632 !*** ./src/js/functions/enable-scroll.js ***! 633 \*******************************************/ 634/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 635 636"use strict"; 637__webpack_require__.r(__webpack_exports__); 638/* harmony export */ __webpack_require__.d(__webpack_exports__, { 639/* harmony export */ "enableScroll": () => (/* binding */ enableScroll) 640/* harmony export */ }); 641/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_vars */ "./src/js/_vars.js"); 642 643const enableScroll = () => { 644 var _document; 645 646 const fixBlocks = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelectorAll('.fixed-block'); 647 const body = document.body; 648 const pagePosition = parseInt(_vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.dataset.position, 10); 649 fixBlocks.forEach(el => { 650 el.style.paddingRight = '0px'; 651 }); 652 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.style.paddingRight = '0px'; 653 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.style.top = 'auto'; 654 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.classList.remove('dis-scroll'); 655 window.scroll({ 656 top: pagePosition, 657 left: 0 658 }); 659 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].bodyEl.removeAttribute('data-position'); 660 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].htmlEl.style.scrollBehavior = 'smooth'; 661}; 662 663/***/ }), 664
665/***/ "./src/js/functions/mobile-check.js": 666/*!******************************************!*\ 667 !*** ./src/js/functions/mobile-check.js ***! 668 \******************************************/ 669/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 670 671"use strict"; 672__webpack_require__.r(__webpack_exports__); 673/* harmony export */ __webpack_require__.d(__webpack_exports__, { 674/* harmony export */ "mobileCheck": () => (/* binding */ mobileCheck) 675/* harmony export */ }); 676/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../_vars */ "./src/js/_vars.js"); 677 678const mobileCheck = () => { 679 const userAgent = navigator.userAgent || navigator.vendor || window.opera; 680 681 if (/android/i.test(userAgent)) { 682 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].htmlEl.classList.add('page--android'); 683 return "Android"; 684 } 685 686 if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { 687 _vars__WEBPACK_IMPORTED_MODULE_0__["default"].htmlEl.classList.add('page--ios'); 688 return "iOS"; 689 } 690 691 return "unknown"; 692}; 693 694/***/ }), 695
696/***/ "./src/js/functions/validate-forms.js": 697/*!********************************************!*\ 698 !*** ./src/js/functions/validate-forms.js ***! 699 \********************************************/ 700/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 701 702"use strict"; 703__webpack_require__.r(__webpack_exports__); 704/* harmony export */ __webpack_require__.d(__webpack_exports__, { 705/* harmony export */ "validateForms": () => (/* binding */ validateForms) 706/* harmony export */ }); 707/* harmony import */ var just_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! just-validate */ "./node_modules/just-validate/dist/just-validate.es.js"); 708/* harmony import */ var inputmask__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! inputmask */ "./node_modules/inputmask/dist/inputmask.js"); 709/* harmony import */ var inputmask__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(inputmask__WEBPACK_IMPORTED_MODULE_1__); 710 711 712const validateForms = (selector, rules, afterSend) => { 713 var _document; 714 715 const form = (_document = document) === null || _document === void 0 ? void 0 : _document.querySelector(selector); 716 const telSelector = form === null || form === void 0 ? void 0 : form.querySelector('input[type="tel"]'); 717 718 if (!form) { 719 console.error('ÐÐµÑ Ñакого ÑелекÑоÑа!'); 720 return false; 721 } 722 723 if (!rules) { 724 console.error('ÐÑ Ð½Ðµ пеÑедали пÑавила валидаÑии!'); 725 return false; 726 } 727 728 if (telSelector) { 729 const inputMask = new (inputmask__WEBPACK_IMPORTED_MODULE_1___default())('+7 (999) 999-99-99'); 730 inputMask.mask(telSelector); 731 732 for (let item of rules) { 733 if (item.tel) { 734 item.rules.push({ 735 rule: 'function', 736 validator: function () { 737 const phone = telSelector.inputmask.unmaskedvalue(); 738 return phone.length === 10; 739 }, 740 errorMessage: item.telError 741 }); 742 } 743 } 744 } 745 746 const validation = new just_validate__WEBPACK_IMPORTED_MODULE_0__["default"](selector); 747 748 for (let item of rules) { 749 validation.addField(item.ruleSelector, item.rules); 750 } 751 752 753 754 validation.onSuccess(ev => { 755 let formData = new FormData(ev.target); 756 let xhr = new XMLHttpRequest(); 757 758 xhr.onreadystatechange = function () { 759 if (xhr.readyState === 4) { 760 if (xhr.status === 200) { 761 if (afterSend) { 762 afterSend(); 763 } 764 765 console.log('ÐÑпÑавлено'); 766 } 767 } 768 }; 769 770 xhr.open('POST', '/mail.php', true); 771 xhr.send(formData); 772 ev.target.reset(); 773 774 775 }); 776}; 777 778/***/ }), 779
vendor: 4,909 bytes, lines 780-954
780/***/ "./src/js/vendor/focus-visible.js": 781/*!****************************************!*\ 782 !*** ./src/js/vendor/focus-visible.js ***! 783 \****************************************/ 784/***/ (() => { 785 786/** 787 * Applies the :focus-visible polyfill at the given scope. 788 * A scope in this case is either the top-level Document or a Shadow Root. 789 * 790 * @param {(Document|ShadowRoot)} scope 791 * @see https://github.com/WICG/focus-visible 792 */ 793function applyFocusVisiblePolyfill(scope) { 794 var hadKeyboardEvent = true; 795 var hadFocusVisibleRecently = false; 796 var hadFocusVisibleRecentlyTimeout = null; 797 var inputTypesAllowlist = { 798 text: true, 799 search: true, 800 url: true, 801 tel: true, 802 email: true, 803 password: true, 804 number: true, 805 date: true, 806 month: true, 807 week: true, 808 time: true, 809 datetime: true, 810 'datetime-local': true 811 }; 812 /** 813 * Helper function for legacy browsers and iframes which sometimes focus 814 * elements like document, body, and non-interactive SVG. 815 * @param {Element} el 816 */ 817 818 function isValidFocusTarget(el) { 819 if (el && el !== document && el.nodeName !== 'HTML' && el.nodeName !== 'BODY' && 'classList' in el && 'contains' in el.classList) { 820 return true; 821 } 822 823 return false; 824 } 825 /** 826 * Computes whether the given element should automatically trigger the 827 * `focus-visible` class being added, i.e. whether it should always match 828 * `:focus-visible` when focused. 829 * @param {Element} el 830 * @return {boolean} 831 */ 832 833 834 function focusTriggersKeyboardModality(el) { 835 var type = el.type; 836 var tagName = el.tagName; 837 838 if (tagName === 'INPUT' && inputTypesAllowlist[type] && !el.readOnly) { 839 return true; 840 } 841 842 if (tagName === 'TEXTAREA' && !el.readOnly) { 843 return true; 844 } 845 846 if (el.isContentEditable) { 847 return true; 848 } 849 850 return false; 851 } 852 /** 853 * Add the `focus-visible` class to the given element if it was not added by 854 * the author. 855 * @param {Element} el 856 */ 857 858 859 function addFocusVisibleClass(el) { 860 if (el.classList.contains('focus-visible')) { 861 return; 862 } 863 864 el.classList.add('focus-visible'); 865 el.setAttribute('data-focus-visible-added', ''); 866 } 867 /** 868 * Remove the `focus-visible` class from the given element if it was not 869 * originally added by the author. 870 * @param {Element} el 871 */ 872 873 874 function removeFocusVisibleClass(el) { 875 if (!el.hasAttribute('data-focus-visible-added')) { 876 return; 877 } 878 879 el.classList.remove('focus-visible'); 880 el.removeAttribute('data-focus-visible-added'); 881 } 882 /** 883 * If the most recent user interaction was via the keyboard; 884 * and the key press did not include a meta, alt/option, or control key; 885 * then the modality is keyboard. Otherwise, the modality is not keyboard. 886 * Apply `focus-visible` to any current active element and keep track 887 * of our keyboard modality state with `hadKeyboardEvent`. 888 * @param {KeyboardEvent} e 889 */ 890 891 892 function onKeyDown(e) { 893 if (e.metaKey || e.altKey || e.ctrlKey) { 894 return; 895 } 896 897 if (isValidFocusTarget(scope.activeElement)) { 898 addFocusVisibleClass(scope.activeElement); 899 } 900 901 hadKeyboardEvent = true; 902 } 903 /** 904 * If at any point a user clicks with a pointing device, ensure that we change 905 * the modality away from keyboard. 906 * This avoids the situation where a user presses a key on an already focused 907 * element, and then clicks on a different element, focusing it with a 908 * pointing device, while we still think we're in keyboard modality. 909 * @param {Event} e 910 */ 911 912 913 function onPointerDown(e) { 914 hadKeyboardEvent = false; 915 } 916 /** 917 * On `focus`, add the `focus-visible` class to the target if: 918 * - the target received focus as a result of keyboard navigation, or 919 * - the event target is an element that will likely require interaction 920 * via the keyboard (e.g. a text box) 921 * @param {Event} e 922 */ 923 924 925 function onFocus(e) { 926 // Prevent IE from focusing the document or HTML element. 927 if (!isValidFocusTarget(e.target)) { 928 return; 929 } 930 931 if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) { 932 addFocusVisibleClass(e.target); 933 } 934 } 935 /** 936 * On `blur`, remove the `focus-visible` class from the target. 937 * @param {Event} e 938 */ 939 940 941 function onBlur(e) { 942 if (!isValidFocusTarget(e.target)) { 943 return; 944 } 945 946 if (e.target.classList.contains('focus-visible') || e.target.hasAttribute('data-focus-visible-added')) { 947 // To detect a tab/window switch, we look for a blur event followed 948 // rapidly by a visibility change. 949 // If we don't see a visibility change within 100ms, it's probably a 950 // regular focus change. 951 hadFocusVisibleRecently = true; 952 window.clearTimeout(hadFocusVisibleRecentlyTimeout); 953 hadFocusVisibleRecentlyTimeout = window.setTimeout(function () { 954 hadFocusVisibleRecently = false;
vendor: 5,973 bytes, lines 955-1091
955 }, 100); 956 removeFocusVisibleClass(e.target); 957 } 958 } 959 /** 960 * If the user changes tabs, keep track of whether or not the previously 961 * focused element had .focus-visible. 962 * @param {Event} e 963 */ 964 965 966 function onVisibilityChange(e) { 967 if (document.visibilityState === 'hidden') { 968 // If the tab becomes active again, the browser will handle calling focus 969 // on the element (Safari actually calls it twice). 970 // If this tab change caused a blur on an element with focus-visible, 971 // re-apply the class when the user switches back to the tab. 972 if (hadFocusVisibleRecently) { 973 hadKeyboardEvent = true; 974 } 975 976 addInitialPointerMoveListeners(); 977 } 978 } 979 /** 980 * Add a group of listeners to detect usage of any pointing devices. 981 * These listeners will be added when the polyfill first loads, and anytime 982 * the window is blurred, so that they are active when the window regains 983 * focus. 984 */ 985 986 987 function addInitialPointerMoveListeners() { 988 document.addEventListener('mousemove', onInitialPointerMove); 989 document.addEventListener('mousedown', onInitialPointerMove); 990 document.addEventListener('mouseup', onInitialPointerMove); 991 document.addEventListener('pointermove', onInitialPointerMove); 992 document.addEventListener('pointerdown', onInitialPointerMove); 993 document.addEventListener('pointerup', onInitialPointerMove); 994 document.addEventListener('touchmove', onInitialPointerMove); 995 document.addEventListener('touchstart', onInitialPointerMove); 996 document.addEventListener('touchend', onInitialPointerMove); 997 } 998 999 function removeInitialPointerMoveListeners() { 1000 document.removeEventListener('mousemove', onInitialPointerMove); 1001 document.removeEventListener('mousedown', onInitialPointerMove); 1002 document.removeEventListener('mouseup', onInitialPointerMove); 1003 document.removeEventListener('pointermove', onInitialPointerMove); 1004 document.removeEventListener('pointerdown', onInitialPointerMove); 1005 document.removeEventListener('pointerup', onInitialPointerMove); 1006 document.removeEventListener('touchmove', onInitialPointerMove); 1007 document.removeEventListener('touchstart', onInitialPointerMove); 1008 document.removeEventListener('touchend', onInitialPointerMove); 1009 } 1010 /** 1011 * When the polfyill first loads, assume the user is in keyboard modality. 1012 * If any event is received from a pointing device (e.g. mouse, pointer, 1013 * touch), turn off keyboard modality. 1014 * This accounts for situations where focus enters the page from the URL bar. 1015 * @param {Event} e 1016 */ 1017 1018 1019 function onInitialPointerMove(e) { 1020 // Work around a Safari quirk that fires a mousemove on <html> whenever the 1021 // window blurs, even if you're tabbing out of the page. ¯\_(ã)_/¯ 1022 if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') { 1023 return; 1024 } 1025 1026 hadKeyboardEvent = false; 1027 removeInitialPointerMoveListeners(); 1028 } // For some kinds of state, we are interested in changes at the global scope 1029 // only. For example, global pointer input, global key presses and global 1030 // visibility change should affect the state at every scope: 1031 1032 1033 document.addEventListener('keydown', onKeyDown, true); 1034 document.addEventListener('mousedown', onPointerDown, true); 1035 document.addEventListener('pointerdown', onPointerDown, true); 1036 document.addEventListener('touchstart', onPointerDown, true); 1037 document.addEventListener('visibilitychange', onVisibilityChange, true); 1038 addInitialPointerMoveListeners(); // For focus and blur, we specifically care about state changes in the local 1039 // scope. This is because focus / blur events that originate from within a 1040 // shadow root are not re-dispatched from the host element if it was already 1041 // the active element in its own scope: 1042 1043 scope.addEventListener('focus', onFocus, true); 1044 scope.addEventListener('blur', onBlur, true); // We detect that a node is a ShadowRoot by ensuring that it is a 1045 // DocumentFragment and also has a host property. This check covers native 1046 // implementation and polyfill implementation transparently. If we only cared 1047 // about the native implementation, we could just check if the scope was 1048 // an instance of a ShadowRoot. 1049 1050 if (scope.nodeType === Node.DOCUMENT_FRAGMENT_NODE && scope.host) { 1051 // Since a ShadowRoot is a special kind of DocumentFragment, it does not 1052 // have a root element to add a class to. So, we add this attribute to the 1053 // host element instead: 1054 scope.host.setAttribute('data-js-focus-visible', ''); 1055 } else if (scope.nodeType === Node.DOCUMENT_NODE) { 1056 document.documentElement.classList.add('js-focus-visible'); 1057 document.documentElement.setAttribute('data-js-focus-visible', ''); 1058 } 1059} // It is important to wrap all references to global window and document in 1060// these checks to support server-side rendering use cases 1061// @see https://github.com/WICG/focus-visible/issues/199 1062 1063 1064if (typeof window !== 'undefined' && typeof document !== 'undefined') { 1065 // Make the polyfill helper globally available. This can be used as a signal 1066 // to interested libraries that wish to coordinate with the polyfill for e.g., 1067 // applying the polyfill to a shadow root: 1068 window.applyFocusVisiblePolyfill = applyFocusVisiblePolyfill; // Notify interested libraries of the polyfill's presence, in case the 1069 // polyfill was loaded lazily: 1070 1071 var event; 1072 1073 try { 1074 event = new CustomEvent('focus-visible-polyfill-ready'); 1075 } catch (error) { 1076 // IE11 does not support using CustomEvent as a constructor directly: 1077 event = document.createEvent('CustomEvent'); 1078 event.initCustomEvent('focus-visible-polyfill-ready', false, false, {}); 1079 } 1080 1081 window.dispatchEvent(event); 1082} 1083 1084if (typeof document !== 'undefined') { 1085 // Apply the polyfill to the global document, so that no JavaScript 1086 // coordination is required to use the polyfill in the top-level document: 1087 applyFocusVisiblePolyfill(document); 1088} 1089 1090/***/ }), 1091
1092/***/ "./src/js/vendor/fslightbox.js": 1093/*!*************************************!*\ 1094 !*** ./src/js/vendor/fslightbox.js ***! 1095 \*************************************/ 1096/***/ ((module) => { 1097 1098!function (e, t) { 1099 if (true) module.exports = t();else { var o, n; } 1100}(window, function () { 1101 return function (e) { 1102 var t = {}; 1103 1104 function n(o) { 1105 if (t[o]) return t[o].exports; 1106 var r = t[o] = { 1107 i: o, 1108 l: !1, 1109 exports: {} 1110 }; 1111 return e[o].call(r.exports, r, r.exports, n), r.l = !0, r.exports; 1112 } 1113 1114 return n.m = e, n.c = t, n.d = function (e, t, o) { 1115 n.o(e, t) || Object.defineProperty(e, t, { 1116 enumerable: !0, 1117 get: o 1118 }); 1119 }, n.r = function (e) { 1120 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { 1121 value: "Module" 1122 }), Object.defineProperty(e, "__esModule", { 1123 value: !0 1124 }); 1125 }, n.t = function (e, t) { 1126 if (1 & t && (e = n(e)), 8 & t) return e; 1127 if (4 & t && "object" == typeof e && e && e.__esModule) return e; 1128 var o = Object.create(null); 1129 if (n.r(o), Object.defineProperty(o, "default", { 1130 enumerable: !0, 1131 value: e 1132 }), 2 & t && "string" != typeof e) for (var r in e) n.d(o, r, function (t) { 1133 return e[t]; 1134 }.bind(null, r)); 1135 return o; 1136 }, n.n = function (e) { 1137 var t = e && e.__esModule ? function () { 1138 return e.default; 1139 } : function () { 1140 return e; 1141 }; 1142 return n.d(t, "a", t), t; 1143 }, n.o = function (e, t) { 1144 return Object.prototype.hasOwnProperty.call(e, t); 1145 }, n.p = "", n(n.s = 0); 1146 }([function (e, t, n) { 1147 "use strict"; 1148 1149 n.r(t); 1150 var o, 1151 r = "fslightbox-", 1152 i = "".concat(r, "styles"), 1153 s = "".concat(r, "cursor-grabbing"), 1154 c = "".concat(r, "full-dimension"), 1155 a = "".concat(r, "flex-centered"), 1156 l = "".concat(r, "open"), 1157 u = "".concat(r, "transform-transition"), 1158 d = "".concat(r, "absoluted"), 1159 p = "".concat(r, "slide-btn"), 1160 f = "".concat(p, "-container"), 1161 h = "".concat(r, "fade-in"), 1162 m = "".concat(r, "fade-out"), 1163 g = h + "-strong", 1164 v = m + "-strong", 1165 b = "".concat(r, "opacity-"), 1166 x = "".concat(b, "1"), 1167 y = "".concat(r, "source"); 1168 1169 function S(e) { 1170 return (S = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) { 1171 return typeof e; 1172 } : function (e) { 1173 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 1174 })(e); 1175 } 1176 1177 "object" === ("undefined" == typeof document ? "undefined" : S(document)) && ((o = document.createElement("style")).className = i, o.appendChild(document.createTextNode(".fslightbox-absoluted{position:absolute;top:0;left:0}.fslightbox-fade-in{animation:fslightbox-fade-in .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out{animation:fslightbox-fade-out .3s ease}.fslightbox-fade-in-strong{animation:fslightbox-fade-in-strong .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out-strong{animation:fslightbox-fade-out-strong .3s ease}@keyframes fslightbox-fade-in{from{opacity:.65}to{opacity:1}}@keyframes fslightbox-fade-out{from{opacity:.35}to{opacity:0}}@keyframes fslightbox-fade-in-strong{from{opacity:.3}to{opacity:1}}@keyframes fslightbox-fade-out-strong{from{opacity:1}to{opacity:0}}.fslightbox-cursor-grabbing{cursor:grabbing}.fslightbox-full-dimension{width:100%;height:100%}.fslightbox-open{overflow:hidden;height:100%}.fslightbox-flex-centered{display:flex;justify-content:center;align-items:center}.fslightbox-opacity-0{opacity:0!important}.fslightbox-opacity-1{opacity:1!important}.fslightbox-scrollbarfix{padding-right:17px}.fslightbox-transform-transition{transition:transform .3s}.fslightbox-container{font-family:Arial,sans-serif;position:fixed;top:0;left:0;background:linear-gradient(rgba(30,30,30,.9),#000 1810%);touch-action:pinch-zoom;z-index:1000000000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fslightbox-container *{box-sizing:border-box}.fslightbox-svg-path{transition:fill .15s ease;fill:#ddd}.fslightbox-nav{height:45px;width:100%;position:absolute;top:0;left:0}.fslightbox-slide-number-container{display:flex;justify-content:center;align-items:center;position:relative;height:100%;font-size:15px;color:#d7d7d7;z-index:0;max-width:55px;text-align:left}.fslightbox-slide-number-container .fslightbox-flex-centered{height:100%}.fslightbox-slash{display:block;margin:0 5px;width:1px;height:12px;transform:rotate(15deg);background:#fff}.fslightbox-toolbar{position:absolute;z-index:3;right:0;top:0;height:100%;display:flex;background:rgba(35,35,35,.65)}.fslightbox-toolbar-button{height:100%;width:45px;cursor:pointer}.fslightbox-toolbar-button:hover .fslightbox-svg-path{fill:#fff}.fslightbox-slide-btn-container{display:flex;align-items:center;padding:12px 12px 12px 6px;position:absolute;top:50%;cursor:pointer;z-index:3;transform:translateY(-50%)}@media (min-width:476px){.fslightbox-slide-btn-container{padding:22px 22px 22px 6px}}@media (min-width:768px){.fslightbox-slide-btn-container{padding:30px 30px 30px 6px}}.fslightbox-slide-btn-container:hover .fslightbox-svg-path{fill:#f1f1f1}.fslightbox-slide-btn{padding:9px;font-size:26px;background:rgba(35,35,35,.65)}@media (min-width:768px){.fslightbox-slide-btn{padding:10px}}@media (min-width:1600px){.fslightbox-slide-btn{padding:11px}}.fslightbox-slide-btn-container-previous{left:0}@media (max-width:475.99px){.fslightbox-slide-btn-container-previous{padding-left:3px}}.fslightbox-slide-btn-container-next{right:0;padding-left:12px;padding-right:3px}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-left:22px}}@media (min-width:768px){.fslightbox-slide-btn-container-next{padding-left:30px}}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-right:6px}}.fslightbox-down-event-detector{position:absolute;z-index:1}.fslightbox-slide-swiping-hoverer{z-index:4}.fslightbox-invalid-file-wrapper{font-size:22px;color:#eaebeb;margin:auto}.fslightbox-video{object-fit:cover}.fslightbox-youtube-iframe{border:0}.fslightbox-loader{display:block;margin:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:67px;height:67px}.fslightbox-loader div{box-sizing:border-box;display:block;position:absolute;width:54px;height:54px;margin:6px;border:5px solid;border-color:#999 transparent transparent transparent;border-radius:50%;animation:fslightbox-loader 1.2s cubic-bezier(.5,0,.5,1) infinite}.fslightbox-loader div:nth-child(1){animation-delay:-.45s}.fslightbox-loader div:nth-child(2){animation-delay:-.3s}.fslightbox-loader div:nth-child(3){animation-delay:-.15s}@keyframes fslightbox-loader{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fslightbox-source{position:relative;z-index:2;opacity:0}
1177")), document.head.appendChild(o)); 1178 1179 function w(e) { 1180 var t, 1181 n = e.props, 1182 o = 0, 1183 r = {}; 1184 this.getSourceTypeFromLocalStorageByUrl = function (e) { 1185 return t[e] ? t[e] : i(e); 1186 }, this.handleReceivedSourceTypeForUrl = function (e, n) { 1187 !1 === r[n] && (o--, "invalid" !== e ? r[n] = e : delete r[n], 0 === o && (!function (e, t) { 1188 for (var n in t) e[n] = t[n]; 1189 }(t, r), localStorage.setItem("fslightbox-types", JSON.stringify(t)))); 1190 }; 1191 1192 var i = function (e) { 1193 o++, r[e] = !1; 1194 }; 1195 1196 n.disableLocalStorage ? (this.getSourceTypeFromLocalStorageByUrl = function () {}, this.handleReceivedSourceTypeForUrl = function () {}) : (t = JSON.parse(localStorage.getItem("fslightbox-types"))) || (t = {}, this.getSourceTypeFromLocalStorageByUrl = i); 1197 } 1198 1199 function L(e, t, n, o) { 1200 var r = e.data, 1201 i = e.elements.sources, 1202 s = n / o, 1203 c = 0; 1204 1205 this.adjustSize = function () { 1206 if ((c = r.maxSourceWidth / s) < r.maxSourceHeight) return n < r.maxSourceWidth && (c = o), a(); 1207 c = o > r.maxSourceHeight ? r.maxSourceHeight : o, a(); 1208 }; 1209 1210 var a = function () { 1211 i[t].style.width = c * s + "px", i[t].style.height = c + "px"; 1212 }; 1213 } 1214 1215 function C(e, t) { 1216 var n = this, 1217 o = e.collections.sourceSizers, 1218 r = e.elements, 1219 i = r.sourceAnimationWrappers, 1220 s = r.sourceMainWrappers, 1221 c = r.sources, 1222 a = e.resolve; 1223 1224 function l(e, n) { 1225 o[t] = a(L, [t, e, n]), o[t].adjustSize(); 1226 } 1227 1228 this.runActions = function (e, o) { 1229 c[t].classList.add(x), i[t].classList.add(g), s[t].removeChild(s[t].firstChild), l(e, o), n.runActions = l; 1230 }; 1231 } 1232 1233 function F(e, t) { 1234 var n, 1235 o = this, 1236 r = e.elements.sources, 1237 i = e.props, 1238 s = (0, e.resolve)(C, [t]); 1239 this.handleImageLoad = function (e) { 1240 var t = e.target, 1241 n = t.naturalWidth, 1242 o = t.naturalHeight; 1243 s.runActions(n, o); 1244 }, this.handleVideoLoad = function (e) { 1245 var t = e.target, 1246 o = t.videoWidth, 1247 r = t.videoHeight; 1248 n = !0, s.runActions(o, r); 1249 }, this.handleNotMetaDatedVideoLoad = function () { 1250 n || o.handleYoutubeLoad(); 1251 }, this.handleYoutubeLoad = function () { 1252 var e = 1920, 1253 t = 1080; 1254 i.maxYoutubeDimensions && (e = i.maxYoutubeDimensions.width, t = i.maxYoutubeDimensions.height), s.runActions(e, t); 1255 }, this.handleCustomLoad = function () { 1256 setTimeout(function () { 1257 var e = r[t]; 1258 s.runActions(e.offsetWidth, e.offsetHeight); 1259 }); 1260 }; 1261 } 1262 1263 function A(e, t, n) { 1264 var o = e.elements.sources, 1265 r = e.props.customClasses, 1266 i = r[t] ? r[t] : ""; 1267 o[t].className = n + " " + i; 1268 } 1269 1270 function I(e, t) { 1271 var n = e.elements.sources, 1272 o = e.props.customAttributes; 1273 1274 for (var r in o[t]) n[t].setAttribute(r, o[t][r]); 1275 } 1276 1277 function T(e, t) { 1278 var n = e.collections.sourceLoadHandlers, 1279 o = e.elements, 1280 r = o.sources, 1281 i = o.sourceAnimationWrappers, 1282 s = e.props.sources; 1283 r[t] = document.createElement("img"), A(e, t, y), r[t].src = s[t], r[t].onload = n[t].handleImageLoad, I(e, t), i[t].appendChild(r[t]); 1284 } 1285 1286 function E(e, t) { 1287 var n = e.collections.sourceLoadHandlers, 1288 o = e.elements, 1289 r = o.sources, 1290 i = o.sourceAnimationWrappers, 1291 s = e.props, 1292 c = s.sources, 1293 a = s.videosPosters; 1294 r[t] = document.createElement("video"), A(e, t, y), r[t].src = c[t], r[t].onloadedmetadata = function (e) { 1295 n[t].handleVideoLoad(e); 1296 }, r[t].controls = !0, I(e, t), a[t] && (r[t].poster = a[t]); 1297 var l = document.createElement("source"); 1298 l.src = c[t], r[t].appendChild(l), setTimeout(n[t].handleNotMetaDatedVideoLoad, 3e3), i[t].appendChild(r[t]); 1299 } 1300 1301 function N(e, t) { 1302 var n = e.collections.sourceLoadHandlers, 1303 o = e.elements, 1304 i = o.sources, 1305 s = o.sourceAnimationWrappers, 1306 c = e.props.sources; 1307 i[t] = document.createElement("iframe"), A(e, t, "".concat(y, " ").concat(r, "youtube-iframe")), i[t].src = "https://www.youtube.com/embed/".concat(c[t].match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2], "?enablejsapi=1"), i[t].allowFullscreen = !0, I(e, t), s[t].appendChild(i[t]), n[t].handleYoutubeLoad(); 1308 } 1309 1310 function W(e, t) { 1311 var n = e.collections.sourceLoadHandlers, 1312 o = e.elements, 1313 r = o.sources, 1314 i = o.sourceAnimationWrappers, 1315 s = e.props.sources; 1316 r[t] = s[t], A(e, t, "".concat(r[t].className, " ").concat(y)), i[t].appendChild(r[t]), n[t].handleCustomLoad(); 1317 } 1318 1319 function z(e, t) { 1320 var n = e.elements, 1321 o = n.sources, 1322 i = n.sourceAnimationWrappers, 1323 s = n.sourceMainWrappers; 1324 e.props.sources; 1325 o[t] = document.createElement("div"), o[t].className = "".concat(r, "invalid-file-wrapper ").concat(a), o[t].innerHTML = "Invalid source", i[t].classList.add(g), i[t].appendChild(o[t]), s[t].removeChild(s[t].firstChild); 1326 } 1327 1328 function M(e) { 1329 var t = e.collections, 1330 n = t.sourceLoadHandlers, 1331 o = t.sourcesRenderFunctions, 1332 r = e.core.sourceDisplayFacade, 1333 i = e.resolve; 1334 1335 this.runActionsForSourceTypeAndIndex = function (t, s) { 1336 var c; 1337 1338 switch ("invalid" !== t && (n[s] = i(F, [s])), t) { 1339 case "image": 1340 c = T; 1341 break; 1342 1343 case "video": 1344 c = E; 1345 break; 1346 1347 case "youtube": 1348 c = N; 1349 break; 1350
1351 case "custom": 1352 c = W; 1353 break; 1354 1355 default: 1356 c = z; 1357 } 1358 1359 o[s] = function () { 1360 return c(e, s); 1361 }, r.displaySourcesWhichShouldBeDisplayed(); 1362 }; 1363 } 1364 1365 function P() { 1366 var e, 1367 t, 1368 n, 1369 o = { 1370 isUrlYoutubeOne: function (e) { 1371 var t = document.createElement("a"); 1372 return t.href = e, "www.youtube.com" === t.hostname; 1373 }, 1374 getTypeFromResponseContentType: function (e) { 1375 return e.slice(0, e.indexOf("/")); 1376 } 1377 }; 1378 1379 function r() { 1380 if (4 !== n.readyState) { 1381 if (2 === n.readyState) { 1382 var e; 1383 1384 switch (o.getTypeFromResponseContentType(n.getResponseHeader("content-type"))) { 1385 case "image": 1386 e = "image"; 1387 break; 1388 1389 case "video": 1390 e = "video"; 1391 break; 1392 1393 default: 1394 e = "invalid"; 1395 } 1396 1397 n.onreadystatechange = null, n.abort(), t(e); 1398 } 1399 } else t("invalid"); 1400 } 1401 1402 this.setUrlToCheck = function (t) { 1403 e = t; 1404 }, this.getSourceType = function (i) { 1405 if (o.isUrlYoutubeOne(e)) return i("youtube"); 1406 t = i, (n = new XMLHttpRequest()).onreadystatechange = r, n.open("GET", e, !0), n.send(); 1407 }; 1408 } 1409 1410 function H(e, t, n) { 1411 var o = e.props, 1412 r = o.types, 1413 i = o.type, 1414 s = o.sources, 1415 c = e.resolve; 1416 this.getTypeSetByClientForIndex = function (e) { 1417 var t; 1418 return r && r[e] ? t = r[e] : i && (t = i), t; 1419 }, this.retrieveTypeWithXhrForIndex = function (e) { 1420 var o = c(P); 1421 o.setUrlToCheck(s[e]), o.getSourceType(function (o) { 1422 t.handleReceivedSourceTypeForUrl(o, s[e]), n.runActionsForSourceTypeAndIndex(o, e); 1423 }); 1424 }; 1425 } 1426 1427 function k(e, t) { 1428 var n = e.componentsServices.hideSourceLoaderIfNotYetCollection, 1429 o = e.elements, 1430 r = o.sourceWrappersContainer, 1431 i = o.sourceMainWrappers; 1432 i[t] = document.createElement("div"), i[t].className = "".concat(d, " ").concat(c, " ").concat(a), i[t].innerHTML = '<div class="fslightbox-loader"><div></div><div></div><div></div><div></div></div>'; 1433 var s = i[t].firstChild; 1434 n[t] = function () { 1435 i[t].contains(s) && i[t].removeChild(s); 1436 }, r.appendChild(i[t]), function (e, t) { 1437 var n = e.elements, 1438 o = n.sourceMainWrappers, 1439 r = n.sourceAnimationWrappers; 1440 r[t] = document.createElement("div"), o[t].appendChild(r[t]); 1441 }(e, t); 1442 } 1443 1444 function O(e, t, n, o) { 1445 var i = document.createElementNS("http://www.w3.org/2000/svg", "svg"); 1446 i.setAttributeNS(null, "width", t), i.setAttributeNS(null, "height", t), i.setAttributeNS(null, "viewBox", n); 1447 var s = document.createElementNS("http://www.w3.org/2000/svg", "path"); 1448 return s.setAttributeNS(null, "class", "".concat(r, "svg-path")), s.setAttributeNS(null, "d", o), i.appendChild(s), e.appendChild(i), i; 1449 } 1450 1451 function R(e, t) { 1452 var n = document.createElement("div"); 1453 return n.className = "".concat(r, "toolbar-button ").concat(a), n.title = t, e.appendChild(n), n; 1454 } 1455 1456 function D(e, t) { 1457 var n = document.createElement("div"); 1458 n.className = "".concat(r, "toolbar"), t.appendChild(n), function (e, t) { 1459 var n = e.componentsServices, 1460 o = e.core.fullscreenToggler, 1461 r = e.data, 1462 i = "M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z", 1463 s = R(t); 1464 s.title = "Enter fullscreen"; 1465 var c = O(s, "20px", "0 0 18 18", i); 1466 n.enterFullscreen = function () { 1467 r.isFullscreenOpen = !0, s.title = "Exit fullscreen", c.setAttributeNS(null, "width", "24px"), c.setAttributeNS(null, "height", "24px"), c.setAttributeNS(null, "viewBox", "0 0 950 1024"), c.firstChild.setAttributeNS(null, "d", "M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"); 1468 }, n.exitFullscreen = function () { 1469 r.isFullscreenOpen = !1, s.title = "Enter fullscreen", c.setAttributeNS(null, "width", "20px"), c.setAttributeNS(null, "height", "20px"), c.setAttributeNS(null, "viewBox", "0 0 18 18"), c.firstChild.setAttributeNS(null, "d", i); 1470 }, s.onclick = function () { 1471 r.isFullscreenOpen ? o.exitFullscreen() : o.enterFullscreen(); 1472 }; 1473 }(e, n), function (e, t) { 1474 var n = R(t, "Close"); 1475 n.onclick = e.core.lightboxCloser.closeLightbox, O(n, "20px", "0 0 24 24", "M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z"); 1476 }(e, n); 1477 } 1478 1479 function j(e) { 1480 var t = e.props.sources, 1481 n = e.elements.container, 1482 o = document.createElement("div"); 1483 o.className = "".concat(r, "nav"), n.appendChild(o), D(e, o), t.length > 1 && function (e, t) { 1484 var n = e.componentsServices, 1485 o = e.props.sources, 1486 i = (e.stageIndexes, document.createElement("div")); 1487 i.className = "".concat(r, "slide-number-container"); 1488 var s = document.createElement("div"); 1489 s.className = a; 1490 var c = document.createElement("span"); 1491 1492 n.setSlideNumber = function (e) { 1493 return c.innerHTML = e; 1494 }; 1495 1496 var l = document.createElement("span"); 1497 l.className = "".concat(r, "slash"); 1498 var u = document.createElement("div"); 1499 u.innerHTML = o.length, i.appendChild(s), s.appendChild(c), s.appendChild(l), s.appendChild(u), t.appendChild(i), setTimeout(function () { 1500 s.offsetWidth > 55 && (i.style.justifyContent = "flex-start"); 1501 }); 1502 }(e, o); 1503 } 1504 1505 function X(e, t) { 1506 var n = this, 1507 o = e.elements.sourceMainWrappers, 1508 r = e.props, 1509 i = 0; 1510 this.byValue = function (e) { 1511 return i = e, n; 1512 }, this.negative = function () { 1513 s(-c()); 1514 }, this.zero = function () { 1515 s(0); 1516 }, this.positive = function () { 1517 s(c()); 1518 }; 1519 1520 var s = function (e) { 1521 o[t].style.transform = "translateX(".concat(e + i, "px)"), i = 0; 1522 }, 1523 c = function () { 1524 return (1 + r.slideDistance) * innerWidth; 1525 }; 1526 } 1527 1528 function B(e, t, n, o) { 1529 var r = e.elements.container, 1530 i = n.charAt(0).toUpperCase() + n.slice(1), 1531 s = document.createElement("div"); 1532 s.className = "".concat(f, " ").concat(f, "-").concat(n), s.title = "".concat(i, " slide"), s.onclick = t, function (e, t) { 1533 var n = document.createElement("div"); 1534 n.className = "".concat(p, " ").concat(a), O(n, "20px", "0 0 20 20", t), e.appendChild(n); 1535 }(s, o), r.appendChild(s); 1536 } 1537 1538 function U(e, t) { 1539 var n = e.classList; 1540 n.contains(t) && n.remove(t); 1541 } 1542 1543 function V(e) { 1544 var t = this, 1545 n = e.core,
1546 o = n.eventsDispatcher, 1547 r = n.fullscreenToggler, 1548 i = n.globalEventsController, 1549 s = n.scrollbarRecompensor, 1550 c = e.data, 1551 a = e.elements, 1552 u = e.props, 1553 d = e.sourcePointerProps; 1554 this.isLightboxFadingOut = !1, this.runActions = function () { 1555 t.isLightboxFadingOut = !0, a.container.classList.add(v), i.removeListeners(), u.exitFullscreenOnClose && c.isFullscreenOpen && r.exitFullscreen(), setTimeout(function () { 1556 t.isLightboxFadingOut = !1, d.isPointering = !1, a.container.classList.remove(v), document.documentElement.classList.remove(l), s.removeRecompense(), document.body.removeChild(a.container), o.dispatch("onClose"); 1557 }, 270); 1558 }; 1559 } 1560 1561 function Y(e) { 1562 var t, 1563 n, 1564 o, 1565 r = e.collections.sourceMainWrappersTransformers, 1566 i = e.componentsServices, 1567 s = e.core, 1568 c = s.classFacade, 1569 a = s.slideIndexChanger, 1570 l = s.sourceDisplayFacade, 1571 d = s.stageManager, 1572 p = e.elements.sourceAnimationWrappers, 1573 f = e.stageIndexes, 1574 v = (t = function () { 1575 c.removeFromEachElementClassIfContains("sourceAnimationWrappers", m); 1576 }, n = 300, o = [], function () { 1577 o.push(!0), setTimeout(function () { 1578 o.pop(), o.length || t(); 1579 }, n); 1580 }); 1581 a.changeTo = function (e) { 1582 f.current = e, d.updateStageIndexes(), i.setSlideNumber(e + 1), l.displaySourcesWhichShouldBeDisplayed(); 1583 }, a.jumpTo = function (e) { 1584 var t = f.current; 1585 a.changeTo(e), c.removeFromEachElementClassIfContains("sourceMainWrappers", u), U(p[t], g), U(p[t], h), p[t].classList.add(m), U(p[e], g), U(p[e], m), p[e].classList.add(h), v(), r[e].zero(), setTimeout(function () { 1586 t !== f.current && r[t].negative(); 1587 }, 270); 1588 }; 1589 } 1590 1591 function _(e) { 1592 var t = e.core, 1593 n = t.lightboxCloser, 1594 o = t.fullscreenToggler, 1595 r = t.slideChangeFacade; 1596 1597 this.listener = function (e) { 1598 switch (e.key) { 1599 case "Escape": 1600 n.closeLightbox(); 1601 break; 1602 1603 case "ArrowLeft": 1604 r.changeToPrevious(); 1605 break; 1606 1607 case "ArrowRight": 1608 r.changeToNext(); 1609 break; 1610 1611 case "F11": 1612 e.preventDefault(), o.enterFullscreen(); 1613 } 1614 }; 1615 } 1616 1617 function q(e) { 1618 var t = e.collections.sourceMainWrappersTransformers, 1619 n = e.elements, 1620 o = e.sourcePointerProps, 1621 r = e.stageIndexes; 1622 1623 function i(e, n) { 1624 t[e].byValue(o.swipedX)[n](); 1625 } 1626 1627 this.runActionsForEvent = function (e) { 1628 var t, c, a; 1629 n.container.contains(n.slideSwipingHoverer) || n.container.appendChild(n.slideSwipingHoverer), t = n.container, c = s, (a = t.classList).contains(c) || a.add(c), o.swipedX = e.screenX - o.downScreenX, i(r.current, "zero"), void 0 !== r.previous && o.swipedX > 0 ? i(r.previous, "negative") : void 0 !== r.next && o.swipedX < 0 && i(r.next, "positive"); 1630 }; 1631 } 1632 1633 function J(e) { 1634 var t = e.props.sources, 1635 n = e.resolve, 1636 o = e.sourcePointerProps, 1637 r = n(q); 1638 1 === t.length ? this.listener = function () { 1639 o.swipedX = 1; 1640 } : this.listener = function (e) { 1641 o.isPointering && r.runActionsForEvent(e); 1642 }; 1643 } 1644 1645 function G(e) { 1646 var t = e.collections.sourceMainWrappersTransformers, 1647 n = e.core.slideIndexChanger, 1648 o = e.elements.sourceMainWrappers, 1649 r = e.stageIndexes; 1650 this.runPositiveSwipedXActions = function () { 1651 void 0 === r.previous || (i("positive"), n.changeTo(r.previous)), i("zero"); 1652 }, this.runNegativeSwipedXActions = function () { 1653 void 0 === r.next || (i("negative"), n.changeTo(r.next)), i("zero"); 1654 }; 1655 1656 var i = function (e) { 1657 o[r.current].classList.add(u), t[r.current][e](); 1658 }; 1659 } 1660 1661 function $(e, t) { 1662 e.contains(t) && e.removeChild(t); 1663 } 1664 1665 function K(e) { 1666 var t = e.core.lightboxCloser, 1667 n = e.elements, 1668 o = e.resolve, 1669 r = e.sourcePointerProps, 1670 i = o(G); 1671 this.runNoSwipeActions = function () { 1672 $(n.container, n.slideSwipingHoverer), r.isSourceDownEventTarget || t.closeLightbox(), r.isPointering = !1; 1673 }, this.runActions = function () { 1674 r.swipedX > 0 ? i.runPositiveSwipedXActions() : i.runNegativeSwipedXActions(), $(n.container, n.slideSwipingHoverer), n.container.classList.remove(s), r.isPointering = !1; 1675 }; 1676 } 1677 1678 function Q(e) { 1679 var t = e.resolve, 1680 n = e.sourcePointerProps, 1681 o = t(K); 1682 1683 this.listener = function () { 1684 n.isPointering && (n.swipedX ? o.runActions() : o.runNoSwipeActions()); 1685 }; 1686 } 1687 1688 function Z(e) { 1689 var t, n, o; 1690 n = (t = e).core.classFacade, o = t.elements, n.removeFromEachElementClassIfContains = function (e, t) { 1691 for (var n = 0; n < o[e].length; n++) U(o[e][n], t); 1692 }, function (e) {
1693 var t = e.core.eventsDispatcher, 1694 n = e.props; 1695 1696 t.dispatch = function (e) { 1697 n[e] && n[e](); 1698 }; 1699 }(e), function (e) { 1700 var t = e.componentsServices, 1701 n = e.core.fullscreenToggler; 1702 n.enterFullscreen = function () { 1703 t.enterFullscreen(); 1704 var e = document.documentElement; 1705 e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.msRequestFullscreen && e.msRequestFullscreen(); 1706 }, n.exitFullscreen = function () { 1707 t.exitFullscreen(), document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen(); 1708 }; 1709 }(e), function (e) { 1710 var t = e.core, 1711 n = t.globalEventsController, 1712 o = t.windowResizeActioner, 1713 r = e.resolve, 1714 i = r(_), 1715 s = r(J), 1716 c = r(Q); 1717 n.attachListeners = function () { 1718 document.addEventListener("pointermove", s.listener), document.addEventListener("pointerup", c.listener), addEventListener("resize", o.runActions), document.addEventListener("keydown", i.listener); 1719 }, n.removeListeners = function () { 1720 document.removeEventListener("pointermove", s.listener), document.removeEventListener("pointerup", c.listener), removeEventListener("resize", o.runActions), document.removeEventListener("keydown", i.listener); 1721 }; 1722 }(e), function (e) { 1723 var t = e.core.lightboxCloser, 1724 n = (0, e.resolve)(V); 1725 1726 t.closeLightbox = function () { 1727 n.isLightboxFadingOut || n.runActions(); 1728 }; 1729 }(e), ne(e), function (e) { 1730 var t = e.data, 1731 n = e.core.scrollbarRecompensor; 1732 1733 function o() { 1734 document.body.offsetHeight > innerHeight && (document.body.style.marginRight = t.scrollbarWidth + "px"); 1735 } 1736 1737 n.addRecompense = function () { 1738 "complete" === document.readyState ? o() : addEventListener("load", function () { 1739 o(), n.addRecompense = o; 1740 }); 1741 }, n.removeRecompense = function () { 1742 document.body.style.removeProperty("margin-right"); 1743 }; 1744 }(e), function (e) { 1745 var t = e.core, 1746 n = t.slideChangeFacade, 1747 o = t.slideIndexChanger, 1748 r = t.stageManager; 1749 e.props.sources.length > 1 ? (n.changeToPrevious = function () { 1750 o.jumpTo(r.getPreviousSlideIndex()); 1751 }, n.changeToNext = function () { 1752 o.jumpTo(r.getNextSlideIndex()); 1753 }) : (n.changeToPrevious = function () {}, n.changeToNext = function () {}); 1754 }(e), Y(e), function (e) { 1755 var t = e.core, 1756 n = t.classFacade, 1757 o = t.sourcesPointerDown, 1758 r = e.elements.sources, 1759 i = e.sourcePointerProps, 1760 s = e.stageIndexes; 1761 1762 o.listener = function (e) { 1763 "VIDEO" !== e.target.tagName && e.preventDefault(), i.isPointering = !0, i.downScreenX = e.screenX, i.swipedX = 0; 1764 var t = r[s.current]; 1765 t && t.contains(e.target) ? i.isSourceDownEventTarget = !0 : i.isSourceDownEventTarget = !1, n.removeFromEachElementClassIfContains("sourceMainWrappers", u); 1766 }; 1767 }(e), function (e) { 1768 var t = e.collections.sourcesRenderFunctions, 1769 n = e.core.sourceDisplayFacade, 1770 o = e.props, 1771 r = e.stageIndexes; 1772 1773 function i(e) { 1774 t[e] && (t[e](), delete t[e]); 1775 } 1776 1777 n.displaySourcesWhichShouldBeDisplayed = function () { 1778 if (o.loadOnlyCurrentSource) i(r.current);else for (var e in r) i(r[e]); 1779 }; 1780 }(e), function (e) { 1781 var t = e.stageIndexes, 1782 n = e.core.stageManager, 1783 o = e.props.sources.length - 1; 1784 n.getPreviousSlideIndex = function () { 1785 return 0 === t.current ? o : t.current - 1; 1786 }, n.getNextSlideIndex = function () { 1787 return t.current === o ? 0 : t.current + 1; 1788 }, n.updateStageIndexes = 0 === o ? function () {} : 1 === o ? function () { 1789 0 === t.current ? (t.next = 1, delete t.previous) : (t.previous = 0, delete t.next); 1790 } : function () { 1791 t.previous = n.getPreviousSlideIndex(), t.next = n.getNextSlideIndex(); 1792 }, n.isSourceInStage = o <= 2 ? function () { 1793 return !0; 1794 } : function (e) { 1795 var n = t.current; 1796 if (0 === n && e === o || n === o && 0 === e) return !0; 1797 var r = n - e; 1798 return -1 === r || 0 === r || 1 === r; 1799 }; 1800 }(e), function (e) { 1801 var t = e.collections, 1802 n = t.sourceMainWrappersTransformers, 1803 o = t.sourceSizers, 1804 r = e.core.windowResizeActioner, 1805 i = e.data, 1806 s = e.elements.sourceMainWrappers, 1807 c = e.props, 1808 a = e.stageIndexes; 1809 1810 r.runActions = function () { 1811 innerWidth < 992 ? i.maxSourceWidth = innerWidth : i.maxSourceWidth = .9 * innerWidth, i.maxSourceHeight = .9 * innerHe
1811ight; 1812 1813 for (var e = 0; e < c.sources.length; e++) U(s[e], u), e !== a.current && n[e].negative(), o[e] && o[e].adjustSize(); 1814 }; 1815 }(e); 1816 } 1817 1818 function ee(e) { 1819 var t = e.props.disableLocalStorage; 1820 1821 if (!t) { 1822 var n = localStorage.getItem("fslightbox-scrollbar-width"); 1823 if (n) return n; 1824 } 1825 1826 var o = function () { 1827 var e = document.createElement("div"), 1828 t = e.style; 1829 return t.visibility = "hidden", t.width = "100px", t.msOverflowStyle = "scrollbar", t.overflow = "scroll", e; 1830 }(), 1831 r = function () { 1832 var e = document.createElement("div"); 1833 return e.style.width = "100%", e; 1834 }(); 1835 1836 document.body.appendChild(o); 1837 var i = o.offsetWidth; 1838 o.appendChild(r); 1839 var s = r.offsetWidth; 1840 document.body.removeChild(o); 1841 var c = i - s; 1842 return t || localStorage.setItem("fslightbox-scrollbar-width", c.toString()), c; 1843 } 1844 1845 function te(e) { 1846 var t = e.core.eventsDispatcher, 1847 n = e.data, 1848 o = e.elements, 1849 i = e.props.sources; 1850 n.isInitialized = !0, n.scrollbarWidth = ee(e), function (e) { 1851 for (var t = e.collections.sourceMainWrappersTransformers, n = e.props.sources, o = e.resolve, r = 0; r < n.length; r++) t[r] = o(X, [r]); 1852 }(e), Z(e), o.container = document.createElement("div"), o.container.className = "".concat(r, "container ").concat(c, " ").concat(g), function (e) { 1853 var t = e.elements; 1854 t.slideSwipingHoverer = document.createElement("div"), t.slideSwipingHoverer.className = "".concat(r, "slide-swiping-hoverer ").concat(c, " ").concat(d); 1855 }(e), j(e), function (e) { 1856 var t = e.core.sourcesPointerDown, 1857 n = e.elements, 1858 o = e.props.sources, 1859 r = document.createElement("div"); 1860 r.className = "".concat(d, " ").concat(c), n.container.appendChild(r), r.addEventListener("pointerdown", t.listener), n.sourceWrappersContainer = r; 1861 1862 for (var i = 0; i < o.length; i++) k(e, i); 1863 }(e), i.length > 1 && function (e) { 1864 var t = e.core.slideChangeFacade; 1865 B(e, t.changeToPrevious, "previous", "M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"), B(e, t.changeToNext, "next", "M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z"); 1866 }(e), function (e) { 1867 for (var t = e.props.sources, n = e.resolve, o = n(w), r = n(M), i = n(H, [o, r]), s = 0; s < t.length; s++) if ("string" == typeof t[s]) { 1868 var c = i.getTypeSetByClientForIndex(s); 1869 if (c) r.runActionsForSourceTypeAndIndex(c, s);else { 1870 var a = o.getSourceTypeFromLocalStorageByUrl(t[s]); 1871 a ? r.runActionsForSourceTypeAndIndex(a, s) : i.retrieveTypeWithXhrForIndex(s); 1872 } 1873 } else r.runActionsForSourceTypeAndIndex("custom", s); 1874 }(e), t.dispatch("onInit"); 1875 } 1876 1877 function ne(e) { 1878 var t = e.collections.sourceMainWrappersTransformers, 1879 n = e.componentsServices, 1880 o = e.core, 1881 r = o.eventsDispatcher, 1882 i = o.lightboxOpener, 1883 s = o.globalEventsController, 1884 c = o.scrollbarRecompensor, 1885 a = o.sourceDisplayFacade, 1886 u = o.stageManager, 1887 d = o.windowResizeActioner, 1888 p = e.data, 1889 f = e.elements, 1890 h = e.stageIndexes; 1891 1892 i.open = function () { 1893 var o = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0; 1894 h.current = o, p.isInitialized ? r.dispatch("onShow") : te(e), u.updateStageIndexes(), a.displaySourcesWhichSh
1894ouldBeDisplayed(), n.setSlideNumber(o + 1), document.body.appendChild(f.container), document.documentElement.classList.add(l), c.addRecompense(), s.attachListeners(), d.runActions(), t[h.current].zero(), r.dispatch("onOpen"); 1895 }; 1896 } 1897 1898 function oe(e, t, n) { 1899 return (oe = re() ? Reflect.construct : function (e, t, n) { 1900 var o = [null]; 1901 o.push.apply(o, t); 1902 var r = new (Function.bind.apply(e, o))(); 1903 return n && ie(r, n.prototype), r; 1904 }).apply(null, arguments); 1905 } 1906 1907 function re() { 1908 if ("undefined" == typeof Reflect || !Reflect.construct) return !1; 1909 if (Reflect.construct.sham) return !1; 1910 if ("function" == typeof Proxy) return !0; 1911 1912 try { 1913 return Date.prototype.toString.call(Reflect.construct(Date, [], function () {})), !0; 1914 } catch (e) { 1915 return !1; 1916 } 1917 } 1918 1919 function ie(e, t) { 1920 return (ie = Object.setPrototypeOf || function (e, t) { 1921 return e.__proto__ = t, e; 1922 })(e, t); 1923 } 1924 1925 function se(e) { 1926 return function (e) { 1927 if (Array.isArray(e)) return ce(e); 1928 }(e) || function (e) { 1929 if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e); 1930 }(e) || function (e, t) { 1931 if (!e) return; 1932 if ("string" == typeof e) return ce(e, t); 1933 var n = Object.prototype.toString.call(e).slice(8, -1); 1934 "Object" === n && e.constructor && (n = e.constructor.name); 1935 if ("Map" === n || "Set" === n) return Array.from(e); 1936 if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return ce(e, t); 1937 }(e) || function () { 1938 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 1939 }(); 1940 } 1941 1942 function ce(e, t) { 1943 (null == t || t > e.length) && (t = e.length); 1944 1945 for (var n = 0, o = new Array(t); n < t; n++) o[n] = e[n]; 1946 1947 return o; 1948 } 1949 1950 function ae() { 1951 for (var e = document.getElementsByTagName("a"), t = function (t) { 1952 if (!e[t].hasAttribute("data-fslightbox")) return "continue"; 1953 var n = e[t].getAttribute("data-fslightbox"), 1954 o = e[t].getAttribute("href"); 1955 fsLightboxInstances[n] || (fsLightboxInstances[n] = new FsLightbox()); 1956 var r = null; 1957 "#" === o.charAt(0) ? (r = document.getElementById(o.substring(1)).cloneNode(!0)).removeAttribute("id") : r = o, fsLightboxInstances[n].props.sources.push(r), fsLightboxInstances[n].elements.a.push(e[t]); 1958 var i = fsLightboxInstances[n].props.sources.length - 1; 1959 e[t].onclick = function (e) { 1960 e.preventDefault(), fsLightboxInstances[n].open(i); 1961 }, d("types", "data-type"), d("videosPosters", "data-video-poster"), d("customClasses", "data-class"), d("customClasses", "data-custom-class"); 1962 1963 for (var s = ["href", "data-fslightbox", "data-type", "data-video-poster", "data-class", "data-custom-class"], c = e[t].attributes, a = fsLightboxInstances[n].props.customAttributes, l = 0; l < c.length; l++) if (-1 === s.indexOf(c[l].name) && "data-" === c[l].name.substr(0, 5)) { 1964 a[i] || (a[i] = {}); 1965 var u = c[l].name.substr(5); 1966 a[i][u] = c[l].value; 1967 } 1968 1969 function d(o, r) { 1970 e[t].hasAttribute(r) && (fsLightboxInstances[n].props[o][i] = e[t].getAttribute(r)); 1971 } 1972 }, n = 0; n < e.length; n++) t(n); 1973 1974 var o = Object.keys(fsLightboxInstances); 1975 window.fsLightbox = fsLightboxInstances[o[o.length - 1]]; 1976 } 1977 1978 window.FsLightbox = function () { 1979 var e = this; 1980 this.props = { 1981 sources: [], 1982 customAttributes: [], 1983 customClasses: [], 1984 types: [], 1985 videosPosters: [], 1986 slideDistance: .3 1987 }, this.data = { 1988 isInitialized: !1, 1989 isFullscreenOpen: !1, 1990 maxSourceWidth: 0, 1991 maxSourceHeight: 0, 1992 scrollbarWidth: 0 1993 }, this.sourcePointerProps = { 1994 downScreenX: null, 1995 isPointering: !1, 1996 isSourceDownEventTarget: !1, 1997 swipedX: 0 1998 }, this.stageIndexes = {}, this.elements = { 1999 a: [], 2000 container: null, 2001 slideSwipingHoverer: null, 2002 sourceWrappersContainer: null, 2003 sources: [], 2004 sourceMainWrappers: [], 2005 sourceAnimationWrappers: [] 2006 }, this.componentsServices = { 2007 enterFullscreen: null, 2008 exitFullscreen: null, 2009 hideSourceLoaderIfNotYetCollection: [], 2010 setSlideNumber: function () {} 2011 }, this.resolve = function (t) { 2012 var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; 2013 return n.unshift(e), oe(t, se(n)); 2014 }, this.collections = { 2015 sourceMainWrappersTransformers: [], 2016 sourceLoadHandlers: [], 2017 sourcesRenderFunctions: [], 2018 sourceSizers: [] 2019 }, this.core = { 2020 classFacade: {},
2021 eventsDispatcher: {}, 2022 fullscreenToggler: {}, 2023 globalEventsController: {}, 2024 lightboxCloser: {}, 2025 lightboxOpener: {}, 2026 lightboxUpdater: {}, 2027 scrollbarRecompensor: {}, 2028 slideChangeFacade: {}, 2029 slideIndexChanger: {}, 2030 sourcesPointerDown: {}, 2031 sourceDisplayFacade: {}, 2032 stageManager: {}, 2033 windowResizeActioner: {} 2034 }, ne(this), this.open = function (t) { 2035 return e.core.lightboxOpener.open(t); 2036 }, this.close = function () { 2037 return e.core.lightboxCloser.closeLightbox(); 2038 }; 2039 }, window.fsLightboxInstances = {}, ae(), window.refreshFsLightbox = function () { 2040 for (var e in fsLightboxInstances) { 2041 var t = fsLightboxInstances[e].props; 2042 fsLightboxInstances[e] = new FsLightbox(), fsLightboxInstances[e].props = t, fsLightboxInstances[e].props.sources = [], fsLightboxInstances[e].elements.a = []; 2043 } 2044 2045 ae(); 2046 }; 2047 }]); 2048}); 2049 2050/***/ }), 2051
vendor: 5,687 bytes, lines 2052-2251
2052/***/ "./node_modules/graph-modal/src/graph-modal.js": 2053/*!*****************************************************!*\ 2054 !*** ./node_modules/graph-modal/src/graph-modal.js ***! 2055 \*****************************************************/ 2056/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2057 2058"use strict"; 2059__webpack_require__.r(__webpack_exports__); 2060/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2061/* harmony export */ "default": () => (/* binding */ GraphModal) 2062/* harmony export */ }); 2063class GraphModal { 2064 constructor(options) { 2065 let defaultOptions = { 2066 isOpen: () => {}, 2067 isClose: () => {}, 2068 } 2069 this.options = Object.assign(defaultOptions, options); 2070 this.modal = document.querySelector('.graph-modal'); 2071 this.speed = 300; 2072 this.animation = 'fade'; 2073 this._reOpen = false; 2074 this._nextContainer = false; 2075 this.modalContainer = false; 2076 this.isOpen = false; 2077 this.previousActiveElement = false; 2078 this._focusElements = [ 2079 'a[href]', 2080 'input', 2081 'select', 2082 'textarea', 2083 'button', 2084 'iframe', 2085 '[contenteditable]', 2086 '[tabindex]:not([tabindex^="-"])' 2087 ]; 2088 this._fixBlocks = document.querySelectorAll('.fix-block'); 2089 this.events(); 2090 } 2091 2092 events() { 2093 if (this.modal) { 2094 document.addEventListener('click', function (e) { 2095 const clickedElement = e.target.closest(`[data-graph-path]`); 2096 if (clickedElement) { 2097 let target = clickedElement.dataset.graphPath; 2098 let animation = clickedElement.dataset.graphAnimation; 2099 let speed = clickedElement.dataset.graphSpeed; 2100 this.animation = animation ? animation : 'fade'; 2101 this.speed = speed ? parseInt(speed) : 300; 2102 this._nextContainer = document.querySelector(`[data-graph-target="${target}"]`); 2103 this.open(); 2104 return; 2105 } 2106 2107 if (e.target.closest('.js-modal-close')) { 2108 this.close(); 2109 return; 2110 } 2111 }.bind(this)); 2112 2113 window.addEventListener('keydown', function (e) { 2114 if (e.keyCode == 27 && this.isOpen) { 2115 this.close(); 2116 } 2117 2118 if (e.which == 9 && this.isOpen) { 2119 this.focusCatch(e); 2120 return; 2121 } 2122 }.bind(this)); 2123 2124 document.addEventListener('click', function (e) { 2125 if (e.target.classList.contains('graph-modal') && e.target.classList.contains("is-open")) { 2126 this.close(); 2127 } 2128 }.bind(this)); 2129 } 2130 2131 } 2132 2133 open(selector) { 2134 this.previousActiveElement = document.activeElement; 2135 2136 if (this.isOpen) { 2137 this.reOpen = true; 2138 this.close(); 2139 return; 2140 } 2141 2142 this.modalContainer = this._nextContainer; 2143 2144 if (selector) { 2145 this.modalContainer = document.querySelector(`[data-graph-target="${selector}"]`); 2146 } 2147 2148 this.modal.style.setProperty('--transition-time', `${this.speed / 1000}s`); 2149 this.modal.classList.add('is-open'); 2150 2151 document.body.style.scrollBehavior = 'auto'; 2152 document.documentElement.style.scrollBehavior = 'auto'; 2153 2154 this.disableScroll(); 2155 2156 this.modalContainer.classList.add('graph-modal-open'); 2157 this.modalContainer.classList.add(this.animation); 2158 2159 setTimeout(() => { 2160 this.options.isOpen(this); 2161 this.modalContainer.classList.add('animate-open'); 2162 this.isOpen = true; 2163 this.focusTrap(); 2164 }, this.speed); 2165 } 2166 2167 close() { 2168 if (this.modalContainer) { 2169 this.modalContainer.classList.remove('animate-open'); 2170 this.modalContainer.classList.remove(this.animation); 2171 this.modal.classList.remove('is-open'); 2172 this.modalContainer.classList.remove('graph-modal-open'); 2173 2174 this.enableScroll(); 2175 2176 document.body.style.scrollBehavior = 'auto'; 2177 document.documentElement.style.scrollBehavior = 'auto'; 2178 2179 this.options.isClose(this); 2180 this.isOpen = false; 2181 this.focusTrap(); 2182 2183 if (this.reOpen) { 2184 this.reOpen = false; 2185 this.open(); 2186 } 2187 } 2188 } 2189 2190 focusCatch(e) { 2191 const nodes = this.modalContainer.querySelectorAll(this._focusElements); 2192 const nodesArray = Array.prototype.slice.call(nodes); 2193 const focusedItemIndex = nodesArray.indexOf(document.activeElement) 2194 if (e.shiftKey && focusedItemIndex === 0) { 2195 nodesArray[nodesArray.length - 1].focus(); 2196 e.preventDefault(); 2197 } 2198 if (!e.shiftKey && focusedItemIndex === nodesArray.length - 1) { 2199 nodesArray[0].focus(); 2200 e.preventDefault(); 2201 } 2202 } 2203 2204 focusTrap() { 2205 const nodes = this.modalContainer.querySelectorAll(this._focusElements); 2206 if (this.isOpen) { 2207 if (nodes.length) nodes[0].focus(); 2208 } else { 2209 this.previousActiveElement.focus(); 2210 } 2211 } 2212 2213 disableScroll() { 2214 let pagePosition = window.scrollY; 2215 this.lockPadding(); 2216 document.body.classList.add('disable-scroll'); 2217 document.body.dataset.position = pagePosition; 2218 document.body.style.top = -pagePosition + 'px'; 2219 } 2220 2221 enableScroll() { 2222 let pagePosition = parseInt(document.body.dataset.position, 10); 2223 this.unlockPadding(); 2224 document.body.style.top = 'auto'; 2225 document.body.classList.remove('disable-scroll'); 2226 window.scroll({ 2227 top: pagePosition, 2228 left: 0 2229 }); 2230 document.body.removeAttribute('data-position'); 2231 } 2232 2233 lockPadding() { 2234 let paddingOffset = window.innerWidth - document.body.offsetWidth + 'px'; 2235 this._fixBlocks.forEach((el) => { 2236 el.style.paddingRight = paddingOffset; 2237 }); 2238 document.body.style.paddingRight = paddingOffset; 2239 } 2240 2241 unlockPadding() { 2242 this._fixBlocks.forEach((el) => { 2243 el.style.paddingRight = '0px'; 2244 }); 2245 document.body.style.paddingRight = '0px'; 2246 } 2247} 2248 2249 2250/***/ }), 2251
vendor: 196,574 bytes, lines 2252-5288
2252/***/ "./node_modules/inputmask/dist/inputmask.js": 2253/*!**************************************************!*\ 2254 !*** ./node_modules/inputmask/dist/inputmask.js ***! 2255 \**************************************************/ 2256/***/ ((module) => { 2257 2258/*! 2259 * dist/inputmask 2260 * https://github.com/RobinHerbots/Inputmask 2261 * Copyright (c) 2010 - 2021 Robin Herbots 2262 * Licensed under the MIT license 2263 * Version: 5.0.7 2264 */ 2265!function(e, t) { 2266 if (true) module.exports = t(); else { var a, i; } 2267}(self, (function() { 2268 return function() { 2269 "use strict"; 2270 var e = { 2271 8741: function(e, t) { 2272 Object.defineProperty(t, "__esModule", { 2273 value: !0 2274 }), t.default = void 0; 2275 var i = !("undefined" == typeof window || !window.document || !window.document.createElement); 2276 t.default = i; 2277 }, 2278 3976: function(e, t, i) { 2279 Object.defineProperty(t, "__esModule", { 2280 value: !0 2281 }), t.default = void 0; 2282 var a, n = (a = i(5581)) && a.__esModule ? a : { 2283 default: a 2284 }; 2285 var r = { 2286 _maxTestPos: 500, 2287 placeholder: "_", 2288 optionalmarker: [ "[", "]" ], 2289 quantifiermarker: [ "{", "}" ], 2290 groupmarker: [ "(", ")" ], 2291 alternatormarker: "|", 2292 escapeChar: "\\", 2293 mask: null, 2294 regex: null, 2295 oncomplete: function() {}, 2296 onincomplete: function() {}, 2297 oncleared: function() {}, 2298 repeat: 0, 2299 greedy: !1, 2300 autoUnmask: !1, 2301 removeMaskOnSubmit: !1, 2302 clearMaskOnLostFocus: !0, 2303 insertMode: !0, 2304 insertModeVisual: !0, 2305 clearIncomplete: !1, 2306 alias: null, 2307 onKeyDown: function() {}, 2308 onBeforeMask: null, 2309 onBeforePaste: function(e, t) { 2310 return "function" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e; 2311 }, 2312 onBeforeWrite: null, 2313 onUnMask: null, 2314 showMaskOnFocus: !0, 2315 showMaskOnHover: !0, 2316 onKeyValidation: function() {}, 2317 skipOptionalPartCharacter: " ", 2318 numericInput: !1, 2319 rightAlign: !1, 2320 undoOnEscape: !0, 2321 radixPoint: "", 2322 _radixDance: !1, 2323 groupSeparator: "", 2324 keepStatic: null, 2325 positionCaretOnTab: !0, 2326 tabThrough: !1, 2327 supportsInputType: [ "text", "tel", "url", "password", "search" ], 2328 ignorables: [ n.default.BACKSPACE, n.default.TAB, n.default["PAUSE/BREAK"], n.default.ESCAPE, n.default.PAGE_UP, n.default.PAGE_DOWN, n.default.END, n.default.HOME, n.default.LEFT, n.default.UP, n.default.RIGHT, n.default.DOWN, n.default.INSERT, n.default.DELETE, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ], 2329 isComplete: null, 2330 preValidation: null, 2331 postValidation: null, 2332 staticDefinitionSymbol: void 0, 2333 jitMasking: !1, 2334 nullable: !0, 2335 inputEventOnly: !1, 2336 noValuePatching: !1, 2337 positionCaretOnClick: "lvp", 2338 casing: null, 2339 inputmode: "text", 2340 importDataAttributes: !0, 2341 shiftPositions: !0, 2342 usePrototypeDefinitions: !0, 2343 validationEventTimeOut: 3e3, 2344 substitutes: {} 2345 }; 2346 t.default = r; 2347 }, 2348 7392: function(e, t) { 2349 Object.defineProperty(t, "__esModule", { 2350 value: !0 2351 }), t.default = void 0; 2352 t.default = { 2353 9: { 2354 validator: "[0-9\uff10-\uff19]", 2355 definitionSymbol: "*" 2356 }, 2357 a: { 2358 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 2359 definitionSymbol: "*" 2360 }, 2361 "*": { 2362 validator: "[0-9\uff10-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]" 2363 } 2364 }; 2365 }, 2366 253: function(e, t) { 2367 Object.defineProperty(t, "__esModule", { 2368 value: !0 2369 }), t.default = function(e, t, i) { 2370 if (void 0 === i) return e.__data ? e.__data[t] : null; 2371 e.__data = e.__data || {}, e.__data[t] = i; 2372 }; 2373 }, 2374 3776: function(e, t, i) { 2375 Object.defineProperty(t, "__esModule", { 2376 value: !0 2377 }), t.Event = void 0, t.off = function(e, t) { 2378 var i, a; 2379 function n(e, t, n) { 2380 if (e in i == !0) if (a.removeEventListener ? a.removeEventListener(e, n, !1) : a.detachEvent && a.detachEvent("on" + e, n), 2381 "global" === t) for (var r in i[e]) i[e][r].splice(i[e][r].indexOf(n), 1); else i[e][t].splice(i[e][t].indexOf(n), 1); 2382 } 2383 function r(e, a) { 2384 var n, r, o = []; 2385 if (e.length > 0) if (void 0 === t) for (n = 0, r = i[e][a].length; n < r; n++) o.push({ 2386 ev: e, 2387 namespace: a && a.length > 0 ? a : "global", 2388 handler: i[e][a][n] 2389 }); else o.push({ 2390 ev: e, 2391 namespace: a && a.length > 0 ? a : "global", 2392 handler: t 2393 }); else if (a.length > 0) for (var l in i) for (var s in i[l]) if (s === a) if (void 0 === t) for (n = 0, 2394 r = i[l][s].length; n < r; n++) o.push({ 2395 ev: l, 2396 namespace: s, 2397 handler: i[l][s][n] 2398 }); else o.push({ 2399 ev: l, 2400 namespace: s, 2401 handler: t 2402 }); 2403 return o; 2404 } 2405 if (u(this[0]) && e) { 2406 i = this[0].eventRegistry, a = this[0]; 2407 for (var o = e.split(" "), l = 0; l < o.length; l++) for (var s = o[l].split("."), c = r(s[0], s[1]), f = 0, d = c.length; f < d; f++) n(c[f].ev, c[f].namespace, c[f].handler); 2408 } 2409 return this; 2410 }, t.on = function(e, t) { 2411 function i(e, i) { 2412 n.addEventListener ? n.addEventListener(e, t, !1) : n.attachEvent && n.attachEvent("on" + e, t), 2413 a[e] = a[e] || {}, a[e][i] = a[e][i] || [], a[e][i].push(t); 2414 } 2415 if (u(this[0])) for (var a = this[0].eventRegistry, n = this[0], r = e.split(" "), o = 0; o < r.length; o++) { 2416 var l = r[o].split("."), s = l[0], c = l[1] || "global"; 2417 i(s, c); 2418 } 2419 return this; 2420 }, t.trigger = function(e) { 2421 if (u(this[0])) for (var t = this[0].eventRegistry, i = this[0], a = "string" == typeof e ? e.split(" ") : [ e.type ], r = 0; r < a.length; r++) { 2422 var l = a[r].split("."), s = l[0], c = l[1] || "global"; 2423 if (void 0 !== document && "global" === c) { 2424 var f, d, p = { 2425 bubbles: !0, 2426 cancelable: !0, 2427 detail: arguments[1] 2428 }; 2429 if (document.createEvent) { 2430 try { 2431 if ("input" === s) p.inputType = "insertText", f = new InputEvent(s, p); else f = new CustomEvent(s, p); 2432 } catch (e) { 2433 (f = document.createEvent("CustomEvent")).initCustomEvent(s, p.bubbles, p.cancelable, p.detail); 2434 } 2435 e.type && (0, n.default)(f, e), i.dispatchEvent(f); 2436 } else (f = document.createEventObject()).eventType = s, f.detail = arguments[1], 2437 e.type && (0, n.default)(f, e), i.fireEvent("on" + f.eventType, f); 2438 } else if (void 0 !== t[s]) if (arguments[0] = arguments[0].type ? arguments[0] : o.default.Event(arguments[0]), 2439 arguments[0].detail = arguments.slice(1), "global" === c) for (var h in t[s]) for (d = 0; d < t[s][h].length; d++) t[s][h][d].apply(i, arguments); else for (d = 0; d < t[s][c].length; d++) t[s][c][d].apply(i, arguments); 2440 } 2441 return this; 2442 }; 2443 var a, n = s(i(600)), r = s(i(9380)), o = s(i(4963)), l = s(i(8741)); 2444 function s(e) { 2445 return e && e.__esModule ? e : { 2446 default: e 2447 }; 2448 } 2449 function u(e) { 2450 return e instanceof Element; 2451 } 2452 t.Event = a, "function" == typeof r.default.CustomEvent ? t.Event = a = r.default.CustomEvent : l.default && (t.Event = a = function(e, t) { 2453 t = t || { 2454 bubbles: !1, 2455 cancelable: !1, 2456 detail: void 0 2457 }; 2458 var i = document.createEvent("CustomEvent"); 2459 return i.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), i; 2460 }, a.prototype = r.default.Event.prototype); 2461 }, 2462 600: function(e, t) { 2463 function i(e) { 2464 return i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 2465 return typeof e; 2466 } : function(e) { 2467 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 2468 }, i(e); 2469 } 2470 Object.defineProperty(t, "__esModule", { 2471 value: !0 2472 }), t.default = function e() { 2473 var t, a, n, r, o, l, s = arguments[0] || {}, u = 1, c = arguments.length, f = !1; 2474 "boolean" == typeof s && (f = s, s = arguments[u] || {}, u++); 2475 "object" !== i(s) && "function" != typeof s && (s = {}); 2476 for (;u < c; u++) if (null != (t = arguments[u])) for (a in t) n = s[a], r = t[a], 2477 s !== r && (f && r && ("[object Object]" === Object.prototype.toString.call(r) || (o = Array.isArray(r))) ? (o ? (o = !1, 2478 l = n && Array.isArray(n) ? n : []) : l = n && "[object Object]" === Object.prototype.toString.call(n) ? n : {}, 2479 s[a] = e(f, l, r)) : void 0 !== r && (s[a] = r)); 2480 return s; 2481 }; 2482 }, 2483 4963: function(e, t, i) { 2484 Object.defineProperty(t, "__esModule", { 2485 value: !0 2486 }), t.default = void 0; 2487 var a = l(i(600)), n = l(i(9380)), r = l(i(253)), o = i(3776); 2488 function l(e) { 2489 return e && e.__esModule ? e : { 2490 default: e 2491 }; 2492 } 2493 var s = n.default.document; 2494 function u(e) { 2495 return e instanceof u ? e : this instanceof u ? void (null != e && e !== n.default && (this[0] = e.nodeName ? e : void 0 !== e[0] && e[0].nodeName ? e[0] : s.querySelector(e), 2496 void 0 !== this[0] && null !== this[0] && (this[0].eventRegistry = this[0].eventRegistry || {}))) : new u(e); 2497 } 2498 u.prototype = { 2499 on: o.on, 2500 off: o.off, 2501 trigger: o.trigger 2502 }, u.extend = a.default, u.data = r.default, u.Event = o.Event; 2503 var c = u; 2504 t.default = c; 2505 }, 2506 9845: function(e, t, i) { 2507 Object.defineProperty(t, "__esModule", { 2508 value: !0 2509 }), t.ua = t.mobile = t.iphone = t.iemobile = t.ie = void 0; 2510 var a, n = (a = i(9380)) && a.__esModule ? a : { 2511 default: a 2512 }; 2513 var r = n.default.navigator && n.default.navigator.userAgent || "", o = r.indexOf("MSIE ") > 0 || r.indexOf("Trident/") > 0, l = "ontouchstart" in n.default, s = /iemobile/i.test(r), u = /iphone/i.test(r) && !s; 2514 t.iphone = u, t.iemobile = s, t.mobile = l, t.ie = o, t.ua = r; 2515 }, 2516 7184: function(e, t) { 2517 Object.defineProperty(t, "__esModule", { 2518 value: !0 2519 }), t.default = function(e) { 2520 return e.replace(i, "\\$1"); 2521 }; 2522 var i = new RegExp("(\\" + [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ].join("|\\") + ")", "gim"); 2523 }, 2524 6030: function(e, t, i) { 2525 Object.defineProperty(t, "__esModule", { 2526 value: !0 2527 }), t.EventHandlers = void 0; 2528 var a, n = i(8711), r = (a = i(5581)) && a.__esModule ? a : { 2529 default: a 2530 }, o = i(9845), l = i(7215), s = i(7760), u = i(4713); 2531 function c(e, t) { 2532 var i = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; 2533 if (!i) { 2534 if (Array.isArray(e) || (i = function(e, t) { 2535 if (!e) return; 2536 if ("string" == typeof e) return f(e, t); 2537 var i = Object.prototype.toString.call(e).slice(8, -1); 2538 "Object" === i && e.constructor && (i = e.constructor.name); 2539 if ("Map" === i || "Set" === i) return Array.from(e); 2540 if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return f(e, t); 2541 }(e)) || t && e && "number" == typeof e.length) { 2542 i && (e = i); 2543 var a = 0, n = function() {}; 2544 return { 2545 s: n, 2546 n: function() { 2547 return a >= e.length ? { 2548 done: !0 2549 } : { 2550 done: !1, 2551 value: e[a++] 2552 }; 2553 }, 2554 e: function(e) { 2555 throw e; 2556 }, 2557 f: n 2558 }; 2559 } 2560 throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 2561 } 2562 var r, o = !0, l = !1; 2563 return { 2564 s: function() { 2565 i = i.call(e); 2566 }, 2567 n: function() { 2568 var e = i.next(); 2569 return o = e.done, e; 2570 }, 2571 e: function(e) { 2572 l = !0, r = e; 2573 }, 2574 f: function() { 2575 try { 2576 o || null == i.return || i.return(); 2577 } finally { 2578 if (l) throw r; 2579 } 2580 } 2581 }; 2582 } 2583 function f(e, t) { 2584 (null == t || t > e.length) && (t = e.length); 2585 for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i]; 2586 return a; 2587 } 2588 var d = { 2589 keydownEvent: function(e) { 2590 var t = this.inputmask, i = t.opts, a = t.dependencyLib, c = t.maskset, f = this, d = a(f), p = e.keyCode, h = n.caret.call(t, f), v = i.onKeyDown.call(this, e, n.getBuffer.call(t), h, i); 2591 if (void 0 !== v) return v; 2592 if (p === r.default.BACKSPACE || p === r.default.DELETE || o.iphone && p === r.default.BACKSPACE_SAFARI || e.ctrlKey && p === r.default.X && !("oncut" in f)) e.preventDefault(), 2593 l.handleRemove.call(t, f, p, h), (0, s.writeBuffer)(f, n.getBuffer.call(t, !0), c.p, e, f.inputmask._valueGet() !== n.getBuffer.call(t).join("")); else if (p === r.default.END || p === r.default.PAGE_DOWN) { 2594 e.preventDefault(); 2595 var m = n.seekNext.call(t, n.getLastValidPosition.call(t)); 2596 n.caret.call(t, f, e.shiftKey ? h.begin : m, m, !0); 2597 } else p === r.default.HOME && !e.shiftKey || p === r.default.PAGE_UP ? (e.preventDefault(), 2598 n.caret.call(t, f, 0, e.shiftKey ? h.begin : 0, !0)) : i.undoOnEscape && p === r.default.ESCAPE && !0 !== e.altKey ? ((0, 2599 s.checkVal)(f, !0, !1, t.undoValue.split("")), d.trigger("click")) : p !== r.default.INSERT || e.shiftKey || e.ctrlKey || void 0 !== t.userOptions.insertMode ? !0 === i.tabThrough && p === r.default.TAB ? !0 === e.shiftKey ? (h.end = n.seekPrevious.call(t, h.end, !0), 2600 !0 === u.getTest.call(t, h.end - 1).match.static && h.end--, h.begin = n.seekPrevious.call(t, h.end, !0), 2601 h.begin >= 0 && h.end > 0 && (e.preventDefault(), n.caret.call(t, f, h.begin, h.end))) : (h.begin = n.seekNext.call(t, h.begin, !0), 2602 h.end = n.seekNext.call(t, h.begin, !0), h.end < c.maskLength && h.end--, h.begin <= c.maskLength && (e.preventDefault(), 2603 n.caret.call(t, f, h.begin, h.end))) : e.shiftKey || i.insertModeVisual && !1 === i.insertMode && (p === r.default.RIGHT ? setTimeout((function() { 2604 var e = n.caret.call(t, f); 2605 n.caret.call(t, f, e.begin); 2606 }), 0) : p === r.default.LEFT && setTimeout((function() { 2607 var e = n.translatePosition.call(t, f.inputmask.caretPos.begin); 2608 n.translatePosition.call(t, f.inputmask.caretPos.end); 2609 t.isRTL ? n.caret.call(t, f, e + (e === c.maskLength ? 0 : 1)) : n.caret.call(t, f, e - (0 === e ? 0 : 1)); 2610 }), 0)) : l.isSelection.call(t, h) ? i.insertMode = !i.insertMode : (i.insertMode = !i.insertMode, 2611 n.caret.call(t, f, h.begin, h.begin)); 2612 t.ignorable = i.ignorables.includes(p); 2613 }, 2614 keypressEvent: function(e, t, i, a, o) { 2615 var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), v = e.keyCode; 2616 if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return v === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0), 2617 setTimeout((function() { 2618 h.trigger("change"); 2619 }), 0)), u.skipInputEvent = !0, !0; 2620 if (v) { 2621 44 !== v && 46 !== v || 3 !== e.location || "" === c.radixPoint || (v = c.radixPoint.charCodeAt(0)); 2622 var m, g = t ? { 2623 begin: o, 2624 end: o 2625 } : n.caret.call(u, p), k = String.fromCharCode(v); 2626 k = c.substitutes[k] || k, d.writeOutBuffer = !0; 2627 var y = l.isValid.call(u, g, k, a, void 0, void 0, void 0, t); 2628 if (!1 !== y && (n.resetMaskSet.call(u, !0), m = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos), 2629 d.p = m), m = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, m) : m, 2630 !1 !== i && (setTimeout((function() { 2631 c.onKeyValidation.call(p, v, y); 2632 }), 0), d.writeOutBuffer && !1 !== y)) { 2633 var b = n.getBuffer.call(u); 2634 (0, s.writeBuffer)(p, b, m, e, !0 !== t); 2635 } 2636 if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = m), y; 2637 } 2638 }, 2639 keyupEvent: function(e) { 2640 var t = this.inputmask; 2641 !t.isComposing || e.keyCode !== r.default.KEY_229 && e.keyCode !== r.default.ENTER || t.$el.trigger("input"); 2642 }, 2643 pasteEvent: function(e) { 2644 var t, i = this.inputmask, a = i.opts, r = i._valueGet(!0), o = n.caret.call(i, this); 2645 i.isRTL && (t = o.end, o.end = n.translatePosition.call(i, o.begin), o.begin = n.translatePosition.call(i, t)); 2646 var l = r.substr(0, o.begin), u = r.substr(o.end, r.length); 2647 if (l == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(0, o.begin).join("") && (l = ""), 2648 u == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(o.end).join("") && (u = ""), 2649 window.clipboardData && window.clipboardData.getData) r = l + window.clipboardData.getData("Text") + u; else { 2650 if (!e.clipboardData || !e.clipboardData.getData) return !0; 2651 r = l + e.clipboardData.getData("text/plain") + u; 2652 } 2653 var f = r; 2654 if (i.isRTL) { 2655 f = f.split(""); 2656 var d, p = c(n.getBufferTemplate.call(i)); 2657 try { 2658 for (p.s(); !(d = p.n()).done; ) { 2659 var h = d.value; 2660 f[0] === h && f.shift(); 2661 } 2662 } catch (e) { 2663 p.e(e); 2664 } finally { 2665 p.f(); 2666 } 2667 f = f.join(""); 2668 } 2669 if ("function" == typeof a.onBeforePaste) { 2670 if (!1 === (f = a.onBeforePaste.call(i, f, a))) return !1; 2671 f || (f = r); 2672 } 2673 (0, s.checkVal)(this, !0, !1, f.toString().split(""), e), e.preventDefault(); 2674 }, 2675 inputFallBackEvent: function(e) { 2676 var t = this.inputmask, i = t.opts, a = t.dependencyLib; 2677 var l = this, c = l.inputmask._valueGet(!0), f = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(""), p = n.caret.call(t, l, void 0, void 0, !0); 2678 if (f !== c) { 2679 c = function(e, i, a) { 2680 if (o.iemobile) { 2681 var r = i.replace(n.getBuffer.call(t).join(""), ""); 2682 if (1 === r.length) { 2683 var l = i.split(""); 2684 l.splice(a.begin, 0, r), i = l.join(""); 2685 } 2686 } 2687 return i; 2688 }(0, c, p); 2689 var h = function(e, a, r) { 2690 for (var o, l, s, c = e.substr(0, r.begin).split(""), f = e.substr(r.begin).split(""), d = a.substr(0, r.begin).split(""), p = a.substr(r.begin).split(""), h = c.length >= d.length ? c.length : d.length, v = f.length >= p.length ? f.length : p.length, m = "", g = [], k = "~"; c.length < h; ) c.push(k); 2691 for (;d.length < h; ) d.push(k); 2692 for (;f.length < v; ) f.unshift(k); 2693 for (;p.length < v; ) p.unshift(k); 2694 var y = c.concat(f), b = d.concat(p); 2695 for (l = 0, o = y.length; l < o; l++) switch (s = u.getPlaceholder.call(t, n.translatePosition.call(t, l)), 2696 m) { 2697 case "insertText": 2698 b[l - 1] === y[l] && r.begin == y.length - 1 && g.push(y[l]), l = o; 2699 break; 2700 2701 case "insertReplacementText": 2702 case "deleteContentBackward": 2703 y[l] === k ? r.end++ : l = o; 2704 break; 2705 2706 default: 2707 y[l] !== b[l] && (y[l + 1] !== k && y[l + 1] !== s && void 0 !== y[l + 1] || (b[l] !== s || b[l + 1] !== k) && b[l] !== k ? b[l + 1] === k && b[l] === y[l + 1] ? (m = "insertText", 2708 g.push(y[l]), r.begin--, r.end--) : y[l] !== s && y[l] !== k && (y[l + 1] === k || b[l] !== y[l] && b[l + 1] === y[l + 1]) ? (m = "insertReplacementText", 2709 g.push(y[l]), r.begin--) : y[l] === k ? (m = "deleteContentBackward", (n.isMask.call(t, n.translatePosition.call(t, l), !0) || b[l] === i.radixPoint) && r.end++) : l = o : (m = "insertText", 2710 g.push(y[l]), r.begin--, r.end--)); 2711 } 2712 return { 2713 action: m, 2714 data: g, 2715 caret: r 2716 }; 2717 }(c, f, p); 2718 switch ((l.inputmask.shadowRoot || l.ownerDocument).activeElement !== l && l.focus(), 2719 (0, s.writeBuffer)(l, n.getBuffer.call(t)), n.caret.call(t, l, p.begin, p.end, !0), 2720 h.action) { 2721 case "insertText": 2722 case "insertReplacementText": 2723 h.data.forEach((function(e, i) { 2724 var n = new a.Event("keypress"); 2725 n.keyCode = e.charCodeAt(0), t.ignorable = !1, d.keypressEvent.call(l, n); 2726 })), setTimeout((function() { 2727 t.$el.trigger("keyup"); 2728 }), 0); 2729 break; 2730 2731 case "deleteContentBackward": 2732 var v = new a.Event("keydown"); 2733 v.keyCode = r.default.BACKSPACE, d.keydownEvent.call(l, v); 2734 break; 2735 2736 default: 2737 (0, s.applyInputValue)(l, c); 2738 } 2739 e.preventDefault(); 2740 } 2741 }, 2742 compositionendEvent: function(e) { 2743 var t = this.inputmask; 2744 t.isComposing = !1, t.$el.trigger("input"); 2745 }, 2746 setValueEvent: function(e) { 2747 var t = this.inputmask, i = this, a = e && e.detail ? e.detail[0] : arguments[1]; 2748 void 0 === a && (a = i.inputmask._valueGet(!0)), (0, s.applyInputValue)(i, a), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, i, e.detail ? e.detail[1] : arguments[2]); 2749 }, 2750 focusEvent: function(e) { 2751 var t = this.inputmask, i = t.opts, a = this, r = a.inputmask._valueGet(); 2752 i.showMaskOnFocus && r !== n.getBuffer.call(t).join("") && (0, s.writeBuffer)(a, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))), 2753 !0 !== i.positionCaretOnTab || !1 !== t.mouseEnter || l.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || d.clickEvent.apply(a, [ e, !0 ]), 2754 t.undoValue = t._valueGet(!0); 2755 }, 2756 invalidEvent: function(e) { 2757 this.inputmask.validationEvent = !0; 2758 }, 2759 mouseleaveEvent: function() { 2760 var e = this.inputmask, t = e.opts, i = this; 2761 e.mouseEnter = !1, t.clearMaskOnLostFocus && (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i && (0, 2762 s.HandleNativePlaceholder)(i, e.originalPlaceholder); 2763 }, 2764 clickEvent: function(e, t) { 2765 var i = this.inputmask, a = this; 2766 if ((a.inputmask.shadowRoot || a.ownerDocument).activeElement === a) { 2767 var r = n.determineNewCaretPosition.call(i, n.caret.call(i, a), t); 2768 void 0 !== r && n.caret.call(i, a, r); 2769 } 2770 }, 2771 cutEvent: function(e) { 2772 var t = this.inputmask, i = t.maskset, a = this, o = n.caret.call(t, a), u = t.isRTL ? n.getBuffer.call(t).slice(o.end, o.begin) : n.getBuffer.call(t).slice(o.begin, o.end), c = t.isRTL ? u.reverse().join("") : u.join(""); 2773 window.navigator.clipboard ? window.navigator.clipboard.writeText(c) : window.clipboardData && window.clipboardData.getData && window.clipboardData.setData("Text", c), 2774 l.handleRemove.call(t, a, r.default.DELETE, o), (0, s.writeBuffer)(a, n.getBuffer.call(t), i.p, e, t.undoValue !== t._valueGet(!0)); 2775 }, 2776 blurEvent: function(e) { 2777 var t = this.inputmask, i = t.opts, a = (0, t.dependencyLib)(this), r = this; 2778 if (r.inputmask) { 2779 (0, s.HandleNativePlaceholder)(r, t.originalPlaceholder); 2780 var o = r.inputmask._valueGet(), u = n.getBuffer.call(t).slice(); 2781 "" !== o && (i.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && o === n.getBufferTemplate.call(t).join("") ? u = [] : s.clearOptionalTail.call(t, u)), 2782 !1 === l.isComplete.call(t, u) && (setTimeout((function() { 2783 a.trigger("incomplete"); 2784 }), 0), i.clearIncomplete && (n.resetMaskSet.call(t), u = i.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())), 2785 (0, s.writeBuffer)(r, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0), 2786 a.trigger("change")); 2787 } 2788 }, 2789 mouseenterEvent: function() { 2790 var e = this.inputmask, t = e.opts, i = this; 2791 if (e.mouseEnter = !0, (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i) { 2792 var a = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join(""); 2793 e.placeholder !== a && i.placeholder !== e.originalPlaceholder && (e.originalPlaceholder = i.placeholder), 2794 t.showMaskOnHover && (0, s.HandleNativePlaceholder)(i, a); 2795 } 2796 }, 2797 submitEvent: function() { 2798 var e = this.inputmask, t = e.opts; 2799 e.undoValue !== e._valueGet(!0) && e.$el.trigger("change"), -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join("") && e._valueSet(""), 2800 t.clearIncomplete && !1 === l.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(""), 2801 t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() { 2802 (0, s.writeBuffer)(e.el, n.getBuffer.call(e)); 2803 }), 0)); 2804 }, 2805 resetEvent: function() { 2806 var e = this.inputmask; 2807 e.refreshValue = !0, setTimeout((function() { 2808 (0, s.applyInputValue)(e.el, e._valueGet(!0)); 2809 }), 0); 2810 } 2811 }; 2812 t.EventHandlers = d; 2813 }, 2814 9716: function(e, t, i) { 2815 Object.defineProperty(t, "__esModule", { 2816 value: !0 2817 }), t.EventRuler = void 0; 2818 var a = l(i(2394)), n = l(i(5581)), r = i(8711), o = i(7760); 2819 function l(e) { 2820 return e && e.__esModule ? e : { 2821 default: e 2822 }; 2823 } 2824 var s = { 2825 on: function(e, t, i) { 2826 var l = e.inputmask.dependencyLib, s = function(t) { 2827 t.originalEvent && (t = t.originalEvent || t, arguments[0] = t); 2828 var s, u = this, c = u.inputmask, f = c ? c.opts : void 0; 2829 if (void 0 === c && "FORM" !== this.nodeName) { 2830 var d = l.data(u, "_inputmask_opts"); 2831 l(u).off(), d && new a.default(d).mask(u); 2832 } else { 2833 if ([ "submit", "reset", "setvalue" ].includes(t.type) || "FORM" === this.nodeName || !(u.disabled || u.readOnly && !("keydown" === t.type && t.ctrlKey && 67 === t.keyCode || !1 === f.tabThrough && t.keyCode === n.default.TAB))) { 2834 switch (t.type) { 2835 case "input": 2836 if (!0 === c.skipInputEvent || t.inputType && "insertCompositionText" === t.inputType) return c.skipInputEvent = !1, 2837 t.preventDefault(); 2838 break; 2839 2840 case "keydown": 2841 c.skipKeyPressEvent = !1, c.skipInputEvent = c.isComposing = t.keyCode === n.default.KEY_229; 2842 break; 2843 2844 case "keyup": 2845 case "compositionend": 2846 c.isComposing && (c.skipInputEvent = !1); 2847 break; 2848 2849 case "keypress": 2850 if (!0 === c.skipKeyPressEvent) return t.preventDefault(); 2851 c.skipKeyPressEvent = !0; 2852 break; 2853 2854 case "click": 2855 case "focus": 2856 return c.validationEvent ? (c.validationEvent = !1, e.blur(), (0, o.HandleNativePlaceholder)(e, (c.isRTL ? r.getBufferTemplate.call(c).slice().reverse() : r.getBufferTemplate.call(c)).join("")), 2857 setTimeout((function() { 2858 e.focus(); 2859 }), f.validationEventTimeOut), !1) : (s = arguments, setTimeout((function() { 2860 e.inputmask && i.apply(u, s); 2861 }), 0), !1); 2862 } 2863 var p = i.apply(u, arguments); 2864 return !1 === p && (t.preventDefault(), t.stopPropagation()), p; 2865 } 2866 t.preventDefault(); 2867 } 2868 }; 2869 [ "submit", "reset" ].includes(t) ? (s = s.bind(e), null !== e.form && l(e.form).on(t, s)) : l(e).on(t, s), 2870 e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(s); 2871 }, 2872 off: function(e, t) { 2873 if (e.inputmask && e.inputmask.events) { 2874 var i = e.inputmask.dependencyLib, a = e.inputmask.events; 2875 for (var n in t && ((a = [])[t] = e.inputmask.events[t]), a) { 2876 for (var r = a[n]; r.length > 0; ) { 2877 var o = r.pop(); 2878 [ "submit", "reset" ].includes(n) ? null !== e.form && i(e.form).off(n, o) : i(e).off(n, o); 2879 } 2880 delete e.inputmask.events[n]; 2881 } 2882 } 2883 } 2884 }; 2885 t.EventRuler = s; 2886 }, 2887 219: function(e, t, i) { 2888 var a = d(i(2394)), n = d(i(5581)), r = d(i(7184)), o = i(8711), l = i(4713); 2889 function s(e) { 2890 return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 2891 return typeof e; 2892 } : function(e) { 2893 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 2894 }, s(e); 2895 } 2896 function u(e, t) { 2897 return function(e) { 2898 if (Array.isArray(e)) return e; 2899 }(e) || function(e, t) { 2900 var i = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"]; 2901 if (null == i) return; 2902 var a, n, r = [], o = !0, l = !1; 2903 try { 2904 for (i = i.call(e); !(o = (a = i.next()).done) && (r.push(a.value), !t || r.length !== t); o = !0) ; 2905 } catch (e) { 2906 l = !0, n = e; 2907 } finally { 2908 try { 2909 o || null == i.return || i.return(); 2910 } finally { 2911 if (l) throw n; 2912 } 2913 } 2914 return r; 2915 }(e, t) || function(e, t) { 2916 if (!e) return; 2917 if ("string" == typeof e) return c(e, t); 2918 var i = Object.prototype.toString.call(e).slice(8, -1); 2919 "Object" === i && e.constructor && (i = e.constructor.name); 2920 if ("Map" === i || "Set" === i) return Array.from(e); 2921 if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t); 2922 }(e, t) || function() { 2923 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 2924 }(); 2925 } 2926 function c(e, t) { 2927 (null == t || t > e.length) && (t = e.length); 2928 for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i]; 2929 return a; 2930 } 2931 function f(e, t) { 2932 for (var i = 0; i < t.length; i++) { 2933 var a = t[i]; 2934 a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), 2935 Object.defineProperty(e, a.key, a); 2936 } 2937 } 2938 function d(e) { 2939 return e && e.__esModule ? e : { 2940 default: e 2941 }; 2942 } 2943 var p = a.default.dependencyLib, h = function() { 2944 function e(t, i, a) { 2945 !function(e, t) { 2946 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); 2947 }(this, e), this.mask = t, this.format = i, this.opts = a, this._date = new Date(1, 0, 1), 2948 this.initDateObject(t, this.opts); 2949 } 2950 var t, i, a; 2951 return t = e, (i = [ { 2952 key: "date", 2953 get: function() { 2954 return void 0 === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(void 0, this.opts)), 2955 this._date; 2956 } 2957 }, { 2958 key: "initDateObject", 2959 value: function(e, t) { 2960 var i; 2961 for (P(t).lastIndex = 0; i = P(t).exec(this.format); ) { 2962 var a = new RegExp("\\d+$").exec(i[0]), n = a ? i[0][0] + "x" : i[0], r = void 0; 2963 if (void 0 !== e) { 2964 if (a) { 2965 var o = P(t).lastIndex, l = O(i.index, t); 2966 P(t).lastIndex = o, r = e.slice(0, e.indexOf(l.nextMatch[0])); 2967 } else r = e.slice(0, n.length); 2968 e = e.slice(r.length); 2969 } 2970 Object.prototype.hasOwnProperty.call(g, n) && this.setValue(this, r, n, g[n][2], g[n][1]); 2971 } 2972 } 2973 }, { 2974 key: "setValue", 2975 value: function(e, t, i, a, n) { 2976 if (void 0 !== t && (e[a] = "ampm" === a ? t : t.replace(/[^0-9]/g, "0"), e["raw" + a] = t.replace(/\s/g, "_")), 2977 void 0 !== n) { 2978 var r = e[a]; 2979 ("day" === a && 29 === parseInt(r) || "month" === a && 2 === parseInt(r)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || "" !== e.year && void 0 !== e.year || e._date.setFullYear(2012, 1, 29)), 2980 "day" === a && (m = !0, 0 === parseInt(r) && (r = 1)), "month" === a && (m = !0), 2981 "year" === a && (m = !0, r.length < 4 && (r = _(r, 4, !0))), "" === r || isNaN(r) || n.call(e._date, r), 2982 "ampm" === a && n.call(e._date, r); 2983 } 2984 } 2985 }, { 2986 key: "reset", 2987 value: function() { 2988 this._date = new Date(1, 0, 1); 2989 } 2990 }, { 2991 key: "reInit", 2992 value: function() { 2993 this._date = void 0, this.date; 2994 } 2995 } ]) && f(t.prototype, i), a && f(t, a), Object.defineProperty(t, "prototype", { 2996 writable: !1 2997 }), e; 2998 }(), v = (new Date).getFullYear(), m = !1, g = { 2999 d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ], 3000 dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() { 3001 return _(Date.prototype.getDate.call(this), 2); 3002 } ], 3003 ddd: [ "" ], 3004 dddd: [ "" ], 3005 m: [ "[1-9]|1[012]", function(e) { 3006 var t = e ? parseInt(e) : 0; 3007 return t > 0 && t--, Date.prototype.setMonth.call(this, t); 3008 }, "month", function() { 3009 return Date.prototype.getMonth.call(this) + 1; 3010 } ], 3011 mm: [ "0[1-9]|1[012]", function(e) { 3012 var t = e ? parseInt(e) : 0; 3013 return t > 0 && t--, Date.prototype.setMonth.call(this, t); 3014 }, "month", function() { 3015 return _(Date.prototype.getMonth.call(this) + 1, 2); 3016 } ], 3017 mmm: [ "" ], 3018 mmmm: [ "" ], 3019 yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() { 3020 return _(Date.prototype.getFullYear.call(this), 2); 3021 } ], 3022 yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() { 3023 return _(Date.prototype.getFullYear.call(this), 4); 3024 } ], 3025 h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 3026 hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() { 3027 return _(Date.prototype.getHours.call(this), 2); 3028 } ], 3029 hx: [ function(e) { 3030 return "[0-9]{".concat(e, "}"); 3031 }, Date.prototype.setHours, "hours", function(e) { 3032 return Date.prototype.getHours; 3033 } ], 3034 H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 3035 HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() { 3036 return _(Date.prototype.getHours.call(this), 2); 3037 } ], 3038 Hx: [ function(e) { 3039 return "[0-9]{".concat(e, "}"); 3040 }, Date.prototype.setHours, "hours", function(e) { 3041 return function() { 3042 return _(Date.prototype.getHours.call(this), e); 3043 }; 3044 } ], 3045 M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ], 3046 MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() { 3047 return _(Date.prototype.getMinutes.call(this), 2); 3048 } ], 3049 s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ], 3050 ss: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function() { 3051 return _(Date.prototype.getSeconds.call(this), 2); 3052 } ], 3053 l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() { 3054 return _(Date.prototype.getMilliseconds.call(this), 3); 3055 } ], 3056 L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() { 3057 return _(Date.prototype.getMilliseconds.call(this), 2); 3058 } ], 3059 t: [ "[ap]", y, "ampm", b, 1 ], 3060 tt: [ "[ap]m", y, "ampm", b, 2 ], 3061 T: [ "[AP]", y, "ampm", b, 1 ], 3062 TT: [ "[AP]M", y, "ampm", b, 2 ], 3063 Z: [ ".*", void 0, "Z", function() { 3064 var e = this.toString().match(/\((.+)\)/)[1]; 3065 e.includes(" ") && (e = (e = e.replace("-", " ").toUpperCase()).split(" ").map((function(e) { 3066 return u(e, 1)[0]; 3067 })).join("")); 3068 return e; 3069 } ], 3070 o: [ "" ], 3071 S: [ "" ] 3072 }, k = { 3073 isoDate: "yyyy-mm-dd", 3074 isoTime: "HH:MM:ss", 3075 isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", 3076 isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" 3077 }; 3078 function y(e) { 3079 var t = this.getHours(); 3080 e.toLowerCase().includes("p") ? this.setHours(t + 12) : e.toLowerCase().includes("a") && t >= 12 && this.setHours(t - 12); 3081 } 3082 function b() { 3083 var e = this.getHours(); 3084 return (e = e || 12) >= 12 ? "PM" : "AM"; 3085 } 3086 function x(e) { 3087 var t = new RegExp("\\d+$").exec(e[0]); 3088 if (t && void 0 !== t[0]) { 3089 var i = g[e[0][0] + "x"].slice(""); 3090 return i[0] = i[0](t[0]), i[3] = i[3](t[0]), i; 3091 } 3092 if (g[e[0]]) return g[e[0]]; 3093 } 3094 function P(e) { 3095 if (!e.tokenizer) { 3096 var t = [], i = []; 3097 for (var a in g) if (/\.*x$/.test(a)) { 3098 var n = a[0] + "\\d+"; 3099 -1 === i.indexOf(n) && i.push(n); 3100 } else -1 === t.indexOf(a[0]) && t.push(a[0]); 3101 e.tokenizer = "(" + (i.length > 0 ? i.join("|") + "|" : "") + t.join("+|") + ")+?|.", 3102 e.tokenizer = new RegExp(e.tokenizer, "g"); 3103 } 3104 return e.tokenizer; 3105 } 3106 function E(e, t, i) { 3107 if (!m) return !0; 3108 if (void 0 === e.rawday || !isFinite(e.rawday) && new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day || "29" == e.day && (!isFinite(e.rawyear) || void 0 === e.rawyear || "" === e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t; 3109 if ("29" == e.day) { 3110 var a = O(t.pos, i); 3111 if ("yyyy" === a.targetMatch[0] && t.pos - a.targetMatchIndex == 2) return t.remove = t.pos + 1, 3112 t; 3113 } else if ("02" == e.month && "30" == e.day && void 0 !== t.c) return e.day = "03", 3114 e.date.setDate(3), e.date.setMonth(1), t.insert = [ { 3115 pos: t.pos, 3116 c: "0" 3117 }, { 3118 pos: t.pos + 1, 3119 c: t.c 3120 } ], t.caret = o.seekNext.call(this, t.pos + 1), t; 3121 return !1; 3122 } 3123 function S(e, t, i, a) { 3124 var n, o, l = ""; 3125 for (P(i).lastIndex = 0; n = P(i).exec(e); ) { 3126 if (void 0 === t) if (o = x(n)) l += "(" + o[0] + ")"; else switch (n[0]) { 3127 case "[": 3128 l += "("; 3129 break; 3130 3131 case "]": 3132 l += ")?"; 3133 break; 3134 3135 default: 3136 l += (0, r.default)(n[0]); 3137 } else if (o = x(n)) if (!0 !== a && o[3]) l += o[3].call(t.date); else o[2] ? l += t["raw" + o[2]] : l += n[0]; else l += n[0]; 3138 } 3139 return l; 3140 } 3141 function _(e, t, i) { 3142 for (e = String(e), t = t || 2; e.length < t; ) e = i ? e + "0" : "0" + e; 3143 return e; 3144 } 3145 function w(e, t, i) { 3146 return "string" == typeof e ? new h(e, t, i) : e && "object" === s(e) && Object.prototype.hasOwnProperty.call(e, "date") ? e : void 0; 3147 } 3148 function M(e, t) { 3149 return S(t.inputFormat, { 3150 date: e 3151 }, t); 3152 } 3153 function O(e, t) { 3154 var i, a, n = 0, r = 0; 3155 for (P(t).lastIndex = 0; a = P(t).exec(t.inputFormat); ) { 3156 var o = new RegExp("\\d+$").exec(a[0]); 3157 if ((n += r = o ? parseInt(o[0]) : a[0].length) >= e + 1) { 3158 i = a, a = P(t).exec(t.inputFormat); 3159 break; 3160 } 3161 } 3162 return { 3163 targetMatchIndex: n - r, 3164 nextMatch: a, 3165 targetMatch: i 3166 }; 3167 } 3168 a.default.extendAliases({ 3169 datetime: { 3170 mask: function(e) { 3171 return e.numericInput = !1, g.S = e.i18n.ordinalSuffix.join("|"), e.inputFormat = k[e.inputFormat] || e.inputFormat, 3172 e.displayFormat = k[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = k[e.outputFormat] || e.outputFormat || e.inputFormat, 3173 e.placeholder = "" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\]]/, ""), 3174 e.regex = S(e.inputFormat, void 0, e), e.min = w(e.min, e.inputFormat, e), e.max = w(e.max, e.inputFormat, e), 3175 null; 3176 }, 3177 placeholder: "", 3178 inputFormat: "isoDateTime", 3179 displayFormat: null, 3180 outputFormat: null, 3181 min: null, 3182 max: null, 3183 skipOptionalPartCharacter: "", 3184 i18n: { 3185 dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], 3186 monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], 3187 ordinalSuffix: [ "st", "nd", "rd", "th" ] 3188 }, 3189 preValidation: function(e, t, i, a, n, r, o, l) { 3190 if (l) return !0; 3191 if (isNaN(i) && e[t] !== i) { 3192 var s = O(t, n); 3193 if (s.nextMatch && s.nextMatch[0] === i && s.targetMatch[0].length > 1) { 3194 var u = g[s.targetMatch[0]][0]; 3195 if (new RegExp(u).test("0" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = "0", 3196 { 3197 fuzzy: !0, 3198 buffer: e, 3199 refreshFromBuffer: { 3200 start: t - 1, 3201 end: t + 1 3202 }, 3203 pos: t + 1 3204 }; 3205 } 3206 } 3207 return !0; 3208 }, 3209 postValidation: function(e, t, i, a, n, r, o, s) { 3210 var u, c; 3211 if (o) return !0; 3212 if (!1 === a && (((u = O(t + 1, n)).targetMatch && u.targetMatchIndex === t && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]] || (u = O(t + 2, n)).targetMatch && u.targetMatchIndex === t + 1 && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]]) && (c = g[u.targetMatch[0]][0]), 3213 void 0 !== c && (void 0 !== r.validPositions[t + 1] && new RegExp(c).test(i + "0") ? (e[t] = i, 3214 e[t + 1] = "0", a = { 3215 pos: t + 2, 3216 caret: t 3217 }) : new RegExp(c).test("0" + i) && (e[t] = "0", e[t + 1] = i, a = { 3218 pos: t + 2 3219 })), !1 === a)) return a; 3220 if (a.fuzzy && (e = a.buffer, t = a.pos), (u = O(t, n)).targetMatch && u.targetMatch[0] && void 0 !== g[u.targetMatch[0]]) { 3221 var f = g[u.targetMatch[0]]; 3222 c = f[0]; 3223 var d = e.slice(u.targetMatchIndex, u.targetMatchIndex + u.targetMatch[0].length); 3224 if (!1 === new RegExp(c).test(d.join("")) && 2 === u.targetMatch[0].length && r.validPositions[u.targetMatchIndex] && r.validPositions[u.targetMatchIndex + 1] && (r.validPositions[u.targetMatchIndex + 1].input = "0"), 3225 "year" == f[2]) for (var p = l.getMaskTemplate.call(this, !1, 1, void 0, !0), h = t + 1; h < e.length; h++) e[h] = p[h], 3226 delete r.validPositions[h]; 3227 } 3228 var m = a, k = w(e.join(""), n.inputFormat, n); 3229 return m && k.date.getTime() == k.date.getTime() && (n.prefillYear && (m = function(e, t, i) { 3230 if (e.year !== e.rawyear) { 3231 var a = v.toString(), n = e.rawyear.replace(/[^0-9]/g, ""), r = a.slice(0, n.length), o = a.slice(n.length); 3232 if (2 === n.length && n === r) { 3233 var l = new Date(v, e.month - 1, e.day); 3234 e.day == l.getDate() && (!i.max || i.max.date.getTime() >= l.getTime()) && (e.date.setFullYear(v), 3235 e.year = a, t.insert = [ { 3236 pos: t.pos + 1, 3237 c: o[0] 3238 }, { 3239 pos: t.pos + 2, 3240 c: o[1] 3241 } ]); 3242 } 3243 } 3244 return t; 3245 }(k, m, n)), m = function(e, t, i, a, n) { 3246 if (!t) return t; 3247 if (t && i.min && i.min.date.getTime() == i.min.date.getTime()) { 3248 var r; 3249 for (e.reset(), P(i).lastIndex = 0; r = P(i).exec(i.inputFormat); ) { 3250 var o; 3251 if ((o = x(r)) && o[3]) { 3252 for (var l = o[1], s = e[o[2]], u = i.min[o[2]], c = i.max ? i.max[o[2]] : u, f = [], d = !1, p = 0; p < u.length; p++) void 0 !== a.validPositions[p + r.index] || d ? (f[p] = s[p], 3253 d = d || s[p] > u[p]) : (f[p] = u[p], "year" === o[2] && s.length - 1 == p && u != c && (f = (parseInt(f.join("")) + 1).toString().split("")), 3254 "ampm" === o[2] && u != c && i.min.date.getTime() > e.date.getTime() && (f[p] = c[p])); 3255 l.call(e._date, f.join("")); 3256 } 3257 } 3258 t = i.min.date.getTime() <= e.date.getTime(), e.reInit(); 3259 } 3260 return t && i.max && i.max.date.getTime() == i.max.date.getTime() && (t = i.max.date.getTime() >= e.date.getTime()), 3261 t; 3262 }(k, m = E.call(this, k, m, n), n, r)), void 0 !== t && m && a.pos !== t ? { 3263 buffer: S(n.inputFormat, k, n).split(""), 3264 refreshFromBuffer: { 3265 start: t, 3266 end: a.pos 3267 }, 3268 pos: a.caret || a.pos 3269 } : m; 3270 }, 3271 onKeyDown: function(e, t, i, a) { 3272 e.ctrlKey && e.keyCode === n.default.RIGHT && (this.inputmask._valueSet(M(new Date, a)), 3273 p(this).trigger("setvalue")); 3274 }, 3275 onUnMask: function(e, t, i) { 3276 return t ? S(i.outputFormat, w(e, i.inputFormat, i), i, !0) : t; 3277 }, 3278 casing: function(e, t, i, a) { 3279 return 0 == t.nativeDef.indexOf("[ap]") ? e.toLowerCase() : 0 == t.nativeDef.indexOf("[AP]") ? e.toUpperCase() : e; 3280 }, 3281 onBeforeMask: function(e, t) { 3282 return "[object Date]" === Object.prototype.toString.call(e) && (e = M(e, t)), e; 3283 }, 3284 insertMode: !1, 3285 shiftPositions: !1, 3286 keepStatic: !1, 3287 inputmode: "numeric", 3288 prefillYear: !0 3289 } 3290 }); 3291 }, 3292 3851: function(e, t, i) { 3293 var a, n = (a = i(2394)) && a.__esModule ? a : { 3294 default: a 3295 }, r = i(8711), o = i(4713); 3296 n.default.extendDefinitions({ 3297 A: { 3298 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 3299 casing: "upper" 3300 }, 3301 "&": { 3302 validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 3303 casing: "upper" 3304 }, 3305 "#": { 3306 validator: "[0-9A-Fa-f]", 3307 casing: "upper" 3308 } 3309 }); 3310 var l = new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]"); 3311 function s(e, t, i, a, n) { 3312 return i - 1 > -1 && "." !== t.buffer[i - 1] ? (e = t.buffer[i - 1] + e, e = i - 2 > -1 && "." !== t.buffer[i - 2] ? t.buffer[i - 2] + e : "0" + e) : e = "00" + e, 3313 l.test(e); 3314 } 3315 n.default.extendAliases({ 3316 cssunit: { 3317 regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)" 3318 }, 3319 url: { 3320 regex: "(https?|ftp)://.*", 3321 autoUnmask: !1, 3322 keepStatic: !1, 3323 tabThrough: !0 3324 }, 3325 ip: { 3326 mask: "i{1,3}.j{1,3}.k{1,3}.l{1,3}", 3327 definitions: { 3328 i: { 3329 validator: s 3330 }, 3331 j: { 3332 validator: s 3333 }, 3334 k: { 3335 validator: s 3336 }, 3337 l: { 3338 validator: s 3339 } 3340 }, 3341 onUnMask: function(e, t, i) { 3342 return e; 3343 }, 3344 inputmode: "decimal", 3345 substitutes: { 3346 ",": "." 3347 } 3348 }, 3349 email: { 3350 mask: function(e) { 3351 var t = "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]", i = t; 3352 if (e.separator) for (var a = 0; a < e.quantifier; a++) i += "[".concat(e.separator).concat(t, "]"); 3353 return i; 3354 }, 3355 greedy: !1, 3356 casing: "lower", 3357 separator: null, 3358 quantifier: 5, 3359 skipOptionalPartCharacter: "", 3360 onBeforePaste: function(e, t) { 3361 return (e = e.toLowerCase()).replace("mailto:", ""); 3362 }, 3363 definitions: { 3364 "*": { 3365 validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]" 3366 }, 3367 "-": { 3368 validator: "[0-9A-Za-z-]" 3369 } 3370 }, 3371 onUnMask: function(e, t, i) { 3372 return e; 3373 }, 3374 inputmode: "email" 3375 }, 3376 mac: { 3377 mask: "##:##:##:##:##:##" 3378 }, 3379 vin: { 3380 mask: "V{13}9{4}", 3381 definitions: { 3382 V: { 3383 validator: "[A-HJ-NPR-Za-hj-npr-z\\d]", 3384 casing: "upper" 3385 } 3386 }, 3387 clearIncomplete: !0, 3388 autoUnmask: !0 3389 }, 3390 ssn: { 3391 mask: "999-99-9999", 3392 postValidation: function(e, t, i, a, n, l, s) { 3393 var u = o.getMaskTemplate.call(this, !0, r.getLastValidPosition.call(this), !0, !0); 3394 return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(u.join("")); 3395 } 3396 } 3397 }); 3398 }, 3399 207: function(e, t, i) { 3400 var a = l(i(2394)), n = l(i(5581)), r = l(i(7184)), o = i(8711); 3401 function l(e) { 3402 return e && e.__esModule ? e : { 3403 default: e 3404 }; 3405 } 3406 var s = a.default.dependencyLib; 3407 function u(e, t) { 3408 for (var i = "", n = 0; n < e.length; n++) a.default.prototype.definitions[e.charAt(n)] || t.definitions[e.charAt(n)] || t.optionalmarker[0] === e.charAt(n) || t.optionalmarker[1] === e.charAt(n) || t.quantifiermarker[0] === e.charAt(n) || t.quantifiermarker[1] === e.charAt(n) || t.groupmarker[0] === e.charAt(n) || t.groupmarker[1] === e.charAt(n) || t.alternatormarker === e.charAt(n) ? i += "\\" + e.charAt(n) : i += e.charAt(n); 3409 return i; 3410 } 3411 function c(e, t, i, a) { 3412 if (e.length > 0 && t > 0 && (!i.digitsOptional || a)) { 3413 var n = e.indexOf(i.radixPoint), r = !1; 3414 i.negationSymbol.back === e[e.length - 1] && (r = !0, e.length--), -1 === n && (e.push(i.radixPoint), 3415 n = e.length - 1); 3416 for (var o = 1; o <= t; o++) isFinite(e[n + o]) || (e[n + o] = "0"); 3417 } 3418 return r && e.push(i.negationSymbol.back), e; 3419 } 3420 function f(e, t) { 3421 var i = 0; 3422 if ("+" === e) { 3423 for (i in t.validPositions) ; 3424 i = o.seekNext.call(this, parseInt(i)); 3425 } 3426 for (var a in t.tests) if ((a = parseInt(a)) >= i) for (var n = 0, r = t.tests[a].length; n < r; n++) if ((void 0 === t.validPositions[a] || "-" === e) && t.tests[a][n].match.def === e) return a + (void 0 !== t.validPositions[a] && "-" !== e ? 1 : 0); 3427 return i; 3428 } 3429 function d(e, t) { 3430 var i = -1; 3431 for (var a in t.validPositions) { 3432 var n = t.validPositions[a]; 3433 if (n && n.match.def === e) { 3434 i = parseInt(a); 3435 break; 3436 } 3437 } 3438 return i; 3439 } 3440 function p(e, t, i, a, n) { 3441 var r = t.buffer ? t.buffer.indexOf(n.radixPoint) : -1, o = (-1 !== r || a && n.jitMasking) && new RegExp(n.definitions[9].validator).test(e); 3442 return n._radixDance && -1 !== r && o && null == t.validPositions[r] ? { 3443 insert: { 3444 pos: r === i ? r + 1 : r, 3445 c: n.radixPoint 3446 }, 3447 pos: i 3448 } : o; 3449 } 3450 a.default.extendAliases({ 3451 numeric: { 3452 mask: function(e) { 3453 e.repeat = 0, e.groupSeparator === e.radixPoint && e.digits && "0" !== e.digits && ("." === e.radixPoint ? e.groupSeparator = "," : "," === e.radixPoint ? e.groupSeparator = "." : e.groupSeparator = ""), 3454 " " === e.groupSeparator && (e.skipOptionalPartCharacter = void 0), e.placeholder.length > 1 && (e.placeholder = e.placeholder.charAt(0)), 3455 "radixFocus" === e.positionCaretOnClick && "" === e.placeholder && (e.positionCaretOnClick = "lvp"); 3456 var t = "0", i = e.radixPoint; 3457 !0 === e.numericInput && void 0 === e.__financeInput ? (t = "1", e.positionCaretOnClick = "radixFocus" === e.positionCaretOnClick ? "lvp" : e.positionCaretOnClick, 3458 e.digitsOptional = !1, isNaN(e.digits) && (e.digits = 2), e._radixDance = !1, i = "," === e.radixPoint ? "?" : "!", 3459 "" !== e.radixPoint && void 0 === e.definitions[i] && (e.definitions[i] = {}, e.definitions[i].validator = "[" + e.radixPoint + "]", 3460 e.definitions[i].placeholder = e.radixPoint, e.definitions[i].static = !0, e.definitions[i].generated = !0)) : (e.__financeInput = !1, 3461 e.numericInput = !0); 3462 var a, n = "[+]"; 3463 if (n += u(e.prefix, e), "" !== e.groupSeparator ? (void 0 === e.definitions[e.groupSeparator] && (e.definitions[e.groupSeparator] = {}, 3464 e.definitions[e.groupSeparator].validator = "[" + e.groupSeparator + "]", e.definitions[e.groupSeparator].placeholder = e.groupSeparator, 3465 e.definitions[e.groupSeparator].static = !0, e.definitions[e.groupSeparator].generated = !0), 3466 n += e._mask(e)) : n += "9{+}", void 0 !== e.digits && 0 !== e.digits) { 3467 var o = e.digits.toString().split(","); 3468 isFinite(o[0]) && o[1] && isFinite(o[1]) ? n += i + t + "{" + e.digits + "}" : (isNaN(e.digits) || parseInt(e.digits) > 0) && (e.digitsOptional || e.jitMasking ? (a = n + i + t + "{0," + e.digits + "}", 3469 e.keepStatic = !0) : n += i + t + "{" + e.digits + "}"); 3470 } else e.inputmode = "numeric"; 3471 return n += u(e.suffix, e), n += "[-]", a && (n = [ a + u(e.suffix, e) + "[-]", n ]), 3472 e.greedy = !1, function(e) { 3473 void 0 === e.parseMinMaxOptions && (null !== e.min && (e.min = e.min.toString().replace(new RegExp((0, 3474 r.default)(e.groupSeparator), "g"), ""), "," === e.radixPoint && (e.min = e.min.replace(e.radixPoint, ".")), 3475 e.min = isFinite(e.min) ? parseFloat(e.min) : NaN, isNaN(e.min) && (e.min = Number.MIN_VALUE)), 3476 null !== e.max && (e.max = e.max.toString().replace(new RegExp((0, r.default)(e.groupSeparator), "g"), ""), 3477 "," === e.radixPoint && (e.max = e.max.replace(e.radixPoint, ".")), e.max = isFinite(e.max) ? parseFloat(e.max) : NaN, 3478 isNaN(e.max) && (e.max = Number.MAX_VALUE)), e.parseMinMaxOptions = "done"); 3479 }(e), "" !== e.radixPoint && (e.substitutes["." == e.radixPoint ? "," : "."] = e.radixPoint), 3480 n; 3481 }, 3482 _mask: function(e) { 3483 return "(" + e.groupSeparator + "999){+|1}"; 3484 }, 3485 digits: "*", 3486 digitsOptional: !0, 3487 enforceDigitsOnBlur: !1, 3488 radixPoint: ".", 3489 positionCaretOnClick: "radixFocus", 3490 _radixDance: !0, 3491 groupSeparator: "", 3492 allowMinus: !0, 3493 negationSymbol: { 3494 front: "-", 3495 back: "" 3496 }, 3497 prefix: "", 3498 suffix: "", 3499 min: null, 3500 max: null, 3501 SetMaxOnOverflow: !1, 3502 step: 1, 3503 inputType: "text", 3504 unmaskAsNumber: !1, 3505 roundingFN: Math.round, 3506 inputmode: "decimal", 3507 shortcuts: { 3508 k: "1000", 3509 m: "1000000" 3510 }, 3511 placeholder: "0", 3512 greedy: !1, 3513 rightAlign: !0, 3514 insertMode: !0, 3515 autoUnmask: !1, 3516 skipOptionalPartCharacter: "", 3517 usePrototypeDefinitions: !1, 3518 stripLeadingZeroes: !0, 3519 definitions: { 3520 0: { 3521 validator: p 3522 }, 3523 1: { 3524 validator: p, 3525 definitionSymbol: "9" 3526 }, 3527 9: { 3528 validator: "[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]", 3529 definitionSymbol: "*" 3530 }, 3531 "+": { 3532 validator: function(e, t, i, a, n) { 3533 return n.allowMinus && ("-" === e || e === n.negationSymbol.front); 3534 } 3535 }, 3536 "-": { 3537 validator: function(e, t, i, a, n) { 3538 return n.allowMinus && e === n.negationSymbol.back; 3539 } 3540 } 3541 }, 3542 preValidation: function(e, t, i, a, n, r, o, l) { 3543 if (!1 !== n.__financeInput && i === n.radixPoint) return !1; 3544 var s = e.indexOf(n.radixPoint), u = t; 3545 if (t = function(e, t, i, a, n) { 3546 return n._radixDance && n.numericInput && t !== n.negationSymbol.back && e <= i && (i > 0 || t == n.radixPoint) && (void 0 === a.validPositions[e - 1] || a.validPositions[e - 1].input !== n.negationSymbol.back) && (e -= 1), 3547 e; 3548 }(t, i, s, r, n), "-" === i || i === n.negationSymbol.front) { 3549 if (!0 !== n.allowMinus) return !1; 3550 var c = !1, p = d("+", r), h = d("-", r); 3551 return -1 !== p && (c = [ p, h ]), !1 !== c ? { 3552 remove: c, 3553 caret: u - n.negationSymbol.back.length 3554 } : { 3555 insert: [ { 3556 pos: f.call(this, "+", r), 3557 c: n.negationSymbol.front, 3558 fromIsValid: !0 3559 }, { 3560 pos: f.call(this, "-", r), 3561 c: n.negationSymbol.back, 3562 fromIsValid: void 0 3563 } ], 3564 caret: u + n.negationSymbol.back.length 3565 }; 3566 } 3567 if (i === n.groupSeparator) return { 3568 caret: u 3569 }; 3570 if (l) return !0; 3571 if (-1 !== s && !0 === n._radixDance && !1 === a && i === n.radixPoint && void 0 !== n.digits && (isNaN(n.digits) || parseInt(n.digits) > 0) && s !== t) return { 3572 caret: n._radixDance && t === s - 1 ? s + 1 : s 3573 }; 3574 if (!1 === n.__financeInput) if (a) { 3575 if (n.digitsOptional) return { 3576 rewritePosition: o.end 3577 }; 3578 if (!n.digitsOptional) { 3579 if (o.begin > s && o.end <= s) return i === n.radixPoint ? { 3580 insert: { 3581 pos: s + 1, 3582 c: "0", 3583 fromIsValid: !0 3584 }, 3585 rewritePosition: s 3586 } : { 3587 rewritePosition: s + 1 3588 }; 3589 if (o.begin < s) return { 3590 rewritePosition: o.begin - 1 3591 }; 3592 } 3593 } else if (!n.showMaskOnHover && !n.showMaskOnFocus && !n.digitsOptional && n.digits > 0 && "" === this.__valueGet.call(this.el)) return { 3594 rewritePosition: s 3595 }; 3596 return { 3597 rewritePosition: t 3598 }; 3599 }, 3600 postValidation: function(e, t, i, a, n, r, o) { 3601 if (!1 === a) return a; 3602 if (o) return !0; 3603 if (null !== n.min || null !== n.max) { 3604 var l = n.onUnMask(e.slice().reverse().join(""), void 0, s.extend({}, n, { 3605 unmaskAsNumber: !0 3606 })); 3607 if (null !== n.min && l < n.min && (l.toString().length > n.min.toString().length || l < 0)) return !1; 3608 if (null !== n.max && l > n.max) return !!n.SetMaxOnOverflow && { 3609 refreshFromBuffer: !0, 3610 buffer: c(n.max.toString().replace(".", n.radixPoint).split(""), n.digits, n).reverse() 3611 }; 3612 } 3613 return a; 3614 }, 3615 onUnMask: function(e, t, i) { 3616 if ("" === t && !0 === i.nullable) return t; 3617 var a = e.replace(i.prefix, ""); 3618 return a = (a = a.replace(i.suffix, "")).replace(new RegExp((0, r.default)(i.groupSeparator), "g"), ""), 3619 "" !== i.placeholder.charAt(0) && (a = a.replace(new RegExp(i.placeholder.charAt(0), "g"), "0")), 3620 i.unmaskAsNumber ? ("" !== i.radixPoint && -1 !== a.indexOf(i.radixPoint) && (a = a.replace(r.default.call(this, i.radixPoint), ".")), 3621 a = (a = a.replace(new RegExp("^" + (0, r.default)(i.negationSymbol.front)), "-")).replace(new RegExp((0, 3622 r.default)(i.negationSymbol.back) + "$"), ""), Number(a)) : a; 3623 }, 3624 isComplete: function(e, t) { 3625 var i = (t.numericInput ? e.slice().reverse() : e).join(""); 3626 return i = (i = (i = (i = (i = i.replace(new RegExp("^" + (0, r.default)(t.negationSymbol.front)), "-")).replace(new RegExp((0, 3627 r.default)(t.negationSymbol.back) + "$"), "")).replace(t.prefix, "")).replace(t.suffix, "")).replace(new RegExp((0, 3628 r.default)(t.groupSeparator) + "([0-9]{3})", "g"), "$1"), "," === t.radixPoint && (i = i.replace((0, 3629 r.default)(t.radixPoint), ".")), isFinite(i); 3630 }, 3631 onBeforeMask: function(e, t) { 3632 var i = t.radixPoint || ","; 3633 isFinite(t.digits) && (t.digits = parseInt(t.digits)), "number" != typeof e && "number" !== t.inputType || "" === i || (e = e.toString().replace(".", i)); 3634 var a = "-" === e.charAt(0) || e.charAt(0) === t.negationSymbol.front, n = e.split(i), o = n[0].replace(/[^\-0-9]/g, ""), l = n.length > 1 ? n[1].replace(/[^0-9]/g, "") : "", s = n.length > 1; 3635 e = o + ("" !== l ? i + l : l); 3636 var u = 0; 3637 if ("" !== i && (u = t.digitsOptional ? t.digits < l.length ? t.digits : l.length : t.digits, 3638 "" !== l || !t.digitsOptional)) { 3639 var f = Math.pow(10, u || 1); 3640 e = e.replace((0, r.default)(i), "."), isNaN(parseFloat(e)) || (e = (t.roundingFN(parseFloat(e) * f) / f).toFixed(u)), 3641 e = e.toString().replace(".", i); 3642 } 3643 if (0 === t.digits && -1 !== e.indexOf(i) && (e = e.substring(0, e.indexOf(i))), 3644 null !== t.min || null !== t.max) { 3645 var d = e.toString().replace(i, "."); 3646 null !== t.min && d < t.min ? e = t.min.toString().replace(".", i) : null !== t.max && d > t.max && (e = t.max.toString().replace(".", i)); 3647 } 3648 return a && "-" !== e.charAt(0) && (e = "-" + e), c(e.toString().split(""), u, t, s).join(""); 3649 }, 3650 onBeforeWrite: function(e, t, i, a) { 3651 function n(e, t) { 3652 if (!1 !== a.__financeInput || t) { 3653 var i = e.indexOf(a.radixPoint); 3654 -1 !== i && e.splice(i, 1); 3655 } 3656 if ("" !== a.groupSeparator) for (;-1 !== (i = e.indexOf(a.groupSeparator)); ) e.splice(i, 1); 3657 return e; 3658 } 3659 var o, l; 3660 if (a.stripLeadingZeroes && (l = function(e, t) { 3661 var i = new RegExp("(^" + ("" !== t.negationSymbol.front ? (0, r.default)(t.negationSymbol.front) + "?" : "") + (0, 3662 r.default)(t.prefix) + ")(.*)(" + (0, r.default)(t.suffix) + ("" != t.negationSymbol.back ? (0, 3663 r.default)(t.negationSymbol.back) + "?" : "") + "$)").exec(e.slice().reverse().join("")), a = i ? i[2] : "", n = !1; 3664 return a && (a = a.split(t.radixPoint.charAt(0))[0], n = new RegExp("^[0" + t.groupSeparator + "]*").exec(a)), 3665 !(!n || !(n[0].length > 1 || n[0].length > 0 && n[0].length < a.length)) && n; 3666 }(t, a))) for (var u = t.join("").lastIndexOf(l[0].split("").reverse().join("")) - (l[0] == l.input ? 0 : 1), f = l[0] == l.input ? 1 : 0, d = l[0].length - f; d > 0; d--) delete this.maskset.validPositions[u + d], 3667 delete t[u + d]; 3668 if (e) switch (e.type) { 3669 case "blur": 3670 case "checkval": 3671 if (null !== a.min) { 3672 var p = a.onUnMask(t.slice().reverse().join(""), void 0, s.extend({}, a, { 3673 unmaskAsNumber: !0 3674 })); 3675 if (null !== a.min && p < a.min) return { 3676 refreshFromBuffer: !0, 3677 buffer: c(a.min.toString().replace(".", a.radixPoint).split(""), a.digits, a).reverse() 3678 }; 3679 } 3680 if (t[t.length - 1] === a.negationSymbol.front) { 3681 var h = new RegExp("(^" + ("" != a.negationSymbol.front ? (0, r.default)(a.negationSymbol.front) + "?" : "") + (0, 3682 r.default)(a.prefix) + ")(.*)(" + (0, r.default)(a.suffix) + ("" != a.negationSymbol.back ? (0, 3683 r.default)(a.negationSymbol.back) + "?" : "") + "$)").exec(n(t.slice(), !0).reverse().join("")); 3684 0 == (h ? h[2] : "") && (o = { 3685 refreshFromBuffer: !0, 3686 buffer: [ 0 ] 3687 }); 3688 } else if ("" !== a.radixPoint) { 3689 t.indexOf(a.radixPoint) === a.suffix.length && (o && o.buffer ? o.buffer.splice(0, 1 + a.suffix.length) : (t.splice(0, 1 + a.suffix.length), 3690 o = { 3691 refreshFromBuffer: !0, 3692 buffer: n(t) 3693 })); 3694 } 3695 if (a.enforceDigitsOnBlur) { 3696 var v = (o = o || {}) && o.buffer || t.slice().reverse(); 3697 o.refreshFromBuffer = !0, o.buffer = c(v, a.digits, a, !0).reverse(); 3698 } 3699 } 3700 return o; 3701 }, 3702 onKeyDown: function(e, t, i, a) { 3703 var r, o, l = s(this), u = String.fromCharCode(e.keyCode).toLowerCase(); 3704 if ((o = a.shortcuts && a.shortcuts[u]) && o.length > 1) return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(o)), 3705 l.trigger("setvalue"), !1; 3706 if (e.ctrlKey) switch (e.keyCode) { 3707 case n.default.UP: 3708 return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(a.step)), 3709 l.trigger("setvalue"), !1; 3710 3711 case n.default.DOWN: 3712 return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(a.step)), 3713 l.trigger("setvalue"), !1; 3714 } 3715 if (!e.shiftKey && (e.keyCode === n.default.DELETE || e.keyCode === n.default.BACKSPACE || e.keyCode === n.default.BACKSPACE_SAFARI) && i.begin !== t.length) { 3716 if (t[e.keyCode === n.default.DELETE ? i.begin - 1 : i.end] === a.negationSymbol.front) return r = t.slice().reverse(), 3717 "" !== a.negationSymbol.front && r.shift(), "" !== a.negationSymbol.back && r.pop(), 3718 l.trigger("setvalue", [ r.join(""), i.begin ]), !1; 3719 if (!0 === a._radixDance) { 3720 var f = t.indexOf(a.radixPoint); 3721 if (a.digitsOptional) { 3722 if (0 === f) return (r = t.slice().reverse()).pop(), l.trigger("setvalue", [ r.join(""), i.begin >= r.length ? r.length : i.begin ]), 3723 !1; 3724 } else if (-1 !== f && (i.begin < f || i.end < f || e.keyCode === n.default.DELETE && i.begin === f)) return i.begin !== i.end || e.keyCode !== n.default.BACKSPACE && e.keyCode !== n.default.BACKSPACE_SAFARI || i.begin++, 3725 (r = t.slice().reverse()).splice(r.length - i.begin, i.begin - i.end + 1), r = c(r, a.digits, a).join(""), 3726 l.trigger("setvalue", [ r, i.begin >= r.length ? f + 1 : i.begin ]), !1; 3727 } 3728 } 3729 } 3730 }, 3731 currency: { 3732 prefix: "", 3733 groupSeparator: ",", 3734 alias: "numeric", 3735 digits: 2, 3736 digitsOptional: !1 3737 }, 3738 decimal: { 3739 alias: "numeric" 3740 }, 3741 integer: { 3742 alias: "numeric", 3743 inputmode: "numeric", 3744 digits: 0 3745 }, 3746 percentage: { 3747 alias: "numeric", 3748 min: 0, 3749 max: 100, 3750 suffix: " %", 3751 digits: 0, 3752 allowMinus: !1 3753 }, 3754 indianns: { 3755 alias: "numeric", 3756 _mask: function(e) { 3757 return "(" + e.groupSeparator + "99){*|1}(" + e.groupSeparator + "999){1|1}"; 3758 }, 3759 groupSeparator: ",", 3760 radixPoint: ".", 3761 placeholder: "0", 3762 digits: 2, 3763 digitsOptional: !1 3764 } 3765 }); 3766 }, 3767 9380: function(e, t, i) { 3768 var a; 3769 Object.defineProperty(t, "__esModule", { 3770 value: !0 3771 }), t.default = void 0; 3772 var n = ((a = i(8741)) && a.__esModule ? a : { 3773 default: a 3774 }).default ? window : {}; 3775 t.default = n; 3776 }, 3777 7760: function(e, t, i) { 3778 Object.defineProperty(t, "__esModule", { 3779 value: !0 3780 }), t.HandleNativePlaceholder = function(e, t) { 3781 var i = e ? e.inputmask : this; 3782 if (s.ie) { 3783 if (e.inputmask._valueGet() !== t && (e.placeholder !== t || "" === e.placeholder)) { 3784 var a = o.getBuffer.call(i).slice(), n = e.inputmask._valueGet(); 3785 if (n !== t) { 3786 var r = o.getLastValidPosition.call(i); 3787 -1 === r && n === o.getBufferTemplate.call(i).join("") ? a = [] : -1 !== r && f.call(i, a), 3788 p(e, a); 3789 } 3790 } 3791 } else e.placeholder !== t && (e.placeholder = t, "" === e.placeholder && e.removeAttribute("placeholder")); 3792 }, t.applyInputValue = c, t.checkVal = d, t.clearOptionalTail = f, t.unmaskedvalue = function(e) { 3793 var t = e ? e.inputmask : this, i = t.opts, a = t.maskset; 3794 if (e) { 3795 if (void 0 === e.inputmask) return e.value; 3796 e.inputmask && e.inputmask.refreshValue && c(e, e.inputmask._valueGet(!0)); 3797 } 3798 var n = [], r = a.validPositions; 3799 for (var l in r) r[l] && r[l].match && (1 != r[l].match.static || Array.isArray(a.metadata) && !0 !== r[l].generatedInput) && n.push(r[l].input); 3800 var s = 0 === n.length ? "" : (t.isRTL ? n.reverse() : n).join(""); 3801 if ("function" == typeof i.onUnMask) { 3802 var u = (t.isRTL ? o.getBuffer.call(t).slice().reverse() : o.getBuffer.call(t)).join(""); 3803 s = i.onUnMask.call(t, u, s, i); 3804 } 3805 return s; 3806 }, t.writeBuffer = p; 3807 var a, n = (a = i(5581)) && a.__esModule ? a : { 3808 default: a 3809 }, r = i(4713), o = i(8711), l = i(7215), s = i(9845), u = i(6030); 3810 function c(e, t) { 3811 var i = e ? e.inputmask : this, a = i.opts; 3812 e.inputmask.refreshValue = !1, "function" == typeof a.onBeforeMask && (t = a.onBeforeMask.call(i, t, a) || t), 3813 d(e, !0, !1, t = t.toString().split("")), i.undoValue = i._valueGet(!0), (a.clearMaskOnLostFocus || a.clearIncomplete) && e.inputmask._valueGet() === o.getBufferTemplate.call(i).join("") && -1 === o.getLastValidPosition.call(i) && e.inputmask._valueSet(""); 3814 } 3815 function f(e) { 3816 e.length = 0; 3817 for (var t, i = r.getMaskTemplate.call(this, !0, 0, !0, void 0, !0); void 0 !== (t = i.shift()); ) e.push(t); 3818 return e; 3819 } 3820 function d(e, t, i, a, n) { 3821 var s = e ? e.inputmask : this, c = s.maskset, f = s.opts, d = s.dependencyLib, h = a.slice(), v = "", m = -1, g = void 0, k = f.skipOptionalPartCharacter; 3822 f.skipOptionalPartCharacter = "", o.resetMaskSet.call(s), c.tests = {}, m = f.radixPoint ? o.determineNewCaretPosition.call(s, { 3823 begin: 0, 3824 end: 0 3825 }, !1, !1 === f.__financeInput ? "radixFocus" : void 0).begin : 0, c.p = m, s.caretPos = { 3826 begin: m 3827 }; 3828 var y = [], b = s.caretPos; 3829 if (h.forEach((function(e, t) { 3830 if (void 0 !== e) { 3831 var a = new d.Event("_checkval"); 3832 a.keyCode = e.toString().charCodeAt(0), v += e; 3833 var n = o.getLastValidPosition.call(s, void 0, !0); 3834 !function(e, t) { 3835 for (var i = r.getMaskTemplate.call(s, !0, 0).slice(e, o.seekNext.call(s, e, !1, !1)).join("").replace(/'/g, ""), a = i.indexOf(t); a > 0 && " " === i[a - 1]; ) a--; 3836 var n = 0 === a && !o.isMask.call(s, e) && (r.getTest.call(s, e).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(s, e).match.static && r.getTest.call(s, e).match.nativeDef === "'" + t.charAt(0) || " " === r.getTest.call(s, e).match.nativeDef && (r.getTest.call(s, e + 1).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(s, e + 1).match.static && r.getTest.call(s, e + 1).match.nativeDef === "'" + t.charAt(0))); 3837 if (!n && a > 0 && !o.isMask.call(s, e, !1, !0)) { 3838 var l = o.seekNext.call(s, e); 3839 s.caretPos.begin < l && (s.caretPos = { 3840 begin: l 3841 }); 3842 } 3843 return n; 3844 }(m, v) ? (g = u.EventHandlers.keypressEvent.call(s, a, !0, !1, i, s.caretPos.begin)) && (m = s.caretPos.begin + 1, 3845 v = "") : g = u.EventHandlers.keypressEvent.call(s, a, !0, !1, i, n + 1), g ? (void 0 !== g.pos && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static && void 0 === c.validPositions[g.pos].alternation && (y.push(g.pos), 3846 s.isRTL || (g.forwardPosition = g.pos + 1)), p.call(s, void 0, o.getBuffer.call(s), g.forwardPosition, a, !1), 3847 s.caretPos = { 3848 begin: g.forwardPosition, 3849 end: g.forwardPosition 3850 }, b = s.caretPos) : void 0 === c.validPositions[t] && h[t] === r.getPlaceholder.call(s, t) && o.isMask.call(s, t, !0) ? s.caretPos.begin++ : s.caretPos = b; 3851 } 3852 })), y.length > 0) { 3853 var x, P, E = o.seekNext.call(s, -1, void 0, !1); 3854 if (!l.isComplete.call(s, o.getBuffer.call(s)) && y.length <= E || l.isComplete.call(s, o.getBuffer.call(s)) && y.length > 0 && y.length !== E && 0 === y[0]) for (var S = E; void 0 !== (x = y.shift()); ) { 3855 var _ = new d.Event("_checkval"); 3856 if ((P = c.validPositions[x]).generatedInput = !0, _.keyCode = P.input.charCodeAt(0), 3857 (g = u.EventHandlers.keypressEvent.call(s, _, !0, !1, i, S)) && void 0 !== g.pos && g.pos !== x && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static) y.push(g.pos); else if (!g) break; 3858 S++; 3859 } 3860 } 3861 t && p.call(s, e, o.getBuffer.call(s), g ? g.forwardPosition : s.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type && s.undoValue !== o.getBuffer.call(s).join("") || "paste" === n.type)), 3862 f.skipOptionalPartCharacter = k; 3863 } 3864 function p(e, t, i, a, r) { 3865 var s = e ? e.inputmask : this, u = s.opts, c = s.dependencyLib; 3866 if (a && "function" == typeof u.onBeforeWrite) { 3867 var f = u.onBeforeWrite.call(s, a, t, i, u); 3868 if (f) { 3869 if (f.refreshFromBuffer) { 3870 var d = f.refreshFromBuffer; 3871 l.refreshFromBuffer.call(s, !0 === d ? d : d.start, d.end, f.buffer || t), t = o.getBuffer.call(s, !0); 3872 } 3873 void 0 !== i && (i = void 0 !== f.caret ? f.caret : i); 3874 } 3875 } 3876 if (void 0 !== e && (e.inputmask._valueSet(t.join("")), void 0 === i || void 0 !== a && "blur" === a.type || o.caret.call(s, e, i, void 0, void 0, void 0 !== a && "keydown" === a.type && (a.keyCode === n.default.DELETE || a.keyCode === n.default.BACKSPACE)), 3877 !0 === r)) { 3878 var p = c(e), h = e.inputmask._valueGet(); 3879 e.inputmask.skipInputEvent = !0, p.trigger("input"), setTimeout((function() { 3880 h === o.getBufferTemplate.call(s).join("") ? p.trigger("cleared") : !0 === l.isComplete.call(s, t) && p.trigger("complete"); 3881 }), 0); 3882 } 3883 } 3884 }, 3885 2394: function(e, t, i) { 3886 Object.defineProperty(t, "__esModule", { 3887 value: !0 3888 }), t.default = void 0, i(7149), i(3194); 3889 var a = i(157), n = m(i(4963)), r = m(i(9380)), o = i(2391), l = i(4713), s = i(8711), u = i(7215), c = i(7760), f = i(9716), d = m(i(7392)), p = m(i(3976)), h = m(i(8741)); 3890 function v(e) { 3891 return v = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 3892 return typeof e; 3893 } : function(e) { 3894 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 3895 }, v(e); 3896 } 3897 function m(e) { 3898 return e && e.__esModule ? e : { 3899 default: e 3900 }; 3901 } 3902 var g = r.default.document, k = "_inputmask_opts"; 3903 function y(e, t, i) { 3904 if (h.default) { 3905 if (!(this instanceof y)) return new y(e, t, i); 3906 this.dependencyLib = n.default, this.el = void 0, this.events = {}, this.maskset = void 0, 3907 !0 !== i && ("[object Object]" === Object.prototype.toString.call(e) ? t = e : (t = t || {}, 3908 e && (t.alias = e)), this.opts = n.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions, 3909 this.userOptions = t || {}, b(this.opts.alias, t, this.opts)), this.refreshValue = !1, 3910 this.undoValue = void 0, this.$el = void 0, this.skipKeyPressEvent = !1, this.skipInputEvent = !1, 3911 this.validationEvent = !1, this.ignorable = !1, this.maxLength, this.mouseEnter = !1, 3912 this.originalPlaceholder = void 0, this.isComposing = !1; 3913 } 3914 } 3915 function b(e, t, i) { 3916 var a = y.prototype.aliases[e]; 3917 return a ? (a.alias && b(a.alias, void 0, i), n.default.extend(!0, i, a), n.default.extend(!0, i, t), 3918 !0) : (null === i.mask && (i.mask = e), !1); 3919 } 3920 y.prototype = { 3921 dataAttribute: "data-inputmask", 3922 defaults: p.default, 3923 definitions: d.default, 3924 aliases: {}, 3925 masksCache: {}, 3926 get isRTL() { 3927 return this.opts.isRTL || this.opts.numericInput; 3928 }, 3929 mask: function(e) { 3930 var t = this; 3931 return "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), 3932 (e = e.nodeName ? [ e ] : Array.isArray(e) ? e : Array.from(e)).forEach((function(e, i) { 3933 var l = n.default.extend(!0, {}, t.opts); 3934 if (function(e, t, i, a) { 3935 function o(t, n) { 3936 var o = "" === a ? t : a + "-" + t; 3937 null !== (n = void 0 !== n ? n : e.getAttribute(o)) && ("string" == typeof n && (0 === t.indexOf("on") ? n = r.default[n] : "false" === n ? n = !1 : "true" === n && (n = !0)), 3938 i[t] = n); 3939 } 3940 if (!0 === t.importDataAttributes) { 3941 var l, s, u, c, f = e.getAttribute(a); 3942 if (f && "" !== f && (f = f.replace(/'/g, '"'), s = JSON.parse("{" + f + "}")), 3943 s) for (c in u = void 0, s) if ("alias" === c.toLowerCase()) { 3944 u = s[c]; 3945 break; 3946 } 3947 for (l in o("alias", u), i.alias && b(i.alias, i, t), t) { 3948 if (s) for (c in u = void 0, s) if (c.toLowerCase() === l.toLowerCase()) { 3949 u = s[c]; 3950 break; 3951 } 3952 o(l, u); 3953 } 3954 } 3955 n.default.extend(!0, t, i), ("rtl" === e.dir || t.rightAlign) && (e.style.textAlign = "right"); 3956 ("rtl" === e.dir || t.numericInput) && (e.dir = "ltr", e.removeAttribute("dir"), 3957 t.isRTL = !0); 3958 return Object.keys(i).length; 3959 }(e, l, n.default.extend(!0, {}, t.userOptions), t.dataAttribute)) { 3960 var s = (0, o.generateMaskSet)(l, t.noMasksCache); 3961 void 0 !== s && (void 0 !== e.inputmask && (e.inputmask.opts.autoUnmask = !0, e.inputmask.remove()), 3962 e.inputmask = new y(void 0, void 0, !0), e.inputmask.opts = l, e.inputmask.noMasksCache = t.noMasksCache, 3963 e.inputmask.userOptions = n.default.extend(!0, {}, t.userOptions), e.inputmask.el = e, 3964 e.inputmask.$el = (0, n.default)(e), e.inputmask.maskset = s, n.default.data(e, k, t.userOptions), 3965 a.mask.call(e.inputmask)); 3966 } 3967 })), e && e[0] && e[0].inputmask || this; 3968 }, 3969 option: function(e, t) { 3970 return "string" == typeof e ? this.opts[e] : "object" === v(e) ? (n.default.extend(this.userOptions, e), 3971 this.el && !0 !== t && this.mask(this.el), this) : void 0; 3972 }, 3973 unmaskedvalue: function(e) { 3974 if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 3975 void 0 === this.el || void 0 !== e) { 3976 var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(""); 3977 c.checkVal.call(this, void 0, !1, !1, t), "function" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, s.getBuffer.call(this), 0, this.opts); 3978 } 3979 return c.unmaskedvalue.call(this, this.el); 3980 }, 3981 remove: function() { 3982 if (this.el) { 3983 n.default.data(this.el, k, null); 3984 var e = this.opts.autoUnmask ? (0, c.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask); 3985 e !== s.getBufferTemplate.call(this).join("") ? this._valueSet(e, this.opts.autoUnmask) : this._valueSet(""), 3986 f.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), "value") && this.__valueGet && Object.defineProperty(this.el, "value", { 3987 get: this.__valueGet, 3988 set: this.__valueSet, 3989 configurable: !0 3990 }) : g.__lookupGetter__ && this.el.__lookupGetter__("value") && this.__valueGet && (this.el.__defineGetter__("value", this.__valueGet), 3991 this.el.__defineSetter__("value", this.__valueSet)), this.el.inputmask = void 0; 3992 } 3993 return this.el; 3994 }, 3995 getemptymask: function() { 3996 return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 3997 s.getBufferTemplate.call(this).join(""); 3998 }, 3999 hasMaskedValue: function() { 4000 return !this.opts.autoUnmask; 4001 }, 4002 isComplete: function() { 4003 return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 4004 u.isComplete.call(this, s.getBuffer.call(this)); 4005 }, 4006 getmetadata: function() { 4007 if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 4008 Array.isArray(this.maskset.metadata)) { 4009 var e = l.getMaskTemplate.call(this, !0, 0, !1).join(""); 4010 return this.maskset.metadata.forEach((function(t) { 4011 return t.mask !== e || (e = t, !1); 4012 })), e; 4013 } 4014 return this.maskset.metadata; 4015 }, 4016 isValid: function(e) { 4017 if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache), 4018 e) { 4019 var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(""); 4020 c.checkVal.call(this, void 0, !0, !1, t); 4021 } else e = this.isRTL ? s.getBuffer.call(this).slice().reverse().join("") : s.getBuffer.call(this).join(""); 4022 for (var i = s.getBuffer.call(this), a = s.determineLastRequiredPosition.call(this), n = i.length - 1; n > a && !s.isMask.call(this, n); n--) ; 4023 return i.splice(a, n + 1 - a), u.isComplete.call(this, i) && e === (this.isRTL ? s.getBuffer.call(this).slice().reverse().join("") : s.getBuffer.call(this).join("")); 4024 }, 4025 format: function(e, t) { 4026 this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache); 4027 var i = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split(""); 4028 c.checkVal.call(this, void 0, !0, !1, i); 4029 var a = this.isRTL ? s.getBuffer.call(this).slice().reverse().join("") : s.getBuffer.call(this).join(""); 4030 return t ? { 4031 value: a, 4032 metadata: this.getmetadata() 4033 } : a; 4034 }, 4035 setValue: function(e) { 4036 this.el && (0, n.default)(this.el).trigger("setvalue", [ e ]); 4037 }, 4038 analyseMask: o.analyseMask 4039 }, y.extendDefaults = function(e) { 4040 n.default.extend(!0, y.prototype.defaults, e); 4041 }, y.extendDefinitions = function(e) { 4042 n.default.extend(!0, y.prototype.definitions, e); 4043 }, y.extendAliases = function(e) { 4044 n.default.extend(!0, y.prototype.aliases, e); 4045 }, y.format = function(e, t, i) { 4046 return y(t).format(e, i); 4047 }, y.unmask = function(e, t) { 4048 return y(t).unmaskedvalue(e); 4049 }, y.isValid = function(e, t) { 4050 return y(t).isValid(e); 4051 }, y.remove = function(e) { 4052 "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) { 4053 e.inputmask && e.inputmask.remove(); 4054 })); 4055 }, y.setValue = function(e, t) { 4056 "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) { 4057 e.inputmask ? e.inputmask.setValue(t) : (0, n.default)(e).trigger("setvalue", [ t ]); 4058 })); 4059 }, y.dependencyLib = n.default, r.default.Inputmask = y; 4060 var x = y; 4061 t.default = x; 4062 }, 4063 5296: function(e, t, i) { 4064 function a(e) { 4065 return a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 4066 return typeof e; 4067 } : function(e) { 4068 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 4069 }, a(e); 4070 } 4071 var n = h(i(9380)), r = h(i(2394)), o = h(i(8741)); 4072 function l(e, t) { 4073 for (var i = 0; i < t.length; i++) { 4074 var a = t[i]; 4075 a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), 4076 Object.defineProperty(e, a.key, a); 4077 } 4078 } 4079 function s(e, t) { 4080 if (t && ("object" === a(t) || "function" == typeof t)) return t; 4081 if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined"); 4082 return function(e) { 4083 if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 4084 return e; 4085 }(e); 4086 } 4087 function u(e) { 4088 var t = "function" == typeof Map ? new Map : void 0; 4089 return u = function(e) { 4090 if (null === e || (i = e, -1 === Function.toString.call(i).indexOf("[native code]"))) return e; 4091 var i; 4092 if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function"); 4093 if (void 0 !== t) { 4094 if (t.has(e)) return t.get(e); 4095 t.set(e, a); 4096 } 4097 function a() { 4098 return c(e, arguments, p(this).constructor); 4099 } 4100 return a.prototype = Object.create(e.prototype, { 4101 constructor: { 4102 value: a, 4103 enumerable: !1, 4104 writable: !0, 4105 configurable: !0 4106 } 4107 }), d(a, e); 4108 }, u(e); 4109 } 4110 function c(e, t, i) { 4111 return c = f() ? Reflect.construct : function(e, t, i) { 4112 var a = [ null ]; 4113 a.push.apply(a, t); 4114 var n = new (Function.bind.apply(e, a)); 4115 return i && d(n, i.prototype), n; 4116 }, c.apply(null, arguments); 4117 } 4118 function f() { 4119 if ("undefined" == typeof Reflect || !Reflect.construct) return !1; 4120 if (Reflect.construct.sham) return !1; 4121 if ("function" == typeof Proxy) return !0; 4122 try { 4123 return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))), 4124 !0; 4125 } catch (e) { 4126 return !1; 4127 } 4128 } 4129 function d(e, t) { 4130 return d = Object.setPrototypeOf || function(e, t) { 4131 return e.__proto__ = t, e; 4132 }, d(e, t); 4133 } 4134 function p(e) { 4135 return p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { 4136 return e.__proto__ || Object.getPrototypeOf(e); 4137 }, p(e); 4138 } 4139 function h(e) { 4140 return e && e.__esModule ? e : { 4141 default: e 4142 }; 4143 } 4144 var v = n.default.document; 4145 if (o.default && v && v.head && v.head.attachShadow && n.default.customElements && void 0 === n.default.customElements.get("input-mask")) { 4146 var m = function(e) { 4147 !function(e, t) { 4148 if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function"); 4149 Object.defineProperty(e, "prototype", { 4150 value: Object.create(t && t.prototype, { 4151 constructor: { 4152 value: e, 4153 writable: !0, 4154 configurable: !0 4155 } 4156 }), 4157 writable: !1 4158 }), t && d(e, t); 4159 }(c, e); 4160 var t, i, a, n, o, u = (t = c, i = f(), function() { 4161 var e, a = p(t); 4162 if (i) { 4163 var n = p(this).constructor; 4164 e = Reflect.construct(a, arguments, n); 4165 } else e = a.apply(this, arguments); 4166 return s(this, e); 4167 }); 4168 function c() { 4169 var e; 4170 !function(e, t) { 4171 if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function"); 4172 }(this, c); 4173 var t = (e = u.call(this)).getAttributeNames(), i = e.attachShadow({ 4174 mode: "closed" 4175 }), a = v.createElement("input"); 4176 for (var n in a.type = "text", i.appendChild(a), t) Object.prototype.hasOwnProperty.call(t, n) && a.setAttribute(t[n], e.getAttribute(t[n])); 4177 var o = new r.default; 4178 return o.dataAttribute = "", o.mask(a), a.inputmask.shadowRoot = i, e; 4179 } 4180 return a = c, n && l(a.prototype, n), o && l(a, o), Object.defineProperty(a, "prototype", { 4181 writable: !1 4182 }), a; 4183 }(u(HTMLElement)); 4184 n.default.customElements.define("input-mask", m); 4185 } 4186 }, 4187 2391: function(e, t, i) { 4188 Object.defineProperty(t, "__esModule", { 4189 value: !0 4190 }), t.analyseMask = function(e, t, i) { 4191 var a, o, l, s, u, c, f = /(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g, d = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, p = !1, h = new n.default, v = [], m = [], g = !1; 4192 function k(e, a, n) { 4193 n = void 0 !== n ? n : e.matches.length; 4194 var o = e.matches[n - 1]; 4195 if (t) 0 === a.indexOf("[") || p && /\\d|\\s|\\w/i.test(a) || "." === a ? e.matches.splice(n++, 0, { 4196 fn: new RegExp(a, i.casing ? "i" : ""), 4197 static: !1, 4198 optionality: !1, 4199 newBlockMarker: void 0 === o ? "master" : o.def !== a, 4200 casing: null, 4201 def: a, 4202 placeholder: void 0, 4203 nativeDef: a 4204 }) : (p && (a = a[a.length - 1]), a.split("").forEach((function(t, a) { 4205 o = e.matches[n - 1], e.matches.splice(n++, 0, { 4206 fn: /[a-z]/i.test(i.staticDefinitionSymbol || t) ? new RegExp("[" + (i.staticDefinitionSymbol || t) + "]", i.casing ? "i" : "") : null, 4207 static: !0, 4208 optionality: !1, 4209 newBlockMarker: void 0 === o ? "master" : o.def !== t && !0 !== o.static, 4210 casing: null, 4211 def: i.staticDefinitionSymbol || t, 4212 placeholder: void 0 !== i.staticDefinitionSymbol ? t : void 0, 4213 nativeDef: (p ? "'" : "") + t 4214 }); 4215 }))), p = !1; else { 4216 var l = i.definitions && i.definitions[a] || i.usePrototypeDefinitions && r.default.prototype.definitions[a]; 4217 l && !p ? e.matches.splice(n++, 0, { 4218 fn: l.validator ? "string" == typeof l.validator ? new RegExp(l.validator, i.casing ? "i" : "") : new function() { 4219 this.test = l.validator; 4220 } : new RegExp("."), 4221 static: l.static || !1, 4222 optionality: l.optional || !1, 4223 newBlockMarker: void 0 === o || l.optional ? "master" : o.def !== (l.definitionSymbol || a), 4224 casing: l.casing, 4225 def: l.definitionSymbol || a, 4226 placeholder: l.placeholder, 4227 nativeDef: a, 4228 generated: l.generated 4229 }) : (e.matches.splice(n++, 0, { 4230 fn: /[a-z]/i.test(i.staticDefinitionSymbol || a) ? new RegExp("[" + (i.staticDefinitionSymbol || a) + "]", i.casing ? "i" : "") : null, 4231 static: !0, 4232 optionality: !1, 4233 newBlockMarker: void 0 === o ? "master" : o.def !== a && !0 !== o.static, 4234 casing: null, 4235 def: i.staticDefinitionSymbol || a, 4236 placeholder: void 0 !== i.staticDefinitionSymbol ? a : void 0, 4237 nativeDef: (p ? "'" : "") + a 4238 }), p = !1); 4239 } 4240 } 4241 function y() { 4242 if (v.length > 0) { 4243 if (k(s = v[v.length - 1], o), s.isAlternator) { 4244 u = v.pop(); 4245 for (var e = 0; e < u.matches.length; e++) u.matches[e].isGroup && (u.matches[e].isGroup = !1); 4246 v.length > 0 ? (s = v[v.length - 1]).matches.push(u) : h.matches.push(u); 4247 } 4248 } else k(h, o); 4249 } 4250 function b(e) { 4251 var t = new n.default(!0); 4252 return t.openGroup = !1, t.matches = e, t; 4253 } 4254 function x() { 4255 if ((l = v.pop()).openGroup = !1, void 0 !== l) if (v.length > 0) { 4256 if ((s = v[v.length - 1]).matches.push(l), s.isAlternator) { 4257 for (var e = (u = v.pop()).matches[0].matches ? u.matches[0].matches.length : 1, t = 0; t < u.matches.length; t++) u.matches[t].isGroup = !1, 4258 u.matches[t].alternatorGroup = !1, null === i.keepStatic && e < (u.matches[t].matches ? u.matches[t].matches.length : 1) && (i.keepStatic = !0), 4259 e = u.matches[t].matches ? u.matches[t].matches.length : 1; 4260 v.length > 0 ? (s = v[v.length - 1]).matches.push(u) : h.matches.push(u); 4261 } 4262 } else h.matches.push(l); else y(); 4263 } 4264 function P(e) { 4265 var t = e.pop(); 4266 return t.isQuantifier && (t = b([ e.pop(), t ])), t; 4267 } 4268 t && (i.optionalmarker[0] = void 0, i.optionalmarker[1] = void 0); 4269 for (;a = t ? d.exec(e) : f.exec(e); ) { 4270 if (o = a[0], t) { 4271 switch (o.charAt(0)) { 4272 case "?": 4273 o = "{0,1}"; 4274 break; 4275 4276 case "+": 4277 case "*": 4278 o = "{" + o + "}"; 4279 break; 4280 4281 case "|": 4282 if (0 === v.length) { 4283 var E = b(h.matches); 4284 E.openGroup = !0, v.push(E), h.matches = [], g = !0; 4285 } 4286 } 4287 if ("\\d" === o) o = "[0-9]"; 4288 } 4289 if (p) y(); else switch (o.charAt(0)) { 4290 case "$": 4291 case "^": 4292 t || y(); 4293 break; 4294 4295 case i.escapeChar: 4296 p = !0, t && y(); 4297 break; 4298 4299 case i.optionalmarker[1]: 4300 case i.groupmarker[1]: 4301 x(); 4302 break; 4303 4304 case i.optionalmarker[0]: 4305 v.push(new n.default(!1, !0)); 4306 break; 4307 4308 case i.groupmarker[0]: 4309 v.push(new n.default(!0)); 4310 break; 4311 4312 case i.quantifiermarker[0]: 4313 var S = new n.default(!1, !1, !0), _ = (o = o.replace(/[{}?]/g, "")).split("|"), w = _[0].split(","), M = isNaN(w[0]) ? w[0] : parseInt(w[0]), O = 1 === w.length ? M : isNaN(w[1]) ? w[1] : parseInt(w[1]), T = isNaN(_[1]) ? _[1] : parseInt(_[1]); 4314 "*" !== M && "+" !== M || (M = "*" === O ? 0 : 1), S.quantifier = { 4315 min: M, 4316 max: O, 4317 jit: T 4318 }; 4319 var C = v.length > 0 ? v[v.length - 1].matches : h.matches; 4320 if ((a = C.pop()).isAlternator) { 4321 C.push(a), C = a.matches; 4322 var A = new n.default(!0), D = C.pop(); 4323 C.push(A), C = A.matches, a = D; 4324 } 4325 a.isGroup || (a = b([ a ])), C.push(a), C.push(S); 4326 break; 4327 4328 case i.alternatormarker: 4329 if (v.length > 0) { 4330 var j = (s = v[v.length - 1]).matches[s.matches.length - 1]; 4331 c = s.openGroup && (void 0 === j.matches || !1 === j.isGroup && !1 === j.isAlternator) ? v.pop() : P(s.matches); 4332 } else c = P(h.matches); 4333 if (c.isAlternator) v.push(c); else if (c.alternatorGroup ? (u = v.pop(), c.alternatorGroup = !1) : u = new n.default(!1, !1, !1, !0), 4334 u.matches.push(c), v.push(u), c.openGroup) { 4335 c.openGroup = !1; 4336 var B = new n.default(!0); 4337 B.alternatorGroup = !0, v.push(B); 4338 } 4339 break; 4340 4341 default: 4342 y(); 4343 } 4344 } 4345 g && x(); 4346 for (;v.length > 0; ) l = v.pop(), h.matches.push(l); 4347 h.matches.length > 0 && (!function e(a) { 4348 a && a.matches && a.matches.forEach((function(n, r) { 4349 var o = a.matches[r + 1]; 4350 (void 0 === o || void 0 === o.matches || !1 === o.isQuantifier) && n && n.isGroup && (n.isGroup = !1, 4351 t || (k(n, i.groupmarker[0], 0), !0 !== n.openGroup && k(n, i.groupmarker[1]))), 4352 e(n); 4353 })); 4354 }(h), m.push(h)); 4355 (i.numericInput || i.isRTL) && function e(t) { 4356 for (var a in t.matches = t.matches.reverse(), t.matches) if (Object.prototype.hasOwnProperty.call(t.matches, a)) { 4357 var n = parseInt(a); 4358 if (t.matches[a].isQuantifier && t.matches[n + 1] && t.matches[n + 1].isGroup) { 4359 var r = t.matches[a]; 4360 t.matches.splice(a, 1), t.matches.splice(n + 1, 0, r); 4361 } 4362 void 0 !== t.matches[a].matches ? t.matches[a] = e(t.matches[a]) : t.matches[a] = ((o = t.matches[a]) === i.optionalmarker[0] ? o = i.optionalmarker[1] : o === i.optionalmarker[1] ? o = i.optionalmarker[0] : o === i.groupmarker[0] ? o = i.groupmarker[1] : o === i.groupmarker[1] && (o = i.groupmarker[0]), 4363 o); 4364 } 4365 var o; 4366 return t; 4367 }(m[0]); 4368 return m; 4369 }, t.generateMaskSet = function(e, t) { 4370 var i; 4371 function n(e, i, n) { 4372 var o, l, s = !1; 4373 if (null !== e && "" !== e || ((s = null !== n.regex) ? e = (e = n.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (s = !0, 4374 e = ".*")), 1 === e.length && !1 === n.greedy && 0 !== n.repeat && (n.placeholder = ""), 4375 n.repeat > 0 || "*" === n.repeat || "+" === n.repeat) { 4376 var u = "*" === n.repeat ? 0 : "+" === n.repeat ? 1 : n.repeat; 4377 e = n.groupmarker[0] + e + n.groupmarker[1] + n.quantifiermarker[0] + u + "," + n.repeat + n.quantifiermarker[1]; 4378 } 4379 return l = s ? "regex_" + n.regex : n.numericInput ? e.split("").reverse().join("") : e, 4380 null !== n.keepStatic && (l = "ks_" + n.keepStatic + l), void 0 === r.default.prototype.masksCache[l] || !0 === t ? (o = { 4381 mask: e, 4382 maskToken: r.default.prototype.analyseMask(e, s, n), 4383 validPositions: {}, 4384 _buffer: void 0, 4385 buffer: void 0, 4386 tests: {}, 4387 excludes: {}, 4388 metadata: i, 4389 maskLength: void 0, 4390 jitOffset: {} 4391 }, !0 !== t && (r.default.prototype.masksCache[l] = o, o = a.default.extend(!0, {}, r.default.prototype.masksCache[l]))) : o = a.default.extend(!0, {}, r.default.prototype.masksCache[l]), 4392 o; 4393 } 4394 "function" == typeof e.mask && (e.mask = e.mask(e)); 4395 if (Array.isArray(e.mask)) { 4396 if (e.mask.length > 1) { 4397 null === e.keepStatic && (e.keepStatic = !0); 4398 var o = e.groupmarker[0]; 4399 return (e.isRTL ? e.mask.reverse() : e.mask).forEach((function(t) { 4400 o.length > 1 && (o += e.alternatormarker), void 0 !== t.mask && "function" != typeof t.mask ? o += t.mask : o += t; 4401 })), n(o += e.groupmarker[1], e.mask, e); 4402 } 4403 e.mask = e.mask.pop(); 4404 } 4405 i = e.mask && void 0 !== e.mask.mask && "function" != typeof e.mask.mask ? n(e.mask.mask, e.mask, e) : n(e.mask, e.mask, e); 4406 null === e.keepStatic && (e.keepStatic = !1); 4407 return i; 4408 }; 4409 var a = o(i(4963)), n = o(i(9695)), r = o(i(2394)); 4410 function o(e) { 4411 return e && e.__esModule ? e : { 4412 default: e 4413 }; 4414 } 4415 }, 4416 157: function(e, t, i) { 4417 Object.defineProperty(t, "__esModule", { 4418 value: !0 4419 }), t.mask = function() { 4420 var e = this, t = this.opts, i = this.el, a = this.dependencyLib; 4421 l.EventRuler.off(i); 4422 var f = function(t, i) { 4423 "textarea" !== t.tagName.toLowerCase() && i.ignorables.push(n.default.ENTER); 4424 var s = t.getAttribute("type"), u = "input" === t.tagName.toLowerCase() && i.supportsInputType.includes(s) || t.isContentEditable || "textarea" === t.tagName.toLowerCase(); 4425 if (!u) if ("input" === t.tagName.toLowerCase()) { 4426 var c = document.createElement("input"); 4427 c.setAttribute("type", s), u = "text" === c.type, c = null; 4428 } else u = "partial"; 4429 return !1 !== u ? function(t) { 4430 var n, s; 4431 function u() { 4432 return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== r.getLastValidPosition.call(e) || !0 !== i.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && i.clearMaskOnLostFocus ? (e.isRTL ? o.clearOptionalTail.call(e, r.getBuffer.call(e).slice()).reverse() : o.clearOptionalTail.call(e, r.getBuffer.call(e).slice())).join("") : n.call(this) : "" : n.call(this); 4433 } 4434 function c(e) { 4435 s.call(this, e), this.inputmask && (0, o.applyInputValue)(this, e); 4436 } 4437 if (!t.inputmask.__valueGet) { 4438 if (!0 !== i.noValuePatching) { 4439 if (Object.getOwnPropertyDescriptor) { 4440 var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), "value") : void 0; 4441 f && f.get && f.set ? (n = f.get, s = f.set, Object.defineProperty(t, "value", { 4442 get: u, 4443 set: c, 4444 configurable: !0 4445 })) : "input" !== t.tagName.toLowerCase() && (n = function() { 4446 return this.textContent; 4447 }, s = function(e) { 4448 this.textContent = e; 4449 }, Object.defineProperty(t, "value", { 4450 get: u, 4451 set: c, 4452 configurable: !0 4453 })); 4454 } else document.__lookupGetter__ && t.__lookupGetter__("value") && (n = t.__lookupGetter__("value"), 4455 s = t.__lookupSetter__("value"), t.__defineGetter__("value", u), t.__defineSetter__("value", c)); 4456 t.inputmask.__valueGet = n, t.inputmask.__valueSet = s; 4457 } 4458 t.inputmask._valueGet = function(t) { 4459 return e.isRTL && !0 !== t ? n.call(this.el).split("").reverse().join("") : n.call(this.el); 4460 }, t.inputmask._valueSet = function(t, i) { 4461 s.call(this.el, null == t ? "" : !0 !== i && e.isRTL ? t.split("").reverse().join("") : t); 4462 }, void 0 === n && (n = function() { 4463 return this.value; 4464 }, s = function(e) { 4465 this.value = e; 4466 }, function(t) { 4467 if (a.valHooks && (void 0 === a.valHooks[t] || !0 !== a.valHooks[t].inputmaskpatch)) { 4468 var n = a.valHooks[t] && a.valHooks[t].get ? a.valHooks[t].get : function(e) { 4469 return e.value; 4470 }, l = a.valHooks[t] && a.valHooks[t].set ? a.valHooks[t].set : function(e, t) { 4471 return e.value = t, e; 4472 }; 4473 a.valHooks[t] = { 4474 get: function(t) { 4475 if (t.inputmask) { 4476 if (t.inputmask.opts.autoUnmask) return t.inputmask.unmaskedvalue(); 4477 var a = n(t); 4478 return -1 !== r.getLastValidPosition.call(e, void 0, void 0, t.inputmask.maskset.validPositions) || !0 !== i.nullable ? a : ""; 4479 } 4480 return n(t); 4481 }, 4482 set: function(e, t) { 4483 var i = l(e, t); 4484 return e.inputmask && (0, o.applyInputValue)(e, t), i; 4485 }, 4486 inputmaskpatch: !0 4487 }; 4488 } 4489 }(t.type), function(t) { 4490 l.EventRuler.on(t, "mouseenter", (function() { 4491 var t = this.inputmask._valueGet(!0); 4492 t !== (e.isRTL ? r.getBuffer.call(e).reverse() : r.getBuffer.call(e)).join("") && (0, 4493 o.applyInputValue)(this, t); 4494 })); 4495 }(t)); 4496 } 4497 }(t) : t.inputmask = void 0, u; 4498 }(i, t); 4499 if (!1 !== f) { 4500 e.originalPlaceholder = i.placeholder, e.maxLength = void 0 !== i ? i.maxLength : void 0, 4501 -1 === e.maxLength && (e.maxLength = void 0), "inputMode" in i && null === i.getAttribute("inputmode") && (i.inputMode = t.inputmode, 4502 i.setAttribute("inputmode", t.inputmode)), !0 === f && (t.showMaskOnFocus = t.showMaskOnFocus && -1 === [ "cc-number", "cc-exp" ].indexOf(i.autocomplete), 4503 s.iphone && (t.insertModeVisual = !1), l.EventRuler.on(i, "submit", c.EventHandlers.submitEvent), 4504 l.EventRuler.on(i, "reset", c.EventHandlers.resetEvent), l.EventRuler.on(i, "blur", c.EventHandlers.blurEvent), 4505 l.EventRuler.on(i, "focus", c.EventHandlers.focusEvent), l.EventRuler.on(i, "invalid", c.EventHandlers.invalidEvent), 4506 l.EventRuler.on(i, "click", c.EventHandlers.clickEvent), l.EventRuler.on(i, "mouseleave", c.EventHandlers.mouseleaveEvent), 4507 l.EventRuler.on(i, "mouseenter", c.EventHandlers.mouseenterEvent), l.EventRuler.on(i, "paste", c.EventHandlers.pasteEvent), 4508 l.EventRuler.on(i, "cut", c.EventHandlers.cutEvent), l.EventRuler.on(i, "complete", t.oncomplete), 4509 l.EventRuler.on(i, "incomplete", t.onincomplete), l.EventRuler.on(i, "cleared", t.oncleared), 4510 !0 !== t.inputEventOnly && (l.EventRuler.on(i, "keydown", c.EventHandlers.keydownEvent), 4511 l.EventRuler.on(i, "keypress", c.EventHandlers.keypressEvent), l.EventRuler.on(i, "keyup", c.EventHandlers.keyupEvent)), 4512 (s.mobile || t.inputEventOnly) && i.removeAttribute("maxLength"), l.EventRuler.on(i, "input", c.EventHandlers.inputFallBackEvent), 4513 l.EventRuler.on(i, "compositionend", c.EventHandlers.compositionendEvent)), l.EventRuler.on(i, "setvalue", c.EventHandlers.setValueEvent), 4514 r.getBufferTemplate.call(e).join(""), e.undoValue = e._valueGet(!0); 4515 var d = (i.inputmask.shadowRoot || i.ownerDocument).activeElement; 4516 if ("" !== i.inputmask._valueGet(!0) || !1 === t.clearMaskOnLostFocus || d === i) { 4517 (0, o.applyInputValue)(i, i.inputmask._valueGet(!0), t); 4518 var p = r.getBuffer.call(e).slice(); 4519 !1 === u.isComplete.call(e, p) && t.clearIncomplete && r.resetMaskSet.call(e), t.clearMaskOnLostFocus && d !== i && (-1 === r.getLastValidPosition.call(e) ? p = [] : o.clearOptionalTail.call(e, p)), 4520 (!1 === t.clearMaskOnLostFocus || t.showMaskOnFocus && d === i || "" !== i.inputmask._valueGet(!0)) && (0, 4521 o.writeBuffer)(i, p), d === i && r.caret.call(e, i, r.seekNext.call(e, r.getLastValidPosition.call(e))); 4522 } 4523 } 4524 }; 4525 var a, n = (a = i(5581)) && a.__esModule ? a : { 4526 default: a 4527 }, r = i(8711), o = i(7760), l = i(9716), s = i(9845), u = i(7215), c = i(6030); 4528 }, 4529 9695: function(e, t) { 4530 Object.defineProperty(t, "__esModule", { 4531 value: !0 4532 }), t.default = function(e, t, i, a) { 4533 this.matches = [], this.openGroup = e || !1, this.alternatorGroup = !1, this.isGroup = e || !1, 4534 this.isOptional = t || !1, this.isQuantifier = i || !1, this.isAlternator = a || !1, 4535 this.quantifier = { 4536 min: 1, 4537 max: 1 4538 }; 4539 }; 4540 }, 4541 3194: function() { 4542 Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", { 4543 value: function(e, t) { 4544 if (null == this) throw new TypeError('"this" is null or not defined'); 4545 var i = Object(this), a = i.length >>> 0; 4546 if (0 === a) return !1; 4547 for (var n = 0 | t, r = Math.max(n >= 0 ? n : a - Math.abs(n), 0); r < a; ) { 4548 if (i[r] === e) return !0; 4549 r++; 4550 } 4551 return !1; 4552 } 4553 }); 4554 }, 4555 7149: function() { 4556 function e(t) { 4557 return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { 4558 return typeof e; 4559 } : function(e) { 4560 return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; 4561 }, e(t); 4562 } 4563 "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === e("test".__proto__) ? function(e) { 4564 return e.__proto__; 4565 } : function(e) { 4566 return e.constructor.prototype; 4567 }); 4568 }, 4569 8711: function(e, t, i) { 4570 Object.defineProperty(t, "__esModule", { 4571 value: !0 4572 }), t.caret = function(e, t, i, a, n) { 4573 var r, o = this, l = this.opts; 4574 if (void 0 === t) return "selectionStart" in e && "selectionEnd" in e ? (t = e.selectionStart, 4575 i = e.selectionEnd) : window.getSelection ? (r = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e && r.commonAncestorContainer !== e || (t = r.startOffset, 4576 i = r.endOffset) : document.selection && document.selection.createRange && (r = document.selection.createRange(), 4577 t = 0 - r.duplicate().moveStart("character", -e.inputmask._valueGet().length), i = t + r.text.length), 4578 { 4579 begin: a ? t : u.call(o, t), 4580 end: a ? i : u.call(o, i) 4581 }; 4582 if (Array.isArray(t) && (i = o.isRTL ? t[0] : t[1], t = o.isRTL ? t[1] : t[0]), 4583 void 0 !== t.begin && (i = o.isRTL ? t.begin : t.end, t = o.isRTL ? t.end : t.begin), 4584 "number" == typeof t) { 4585 t = a ? t : u.call(o, t), i = "number" == typeof (i = a ? i : u.call(o, i)) ? i : t; 4586 var s = parseInt(((e.ownerDocument.defaultView || window).getComputedStyle ? (e.ownerDocument.defaultView || window).getComputedStyle(e, null) : e.currentStyle).fontSize) * i; 4587 if (e.scrollLeft = s > e.scrollWidth ? s : 0, e.inputmask.caretPos = { 4588 begin: t, 4589 end: i 4590 }, l.insertModeVisual && !1 === l.insertMode && t === i && (n || i++), e === (e.inputmask.shadowRoot || e.ownerDocument).activeElement) if ("setSelectionRange" in e) e.setSelectionRange(t, i); else if (window.getSelection) { 4591 if (r = document.createRange(), void 0 === e.firstChild || null === e.firstChild) { 4592 var c = document.createTextNode(""); 4593 e.appendChild(c); 4594 } 4595 r.setStart(e.firstChild, t < e.inputmask._valueGet().length ? t : e.inputmask._valueGet().length), 4596 r.setEnd(e.firstChild, i < e.inputmask._valueGet().length ? i : e.inputmask._valueGet().length), 4597 r.collapse(!0); 4598 var f = window.getSelection(); 4599 f.removeAllRanges(), f.addRange(r); 4600 } else e.createTextRange && ((r = e.createTextRange()).collapse(!0), r.moveEnd("character", i), 4601 r.moveStart("character", t), r.select()); 4602 } 4603 }, t.determineLastRequiredPosition = function(e) { 4604 var t, i, r = this, l = this.maskset, s = this.dependencyLib, u = a.getMaskTemplate.call(r, !0, o.call(r), !0, !0), c = u.length, f = o.call(r), d = {}, p = l.validPositions[f], h = void 0 !== p ? p.locator.slice() : void 0; 4605 for (t = f + 1; t < u.length; t++) i = a.getTestTemplate.call(r, t, h, t - 1), h = i.locator.slice(), 4606 d[t] = s.extend(!0, {}, i); 4607 var v = p && void 0 !== p.alternation ? p.locator[p.alternation] : void 0; 4608 for (t = c - 1; t > f && (((i = d[t]).match.optionality || i.match.optionalQuantifier && i.match.newBlockMarker || v && (v !== d[t].locator[p.alternation] && 1 != i.match.static || !0 === i.match.static && i.locator[p.alternation] && n.checkAlternationMatch.call(r, i.locator[p.alternation].toString().split(","), v.toString().split(",")) && "" !== a.getTests.call(r, t)[0].def)) && u[t] === a.getPlaceholder.call(r, t, i.match)); t--) c--; 4609 return e ? { 4610 l: c, 4611 def: d[c] ? d[c].match : void 0 4612 } : c; 4613 }, t.determineNewCaretPosition = function(e, t, i) { 4614 var n = this, u = this.maskset, c = this.opts; 4615 t && (n.isRTL ? e.end = e.begin : e.begin = e.end); 4616 if (e.begin === e.end) { 4617 switch (i = i || c.positionCaretOnClick) { 4618 case "none": 4619 break; 4620 4621 case "select": 4622 e = { 4623 begin: 0, 4624 end: r.call(n).length 4625 }; 4626 break; 4627 4628 case "ignore": 4629 e.end = e.begin = s.call(n, o.call(n)); 4630 break; 4631 4632 case "radixFocus": 4633 if (function(e) { 4634 if ("" !== c.radixPoint && 0 !== c.digits) { 4635 var t = u.validPositions; 4636 if (void 0 === t[e] || t[e].input === a.getPlaceholder.call(n, e)) { 4637 if (e < s.call(n, -1)) return !0; 4638 var i = r.call(n).indexOf(c.radixPoint); 4639 if (-1 !== i) { 4640 for (var o in t) if (t[o] && i < o && t[o].input !== a.getPlaceholder.call(n, o)) return !1; 4641 return !0; 4642 } 4643 } 4644 } 4645 return !1; 4646 }(e.begin)) { 4647 var f = r.call(n).join("").indexOf(c.radixPoint); 4648 e.end = e.begin = c.numericInput ? s.call(n, f) : f; 4649 break; 4650 } 4651 4652 default: 4653 var d = e.begin, p = o.call(n, d, !0), h = s.call(n, -1 !== p || l.call(n, 0) ? p : -1); 4654 if (d <= h) e.end = e.begin = l.call(n, d, !1, !0) ? d : s.call(n, d); else { 4655 var v = u.validPositions[p], m = a.getTestTemplate.call(n, h, v ? v.match.locator : void 0, v), g = a.getPlaceholder.call(n, h, m.match); 4656 if ("" !== g && r.call(n)[h] !== g && !0 !== m.match.optionalQuantifier && !0 !== m.match.newBlockMarker || !l.call(n, h, c.keepStatic, !0) && m.match.def === g) { 4657 var k = s.call(n, h); 4658 (d >= k || d === h) && (h = k); 4659 } 4660 e.end = e.begin = h; 4661 } 4662 } 4663 return e; 4664 } 4665 }, t.getBuffer = r, t.getBufferTemplate = function() { 4666 var e = this.maskset; 4667 void 0 === e._buffer && (e._buffer = a.getMaskTemplate.call(this, !1, 1), void 0 === e.buffer && (e.buffer = e._buffer.slice())); 4668 return e._buffer; 4669 }, t.getLastValidPosition = o, t.isMask = l, t.resetMaskSet = function(e) { 4670 var t = this.maskset; 4671 t.buffer = void 0, !0 !== e && (t.validPositions = {}, t.p = 0); 4672 }, t.seekNext = s, t.seekPrevious = function(e, t) { 4673 var i = this, n = e - 1; 4674 if (e <= 0) return 0; 4675 for (;n > 0 && (!0 === t && (!0 !== a.getTest.call(i, n).match.newBlockMarker || !l.call(i, n, void 0, !0)) || !0 !== t && !l.call(i, n, void 0, !0)); ) n--; 4676 return n; 4677 }, t.translatePosition = u; 4678 var a = i(4713), n = i(7215); 4679 function r(e) { 4680 var t = this.maskset; 4681 return void 0 !== t.buffer && !0 !== e || (t.buffer = a.getMaskTemplate.call(this, !0, o.call(this), !0), 4682 void 0 === t._buffer && (t._buffer = t.buffer.slice())), t.buffer; 4683 } 4684 function o(e, t, i) { 4685 var a = this.maskset, n = -1, r = -1, o = i || a.validPositions; 4686 for (var l in void 0 === e && (e = -1), o) { 4687 var s = parseInt(l); 4688 o[s] && (t || !0 !== o[s].generatedInput) && (s <= e && (n = s), s >= e && (r = s)); 4689 } 4690 return -1 === n || n == e ? r : -1 == r || e - n < r - e ? n : r; 4691 } 4692 function l(e, t, i) { 4693 var n = this, r = this.maskset, o = a.getTestTemplate.call(n, e).match; 4694 if ("" === o.def && (o = a.getTest.call(n, e).match), !0 !== o.static) return o.fn; 4695 if (!0 === i && void 0 !== r.validPositions[e] && !0 !== r.validPositions[e].generatedInput) return !0; 4696 if (!0 !== t && e > -1) { 4697 if (i) { 4698 var l = a.getTests.call(n, e); 4699 return l.length > 1 + ("" === l[l.length - 1].match.def ? 1 : 0); 4700 } 4701 var s = a.determineTestTemplate.call(n, e, a.getTests.call(n, e)), u = a.getPlaceholder.call(n, e, s.match); 4702 return s.match.def !== u; 4703 } 4704 return !1; 4705 } 4706 function s(e, t, i) { 4707 var n = this; 4708 void 0 === i && (i = !0); 4709 for (var r = e + 1; "" !== a.getTest.call(n, r).match.def && (!0 === t && (!0 !== a.getTest.call(n, r).match.newBlockMarker || !l.call(n, r, void 0, !0)) || !0 !== t && !l.call(n, r, void 0, i)); ) r++; 4710 return r; 4711 } 4712 function u(e) { 4713 var t = this.opts, i = this.el; 4714 return !this.isRTL || "number" != typeof e || t.greedy && "" === t.placeholder || !i || (e = Math.abs(this._valueGet().length - e)), 4715 e; 4716 } 4717 }, 4718 4713: function(e, t, i) { 4719 Object.defineProperty(t, "__esModule", { 4720 value: !0 4721 }), t.determineTestTemplate = u, t.getDecisionTaker = o, t.getMaskTemplate = function(e, t, i, a, n) { 4722 var r = this, o = this.opts, c = this.maskset, f = o.greedy; 4723 n && o.greedy && (o.greedy = !1, r.maskset.tests = {}); 4724 t = t || 0; 4725 var p, h, v, m, g = [], k = 0; 4726 do { 4727 if (!0 === e && c.validPositions[k]) v = n && c.validPositions[k].match.optionality && void 0 === c.validPositions[k + 1] && (!0 === c.validPositions[k].generatedInput || c.validPositions[k].input == o.skipOptionalPartCharacter && k > 0) ? u.call(r, k, d.call(r, k, p, k - 1)) : c.validPositions[k], 4728 h = v.match, p = v.locator.slice(), g.push(!0 === i ? v.input : !1 === i ? h.nativeDef : l.call(r, k, h)); else { 4729 v = s.call(r, k, p, k - 1), h = v.match, p = v.locator.slice(); 4730 var y = !0 !== a && (!1 !== o.jitMasking ? o.jitMasking : h.jit); 4731 (m = (m && h.static && h.def !== o.groupSeparator && null === h.fn || c.validPositions[k - 1] && h.static && h.def !== o.groupSeparator && null === h.fn) && c.tests[k] && 1 === c.tests[k].length) || !1 === y || void 0 === y || "number" == typeof y && isFinite(y) && y > k ? g.push(!1 === i ? h.nativeDef : l.call(r, k, h)) : m = !1; 4732 } 4733 k++; 4734 } while (!0 !== h.static || "" !== h.def || t > k); 4735 "" === g[g.length - 1] && g.pop(); 4736 !1 === i && void 0 !== c.maskLength || (c.maskLength = k - 1); 4737 return o.greedy = f, g; 4738 }, t.getPlaceholder = l, t.getTest = c, t.getTestTemplate = s, t.getTests = d, t.isSubsetOf = f; 4739 var a, n = (a = i(2394)) && a.__esModule ? a : { 4740 default: a 4741 }; 4742 function r(e, t) { 4743 var i = (null != e.alternation ? e.mloc[o(e)] : e.locator).join(""); 4744 if ("" !== i) for (;i.length < t; ) i += "0"; 4745 return i; 4746 } 4747 function o(e) { 4748 var t = e.locator[e.alternation]; 4749 return "string" == typeof t && t.length > 0 && (t = t.split(",")[0]), void 0 !== t ? t.toString() : ""; 4750 } 4751 function l(e, t, i) { 4752 var a = this.opts, n = this.maskset; 4753 if (void 0 !== (t = t || c.call(this, e).match).placeholder || !0 === i) return "function" == typeof t.placeholder ? t.placeholder(a) : t.placeholder; 4754 if (!0 === t.static) { 4755 if (e > -1 && void 0 === n.validPositions[e]) { 4756 var r, o = d.call(this, e), l = []; 4757 if (o.length > 1 + ("" === o[o.length - 1].match.def ? 1 : 0)) for (var s = 0; s < o.length; s++) if ("" !== o[s].match.def && !0 !== o[s].match.optionality && !0 !== o[s].match.optionalQuantifier && (!0 === o[s].match.static || void 0 === r || !1 !== o[s].match.fn.test(r.match.def, n, e, !0, a)) && (l.push(o[s]), 4758 !0 === o[s].match.static && (r = o[s]), l.length > 1 && /[0-9a-bA-Z]/.test(l[0].match.def))) return a.placeholder.charAt(e % a.placeholder.length); 4759 } 4760 return t.def; 4761 } 4762 return a.placeholder.charAt(e % a.placeholder.length); 4763 } 4764 function s(e, t, i) { 4765 return this.maskset.validPositions[e] || u.call(this, e, d.call(this, e, t ? t.slice() : t, i)); 4766 } 4767 function u(e, t) { 4768 var i = this.opts, a = function(e, t) { 4769 var i = 0, a = !1; 4770 t.forEach((function(e) { 4771 e.match.optionality && (0 !== i && i !== e.match.optionality && (a = !0), (0 === i || i > e.match.optionality) && (i = e.match.optionality)); 4772 })), i && (0 == e || 1 == t.length ? i = 0 : a || (i = 0)); 4773 return i; 4774 }(e, t); 4775 e = e > 0 ? e - 1 : 0; 4776 var n, o, l, s = r(c.call(this, e)); 4777 i.greedy && t.length > 1 && "" === t[t.length - 1].match.def && t.pop(); 4778 for (var u = 0; u < t.length; u++) { 4779 var f = t[u]; 4780 n = r(f, s.length); 4781 var d = Math.abs(n - s); 4782 (void 0 === o || "" !== n && d < o || l && !i.greedy && l.match.optionality && l.match.optionality - a > 0 && "master" === l.match.newBlockMarker && (!f.match.optionality || f.match.optionality - a < 1 || !f.match.newBlockMarker) || l && !i.greedy && l.match.optionalQuantifier && !f.match.optionalQuantifier) && (o = d, 4783 l = f); 4784 } 4785 return l; 4786 } 4787 function c(e, t) { 4788 var i = this.maskset; 4789 return i.validPositions[e] ? i.validPositions[e] : (t || d.call(this, e))[0]; 4790 } 4791 function f(e, t, i) { 4792 function a(e) { 4793 for (var t, i = [], a = -1, n = 0, r = e.length; n < r; n++) if ("-" === e.charAt(n)) for (t = e.charCodeAt(n + 1); ++a < t; ) i.push(String.fromCharCode(a)); else a = e.charCodeAt(n), 4794 i.push(e.charAt(n)); 4795 return i.join(""); 4796 } 4797 return e.match.def === t.match.nativeDef || !(!(i.regex || e.match.fn instanceof RegExp && t.match.fn instanceof RegExp) || !0 === e.match.static || !0 === t.match.static) && -1 !== a(t.match.fn.toString().replace(/[[\]/]/g, "")).indexOf(a(e.match.fn.toString().replace(/[[\]/]/g, ""))); 4798 } 4799 function d(e, t, i) { 4800 var a, r, o = this, l = this.dependencyLib, s = this.maskset, c = this.opts, d = this.el, p = s.maskToken, h = t ? i : 0, v = t ? t.slice() : [ 0 ], m = [], g = !1, k = t ? t.join("") : ""; 4801 function y(t, i, r, o) { 4802 function l(r, o, u) { 4803 function p(e, t) { 4804 var i = 0 === t.matches.indexOf(e); 4805 return i || t.matches.every((function(a, n) { 4806 return !0 === a.isQuantifier ? i = p(e, t.matches[n - 1]) : Object.prototype.hasOwnProperty.call(a, "matches") && (i = p(e, a)), 4807 !i; 4808 })), i; 4809 } 4810 function v(e, t, i) { 4811 var a, n; 4812 if ((s.tests[e] || s.validPositions[e]) && (s.tests[e] || [ s.validPositions[e] ]).every((function(e, r) { 4813 if (e.mloc[t]) return a = e, !1; 4814 var o = void 0 !== i ? i : e.alternation, l = void 0 !== e.locator[o] ? e.locator[o].toString().indexOf(t) : -1; 4815 return (void 0 === n || l < n) && -1 !== l && (a = e, n = l), !0; 4816 })), a) { 4817 var r = a.locator[a.alternation]; 4818 return (a.mloc[t] || a.mloc[r] || a.locator).slice((void 0 !== i ? i : a.alternation) + 1); 4819 } 4820 return void 0 !== i ? v(e, t) : void 0; 4821 } 4822 function b(e, t) { 4823 var i = e.alternation, a = void 0 === t || i === t.alternation && -1 === e.locator[i].toString().indexOf(t.locator[i]); 4824 if (!a && i > t.alternation) for (var n = t.alternation; n < i; n++) if (e.locator[n] !== t.locator[n]) { 4825 i = n, a = !0; 4826 break; 4827 } 4828 if (a) { 4829 e.mloc = e.mloc || {}; 4830 var r = e.locator[i]; 4831 if (void 0 !== r) { 4832 if ("string" == typeof r && (r = r.split(",")[0]), void 0 === e.mloc[r] && (e.mloc[r] = e.locator.slice()), 4833 void 0 !== t) { 4834 for (var o in t.mloc) "string" == typeof o && (o = o.split(",")[0]), void 0 === e.mloc[o] && (e.mloc[o] = t.mloc[o]); 4835 e.locator[i] = Object.keys(e.mloc).join(","); 4836 } 4837 return !0; 4838 } 4839 e.alternation = void 0; 4840 } 4841 return !1; 4842 } 4843 function x(e, t) { 4844 if (e.locator.length !== t.locator.length) return !1; 4845 for (var i = e.alternation + 1; i < e.locator.length; i++) if (e.locator[i] !== t.locator[i]) return !1; 4846 return !0; 4847 } 4848 if (h > e + c._maxTestPos) throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + s.mask; 4849 if (h === e && void 0 === r.matches) { 4850 if (m.push({ 4851 match: r, 4852 locator: o.reverse(), 4853 cd: k, 4854 mloc: {} 4855 }), !r.optionality || void 0 !== u || !(c.definitions && c.definitions[r.nativeDef] && c.definitions[r.nativeDef].optional || n.default.prototype.definitions[r.nativeDef] && n.default.prototype.definitions[r.nativeDef].optional)) return !0; 4856 g = !0, h = e; 4857 } else if (void 0 !== r.matches) { 4858 if (r.isGroup && u !== r) { 4859 if (r = l(t.matches[t.matches.indexOf(r) + 1], o, u)) return !0; 4860 } else if (r.isOptional) { 4861 var P = r, E = m.length; 4862 if (r = y(r, i, o, u)) { 4863 if (m.forEach((function(e, t) { 4864 t >= E && (e.match.optionality = e.match.optionality ? e.match.optionality + 1 : 1); 4865 })), a = m[m.length - 1].match, void 0 !== u || !p(a, P)) return !0; 4866 g = !0, h = e; 4867 } 4868 } else if (r.isAlternator) { 4869 var S, _ = r, w = [], M = m.slice(), O = o.length, T = !1, C = i.length > 0 ? i.shift() : -1; 4870 if (-1 === C || "string" == typeof C) { 4871 var A, D = h, j = i.slice(), B = []; 4872 if ("string" == typeof C) B = C.split(","); else for (A = 0; A < _.matches.length; A++) B.push(A.toString()); 4873 if (void 0 !== s.excludes[e]) { 4874 for (var R = B.slice(), L = 0, I = s.excludes[e].length; L < I; L++) { 4875 var F = s.excludes[e][L].toString().split(":"); 4876 o.length == F[1] && B.splice(B.indexOf(F[0]), 1); 4877 } 4878 0 === B.length && (delete s.excludes[e], B = R); 4879 } 4880 (!0 === c.keepStatic || isFinite(parseInt(c.keepStatic)) && D >= c.keepStatic) && (B = B.slice(0, 1)); 4881 for (var N = 0; N < B.length; N++) { 4882 A = parseInt(B[N]), m = [], i = "string" == typeof C && v(h, A, O) || j.slice(); 4883 var V = _.matches[A]; 4884 if (V && l(V, [ A ].concat(o), u)) r = !0; else if (0 === N && (T = !0), V && V.matches && V.matches.length > _.matches[0].matches.length) break; 4885 S = m.slice(), h = D, m = []; 4886 for (var G = 0; G < S.length; G++) { 4887 var H = S[G], K = !1; 4888 H.match.jit = H.match.jit || T, H.alternation = H.alternation || O, b(H); 4889 for (var U = 0; U < w.length; U++) { 4890 var $ = w[U]; 4891 if ("string" != typeof C || void 0 !== H.alternation && B.includes(H.locator[H.alternation].toString())) { 4892 if (H.match.nativeDef === $.match.nativeDef) { 4893 K = !0, b($, H); 4894 break; 4895 } 4896 if (f(H, $, c)) { 4897 b(H, $) && (K = !0, w.splice(w.indexOf($), 0, H)); 4898 break; 4899 } 4900 if (f($, H, c)) { 4901 b($, H); 4902 break; 4903 } 4904 if (Z = $, !0 === (Q = H).match.static && !0 !== Z.match.static && Z.match.fn.test(Q.match.def, s, e, !1, c, !1)) { 4905 x(H, $) || void 0 !== d.inputmask.userOptions.keepStatic ? b(H, $) && (K = !0, w.splice(w.indexOf($), 0, H)) : c.keepStatic = !0; 4906 break; 4907 } 4908 } 4909 } 4910 K || w.push(H); 4911 } 4912 } 4913 m = M.concat(w), h = e, g = m.length > 0, r = w.length > 0, i = j.slice(); 4914 } else r = l(_.matches[C] || t.matches[C], [ C ].concat(o), u); 4915 if (r) return !0; 4916 } else if (r.isQuantifier && u !== t.matches[t.matches.indexOf(r) - 1]) for (var q = r, z = i.length > 0 ? i.shift() : 0; z < (isNaN(q.quantifier.max) ? z + 1 : q.quantifier.max) && h <= e; z++) { 4917 var W = t.matches[t.matches.indexOf(q) - 1]; 4918 if (r = l(W, [ z ].concat(o), W)) { 4919 if ((a = m[m.length - 1].match).optionalQuantifier = z >= q.quantifier.min, a.jit = (z + 1) * (W.matches.indexOf(a) + 1) > q.quantifier.jit, 4920 a.optionalQuantifier && p(a, W)) { 4921 g = !0, h = e; 4922 break; 4923 } 4924 return a.jit && (s.jitOffset[e] = W.matches.length - W.matches.indexOf(a)), !0; 4925 } 4926 } else if (r = y(r, i, o, u)) return !0; 4927 } else h++; 4928 var Q, Z; 4929 } 4930 for (var u = i.length > 0 ? i.shift() : 0; u < t.matches.length; u++) if (!0 !== t.matches[u].isQuantifier) { 4931 var p = l(t.matches[u], [ u ].concat(r), o); 4932 if (p && h === e) return p; 4933 if (h > e) break; 4934 } 4935 } 4936 if (e > -1) { 4937 if (void 0 === t) { 4938 for (var b, x = e - 1; void 0 === (b = s.validPositions[x] || s.tests[x]) && x > -1; ) x--; 4939 void 0 !== b && x > -1 && (v = function(e, t) { 4940 var i, a = []; 4941 return Array.isArray(t) || (t = [ t ]), t.length > 0 && (void 0 === t[0].alternation || !0 === c.keepStatic ? 0 === (a = u.call(o, e, t.slice()).locator.slice()).length && (a = t[0].locator.slice()) : t.forEach((function(e) { 4942 "" !== e.def && (0 === a.length ? (i = e.alternation, a = e.locator.slice()) : e.locator[i] && -1 === a[i].toString().indexOf(e.locator[i]) && (a[i] += "," + e.locator[i])); 4943 }))), a; 4944 }(x, b), k = v.join(""), h = x); 4945 } 4946 if (s.tests[e] && s.tests[e][0].cd === k) return s.tests[e]; 4947 for (var P = v.shift(); P < p.length; P++) { 4948 if (y(p[P], v, [ P ]) && h === e || h > e) break; 4949 } 4950 } 4951 return (0 === m.length || g) && m.push({ 4952 match: { 4953 fn: null, 4954 static: !0, 4955 optionality: !1, 4956 casing: null, 4957 def: "", 4958 placeholder: "" 4959 }, 4960 locator: [], 4961 mloc: {}, 4962 cd: k 4963 }), void 0 !== t && s.tests[e] ? r = l.extend(!0, [], m) : (s.tests[e] = l.extend(!0, [], m), 4964 r = s.tests[e]), m.forEach((function(e) { 4965 e.match.optionality = !1; 4966 })), r; 4967 } 4968 }, 4969 7215: function(e, t, i) { 4970 Object.defineProperty(t, "__esModule", { 4971 value: !0 4972 }), t.alternate = s, t.checkAlternationMatch = function(e, t, i) { 4973 for (var a, n = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== i ? i.split(",") : [], l = 0; l < o.length; l++) -1 !== (a = e.indexOf(o[l])) && e.splice(a, 1); 4974 for (var s = 0; s < e.length; s++) if (n.includes(e[s])) { 4975 r = !0; 4976 break; 4977 } 4978 return r; 4979 }, t.handleRemove = function(e, t, i, a, l) { 4980 var u = this, c = this.maskset, f = this.opts; 4981 if ((f.numericInput || u.isRTL) && (t === r.default.BACKSPACE ? t = r.default.DELETE : t === r.default.DELETE && (t = r.default.BACKSPACE), 4982 u.isRTL)) { 4983 var d = i.end; 4984 i.end = i.begin, i.begin = d; 4985 } 4986 var p, h = o.getLastValidPosition.call(u, void 0, !0); 4987 i.end >= o.getBuffer.call(u).length && h >= i.end && (i.end = h + 1); 4988 t === r.default.BACKSPACE ? i.end - i.begin < 1 && (i.begin = o.seekPrevious.call(u, i.begin)) : t === r.default.DELETE && i.begin === i.end && (i.end = o.isMask.call(u, i.end, !0, !0) ? i.end + 1 : o.seekNext.call(u, i.end) + 1); 4989 if (!1 !== (p = m.call(u, i))) { 4990 if (!0 !== a && !1 !== f.keepStatic || null !== f.regex && -1 !== n.getTest.call(u, i.begin).match.def.indexOf("|")) { 4991 var v = s.call(u, !0); 4992 if (v) { 4993 var g = void 0 !== v.caret ? v.caret : v.pos ? o.seekNext.call(u, v.pos.begin ? v.pos.begin : v.pos) : o.getLastValidPosition.call(u, -1, !0); 4994 (t !== r.default.DELETE || i.begin > g) && i.begin; 4995 } 4996 } 4997 !0 !== a && (c.p = t === r.default.DELETE ? i.begin + p : i.begin, c.p = o.determineNewCaretPosition.call(u, { 4998 begin: c.p, 4999 end: c.p 5000 }, !1, !1 === f.insertMode && t === r.default.BACKSPACE ? "none" : void 0).begin); 5001 } 5002 }, t.isComplete = c, t.isSelection = f, t.isValid = d, t.refreshFromBuffer = h, 5003 t.revalidateMask = m; 5004 var a, n = i(4713), r = (a = i(5581)) && a.__esModule ? a : { 5005 default: a 5006 }, o = i(8711), l = i(6030); 5007 function s(e, t, i, a, r, l) { 5008 var u, c, f, p, h, v, m, g, k, y, b, x = this, P = this.dependencyLib, E = this.opts, S = x.maskset, _ = P.extend(!0, {}, S.validPositions), w = P.extend(!0, {}, S.tests), M = !1, O = !1, T = void 0 !== r ? r : o.getLastValidPosition.call(x); 5009 if (l && (y = l.begin, b = l.end, l.begin > l.end && (y = l.end, b = l.begin)), 5010 -1 === T && void 0 === r) u = 0, c = (p = n.getTest.call(x, u)).alternation; else for (;T >= 0; T--) if ((f = S.validPositions[T]) && void 0 !== f.alternation) { 5011 if (p && p.locator[f.alternation] !== f.locator[f.alternation]) break; 5012 u = T, c = S.validPositions[u].alternation, p = f; 5013 } 5014 if (void 0 !== c) { 5015 m = parseInt(u), S.excludes[m] = S.excludes[m] || [], !0 !== e && S.excludes[m].push((0, 5016 n.getDecisionTaker)(p) + ":" + p.alternation); 5017 var C = [], A = -1; 5018 for (h = m; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === A && e <= h && void 0 !== t && (C.push(t), 5019 A = C.length - 1), (v = S.validPositions[h]) && !0 !== v.generatedInput && (void 0 === l || h < y || h >= b) && C.push(v.input), 5020 delete S.validPositions[h]; 5021 for (-1 === A && void 0 !== t && (C.push(t), A = C.length - 1); void 0 !== S.excludes[m] && S.excludes[m].length < 10; ) { 5022 for (S.tests = {}, o.resetMaskSet.call(x, !0), M = !0, h = 0; h < C.length && (g = M.caret || o.getLastValidPosition.call(x, void 0, !0) + 1, 5023 k = C[h], M = d.call(x, g, k, !1, a, !0)); h++) h === A && (O = M), 1 == e && M && (O = { 5024 caretPos: h 5025 }); 5026 if (M) break; 5027 if (o.resetMaskSet.call(x), p = n.getTest.call(x, m), S.validPositions = P.extend(!0, {}, _), 5028 S.tests = P.extend(!0, {}, w), !S.excludes[m]) { 5029 O = s.call(x, e, t, i, a, m - 1, l); 5030 break; 5031 } 5032 var D = (0, n.getDecisionTaker)(p); 5033 if (-1 !== S.excludes[m].indexOf(D + ":" + p.alternation)) { 5034 O = s.call(x, e, t, i, a, m - 1, l); 5035 break; 5036 } 5037 for (S.excludes[m].push(D + ":" + p.alternation), h = m; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) delete S.validPositions[h]; 5038 } 5039 } 5040 return O && !1 === E.keepStatic || delete S.excludes[m], O; 5041 } 5042 function u(e, t, i) { 5043 var a = this.opts, n = this.maskset; 5044 switch (a.casing || t.casing) { 5045 case "upper": 5046 e = e.toUpperCase(); 5047 break; 5048 5049 case "lower": 5050 e = e.toLowerCase(); 5051 break; 5052 5053 case "title": 5054 var o = n.validPositions[i - 1]; 5055 e = 0 === i || o && o.input === String.fromCharCode(r.default.SPACE) ? e.toUpperCase() : e.toLowerCase(); 5056 break; 5057 5058 default: 5059 if ("function" == typeof a.casing) { 5060 var l = Array.prototype.slice.call(arguments); 5061 l.push(n.validPositions), e = a.casing.apply(this, l); 5062 } 5063 } 5064 return e; 5065 } 5066 function c(e) { 5067 var t = this, i = this.opts, a = this.maskset; 5068 if ("function" == typeof i.isComplete) return i.isComplete(e, i); 5069 if ("*" !== i.repeat) { 5070 var r = !1, l = o.determineLastRequiredPosition.call(t, !0), s = o.seekPrevious.call(t, l.l); 5071 if (void 0 === l.def || l.def.newBlockMarker || l.def.optionality || l.def.optionalQuantifier) { 5072 r = !0; 5073 for (var u = 0; u <= s; u++) { 5074 var c = n.getTestTemplate.call(t, u).match; 5075 if (!0 !== c.static && void 0 === a.validPositions[u] && !0 !== c.optionality && !0 !== c.optionalQuantifier || !0 === c.static && e[u] !== n.getPlaceholder.call(t, u, c)) { 5076 r = !1; 5077 break; 5078 } 5079 } 5080 } 5081 return r; 5082 } 5083 } 5084 function f(e) { 5085 var t = this.opts.insertMode ? 0 : 1; 5086 return this.isRTL ? e.begin - e.end > t : e.end - e.begin > t; 5087 } 5088 function d(e, t, i, a, r, l, p) { 5089 var g = this, k = this.dependencyLib, y = this.opts, b = g.maskset; 5090 i = !0 === i; 5091 var x = e; 5092 function P(e) { 5093 if (void 0 !== e) { 5094 if (void 0 !== e.remove && (Array.isArray(e.remove) || (e.remove = [ e.remove ]), 5095 e.remove.sort((function(e, t) { 5096 return t.pos - e.pos; 5097 })).forEach((function(e) { 5098 m.call(g, { 5099 begin: e, 5100 end: e + 1 5101 }); 5102 })), e.remove = void 0), void 0 !== e.insert && (Array.isArray(e.insert) || (e.insert = [ e.insert ]), 5103 e.insert.sort((function(e, t) { 5104 return e.pos - t.pos; 5105 })).forEach((function(e) { 5106 "" !== e.c && d.call(g, e.pos, e.c, void 0 === e.strict || e.strict, void 0 !== e.fromIsValid ? e.fromIsValid : a); 5107 })), e.insert = void 0), e.refreshFromBuffer && e.buffer) { 5108 var t = e.refreshFromBuffer; 5109 h.call(g, !0 === t ? t : t.start, t.end, e.buffer), e.refreshFromBuffer = void 0; 5110 } 5111 void 0 !== e.rewritePosition && (x = e.rewritePosition, e = !0); 5112 } 5113 return e; 5114 } 5115 function E(t, i, r) { 5116 var l = !1; 5117 return n.getTests.call(g, t).every((function(s, c) { 5118 var d = s.match; 5119 if (o.getBuffer.call(g, !0), !1 !== (l = (!d.jit || void 0 !== b.validPositions[o.seekPrevious.call(g, t)]) && (null != d.fn ? d.fn.test(i, b, t, r, y, f.call(g, e)) : (i === d.def || i === y.skipOptionalPartCharacter) && "" !== d.def && { 5120 c: n.getPlaceholder.call(g, t, d, !0) || d.def, 5121 pos: t 5122 }))) { 5123 var p = void 0 !== l.c ? l.c : i, h = t; 5124 return p = p === y.skipOptionalPartCharacter && !0 === d.static ? n.getPlaceholder.call(g, t, d, !0) || d.def : p, 5125 !0 !== (l = P(l)) && void 0 !== l.pos && l.pos !== t && (h = l.pos), !0 !== l && void 0 === l.pos && void 0 === l.c ? !1 : (!1 === m.call(g, e, k.extend({}, s, { 5126 input: u.call(g, p, d, h) 5127 }), a, h) && (l = !1), !1); 5128 } 5129 return !0; 5130 })), l; 5131 } 5132 void 0 !== e.begin && (x = g.isRTL ? e.end : e.begin); 5133 var S = !0, _ = k.extend(!0, {}, b.validPositions); 5134 if (!1 === y.keepStatic && void 0 !== b.excludes[x] && !0 !== r && !0 !== a) for (var w = x; w < (g.isRTL ? e.begin : e.end); w++) void 0 !== b.excludes[w] && (b.excludes[w] = void 0, 5135 delete b.tests[w]); 5136 if ("function" == typeof y.preValidation && !0 !== a && !0 !== l && (S = P(S = y.preValidation.call(g, o.getBuffer.call(g), x, t, f.call(g, e), y, b, e, i || r))), 5137 !0 === S) { 5138 if (S = E(x, t, i), (!i || !0 === a) && !1 === S && !0 !== l) { 5139 var M = b.validPositions[x]; 5140 if (!M || !0 !== M.match.static || M.match.def !== t && t !== y.skipOptionalPartCharacter) { 5141 if (y.insertMode || void 0 === b.validPositions[o.seekNext.call(g, x)] || e.end > x) { 5142 var O = !1; 5143 if (b.jitOffset[x] && void 0 === b.validPositions[o.seekNext.call(g, x)] && !1 !== (S = d.call(g, x + b.jitOffset[x], t, !0, !0)) && (!0 !== r && (S.caret = x), 5144 O = !0), e.end > x && (b.validPositions[x] = void 0), !O && !o.isMask.call(g, x, y.keepStatic && 0 === x)) for (var T = x + 1, C = o.seekNext.call(g, x, !1, 0 !== x); T <= C; T++) if (!1 !== (S = E(T, t, i))) { 5145 S = v.call(g, x, void 0 !== S.pos ? S.pos : T) || S, x = T; 5146 break; 5147 } 5148 } 5149 } else S = { 5150 caret: o.seekNext.call(g, x) 5151 }; 5152 } 5153 !1 !== S || !y.keepStatic || !c.call(g, o.getBuffer.call(g)) && 0 !== x || i || !0 === r ? f.call(g, e) && b.tests[x] && b.tests[x].length > 1 && y.keepStatic && !i && !0 !== r && (S = s.call(g, !0)) : S = s.call(g, x, t, i, a, void 0, e), 5154 !0 === S && (S = { 5155 pos: x 5156 }); 5157 } 5158 if ("function" == typeof y.postValidation && !0 !== a && !0 !== l) { 5159 var A = y.postValidation.call(g, o.getBuffer.call(g, !0), void 0 !== e.begin ? g.isRTL ? e.end : e.begin : e, t, S, y, b, i, p); 5160 void 0 !== A && (S = !0 === A ? S : A); 5161 } 5162 S && void 0 === S.pos && (S.pos = x), !1 === S || !0 === l ? (o.resetMaskSet.call(g, !0), 5163 b.validPositions = k.extend(!0, {}, _)) : v.call(g, void 0, x, !0); 5164 var D = P(S); 5165 void 0 !== g.maxLength && (o.getBuffer.call(g).length > g.maxLength && !a && (o.resetMaskSet.call(g, !0), 5166 b.validPositions = k.extend(!0, {}, _), D = !1)); 5167 return D; 5168 } 5169 function p(e, t, i) { 5170 for (var a = this.maskset, r = !1, o = n.getTests.call(this, e), l = 0; l < o.length; l++) { 5171 if (o[l].match && (o[l].match.nativeDef === t.match[i.shiftPositions ? "def" : "nativeDef"] && (!i.shiftPositions || !t.match.static) || o[l].match.nativeDef === t.match.nativeDef || i.regex && !o[l].match.static && o[l].match.fn.test(t.input))) { 5172 r = !0; 5173 break; 5174 } 5175 if (o[l].match && o[l].match.def === t.match.nativeDef) { 5176 r = void 0; 5177 break; 5178 } 5179 } 5180 return !1 === r && void 0 !== a.jitOffset[e] && (r = p.call(this, e + a.jitOffset[e], t, i)), 5181 r; 5182 } 5183 function h(e, t, i) { 5184 var a, n, r = this, s = this.maskset, u = this.opts, c = this.dependencyLib, f = u.skipOptionalPartCharacter, d = r.isRTL ? i.slice().reverse() : i; 5185 if (u.skipOptionalPartCharacter = "", !0 === e) o.resetMaskSet.call(r), s.tests = {}, 5186 e = 0, t = i.length, n = o.determineNewCaretPosition.call(r, { 5187 begin: 0, 5188 end: 0 5189 }, !1).begin; else { 5190 for (a = e; a < t; a++) delete s.validPositions[a]; 5191 n = e; 5192 } 5193 var p = new c.Event("keypress"); 5194 for (a = e; a < t; a++) { 5195 p.keyCode = d[a].toString().charCodeAt(0), r.ignorable = !1; 5196 var h = l.EventHandlers.keypressEvent.call(r, p, !0, !1, !1, n); 5197 !1 !== h && void 0 !== h && (n = h.forwardPosition); 5198 } 5199 u.skipOptionalPartCharacter = f; 5200 } 5201 function v(e, t, i) { 5202 var a = this, r = this.maskset, l = this.dependencyLib; 5203 if (void 0 === e) for (e = t - 1; e > 0 && !r.validPositions[e]; e--) ; 5204 for (var s = e; s < t; s++) { 5205 if (void 0 === r.validPositions[s] && !o.isMask.call(a, s, !1)) if (0 == s ? n.getTest.call(a, s) : r.validPositions[s - 1]) { 5206 var u = n.getTests.call(a, s).slice(); 5207 "" === u[u.length - 1].match.def && u.pop(); 5208 var c, f = n.determineTestTemplate.call(a, s, u); 5209 if (f && (!0 !== f.match.jit || "master" === f.match.newBlockMarker && (c = r.validPositions[s + 1]) && !0 === c.match.optionalQuantifier) && ((f = l.extend({}, f, { 5210 input: n.getPlaceholder.call(a, s, f.match, !0) || f.match.def 5211 })).generatedInput = !0, m.call(a, s, f, !0), !0 !== i)) { 5212 var p = r.validPositions[t].input; 5213 return r.validPositions[t] = void 0, d.call(a, t, p, !0, !0); 5214 } 5215 } 5216 } 5217 } 5218 function m(e, t, i, a) { 5219 var r = this, l = this.maskset, s = this.opts, u = this.dependencyLib; 5220 function c(e, t, i) { 5221 var a = t[e]; 5222 if (void 0 !== a && !0 === a.match.static && !0 !== a.match.optionality && (void 0 === t[0] || void 0 === t[0].alternation)) { 5223 var n = i.begin <= e - 1 ? t[e - 1] && !0 === t[e - 1].match.static && t[e - 1] : t[e - 1], r = i.end > e + 1 ? t[e + 1] && !0 === t[e + 1].match.static && t[e + 1] : t[e + 1]; 5224 return n && r; 5225 } 5226 return !1; 5227 } 5228 var f = 0, h = void 0 !== e.begin ? e.begin : e, v = void 0 !== e.end ? e.end : e, m = !0; 5229 if (e.begin > e.end && (h = e.end, v = e.begin), a = void 0 !== a ? a : h, h !== v || s.insertMode && void 0 !== l.validPositions[a] && void 0 === i || void 0 === t || t.match.optionalQuantifier || t.match.optionality) { 5230 var g, k = u.extend(!0, {}, l.validPositions), y = o.getLastValidPosition.call(r, void 0, !0); 5231 for (l.p = h, g = y; g >= h; g--) delete l.validPositions[g], void 0 === t && delete l.tests[g + 1]; 5232 var b, x, P = a, E = P; 5233 for (t && (l.validPositions[a] = u.extend(!0, {}, t), E++, P++), g = t ? v : v - 1; g <= y; g++) { 5234 if (void 0 !== (b = k[g]) && !0 !== b.generatedInput && (g >= v || g >= h && c(g, k, { 5235 begin: h, 5236 end: v 5237 }))) { 5238 for (;"" !== n.getTest.call(r, E).match.def; ) { 5239 if (!1 !== (x = p.call(r, E, b, s)) || "+" === b.match.def) { 5240 "+" === b.match.def && o.getBuffer.call(r, !0); 5241 var S = d.call(r, E, b.input, "+" !== b.match.def, !0); 5242 if (m = !1 !== S, P = (S.pos || E) + 1, !m && x) break; 5243 } else m = !1; 5244 if (m) { 5245 void 0 === t && b.match.static && g === e.begin && f++; 5246 break; 5247 } 5248 if (!m && o.getBuffer.call(r), E > l.maskLength) break; 5249 E++; 5250 } 5251 "" == n.getTest.call(r, E).match.def && (m = !1), E = P; 5252 } 5253 if (!m) break; 5254 } 5255 if (!m) return l.validPositions = u.extend(!0, {}, k), o.resetMaskSet.call(r, !0), 5256 !1; 5257 } else t && n.getTest.call(r, a).match.cd === t.match.cd && (l.validPositions[a] = u.extend(!0, {}, t)); 5258 return o.resetMaskSet.call(r, !0), f; 5259 } 5260 }, 5261 5581: function(e) { 5262 e.exports = JSON.parse('{"BACKSPACE":8,"BACKSPACE_SAFARI":127,"DELETE":46,"DOWN":40,"END":35,"ENTER":13,"ESCAPE":27,"HOME":36,"INSERT":45,"LEFT":37,"PAGE_DOWN":34,"PAGE_UP":33,"RIGHT":39,"SPACE":32,"TAB":9,"UP":38,"X":88,"Z":90,"CONTROL":17,"PAUSE/BREAK":19,"WINDOWS_LEFT":91,"WINDOWS_RIGHT":92,"KEY_229":229}'); 5263 } 5264 }, t = {}; 5265 function i(a) { 5266 var n = t[a]; 5267 if (void 0 !== n) return n.exports; 5268 var r = t[a] = { 5269 exports: {} 5270 }; 5271 return e[a](r, r.exports, i), r.exports; 5272 } 5273 var a = {}; 5274 return function() { 5275 var e, t = a; 5276 Object.defineProperty(t, "__esModule", { 5277 value: !0 5278 }), t.default = void 0, i(3851), i(219), i(207), i(5296); 5279 var n = ((e = i(2394)) && e.__esModule ? e : { 5280 default: e 5281 }).default; 5282 t.default = n; 5283 }(), a; 5284 }(); 5285})); 5286 5287/***/ }), 5288
vendor: 46,110 bytes, lines 5289-6486
5289/***/ "./node_modules/just-validate/dist/just-validate.es.js": 5290/*!*************************************************************!*\ 5291 !*** ./node_modules/just-validate/dist/just-validate.es.js ***! 5292 \*************************************************************/ 5293/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5294 5295"use strict"; 5296__webpack_require__.r(__webpack_exports__); 5297/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5298/* harmony export */ "default": () => (/* binding */ JustValidate) 5299/* harmony export */ }); 5300var __defProp = Object.defineProperty; 5301var __getOwnPropSymbols = Object.getOwnPropertySymbols; 5302var __hasOwnProp = Object.prototype.hasOwnProperty; 5303var __propIsEnum = Object.prototype.propertyIsEnumerable; 5304var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; 5305var __spreadValues = (a, b) => { 5306 for (var prop in b || (b = {})) 5307 if (__hasOwnProp.call(b, prop)) 5308 __defNormalProp(a, prop, b[prop]); 5309 if (__getOwnPropSymbols) 5310 for (var prop of __getOwnPropSymbols(b)) { 5311 if (__propIsEnum.call(b, prop)) 5312 __defNormalProp(a, prop, b[prop]); 5313 } 5314 return a; 5315}; 5316var __publicField = (obj, key, value) => { 5317 __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); 5318 return value; 5319}; 5320const EMAIL_REGEXP = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; 5321const NUMBER_REGEXP = /^[0-9]+$/; 5322const PASSWORD_REGEXP = /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/; 5323const STRONG_PASSWORD_REGEXP = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/; 5324const isEmpty = (value) => { 5325 let newVal = value; 5326 if (typeof value === "string") { 5327 newVal = value.trim(); 5328 } 5329 return !newVal; 5330}; 5331const isEmail = (value) => { 5332 return EMAIL_REGEXP.test(value); 5333}; 5334const isLengthMoreThanMax = (value, len) => { 5335 return value.length > len; 5336}; 5337const isLengthLessThanMin = (value, len) => { 5338 return value.length < len; 5339}; 5340const isNumber = (value) => { 5341 return NUMBER_REGEXP.test(value); 5342}; 5343const isPassword = (value) => { 5344 return PASSWORD_REGEXP.test(value); 5345}; 5346const isStrongPassword = (value) => { 5347 return STRONG_PASSWORD_REGEXP.test(value); 5348}; 5349const isNumberMoreThanMax = (value, len) => { 5350 return value > len; 5351}; 5352const isNumberLessThanMin = (value, len) => { 5353 return value < len; 5354}; 5355var Rules = /* @__PURE__ */ ((Rules2) => { 5356 Rules2["Required"] = "required"; 5357 Rules2["Email"] = "email"; 5358 Rules2["MinLength"] = "minLength"; 5359 Rules2["MaxLength"] = "maxLength"; 5360 Rules2["Password"] = "password"; 5361 Rules2["Number"] = "number"; 5362 Rules2["MaxNumber"] = "maxNumber"; 5363 Rules2["MinNumber"] = "minNumber"; 5364 Rules2["StrongPassword"] = "strongPassword"; 5365 Rules2["CustomRegexp"] = "customRegexp"; 5366 Rules2["MinFilesCount"] = "minFilesCount"; 5367 Rules2["MaxFilesCount"] = "maxFilesCount"; 5368 Rules2["Files"] = "files"; 5369 return Rules2; 5370})(Rules || {}); 5371var GroupRules = /* @__PURE__ */ ((GroupRules2) => { 5372 GroupRules2["Required"] = "required"; 5373 return GroupRules2; 5374})(GroupRules || {}); 5375var CustomStyleTagIds = /* @__PURE__ */ ((CustomStyleTagIds2) => { 5376 CustomStyleTagIds2["Label"] = "label"; 5377 CustomStyleTagIds2["LabelArrow"] = "labelArrow"; 5378 return CustomStyleTagIds2; 5379})(CustomStyleTagIds || {}); 5380const getDefaultFieldMessage = (rule, ruleValue) => { 5381 switch (rule) { 5382 case Rules.Required: 5383 return "The field is required"; 5384 case Rules.Email: 5385 return "Email has invalid format"; 5386 case Rules.MaxLength: 5387 return "The field must contain a maximum of :value characters".replace(":value", String(ruleValue)); 5388 case Rules.MinLength: 5389 return "The field must contain a minimum of :value characters".replace(":value", String(ruleValue)); 5390 case Rules.Password: 5391 return "Password must contain minimum eight characters, at least one letter and one number"; 5392 case Rules.Number: 5393 return "Value should be a number"; 5394 case Rules.StrongPassword: 5395 return "Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character"; 5396 case Rules.MaxNumber: 5397 return "Number should be less or equal than :value".replace(":value", String(ruleValue)); 5398 case Rules.MinNumber: 5399 return "Number should be more or equal than :value".replace(":value", String(ruleValue)); 5400 case Rules.MinFilesCount: 5401 return "Files count should be more or equal than :value".replace(":value", String(ruleValue)); 5402 case Rules.MaxFilesCount: 5403 return "Files count should be less or equal than :value".replace(":value", String(ruleValue)); 5404 case Rules.Files: 5405 return "Uploaded files have one or several invalid properties (extension/size/type etc)"; 5406 default: 5407 return "Value is incorrect"; 5408 } 5409}; 5410const getDefaultGroupMessage = (rule) => { 5411 switch (rule) { 5412 case GroupRules.Required: 5413 return "The field is required"; 5414 default: 5415 return "Group is incorrect"; 5416 } 5417}; 5418const isPromise = (val) => !!val && typeof val.then === "function"; 5419const getNodeParents = (el) => { 5420 let elem = el; 5421 const els = []; 5422 while (elem) { 5423 els.unshift(elem); 5424 elem = elem.parentNode; 5425 } 5426 return els; 5427}; 5428const getClosestParent = (groups, parents) => { 5429 const reversedParents = [...parents].reverse(); 5430 for (let i = 0, len = reversedParents.length; i < len; ++i) { 5431 const parent = reversedParents[i]; 5432 for (const key in groups) { 5433 const group = groups[key]; 5434 if (group.groupElem === parent) { 5435 return [key, group]; 5436 } 5437 } 5438 } 5439 return null; 5440}; 5441const getClassList = (classList) => { 5442 if (Array.isArray(classList)) { 5443 return classList.filter((cls) => cls.length > 0); 5444 } 5445 if (typeof classList === "string" && classList.trim()) { 5446 return [...classList.split(" ").filter((cls) => cls.length > 0)]; 5447 } 5448 return []; 5449}; 5450const errorLabelCss = `.just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}`; 5451const TOOLTIP_ARROW_HEIGHT = 5; 5452const defaultGlobalConfig = { 5453 errorFieldStyle: { 5454 color: "#b81111", 5455 border: "1px solid #B81111" 5456 }, 5457 errorFieldCssClass: "just-validate-error-field", 5458 successFieldCssClass: "just-validate-success-field", 5459 errorLabelStyle: { 5460 color: "#b81111" 5461 }, 5462 errorLabelCssClass: "just-validate-error-label", 5463 successLabelCssClass: "just-validate-success-label", 5464 focusInvalidField: true, 5465 lockForm: true, 5466 testingMode: false 5467}; 5468class JustValidate { 5469 constructor(form, globalConfig, dictLocale) { 5470 __publicField(this, "form", null); 5471 __publicField(this, "fields", {}); 5472 __publicField(this, "groupFields", {}); 5473 __publicField(this, "errors", {}); 5474 __publicField(this, "isValid", false); 5475 __publicField(this, "isSubmitted", false); 5476 __publicField(this, "globalConfig", defaultGlobalConfig); 5477 __publicField(this, "errorLabels", {}); 5478 __publicField(this, "successLabels", {}); 5479 __publicField(this, "eventListeners", []); 5480 __publicField(this, "dictLocale", []); 5481 __publicField(this, "currentLocale"); 5482 __publicField(this, "customStyleTags", {}); 5483 __publicField(this, "onSuccessCallback"); 5484 __publicField(this, "onFailCallback"); 5485 __publicField(this, "tooltips", []); 5486 __publicField(this, "lastScrollPosition"); 5487 __publicField(this, "isScrollTick"); 5488 __publicField(this, "refreshAllTooltips", () => { 5489 this.tooltips.forEach((item) => { 5490 item.refresh(); 5491 }); 5492 }); 5493 __publicField(this, "handleDocumentScroll", () => { 5494 this.lastScrollPosition = window.scrollY; 5495 if (!this.isScrollTick) { 5496 window.requestAnimationFrame(() => { 5497 this.refreshAllTooltips(); 5498 this.isScrollTick = false; 5499 }); 5500 this.isScrollTick = true; 5501 } 5502 }); 5503 __publicField(this, "formSubmitHandler", (ev) => { 5504 ev.preventDefault(); 5505 this.isSubmitted = true; 5506 this.validateHandler(ev); 5507 }); 5508 __publicField(this, "handleFieldChange", (target) => { 5509 let currentFieldName; 5510 for (const fieldName in this.fields) { 5511 const field = this.fields[fieldName]; 5512 if (field.elem === target) { 5513 currentFieldName = fieldName; 5514 break; 5515 } 5516 } 5517 if (!currentFieldName) { 5518 return; 5519 } 5520 this.validateField(currentFieldName, true); 5521 }); 5522 __publicField(this, "handleGroupChange", (target) => { 5523 let currentGroup; 5524 let currentGroupName; 5525 for (const groupName in this.groupFields) { 5526 const group = this.groupFields[groupName]; 5527 if (group.elems.find((elem) => elem === target)) { 5528 currentGroup = group; 5529 currentGroupName = groupName; 5530 break; 5531 } 5532 } 5533 if (!currentGroup || !currentGroupName) { 5534 return; 5535 } 5536 this.validateGroup(currentGroupName, currentGroup); 5537 }); 5538 __publicField(this, "handlerChange", (ev) => { 5539 if (!ev.target) { 5540 return; 5541 } 5542 this.handleFieldChange(ev.target); 5543 this.handleGroupChange(ev.target); 5544 this.renderErrors(); 5545 }); 5546 this.initialize(form, globalConfig, dictLocale); 5547 } 5548 initialize(form, globalConfig, dictLocale) { 5549 this.form = null; 5550 this.errors = {}; 5551 this.isValid = false; 5552 this.isSubmitted = false; 5553 this.globalConfig = defaultGlobalConfig; 5554 this.errorLabels = {}; 5555 this.successLabels = {}; 5556 this.eventListeners = []; 5557 this.customStyleTags = {}; 5558 this.tooltips = []; 5559 if (typeof form === "string") { 5560 const elem = document.querySelector(form); 5561 if (!elem) { 5562 throw Error(`Form with ${form} selector not found! Please check the form selector`); 5563 } 5564 this.setForm(elem); 5565 } else if (form instanceof HTMLFormElement) { 5566 this.setForm(form); 5567 } else { 5568 throw Error(`Form selector is not valid. Please specify a string selector or a DOM element.`); 5569 } 5570 this.globalConfig = __spreadValues(__spreadValues({}, defaultGlobalConfig), globalConfig); 5571 if (dictLocale) { 5572 this.dictLocale = dictLocale; 5573 } 5574 if (this.isTooltip()) { 5575 const styleTag = document.createElement("style"); 5576 styleTag.textContent = errorLabelCss; 5577 this.customStyleTags[CustomStyleTagIds.Label] = document.head.appendChild(styleTag); 5578 this.addListener("scroll", document, this.handleDocumentScroll); 5579 } 5580 } 5581 getLocalisedString(str) { 5582 var _a; 5583 if (!this.currentLocale || !this.dictLocale.length) { 5584 return str; 5585 } 5586 const localisedStr = (_a = this.dictLocale.find((item) => item.key === str)) == null ? void 0 : _a.dict[this.currentLocale]; 5587 return localisedStr || str; 5588 } 5589 getFieldErrorMessage(fieldRule, elem) { 5590 const msg = typeof fieldRule.errorMessage === "function" ? fieldRule.errorMessage(this.getElemValue(elem), this.fields) : fieldRule.errorMessage; 5591 return this.getLocalisedString(msg) || getDefaultFieldMessage(fieldRule.rule, fieldRule.value); 5592 } 5593 getFieldSuccessMessage(successMessage, elem) { 5594 const msg = typeof successMessage === "function" ? successMessage(this.getElemValue(elem), this.fields) : successMessage; 5595 return this.getLocalisedString(msg); 5596 } 5597 getGroupErrorMessage(groupRule) { 5598 return this.getLocalisedString(groupRule.errorMessage) || getDefaultGroupMessage(groupRule.rule); 5599 } 5600 getGroupSuccessMessage(groupRule) { 5601 return this.getLocalisedString(groupRule.successMessage); 5602 } 5603 setFieldInvalid(field, fieldRule) { 5604 this.fields[field].isValid = false; 5605 this.fields[field].errorMessage = this.getFieldErrorMessage(fieldRule, this.fields[field].elem); 5606 } 5607 setFieldValid(field, successMessage) { 5608 this.fields[field].isValid = true; 5609 if (successMessage !== void 0) { 5610 this.fields[field].successMessage = this.getFieldSuccessMessage(successMessage, this.fields[field].elem); 5611 } 5612 } 5613 setGroupInvalid(groupName, groupRule) { 5614 this.groupFields[groupName].isValid = false; 5615 this.groupFields[groupName].errorMessage = this.getGroupErrorMessage(groupRule); 5616 } 5617 setGroupValid(groupName, groupRule) { 5618 this.groupFields[groupName].isValid = true; 5619 this.groupFields[groupName].successMessage = this.getGroupSuccessMessage(groupRule); 5620 } 5621 getElemValue(elem) { 5622 switch (elem.type) { 5623 case "checkbox": 5624 return elem.checked; 5625 case "file": 5626 return elem.files; 5627 default: 5628 return elem.value; 5629 } 5630 } 5631 validateGroupRule(groupName, elems, groupRule) { 5632 switch (groupRule.rule) { 5633 case GroupRules.Required: { 5634 if (elems.every((elem) => !elem.checked)) { 5635 this.setGroupInvalid(groupName, groupRule); 5636 } else { 5637 this.setGroupValid(groupName, groupRule); 5638 } 5639 } 5640 } 5641 } 5642 validateFieldRule(field, elem, fieldRule, afterInputChanged = false) { 5643 const ruleValue = fieldRule.value; 5644 const elemValue = this.getElemValue(elem); 5645 if (fieldRule.plugin) { 5646 const result = fieldRule.plugin(elemValue, this.fields); 5647 if (!result) { 5648 this.setFieldInvalid(field, fieldRule); 5649 } 5650 return; 5651 } 5652 switch (fieldRule.rule) { 5653 case Rules.Required: { 5654 if (isEmpty(elemValue)) { 5655 this.setFieldInvalid(field, fieldRule); 5656 } 5657 break; 5658 } 5659 case Rules.Email: { 5660 if (typeof elemValue !== "string") { 5661 this.setFieldInvalid(field, fieldRule); 5662 break; 5663 } 5664 if (!isEmail(elemValue)) { 5665 this.setFieldInvalid(field, fieldRule); 5666 } 5667 break; 5668 } 5669 case Rules.MaxLength: { 5670 if (ruleValue === void 0) { 5671 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. The field will be always invalid.`); 5672 this.setFieldInvalid(field, fieldRule); 5673 break; 5674 } 5675 if (typeof ruleValue !== "number") { 5676 console.error(`Value for ${fieldRule.rule} rule for [${field}] should be a number. The field will be always invalid.`); 5677 this.setFieldInvalid(field, fieldRule); 5678 break; 5679 } 5680 if (typeof elemValue !== "string") { 5681 this.setFieldInvalid(field, fieldRule); 5682 break; 5683 } 5684 if (elemValue === "") { 5685 break; 5686 } 5687 if (isLengthMoreThanMax(elemValue, ruleValue)) { 5688 this.setFieldInvalid(field, fieldRule); 5689 } 5690 break; 5691 } 5692 case Rules.MinLength: { 5693 if (ruleValue === void 0) { 5694 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. The field will be always invalid.`); 5695 this.setFieldInvalid(field, fieldRule); 5696 break; 5697 } 5698 if (typeof ruleValue !== "number") { 5699 console.error(`Value for ${fieldRule.rule} rule for [${field}] should be a number. The field will be always invalid.`); 5700 this.setFieldInvalid(field, fieldRule); 5701 break; 5702 } 5703 if (typeof elemValue !== "string") { 5704 this.setFieldInvalid(field, fieldRule); 5705 break; 5706 } 5707 if (elemValue === "") { 5708 break; 5709 } 5710 if (isLengthLessThanMin(elemValue, ruleValue)) { 5711 this.setFieldInvalid(field, fieldRule); 5712 } 5713 break; 5714 } 5715 case Rules.Password: { 5716 if (typeof elemValue !== "string") { 5717 this.setFieldInvalid(field, fieldRule); 5718 break; 5719 } 5720 if (elemValue === "") { 5721 break; 5722 } 5723 if (!isPassword(elemValue)) { 5724 this.setFieldInvalid(field, fieldRule); 5725 } 5726 break; 5727 } 5728 case Rules.StrongPassword: { 5729 if (typeof elemValue !== "string") { 5730 this.setFieldInvalid(field, fieldRule); 5731 break; 5732 } 5733 if (elemValue === "") { 5734 break; 5735 } 5736 if (!isStrongPassword(elemValue)) { 5737 this.setFieldInvalid(field, fieldRule); 5738 } 5739 break; 5740 } 5741 case Rules.Number: { 5742 if (typeof elemValue !== "string") { 5743 this.setFieldInvalid(field, fieldRule); 5744 break; 5745 } 5746 if (elemValue === "") { 5747 break; 5748 } 5749 if (!isNumber(elemValue)) { 5750 this.setFieldInvalid(field, fieldRule); 5751 } 5752 break; 5753 } 5754 case Rules.MaxNumber: { 5755 if (ruleValue === void 0) { 5756 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. The field will be always invalid.`); 5757 this.setFieldInvalid(field, fieldRule); 5758 break; 5759 } 5760 if (typeof ruleValue !== "number") { 5761 console.error(`Value for ${fieldRule.rule} rule for [${field}] field should be a number. The field will be always invalid.`); 5762 this.setFieldInvalid(field, fieldRule); 5763 break; 5764 } 5765 if (typeof elemValue !== "string") { 5766 this.setFieldInvalid(field, fieldRule); 5767 break; 5768 } 5769 if (elemValue === "") { 5770 break; 5771 } 5772 const num = +elemValue; 5773 if (Number.isNaN(num) || isNumberMoreThanMax(num, ruleValue)) { 5774 this.setFieldInvalid(field, fieldRule); 5775 } 5776 break; 5777 } 5778 case Rules.MinNumber: { 5779 if (ruleValue === void 0) { 5780 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. The field will be always invalid.`); 5781 this.setFieldInvalid(field, fieldRule); 5782 break; 5783 } 5784 if (typeof ruleValue !== "number") { 5785 console.error(`Value for ${fieldRule.rule} rule for [${field}] field should be a number. The field will be always invalid.`); 5786 this.setFieldInvalid(field, fieldRule); 5787 break; 5788 } 5789 if (typeof elemValue !== "string") { 5790 this.setFieldInvalid(field, fieldRule); 5791 break; 5792 } 5793 if (elemValue === "") { 5794 break; 5795 } 5796 const num = +elemValue; 5797 if (Number.isNaN(num) || isNumberLessThanMin(num, ruleValue)) { 5798 this.setFieldInvalid(field, fieldRule); 5799 } 5800 break; 5801 } 5802 case Rules.CustomRegexp: { 5803 if (ruleValue === void 0) { 5804 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. This field will be always invalid.`); 5805 this.setFieldInvalid(field, fieldRule); 5806 return; 5807 } 5808 let regexp; 5809 try { 5810 regexp = new RegExp(ruleValue); 5811 } catch (e) { 5812 console.error(`Value for ${fieldRule.rule} rule for [${field}] should be a valid regexp. This field will be always invalid.`); 5813 this.setFieldInvalid(field, fieldRule); 5814 break; 5815 } 5816 const str = String(elemValue); 5817 if (str !== "" && !regexp.test(str)) { 5818 this.setFieldInvalid(field, fieldRule); 5819 } 5820 break; 5821 } 5822 case Rules.MinFilesCount: { 5823 if (ruleValue === void 0) { 5824 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. This field will be always invalid.`); 5825 this.setFieldInvalid(field, fieldRule); 5826 break; 5827 } 5828 if (typeof ruleValue !== "number") { 5829 console.error(`Value for ${fieldRule.rule} rule for [${field}] field should be a number. The field will be always invalid.`); 5830 this.setFieldInvalid(field, fieldRule); 5831 break; 5832 } 5833 if (Number.isFinite(elemValue == null ? void 0 : elemValue.length) && elemValue.length < ruleValue) { 5834 this.setFieldInvalid(field, fieldRule); 5835 break; 5836 } 5837 break; 5838 } 5839 case Rules.MaxFilesCount: { 5840 if (ruleValue === void 0) { 5841 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. This field will be always invalid.`); 5842 this.setFieldInvalid(field, fieldRule); 5843 break; 5844 } 5845 if (typeof ruleValue !== "number") { 5846 console.error(`Value for ${fieldRule.rule} rule for [${field}] field should be a number. The field will be always invalid.`); 5847 this.setFieldInvalid(field, fieldRule); 5848 break; 5849 } 5850 if (Number.isFinite(elemValue == null ? void 0 : elemValue.length) && elemValue.length > ruleValue) { 5851 this.setFieldInvalid(field, fieldRule); 5852 break; 5853 } 5854 break; 5855 } 5856 case Rules.Files: { 5857 if (ruleValue === void 0) { 5858 console.error(`Value for ${fieldRule.rule} rule for [${field}] field is not defined. This field will be always invalid.`); 5859 this.setFieldInvalid(field, fieldRule); 5860 return; 5861 } 5862 if (typeof ruleValue !== "object") { 5863 console.error(`Value for ${fieldRule.rule} rule for [${field}] field should be an object. This field will be always invalid.`); 5864 this.setFieldInvalid(field, fieldRule); 5865 return; 5866 } 5867 const filesConfig = ruleValue.files; 5868 if (typeof filesConfig !== "object") { 5869 console.error(`Value for ${fieldRule.rule} rule for [${field}] field should be an object with files array. This field will be always invalid.`); 5870 this.setFieldInvalid(field, fieldRule); 5871 return; 5872 } 5873 const isFilePropsInvalid = (file, fileConfig) => { 5874 const minSizeInvalid = Number.isFinite(fileConfig.minSize) && file.size < fileConfig.minSize; 5875 const maxSizeInvalid = Number.isFinite(fileConfig.maxSize) && file.size > fileConfig.maxSize; 5876 const nameInvalid = Array.isArray(fileConfig.names) && !fileConfig.names.includes(file.name); 5877 const extInvalid = Array.isArray(fileConfig.extensions) && !fileConfig.extensions.includes(file.name.split(".")[file.name.split(".").length - 1]); 5878 const typeInvalid = Array.isArray(fileConfig.types) && !fileConfig.types.includes(file.type); 5879 return minSizeInvalid || maxSizeInvalid || nameInvalid || extInvalid || typeInvalid; 5880 }; 5881 if (typeof elemValue === "object" && elemValue !== null) { 5882 for (let fileIdx = 0, len = elemValue.length; fileIdx < len; ++fileIdx) { 5883 const file = elemValue.item(fileIdx); 5884 if (!file) { 5885 this.setFieldInvalid(field, fieldRule); 5886 break; 5887 } 5888 const filesInvalid = isFilePropsInvalid(file, filesConfig); 5889 if (filesInvalid) { 5890 this.setFieldInvalid(field, fieldRule); 5891 break; 5892 } 5893 } 5894 } 5895 break; 5896 } 5897 default: { 5898 if (typeof fieldRule.validator !== "function") { 5899 console.error(`Validator for custom rule for [${field}] field should be a function. This field will be always invalid.`); 5900 this.setFieldInvalid(field, fieldRule); 5901 return; 5902 } 5903 const result = fieldRule.validator(elemValue, this.fields); 5904 if (typeof result !== "boolean" && typeof result !== "function") { 5905 console.error(`Validator return value for [${field}] field should be boolean or function. It will be cast to boolean.`); 5906 } 5907 if (typeof result === "function") { 5908 if (afterInputChanged) { 5909 this.fields[field].asyncCheckPending = true; 5910 } else { 5911 this.fields[field].asyncCheckPending = false; 5912 const promise = result(); 5913 if (!isPromise(promise)) { 5914 console.error(`Validator function for custom rule for [${field}] field should return a Promise. This field will be always invalid.`); 5915 this.setFieldInvalid(field, fieldRule); 5916 return; 5917 } 5918 return promise.then((resp) => { 5919 if (!resp) { 5920 this.setFieldInvalid(field, fieldRule); 5921 } 5922 }).catch(() => { 5923 this.setFieldInvalid(field, fieldRule); 5924 }); 5925 } 5926 } 5927 if (!result) { 5928 this.setFieldInvalid(field, fieldRule); 5929 } 5930 } 5931 } 5932 } 5933 validateField(fieldName, afterInputChanged = false) { 5934 var _a; 5935 const field = this.fields[fieldName]; 5936 field.isValid = true; 5937 const promises = []; 5938 [...field.rules].reverse().forEach((rule) => { 5939 const res = this.validateFieldRule(fieldName, field.elem, rule, afterInputChanged); 5940 if (isPromise(res)) { 5941 promises.push(res); 5942 } 5943 }); 5944 if (field.isValid) { 5945 this.setFieldValid(fieldName, (_a = field.config) == null ? void 0 : _a.successMessage); 5946 } 5947 return Promise.allSettled(promises); 5948 } 5949 revalidateField(field) { 5950 if (typeof field !== "string") { 5951 throw Error(`Field selector is not valid. Please specify a string selector.`); 5952 } 5953 if (!this.fields[field]) { 5954 console.error(`Field not found. Check the field selector.`); 5955 return Promise.reject(); 5956 } 5957 return new Promise((resolve) => { 5958 this.validateField(field, true).finally(() => { 5959 this.clearFieldStyle(field); 5960 this.clearFieldLabel(field); 5961 this.renderFieldError(field); 5962 resolve(!!this.fields[field].isValid); 5963 }); 5964 }); 5965 } 5966 validateGroup(groupName, group) { 5967 const promises = []; 5968 [...group.rules].reverse().forEach((rule) => { 5969 const res = this.validateGroupRule(groupName, group.elems, rule); 5970 if (isPromise(res)) { 5971 promises.push(res); 5972 } 5973 }); 5974 return Promise.allSettled(promises); 5975 } 5976 focusInvalidField() { 5977 for (const fieldName in this.fields) { 5978 const field = this.fields[fieldName]; 5979 if (!field.isValid) { 5980 setTimeout(() => field.elem.focus(), 0); 5981 break; 5982 } 5983 } 5984 } 5985 afterSubmitValidation(forceRevalidation = false) { 5986 this.renderErrors(forceRevalidation); 5987 if (this.globalConfig.focusInvalidField) { 5988 this.focusInvalidField(); 5989 } 5990 } 5991 validate(forceRevalidation = false) { 5992 return new Promise((resolve) => { 5993 const promises = []; 5994 Object.keys(this.fields).forEach((fieldName) => { 5995 const promise = this.validateField(fieldName); 5996 if (isPromise(promise)) { 5997 promises.push(promise); 5998 } 5999 }); 6000 Object.keys(this.groupFields).forEach((groupName) => { 6001 const group = this.groupFields[groupName]; 6002 const promise = this.validateGroup(groupName, group); 6003 if (isPromise(promise)) { 6004 promises.push(promise); 6005 } 6006 }); 6007 if (promises.length) { 6008 Promise.allSettled(promises).then(() => { 6009 this.afterSubmitValidation(forceRevalidation); 6010 resolve(true); 6011 }); 6012 } else { 6013 this.afterSubmitValidation(forceRevalidation); 6014 resolve(false); 6015 } 6016 }); 6017 } 6018 revalidate() { 6019 return new Promise((resolve) => { 6020 this.validateHandler(void 0, true).finally(() => { 6021 if (this.globalConfig.focusInvalidField) { 6022 this.focusInvalidField(); 6023 } 6024 resolve(this.isValid); 6025 }); 6026 }); 6027 } 6028 validateHandler(ev, forceRevalidation = false) { 6029 if (this.globalConfig.lockForm) { 6030 this.lockForm(); 6031 } 6032 return this.validate(forceRevalidation).finally(() => { 6033 var _a, _b; 6034 if (this.globalConfig.lockForm) { 6035 this.unlockForm(); 6036 } 6037 if (this.isValid) { 6038 (_a = this.onSuccessCallback) == null ? void 0 : _a.call(this, ev); 6039 } else { 6040 (_b = this.onFailCallback) == null ? void 0 : _b.call(this, this.fields, this.groupFields); 6041 } 6042 }); 6043 } 6044 setForm(form) { 6045 this.form = form; 6046 this.form.setAttribute("novalidate", "novalidate"); 6047 this.removeListener("submit", this.form, this.formSubmitHandler); 6048 this.addListener("submit", this.form, this.formSubmitHandler); 6049 } 6050 addListener(type, elem, handler) { 6051 elem.addEventListener(type, handler); 6052 this.eventListeners.push({ type, elem, func: handler }); 6053 } 6054 removeListener(type, elem, handler) { 6055 elem.removeEventListener(type, handler); 6056 this.eventListeners = this.eventListeners.filter((item) => item.type !== type || item.elem !== elem); 6057 } 6058 addField(field, rules, config) { 6059 if (typeof field !== "string") { 6060 throw Error(`Field selector is not valid. Please specify a string selector.`); 6061 } 6062 const elem = this.form.querySelector(field); 6063 if (!elem) { 6064 throw Error(`Field with ${field} selector not found! Please check the field selector.`); 6065 } 6066 if (!Array.isArray(rules) || !rules.length) { 6067 throw Error(`Rules argument for the field [${field}] should be an array and should contain at least 1 element.`); 6068 } 6069 rules.forEach((item) => { 6070 if (!("rule" in item || "validator" in item || "plugin" in item)) { 6071 throw Error(`Rules argument for the field [${field}] must contain at least one rule or validator property.`); 6072 } 6073 if (!item.validator && !item.plugin && (!item.rule || !Object.values(Rules).includes(item.rule))) { 6074 throw Error(`Rule should be one of these types: ${Object.values(Rules).join(", ")}. Provided value: ${item.rule}`); 6075 } 6076 }); 6077 this.fields[field] = { 6078 elem, 6079 rules, 6080 isValid: void 0, 6081 config 6082 }; 6083 this.setListeners(elem); 6084 if (this.isSubmitted) { 6085 this.validate(); 6086 } 6087 return this; 6088 } 6089 removeField(field) { 6090 if (typeof field !== "string") { 6091 throw Error(`Field selector is not valid. Please specify a string selector.`); 6092 } 6093 if (!this.fields[field]) { 6094 console.error(`Field not found. Check the field selector.`); 6095 return this; 6096 } 6097 const type = this.getListenerType(this.fields[field].elem.type); 6098 this.removeListener(type, this.fields[field].elem, this.handlerChange); 6099 this.clearErrors(); 6100 delete this.fields[field]; 6101 return this; 6102 } 6103 removeGroup(group) { 6104 if (typeof group !== "string") { 6105 throw Error(`Group selector is not valid. Please specify a string selector.`); 6106 } 6107 if (!this.groupFields[group]) { 6108 console.error(`Group not found. Check the group selector.`); 6109 return this; 6110 } 6111 this.groupFields[group].elems.forEach((elem) => { 6112 const type = this.getListenerType(elem.type); 6113 this.removeListener(type, elem, this.handlerChange); 6114 }); 6115 this.clearErrors(); 6116 delete this.groupFields[group]; 6117 return this; 6118 } 6119 addRequiredGroup(groupField, errorMessage, config, successMessage) { 6120 if (typeof groupField !== "string") { 6121 throw Error(`Group selector is not valid. Please specify a string selector.`); 6122 } 6123 const elem = this.form.querySelector(groupField); 6124 if (!elem) { 6125 throw Error(`Group with ${groupField} selector not found! Please check the group selector.`); 6126 } 6127 const inputs = elem.querySelectorAll("input"); 6128 const childrenInputs = Array.from(inputs).filter((input) => { 6129 const parent = getClosestParent(this.groupFields, getNodeParents(input)); 6130 if (!parent) { 6131 return true; 6132 } 6133 return parent[1].elems.find((elem2) => elem2 !== input); 6134 }); 6135 this.groupFields[groupField] = { 6136 rules: [ 6137 { 6138 rule: GroupRules.Required, 6139 errorMessage, 6140 successMessage 6141 } 6142 ], 6143 groupElem: elem, 6144 elems: childrenInputs, 6145 isDirty: false, 6146 isValid: void 0, 6147 config 6148 }; 6149 inputs.forEach((input) => { 6150 this.setListeners(input); 6151 }); 6152 return this; 6153 } 6154 getListenerType(type) { 6155 switch (type) { 6156 case "checkbox": 6157 case "select-one": 6158 case "file": 6159 case "radio": { 6160 return "change"; 6161 } 6162 default: { 6163 return "input"; 6164 } 6165 } 6166 } 6167 setListeners(elem) { 6168 const type = this.getListenerType(elem.type); 6169 this.removeListener(type, elem, this.handlerChange); 6170 this.addListener(type, elem, this.handlerChange); 6171 } 6172 clearFieldLabel(fieldName) { 6173 var _a, _b; 6174 (_a = this.errorLabels[fieldName]) == null ? void 0 : _a.remove(); 6175 (_b = this.successLabels[fieldName]) == null ? void 0 : _b.remove(); 6176 } 6177 clearFieldStyle(fieldName) { 6178 var _a, _b, _c, _d; 6179 const field = this.fields[fieldName]; 6180 const errorStyle = ((_a = field.config) == null ? void 0 : _a.errorFieldStyle) || this.globalConfig.errorFieldStyle; 6181 Object.keys(errorStyle).forEach((key) => { 6182 field.elem.style[key] = ""; 6183 }); 6184 const successStyle = ((_b = field.config) == null ? void 0 : _b.successFieldStyle) || this.globalConfig.successFieldStyle || {}; 6185 Object.keys(successStyle).forEach((key) => { 6186 field.elem.style[key] = ""; 6187 }); 6188 field.elem.classList.remove(...getClassList(((_c = field.config) == null ? void 0 : _c.errorFieldCssClass) || this.globalConfig.errorFieldCssClass), ...getClassList(((_d = field.config) == null ? void 0 : _d.successFieldCssClass) || this.globalConfig.successFieldCssClass)); 6189 } 6190 clearErrors() { 6191 var _a, _b; 6192 Object.keys(this.errorLabels).forEach((key) => this.errorLabels[key].remove()); 6193 Object.keys(this.successLabels).forEach((key) => this.successLabels[key].remove()); 6194 for (const fieldName in this.fields) { 6195 this.clearFieldStyle(fieldName); 6196 } 6197 for (const groupName in this.groupFields) { 6198 const group = this.groupFields[groupName]; 6199 const errorStyle = ((_a = group.config) == null ? void 0 : _a.errorFieldStyle) || this.globalConfig.errorFieldStyle; 6200 Object.keys(errorStyle).forEach((key) => { 6201 group.elems.forEach((elem) => { 6202 var _a2; 6203 elem.style[key] = ""; 6204 elem.classList.remove(...getClassList(((_a2 = group.config) == null ? void 0 : _a2.errorFieldCssClass) || this.globalConfig.errorFieldCssClass)); 6205 }); 6206 }); 6207 const successStyle = ((_b = group.config) == null ? void 0 : _b.successFieldStyle) || this.globalConfig.successFieldStyle || {}; 6208 Object.keys(successStyle).forEach((key) => { 6209 group.elems.forEach((elem) => { 6210 var _a2; 6211 elem.style[key] = ""; 6212 elem.classList.remove(...getClassList(((_a2 = group.config) == null ? void 0 : _a2.successFieldCssClass) || this.globalConfig.successFieldCssClass)); 6213 }); 6214 }); 6215 } 6216 this.tooltips = []; 6217 } 6218 isTooltip() { 6219 return !!this.globalConfig.tooltip; 6220 } 6221 lockForm() { 6222 const elems = this.form.querySelectorAll("input, textarea, button, select"); 6223 for (let i = 0, len = elems.length; i < len; ++i) { 6224 elems[i].setAttribute("data-just-validate-fallback-disabled", elems[i].disabled ? "true" : "false"); 6225 elems[i].setAttribute("disabled", "disabled"); 6226 elems[i].style.pointerEvents = "none"; 6227 elems[i].style.webkitFilter = "grayscale(100%)"; 6228 elems[i].style.filter = "grayscale(100%)"; 6229 } 6230 } 6231 unlockForm() { 6232 const elems = this.form.querySelectorAll("input, textarea, button, select"); 6233 for (let i = 0, len = elems.length; i < len; ++i) { 6234 if (elems[i].getAttribute("data-just-validate-fallback-disabled") !== "true") { 6235 elems[i].removeAttribute("disabled"); 6236 } 6237 elems[i].style.pointerEvents = ""; 6238 elems[i].style.webkitFilter = ""; 6239 elems[i].style.filter = ""; 6240 } 6241 } 6242 renderTooltip(elem, errorLabel, position) { 6243 var _a; 6244 const { top, left, width, height } = elem.getBoundingClientRect(); 6245 const errorLabelRect = errorLabel.getBoundingClientRect(); 6246 const pos = position || ((_a = this.globalConfig.tooltip) == null ? void 0 : _a.position); 6247 switch (pos) { 6248 case "left": { 6249 errorLabel.style.top = `${top + height / 2 - errorLabelRect.height / 2}px`; 6250 errorLabel.style.left = `${left - errorLabelRect.width - TOOLTIP_ARROW_HEIGHT}px`; 6251 break; 6252 } 6253 case "top": { 6254 errorLabel.style.top = `${top - errorLabelRect.height - TOOLTIP_ARROW_HEIGHT}px`; 6255 errorLabel.style.left = `${left + width / 2 - errorLabelRect.width / 2}px`; 6256 break; 6257 } 6258 case "right": { 6259 errorLabel.style.top = `${top + height / 2 - errorLabelRect.height / 2}px`; 6260 errorLabel.style.left = `${left + width + TOOLTIP_ARROW_HEIGHT}px`; 6261 break; 6262 } 6263 case "bottom": { 6264 errorLabel.style.top = `${top + height + TOOLTIP_ARROW_HEIGHT}px`; 6265 errorLabel.style.left = `${left + width / 2 - errorLabelRect.width / 2}px`; 6266 break; 6267 } 6268 } 6269 errorLabel.dataset.direction = pos; 6270 const refresh = () => { 6271 this.renderTooltip(elem, errorLabel, position); 6272 }; 6273 return { 6274 refresh 6275 }; 6276 } 6277 createErrorLabelElem(name, errorMessage, config) { 6278 const errorLabel = document.createElement("div"); 6279 errorLabel.innerHTML = errorMessage; 6280 const customErrorLabelStyle = this.isTooltip() ? config == null ? void 0 : config.errorLabelStyle : (config == null ? void 0 : config.errorLabelStyle) || this.globalConfig.errorLabelStyle; 6281 Object.assign(errorLabel.style, customErrorLabelStyle); 6282 errorLabel.classList.add(...getClassList((config == null ? void 0 : config.errorLabelCssClass) || this.globalConfig.errorLabelCssClass), "just-validate-error-label"); 6283 if (this.isTooltip()) { 6284 errorLabel.dataset.tooltip = "true"; 6285 } 6286 if (this.globalConfig.testingMode) { 6287 errorLabel.dataset.testId = `error-label-${name}`; 6288 } 6289 this.errorLabels[name] = errorLabel; 6290 return errorLabel; 6291 } 6292 createSuccessLabelElem(name, successMessage, config) { 6293 if (successMessage === void 0) { 6294 return null; 6295 } 6296 const successLabel = document.createElement("div"); 6297 successLabel.innerHTML = successMessage; 6298 const customSuccessLabelStyle = (config == null ? void 0 : config.successLabelStyle) || this.globalConfig.successLabelStyle; 6299 Object.assign(successLabel.style, customSuccessLabelStyle); 6300 successLabel.classList.add(...getClassList((config == null ? void 0 : config.successLabelCssClass) || this.globalConfig.successLabelCssClass), "just-validate-success-label"); 6301 if (this.globalConfig.testingMode) { 6302 successLabel.dataset.testId = `success-label-${name}`; 6303 } 6304 this.successLabels[name] = successLabel; 6305 return successLabel; 6306 } 6307 renderErrorsContainer(label, errorsContainer) { 6308 const container = errorsContainer || this.globalConfig.errorsContainer; 6309 if (typeof container === "string") { 6310 const elem = this.form.querySelector(container); 6311 if (elem) { 6312 elem.appendChild(label); 6313 return true; 6314 } else { 6315 console.error(`Error container with ${container} selector not found. Errors will be rendered as usual`); 6316 } 6317 } 6318 if (container instanceof Element) { 6319 container.appendChild(label); 6320 return true; 6321 } 6322 if (container !== void 0) { 6323 console.error(`Error container not found. It should be a string or existing Element. Errors will be rendered as usual`); 6324 } 6325 return false; 6326 } 6327 renderGroupLabel(elem, label, errorsContainer, isSuccess) { 6328 if (!isSuccess) { 6329 const renderedInErrorsContainer = this.renderErrorsContainer(label, errorsContainer); 6330 if (renderedInErrorsContainer) { 6331 return; 6332 } 6333 } 6334 elem.appendChild(label); 6335 } 6336 renderFieldLabel(elem, label, errorsContainer, isSuccess) { 6337 var _a, _b, _c, _d, _e, _f, _g; 6338 if (!isSuccess) { 6339 const renderedInErrorsContainer = this.renderErrorsContainer(label, errorsContainer); 6340 if (renderedInErrorsContainer) { 6341 return; 6342 } 6343 } 6344 if (elem.type === "checkbox" || elem.type === "radio") { 6345 const labelElem = document.querySelector(`label[for="${elem.getAttribute("id")}"]`); 6346 if (((_b = (_a = elem.parentElement) == null ? void 0 : _a.tagName) == null ? void 0 : _b.toLowerCase()) === "label") { 6347 (_d = (_c = elem.parentElement) == null ? void 0 : _c.parentElement) == null ? void 0 : _d.appendChild(label); 6348 } else if (labelElem) { 6349 (_e = labelElem.parentElement) == null ? void 0 : _e.appendChild(label); 6350 } else { 6351 (_f = elem.parentElement) == null ? void 0 : _f.appendChild(label); 6352 } 6353 } else { 6354 (_g = elem.parentElement) == null ? void 0 : _g.appendChild(label); 6355 } 6356 } 6357 showLabels(fields, isError) { 6358 Object.keys(fields).forEach((fieldName, i) => { 6359 const error = fields[fieldName]; 6360 const field = this.fields[fieldName]; 6361 field.isValid = !isError; 6362 this.clearFieldStyle(fieldName); 6363 this.clearFieldLabel(fieldName); 6364 this.renderFieldError(fieldName, error); 6365 if (i === 0 && this.globalConfig.focusInvalidField) { 6366 setTimeout(() => field.elem.focus(), 0); 6367 } 6368 }); 6369 } 6370 showErrors(fields) { 6371 if (typeof fields !== "object") { 6372 throw Error("[showErrors]: Errors should be an object with key: value format"); 6373 } 6374 this.showLabels(fields, true); 6375 } 6376 showSuccessLabels(fields) { 6377 if (typeof fields !== "object") { 6378 throw Error("[showSuccessLabels]: Labels should be an object with key: value format"); 6379 } 6380 this.showLabels(fields, false); 6381 } 6382 renderFieldError(fieldName, message) { 6383 var _a, _b, _c, _d, _e, _f; 6384 const field = this.fields[fieldName]; 6385 if (field.isValid) { 6386 if (!field.asyncCheckPending) { 6387 const successLabel = this.createSuccessLabelElem(fieldName, message !== void 0 ? message : field.successMessage, field.config); 6388 if (successLabel) { 6389 this.renderFieldLabel(field.elem, successLabel, (_a = field.config) == null ? void 0 : _a.errorsContainer, true); 6390 } 6391 field.elem.classList.add(...getClassList(((_b = field.config) == null ? void 0 : _b.successFieldCssClass) || this.globalConfig.successFieldCssClass)); 6392 } 6393 return; 6394 } 6395 this.isValid = false; 6396 field.elem.classList.add(...getClassList(((_c = field.config) == null ? void 0 : _c.errorFieldCssClass) || this.globalConfig.errorFieldCssClass)); 6397 const errorLabel = this.createErrorLabelElem(fieldName, message !== void 0 ? message : field.errorMessage, field.config); 6398 this.renderFieldLabel(field.elem, errorLabel, (_d = field.config) == null ? void 0 : _d.errorsContainer); 6399 if (this.isTooltip()) { 6400 this.tooltips.push(this.renderTooltip(field.elem, errorLabel, (_f = (_e = field.config) == null ? void 0 : _e.tooltip) == null ? void 0 : _f.position)); 6401 } 6402 } 6403 renderErrors(forceRevalidation = false) { 6404 var _a, _b, _c, _d; 6405 if (!this.isSubmitted && !forceRevalidation) { 6406 return; 6407 } 6408 this.clearErrors(); 6409 this.isValid = true; 6410 for (const groupName in this.groupFields) { 6411 const group = this.groupFields[groupName]; 6412 if (group.isValid) { 6413 group.elems.forEach((elem) => { 6414 var _a2, _b2; 6415 Object.assign(elem.style, ((_a2 = group.config) == null ? void 0 : _a2.successFieldStyle) || this.globalConfig.successFieldStyle); 6416 elem.classList.add(...getClassList(((_b2 = group.config) == null ? void 0 : _b2.successFieldCssClass) || this.globalConfig.successFieldCssClass)); 6417 }); 6418 const successLabel = this.createSuccessLabelElem(groupName, group.successMessage, group.config); 6419 if (successLabel) { 6420 this.renderGroupLabel(group.groupElem, successLabel, (_a = group.config) == null ? void 0 : _a.errorsContainer, true); 6421 } 6422 continue; 6423 } 6424 this.isValid = false; 6425 group.elems.forEach((elem) => { 6426 var _a2, _b2; 6427 Object.assign(elem.style, ((_a2 = group.config) == null ? void 0 : _a2.errorFieldStyle) || this.globalConfig.errorFieldStyle); 6428 elem.classList.add(...getClassList(((_b2 = group.config) == null ? void 0 : _b2.errorFieldCssClass) || this.globalConfig.errorFieldCssClass)); 6429 }); 6430 const errorLabel = this.createErrorLabelElem(groupName, group.errorMessage, group.config); 6431 this.renderGroupLabel(group.groupElem, errorLabel, (_b = group.config) == null ? void 0 : _b.errorsContainer); 6432 if (this.isTooltip()) { 6433 this.tooltips.push(this.renderTooltip(group.groupElem, errorLabel, (_d = (_c = group.config) == null ? void 0 : _c.tooltip) == null ? void 0 : _d.position)); 6434 } 6435 } 6436 for (const fieldName in this.fields) { 6437 this.renderFieldError(fieldName); 6438 } 6439 } 6440 destroy() { 6441 this.eventListeners.forEach((event) => { 6442 this.removeListener(event.type, event.elem, event.func); 6443 }); 6444 Object.keys(this.customStyleTags).forEach((key) => { 6445 this.customStyleTags[key].remove(); 6446 }); 6447 this.clearErrors(); 6448 if (this.globalConfig.lockForm) { 6449 this.unlockForm(); 6450 } 6451 } 6452 refresh() { 6453 this.destroy(); 6454 if (!this.form) { 6455 console.error("Cannot initialize the library! Form is not defined"); 6456 } else { 6457 this.initialize(this.form, this.globalConfig); 6458 Object.keys(this.fields).forEach((key) => { 6459 this.addField(key, [...this.fields[key].rules], this.fields[key].config); 6460 }); 6461 } 6462 } 6463 setCurrentLocale(locale) { 6464 if (typeof locale !== "string" && locale !== void 0) { 6465 console.error("Current locale should be a string"); 6466 return; 6467 } 6468 this.currentLocale = locale; 6469 if (this.isSubmitted) { 6470 this.validate(); 6471 } 6472 } 6473 onSuccess(callback) { 6474 this.onSuccessCallback = callback; 6475 return this; 6476 } 6477 onFail(callback) { 6478 this.onFailCallback = callback; 6479 return this; 6480 } 6481} 6482 6483 6484 6485/***/ }), 6486
vendor: 352,754 bytes, lines 6487-17171
6487/***/ "./node_modules/mixitup/dist/mixitup.js": 6488/*!**********************************************!*\ 6489 !*** ./node_modules/mixitup/dist/mixitup.js ***! 6490 \**********************************************/ 6491/***/ ((module) => { 6492 6493/**! 6494 * MixItUp v3.3.1 6495 * A high-performance, dependency-free library for animated filtering, sorting and more 6496 * Build 94e0fbf6-cd0b-4987-b3c0-14b59b67b8a0 6497 * 6498 * @copyright Copyright 2014-2018 KunkaLabs Limited. 6499 * @author KunkaLabs Limited. 6500 * @link https://www.kunkalabs.com/mixitup/ 6501 * 6502 * @license Commercial use requires a commercial license. 6503 * https://www.kunkalabs.com/mixitup/licenses/ 6504 * 6505 * Non-commercial use permitted under same terms as CC BY-NC 3.0 license. 6506 * http://creativecommons.org/licenses/by-nc/3.0/ 6507 */ 6508 6509(function(window) { 6510 'use strict'; 6511 6512 var mixitup = null, 6513 h = null; 6514 6515 (function() { 6516 var VENDORS = ['webkit', 'moz', 'o', 'ms'], 6517 canary = window.document.createElement('div'), 6518 i = -1; 6519 6520 // window.requestAnimationFrame 6521 6522 for (i = 0; i < VENDORS.length && !window.requestAnimationFrame; i++) { 6523 window.requestAnimationFrame = window[VENDORS[i] + 'RequestAnimationFrame']; 6524 } 6525 6526 // Element.nextElementSibling 6527 6528 if (typeof canary.nextElementSibling === 'undefined') { 6529 Object.defineProperty(window.Element.prototype, 'nextElementSibling', { 6530 get: function() { 6531 var el = this.nextSibling; 6532 6533 while (el) { 6534 if (el.nodeType === 1) { 6535 return el; 6536 } 6537 6538 el = el.nextSibling; 6539 } 6540 6541 return null; 6542 } 6543 }); 6544 } 6545 6546 // Element.matches 6547 6548 (function(ElementPrototype) { 6549 ElementPrototype.matches = 6550 ElementPrototype.matches || 6551 ElementPrototype.machesSelector || 6552 ElementPrototype.mozMatchesSelector || 6553 ElementPrototype.msMatchesSelector || 6554 ElementPrototype.oMatchesSelector || 6555 ElementPrototype.webkitMatchesSelector || 6556 function (selector) { 6557 return Array.prototype.indexOf.call(this.parentElement.querySelectorAll(selector), this) > -1; 6558 }; 6559 })(window.Element.prototype); 6560 6561 // Object.keys 6562 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys 6563 6564 if (!Object.keys) { 6565 Object.keys = (function() { 6566 var hasOwnProperty = Object.prototype.hasOwnProperty, 6567 hasDontEnumBug = false, 6568 dontEnums = [], 6569 dontEnumsLength = -1; 6570 6571 hasDontEnumBug = !({ 6572 toString: null 6573 }) 6574 .propertyIsEnumerable('toString'); 6575 6576 dontEnums = [ 6577 'toString', 6578 'toLocaleString', 6579 'valueOf', 6580 'hasOwnProperty', 6581 'isPrototypeOf', 6582 'propertyIsEnumerable', 6583 'constructor' 6584 ]; 6585 6586 dontEnumsLength = dontEnums.length; 6587 6588 return function(obj) { 6589 var result = [], 6590 prop = '', 6591 i = -1; 6592 6593 if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { 6594 throw new TypeError('Object.keys called on non-object'); 6595 } 6596 6597 for (prop in obj) { 6598 if (hasOwnProperty.call(obj, prop)) { 6599 result.push(prop); 6600 } 6601 } 6602 6603 if (hasDontEnumBug) { 6604 for (i = 0; i < dontEnumsLength; i++) { 6605 if (hasOwnProperty.call(obj, dontEnums[i])) { 6606 result.push(dontEnums[i]); 6607 } 6608 } 6609 } 6610 6611 return result; 6612 }; 6613 }()); 6614 } 6615 6616 // Array.isArray 6617 // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray 6618 6619 if (!Array.isArray) { 6620 Array.isArray = function(arg) { 6621 return Object.prototype.toString.call(arg) === '[object Array]'; 6622 }; 6623 } 6624 6625 // Object.create 6626 // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/create 6627 6628 if (typeof Object.create !== 'function') { 6629 Object.create = (function(undefined) { 6630 var Temp = function() {}; 6631 6632 return function (prototype, propertiesObject) { 6633 if (prototype !== Object(prototype) && prototype !== null) { 6634 throw TypeError('Argument must be an object, or null'); 6635 } 6636 6637 Temp.prototype = prototype || {}; 6638 6639 var result = new Temp(); 6640 6641 Temp.prototype = null; 6642 6643 if (propertiesObject !== undefined) { 6644 Object.defineProperties(result, propertiesObject); 6645 } 6646 6647 if (prototype === null) { 6648 /* jshint ignore:start */ 6649 result.__proto__ = null; 6650 /* jshint ignore:end */ 6651 } 6652 6653 return result; 6654 }; 6655 })(); 6656 } 6657 6658 // String.prototyoe.trim 6659 6660 if (!String.prototype.trim) { 6661 String.prototype.trim = function() { 6662 return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); 6663 }; 6664 } 6665 6666 // Array.prototype.indexOf 6667 // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf 6668 6669 if (!Array.prototype.indexOf) { 6670 Array.prototype.indexOf = function(searchElement) { 6671 var n, k, t, len; 6672 6673 if (this === null) { 6674 throw new TypeError(); 6675 } 6676 6677 t = Object(this); 6678 6679 len = t.length >>> 0; 6680 6681 if (len === 0) { 6682 return -1; 6683 } 6684 6685 n = 0; 6686 6687 if (arguments.length > 1) { 6688 n = Number(arguments[1]); 6689 6690 if (n !== n) { 6691 n = 0; 6692 } else if (n !== 0 && n !== Infinity && n !== -Infinity) { 6693 n = (n > 0 || -1) * Math.floor(Math.abs(n)); 6694 } 6695 } 6696 6697 if (n >= len) { 6698 return -1; 6699 } 6700 6701 for (k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); k < len; k++) { 6702 if (k in t && t[k] === searchElement) { 6703 return k; 6704 } 6705 } 6706 6707 return -1; 6708 }; 6709 } 6710 6711 // Function.prototype.bind 6712 // https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind 6713 6714 if (!Function.prototype.bind) { 6715 Function.prototype.bind = function(oThis) { 6716 var aArgs, self, FNOP, fBound; 6717 6718 if (typeof this !== 'function') { 6719 throw new TypeError(); 6720 } 6721 6722 aArgs = Array.prototype.slice.call(arguments, 1); 6723 6724 self = this; 6725 6726 FNOP = function() {}; 6727 6728 fBound = function() { 6729 return self.apply(this instanceof FNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))); 6730 }; 6731 6732 if (this.prototype) { 6733 FNOP.prototype = this.prototype; 6734 } 6735 6736 fBound.prototype = new FNOP(); 6737 6738 return fBound; 6739 }; 6740 } 6741 6742 // Element.prototype.dispatchEvent 6743 6744 if (!window.Element.prototype.dispatchEvent) { 6745 window.Element.prototype.dispatchEvent = function(event) { 6746 try { 6747 return this.fireEvent('on' + event.type, event); 6748 } catch (err) {} 6749 }; 6750 } 6751 })(); 6752 6753 /** 6754 * The `mixitup()` "factory" function creates and returns individual instances 6755 * of MixItUp, known as "mixers", on which API methods can be called. 6756 * 6757 * When loading MixItUp via a script tag, the factory function is accessed 6758 * via the global variable `mixitup`. When using a module loading 6759 * system (e.g. ES2015, CommonJS, RequireJS), the factory function is 6760 * exported into your module when you require the MixItUp library. 6761 * 6762 * @example 6763 * mixitup(container [,config] [,foreignDoc]) 6764 * 6765 * @example <caption>Example 1: Creating a mixer instance with an element reference</caption> 6766 * var containerEl = document.querySelector('.container'); 6767 * 6768 * var mixer = mixitup(containerEl); 6769 * 6770 * @example <caption>Example 2: Creating a mixer instance with a selector string</caption> 6771 * var mixer = mixitup('.container'); 6772 * 6773 * @example <caption>Example 3: Passing a configuration object</caption> 6774 * var mixer = mixitup(containerEl, { 6775 * animation: { 6776 * effects: 'fade scale(0.5)' 6777 * } 6778 * }); 6779 * 6780 * @example <caption>Example 4: Passing an iframe reference</caption> 6781 * var mixer = mixitup(containerEl, config, foreignDocument); 6782 * 6783 * @global 6784 * @namespace 6785 * @public 6786 * @kind function 6787 * @since 3.0.0 6788 * @param {(Element|string)} container 6789 * A DOM element or selector string representing the container(s) on which to instantiate MixItUp. 6790 * @param {object} [config] 6791 * An optional "configuration object" used to customize the behavior of the MixItUp instance. 6792 * @param {object} [foreignDoc] 6793 * An optional reference to a `document`, which can be used to control a MixItUp instance in an iframe. 6794 * @return {mixitup.Mixer} 6795 * A "mixer" object holding the MixItUp instance. 6796 */ 6797 6798 mixitup = function(container, config, foreignDoc) { 6799 var el = null, 6800 returnCollection = false, 6801 instance = null, 6802 facade = null, 6803 doc = null, 6804 output = null, 6805 instances = [], 6806 id = '', 6807 elements = [], 6808 i = -1; 6809 6810 doc = foreignDoc || window.document; 6811 6812 if (returnCollection = arguments[3]) { 6813 // A non-documented 4th paramater enabling control of multiple instances 6814 6815 returnCollection = typeof returnCollection === 'boolean'; 6816 } 6817 6818 if (typeof container === 'string') { 6819 elements = doc.querySelectorAll(container); 6820 } else if (container && typeof container === 'object' && h.isElement(container, doc)) { 6821 elements = [container]; 6822 } else if (container && typeof container === 'object' && container.length) { 6823 // Although not documented, the container may also be an array-like list of 6824 // elements such as a NodeList or jQuery collection, is returnCollection is true 6825 6826 elements = container; 6827 } else { 6828 throw new Error(mixitup.messages.errorFactoryInvalidContainer()); 6829 } 6830 6831 if (elements.length < 1) { 6832 throw new Error(mixitup.messages.errorFactoryContainerNotFound()); 6833 } 6834 6835 for (i = 0; el = elements[i]; i++) { 6836 if (i > 0 && !returnCollection) break; 6837 6838 if (!el.id) { 6839 id = 'MixItUp' + h.randomHex(); 6840 6841 el.id = id; 6842 } else { 6843 id = el.id; 6844 } 6845 6846 if (mixitup.instances[id] instanceof mixitup.Mixer) { 6847 instance = mixitup.instances[id]; 6848 6849 if (!config || (config && config.debug && config.debug.showWarnings !== false)) { 6850 console.warn(mixitup.messages.warningFactoryPreexistingInstance()); 6851 } 6852 } else { 6853 instance = new mixitup.Mixer(); 6854 6855 instance.attach(el, doc, id, config); 6856 6857 mixitup.instances[id] = instance; 6858 } 6859 6860 facade = new mixitup.Facade(instance); 6861 6862 if (config && config.debug && config.debug.enable) { 6863 instances.push(instance); 6864 } else { 6865 instances.push(facade); 6866 } 6867 } 6868 6869 if (returnCollection) { 6870 output = new mixitup.Collection(instances); 6871 } else { 6872 // Return the first instance regardless 6873 6874 output = instances[0]; 6875 } 6876 6877 return output; 6878 }; 6879 6880 /** 6881 * The `.use()` static method is used to extend the functionality of mixitup with compatible 6882 * extensions and libraries in an environment with modular scoping e.g. ES2015, CommonJS, or RequireJS. 6883 * 6884 * You need only call the `.use()` function once per project, per extension, as module loaders 6885 * will cache a single reference to MixItUp inclusive of all changes made. 6886 * 6887 * @example 6888 * mixitup.use(extension) 6889 * 6890 * @example <caption>Example 1: Extending MixItUp with the Pagination Extension</caption> 6891 * 6892 * import mixitup from 'mixitup'; 6893 * import mixitupPagination from 'mixitup-pagination'; 6894 * 6895 * mixitup.use(mixitupPagination); 6896 * 6897 * // All mixers created by the factory function in all modules will now 6898 * // have pagination functionality 6899 * 6900 * var mixer = mixitup('.container'); 6901 * 6902 * @public 6903 * @name use 6904 * @memberof mixitup 6905 * @kind function 6906 * @static 6907 * @since 3.0.0 6908 * @param {*} extension A reference to the extension or library to be used. 6909 * @return {void} 6910 */ 6911 6912 mixitup.use = function(extension) { 6913 mixitup.Base.prototype.callActions.call(mixitup, 'beforeUse', arguments); 6914 6915 // Call the extension's factory function, passing 6916 // the mixitup factory as a paramater 6917 6918 if (typeof extension === 'function' && extension.TYPE === 'mixitup-extension') { 6919 // Mixitup extension 6920 6921 if (typeof mixitup.extensions[extension.NAME] === 'undefined') { 6922 extension(mixitup); 6923 6924 mixitup.extensions[extension.NAME] = extension; 6925 } 6926 } else if (extension.fn && extension.fn.jquery) { 6927 // jQuery 6928 6929 mixitup.libraries.$ = extension; 6930 } 6931 6932 mixitup.Base.prototype.callActions.call(mixitup, 'afterUse', arguments); 6933 }; 6934 6935 mixitup.instances = {}; 6936 mixitup.extensions = {}; 6937 mixitup.libraries = {}; 6938 6939 /** 6940 * @private 6941 */ 6942 6943 h = { 6944 6945 /** 6946 * @private 6947 * @param {HTMLElement} el 6948 * @param {string} cls 6949 * @return {boolean} 6950 */ 6951 6952 hasClass: function(el, cls) { 6953 return !!el.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')); 6954 }, 6955 6956 /** 6957 * @private 6958 * @param {HTMLElement} el 6959 * @param {string} cls 6960 * @return {void} 6961 */ 6962 6963 addClass: function(el, cls) { 6964 if (!this.hasClass(el, cls)) el.className += el.className ? ' ' + cls : cls; 6965 }, 6966 6967 /** 6968 * @private 6969 * @param {HTMLElement} el 6970 * @param {string} cls 6971 * @return {void} 6972 */ 6973 6974 removeClass: function(el, cls) { 6975 if (this.hasClass(el, cls)) { 6976 var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)'); 6977 6978 el.className = el.className.replace(reg, ' ').trim(); 6979 } 6980 }, 6981 6982 /** 6983 * Merges the properties of the source object onto the 6984 * target object. Alters the target object. 6985 * 6986 * @private 6987 * @param {object} destination 6988 * @param {object} source 6989 * @param {boolean} [deep=false] 6990 * @param {boolean} [handleErrors=false] 6991 * @return {void} 6992 */ 6993 6994 extend: function(destination, source, deep, handleErrors) { 6995 var sourceKeys = [], 6996 key = '', 6997 i = -1; 6998 6999 deep = deep || false; 7000 handleErrors = handleErrors || false; 7001 7002 try { 7003 if (Array.isArray(source)) { 7004 for (i = 0; i < source.length; i++) { 7005 sourceKeys.push(i); 7006 } 7007 } else if (source) { 7008 sourceKeys = Object.keys(source); 7009 } 7010 7011 for (i = 0; i < sourceKeys.length; i++) { 7012 key = sourceKeys[i]; 7013 7014 if (!deep || typeof source[key] !== 'object' || this.isElement(source[key])) { 7015 // All non-object properties, or all properties if shallow extend 7016 7017 destination[key] = source[key]; 7018 } else if (Array.isArray(source[key])) { 7019 // Arrays 7020 7021 if (!destination[key]) { 7022 destination[key] = []; 7023 } 7024 7025 this.extend(destination[key], source[key], deep, handleErrors); 7026 } else { 7027 // Objects 7028 7029 if (!destination[key]) { 7030 destination[key] = {}; 7031 } 7032 7033 this.extend(destination[key], source[key], deep, handleErrors); 7034 } 7035 } 7036 } catch(err) { 7037 if (handleErrors) { 7038 this.handleExtendError(err, destination); 7039 } else { 7040 throw err; 7041 } 7042 } 7043 7044 return destination; 7045 }, 7046 7047 /** 7048 * @private 7049 * @param {Error} err 7050 * @param {object} destination 7051 * @return {void} 7052 */ 7053 7054 handleExtendError: function(err, destination) { 7055 var re = /property "?(\w*)"?[,:] object/i, 7056 matches = null, 7057 erroneous = '', 7058 message = '', 7059 suggestion = '', 7060 probableMatch = '', 7061 key = '', 7062 mostMatchingChars = -1, 7063 i = -1; 7064 7065 if (err instanceof TypeError && (matches = re.exec(err.message))) { 7066 erroneous = matches[1]; 7067 7068 for (key in destination) { 7069 i = 0; 7070 7071 while (i < erroneous.length && erroneous.charAt(i) === key.charAt(i)) { 7072 i++; 7073 } 7074 7075 if (i > mostMatchingChars) { 7076 mostMatchingChars = i; 7077 probableMatch = key; 7078 } 7079 } 7080 7081 if (mostMatchingChars > 1) { 7082 suggestion = mixitup.messages.errorConfigInvalidPropertySuggestion({ 7083 probableMatch: probableMatch 7084 }); 7085 } 7086 7087 message = mixitup.messages.errorConfigInvalidProperty({ 7088 erroneous: erroneous, 7089 suggestion: suggestion 7090 }); 7091 7092 throw new TypeError(message); 7093 } 7094 7095 throw err; 7096 }, 7097 7098 /** 7099 * @private 7100 * @param {string} str 7101 * @return {function} 7102 */ 7103 7104 template: function(str) { 7105 var re = /\${([\w]*)}/g, 7106 dynamics = {}, 7107 matches = null; 7108 7109 while ((matches = re.exec(str))) { 7110 dynamics[matches[1]] = new RegExp('\\${' + matches[1] + '}', 'g'); 7111 } 7112 7113 return function(data) { 7114 var key = '', 7115 output = str; 7116 7117 data = data || {}; 7118 7119 for (key in dynamics) { 7120 output = output.replace(dynamics[key], typeof data[key] !== 'undefined' ? data[key] : ''); 7121 } 7122 7123 return output; 7124 }; 7125 }, 7126 7127 /** 7128 * @private 7129 * @param {HTMLElement} el 7130 * @param {string} type 7131 * @param {function} fn 7132 * @param {boolean} useCapture 7133 * @return {void} 7134 */ 7135 7136 on: function(el, type, fn, useCapture) { 7137 if (!el) return; 7138 7139 if (el.addEventListener) { 7140 el.addEventListener(type, fn, useCapture); 7141 } else if (el.attachEvent) { 7142 el['e' + type + fn] = fn; 7143 7144 el[type + fn] = function() { 7145 el['e' + type + fn](window.event); 7146 }; 7147 7148 el.attachEvent('on' + type, el[type + fn]); 7149 } 7150 }, 7151 7152 /** 7153 * @private 7154 * @param {HTMLElement} el 7155 * @param {string} type 7156 * @param {function} fn 7157 * @return {void} 7158 */ 7159 7160 off: function(el, type, fn) { 7161 if (!el) return; 7162 7163 if (el.removeEventListener) { 7164 el.removeEventListener(type, fn, false); 7165 } else if (el.detachEvent) { 7166 el.detachEvent('on' + type, el[type + fn]); 7167 el[type + fn] = null; 7168 } 7169 }, 7170 7171 /** 7172 * @private 7173 * @param {string} eventType 7174 * @param {object} detail 7175 * @param {Document} [doc] 7176 * @return {CustomEvent} 7177 */ 7178 7179 getCustomEvent: function(eventType, detail, doc) { 7180 var event = null; 7181 7182 doc = doc || window.document; 7183 7184 if (typeof window.CustomEvent === 'function') { 7185 event = new window.CustomEvent(eventType, { 7186 detail: detail, 7187 bubbles: true, 7188 cancelable: true 7189 }); 7190 } else if (typeof doc.createEvent === 'function') { 7191 event = doc.createEvent('CustomEvent'); 7192 event.initCustomEvent(eventType, true, true, detail); 7193 } else { 7194 event = doc.createEventObject(), 7195 event.type = eventType; 7196 7197 event.returnValue = false; 7198 event.cancelBubble = false; 7199 event.detail = detail; 7200 } 7201 7202 return event; 7203 }, 7204 7205 /** 7206 * @private 7207 * @param {Event} e 7208 * @return {Event} 7209 */ 7210 7211 getOriginalEvent: function(e) { 7212 if (e.touches && e.touches.length) { 7213 return e.touches[0]; 7214 } else if (e.changedTouches && e.changedTouches.length) { 7215 return e.changedTouches[0]; 7216 } else { 7217 return e; 7218 } 7219 }, 7220 7221 /** 7222 * @private 7223 * @param {HTMLElement} el 7224 * @param {string} selector 7225 * @return {Number} 7226 */ 7227 7228 index: function(el, selector) { 7229 var i = 0; 7230 7231 while ((el = el.previousElementSibling) !== null) { 7232 if (!selector || el.matches(selector)) { 7233 ++i; 7234 } 7235 } 7236 7237 return i; 7238 }, 7239 7240 /** 7241 * Converts a dash or snake-case string to camel case. 7242 * 7243 * @private 7244 * @param {string} str 7245 * @param {boolean} [isPascal] 7246 * @return {string} 7247 */ 7248 7249 camelCase: function(str) { 7250 return str.toLowerCase().replace(/([_-][a-z])/g, function($1) { 7251 return $1.toUpperCase().replace(/[_-]/, ''); 7252 }); 7253 }, 7254 7255 /** 7256 * Converts a dash or snake-case string to pascal case. 7257 * 7258 * @private 7259 * @param {string} str 7260 * @param {boolean} [isPascal] 7261 * @return {string} 7262 */ 7263 7264 pascalCase: function(str) { 7265 return (str = this.camelCase(str)).charAt(0).toUpperCase() + str.slice(1); 7266 }, 7267 7268 /** 7269 * Converts a camel or pascal-case string to dash case. 7270 * 7271 * @private 7272 * @param {string} str 7273 * @return {string} 7274 */ 7275 7276 dashCase: function(str) { 7277 return str.replace(/([A-Z])/g, '-$1').replace(/^-/, '').toLowerCase(); 7278 }, 7279 7280 /** 7281 * @private 7282 * @param {HTMLElement} el 7283 * @param {HTMLHtmlElement} [doc] 7284 * @return {boolean} 7285 */ 7286 7287 isElement: function(el, doc) { 7288 doc = doc || window.document; 7289 7290 if ( 7291 window.HTMLElement && 7292 el instanceof window.HTMLElement 7293 ) { 7294 return true; 7295 } else if ( 7296 doc.defaultView && 7297 doc.defaultView.HTMLElement && 7298 el instanceof doc.defaultView.HTMLElement 7299 ) { 7300 return true; 7301 } else { 7302 return ( 7303 el !== null && 7304 el.nodeType === 1 && 7305 typeof el.nodeName === 'string' 7306 ); 7307 } 7308 }, 7309 7310 /** 7311 * @private 7312 * @param {string} htmlString 7313 * @param {HTMLHtmlElement} [doc] 7314 * @return {DocumentFragment} 7315 */ 7316 7317 createElement: function(htmlString, doc) { 7318 var frag = null, 7319 temp = null; 7320 7321 doc = doc || window.document; 7322 7323 frag = doc.createDocumentFragment(); 7324 temp = doc.createElement('div'); 7325 7326 temp.innerHTML = htmlString.trim(); 7327 7328 while (temp.firstChild) { 7329 frag.appendChild(temp.firstChild); 7330 } 7331 7332 return frag; 7333 }, 7334 7335 /** 7336 * @private 7337 * @param {Node} node 7338 * @return {void} 7339 */ 7340 7341 removeWhitespace: function(node) { 7342 var deleting; 7343 7344 while (node && node.nodeName === '#text') { 7345 deleting = node; 7346 7347 node = node.previousSibling; 7348 7349 deleting.parentElement && deleting.parentElement.removeChild(deleting); 7350 } 7351 }, 7352 7353 /** 7354 * @private 7355 * @param {Array<*>} a 7356 * @param {Array<*>} b 7357 * @return {boolean} 7358 */ 7359 7360 isEqualArray: function(a, b) { 7361 var i = a.length; 7362 7363 if (i !== b.length) return false; 7364 7365 while (i--) { 7366 if (a[i] !== b[i]) return false; 7367 } 7368 7369 return true; 7370 }, 7371 7372 /** 7373 * @private 7374 * @param {object} a 7375 * @param {object} b 7376 * @return {boolean} 7377 */ 7378 7379 deepEquals: function(a, b) { 7380 var key; 7381 7382 if (typeof a === 'object' && a && typeof b === 'object' && b) { 7383 if (Object.keys(a).length !== Object.keys(b).length) return false; 7384 7385 for (key in a) { 7386 if (!b.hasOwnProperty(key) || !this.deepEquals(a[key], b[key])) return false; 7387 } 7388 } else if (a !== b) { 7389 return false; 7390 } 7391 7392 return true; 7393 }, 7394 7395 /** 7396 * @private 7397 * @param {Array<*>} oldArray 7398 * @return {Array<*>} 7399 */ 7400 7401 arrayShuffle: function(oldArray) { 7402 var newArray = oldArray.slice(), 7403 len = newArray.length, 7404 i = len, 7405 p = -1, 7406 t = []; 7407 7408 while (i--) { 7409 p = ~~(Math.random() * len); 7410 t = newArray[i]; 7411 7412 newArray[i] = newArray[p]; 7413 newArray[p] = t; 7414 } 7415 7416 return newArray; 7417 }, 7418 7419 /** 7420 * @private 7421 * @param {object} list 7422 */ 7423 7424 arrayFromList: function(list) { 7425 var output, i; 7426 7427 try { 7428 return Array.prototype.slice.call(list); 7429 } catch(err) { 7430 output = []; 7431 7432 for (i = 0; i < list.length; i++) { 7433 output.push(list[i]); 7434 } 7435 7436 return output; 7437 } 7438 }, 7439 7440 /** 7441 * @private 7442 * @param {function} func 7443 * @param {Number} wait 7444 * @param {boolean} immediate 7445 * @return {function} 7446 */ 7447 7448 debounce: function(func, wait, immediate) { 7449 var timeout; 7450 7451 return function() { 7452 var self = this, 7453 args = arguments, 7454 callNow = immediate && !timeout, 7455 later = null; 7456 7457 later = function() { 7458 timeout = null; 7459 7460 if (!immediate) { 7461 func.apply(self, args); 7462 } 7463 }; 7464 7465 clearTimeout(timeout); 7466 7467 timeout = setTimeout(later, wait); 7468 7469 if (callNow) func.apply(self, args); 7470 }; 7471 }, 7472 7473 /** 7474 * @private 7475 * @param {HTMLElement} element 7476 * @return {object} 7477 */ 7478 7479 position: function(element) { 7480 var xPosition = 0, 7481 yPosition = 0, 7482 offsetParent = element; 7483 7484 while (element) { 7485 xPosition -= element.scrollLeft; 7486 yPosition -= element.scrollTop; 7487 7488 if (element === offsetParent) { 7489 xPosition += element.offsetLeft; 7490 yPosition += element.offsetTop; 7491 7492 offsetParent = element.offsetParent; 7493 } 7494 7495 element = element.parentElement; 7496 } 7497 7498 return { 7499 x: xPosition, 7500 y: yPosition 7501 }; 7502 }, 7503 7504 /** 7505 * @private 7506 * @param {object} node1 7507 * @param {object} node2 7508 * @return {Number} 7509 */ 7510 7511 getHypotenuse: function(node1, node2) { 7512 var distanceX = node1.x - node2.x, 7513 distanceY = node1.y - node2.y; 7514 7515 distanceX = distanceX < 0 ? distanceX * -1 : distanceX, 7516 distanceY = distanceY < 0 ? distanceY * -1 : distanceY; 7517 7518 return Math.sqrt(Math.pow(distanceX, 2) + Math.pow(distanceY, 2)); 7519 }, 7520 7521 /** 7522 * Calcuates the area of intersection between two rectangles and expresses it as 7523 * a ratio in comparison to the area of the first rectangle. 7524 * 7525 * @private 7526 * @param {Rect} box1 7527 * @param {Rect} box2 7528 * @return {number} 7529 */ 7530 7531 getIntersectionRatio: function(box1, box2) { 7532 var controlArea = box1.width * box1.height, 7533 intersectionX = -1, 7534 intersectionY = -1, 7535 intersectionArea = -1, 7536 ratio = -1; 7537 7538 intersectionX = 7539 Math.max(0, Math.min(box1.left + box1.width, box2.left + box2.width) - Math.max(box1.left, box2.left)); 7540 7541 intersectionY = 7542 Math.max(0, Math.min(box1.top + box1.height, box2.top + box2.height) - Math.max(box1.top, box2.top)); 7543 7544 intersectionArea = intersectionY * intersectionX; 7545 7546 ratio = intersectionArea / controlArea; 7547 7548 return ratio; 7549 }, 7550 7551 /** 7552 * @private 7553 * @param {object} el 7554 * @param {string} selector 7555 * @param {boolean} [includeSelf] 7556 * @param {HTMLHtmlElement} [doc] 7557 * @return {Element|null} 7558 */ 7559 7560 closestParent: function(el, selector, includeSelf, doc) { 7561 var parent = el.parentNode; 7562 7563 doc = doc || window.document; 7564 7565 if (includeSelf && el.matches(selector)) { 7566 return el; 7567 } 7568 7569 while (parent && parent != doc.body) { 7570 if (parent.matches && parent.matches(selector)) { 7571 return parent; 7572 } else if (parent.parentNode) { 7573 parent = parent.parentNode; 7574 } else { 7575 return null; 7576 } 7577 } 7578 7579 return null; 7580 }, 7581 7582 /** 7583 * @private 7584 * @param {HTMLElement} el 7585 * @param {string} selector 7586 * @param {HTMLHtmlElement} [doc] 7587 * @return {NodeList} 7588 */ 7589 7590 children: function(el, selector, doc) { 7591 var children = [], 7592 tempId = ''; 7593 7594 doc = doc || window.doc; 7595 7596 if (el) { 7597 if (!el.id) { 7598 tempId = 'Temp' + this.randomHexKey(); 7599 7600 el.id = tempId; 7601 } 7602 7603 children = doc.querySelectorAll('#' + el.id + ' > ' + selector); 7604 7605 if (tempId) { 7606 el.removeAttribute('id'); 7607 } 7608 } 7609 7610 return children; 7611 }, 7612 7613 /** 7614 * Creates a clone of a provided array, with any empty strings removed. 7615 * 7616 * @private 7617 * @param {Array<*>} originalArray 7618 * @return {Array<*>} 7619 */ 7620 7621 clean: function(originalArray) { 7622 var cleanArray = [], 7623 i = -1; 7624 7625 for (i = 0; i < originalArray.length; i++) { 7626 if (originalArray[i] !== '') { 7627 cleanArray.push(originalArray[i]); 7628 } 7629 } 7630 7631 return cleanArray; 7632 }, 7633 7634 /** 7635 * Abstracts an ES6 promise into a q-like deferred interface for storage and deferred resolution. 7636 * 7637 * @private 7638 * @param {object} libraries 7639 * @return {h.Deferred} 7640 */ 7641 7642 defer: function(libraries) { 7643 var deferred = null, 7644 promiseWrapper = null, 7645 $ = null; 7646 7647 promiseWrapper = new this.Deferred(); 7648 7649 if (mixitup.features.has.promises) { 7650 // ES6 native promise or polyfill 7651 7652 promiseWrapper.promise = new Promise(function(resolve, reject) { 7653 promiseWrapper.resolve = resolve; 7654 promiseWrapper.reject = reject; 7655 }); 7656 } else if (($ = (window.jQuery || libraries.$)) && typeof $.Deferred === 'function') { 7657 // jQuery 7658 7659 deferred = $.Deferred(); 7660 7661 promiseWrapper.promise = deferred.promise(); 7662 promiseWrapper.resolve = deferred.resolve; 7663 promiseWrapper.reject = deferred.reject; 7664 } else if (window.console) { 7665 // No implementation 7666 7667 console.warn(mixitup.messages.warningNoPromiseImplementation()); 7668 } 7669 7670 return promiseWrapper; 7671 }, 7672 7673 /** 7674 * @private 7675 * @param {Array<Promise>} tasks 7676 * @param {object} libraries 7677 * @return {Promise<Array>} 7678 */ 7679 7680 all: function(tasks, libraries) { 7681 var $ = null; 7682 7683 if (mixitup.features.has.promises) { 7684 return Promise.all(tasks); 7685 } else if (($ = (window.jQuery || libraries.$)) && typeof $.when === 'function') { 7686 return $.when.apply($, tasks) 7687 .done(function() { 7688 // jQuery when returns spread arguments rather than an array or resolutions 7689 7690 return arguments; 7691 }); 7692 } 7693 7694 // No implementation 7695 7696 if (window.console) { 7697 console.warn(mixitup.messages.warningNoPromiseImplementation()); 7698 } 7699 7700 return []; 7701 }, 7702 7703 /** 7704 * @private 7705 * @param {HTMLElement} el 7706 * @param {string} property 7707 * @param {Array<string>} vendors 7708 * @return {string} 7709 */ 7710 7711 getPrefix: function(el, property, vendors) { 7712 var i = -1, 7713 prefix = ''; 7714 7715 if (h.dashCase(property) in el.style) return ''; 7716 7717 for (i = 0; prefix = vendors[i]; i++) { 7718 if (prefix + property in el.style) { 7719 return prefix.toLowerCase(); 7720 } 7721 } 7722 7723 return 'unsupported'; 7724 }, 7725 7726 /** 7727 * @private 7728 * @return {string} 7729 */ 7730 7731 randomHex: function() { 7732 return ('00000' + (Math.random() * 16777216 << 0).toString(16)).substr(-6).toUpperCase(); 7733 }, 7734 7735 /** 7736 * @private 7737 * @param {HTMLDocument} [doc] 7738 * @return {object} 7739 */ 7740 7741 getDocumentState: function(doc) { 7742 doc = typeof doc.body === 'object' ? doc : window.document; 7743 7744 return { 7745 scrollTop: window.pageYOffset, 7746 scrollLeft: window.pageXOffset, 7747 docHeight: doc.documentElement.scrollHeight, 7748 docWidth: doc.documentElement.scrollWidth, 7749 viewportHeight: doc.documentElement.clientHeight, 7750 viewportWidth: doc.documentElement.clientWidth 7751 }; 7752 }, 7753 7754 /** 7755 * @private 7756 * @param {object} obj 7757 * @param {function} fn 7758 * @return {function} 7759 */ 7760 7761 bind: function(obj, fn) { 7762 return function() { 7763 return fn.apply(obj, arguments); 7764 }; 7765 }, 7766 7767 /** 7768 * @private 7769 * @param {HTMLElement} el 7770 * @return {boolean} 7771 */ 7772 7773 isVisible: function(el) { 7774 var styles = null; 7775 7776 if (el.offsetParent) return true; 7777 7778 styles = window.getComputedStyle(el); 7779 7780 if ( 7781 styles.position === 'fixed' && 7782 styles.visibility !== 'hidden' && 7783 styles.opacity !== '0' 7784 ) { 7785 // Fixed elements report no offsetParent, 7786 // but may still be invisible 7787 7788 return true; 7789 } 7790 7791 return false; 7792 }, 7793 7794 /** 7795 * @private 7796 * @param {object} obj 7797 */ 7798 7799 seal: function(obj) { 7800 if (typeof Object.seal === 'function') { 7801 Object.seal(obj); 7802 } 7803 }, 7804 7805 /** 7806 * @private 7807 * @param {object} obj 7808 */ 7809 7810 freeze: function(obj) { 7811 if (typeof Object.freeze === 'function') { 7812 Object.freeze(obj); 7813 } 7814 }, 7815 7816 /** 7817 * @private 7818 * @param {string} control 7819 * @param {string} specimen 7820 * @return {boolean} 7821 */ 7822 7823 compareVersions: function(control, specimen) { 7824 var controlParts = control.split('.'), 7825 specimenParts = specimen.split('.'), 7826 controlPart = -1, 7827 specimenPart = -1, 7828 i = -1; 7829 7830 for (i = 0; i < controlParts.length; i++) { 7831 controlPart = parseInt(controlParts[i].replace(/[^\d.]/g, '')); 7832 specimenPart = parseInt(specimenParts[i].replace(/[^\d.]/g, '') || 0); 7833 7834 if (specimenPart < controlPart) { 7835 return false; 7836 } else if (specimenPart > controlPart) { 7837 return true; 7838 } 7839 } 7840 7841 return true; 7842 }, 7843 7844 /** 7845 * @private 7846 * @constructor 7847 */ 7848 7849 Deferred: function() { 7850 this.promise = null; 7851 this.resolve = null; 7852 this.reject = null; 7853 this.id = h.randomHex(); 7854 }, 7855 7856 /** 7857 * @private 7858 * @param {object} obj 7859 * @return {boolean} 7860 */ 7861 7862 isEmptyObject: function(obj) { 7863 var key = ''; 7864 7865 if (typeof Object.keys === 'function') { 7866 return Object.keys(obj).length === 0; 7867 } 7868 7869 for (key in obj) { 7870 if (obj.hasOwnProperty(key)) { 7871 return false; 7872 } 7873 } 7874 7875 return true; 7876 }, 7877 7878 /** 7879 * @param {mixitup.Config.ClassNames} classNames 7880 * @param {string} elementName 7881 * @param {string} [modifier] 7882 * @return {string} 7883 */ 7884 7885 getClassname: function(classNames, elementName, modifier) { 7886 var classname = ''; 7887 7888 classname += classNames.block; 7889 7890 if (classname.length) { 7891 classname += classNames.delineatorElement; 7892 } 7893 7894 classname += classNames['element' + this.pascalCase(elementName)]; 7895 7896 if (!modifier) return classname; 7897 7898 if (classname.length) { 7899 classname += classNames.delineatorModifier; 7900 } 7901 7902 classname += modifier; 7903 7904 return classname; 7905 }, 7906 7907 /** 7908 * Returns the value of a property on a given object via its string key. 7909 * 7910 * @param {object} obj 7911 * @param {string} stringKey 7912 * @return {*} value 7913 */ 7914 7915 getProperty: function(obj, stringKey) { 7916 var parts = stringKey.split('.'), 7917 returnCurrent = null, 7918 current = '', 7919 i = 0; 7920 7921 if (!stringKey) { 7922 return obj; 7923 } 7924 7925 returnCurrent = function(obj) { 7926 if (!obj) { 7927 return null; 7928 } else { 7929 return obj[current]; 7930 } 7931 }; 7932 7933 while (i < parts.length) { 7934 current = parts[i]; 7935 7936 obj = returnCurrent(obj); 7937 7938 i++; 7939 } 7940 7941 if (typeof obj !== 'undefined') { 7942 return obj; 7943 } else { 7944 return null; 7945 } 7946 } 7947 }; 7948 7949 mixitup.h = h; 7950 7951 /** 7952 * The Base class adds instance methods to all other extensible MixItUp classes, 7953 * enabling the calling of any registered hooks. 7954 * 7955 * @constructor 7956 * @namespace 7957 * @memberof mixitup 7958 * @private 7959 * @since 3.0.0 7960 */ 7961 7962 mixitup.Base = function() {}; 7963 7964 mixitup.Base.prototype = { 7965 constructor: mixitup.Base, 7966 7967 /** 7968 * Calls any registered hooks for the provided action. 7969 * 7970 * @memberof mixitup.Base 7971 * @private 7972 * @instance 7973 * @since 2.0.0 7974 * @param {string} actionName 7975 * @param {Array<*>} args 7976 * @return {void} 7977 */ 7978 7979 callActions: function(actionName, args) { 7980 var self = this, 7981 hooks = self.constructor.actions[actionName], 7982 extensionName = ''; 7983 7984 if (!hooks || h.isEmptyObject(hooks)) return; 7985 7986 for (extensionName in hooks) { 7987 hooks[extensionName].apply(self, args); 7988 } 7989 }, 7990 7991 /** 7992 * Calls any registered hooks for the provided filter. 7993 * 7994 * @memberof mixitup.Base 7995 * @private 7996 * @instance 7997 * @since 2.0.0 7998 * @param {string} filterName 7999 * @param {*} input 8000 * @param {Array<*>} args 8001 * @return {*} 8002 */ 8003 8004 callFilters: function(filterName, input, args) { 8005 var self = this, 8006 hooks = self.constructor.filters[filterName], 8007 output = input, 8008 extensionName = ''; 8009 8010 if (!hooks || h.isEmptyObject(hooks)) return output; 8011 8012 args = args || []; 8013 8014 for (extensionName in hooks) { 8015 args = h.arrayFromList(args); 8016 8017 args.unshift(output); 8018 8019 output = hooks[extensionName].apply(self, args); 8020 } 8021 8022 return output; 8023 } 8024 }; 8025 8026 /** 8027 * The BaseStatic class holds a set of static methods which are then added to all other 8028 * extensible MixItUp classes as a means of integrating extensions via the addition of new 8029 * methods and/or actions and hooks. 8030 * 8031 * @constructor 8032 * @namespace 8033 * @memberof mixitup 8034 * @private 8035 * @since 3.0.0 8036 */ 8037 8038 mixitup.BaseStatic = function() { 8039 this.actions = {}; 8040 this.filters = {}; 8041 8042 /** 8043 * Performs a shallow extend on the class's prototype, adding one or more new members to 8044 * the class in a single operation. 8045 * 8046 * @memberof mixitup.BaseStatic 8047 * @public 8048 * @static 8049 * @since 2.1.0 8050 * @param {object} extension 8051 * @return {void} 8052 */ 8053 8054 this.extend = function(extension) { 8055 h.extend(this.prototype, extension); 8056 }; 8057 8058 /** 8059 * Registers a function to be called on the action hook of the provided name. 8060 * 8061 * @memberof mixitup.BaseStatic 8062 * @public 8063 * @static 8064 * @since 2.1.0 8065 * @param {string} hookName 8066 * @param {string} extensionName 8067 * @param {function} func 8068 * @return {void} 8069 */ 8070 8071 this.registerAction = function(hookName, extensionName, func) { 8072 (this.actions[hookName] = this.actions[hookName] || {})[extensionName] = func; 8073 }; 8074 8075 /** 8076 * Registers a function to be called on the filter of the provided name. 8077 * 8078 * @memberof mixitup.BaseStatic 8079 * @public 8080 * @static 8081 * @since 2.1.0 8082 * @param {string} hookName 8083 * @param {string} extensionName 8084 * @param {function} func 8085 * @return {void} 8086 */ 8087 8088 this.registerFilter = function(hookName, extensionName, func) { 8089 (this.filters[hookName] = this.filters[hookName] || {})[extensionName] = func; 8090 }; 8091 }; 8092 8093 /** 8094 * The `mixitup.Features` class performs all feature and CSS prefix detection 8095 * neccessary for MixItUp to function correctly, as well as storing various 8096 * string and array constants. All feature decection is on evaluation of the 8097 * library and stored in a singleton instance for use by other internal classes. 8098 * 8099 * @constructor 8100 * @namespace 8101 * @memberof mixitup 8102 * @private 8103 * @since 3.0.0 8104 */ 8105 8106 mixitup.Features = function() { 8107 mixitup.Base.call(this); 8108 8109 this.callActions('beforeConstruct'); 8110 8111 this.boxSizingPrefix = ''; 8112 this.transformPrefix = ''; 8113 this.transitionPrefix = ''; 8114 8115 this.boxSizingPrefix = ''; 8116 this.transformProp = ''; 8117 this.transformRule = ''; 8118 this.transitionProp = ''; 8119 this.perspectiveProp = ''; 8120 this.perspectiveOriginProp = ''; 8121 8122 this.has = new mixitup.Has(); 8123 8124 this.canary = null; 8125 8126 this.BOX_SIZING_PROP = 'boxSizing'; 8127 this.TRANSITION_PROP = 'transition'; 8128 this.TRANSFORM_PROP = 'transform'; 8129 this.PERSPECTIVE_PROP = 'perspective'; 8130 this.PERSPECTIVE_ORIGIN_PROP = 'perspectiveOrigin'; 8131 this.VENDORS = ['Webkit', 'moz', 'O', 'ms']; 8132 8133 this.TWEENABLE = [ 8134 'opacity', 8135 'width', 'height', 8136 'marginRight', 'marginBottom', 8137 'x', 'y', 8138 'scale', 8139 'translateX', 'translateY', 'translateZ', 8140 'rotateX', 'rotateY', 'rotateZ' 8141 ]; 8142 8143 this.callActions('afterConstruct'); 8144 }; 8145 8146 mixitup.BaseStatic.call(mixitup.Features); 8147 8148 mixitup.Features.prototype = Object.create(mixitup.Base.prototype); 8149 8150 h.extend(mixitup.Features.prototype, 8151 /** @lends mixitup.Features */ 8152 { 8153 constructor: mixitup.Features, 8154 8155 /** 8156 * @private 8157 * @return {void} 8158 */ 8159 8160 init: function() { 8161 var self = this; 8162 8163 self.callActions('beforeInit', arguments); 8164 8165 self.canary = document.createElement('div'); 8166 8167 self.setPrefixes(); 8168 self.runTests(); 8169 8170 self.callActions('beforeInit', arguments); 8171 }, 8172 8173 /** 8174 * @private 8175 * @return {void} 8176 */ 8177 8178 runTests: function() { 8179 var self = this; 8180 8181 self.callActions('beforeRunTests', arguments); 8182 8183 self.has.promises = typeof window.Promise === 'function'; 8184 self.has.transitions = self.transitionPrefix !== 'unsupported'; 8185 8186 self.callActions('afterRunTests', arguments); 8187 8188 h.freeze(self.has); 8189 }, 8190 8191 /** 8192 * @private 8193 * @return {void} 8194 */ 8195 8196 setPrefixes: function() { 8197 var self = this; 8198 8199 self.callActions('beforeSetPrefixes', arguments); 8200 8201 self.transitionPrefix = h.getPrefix(self.canary, 'Transition', self.VENDORS); 8202 self.transformPrefix = h.getPrefix(self.canary, 'Transform', self.VENDORS); 8203 self.boxSizingPrefix = h.getPrefix(self.canary, 'BoxSizing', self.VENDORS); 8204 8205 self.boxSizingProp = self.boxSizingPrefix ? 8206 self.boxSizingPrefix + h.pascalCase(self.BOX_SIZING_PROP) : self.BOX_SIZING_PROP; 8207 8208 self.transitionProp = self.transitionPrefix ? 8209 self.transitionPrefix + h.pascalCase(self.TRANSITION_PROP) : self.TRANSITION_PROP; 8210 8211 self.transformProp = self.transformPrefix ? 8212 self.transformPrefix + h.pascalCase(self.TRANSFORM_PROP) : self.TRANSFORM_PROP; 8213 8214 self.transformRule = self.transformPrefix ? 8215 '-' + self.transformPrefix + '-' + self.TRANSFORM_PROP : self.TRANSFORM_PROP; 8216 8217 self.perspectiveProp = self.transformPrefix ? 8218 self.transformPrefix + h.pascalCase(self.PERSPECTIVE_PROP) : self.PERSPECTIVE_PROP; 8219 8220 self.perspectiveOriginProp = self.transformPrefix ? 8221 self.transformPrefix + h.pascalCase(self.PERSPECTIVE_ORIGIN_PROP) : 8222 self.PERSPECTIVE_ORIGIN_PROP; 8223 8224 self.callActions('afterSetPrefixes', arguments); 8225 } 8226 }); 8227 8228 /** 8229 * @constructor 8230 * @memberof mixitup 8231 * @private 8232 * @since 3.0.0 8233 */ 8234 8235 mixitup.Has = function() { 8236 this.transitions = false; 8237 this.promises = false; 8238 8239 h.seal(this); 8240 }; 8241 8242 // Assign a singleton instance to `mixitup.features` and initialise: 8243 8244 mixitup.features = new mixitup.Features(); 8245 8246 mixitup.features.init(); 8247 8248 /** 8249 * A group of properties defining the mixer's animation and effects settings. 8250 * 8251 * @constructor 8252 * @memberof mixitup.Config 8253 * @name animation 8254 * @namespace 8255 * @public 8256 * @since 2.0.0 8257 */ 8258 8259 mixitup.ConfigAnimation = function() { 8260 mixitup.Base.call(this); 8261 8262 this.callActions('beforeConstruct'); 8263 8264 /** 8265 * A boolean dictating whether or not animation should be enabled for the MixItUp instance. 8266 * If `false`, all operations will occur instantly and syncronously, although callback 8267 * functions and any returned promises will still be fulfilled. 8268 * 8269 * @example <caption>Example: Create a mixer with all animations disabled</caption> 8270 * var mixer = mixitup(containerEl, { 8271 * animation: { 8272 * enable: false 8273 * } 8274 * }); 8275 * 8276 * @name enable 8277 * @memberof mixitup.Config.animation 8278 * @instance 8279 * @type {boolean} 8280 * @default true 8281 */ 8282 8283 this.enable = true; 8284 8285 /** 8286 * A string of one or more space-seperated properties to which transitions will be 8287 * applied for all filtering animations. 8288 * 8289 * Properties can be listed any order or combination, although they will be applied in a specific 8290 * predefined order to produce consistent results. 8291 * 8292 * To learn more about available effects, experiment with our <a href="https://www.kunkalabs.com/mixitup/"> 8293 * sandbox demo</a> and try out the "Export config" button in the Animation options drop down. 8294 * 8295 * @example <caption>Example: Apply "fade" and "translateZ" effects to all animations</caption> 8296 * // As targets are filtered in and out, they will fade between 8297 * // opacity 1 and 0 and transform between translateZ(-100px) and 8298 * // translateZ(0). 8299 * 8300 * var mixer = mixitup(containerEl, { 8301 * animation: { 8302 * effects: 'fade translateZ(-100px)' 8303 * } 8304 * }); 8305 * 8306 * @name effects 8307 * @memberof mixitup.Config.animation 8308 * @instance 8309 * @type {string} 8310 * @default 'fade scale' 8311 */ 8312 8313 this.effects = 'fade scale'; 8314 8315 /** 8316 * A string of one or more space-seperated effects to be applied only to filter-in 8317 * animations, overriding `config.animation.effects` if set. 8318 * 8319 * @example <caption>Example: Apply downwards vertical translate to targets being filtered in</caption> 8320 * 8321 * var mixer = mixitup(containerEl, { 8322 * animation: { 8323 * effectsIn: 'fade translateY(-100%)' 8324 * } 8325 * }); 8326 * 8327 * @name effectsIn 8328 * @memberof mixitup.Config.animation 8329 * @instance 8330 * @type {string} 8331 * @default '' 8332 */ 8333 8334 this.effectsIn = ''; 8335 8336 /** 8337 * A string of one or more space-seperated effects to be applied only to filter-out 8338 * animations, overriding `config.animation.effects` if set. 8339 * 8340 * @example <caption>Example: Apply upwards vertical translate to targets being filtered out</caption> 8341 * 8342 * var mixer = mixitup(containerEl, { 8343 * animation: { 8344 * effectsOut: 'fade translateY(-100%)' 8345 * } 8346 * }); 8347 * 8348 * @name effectsOut 8349 * @memberof mixitup.Config.animation 8350 * @instance 8351 * @type {string} 8352 * @default '' 8353 */ 8354 8355 this.effectsOut = ''; 8356 8357 /** 8358 * An integer dictating the duration of all MixItUp animations in milliseconds, not 8359 * including any additional delay apllied via the `'stagger'` effect. 8360 * 8361 * @example <caption>Example: Apply an animation duration of 200ms to all mixitup animations</caption> 8362 * 8363 * var mixer = mixitup(containerEl, { 8364 * animation: { 8365 * duration: 200 8366 * } 8367 * }); 8368 * 8369 * @name duration 8370 * @memberof mixitup.Config.animation 8371 * @instance 8372 * @type {number} 8373 * @default 600 8374 */ 8375 8376 this.duration = 600; 8377 8378 /** 8379 * A valid CSS3 transition-timing function or shorthand. For a full list of accepted 8380 * values, visit <a href="http://easings.net" target="_blank">easings.net</a>. 8381 * 8382 * @example <caption>Example 1: Apply "ease-in-out" easing to all animations</caption> 8383 * 8384 * var mixer = mixitup(containerEl, { 8385 * animation: { 8386 * easing: 'ease-in-out' 8387 * } 8388 * }); 8389 * 8390 * @example <caption>Example 2: Apply a custom "cubic-bezier" easing function to all animations</caption> 8391 * var mixer = mixitup(containerEl, { 8392 * animation: { 8393 * easing: 'cubic-bezier(0.645, 0.045, 0.355, 1)' 8394 * } 8395 * }); 8396 * 8397 * @name easing 8398 * @memberof mixitup.Config.animation 8399 * @instance 8400 * @type {string} 8401 * @default 'ease' 8402 */ 8403 8404 this.easing = 'ease'; 8405 8406 /** 8407 * A boolean dictating whether or not to apply perspective to the MixItUp container 8408 * during animations. By default, perspective is always applied and creates the 8409 * illusion of three-dimensional space for effects such as `translateZ`, `rotateX`, 8410 * and `rotateY`. 8411 * 8412 * You may wish to disable this and define your own perspective settings via CSS. 8413 * 8414 * @example <caption>Example: Prevent perspective from being applied to any 3D transforms</caption> 8415 * var mixer = mixitup(containerEl, { 8416 * animation: { 8417 * applyPerspective: false 8418 * } 8419 * }); 8420 * 8421 * @name applyPerspective 8422 * @memberof mixitup.Config.animation 8423 * @instance 8424 * @type {bolean} 8425 * @default true 8426 */ 8427 8428 this.applyPerspective = true; 8429 8430 /** 8431 * The perspective distance value to be applied to the container during animations, 8432 * affecting any 3D-transform-based effects. 8433 * 8434 * @example <caption>Example: Set a perspective distance of 2000px</caption> 8435 * var mixer = mixitup(containerEl, { 8436 * animation: { 8437 * effects: 'rotateY(-25deg)', 8438 * perspectiveDistance: '2000px' 8439 * } 8440 * }); 8441 * 8442 * @name perspectiveDistance 8443 * @memberof mixitup.Config.animation 8444 * @instance 8445 * @type {string} 8446 * @default '3000px' 8447 */ 8448 8449 this.perspectiveDistance = '3000px'; 8450 8451 /** 8452 * The perspective-origin value to be applied to the container during animations, 8453 * affecting any 3D-transform-based effects. 8454 * 8455 * @example <caption>Example: Set a perspective origin in the top-right of the container</caption> 8456 * var mixer = mixitup(containerEl, { 8457 * animation: { 8458 * effects: 'transateZ(-200px)', 8459 * perspectiveOrigin: '100% 0' 8460 * } 8461 * }); 8462 * 8463 * @name perspectiveOrigin 8464 * @memberof mixitup.Config.animation 8465 * @instance 8466 * @type {string} 8467 * @default '50% 50%' 8468 */ 8469 8470 this.perspectiveOrigin = '50% 50%'; 8471 8472 /** 8473 * A boolean dictating whether or not to enable the queuing of operations. 8474 * 8475 * If `true` (default), and a control is clicked or an API call is made while another 8476 * operation is progress, the operation will go into the queue and will be automatically exectuted 8477 * when the previous operaitons is finished. 8478 * 8479 * If `false`, any requested operations will be ignored, and the `onMixBusy` callback and `mixBusy` 8480 * event will be fired. If `debug.showWarnings` is enabled, a console warning will also occur. 8481 * 8482 * @example <caption>Example: Disable queuing</caption> 8483 * var mixer = mixitup(containerEl, { 8484 * animation: { 8485 * queue: false 8486 * } 8487 * }); 8488 * 8489 * @name queue 8490 * @memberof mixitup.Config.animation 8491 * @instance 8492 * @type {boolean} 8493 * @default true 8494 */ 8495 8496 this.queue = true; 8497 8498 /** 8499 * An integer dictacting the maximum number of operations allowed in the queue at 8500 * any time, when queuing is enabled. 8501 * 8502 * @example <caption>Example: Allow a maximum of 5 operations in the queue at any time</caption> 8503 * var mixer = mixitup(containerEl, { 8504 * animation: { 8505 * queueLimit: 5 8506 * } 8507 * }); 8508 * 8509 * @name queueLimit 8510 * @memberof mixitup.Config.animation 8511 * @instance 8512 * @type {number} 8513 * @default 3 8514 */ 8515 8516 this.queueLimit = 3; 8517 8518 /** 8519 * A boolean dictating whether or not to transition the height and width of the 8520 * container as elements are filtered in and out. If disabled, the container height 8521 * will change abruptly. 8522 * 8523 * It may be desirable to disable this on mobile devices as the CSS `height` and 8524 * `width` properties do not receive GPU-acceleration and can therefore cause stuttering. 8525 * 8526 * @example <caption>Example 1: Disable the transitioning of the container height and/or width</caption> 8527 * var mixer = mixitup(containerEl, { 8528 * animation: { 8529 * animateResizeContainer: false 8530 * } 8531 * }); 8532 * 8533 * @example <caption>Example 2: Disable the transitioning of the container height and/or width for mobile devices only</caption> 8534 * var mixer = mixitup(containerEl, { 8535 * animation: { 8536 * animateResizeContainer: myFeatureTests.isMobile ? false : true 8537 * } 8538 * }); 8539 * 8540 * @name animateResizeContainer 8541 * @memberof mixitup.Config.animation 8542 * @instance 8543 * @type {boolean} 8544 * @default true 8545 */ 8546 8547 this.animateResizeContainer = true; 8548 8549 /** 8550 * A boolean dictating whether or not to transition the height and width of target 8551 * elements as they change throughout the course of an animation. 8552 * 8553 * This is often a must for flex-box grid layouts where the size of target elements may change 8554 * depending on final their position in relation to their siblings, or for `.changeLayout()` 8555 * operations where the size of targets change between layouts. 8556 * 8557 * NB: This feature requires additional calculations and manipulation to non-hardware-accelerated 8558 * properties which may adversely affect performance on slower devices, and is therefore 8559 * disabled by default. 8560 * 8561 * @example <caption>Example: Enable the transitioning of target widths and heights</caption> 8562 * var mixer = mixitup(containerEl, { 8563 * animation: { 8564 * animateResizeTargets: true 8565 * } 8566 * }); 8567 * 8568 * @name animateResizeTargets 8569 * @memberof mixitup.Config.animation 8570 * @instance 8571 * @type {boolean} 8572 * @default false 8573 */ 8574 8575 this.animateResizeTargets = false; 8576 8577 /** 8578 * A custom function used to manipulate the order in which the stagger delay is 8579 * incremented when using the âstaggerâ effect. 8580 * 8581 * When using the 'stagger' effect, the delay applied to each target element is incremented 8582 * based on its index. You may create a custom function to manipulate the order in which the 8583 * delay is incremented and create engaging non-linear stagger effects. 8584 * 8585 * The function receives the index of the target element as a parameter, and must 8586 * return an integer which serves as the multiplier for the stagger delay. 8587 * 8588 * @example <caption>Example 1: Stagger target elements by column in a 3-column grid</caption> 8589 * var mixer = mixitup(containerEl, { 8590 * animation: { 8591 * effects: 'fade stagger(100ms)', 8592 * staggerSequence: function(i) { 8593 * return i % 3; 8594 * } 8595 * } 8596 * }); 8597 * 8598 * @example <caption>Example 2: Using an algorithm to produce a more complex sequence</caption> 8599 * var mixer = mixitup(containerEl, { 8600 * animation: { 8601 * effects: 'fade stagger(100ms)', 8602 * staggerSequence: function(i) { 8603 * return (2*i) - (5*((i/3) - ((1/3) * (i%3)))); 8604 * } 8605 * } 8606 * }); 8607 * 8608 * @name staggerSequence 8609 * @memberof mixitup.Config.animation 8610 * @instance 8611 * @type {function} 8612 * @default null 8613 */ 8614 8615 this.staggerSequence = null; 8616 8617 /** 8618 * A boolean dictating whether or not to reverse the direction of `translate` 8619 * and `rotate` transforms for elements being filtered out. 8620 * 8621 * It can be used to create carousel-like animations where elements enter and exit 8622 * from opposite directions. If enabled, the effect `translateX(-100%)` for elements 8623 * being filtered in would become `translateX(100%)` for targets being filtered out. 8624 * 8625 * This functionality can also be achieved by providing seperate effects 8626 * strings for `config.animation.effectsIn` and `config.animation.effectsOut`. 8627 * 8628 * @example <caption>Example: Reverse the desired direction on any translate/rotate effect for targets being filtered out</caption> 8629 * // Elements being filtered in will be translated from '100%' to '0' while 8630 * // elements being filtered out will be translated from 0 to '-100%' 8631 * 8632 * var mixer = mixitup(containerEl, { 8633 * animation: { 8634 * effects: 'fade translateX(100%)', 8635 * reverseOut: true, 8636 * nudge: false // Disable nudging to create a carousel-like effect 8637 * } 8638 * }); 8639 * 8640 * @name reverseOut 8641 * @memberof mixitup.Config.animation 8642 * @instance 8643 * @type {boolean} 8644 * @default false 8645 */ 8646 8647 this.reverseOut = false; 8648 8649 /** 8650 * A boolean dictating whether or not to "nudge" the animation path of targets 8651 * when they are being filtered in and out simulatenously. 8652 * 8653 * This has been the default behavior of MixItUp since version 1, but it 8654 * may be desirable to disable this effect when filtering directly from 8655 * one exclusive set of targets to a different exclusive set of targets, 8656 * to create a carousel-like effect, or a generally more subtle animation. 8657 * 8658 * @example <caption>Example: Disable the "nudging" of targets being filtered in and out simulatenously</caption> 8659 * 8660 * var mixer = mixitup(containerEl, { 8661 * animation: { 8662 * nudge: false 8663 * } 8664 * }); 8665 * 8666 * @name nudge 8667 * @memberof mixitup.Config.animation 8668 * @instance 8669 * @type {boolean} 8670 * @default true 8671 */ 8672 8673 this.nudge = true; 8674 8675 /** 8676 * A boolean dictating whether or not to clamp the height of the container while MixItUp's 8677 * geometry tests are carried out before an operation. 8678 * 8679 * To prevent scroll-bar flicker, clamping is turned on by default. But in the case where the 8680 * height of the container might affect its vertical positioning in the viewport 8681 * (e.g. a vertically-centered container), this should be turned off to ensure accurate 8682 * test results and a smooth animation. 8683 * 8684 * @example <caption>Example: Disable container height-clamping</caption> 8685 * 8686 * var mixer = mixitup(containerEl, { 8687 * animation: { 8688 * clampHeight: false 8689 * } 8690 * }); 8691 * 8692 * @name clampHeight 8693 * @memberof mixitup.Config.animation 8694 * @instance 8695 * @type {boolean} 8696 * @default true 8697 */ 8698 8699 this.clampHeight = true; 8700 8701 /** 8702 * A boolean dictating whether or not to clamp the width of the container while MixItUp's 8703 * geometry tests are carried out before an operation. 8704 * 8705 * To prevent scroll-bar flicker, clamping is turned on by default. But in the case where the 8706 * width of the container might affect its horitzontal positioning in the viewport 8707 * (e.g. a horizontall-centered container), this should be turned off to ensure accurate 8708 * test results and a smooth animation. 8709 * 8710 * @example <caption>Example: Disable container width-clamping</caption> 8711 * 8712 * var mixer = mixitup(containerEl, { 8713 * animation: { 8714 * clampWidth: false 8715 * } 8716 * }); 8717 * 8718 * @name clampWidth 8719 * @memberof mixitup.Config.animation 8720 * @instance 8721 * @type {boolean} 8722 * @default true 8723 */ 8724 8725 this.clampWidth = true; 8726 8727 this.callActions('afterConstruct'); 8728 8729 h.seal(this); 8730 }; 8731 8732 mixitup.BaseStatic.call(mixitup.ConfigAnimation); 8733 8734 mixitup.ConfigAnimation.prototype = Object.create(mixitup.Base.prototype); 8735 8736 mixitup.ConfigAnimation.prototype.constructor = mixitup.ConfigAnimation; 8737 8738 /** 8739 * A group of properties relating to the behavior of the Mixer. 8740 * 8741 * @constructor 8742 * @memberof mixitup.Config 8743 * @name behavior 8744 * @namespace 8745 * @public 8746 * @since 3.1.12 8747 */ 8748 8749 mixitup.ConfigBehavior = function() { 8750 mixitup.Base.call(this); 8751 8752 this.callActions('beforeConstruct'); 8753 8754 /** 8755 * A boolean dictating whether to allow "live" sorting of the mixer. 8756 * 8757 * Because of the expensive nature of sorting, MixItUp makes use of several 8758 * internal optimizations to skip redundant sorting operations, such as when 8759 * the newly requested sort command is the same as the active one. The caveat 8760 * to this optimization is that "live" edits to the value of a target's sorting 8761 * attribute will be ignored when requesting a re-sort by the same attribute. 8762 * 8763 * By setting to `behavior.liveSort` to `true`, the mixer will always re-sort 8764 * regardless of whether or not the sorting attribute and order have changed. 8765 * 8766 * @example <caption>Example: Enabling `liveSort` to allow for re-sorting</caption> 8767 * 8768 * var mixer = mixitup(containerEl, { 8769 * behavior: { 8770 * liveSort: true 8771 * }, 8772 * load: { 8773 * sort: 'edited:desc' 8774 * } 8775 * }); 8776 * 8777 * var target = containerEl.children[3]; 8778 * 8779 * console.log(target.getAttribute('data-edited')); // '2015-04-24' 8780 * 8781 * target.setAttribute('data-edited', '2017-08-10'); // Update the target's edited date 8782 * 8783 * mixer.sort('edited:desc') 8784 * .then(function(state) { 8785 * // The target is now at the top of the list 8786 * 8787 * console.log(state.targets[0] === target); // true 8788 * }); 8789 * 8790 * @name liveSort 8791 * @memberof mixitup.Config.behavior 8792 * @instance 8793 * @type {boolean} 8794 * @default false 8795 */ 8796 8797 this.liveSort = false; 8798 8799 this.callActions('afterConstruct'); 8800 8801 h.seal(this); 8802 }; 8803 8804 mixitup.BaseStatic.call(mixitup.ConfigBehavior); 8805 8806 mixitup.ConfigBehavior.prototype = Object.create(mixitup.Base.prototype); 8807 8808 mixitup.ConfigBehavior.prototype.constructor = mixitup.ConfigBehavior; 8809 8810 /** 8811 * A group of optional callback functions to be invoked at various 8812 * points within the lifecycle of a mixer operation. 8813 * 8814 * Each function is analogous to an event of the same name triggered from the 8815 * container element, and is invoked immediately after it. 8816 * 8817 * All callback functions receive the current `state` object as their first 8818 * argument, as well as other more specific arguments described below. 8819 * 8820 * @constructor 8821 * @memberof mixitup.Config 8822 * @name callbacks 8823 * @namespace 8824 * @public 8825 * @since 2.0.0 8826 */ 8827 8828 mixitup.ConfigCallbacks = function() { 8829 mixitup.Base.call(this); 8830 8831 this.callActions('beforeConstruct'); 8832 8833 /** 8834 * A callback function invoked immediately after any MixItUp operation is requested 8835 * and before animations have begun. 8836 * 8837 * A second `futureState` argument is passed to the function which represents the final 8838 * state of the mixer once the requested operation has completed. 8839 * 8840 * @example <caption>Example: Adding an `onMixStart` callback function</caption> 8841 * var mixer = mixitup(containerEl, { 8842 * callbacks: { 8843 * onMixStart: function(state, futureState) { 8844 * console.log('Starting operation...'); 8845 * } 8846 * } 8847 * }); 8848 * 8849 * @name onMixStart 8850 * @memberof mixitup.Config.callbacks 8851 * @instance 8852 * @type {function} 8853 * @default null 8854 */ 8855 8856 this.onMixStart = null; 8857 8858 /** 8859 * A callback function invoked when a MixItUp operation is requested while another 8860 * operation is in progress, and the animation queue is full, or queueing 8861 * is disabled. 8862 * 8863 * @example <caption>Example: Adding an `onMixBusy` callback function</caption> 8864 * var mixer = mixitup(containerEl, { 8865 * callbacks: { 8866 * onMixBusy: function(state) { 8867 * console.log('Mixer busy'); 8868 * } 8869 * } 8870 * }); 8871 * 8872 * @name onMixBusy 8873 * @memberof mixitup.Config.callbacks 8874 * @instance 8875 * @type {function} 8876 * @default null 8877 */ 8878 8879 this.onMixBusy = null; 8880 8881 /** 8882 * A callback function invoked after any MixItUp operation has completed, and the 8883 * state has been updated. 8884 * 8885 * @example <caption>Example: Adding an `onMixEnd` callback function</caption> 8886 * var mixer = mixitup(containerEl, { 8887 * callbacks: { 8888 * onMixEnd: function(state) { 8889 * console.log('Operation complete'); 8890 * } 8891 * } 8892 * }); 8893 * 8894 * @name onMixEnd 8895 * @memberof mixitup.Config.callbacks 8896 * @instance 8897 * @type {function} 8898 * @default null 8899 */ 8900 8901 this.onMixEnd = null; 8902 8903 /** 8904 * A callback function invoked whenever an operation "fails", i.e. no targets 8905 * could be found matching the requested filter. 8906 * 8907 * @example <caption>Example: Adding an `onMixFail` callback function</caption> 8908 * var mixer = mixitup(containerEl, { 8909 * callbacks: { 8910 * onMixFail: function(state) { 8911 * console.log('No items could be found matching the requested filter'); 8912 * } 8913 * } 8914 * }); 8915 * 8916 * @name onMixFail 8917 * @memberof mixitup.Config.callbacks 8918 * @instance 8919 * @type {function} 8920 * @default null 8921 */ 8922 8923 this.onMixFail = null; 8924 8925 /** 8926 * A callback function invoked whenever a MixItUp control is clicked, and before its 8927 * respective operation is requested. 8928 * 8929 * The clicked element is assigned to the `this` keyword within the function. The original 8930 * click event is passed to the function as the second argument, which can be useful if 8931 * using `<a>` tags as controls where the default behavior needs to be prevented. 8932 * 8933 * Returning `false` from the callback will prevent the control click from triggering 8934 * an operation. 8935 * 8936 * @example <caption>Example 1: Adding an `onMixClick` callback function</caption> 8937 * var mixer = mixitup(containerEl, { 8938 * callbacks: { 8939 * onMixClick: function(state, originalEvent) { 8940 * console.log('The control "' + this.innerText + '" was clicked'); 8941 * } 8942 * } 8943 * }); 8944 * 8945 * @example <caption>Example 2: Using `onMixClick` to manipulate the original click event</caption> 8946 * var mixer = mixitup(containerEl, { 8947 * callbacks: { 8948 * onMixClick: function(state, originalEvent) { 8949 * // Prevent original click event from bubbling up: 8950 * originalEvent.stopPropagation(); 8951 * 8952 * // Prevent default behavior of clicked element: 8953 * originalEvent.preventDefault(); 8954 * } 8955 * } 8956 * }); 8957 * 8958 * @example <caption>Example 3: Using `onMixClick` to conditionally cancel operations</caption> 8959 * var mixer = mixitup(containerEl, { 8960 * callbacks: { 8961 * onMixClick: function(state, originalEvent) { 8962 * // Perform some conditional check: 8963 * 8964 * if (myApp.isLoading) { 8965 * // By returning false, we can prevent the control click from triggering an operation. 8966 * 8967 * return false; 8968 * } 8969 * } 8970 * } 8971 * }); 8972 * 8973 * @name onMixClick 8974 * @memberof mixitup.Config.callbacks 8975 * @instance 8976 * @type {function} 8977 * @default null 8978 */ 8979 8980 this.onMixClick = null; 8981 8982 this.callActions('afterConstruct'); 8983 8984 h.seal(this); 8985 }; 8986 8987 mixitup.BaseStatic.call(mixitup.ConfigCallbacks); 8988 8989 mixitup.ConfigCallbacks.prototype = Object.create(mixitup.Base.prototype); 8990 8991 mixitup.ConfigCallbacks.prototype.constructor = mixitup.ConfigCallbacks; 8992 8993 /** 8994 * A group of properties relating to clickable control elements. 8995 * 8996 * @constructor 8997 * @memberof mixitup.Config 8998 * @name controls 8999 * @namespace 9000 * @public 9001 * @since 2.0.0 9002 */ 9003 9004 mixitup.ConfigControls = function() { 9005 mixitup.Base.call(this); 9006 9007 this.callActions('beforeConstruct'); 9008 9009 /** 9010 * A boolean dictating whether or not controls should be enabled for the mixer instance. 9011 * 9012 * If `true` (default behavior), MixItUp will search the DOM for any clickable elements with 9013 * `data-filter`, `data-sort` or `data-toggle` attributes, and bind them for click events. 9014 * 9015 * If `false`, no click handlers will be bound, and all functionality must therefore be performed 9016 * via the mixer's API methods. 9017 * 9018 * If you do not intend to use the default controls, setting this property to `false` will 9019 * marginally improve the startup time of your mixer instance, and will also prevent any other active 9020 * mixer instances in the DOM which are bound to controls from controlling the instance. 9021 * 9022 * @example <caption>Example: Disabling controls</caption> 9023 * var mixer = mixitup(containerEl, { 9024 * controls: { 9025 * enable: false 9026 * } 9027 * }); 9028 * 9029 * // With the default controls disabled, we can only control 9030 * // the mixer via its API methods, e.g.: 9031 * 9032 * mixer.filter('.cat-1'); 9033 * 9034 * @name enable 9035 * @memberof mixitup.Config.controls 9036 * @instance 9037 * @type {boolean} 9038 * @default true 9039 */ 9040 9041 this.enable = true; 9042 9043 /** 9044 * A boolean dictating whether or not to use event delegation when binding click events 9045 * to the default controls. 9046 * 9047 * If `false` (default behavior), each control button in the DOM will be found and 9048 * individually bound when a mixer is instantiated, with their corresponding actions 9049 * cached for performance. 9050 * 9051 * If `true`, a single click handler will be applied to the `window` (or container element - see 9052 * `config.controls.scope`), and any click events triggered by elements with `data-filter`, 9053 * `data-sort` or `data-toggle` attributes present will be handled as they propagate upwards. 9054 * 9055 * If you require a user interface where control buttons may be added, removed, or changed during the 9056 * lifetime of a mixer, `controls.live` should be set to `true`. There is a marginal but unavoidable 9057 * performance deficit when using live controls, as the value of each control button must be read 9058 * from the DOM in real time once the click event has propagated. 9059 * 9060 * @example <caption>Example: Setting live controls</caption> 9061 * var mixer = mixitup(containerEl, { 9062 * controls: { 9063 * live: true 9064 * } 9065 * }); 9066 * 9067 * // Control buttons can now be added, remove and changed without breaking 9068 * // the mixer's UI 9069 * 9070 * @name live 9071 * @memberof mixitup.Config.controls 9072 * @instance 9073 * @type {boolean} 9074 * @default true 9075 */ 9076 9077 this.live = false; 9078 9079 /** 9080 * A string dictating the "scope" to use when binding or querying the default controls. The available 9081 * values are `'global'` or `'local'`. 9082 * 9083 * When set to `'global'` (default behavior), MixItUp will query the entire document for control buttons 9084 * to bind, or delegate click events from (see `config.controls.live`). 9085 * 9086 * When set to `'local'`, MixItUp will only query (or bind click events to) its own container element. 9087 * This may be desireable if you require multiple active mixer instances within the same document, with 9088 * controls that would otherwise intefere with each other if scoped globally. 9089 * 9090 * Conversely, if you wish to control multiple instances with a single UI, you would create one 9091 * set of controls and keep the controls scope of each mixer set to `global`. 9092 * 9093 * @example <caption>Example: Setting 'local' scoped controls</caption> 9094 * var mixerOne = mixitup(containerOne, { 9095 * controls: { 9096 * scope: 'local' 9097 * } 9098 * }); 9099 * 9100 * var mixerTwo = mixitup(containerTwo, { 9101 * controls: { 9102 * scope: 'local' 9103 * } 9104 * }); 9105 * 9106 * // Both mixers can now exist within the same document with 9107 * // isolated controls placed within their container elements. 9108 * 9109 * @name scope 9110 * @memberof mixitup.Config.controls 9111 * @instance 9112 * @type {string} 9113 * @default 'global' 9114 */ 9115 9116 this.scope = 'global'; // enum: ['local' ,'global'] 9117 9118 /** 9119 * A string dictating the type of logic to apply when concatenating the filter selectors of 9120 * active toggle buttons (i.e. any clickable element with a `data-toggle` attribute). 9121 * 9122 * If set to `'or'` (default behavior), selectors will be concatenated together as 9123 * a comma-seperated list. For example: 9124 * 9125 * `'.cat-1, .cat-2'` (shows any elements matching `'.cat-1'` OR `'.cat-2'`) 9126 * 9127 * If set to `'and'`, selectors will be directly concatenated together. For example: 9128 * 9129 * `'.cat-1.cat-2'` (shows any elements which match both `'.cat-1'` AND `'.cat-2'`) 9130 * 9131 * @example <caption>Example: Setting "and" toggle logic</caption> 9132 * var mixer = mixitup(containerEl, { 9133 * controls: { 9134 * toggleLogic: 'and' 9135 * } 9136 * }); 9137 * 9138 * @name toggleLogic 9139 * @memberof mixitup.Config.controls 9140 * @instance 9141 * @type {string} 9142 * @default 'or' 9143 */ 9144 9145 this.toggleLogic = 'or'; // enum: ['or', 'and'] 9146 9147 /** 9148 * A string dictating the filter behavior when all toggles are inactive. 9149 * 9150 * When set to `'all'` (default behavior), *all* targets will be shown by default 9151 * when no toggles are active, or at the moment all active toggles are toggled off. 9152 * 9153 * When set to `'none'`, no targets will be shown by default when no toggles are 9154 * active, or at the moment all active toggles are toggled off. 9155 * 9156 * @example <caption>Example 1: Setting the default toggle behavior to `'all'`</caption> 9157 * var mixer = mixitup(containerEl, { 9158 * controls: { 9159 * toggleDefault: 'all' 9160 * } 9161 * }); 9162 * 9163 * mixer.toggleOn('.cat-2') 9164 * .then(function() { 9165 * // Deactivate all active toggles 9166 * 9167 * return mixer.toggleOff('.cat-2') 9168 * }) 9169 * .then(function(state) { 9170 * console.log(state.activeFilter.selector); // 'all' 9171 * console.log(state.totalShow); // 12 9172 * }); 9173 * 9174 * @example <caption>Example 2: Setting the default toggle behavior to `'none'`</caption> 9175 * var mixer = mixitup(containerEl, { 9176 * controls: { 9177 * toggleDefault: 'none' 9178 * } 9179 * }); 9180 * 9181 * mixer.toggleOn('.cat-2') 9182 * .then(function() { 9183 * // Deactivate all active toggles 9184 * 9185 * return mixer.toggleOff('.cat-2') 9186 * }) 9187 * .then(function(state) { 9188 * console.log(state.activeFilter.selector); // 'none' 9189 * console.log(state.totalShow); // 0 9190 * }); 9191 * 9192 * @name toggleDefault 9193 * @memberof mixitup.Config.controls 9194 * @instance 9195 * @type {string} 9196 * @default 'all' 9197 */ 9198 9199 this.toggleDefault = 'all'; // enum: ['all', 'none'] 9200 9201 this.callActions('afterConstruct'); 9202 9203 h.seal(this); 9204 }; 9205 9206 mixitup.BaseStatic.call(mixitup.ConfigControls); 9207 9208 mixitup.ConfigControls.prototype = Object.create(mixitup.Base.prototype); 9209 9210 mixitup.ConfigControls.prototype.constructor = mixitup.ConfigControls; 9211 9212 /** 9213 * A group of properties defining the output and structure of class names programmatically 9214 * added to controls and containers to reflect the state of the mixer. 9215 * 9216 * Most commonly, class names are added to controls by MixItUp to indicate that 9217 * the control is active so that it can be styled accordingly - `'mixitup-control-active'` by default. 9218 * 9219 * Using a "BEM" like structure, each classname is broken into the three parts: 9220 * a block namespace (`'mixitup'`), an element name (e.g. `'control'`), and an optional modifier 9221 * name (e.g. `'active'`) reflecting the state of the element. 9222 * 9223 * By default, each part of the classname is concatenated together using single hyphens as 9224 * delineators, but this can be easily customised to match the naming convention and style of 9225 * your project. 9226 * 9227 * @constructor 9228 * @memberof mixitup.Config 9229 * @name classNames 9230 * @namespace 9231 * @public 9232 * @since 3.0.0 9233 */ 9234 9235 mixitup.ConfigClassNames = function() { 9236 mixitup.Base.call(this); 9237 9238 this.callActions('beforeConstruct'); 9239 9240 /** 9241 * The "block" portion, or top-level namespace added to the start of any class names created by MixItUp. 9242 * 9243 * @example <caption>Example 1: changing the `config.classNames.block` value</caption> 9244 * var mixer = mixitup(containerEl, { 9245 * classNames: { 9246 * block: 'portfolio' 9247 * } 9248 * }); 9249 * 9250 * // Active control output: "portfolio-control-active" 9251 * 9252 * @example <caption>Example 2: Removing `config.classNames.block`</caption> 9253 * var mixer = mixitup(containerEl, { 9254 * classNames: { 9255 * block: '' 9256 * } 9257 * }); 9258 * 9259 * // Active control output: "control-active" 9260 * 9261 * @name block 9262 * @memberof mixitup.Config.classNames 9263 * @instance 9264 * @type {string} 9265 * @default 'mixitup' 9266 */ 9267 9268 this.block = 'mixitup'; 9269 9270 /** 9271 * The "element" portion of the class name added to container. 9272 * 9273 * @name elementContainer 9274 * @memberof mixitup.Config.classNames 9275 * @instance 9276 * @type {string} 9277 * @default 'container' 9278 */ 9279 9280 this.elementContainer = 'container'; 9281 9282 /** 9283 * The "element" portion of the class name added to filter controls. 9284 * 9285 * By default, all filter, sort, multimix and toggle controls take the same element value of `'control'`, but 9286 * each type's element value can be individually overwritten to match the unique classNames of your controls as needed. 9287 * 9288 * @example <caption>Example 1: changing the `config.classNames.elementFilter` value</caption> 9289 * var mixer = mixitup(containerEl, { 9290 * classNames: { 9291 * elementFilter: 'filter' 9292 * } 9293 * }); 9294 * 9295 * // Active filter output: "mixitup-filter-active" 9296 * 9297 * @example <caption>Example 2: changing the `config.classNames.block` and `config.classNames.elementFilter` values</caption> 9298 * var mixer = mixitup(containerEl, { 9299 * classNames: { 9300 * block: 'portfolio', 9301 * elementFilter: 'filter' 9302 * } 9303 * }); 9304 * 9305 * // Active filter output: "portfolio-filter-active" 9306 * 9307 * @name elementFilter 9308 * @memberof mixitup.Config.classNames 9309 * @instance 9310 * @type {string} 9311 * @default 'control' 9312 */ 9313 9314 this.elementFilter = 'control'; 9315 9316 /** 9317 * The "element" portion of the class name added to sort controls. 9318 * 9319 * By default, all filter, sort, multimix and toggle controls take the same element value of `'control'`, but 9320 * each type's element value can be individually overwritten to match the unique classNames of your controls as needed. 9321 * 9322 * @example <caption>Example 1: changing the `config.classNames.elementSort` value</caption> 9323 * var mixer = mixitup(containerEl, { 9324 * classNames: { 9325 * elementSort: 'sort' 9326 * } 9327 * }); 9328 * 9329 * // Active sort output: "mixitup-sort-active" 9330 * 9331 * @example <caption>Example 2: changing the `config.classNames.block` and `config.classNames.elementSort` values</caption> 9332 * var mixer = mixitup(containerEl, { 9333 * classNames: { 9334 * block: 'portfolio', 9335 * elementSort: 'sort' 9336 * } 9337 * }); 9338 * 9339 * // Active sort output: "portfolio-sort-active" 9340 * 9341 * @name elementSort 9342 * @memberof mixitup.Config.classNames 9343 * @instance 9344 * @type {string} 9345 * @default 'control' 9346 */ 9347 9348 this.elementSort = 'control'; 9349 9350 /** 9351 * The "element" portion of the class name added to multimix controls. 9352 * 9353 * By default, all filter, sort, multimix and toggle controls take the same element value of `'control'`, but 9354 * each type's element value can be individually overwritten to match the unique classNames of your controls as needed. 9355 * 9356 * @example <caption>Example 1: changing the `config.classNames.elementMultimix` value</caption> 9357 * var mixer = mixitup(containerEl, { 9358 * classNames: { 9359 * elementMultimix: 'multimix' 9360 * } 9361 * }); 9362 * 9363 * // Active multimix output: "mixitup-multimix-active" 9364 * 9365 * @example <caption>Example 2: changing the `config.classNames.block` and `config.classNames.elementMultimix` values</caption> 9366 * var mixer = mixitup(containerEl, { 9367 * classNames: { 9368 * block: 'portfolio', 9369 * elementSort: 'multimix' 9370 * } 9371 * }); 9372 * 9373 * // Active multimix output: "portfolio-multimix-active" 9374 * 9375 * @name elementMultimix 9376 * @memberof mixitup.Config.classNames 9377 * @instance 9378 * @type {string} 9379 * @default 'control' 9380 */ 9381 9382 this.elementMultimix = 'control'; 9383 9384 /** 9385 * The "element" portion of the class name added to toggle controls. 9386 * 9387 * By default, all filter, sort, multimix and toggle controls take the same element value of `'control'`, but 9388 * each type's element value can be individually overwritten to match the unique classNames of your controls as needed. 9389 * 9390 * @example <caption>Example 1: changing the `config.classNames.elementToggle` value</caption> 9391 * var mixer = mixitup(containerEl, { 9392 * classNames: { 9393 * elementToggle: 'toggle' 9394 * } 9395 * }); 9396 * 9397 * // Active toggle output: "mixitup-toggle-active" 9398 * 9399 * @example <caption>Example 2: changing the `config.classNames.block` and `config.classNames.elementToggle` values</caption> 9400 * var mixer = mixitup(containerEl, { 9401 * classNames: { 9402 * block: 'portfolio', 9403 * elementToggle: 'toggle' 9404 * } 9405 * }); 9406 * 9407 * // Active toggle output: "portfolio-toggle-active" 9408 * 9409 * @name elementToggle 9410 * @memberof mixitup.Config.classNames 9411 * @instance 9412 * @type {string} 9413 * @default 'control' 9414 */ 9415 9416 this.elementToggle = 'control'; 9417 9418 /** 9419 * The "modifier" portion of the class name added to active controls. 9420 * @name modifierActive 9421 * @memberof mixitup.Config.classNames 9422 * @instance 9423 * @type {string} 9424 * @default 'active' 9425 */ 9426 9427 this.modifierActive = 'active'; 9428 9429 /** 9430 * The "modifier" portion of the class name added to disabled controls. 9431 * 9432 * @name modifierDisabled 9433 * @memberof mixitup.Config.classNames 9434 * @instance 9435 * @type {string} 9436 * @default 'disabled' 9437 */ 9438 9439 this.modifierDisabled = 'disabled'; 9440 9441 /** 9442 * The "modifier" portion of the class name added to the container when in a "failed" state. 9443 * 9444 * @name modifierFailed 9445 * @memberof mixitup.Config.classNames 9446 * @instance 9447 * @type {string} 9448 * @default 'failed' 9449 */ 9450 9451 this.modifierFailed = 'failed'; 9452 9453 /** 9454 * The delineator used between the "block" and "element" portions of any class name added by MixItUp. 9455 * 9456 * If the block portion is ommited by setting it to an empty string, no delineator will be added. 9457 * 9458 * @example <caption>Example: changing the delineator to match BEM convention</caption> 9459 * var mixer = mixitup(containerEl, { 9460 * classNames: { 9461 * delineatorElement: '__' 9462 * } 9463 * }); 9464 * 9465 * // example active control output: "mixitup__control-active" 9466 * 9467 * @name delineatorElement 9468 * @memberof mixitup.Config.classNames 9469 * @instance 9470 * @type {string} 9471 * @default '-' 9472 */ 9473 9474 this.delineatorElement = '-'; 9475 9476 /** 9477 * The delineator used between the "element" and "modifier" portions of any class name added by MixItUp. 9478 * 9479 * If the element portion is ommited by setting it to an empty string, no delineator will be added. 9480 * 9481 * @example <caption>Example: changing both delineators to match BEM convention</caption> 9482 * var mixer = mixitup(containerEl, { 9483 * classNames: { 9484 * delineatorElement: '__' 9485 * delineatorModifier: '--' 9486 * } 9487 * }); 9488 * 9489 * // Active control output: "mixitup__control--active" 9490 * 9491 * @name delineatorModifier 9492 * @memberof mixitup.Config.classNames 9493 * @instance 9494 * @type {string} 9495 * @default '-' 9496 */ 9497 9498 this.delineatorModifier = '-'; 9499 9500 this.callActions('afterConstruct'); 9501 9502 h.seal(this); 9503 }; 9504 9505 mixitup.BaseStatic.call(mixitup.ConfigClassNames); 9506 9507 mixitup.ConfigClassNames.prototype = Object.create(mixitup.Base.prototype); 9508 9509 mixitup.ConfigClassNames.prototype.constructor = mixitup.ConfigClassNames; 9510 9511 /** 9512 * A group of properties relating to MixItUp's dataset API. 9513 * 9514 * @constructor 9515 * @memberof mixitup.Config 9516 * @name data 9517 * @namespace 9518 * @public 9519 * @since 3.0.0 9520 */ 9521 9522 mixitup.ConfigData = function() { 9523 mixitup.Base.call(this); 9524 9525 this.callActions('beforeConstruct'); 9526 9527 /** 9528 * A string specifying the name of the key containing your data model's unique 9529 * identifier (UID). To use the dataset API, a UID key must be specified and 9530 * be present and unique on all objects in the dataset you provide to MixItUp. 9531 * 9532 * For example, if your dataset is made up of MongoDB documents, the UID 9533 * key would be `'id'` or `'_id'`. 9534 * 9535 * @example <caption>Example: Setting the UID to `'id'`</caption> 9536 * var mixer = mixitup(containerEl, { 9537 * data: { 9538 * uidKey: 'id' 9539 * } 9540 * }); 9541 * 9542 * @name uidKey 9543 * @memberof mixitup.Config.data 9544 * @instance 9545 * @type {string} 9546 * @default '' 9547 */ 9548 9549 this.uidKey = ''; 9550 9551 /** 9552 * A boolean dictating whether or not MixItUp should "dirty check" each object in 9553 * your dataset for changes whenever `.dataset()` is called, and re-render any targets 9554 * for which a change is found. 9555 * 9556 * Depending on the complexity of your data model, dirty checking can be expensive 9557 * and is therefore disabled by default. 9558 * 9559 * NB: For changes to be detected, a new immutable instance of the edited model must be 9560 * provided to mixitup, rather than manipulating properties on the existing instance. 9561 * If your changes are a result of a DB write and read, you will most likely be calling 9562 * `.dataset()` with a clean set of objects each time, so this will not be an issue. 9563 * 9564 * @example <caption>Example: Enabling dirty checking</caption> 9565 * 9566 * var myDataset = [ 9567 * { 9568 * id: 0, 9569 * title: "Blog Post Title 0" 9570 * ... 9571 * }, 9572 * { 9573 * id: 1, 9574 * title: "Blog Post Title 1" 9575 * ... 9576 * } 9577 * ]; 9578 * 9579 * // Instantiate a mixer with a pre-loaded dataset, and a target renderer 9580 * // function defined 9581 * 9582 * var mixer = mixitup(containerEl, { 9583 * data: { 9584 * uidKey: 'id', 9585 * dirtyCheck: true 9586 * }, 9587 * load: { 9588 * dataset: myDataset 9589 * }, 9590 * render: { 9591 * target: function() { ... } 9592 * } 9593 * }); 9594 * 9595 * // For illustration, we will clone and edit the second object in the dataset. 9596 * // NB: this would typically be done server-side in response to a DB update, 9597 * and then re-queried via an API. 9598 * 9599 * myDataset[1] = Object.assign({}, myDataset[1]); 9600 * 9601 * myDataset[1].title = 'Blog Post Title 11'; 9602 * 9603 * mixer.dataset(myDataset) 9604 * .then(function() { 9605 * // the target with ID "1", will be re-rendered reflecting its new title 9606 * }); 9607 * 9608 * @name dirtyCheck 9609 * @memberof mixitup.Config.data 9610 * @instance 9611 * @type {boolean} 9612 * @default false 9613 */ 9614 9615 this.dirtyCheck = false; 9616 9617 this.callActions('afterConstruct'); 9618 9619 h.seal(this); 9620 }; 9621 9622 mixitup.BaseStatic.call(mixitup.ConfigData); 9623 9624 mixitup.ConfigData.prototype = Object.create(mixitup.Base.prototype); 9625 9626 mixitup.ConfigData.prototype.constructor = mixitup.ConfigData; 9627 9628 /** 9629 * A group of properties allowing the toggling of various debug features. 9630 * 9631 * @constructor 9632 * @memberof mixitup.Config 9633 * @name debug 9634 * @namespace 9635 * @public 9636 * @since 3.0.0 9637 */ 9638 9639 mixitup.ConfigDebug = function() { 9640 mixitup.Base.call(this); 9641 9642 this.callActions('beforeConstruct'); 9643 9644 /** 9645 * A boolean dictating whether or not the mixer instance returned by the 9646 * `mixitup()` factory function should expose private properties and methods. 9647 * 9648 * By default, mixer instances only expose their public API, but enabling 9649 * debug mode will give you access to various mixer internals which may aid 9650 * in debugging, or the authoring of extensions. 9651 * 9652 * @example <caption>Example: Enabling debug mode</caption> 9653 * 9654 * var mixer = mixitup(containerEl, { 9655 * debug: { 9656 * enable: true 9657 * } 9658 * }); 9659 * 9660 * // Private properties and methods will now be visible on the mixer instance: 9661 * 9662 * console.log(mixer); 9663 * 9664 * @name enable 9665 * @memberof mixitup.Config.debug 9666 * @instance 9667 * @type {boolean} 9668 * @default false 9669 */ 9670 9671 this.enable = false; 9672 9673 /** 9674 * A boolean dictating whether or not warnings should be shown when various 9675 * common gotchas occur. 9676 * 9677 * Warnings are intended to provide insights during development when something 9678 * occurs that is not a fatal, but may indicate an issue with your integration, 9679 * and are therefore turned on by default. However, you may wish to disable 9680 * them in production. 9681 * 9682 * @example <caption>Example 1: Disabling warnings</caption> 9683 * 9684 * var mixer = mixitup(containerEl, { 9685 * debug: { 9686 * showWarnings: false 9687 * } 9688 * }); 9689 * 9690 * @example <caption>Example 2: Disabling warnings based on environment</caption> 9691 * 9692 * var showWarnings = myAppConfig.environment === 'development' ? true : false; 9693 * 9694 * var mixer = mixitup(containerEl, { 9695 * debug: { 9696 * showWarnings: showWarnings 9697 * } 9698 * }); 9699 * 9700 * @name showWarnings 9701 * @memberof mixitup.Config.debug 9702 * @instance 9703 * @type {boolean} 9704 * @default true 9705 */ 9706 9707 this.showWarnings = true; 9708 9709 /** 9710 * Used for server-side testing only. 9711 * 9712 * @private 9713 * @name fauxAsync 9714 * @memberof mixitup.Config.debug 9715 * @instance 9716 * @type {boolean} 9717 * @default false 9718 */ 9719 9720 this.fauxAsync = false; 9721 9722 this.callActions('afterConstruct'); 9723 9724 h.seal(this); 9725 }; 9726 9727 mixitup.BaseStatic.call(mixitup.ConfigDebug); 9728 9729 mixitup.ConfigDebug.prototype = Object.create(mixitup.Base.prototype); 9730 9731 mixitup.ConfigDebug.prototype.constructor = mixitup.ConfigDebug; 9732 9733 /** 9734 * A group of properties relating to the layout of the container. 9735 * 9736 * @constructor 9737 * @memberof mixitup.Config 9738 * @name layout 9739 * @namespace 9740 * @public 9741 * @since 3.0.0 9742 */ 9743 9744 mixitup.ConfigLayout = function() { 9745 mixitup.Base.call(this); 9746 9747 this.callActions('beforeConstruct'); 9748 9749 /** 9750 * A boolean dictating whether or not mixitup should query all descendants 9751 * of the container for targets, or only immediate children. 9752 * 9753 * By default, mixitup will query all descendants matching the 9754 * `selectors.target` selector when indexing targets upon instantiation. 9755 * This allows for targets to be nested inside a sub-container which is 9756 * useful when ring-fencing targets from locally scoped controls in your 9757 * markup (see `controls.scope`). 9758 * 9759 * However, if you are building a more complex UI requiring the nesting 9760 * of mixers within mixers, you will most likely want to limit targets to 9761 * immediate children of the container by setting this property to `false`. 9762 * 9763 * @example <caption>Example: Restricting targets to immediate children</caption> 9764 * 9765 * var mixer = mixitup(containerEl, { 9766 * layout: { 9767 * allowNestedTargets: false 9768 * } 9769 * }); 9770 * 9771 * @name allowNestedTargets 9772 * @memberof mixitup.Config.layout 9773 * @instance 9774 * @type {boolean} 9775 * @default true 9776 */ 9777 9778 this.allowNestedTargets = true; 9779 9780 /** 9781 * A string specifying an optional class name to apply to the container when in 9782 * its default state. 9783 * 9784 * By changing this class name or adding a class name to the container via the 9785 * `.changeLayout()` API method, the CSS layout of the container can be changed, 9786 * and MixItUp will attemp to gracefully animate the container and its targets 9787 * between states. 9788 * 9789 * @example <caption>Example 1: Specifying a container class name</caption> 9790 * 9791 * var mixer = mixitup(containerEl, { 9792 * layout: { 9793 * containerClassName: 'grid' 9794 * } 9795 * }); 9796 * 9797 * @example <caption>Example 2: Changing the default class name with `.changeLayout()`</caption> 9798 * 9799 * var mixer = mixitup(containerEl, { 9800 * layout: { 9801 * containerClassName: 'grid' 9802 * } 9803 * }); 9804 * 9805 * mixer.changeLayout('list') 9806 * .then(function(state) { 9807 * console.log(state.activeContainerClass); // "list" 9808 * }); 9809 * 9810 * @name containerClassName 9811 * @memberof mixitup.Config.layout 9812 * @instance 9813 * @type {string} 9814 * @default '' 9815 */ 9816 9817 this.containerClassName = ''; 9818 9819 /** 9820 * A reference to a non-target sibling element after which to insert targets 9821 * when there are no targets in the container. 9822 * 9823 * @example <caption>Example: Setting a `siblingBefore` reference element</caption> 9824 * 9825 * var addButton = containerEl.querySelector('button'); 9826 * 9827 * var mixer = mixitup(containerEl, { 9828 * layout: { 9829 * siblingBefore: addButton 9830 * } 9831 * }); 9832 * 9833 * @name siblingBefore 9834 * @memberof mixitup.Config.layout 9835 * @instance 9836 * @type {HTMLElement} 9837 * @default null 9838 */ 9839 9840 this.siblingBefore = null; 9841 9842 /** 9843 * A reference to a non-target sibling element before which to insert targets 9844 * when there are no targets in the container. 9845 * 9846 * @example <caption>Example: Setting an `siblingAfter` reference element</caption> 9847 * 9848 * var gap = containerEl.querySelector('.gap'); 9849 * 9850 * var mixer = mixitup(containerEl, { 9851 * layout: { 9852 * siblingAfter: gap 9853 * } 9854 * }); 9855 * 9856 * @name siblingAfter 9857 * @memberof mixitup.Config.layout 9858 * @instance 9859 * @type {HTMLElement} 9860 * @default null 9861 */ 9862 9863 this.siblingAfter = null; 9864 9865 this.callActions('afterConstruct'); 9866 9867 h.seal(this); 9868 }; 9869 9870 mixitup.BaseStatic.call(mixitup.ConfigLayout); 9871 9872 mixitup.ConfigLayout.prototype = Object.create(mixitup.Base.prototype); 9873 9874 mixitup.ConfigLayout.prototype.constructor = mixitup.ConfigLayout; 9875 9876 /** 9877 * A group of properties defining the initial state of the mixer on load (instantiation). 9878 * 9879 * @constructor 9880 * @memberof mixitup.Config 9881 * @name load 9882 * @namespace 9883 * @public 9884 * @since 2.0.0 9885 */ 9886 9887 mixitup.ConfigLoad = function() { 9888 mixitup.Base.call(this); 9889 9890 this.callActions('beforeConstruct'); 9891 9892 /** 9893 * A string defining any filtering to be statically applied to the mixer on load. 9894 * As per the `.filter()` API, this can be any valid selector string, or the 9895 * values `'all'` or `'none'`. 9896 * 9897 * @example <caption>Example 1: Defining an initial filter selector to be applied on load</caption> 9898 * 9899 * // The mixer will show only those targets matching '.category-a' on load. 9900 * 9901 * var mixer = mixitup(containerEl, { 9902 * load: { 9903 * filter: '.category-a' 9904 * } 9905 * }); 9906 * 9907 * @example <caption>Example 2: Hiding all targets on load</caption> 9908 * 9909 * // The mixer will show hide all targets on load. 9910 * 9911 * var mixer = mixitup(containerEl, { 9912 * load: { 9913 * filter: 'none' 9914 * } 9915 * }); 9916 * 9917 * @name filter 9918 * @memberof mixitup.Config.load 9919 * @instance 9920 * @type {string} 9921 * @default 'all' 9922 */ 9923 9924 this.filter = 'all'; 9925 9926 /** 9927 * A string defining any sorting to be statically applied to the mixer on load. 9928 * As per the `.sort()` API, this should be a valid "sort string" made up of 9929 * an attribute to sort by (or `'default'`) followed by an optional sorting 9930 * order, or the value `'random'`; 9931 * 9932 * @example <caption>Example: Defining sorting to be applied on load</caption> 9933 * 9934 * // The mixer will sort the container by the value of the `data-published-date` 9935 * // attribute, in descending order. 9936 * 9937 * var mixer = mixitup(containerEl, { 9938 * load: { 9939 * sort: 'published-date:desc' 9940 * } 9941 * }); 9942 * 9943 * @name sort 9944 * @memberof mixitup.Config.load 9945 * @instance 9946 * @type {string} 9947 * @default 'default:asc' 9948 */ 9949 9950 this.sort = 'default:asc'; 9951 9952 /** 9953 * An array of objects representing the underlying data of any pre-rendered targets, 9954 * when using the `.dataset()` API. 9955 * 9956 * NB: If targets are pre-rendered when the mixer is instantiated, this must be set. 9957 * 9958 * @example <caption>Example: Defining the initial underyling dataset</caption> 9959 * 9960 * var myDataset = [ 9961 * { 9962 * id: 0, 9963 * title: "Blog Post Title 0", 9964 * ... 9965 * }, 9966 * { 9967 * id: 1, 9968 * title: "Blog Post Title 1", 9969 * ... 9970 * } 9971 * ]; 9972 * 9973 * var mixer = mixitup(containerEl, { 9974 * data: { 9975 * uidKey: 'id' 9976 * }, 9977 * load: { 9978 * dataset: myDataset 9979 * } 9980 * }); 9981 * 9982 * @name dataset 9983 * @memberof mixitup.Config.load 9984 * @instance 9985 * @type {Array.<object>} 9986 * @default null 9987 */ 9988 9989 this.dataset = null; 9990 9991 this.callActions('afterConstruct'); 9992 9993 h.seal(this); 9994 }; 9995 9996 mixitup.BaseStatic.call(mixitup.ConfigLoad); 9997 9998 mixitup.ConfigLoad.prototype = Object.create(mixitup.Base.prototype); 9999 10000 mixitup.ConfigLoad.prototype.constructor = mixitup.ConfigLoad; 10001 10002 /** 10003 * A group of properties defining the selectors used to query elements within a mixitup container. 10004 * 10005 * @constructor 10006 * @memberof mixitup.Config 10007 * @name selectors 10008 * @namespace 10009 * @public 10010 * @since 3.0.0 10011 */ 10012 10013 mixitup.ConfigSelectors = function() { 10014 mixitup.Base.call(this); 10015 10016 this.callActions('beforeConstruct'); 10017 10018 /** 10019 * A selector string used to query and index target elements within the container. 10020 * 10021 * By default, the class selector `'.mix'` is used, but this can be changed to an 10022 * attribute or element selector to match the style of your project. 10023 * 10024 * @example <caption>Example 1: Changing the target selector</caption> 10025 * 10026 * var mixer = mixitup(containerEl, { 10027 * selectors: { 10028 * target: '.portfolio-item' 10029 * } 10030 * }); 10031 * 10032 * @example <caption>Example 2: Using an attribute selector as a target selector</caption> 10033 * 10034 * // The mixer will search for any children with the attribute `data-ref="mix"` 10035 * 10036 * var mixer = mixitup(containerEl, { 10037 * selectors: { 10038 * target: '[data-ref="mix"]' 10039 * } 10040 * }); 10041 * 10042 * @name target 10043 * @memberof mixitup.Config.selectors 10044 * @instance 10045 * @type {string} 10046 * @default '.mix' 10047 */ 10048 10049 this.target = '.mix'; 10050 10051 /** 10052 * A optional selector string used to add further specificity to the querying of control elements, 10053 * in addition to their mandatory data attribute (e.g. `data-filter`, `data-toggle`, `data-sort`). 10054 * 10055 * This can be used if other elements in your document must contain the above attributes 10056 * (e.g. for use in third-party scripts), and would otherwise interfere with MixItUp. Adding 10057 * an additional `control` selector of your choice allows MixItUp to restrict event handling 10058 * to only those elements matching the defined selector. 10059 * 10060 * @name control 10061 * @memberof mixitup.Config.selectors 10062 * @instance 10063 * @type {string} 10064 * @default '' 10065 * 10066 * @example <caption>Example 1: Adding a `selectors.control` selector</caption> 10067 * 10068 * var mixer = mixitup(containerEl, { 10069 * selectors: { 10070 * control: '.mixitup-control' 10071 * } 10072 * }); 10073 * 10074 * // Will not be handled: 10075 * // <button data-filter=".category-a"></button> 10076 * 10077 * // Will be handled: 10078 * // <button class="mixitup-control" data-filter=".category-a"></button> 10079 */ 10080 10081 this.control = ''; 10082 10083 this.callActions('afterConstruct'); 10084 10085 h.seal(this); 10086 }; 10087 10088 mixitup.BaseStatic.call(mixitup.ConfigSelectors); 10089 10090 mixitup.ConfigSelectors.prototype = Object.create(mixitup.Base.prototype); 10091 10092 mixitup.ConfigSelectors.prototype.constructor = mixitup.ConfigSelectors; 10093 10094 /** 10095 * A group of optional render functions for creating and updating elements. 10096 * 10097 * All render functions receive a data object, and should return a valid HTML string. 10098 * 10099 * @constructor 10100 * @memberof mixitup.Config 10101 * @name render 10102 * @namespace 10103 * @public 10104 * @since 3.0.0 10105 */ 10106 10107 mixitup.ConfigRender = function() { 10108 mixitup.Base.call(this); 10109 10110 this.callActions('beforeConstruct'); 10111 10112 /** 10113 * A function returning an HTML string representing a target element, or a reference to a 10114 * single DOM element. 10115 * 10116 * The function is invoked as part of the `.dataset()` API, whenever a new item is added 10117 * to the dataset, or an item in the dataset changes (if `dataset.dirtyCheck` is enabled). 10118 * 10119 * The function receives the relevant dataset item as its first parameter. 10120 * 10121 * @example <caption>Example 1: Using string concatenation</caption> 10122 * 10123 * var mixer = mixitup(containerEl, { 10124 * render: { 10125 * target: function(item) { 10126 * return ( 10127 * '<div class="mix">' + 10128 * '<h2>' + item.title + '</h2>' + 10129 * '</div>' 10130 * ); 10131 * } 10132 * } 10133 * }); 10134 * 10135 * @example <caption>Example 2: Using an ES2015 template literal</caption> 10136 * 10137 * var mixer = mixitup(containerEl, { 10138 * render: { 10139 * target: function(item) { 10140 * return ( 10141 * `<div class="mix"> 10142 * <h2>${item.title}</h2> 10143 * </div>` 10144 * ); 10145 * } 10146 * } 10147 * }); 10148 * 10149 * @example <caption>Example 3: Using a Handlebars template</caption> 10150 * 10151 * var targetTemplate = Handlebars.compile('<div class="mix"><h2>{{title}}</h2></div>'); 10152 * 10153 * var mixer = mixitup(containerEl, { 10154 * render: { 10155 * target: targetTemplate 10156 * } 10157 * }); 10158 * 10159 * @example <caption>Example 4: Returning a DOM element</caption> 10160 * 10161 * var mixer = mixitup(containerEl, { 10162 * render: { 10163 * target: function(item) { 10164 * // Create a single element using your framework's built-in renderer 10165 * 10166 * var el = ... 10167 * 10168 * return el; 10169 * } 10170 * } 10171 * }); 10172 * 10173 * @name target 10174 * @memberof mixitup.Config.render 10175 * @instance 10176 * @type {function} 10177 * @default 'null' 10178 */ 10179 10180 this.target = null; 10181 10182 this.callActions('afterConstruct'); 10183 10184 h.seal(this); 10185 }; 10186 10187 mixitup.BaseStatic.call(mixitup.ConfigRender); 10188 10189 mixitup.ConfigRender.prototype = Object.create(mixitup.Base.prototype); 10190 10191 mixitup.ConfigRender.prototype.constructor = mixitup.ConfigRender; 10192 10193 /** 10194 * @constructor 10195 * @memberof mixitup 10196 * @private 10197 * @since 3.0.0 10198 */ 10199 10200 mixitup.ConfigTemplates = function() { 10201 mixitup.Base.call(this); 10202 10203 this.callActions('beforeConstruct'); 10204 10205 this.callActions('afterConstruct'); 10206 10207 h.seal(this); 10208 }; 10209 10210 mixitup.BaseStatic.call(mixitup.ConfigTemplates); 10211 10212 mixitup.ConfigTemplates.prototype = Object.create(mixitup.Base.prototype); 10213 10214 mixitup.ConfigTemplates.prototype.constructor = mixitup.ConfigTemplates; 10215 10216 /** 10217 * `mixitup.Config` is an interface used for customising the functionality of a 10218 * mixer instance. It is organised into several semantically distinct sub-objects, 10219 * each one pertaining to a particular aspect of MixItUp functionality. 10220 * 10221 * An object literal containing any or all of the available properies, 10222 * known as the "configuration object", can be passed as the second parameter to 10223 * the `mixitup` factory function when creating a mixer instance to customise its 10224 * functionality as needed. 10225 * 10226 * If no configuration object is passed, the mixer instance will take on the default 10227 * configuration values detailed below. 10228 * 10229 * @example <caption>Example 1: Creating and passing the configuration object</caption> 10230 * // Create a configuration object with desired values 10231 * 10232 * var config = { 10233 * animation: { 10234 * enable: false 10235 * }, 10236 * selectors: { 10237 * target: '.item' 10238 * } 10239 * }; 10240 * 10241 * // Pass the configuration object to the mixitup factory function 10242 * 10243 * var mixer = mixitup(containerEl, config); 10244 * 10245 * @example <caption>Example 2: Passing the configuration object inline</caption> 10246 * // Typically, the configuration object is passed inline for brevity. 10247 * 10248 * var mixer = mixitup(containerEl, { 10249 * controls: { 10250 * live: true, 10251 * toggleLogic: 'and' 10252 * } 10253 * }); 10254 * 10255 * 10256 * @constructor 10257 * @memberof mixitup 10258 * @namespace 10259 * @public 10260 * @since 2.0.0 10261 */ 10262 10263 mixitup.Config = function() { 10264 mixitup.Base.call(this); 10265 10266 this.callActions('beforeConstruct'); 10267 10268 this.animation = new mixitup.ConfigAnimation(); 10269 this.behavior = new mixitup.ConfigBehavior(); 10270 this.callbacks = new mixitup.ConfigCallbacks(); 10271 this.controls = new mixitup.ConfigControls(); 10272 this.classNames = new mixitup.ConfigClassNames(); 10273 this.data = new mixitup.ConfigData(); 10274 this.debug = new mixitup.ConfigDebug(); 10275 this.layout = new mixitup.ConfigLayout(); 10276 this.load = new mixitup.ConfigLoad(); 10277 this.selectors = new mixitup.ConfigSelectors(); 10278 this.render = new mixitup.ConfigRender(); 10279 this.templates = new mixitup.ConfigTemplates(); 10280 10281 this.callActions('afterConstruct'); 10282 10283 h.seal(this); 10284 }; 10285 10286 mixitup.BaseStatic.call(mixitup.Config); 10287 10288 mixitup.Config.prototype = Object.create(mixitup.Base.prototype); 10289 10290 mixitup.Config.prototype.constructor = mixitup.Config; 10291 10292 /** 10293 * @constructor 10294 * @memberof mixitup 10295 * @private 10296 * @since 3.0.0 10297 */ 10298 10299 mixitup.MixerDom = function() { 10300 mixitup.Base.call(this); 10301 10302 this.callActions('beforeConstruct'); 10303 10304 this.document = null; 10305 this.body = null; 10306 this.container = null; 10307 this.parent = null; 10308 this.targets = []; 10309 10310 this.callActions('afterConstruct'); 10311 10312 h.seal(this); 10313 }; 10314 10315 mixitup.BaseStatic.call(mixitup.MixerDom); 10316 10317 mixitup.MixerDom.prototype = Object.create(mixitup.Base.prototype); 10318 10319 mixitup.MixerDom.prototype.constructor = mixitup.MixerDom; 10320 10321 /** 10322 * @constructor 10323 * @memberof mixitup 10324 * @private 10325 * @since 3.0.0 10326 */ 10327 10328 mixitup.UiClassNames = function() { 10329 mixitup.Base.call(this); 10330 10331 this.callActions('beforeConstruct'); 10332 10333 this.base = ''; 10334 this.active = ''; 10335 this.disabled = ''; 10336 10337 this.callActions('afterConstruct'); 10338 10339 h.seal(this); 10340 }; 10341 10342 mixitup.BaseStatic.call(mixitup.UiClassNames); 10343 10344 mixitup.UiClassNames.prototype = Object.create(mixitup.Base.prototype); 10345 10346 mixitup.UiClassNames.prototype.constructor = mixitup.UiClassNames; 10347 10348 /** 10349 * An object into which all arbitrary arguments sent to '.dataset()' are mapped. 10350 * 10351 * @constructor 10352 * @memberof mixitup 10353 * @private 10354 * @since 3.0.0 10355 */ 10356 10357 mixitup.CommandDataset = function() { 10358 mixitup.Base.call(this); 10359 10360 this.callActions('beforeConstruct'); 10361 10362 this.dataset = null; 10363 10364 this.callActions('afterConstruct'); 10365 10366 h.seal(this); 10367 }; 10368 10369 mixitup.BaseStatic.call(mixitup.CommandDataset); 10370 10371 mixitup.CommandDataset.prototype = Object.create(mixitup.Base.prototype); 10372 10373 mixitup.CommandDataset.prototype.constructor = mixitup.CommandDataset; 10374 10375 /** 10376 * An object into which all arbitrary arguments sent to '.multimix()' are mapped. 10377 * 10378 * @constructor 10379 * @memberof mixitup 10380 * @private 10381 * @since 3.0.0 10382 */ 10383 10384 mixitup.CommandMultimix = function() { 10385 mixitup.Base.call(this); 10386 10387 this.callActions('beforeConstruct'); 10388 10389 this.filter = null; 10390 this.sort = null; 10391 this.insert = null; 10392 this.remove = null; 10393 this.changeLayout = null; 10394 10395 this.callActions('afterConstruct'); 10396 10397 h.seal(this); 10398 }; 10399 10400 mixitup.BaseStatic.call(mixitup.CommandMultimix); 10401 10402 mixitup.CommandMultimix.prototype = Object.create(mixitup.Base.prototype); 10403 10404 mixitup.CommandMultimix.prototype.constructor = mixitup.CommandMultimix; 10405 10406 /** 10407 * An object into which all arbitrary arguments sent to '.filter()' are mapped. 10408 * 10409 * @constructor 10410 * @memberof mixitup 10411 * @private 10412 * @since 3.0.0 10413 */ 10414 10415 mixitup.CommandFilter = function() { 10416 mixitup.Base.call(this); 10417 10418 this.callActions('beforeConstruct'); 10419 10420 this.selector = ''; 10421 this.collection = null; 10422 this.action = 'show'; // enum: ['show', 'hide'] 10423 10424 this.callActions('afterConstruct'); 10425 10426 h.seal(this); 10427 }; 10428 10429 mixitup.BaseStatic.call(mixitup.CommandFilter); 10430 10431 mixitup.CommandFilter.prototype = Object.create(mixitup.Base.prototype); 10432 10433 mixitup.CommandFilter.prototype.constructor = mixitup.CommandFilter; 10434 10435 /** 10436 * An object into which all arbitrary arguments sent to '.sort()' are mapped. 10437 * 10438 * @constructor 10439 * @memberof mixitup 10440 * @private 10441 * @since 3.0.0 10442 */ 10443 10444 mixitup.CommandSort = function() { 10445 mixitup.Base.call(this); 10446 10447 this.callActions('beforeConstruct'); 10448 10449 this.sortString = ''; 10450 this.attribute = ''; 10451 this.order = 'asc'; 10452 this.collection = null; 10453 this.next = null; 10454 10455 this.callActions('afterConstruct'); 10456 10457 h.seal(this); 10458 }; 10459 10460 mixitup.BaseStatic.call(mixitup.CommandSort); 10461 10462 mixitup.CommandSort.prototype = Object.create(mixitup.Base.prototype); 10463 10464 mixitup.CommandSort.prototype.constructor = mixitup.CommandSort; 10465 10466 /** 10467 * An object into which all arbitrary arguments sent to '.insert()' are mapped. 10468 * 10469 * @constructor 10470 * @memberof mixitup 10471 * @private 10472 * @since 3.0.0 10473 */ 10474 10475 mixitup.CommandInsert = function() { 10476 mixitup.Base.call(this); 10477 10478 this.callActions('beforeConstruct'); 10479 10480 this.index = 0; 10481 this.collection = []; 10482 this.position = 'before'; // enum: ['before', 'after'] 10483 this.sibling = null; 10484 10485 this.callActions('afterConstruct'); 10486 10487 h.seal(this); 10488 }; 10489 10490 mixitup.BaseStatic.call(mixitup.CommandInsert); 10491 10492 mixitup.CommandInsert.prototype = Object.create(mixitup.Base.prototype); 10493 10494 mixitup.CommandInsert.prototype.constructor = mixitup.CommandInsert; 10495 10496 /** 10497 * An object into which all arbitrary arguments sent to '.remove()' are mapped. 10498 * 10499 * @constructor 10500 * @memberof mixitup 10501 * @private 10502 * @since 3.0.0 10503 */ 10504 10505 mixitup.CommandRemove = function() { 10506 mixitup.Base.call(this); 10507 10508 this.callActions('beforeConstruct'); 10509 10510 this.targets = []; 10511 this.collection = []; 10512 10513 this.callActions('afterConstruct'); 10514 10515 h.seal(this); 10516 }; 10517 10518 mixitup.BaseStatic.call(mixitup.CommandRemove); 10519 10520 mixitup.CommandRemove.prototype = Object.create(mixitup.Base.prototype); 10521 10522 mixitup.CommandRemove.prototype.constructor = mixitup.CommandRemove; 10523 10524 /** 10525 * An object into which all arbitrary arguments sent to '.changeLayout()' are mapped. 10526 * 10527 * @constructor 10528 * @memberof mixitup 10529 * @private 10530 * @since 3.0.0 10531 */ 10532 10533 mixitup.CommandChangeLayout = function() { 10534 mixitup.Base.call(this); 10535 10536 this.callActions('beforeConstruct'); 10537 10538 this.containerClassName = ''; 10539 10540 this.callActions('afterConstruct'); 10541 10542 h.seal(this); 10543 }; 10544 10545 mixitup.BaseStatic.call(mixitup.CommandChangeLayout); 10546 10547 mixitup.CommandChangeLayout.prototype = Object.create(mixitup.Base.prototype); 10548 10549 mixitup.CommandChangeLayout.prototype.constructor = mixitup.CommandChangeLayout; 10550 10551 /** 10552 * @constructor 10553 * @memberof mixitup 10554 * @private 10555 * @since 3.0.0 10556 * @param {string} type 10557 * @param {string} selector 10558 * @param {boolean} [live] 10559 * @param {string} [parent] 10560 * An optional string representing the name of the mixer.dom property containing a reference to a parent element. 10561 */ 10562 10563 mixitup.ControlDefinition = function(type, selector, live, parent) { 10564 mixitup.Base.call(this); 10565 10566 this.callActions('beforeConstruct'); 10567 10568 this.type = type; 10569 this.selector = selector; 10570 this.live = live || false; 10571 this.parent = parent || ''; 10572 10573 this.callActions('afterConstruct'); 10574 10575 h.freeze(this); 10576 h.seal(this); 10577 }; 10578 10579 mixitup.BaseStatic.call(mixitup.ControlDefinition); 10580 10581 mixitup.ControlDefinition.prototype = Object.create(mixitup.Base.prototype); 10582 10583 mixitup.ControlDefinition.prototype.constructor = mixitup.ControlDefinition; 10584 10585 mixitup.controlDefinitions = []; 10586 10587 mixitup.controlDefinitions.push(new mixitup.ControlDefinition('multimix', '[data-filter][data-sort]')); 10588 mixitup.controlDefinitions.push(new mixitup.ControlDefinition('filter', '[data-filter]')); 10589 mixitup.controlDefinitions.push(new mixitup.ControlDefinition('sort', '[data-sort]')); 10590 mixitup.controlDefinitions.push(new mixitup.ControlDefinition('toggle', '[data-toggle]')); 10591 10592 /** 10593 * @constructor 10594 * @memberof mixitup 10595 * @private 10596 * @since 3.0.0 10597 */ 10598 10599 mixitup.Control = function() { 10600 mixitup.Base.call(this); 10601 10602 this.callActions('beforeConstruct'); 10603 10604 this.el = null; 10605 this.selector = ''; 10606 this.bound = []; 10607 this.pending = -1; 10608 this.type = ''; 10609 this.status = 'inactive'; // enum: ['inactive', 'active', 'disabled', 'live'] 10610 this.filter = ''; 10611 this.sort = ''; 10612 this.canDisable = false; 10613 this.handler = null; 10614 this.classNames = new mixitup.UiClassNames(); 10615 10616 this.callActions('afterConstruct'); 10617 10618 h.seal(this); 10619 }; 10620 10621 mixitup.BaseStatic.call(mixitup.Control); 10622 10623 mixitup.Control.prototype = Object.create(mixitup.Base.prototype); 10624 10625 h.extend(mixitup.Control.prototype, 10626 /** @lends mixitup.Control */ 10627 { 10628 constructor: mixitup.Control, 10629 10630 /** 10631 * @private 10632 * @param {HTMLElement} el 10633 * @param {string} type 10634 * @param {string} selector 10635 */ 10636 10637 init: function(el, type, selector) { 10638 var self = this; 10639 10640 this.callActions('beforeInit', arguments); 10641 10642 self.el = el; 10643 self.type = type; 10644 self.selector = selector; 10645 10646 if (self.selector) { 10647 self.status = 'live'; 10648 } else { 10649 self.canDisable = typeof self.el.disable === 'boolean'; 10650 10651 switch (self.type) { 10652 case 'filter': 10653 self.filter = self.el.getAttribute('data-filter'); 10654 10655 break; 10656 case 'toggle': 10657 self.filter = self.el.getAttribute('data-toggle'); 10658 10659 break; 10660 case 'sort': 10661 self.sort = self.el.getAttribute('data-sort'); 10662 10663 break; 10664 case 'multimix': 10665 self.filter = self.el.getAttribute('data-filter'); 10666 self.sort = self.el.getAttribute('data-sort'); 10667 10668 break; 10669 } 10670 } 10671 10672 self.bindClick(); 10673 10674 mixitup.controls.push(self); 10675 10676 this.callActions('afterInit', arguments); 10677 }, 10678 10679 /** 10680 * @private 10681 * @param {mixitup.Mixer} mixer 10682 * @return {boolean} 10683 */ 10684 10685 isBound: function(mixer) { 10686 var self = this, 10687 isBound = false; 10688 10689 this.callActions('beforeIsBound', arguments); 10690 10691 isBound = self.bound.indexOf(mixer) > -1; 10692 10693 return self.callFilters('afterIsBound', isBound, arguments); 10694 }, 10695 10696 /** 10697 * @private 10698 * @param {mixitup.Mixer} mixer 10699 * @return {void} 10700 */ 10701 10702 addBinding: function(mixer) { 10703 var self = this; 10704 10705 this.callActions('beforeAddBinding', arguments); 10706 10707 if (!self.isBound()) { 10708 self.bound.push(mixer); 10709 } 10710 10711 this.callActions('afterAddBinding', arguments); 10712 }, 10713 10714 /** 10715 * @private 10716 * @param {mixitup.Mixer} mixer 10717 * @return {void} 10718 */ 10719 10720 removeBinding: function(mixer) { 10721 var self = this, 10722 removeIndex = -1; 10723 10724 this.callActions('beforeRemoveBinding', arguments); 10725 10726 if ((removeIndex = self.bound.indexOf(mixer)) > -1) { 10727 self.bound.splice(removeIndex, 1); 10728 } 10729 10730 if (self.bound.length < 1) { 10731 // No bindings exist, unbind event click handlers 10732 10733 self.unbindClick(); 10734 10735 // Remove from `mixitup.controls` list 10736 10737 removeIndex = mixitup.controls.indexOf(self); 10738 10739 mixitup.controls.splice(removeIndex, 1); 10740 10741 if (self.status === 'active') { 10742 self.renderStatus(self.el, 'inactive'); 10743 } 10744 } 10745 10746 this.callActions('afterRemoveBinding', arguments); 10747 }, 10748 10749 /** 10750 * @private 10751 * @return {void} 10752 */ 10753 10754 bindClick: function() { 10755 var self = this; 10756 10757 this.callActions('beforeBindClick', arguments); 10758 10759 self.handler = function(e) { 10760 self.handleClick(e); 10761 }; 10762 10763 h.on(self.el, 'click', self.handler); 10764 10765 this.callActions('afterBindClick', arguments); 10766 }, 10767 10768 /** 10769 * @private 10770 * @return {void} 10771 */ 10772 10773 unbindClick: function() { 10774 var self = this; 10775 10776 this.callActions('beforeUnbindClick', arguments); 10777 10778 h.off(self.el, 'click', self.handler); 10779 10780 self.handler = null; 10781 10782 this.callActions('afterUnbindClick', arguments); 10783 }, 10784 10785 /** 10786 * @private 10787 * @param {MouseEvent} e 10788 * @return {void} 10789 */ 10790 10791 handleClick: function(e) { 10792 var self = this, 10793 button = null, 10794 mixer = null, 10795 isActive = false, 10796 returnValue = void(0), 10797 command = {}, 10798 clone = null, 10799 commands = [], 10800 i = -1; 10801 10802 this.callActions('beforeHandleClick', arguments); 10803 10804 this.pending = 0; 10805 10806 mixer = self.bound[0]; 10807 10808 if (!self.selector) { 10809 button = self.el; 10810 } else { 10811 button = h.closestParent(e.target, mixer.config.selectors.control + self.selector, true, mixer.dom.document); 10812 } 10813 10814 if (!button) { 10815 self.callActions('afterHandleClick', arguments); 10816 10817 return; 10818 } 10819 10820 switch (self.type) { 10821 case 'filter': 10822 command.filter = self.filter || button.getAttribute('data-filter'); 10823 10824 break; 10825 case 'sort': 10826 command.sort = self.sort || button.getAttribute('data-sort'); 10827 10828 break; 10829 case 'multimix': 10830 command.filter = self.filter || button.getAttribute('data-filter'); 10831 command.sort = self.sort || button.getAttribute('data-sort'); 10832 10833 break; 10834 case 'toggle': 10835 command.filter = self.filter || button.getAttribute('data-toggle'); 10836 10837 if (self.status === 'live') { 10838 isActive = h.hasClass(button, self.classNames.active); 10839 } else { 10840 isActive = self.status === 'active'; 10841 } 10842 10843 break; 10844 } 10845 10846 for (i = 0; i < self.bound.length; i++) { 10847 // Create a clone of the command for each bound mixer instance 10848 10849 clone = new mixitup.CommandMultimix(); 10850 10851 h.extend(clone, command); 10852 10853 commands.push(clone); 10854 } 10855 10856 commands = self.callFilters('commandsHandleClick', commands, arguments); 10857 10858 self.pending = self.bound.length; 10859 10860 for (i = 0; mixer = self.bound[i]; i++) { 10861 command = commands[i]; 10862 10863 if (!command) { 10864 // An extension may set a command null to indicate that the click should not be handled 10865 10866 continue; 10867 } 10868 10869 if (!mixer.lastClicked) { 10870 mixer.lastClicked = button; 10871 } 10872 10873 mixitup.events.fire('mixClick', mixer.dom.container, { 10874 state: mixer.state, 10875 instance: mixer, 10876 originalEvent: e, 10877 control: mixer.lastClicked 10878 }, mixer.dom.document); 10879 10880 if (typeof mixer.config.callbacks.onMixClick === 'function') { 10881 returnValue = mixer.config.callbacks.onMixClick.call(mixer.lastClicked, mixer.state, e, mixer); 10882 10883 if (returnValue === false) { 10884 // User has returned `false` from the callback, so do not handle click 10885 10886 continue; 10887 } 10888 } 10889 10890 if (self.type === 'toggle') { 10891 isActive ? mixer.toggleOff(command.filter) : mixer.toggleOn(command.filter); 10892 } else { 10893 mixer.multimix(command); 10894 } 10895 } 10896 10897 this.callActions('afterHandleClick', arguments); 10898 }, 10899 10900 /** 10901 * @param {object} command 10902 * @param {Array<string>} toggleArray 10903 * @return {void} 10904 */ 10905 10906 update: function(command, toggleArray) { 10907 var self = this, 10908 actions = new mixitup.CommandMultimix(); 10909 10910 self.callActions('beforeUpdate', arguments); 10911 10912 self.pending--; 10913 10914 self.pending = Math.max(0, self.pending); 10915 10916 if (self.pending > 0) return; 10917 10918 if (self.status === 'live') { 10919 // Live control (status unknown) 10920 10921 self.updateLive(command, toggleArray); 10922 } else { 10923 // Static control 10924 10925 actions.sort = self.sort; 10926 actions.filter = self.filter; 10927 10928 self.callFilters('actionsUpdate', actions, arguments); 10929 10930 self.parseStatusChange(self.el, command, actions, toggleArray); 10931 } 10932 10933 self.callActions('afterUpdate', arguments); 10934 }, 10935 10936 /** 10937 * @param {mixitup.CommandMultimix} command 10938 * @param {Array<string>} toggleArray 10939 * @return {void} 10940 */ 10941 10942 updateLive: function(command, toggleArray) { 10943 var self = this, 10944 controlButtons = null, 10945 actions = null, 10946 button = null, 10947 i = -1; 10948 10949 self.callActions('beforeUpdateLive', arguments); 10950 10951 if (!self.el) return; 10952 10953 controlButtons = self.el.querySelectorAll(self.selector); 10954 10955 for (i = 0; button = controlButtons[i]; i++) { 10956 actions = new mixitup.CommandMultimix(); 10957 10958 switch (self.type) { 10959 case 'filter': 10960 actions.filter = button.getAttribute('data-filter'); 10961 10962 break; 10963 case 'sort': 10964 actions.sort = button.getAttribute('data-sort'); 10965 10966 break; 10967 case 'multimix': 10968 actions.filter = button.getAttribute('data-filter'); 10969 actions.sort = button.getAttribute('data-sort'); 10970 10971 break; 10972 case 'toggle': 10973 actions.filter = button.getAttribute('data-toggle'); 10974 10975 break; 10976 } 10977 10978 actions = self.callFilters('actionsUpdateLive', actions, arguments); 10979 10980 self.parseStatusChange(button, command, actions, toggleArray); 10981 } 10982 10983 self.callActions('afterUpdateLive', arguments); 10984 }, 10985 10986 /** 10987 * @param {HTMLElement} button 10988 * @param {mixitup.CommandMultimix} command 10989 * @param {mixitup.CommandMultimix} actions 10990 * @param {Array<string>} toggleArray 10991 * @return {void} 10992 */ 10993 10994 parseStatusChange: function(button, command, actions, toggleArray) { 10995 var self = this, 10996 alias = '', 10997 toggle = '', 10998 i = -1; 10999 11000 self.callActions('beforeParseStatusChange', arguments); 11001 11002 switch (self.type) { 11003 case 'filter': 11004 if (command.filter === actions.filter) { 11005 self.renderStatus(button, 'active'); 11006 } else { 11007 self.renderStatus(button, 'inactive'); 11008 } 11009 11010 break; 11011 case 'multimix': 11012 if (command.sort === actions.sort && command.filter === actions.filter) { 11013 self.renderStatus(button, 'active'); 11014 } else { 11015 self.renderStatus(button, 'inactive'); 11016 } 11017 11018 break; 11019 case 'sort': 11020 if (command.sort.match(/:asc/g)) { 11021 alias = command.sort.replace(/:asc/g, ''); 11022 } 11023 11024 if (command.sort === actions.sort || alias === actions.sort) { 11025 self.renderStatus(button, 'active'); 11026 } else { 11027 self.renderStatus(button, 'inactive'); 11028 } 11029 11030 break; 11031 case 'toggle': 11032 if (toggleArray.length < 1) self.renderStatus(button, 'inactive'); 11033 11034 if (command.filter === actions.filter) { 11035 self.renderStatus(button, 'active'); 11036 } 11037 11038 for (i = 0; i < toggleArray.length; i++) { 11039 toggle = toggleArray[i]; 11040 11041 if (toggle === actions.filter) { 11042 // Button matches one active toggle 11043 11044 self.renderStatus(button, 'active'); 11045 11046 break; 11047 } 11048 11049 self.renderStatus(button, 'inactive'); 11050 } 11051 11052 break; 11053 } 11054 11055 self.callActions('afterParseStatusChange', arguments); 11056 }, 11057 11058 /** 11059 * @param {HTMLElement} button 11060 * @param {string} status 11061 * @return {void} 11062 */ 11063 11064 renderStatus: function(button, status) { 11065 var self = this; 11066 11067 self.callActions('beforeRenderStatus', arguments); 11068 11069 switch (status) { 11070 case 'active': 11071 h.addClass(button, self.classNames.active); 11072 h.removeClass(button, self.classNames.disabled); 11073 11074 if (self.canDisable) self.el.disabled = false; 11075 11076 break; 11077 case 'inactive': 11078 h.removeClass(button, self.classNames.active); 11079 h.removeClass(button, self.classNames.disabled); 11080 11081 if (self.canDisable) self.el.disabled = false; 11082 11083 break; 11084 case 'disabled': 11085 if (self.canDisable) self.el.disabled = true; 11086 11087 h.addClass(button, self.classNames.disabled); 11088 h.removeClass(button, self.classNames.active); 11089 11090 break; 11091 } 11092 11093 if (self.status !== 'live') { 11094 // Update the control's status propery if not live 11095 11096 self.status = status; 11097 } 11098 11099 self.callActions('afterRenderStatus', arguments); 11100 } 11101 }); 11102 11103 mixitup.controls = []; 11104 11105 /** 11106 * @constructor 11107 * @memberof mixitup 11108 * @private 11109 * @since 3.0.0 11110 */ 11111 11112 mixitup.StyleData = function() { 11113 mixitup.Base.call(this); 11114 11115 this.callActions('beforeConstruct'); 11116 11117 this.x = 0; 11118 this.y = 0; 11119 this.top = 0; 11120 this.right = 0; 11121 this.bottom = 0; 11122 this.left = 0; 11123 this.width = 0; 11124 this.height = 0; 11125 this.marginRight = 0; 11126 this.marginBottom = 0; 11127 this.opacity = 0; 11128 this.scale = new mixitup.TransformData(); 11129 this.translateX = new mixitup.TransformData(); 11130 this.translateY = new mixitup.TransformData(); 11131 this.translateZ = new mixitup.TransformData(); 11132 this.rotateX = new mixitup.TransformData(); 11133 this.rotateY = new mixitup.TransformData(); 11134 this.rotateZ = new mixitup.TransformData(); 11135 11136 this.callActions('afterConstruct'); 11137 11138 h.seal(this); 11139 }; 11140 11141 mixitup.BaseStatic.call(mixitup.StyleData); 11142 11143 mixitup.StyleData.prototype = Object.create(mixitup.Base.prototype); 11144 11145 mixitup.StyleData.prototype.constructor = mixitup.StyleData; 11146 11147 /** 11148 * @constructor 11149 * @memberof mixitup 11150 * @private 11151 * @since 3.0.0 11152 */ 11153 11154 mixitup.TransformData = function() { 11155 mixitup.Base.call(this); 11156 11157 this.callActions('beforeConstruct'); 11158 11159 this.value = 0; 11160 this.unit = ''; 11161 11162 this.callActions('afterConstruct'); 11163 11164 h.seal(this); 11165 }; 11166 11167 mixitup.BaseStatic.call(mixitup.TransformData); 11168 11169 mixitup.TransformData.prototype = Object.create(mixitup.Base.prototype); 11170 11171 mixitup.TransformData.prototype.constructor = mixitup.TransformData; 11172 11173 /** 11174 * @constructor 11175 * @memberof mixitup 11176 * @private 11177 * @since 3.0.0 11178 */ 11179 11180 mixitup.TransformDefaults = function() { 11181 mixitup.StyleData.apply(this); 11182 11183 this.callActions('beforeConstruct'); 11184 11185 this.scale.value = 0.01; 11186 this.scale.unit = ''; 11187 11188 this.translateX.value = 20; 11189 this.translateX.unit = 'px'; 11190 11191 this.translateY.value = 20; 11192 this.translateY.unit = 'px'; 11193 11194 this.translateZ.value = 20; 11195 this.translateZ.unit = 'px'; 11196 11197 this.rotateX.value = 90; 11198 this.rotateX.unit = 'deg'; 11199 11200 this.rotateY.value = 90; 11201 this.rotateY.unit = 'deg'; 11202 11203 this.rotateX.value = 90; 11204 this.rotateX.unit = 'deg'; 11205 11206 this.rotateZ.value = 180; 11207 this.rotateZ.unit = 'deg'; 11208 11209 this.callActions('afterConstruct'); 11210 11211 h.seal(this); 11212 }; 11213 11214 mixitup.BaseStatic.call(mixitup.TransformDefaults); 11215 11216 mixitup.TransformDefaults.prototype = Object.create(mixitup.StyleData.prototype); 11217 11218 mixitup.TransformDefaults.prototype.constructor = mixitup.TransformDefaults; 11219 11220 /** 11221 * @private 11222 * @static 11223 * @since 3.0.0 11224 * @type {mixitup.TransformDefaults} 11225 */ 11226 11227 mixitup.transformDefaults = new mixitup.TransformDefaults(); 11228 11229 /** 11230 * @constructor 11231 * @memberof mixitup 11232 * @private 11233 * @since 3.0.0 11234 */ 11235 11236 mixitup.EventDetail = function() { 11237 this.state = null; 11238 this.futureState = null; 11239 this.instance = null; 11240 this.originalEvent = null; 11241 }; 11242 11243 /** 11244 * The `mixitup.Events` class contains all custom events dispatched by MixItUp at various 11245 * points within the lifecycle of a mixer operation. 11246 * 11247 * Each event is analogous to the callback function of the same name defined in 11248 * the `callbacks` configuration object, and is triggered immediately before it. 11249 * 11250 * Events are always triggered from the container element on which MixItUp is instantiated 11251 * upon. 11252 * 11253 * As with any event, registered event handlers receive the event object as a parameter 11254 * which includes a `detail` property containting references to the current `state`, 11255 * the `mixer` instance, and other event-specific properties described below. 11256 * 11257 * @constructor 11258 * @namespace 11259 * @memberof mixitup 11260 * @public 11261 * @since 3.0.0 11262 */ 11263 11264 mixitup.Events = function() { 11265 mixitup.Base.call(this); 11266 11267 this.callActions('beforeConstruct'); 11268 11269 /** 11270 * A custom event triggered immediately after any MixItUp operation is requested 11271 * and before animations have begun. 11272 * 11273 * The `mixStart` event also exposes a `futureState` property via the 11274 * `event.detail` object, which represents the final state of the mixer once 11275 * the requested operation has completed. 11276 * 11277 * @name mixStart 11278 * @memberof mixitup.Events 11279 * @static 11280 * @type {CustomEvent} 11281 */ 11282 11283 this.mixStart = null; 11284 11285 /** 11286 * A custom event triggered when a MixItUp operation is requested while another 11287 * operation is in progress, and the animation queue is full, or queueing 11288 * is disabled. 11289 * 11290 * @name mixBusy 11291 * @memberof mixitup.Events 11292 * @static 11293 * @type {CustomEvent} 11294 */ 11295 11296 this.mixBusy = null; 11297 11298 /** 11299 * A custom event triggered after any MixItUp operation has completed, and the 11300 * state has been updated. 11301 * 11302 * @name mixEnd 11303 * @memberof mixitup.Events 11304 * @static 11305 * @type {CustomEvent} 11306 */ 11307 11308 this.mixEnd = null; 11309 11310 /** 11311 * A custom event triggered whenever a filter operation "fails", i.e. no targets 11312 * could be found matching the requested filter. 11313 * 11314 * @name mixFail 11315 * @memberof mixitup.Events 11316 * @static 11317 * @type {CustomEvent} 11318 */ 11319 11320 this.mixFail = null; 11321 11322 /** 11323 * A custom event triggered whenever a MixItUp control is clicked, and before its 11324 * respective operation is requested. 11325 * 11326 * This event also exposes an `originalEvent` property via the `event.detail` 11327 * object, which holds a reference to the original click event. 11328 * 11329 * @name mixClick 11330 * @memberof mixitup.Events 11331 * @static 11332 * @type {CustomEvent} 11333 */ 11334 11335 this.mixClick = null; 11336 11337 this.callActions('afterConstruct'); 11338 11339 h.seal(this); 11340 }; 11341 11342 mixitup.BaseStatic.call(mixitup.Events); 11343 11344 mixitup.Events.prototype = Object.create(mixitup.Base.prototype); 11345 11346 mixitup.Events.prototype.constructor = mixitup.Events; 11347 11348 /** 11349 * @private 11350 * @param {string} eventType 11351 * @param {Element} el 11352 * @param {object} detail 11353 * @param {Document} [doc] 11354 */ 11355 11356 mixitup.Events.prototype.fire = function(eventType, el, detail, doc) { 11357 var self = this, 11358 event = null, 11359 eventDetail = new mixitup.EventDetail(); 11360 11361 self.callActions('beforeFire', arguments); 11362 11363 if (typeof self[eventType] === 'undefined') { 11364 throw new Error('Event type "' + eventType + '" not found.'); 11365 } 11366 11367 eventDetail.state = new mixitup.State(); 11368 11369 h.extend(eventDetail.state, detail.state); 11370 11371 if (detail.futureState) { 11372 eventDetail.futureState = new mixitup.State(); 11373 11374 h.extend(eventDetail.futureState, detail.futureState); 11375 } 11376 11377 eventDetail.instance = detail.instance; 11378 11379 if (detail.originalEvent) { 11380 eventDetail.originalEvent = detail.originalEvent; 11381 } 11382 11383 event = h.getCustomEvent(eventType, eventDetail, doc); 11384 11385 self.callFilters('eventFire', event, arguments); 11386 11387 el.dispatchEvent(event); 11388 }; 11389 11390 // Asign a singleton instance to `mixitup.events`: 11391 11392 mixitup.events = new mixitup.Events(); 11393 11394 /** 11395 * @constructor 11396 * @memberof mixitup 11397 * @private 11398 * @since 3.0.0 11399 */ 11400 11401 mixitup.QueueItem = function() { 11402 mixitup.Base.call(this); 11403 11404 this.callActions('beforeConstruct'); 11405 11406 this.args = []; 11407 this.instruction = null; 11408 this.triggerElement = null; 11409 this.deferred = null; 11410 this.isToggling = false; 11411 11412 this.callActions('afterConstruct'); 11413 11414 h.seal(this); 11415 }; 11416 11417 mixitup.BaseStatic.call(mixitup.QueueItem); 11418 11419 mixitup.QueueItem.prototype = Object.create(mixitup.Base.prototype); 11420 11421 mixitup.QueueItem.prototype.constructor = mixitup.QueueItem; 11422 11423 /** 11424 * The `mixitup.Mixer` class is used to hold discreet, user-configured 11425 * instances of MixItUp on a provided container element. 11426 * 11427 * Mixer instances are returned whenever the `mixitup()` factory function is called, 11428 * which expose a range of methods enabling API-based filtering, sorting, 11429 * insertion, removal and more. 11430 * 11431 * @constructor 11432 * @namespace 11433 * @memberof mixitup 11434 * @public 11435 * @since 3.0.0 11436 */ 11437 11438 mixitup.Mixer = function() { 11439 mixitup.Base.call(this); 11440 11441 this.callActions('beforeConstruct'); 11442 11443 this.config = new mixitup.Config(); 11444 11445 this.id = ''; 11446 11447 this.isBusy = false; 11448 this.isToggling = false; 11449 this.incPadding = true; 11450 11451 this.controls = []; 11452 this.targets = []; 11453 this.origOrder = []; 11454 this.cache = {}; 11455 11456 this.toggleArray = []; 11457 11458 this.targetsMoved = 0; 11459 this.targetsImmovable = 0; 11460 this.targetsBound = 0; 11461 this.targetsDone = 0; 11462 11463 this.staggerDuration = 0; 11464 this.effectsIn = null; 11465 this.effectsOut = null; 11466 this.transformIn = []; 11467 this.transformOut = []; 11468 this.queue = []; 11469 11470 this.state = null; 11471 this.lastOperation = null; 11472 this.lastClicked = null; 11473 this.userCallback = null; 11474 this.userDeferred = null; 11475 11476 this.dom = new mixitup.MixerDom(); 11477 11478 this.callActions('afterConstruct'); 11479 11480 h.seal(this); 11481 }; 11482 11483 mixitup.BaseStatic.call(mixitup.Mixer); 11484 11485 mixitup.Mixer.prototype = Object.create(mixitup.Base.prototype); 11486 11487 h.extend(mixitup.Mixer.prototype, 11488 /** @lends mixitup.Mixer */ 11489 { 11490 constructor: mixitup.Mixer, 11491 11492 /** 11493 * @private 11494 * @instance 11495 * @since 3.0.0 11496 * @param {HTMLElement} container 11497 * @param {HTMLElement} document 11498 * @param {string} id 11499 * @param {object} [config] 11500 */ 11501 11502 attach: function(container, document, id, config) { 11503 var self = this, 11504 target = null, 11505 i = -1; 11506 11507 self.callActions('beforeAttach', arguments); 11508 11509 self.id = id; 11510 11511 if (config) { 11512 h.extend(self.config, config, true, true); 11513 } 11514 11515 self.sanitizeConfig(); 11516 11517 self.cacheDom(container, document); 11518 11519 if (self.config.layout.containerClassName) { 11520 h.addClass(self.dom.container, self.config.layout.containerClassName); 11521 } 11522 11523 if (!mixitup.features.has.transitions) { 11524 self.config.animation.enable = false; 11525 } 11526 11527 if (typeof window.console === 'undefined') { 11528 self.config.debug.showWarnings = false; 11529 } 11530 11531 if (self.config.data.uidKey) { 11532 // If the dataset API is in use, force disable controls 11533 11534 self.config.controls.enable = false; 11535 } 11536 11537 self.indexTargets(); 11538 11539 self.state = self.getInitialState(); 11540 11541 for (i = 0; target = self.lastOperation.toHide[i]; i++) { 11542 target.hide(); 11543 } 11544 11545 if (self.config.controls.enable) { 11546 self.initControls(); 11547 11548 self.buildToggleArray(null, self.state); 11549 11550 self.updateControls({ 11551 filter: self.state.activeFilter, 11552 sort: self.state.activeSort 11553 }); 11554 } 11555 11556 self.parseEffects(); 11557 11558 self.callActions('afterAttach', arguments); 11559 }, 11560 11561 /** 11562 * @private 11563 * @instance 11564 * @since 3.0.0 11565 * @return {void} 11566 */ 11567 11568 sanitizeConfig: function() { 11569 var self = this; 11570 11571 self.callActions('beforeSanitizeConfig', arguments); 11572 11573 // Sanitize enum/string config options 11574 11575 self.config.controls.scope = self.config.controls.scope.toLowerCase().trim(); 11576 self.config.controls.toggleLogic = self.config.controls.toggleLogic.toLowerCase().trim(); 11577 self.config.controls.toggleDefault = self.config.controls.toggleDefault.toLowerCase().trim(); 11578 11579 self.config.animation.effects = self.config.animation.effects.trim(); 11580 11581 self.callActions('afterSanitizeConfig', arguments); 11582 }, 11583 11584 /** 11585 * @private 11586 * @instance 11587 * @since 3.0.0 11588 * @return {mixitup.State} 11589 */ 11590 11591 getInitialState: function() { 11592 var self = this, 11593 state = new mixitup.State(), 11594 operation = new mixitup.Operation(); 11595 11596 self.callActions('beforeGetInitialState', arguments); 11597 11598 // Map initial values into a mock state object in order to construct an operation 11599 11600 state.activeContainerClassName = self.config.layout.containerClassName; 11601 11602 if (self.config.load.dataset) { 11603 // Dataset API 11604 11605 if (!self.config.data.uidKey || typeof self.config.data.uidKey !== 'string') { 11606 throw new TypeError(mixitup.messages.errorConfigDataUidKeyNotSet()); 11607 } 11608 11609 operation.startDataset = operation.newDataset = state.activeDataset = self.config.load.dataset.slice(); 11610 operation.startContainerClassName = operation.newContainerClassName = state.activeContainerClassName; 11611 operation.show = self.targets.slice(); 11612 11613 state = self.callFilters('stateGetInitialState', state, arguments); 11614 } else { 11615 // DOM API 11616 11617 state.activeFilter = self.parseFilterArgs([self.config.load.filter]).command; 11618 state.activeSort = self.parseSortArgs([self.config.load.sort]).command; 11619 state.totalTargets = self.targets.length; 11620 11621 state = self.callFilters('stateGetInitialState', state, arguments); 11622 11623 if ( 11624 state.activeSort.collection || state.activeSort.attribute || 11625 state.activeSort.order === 'random' || state.activeSort.order === 'desc' 11626 ) { 11627 // Sorting on load 11628 11629 operation.newSort = state.activeSort; 11630 11631 self.sortOperation(operation); 11632 11633 self.printSort(false, operation); 11634 11635 self.targets = operation.newOrder; 11636 } else { 11637 operation.startOrder = operation.newOrder = self.targets; 11638 } 11639 11640 operation.startFilter = operation.newFilter = state.activeFilter; 11641 operation.startSort = operation.newSort = state.activeSort; 11642 operation.startContainerClassName = operation.newContainerClassName = state.activeContainerClassName; 11643 11644 if (operation.newFilter.selector === 'all') { 11645 operation.newFilter.selector = self.config.selectors.target; 11646 } else if (operation.newFilter.selector === 'none') { 11647 operation.newFilter.selector = ''; 11648 } 11649 } 11650 11651 operation = self.callFilters('operationGetInitialState', operation, [state]); 11652 11653 self.lastOperation = operation; 11654 11655 if (operation.newFilter) { 11656 self.filterOperation(operation); 11657 } 11658 11659 state = self.buildState(operation); 11660 11661 return state; 11662 }, 11663 11664 /** 11665 * Caches references of DOM elements neccessary for the mixer's functionality. 11666 * 11667 * @private 11668 * @instance 11669 * @since 3.0.0 11670 * @param {HTMLElement} el 11671 * @param {HTMLHtmlElement} document 11672 * @return {void} 11673 */ 11674 11675 cacheDom: function(el, document) { 11676 var self = this; 11677 11678 self.callActions('beforeCacheDom', arguments); 11679 11680 self.dom.document = document; 11681 self.dom.body = self.dom.document.querySelector('body'); 11682 self.dom.container = el; 11683 self.dom.parent = el; 11684 11685 self.callActions('afterCacheDom', arguments); 11686 }, 11687 11688 /** 11689 * Indexes all child elements of the mixer matching the `selectors.target` 11690 * selector, instantiating a mixitup.Target for each one. 11691 * 11692 * @private 11693 * @instance 11694 * @since 3.0.0 11695 * @return {void} 11696 */ 11697 11698 indexTargets: function() { 11699 var self = this, 11700 target = null, 11701 el = null, 11702 dataset = null, 11703 i = -1; 11704 11705 self.callActions('beforeIndexTargets', arguments); 11706 11707 self.dom.targets = self.config.layout.allowNestedTargets ? 11708 self.dom.container.querySelectorAll(self.config.selectors.target) : 11709 h.children(self.dom.container, self.config.selectors.target, self.dom.document); 11710 11711 self.dom.targets = h.arrayFromList(self.dom.targets); 11712 11713 self.targets = []; 11714 11715 if ((dataset = self.config.load.dataset) && dataset.length !== self.dom.targets.length) { 11716 throw new Error(mixitup.messages.errorDatasetPrerenderedMismatch()); 11717 } 11718 11719 if (self.dom.targets.length) { 11720 for (i = 0; el = self.dom.targets[i]; i++) { 11721 target = new mixitup.Target(); 11722 11723 target.init(el, self, dataset ? dataset[i] : void(0)); 11724 11725 target.isInDom = true; 11726 11727 self.targets.push(target); 11728 } 11729 11730 self.dom.parent = self.dom.targets[0].parentElement === self.dom.container ? 11731 self.dom.container : 11732 self.dom.targets[0].parentElement; 11733 } 11734 11735 self.origOrder = self.targets; 11736 11737 self.callActions('afterIndexTargets', arguments); 11738 }, 11739 11740 initControls: function() { 11741 var self = this, 11742 definition = '', 11743 controlElements = null, 11744 el = null, 11745 parent = null, 11746 delagators = null, 11747 control = null, 11748 i = -1, 11749 j = -1; 11750 11751 self.callActions('beforeInitControls', arguments); 11752 11753 switch (self.config.controls.scope) { 11754 case 'local': 11755 parent = self.dom.container; 11756 11757 break; 11758 case 'global': 11759 parent = self.dom.document; 11760 11761 break; 11762 default: 11763 throw new Error(mixitup.messages.errorConfigInvalidControlsScope()); 11764 } 11765 11766 for (i = 0; definition = mixitup.controlDefinitions[i]; i++) { 11767 if (self.config.controls.live || definition.live) { 11768 if (definition.parent) { 11769 delagators = self.dom[definition.parent]; 11770 11771 if (!delagators || delagators.length < 0) continue; 11772 11773 if (typeof delagators.length !== 'number') { 11774 delagators = [delagators]; 11775 } 11776 } else { 11777 delagators = [parent]; 11778 } 11779 11780 for (j = 0; (el = delagators[j]); j++) { 11781 control = self.getControl(el, definition.type, definition.selector); 11782 11783 self.controls.push(control); 11784 } 11785 } else { 11786 controlElements = parent.querySelectorAll(self.config.selectors.control + definition.selector); 11787 11788 for (j = 0; (el = controlElements[j]); j++) { 11789 control = self.getControl(el, definition.type, ''); 11790 11791 if (!control) continue; 11792 11793 self.controls.push(control); 11794 } 11795 } 11796 } 11797 11798 self.callActions('afterInitControls', arguments); 11799 }, 11800 11801 /** 11802 * @private 11803 * @instance 11804 * @since 3.0.0 11805 * @param {HTMLElement} el 11806 * @param {string} type 11807 * @param {string} selector 11808 * @return {mixitup.Control|null} 11809 */ 11810 11811 getControl: function(el, type, selector) { 11812 var self = this, 11813 control = null, 11814 i = -1; 11815 11816 self.callActions('beforeGetControl', arguments); 11817 11818 if (!selector) { 11819 // Static controls only 11820 11821 for (i = 0; control = mixitup.controls[i]; i++) { 11822 if (control.el === el && control.isBound(self)) { 11823 // Control already bound to this mixer (as another type). 11824 11825 // NB: This prevents duplicate controls from being registered where a selector 11826 // might collide, eg: "[data-filter]" and "[data-filter][data-sort]" 11827 11828 return self.callFilters('controlGetControl', null, arguments); 11829 } else if (control.el === el && control.type === type && control.selector === selector) { 11830 // Another mixer is already using this control, add this mixer as a binding 11831 11832 control.addBinding(self); 11833 11834 return self.callFilters('controlGetControl', control, arguments); 11835 } 11836 } 11837 } 11838 11839 // Create new control 11840 11841 control = new mixitup.Control(); 11842 11843 control.init(el, type, selector); 11844 11845 control.classNames.base = h.getClassname(self.config.classNames, type); 11846 control.classNames.active = h.getClassname(self.config.classNames, type, self.config.classNames.modifierActive); 11847 control.classNames.disabled = h.getClassname(self.config.classNames, type, self.config.classNames.modifierDisabled); 11848 11849 // Add a reference to this mixer as a binding 11850 11851 control.addBinding(self); 11852 11853 return self.callFilters('controlGetControl', control, arguments); 11854 }, 11855 11856 /** 11857 * Creates a compound selector by joining the `toggleArray` value as per the 11858 * defined toggle logic. 11859 * 11860 * @private 11861 * @instance 11862 * @since 3.0.0 11863 * @return {string} 11864 */ 11865 11866 getToggleSelector: function() { 11867 var self = this, 11868 delineator = self.config.controls.toggleLogic === 'or' ? ', ' : '', 11869 toggleSelector = ''; 11870 11871 self.callActions('beforeGetToggleSelector', arguments); 11872 11873 self.toggleArray = h.clean(self.toggleArray); 11874 11875 toggleSelector = self.toggleArray.join(delineator); 11876 11877 if (toggleSelector === '') { 11878 toggleSelector = self.config.controls.toggleDefault; 11879 } 11880 11881 return self.callFilters('selectorGetToggleSelector', toggleSelector, arguments); 11882 }, 11883 11884 /** 11885 * Breaks compound selector strings in an array of discreet selectors, 11886 * as per the active `controls.toggleLogic` configuration option. Accepts 11887 * either a dynamic command object, or a state object. 11888 * 11889 * @private 11890 * @instance 11891 * @since 2.0.0 11892 * @param {object} [command] 11893 * @param {mixitup.State} [state] 11894 * @return {void} 11895 */ 11896 11897 buildToggleArray: function(command, state) { 11898 var self = this, 11899 activeFilterSelector = ''; 11900 11901 self.callActions('beforeBuildToggleArray', arguments); 11902 11903 if (command && command.filter) { 11904 activeFilterSelector = command.filter.selector.replace(/\s/g, ''); 11905 } else if (state) { 11906 activeFilterSelector = state.activeFilter.selector.replace(/\s/g, ''); 11907 } else { 11908 return; 11909 } 11910 11911 if (activeFilterSelector === self.config.selectors.target || activeFilterSelector === 'all') { 11912 activeFilterSelector = ''; 11913 } 11914 11915 if (self.config.controls.toggleLogic === 'or') { 11916 self.toggleArray = activeFilterSelector.split(','); 11917 } else { 11918 self.toggleArray = self.splitCompoundSelector(activeFilterSelector); 11919 } 11920 11921 self.toggleArray = h.clean(self.toggleArray); 11922 11923 self.callActions('afterBuildToggleArray', arguments); 11924 }, 11925 11926 /** 11927 * Takes a compound selector (e.g. `.cat-1.cat-2`, `[data-cat="1"][data-cat="2"]`) 11928 * and breaks into its individual selectors. 11929 * 11930 * @private 11931 * @instance 11932 * @since 3.0.0 11933 * @param {string} compoundSelector 11934 * @return {string[]} 11935 */ 11936 11937 splitCompoundSelector: function(compoundSelector) { 11938 // Break at a `.` or `[`, capturing the delineator 11939 11940 var partials = compoundSelector.split(/([\.\[])/g), 11941 toggleArray = [], 11942 selector = '', 11943 i = -1; 11944 11945 if (partials[0] === '') { 11946 partials.shift(); 11947 } 11948 11949 for (i = 0; i < partials.length; i++) { 11950 if (i % 2 === 0) { 11951 selector = ''; 11952 } 11953 11954 selector += partials[i]; 11955 11956 if (i % 2 !== 0) { 11957 toggleArray.push(selector); 11958 } 11959 } 11960 11961 return toggleArray; 11962 }, 11963 11964 /** 11965 * Updates controls to their active/inactive state based on the command or 11966 * current state of the mixer. 11967 * 11968 * @private 11969 * @instance 11970 * @since 2.0.0 11971 * @param {object} command 11972 * @return {void} 11973 */ 11974 11975 updateControls: function(command) { 11976 var self = this, 11977 control = null, 11978 output = new mixitup.CommandMultimix(), 11979 i = -1; 11980 11981 self.callActions('beforeUpdateControls', arguments); 11982 11983 // Sanitise to defaults 11984 11985 if (command.filter) { 11986 output.filter = command.filter.selector; 11987 } else { 11988 output.filter = self.state.activeFilter.selector; 11989 } 11990 11991 if (command.sort) { 11992 output.sort = self.buildSortString(command.sort); 11993 } else { 11994 output.sort = self.buildSortString(self.state.activeSort); 11995 } 11996 11997 if (output.filter === self.config.selectors.target) { 11998 output.filter = 'all'; 11999 } 12000 12001 if (output.filter === '') { 12002 output.filter = 'none'; 12003 } 12004 12005 h.freeze(output); 12006 12007 for (i = 0; control = self.controls[i]; i++) { 12008 control.update(output, self.toggleArray); 12009 } 12010 12011 self.callActions('afterUpdateControls', arguments); 12012 }, 12013 12014 /** 12015 * @private 12016 * @instance 12017 * @since 3.0.0 12018 * @param {mixitup.CommandSort} command 12019 * @return {string} 12020 */ 12021 12022 buildSortString: function(command) { 12023 var self = this; 12024 var output = ''; 12025 12026 output += command.sortString; 12027 12028 if (command.next) { 12029 output += ' ' + self.buildSortString(command.next); 12030 } 12031 12032 return output; 12033 }, 12034 12035 /** 12036 * @private 12037 * @instance 12038 * @since 3.0.0 12039 * @param {object} command 12040 * @param {Operation} operation 12041 * @return {Promise.<mixitup.State>} 12042 */ 12043 12044 insertTargets: function(command, operation) { 12045 var self = this, 12046 nextSibling = null, 12047 insertionIndex = -1, 12048 frag = null, 12049 target = null, 12050 el = null, 12051 i = -1; 12052 12053 self.callActions('beforeInsertTargets', arguments); 12054 12055 if (typeof command.index === 'undefined') command.index = 0; 12056 12057 nextSibling = self.getNextSibling(command.index, command.sibling, command.position); 12058 frag = self.dom.document.createDocumentFragment(); 12059 12060 if (nextSibling) { 12061 insertionIndex = h.index(nextSibling, self.config.selectors.target); 12062 } else { 12063 insertionIndex = self.targets.length; 12064 } 12065 12066 if (command.collection) { 12067 for (i = 0; el = command.collection[i]; i++) { 12068 if (self.dom.targets.indexOf(el) > -1) { 12069 throw new Error(mixitup.messages.errorInsertPreexistingElement()); 12070 } 12071 12072 // Ensure elements are hidden when they are added to the DOM, so they can 12073 // be animated in gracefully 12074 12075 el.style.display = 'none'; 12076 12077 frag.appendChild(el); 12078 frag.appendChild(self.dom.document.createTextNode(' ')); 12079 12080 if (!h.isElement(el, self.dom.document) || !el.matches(self.config.selectors.target)) continue; 12081 12082 target = new mixitup.Target(); 12083 12084 target.init(el, self); 12085 12086 target.isInDom = true; 12087 12088 self.targets.splice(insertionIndex, 0, target); 12089 12090 insertionIndex++; 12091 } 12092 12093 self.dom.parent.insertBefore(frag, nextSibling); 12094 } 12095 12096 // Since targets have been added, the original order must be updated 12097 12098 operation.startOrder = self.origOrder = self.targets; 12099 12100 self.callActions('afterInsertTargets', arguments); 12101 }, 12102 12103 /** 12104 * @private 12105 * @instance 12106 * @since 3.0.0 12107 * @param {Number} [index] 12108 * @param {Element} [sibling] 12109 * @param {string} [position] 12110 * @return {Element} 12111 */ 12112 12113 getNextSibling: function(index, sibling, position) { 12114 var self = this, 12115 element = null; 12116 12117 index = Math.max(index, 0); 12118 12119 if (sibling && position === 'before') { 12120 // Explicit sibling 12121 12122 element = sibling; 12123 } else if (sibling && position === 'after') { 12124 // Explicit sibling 12125 12126 element = sibling.nextElementSibling || null; 12127 } else if (self.targets.length > 0 && typeof index !== 'undefined') { 12128 // Index and targets exist 12129 12130 element = (index < self.targets.length || !self.targets.length) ? 12131 self.targets[index].dom.el : 12132 self.targets[self.targets.length - 1].dom.el.nextElementSibling; 12133 } else if (self.targets.length === 0 && self.dom.parent.children.length > 0) { 12134 // No targets but other siblings 12135 12136 if (self.config.layout.siblingAfter) { 12137 element = self.config.layout.siblingAfter; 12138 } else if (self.config.layout.siblingBefore) { 12139 element = self.config.layout.siblingBefore.nextElementSibling; 12140 } else { 12141 self.dom.parent.children[0]; 12142 } 12143 } else { 12144 element === null; 12145 } 12146 12147 return self.callFilters('elementGetNextSibling', element, arguments); 12148 }, 12149 12150 /** 12151 * @private 12152 * @instance 12153 * @since 2.0.0 12154 * @param {Operation} operation 12155 * @return {void} 12156 */ 12157 12158 filterOperation: function(operation) { 12159 var self = this, 12160 testResult = false, 12161 index = -1, 12162 action = '', 12163 target = null, 12164 i = -1; 12165 12166 self.callActions('beforeFilterOperation', arguments); 12167 12168 action = operation.newFilter.action; 12169 12170 for (i = 0; target = operation.newOrder[i]; i++) { 12171 if (operation.newFilter.collection) { 12172 // show via collection 12173 12174 testResult = operation.newFilter.collection.indexOf(target.dom.el) > -1; 12175 } else { 12176 // show via selector 12177 12178 if (operation.newFilter.selector === '') { 12179 testResult = false; 12180 } else { 12181 testResult = target.dom.el.matches(operation.newFilter.selector); 12182 } 12183 } 12184 12185 self.evaluateHideShow(testResult, target, action, operation); 12186 } 12187 12188 if (operation.toRemove.length) { 12189 for (i = 0; target = operation.show[i]; i++) { 12190 if (operation.toRemove.indexOf(target) > -1) { 12191 // If any shown targets should be removed, move them into the toHide array 12192 12193 operation.show.splice(i, 1); 12194 12195 if ((index = operation.toShow.indexOf(target)) > -1) { 12196 operation.toShow.splice(index, 1); 12197 } 12198 12199 operation.toHide.push(target); 12200 operation.hide.push(target); 12201 12202 i--; 12203 } 12204 } 12205 } 12206 12207 operation.matching = operation.show.slice(); 12208 12209 if (operation.show.length === 0 && operation.newFilter.selector !== '' && self.targets.length !== 0) { 12210 operation.hasFailed = true; 12211 } 12212 12213 self.callActions('afterFilterOperation', arguments); 12214 }, 12215 12216 /** 12217 * @private 12218 * @instance 12219 * @since 3.0.0 12220 * @param {boolean} testResult 12221 * @param {Element} target 12222 * @param {string} action 12223 * @param {Operation} operation 12224 * @return {void} 12225 */ 12226 12227 evaluateHideShow: function(testResult, target, action, operation) { 12228 var self = this, 12229 filteredTestResult = false, 12230 args = Array.prototype.slice.call(arguments, 1); 12231 12232 filteredTestResult = self.callFilters('testResultEvaluateHideShow', testResult, args); 12233 12234 self.callActions('beforeEvaluateHideShow', arguments); 12235 12236 if ( 12237 filteredTestResult === true && action === 'show' || 12238 filteredTestResult === false && action === 'hide' 12239 ) { 12240 operation.show.push(target); 12241 12242 !target.isShown && operation.toShow.push(target); 12243 } else { 12244 operation.hide.push(target); 12245 12246 target.isShown && operation.toHide.push(target); 12247 } 12248 12249 self.callActions('afterEvaluateHideShow', arguments); 12250 }, 12251 12252 /** 12253 * @private 12254 * @instance 12255 * @since 2.0.0 12256 * @param {Operation} operation 12257 * @return {void} 12258 */ 12259 12260 sortOperation: function(operation) { 12261 var self = this, 12262 newOrder = [], 12263 target = null, 12264 el = null, 12265 i = -1; 12266 12267 self.callActions('beforeSortOperation', arguments); 12268 12269 operation.startOrder = self.targets; 12270 12271 if (operation.newSort.collection) { 12272 // Sort by collection 12273 12274 newOrder = []; 12275 12276 for (i = 0; (el = operation.newSort.collection[i]); i++) { 12277 if (self.dom.targets.indexOf(el) < 0) { 12278 throw new Error(mixitup.messages.errorSortNonExistentElement()); 12279 } 12280 12281 target = new mixitup.Target(); 12282 12283 target.init(el, self); 12284 12285 target.isInDom = true; 12286 12287 newOrder.push(target); 12288 } 12289 12290 operation.newOrder = newOrder; 12291 } else if (operation.newSort.order === 'random') { 12292 // Sort random 12293 12294 operation.newOrder = h.arrayShuffle(operation.startOrder); 12295 } else if (operation.newSort.attribute === '') { 12296 // Sort by default 12297 12298 operation.newOrder = self.origOrder.slice(); 12299 12300 if (operation.newSort.order === 'desc') { 12301 operation.newOrder.reverse(); 12302 } 12303 } else { 12304 // Sort by attribute 12305 12306 operation.newOrder = operation.startOrder.slice(); 12307 12308 operation.newOrder.sort(function(a, b) { 12309 return self.compare(a, b, operation.newSort); 12310 }); 12311 } 12312 12313 if (h.isEqualArray(operation.newOrder, operation.startOrder)) { 12314 operation.willSort = false; 12315 } 12316 12317 self.callActions('afterSortOperation', arguments); 12318 }, 12319 12320 /** 12321 * @private 12322 * @instance 12323 * @since 2.0.0 12324 * @param {mixitup.Target} a 12325 * @param {mixitup.Target} b 12326 * @param {mixitup.CommandSort} command 12327 * @return {Number} 12328 */ 12329 12330 compare: function(a, b, command) { 12331 var self = this, 12332 order = command.order, 12333 attrA = self.getAttributeValue(a, command.attribute), 12334 attrB = self.getAttributeValue(b, command.attribute); 12335 12336 if (isNaN(attrA * 1) || isNaN(attrB * 1)) { 12337 attrA = attrA.toLowerCase(); 12338 attrB = attrB.toLowerCase(); 12339 } else { 12340 attrA = attrA * 1; 12341 attrB = attrB * 1; 12342 } 12343 12344 if (attrA < attrB) { 12345 return order === 'asc' ? -1 : 1; 12346 } 12347 12348 if (attrA > attrB) { 12349 return order === 'asc' ? 1 : -1; 12350 } 12351 12352 if (attrA === attrB && command.next) { 12353 return self.compare(a, b, command.next); 12354 } 12355 12356 return 0; 12357 }, 12358 12359 /** 12360 * Reads the values of any data attributes present the provided target element 12361 * which match the current sort command. 12362 * 12363 * @private 12364 * @instance 12365 * @since 3.0.0 12366 * @param {mixitup.Target} target 12367 * @param {string} [attribute] 12368 * @return {(String|Number)} 12369 */ 12370 12371 getAttributeValue: function(target, attribute) { 12372 var self = this, 12373 value = ''; 12374 12375 value = target.dom.el.getAttribute('data-' + attribute); 12376 12377 if (value === null) { 12378 if (self.config.debug.showWarnings) { 12379 // Encourage users to assign values to all targets to avoid erroneous sorting 12380 // when types are mixed 12381 12382 console.warn(mixitup.messages.warningInconsistentSortingAttributes({ 12383 attribute: 'data-' + attribute 12384 })); 12385 } 12386 } 12387 12388 // If an attribute is not present, return 0 as a safety value 12389 12390 return self.callFilters('valueGetAttributeValue', value || 0, arguments); 12391 }, 12392 12393 /** 12394 * Inserts elements into the DOM in the appropriate 12395 * order using a document fragment for minimal 12396 * DOM thrashing 12397 * 12398 * @private 12399 * @instance 12400 * @since 2.0.0 12401 * @param {boolean} isResetting 12402 * @param {Operation} operation 12403 * @return {void} 12404 */ 12405 12406 printSort: function(isResetting, operation) { 12407 var self = this, 12408 startOrder = isResetting ? operation.newOrder : operation.startOrder, 12409 newOrder = isResetting ? operation.startOrder : operation.newOrder, 12410 nextSibling = startOrder.length ? startOrder[startOrder.length - 1].dom.el.nextElementSibling : null, 12411 frag = window.document.createDocumentFragment(), 12412 whitespace = null, 12413 target = null, 12414 el = null, 12415 i = -1; 12416 12417 self.callActions('beforePrintSort', arguments); 12418 12419 // Empty the container 12420 12421 for (i = 0; target = startOrder[i]; i++) { 12422 el = target.dom.el; 12423 12424 if (el.style.position === 'absolute') continue; 12425 12426 h.removeWhitespace(el.previousSibling); 12427 12428 el.parentElement.removeChild(el); 12429 } 12430 12431 whitespace = nextSibling ? nextSibling.previousSibling : self.dom.parent.lastChild; 12432 12433 if (whitespace && whitespace.nodeName === '#text') { 12434 h.removeWhitespace(whitespace); 12435 } 12436 12437 for (i = 0; target = newOrder[i]; i++) { 12438 // Add targets into a document fragment 12439 12440 el = target.dom.el; 12441 12442 if (h.isElement(frag.lastChild)) { 12443 frag.appendChild(window.document.createTextNode(' ')); 12444 } 12445 12446 frag.appendChild(el); 12447 } 12448 12449 // Insert the document fragment into the container 12450 // before any other non-target elements 12451 12452 if (self.dom.parent.firstChild && self.dom.parent.firstChild !== nextSibling) { 12453 frag.insertBefore(window.document.createTextNode(' '), frag.childNodes[0]); 12454 } 12455 12456 if (nextSibling) { 12457 frag.appendChild(window.document.createTextNode(' ')); 12458 12459 self.dom.parent.insertBefore(frag, nextSibling); 12460 } else { 12461 self.dom.parent.appendChild(frag); 12462 } 12463 12464 self.callActions('afterPrintSort', arguments); 12465 }, 12466 12467 /** 12468 * Parses user-defined sort strings (i.e. `default:asc`) into sort commands objects. 12469 * 12470 * @private 12471 * @instance 12472 * @since 3.0.0 12473 * @param {string} sortString 12474 * @param {mixitup.CommandSort} command 12475 * @return {mixitup.CommandSort} 12476 */ 12477 12478 parseSortString: function(sortString, command) { 12479 var self = this, 12480 rules = sortString.split(' '), 12481 current = command, 12482 rule = [], 12483 i = -1; 12484 12485 // command.sortString = sortString; 12486 12487 for (i = 0; i < rules.length; i++) { 12488 rule = rules[i].split(':'); 12489 12490 current.sortString = rules[i]; 12491 current.attribute = h.dashCase(rule[0]); 12492 current.order = rule[1] || 'asc'; 12493 12494 switch (current.attribute) { 12495 case 'default': 12496 // treat "default" as sorting by no attribute 12497 12498 current.attribute = ''; 12499 12500 break; 12501 case 'random': 12502 // treat "random" as an order not an attribute 12503 12504 current.attribute = ''; 12505 current.order = 'random'; 12506 12507 break; 12508 } 12509 12510 if (!current.attribute || current.order === 'random') break; 12511 12512 if (i < rules.length - 1) { 12513 // Embed reference to the next command 12514 12515 current.next = new mixitup.CommandSort(); 12516 12517 h.freeze(current); 12518 12519 current = current.next; 12520 } 12521 } 12522 12523 return self.callFilters('commandsParseSort', command, arguments); 12524 }, 12525 12526 /** 12527 * Parses all effects out of the user-defined `animation.effects` string into 12528 * their respective properties and units. 12529 * 12530 * @private 12531 * @instance 12532 * @since 2.0.0 12533 * @return {void} 12534 */ 12535 12536 parseEffects: function() { 12537 var self = this, 12538 transformName = '', 12539 effectsIn = self.config.animation.effectsIn || self.config.animation.effects, 12540 effectsOut = self.config.animation.effectsOut || self.config.animation.effects; 12541 12542 self.callActions('beforeParseEffects', arguments); 12543 12544 self.effectsIn = new mixitup.StyleData(); 12545 self.effectsOut = new mixitup.StyleData(); 12546 self.transformIn = []; 12547 self.transformOut = []; 12548 12549 self.effectsIn.opacity = self.effectsOut.opacity = 1; 12550 12551 self.parseEffect('fade', effectsIn, self.effectsIn, self.transformIn); 12552 self.parseEffect('fade', effectsOut, self.effectsOut, self.transformOut, true); 12553 12554 for (transformName in mixitup.transformDefaults) { 12555 if (!(mixitup.transformDefaults[transformName] instanceof mixitup.TransformData)) { 12556 continue; 12557 } 12558 12559 self.parseEffect(transformName, effectsIn, self.effectsIn, self.transformIn); 12560 self.parseEffect(transformName, effectsOut, self.effectsOut, self.transformOut, true); 12561 } 12562 12563 self.parseEffect('stagger', effectsIn, self.effectsIn, self.transformIn); 12564 self.parseEffect('stagger', effectsOut, self.effectsOut, self.transformOut, true); 12565 12566 self.callActions('afterParseEffects', arguments); 12567 }, 12568 12569 /** 12570 * @private 12571 * @instance 12572 * @since 2.0.0 12573 * @param {string} effectName 12574 * @param {string} effectString 12575 * @param {StyleData} effects 12576 * @param {String[]} transform 12577 * @param {boolean} [isOut] 12578 */ 12579 12580 parseEffect: function(effectName, effectString, effects, transform, isOut) { 12581 var self = this, 12582 re = /\(([^)]+)\)/, 12583 propIndex = -1, 12584 str = '', 12585 match = [], 12586 val = '', 12587 units = ['%', 'px', 'em', 'rem', 'vh', 'vw', 'deg'], 12588 unit = '', 12589 i = -1; 12590 12591 self.callActions('beforeParseEffect', arguments); 12592 12593 if (typeof effectString !== 'string') { 12594 throw new TypeError(mixitup.messages.errorConfigInvalidAnimationEffects()); 12595 } 12596 12597 if (effectString.indexOf(effectName) < 0) { 12598 // The effect is not present in the effects string 12599 12600 if (effectName === 'stagger') { 12601 // Reset stagger to 0 12602 12603 self.staggerDuration = 0; 12604 } 12605 12606 return; 12607 } 12608 12609 // The effect is present 12610 12611 propIndex = effectString.indexOf(effectName + '('); 12612 12613 if (propIndex > -1) { 12614 // The effect has a user defined value in parentheses 12615 12616 // Extract from the first parenthesis to the end of string 12617 12618 str = effectString.substring(propIndex); 12619 12620 // Match any number of characters between "(" and ")" 12621 12622 match = re.exec(str); 12623 12624 val = match[1]; 12625 } 12626 12627 switch (effectName) { 12628 case 'fade': 12629 effects.opacity = val ? parseFloat(val) : 0; 12630 12631 break; 12632 case 'stagger': 12633 self.staggerDuration = val ? parseFloat(val) : 100; 12634 12635 // TODO: Currently stagger must be applied globally, but 12636 // if seperate values are specified for in/out, this should 12637 // be respected 12638 12639 break; 12640 default: 12641 // All other effects are transforms following the same structure 12642 12643 if (isOut && self.config.animation.reverseOut && effectName !== 'scale') { 12644 effects[effectName].value = 12645 (val ? parseFloat(val) : mixitup.transformDefaults[effectName].value) * -1; 12646 } else { 12647 effects[effectName].value = 12648 (val ? parseFloat(val) : mixitup.transformDefaults[effectName].value); 12649 } 12650 12651 if (val) { 12652 for (i = 0; unit = units[i]; i++) { 12653 if (val.indexOf(unit) > -1) { 12654 effects[effectName].unit = unit; 12655 12656 break; 12657 } 12658 } 12659 } else { 12660 effects[effectName].unit = mixitup.transformDefaults[effectName].unit; 12661 } 12662 12663 transform.push( 12664 effectName + 12665 '(' + 12666 effects[effectName].value + 12667 effects[effectName].unit + 12668 ')' 12669 ); 12670 } 12671 12672 self.callActions('afterParseEffect', arguments); 12673 }, 12674 12675 /** 12676 * @private 12677 * @instance 12678 * @since 2.0.0 12679 * @param {Operation} operation 12680 * @return {State} 12681 */ 12682 12683 buildState: function(operation) { 12684 var self = this, 12685 state = new mixitup.State(), 12686 target = null, 12687 i = -1; 12688 12689 self.callActions('beforeBuildState', arguments); 12690 12691 // Map target elements into state arrays. 12692 // the real target objects should never be exposed 12693 12694 for (i = 0; target = self.targets[i]; i++) { 12695 if (!operation.toRemove.length || operation.toRemove.indexOf(target) < 0) { 12696 state.targets.push(target.dom.el); 12697 } 12698 } 12699 12700 for (i = 0; target = operation.matching[i]; i++) { 12701 state.matching.push(target.dom.el); 12702 } 12703 12704 for (i = 0; target = operation.show[i]; i++) { 12705 state.show.push(target.dom.el); 12706 } 12707 12708 for (i = 0; target = operation.hide[i]; i++) { 12709 if (!operation.toRemove.length || operation.toRemove.indexOf(target) < 0) { 12710 state.hide.push(target.dom.el); 12711 } 12712 } 12713 12714 state.id = self.id; 12715 state.container = self.dom.container; 12716 state.activeFilter = operation.newFilter; 12717 state.activeSort = operation.newSort; 12718 state.activeDataset = operation.newDataset; 12719 state.activeContainerClassName = operation.newContainerClassName; 12720 state.hasFailed = operation.hasFailed; 12721 state.totalTargets = self.targets.length; 12722 state.totalShow = operation.show.length; 12723 state.totalHide = operation.hide.length; 12724 state.totalMatching = operation.matching.length; 12725 state.triggerElement = operation.triggerElement; 12726 12727 return self.callFilters('stateBuildState', state, arguments); 12728 }, 12729 12730 /** 12731 * @private 12732 * @instance 12733 * @since 2.0.0 12734 * @param {boolean} shouldAnimate 12735 * @param {Operation} operation 12736 * @return {void} 12737 */ 12738 12739 goMix: function(shouldAnimate, operation) { 12740 var self = this, 12741 deferred = null; 12742 12743 self.callActions('beforeGoMix', arguments); 12744 12745 // If the animation duration is set to 0ms, 12746 // or no effects specified, 12747 // or the container is hidden 12748 // then abort animation 12749 12750 if ( 12751 !self.config.animation.duration || !self.config.animation.effects || !h.isVisible(self.dom.container) 12752 ) { 12753 shouldAnimate = false; 12754 } 12755 12756 if ( 12757 !operation.toShow.length && 12758 !operation.toHide.length && 12759 !operation.willSort && 12760 !operation.willChangeLayout 12761 ) { 12762 // If nothing to show or hide, and not sorting or 12763 // changing layout 12764 12765 shouldAnimate = false; 12766 } 12767 12768 if ( 12769 !operation.startState.show.length && 12770 !operation.show.length 12771 ) { 12772 // If nothing currently shown, nothing to show 12773 12774 shouldAnimate = false; 12775 } 12776 12777 mixitup.events.fire('mixStart', self.dom.container, { 12778 state: operation.startState, 12779 futureState: operation.newState, 12780 instance: self 12781 }, self.dom.document); 12782 12783 if (typeof self.config.callbacks.onMixStart === 'function') { 12784 self.config.callbacks.onMixStart.call( 12785 self.dom.container, 12786 operation.startState, 12787 operation.newState, 12788 self 12789 ); 12790 } 12791 12792 h.removeClass(self.dom.container, h.getClassname(self.config.classNames, 'container', self.config.classNames.modifierFailed)); 12793 12794 if (!self.userDeferred) { 12795 // Queue empty, no pending operations 12796 12797 deferred = self.userDeferred = h.defer(mixitup.libraries); 12798 } else { 12799 // Use existing deferred 12800 12801 deferred = self.userDeferred; 12802 } 12803 12804 self.isBusy = true; 12805 12806 if (!shouldAnimate || !mixitup.features.has.transitions) { 12807 // Abort 12808 12809 if (self.config.debug.fauxAsync) { 12810 setTimeout(function() { 12811 self.cleanUp(operation); 12812 }, self.config.animation.duration); 12813 } else { 12814 self.cleanUp(operation); 12815 } 12816 12817 return self.callFilters('promiseGoMix', deferred.promise, arguments); 12818 } 12819 12820 // If we should animate and the platform supports transitions, go for it 12821 12822 if (window.pageYOffset !== operation.docState.scrollTop) { 12823 window.scrollTo(operation.docState.scrollLeft, operation.docState.scrollTop); 12824 } 12825 12826 if (self.config.animation.applyPerspective) { 12827 self.dom.parent.style[mixitup.features.perspectiveProp] = 12828 self.config.animation.perspectiveDistance; 12829 12830 self.dom.parent.style[mixitup.features.perspectiveOriginProp] = 12831 self.config.animation.perspectiveOrigin; 12832 } 12833 12834 if ( 12835 self.config.animation.animateResizeContainer && 12836 operation.startHeight !== operation.newHeight && 12837 operation.viewportDeltaY !== operation.startHeight - operation.newHeight 12838 ) { 12839 self.dom.parent.style.height = operation.startHeight + 'px'; 12840 } 12841 12842 if ( 12843 self.config.animation.animateResizeContainer && 12844 operation.startWidth !== operation.newWidth && 12845 operation.viewportDeltaX !== operation.startWidth - operation.newWidth 12846 ) { 12847 self.dom.parent.style.width = operation.startWidth + 'px'; 12848 } 12849 12850 if (operation.startHeight === operation.newHeight) { 12851 self.dom.parent.style.height = operation.startHeight + 'px'; 12852 } 12853 12854 if (operation.startWidth === operation.newWidth) { 12855 self.dom.parent.style.width = operation.startWidth + 'px'; 12856 } 12857 12858 if (operation.startHeight === operation.newHeight && operation.startWidth === operation.newWidth) { 12859 self.dom.parent.style.overflow = 'hidden'; 12860 } 12861 12862 requestAnimationFrame(function() { 12863 self.moveTargets(operation); 12864 }); 12865 12866 return self.callFilters('promiseGoMix', deferred.promise, arguments); 12867 }, 12868 12869 /** 12870 * @private 12871 * @instance 12872 * @since 2.0.0 12873 * @param {Operation} operation 12874 * @return {void} 12875 */ 12876 12877 getStartMixData: function(operation) { 12878 var self = this, 12879 parentStyle = window.getComputedStyle(self.dom.parent), 12880 parentRect = self.dom.parent.getBoundingClientRect(), 12881 target = null, 12882 data = {}, 12883 i = -1, 12884 boxSizing = parentStyle[mixitup.features.boxSizingProp]; 12885 12886 self.incPadding = (boxSizing === 'border-box'); 12887 12888 self.callActions('beforeGetStartMixData', arguments); 12889 12890 for (i = 0; target = operation.show[i]; i++) { 12891 data = target.getPosData(); 12892 12893 operation.showPosData[i] = { 12894 startPosData: data 12895 }; 12896 } 12897 12898 for (i = 0; target = operation.toHide[i]; i++) { 12899 data = target.getPosData(); 12900 12901 operation.toHidePosData[i] = { 12902 startPosData: data 12903 }; 12904 } 12905 12906 operation.startX = parentRect.left; 12907 operation.startY = parentRect.top; 12908 12909 operation.startHeight = self.incPadding ? 12910 parentRect.height : 12911 parentRect.height - 12912 parseFloat(parentStyle.paddingTop) - 12913 parseFloat(parentStyle.paddingBottom) - 12914 parseFloat(parentStyle.borderTop) - 12915 parseFloat(parentStyle.borderBottom); 12916 12917 operation.startWidth = self.incPadding ? 12918 parentRect.width : 12919 parentRect.width - 12920 parseFloat(parentStyle.paddingLeft) - 12921 parseFloat(parentStyle.paddingRight) - 12922 parseFloat(parentStyle.borderLeft) - 12923 parseFloat(parentStyle.borderRight); 12924 12925 self.callActions('afterGetStartMixData', arguments); 12926 }, 12927 12928 /** 12929 * @private 12930 * @instance 12931 * @since 2.0.0 12932 * @param {Operation} operation 12933 * @return {void} 12934 */ 12935 12936 setInter: function(operation) { 12937 var self = this, 12938 target = null, 12939 i = -1; 12940 12941 self.callActions('beforeSetInter', arguments); 12942 12943 // Prevent scrollbar flicker on non-inertial scroll platforms by clamping height/width 12944 12945 if (self.config.animation.clampHeight) { 12946 self.dom.parent.style.height = operation.startHeight + 'px'; 12947 self.dom.parent.style.overflow = 'hidden'; 12948 } 12949 12950 if (self.config.animation.clampWidth) { 12951 self.dom.parent.style.width = operation.startWidth + 'px'; 12952 self.dom.parent.style.overflow = 'hidden'; 12953 } 12954 12955 for (i = 0; target = operation.toShow[i]; i++) { 12956 target.show(); 12957 } 12958 12959 if (operation.willChangeLayout) { 12960 h.removeClass(self.dom.container, operation.startContainerClassName); 12961 h.addClass(self.dom.container, operation.newContainerClassName); 12962 } 12963 12964 self.callActions('afterSetInter', arguments); 12965 }, 12966 12967 /** 12968 * @private 12969 * @instance 12970 * @since 2.0.0 12971 * @param {Operation} operation 12972 * @return {void} 12973 */ 12974 12975 getInterMixData: function(operation) { 12976 var self = this, 12977 target = null, 12978 i = -1; 12979 12980 self.callActions('beforeGetInterMixData', arguments); 12981 12982 for (i = 0; target = operation.show[i]; i++) { 12983 operation.showPosData[i].interPosData = target.getPosData(); 12984 } 12985 12986 for (i = 0; target = operation.toHide[i]; i++) { 12987 operation.toHidePosData[i].interPosData = target.getPosData(); 12988 } 12989 12990 self.callActions('afterGetInterMixData', arguments); 12991 }, 12992 12993 /** 12994 * @private 12995 * @instance 12996 * @since 2.0.0 12997 * @param {Operation} operation 12998 * @return {void} 12999 */ 13000 13001 setFinal: function(operation) { 13002 var self = this, 13003 target = null, 13004 i = -1; 13005 13006 self.callActions('beforeSetFinal', arguments); 13007 13008 operation.willSort && self.printSort(false, operation); 13009 13010 for (i = 0; target = operation.toHide[i]; i++) { 13011 target.hide(); 13012 } 13013 13014 self.callActions('afterSetFinal', arguments); 13015 }, 13016 13017 /** 13018 * @private 13019 * @instance 13020 * @since 2.0.0 13021 * @param {Operation} operation 13022 * @return {void} 13023 */ 13024 13025 getFinalMixData: function(operation) { 13026 var self = this, 13027 parentStyle = null, 13028 parentRect = null, 13029 target = null, 13030 i = -1; 13031 13032 self.callActions('beforeGetFinalMixData', arguments); 13033 13034 for (i = 0; target = operation.show[i]; i++) { 13035 operation.showPosData[i].finalPosData = target.getPosData(); 13036 } 13037 13038 for (i = 0; target = operation.toHide[i]; i++) { 13039 operation.toHidePosData[i].finalPosData = target.getPosData(); 13040 } 13041 13042 // Remove clamping 13043 13044 if (self.config.animation.clampHeight || self.config.animation.clampWidth) { 13045 self.dom.parent.style.height = 13046 self.dom.parent.style.width = 13047 self.dom.parent.style.overflow = ''; 13048 } 13049 13050 if (!self.incPadding) { 13051 parentStyle = window.getComputedStyle(self.dom.parent); 13052 } 13053 13054 parentRect = self.dom.parent.getBoundingClientRect(); 13055 13056 operation.newX = parentRect.left; 13057 operation.newY = parentRect.top; 13058 13059 operation.newHeight = self.incPadding ? 13060 parentRect.height : 13061 parentRect.height - 13062 parseFloat(parentStyle.paddingTop) - 13063 parseFloat(parentStyle.paddingBottom) - 13064 parseFloat(parentStyle.borderTop) - 13065 parseFloat(parentStyle.borderBottom); 13066 13067 operation.newWidth = self.incPadding ? 13068 parentRect.width : 13069 parentRect.width - 13070 parseFloat(parentStyle.paddingLeft) - 13071 parseFloat(parentStyle.paddingRight) - 13072 parseFloat(parentStyle.borderLeft) - 13073 parseFloat(parentStyle.borderRight); 13074 13075 operation.viewportDeltaX = operation.docState.viewportWidth - this.dom.document.documentElement.clientWidth; 13076 operation.viewportDeltaY = operation.docState.viewportHeight - this.dom.document.documentElement.clientHeight; 13077 13078 if (operation.willSort) { 13079 self.printSort(true, operation); 13080 } 13081 13082 for (i = 0; target = operation.toShow[i]; i++) { 13083 target.hide(); 13084 } 13085 13086 for (i = 0; target = operation.toHide[i]; i++) { 13087 target.show(); 13088 } 13089 13090 if (operation.willChangeLayout) { 13091 h.removeClass(self.dom.container, operation.newContainerClassName); 13092 h.addClass(self.dom.container, self.config.layout.containerClassName); 13093 } 13094 13095 self.callActions('afterGetFinalMixData', arguments); 13096 }, 13097 13098 /** 13099 * @private 13100 * @instance 13101 * @since 3.0.0 13102 * @param {Operation} operation 13103 */ 13104 13105 getTweenData: function(operation) { 13106 var self = this, 13107 target = null, 13108 posData = null, 13109 effectNames = Object.getOwnPropertyNames(self.effectsIn), 13110 effectName = '', 13111 effect = null, 13112 widthChange = -1, 13113 heightChange = -1, 13114 i = -1, 13115 j = -1; 13116 13117 self.callActions('beforeGetTweenData', arguments); 13118 13119 for (i = 0; target = operation.show[i]; i++) { 13120 posData = operation.showPosData[i]; 13121 posData.posIn = new mixitup.StyleData(); 13122 posData.posOut = new mixitup.StyleData(); 13123 posData.tweenData = new mixitup.StyleData(); 13124 13125 // Process x and y 13126 13127 if (target.isShown) { 13128 posData.posIn.x = posData.startPosData.x - posData.interPosData.x; 13129 posData.posIn.y = posData.startPosData.y - posData.interPosData.y; 13130 } else { 13131 posData.posIn.x = posData.posIn.y = 0; 13132 } 13133 13134 posData.posOut.x = posData.finalPosData.x - posData.interPosData.x; 13135 posData.posOut.y = posData.finalPosData.y - posData.interPosData.y; 13136 13137 // Process opacity 13138 13139 posData.posIn.opacity = target.isShown ? 1 : self.effectsIn.opacity; 13140 posData.posOut.opacity = 1; 13141 posData.tweenData.opacity = posData.posOut.opacity - posData.posIn.opacity; 13142 13143 // Adjust x and y if not nudging 13144 13145 if (!target.isShown && !self.config.animation.nudge) { 13146 posData.posIn.x = posData.posOut.x; 13147 posData.posIn.y = posData.posOut.y; 13148 } 13149 13150 posData.tweenData.x = posData.posOut.x - posData.posIn.x; 13151 posData.tweenData.y = posData.posOut.y - posData.posIn.y; 13152 13153 // Process width, height, and margins 13154 13155 if (self.config.animation.animateResizeTargets) { 13156 posData.posIn.width = posData.startPosData.width; 13157 posData.posIn.height = posData.startPosData.height; 13158 13159 // "||" Prevents width/height change from including 0 width/height if hiding or showing 13160 13161 widthChange = (posData.startPosData.width || posData.finalPosData.width) - posData.interPosData.width; 13162 13163 posData.posIn.marginRight = posData.startPosData.marginRight - widthChange; 13164 13165 heightChange = (posData.startPosData.height || posData.finalPosData.height) - posData.interPosData.height; 13166 13167 posData.posIn.marginBottom = posData.startPosData.marginBottom - heightChange; 13168 13169 posData.posOut.width = posData.finalPosData.width; 13170 posData.posOut.height = posData.finalPosData.height; 13171 13172 widthChange = (posData.finalPosData.width || posData.startPosData.width) - posData.interPosData.width; 13173 13174 posData.posOut.marginRight = posData.finalPosData.marginRight - widthChange; 13175 13176 heightChange = (posData.finalPosData.height || posData.startPosData.height) - posData.interPosData.height; 13177 13178 posData.posOut.marginBottom = posData.finalPosData.marginBottom - heightChange; 13179 13180 posData.tweenData.width = posData.posOut.width - posData.posIn.width; 13181 posData.tweenData.height = posData.posOut.height - posData.posIn.height; 13182 posData.tweenData.marginRight = posData.posOut.marginRight - posData.posIn.marginRight; 13183 posData.tweenData.marginBottom = posData.posOut.marginBottom - posData.posIn.marginBottom; 13184 } 13185 13186 // Process transforms 13187 13188 for (j = 0; effectName = effectNames[j]; j++) { 13189 effect = self.effectsIn[effectName]; 13190 13191 if (!(effect instanceof mixitup.TransformData) || !effect.value) continue; 13192 13193 posData.posIn[effectName].value = effect.value; 13194 posData.posOut[effectName].value = 0; 13195 13196 posData.tweenData[effectName].value = 13197 posData.posOut[effectName].value - posData.posIn[effectName].value; 13198 13199 posData.posIn[effectName].unit = 13200 posData.posOut[effectName].unit = 13201 posData.tweenData[effectName].unit = 13202 effect.unit; 13203 } 13204 } 13205 13206 for (i = 0; target = operation.toHide[i]; i++) { 13207 posData = operation.toHidePosData[i]; 13208 posData.posIn = new mixitup.StyleData(); 13209 posData.posOut = new mixitup.StyleData(); 13210 posData.tweenData = new mixitup.StyleData(); 13211 13212 // Process x and y 13213 13214 posData.posIn.x = target.isShown ? posData.startPosData.x - posData.interPosData.x : 0; 13215 posData.posIn.y = target.isShown ? posData.startPosData.y - posData.interPosData.y : 0; 13216 posData.posOut.x = self.config.animation.nudge ? 0 : posData.posIn.x; 13217 posData.posOut.y = self.config.animation.nudge ? 0 : posData.posIn.y; 13218 posData.tweenData.x = posData.posOut.x - posData.posIn.x; 13219 posData.tweenData.y = posData.posOut.y - posData.posIn.y; 13220 13221 // Process width, height, and margins 13222 13223 if (self.config.animation.animateResizeTargets) { 13224 posData.posIn.width = posData.startPosData.width; 13225 posData.posIn.height = posData.startPosData.height; 13226 13227 widthChange = posData.startPosData.width - posData.interPosData.width; 13228 13229 posData.posIn.marginRight = posData.startPosData.marginRight - widthChange; 13230 13231 heightChange = posData.startPosData.height - posData.interPosData.height; 13232 13233 posData.posIn.marginBottom = posData.startPosData.marginBottom - heightChange; 13234 } 13235 13236 // Process opacity 13237 13238 posData.posIn.opacity = 1; 13239 posData.posOut.opacity = self.effectsOut.opacity; 13240 posData.tweenData.opacity = posData.posOut.opacity - posData.posIn.opacity; 13241 13242 // Process transforms 13243 13244 for (j = 0; effectName = effectNames[j]; j++) { 13245 effect = self.effectsOut[effectName]; 13246 13247 if (!(effect instanceof mixitup.TransformData) || !effect.value) continue; 13248 13249 posData.posIn[effectName].value = 0; 13250 posData.posOut[effectName].value = effect.value; 13251 13252 posData.tweenData[effectName].value = 13253 posData.posOut[effectName].value - posData.posIn[effectName].value; 13254 13255 posData.posIn[effectName].unit = 13256 posData.posOut[effectName].unit = 13257 posData.tweenData[effectName].unit = 13258 effect.unit; 13259 } 13260 } 13261 13262 self.callActions('afterGetTweenData', arguments); 13263 }, 13264 13265 /** 13266 * @private 13267 * @instance 13268 * @since 3.0.0 13269 * @param {Operation} operation 13270 * @return {void} 13271 */ 13272 13273 moveTargets: function(operation) { 13274 var self = this, 13275 target = null, 13276 moveData = null, 13277 posData = null, 13278 statusChange = '', 13279 willTransition = false, 13280 staggerIndex = -1, 13281 i = -1, 13282 checkProgress = self.checkProgress.bind(self); 13283 13284 self.callActions('beforeMoveTargets', arguments); 13285 13286 // TODO: this is an extra loop in addition to the calcs 13287 // done in getOperation, could some of this be done there? 13288 13289 for (i = 0; target = operation.show[i]; i++) { 13290 moveData = new mixitup.IMoveData(); 13291 posData = operation.showPosData[i]; 13292 13293 statusChange = target.isShown ? 'none' : 'show'; 13294 13295 willTransition = self.willTransition( 13296 statusChange, 13297 operation.hasEffect, 13298 posData.posIn, 13299 posData.posOut 13300 ); 13301 13302 if (willTransition) { 13303 // Prevent non-transitioning targets from incrementing the staggerIndex 13304 13305 staggerIndex++; 13306 } 13307 13308 target.show(); 13309 13310 moveData.posIn = posData.posIn; 13311 moveData.posOut = posData.posOut; 13312 moveData.statusChange = statusChange; 13313 moveData.staggerIndex = staggerIndex; 13314 moveData.operation = operation; 13315 moveData.callback = willTransition ? checkProgress : null; 13316 13317 target.move(moveData); 13318 } 13319 13320 for (i = 0; target = operation.toHide[i]; i++) { 13321 posData = operation.toHidePosData[i]; 13322 moveData = new mixitup.IMoveData(); 13323 13324 statusChange = 'hide'; 13325 13326 willTransition = self.willTransition(statusChange, posData.posIn, posData.posOut); 13327 13328 moveData.posIn = posData.posIn; 13329 moveData.posOut = posData.posOut; 13330 moveData.statusChange = statusChange; 13331 moveData.staggerIndex = i; 13332 moveData.operation = operation; 13333 moveData.callback = willTransition ? checkProgress : null; 13334 13335 target.move(moveData); 13336 } 13337 13338 if (self.config.animation.animateResizeContainer) { 13339 self.dom.parent.style[mixitup.features.transitionProp] = 13340 'height ' + self.config.animation.duration + 'ms ease, ' + 13341 'width ' + self.config.animation.duration + 'ms ease '; 13342 13343 requestAnimationFrame(function() { 13344 if ( 13345 operation.startHeight !== operation.newHeight && 13346 operation.viewportDeltaY !== operation.startHeight - operation.newHeight 13347 ) { 13348 self.dom.parent.style.height = operation.newHeight + 'px'; 13349 } 13350 13351 if ( 13352 operation.startWidth !== operation.newWidth && 13353 operation.viewportDeltaX !== operation.startWidth - operation.newWidth 13354 ) { 13355 self.dom.parent.style.width = operation.newWidth + 'px'; 13356 } 13357 }); 13358 } 13359 13360 if (operation.willChangeLayout) { 13361 h.removeClass(self.dom.container, self.config.layout.ContainerClassName); 13362 h.addClass(self.dom.container, operation.newContainerClassName); 13363 } 13364 13365 self.callActions('afterMoveTargets', arguments); 13366 }, 13367 13368 /** 13369 * @private 13370 * @instance 13371 * @return {boolean} 13372 */ 13373 13374 hasEffect: function() { 13375 var self = this, 13376 EFFECTABLES = [ 13377 'scale', 13378 'translateX', 'translateY', 'translateZ', 13379 'rotateX', 'rotateY', 'rotateZ' 13380 ], 13381 effectName = '', 13382 effect = null, 13383 result = false, 13384 value = -1, 13385 i = -1; 13386 13387 if (self.effectsIn.opacity !== 1) { 13388 return self.callFilters('resultHasEffect', true, arguments); 13389 } 13390 13391 for (i = 0; effectName = EFFECTABLES[i]; i++) { 13392 effect = self.effectsIn[effectName]; 13393 value = (typeof effect && effect.value !== 'undefined') ? 13394 effect.value : effect; 13395 13396 if (value !== 0) { 13397 result = true; 13398 13399 break; 13400 } 13401 } 13402 13403 return self.callFilters('resultHasEffect', result, arguments); 13404 }, 13405 13406 /** 13407 * Determines if a target element will transition in 13408 * some fasion and therefore requires binding of 13409 * transitionEnd 13410 * 13411 * @private 13412 * @instance 13413 * @since 3.0.0 13414 * @param {string} statusChange 13415 * @param {boolean} hasEffect 13416 * @param {StyleData} posIn 13417 * @param {StyleData} posOut 13418 * @return {boolean} 13419 */ 13420 13421 willTransition: function(statusChange, hasEffect, posIn, posOut) { 13422 var self = this, 13423 result = false; 13424 13425 if (!h.isVisible(self.dom.container)) { 13426 // If the container is not visible, the transitionEnd 13427 // event will not occur and MixItUp will hang 13428 13429 result = false; 13430 } else if ( 13431 (statusChange !== 'none' && hasEffect) || 13432 posIn.x !== posOut.x || 13433 posIn.y !== posOut.y 13434 ) { 13435 // If opacity and/or translate will change 13436 13437 result = true; 13438 } else if (self.config.animation.animateResizeTargets) { 13439 // Check if width, height or margins will change 13440 13441 result = ( 13442 posIn.width !== posOut.width || 13443 posIn.height !== posOut.height || 13444 posIn.marginRight !== posOut.marginRight || 13445 posIn.marginTop !== posOut.marginTop 13446 ); 13447 } else { 13448 result = false; 13449 } 13450 13451 return self.callFilters('resultWillTransition', result, arguments); 13452 }, 13453 13454 /** 13455 * @private 13456 * @instance 13457 * @since 2.0.0 13458 * @param {Operation} operation 13459 * @return {void} 13460 */ 13461 13462 checkProgress: function(operation) { 13463 var self = this; 13464 13465 self.targetsDone++; 13466 13467 if (self.targetsBound === self.targetsDone) { 13468 self.cleanUp(operation); 13469 } 13470 }, 13471 13472 /** 13473 * @private 13474 * @instance 13475 * @since 2.0.0 13476 * @param {Operation} operation 13477 * @return {void} 13478 */ 13479 13480 cleanUp: function(operation) { 13481 var self = this, 13482 target = null, 13483 whitespaceBefore = null, 13484 whitespaceAfter = null, 13485 nextInQueue = null, 13486 i = -1; 13487 13488 self.callActions('beforeCleanUp', arguments); 13489 13490 self.targetsMoved = 13491 self.targetsImmovable = 13492 self.targetsBound = 13493 self.targetsDone = 0; 13494 13495 for (i = 0; target = operation.show[i]; i++) { 13496 target.cleanUp(); 13497 13498 target.show(); 13499 } 13500 13501 for (i = 0; target = operation.toHide[i]; i++) { 13502 target.cleanUp(); 13503 13504 target.hide(); 13505 } 13506 13507 if (operation.willSort) { 13508 self.printSort(false, operation); 13509 } 13510 13511 // Remove any styles applied to the parent container 13512 13513 self.dom.parent.style[mixitup.features.transitionProp] = 13514 self.dom.parent.style.height = 13515 self.dom.parent.style.width = 13516 self.dom.parent.style.overflow = 13517 self.dom.parent.style[mixitup.features.perspectiveProp] = 13518 self.dom.parent.style[mixitup.features.perspectiveOriginProp] = ''; 13519 13520 if (operation.willChangeLayout) { 13521 h.removeClass(self.dom.container, operation.startContainerClassName); 13522 h.addClass(self.dom.container, operation.newContainerClassName); 13523 } 13524 13525 if (operation.toRemove.length) { 13526 for (i = 0; target = self.targets[i]; i++) { 13527 if (operation.toRemove.indexOf(target) > -1) { 13528 if ( 13529 (whitespaceBefore = target.dom.el.previousSibling) && whitespaceBefore.nodeName === '#text' && 13530 (whitespaceAfter = target.dom.el.nextSibling) && whitespaceAfter.nodeName === '#text' 13531 ) { 13532 h.removeWhitespace(whitespaceBefore); 13533 } 13534 13535 if (!operation.willSort) { 13536 // NB: Sorting will remove targets as a bi-product of `printSort()` 13537 13538 self.dom.parent.removeChild(target.dom.el); 13539 } 13540 13541 self.targets.splice(i, 1); 13542 13543 target.isInDom = false; 13544 13545 i--; 13546 } 13547 } 13548 13549 // Since targets have been removed, the original order must be updated 13550 13551 self.origOrder = self.targets; 13552 } 13553 13554 if (operation.willSort) { 13555 self.targets = operation.newOrder; 13556 } 13557 13558 self.state = operation.newState; 13559 self.lastOperation = operation; 13560 13561 self.dom.targets = self.state.targets; 13562 13563 // mixEnd 13564 13565 mixitup.events.fire('mixEnd', self.dom.container, { 13566 state: self.state, 13567 instance: self 13568 }, self.dom.document); 13569 13570 if (typeof self.config.callbacks.onMixEnd === 'function') { 13571 self.config.callbacks.onMixEnd.call(self.dom.container, self.state, self); 13572 } 13573 13574 if (operation.hasFailed) { 13575 // mixFail 13576 13577 mixitup.events.fire('mixFail', self.dom.container, { 13578 state: self.state, 13579 instance: self 13580 }, self.dom.document); 13581 13582 if (typeof self.config.callbacks.onMixFail === 'function') { 13583 self.config.callbacks.onMixFail.call(self.dom.container, self.state, self); 13584 } 13585 13586 h.addClass(self.dom.container, h.getClassname(self.config.classNames, 'container', self.config.classNames.modifierFailed)); 13587 } 13588 13589 // User-defined callback function 13590 13591 if (typeof self.userCallback === 'function') { 13592 self.userCallback.call(self.dom.container, self.state, self); 13593 } 13594 13595 if (typeof self.userDeferred.resolve === 'function') { 13596 self.userDeferred.resolve(self.state); 13597 } 13598 13599 self.userCallback = null; 13600 self.userDeferred = null; 13601 self.lastClicked = null; 13602 self.isToggling = false; 13603 self.isBusy = false; 13604 13605 if (self.queue.length) { 13606 self.callActions('beforeReadQueueCleanUp', arguments); 13607 13608 nextInQueue = self.queue.shift(); 13609 13610 // Update non-public API properties stored in queue 13611 13612 self.userDeferred = nextInQueue.deferred; 13613 self.isToggling = nextInQueue.isToggling; 13614 self.lastClicked = nextInQueue.triggerElement; 13615 13616 if (nextInQueue.instruction.command instanceof mixitup.CommandMultimix) { 13617 self.multimix.apply(self, nextInQueue.args); 13618 } else { 13619 self.dataset.apply(self, nextInQueue.args); 13620 } 13621 } 13622 13623 self.callActions('afterCleanUp', arguments); 13624 }, 13625 13626 /** 13627 * @private 13628 * @instance 13629 * @since 2.0.0 13630 * @param {Array<*>} args 13631 * @return {mixitup.UserInstruction} 13632 */ 13633 13634 parseMultimixArgs: function(args) { 13635 var self = this, 13636 instruction = new mixitup.UserInstruction(), 13637 arg = null, 13638 i = -1; 13639 13640 instruction.animate = self.config.animation.enable; 13641 instruction.command = new mixitup.CommandMultimix(); 13642 13643 for (i = 0; i < args.length; i++) { 13644 arg = args[i]; 13645 13646 if (arg === null) continue; 13647 13648 if (typeof arg === 'object') { 13649 h.extend(instruction.command, arg); 13650 } else if (typeof arg === 'boolean') { 13651 instruction.animate = arg; 13652 } else if (typeof arg === 'function') { 13653 instruction.callback = arg; 13654 } 13655 } 13656 13657 // Coerce arbitrary command arguments into typed command objects 13658 13659 if (instruction.command.insert && !(instruction.command.insert instanceof mixitup.CommandInsert)) { 13660 instruction.command.insert = self.parseInsertArgs([instruction.command.insert]).command; 13661 } 13662 13663 if (instruction.command.remove && !(instruction.command.remove instanceof mixitup.CommandRemove)) { 13664 instruction.command.remove = self.parseRemoveArgs([instruction.command.remove]).command; 13665 } 13666 13667 if (instruction.command.filter && !(instruction.command.filter instanceof mixitup.CommandFilter)) { 13668 instruction.command.filter = self.parseFilterArgs([instruction.command.filter]).command; 13669 } 13670 13671 if (instruction.command.sort && !(instruction.command.sort instanceof mixitup.CommandSort)) { 13672 instruction.command.sort = self.parseSortArgs([instruction.command.sort]).command; 13673 } 13674 13675 if (instruction.command.changeLayout && !(instruction.command.changeLayout instanceof mixitup.CommandChangeLayout)) { 13676 instruction.command.changeLayout = self.parseChangeLayoutArgs([instruction.command.changeLayout]).command; 13677 } 13678 13679 instruction = self.callFilters('instructionParseMultimixArgs', instruction, arguments); 13680 13681 h.freeze(instruction); 13682 13683 return instruction; 13684 }, 13685 13686 /** 13687 * @private 13688 * @instance 13689 * @since 2.0.0 13690 * @param {Array<*>} args 13691 * @return {mixitup.UserInstruction} 13692 */ 13693 13694 parseFilterArgs: function(args) { 13695 var self = this, 13696 instruction = new mixitup.UserInstruction(), 13697 arg = null, 13698 i = -1; 13699 13700 instruction.animate = self.config.animation.enable; 13701 instruction.command = new mixitup.CommandFilter(); 13702 13703 for (i = 0; i < args.length; i++) { 13704 arg = args[i]; 13705 13706 if (typeof arg === 'string') { 13707 // Selector 13708 13709 instruction.command.selector = arg; 13710 } else if (arg === null) { 13711 instruction.command.collection = []; 13712 } else if (typeof arg === 'object' && h.isElement(arg, self.dom.document)) { 13713 // Single element 13714 13715 instruction.command.collection = [arg]; 13716 } else if (typeof arg === 'object' && typeof arg.length !== 'undefined') { 13717 // Multiple elements in array, NodeList or jQuery collection 13718 13719 instruction.command.collection = h.arrayFromList(arg); 13720 } else if (typeof arg === 'object') { 13721 // Filter command 13722 13723 h.extend(instruction.command, arg); 13724 } else if (typeof arg === 'boolean') { 13725 instruction.animate = arg; 13726 } else if (typeof arg === 'function') { 13727 instruction.callback = arg; 13728 } 13729 } 13730 13731 if (instruction.command.selector && instruction.command.collection) { 13732 throw new Error(mixitup.messages.errorFilterInvalidArguments()); 13733 } 13734 13735 instruction = self.callFilters('instructionParseFilterArgs', instruction, arguments); 13736 13737 h.freeze(instruction); 13738 13739 return instruction; 13740 }, 13741 13742 parseSortArgs: function(args) { 13743 var self = this, 13744 instruction = new mixitup.UserInstruction(), 13745 arg = null, 13746 sortString = '', 13747 i = -1; 13748 13749 instruction.animate = self.config.animation.enable; 13750 instruction.command = new mixitup.CommandSort(); 13751 13752 for (i = 0; i < args.length; i++) { 13753 arg = args[i]; 13754 13755 if (arg === null) continue; 13756 13757 switch (typeof arg) { 13758 case 'string': 13759 // Sort string 13760 13761 sortString = arg; 13762 13763 break; 13764 case 'object': 13765 // Array of element references 13766 13767 if (arg.length) { 13768 instruction.command.collection = h.arrayFromList(arg); 13769 } 13770 13771 break; 13772 case 'boolean': 13773 instruction.animate = arg; 13774 13775 break; 13776 case 'function': 13777 instruction.callback = arg; 13778 13779 break; 13780 } 13781 } 13782 13783 if (sortString) { 13784 instruction.command = self.parseSortString(sortString, instruction.command); 13785 } 13786 13787 instruction = self.callFilters('instructionParseSortArgs', instruction, arguments); 13788 13789 h.freeze(instruction); 13790 13791 return instruction; 13792 }, 13793 13794 /** 13795 * @private 13796 * @instance 13797 * @since 2.0.0 13798 * @param {Array<*>} args 13799 * @return {mixitup.UserInstruction} 13800 */ 13801 13802 parseInsertArgs: function(args) { 13803 var self = this, 13804 instruction = new mixitup.UserInstruction(), 13805 arg = null, 13806 i = -1; 13807 13808 instruction.animate = self.config.animation.enable; 13809 instruction.command = new mixitup.CommandInsert(); 13810 13811 for (i = 0; i < args.length; i++) { 13812 arg = args[i]; 13813 13814 if (arg === null) continue; 13815 13816 if (typeof arg === 'number') { 13817 // Insert index 13818 13819 instruction.command.index = arg; 13820 } else if (typeof arg === 'string' && ['before', 'after'].indexOf(arg) > -1) { 13821 // 'before'/'after' 13822 13823 instruction.command.position = arg; 13824 } else if (typeof arg === 'string') { 13825 // Markup 13826 13827 instruction.command.collection = 13828 h.arrayFromList(h.createElement(arg).childNodes); 13829 } else if (typeof arg === 'object' && h.isElement(arg, self.dom.document)) { 13830 // Single element 13831 13832 !instruction.command.collection.length ? 13833 (instruction.command.collection = [arg]) : 13834 (instruction.command.sibling = arg); 13835 } else if (typeof arg === 'object' && arg.length) { 13836 // Multiple elements in array or jQuery collection 13837 13838 !instruction.command.collection.length ? 13839 (instruction.command.collection = arg) : 13840 instruction.command.sibling = arg[0]; 13841 } else if (typeof arg === 'object' && arg.childNodes && arg.childNodes.length) { 13842 // Document fragment 13843 13844 !instruction.command.collection.length ? 13845 instruction.command.collection = h.arrayFromList(arg.childNodes) : 13846 instruction.command.sibling = arg.childNodes[0]; 13847 } else if (typeof arg === 'object') { 13848 // Insert command 13849 13850 h.extend(instruction.command, arg); 13851 } else if (typeof arg === 'boolean') { 13852 instruction.animate = arg; 13853 } else if (typeof arg === 'function') { 13854 instruction.callback = arg; 13855 } 13856 } 13857 13858 if (instruction.command.index && instruction.command.sibling) { 13859 throw new Error(mixitup.messages.errorInsertInvalidArguments()); 13860 } 13861 13862 if (!instruction.command.collection.length && self.config.debug.showWarnings) { 13863 console.warn(mixitup.messages.warningInsertNoElements()); 13864 } 13865 13866 instruction = self.callFilters('instructionParseInsertArgs', instruction, arguments); 13867 13868 h.freeze(instruction); 13869 13870 return instruction; 13871 }, 13872 13873 /** 13874 * @private 13875 * @instance 13876 * @since 3.0.0 13877 * @param {Array<*>} args 13878 * @return {mixitup.UserInstruction} 13879 */ 13880 13881 parseRemoveArgs: function(args) { 13882 var self = this, 13883 instruction = new mixitup.UserInstruction(), 13884 target = null, 13885 arg = null, 13886 i = -1; 13887 13888 instruction.animate = self.config.animation.enable; 13889 instruction.command = new mixitup.CommandRemove(); 13890 13891 for (i = 0; i < args.length; i++) { 13892 arg = args[i]; 13893 13894 if (arg === null) continue; 13895 13896 switch (typeof arg) { 13897 case 'number': 13898 if (self.targets[arg]) { 13899 instruction.command.targets[0] = self.targets[arg]; 13900 } 13901 13902 break; 13903 case 'string': 13904 instruction.command.collection = h.arrayFromList(self.dom.parent.querySelectorAll(arg)); 13905 13906 break; 13907 case 'object': 13908 if (arg && arg.length) { 13909 instruction.command.collection = arg; 13910 } else if (h.isElement(arg, self.dom.document)) { 13911 instruction.command.collection = [arg]; 13912 } else { 13913 // Remove command 13914 13915 h.extend(instruction.command, arg); 13916 } 13917 13918 break; 13919 case 'boolean': 13920 instruction.animate = arg; 13921 13922 break; 13923 case 'function': 13924 instruction.callback = arg; 13925 13926 break; 13927 } 13928 } 13929 13930 if (instruction.command.collection.length) { 13931 for (i = 0; target = self.targets[i]; i++) { 13932 if (instruction.command.collection.indexOf(target.dom.el) > -1) { 13933 instruction.command.targets.push(target); 13934 } 13935 } 13936 } 13937 13938 if (!instruction.command.targets.length && self.config.debug.showWarnings) { 13939 console.warn(mixitup.messages.warningRemoveNoElements()); 13940 } 13941 13942 h.freeze(instruction); 13943 13944 return instruction; 13945 }, 13946 13947 /** 13948 * @private 13949 * @instance 13950 * @since 3.0.0 13951 * @param {Array<*>} args 13952 * @return {mixitup.UserInstruction} 13953 */ 13954 13955 parseDatasetArgs: function(args) { 13956 var self = this, 13957 instruction = new mixitup.UserInstruction(), 13958 arg = null, 13959 i = -1; 13960 13961 instruction.animate = self.config.animation.enable; 13962 instruction.command = new mixitup.CommandDataset(); 13963 13964 for (i = 0; i < args.length; i++) { 13965 arg = args[i]; 13966 13967 if (arg === null) continue; 13968 13969 switch (typeof arg) { 13970 case 'object': 13971 if (Array.isArray(arg) || typeof arg.length === 'number') { 13972 instruction.command.dataset = arg; 13973 } else { 13974 // Change layout command 13975 13976 h.extend(instruction.command, arg); 13977 } 13978 13979 break; 13980 case 'boolean': 13981 instruction.animate = arg; 13982 13983 break; 13984 case 'function': 13985 instruction.callback = arg; 13986 13987 break; 13988 } 13989 } 13990 13991 h.freeze(instruction); 13992 13993 return instruction; 13994 }, 13995 13996 /** 13997 * @private 13998 * @instance 13999 * @since 3.0.0 14000 * @param {Array<*>} args 14001 * @return {mixitup.UserInstruction} 14002 */ 14003 14004 parseChangeLayoutArgs: function(args) { 14005 var self = this, 14006 instruction = new mixitup.UserInstruction(), 14007 arg = null, 14008 i = -1; 14009 14010 instruction.animate = self.config.animation.enable; 14011 instruction.command = new mixitup.CommandChangeLayout(); 14012 14013 for (i = 0; i < args.length; i++) { 14014 arg = args[i]; 14015 14016 if (arg === null) continue; 14017 14018 switch (typeof arg) { 14019 case 'string': 14020 instruction.command.containerClassName = arg; 14021 14022 break; 14023 case 'object': 14024 // Change layout command 14025 14026 h.extend(instruction.command, arg); 14027 14028 break; 14029 case 'boolean': 14030 instruction.animate = arg; 14031 14032 break; 14033 case 'function': 14034 instruction.callback = arg; 14035 14036 break; 14037 } 14038 } 14039 14040 h.freeze(instruction); 14041 14042 return instruction; 14043 }, 14044 14045 /** 14046 * @private 14047 * @instance 14048 * @since 3.0.0 14049 * @param {mixitup.QueueItem} queueItem 14050 * @return {Promise.<mixitup.State>} 14051 */ 14052 14053 queueMix: function(queueItem) { 14054 var self = this, 14055 deferred = null, 14056 toggleSelector = ''; 14057 14058 self.callActions('beforeQueueMix', arguments); 14059 14060 deferred = h.defer(mixitup.libraries); 14061 14062 if (self.config.animation.queue && self.queue.length < self.config.animation.queueLimit) { 14063 queueItem.deferred = deferred; 14064 14065 self.queue.push(queueItem); 14066 14067 // Keep controls in sync with user interactions. Mixer will catch up as it drains the queue. 14068 14069 if (self.config.controls.enable) { 14070 if (self.isToggling) { 14071 self.buildToggleArray(queueItem.instruction.command); 14072 14073 toggleSelector = self.getToggleSelector(); 14074 14075 self.updateControls({ 14076 filter: { 14077 selector: toggleSelector 14078 } 14079 }); 14080 } else { 14081 self.updateControls(queueItem.instruction.command); 14082 } 14083 } 14084 } else { 14085 if (self.config.debug.showWarnings) { 14086 console.warn(mixitup.messages.warningMultimixInstanceQueueFull()); 14087 } 14088 14089 deferred.resolve(self.state); 14090 14091 mixitup.events.fire('mixBusy', self.dom.container, { 14092 state: self.state, 14093 instance: self 14094 }, self.dom.document); 14095 14096 if (typeof self.config.callbacks.onMixBusy === 'function') { 14097 self.config.callbacks.onMixBusy.call(self.dom.container, self.state, self); 14098 } 14099 } 14100 14101 return self.callFilters('promiseQueueMix', deferred.promise, arguments); 14102 }, 14103 14104 /** 14105 * @private 14106 * @instance 14107 * @since 3.0.0 14108 * @param {Array.<object>} newDataset 14109 * @return {Operation} 14110 */ 14111 14112 getDataOperation: function(newDataset) { 14113 var self = this, 14114 operation = new mixitup.Operation(), 14115 startDataset = []; 14116 14117 operation = self.callFilters('operationUnmappedGetDataOperation', operation, arguments); 14118 14119 if (self.dom.targets.length && !(startDataset = (self.state.activeDataset || [])).length) { 14120 throw new Error(mixitup.messages.errorDatasetNotSet()); 14121 } 14122 14123 operation.id = h.randomHex(); 14124 operation.startState = self.state; 14125 operation.startDataset = startDataset; 14126 operation.newDataset = newDataset.slice(); 14127 14128 self.diffDatasets(operation); 14129 14130 operation.startOrder = self.targets; 14131 operation.newOrder = operation.show; 14132 14133 if (self.config.animation.enable) { 14134 self.getStartMixData(operation); 14135 self.setInter(operation); 14136 14137 operation.docState = h.getDocumentState(self.dom.document); 14138 14139 self.getInterMixData(operation); 14140 self.setFinal(operation); 14141 self.getFinalMixData(operation); 14142 14143 self.parseEffects(); 14144 14145 operation.hasEffect = self.hasEffect(); 14146 14147 self.getTweenData(operation); 14148 } 14149 14150 self.targets = operation.show.slice(); 14151 14152 operation.newState = self.buildState(operation); 14153 14154 // NB: Targets to be removed must be included in `self.targets` for removal during clean up, 14155 // but are added after state is built so that state is accurate 14156 14157 Array.prototype.push.apply(self.targets, operation.toRemove); 14158 14159 operation = self.callFilters('operationMappedGetDataOperation', operation, arguments); 14160 14161 return operation; 14162 }, 14163 14164 /** 14165 * @private 14166 * @instance 14167 * @since 3.0.0 14168 * @param {mixitup.Operation} operation 14169 * @return {void} 14170 */ 14171 14172 diffDatasets: function(operation) { 14173 var self = this, 14174 persistantStartIds = [], 14175 persistantNewIds = [], 14176 insertedTargets = [], 14177 data = null, 14178 target = null, 14179 el = null, 14180 frag = null, 14181 nextEl = null, 14182 uids = {}, 14183 id = '', 14184 i = -1; 14185 14186 self.callActions('beforeDiffDatasets', arguments); 14187 14188 for (i = 0; data = operation.newDataset[i]; i++) { 14189 if (typeof (id = data[self.config.data.uidKey]) === 'undefined' || id.toString().length < 1) { 14190 throw new TypeError(mixitup.messages.errorDatasetInvalidUidKey({ 14191 uidKey: self.config.data.uidKey 14192 })); 14193 } 14194 14195 if (!uids[id]) { 14196 uids[id] = true; 14197 } else { 14198 throw new Error(mixitup.messages.errorDatasetDuplicateUid({ 14199 uid: id 14200 })); 14201 } 14202 14203 if ((target = self.cache[id]) instanceof mixitup.Target) { 14204 // Already in cache 14205 14206 if (self.config.data.dirtyCheck && !h.deepEquals(data, target.data)) { 14207 // change detected 14208 14209 el = target.render(data); 14210 14211 target.data = data; 14212 14213 if (el !== target.dom.el) { 14214 // Update target element reference 14215 14216 if (target.isInDom) { 14217 target.unbindEvents(); 14218 14219 self.dom.parent.replaceChild(el, target.dom.el); 14220 } 14221 14222 if (!target.isShown) { 14223 el.style.display = 'none'; 14224 } 14225 14226 target.dom.el = el; 14227 14228 if (target.isInDom) { 14229 target.bindEvents(); 14230 } 14231 } 14232 } 14233 14234 el = target.dom.el; 14235 } else { 14236 // New target 14237 14238 target = new mixitup.Target(); 14239 14240 target.init(null, self, data); 14241 14242 target.hide(); 14243 } 14244 14245 if (!target.isInDom) { 14246 // Adding to DOM 14247 14248 if (!frag) { 14249 // Open frag 14250 14251 frag = self.dom.document.createDocumentFragment(); 14252 } 14253 14254 if (frag.lastElementChild) { 14255 frag.appendChild(self.dom.document.createTextNode(' ')); 14256 } 14257 14258 frag.appendChild(target.dom.el); 14259 14260 target.isInDom = true; 14261 14262 target.unbindEvents(); 14263 target.bindEvents(); 14264 target.hide(); 14265 14266 operation.toShow.push(target); 14267 14268 insertedTargets.push(target); 14269 } else { 14270 // Already in DOM 14271 14272 nextEl = target.dom.el.nextElementSibling; 14273 14274 persistantNewIds.push(id); 14275 14276 if (frag) { 14277 // Close and insert previously opened frag 14278 14279 if (frag.lastElementChild) { 14280 frag.appendChild(self.dom.document.createTextNode(' ')); 14281 } 14282 14283 self.insertDatasetFrag(frag, target.dom.el, insertedTargets); 14284 14285 frag = null; 14286 } 14287 } 14288 14289 operation.show.push(target); 14290 } 14291 14292 if (frag) { 14293 // Unclosed frag remaining 14294 14295 nextEl = nextEl || self.config.layout.siblingAfter; 14296 14297 if (nextEl) { 14298 frag.appendChild(self.dom.document.createTextNode(' ')); 14299 } 14300 14301 self.insertDatasetFrag(frag, nextEl, insertedTargets); 14302 } 14303 14304 for (i = 0; data = operation.startDataset[i]; i++) { 14305 id = data[self.config.data.uidKey]; 14306 14307 target = self.cache[id]; 14308 14309 if (operation.show.indexOf(target) < 0) { 14310 // Previously shown but now absent 14311 14312 operation.hide.push(target); 14313 operation.toHide.push(target); 14314 operation.toRemove.push(target); 14315 } else { 14316 persistantStartIds.push(id); 14317 } 14318 } 14319 14320 if (!h.isEqualArray(persistantStartIds, persistantNewIds)) { 14321 operation.willSort = true; 14322 } 14323 14324 self.callActions('afterDiffDatasets', arguments); 14325 }, 14326 14327 /** 14328 * @private 14329 * @instance 14330 * @since 3.1.5 14331 * @param {DocumentFragment} frag 14332 * @param {(HTMLElement|null)} nextEl 14333 * @param {Array.<mixitup.Target>} targets 14334 * @return {void} 14335 */ 14336 14337 insertDatasetFrag: function(frag, nextEl, targets) { 14338 var self = this; 14339 var insertAt = nextEl ? h.arrayFromList(self.dom.parent.children).indexOf(nextEl) : self.targets.length; 14340 14341 self.dom.parent.insertBefore(frag, nextEl); 14342 14343 while (targets.length) { 14344 self.targets.splice(insertAt, 0, targets.shift()); 14345 14346 insertAt++; 14347 } 14348 }, 14349 14350 /** 14351 * @private 14352 * @instance 14353 * @since 3.0.0 14354 * @param {mixitup.CommandSort} sortCommandA 14355 * @param {mixitup.CommandSort} sortCommandB 14356 * @return {boolean} 14357 */ 14358 14359 willSort: function(sortCommandA, sortCommandB) { 14360 var self = this, 14361 result = false; 14362 14363 if ( 14364 self.config.behavior.liveSort || 14365 sortCommandA.order === 'random' || 14366 sortCommandA.attribute !== sortCommandB.attribute || 14367 sortCommandA.order !== sortCommandB.order || 14368 sortCommandA.collection !== sortCommandB.collection || 14369 (sortCommandA.next === null && sortCommandB.next) || 14370 (sortCommandA.next && sortCommandB.next === null) 14371 ) { 14372 result = true; 14373 } else if (sortCommandA.next && sortCommandB.next) { 14374 result = self.willSort(sortCommandA.next, sortCommandB.next); 14375 } else { 14376 result = false; 14377 } 14378 14379 return self.callFilters('resultWillSort', result, arguments); 14380 }, 14381 14382 /** 14383 * A shorthand method for `.filter('all')`. Shows all targets in the container. 14384 * 14385 * @example 14386 * 14387 * .show() 14388 * 14389 * @example <caption>Example: Showing all targets</caption> 14390 * 14391 * mixer.show() 14392 * .then(function(state) { 14393 * console.log(state.totalShow === state.totalTargets); // true 14394 * }); 14395 * 14396 * @public 14397 * @instance 14398 * @since 3.0.0 14399 * @return {Promise.<mixitup.State>} 14400 */ 14401 14402 show: function() { 14403 var self = this; 14404 14405 return self.filter('all'); 14406 }, 14407 14408 /** 14409 * A shorthand method for `.filter('none')`. Hides all targets in the container. 14410 * 14411 * @example 14412 * 14413 * .hide() 14414 * 14415 * @example <caption>Example: Hiding all targets</caption> 14416 * 14417 * mixer.hide() 14418 * .then(function(state) { 14419 * console.log(state.totalShow === 0); // true 14420 * console.log(state.totalHide === state.totalTargets); // true 14421 * }); 14422 * 14423 * @public 14424 * @instance 14425 * @since 3.0.0 14426 * @return {Promise.<mixitup.State>} 14427 */ 14428 14429 hide: function() { 14430 var self = this; 14431 14432 return self.filter('none'); 14433 }, 14434 14435 /** 14436 * Returns a boolean indicating whether or not a MixItUp operation is 14437 * currently in progress. 14438 * 14439 * @example 14440 * 14441 * .isMixing() 14442 * 14443 * @example <caption>Example: Checking the status of a mixer</caption> 14444 * 14445 * mixer.sort('random', function() { 14446 * console.log(mixer.isMixing()) // false 14447 * }); 14448 * 14449 * console.log(mixer.isMixing()) // true 14450 * 14451 * @public 14452 * @instance 14453 * @since 2.0.0 14454 * @return {boolean} 14455 */ 14456 14457 isMixing: function() { 14458 var self = this; 14459 14460 return self.isBusy; 14461 }, 14462 14463 /** 14464 * Filters all targets in the container by a provided selector string, or the values `'all'` 14465 * or `'none'`. Only targets matching the selector will be shown. 14466 * 14467 * @example 14468 * 14469 * .filter(selector [, animate] [, callback]) 14470 * 14471 * @example <caption>Example 1: Filtering targets by a class selector</caption> 14472 * 14473 * mixer.filter('.category-a') 14474 * .then(function(state) { 14475 * console.log(state.totalShow === containerEl.querySelectorAll('.category-a').length); // true 14476 * }); 14477 * 14478 * @example <caption>Example 2: Filtering targets by an attribute selector</caption> 14479 * 14480 * mixer.filter('[data-category~="a"]') 14481 * .then(function(state) { 14482 * console.log(state.totalShow === containerEl.querySelectorAll('[data-category~="a"]').length); // true 14483 * }); 14484 * 14485 * @example <caption>Example 3: Filtering targets by a compound selector</caption> 14486 * 14487 * // Show only those targets with the classes 'category-a' AND 'category-b' 14488 * 14489 * mixer.filter('.category-a.category-c') 14490 * .then(function(state) { 14491 * console.log(state.totalShow === containerEl.querySelectorAll('.category-a.category-c').length); // true 14492 * }); 14493 * 14494 * @example <caption>Example 4: Filtering via an element collection</caption> 14495 * 14496 * var collection = Array.from(container.querySelectorAll('.mix')); 14497 * 14498 * console.log(collection.length); // 34 14499 * 14500 * // Filter the collection manually using Array.prototype.filter 14501 * 14502 * var filtered = collection.filter(function(target) { 14503 * return parseInt(target.getAttribute('data-price')) > 10; 14504 * }); 14505 * 14506 * console.log(filtered.length); // 22 14507 * 14508 * // Pass the filtered collection to MixItUp 14509 * 14510 * mixer.filter(filtered) 14511 * .then(function(state) { 14512 * console.log(state.activeFilter.collection.length === 22); // true 14513 * }); 14514 * 14515 * @public 14516 * @instance 14517 * @since 2.0.0 14518 * @param {(string|HTMLElement|Array.<HTMLElement>)} selector 14519 * Any valid CSS selector (i.e. `'.category-a'`), or the values `'all'` or `'none'`. The filter method also accepts a reference to single target element or a collection of target elements to show. 14520 * @param {boolean} [animate=true] 14521 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 14522 * @param {function} [callback=null] 14523 * An optional callback function to be invoked after the operation has completed. 14524 * @return {Promise.<mixitup.State>} 14525 * A promise resolving with the current state object. 14526 */ 14527 14528 filter: function() { 14529 var self = this, 14530 instruction = self.parseFilterArgs(arguments); 14531 14532 return self.multimix({ 14533 filter: instruction.command 14534 }, instruction.animate, instruction.callback); 14535 }, 14536 14537 /** 14538 * Adds an additional selector to the currently active filter selector, concatenating 14539 * as per the logic defined in `controls.toggleLogic`. 14540 * 14541 * @example 14542 * 14543 * .toggleOn(selector [, animate] [, callback]) 14544 * 14545 * @example <caption>Example: Toggling on a filter selector</caption> 14546 * 14547 * console.log(mixer.getState().activeFilter.selector); // '.category-a' 14548 * 14549 * mixer.toggleOn('.category-b') 14550 * .then(function(state) { 14551 * console.log(state.activeFilter.selector); // '.category-a, .category-b' 14552 * }); 14553 * 14554 * @public 14555 * @instance 14556 * @since 3.0.0 14557 * @param {string} selector 14558 * Any valid CSS selector (i.e. `'.category-a'`) 14559 * @param {boolean} [animate=true] 14560 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 14561 * @param {function} [callback=null] 14562 * An optional callback function to be invoked after the operation has completed. 14563 * @return {Promise.<mixitup.State>} 14564 * A promise resolving with the current state object. 14565 */ 14566 14567 toggleOn: function() { 14568 var self = this, 14569 instruction = self.parseFilterArgs(arguments), 14570 selector = instruction.command.selector, 14571 toggleSelector = ''; 14572 14573 self.isToggling = true; 14574 14575 if (self.toggleArray.indexOf(selector) < 0) { 14576 self.toggleArray.push(selector); 14577 } 14578 14579 toggleSelector = self.getToggleSelector(); 14580 14581 return self.multimix({ 14582 filter: toggleSelector 14583 }, instruction.animate, instruction.callback); 14584 }, 14585 14586 /** 14587 * Removes a selector from the active filter selector. 14588 * 14589 * @example 14590 * 14591 * .toggleOff(selector [, animate] [, callback]) 14592 * 14593 * @example <caption>Example: Toggling off a filter selector</caption> 14594 * 14595 * console.log(mixer.getState().activeFilter.selector); // '.category-a, .category-b' 14596 * 14597 * mixer.toggleOff('.category-b') 14598 * .then(function(state) { 14599 * console.log(state.activeFilter.selector); // '.category-a' 14600 * }); 14601 * 14602 * @public 14603 * @instance 14604 * @since 3.0.0 14605 * @param {string} selector 14606 * Any valid CSS selector (i.e. `'.category-a'`) 14607 * @param {boolean} [animate=true] 14608 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 14609 * @param {function} [callback=null] 14610 * An optional callback function to be invoked after the operation has completed. 14611 * @return {Promise.<mixitup.State>} 14612 * A promise resolving with the current state object. 14613 */ 14614 14615 toggleOff: function() { 14616 var self = this, 14617 instruction = self.parseFilterArgs(arguments), 14618 selector = instruction.command.selector, 14619 selectorIndex = self.toggleArray.indexOf(selector), 14620 toggleSelector = ''; 14621 14622 self.isToggling = true; 14623 14624 if (selectorIndex > -1) { 14625 self.toggleArray.splice(selectorIndex, 1); 14626 } 14627 14628 toggleSelector = self.getToggleSelector(); 14629 14630 return self.multimix({ 14631 filter: toggleSelector 14632 }, instruction.animate, instruction.callback); 14633 }, 14634 14635 /** 14636 * Sorts all targets in the container according to a provided sort string. 14637 * 14638 * @example 14639 * 14640 * .sort(sortString [, animate] [, callback]) 14641 * 14642 * @example <caption>Example 1: Sorting by the default DOM order</caption> 14643 * 14644 * // Reverse the default order of the targets 14645 * 14646 * mixer.sort('default:desc') 14647 * .then(function(state) { 14648 * console.log(state.activeSort.attribute === 'default'); // true 14649 * console.log(state.activeSort.order === 'desc'); // true 14650 * }); 14651 * 14652 * @example <caption>Example 2: Sorting by a custom data-attribute</caption> 14653 * 14654 * // Sort the targets by the value of a `data-published-date` attribute 14655 * 14656 * mixer.sort('published-date:asc') 14657 * .then(function(state) { 14658 * console.log(state.activeSort.attribute === 'published-date'); // true 14659 * console.log(state.activeSort.order === 'asc'); // true 14660 * }); 14661 * 14662 * @example <caption>Example 3: Sorting by multiple attributes</caption> 14663 * 14664 * // Sort the targets by the value of a `data-published-date` attribute, then by `data-title` 14665 * 14666 * mixer.sort('published-date:desc data-title:asc') 14667 * .then(function(state) { 14668 * console.log(state.activeSort.attribute === 'published-date'); // true 14669 * console.log(state.activeSort.order === 'desc'); // true 14670 * 14671 * console.log(state.activeSort.next.attribute === 'title'); // true 14672 * console.log(state.activeSort.next.order === 'asc'); // true 14673 * }); 14674 * 14675 * @example <caption>Example 4: Sorting by random</caption> 14676 * 14677 * mixer.sort('random') 14678 * .then(function(state) { 14679 * console.log(state.activeSort.order === 'random') // true 14680 * }); 14681 * 14682 * @example <caption>Example 5: Sorting via an element collection</caption> 14683 * 14684 * var collection = Array.from(container.querySelectorAll('.mix')); 14685 * 14686 * // Swap the position of two elements in the collection: 14687 * 14688 * var temp = collection[1]; 14689 * 14690 * collection[1] = collection[0]; 14691 * collection[0] = temp; 14692 * 14693 * // Pass the sorted collection to MixItUp 14694 * 14695 * mixer.sort(collection) 14696 * .then(function(state) { 14697 * console.log(state.targets[0] === collection[0]); // true 14698 * }); 14699 * 14700 * @public 14701 * @instance 14702 * @since 2.0.0 14703 * @param {(string|Array.<HTMLElement>)} sortString 14704 * A valid sort string (e.g. `'default'`, `'published-date:asc'`, or `'random'`). The sort method also accepts an array of all target elements in a user-defined order. 14705 * @param {boolean} [animate=true] 14706 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 14707 * @param {function} [callback=null] 14708 * An optional callback function to be invoked after the operation has completed. 14709 * @return {Promise.<mixitup.State>} 14710 * A promise resolving with the current state object. 14711 */ 14712 14713 sort: function() { 14714 var self = this, 14715 instruction = self.parseSortArgs(arguments); 14716 14717 return self.multimix({ 14718 sort: instruction.command 14719 }, instruction.animate, instruction.callback); 14720 }, 14721 14722 /** 14723 * Changes the layout of the container by adding, removing or updating a 14724 * layout-specific class name. If `animation.animateResizetargets` is 14725 * enabled, MixItUp will attempt to gracefully animate the width, height, 14726 * and position of targets between layout states. 14727 * 14728 * @example 14729 * 14730 * .changeLayout(containerClassName [, animate] [, callback]) 14731 * 14732 * @example <caption>Example 1: Adding a new class name to the container</caption> 14733 * 14734 * mixer.changeLayout('container-list') 14735 * .then(function(state) { 14736 * console.log(state.activeContainerClass === 'container-list'); // true 14737 * }); 14738 * 14739 * @example <caption>Example 2: Removing a previously added class name from the container</caption> 14740 * 14741 * mixer.changeLayout('') 14742 * .then(function(state) { 14743 * console.log(state.activeContainerClass === ''); // true 14744 * }); 14745 * 14746 * @public 14747 * @instance 14748 * @since 2.0.0 14749 * @param {string} containerClassName 14750 * A layout-specific class name to add to the container. 14751 * @param {boolean} [animate=true] 14752 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 14753 * @param {function} [callback=null] 14754 * An optional callback function to be invoked after the operation has completed. 14755 * @return {Promise.<mixitup.State>} 14756 * A promise resolving with the current state object. 14757 */ 14758 14759 changeLayout: function() { 14760 var self = this, 14761 instruction = self.parseChangeLayoutArgs(arguments); 14762 14763 return self.multimix({ 14764 changeLayout: instruction.command 14765 }, instruction.animate, instruction.callback); 14766 }, 14767 14768 /** 14769 * Updates the contents and order of the container to reflect the provided dataset, 14770 * if the dataset API is in use. 14771 * 14772 * The dataset API is designed for use in API-driven JavaScript applications, and 14773 * can be used instead of DOM-based methods such as `.filter()`, `.sort()`, 14774 * `.insert()`, etc. When used, insertion, removal, sorting and pagination can be 14775 * achieved purely via changes to your data model, without the uglyness of having 14776 * to interact with or query the DOM directly. 14777 * 14778 * @example 14779 * 14780 * .dataset(dataset [, animate] [, callback]) 14781 * 14782 * @example <caption>Example 1: Rendering a dataset</caption> 14783 * 14784 * var myDataset = [ 14785 * {id: 1, ...}, 14786 * {id: 2, ...}, 14787 * {id: 3, ...} 14788 * ]; 14789 * 14790 * mixer.dataset(myDataset) 14791 * .then(function(state) { 14792 * console.log(state.totalShow === 3); // true 14793 * }); 14794 * 14795 * @example <caption>Example 2: Sorting a dataset</caption> 14796 * 14797 * // Create a new dataset in reverse order 14798 * 14799 * var newDataset = myDataset.slice().reverse(); 14800 * 14801 * mixer.dataset(newDataset) 14802 * .then(function(state) { 14803 * console.log(state.activeDataset[0] === myDataset[2]); // true 14804 * }); 14805 * 14806 * @example <caption>Example 3: Removing an item from the dataset</caption> 14807 * 14808 * console.log(myDataset.length); // 3 14809 * 14810 * // Create a new dataset with the last item removed. 14811 * 14812 * var newDataset = myDataset.slice().pop(); 14813 * 14814 * mixer.dataset(newDataset) 14815 * .then(function(state) { 14816 * console.log(state.totalShow === 2); // true 14817 * }); 14818 * 14819 * @public 14820 * @instance 14821 * @since 3.0.0 14822 * @param {Array.<object>} dataset 14823 * An array of objects, each one representing the underlying data model of a target to be rendered. 14824 * @param {boolean} [animate=true] 14825 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 14826 * @param {function} [callback=null] 14827 * An optional callback function to be invoked after the operation has completed. 14828 * @return {Promise.<mixitup.State>} 14829 * A promise resolving with the current state object. 14830 */ 14831 14832 dataset: function() { 14833 var self = this, 14834 instruction = self.parseDatasetArgs(arguments), 14835 operation = null, 14836 queueItem = null, 14837 animate = false; 14838 14839 self.callActions('beforeDataset', arguments); 14840 14841 if (!self.isBusy) { 14842 if (instruction.callback) self.userCallback = instruction.callback; 14843 14844 animate = (instruction.animate ^ self.config.animation.enable) ? instruction.animate : self.config.animation.enable; 14845 14846 operation = self.getDataOperation(instruction.command.dataset); 14847 14848 return self.goMix(animate, operation); 14849 } else { 14850 queueItem = new mixitup.QueueItem(); 14851 14852 queueItem.args = arguments; 14853 queueItem.instruction = instruction; 14854 14855 return self.queueMix(queueItem); 14856 } 14857 }, 14858 14859 /** 14860 * Performs simultaneous `filter`, `sort`, `insert`, `remove` and `changeLayout` 14861 * operations as requested. 14862 * 14863 * @example 14864 * 14865 * .multimix(multimixCommand [, animate] [, callback]) 14866 * 14867 * @example <caption>Example 1: Performing simultaneous filtering and sorting</caption> 14868 * 14869 * mixer.multimix({ 14870 * filter: '.category-b', 14871 * sort: 'published-date:desc' 14872 * }) 14873 * .then(function(state) { 14874 * console.log(state.activeFilter.selector === '.category-b'); // true 14875 * console.log(state.activeSort.attribute === 'published-date'); // true 14876 * }); 14877 * 14878 * @example <caption>Example 2: Performing simultaneous sorting, insertion, and removal</caption> 14879 * 14880 * console.log(mixer.getState().totalShow); // 6 14881 * 14882 * // NB: When inserting via `multimix()`, an object should be provided as the value 14883 * // for the `insert` portion of the command, allowing for a collection of elements 14884 * // and an insertion index to be specified. 14885 * 14886 * mixer.multimix({ 14887 * sort: 'published-date:desc', // Sort the container, including any new elements 14888 * insert: { 14889 * collection: [newElementReferenceA, newElementReferenceB], // Add 2 new elements at index 5 14890 * index: 5 14891 * }, 14892 * remove: existingElementReference // Remove 1 existing element 14893 * }) 14894 * .then(function(state) { 14895 * console.log(state.activeSort.attribute === 'published-date'); // true 14896 * console.log(state.totalShow === 7); // true 14897 * }); 14898 * 14899 * @public 14900 * @instance 14901 * @since 2.0.0 14902 * @param {object} multimixCommand 14903 * An object containing one or more things to do 14904 * @param {boolean} [animate=true] 14905 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 14906 * @param {function} [callback=null] 14907 * An optional callback function to be invoked after the operation has completed. 14908 * @return {Promise.<mixitup.State>} 14909 * A promise resolving with the current state object. 14910 */ 14911 14912 multimix: function() { 14913 var self = this, 14914 operation = null, 14915 animate = false, 14916 queueItem = null, 14917 instruction = self.parseMultimixArgs(arguments); 14918 14919 self.callActions('beforeMultimix', arguments); 14920 14921 if (!self.isBusy) { 14922 operation = self.getOperation(instruction.command); 14923 14924 if (self.config.controls.enable) { 14925 // Update controls for API calls 14926 14927 if (instruction.command.filter && !self.isToggling) { 14928 // As we are not toggling, reset the toggle array 14929 // so new filter overrides existing toggles 14930 14931 self.toggleArray.length = 0; 14932 self.buildToggleArray(operation.command); 14933 } 14934 14935 if (self.queue.length < 1) { 14936 self.updateControls(operation.command); 14937 } 14938 } 14939 14940 if (instruction.callback) self.userCallback = instruction.callback; 14941 14942 // Always allow the instruction to override the instance setting 14943 14944 animate = (instruction.animate ^ self.config.animation.enable) ? 14945 instruction.animate : 14946 self.config.animation.enable; 14947 14948 self.callFilters('operationMultimix', operation, arguments); 14949 14950 return self.goMix(animate, operation); 14951 } else { 14952 queueItem = new mixitup.QueueItem(); 14953 14954 queueItem.args = arguments; 14955 queueItem.instruction = instruction; 14956 queueItem.triggerElement = self.lastClicked; 14957 queueItem.isToggling = self.isToggling; 14958 14959 return self.queueMix(queueItem); 14960 } 14961 }, 14962 14963 /** 14964 * @private 14965 * @instance 14966 * @since 3.0.0 14967 * @param {object} multimixCommand 14968 * @param {boolean} [isPreFetch] 14969 * An optional boolean indicating that the operation is being pre-fetched for execution at a later time. 14970 * @return {Operation|null} 14971 */ 14972 14973 getOperation: function(multimixCommand) { 14974 var self = this, 14975 sortCommand = multimixCommand.sort, 14976 filterCommand = multimixCommand.filter, 14977 changeLayoutCommand = multimixCommand.changeLayout, 14978 removeCommand = multimixCommand.remove, 14979 insertCommand = multimixCommand.insert, 14980 operation = new mixitup.Operation(); 14981 14982 operation = self.callFilters('operationUnmappedGetOperation', operation, arguments); 14983 14984 operation.id = h.randomHex(); 14985 operation.command = multimixCommand; 14986 operation.startState = self.state; 14987 operation.triggerElement = self.lastClicked; 14988 14989 if (self.isBusy) { 14990 if (self.config.debug.showWarnings) { 14991 console.warn(mixitup.messages.warningGetOperationInstanceBusy()); 14992 } 14993 14994 return null; 14995 } 14996 14997 if (insertCommand) { 14998 self.insertTargets(insertCommand, operation); 14999 } 15000 15001 if (removeCommand) { 15002 operation.toRemove = removeCommand.targets; 15003 } 15004 15005 operation.startSort = operation.newSort = operation.startState.activeSort; 15006 operation.startOrder = operation.newOrder = self.targets; 15007 15008 if (sortCommand) { 15009 operation.startSort = operation.startState.activeSort; 15010 operation.newSort = sortCommand; 15011 15012 operation.willSort = self.willSort(sortCommand, operation.startState.activeSort); 15013 15014 if (operation.willSort) { 15015 self.sortOperation(operation); 15016 } 15017 } 15018 15019 operation.startFilter = operation.startState.activeFilter; 15020 15021 if (filterCommand) { 15022 operation.newFilter = filterCommand; 15023 } else { 15024 operation.newFilter = h.extend(new mixitup.CommandFilter(), operation.startFilter); 15025 } 15026 15027 if (operation.newFilter.selector === 'all') { 15028 operation.newFilter.selector = self.config.selectors.target; 15029 } else if (operation.newFilter.selector === 'none') { 15030 operation.newFilter.selector = ''; 15031 } 15032 15033 self.filterOperation(operation); 15034 15035 operation.startContainerClassName = operation.startState.activeContainerClassName; 15036 15037 if (changeLayoutCommand) { 15038 operation.newContainerClassName = changeLayoutCommand.containerClassName; 15039 15040 if (operation.newContainerClassName !== operation.startContainerClassName) { 15041 operation.willChangeLayout = true; 15042 } 15043 } else { 15044 operation.newContainerClassName = operation.startContainerClassName; 15045 } 15046 15047 if (self.config.animation.enable) { 15048 // Populate the operation's position data 15049 15050 self.getStartMixData(operation); 15051 self.setInter(operation); 15052 15053 operation.docState = h.getDocumentState(self.dom.document); 15054 15055 self.getInterMixData(operation); 15056 self.setFinal(operation); 15057 self.getFinalMixData(operation); 15058 15059 self.parseEffects(); 15060 15061 operation.hasEffect = self.hasEffect(); 15062 15063 self.getTweenData(operation); 15064 } 15065 15066 if (operation.willSort) { 15067 self.targets = operation.newOrder; 15068 } 15069 15070 operation.newState = self.buildState(operation); 15071 15072 return self.callFilters('operationMappedGetOperation', operation, arguments); 15073 }, 15074 15075 /** 15076 * Renders a previously created operation at a specific point in its path, as 15077 * determined by a multiplier between 0 and 1. 15078 * 15079 * @example 15080 * .tween(operation, multiplier) 15081 * 15082 * @private 15083 * @instance 15084 * @since 3.0.0 15085 * @param {mixitup.Operation} operation 15086 * An operation object created via the `getOperation` method 15087 * 15088 * @param {Float} multiplier 15089 * Any number between 0 and 1 representing the percentage complete of the operation 15090 * @return {void} 15091 */ 15092 15093 tween: function(operation, multiplier) { 15094 var target = null, 15095 posData = null, 15096 toHideIndex = -1, 15097 i = -1; 15098 15099 multiplier = Math.min(multiplier, 1); 15100 multiplier = Math.max(multiplier, 0); 15101 15102 for (i = 0; target = operation.show[i]; i++) { 15103 posData = operation.showPosData[i]; 15104 15105 target.applyTween(posData, multiplier); 15106 } 15107 15108 for (i = 0; target = operation.hide[i]; i++) { 15109 if (target.isShown) { 15110 target.hide(); 15111 } 15112 15113 if ((toHideIndex = operation.toHide.indexOf(target)) > -1) { 15114 posData = operation.toHidePosData[toHideIndex]; 15115 15116 if (!target.isShown) { 15117 target.show(); 15118 } 15119 15120 target.applyTween(posData, multiplier); 15121 } 15122 } 15123 }, 15124 15125 /** 15126 * Inserts one or more new target elements into the container at a specified 15127 * index. 15128 * 15129 * To be indexed as targets, new elements must match the `selectors.target` 15130 * selector (`'.mix'` by default). 15131 * 15132 * @example 15133 * 15134 * .insert(newElements [, index] [, animate], [, callback]) 15135 * 15136 * @example <caption>Example 1: Inserting a single element via reference</caption> 15137 * 15138 * console.log(mixer.getState().totalShow); // 0 15139 * 15140 * // Create a new element 15141 * 15142 * var newElement = document.createElement('div'); 15143 * newElement.classList.add('mix'); 15144 * 15145 * mixer.insert(newElement) 15146 * .then(function(state) { 15147 * console.log(state.totalShow === 1); // true 15148 * }); 15149 * 15150 * @example <caption>Example 2: Inserting a single element via HTML string</caption> 15151 * 15152 * console.log(mixer.getState().totalShow); // 1 15153 * 15154 * // Create a new element via reference 15155 * 15156 * var newElementHtml = '<div class="mix"></div>'; 15157 * 15158 * // Create and insert the new element at index 1 15159 * 15160 * mixer.insert(newElementHtml, 1) 15161 * .then(function(state) { 15162 * console.log(state.totalShow === 2); // true 15163 * console.log(state.show[1].outerHTML === newElementHtml); // true 15164 * }); 15165 * 15166 * @example <caption>Example 3: Inserting multiple elements via reference</caption> 15167 * 15168 * console.log(mixer.getState().totalShow); // 2 15169 * 15170 * // Create an array of new elements to insert. 15171 * 15172 * var newElement1 = document.createElement('div'); 15173 * var newElement2 = document.createElement('div'); 15174 * 15175 * newElement1.classList.add('mix'); 15176 * newElement2.classList.add('mix'); 15177 * 15178 * var newElementsCollection = [newElement1, newElement2]; 15179 * 15180 * // Insert the new elements starting at index 1 15181 * 15182 * mixer.insert(newElementsCollection, 1) 15183 * .then(function(state) { 15184 * console.log(state.totalShow === 4); // true 15185 * console.log(state.show[1] === newElement1); // true 15186 * console.log(state.show[2] === newElement2); // true 15187 * }); 15188 * 15189 * @example <caption>Example 4: Inserting a jQuery collection object containing one or more elements</caption> 15190 * 15191 * console.log(mixer.getState().totalShow); // 4 15192 * 15193 * var $newElement = $('<div class="mix"></div>'); 15194 * 15195 * // Insert the new elements starting at index 3 15196 * 15197 * mixer.insert($newElement, 3) 15198 * .then(function(state) { 15199 * console.log(state.totalShow === 5); // true 15200 * console.log(state.show[3] === $newElement[0]); // true 15201 * }); 15202 * 15203 * @public 15204 * @instance 15205 * @since 2.0.0 15206 * @param {(HTMLElement|Array.<HTMLElement>|string)} newElements 15207 * A reference to a single element to insert, an array-like collection of elements, or an HTML string representing a single element. 15208 * @param {number} index=0 15209 * The index at which to insert the new element(s). `0` by default. 15210 * @param {boolean} [animate=true] 15211 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 15212 * @param {function} [callback=null] 15213 * An optional callback function to be invoked after the operation has completed. 15214 * @return {Promise.<mixitup.State>} 15215 * A promise resolving with the current state object. 15216 */ 15217 15218 insert: function() { 15219 var self = this, 15220 args = self.parseInsertArgs(arguments); 15221 15222 return self.multimix({ 15223 insert: args.command 15224 }, args.animate, args.callback); 15225 }, 15226 15227 /** 15228 * Inserts one or more new elements before a provided reference element. 15229 * 15230 * @example 15231 * 15232 * .insertBefore(newElements, referenceElement [, animate] [, callback]) 15233 * 15234 * @example <caption>Example: Inserting a new element before a reference element</caption> 15235 * 15236 * // An existing reference element is chosen at index 2 15237 * 15238 * var referenceElement = mixer.getState().show[2]; 15239 * 15240 * // Create a new element 15241 * 15242 * var newElement = document.createElement('div'); 15243 * newElement.classList.add('mix'); 15244 * 15245 * mixer.insertBefore(newElement, referenceElement) 15246 * .then(function(state) { 15247 * // The new element is inserted into the container at index 2, before the reference element 15248 * 15249 * console.log(state.show[2] === newElement); // true 15250 * 15251 * // The reference element is now at index 3 15252 * 15253 * console.log(state.show[3] === referenceElement); // true 15254 * }); 15255 * 15256 * @public 15257 * @instance 15258 * @since 3.0.0 15259 * @param {(HTMLElement|Array.<HTMLElement>|string)} newElements 15260 * A reference to a single element to insert, an array-like collection of elements, or an HTML string representing a single element. 15261 * @param {HTMLElement} referenceElement 15262 * A reference to an existing element in the container to insert new elements before. 15263 *@param {boolean} [animate=true] 15264 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 15265 * @param {function} [callback=null] 15266 * An optional callback function to be invoked after the operation has completed. 15267 * @return {Promise.<mixitup.State>} 15268 * A promise resolving with the current state object. 15269 */ 15270 15271 insertBefore: function() { 15272 var self = this, 15273 args = self.parseInsertArgs(arguments); 15274 15275 return self.insert(args.command.collection, 'before', args.command.sibling, args.animate, args.callback); 15276 }, 15277 15278 /** 15279 * Inserts one or more new elements after a provided reference element. 15280 * 15281 * @example 15282 * 15283 * .insertAfter(newElements, referenceElement [, animate] [, callback]) 15284 * 15285 * @example <caption>Example: Inserting a new element after a reference element</caption> 15286 * 15287 * // An existing reference element is chosen at index 2 15288 * 15289 * var referenceElement = mixer.getState().show[2]; 15290 * 15291 * // Create a new element 15292 * 15293 * var newElement = document.createElement('div'); 15294 * newElement.classList.add('mix'); 15295 * 15296 * mixer.insertAfter(newElement, referenceElement) 15297 * .then(function(state) { 15298 * // The new element is inserted into the container at index 3, after the reference element 15299 * 15300 * console.log(state.show[3] === newElement); // true 15301 * }); 15302 * 15303 * @public 15304 * @instance 15305 * @since 3.0.0 15306 * @param {(HTMLElement|Array.<HTMLElement>|string)} newElements 15307 * A reference to a single element to insert, an array-like collection of elements, or an HTML string representing a single element. 15308 * @param {HTMLElement} referenceElement 15309 * A reference to an existing element in the container to insert new elements after. 15310 * @param {boolean} [animate=true] 15311 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 15312 * @param {function} [callback=null] 15313 * An optional callback function to be invoked after the operation has completed. 15314 * @return {Promise.<mixitup.State>} 15315 * A promise resolving with the current state object. 15316 */ 15317 15318 insertAfter: function() { 15319 var self = this, 15320 args = self.parseInsertArgs(arguments); 15321 15322 return self.insert(args.command.collection, 'after', args.command.sibling, args.animate, args.callback); 15323 }, 15324 15325 /** 15326 * Inserts one or more new elements into the container before all existing targets. 15327 * 15328 * @example 15329 * 15330 * .prepend(newElements [,animate] [,callback]) 15331 * 15332 * @example <caption>Example: Prepending a new element</caption> 15333 * 15334 * // Create a new element 15335 * 15336 * var newElement = document.createElement('div'); 15337 * newElement.classList.add('mix'); 15338 * 15339 * // Insert the element into the container 15340 * 15341 * mixer.prepend(newElement) 15342 * .then(function(state) { 15343 * console.log(state.show[0] === newElement); // true 15344 * }); 15345 * 15346 * @public 15347 * @instance 15348 * @since 3.0.0 15349 * @param {(HTMLElement|Array.<HTMLElement>|string)} newElements 15350 * A reference to a single element to insert, an array-like collection of elements, or an HTML string representing a single element. 15351 * @param {boolean} [animate=true] 15352 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 15353 * @param {function} [callback=null] 15354 * An optional callback function to be invoked after the operation has completed. 15355 * @return {Promise.<mixitup.State>} 15356 * A promise resolving with the current state object. 15357 */ 15358 15359 prepend: function() { 15360 var self = this, 15361 args = self.parseInsertArgs(arguments); 15362 15363 return self.insert(0, args.command.collection, args.animate, args.callback); 15364 }, 15365 15366 /** 15367 * Inserts one or more new elements into the container after all existing targets. 15368 * 15369 * @example 15370 * 15371 * .append(newElements [,animate] [,callback]) 15372 * 15373 * @example <caption>Example: Appending a new element</caption> 15374 * 15375 * // Create a new element 15376 * 15377 * var newElement = document.createElement('div'); 15378 * newElement.classList.add('mix'); 15379 * 15380 * // Insert the element into the container 15381 * 15382 * mixer.append(newElement) 15383 * .then(function(state) { 15384 * console.log(state.show[state.show.length - 1] === newElement); // true 15385 * }); 15386 * 15387 * @public 15388 * @instance 15389 * @since 3.0.0 15390 * @param {(HTMLElement|Array.<HTMLElement>|string)} newElements 15391 * A reference to a single element to insert, an array-like collection of elements, or an HTML string representing a single element. 15392 * @param {boolean} [animate=true] 15393 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 15394 * @param {function} [callback=null] 15395 * An optional callback function to be invoked after the operation has completed. 15396 * @return {Promise.<mixitup.State>} 15397 * A promise resolving with the current state object. 15398 */ 15399 15400 append: function() { 15401 var self = this, 15402 args = self.parseInsertArgs(arguments); 15403 15404 return self.insert(self.state.totalTargets, args.command.collection, args.animate, args.callback); 15405 }, 15406 15407 /** 15408 * Removes one or more existing target elements from the container. 15409 * 15410 * @example 15411 * 15412 * .remove(elements [, animate] [, callback]) 15413 * 15414 * @example <caption>Example 1: Removing an element by reference</caption> 15415 * 15416 * var elementToRemove = containerEl.firstElementChild; 15417 * 15418 * mixer.remove(elementToRemove) 15419 * .then(function(state) { 15420 * console.log(state.targets.indexOf(elementToRemove) === -1); // true 15421 * }); 15422 * 15423 * @example <caption>Example 2: Removing a collection of elements by reference</caption> 15424 * 15425 * var elementsToRemove = containerEl.querySelectorAll('.category-a'); 15426 * 15427 * console.log(elementsToRemove.length) // 3 15428 * 15429 * mixer.remove(elementsToRemove) 15430 * .then(function() { 15431 * console.log(containerEl.querySelectorAll('.category-a').length); // 0 15432 * }); 15433 * 15434 * @example <caption>Example 3: Removing one or more elements by selector</caption> 15435 * 15436 * mixer.remove('.category-a') 15437 * .then(function() { 15438 * console.log(containerEl.querySelectorAll('.category-a').length); // 0 15439 * }); 15440 * 15441 * @example <caption>Example 4: Removing an element by index</caption> 15442 * 15443 * console.log(mixer.getState.totalShow); // 4 15444 * 15445 * // Remove the element at index 3 15446 * 15447 * mixer.remove(3) 15448 * .then(function(state) { 15449 * console.log(state.totalShow); // 3 15450 * console.log(state.show[3]); // undefined 15451 * }); 15452 * 15453 * 15454 * @public 15455 * @instance 15456 * @since 3.0.0 15457 * @param {(HTMLElement|Array.<HTMLElement>|string|number)} elements 15458 * A reference to a single element to remove, an array-like collection of elements, a selector string, or the index of an element to remove. 15459 * @param {boolean} [animate=true] 15460 * An optional boolean dictating whether the operation should animate, or occur syncronously with no animation. `true` by default. 15461 * @param {function} [callback=null] 15462 * An optional callback function to be invoked after the operation has completed. 15463 * @return {Promise.<mixitup.State>} 15464 * A promise resolving with the current state object. 15465 */ 15466 15467 remove: function() { 15468 var self = this, 15469 args = self.parseRemoveArgs(arguments); 15470 15471 return self.multimix({ 15472 remove: args.command 15473 }, args.animate, args.callback); 15474 }, 15475 15476 /** 15477 * Retrieves the the value of any property or sub-object within the current 15478 * mixitup configuration, or the whole configuration object. 15479 * 15480 * @example 15481 * 15482 * .getConfig([stringKey]) 15483 * 15484 * @example <caption>Example 1: retrieve the entire configuration object</caption> 15485 * 15486 * var config = mixer.getConfig(); // Config { ... } 15487 * 15488 * @example <caption>Example 2: retrieve a named sub-object of configuration object</caption> 15489 * 15490 * var animation = mixer.getConfig('animation'); // ConfigAnimation { ... } 15491 * 15492 * @example <caption>Example 3: retrieve a value of configuration object via a dot-notation string key</caption> 15493 * 15494 * var effects = mixer.getConfig('animation.effects'); // 'fade scale' 15495 * 15496 * @public 15497 * @instance 15498 * @since 2.0.0 15499 * @param {string} [stringKey] A "dot-notation" string key 15500 * @return {*} 15501 */ 15502 15503 getConfig: function(stringKey) { 15504 var self = this, 15505 value = null; 15506 15507 if (!stringKey) { 15508 value = self.config; 15509 } else { 15510 value = h.getProperty(self.config, stringKey); 15511 } 15512 15513 return self.callFilters('valueGetConfig', value, arguments); 15514 }, 15515 15516 /** 15517 * Updates the configuration of the mixer, after it has been instantiated. 15518 * 15519 * See the Configuration Object documentation for a full list of avilable 15520 * configuration options. 15521 * 15522 * @example 15523 * 15524 * .configure(config) 15525 * 15526 * @example <caption>Example 1: Updating animation options</caption> 15527 * 15528 * mixer.configure({ 15529 * animation: { 15530 * effects: 'fade translateX(-100%)', 15531 * duration: 300 15532 * } 15533 * }); 15534 * 15535 * @example <caption>Example 2: Removing a callback after it has been set</caption> 15536 * 15537 * var mixer; 15538 * 15539 * function handleMixEndOnce() { 15540 * // Do something .. 15541 * 15542 * // Then nullify the callback 15543 * 15544 * mixer.configure({ 15545 * callbacks: { 15546 * onMixEnd: null 15547 * } 15548 * }); 15549 * }; 15550 * 15551 * // Instantiate a mixer with a callback defined 15552 * 15553 * mixer = mixitup(containerEl, { 15554 * callbacks: { 15555 * onMixEnd: handleMixEndOnce 15556 * } 15557 * }); 15558 * 15559 * @public 15560 * @instance 15561 * @since 3.0.0 15562 * @param {object} config 15563 * An object containing one of more configuration options. 15564 * @return {void} 15565 */ 15566 15567 configure: function(config) { 15568 var self = this; 15569 15570 self.callActions('beforeConfigure', arguments); 15571 15572 h.extend(self.config, config, true, true); 15573 15574 self.callActions('afterConfigure', arguments); 15575 }, 15576 15577 /** 15578 * Returns an object containing information about the current state of the 15579 * mixer. See the State Object documentation for more information. 15580 * 15581 * NB: State objects are immutable and should therefore be regenerated 15582 * after any operation. 15583 * 15584 * @example 15585 * 15586 * .getState(); 15587 * 15588 * @example <caption>Example: Retrieving a state object</caption> 15589 * 15590 * var state = mixer.getState(); 15591 * 15592 * console.log(state.totalShow + 'targets are currently shown'); 15593 * 15594 * @public 15595 * @instance 15596 * @since 2.0.0 15597 * @return {mixitup.State} An object reflecting the current state of the mixer. 15598 */ 15599 15600 getState: function() { 15601 var self = this, 15602 state = null; 15603 15604 state = new mixitup.State(); 15605 15606 h.extend(state, self.state); 15607 15608 h.freeze(state); 15609 15610 return self.callFilters('stateGetState', state, arguments); 15611 }, 15612 15613 /** 15614 * Forces the re-indexing all targets within the container. 15615 * 15616 * This should only be used if some other piece of code in your application 15617 * has manipulated the contents of your container, which should be avoided. 15618 * 15619 * If you need to add or remove target elements from the container, use 15620 * the built-in `.insert()` or `.remove()` methods, and MixItUp will keep 15621 * itself up to date. 15622 * 15623 * @example 15624 * 15625 * .forceRefresh() 15626 * 15627 * @example <caption>Example: Force refreshing the mixer after external DOM manipulation</caption> 15628 * 15629 * console.log(mixer.getState().totalShow); // 3 15630 * 15631 * // An element is removed from the container via some external DOM manipulation code: 15632 * 15633 * containerEl.removeChild(containerEl.firstElementChild); 15634 * 15635 * // The mixer does not know that the number of targets has changed: 15636 * 15637 * console.log(mixer.getState().totalShow); // 3 15638 * 15639 * mixer.forceRefresh(); 15640 * 15641 * // After forceRefresh, the mixer is in sync again: 15642 * 15643 * console.log(mixer.getState().totalShow); // 2 15644 * 15645 * @public 15646 * @instance 15647 * @since 2.1.2 15648 * @return {void} 15649 */ 15650 15651 forceRefresh: function() { 15652 var self = this; 15653 15654 self.indexTargets(); 15655 }, 15656 15657 /** 15658 * Forces the re-rendering of all targets when using the Dataset API. 15659 * 15660 * By default, targets are only re-rendered when `data.dirtyCheck` is 15661 * enabled, and an item's data has changed when `dataset()` is called. 15662 * 15663 * The `forceRender()` method allows for the re-rendering of all targets 15664 * in response to some arbitrary event, such as the changing of the target 15665 * render function. 15666 * 15667 * Targets are rendered against their existing data. 15668 * 15669 * @example 15670 * 15671 * .forceRender() 15672 * 15673 * @example <caption>Example: Force render targets after changing the target render function</caption> 15674 * 15675 * console.log(container.innerHTML); // ... <span class="mix">Foo</span> ... 15676 * 15677 * mixer.configure({ 15678 * render: { 15679 * target: (item) => `<a href="/${item.slug}/" class="mix">${item.title}</a>` 15680 * } 15681 * }); 15682 * 15683 * mixer.forceRender(); 15684 * 15685 * console.log(container.innerHTML); // ... <a href="/foo/" class="mix">Foo</a> ... 15686 * 15687 * @public 15688 * @instance 15689 * @since 3.2.1 15690 * @return {void} 15691 */ 15692 15693 forceRender: function() { 15694 var self = this, 15695 target = null, 15696 el = null, 15697 id = ''; 15698 15699 for (id in self.cache) { 15700 target = self.cache[id]; 15701 15702 el = target.render(target.data); 15703 15704 if (el !== target.dom.el) { 15705 // Update target element reference 15706 15707 if (target.isInDom) { 15708 target.unbindEvents(); 15709 15710 self.dom.parent.replaceChild(el, target.dom.el); 15711 } 15712 15713 if (!target.isShown) { 15714 el.style.display = 'none'; 15715 } 15716 15717 target.dom.el = el; 15718 15719 if (target.isInDom) { 15720 target.bindEvents(); 15721 } 15722 } 15723 } 15724 15725 self.state = self.buildState(self.lastOperation); 15726 }, 15727 15728 /** 15729 * Removes mixitup functionality from the container, unbinds all control 15730 * event handlers, and deletes the mixer instance from MixItUp's internal 15731 * cache. 15732 * 15733 * This should be performed whenever a mixer's container is removed from 15734 * the DOM, such as during a page change in a single page application, 15735 * or React's `componentWillUnmount()`. 15736 * 15737 * @example 15738 * 15739 * .destroy([cleanUp]) 15740 * 15741 * @example <caption>Example: Destroying the mixer before removing its container element</caption> 15742 * 15743 * mixer.destroy(); 15744 * 15745 * containerEl.parentElement.removeChild(containerEl); 15746 * 15747 * @public 15748 * @instance 15749 * @since 2.0.0 15750 * @param {boolean} [cleanUp=false] 15751 * An optional boolean dictating whether or not to clean up any inline `display: none;` styling applied to hidden targets. 15752 * @return {void} 15753 */ 15754 15755 destroy: function(cleanUp) { 15756 var self = this, 15757 control = null, 15758 target = null, 15759 i = 0; 15760 15761 self.callActions('beforeDestroy', arguments); 15762 15763 for (i = 0; control = self.controls[i]; i++) { 15764 control.removeBinding(self); 15765 } 15766 15767 for (i = 0; target = self.targets[i]; i++) { 15768 if (cleanUp) { 15769 target.show(); 15770 } 15771 15772 target.unbindEvents(); 15773 } 15774 15775 if (self.dom.container.id.match(/^MixItUp/)) { 15776 self.dom.container.removeAttribute('id'); 15777 } 15778 15779 delete mixitup.instances[self.id]; 15780 15781 self.callActions('afterDestroy', arguments); 15782 } 15783 }); 15784 15785 /** 15786 * @constructor 15787 * @memberof mixitup 15788 * @private 15789 * @since 3.0.0 15790 */ 15791 15792 mixitup.IMoveData = function() { 15793 mixitup.Base.call(this); 15794 15795 this.callActions('beforeConstruct'); 15796 15797 this.posIn = null; 15798 this.posOut = null; 15799 this.operation = null; 15800 this.callback = null; 15801 this.statusChange = ''; 15802 this.duration = -1; 15803 this.staggerIndex = -1; 15804 15805 this.callActions('afterConstruct'); 15806 15807 h.seal(this); 15808 }; 15809 15810 mixitup.BaseStatic.call(mixitup.IMoveData); 15811 15812 mixitup.IMoveData.prototype = Object.create(mixitup.Base.prototype); 15813 15814 mixitup.IMoveData.prototype.constructor = mixitup.IMoveData; 15815 15816 /** 15817 * @constructor 15818 * @memberof mixitup 15819 * @private 15820 * @since 3.0.0 15821 */ 15822 15823 mixitup.TargetDom = function() { 15824 mixitup.Base.call(this); 15825 15826 this.callActions('beforeConstruct'); 15827 15828 this.el = null; 15829 15830 this.callActions('afterConstruct'); 15831 15832 h.seal(this); 15833 }; 15834 15835 mixitup.BaseStatic.call(mixitup.TargetDom); 15836 15837 mixitup.TargetDom.prototype = Object.create(mixitup.Base.prototype); 15838 15839 mixitup.TargetDom.prototype.constructor = mixitup.TargetDom; 15840 15841 /** 15842 * @constructor 15843 * @namespace 15844 * @memberof mixitup 15845 * @private 15846 * @since 3.0.0 15847 */ 15848 15849 mixitup.Target = function() { 15850 mixitup.Base.call(this); 15851 15852 this.callActions('beforeConstruct'); 15853 15854 this.id = ''; 15855 this.sortString = ''; 15856 this.mixer = null; 15857 this.callback = null; 15858 this.isShown = false; 15859 this.isBound = false; 15860 this.isExcluded = false; 15861 this.isInDom = false; 15862 this.handler = null; 15863 this.operation = null; 15864 this.data = null; 15865 this.dom = new mixitup.TargetDom(); 15866 15867 this.callActions('afterConstruct'); 15868 15869 h.seal(this); 15870 }; 15871 15872 mixitup.BaseStatic.call(mixitup.Target); 15873 15874 mixitup.Target.prototype = Object.create(mixitup.Base.prototype); 15875 15876 h.extend(mixitup.Target.prototype, { 15877 constructor: mixitup.Target, 15878 15879 /** 15880 * Initialises a newly instantiated Target. 15881 * 15882 * @private 15883 * @instance 15884 * @since 3.0.0 15885 * @param {(Element|null)} el 15886 * @param {object} mixer 15887 * @param {object} [data] 15888 * @return {void} 15889 */ 15890 15891 init: function(el, mixer, data) { 15892 var self = this, 15893 id = ''; 15894 15895 self.callActions('beforeInit', arguments); 15896 15897 self.mixer = mixer; 15898 15899 if (!el) { 15900 // If no element is provided, render it 15901 15902 el = self.render(data); 15903 } 15904 15905 self.cacheDom(el); 15906 15907 self.bindEvents(); 15908 15909 if (self.dom.el.style.display !== 'none') { 15910 self.isShown = true; 15911 } 15912 15913 if (data && mixer.config.data.uidKey) { 15914 if (typeof (id = data[mixer.config.data.uidKey]) === 'undefined' || id.toString().length < 1) { 15915 throw new TypeError(mixitup.messages.errorDatasetInvalidUidKey({ 15916 uidKey: mixer.config.data.uidKey 15917 })); 15918 } 15919 15920 self.id = id; 15921 self.data = data; 15922 15923 mixer.cache[id] = self; 15924 } 15925 15926 self.callActions('afterInit', arguments); 15927 }, 15928 15929 /** 15930 * Renders the target element using a user-defined renderer function. 15931 * 15932 * @private 15933 * @instance 15934 * @since 3.1.4 15935 * @param {object} data 15936 * @return {void} 15937 */ 15938 15939 render: function(data) { 15940 var self = this, 15941 render = null, 15942 el = null, 15943 temp = null, 15944 output = ''; 15945 15946 self.callActions('beforeRender', arguments); 15947 15948 render = self.callFilters('renderRender', self.mixer.config.render.target, arguments); 15949 15950 if (typeof render !== 'function') { 15951 throw new TypeError(mixitup.messages.errorDatasetRendererNotSet()); 15952 } 15953 15954 output = render(data); 15955 15956 if (output && typeof output === 'object' && h.isElement(output)) { 15957 el = output; 15958 } else if (typeof output === 'string') { 15959 temp = document.createElement('div'); 15960 temp.innerHTML = output; 15961 15962 el = temp.firstElementChild; 15963 } 15964 15965 return self.callFilters('elRender', el, arguments); 15966 }, 15967 15968 /** 15969 * Caches references of DOM elements neccessary for the target's functionality. 15970 * 15971 * @private 15972 * @instance 15973 * @since 3.0.0 15974 * @param {Element} el 15975 * @return {void} 15976 */ 15977 15978 cacheDom: function(el) { 15979 var self = this; 15980 15981 self.callActions('beforeCacheDom', arguments); 15982 15983 self.dom.el = el; 15984 15985 self.callActions('afterCacheDom', arguments); 15986 }, 15987 15988 /** 15989 * @private 15990 * @instance 15991 * @since 3.0.0 15992 * @param {string} attributeName 15993 * @return {void} 15994 */ 15995 15996 getSortString: function(attributeName) { 15997 var self = this, 15998 value = self.dom.el.getAttribute('data-' + attributeName) || ''; 15999 16000 self.callActions('beforeGetSortString', arguments); 16001 16002 value = isNaN(value * 1) ? 16003 value.toLowerCase() : 16004 value * 1; 16005 16006 self.sortString = value; 16007 16008 self.callActions('afterGetSortString', arguments); 16009 }, 16010 16011 /** 16012 * @private 16013 * @instance 16014 * @since 3.0.0 16015 * @return {void} 16016 */ 16017 16018 show: function() { 16019 var self = this; 16020 16021 self.callActions('beforeShow', arguments); 16022 16023 if (!self.isShown) { 16024 self.dom.el.style.display = ''; 16025 16026 self.isShown = true; 16027 } 16028 16029 self.callActions('afterShow', arguments); 16030 }, 16031 16032 /** 16033 * @private 16034 * @instance 16035 * @since 3.0.0 16036 * @return {void} 16037 */ 16038 16039 hide: function() { 16040 var self = this; 16041 16042 self.callActions('beforeHide', arguments); 16043 16044 if (self.isShown) { 16045 self.dom.el.style.display = 'none'; 16046 16047 self.isShown = false; 16048 } 16049 16050 self.callActions('afterHide', arguments); 16051 }, 16052 16053 /** 16054 * @private 16055 * @instance 16056 * @since 3.0.0 16057 * @param {mixitup.IMoveData} moveData 16058 * @return {void} 16059 */ 16060 16061 move: function(moveData) { 16062 var self = this; 16063 16064 self.callActions('beforeMove', arguments); 16065 16066 if (!self.isExcluded) { 16067 self.mixer.targetsMoved++; 16068 } 16069 16070 self.applyStylesIn(moveData); 16071 16072 requestAnimationFrame(function() { 16073 self.applyStylesOut(moveData); 16074 }); 16075 16076 self.callActions('afterMove', arguments); 16077 }, 16078 16079 /** 16080 * @private 16081 * @instance 16082 * @since 3.0.0 16083 * @param {object} posData 16084 * @param {number} multiplier 16085 * @return {void} 16086 */ 16087 16088 applyTween: function(posData, multiplier) { 16089 var self = this, 16090 propertyName = '', 16091 tweenData = null, 16092 posIn = posData.posIn, 16093 currentTransformValues = [], 16094 currentValues = new mixitup.StyleData(), 16095 i = -1; 16096 16097 self.callActions('beforeApplyTween', arguments); 16098 16099 currentValues.x = posIn.x; 16100 currentValues.y = posIn.y; 16101 16102 if (multiplier === 0) { 16103 self.hide(); 16104 } else if (!self.isShown) { 16105 self.show(); 16106 } 16107 16108 for (i = 0; propertyName = mixitup.features.TWEENABLE[i]; i++) { 16109 tweenData = posData.tweenData[propertyName]; 16110 16111 if (propertyName === 'x') { 16112 if (!tweenData) continue; 16113 16114 currentValues.x = posIn.x + (tweenData * multiplier); 16115 } else if (propertyName === 'y') { 16116 if (!tweenData) continue; 16117 16118 currentValues.y = posIn.y + (tweenData * multiplier); 16119 } else if (tweenData instanceof mixitup.TransformData) { 16120 if (!tweenData.value) continue; 16121 16122 currentValues[propertyName].value = 16123 posIn[propertyName].value + (tweenData.value * multiplier); 16124 16125 currentValues[propertyName].unit = tweenData.unit; 16126 16127 currentTransformValues.push( 16128 propertyName + '(' + currentValues[propertyName].value + tweenData.unit + ')' 16129 ); 16130 } else { 16131 if (!tweenData) continue; 16132 16133 currentValues[propertyName] = posIn[propertyName] + (tweenData * multiplier); 16134 16135 self.dom.el.style[propertyName] = currentValues[propertyName]; 16136 } 16137 } 16138 16139 if (currentValues.x || currentValues.y) { 16140 currentTransformValues.unshift('translate(' + currentValues.x + 'px, ' + currentValues.y + 'px)'); 16141 } 16142 16143 if (currentTransformValues.length) { 16144 self.dom.el.style[mixitup.features.transformProp] = currentTransformValues.join(' '); 16145 } 16146 16147 self.callActions('afterApplyTween', arguments); 16148 }, 16149 16150 /** 16151 * Applies the initial styling to a target element before any transition 16152 * is applied. 16153 * 16154 * @private 16155 * @instance 16156 * @param {mixitup.IMoveData} moveData 16157 * @return {void} 16158 */ 16159 16160 applyStylesIn: function(moveData) { 16161 var self = this, 16162 posIn = moveData.posIn, 16163 isFading = self.mixer.effectsIn.opacity !== 1, 16164 transformValues = []; 16165 16166 self.callActions('beforeApplyStylesIn', arguments); 16167 16168 transformValues.push('translate(' + posIn.x + 'px, ' + posIn.y + 'px)'); 16169 16170 if (self.mixer.config.animation.animateResizeTargets) { 16171 if (moveData.statusChange !== 'show') { 16172 // Don't apply posIn width or height or showing, as will be 0 16173 16174 self.dom.el.style.width = posIn.width + 'px'; 16175 self.dom.el.style.height = posIn.height + 'px'; 16176 } 16177 16178 self.dom.el.style.marginRight = posIn.marginRight + 'px'; 16179 self.dom.el.style.marginBottom = posIn.marginBottom + 'px'; 16180 } 16181 16182 isFading && (self.dom.el.style.opacity = posIn.opacity); 16183 16184 if (moveData.statusChange === 'show') { 16185 transformValues = transformValues.concat(self.mixer.transformIn); 16186 } 16187 16188 self.dom.el.style[mixitup.features.transformProp] = transformValues.join(' '); 16189 16190 self.callActions('afterApplyStylesIn', arguments); 16191 }, 16192 16193 /** 16194 * Applies a transition followed by the final styles for the element to 16195 * transition towards. 16196 * 16197 * @private 16198 * @instance 16199 * @param {mixitup.IMoveData} moveData 16200 * @return {void} 16201 */ 16202 16203 applyStylesOut: function(moveData) { 16204 var self = this, 16205 transitionRules = [], 16206 transformValues = [], 16207 isResizing = self.mixer.config.animation.animateResizeTargets, 16208 isFading = typeof self.mixer.effectsIn.opacity !== 'undefined'; 16209 16210 self.callActions('beforeApplyStylesOut', arguments); 16211 16212 // Build the transition rules 16213 16214 transitionRules.push(self.writeTransitionRule( 16215 mixitup.features.transformRule, 16216 moveData.staggerIndex 16217 )); 16218 16219 if (moveData.statusChange !== 'none') { 16220 transitionRules.push(self.writeTransitionRule( 16221 'opacity', 16222 moveData.staggerIndex, 16223 moveData.duration 16224 )); 16225 } 16226 16227 if (isResizing) { 16228 transitionRules.push(self.writeTransitionRule( 16229 'width', 16230 moveData.staggerIndex, 16231 moveData.duration 16232 )); 16233 16234 transitionRules.push(self.writeTransitionRule( 16235 'height', 16236 moveData.staggerIndex, 16237 moveData.duration 16238 )); 16239 16240 transitionRules.push(self.writeTransitionRule( 16241 'margin', 16242 moveData.staggerIndex, 16243 moveData.duration 16244 )); 16245 } 16246 16247 // If no callback was provided, the element will 16248 // not transition in any way so tag it as "immovable" 16249 16250 if (!moveData.callback) { 16251 self.mixer.targetsImmovable++; 16252 16253 if (self.mixer.targetsMoved === self.mixer.targetsImmovable) { 16254 // If the total targets moved is equal to the 16255 // number of immovable targets, the operation 16256 // should be considered finished 16257 16258 self.mixer.cleanUp(moveData.operation); 16259 } 16260 16261 return; 16262 } 16263 16264 // If the target will transition in some fasion, 16265 // assign a callback function 16266 16267 self.operation = moveData.operation; 16268 self.callback = moveData.callback; 16269 16270 // As long as the target is not excluded, increment 16271 // the total number of targets bound 16272 16273 !self.isExcluded && self.mixer.targetsBound++; 16274 16275 // Tag the target as bound to differentiate from transitionEnd 16276 // events that may come from stylesheet driven effects 16277 16278 self.isBound = true; 16279 16280 // Apply the transition 16281 16282 self.applyTransition(transitionRules); 16283 16284 // Apply width, height and margin negation 16285 16286 if (isResizing && moveData.posOut.width > 0 && moveData.posOut.height > 0) { 16287 self.dom.el.style.width = moveData.posOut.width + 'px'; 16288 self.dom.el.style.height = moveData.posOut.height + 'px'; 16289 self.dom.el.style.marginRight = moveData.posOut.marginRight + 'px'; 16290 self.dom.el.style.marginBottom = moveData.posOut.marginBottom + 'px'; 16291 } 16292 16293 if (!self.mixer.config.animation.nudge && moveData.statusChange === 'hide') { 16294 // If we're not nudging, the translation should be 16295 // applied before any other transforms to prevent 16296 // lateral movement 16297 16298 transformValues.push('translate(' + moveData.posOut.x + 'px, ' + moveData.posOut.y + 'px)'); 16299 } 16300 16301 // Apply fade 16302 16303 switch (moveData.statusChange) { 16304 case 'hide': 16305 isFading && (self.dom.el.style.opacity = self.mixer.effectsOut.opacity); 16306 16307 transformValues = transformValues.concat(self.mixer.transformOut); 16308 16309 break; 16310 case 'show': 16311 isFading && (self.dom.el.style.opacity = 1); 16312 } 16313 16314 if ( 16315 self.mixer.config.animation.nudge || 16316 (!self.mixer.config.animation.nudge && moveData.statusChange !== 'hide') 16317 ) { 16318 // Opposite of above - apply translate after 16319 // other transform 16320 16321 transformValues.push('translate(' + moveData.posOut.x + 'px, ' + moveData.posOut.y + 'px)'); 16322 } 16323 16324 // Apply transforms 16325 16326 self.dom.el.style[mixitup.features.transformProp] = transformValues.join(' '); 16327 16328 self.callActions('afterApplyStylesOut', arguments); 16329 }, 16330 16331 /** 16332 * Combines the name of a CSS property with the appropriate duration and delay 16333 * values to created a valid transition rule. 16334 * 16335 * @private 16336 * @instance 16337 * @since 3.0.0 16338 * @param {string} property 16339 * @param {number} staggerIndex 16340 * @param {number} duration 16341 * @return {string} 16342 */ 16343 16344 writeTransitionRule: function(property, staggerIndex, duration) { 16345 var self = this, 16346 delay = self.getDelay(staggerIndex), 16347 rule = ''; 16348 16349 rule = property + ' ' + 16350 (duration > 0 ? duration : self.mixer.config.animation.duration) + 'ms ' + 16351 delay + 'ms ' + 16352 (property === 'opacity' ? 'linear' : self.mixer.config.animation.easing); 16353 16354 return self.callFilters('ruleWriteTransitionRule', rule, arguments); 16355 }, 16356 16357 /** 16358 * Calculates the transition delay for each target element based on its index, if 16359 * staggering is applied. If defined, A custom `animation.staggerSeqeuence` 16360 * function can be used to manipulate the order of indices to produce custom 16361 * stagger effects (e.g. for use in a grid with irregular row lengths). 16362 * 16363 * @private 16364 * @instance 16365 * @since 2.0.0 16366 * @param {number} index 16367 * @return {number} 16368 */ 16369 16370 getDelay: function(index) { 16371 var self = this, 16372 delay = -1; 16373 16374 if (typeof self.mixer.config.animation.staggerSequence === 'function') { 16375 index = self.mixer.config.animation.staggerSequence.call(self, index, self.state); 16376 } 16377 16378 delay = !!self.mixer.staggerDuration ? index * self.mixer.staggerDuration : 0; 16379 16380 return self.callFilters('delayGetDelay', delay, arguments); 16381 }, 16382 16383 /** 16384 * @private 16385 * @instance 16386 * @since 3.0.0 16387 * @param {string[]} rules 16388 * @return {void} 16389 */ 16390 16391 applyTransition: function(rules) { 16392 var self = this, 16393 transitionString = rules.join(', '); 16394 16395 self.callActions('beforeApplyTransition', arguments); 16396 16397 self.dom.el.style[mixitup.features.transitionProp] = transitionString; 16398 16399 self.callActions('afterApplyTransition', arguments); 16400 }, 16401 16402 /** 16403 * @private 16404 * @instance 16405 * @since 3.0.0 16406 * @param {Event} e 16407 * @return {void} 16408 */ 16409 16410 handleTransitionEnd: function(e) { 16411 var self = this, 16412 propName = e.propertyName, 16413 canResize = self.mixer.config.animation.animateResizeTargets; 16414 16415 self.callActions('beforeHandleTransitionEnd', arguments); 16416 16417 if ( 16418 self.isBound && 16419 e.target.matches(self.mixer.config.selectors.target) && 16420 ( 16421 propName.indexOf('transform') > -1 || 16422 propName.indexOf('opacity') > -1 || 16423 canResize && propName.indexOf('height') > -1 || 16424 canResize && propName.indexOf('width') > -1 || 16425 canResize && propName.indexOf('margin') > -1 16426 ) 16427 ) { 16428 self.callback.call(self, self.operation); 16429 16430 self.isBound = false; 16431 self.callback = null; 16432 self.operation = null; 16433 } 16434 16435 self.callActions('afterHandleTransitionEnd', arguments); 16436 }, 16437 16438 /** 16439 * @private 16440 * @instance 16441 * @since 3.0.0 16442 * @param {Event} e 16443 * @return {void} 16444 */ 16445 16446 eventBus: function(e) { 16447 var self = this; 16448 16449 self.callActions('beforeEventBus', arguments); 16450 16451 switch (e.type) { 16452 case 'webkitTransitionEnd': 16453 case 'transitionend': 16454 self.handleTransitionEnd(e); 16455 } 16456 16457 self.callActions('afterEventBus', arguments); 16458 }, 16459 16460 /** 16461 * @private 16462 * @instance 16463 * @since 3.0.0 16464 * @return {void} 16465 */ 16466 16467 unbindEvents: function() { 16468 var self = this; 16469 16470 self.callActions('beforeUnbindEvents', arguments); 16471 16472 h.off(self.dom.el, 'webkitTransitionEnd', self.handler); 16473 h.off(self.dom.el, 'transitionend', self.handler); 16474 16475 self.callActions('afterUnbindEvents', arguments); 16476 }, 16477 16478 /** 16479 * @private 16480 * @instance 16481 * @since 3.0.0 16482 * @return {void} 16483 */ 16484 16485 bindEvents: function() { 16486 var self = this, 16487 transitionEndEvent = ''; 16488 16489 self.callActions('beforeBindEvents', arguments); 16490 16491 transitionEndEvent = mixitup.features.transitionPrefix === 'webkit' ? 'webkitTransitionEnd' : 'transitionend'; 16492 16493 self.handler = function(e) { 16494 return self.eventBus(e); 16495 }; 16496 16497 h.on(self.dom.el, transitionEndEvent, self.handler); 16498 16499 self.callActions('afterBindEvents', arguments); 16500 }, 16501 16502 /** 16503 * @private 16504 * @instance 16505 * @since 3.0.0 16506 * @param {boolean} [getBox] 16507 * @return {PosData} 16508 */ 16509 16510 getPosData: function(getBox) { 16511 var self = this, 16512 styles = {}, 16513 rect = null, 16514 posData = new mixitup.StyleData(); 16515 16516 self.callActions('beforeGetPosData', arguments); 16517 16518 posData.x = self.dom.el.offsetLeft; 16519 posData.y = self.dom.el.offsetTop; 16520 16521 if (self.mixer.config.animation.animateResizeTargets || getBox) { 16522 rect = self.dom.el.getBoundingClientRect(); 16523 16524 posData.top = rect.top; 16525 posData.right = rect.right; 16526 posData.bottom = rect.bottom; 16527 posData.left = rect.left; 16528 16529 posData.width = rect.width; 16530 posData.height = rect.height; 16531 } 16532 16533 if (self.mixer.config.animation.animateResizeTargets) { 16534 styles = window.getComputedStyle(self.dom.el); 16535 16536 posData.marginBottom = parseFloat(styles.marginBottom); 16537 posData.marginRight = parseFloat(styles.marginRight); 16538 } 16539 16540 return self.callFilters('posDataGetPosData', posData, arguments); 16541 }, 16542 16543 /** 16544 * @private 16545 * @instance 16546 * @since 3.0.0 16547 * @return {void} 16548 */ 16549 16550 cleanUp: function() { 16551 var self = this; 16552 16553 self.callActions('beforeCleanUp', arguments); 16554 16555 self.dom.el.style[mixitup.features.transformProp] = ''; 16556 self.dom.el.style[mixitup.features.transitionProp] = ''; 16557 self.dom.el.style.opacity = ''; 16558 16559 if (self.mixer.config.animation.animateResizeTargets) { 16560 self.dom.el.style.width = ''; 16561 self.dom.el.style.height = ''; 16562 self.dom.el.style.marginRight = ''; 16563 self.dom.el.style.marginBottom = ''; 16564 } 16565 16566 self.callActions('afterCleanUp', arguments); 16567 } 16568 }); 16569 16570 /** 16571 * A jQuery-collection-like wrapper around one or more `mixitup.Mixer` instances 16572 * allowing simultaneous control of said instances similar to the MixItUp 2 API. 16573 * 16574 * @example 16575 * new mixitup.Collection(instances) 16576 * 16577 * @constructor 16578 * @namespace 16579 * @memberof mixitup 16580 * @private 16581 * @since 3.0.0 16582 * @param {mixitup.Mixer[]} instances 16583 */ 16584 16585 mixitup.Collection = function(instances) { 16586 var instance = null, 16587 i = -1; 16588 16589 this.callActions('beforeConstruct'); 16590 16591 for (i = 0; instance = instances[i]; i++) { 16592 this[i] = instance; 16593 } 16594 16595 this.length = instances.length; 16596 16597 this.callActions('afterConstruct'); 16598 16599 h.freeze(this); 16600 }; 16601 16602 mixitup.BaseStatic.call(mixitup.Collection); 16603 16604 mixitup.Collection.prototype = Object.create(mixitup.Base.prototype); 16605 16606 h.extend(mixitup.Collection.prototype, 16607 /** @lends mixitup.Collection */ 16608 { 16609 constructor: mixitup.Collection, 16610 16611 /** 16612 * Calls a method on all instances in the collection by passing the method 16613 * name as a string followed by any applicable parameters to be curried into 16614 * to the method. 16615 * 16616 * @example 16617 * .mixitup(methodName[,arg1][,arg2..]); 16618 * 16619 * @example 16620 * var collection = new Collection([mixer1, mixer2]); 16621 * 16622 * return collection.mixitup('filter', '.category-a') 16623 * .then(function(states) { 16624 * state.forEach(function(state) { 16625 * console.log(state.activeFilter.selector); // .category-a 16626 * }); 16627 * }); 16628 * 16629 * @public 16630 * @instance 16631 * @since 3.0.0 16632 * @param {string} methodName 16633 * @return {Promise<Array<mixitup.State>>} 16634 */ 16635 16636 mixitup: function(methodName) { 16637 var self = this, 16638 instance = null, 16639 args = Array.prototype.slice.call(arguments), 16640 tasks = [], 16641 i = -1; 16642 16643 this.callActions('beforeMixitup'); 16644 16645 args.shift(); 16646 16647 for (i = 0; instance = self[i]; i++) { 16648 tasks.push(instance[methodName].apply(instance, args)); 16649 } 16650 16651 return self.callFilters('promiseMixitup', h.all(tasks, mixitup.libraries), arguments); 16652 } 16653 }); 16654 16655 /** 16656 * `mixitup.Operation` objects contain all data neccessary to describe the full 16657 * lifecycle of any MixItUp operation. They can be used to compute and store an 16658 * operation for use at a later time (e.g. programmatic tweening). 16659 * 16660 * @constructor 16661 * @namespace 16662 * @memberof mixitup 16663 * @private 16664 * @since 3.0.0 16665 */ 16666 16667 mixitup.Operation = function() { 16668 mixitup.Base.call(this); 16669 16670 this.callActions('beforeConstruct'); 16671 16672 this.id = ''; 16673 16674 this.args = []; 16675 this.command = null; 16676 this.showPosData = []; 16677 this.toHidePosData = []; 16678 16679 this.startState = null; 16680 this.newState = null; 16681 this.docState = null; 16682 16683 this.willSort = false; 16684 this.willChangeLayout = false; 16685 this.hasEffect = false; 16686 this.hasFailed = false; 16687 16688 this.triggerElement = null; 16689 16690 this.show = []; 16691 this.hide = []; 16692 this.matching = []; 16693 this.toShow = []; 16694 this.toHide = []; 16695 this.toMove = []; 16696 this.toRemove = []; 16697 this.startOrder = []; 16698 this.newOrder = []; 16699 this.startSort = null; 16700 this.newSort = null; 16701 this.startFilter = null; 16702 this.newFilter = null; 16703 this.startDataset = null; 16704 this.newDataset = null; 16705 this.viewportDeltaX = 0; 16706 this.viewportDeltaY = 0; 16707 this.startX = 0; 16708 this.startY = 0; 16709 this.startHeight = 0; 16710 this.startWidth = 0; 16711 this.newX = 0; 16712 this.newY = 0; 16713 this.newHeight = 0; 16714 this.newWidth = 0; 16715 this.startContainerClassName = ''; 16716 this.startDisplay = ''; 16717 this.newContainerClassName = ''; 16718 this.newDisplay = ''; 16719 16720 this.callActions('afterConstruct'); 16721 16722 h.seal(this); 16723 }; 16724 16725 mixitup.BaseStatic.call(mixitup.Operation); 16726 16727 mixitup.Operation.prototype = Object.create(mixitup.Base.prototype); 16728 16729 mixitup.Operation.prototype.constructor = mixitup.Operation; 16730 16731 /** 16732 * `mixitup.State` objects expose various pieces of data detailing the state of 16733 * a MixItUp instance. They are provided at the start and end of any operation via 16734 * callbacks and events, with the most recent state stored between operations 16735 * for retrieval at any time via the API. 16736 * 16737 * @constructor 16738 * @namespace 16739 * @memberof mixitup 16740 * @public 16741 * @since 3.0.0 16742 */ 16743 16744 mixitup.State = function() { 16745 mixitup.Base.call(this); 16746 16747 this.callActions('beforeConstruct'); 16748 16749 /** 16750 * The ID of the mixer instance. 16751 * 16752 * @name id 16753 * @memberof mixitup.State 16754 * @instance 16755 * @type {string} 16756 * @default '' 16757 */ 16758 16759 this.id = ''; 16760 16761 /** 16762 * The currently active filter command as set by a control click or API call. 16763 * 16764 * @name activeFilter 16765 * @memberof mixitup.State 16766 * @instance 16767 * @type {mixitup.CommandFilter} 16768 * @default null 16769 */ 16770 16771 this.activeFilter = null; 16772 16773 /** 16774 * The currently active sort command as set by a control click or API call. 16775 * 16776 * @name activeSort 16777 * @memberof mixitup.State 16778 * @instance 16779 * @type {mixitup.CommandSort} 16780 * @default null 16781 */ 16782 16783 this.activeSort = null; 16784 16785 /** 16786 * The current layout-specific container class name, if applied. 16787 * 16788 * @name activeContainerClassName 16789 * @memberof mixitup.State 16790 * @instance 16791 * @type {string} 16792 * @default '' 16793 */ 16794 16795 this.activeContainerClassName = ''; 16796 16797 /** 16798 * A reference to the container element that the mixer is instantiated on. 16799 * 16800 * @name container 16801 * @memberof mixitup.State 16802 * @instance 16803 * @type {Element} 16804 * @default null 16805 */ 16806 16807 this.container = null; 16808 16809 /** 16810 * An array of all target elements indexed by the mixer. 16811 * 16812 * @name targets 16813 * @memberof mixitup.State 16814 * @instance 16815 * @type {Array.<Element>} 16816 * @default [] 16817 */ 16818 16819 this.targets = []; 16820 16821 /** 16822 * An array of all target elements not matching the current filter. 16823 * 16824 * @name hide 16825 * @memberof mixitup.State 16826 * @instance 16827 * @type {Array.<Element>} 16828 * @default [] 16829 */ 16830 16831 this.hide = []; 16832 16833 /** 16834 * An array of all target elements matching the current filter and any additional 16835 * limits applied such as pagination. 16836 * 16837 * @name show 16838 * @memberof mixitup.State 16839 * @instance 16840 * @type {Array.<Element>} 16841 * @default [] 16842 */ 16843 16844 this.show = []; 16845 16846 /** 16847 * An array of all target elements matching the current filter irrespective of 16848 * any additional limits applied such as pagination. 16849 * 16850 * @name matching 16851 * @memberof mixitup.State 16852 * @instance 16853 * @type {Array.<Element>} 16854 * @default [] 16855 */ 16856 16857 this.matching = []; 16858 16859 /** 16860 * An integer representing the total number of target elements indexed by the 16861 * mixer. Equivalent to `state.targets.length`. 16862 * 16863 * @name totalTargets 16864 * @memberof mixitup.State 16865 * @instance 16866 * @type {number} 16867 * @default -1 16868 */ 16869 16870 this.totalTargets = -1; 16871 16872 /** 16873 * An integer representing the total number of target elements matching the 16874 * current filter and any additional limits applied such as pagination. 16875 * Equivalent to `state.show.length`. 16876 * 16877 * @name totalShow 16878 * @memberof mixitup.State 16879 * @instance 16880 * @type {number} 16881 * @default -1 16882 */ 16883 16884 this.totalShow = -1; 16885 16886 /** 16887 * An integer representing the total number of target elements not matching 16888 * the current filter. Equivalent to `state.hide.length`. 16889 * 16890 * @name totalHide 16891 * @memberof mixitup.State 16892 * @instance 16893 * @type {number} 16894 * @default -1 16895 */ 16896 16897 this.totalHide = -1; 16898 16899 /** 16900 * An integer representing the total number of target elements matching the 16901 * current filter irrespective of any other limits applied such as pagination. 16902 * Equivalent to `state.matching.length`. 16903 * 16904 * @name totalMatching 16905 * @memberof mixitup.State 16906 * @instance 16907 * @type {number} 16908 * @default -1 16909 */ 16910 16911 this.totalMatching = -1; 16912 16913 /** 16914 * A boolean indicating whether the last operation "failed", i.e. no targets 16915 * could be found matching the filter. 16916 * 16917 * @name hasFailed 16918 * @memberof mixitup.State 16919 * @instance 16920 * @type {boolean} 16921 * @default false 16922 */ 16923 16924 this.hasFailed = false; 16925 16926 /** 16927 * The DOM element that was clicked if the last operation was triggered by the 16928 * clicking of a control and not an API call. 16929 * 16930 * @name triggerElement 16931 * @memberof mixitup.State 16932 * @instance 16933 * @type {Element|null} 16934 * @default null 16935 */ 16936 16937 this.triggerElement = null; 16938 16939 /** 16940 * The currently active dataset underlying the rendered targets, if the 16941 * dataset API is in use. 16942 * 16943 * @name activeDataset 16944 * @memberof mixitup.State 16945 * @instance 16946 * @type {Array.<object>} 16947 * @default null 16948 */ 16949 16950 this.activeDataset = null; 16951 16952 this.callActions('afterConstruct'); 16953 16954 h.seal(this); 16955 }; 16956 16957 mixitup.BaseStatic.call(mixitup.State); 16958 16959 mixitup.State.prototype = Object.create(mixitup.Base.prototype); 16960 16961 mixitup.State.prototype.constructor = mixitup.State; 16962 16963 /** 16964 * @constructor 16965 * @memberof mixitup 16966 * @private 16967 * @since 3.0.0 16968 */ 16969 16970 mixitup.UserInstruction = function() { 16971 mixitup.Base.call(this); 16972 16973 this.callActions('beforeConstruct'); 16974 16975 this.command = {}; 16976 this.animate = false; 16977 this.callback = null; 16978 16979 this.callActions('afterConstruct'); 16980 16981 h.seal(this); 16982 }; 16983 16984 mixitup.BaseStatic.call(mixitup.UserInstruction); 16985 16986 mixitup.UserInstruction.prototype = Object.create(mixitup.Base.prototype); 16987 16988 mixitup.UserInstruction.prototype.constructor = mixitup.UserInstruction; 16989 16990 /** 16991 * @constructor 16992 * @memberof mixitup 16993 * @private 16994 * @since 3.0.0 16995 */ 16996 16997 mixitup.Messages = function() { 16998 mixitup.Base.call(this); 16999 17000 this.callActions('beforeConstruct'); 17001 17002 /* Errors 17003 ----------------------------------------------------------------------------- */ 17004 17005 this.ERROR_FACTORY_INVALID_CONTAINER = 17006 '[MixItUp] An invalid selector or element reference was passed to the mixitup factory function'; 17007 17008 this.ERROR_FACTORY_CONTAINER_NOT_FOUND = 17009 '[MixItUp] The provided selector yielded no container element'; 17010 17011 this.ERROR_CONFIG_INVALID_ANIMATION_EFFECTS = 17012 '[MixItUp] Invalid value for `animation.effects`'; 17013 17014 this.ERROR_CONFIG_INVALID_CONTROLS_SCOPE = 17015 '[MixItUp] Invalid value for `controls.scope`'; 17016 17017 this.ERROR_CONFIG_INVALID_PROPERTY = 17018 '[MixitUp] Invalid configuration object property "${erroneous}"${suggestion}'; 17019 17020 this.ERROR_CONFIG_INVALID_PROPERTY_SUGGESTION = 17021 '. Did you mean "${probableMatch}"?'; 17022 17023 this.ERROR_CONFIG_DATA_UID_KEY_NOT_SET = 17024 '[MixItUp] To use the dataset API, a UID key must be specified using `data.uidKey`'; 17025 17026 this.ERROR_DATASET_INVALID_UID_KEY = 17027 '[MixItUp] The specified UID key "${uidKey}" is not present on one or more dataset items'; 17028 17029 this.ERROR_DATASET_DUPLICATE_UID = 17030 '[MixItUp] The UID "${uid}" was found on two or more dataset items. UIDs must be unique.'; 17031 17032 this.ERROR_INSERT_INVALID_ARGUMENTS = 17033 '[MixItUp] Please provider either an index or a sibling and position to insert, not both'; 17034 17035 this.ERROR_INSERT_PREEXISTING_ELEMENT = 17036 '[MixItUp] An element to be inserted already exists in the container'; 17037 17038 this.ERROR_FILTER_INVALID_ARGUMENTS = 17039 '[MixItUp] Please provide either a selector or collection `.filter()`, not both'; 17040 17041 this.ERROR_DATASET_NOT_SET = 17042 '[MixItUp] To use the dataset API with pre-rendered targets, a starting dataset must be set using `load.dataset`'; 17043 17044 this.ERROR_DATASET_PRERENDERED_MISMATCH = 17045 '[MixItUp] `load.dataset` does not match pre-rendered targets'; 17046 17047 this.ERROR_DATASET_RENDERER_NOT_SET = 17048 '[MixItUp] To insert an element via the dataset API, a target renderer function must be provided to `render.target`'; 17049 17050 this.ERROR_SORT_NON_EXISTENT_ELEMENT = 17051 '[MixItUp] An element to be sorted does not already exist in the container'; 17052 17053 /* Warnings 17054 ----------------------------------------------------------------------------- */ 17055 17056 this.WARNING_FACTORY_PREEXISTING_INSTANCE = 17057 '[MixItUp] WARNING: This element already has an active MixItUp instance. The provided configuration object will be ignored.' + 17058 ' If you wish to perform additional methods on this instance, please create a reference.'; 17059 17060 this.WARNING_INSERT_NO_ELEMENTS = 17061 '[MixItUp] WARNING: No valid elements were passed to `.insert()`'; 17062 17063 this.WARNING_REMOVE_NO_ELEMENTS = 17064 '[MixItUp] WARNING: No valid elements were passed to `.remove()`'; 17065 17066 this.WARNING_MULTIMIX_INSTANCE_QUEUE_FULL = 17067 '[MixItUp] WARNING: An operation was requested but the MixItUp instance was busy. The operation was rejected because the ' + 17068 'queue is full or queuing is disabled.'; 17069 17070 this.WARNING_GET_OPERATION_INSTANCE_BUSY = 17071 '[MixItUp] WARNING: Operations can be be created while the MixItUp instance is busy.'; 17072 17073 this.WARNING_NO_PROMISE_IMPLEMENTATION = 17074 '[MixItUp] WARNING: No Promise implementations could be found. If you wish to use promises with MixItUp please install' + 17075 ' an ES6 Promise polyfill.'; 17076 17077 this.WARNING_INCONSISTENT_SORTING_ATTRIBUTES = 17078 '[MixItUp] WARNING: The requested sorting data attribute "${attribute}" was not present on one or more target elements' + 17079 ' which may product unexpected sort output'; 17080 17081 this.callActions('afterConstruct'); 17082 17083 this.compileTemplates(); 17084 17085 h.seal(this); 17086 }; 17087 17088 mixitup.BaseStatic.call(mixitup.Messages); 17089 17090 mixitup.Messages.prototype = Object.create(mixitup.Base.prototype); 17091 17092 mixitup.Messages.prototype.constructor = mixitup.Messages; 17093 17094 /** 17095 * @return {void} 17096 */ 17097 17098 mixitup.Messages.prototype.compileTemplates = function() { 17099 var errorKey = ''; 17100 var errorMessage = ''; 17101 17102 for (errorKey in this) { 17103 if (typeof (errorMessage = this[errorKey]) !== 'string') continue; 17104 17105 this[h.camelCase(errorKey)] = h.template(errorMessage); 17106 } 17107 }; 17108 17109 mixitup.messages = new mixitup.Messages(); 17110 17111 /** 17112 * @constructor 17113 * @memberof mixitup 17114 * @private 17115 * @since 3.0.0 17116 * @param {mixitup.Mixer} mixer 17117 */ 17118 17119 mixitup.Facade = function Mixer(mixer) { 17120 mixitup.Base.call(this); 17121 17122 this.callActions('beforeConstruct', arguments); 17123 17124 this.configure = mixer.configure.bind(mixer); 17125 this.show = mixer.show.bind(mixer); 17126 this.hide = mixer.hide.bind(mixer); 17127 this.filter = mixer.filter.bind(mixer); 17128 this.toggleOn = mixer.toggleOn.bind(mixer); 17129 this.toggleOff = mixer.toggleOff.bind(mixer); 17130 this.sort = mixer.sort.bind(mixer); 17131 this.changeLayout = mixer.changeLayout.bind(mixer); 17132 this.multimix = mixer.multimix.bind(mixer); 17133 this.dataset = mixer.dataset.bind(mixer); 17134 this.tween = mixer.tween.bind(mixer); 17135 this.insert = mixer.insert.bind(mixer); 17136 this.insertBefore = mixer.insertBefore.bind(mixer); 17137 this.insertAfter = mixer.insertAfter.bind(mixer); 17138 this.prepend = mixer.prepend.bind(mixer); 17139 this.append = mixer.append.bind(mixer); 17140 this.remove = mixer.remove.bind(mixer); 17141 this.destroy = mixer.destroy.bind(mixer); 17142 this.forceRefresh = mixer.forceRefresh.bind(mixer); 17143 this.forceRender = mixer.forceRender.bind(mixer); 17144 this.isMixing = mixer.isMixing.bind(mixer); 17145 this.getOperation = mixer.getOperation.bind(mixer); 17146 this.getConfig = mixer.getConfig.bind(mixer); 17147 this.getState = mixer.getState.bind(mixer); 17148 17149 this.callActions('afterConstruct', arguments); 17150 17151 h.freeze(this); 17152 h.seal(this); 17153 }; 17154 17155 mixitup.BaseStatic.call(mixitup.Facade); 17156 17157 mixitup.Facade.prototype = Object.create(mixitup.Base.prototype); 17158 17159 mixitup.Facade.prototype.constructor = mixitup.Facade; 17160 17161 if (true) { 17162 module.exports = mixitup; 17163 } else {} 17164 mixitup.BaseStatic.call(mixitup.constructor); 17165 17166 mixitup.NAME = 'mixitup'; 17167 mixitup.CORE_VERSION = '3.3.1'; 17168})(window); 17169 17170/***/ }), 17171
vendor: 7,142 bytes, lines 17172-17183
17172/***/ "./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js": 17173/*!************************************************************************!*\ 17174 !*** ./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js ***! 17175 \************************************************************************/ 17176/***/ (function(module, exports, __webpack_require__) { 17177 17178var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! smooth-scroll v16.1.3 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ 17179window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),o=this;do{for(t=n.length;0<=--t&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),(function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e})(),(function(){for(var r=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var n=(new Date).getTime(),o=Math.max(0,16-(n-r)),a=window.setTimeout((function(){e(n+o)}),o);return r=n+o,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})})(),(function(e,t){ true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){return t(e)}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 17180 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):0})("undefined"!=typeof __webpack_require__.g?__webpack_require__.g:"undefined"!=typeof window?window:this,(function(M){"use strict";var q={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},I=function(){var n={};return Array.prototype.forEach.call(arguments,(function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}})),n},r=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,a=-1,r="",i=n.charCodeAt(0);++a<o;){if(0===(t=n.charCodeAt(a)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");1<=t&&t<=31||127==t||0===a&&48<=t&&t<=57||1===a&&48<=t&&t<=57&&45===i?r+="\\"+t.toString(16)+" ":r+=128<=t||45===t||95===t||48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122?n.charAt(a):"\\"+n.charAt(a)}return"#"+r},F=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},L=function(e){return e?(t=e,parseInt(M.getComputedStyle(t).height,10)+e.offsetTop):0;var t},x=function(e,t,n){0===e&&document.body.focus(),n||(e.focus(),document.activeElement!==e&&(e.setAttribute("tabindex","-1"),e.focus(),e.style.outline="none"),M.scrollTo(0,t))},H=function(e,t,n,o){if(t.emitEvents&&"function"==typeof M.CustomEvent){var a=new CustomEvent(e,{bubbles:!0,detail:{anchor:n,toggle:o}});document.dispatchEvent(a)}};return function(o,e){var b,a,A,O,C={};C.cancelScroll=function(e){cancelAnimationFrame(O),O=null,e||H("scrollCancel",b)},C.animateScroll=function(a,r,e){C.cancelScroll();var i=I(b||q,e||{}),c="[object Number]"===Object.prototype.toString.call(a),t=c||!a.tagName?null:a;if(c||t){var s=M.pageYOffset;i.header&&!A&&(A=document.querySelector(i.header));var n,o,u,l,m,d,f,h,p=L(A),g=c?a:(function(e,t,n,o){var a=0;if(e.offsetParent)for(;a+=e.offsetTop,e=e.offsetParent;);return a=Math.max(a-t-n,0),o&&(a=Math.min(a,F()-M.innerHeight)),a})(t,p,parseInt("function"==typeof i.offset?i.offset(a,r):i.offset,10),i.clip),y=g-s,v=F(),w=0,S=(n=y,u=(o=i).speedAsDuration?o.speed:Math.abs(n/1e3*o.speed),o.durationMax&&u>o.durationMax?o.durationMax:o.durationMin&&u<o.durationMin?o.durationMin:parseInt(u,10)),E=function(e){var t,n,o;l||(l=e),w+=e-l,d=s+y*(n=m=1<(m=0===S?0:w/S)?1:m,"easeInQuad"===(t=i).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),M.scrollTo(0,Math.floor(d)),(function(e,t){var n=M.pageYOffset;if(e==t||n==t||(s<t&&M.innerHeight+n)>=v)return C.cancelScroll(!0),x(a,t,c),H("scrollStop",i,a,r),!(O=l=null)})(d,g)||(O=M.requestAnimationFrame(E),l=e)};0===M.pageYOffset&&M.scrollTo(0,0),f=a,h=i,c||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:f.id},document.title,f===document.documentElement?"#top":"#"+f.id),"matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches?x(a,Math.floor(g),!1):(H("scrollStart",i,a,r),C.cancelScroll(!0),M.requestAnimationFrame(E))}};var t=function(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(b.ignore)&&a.hostname===M.location.hostname&&a.pathname===M.location.pathname&&/#/.test(a.href)){var t,n;try{t=r(decodeURIComponent(a.hash))}catch(e){t=r(a.hash)}if("#"===t){if(!b.topOnEmptyHash)return;n=document.documentElement}else n=document.querySelector(t);(n=n||"#top"!==t?n:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=M.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||M.pageYOffset},document.title,t||M.location.href)}})(b),C.animateScroll(n,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(b)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||C.animateScroll(t,null,{updateURL:!1})}};C.destroy=function(){b&&(document.removeEventListener("click",t,!1),M.removeEventListener("popstate",n,!1),C.cancelScroll(),O=A=a=b=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";C.destroy(),b=I(q,e||{}),A=b.header?document.querySelector(b.header):null,document.addEventListener("click",t,!1),b.updateURL&&b.popstate&&M.addEventListener("popstate",n,!1)})(),C}})); 17181 17182/***/ }), 17183
vendor: 41,238 bytes, lines 17184-18765
17184/***/ "./node_modules/dom7/dom7.esm.js": 17185/*!***************************************!*\ 17186 !*** ./node_modules/dom7/dom7.esm.js ***! 17187 \***************************************/ 17188/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 17189 17190"use strict"; 17191__webpack_require__.r(__webpack_exports__); 17192/* harmony export */ __webpack_require__.d(__webpack_exports__, { 17193/* harmony export */ "$": () => (/* binding */ $), 17194/* harmony export */ "add": () => (/* binding */ add), 17195/* harmony export */ "addClass": () => (/* binding */ addClass), 17196/* harmony export */ "animate": () => (/* binding */ animate), 17197/* harmony export */ "animationEnd": () => (/* binding */ animationEnd), 17198/* harmony export */ "append": () => (/* binding */ append), 17199/* harmony export */ "appendTo": () => (/* binding */ appendTo), 17200/* harmony export */ "attr": () => (/* binding */ attr), 17201/* harmony export */ "blur": () => (/* binding */ blur), 17202/* harmony export */ "change": () => (/* binding */ change), 17203/* harmony export */ "children": () => (/* binding */ children), 17204/* harmony export */ "click": () => (/* binding */ click), 17205/* harmony export */ "closest": () => (/* binding */ closest), 17206/* harmony export */ "css": () => (/* binding */ css), 17207/* harmony export */ "data": () => (/* binding */ data), 17208/* harmony export */ "dataset": () => (/* binding */ dataset), 17209/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 17210/* harmony export */ "detach": () => (/* binding */ detach), 17211/* harmony export */ "each": () => (/* binding */ each), 17212/* harmony export */ "empty": () => (/* binding */ empty), 17213/* harmony export */ "eq": () => (/* binding */ eq), 17214/* harmony export */ "filter": () => (/* binding */ filter), 17215/* harmony export */ "find": () => (/* binding */ find), 17216/* harmony export */ "focus": () => (/* binding */ focus), 17217/* harmony export */ "focusin": () => (/* binding */ focusin), 17218/* harmony export */ "focusout": () => (/* binding */ focusout), 17219/* harmony export */ "hasClass": () => (/* binding */ hasClass), 17220/* harmony export */ "height": () => (/* binding */ height), 17221/* harmony export */ "hide": () => (/* binding */ hide), 17222/* harmony export */ "html": () => (/* binding */ html), 17223/* harmony export */ "index": () => (/* binding */ index), 17224/* harmony export */ "insertAfter": () => (/* binding */ insertAfter), 17225/* harmony export */ "insertBefore": () => (/* binding */ insertBefore), 17226/* harmony export */ "is": () => (/* binding */ is), 17227/* harmony export */ "keydown": () => (/* binding */ keydown), 17228/* harmony export */ "keypress": () => (/* binding */ keypress), 17229/* harmony export */ "keyup": () => (/* binding */ keyup), 17230/* harmony export */ "mousedown": () => (/* binding */ mousedown), 17231/* harmony export */ "mouseenter": () => (/* binding */ mouseenter), 17232/* harmony export */ "mouseleave": () => (/* binding */ mouseleave), 17233/* harmony export */ "mousemove": () => (/* binding */ mousemove), 17234/* harmony export */ "mouseout": () => (/* binding */ mouseout), 17235/* harmony export */ "mouseover": () => (/* binding */ mouseover), 17236/* harmony export */ "mouseup": () => (/* binding */ mouseup), 17237/* harmony export */ "next": () => (/* binding */ next), 17238/* harmony export */ "nextAll": () => (/* binding */ nextAll), 17239/* harmony export */ "off": () => (/* binding */ off), 17240/* harmony export */ "offset": () => (/* binding */ offset), 17241/* harmony export */ "on": () => (/* binding */ on), 17242/* harmony export */ "once": () => (/* binding */ once), 17243/* harmony export */ "outerHeight": () => (/* binding */ outerHeight), 17244/* harmony export */ "outerWidth": () => (/* binding */ outerWidth), 17245/* harmony export */ "parent": () => (/* binding */ parent), 17246/* harmony export */ "parents": () => (/* binding */ parents), 17247/* harmony export */ "prepend": () => (/* binding */ prepend), 17248/* harmony export */ "prependTo": () => (/* binding */ prependTo), 17249/* harmony export */ "prev": () => (/* binding */ prev), 17250/* harmony export */ "prevAll": () => (/* binding */ prevAll), 17251/* harmony export */ "prop": () => (/* binding */ prop), 17252/* harmony export */ "remove": () => (/* binding */ remove), 17253/* harmony export */ "removeAttr": () => (/* binding */ removeAttr), 17254/* harmony export */ "removeClass": () => (/* binding */ removeClass), 17255/* harmony export */ "removeData": () => (/* binding */ removeData), 17256/* harmony export */ "resize": () => (/* binding */ resize), 17257/* harmony export */ "scroll": () => (/* binding */ scroll), 17258/* harmony export */ "scrollLeft": () => (/* binding */ scrollLeft), 17259/* harmony export */ "scrollTo": () => (/* binding */ scrollTo), 17260/* harmony export */ "scrollTop": () => (/* binding */ scrollTop), 17261/* harmony export */ "show": () => (/* binding */ show), 17262/* harmony export */ "siblings": () => (/* binding */ siblings), 17263/* harmony export */ "stop": () => (/* binding */ stop), 17264/* harmony export */ "styles": () => (/* binding */ styles), 17265/* harmony export */ "submit": () => (/* binding */ submit), 17266/* harmony export */ "text": () => (/* binding */ text), 17267/* harmony export */ "toggleClass": () => (/* binding */ toggleClass), 17268/* harmony export */ "touchend": () => (/* binding */ touchend), 17269/* harmony export */ "touchmove": () => (/* binding */ touchmove), 17270/* harmony export */ "touchstart": () => (/* binding */ touchstart), 17271/* harmony export */ "transform": () => (/* binding */ transform), 17272/* harmony export */ "transition": () => (/* binding */ transition), 17273/* harmony export */ "transitionEnd": () => (/* binding */ transitionEnd), 17274/* harmony export */ "trigger": () => (/* binding */ trigger), 17275/* harmony export */ "val": () => (/* binding */ val), 17276/* harmony export */ "value": () => (/* binding */ value), 17277/* harmony export */ "width": () => (/* binding */ width) 17278/* harmony export */ }); 17279/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 17280/** 17281 * Dom7 4.0.4 17282 * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API 17283 * https://framework7.io/docs/dom7.html 17284 * 17285 * Copyright 2022, Vladimir Kharlampidi 17286 * 17287 * Licensed under MIT 17288 * 17289 * Released on: January 11, 2022 17290 */ 17291 17292 17293/* eslint-disable no-proto */ 17294function makeReactive(obj) { 17295 const proto = obj.__proto__; 17296 Object.defineProperty(obj, '__proto__', { 17297 get() { 17298 return proto; 17299 }, 17300 17301 set(value) { 17302 proto.__proto__ = value; 17303 } 17304 17305 }); 17306} 17307 17308class Dom7 extends Array { 17309 constructor(items) { 17310 if (typeof items === 'number') { 17311 super(items); 17312 } else { 17313 super(...(items || [])); 17314 makeReactive(this); 17315 } 17316 } 17317 17318} 17319 17320function arrayFlat(arr = []) { 17321 const res = []; 17322 arr.forEach(el => { 17323 if (Array.isArray(el)) { 17324 res.push(...arrayFlat(el)); 17325 } else { 17326 res.push(el); 17327 } 17328 }); 17329 return res; 17330} 17331function arrayFilter(arr, callback) { 17332 return Array.prototype.filter.call(arr, callback); 17333} 17334function arrayUnique(arr) { 17335 const uniqueArray = []; 17336 17337 for (let i = 0; i < arr.length; i += 1) { 17338 if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]); 17339 } 17340 17341 return uniqueArray; 17342} 17343function toCamelCase(string) { 17344 return string.toLowerCase().replace(/-(.)/g, (match, group) => group.toUpperCase()); 17345} 17346 17347// eslint-disable-next-line 17348 17349function qsa(selector, context) { 17350 if (typeof selector !== 'string') { 17351 return [selector]; 17352 } 17353 17354 const a = []; 17355 const res = context.querySelectorAll(selector); 17356 17357 for (let i = 0; i < res.length; i += 1) { 17358 a.push(res[i]); 17359 } 17360 17361 return a; 17362} 17363 17364function $(selector, context) { 17365 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17366 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 17367 let arr = []; 17368 17369 if (!context && selector instanceof Dom7) { 17370 return selector; 17371 } 17372 17373 if (!selector) { 17374 return new Dom7(arr); 17375 } 17376 17377 if (typeof selector === 'string') { 17378 const html = selector.trim(); 17379 17380 if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { 17381 let toCreate = 'div'; 17382 if (html.indexOf('<li') === 0) toCreate = 'ul'; 17383 if (html.indexOf('<tr') === 0) toCreate = 'tbody'; 17384 if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) toCreate = 'tr'; 17385 if (html.indexOf('<tbody') === 0) toCreate = 'table'; 17386 if (html.indexOf('<option') === 0) toCreate = 'select'; 17387 const tempParent = document.createElement(toCreate); 17388 tempParent.innerHTML = html; 17389 17390 for (let i = 0; i < tempParent.childNodes.length; i += 1) { 17391 arr.push(tempParent.childNodes[i]); 17392 } 17393 } else { 17394 arr = qsa(selector.trim(), context || document); 17395 } // arr = qsa(selector, document); 17396 17397 } else if (selector.nodeType || selector === window || selector === document) { 17398 arr.push(selector); 17399 } else if (Array.isArray(selector)) { 17400 if (selector instanceof Dom7) return selector; 17401 arr = selector; 17402 } 17403 17404 return new Dom7(arrayUnique(arr)); 17405} 17406 17407$.fn = Dom7.prototype; 17408 17409// eslint-disable-next-line 17410 17411function addClass(...classes) { 17412 const classNames = arrayFlat(classes.map(c => c.split(' '))); 17413 this.forEach(el => { 17414 el.classList.add(...classNames); 17415 }); 17416 return this; 17417} 17418 17419function removeClass(...classes) { 17420 const classNames = arrayFlat(classes.map(c => c.split(' '))); 17421 this.forEach(el => { 17422 el.classList.remove(...classNames); 17423 }); 17424 return this; 17425} 17426 17427function toggleClass(...classes) { 17428 const classNames = arrayFlat(classes.map(c => c.split(' '))); 17429 this.forEach(el => { 17430 classNames.forEach(className => { 17431 el.classList.toggle(className); 17432 }); 17433 }); 17434} 17435 17436function hasClass(...classes) { 17437 const classNames = arrayFlat(classes.map(c => c.split(' '))); 17438 return arrayFilter(this, el => { 17439 return classNames.filter(className => el.classList.contains(className)).length > 0; 17440 }).length > 0; 17441} 17442 17443function attr(attrs, value) { 17444 if (arguments.length === 1 && typeof attrs === 'string') { 17445 // Get attr 17446 if (this[0]) return this[0].getAttribute(attrs); 17447 return undefined; 17448 } // Set attrs 17449 17450 17451 for (let i = 0; i < this.length; i += 1) { 17452 if (arguments.length === 2) { 17453 // String 17454 this[i].setAttribute(attrs, value); 17455 } else { 17456 // Object 17457 for (const attrName in attrs) { 17458 this[i][attrName] = attrs[attrName]; 17459 this[i].setAttribute(attrName, attrs[attrName]); 17460 } 17461 } 17462 } 17463 17464 return this; 17465} 17466 17467function removeAttr(attr) { 17468 for (let i = 0; i < this.length; i += 1) { 17469 this[i].removeAttribute(attr); 17470 } 17471 17472 return this; 17473} 17474 17475function prop(props, value) { 17476 if (arguments.length === 1 && typeof props === 'string') { 17477 // Get prop 17478 if (this[0]) return this[0][props]; 17479 } else { 17480 // Set props 17481 for (let i = 0; i < this.length; i += 1) { 17482 if (arguments.length === 2) { 17483 // String 17484 this[i][props] = value; 17485 } else { 17486 // Object 17487 for (const propName in props) { 17488 this[i][propName] = props[propName]; 17489 } 17490 } 17491 } 17492 17493 return this; 17494 } 17495 17496 return this; 17497} 17498 17499function data(key, value) { 17500 let el; 17501 17502 if (typeof value === 'undefined') { 17503 el = this[0]; 17504 if (!el) return undefined; // Get value 17505 17506 if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) { 17507 return el.dom7ElementDataStorage[key]; 17508 } 17509 17510 const dataKey = el.getAttribute(`data-${key}`); 17511 17512 if (dataKey) { 17513 return dataKey; 17514 } 17515 17516 return undefined; 17517 } // Set value 17518 17519 17520 for (let i = 0; i < this.length; i += 1) { 17521 el = this[i]; 17522 if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {}; 17523 el.dom7ElementDataStorage[key] = value; 17524 } 17525 17526 return this; 17527} 17528 17529function removeData(key) { 17530 for (let i = 0; i < this.length; i += 1) { 17531 const el = this[i]; 17532 17533 if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) { 17534 el.dom7ElementDataStorage[key] = null; 17535 delete el.dom7ElementDataStorage[key]; 17536 } 17537 } 17538} 17539 17540function dataset() { 17541 const el = this[0]; 17542 if (!el) return undefined; 17543 const dataset = {}; // eslint-disable-line 17544 17545 if (el.dataset) { 17546 for (const dataKey in el.dataset) { 17547 dataset[dataKey] = el.dataset[dataKey]; 17548 } 17549 } else { 17550 for (let i = 0; i < el.attributes.length; i += 1) { 17551 const attr = el.attributes[i]; 17552 17553 if (attr.name.indexOf('data-') >= 0) { 17554 dataset[toCamelCase(attr.name.split('data-')[1])] = attr.value; 17555 } 17556 } 17557 } 17558 17559 for (const key in dataset) { 17560 if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1; 17561 } 17562 17563 return dataset; 17564} 17565 17566function val(value) { 17567 if (typeof value === 'undefined') { 17568 // get value 17569 const el = this[0]; 17570 if (!el) return undefined; 17571 17572 if (el.multiple && el.nodeName.toLowerCase() === 'select') { 17573 const values = []; 17574 17575 for (let i = 0; i < el.selectedOptions.length; i += 1) { 17576 values.push(el.selectedOptions[i].value); 17577 } 17578 17579 return values; 17580 } 17581 17582 return el.value; 17583 } // set value 17584 17585 17586 for (let i = 0; i < this.length; i += 1) { 17587 const el = this[i]; 17588 17589 if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') { 17590 for (let j = 0; j < el.options.length; j += 1) { 17591 el.options[j].selected = value.indexOf(el.options[j].value) >= 0; 17592 } 17593 } else { 17594 el.value = value; 17595 } 17596 } 17597 17598 return this; 17599} 17600 17601function value(value) { 17602 return this.val(value); 17603} 17604 17605function transform(transform) { 17606 for (let i = 0; i < this.length; i += 1) { 17607 this[i].style.transform = transform; 17608 } 17609 17610 return this; 17611} 17612 17613function transition(duration) { 17614 for (let i = 0; i < this.length; i += 1) { 17615 this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration; 17616 } 17617 17618 return this; 17619} 17620 17621function on(...args) { 17622 let [eventType, targetSelector, listener, capture] = args; 17623 17624 if (typeof args[1] === 'function') { 17625 [eventType, listener, capture] = args; 17626 targetSelector = undefined; 17627 } 17628 17629 if (!capture) capture = false; 17630 17631 function handleLiveEvent(e) { 17632 const target = e.target; 17633 if (!target) return; 17634 const eventData = e.target.dom7EventData || []; 17635 17636 if (eventData.indexOf(e) < 0) { 17637 eventData.unshift(e); 17638 } 17639 17640 if ($(target).is(targetSelector)) listener.apply(target, eventData);else { 17641 const parents = $(target).parents(); // eslint-disable-line 17642 17643 for (let k = 0; k < parents.length; k += 1) { 17644 if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData); 17645 } 17646 } 17647 } 17648 17649 function handleEvent(e) { 17650 const eventData = e && e.target ? e.target.dom7EventData || [] : []; 17651 17652 if (eventData.indexOf(e) < 0) { 17653 eventData.unshift(e); 17654 } 17655 17656 listener.apply(this, eventData); 17657 } 17658 17659 const events = eventType.split(' '); 17660 let j; 17661 17662 for (let i = 0; i < this.length; i += 1) { 17663 const el = this[i]; 17664 17665 if (!targetSelector) { 17666 for (j = 0; j < events.length; j += 1) { 17667 const event = events[j]; 17668 if (!el.dom7Listeners) el.dom7Listeners = {}; 17669 if (!el.dom7Listeners[event]) el.dom7Listeners[event] = []; 17670 el.dom7Listeners[event].push({ 17671 listener, 17672 proxyListener: handleEvent 17673 }); 17674 el.addEventListener(event, handleEvent, capture); 17675 } 17676 } else { 17677 // Live events 17678 for (j = 0; j < events.length; j += 1) { 17679 const event = events[j]; 17680 if (!el.dom7LiveListeners) el.dom7LiveListeners = {}; 17681 if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = []; 17682 el.dom7LiveListeners[event].push({ 17683 listener, 17684 proxyListener: handleLiveEvent 17685 }); 17686 el.addEventListener(event, handleLiveEvent, capture); 17687 } 17688 } 17689 } 17690 17691 return this; 17692} 17693 17694function off(...args) { 17695 let [eventType, targetSelector, listener, capture] = args; 17696 17697 if (typeof args[1] === 'function') { 17698 [eventType, listener, capture] = args; 17699 targetSelector = undefined; 17700 } 17701 17702 if (!capture) capture = false; 17703 const events = eventType.split(' '); 17704 17705 for (let i = 0; i < events.length; i += 1) { 17706 const event = events[i]; 17707 17708 for (let j = 0; j < this.length; j += 1) { 17709 const el = this[j]; 17710 let handlers; 17711 17712 if (!targetSelector && el.dom7Listeners) { 17713 handlers = el.dom7Listeners[event]; 17714 } else if (targetSelector && el.dom7LiveListeners) { 17715 handlers = el.dom7LiveListeners[event]; 17716 } 17717 17718 if (handlers && handlers.length) { 17719 for (let k = handlers.length - 1; k >= 0; k -= 1) { 17720 const handler = handlers[k]; 17721 17722 if (listener && handler.listener === listener) { 17723 el.removeEventListener(event, handler.proxyListener, capture); 17724 handlers.splice(k, 1); 17725 } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { 17726 el.removeEventListener(event, handler.proxyListener, capture); 17727 handlers.splice(k, 1); 17728 } else if (!listener) { 17729 el.removeEventListener(event, handler.proxyListener, capture); 17730 handlers.splice(k, 1); 17731 } 17732 } 17733 } 17734 } 17735 } 17736 17737 return this; 17738} 17739 17740function once(...args) { 17741 const dom = this; 17742 let [eventName, targetSelector, listener, capture] = args; 17743 17744 if (typeof args[1] === 'function') { 17745 [eventName, listener, capture] = args; 17746 targetSelector = undefined; 17747 } 17748 17749 function onceHandler(...eventArgs) { 17750 listener.apply(this, eventArgs); 17751 dom.off(eventName, targetSelector, onceHandler, capture); 17752 17753 if (onceHandler.dom7proxy) { 17754 delete onceHandler.dom7proxy; 17755 } 17756 } 17757 17758 onceHandler.dom7proxy = listener; 17759 return dom.on(eventName, targetSelector, onceHandler, capture); 17760} 17761 17762function trigger(...args) { 17763 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17764 const events = args[0].split(' '); 17765 const eventData = args[1]; 17766 17767 for (let i = 0; i < events.length; i += 1) { 17768 const event = events[i]; 17769 17770 for (let j = 0; j < this.length; j += 1) { 17771 const el = this[j]; 17772 17773 if (window.CustomEvent) { 17774 const evt = new window.CustomEvent(event, { 17775 detail: eventData, 17776 bubbles: true, 17777 cancelable: true 17778 }); 17779 el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0); 17780 el.dispatchEvent(evt); 17781 el.dom7EventData = []; 17782 delete el.dom7EventData; 17783 } 17784 } 17785 } 17786 17787 return this; 17788} 17789 17790function transitionEnd(callback) { 17791 const dom = this; 17792 17793 function fireCallBack(e) { 17794 if (e.target !== this) return; 17795 callback.call(this, e); 17796 dom.off('transitionend', fireCallBack); 17797 } 17798 17799 if (callback) { 17800 dom.on('transitionend', fireCallBack); 17801 } 17802 17803 return this; 17804} 17805 17806function animationEnd(callback) { 17807 const dom = this; 17808 17809 function fireCallBack(e) { 17810 if (e.target !== this) return; 17811 callback.call(this, e); 17812 dom.off('animationend', fireCallBack); 17813 } 17814 17815 if (callback) { 17816 dom.on('animationend', fireCallBack); 17817 } 17818 17819 return this; 17820} 17821 17822function width() { 17823 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17824 17825 if (this[0] === window) { 17826 return window.innerWidth; 17827 } 17828 17829 if (this.length > 0) { 17830 return parseFloat(this.css('width')); 17831 } 17832 17833 return null; 17834} 17835 17836function outerWidth(includeMargins) { 17837 if (this.length > 0) { 17838 if (includeMargins) { 17839 const styles = this.styles(); 17840 return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); 17841 } 17842 17843 return this[0].offsetWidth; 17844 } 17845 17846 return null; 17847} 17848 17849function height() { 17850 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17851 17852 if (this[0] === window) { 17853 return window.innerHeight; 17854 } 17855 17856 if (this.length > 0) { 17857 return parseFloat(this.css('height')); 17858 } 17859 17860 return null; 17861} 17862 17863function outerHeight(includeMargins) { 17864 if (this.length > 0) { 17865 if (includeMargins) { 17866 const styles = this.styles(); 17867 return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); 17868 } 17869 17870 return this[0].offsetHeight; 17871 } 17872 17873 return null; 17874} 17875 17876function offset() { 17877 if (this.length > 0) { 17878 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17879 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 17880 const el = this[0]; 17881 const box = el.getBoundingClientRect(); 17882 const body = document.body; 17883 const clientTop = el.clientTop || body.clientTop || 0; 17884 const clientLeft = el.clientLeft || body.clientLeft || 0; 17885 const scrollTop = el === window ? window.scrollY : el.scrollTop; 17886 const scrollLeft = el === window ? window.scrollX : el.scrollLeft; 17887 return { 17888 top: box.top + scrollTop - clientTop, 17889 left: box.left + scrollLeft - clientLeft 17890 }; 17891 } 17892 17893 return null; 17894} 17895 17896function hide() { 17897 for (let i = 0; i < this.length; i += 1) { 17898 this[i].style.display = 'none'; 17899 } 17900 17901 return this; 17902} 17903 17904function show() { 17905 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17906 17907 for (let i = 0; i < this.length; i += 1) { 17908 const el = this[i]; 17909 17910 if (el.style.display === 'none') { 17911 el.style.display = ''; 17912 } 17913 17914 if (window.getComputedStyle(el, null).getPropertyValue('display') === 'none') { 17915 // Still not visible 17916 el.style.display = 'block'; 17917 } 17918 } 17919 17920 return this; 17921} 17922 17923function styles() { 17924 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17925 if (this[0]) return window.getComputedStyle(this[0], null); 17926 return {}; 17927} 17928 17929function css(props, value) { 17930 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 17931 let i; 17932 17933 if (arguments.length === 1) { 17934 if (typeof props === 'string') { 17935 // .css('width') 17936 if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props); 17937 } else { 17938 // .css({ width: '100px' }) 17939 for (i = 0; i < this.length; i += 1) { 17940 for (const prop in props) { 17941 this[i].style[prop] = props[prop]; 17942 } 17943 } 17944 17945 return this; 17946 } 17947 } 17948 17949 if (arguments.length === 2 && typeof props === 'string') { 17950 // .css('width', '100px') 17951 for (i = 0; i < this.length; i += 1) { 17952 this[i].style[props] = value; 17953 } 17954 17955 return this; 17956 } 17957 17958 return this; 17959} 17960 17961function each(callback) { 17962 if (!callback) return this; 17963 this.forEach((el, index) => { 17964 callback.apply(el, [el, index]); 17965 }); 17966 return this; 17967} 17968 17969function filter(callback) { 17970 const result = arrayFilter(this, callback); 17971 return $(result); 17972} 17973 17974function html(html) { 17975 if (typeof html === 'undefined') { 17976 return this[0] ? this[0].innerHTML : null; 17977 } 17978 17979 for (let i = 0; i < this.length; i += 1) { 17980 this[i].innerHTML = html; 17981 } 17982 17983 return this; 17984} 17985 17986function text(text) { 17987 if (typeof text === 'undefined') { 17988 return this[0] ? this[0].textContent.trim() : null; 17989 } 17990 17991 for (let i = 0; i < this.length; i += 1) { 17992 this[i].textContent = text; 17993 } 17994 17995 return this; 17996} 17997 17998function is(selector) { 17999 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 18000 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 18001 const el = this[0]; 18002 let compareWith; 18003 let i; 18004 if (!el || typeof selector === 'undefined') return false; 18005 18006 if (typeof selector === 'string') { 18007 if (el.matches) return el.matches(selector); 18008 if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); 18009 if (el.msMatchesSelector) return el.msMatchesSelector(selector); 18010 compareWith = $(selector); 18011 18012 for (i = 0; i < compareWith.length; i += 1) { 18013 if (compareWith[i] === el) return true; 18014 } 18015 18016 return false; 18017 } 18018 18019 if (selector === document) { 18020 return el === document; 18021 } 18022 18023 if (selector === window) { 18024 return el === window; 18025 } 18026 18027 if (selector.nodeType || selector instanceof Dom7) { 18028 compareWith = selector.nodeType ? [selector] : selector; 18029 18030 for (i = 0; i < compareWith.length; i += 1) { 18031 if (compareWith[i] === el) return true; 18032 } 18033 18034 return false; 18035 } 18036 18037 return false; 18038} 18039 18040function index() { 18041 let child = this[0]; 18042 let i; 18043 18044 if (child) { 18045 i = 0; // eslint-disable-next-line 18046 18047 while ((child = child.previousSibling) !== null) { 18048 if (child.nodeType === 1) i += 1; 18049 } 18050 18051 return i; 18052 } 18053 18054 return undefined; 18055} 18056 18057function eq(index) { 18058 if (typeof index === 'undefined') return this; 18059 const length = this.length; 18060 18061 if (index > length - 1) { 18062 return $([]); 18063 } 18064 18065 if (index < 0) { 18066 const returnIndex = length + index; 18067 if (returnIndex < 0) return $([]); 18068 return $([this[returnIndex]]); 18069 } 18070 18071 return $([this[index]]); 18072} 18073 18074function append(...els) { 18075 let newChild; 18076 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 18077 18078 for (let k = 0; k < els.length; k += 1) { 18079 newChild = els[k]; 18080 18081 for (let i = 0; i < this.length; i += 1) { 18082 if (typeof newChild === 'string') { 18083 const tempDiv = document.createElement('div'); 18084 tempDiv.innerHTML = newChild; 18085 18086 while (tempDiv.firstChild) { 18087 this[i].appendChild(tempDiv.firstChild); 18088 } 18089 } else if (newChild instanceof Dom7) { 18090 for (let j = 0; j < newChild.length; j += 1) { 18091 this[i].appendChild(newChild[j]); 18092 } 18093 } else { 18094 this[i].appendChild(newChild); 18095 } 18096 } 18097 } 18098 18099 return this; 18100} 18101 18102function appendTo(parent) { 18103 $(parent).append(this); 18104 return this; 18105} 18106 18107function prepend(newChild) { 18108 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 18109 let i; 18110 let j; 18111 18112 for (i = 0; i < this.length; i += 1) { 18113 if (typeof newChild === 'string') { 18114 const tempDiv = document.createElement('div'); 18115 tempDiv.innerHTML = newChild; 18116 18117 for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { 18118 this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); 18119 } 18120 } else if (newChild instanceof Dom7) { 18121 for (j = 0; j < newChild.length; j += 1) { 18122 this[i].insertBefore(newChild[j], this[i].childNodes[0]); 18123 } 18124 } else { 18125 this[i].insertBefore(newChild, this[i].childNodes[0]); 18126 } 18127 } 18128 18129 return this; 18130} 18131 18132function prependTo(parent) { 18133 $(parent).prepend(this); 18134 return this; 18135} 18136 18137function insertBefore(selector) { 18138 const before = $(selector); 18139 18140 for (let i = 0; i < this.length; i += 1) { 18141 if (before.length === 1) { 18142 before[0].parentNode.insertBefore(this[i], before[0]); 18143 } else if (before.length > 1) { 18144 for (let j = 0; j < before.length; j += 1) { 18145 before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]); 18146 } 18147 } 18148 } 18149} 18150 18151function insertAfter(selector) { 18152 const after = $(selector); 18153 18154 for (let i = 0; i < this.length; i += 1) { 18155 if (after.length === 1) { 18156 after[0].parentNode.insertBefore(this[i], after[0].nextSibling); 18157 } else if (after.length > 1) { 18158 for (let j = 0; j < after.length; j += 1) { 18159 after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling); 18160 } 18161 } 18162 } 18163} 18164 18165function next(selector) { 18166 if (this.length > 0) { 18167 if (selector) { 18168 if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { 18169 return $([this[0].nextElementSibling]); 18170 } 18171 18172 return $([]); 18173 } 18174 18175 if (this[0].nextElementSibling) return $([this[0].nextElementSibling]); 18176 return $([]); 18177 } 18178 18179 return $([]); 18180} 18181 18182function nextAll(selector) { 18183 const nextEls = []; 18184 let el = this[0]; 18185 if (!el) return $([]); 18186 18187 while (el.nextElementSibling) { 18188 const next = el.nextElementSibling; // eslint-disable-line 18189 18190 if (selector) { 18191 if ($(next).is(selector)) nextEls.push(next); 18192 } else nextEls.push(next); 18193 18194 el = next; 18195 } 18196 18197 return $(nextEls); 18198} 18199 18200function prev(selector) { 18201 if (this.length > 0) { 18202 const el = this[0]; 18203 18204 if (selector) { 18205 if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { 18206 return $([el.previousElementSibling]); 18207 } 18208 18209 return $([]); 18210 } 18211 18212 if (el.previousElementSibling) return $([el.previousElementSibling]); 18213 return $([]); 18214 } 18215 18216 return $([]); 18217} 18218 18219function prevAll(selector) { 18220 const prevEls = []; 18221 let el = this[0]; 18222 if (!el) return $([]); 18223 18224 while (el.previousElementSibling) { 18225 const prev = el.previousElementSibling; // eslint-disable-line 18226 18227 if (selector) { 18228 if ($(prev).is(selector)) prevEls.push(prev); 18229 } else prevEls.push(prev); 18230 18231 el = prev; 18232 } 18233 18234 return $(prevEls); 18235} 18236 18237function siblings(selector) { 18238 return this.nextAll(selector).add(this.prevAll(selector)); 18239} 18240 18241function parent(selector) { 18242 const parents = []; // eslint-disable-line 18243 18244 for (let i = 0; i < this.length; i += 1) { 18245 if (this[i].parentNode !== null) { 18246 if (selector) { 18247 if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode); 18248 } else { 18249 parents.push(this[i].parentNode); 18250 } 18251 } 18252 } 18253 18254 return $(parents); 18255} 18256 18257function parents(selector) { 18258 const parents = []; // eslint-disable-line 18259 18260 for (let i = 0; i < this.length; i += 1) { 18261 let parent = this[i].parentNode; // eslint-disable-line 18262 18263 while (parent) { 18264 if (selector) { 18265 if ($(parent).is(selector)) parents.push(parent); 18266 } else { 18267 parents.push(parent); 18268 } 18269 18270 parent = parent.parentNode; 18271 } 18272 } 18273 18274 return $(parents); 18275} 18276 18277function closest(selector) { 18278 let closest = this; // eslint-disable-line 18279 18280 if (typeof selector === 'undefined') { 18281 return $([]); 18282 } 18283 18284 if (!closest.is(selector)) { 18285 closest = closest.parents(selector).eq(0); 18286 } 18287 18288 return closest; 18289} 18290 18291function find(selector) { 18292 const foundElements = []; 18293 18294 for (let i = 0; i < this.length; i += 1) { 18295 const found = this[i].querySelectorAll(selector); 18296 18297 for (let j = 0; j < found.length; j += 1) { 18298 foundElements.push(found[j]); 18299 } 18300 } 18301 18302 return $(foundElements); 18303} 18304 18305function children(selector) { 18306 const children = []; // eslint-disable-line 18307 18308 for (let i = 0; i < this.length; i += 1) { 18309 const childNodes = this[i].children; 18310 18311 for (let j = 0; j < childNodes.length; j += 1) { 18312 if (!selector || $(childNodes[j]).is(selector)) { 18313 children.push(childNodes[j]); 18314 } 18315 } 18316 } 18317 18318 return $(children); 18319} 18320 18321function remove() { 18322 for (let i = 0; i < this.length; i += 1) { 18323 if (this[i].parentNode) this[i].parentNode.removeChild(this[i]); 18324 } 18325 18326 return this; 18327} 18328 18329function detach() { 18330 return this.remove(); 18331} 18332 18333function add(...els) { 18334 const dom = this; 18335 let i; 18336 let j; 18337 18338 for (i = 0; i < els.length; i += 1) { 18339 const toAdd = $(els[i]); 18340 18341 for (j = 0; j < toAdd.length; j += 1) { 18342 dom.push(toAdd[j]); 18343 } 18344 } 18345 18346 return dom; 18347} 18348 18349function empty() { 18350 for (let i = 0; i < this.length; i += 1) { 18351 const el = this[i]; 18352 18353 if (el.nodeType === 1) { 18354 for (let j = 0; j < el.childNodes.length; j += 1) { 18355 if (el.childNodes[j].parentNode) { 18356 el.childNodes[j].parentNode.removeChild(el.childNodes[j]); 18357 } 18358 } 18359 18360 el.textContent = ''; 18361 } 18362 } 18363 18364 return this; 18365} 18366 18367// eslint-disable-next-line 18368 18369function scrollTo(...args) { 18370 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 18371 let [left, top, duration, easing, callback] = args; 18372 18373 if (args.length === 4 && typeof easing === 'function') { 18374 callback = easing; 18375 [left, top, duration, callback, easing] = args; 18376 } 18377 18378 if (typeof easing === 'undefined') easing = 'swing'; 18379 return this.each(function animate() { 18380 const el = this; 18381 let currentTop; 18382 let currentLeft; 18383 let maxTop; 18384 let maxLeft; 18385 let newTop; 18386 let newLeft; 18387 let scrollTop; // eslint-disable-line 18388 18389 let scrollLeft; // eslint-disable-line 18390 18391 let animateTop = top > 0 || top === 0; 18392 let animateLeft = left > 0 || left === 0; 18393 18394 if (typeof easing === 'undefined') { 18395 easing = 'swing'; 18396 } 18397 18398 if (animateTop) { 18399 currentTop = el.scrollTop; 18400 18401 if (!duration) { 18402 el.scrollTop = top; 18403 } 18404 } 18405 18406 if (animateLeft) { 18407 currentLeft = el.scrollLeft; 18408 18409 if (!duration) { 18410 el.scrollLeft = left; 18411 } 18412 } 18413 18414 if (!duration) return; 18415 18416 if (animateTop) { 18417 maxTop = el.scrollHeight - el.offsetHeight; 18418 newTop = Math.max(Math.min(top, maxTop), 0); 18419 } 18420 18421 if (animateLeft) { 18422 maxLeft = el.scrollWidth - el.offsetWidth; 18423 newLeft = Math.max(Math.min(left, maxLeft), 0); 18424 } 18425 18426 let startTime = null; 18427 if (animateTop && newTop === currentTop) animateTop = false; 18428 if (animateLeft && newLeft === currentLeft) animateLeft = false; 18429 18430 function render(time = new Date().getTime()) { 18431 if (startTime === null) { 18432 startTime = time; 18433 } 18434 18435 const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 18436 const easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2; 18437 let done; 18438 if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop); 18439 if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft); 18440 18441 if (animateTop && newTop > currentTop && scrollTop >= newTop) { 18442 el.scrollTop = newTop; 18443 done = true; 18444 } 18445 18446 if (animateTop && newTop < currentTop && scrollTop <= newTop) { 18447 el.scrollTop = newTop; 18448 done = true; 18449 } 18450 18451 if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) { 18452 el.scrollLeft = newLeft; 18453 done = true; 18454 } 18455 18456 if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) { 18457 el.scrollLeft = newLeft; 18458 done = true; 18459 } 18460 18461 if (done) { 18462 if (callback) callback(); 18463 return; 18464 } 18465 18466 if (animateTop) el.scrollTop = scrollTop; 18467 if (animateLeft) el.scrollLeft = scrollLeft; 18468 window.requestAnimationFrame(render); 18469 } 18470 18471 window.requestAnimationFrame(render); 18472 }); 18473} // scrollTop(top, duration, easing, callback) { 18474 18475 18476function scrollTop(...args) { 18477 let [top, duration, easing, callback] = args; 18478 18479 if (args.length === 3 && typeof easing === 'function') { 18480 [top, duration, callback, easing] = args; 18481 } 18482 18483 const dom = this; 18484 18485 if (typeof top === 'undefined') { 18486 if (dom.length > 0) return dom[0].scrollTop; 18487 return null; 18488 } 18489 18490 return dom.scrollTo(undefined, top, duration, easing, callback); 18491} 18492 18493function scrollLeft(...args) { 18494 let [left, duration, easing, callback] = args; 18495 18496 if (args.length === 3 && typeof easing === 'function') { 18497 [left, duration, callback, easing] = args; 18498 } 18499 18500 const dom = this; 18501 18502 if (typeof left === 'undefined') { 18503 if (dom.length > 0) return dom[0].scrollLeft; 18504 return null; 18505 } 18506 18507 return dom.scrollTo(left, undefined, duration, easing, callback); 18508} 18509 18510// eslint-disable-next-line 18511 18512function animate(initialProps, initialParams) { 18513 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 18514 const els = this; 18515 const a = { 18516 props: Object.assign({}, initialProps), 18517 params: Object.assign({ 18518 duration: 300, 18519 easing: 'swing' // or 'linear' 18520 18521 /* Callbacks 18522 begin(elements) 18523 complete(elements) 18524 progress(elements, complete, remaining, start, tweenValue) 18525 */ 18526 18527 }, initialParams), 18528 elements: els, 18529 animating: false, 18530 que: [], 18531 18532 easingProgress(easing, progress) { 18533 if (easing === 'swing') { 18534 return 0.5 - Math.cos(progress * Math.PI) / 2; 18535 } 18536 18537 if (typeof easing === 'function') { 18538 return easing(progress); 18539 } 18540 18541 return progress; 18542 }, 18543 18544 stop() { 18545 if (a.frameId) { 18546 window.cancelAnimationFrame(a.frameId); 18547 } 18548 18549 a.animating = false; 18550 a.elements.each(el => { 18551 const element = el; 18552 delete element.dom7AnimateInstance; 18553 }); 18554 a.que = []; 18555 }, 18556 18557 done(complete) { 18558 a.animating = false; 18559 a.elements.each(el => { 18560 const element = el; 18561 delete element.dom7AnimateInstance; 18562 }); 18563 if (complete) complete(els); 18564 18565 if (a.que.length > 0) { 18566 const que = a.que.shift(); 18567 a.animate(que[0], que[1]); 18568 } 18569 }, 18570 18571 animate(props, params) { 18572 if (a.animating) { 18573 a.que.push([props, params]); 18574 return a; 18575 } 18576 18577 const elements = []; // Define & Cache Initials & Units 18578 18579 a.elements.each((el, index) => { 18580 let initialFullValue; 18581 let initialValue; 18582 let unit; 18583 let finalValue; 18584 let finalFullValue; 18585 if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a; 18586 elements[index] = { 18587 container: el 18588 }; 18589 Object.keys(props).forEach(prop => { 18590 initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.'); 18591 initialValue = parseFloat(initialFullValue); 18592 unit = initialFullValue.replace(initialValue, ''); 18593 finalValue = parseFloat(props[prop]); 18594 finalFullValue = props[prop] + unit; 18595 elements[index][prop] = { 18596 initialFullValue, 18597 initialValue, 18598 unit, 18599 finalValue, 18600 finalFullValue, 18601 currentValue: initialValue 18602 }; 18603 }); 18604 }); 18605 let startTime = null; 18606 let time; 18607 let elementsDone = 0; 18608 let propsDone = 0; 18609 let done; 18610 let began = false; 18611 a.animating = true; 18612 18613 function render() { 18614 time = new Date().getTime(); 18615 let progress; 18616 let easeProgress; // let el; 18617 18618 if (!began) { 18619 began = true; 18620 if (params.begin) params.begin(els); 18621 } 18622 18623 if (startTime === null) { 18624 startTime = time; 18625 } 18626 18627 if (params.progress) { 18628 // eslint-disable-next-line 18629 params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime); 18630 } 18631 18632 elements.forEach(element => { 18633 const el = element; 18634 if (done || el.done) return; 18635 Object.keys(props).forEach(prop => { 18636 if (done || el.done) return; 18637 progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0); 18638 easeProgress = a.easingProgress(params.easing, progress); 18639 const { 18640 initialValue, 18641 finalValue, 18642 unit 18643 } = el[prop]; 18644 el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue); 18645 const currentValue = el[prop].currentValue; 18646 18647 if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) { 18648 el.container.style[prop] = finalValue + unit; 18649 propsDone += 1; 18650 18651 if (propsDone === Object.keys(props).length) { 18652 el.done = true; 18653 elementsDone += 1; 18654 } 18655 18656 if (elementsDone === elements.length) { 18657 done = true; 18658 } 18659 } 18660 18661 if (done) { 18662 a.done(params.complete); 18663 return; 18664 } 18665 18666 el.container.style[prop] = currentValue + unit; 18667 }); 18668 }); 18669 if (done) return; // Then call 18670 18671 a.frameId = window.requestAnimationFrame(render); 18672 } 18673 18674 a.frameId = window.requestAnimationFrame(render); 18675 return a; 18676 } 18677 18678 }; 18679 18680 if (a.elements.length === 0) { 18681 return els; 18682 } 18683 18684 let animateInstance; 18685 18686 for (let i = 0; i < a.elements.length; i += 1) { 18687 if (a.elements[i].dom7AnimateInstance) { 18688 animateInstance = a.elements[i].dom7AnimateInstance; 18689 } else a.elements[i].dom7AnimateInstance = a; 18690 } 18691 18692 if (!animateInstance) { 18693 animateInstance = a; 18694 } 18695 18696 if (initialProps === 'stop') { 18697 animateInstance.stop(); 18698 } else { 18699 animateInstance.animate(a.props, a.params); 18700 } 18701 18702 return els; 18703} 18704 18705function stop() { 18706 const els = this; 18707 18708 for (let i = 0; i < els.length; i += 1) { 18709 if (els[i].dom7AnimateInstance) { 18710 els[i].dom7AnimateInstance.stop(); 18711 } 18712 } 18713} 18714 18715const noTrigger = 'resize scroll'.split(' '); 18716 18717function shortcut(name) { 18718 function eventHandler(...args) { 18719 if (typeof args[0] === 'undefined') { 18720 for (let i = 0; i < this.length; i += 1) { 18721 if (noTrigger.indexOf(name) < 0) { 18722 if (name in this[i]) this[i][name]();else { 18723 $(this[i]).trigger(name); 18724 } 18725 } 18726 } 18727 18728 return this; 18729 } 18730 18731 return this.on(name, ...args); 18732 } 18733 18734 return eventHandler; 18735} 18736 18737const click = shortcut('click'); 18738const blur = shortcut('blur'); 18739const focus = shortcut('focus'); 18740const focusin = shortcut('focusin'); 18741const focusout = shortcut('focusout'); 18742const keyup = shortcut('keyup'); 18743const keydown = shortcut('keydown'); 18744const keypress = shortcut('keypress'); 18745const submit = shortcut('submit'); 18746const change = shortcut('change'); 18747const mousedown = shortcut('mousedown'); 18748const mousemove = shortcut('mousemove'); 18749const mouseup = shortcut('mouseup'); 18750const mouseenter = shortcut('mouseenter'); 18751const mouseleave = shortcut('mouseleave'); 18752const mouseout = shortcut('mouseout'); 18753const mouseover = shortcut('mouseover'); 18754const touchstart = shortcut('touchstart'); 18755const touchend = shortcut('touchend'); 18756const touchmove = shortcut('touchmove'); 18757const resize = shortcut('resize'); 18758const scroll = shortcut('scroll'); 18759 18760/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ($); 18761 18762 18763 18764/***/ }), 18765
vendor: 3,943 bytes, lines 18766-18932
18766/***/ "./node_modules/ssr-window/ssr-window.esm.js": 18767/*!***************************************************!*\ 18768 !*** ./node_modules/ssr-window/ssr-window.esm.js ***! 18769 \***************************************************/ 18770/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 18771 18772"use strict"; 18773__webpack_require__.r(__webpack_exports__); 18774/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18775/* harmony export */ "extend": () => (/* binding */ extend), 18776/* harmony export */ "getDocument": () => (/* binding */ getDocument), 18777/* harmony export */ "getWindow": () => (/* binding */ getWindow), 18778/* harmony export */ "ssrDocument": () => (/* binding */ ssrDocument), 18779/* harmony export */ "ssrWindow": () => (/* binding */ ssrWindow) 18780/* harmony export */ }); 18781/** 18782 * SSR Window 4.0.2 18783 * Better handling for window object in SSR environment 18784 * https://github.com/nolimits4web/ssr-window 18785 * 18786 * Copyright 2021, Vladimir Kharlampidi 18787 * 18788 * Licensed under MIT 18789 * 18790 * Released on: December 13, 2021 18791 */ 18792/* eslint-disable no-param-reassign */ 18793function isObject(obj) { 18794 return (obj !== null && 18795 typeof obj === 'object' && 18796 'constructor' in obj && 18797 obj.constructor === Object); 18798} 18799function extend(target = {}, src = {}) { 18800 Object.keys(src).forEach((key) => { 18801 if (typeof target[key] === 'undefined') 18802 target[key] = src[key]; 18803 else if (isObject(src[key]) && 18804 isObject(target[key]) && 18805 Object.keys(src[key]).length > 0) { 18806 extend(target[key], src[key]); 18807 } 18808 }); 18809} 18810 18811const ssrDocument = { 18812 body: {}, 18813 addEventListener() { }, 18814 removeEventListener() { }, 18815 activeElement: { 18816 blur() { }, 18817 nodeName: '', 18818 }, 18819 querySelector() { 18820 return null; 18821 }, 18822 querySelectorAll() { 18823 return []; 18824 }, 18825 getElementById() { 18826 return null; 18827 }, 18828 createEvent() { 18829 return { 18830 initEvent() { }, 18831 }; 18832 }, 18833 createElement() { 18834 return { 18835 children: [], 18836 childNodes: [], 18837 style: {}, 18838 setAttribute() { }, 18839 getElementsByTagName() { 18840 return []; 18841 }, 18842 }; 18843 }, 18844 createElementNS() { 18845 return {}; 18846 }, 18847 importNode() { 18848 return null; 18849 }, 18850 location: { 18851 hash: '', 18852 host: '', 18853 hostname: '', 18854 href: '', 18855 origin: '', 18856 pathname: '', 18857 protocol: '', 18858 search: '', 18859 }, 18860}; 18861function getDocument() { 18862 const doc = typeof document !== 'undefined' ? document : {}; 18863 extend(doc, ssrDocument); 18864 return doc; 18865} 18866 18867const ssrWindow = { 18868 document: ssrDocument, 18869 navigator: { 18870 userAgent: '', 18871 }, 18872 location: { 18873 hash: '', 18874 host: '', 18875 hostname: '', 18876 href: '', 18877 origin: '', 18878 pathname: '', 18879 protocol: '', 18880 search: '', 18881 }, 18882 history: { 18883 replaceState() { }, 18884 pushState() { }, 18885 go() { }, 18886 back() { }, 18887 }, 18888 CustomEvent: function CustomEvent() { 18889 return this; 18890 }, 18891 addEventListener() { }, 18892 removeEventListener() { }, 18893 getComputedStyle() { 18894 return { 18895 getPropertyValue() { 18896 return ''; 18897 }, 18898 }; 18899 }, 18900 Image() { }, 18901 Date() { }, 18902 screen: {}, 18903 setTimeout() { }, 18904 clearTimeout() { }, 18905 matchMedia() { 18906 return {}; 18907 }, 18908 requestAnimationFrame(callback) { 18909 if (typeof setTimeout === 'undefined') { 18910 callback(); 18911 return null; 18912 } 18913 return setTimeout(callback, 0); 18914 }, 18915 cancelAnimationFrame(id) { 18916 if (typeof setTimeout === 'undefined') { 18917 return; 18918 } 18919 clearTimeout(id); 18920 }, 18921}; 18922function getWindow() { 18923 const win = typeof window !== 'undefined' ? window : {}; 18924 extend(win, ssrWindow); 18925 return win; 18926} 18927 18928 18929 18930 18931/***/ }), 18932
vendor: 1,852 bytes, lines 18933-18987
18933/***/ "./node_modules/swiper/core/breakpoints/getBreakpoint.js": 18934/*!***************************************************************!*\ 18935 !*** ./node_modules/swiper/core/breakpoints/getBreakpoint.js ***! 18936 \***************************************************************/ 18937/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 18938 18939"use strict"; 18940__webpack_require__.r(__webpack_exports__); 18941/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18942/* harmony export */ "default": () => (/* binding */ getBreakpoint) 18943/* harmony export */ }); 18944/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 18945 18946function getBreakpoint(breakpoints, base = 'window', containerEl) { 18947 if (!breakpoints || base === 'container' && !containerEl) return undefined; 18948 let breakpoint = false; 18949 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 18950 const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight; 18951 const points = Object.keys(breakpoints).map(point => { 18952 if (typeof point === 'string' && point.indexOf('@') === 0) { 18953 const minRatio = parseFloat(point.substr(1)); 18954 const value = currentHeight * minRatio; 18955 return { 18956 value, 18957 point 18958 }; 18959 } 18960 18961 return { 18962 value: point, 18963 point 18964 }; 18965 }); 18966 points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); 18967 18968 for (let i = 0; i < points.length; i += 1) { 18969 const { 18970 point, 18971 value 18972 } = points[i]; 18973 18974 if (base === 'window') { 18975 if (window.matchMedia(`(min-width: ${value}px)`).matches) { 18976 breakpoint = point; 18977 } 18978 } else if (value <= containerEl.clientWidth) { 18979 breakpoint = point; 18980 } 18981 } 18982 18983 return breakpoint || 'max'; 18984} 18985 18986/***/ }), 18987
vendor: 1,146 bytes, lines 18988-19009
18988/***/ "./node_modules/swiper/core/breakpoints/index.js": 18989/*!*******************************************************!*\ 18990 !*** ./node_modules/swiper/core/breakpoints/index.js ***! 18991 \*******************************************************/ 18992/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 18993 18994"use strict"; 18995__webpack_require__.r(__webpack_exports__); 18996/* harmony export */ __webpack_require__.d(__webpack_exports__, { 18997/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 18998/* harmony export */ }); 18999/* harmony import */ var _setBreakpoint_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setBreakpoint.js */ "./node_modules/swiper/core/breakpoints/setBreakpoint.js"); 19000/* harmony import */ var _getBreakpoint_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getBreakpoint.js */ "./node_modules/swiper/core/breakpoints/getBreakpoint.js"); 19001 19002 19003/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 19004 setBreakpoint: _setBreakpoint_js__WEBPACK_IMPORTED_MODULE_0__["default"], 19005 getBreakpoint: _getBreakpoint_js__WEBPACK_IMPORTED_MODULE_1__["default"] 19006}); 19007 19008/***/ }), 19009
vendor: 3,316 bytes, lines 19010-19096
19010/***/ "./node_modules/swiper/core/breakpoints/setBreakpoint.js": 19011/*!***************************************************************!*\ 19012 !*** ./node_modules/swiper/core/breakpoints/setBreakpoint.js ***! 19013 \***************************************************************/ 19014/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 19015 19016"use strict"; 19017__webpack_require__.r(__webpack_exports__); 19018/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19019/* harmony export */ "default": () => (/* binding */ setBreakpoint) 19020/* harmony export */ }); 19021/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 19022 19023 19024const isGridEnabled = (swiper, params) => { 19025 return swiper.grid && params.grid && params.grid.rows > 1; 19026}; 19027 19028function setBreakpoint() { 19029 const swiper = this; 19030 const { 19031 activeIndex, 19032 initialized, 19033 loopedSlides = 0, 19034 params, 19035 $el 19036 } = swiper; 19037 const breakpoints = params.breakpoints; 19038 if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters 19039 19040 const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el); 19041 if (!breakpoint || swiper.currentBreakpoint === breakpoint) return; 19042 const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; 19043 const breakpointParams = breakpointOnlyParams || swiper.originalParams; 19044 const wasMultiRow = isGridEnabled(swiper, params); 19045 const isMultiRow = isGridEnabled(swiper, breakpointParams); 19046 const wasEnabled = params.enabled; 19047 19048 if (wasMultiRow && !isMultiRow) { 19049 $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`); 19050 swiper.emitContainerClasses(); 19051 } else if (!wasMultiRow && isMultiRow) { 19052 $el.addClass(`${params.containerModifierClass}grid`); 19053 19054 if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') { 19055 $el.addClass(`${params.containerModifierClass}grid-column`); 19056 } 19057 19058 swiper.emitContainerClasses(); 19059 } 19060 19061 const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; 19062 const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); 19063 19064 if (directionChanged && initialized) { 19065 swiper.changeDirection(); 19066 } 19067 19068 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(swiper.params, breakpointParams); 19069 const isEnabled = swiper.params.enabled; 19070 Object.assign(swiper, { 19071 allowTouchMove: swiper.params.allowTouchMove, 19072 allowSlideNext: swiper.params.allowSlideNext, 19073 allowSlidePrev: swiper.params.allowSlidePrev 19074 }); 19075 19076 if (wasEnabled && !isEnabled) { 19077 swiper.disable(); 19078 } else if (!wasEnabled && isEnabled) { 19079 swiper.enable(); 19080 } 19081 19082 swiper.currentBreakpoint = breakpoint; 19083 swiper.emit('_beforeBreakpoint', breakpointParams); 19084 19085 if (needsReLoop && initialized) { 19086 swiper.loopDestroy(); 19087 swiper.loopCreate(); 19088 swiper.updateSlides(); 19089 swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false); 19090 } 19091 19092 swiper.emit('breakpoint', breakpointParams); 19093} 19094 19095/***/ }), 19096
vendor: 1,521 bytes, lines 19097-19148
19097/***/ "./node_modules/swiper/core/check-overflow/index.js": 19098/*!**********************************************************!*\ 19099 !*** ./node_modules/swiper/core/check-overflow/index.js ***! 19100 \**********************************************************/ 19101/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 19102 19103"use strict"; 19104__webpack_require__.r(__webpack_exports__); 19105/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19106/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 19107/* harmony export */ }); 19108function checkOverflow() { 19109 const swiper = this; 19110 const { 19111 isLocked: wasLocked, 19112 params 19113 } = swiper; 19114 const { 19115 slidesOffsetBefore 19116 } = params; 19117 19118 if (slidesOffsetBefore) { 19119 const lastSlideIndex = swiper.slides.length - 1; 19120 const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; 19121 swiper.isLocked = swiper.size > lastSlideRightEdge; 19122 } else { 19123 swiper.isLocked = swiper.snapGrid.length === 1; 19124 } 19125 19126 if (params.allowSlideNext === true) { 19127 swiper.allowSlideNext = !swiper.isLocked; 19128 } 19129 19130 if (params.allowSlidePrev === true) { 19131 swiper.allowSlidePrev = !swiper.isLocked; 19132 } 19133 19134 if (wasLocked && wasLocked !== swiper.isLocked) { 19135 swiper.isEnd = false; 19136 } 19137 19138 if (wasLocked !== swiper.isLocked) { 19139 swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); 19140 } 19141} 19142 19143/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 19144 checkOverflow 19145}); 19146 19147/***/ }), 19148
vendor: 1,845 bytes, lines 19149-19214
19149/***/ "./node_modules/swiper/core/classes/addClasses.js": 19150/*!********************************************************!*\ 19151 !*** ./node_modules/swiper/core/classes/addClasses.js ***! 19152 \********************************************************/ 19153/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 19154 19155"use strict"; 19156__webpack_require__.r(__webpack_exports__); 19157/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19158/* harmony export */ "default": () => (/* binding */ addClasses) 19159/* harmony export */ }); 19160function prepareClasses(entries, prefix) { 19161 const resultClasses = []; 19162 entries.forEach(item => { 19163 if (typeof item === 'object') { 19164 Object.keys(item).forEach(classNames => { 19165 if (item[classNames]) { 19166 resultClasses.push(prefix + classNames); 19167 } 19168 }); 19169 } else if (typeof item === 'string') { 19170 resultClasses.push(prefix + item); 19171 } 19172 }); 19173 return resultClasses; 19174} 19175 19176function addClasses() { 19177 const swiper = this; 19178 const { 19179 classNames, 19180 params, 19181 rtl, 19182 $el, 19183 device, 19184 support 19185 } = swiper; // prettier-ignore 19186 19187 const suffixes = prepareClasses(['initialized', params.direction, { 19188 'pointer-events': !support.touch 19189 }, { 19190 'free-mode': swiper.params.freeMode && params.freeMode.enabled 19191 }, { 19192 'autoheight': params.autoHeight 19193 }, { 19194 'rtl': rtl 19195 }, { 19196 'grid': params.grid && params.grid.rows > 1 19197 }, { 19198 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column' 19199 }, { 19200 'android': device.android 19201 }, { 19202 'ios': device.ios 19203 }, { 19204 'css-mode': params.cssMode 19205 }, { 19206 'centered': params.cssMode && params.centeredSlides 19207 }], params.containerModifierClass); 19208 classNames.push(...suffixes); 19209 $el.addClass([...classNames].join(' ')); 19210 swiper.emitContainerClasses(); 19211} 19212 19213/***/ }), 19214
vendor: 1,107 bytes, lines 19215-19236
19215/***/ "./node_modules/swiper/core/classes/index.js": 19216/*!***************************************************!*\ 19217 !*** ./node_modules/swiper/core/classes/index.js ***! 19218 \***************************************************/ 19219/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 19220 19221"use strict"; 19222__webpack_require__.r(__webpack_exports__); 19223/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19224/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 19225/* harmony export */ }); 19226/* harmony import */ var _addClasses_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./addClasses.js */ "./node_modules/swiper/core/classes/addClasses.js"); 19227/* harmony import */ var _removeClasses_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeClasses.js */ "./node_modules/swiper/core/classes/removeClasses.js"); 19228 19229 19230/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 19231 addClasses: _addClasses_js__WEBPACK_IMPORTED_MODULE_0__["default"], 19232 removeClasses: _removeClasses_js__WEBPACK_IMPORTED_MODULE_1__["default"] 19233}); 19234 19235/***/ }), 19236
vendor: 753 bytes, lines 19237-19259
19237/***/ "./node_modules/swiper/core/classes/removeClasses.js": 19238/*!***********************************************************!*\ 19239 !*** ./node_modules/swiper/core/classes/removeClasses.js ***! 19240 \***********************************************************/ 19241/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 19242 19243"use strict"; 19244__webpack_require__.r(__webpack_exports__); 19245/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19246/* harmony export */ "default": () => (/* binding */ removeClasses) 19247/* harmony export */ }); 19248function removeClasses() { 19249 const swiper = this; 19250 const { 19251 $el, 19252 classNames 19253 } = swiper; 19254 $el.removeClass(classNames.join(' ')); 19255 swiper.emitContainerClasses(); 19256} 19257 19258/***/ }), 19259
vendor: 21,809 bytes, lines 19260-19905
19260/***/ "./node_modules/swiper/core/core.js": 19261/*!******************************************!*\ 19262 !*** ./node_modules/swiper/core/core.js ***! 19263 \******************************************/ 19264/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 19265 19266"use strict"; 19267__webpack_require__.r(__webpack_exports__); 19268/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19269/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 19270/* harmony export */ }); 19271/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 19272/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 19273/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 19274/* harmony import */ var _shared_get_support_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../shared/get-support.js */ "./node_modules/swiper/shared/get-support.js"); 19275/* harmony import */ var _shared_get_device_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../shared/get-device.js */ "./node_modules/swiper/shared/get-device.js"); 19276/* harmony import */ var _shared_get_browser_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../shared/get-browser.js */ "./node_modules/swiper/shared/get-browser.js"); 19277/* harmony import */ var _modules_resize_resize_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/resize/resize.js */ "./node_modules/swiper/core/modules/resize/resize.js"); 19278/* harmony import */ var _modules_observer_observer_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/observer/observer.js */ "./node_modules/swiper/core/modules/observer/observer.js"); 19279/* harmony import */ var _events_emitter_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./events-emitter.js */ "./node_modules/swiper/core/events-emitter.js"); 19280/* harmony import */ var _update_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./update/index.js */ "./node_modules/swiper/core/update/index.js"); 19281/* harmony import */ var _translate_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./translate/index.js */ "./node_modules/swiper/core/translate/index.js"); 19282/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/swiper/core/transition/index.js"); 19283/* harmony import */ var _slide_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./slide/index.js */ "./node_modules/swiper/core/slide/index.js"); 19284/* harmony import */ var _loop_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./loop/index.js */ "./node_modules/swiper/core/loop/index.js"); 19285/* harmony import */ var _grab_cursor_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./grab-cursor/index.js */ "./node_modules/swiper/core/grab-cursor/index.js"); 19286/* harmony import */ var _events_index_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./events/index.js */ "./node_modules/swiper/core/events/index.js"); 19287/* harmony import */ var _breakpoints_index_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./breakpoints/index.js */ "./node_modules/swiper/core/breakpoints/index.js"); 19288/* harmony import */ var _classes_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./classes/index.js */ "./node_modules/swiper/core/classes/index.js"); 19289/* harmony import */ var _images_index_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./images/index.js */ "./node_modules/swiper/core/images/index.js"); 19290/* harmony import */ var _check_overflow_index_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./check-overflow/index.js */ "./node_modules/swiper/core/check-overflow/index.js"); 19291/* harmony import */ var _defaults_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./defaults.js */ "./node_modules/swiper/core/defaults.js"); 19292/* harmony import */ var _moduleExtendParams_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./moduleExtendParams.js */ "./node_modules/swiper/core/moduleExtendParams.js"); 19293/* eslint no-param-reassign: "off" */ 19294 19295 19296 19297 19298 19299 19300 19301 19302 19303 19304 19305 19306 19307 19308 19309 19310 19311 19312 19313 19314 19315 19316const prototypes = { 19317 eventsEmitter: _events_emitter_js__WEBPACK_IMPORTED_MODULE_8__["default"], 19318 update: _update_index_js__WEBPACK_IMPORTED_MODULE_9__["default"], 19319 translate: _translate_index_js__WEBPACK_IMPORTED_MODULE_10__["default"], 19320 transition: _transition_index_js__WEBPACK_IMPORTED_MODULE_11__["default"], 19321 slide: _slide_index_js__WEBPACK_IMPORTED_MODULE_12__["default"], 19322 loop: _loop_index_js__WEBPACK_IMPORTED_MODULE_13__["default"], 19323 grabCursor: _grab_cursor_index_js__WEBPACK_IMPORTED_MODULE_14__["default"], 19324 events: _events_index_js__WEBPACK_IMPORTED_MODULE_15__["default"], 19325 breakpoints: _breakpoints_index_js__WEBPACK_IMPORTED_MODULE_16__["default"], 19326 checkOverflow: _check_overflow_index_js__WEBPACK_IMPORTED_MODULE_19__["default"], 19327 classes: _classes_index_js__WEBPACK_IMPORTED_MODULE_17__["default"], 19328 images: _images_index_js__WEBPACK_IMPORTED_MODULE_18__["default"] 19329}; 19330const extendedDefaults = {}; 19331 19332class Swiper { 19333 constructor(...args) { 19334 let el; 19335 let params; 19336 19337 if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') { 19338 params = args[0]; 19339 } else { 19340 [el, params] = args; 19341 } 19342 19343 if (!params) params = {}; 19344 params = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, params); 19345 if (el && !params.el) params.el = el; 19346 19347 if (params.el && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.el).length > 1) { 19348 const swipers = []; 19349 (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.el).each(containerEl => { 19350 const newParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, params, { 19351 el: containerEl 19352 }); 19353 swipers.push(new Swiper(newParams)); 19354 }); 19355 return swipers; 19356 } // Swiper Instance 19357 19358 19359 const swiper = this; 19360 swiper.__swiper__ = true; 19361 swiper.support = (0,_shared_get_support_js__WEBPACK_IMPORTED_MODULE_3__.getSupport)(); 19362 swiper.device = (0,_shared_get_device_js__WEBPACK_IMPORTED_MODULE_4__.getDevice)({ 19363 userAgent: params.userAgent 19364 }); 19365 swiper.browser = (0,_shared_get_browser_js__WEBPACK_IMPORTED_MODULE_5__.getBrowser)(); 19366 swiper.eventsListeners = {}; 19367 swiper.eventsAnyListeners = []; 19368 swiper.modules = [...swiper.__modules__]; 19369 19370 if (params.modules && Array.isArray(params.modules)) { 19371 swiper.modules.push(...params.modules); 19372 } 19373 19374 const allModulesParams = {}; 19375 swiper.modules.forEach(mod => { 19376 mod({ 19377 swiper, 19378 extendParams: (0,_moduleExtendParams_js__WEBPACK_IMPORTED_MODULE_21__["default"])(params, allModulesParams), 19379 on: swiper.on.bind(swiper), 19380 once: swiper.once.bind(swiper), 19381 off: swiper.off.bind(swiper), 19382 emit: swiper.emit.bind(swiper) 19383 }); 19384 }); // Extend defaults with modules params 19385 19386 const swiperParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, _defaults_js__WEBPACK_IMPORTED_MODULE_20__["default"], allModulesParams); // Extend defaults with passed params 19387 19388 swiper.params = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, swiperParams, extendedDefaults, params); 19389 swiper.originalParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, swiper.params); 19390 swiper.passedParams = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)({}, params); // add event listeners 19391 19392 if (swiper.params && swiper.params.on) { 19393 Object.keys(swiper.params.on).forEach(eventName => { 19394 swiper.on(eventName, swiper.params.on[eventName]); 19395 }); 19396 } 19397 19398 if (swiper.params && swiper.params.onAny) { 19399 swiper.onAny(swiper.params.onAny); 19400 } // Save Dom lib 19401 19402 19403 swiper.$ = _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"]; // Extend Swiper 19404 19405 Object.assign(swiper, { 19406 enabled: swiper.params.enabled, 19407 el, 19408 // Classes 19409 classNames: [], 19410 // Slides 19411 slides: (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), 19412 slidesGrid: [], 19413 snapGrid: [], 19414 slidesSizesGrid: [], 19415 19416 // isDirection 19417 isHorizontal() { 19418 return swiper.params.direction === 'horizontal'; 19419 }, 19420 19421 isVertical() { 19422 return swiper.params.direction === 'vertical'; 19423 }, 19424 19425 // Indexes 19426 activeIndex: 0, 19427 realIndex: 0, 19428 // 19429 isBeginning: true, 19430 isEnd: false, 19431 // Props 19432 translate: 0, 19433 previousTranslate: 0, 19434 progress: 0, 19435 velocity: 0, 19436 animating: false, 19437 // Locks 19438 allowSlideNext: swiper.params.allowSlideNext, 19439 allowSlidePrev: swiper.params.allowSlidePrev, 19440 // Touch Events 19441 touchEvents: function touchEvents() { 19442 const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; 19443 const desktop = ['pointerdown', 'pointermove', 'pointerup']; 19444 swiper.touchEventsTouch = { 19445 start: touch[0], 19446 move: touch[1], 19447 end: touch[2], 19448 cancel: touch[3] 19449 }; 19450 swiper.touchEventsDesktop = { 19451 start: desktop[0], 19452 move: desktop[1], 19453 end: desktop[2] 19454 }; 19455 return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; 19456 }(), 19457 touchEventsData: { 19458 isTouched: undefined, 19459 isMoved: undefined, 19460 allowTouchCallbacks: undefined, 19461 touchStartTime: undefined, 19462 isScrolling: undefined, 19463 currentTranslate: undefined, 19464 startTranslate: undefined, 19465 allowThresholdMove: undefined, 19466 // Form elements to match 19467 focusableElements: swiper.params.focusableElements, 19468 // Last click time 19469 lastClickTime: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(), 19470 clickTimeout: undefined, 19471 // Velocities 19472 velocities: [], 19473 allowMomentumBounce: undefined, 19474 isTouchEvent: undefined, 19475 startMoving: undefined 19476 }, 19477 // Clicks 19478 allowClick: true, 19479 // Touches 19480 allowTouchMove: swiper.params.allowTouchMove, 19481 touches: { 19482 startX: 0, 19483 startY: 0, 19484 currentX: 0, 19485 currentY: 0, 19486 diff: 0 19487 }, 19488 // Images 19489 imagesToLoad: [], 19490 imagesLoaded: 0 19491 }); 19492 swiper.emit('_swiper'); // Init 19493 19494 if (swiper.params.init) { 19495 swiper.init(); 19496 } // Return app instance 19497 19498 19499 return swiper; 19500 } 19501 19502 enable() { 19503 const swiper = this; 19504 if (swiper.enabled) return; 19505 swiper.enabled = true; 19506 19507 if (swiper.params.grabCursor) { 19508 swiper.setGrabCursor(); 19509 } 19510 19511 swiper.emit('enable'); 19512 } 19513 19514 disable() { 19515 const swiper = this; 19516 if (!swiper.enabled) return; 19517 swiper.enabled = false; 19518 19519 if (swiper.params.grabCursor) { 19520 swiper.unsetGrabCursor(); 19521 } 19522 19523 swiper.emit('disable'); 19524 } 19525 19526 setProgress(progress, speed) { 19527 const swiper = this; 19528 progress = Math.min(Math.max(progress, 0), 1); 19529 const min = swiper.minTranslate(); 19530 const max = swiper.maxTranslate(); 19531 const current = (max - min) * progress + min; 19532 swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed); 19533 swiper.updateActiveIndex(); 19534 swiper.updateSlidesClasses(); 19535 } 19536 19537 emitContainerClasses() { 19538 const swiper = this; 19539 if (!swiper.params._emitClasses || !swiper.el) return; 19540 const cls = swiper.el.className.split(' ').filter(className => { 19541 return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; 19542 }); 19543 swiper.emit('_containerClasses', cls.join(' ')); 19544 } 19545 19546 getSlideClasses(slideEl) { 19547 const swiper = this; 19548 return slideEl.className.split(' ').filter(className => { 19549 return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0; 19550 }).join(' '); 19551 } 19552 19553 emitSlidesClasses() { 19554 const swiper = this; 19555 if (!swiper.params._emitClasses || !swiper.el) return; 19556 const updates = []; 19557 swiper.slides.each(slideEl => { 19558 const classNames = swiper.getSlideClasses(slideEl); 19559 updates.push({ 19560 slideEl, 19561 classNames 19562 }); 19563 swiper.emit('_slideClass', slideEl, classNames); 19564 }); 19565 swiper.emit('_slideClasses', updates); 19566 } 19567 19568 slidesPerViewDynamic(view = 'current', exact = false) { 19569 const swiper = this; 19570 const { 19571 params, 19572 slides, 19573 slidesGrid, 19574 slidesSizesGrid, 19575 size: swiperSize, 19576 activeIndex 19577 } = swiper; 19578 let spv = 1; 19579 19580 if (params.centeredSlides) { 19581 let slideSize = slides[activeIndex].swiperSlideSize; 19582 let breakLoop; 19583 19584 for (let i = activeIndex + 1; i < slides.length; i += 1) { 19585 if (slides[i] && !breakLoop) { 19586 slideSize += slides[i].swiperSlideSize; 19587 spv += 1; 19588 if (slideSize > swiperSize) breakLoop = true; 19589 } 19590 } 19591 19592 for (let i = activeIndex - 1; i >= 0; i -= 1) { 19593 if (slides[i] && !breakLoop) { 19594 slideSize += slides[i].swiperSlideSize; 19595 spv += 1; 19596 if (slideSize > swiperSize) breakLoop = true; 19597 } 19598 } 19599 } else { 19600 // eslint-disable-next-line 19601 if (view === 'current') { 19602 for (let i = activeIndex + 1; i < slides.length; i += 1) { 19603 const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; 19604 19605 if (slideInView) { 19606 spv += 1; 19607 } 19608 } 19609 } else { 19610 // previous 19611 for (let i = activeIndex - 1; i >= 0; i -= 1) { 19612 const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; 19613 19614 if (slideInView) { 19615 spv += 1; 19616 } 19617 } 19618 } 19619 } 19620 19621 return spv; 19622 } 19623 19624 update() { 19625 const swiper = this; 19626 if (!swiper || swiper.destroyed) return; 19627 const { 19628 snapGrid, 19629 params 19630 } = swiper; // Breakpoints 19631 19632 if (params.breakpoints) { 19633 swiper.setBreakpoint(); 19634 } 19635 19636 swiper.updateSize(); 19637 swiper.updateSlides(); 19638 swiper.updateProgress(); 19639 swiper.updateSlidesClasses(); 19640 19641 function setTranslate() { 19642 const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; 19643 const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); 19644 swiper.setTranslate(newTranslate); 19645 swiper.updateActiveIndex(); 19646 swiper.updateSlidesClasses(); 19647 } 19648 19649 let translated; 19650 19651 if (swiper.params.freeMode && swiper.params.freeMode.enabled) { 19652 setTranslate(); 19653 19654 if (swiper.params.autoHeight) { 19655 swiper.updateAutoHeight(); 19656 } 19657 } else { 19658 if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { 19659 translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); 19660 } else { 19661 translated = swiper.slideTo(swiper.activeIndex, 0, false, true); 19662 } 19663 19664 if (!translated) { 19665 setTranslate(); 19666 } 19667 } 19668 19669 if (params.watchOverflow && snapGrid !== swiper.snapGrid) { 19670 swiper.checkOverflow(); 19671 } 19672 19673 swiper.emit('update'); 19674 } 19675 19676 changeDirection(newDirection, needUpdate = true) { 19677 const swiper = this; 19678 const currentDirection = swiper.params.direction; 19679 19680 if (!newDirection) { 19681 // eslint-disable-next-line 19682 newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; 19683 } 19684 19685 if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') { 19686 return swiper; 19687 } 19688 19689 swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`); 19690 swiper.emitContainerClasses(); 19691 swiper.params.direction = newDirection; 19692 swiper.slides.each(slideEl => { 19693 if (newDirection === 'vertical') { 19694 slideEl.style.width = ''; 19695 } else { 19696 slideEl.style.height = ''; 19697 } 19698 }); 19699 swiper.emit('changeDirection'); 19700 if (needUpdate) swiper.update(); 19701 return swiper; 19702 } 19703 19704 mount(el) { 19705 const swiper = this; 19706 if (swiper.mounted) return true; // Find el 19707 19708 const $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el || swiper.params.el); 19709 el = $el[0]; 19710 19711 if (!el) { 19712 return false; 19713 } 19714 19715 el.swiper = swiper; 19716 19717 const getWrapperSelector = () => { 19718 return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`; 19719 }; 19720 19721 const getWrapper = () => { 19722 if (el && el.shadowRoot && el.shadowRoot.querySelector) { 19723 const res = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items 19724 19725 res.children = options => $el.children(options); 19726 19727 return res; 19728 } 19729 19730 return $el.children(getWrapperSelector()); 19731 }; // Find Wrapper 19732 19733 19734 let $wrapperEl = getWrapper(); 19735 19736 if ($wrapperEl.length === 0 && swiper.params.createElements) { 19737 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 19738 const wrapper = document.createElement('div'); 19739 $wrapperEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(wrapper); 19740 wrapper.className = swiper.params.wrapperClass; 19741 $el.append(wrapper); 19742 $el.children(`.${swiper.params.slideClass}`).each(slideEl => { 19743 $wrapperEl.append(slideEl); 19744 }); 19745 } 19746 19747 Object.assign(swiper, { 19748 $el, 19749 el, 19750 $wrapperEl, 19751 wrapperEl: $wrapperEl[0], 19752 mounted: true, 19753 // RTL 19754 rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl', 19755 rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), 19756 wrongRTL: $wrapperEl.css('display') === '-webkit-box' 19757 }); 19758 return true; 19759 } 19760 19761 init(el) { 19762 const swiper = this; 19763 if (swiper.initialized) return swiper; 19764 const mounted = swiper.mount(el); 19765 if (mounted === false) return swiper; 19766 swiper.emit('beforeInit'); // Set breakpoint 19767 19768 if (swiper.params.breakpoints) { 19769 swiper.setBreakpoint(); 19770 } // Add Classes 19771 19772 19773 swiper.addClasses(); // Create loop 19774 19775 if (swiper.params.loop) { 19776 swiper.loopCreate(); 19777 } // Update size 19778 19779 19780 swiper.updateSize(); // Update slides 19781 19782 swiper.updateSlides(); 19783 19784 if (swiper.params.watchOverflow) { 19785 swiper.checkOverflow(); 19786 } // Set Grab Cursor 19787 19788 19789 if (swiper.params.grabCursor && swiper.enabled) { 19790 swiper.setGrabCursor(); 19791 } 19792 19793 if (swiper.params.preloadImages) { 19794 swiper.preloadImages(); 19795 } // Slide To Initial Slide 19796 19797 19798 if (swiper.params.loop) { 19799 swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true); 19800 } else { 19801 swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); 19802 } // Attach events 19803 19804 19805 swiper.attachEvents(); // Init Flag 19806 19807 swiper.initialized = true; // Emit 19808 19809 swiper.emit('init'); 19810 swiper.emit('afterInit'); 19811 return swiper; 19812 } 19813 19814 destroy(deleteInstance = true, cleanStyles = true) { 19815 const swiper = this; 19816 const { 19817 params, 19818 $el, 19819 $wrapperEl, 19820 slides 19821 } = swiper; 19822 19823 if (typeof swiper.params === 'undefined' || swiper.destroyed) { 19824 return null; 19825 } 19826 19827 swiper.emit('beforeDestroy'); // Init Flag 19828 19829 swiper.initialized = false; // Detach events 19830 19831 swiper.detachEvents(); // Destroy loop 19832 19833 if (params.loop) { 19834 swiper.loopDestroy(); 19835 } // Cleanup styles 19836 19837 19838 if (cleanStyles) { 19839 swiper.removeClasses(); 19840 $el.removeAttr('style'); 19841 $wrapperEl.removeAttr('style'); 19842 19843 if (slides && slides.length) { 19844 slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index'); 19845 } 19846 } 19847 19848 swiper.emit('destroy'); // Detach emitter events 19849 19850 Object.keys(swiper.eventsListeners).forEach(eventName => { 19851 swiper.off(eventName); 19852 }); 19853 19854 if (deleteInstance !== false) { 19855 swiper.$el[0].swiper = null; 19856 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.deleteProps)(swiper); 19857 } 19858 19859 swiper.destroyed = true; 19860 return null; 19861 } 19862 19863 static extendDefaults(newDefaults) { 19864 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.extend)(extendedDefaults, newDefaults); 19865 } 19866 19867 static get extendedDefaults() { 19868 return extendedDefaults; 19869 } 19870 19871 static get defaults() { 19872 return _defaults_js__WEBPACK_IMPORTED_MODULE_20__["default"]; 19873 } 19874 19875 static installModule(mod) { 19876 if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = []; 19877 const modules = Swiper.prototype.__modules__; 19878 19879 if (typeof mod === 'function' && modules.indexOf(mod) < 0) { 19880 modules.push(mod); 19881 } 19882 } 19883 19884 static use(module) { 19885 if (Array.isArray(module)) { 19886 module.forEach(m => Swiper.installModule(m)); 19887 return Swiper; 19888 } 19889 19890 Swiper.installModule(module); 19891 return Swiper; 19892 } 19893 19894} 19895 19896Object.keys(prototypes).forEach(prototypeGroup => { 19897 Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => { 19898 Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; 19899 }); 19900}); 19901Swiper.use([_modules_resize_resize_js__WEBPACK_IMPORTED_MODULE_6__["default"], _modules_observer_observer_js__WEBPACK_IMPORTED_MODULE_7__["default"]]); 19902/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Swiper); 19903 19904/***/ }), 19905
vendor: 3,698 bytes, lines 19906-20041
19906/***/ "./node_modules/swiper/core/defaults.js": 19907/*!**********************************************!*\ 19908 !*** ./node_modules/swiper/core/defaults.js ***! 19909 \**********************************************/ 19910/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 19911 19912"use strict"; 19913__webpack_require__.r(__webpack_exports__); 19914/* harmony export */ __webpack_require__.d(__webpack_exports__, { 19915/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 19916/* harmony export */ }); 19917/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 19918 init: true, 19919 direction: 'horizontal', 19920 touchEventsTarget: 'wrapper', 19921 initialSlide: 0, 19922 speed: 300, 19923 cssMode: false, 19924 updateOnWindowResize: true, 19925 resizeObserver: true, 19926 nested: false, 19927 createElements: false, 19928 enabled: true, 19929 focusableElements: 'input, select, option, textarea, button, video, label', 19930 // Overrides 19931 width: null, 19932 height: null, 19933 // 19934 preventInteractionOnTransition: false, 19935 // ssr 19936 userAgent: null, 19937 url: null, 19938 // To support iOS's swipe-to-go-back gesture (when being used in-app). 19939 edgeSwipeDetection: false, 19940 edgeSwipeThreshold: 20, 19941 // Autoheight 19942 autoHeight: false, 19943 // Set wrapper width 19944 setWrapperSize: false, 19945 // Virtual Translate 19946 virtualTranslate: false, 19947 // Effects 19948 effect: 'slide', 19949 // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' 19950 // Breakpoints 19951 breakpoints: undefined, 19952 breakpointsBase: 'window', 19953 // Slides grid 19954 spaceBetween: 0, 19955 slidesPerView: 1, 19956 slidesPerGroup: 1, 19957 slidesPerGroupSkip: 0, 19958 slidesPerGroupAuto: false, 19959 centeredSlides: false, 19960 centeredSlidesBounds: false, 19961 slidesOffsetBefore: 0, 19962 // in px 19963 slidesOffsetAfter: 0, 19964 // in px 19965 normalizeSlideIndex: true, 19966 centerInsufficientSlides: false, 19967 // Disable swiper and hide navigation when container not overflow 19968 watchOverflow: true, 19969 // Round length 19970 roundLengths: false, 19971 // Touches 19972 touchRatio: 1, 19973 touchAngle: 45, 19974 simulateTouch: true, 19975 shortSwipes: true, 19976 longSwipes: true, 19977 longSwipesRatio: 0.5, 19978 longSwipesMs: 300, 19979 followFinger: true, 19980 allowTouchMove: true, 19981 threshold: 0, 19982 touchMoveStopPropagation: false, 19983 touchStartPreventDefault: true, 19984 touchStartForcePreventDefault: false, 19985 touchReleaseOnEdges: false, 19986 // Unique Navigation Elements 19987 uniqueNavElements: true, 19988 // Resistance 19989 resistance: true, 19990 resistanceRatio: 0.85, 19991 // Progress 19992 watchSlidesProgress: false, 19993 // Cursor 19994 grabCursor: false, 19995 // Clicks 19996 preventClicks: true, 19997 preventClicksPropagation: true, 19998 slideToClickedSlide: false, 19999 // Images 20000 preloadImages: true, 20001 updateOnImagesReady: true, 20002 // loop 20003 loop: false, 20004 loopAdditionalSlides: 0, 20005 loopedSlides: null, 20006 loopFillGroupWithBlank: false, 20007 loopPreventsSlide: true, 20008 // rewind 20009 rewind: false, 20010 // Swiping/no swiping 20011 allowSlidePrev: true, 20012 allowSlideNext: true, 20013 swipeHandler: null, 20014 // '.swipe-handler', 20015 noSwiping: true, 20016 noSwipingClass: 'swiper-no-swiping', 20017 noSwipingSelector: null, 20018 // Passive Listeners 20019 passiveListeners: true, 20020 // NS 20021 containerModifierClass: 'swiper-', 20022 // NEW 20023 slideClass: 'swiper-slide', 20024 slideBlankClass: 'swiper-slide-invisible-blank', 20025 slideActiveClass: 'swiper-slide-active', 20026 slideDuplicateActiveClass: 'swiper-slide-duplicate-active', 20027 slideVisibleClass: 'swiper-slide-visible', 20028 slideDuplicateClass: 'swiper-slide-duplicate', 20029 slideNextClass: 'swiper-slide-next', 20030 slideDuplicateNextClass: 'swiper-slide-duplicate-next', 20031 slidePrevClass: 'swiper-slide-prev', 20032 slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', 20033 wrapperClass: 'swiper-wrapper', 20034 // Callbacks 20035 runCallbacksOnInit: true, 20036 // Internals 20037 _emitClasses: false 20038}); 20039 20040/***/ }), 20041
vendor: 3,523 bytes, lines 20042-20163
20042/***/ "./node_modules/swiper/core/events-emitter.js": 20043/*!****************************************************!*\ 20044 !*** ./node_modules/swiper/core/events-emitter.js ***! 20045 \****************************************************/ 20046/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20047 20048"use strict"; 20049__webpack_require__.r(__webpack_exports__); 20050/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20051/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 20052/* harmony export */ }); 20053/* eslint-disable no-underscore-dangle */ 20054/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 20055 on(events, handler, priority) { 20056 const self = this; 20057 if (typeof handler !== 'function') return self; 20058 const method = priority ? 'unshift' : 'push'; 20059 events.split(' ').forEach(event => { 20060 if (!self.eventsListeners[event]) self.eventsListeners[event] = []; 20061 self.eventsListeners[event][method](handler); 20062 }); 20063 return self; 20064 }, 20065 20066 once(events, handler, priority) { 20067 const self = this; 20068 if (typeof handler !== 'function') return self; 20069 20070 function onceHandler(...args) { 20071 self.off(events, onceHandler); 20072 20073 if (onceHandler.__emitterProxy) { 20074 delete onceHandler.__emitterProxy; 20075 } 20076 20077 handler.apply(self, args); 20078 } 20079 20080 onceHandler.__emitterProxy = handler; 20081 return self.on(events, onceHandler, priority); 20082 }, 20083 20084 onAny(handler, priority) { 20085 const self = this; 20086 if (typeof handler !== 'function') return self; 20087 const method = priority ? 'unshift' : 'push'; 20088 20089 if (self.eventsAnyListeners.indexOf(handler) < 0) { 20090 self.eventsAnyListeners[method](handler); 20091 } 20092 20093 return self; 20094 }, 20095 20096 offAny(handler) { 20097 const self = this; 20098 if (!self.eventsAnyListeners) return self; 20099 const index = self.eventsAnyListeners.indexOf(handler); 20100 20101 if (index >= 0) { 20102 self.eventsAnyListeners.splice(index, 1); 20103 } 20104 20105 return self; 20106 }, 20107 20108 off(events, handler) { 20109 const self = this; 20110 if (!self.eventsListeners) return self; 20111 events.split(' ').forEach(event => { 20112 if (typeof handler === 'undefined') { 20113 self.eventsListeners[event] = []; 20114 } else if (self.eventsListeners[event]) { 20115 self.eventsListeners[event].forEach((eventHandler, index) => { 20116 if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { 20117 self.eventsListeners[event].splice(index, 1); 20118 } 20119 }); 20120 } 20121 }); 20122 return self; 20123 }, 20124 20125 emit(...args) { 20126 const self = this; 20127 if (!self.eventsListeners) return self; 20128 let events; 20129 let data; 20130 let context; 20131 20132 if (typeof args[0] === 'string' || Array.isArray(args[0])) { 20133 events = args[0]; 20134 data = args.slice(1, args.length); 20135 context = self; 20136 } else { 20137 events = args[0].events; 20138 data = args[0].data; 20139 context = args[0].context || self; 20140 } 20141 20142 data.unshift(context); 20143 const eventsArray = Array.isArray(events) ? events : events.split(' '); 20144 eventsArray.forEach(event => { 20145 if (self.eventsAnyListeners && self.eventsAnyListeners.length) { 20146 self.eventsAnyListeners.forEach(eventHandler => { 20147 eventHandler.apply(context, [event, ...data]); 20148 }); 20149 } 20150 20151 if (self.eventsListeners && self.eventsListeners[event]) { 20152 self.eventsListeners[event].forEach(eventHandler => { 20153 eventHandler.apply(context, data); 20154 }); 20155 } 20156 }); 20157 return self; 20158 } 20159 20160}); 20161 20162/***/ }), 20163
vendor: 4,561 bytes, lines 20164-20281
20164/***/ "./node_modules/swiper/core/events/index.js": 20165/*!**************************************************!*\ 20166 !*** ./node_modules/swiper/core/events/index.js ***! 20167 \**************************************************/ 20168/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20169 20170"use strict"; 20171__webpack_require__.r(__webpack_exports__); 20172/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20173/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 20174/* harmony export */ }); 20175/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 20176/* harmony import */ var _onTouchStart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./onTouchStart.js */ "./node_modules/swiper/core/events/onTouchStart.js"); 20177/* harmony import */ var _onTouchMove_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./onTouchMove.js */ "./node_modules/swiper/core/events/onTouchMove.js"); 20178/* harmony import */ var _onTouchEnd_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./onTouchEnd.js */ "./node_modules/swiper/core/events/onTouchEnd.js"); 20179/* harmony import */ var _onResize_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./onResize.js */ "./node_modules/swiper/core/events/onResize.js"); 20180/* harmony import */ var _onClick_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./onClick.js */ "./node_modules/swiper/core/events/onClick.js"); 20181/* harmony import */ var _onScroll_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./onScroll.js */ "./node_modules/swiper/core/events/onScroll.js"); 20182 20183 20184 20185 20186 20187 20188 20189let dummyEventAttached = false; 20190 20191function dummyEventListener() {} 20192 20193const events = (swiper, method) => { 20194 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 20195 const { 20196 params, 20197 touchEvents, 20198 el, 20199 wrapperEl, 20200 device, 20201 support 20202 } = swiper; 20203 const capture = !!params.nested; 20204 const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; 20205 const swiperMethod = method; // Touch Events 20206 20207 if (!support.touch) { 20208 el[domMethod](touchEvents.start, swiper.onTouchStart, false); 20209 document[domMethod](touchEvents.move, swiper.onTouchMove, capture); 20210 document[domMethod](touchEvents.end, swiper.onTouchEnd, false); 20211 } else { 20212 const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? { 20213 passive: true, 20214 capture: false 20215 } : false; 20216 el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener); 20217 el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? { 20218 passive: false, 20219 capture 20220 } : capture); 20221 el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener); 20222 20223 if (touchEvents.cancel) { 20224 el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener); 20225 } 20226 } // Prevent Links Clicks 20227 20228 20229 if (params.preventClicks || params.preventClicksPropagation) { 20230 el[domMethod]('click', swiper.onClick, true); 20231 } 20232 20233 if (params.cssMode) { 20234 wrapperEl[domMethod]('scroll', swiper.onScroll); 20235 } // Resize handler 20236 20237 20238 if (params.updateOnWindowResize) { 20239 swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', _onResize_js__WEBPACK_IMPORTED_MODULE_4__["default"], true); 20240 } else { 20241 swiper[swiperMethod]('observerUpdate', _onResize_js__WEBPACK_IMPORTED_MODULE_4__["default"], true); 20242 } 20243}; 20244 20245function attachEvents() { 20246 const swiper = this; 20247 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 20248 const { 20249 params, 20250 support 20251 } = swiper; 20252 swiper.onTouchStart = _onTouchStart_js__WEBPACK_IMPORTED_MODULE_1__["default"].bind(swiper); 20253 swiper.onTouchMove = _onTouchMove_js__WEBPACK_IMPORTED_MODULE_2__["default"].bind(swiper); 20254 swiper.onTouchEnd = _onTouchEnd_js__WEBPACK_IMPORTED_MODULE_3__["default"].bind(swiper); 20255 20256 if (params.cssMode) { 20257 swiper.onScroll = _onScroll_js__WEBPACK_IMPORTED_MODULE_6__["default"].bind(swiper); 20258 } 20259 20260 swiper.onClick = _onClick_js__WEBPACK_IMPORTED_MODULE_5__["default"].bind(swiper); 20261 20262 if (support.touch && !dummyEventAttached) { 20263 document.addEventListener('touchstart', dummyEventListener); 20264 dummyEventAttached = true; 20265 } 20266 20267 events(swiper, 'on'); 20268} 20269 20270function detachEvents() { 20271 const swiper = this; 20272 events(swiper, 'off'); 20273} 20274 20275/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 20276 attachEvents, 20277 detachEvents 20278}); 20279 20280/***/ }), 20281
vendor: 853 bytes, lines 20282-20308
20282/***/ "./node_modules/swiper/core/events/onClick.js": 20283/*!****************************************************!*\ 20284 !*** ./node_modules/swiper/core/events/onClick.js ***! 20285 \****************************************************/ 20286/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20287 20288"use strict"; 20289__webpack_require__.r(__webpack_exports__); 20290/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20291/* harmony export */ "default": () => (/* binding */ onClick) 20292/* harmony export */ }); 20293function onClick(e) { 20294 const swiper = this; 20295 if (!swiper.enabled) return; 20296 20297 if (!swiper.allowClick) { 20298 if (swiper.params.preventClicks) e.preventDefault(); 20299 20300 if (swiper.params.preventClicksPropagation && swiper.animating) { 20301 e.stopPropagation(); 20302 e.stopImmediatePropagation(); 20303 } 20304 } 20305} 20306 20307/***/ }), 20308
vendor: 1,627 bytes, lines 20309-20365
20309/***/ "./node_modules/swiper/core/events/onResize.js": 20310/*!*****************************************************!*\ 20311 !*** ./node_modules/swiper/core/events/onResize.js ***! 20312 \*****************************************************/ 20313/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20314 20315"use strict"; 20316__webpack_require__.r(__webpack_exports__); 20317/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20318/* harmony export */ "default": () => (/* binding */ onResize) 20319/* harmony export */ }); 20320function onResize() { 20321 const swiper = this; 20322 const { 20323 params, 20324 el 20325 } = swiper; 20326 if (el && el.offsetWidth === 0) return; // Breakpoints 20327 20328 if (params.breakpoints) { 20329 swiper.setBreakpoint(); 20330 } // Save locks 20331 20332 20333 const { 20334 allowSlideNext, 20335 allowSlidePrev, 20336 snapGrid 20337 } = swiper; // Disable locks on resize 20338 20339 swiper.allowSlideNext = true; 20340 swiper.allowSlidePrev = true; 20341 swiper.updateSize(); 20342 swiper.updateSlides(); 20343 swiper.updateSlidesClasses(); 20344 20345 if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) { 20346 swiper.slideTo(swiper.slides.length - 1, 0, false, true); 20347 } else { 20348 swiper.slideTo(swiper.activeIndex, 0, false, true); 20349 } 20350 20351 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 20352 swiper.autoplay.run(); 20353 } // Return locks after resize 20354 20355 20356 swiper.allowSlidePrev = allowSlidePrev; 20357 swiper.allowSlideNext = allowSlideNext; 20358 20359 if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { 20360 swiper.checkOverflow(); 20361 } 20362} 20363 20364/***/ }), 20365
vendor: 1,440 bytes, lines 20366-20414
20366/***/ "./node_modules/swiper/core/events/onScroll.js": 20367/*!*****************************************************!*\ 20368 !*** ./node_modules/swiper/core/events/onScroll.js ***! 20369 \*****************************************************/ 20370/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20371 20372"use strict"; 20373__webpack_require__.r(__webpack_exports__); 20374/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20375/* harmony export */ "default": () => (/* binding */ onScroll) 20376/* harmony export */ }); 20377function onScroll() { 20378 const swiper = this; 20379 const { 20380 wrapperEl, 20381 rtlTranslate, 20382 enabled 20383 } = swiper; 20384 if (!enabled) return; 20385 swiper.previousTranslate = swiper.translate; 20386 20387 if (swiper.isHorizontal()) { 20388 swiper.translate = -wrapperEl.scrollLeft; 20389 } else { 20390 swiper.translate = -wrapperEl.scrollTop; 20391 } // eslint-disable-next-line 20392 20393 20394 if (swiper.translate === -0) swiper.translate = 0; 20395 swiper.updateActiveIndex(); 20396 swiper.updateSlidesClasses(); 20397 let newProgress; 20398 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 20399 20400 if (translatesDiff === 0) { 20401 newProgress = 0; 20402 } else { 20403 newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; 20404 } 20405 20406 if (newProgress !== swiper.progress) { 20407 swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); 20408 } 20409 20410 swiper.emit('setTranslate', swiper.translate, false); 20411} 20412 20413/***/ }), 20414
vendor: 4,848 bytes, lines 20415-20573
20415/***/ "./node_modules/swiper/core/events/onTouchEnd.js": 20416/*!*******************************************************!*\ 20417 !*** ./node_modules/swiper/core/events/onTouchEnd.js ***! 20418 \*******************************************************/ 20419/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20420 20421"use strict"; 20422__webpack_require__.r(__webpack_exports__); 20423/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20424/* harmony export */ "default": () => (/* binding */ onTouchEnd) 20425/* harmony export */ }); 20426/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 20427 20428function onTouchEnd(event) { 20429 const swiper = this; 20430 const data = swiper.touchEventsData; 20431 const { 20432 params, 20433 touches, 20434 rtlTranslate: rtl, 20435 slidesGrid, 20436 enabled 20437 } = swiper; 20438 if (!enabled) return; 20439 let e = event; 20440 if (e.originalEvent) e = e.originalEvent; 20441 20442 if (data.allowTouchCallbacks) { 20443 swiper.emit('touchEnd', e); 20444 } 20445 20446 data.allowTouchCallbacks = false; 20447 20448 if (!data.isTouched) { 20449 if (data.isMoved && params.grabCursor) { 20450 swiper.setGrabCursor(false); 20451 } 20452 20453 data.isMoved = false; 20454 data.startMoving = false; 20455 return; 20456 } // Return Grab Cursor 20457 20458 20459 if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 20460 swiper.setGrabCursor(false); 20461 } // Time diff 20462 20463 20464 const touchEndTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)(); 20465 const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click 20466 20467 if (swiper.allowClick) { 20468 const pathTree = e.path || e.composedPath && e.composedPath(); 20469 swiper.updateClickedSlide(pathTree && pathTree[0] || e.target); 20470 swiper.emit('tap click', e); 20471 20472 if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { 20473 swiper.emit('doubleTap doubleClick', e); 20474 } 20475 } 20476 20477 data.lastClickTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)(); 20478 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { 20479 if (!swiper.destroyed) swiper.allowClick = true; 20480 }); 20481 20482 if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { 20483 data.isTouched = false; 20484 data.isMoved = false; 20485 data.startMoving = false; 20486 return; 20487 } 20488 20489 data.isTouched = false; 20490 data.isMoved = false; 20491 data.startMoving = false; 20492 let currentPos; 20493 20494 if (params.followFinger) { 20495 currentPos = rtl ? swiper.translate : -swiper.translate; 20496 } else { 20497 currentPos = -data.currentTranslate; 20498 } 20499 20500 if (params.cssMode) { 20501 return; 20502 } 20503 20504 if (swiper.params.freeMode && params.freeMode.enabled) { 20505 swiper.freeMode.onTouchEnd({ 20506 currentPos 20507 }); 20508 return; 20509 } // Find current slide 20510 20511 20512 let stopIndex = 0; 20513 let groupSize = swiper.slidesSizesGrid[0]; 20514 20515 for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { 20516 const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 20517 20518 if (typeof slidesGrid[i + increment] !== 'undefined') { 20519 if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) { 20520 stopIndex = i; 20521 groupSize = slidesGrid[i + increment] - slidesGrid[i]; 20522 } 20523 } else if (currentPos >= slidesGrid[i]) { 20524 stopIndex = i; 20525 groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; 20526 } 20527 } // Find current slide size 20528 20529 20530 const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; 20531 const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 20532 20533 if (timeDiff > params.longSwipesMs) { 20534 // Long touches 20535 if (!params.longSwipes) { 20536 swiper.slideTo(swiper.activeIndex); 20537 return; 20538 } 20539 20540 if (swiper.swipeDirection === 'next') { 20541 if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex); 20542 } 20543 20544 if (swiper.swipeDirection === 'prev') { 20545 if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex); 20546 } 20547 } else { 20548 // Short swipes 20549 if (!params.shortSwipes) { 20550 swiper.slideTo(swiper.activeIndex); 20551 return; 20552 } 20553 20554 const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); 20555 20556 if (!isNavButtonTarget) { 20557 if (swiper.swipeDirection === 'next') { 20558 swiper.slideTo(stopIndex + increment); 20559 } 20560 20561 if (swiper.swipeDirection === 'prev') { 20562 swiper.slideTo(stopIndex); 20563 } 20564 } else if (e.target === swiper.navigation.nextEl) { 20565 swiper.slideTo(stopIndex + increment); 20566 } else { 20567 swiper.slideTo(stopIndex); 20568 } 20569 } 20570} 20571 20572/***/ }), 20573
vendor: 7,731 bytes, lines 20574-20812
20574/***/ "./node_modules/swiper/core/events/onTouchMove.js": 20575/*!********************************************************!*\ 20576 !*** ./node_modules/swiper/core/events/onTouchMove.js ***! 20577 \********************************************************/ 20578/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20579 20580"use strict"; 20581__webpack_require__.r(__webpack_exports__); 20582/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20583/* harmony export */ "default": () => (/* binding */ onTouchMove) 20584/* harmony export */ }); 20585/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 20586/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 20587/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 20588 20589 20590 20591function onTouchMove(event) { 20592 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 20593 const swiper = this; 20594 const data = swiper.touchEventsData; 20595 const { 20596 params, 20597 touches, 20598 rtlTranslate: rtl, 20599 enabled 20600 } = swiper; 20601 if (!enabled) return; 20602 let e = event; 20603 if (e.originalEvent) e = e.originalEvent; 20604 20605 if (!data.isTouched) { 20606 if (data.startMoving && data.isScrolling) { 20607 swiper.emit('touchMoveOpposite', e); 20608 } 20609 20610 return; 20611 } 20612 20613 if (data.isTouchEvent && e.type !== 'touchmove') return; 20614 const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); 20615 const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX; 20616 const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY; 20617 20618 if (e.preventedByNestedSwiper) { 20619 touches.startX = pageX; 20620 touches.startY = pageY; 20621 return; 20622 } 20623 20624 if (!swiper.allowTouchMove) { 20625 // isMoved = true; 20626 swiper.allowClick = false; 20627 20628 if (data.isTouched) { 20629 Object.assign(touches, { 20630 startX: pageX, 20631 startY: pageY, 20632 currentX: pageX, 20633 currentY: pageY 20634 }); 20635 data.touchStartTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(); 20636 } 20637 20638 return; 20639 } 20640 20641 if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { 20642 if (swiper.isVertical()) { 20643 // Vertical 20644 if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { 20645 data.isTouched = false; 20646 data.isMoved = false; 20647 return; 20648 } 20649 } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { 20650 return; 20651 } 20652 } 20653 20654 if (data.isTouchEvent && document.activeElement) { 20655 if (e.target === document.activeElement && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target).is(data.focusableElements)) { 20656 data.isMoved = true; 20657 swiper.allowClick = false; 20658 return; 20659 } 20660 } 20661 20662 if (data.allowTouchCallbacks) { 20663 swiper.emit('touchMove', e); 20664 } 20665 20666 if (e.targetTouches && e.targetTouches.length > 1) return; 20667 touches.currentX = pageX; 20668 touches.currentY = pageY; 20669 const diffX = touches.currentX - touches.startX; 20670 const diffY = touches.currentY - touches.startY; 20671 if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return; 20672 20673 if (typeof data.isScrolling === 'undefined') { 20674 let touchAngle; 20675 20676 if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { 20677 data.isScrolling = false; 20678 } else { 20679 // eslint-disable-next-line 20680 if (diffX * diffX + diffY * diffY >= 25) { 20681 touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; 20682 data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; 20683 } 20684 } 20685 } 20686 20687 if (data.isScrolling) { 20688 swiper.emit('touchMoveOpposite', e); 20689 } 20690 20691 if (typeof data.startMoving === 'undefined') { 20692 if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { 20693 data.startMoving = true; 20694 } 20695 } 20696 20697 if (data.isScrolling) { 20698 data.isTouched = false; 20699 return; 20700 } 20701 20702 if (!data.startMoving) { 20703 return; 20704 } 20705 20706 swiper.allowClick = false; 20707 20708 if (!params.cssMode && e.cancelable) { 20709 e.preventDefault(); 20710 } 20711 20712 if (params.touchMoveStopPropagation && !params.nested) { 20713 e.stopPropagation(); 20714 } 20715 20716 if (!data.isMoved) { 20717 if (params.loop && !params.cssMode) { 20718 swiper.loopFix(); 20719 } 20720 20721 data.startTranslate = swiper.getTranslate(); 20722 swiper.setTransition(0); 20723 20724 if (swiper.animating) { 20725 swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); 20726 } 20727 20728 data.allowMomentumBounce = false; // Grab Cursor 20729 20730 if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 20731 swiper.setGrabCursor(true); 20732 } 20733 20734 swiper.emit('sliderFirstMove', e); 20735 } 20736 20737 swiper.emit('sliderMove', e); 20738 data.isMoved = true; 20739 let diff = swiper.isHorizontal() ? diffX : diffY; 20740 touches.diff = diff; 20741 diff *= params.touchRatio; 20742 if (rtl) diff = -diff; 20743 swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; 20744 data.currentTranslate = diff + data.startTranslate; 20745 let disableParentSwiper = true; 20746 let resistanceRatio = params.resistanceRatio; 20747 20748 if (params.touchReleaseOnEdges) { 20749 resistanceRatio = 0; 20750 } 20751 20752 if (diff > 0 && data.currentTranslate > swiper.minTranslate()) { 20753 disableParentSwiper = false; 20754 if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; 20755 } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { 20756 disableParentSwiper = false; 20757 if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; 20758 } 20759 20760 if (disableParentSwiper) { 20761 e.preventedByNestedSwiper = true; 20762 } // Directions locks 20763 20764 20765 if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { 20766 data.currentTranslate = data.startTranslate; 20767 } 20768 20769 if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { 20770 data.currentTranslate = data.startTranslate; 20771 } 20772 20773 if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { 20774 data.currentTranslate = data.startTranslate; 20775 } // Threshold 20776 20777 20778 if (params.threshold > 0) { 20779 if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { 20780 if (!data.allowThresholdMove) { 20781 data.allowThresholdMove = true; 20782 touches.startX = touches.currentX; 20783 touches.startY = touches.currentY; 20784 data.currentTranslate = data.startTranslate; 20785 touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; 20786 return; 20787 } 20788 } else { 20789 data.currentTranslate = data.startTranslate; 20790 return; 20791 } 20792 } 20793 20794 if (!params.followFinger || params.cssMode) return; // Update active index in free mode 20795 20796 if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { 20797 swiper.updateActiveIndex(); 20798 swiper.updateSlidesClasses(); 20799 } 20800 20801 if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) { 20802 swiper.freeMode.onTouchMove(); 20803 } // Update progress 20804 20805 20806 swiper.updateProgress(data.currentTranslate); // Update translate 20807 20808 swiper.setTranslate(data.currentTranslate); 20809} 20810 20811/***/ }), 20812
vendor: 5,322 bytes, lines 20813-20943
20813/***/ "./node_modules/swiper/core/events/onTouchStart.js": 20814/*!*********************************************************!*\ 20815 !*** ./node_modules/swiper/core/events/onTouchStart.js ***! 20816 \*********************************************************/ 20817/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20818 20819"use strict"; 20820__webpack_require__.r(__webpack_exports__); 20821/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20822/* harmony export */ "default": () => (/* binding */ onTouchStart) 20823/* harmony export */ }); 20824/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 20825/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 20826/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 20827 20828 20829 // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd 20830 20831function closestElement(selector, base = this) { 20832 function __closestFrom(el) { 20833 if (!el || el === (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)() || el === (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)()) return null; 20834 if (el.assignedSlot) el = el.assignedSlot; 20835 const found = el.closest(selector); 20836 return found || __closestFrom(el.getRootNode().host); 20837 } 20838 20839 return __closestFrom(base); 20840} 20841 20842function onTouchStart(event) { 20843 const swiper = this; 20844 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 20845 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 20846 const data = swiper.touchEventsData; 20847 const { 20848 params, 20849 touches, 20850 enabled 20851 } = swiper; 20852 if (!enabled) return; 20853 20854 if (swiper.animating && params.preventInteractionOnTransition) { 20855 return; 20856 } 20857 20858 if (!swiper.animating && params.cssMode && params.loop) { 20859 swiper.loopFix(); 20860 } 20861 20862 let e = event; 20863 if (e.originalEvent) e = e.originalEvent; 20864 let $targetEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target); 20865 20866 if (params.touchEventsTarget === 'wrapper') { 20867 if (!$targetEl.closest(swiper.wrapperEl).length) return; 20868 } 20869 20870 data.isTouchEvent = e.type === 'touchstart'; 20871 if (!data.isTouchEvent && 'which' in e && e.which === 3) return; 20872 if (!data.isTouchEvent && 'button' in e && e.button > 0) return; 20873 if (data.isTouched && data.isMoved) return; // change target el for shadow root component 20874 20875 const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; 20876 20877 if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) { 20878 $targetEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(event.path[0]); 20879 } 20880 20881 const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; 20882 const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element 20883 20884 if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) { 20885 swiper.allowClick = true; 20886 return; 20887 } 20888 20889 if (params.swipeHandler) { 20890 if (!$targetEl.closest(params.swipeHandler)[0]) return; 20891 } 20892 20893 touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; 20894 touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; 20895 const startX = touches.currentX; 20896 const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore 20897 20898 const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; 20899 const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; 20900 20901 if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) { 20902 if (edgeSwipeDetection === 'prevent') { 20903 event.preventDefault(); 20904 } else { 20905 return; 20906 } 20907 } 20908 20909 Object.assign(data, { 20910 isTouched: true, 20911 isMoved: false, 20912 allowTouchCallbacks: true, 20913 isScrolling: undefined, 20914 startMoving: undefined 20915 }); 20916 touches.startX = startX; 20917 touches.startY = startY; 20918 data.touchStartTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(); 20919 swiper.allowClick = true; 20920 swiper.updateSize(); 20921 swiper.swipeDirection = undefined; 20922 if (params.threshold > 0) data.allowThresholdMove = false; 20923 20924 if (e.type !== 'touchstart') { 20925 let preventDefault = true; 20926 if ($targetEl.is(data.focusableElements)) preventDefault = false; 20927 20928 if (document.activeElement && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) { 20929 document.activeElement.blur(); 20930 } 20931 20932 const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; 20933 20934 if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) { 20935 e.preventDefault(); 20936 } 20937 } 20938 20939 swiper.emit('touchStart', e); 20940} 20941 20942/***/ }), 20943
vendor: 1,156 bytes, lines 20944-20965
20944/***/ "./node_modules/swiper/core/grab-cursor/index.js": 20945/*!*******************************************************!*\ 20946 !*** ./node_modules/swiper/core/grab-cursor/index.js ***! 20947 \*******************************************************/ 20948/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20949 20950"use strict"; 20951__webpack_require__.r(__webpack_exports__); 20952/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20953/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 20954/* harmony export */ }); 20955/* harmony import */ var _setGrabCursor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setGrabCursor.js */ "./node_modules/swiper/core/grab-cursor/setGrabCursor.js"); 20956/* harmony import */ var _unsetGrabCursor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./unsetGrabCursor.js */ "./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js"); 20957 20958 20959/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 20960 setGrabCursor: _setGrabCursor_js__WEBPACK_IMPORTED_MODULE_0__["default"], 20961 unsetGrabCursor: _unsetGrabCursor_js__WEBPACK_IMPORTED_MODULE_1__["default"] 20962}); 20963 20964/***/ }), 20965
vendor: 1,092 bytes, lines 20966-20988
20966/***/ "./node_modules/swiper/core/grab-cursor/setGrabCursor.js": 20967/*!***************************************************************!*\ 20968 !*** ./node_modules/swiper/core/grab-cursor/setGrabCursor.js ***! 20969 \***************************************************************/ 20970/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20971 20972"use strict"; 20973__webpack_require__.r(__webpack_exports__); 20974/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20975/* harmony export */ "default": () => (/* binding */ setGrabCursor) 20976/* harmony export */ }); 20977function setGrabCursor(moving) { 20978 const swiper = this; 20979 if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; 20980 const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl; 20981 el.style.cursor = 'move'; 20982 el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; 20983 el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; 20984 el.style.cursor = moving ? 'grabbing' : 'grab'; 20985} 20986 20987/***/ }), 20988
vendor: 880 bytes, lines 20989-21011
20989/***/ "./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js": 20990/*!*****************************************************************!*\ 20991 !*** ./node_modules/swiper/core/grab-cursor/unsetGrabCursor.js ***! 20992 \*****************************************************************/ 20993/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 20994 20995"use strict"; 20996__webpack_require__.r(__webpack_exports__); 20997/* harmony export */ __webpack_require__.d(__webpack_exports__, { 20998/* harmony export */ "default": () => (/* binding */ unsetGrabCursor) 20999/* harmony export */ }); 21000function unsetGrabCursor() { 21001 const swiper = this; 21002 21003 if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { 21004 return; 21005 } 21006 21007 swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = ''; 21008} 21009 21010/***/ }), 21011
vendor: 1,096 bytes, lines 21012-21033
21012/***/ "./node_modules/swiper/core/images/index.js": 21013/*!**************************************************!*\ 21014 !*** ./node_modules/swiper/core/images/index.js ***! 21015 \**************************************************/ 21016/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21017 21018"use strict"; 21019__webpack_require__.r(__webpack_exports__); 21020/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21021/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 21022/* harmony export */ }); 21023/* harmony import */ var _loadImage_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loadImage.js */ "./node_modules/swiper/core/images/loadImage.js"); 21024/* harmony import */ var _preloadImages_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./preloadImages.js */ "./node_modules/swiper/core/images/preloadImages.js"); 21025 21026 21027/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 21028 loadImage: _loadImage_js__WEBPACK_IMPORTED_MODULE_0__["default"], 21029 preloadImages: _preloadImages_js__WEBPACK_IMPORTED_MODULE_1__["default"] 21030}); 21031 21032/***/ }), 21033
vendor: 1,644 bytes, lines 21034-21086
21034/***/ "./node_modules/swiper/core/images/loadImage.js": 21035/*!******************************************************!*\ 21036 !*** ./node_modules/swiper/core/images/loadImage.js ***! 21037 \******************************************************/ 21038/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21039 21040"use strict"; 21041__webpack_require__.r(__webpack_exports__); 21042/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21043/* harmony export */ "default": () => (/* binding */ loadImage) 21044/* harmony export */ }); 21045/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 21046/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 21047 21048 21049function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) { 21050 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 21051 let image; 21052 21053 function onReady() { 21054 if (callback) callback(); 21055 } 21056 21057 const isPicture = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(imageEl).parent('picture')[0]; 21058 21059 if (!isPicture && (!imageEl.complete || !checkForComplete)) { 21060 if (src) { 21061 image = new window.Image(); 21062 image.onload = onReady; 21063 image.onerror = onReady; 21064 21065 if (sizes) { 21066 image.sizes = sizes; 21067 } 21068 21069 if (srcset) { 21070 image.srcset = srcset; 21071 } 21072 21073 if (src) { 21074 image.src = src; 21075 } 21076 } else { 21077 onReady(); 21078 } 21079 } else { 21080 // image already loaded... 21081 onReady(); 21082 } 21083} 21084 21085/***/ }), 21086
vendor: 1,338 bytes, lines 21087-21119
21087/***/ "./node_modules/swiper/core/images/preloadImages.js": 21088/*!**********************************************************!*\ 21089 !*** ./node_modules/swiper/core/images/preloadImages.js ***! 21090 \**********************************************************/ 21091/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21092 21093"use strict"; 21094__webpack_require__.r(__webpack_exports__); 21095/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21096/* harmony export */ "default": () => (/* binding */ preloadImages) 21097/* harmony export */ }); 21098function preloadImages() { 21099 const swiper = this; 21100 swiper.imagesToLoad = swiper.$el.find('img'); 21101 21102 function onReady() { 21103 if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return; 21104 if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1; 21105 21106 if (swiper.imagesLoaded === swiper.imagesToLoad.length) { 21107 if (swiper.params.updateOnImagesReady) swiper.update(); 21108 swiper.emit('imagesReady'); 21109 } 21110 } 21111 21112 for (let i = 0; i < swiper.imagesToLoad.length; i += 1) { 21113 const imageEl = swiper.imagesToLoad[i]; 21114 swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady); 21115 } 21116} 21117 21118/***/ }), 21119
vendor: 1,299 bytes, lines 21120-21144
21120/***/ "./node_modules/swiper/core/loop/index.js": 21121/*!************************************************!*\ 21122 !*** ./node_modules/swiper/core/loop/index.js ***! 21123 \************************************************/ 21124/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21125 21126"use strict"; 21127__webpack_require__.r(__webpack_exports__); 21128/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21129/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 21130/* harmony export */ }); 21131/* harmony import */ var _loopCreate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loopCreate.js */ "./node_modules/swiper/core/loop/loopCreate.js"); 21132/* harmony import */ var _loopFix_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loopFix.js */ "./node_modules/swiper/core/loop/loopFix.js"); 21133/* harmony import */ var _loopDestroy_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./loopDestroy.js */ "./node_modules/swiper/core/loop/loopDestroy.js"); 21134 21135 21136 21137/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 21138 loopCreate: _loopCreate_js__WEBPACK_IMPORTED_MODULE_0__["default"], 21139 loopFix: _loopFix_js__WEBPACK_IMPORTED_MODULE_1__["default"], 21140 loopDestroy: _loopDestroy_js__WEBPACK_IMPORTED_MODULE_2__["default"] 21141}); 21142 21143/***/ }), 21144
vendor: 3,099 bytes, lines 21145-21219
21145/***/ "./node_modules/swiper/core/loop/loopCreate.js": 21146/*!*****************************************************!*\ 21147 !*** ./node_modules/swiper/core/loop/loopCreate.js ***! 21148 \*****************************************************/ 21149/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21150 21151"use strict"; 21152__webpack_require__.r(__webpack_exports__); 21153/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21154/* harmony export */ "default": () => (/* binding */ loopCreate) 21155/* harmony export */ }); 21156/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 21157/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 21158 21159 21160function loopCreate() { 21161 const swiper = this; 21162 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 21163 const { 21164 params, 21165 $wrapperEl 21166 } = swiper; // Remove duplicated slides 21167 21168 const $selector = $wrapperEl.children().length > 0 ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])($wrapperEl.children()[0].parentNode) : $wrapperEl; 21169 $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove(); 21170 let slides = $selector.children(`.${params.slideClass}`); 21171 21172 if (params.loopFillGroupWithBlank) { 21173 const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup; 21174 21175 if (blankSlidesNum !== params.slidesPerGroup) { 21176 for (let i = 0; i < blankSlidesNum; i += 1) { 21177 const blankNode = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`); 21178 $selector.append(blankNode); 21179 } 21180 21181 slides = $selector.children(`.${params.slideClass}`); 21182 } 21183 } 21184 21185 if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length; 21186 swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); 21187 swiper.loopedSlides += params.loopAdditionalSlides; 21188 21189 if (swiper.loopedSlides > slides.length) { 21190 swiper.loopedSlides = slides.length; 21191 } 21192 21193 const prependSlides = []; 21194 const appendSlides = []; 21195 slides.each((el, index) => { 21196 const slide = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el); 21197 21198 if (index < swiper.loopedSlides) { 21199 appendSlides.push(el); 21200 } 21201 21202 if (index < slides.length && index >= slides.length - swiper.loopedSlides) { 21203 prependSlides.push(el); 21204 } 21205 21206 slide.attr('data-swiper-slide-index', index); 21207 }); 21208 21209 for (let i = 0; i < appendSlides.length; i += 1) { 21210 $selector.append((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); 21211 } 21212 21213 for (let i = prependSlides.length - 1; i >= 0; i -= 1) { 21214 $selector.prepend((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); 21215 } 21216} 21217 21218/***/ }), 21219
vendor: 853 bytes, lines 21220-21243
21220/***/ "./node_modules/swiper/core/loop/loopDestroy.js": 21221/*!******************************************************!*\ 21222 !*** ./node_modules/swiper/core/loop/loopDestroy.js ***! 21223 \******************************************************/ 21224/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21225 21226"use strict"; 21227__webpack_require__.r(__webpack_exports__); 21228/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21229/* harmony export */ "default": () => (/* binding */ loopDestroy) 21230/* harmony export */ }); 21231function loopDestroy() { 21232 const swiper = this; 21233 const { 21234 $wrapperEl, 21235 params, 21236 slides 21237 } = swiper; 21238 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove(); 21239 slides.removeAttr('data-swiper-slide-index'); 21240} 21241 21242/***/ }), 21243
vendor: 1,791 bytes, lines 21244-21298
21244/***/ "./node_modules/swiper/core/loop/loopFix.js": 21245/*!**************************************************!*\ 21246 !*** ./node_modules/swiper/core/loop/loopFix.js ***! 21247 \**************************************************/ 21248/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21249 21250"use strict"; 21251__webpack_require__.r(__webpack_exports__); 21252/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21253/* harmony export */ "default": () => (/* binding */ loopFix) 21254/* harmony export */ }); 21255function loopFix() { 21256 const swiper = this; 21257 swiper.emit('beforeLoopFix'); 21258 const { 21259 activeIndex, 21260 slides, 21261 loopedSlides, 21262 allowSlidePrev, 21263 allowSlideNext, 21264 snapGrid, 21265 rtlTranslate: rtl 21266 } = swiper; 21267 let newIndex; 21268 swiper.allowSlidePrev = true; 21269 swiper.allowSlideNext = true; 21270 const snapTranslate = -snapGrid[activeIndex]; 21271 const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding 21272 21273 if (activeIndex < loopedSlides) { 21274 newIndex = slides.length - loopedSlides * 3 + activeIndex; 21275 newIndex += loopedSlides; 21276 const slideChanged = swiper.slideTo(newIndex, 0, false, true); 21277 21278 if (slideChanged && diff !== 0) { 21279 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 21280 } 21281 } else if (activeIndex >= slides.length - loopedSlides) { 21282 // Fix For Positive Oversliding 21283 newIndex = -slides.length + activeIndex + loopedSlides; 21284 newIndex += loopedSlides; 21285 const slideChanged = swiper.slideTo(newIndex, 0, false, true); 21286 21287 if (slideChanged && diff !== 0) { 21288 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 21289 } 21290 } 21291 21292 swiper.allowSlidePrev = allowSlidePrev; 21293 swiper.allowSlideNext = allowSlideNext; 21294 swiper.emit('loopFix'); 21295} 21296 21297/***/ }), 21298
vendor: 1,921 bytes, lines 21299-21351
21299/***/ "./node_modules/swiper/core/moduleExtendParams.js": 21300/*!********************************************************!*\ 21301 !*** ./node_modules/swiper/core/moduleExtendParams.js ***! 21302 \********************************************************/ 21303/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21304 21305"use strict"; 21306__webpack_require__.r(__webpack_exports__); 21307/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21308/* harmony export */ "default": () => (/* binding */ moduleExtendParams) 21309/* harmony export */ }); 21310/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 21311 21312function moduleExtendParams(params, allModulesParams) { 21313 return function extendParams(obj = {}) { 21314 const moduleParamName = Object.keys(obj)[0]; 21315 const moduleParams = obj[moduleParamName]; 21316 21317 if (typeof moduleParams !== 'object' || moduleParams === null) { 21318 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(allModulesParams, obj); 21319 return; 21320 } 21321 21322 if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) { 21323 params[moduleParamName] = { 21324 auto: true 21325 }; 21326 } 21327 21328 if (!(moduleParamName in params && 'enabled' in moduleParams)) { 21329 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(allModulesParams, obj); 21330 return; 21331 } 21332 21333 if (params[moduleParamName] === true) { 21334 params[moduleParamName] = { 21335 enabled: true 21336 }; 21337 } 21338 21339 if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) { 21340 params[moduleParamName].enabled = true; 21341 } 21342 21343 if (!params[moduleParamName]) params[moduleParamName] = { 21344 enabled: false 21345 }; 21346 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.extend)(allModulesParams, obj); 21347 }; 21348} 21349 21350/***/ }), 21351
vendor: 2,772 bytes, lines 21352-21441
21352/***/ "./node_modules/swiper/core/modules/observer/observer.js": 21353/*!***************************************************************!*\ 21354 !*** ./node_modules/swiper/core/modules/observer/observer.js ***! 21355 \***************************************************************/ 21356/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21357 21358"use strict"; 21359__webpack_require__.r(__webpack_exports__); 21360/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21361/* harmony export */ "default": () => (/* binding */ Observer) 21362/* harmony export */ }); 21363/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 21364 21365function Observer({ 21366 swiper, 21367 extendParams, 21368 on, 21369 emit 21370}) { 21371 const observers = []; 21372 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 21373 21374 const attach = (target, options = {}) => { 21375 const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; 21376 const observer = new ObserverFunc(mutations => { 21377 // The observerUpdate event should only be triggered 21378 // once despite the number of mutations. Additional 21379 // triggers are redundant and are very costly 21380 if (mutations.length === 1) { 21381 emit('observerUpdate', mutations[0]); 21382 return; 21383 } 21384 21385 const observerUpdate = function observerUpdate() { 21386 emit('observerUpdate', mutations[0]); 21387 }; 21388 21389 if (window.requestAnimationFrame) { 21390 window.requestAnimationFrame(observerUpdate); 21391 } else { 21392 window.setTimeout(observerUpdate, 0); 21393 } 21394 }); 21395 observer.observe(target, { 21396 attributes: typeof options.attributes === 'undefined' ? true : options.attributes, 21397 childList: typeof options.childList === 'undefined' ? true : options.childList, 21398 characterData: typeof options.characterData === 'undefined' ? true : options.characterData 21399 }); 21400 observers.push(observer); 21401 }; 21402 21403 const init = () => { 21404 if (!swiper.params.observer) return; 21405 21406 if (swiper.params.observeParents) { 21407 const containerParents = swiper.$el.parents(); 21408 21409 for (let i = 0; i < containerParents.length; i += 1) { 21410 attach(containerParents[i]); 21411 } 21412 } // Observe container 21413 21414 21415 attach(swiper.$el[0], { 21416 childList: swiper.params.observeSlideChildren 21417 }); // Observe wrapper 21418 21419 attach(swiper.$wrapperEl[0], { 21420 attributes: false 21421 }); 21422 }; 21423 21424 const destroy = () => { 21425 observers.forEach(observer => { 21426 observer.disconnect(); 21427 }); 21428 observers.splice(0, observers.length); 21429 }; 21430 21431 extendParams({ 21432 observer: false, 21433 observeParents: false, 21434 observeSlideChildren: false 21435 }); 21436 on('init', init); 21437 on('destroy', destroy); 21438} 21439 21440/***/ }), 21441
vendor: 2,583 bytes, lines 21442-21524
21442/***/ "./node_modules/swiper/core/modules/resize/resize.js": 21443/*!***********************************************************!*\ 21444 !*** ./node_modules/swiper/core/modules/resize/resize.js ***! 21445 \***********************************************************/ 21446/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21447 21448"use strict"; 21449__webpack_require__.r(__webpack_exports__); 21450/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21451/* harmony export */ "default": () => (/* binding */ Resize) 21452/* harmony export */ }); 21453/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 21454 21455function Resize({ 21456 swiper, 21457 on, 21458 emit 21459}) { 21460 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 21461 let observer = null; 21462 21463 const resizeHandler = () => { 21464 if (!swiper || swiper.destroyed || !swiper.initialized) return; 21465 emit('beforeResize'); 21466 emit('resize'); 21467 }; 21468 21469 const createObserver = () => { 21470 if (!swiper || swiper.destroyed || !swiper.initialized) return; 21471 observer = new ResizeObserver(entries => { 21472 const { 21473 width, 21474 height 21475 } = swiper; 21476 let newWidth = width; 21477 let newHeight = height; 21478 entries.forEach(({ 21479 contentBoxSize, 21480 contentRect, 21481 target 21482 }) => { 21483 if (target && target !== swiper.el) return; 21484 newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; 21485 newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; 21486 }); 21487 21488 if (newWidth !== width || newHeight !== height) { 21489 resizeHandler(); 21490 } 21491 }); 21492 observer.observe(swiper.el); 21493 }; 21494 21495 const removeObserver = () => { 21496 if (observer && observer.unobserve && swiper.el) { 21497 observer.unobserve(swiper.el); 21498 observer = null; 21499 } 21500 }; 21501 21502 const orientationChangeHandler = () => { 21503 if (!swiper || swiper.destroyed || !swiper.initialized) return; 21504 emit('orientationchange'); 21505 }; 21506 21507 on('init', () => { 21508 if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') { 21509 createObserver(); 21510 return; 21511 } 21512 21513 window.addEventListener('resize', resizeHandler); 21514 window.addEventListener('orientationchange', orientationChangeHandler); 21515 }); 21516 on('destroy', () => { 21517 removeObserver(); 21518 window.removeEventListener('resize', resizeHandler); 21519 window.removeEventListener('orientationchange', orientationChangeHandler); 21520 }); 21521} 21522 21523/***/ }), 21524
vendor: 2,305 bytes, lines 21525-21561
21525/***/ "./node_modules/swiper/core/slide/index.js": 21526/*!*************************************************!*\ 21527 !*** ./node_modules/swiper/core/slide/index.js ***! 21528 \*************************************************/ 21529/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21530 21531"use strict"; 21532__webpack_require__.r(__webpack_exports__); 21533/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21534/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 21535/* harmony export */ }); 21536/* harmony import */ var _slideTo_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slideTo.js */ "./node_modules/swiper/core/slide/slideTo.js"); 21537/* harmony import */ var _slideToLoop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slideToLoop.js */ "./node_modules/swiper/core/slide/slideToLoop.js"); 21538/* harmony import */ var _slideNext_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slideNext.js */ "./node_modules/swiper/core/slide/slideNext.js"); 21539/* harmony import */ var _slidePrev_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slidePrev.js */ "./node_modules/swiper/core/slide/slidePrev.js"); 21540/* harmony import */ var _slideReset_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./slideReset.js */ "./node_modules/swiper/core/slide/slideReset.js"); 21541/* harmony import */ var _slideToClosest_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./slideToClosest.js */ "./node_modules/swiper/core/slide/slideToClosest.js"); 21542/* harmony import */ var _slideToClickedSlide_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./slideToClickedSlide.js */ "./node_modules/swiper/core/slide/slideToClickedSlide.js"); 21543 21544 21545 21546 21547 21548 21549 21550/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 21551 slideTo: _slideTo_js__WEBPACK_IMPORTED_MODULE_0__["default"], 21552 slideToLoop: _slideToLoop_js__WEBPACK_IMPORTED_MODULE_1__["default"], 21553 slideNext: _slideNext_js__WEBPACK_IMPORTED_MODULE_2__["default"], 21554 slidePrev: _slidePrev_js__WEBPACK_IMPORTED_MODULE_3__["default"], 21555 slideReset: _slideReset_js__WEBPACK_IMPORTED_MODULE_4__["default"], 21556 slideToClosest: _slideToClosest_js__WEBPACK_IMPORTED_MODULE_5__["default"], 21557 slideToClickedSlide: _slideToClickedSlide_js__WEBPACK_IMPORTED_MODULE_6__["default"] 21558}); 21559 21560/***/ }), 21561
vendor: 1,478 bytes, lines 21562-21605
21562/***/ "./node_modules/swiper/core/slide/slideNext.js": 21563/*!*****************************************************!*\ 21564 !*** ./node_modules/swiper/core/slide/slideNext.js ***! 21565 \*****************************************************/ 21566/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21567 21568"use strict"; 21569__webpack_require__.r(__webpack_exports__); 21570/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21571/* harmony export */ "default": () => (/* binding */ slideNext) 21572/* harmony export */ }); 21573/* eslint no-unused-vars: "off" */ 21574function slideNext(speed = this.params.speed, runCallbacks = true, internal) { 21575 const swiper = this; 21576 const { 21577 animating, 21578 enabled, 21579 params 21580 } = swiper; 21581 if (!enabled) return swiper; 21582 let perGroup = params.slidesPerGroup; 21583 21584 if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 21585 perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1); 21586 } 21587 21588 const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; 21589 21590 if (params.loop) { 21591 if (animating && params.loopPreventsSlide) return false; 21592 swiper.loopFix(); // eslint-disable-next-line 21593 21594 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 21595 } 21596 21597 if (params.rewind && swiper.isEnd) { 21598 return swiper.slideTo(0, speed, runCallbacks, internal); 21599 } 21600 21601 return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 21602} 21603 21604/***/ }), 21605
vendor: 2,410 bytes, lines 21606-21682
21606/***/ "./node_modules/swiper/core/slide/slidePrev.js": 21607/*!*****************************************************!*\ 21608 !*** ./node_modules/swiper/core/slide/slidePrev.js ***! 21609 \*****************************************************/ 21610/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21611 21612"use strict"; 21613__webpack_require__.r(__webpack_exports__); 21614/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21615/* harmony export */ "default": () => (/* binding */ slidePrev) 21616/* harmony export */ }); 21617/* eslint no-unused-vars: "off" */ 21618function slidePrev(speed = this.params.speed, runCallbacks = true, internal) { 21619 const swiper = this; 21620 const { 21621 params, 21622 animating, 21623 snapGrid, 21624 slidesGrid, 21625 rtlTranslate, 21626 enabled 21627 } = swiper; 21628 if (!enabled) return swiper; 21629 21630 if (params.loop) { 21631 if (animating && params.loopPreventsSlide) return false; 21632 swiper.loopFix(); // eslint-disable-next-line 21633 21634 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 21635 } 21636 21637 const translate = rtlTranslate ? swiper.translate : -swiper.translate; 21638 21639 function normalize(val) { 21640 if (val < 0) return -Math.floor(Math.abs(val)); 21641 return Math.floor(val); 21642 } 21643 21644 const normalizedTranslate = normalize(translate); 21645 const normalizedSnapGrid = snapGrid.map(val => normalize(val)); 21646 let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; 21647 21648 if (typeof prevSnap === 'undefined' && params.cssMode) { 21649 let prevSnapIndex; 21650 snapGrid.forEach((snap, snapIndex) => { 21651 if (normalizedTranslate >= snap) { 21652 // prevSnap = snap; 21653 prevSnapIndex = snapIndex; 21654 } 21655 }); 21656 21657 if (typeof prevSnapIndex !== 'undefined') { 21658 prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; 21659 } 21660 } 21661 21662 let prevIndex = 0; 21663 21664 if (typeof prevSnap !== 'undefined') { 21665 prevIndex = slidesGrid.indexOf(prevSnap); 21666 if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; 21667 21668 if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { 21669 prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1; 21670 prevIndex = Math.max(prevIndex, 0); 21671 } 21672 } 21673 21674 if (params.rewind && swiper.isBeginning) { 21675 return swiper.slideTo(swiper.slides.length - 1, speed, runCallbacks, internal); 21676 } 21677 21678 return swiper.slideTo(prevIndex, speed, runCallbacks, internal); 21679} 21680 21681/***/ }), 21682
vendor: 772 bytes, lines 21683-21701
21683/***/ "./node_modules/swiper/core/slide/slideReset.js": 21684/*!******************************************************!*\ 21685 !*** ./node_modules/swiper/core/slide/slideReset.js ***! 21686 \******************************************************/ 21687/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21688 21689"use strict"; 21690__webpack_require__.r(__webpack_exports__); 21691/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21692/* harmony export */ "default": () => (/* binding */ slideReset) 21693/* harmony export */ }); 21694/* eslint no-unused-vars: "off" */ 21695function slideReset(speed = this.params.speed, runCallbacks = true, internal) { 21696 const swiper = this; 21697 return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); 21698} 21699 21700/***/ }), 21701
vendor: 6,514 bytes, lines 21702-21897
21702/***/ "./node_modules/swiper/core/slide/slideTo.js": 21703/*!***************************************************!*\ 21704 !*** ./node_modules/swiper/core/slide/slideTo.js ***! 21705 \***************************************************/ 21706/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21707 21708"use strict"; 21709__webpack_require__.r(__webpack_exports__); 21710/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21711/* harmony export */ "default": () => (/* binding */ slideTo) 21712/* harmony export */ }); 21713/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 21714 21715function slideTo(index = 0, speed = this.params.speed, runCallbacks = true, internal, initial) { 21716 if (typeof index !== 'number' && typeof index !== 'string') { 21717 throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`); 21718 } 21719 21720 if (typeof index === 'string') { 21721 /** 21722 * The `index` argument converted from `string` to `number`. 21723 * @type {number} 21724 */ 21725 const indexAsNumber = parseInt(index, 10); 21726 /** 21727 * Determines whether the `index` argument is a valid `number` 21728 * after being converted from the `string` type. 21729 * @type {boolean} 21730 */ 21731 21732 const isValidNumber = isFinite(indexAsNumber); 21733 21734 if (!isValidNumber) { 21735 throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`); 21736 } // Knowing that the converted `index` is a valid number, 21737 // we can update the original argument's value. 21738 21739 21740 index = indexAsNumber; 21741 } 21742 21743 const swiper = this; 21744 let slideIndex = index; 21745 if (slideIndex < 0) slideIndex = 0; 21746 const { 21747 params, 21748 snapGrid, 21749 slidesGrid, 21750 previousIndex, 21751 activeIndex, 21752 rtlTranslate: rtl, 21753 wrapperEl, 21754 enabled 21755 } = swiper; 21756 21757 if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) { 21758 return false; 21759 } 21760 21761 const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); 21762 let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); 21763 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 21764 21765 if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { 21766 swiper.emit('beforeSlideChangeStart'); 21767 } 21768 21769 const translate = -snapGrid[snapIndex]; // Update progress 21770 21771 swiper.updateProgress(translate); // Normalize slideIndex 21772 21773 if (params.normalizeSlideIndex) { 21774 for (let i = 0; i < slidesGrid.length; i += 1) { 21775 const normalizedTranslate = -Math.floor(translate * 100); 21776 const normalizedGrid = Math.floor(slidesGrid[i] * 100); 21777 const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); 21778 21779 if (typeof slidesGrid[i + 1] !== 'undefined') { 21780 if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { 21781 slideIndex = i; 21782 } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { 21783 slideIndex = i + 1; 21784 } 21785 } else if (normalizedTranslate >= normalizedGrid) { 21786 slideIndex = i; 21787 } 21788 } 21789 } // Directions locks 21790 21791 21792 if (swiper.initialized && slideIndex !== activeIndex) { 21793 if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { 21794 return false; 21795 } 21796 21797 if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { 21798 if ((activeIndex || 0) !== slideIndex) return false; 21799 } 21800 } 21801 21802 let direction; 21803 if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index 21804 21805 if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { 21806 swiper.updateActiveIndex(slideIndex); // Update Height 21807 21808 if (params.autoHeight) { 21809 swiper.updateAutoHeight(); 21810 } 21811 21812 swiper.updateSlidesClasses(); 21813 21814 if (params.effect !== 'slide') { 21815 swiper.setTranslate(translate); 21816 } 21817 21818 if (direction !== 'reset') { 21819 swiper.transitionStart(runCallbacks, direction); 21820 swiper.transitionEnd(runCallbacks, direction); 21821 } 21822 21823 return false; 21824 } 21825 21826 if (params.cssMode) { 21827 const isH = swiper.isHorizontal(); 21828 const t = rtl ? translate : -translate; 21829 21830 if (speed === 0) { 21831 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 21832 21833 if (isVirtual) { 21834 swiper.wrapperEl.style.scrollSnapType = 'none'; 21835 swiper._immediateVirtual = true; 21836 } 21837 21838 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; 21839 21840 if (isVirtual) { 21841 requestAnimationFrame(() => { 21842 swiper.wrapperEl.style.scrollSnapType = ''; 21843 swiper._swiperImmediateVirtual = false; 21844 }); 21845 } 21846 } else { 21847 if (!swiper.support.smoothScroll) { 21848 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.animateCSSModeScroll)({ 21849 swiper, 21850 targetPosition: t, 21851 side: isH ? 'left' : 'top' 21852 }); 21853 return true; 21854 } 21855 21856 wrapperEl.scrollTo({ 21857 [isH ? 'left' : 'top']: t, 21858 behavior: 'smooth' 21859 }); 21860 } 21861 21862 return true; 21863 } 21864 21865 swiper.setTransition(speed); 21866 swiper.setTranslate(translate); 21867 swiper.updateActiveIndex(slideIndex); 21868 swiper.updateSlidesClasses(); 21869 swiper.emit('beforeTransitionStart', speed, internal); 21870 swiper.transitionStart(runCallbacks, direction); 21871 21872 if (speed === 0) { 21873 swiper.transitionEnd(runCallbacks, direction); 21874 } else if (!swiper.animating) { 21875 swiper.animating = true; 21876 21877 if (!swiper.onSlideToWrapperTransitionEnd) { 21878 swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { 21879 if (!swiper || swiper.destroyed) return; 21880 if (e.target !== this) return; 21881 swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 21882 swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); 21883 swiper.onSlideToWrapperTransitionEnd = null; 21884 delete swiper.onSlideToWrapperTransitionEnd; 21885 swiper.transitionEnd(runCallbacks, direction); 21886 }; 21887 } 21888 21889 swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 21890 swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); 21891 } 21892 21893 return true; 21894} 21895 21896/***/ }), 21897
vendor: 2,436 bytes, lines 21898-21952
21898/***/ "./node_modules/swiper/core/slide/slideToClickedSlide.js": 21899/*!***************************************************************!*\ 21900 !*** ./node_modules/swiper/core/slide/slideToClickedSlide.js ***! 21901 \***************************************************************/ 21902/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21903 21904"use strict"; 21905__webpack_require__.r(__webpack_exports__); 21906/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21907/* harmony export */ "default": () => (/* binding */ slideToClickedSlide) 21908/* harmony export */ }); 21909/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 21910/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 21911 21912 21913function slideToClickedSlide() { 21914 const swiper = this; 21915 const { 21916 params, 21917 $wrapperEl 21918 } = swiper; 21919 const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; 21920 let slideToIndex = swiper.clickedIndex; 21921 let realIndex; 21922 21923 if (params.loop) { 21924 if (swiper.animating) return; 21925 realIndex = parseInt((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); 21926 21927 if (params.centeredSlides) { 21928 if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { 21929 swiper.loopFix(); 21930 slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); 21931 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => { 21932 swiper.slideTo(slideToIndex); 21933 }); 21934 } else { 21935 swiper.slideTo(slideToIndex); 21936 } 21937 } else if (slideToIndex > swiper.slides.length - slidesPerView) { 21938 swiper.loopFix(); 21939 slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); 21940 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => { 21941 swiper.slideTo(slideToIndex); 21942 }); 21943 } else { 21944 swiper.slideTo(slideToIndex); 21945 } 21946 } else { 21947 swiper.slideTo(slideToIndex); 21948 } 21949} 21950 21951/***/ }), 21952
vendor: 1,955 bytes, lines 21953-21998
21953/***/ "./node_modules/swiper/core/slide/slideToClosest.js": 21954/*!**********************************************************!*\ 21955 !*** ./node_modules/swiper/core/slide/slideToClosest.js ***! 21956 \**********************************************************/ 21957/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 21958 21959"use strict"; 21960__webpack_require__.r(__webpack_exports__); 21961/* harmony export */ __webpack_require__.d(__webpack_exports__, { 21962/* harmony export */ "default": () => (/* binding */ slideToClosest) 21963/* harmony export */ }); 21964/* eslint no-unused-vars: "off" */ 21965function slideToClosest(speed = this.params.speed, runCallbacks = true, internal, threshold = 0.5) { 21966 const swiper = this; 21967 let index = swiper.activeIndex; 21968 const skip = Math.min(swiper.params.slidesPerGroupSkip, index); 21969 const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); 21970 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 21971 21972 if (translate >= swiper.snapGrid[snapIndex]) { 21973 // The current translate is on or after the current snap index, so the choice 21974 // is between the current index and the one after it. 21975 const currentSnap = swiper.snapGrid[snapIndex]; 21976 const nextSnap = swiper.snapGrid[snapIndex + 1]; 21977 21978 if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { 21979 index += swiper.params.slidesPerGroup; 21980 } 21981 } else { 21982 // The current translate is before the current snap index, so the choice 21983 // is between the current index and the one before it. 21984 const prevSnap = swiper.snapGrid[snapIndex - 1]; 21985 const currentSnap = swiper.snapGrid[snapIndex]; 21986 21987 if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) { 21988 index -= swiper.params.slidesPerGroup; 21989 } 21990 } 21991 21992 index = Math.max(index, 0); 21993 index = Math.min(index, swiper.slidesGrid.length - 1); 21994 return swiper.slideTo(index, speed, runCallbacks, internal); 21995} 21996 21997/***/ }), 21998
vendor: 839 bytes, lines 21999-22022
21999/***/ "./node_modules/swiper/core/slide/slideToLoop.js": 22000/*!*******************************************************!*\ 22001 !*** ./node_modules/swiper/core/slide/slideToLoop.js ***! 22002 \*******************************************************/ 22003/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22004 22005"use strict"; 22006__webpack_require__.r(__webpack_exports__); 22007/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22008/* harmony export */ "default": () => (/* binding */ slideToLoop) 22009/* harmony export */ }); 22010function slideToLoop(index = 0, speed = this.params.speed, runCallbacks = true, internal) { 22011 const swiper = this; 22012 let newIndex = index; 22013 22014 if (swiper.params.loop) { 22015 newIndex += swiper.loopedSlides; 22016 } 22017 22018 return swiper.slideTo(newIndex, speed, runCallbacks, internal); 22019} 22020 22021/***/ }), 22022
vendor: 1,406 bytes, lines 22023-22047
22023/***/ "./node_modules/swiper/core/transition/index.js": 22024/*!******************************************************!*\ 22025 !*** ./node_modules/swiper/core/transition/index.js ***! 22026 \******************************************************/ 22027/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22028 22029"use strict"; 22030__webpack_require__.r(__webpack_exports__); 22031/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22032/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 22033/* harmony export */ }); 22034/* harmony import */ var _setTransition_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setTransition.js */ "./node_modules/swiper/core/transition/setTransition.js"); 22035/* harmony import */ var _transitionStart_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitionStart.js */ "./node_modules/swiper/core/transition/transitionStart.js"); 22036/* harmony import */ var _transitionEnd_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transitionEnd.js */ "./node_modules/swiper/core/transition/transitionEnd.js"); 22037 22038 22039 22040/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 22041 setTransition: _setTransition_js__WEBPACK_IMPORTED_MODULE_0__["default"], 22042 transitionStart: _transitionStart_js__WEBPACK_IMPORTED_MODULE_1__["default"], 22043 transitionEnd: _transitionEnd_js__WEBPACK_IMPORTED_MODULE_2__["default"] 22044}); 22045 22046/***/ }), 22047
vendor: 803 bytes, lines 22048-22070
22048/***/ "./node_modules/swiper/core/transition/setTransition.js": 22049/*!**************************************************************!*\ 22050 !*** ./node_modules/swiper/core/transition/setTransition.js ***! 22051 \**************************************************************/ 22052/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22053 22054"use strict"; 22055__webpack_require__.r(__webpack_exports__); 22056/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22057/* harmony export */ "default": () => (/* binding */ setTransition) 22058/* harmony export */ }); 22059function setTransition(duration, byController) { 22060 const swiper = this; 22061 22062 if (!swiper.params.cssMode) { 22063 swiper.$wrapperEl.transition(duration); 22064 } 22065 22066 swiper.emit('setTransition', duration, byController); 22067} 22068 22069/***/ }), 22070
vendor: 1,285 bytes, lines 22071-22117
22071/***/ "./node_modules/swiper/core/transition/transitionEmit.js": 22072/*!***************************************************************!*\ 22073 !*** ./node_modules/swiper/core/transition/transitionEmit.js ***! 22074 \***************************************************************/ 22075/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22076 22077"use strict"; 22078__webpack_require__.r(__webpack_exports__); 22079/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22080/* harmony export */ "default": () => (/* binding */ transitionEmit) 22081/* harmony export */ }); 22082function transitionEmit({ 22083 swiper, 22084 runCallbacks, 22085 direction, 22086 step 22087}) { 22088 const { 22089 activeIndex, 22090 previousIndex 22091 } = swiper; 22092 let dir = direction; 22093 22094 if (!dir) { 22095 if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; 22096 } 22097 22098 swiper.emit(`transition${step}`); 22099 22100 if (runCallbacks && activeIndex !== previousIndex) { 22101 if (dir === 'reset') { 22102 swiper.emit(`slideResetTransition${step}`); 22103 return; 22104 } 22105 22106 swiper.emit(`slideChangeTransition${step}`); 22107 22108 if (dir === 'next') { 22109 swiper.emit(`slideNextTransition${step}`); 22110 } else { 22111 swiper.emit(`slidePrevTransition${step}`); 22112 } 22113 } 22114} 22115 22116/***/ }), 22117
vendor: 1,110 bytes, lines 22118-22148
22118/***/ "./node_modules/swiper/core/transition/transitionEnd.js": 22119/*!**************************************************************!*\ 22120 !*** ./node_modules/swiper/core/transition/transitionEnd.js ***! 22121 \**************************************************************/ 22122/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22123 22124"use strict"; 22125__webpack_require__.r(__webpack_exports__); 22126/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22127/* harmony export */ "default": () => (/* binding */ transitionEnd) 22128/* harmony export */ }); 22129/* harmony import */ var _transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transitionEmit.js */ "./node_modules/swiper/core/transition/transitionEmit.js"); 22130 22131function transitionEnd(runCallbacks = true, direction) { 22132 const swiper = this; 22133 const { 22134 params 22135 } = swiper; 22136 swiper.animating = false; 22137 if (params.cssMode) return; 22138 swiper.setTransition(0); 22139 (0,_transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__["default"])({ 22140 swiper, 22141 runCallbacks, 22142 direction, 22143 step: 'End' 22144 }); 22145} 22146 22147/***/ }), 22148
vendor: 1,133 bytes, lines 22149-22182
22149/***/ "./node_modules/swiper/core/transition/transitionStart.js": 22150/*!****************************************************************!*\ 22151 !*** ./node_modules/swiper/core/transition/transitionStart.js ***! 22152 \****************************************************************/ 22153/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22154 22155"use strict"; 22156__webpack_require__.r(__webpack_exports__); 22157/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22158/* harmony export */ "default": () => (/* binding */ transitionStart) 22159/* harmony export */ }); 22160/* harmony import */ var _transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transitionEmit.js */ "./node_modules/swiper/core/transition/transitionEmit.js"); 22161 22162function transitionStart(runCallbacks = true, direction) { 22163 const swiper = this; 22164 const { 22165 params 22166 } = swiper; 22167 if (params.cssMode) return; 22168 22169 if (params.autoHeight) { 22170 swiper.updateAutoHeight(); 22171 } 22172 22173 (0,_transitionEmit_js__WEBPACK_IMPORTED_MODULE_0__["default"])({ 22174 swiper, 22175 runCallbacks, 22176 direction, 22177 step: 'Start' 22178 }); 22179} 22180 22181/***/ }), 22182
vendor: 1,259 bytes, lines 22183-22219
22183/***/ "./node_modules/swiper/core/translate/getTranslate.js": 22184/*!************************************************************!*\ 22185 !*** ./node_modules/swiper/core/translate/getTranslate.js ***! 22186 \************************************************************/ 22187/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22188 22189"use strict"; 22190__webpack_require__.r(__webpack_exports__); 22191/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22192/* harmony export */ "default": () => (/* binding */ getSwiperTranslate) 22193/* harmony export */ }); 22194/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 22195 22196function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') { 22197 const swiper = this; 22198 const { 22199 params, 22200 rtlTranslate: rtl, 22201 translate, 22202 $wrapperEl 22203 } = swiper; 22204 22205 if (params.virtualTranslate) { 22206 return rtl ? -translate : translate; 22207 } 22208 22209 if (params.cssMode) { 22210 return translate; 22211 } 22212 22213 let currentTranslate = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.getTranslate)($wrapperEl[0], axis); 22214 if (rtl) currentTranslate = -currentTranslate; 22215 return currentTranslate || 0; 22216} 22217 22218/***/ }), 22219
vendor: 1,869 bytes, lines 22220-22250
22220/***/ "./node_modules/swiper/core/translate/index.js": 22221/*!*****************************************************!*\ 22222 !*** ./node_modules/swiper/core/translate/index.js ***! 22223 \*****************************************************/ 22224/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22225 22226"use strict"; 22227__webpack_require__.r(__webpack_exports__); 22228/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22229/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 22230/* harmony export */ }); 22231/* harmony import */ var _getTranslate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getTranslate.js */ "./node_modules/swiper/core/translate/getTranslate.js"); 22232/* harmony import */ var _setTranslate_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setTranslate.js */ "./node_modules/swiper/core/translate/setTranslate.js"); 22233/* harmony import */ var _minTranslate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./minTranslate.js */ "./node_modules/swiper/core/translate/minTranslate.js"); 22234/* harmony import */ var _maxTranslate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./maxTranslate.js */ "./node_modules/swiper/core/translate/maxTranslate.js"); 22235/* harmony import */ var _translateTo_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./translateTo.js */ "./node_modules/swiper/core/translate/translateTo.js"); 22236 22237 22238 22239 22240 22241/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 22242 getTranslate: _getTranslate_js__WEBPACK_IMPORTED_MODULE_0__["default"], 22243 setTranslate: _setTranslate_js__WEBPACK_IMPORTED_MODULE_1__["default"], 22244 minTranslate: _minTranslate_js__WEBPACK_IMPORTED_MODULE_2__["default"], 22245 maxTranslate: _maxTranslate_js__WEBPACK_IMPORTED_MODULE_3__["default"], 22246 translateTo: _translateTo_js__WEBPACK_IMPORTED_MODULE_4__["default"] 22247}); 22248 22249/***/ }), 22250
vendor: 661 bytes, lines 22251-22267
22251/***/ "./node_modules/swiper/core/translate/maxTranslate.js": 22252/*!************************************************************!*\ 22253 !*** ./node_modules/swiper/core/translate/maxTranslate.js ***! 22254 \************************************************************/ 22255/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22256 22257"use strict"; 22258__webpack_require__.r(__webpack_exports__); 22259/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22260/* harmony export */ "default": () => (/* binding */ maxTranslate) 22261/* harmony export */ }); 22262function maxTranslate() { 22263 return -this.snapGrid[this.snapGrid.length - 1]; 22264} 22265 22266/***/ }), 22267
vendor: 638 bytes, lines 22268-22284
22268/***/ "./node_modules/swiper/core/translate/minTranslate.js": 22269/*!************************************************************!*\ 22270 !*** ./node_modules/swiper/core/translate/minTranslate.js ***! 22271 \************************************************************/ 22272/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22273 22274"use strict"; 22275__webpack_require__.r(__webpack_exports__); 22276/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22277/* harmony export */ "default": () => (/* binding */ minTranslate) 22278/* harmony export */ }); 22279function minTranslate() { 22280 return -this.snapGrid[0]; 22281} 22282 22283/***/ }), 22284
vendor: 1,731 bytes, lines 22285-22346
22285/***/ "./node_modules/swiper/core/translate/setTranslate.js": 22286/*!************************************************************!*\ 22287 !*** ./node_modules/swiper/core/translate/setTranslate.js ***! 22288 \************************************************************/ 22289/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22290 22291"use strict"; 22292__webpack_require__.r(__webpack_exports__); 22293/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22294/* harmony export */ "default": () => (/* binding */ setTranslate) 22295/* harmony export */ }); 22296function setTranslate(translate, byController) { 22297 const swiper = this; 22298 const { 22299 rtlTranslate: rtl, 22300 params, 22301 $wrapperEl, 22302 wrapperEl, 22303 progress 22304 } = swiper; 22305 let x = 0; 22306 let y = 0; 22307 const z = 0; 22308 22309 if (swiper.isHorizontal()) { 22310 x = rtl ? -translate : translate; 22311 } else { 22312 y = translate; 22313 } 22314 22315 if (params.roundLengths) { 22316 x = Math.floor(x); 22317 y = Math.floor(y); 22318 } 22319 22320 if (params.cssMode) { 22321 wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; 22322 } else if (!params.virtualTranslate) { 22323 $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`); 22324 } 22325 22326 swiper.previousTranslate = swiper.translate; 22327 swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress 22328 22329 let newProgress; 22330 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 22331 22332 if (translatesDiff === 0) { 22333 newProgress = 0; 22334 } else { 22335 newProgress = (translate - swiper.minTranslate()) / translatesDiff; 22336 } 22337 22338 if (newProgress !== progress) { 22339 swiper.updateProgress(translate); 22340 } 22341 22342 swiper.emit('setTranslate', swiper.translate, byController); 22343} 22344 22345/***/ }), 22346
vendor: 3,369 bytes, lines 22347-22446
22347/***/ "./node_modules/swiper/core/translate/translateTo.js": 22348/*!***********************************************************!*\ 22349 !*** ./node_modules/swiper/core/translate/translateTo.js ***! 22350 \***********************************************************/ 22351/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22352 22353"use strict"; 22354__webpack_require__.r(__webpack_exports__); 22355/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22356/* harmony export */ "default": () => (/* binding */ translateTo) 22357/* harmony export */ }); 22358/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 22359 22360function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) { 22361 const swiper = this; 22362 const { 22363 params, 22364 wrapperEl 22365 } = swiper; 22366 22367 if (swiper.animating && params.preventInteractionOnTransition) { 22368 return false; 22369 } 22370 22371 const minTranslate = swiper.minTranslate(); 22372 const maxTranslate = swiper.maxTranslate(); 22373 let newTranslate; 22374 if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress 22375 22376 swiper.updateProgress(newTranslate); 22377 22378 if (params.cssMode) { 22379 const isH = swiper.isHorizontal(); 22380 22381 if (speed === 0) { 22382 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; 22383 } else { 22384 if (!swiper.support.smoothScroll) { 22385 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.animateCSSModeScroll)({ 22386 swiper, 22387 targetPosition: -newTranslate, 22388 side: isH ? 'left' : 'top' 22389 }); 22390 return true; 22391 } 22392 22393 wrapperEl.scrollTo({ 22394 [isH ? 'left' : 'top']: -newTranslate, 22395 behavior: 'smooth' 22396 }); 22397 } 22398 22399 return true; 22400 } 22401 22402 if (speed === 0) { 22403 swiper.setTransition(0); 22404 swiper.setTranslate(newTranslate); 22405 22406 if (runCallbacks) { 22407 swiper.emit('beforeTransitionStart', speed, internal); 22408 swiper.emit('transitionEnd'); 22409 } 22410 } else { 22411 swiper.setTransition(speed); 22412 swiper.setTranslate(newTranslate); 22413 22414 if (runCallbacks) { 22415 swiper.emit('beforeTransitionStart', speed, internal); 22416 swiper.emit('transitionStart'); 22417 } 22418 22419 if (!swiper.animating) { 22420 swiper.animating = true; 22421 22422 if (!swiper.onTranslateToWrapperTransitionEnd) { 22423 swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { 22424 if (!swiper || swiper.destroyed) return; 22425 if (e.target !== this) return; 22426 swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 22427 swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); 22428 swiper.onTranslateToWrapperTransitionEnd = null; 22429 delete swiper.onTranslateToWrapperTransitionEnd; 22430 22431 if (runCallbacks) { 22432 swiper.emit('transitionEnd'); 22433 } 22434 }; 22435 } 22436 22437 swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 22438 swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); 22439 } 22440 } 22441 22442 return true; 22443} 22444 22445/***/ }), 22446
vendor: 3,015 bytes, lines 22447-22489
22447/***/ "./node_modules/swiper/core/update/index.js": 22448/*!**************************************************!*\ 22449 !*** ./node_modules/swiper/core/update/index.js ***! 22450 \**************************************************/ 22451/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22452 22453"use strict"; 22454__webpack_require__.r(__webpack_exports__); 22455/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22456/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 22457/* harmony export */ }); 22458/* harmony import */ var _updateSize_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./updateSize.js */ "./node_modules/swiper/core/update/updateSize.js"); 22459/* harmony import */ var _updateSlides_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./updateSlides.js */ "./node_modules/swiper/core/update/updateSlides.js"); 22460/* harmony import */ var _updateAutoHeight_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./updateAutoHeight.js */ "./node_modules/swiper/core/update/updateAutoHeight.js"); 22461/* harmony import */ var _updateSlidesOffset_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./updateSlidesOffset.js */ "./node_modules/swiper/core/update/updateSlidesOffset.js"); 22462/* harmony import */ var _updateSlidesProgress_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./updateSlidesProgress.js */ "./node_modules/swiper/core/update/updateSlidesProgress.js"); 22463/* harmony import */ var _updateProgress_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./updateProgress.js */ "./node_modules/swiper/core/update/updateProgress.js"); 22464/* harmony import */ var _updateSlidesClasses_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./updateSlidesClasses.js */ "./node_modules/swiper/core/update/updateSlidesClasses.js"); 22465/* harmony import */ var _updateActiveIndex_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./updateActiveIndex.js */ "./node_modules/swiper/core/update/updateActiveIndex.js"); 22466/* harmony import */ var _updateClickedSlide_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./updateClickedSlide.js */ "./node_modules/swiper/core/update/updateClickedSlide.js"); 22467 22468 22469 22470 22471 22472 22473 22474 22475 22476/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ 22477 updateSize: _updateSize_js__WEBPACK_IMPORTED_MODULE_0__["default"], 22478 updateSlides: _updateSlides_js__WEBPACK_IMPORTED_MODULE_1__["default"], 22479 updateAutoHeight: _updateAutoHeight_js__WEBPACK_IMPORTED_MODULE_2__["default"], 22480 updateSlidesOffset: _updateSlidesOffset_js__WEBPACK_IMPORTED_MODULE_3__["default"], 22481 updateSlidesProgress: _updateSlidesProgress_js__WEBPACK_IMPORTED_MODULE_4__["default"], 22482 updateProgress: _updateProgress_js__WEBPACK_IMPORTED_MODULE_5__["default"], 22483 updateSlidesClasses: _updateSlidesClasses_js__WEBPACK_IMPORTED_MODULE_6__["default"], 22484 updateActiveIndex: _updateActiveIndex_js__WEBPACK_IMPORTED_MODULE_7__["default"], 22485 updateClickedSlide: _updateClickedSlide_js__WEBPACK_IMPORTED_MODULE_8__["default"] 22486}); 22487 22488/***/ }), 22489
vendor: 2,607 bytes, lines 22490-22573
22490/***/ "./node_modules/swiper/core/update/updateActiveIndex.js": 22491/*!**************************************************************!*\ 22492 !*** ./node_modules/swiper/core/update/updateActiveIndex.js ***! 22493 \**************************************************************/ 22494/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22495 22496"use strict"; 22497__webpack_require__.r(__webpack_exports__); 22498/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22499/* harmony export */ "default": () => (/* binding */ updateActiveIndex) 22500/* harmony export */ }); 22501function updateActiveIndex(newActiveIndex) { 22502 const swiper = this; 22503 const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 22504 const { 22505 slidesGrid, 22506 snapGrid, 22507 params, 22508 activeIndex: previousIndex, 22509 realIndex: previousRealIndex, 22510 snapIndex: previousSnapIndex 22511 } = swiper; 22512 let activeIndex = newActiveIndex; 22513 let snapIndex; 22514 22515 if (typeof activeIndex === 'undefined') { 22516 for (let i = 0; i < slidesGrid.length; i += 1) { 22517 if (typeof slidesGrid[i + 1] !== 'undefined') { 22518 if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { 22519 activeIndex = i; 22520 } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { 22521 activeIndex = i + 1; 22522 } 22523 } else if (translate >= slidesGrid[i]) { 22524 activeIndex = i; 22525 } 22526 } // Normalize slideIndex 22527 22528 22529 if (params.normalizeSlideIndex) { 22530 if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; 22531 } 22532 } 22533 22534 if (snapGrid.indexOf(translate) >= 0) { 22535 snapIndex = snapGrid.indexOf(translate); 22536 } else { 22537 const skip = Math.min(params.slidesPerGroupSkip, activeIndex); 22538 snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); 22539 } 22540 22541 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 22542 22543 if (activeIndex === previousIndex) { 22544 if (snapIndex !== previousSnapIndex) { 22545 swiper.snapIndex = snapIndex; 22546 swiper.emit('snapIndexChange'); 22547 } 22548 22549 return; 22550 } // Get real index 22551 22552 22553 const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); 22554 Object.assign(swiper, { 22555 snapIndex, 22556 realIndex, 22557 previousIndex, 22558 activeIndex 22559 }); 22560 swiper.emit('activeIndexChange'); 22561 swiper.emit('snapIndexChange'); 22562 22563 if (previousRealIndex !== realIndex) { 22564 swiper.emit('realIndexChange'); 22565 } 22566 22567 if (swiper.initialized || swiper.params.runCallbacksOnInit) { 22568 swiper.emit('slideChange'); 22569 } 22570} 22571 22572/***/ }), 22573
vendor: 2,101 bytes, lines 22574-22636
22574/***/ "./node_modules/swiper/core/update/updateAutoHeight.js": 22575/*!*************************************************************!*\ 22576 !*** ./node_modules/swiper/core/update/updateAutoHeight.js ***! 22577 \*************************************************************/ 22578/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22579 22580"use strict"; 22581__webpack_require__.r(__webpack_exports__); 22582/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22583/* harmony export */ "default": () => (/* binding */ updateAutoHeight) 22584/* harmony export */ }); 22585function updateAutoHeight(speed) { 22586 const swiper = this; 22587 const activeSlides = []; 22588 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 22589 let newHeight = 0; 22590 let i; 22591 22592 if (typeof speed === 'number') { 22593 swiper.setTransition(speed); 22594 } else if (speed === true) { 22595 swiper.setTransition(swiper.params.speed); 22596 } 22597 22598 const getSlideByIndex = index => { 22599 if (isVirtual) { 22600 return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0]; 22601 } 22602 22603 return swiper.slides.eq(index)[0]; 22604 }; // Find slides currently in view 22605 22606 22607 if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { 22608 if (swiper.params.centeredSlides) { 22609 swiper.visibleSlides.each(slide => { 22610 activeSlides.push(slide); 22611 }); 22612 } else { 22613 for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { 22614 const index = swiper.activeIndex + i; 22615 if (index > swiper.slides.length && !isVirtual) break; 22616 activeSlides.push(getSlideByIndex(index)); 22617 } 22618 } 22619 } else { 22620 activeSlides.push(getSlideByIndex(swiper.activeIndex)); 22621 } // Find new height from highest slide in view 22622 22623 22624 for (i = 0; i < activeSlides.length; i += 1) { 22625 if (typeof activeSlides[i] !== 'undefined') { 22626 const height = activeSlides[i].offsetHeight; 22627 newHeight = height > newHeight ? height : newHeight; 22628 } 22629 } // Update Height 22630 22631 22632 if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`); 22633} 22634 22635/***/ }), 22636
vendor: 1,786 bytes, lines 22637-22687
22637/***/ "./node_modules/swiper/core/update/updateClickedSlide.js": 22638/*!***************************************************************!*\ 22639 !*** ./node_modules/swiper/core/update/updateClickedSlide.js ***! 22640 \***************************************************************/ 22641/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22642 22643"use strict"; 22644__webpack_require__.r(__webpack_exports__); 22645/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22646/* harmony export */ "default": () => (/* binding */ updateClickedSlide) 22647/* harmony export */ }); 22648/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 22649 22650function updateClickedSlide(e) { 22651 const swiper = this; 22652 const params = swiper.params; 22653 const slide = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e).closest(`.${params.slideClass}`)[0]; 22654 let slideFound = false; 22655 let slideIndex; 22656 22657 if (slide) { 22658 for (let i = 0; i < swiper.slides.length; i += 1) { 22659 if (swiper.slides[i] === slide) { 22660 slideFound = true; 22661 slideIndex = i; 22662 break; 22663 } 22664 } 22665 } 22666 22667 if (slide && slideFound) { 22668 swiper.clickedSlide = slide; 22669 22670 if (swiper.virtual && swiper.params.virtual.enabled) { 22671 swiper.clickedIndex = parseInt((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(slide).attr('data-swiper-slide-index'), 10); 22672 } else { 22673 swiper.clickedIndex = slideIndex; 22674 } 22675 } else { 22676 swiper.clickedSlide = undefined; 22677 swiper.clickedIndex = undefined; 22678 return; 22679 } 22680 22681 if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { 22682 swiper.slideToClickedSlide(); 22683 } 22684} 22685 22686/***/ }), 22687
vendor: 1,792 bytes, lines 22688-22751
22688/***/ "./node_modules/swiper/core/update/updateProgress.js": 22689/*!***********************************************************!*\ 22690 !*** ./node_modules/swiper/core/update/updateProgress.js ***! 22691 \***********************************************************/ 22692/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22693 22694"use strict"; 22695__webpack_require__.r(__webpack_exports__); 22696/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22697/* harmony export */ "default": () => (/* binding */ updateProgress) 22698/* harmony export */ }); 22699function updateProgress(translate) { 22700 const swiper = this; 22701 22702 if (typeof translate === 'undefined') { 22703 const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line 22704 22705 translate = swiper && swiper.translate && swiper.translate * multiplier || 0; 22706 } 22707 22708 const params = swiper.params; 22709 const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 22710 let { 22711 progress, 22712 isBeginning, 22713 isEnd 22714 } = swiper; 22715 const wasBeginning = isBeginning; 22716 const wasEnd = isEnd; 22717 22718 if (translatesDiff === 0) { 22719 progress = 0; 22720 isBeginning = true; 22721 isEnd = true; 22722 } else { 22723 progress = (translate - swiper.minTranslate()) / translatesDiff; 22724 isBeginning = progress <= 0; 22725 isEnd = progress >= 1; 22726 } 22727 22728 Object.assign(swiper, { 22729 progress, 22730 isBeginning, 22731 isEnd 22732 }); 22733 if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate); 22734 22735 if (isBeginning && !wasBeginning) { 22736 swiper.emit('reachBeginning toEdge'); 22737 } 22738 22739 if (isEnd && !wasEnd) { 22740 swiper.emit('reachEnd toEdge'); 22741 } 22742 22743 if (wasBeginning && !isBeginning || wasEnd && !isEnd) { 22744 swiper.emit('fromEdge'); 22745 } 22746 22747 swiper.emit('progress', progress); 22748} 22749 22750/***/ }), 22751
vendor: 1,523 bytes, lines 22752-22798
22752/***/ "./node_modules/swiper/core/update/updateSize.js": 22753/*!*******************************************************!*\ 22754 !*** ./node_modules/swiper/core/update/updateSize.js ***! 22755 \*******************************************************/ 22756/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22757 22758"use strict"; 22759__webpack_require__.r(__webpack_exports__); 22760/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22761/* harmony export */ "default": () => (/* binding */ updateSize) 22762/* harmony export */ }); 22763function updateSize() { 22764 const swiper = this; 22765 let width; 22766 let height; 22767 const $el = swiper.$el; 22768 22769 if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) { 22770 width = swiper.params.width; 22771 } else { 22772 width = $el[0].clientWidth; 22773 } 22774 22775 if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) { 22776 height = swiper.params.height; 22777 } else { 22778 height = $el[0].clientHeight; 22779 } 22780 22781 if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { 22782 return; 22783 } // Subtract paddings 22784 22785 22786 width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10); 22787 height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10); 22788 if (Number.isNaN(width)) width = 0; 22789 if (Number.isNaN(height)) height = 0; 22790 Object.assign(swiper, { 22791 width, 22792 height, 22793 size: swiper.isHorizontal() ? width : height 22794 }); 22795} 22796 22797/***/ }), 22798
vendor: 10,870 bytes, lines 22799-23122
22799/***/ "./node_modules/swiper/core/update/updateSlides.js": 22800/*!*********************************************************!*\ 22801 !*** ./node_modules/swiper/core/update/updateSlides.js ***! 22802 \*********************************************************/ 22803/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 22804 22805"use strict"; 22806__webpack_require__.r(__webpack_exports__); 22807/* harmony export */ __webpack_require__.d(__webpack_exports__, { 22808/* harmony export */ "default": () => (/* binding */ updateSlides) 22809/* harmony export */ }); 22810/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 22811 22812function updateSlides() { 22813 const swiper = this; 22814 22815 function getDirectionLabel(property) { 22816 if (swiper.isHorizontal()) { 22817 return property; 22818 } // prettier-ignore 22819 22820 22821 return { 22822 'width': 'height', 22823 'margin-top': 'margin-left', 22824 'margin-bottom ': 'margin-right', 22825 'margin-left': 'margin-top', 22826 'margin-right': 'margin-bottom', 22827 'padding-left': 'padding-top', 22828 'padding-right': 'padding-bottom', 22829 'marginRight': 'marginBottom' 22830 }[property]; 22831 } 22832 22833 function getDirectionPropertyValue(node, label) { 22834 return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0); 22835 } 22836 22837 const params = swiper.params; 22838 const { 22839 $wrapperEl, 22840 size: swiperSize, 22841 rtlTranslate: rtl, 22842 wrongRTL 22843 } = swiper; 22844 const isVirtual = swiper.virtual && params.virtual.enabled; 22845 const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; 22846 const slides = $wrapperEl.children(`.${swiper.params.slideClass}`); 22847 const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; 22848 let snapGrid = []; 22849 const slidesGrid = []; 22850 const slidesSizesGrid = []; 22851 let offsetBefore = params.slidesOffsetBefore; 22852 22853 if (typeof offsetBefore === 'function') { 22854 offsetBefore = params.slidesOffsetBefore.call(swiper); 22855 } 22856 22857 let offsetAfter = params.slidesOffsetAfter; 22858 22859 if (typeof offsetAfter === 'function') { 22860 offsetAfter = params.slidesOffsetAfter.call(swiper); 22861 } 22862 22863 const previousSnapGridLength = swiper.snapGrid.length; 22864 const previousSlidesGridLength = swiper.slidesGrid.length; 22865 let spaceBetween = params.spaceBetween; 22866 let slidePosition = -offsetBefore; 22867 let prevSlideSize = 0; 22868 let index = 0; 22869 22870 if (typeof swiperSize === 'undefined') { 22871 return; 22872 } 22873 22874 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 22875 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize; 22876 } 22877 22878 swiper.virtualSize = -spaceBetween; // reset margins 22879 22880 if (rtl) slides.css({ 22881 marginLeft: '', 22882 marginBottom: '', 22883 marginTop: '' 22884 });else slides.css({ 22885 marginRight: '', 22886 marginBottom: '', 22887 marginTop: '' 22888 }); // reset cssMode offsets 22889 22890 if (params.centeredSlides && params.cssMode) { 22891 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-before', ''); 22892 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-after', ''); 22893 } 22894 22895 const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; 22896 22897 if (gridEnabled) { 22898 swiper.grid.initSlides(slidesLength); 22899 } // Calc slides 22900 22901 22902 let slideSize; 22903 const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => { 22904 return typeof params.breakpoints[key].slidesPerView !== 'undefined'; 22905 }).length > 0; 22906 22907 for (let i = 0; i < slidesLength; i += 1) { 22908 slideSize = 0; 22909 const slide = slides.eq(i); 22910 22911 if (gridEnabled) { 22912 swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel); 22913 } 22914 22915 if (slide.css('display') === 'none') continue; // eslint-disable-line 22916 22917 if (params.slidesPerView === 'auto') { 22918 if (shouldResetSlideSize) { 22919 slides[i].style[getDirectionLabel('width')] = ``; 22920 } 22921 22922 const slideStyles = getComputedStyle(slide[0]); 22923 const currentTransform = slide[0].style.transform; 22924 const currentWebKitTransform = slide[0].style.webkitTransform; 22925 22926 if (currentTransform) { 22927 slide[0].style.transform = 'none'; 22928 } 22929 22930 if (currentWebKitTransform) { 22931 slide[0].style.webkitTransform = 'none'; 22932 } 22933 22934 if (params.roundLengths) { 22935 slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); 22936 } else { 22937 // eslint-disable-next-line 22938 const width = getDirectionPropertyValue(slideStyles, 'width'); 22939 const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left'); 22940 const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right'); 22941 const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left'); 22942 const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right'); 22943 const boxSizing = slideStyles.getPropertyValue('box-sizing'); 22944 22945 if (boxSizing && boxSizing === 'border-box') { 22946 slideSize = width + marginLeft + marginRight; 22947 } else { 22948 const { 22949 clientWidth, 22950 offsetWidth 22951 } = slide[0]; 22952 slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); 22953 } 22954 } 22955 22956 if (currentTransform) { 22957 slide[0].style.transform = currentTransform; 22958 } 22959 22960 if (currentWebKitTransform) { 22961 slide[0].style.webkitTransform = currentWebKitTransform; 22962 } 22963 22964 if (params.roundLengths) slideSize = Math.floor(slideSize); 22965 } else { 22966 slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; 22967 if (params.roundLengths) slideSize = Math.floor(slideSize); 22968 22969 if (slides[i]) { 22970 slides[i].style[getDirectionLabel('width')] = `${slideSize}px`; 22971 } 22972 } 22973 22974 if (slides[i]) { 22975 slides[i].swiperSlideSize = slideSize; 22976 } 22977 22978 slidesSizesGrid.push(slideSize); 22979 22980 if (params.centeredSlides) { 22981 slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; 22982 if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 22983 if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 22984 if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; 22985 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 22986 if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition); 22987 slidesGrid.push(slidePosition); 22988 } else { 22989 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 22990 if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition); 22991 slidesGrid.push(slidePosition); 22992 slidePosition = slidePosition + slideSize + spaceBetween; 22993 } 22994 22995 swiper.virtualSize += slideSize + spaceBetween; 22996 prevSlideSize = slideSize; 22997 index += 1; 22998 } 22999 23000 swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; 23001 23002 if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { 23003 $wrapperEl.css({ 23004 width: `${swiper.virtualSize + params.spaceBetween}px` 23005 }); 23006 } 23007 23008 if (params.setWrapperSize) { 23009 $wrapperEl.css({ 23010 [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px` 23011 }); 23012 } 23013 23014 if (gridEnabled) { 23015 swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel); 23016 } // Remove last grid elements depending on width 23017 23018 23019 if (!params.centeredSlides) { 23020 const newSlidesGrid = []; 23021 23022 for (let i = 0; i < snapGrid.length; i += 1) { 23023 let slidesGridItem = snapGrid[i]; 23024 if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); 23025 23026 if (snapGrid[i] <= swiper.virtualSize - swiperSize) { 23027 newSlidesGrid.push(slidesGridItem); 23028 } 23029 } 23030 23031 snapGrid = newSlidesGrid; 23032 23033 if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { 23034 snapGrid.push(swiper.virtualSize - swiperSize); 23035 } 23036 } 23037 23038 if (snapGrid.length === 0) snapGrid = [0]; 23039 23040 if (params.spaceBetween !== 0) { 23041 const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight'); 23042 slides.filter((_, slideIndex) => { 23043 if (!params.cssMode) return true; 23044 23045 if (slideIndex === slides.length - 1) { 23046 return false; 23047 } 23048 23049 return true; 23050 }).css({ 23051 [key]: `${spaceBetween}px` 23052 }); 23053 } 23054 23055 if (params.centeredSlides && params.centeredSlidesBounds) { 23056 let allSlidesSize = 0; 23057 slidesSizesGrid.forEach(slideSizeValue => { 23058 allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); 23059 }); 23060 allSlidesSize -= params.spaceBetween; 23061 const maxSnap = allSlidesSize - swiperSize; 23062 snapGrid = snapGrid.map(snap => { 23063 if (snap < 0) return -offsetBefore; 23064 if (snap > maxSnap) return maxSnap + offsetAfter; 23065 return snap; 23066 }); 23067 } 23068 23069 if (params.centerInsufficientSlides) { 23070 let allSlidesSize = 0; 23071 slidesSizesGrid.forEach(slideSizeValue => { 23072 allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); 23073 }); 23074 allSlidesSize -= params.spaceBetween; 23075 23076 if (allSlidesSize < swiperSize) { 23077 const allSlidesOffset = (swiperSize - allSlidesSize) / 2; 23078 snapGrid.forEach((snap, snapIndex) => { 23079 snapGrid[snapIndex] = snap - allSlidesOffset; 23080 }); 23081 slidesGrid.forEach((snap, snapIndex) => { 23082 slidesGrid[snapIndex] = snap + allSlidesOffset; 23083 }); 23084 } 23085 } 23086 23087 Object.assign(swiper, { 23088 slides, 23089 snapGrid, 23090 slidesGrid, 23091 slidesSizesGrid 23092 }); 23093 23094 if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { 23095 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`); 23096 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.setCSSProperty)(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); 23097 const addToSnapGrid = -swiper.snapGrid[0]; 23098 const addToSlidesGrid = -swiper.slidesGrid[0]; 23099 swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid); 23100 swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid); 23101 } 23102 23103 if (slidesLength !== previousSlidesLength) { 23104 swiper.emit('slidesLengthChange'); 23105 } 23106 23107 if (snapGrid.length !== previousSnapGridLength) { 23108 if (swiper.params.watchOverflow) swiper.checkOverflow(); 23109 swiper.emit('snapGridLengthChange'); 23110 } 23111 23112 if (slidesGrid.length !== previousSlidesGridLength) { 23113 swiper.emit('slidesGridLengthChange'); 23114 } 23115 23116 if (params.watchSlidesProgress) { 23117 swiper.updateSlidesOffset(); 23118 } 23119} 23120 23121/***/ }), 23122
vendor: 3,316 bytes, lines 23123-23200
23123/***/ "./node_modules/swiper/core/update/updateSlidesClasses.js": 23124/*!****************************************************************!*\ 23125 !*** ./node_modules/swiper/core/update/updateSlidesClasses.js ***! 23126 \****************************************************************/ 23127/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 23128 23129"use strict"; 23130__webpack_require__.r(__webpack_exports__); 23131/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23132/* harmony export */ "default": () => (/* binding */ updateSlidesClasses) 23133/* harmony export */ }); 23134function updateSlidesClasses() { 23135 const swiper = this; 23136 const { 23137 slides, 23138 params, 23139 $wrapperEl, 23140 activeIndex, 23141 realIndex 23142 } = swiper; 23143 const isVirtual = swiper.virtual && params.virtual.enabled; 23144 slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`); 23145 let activeSlide; 23146 23147 if (isVirtual) { 23148 activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`); 23149 } else { 23150 activeSlide = slides.eq(activeIndex); 23151 } // Active classes 23152 23153 23154 activeSlide.addClass(params.slideActiveClass); 23155 23156 if (params.loop) { 23157 // Duplicate to all looped slides 23158 if (activeSlide.hasClass(params.slideDuplicateClass)) { 23159 $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); 23160 } else { 23161 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); 23162 } 23163 } // Next Slide 23164 23165 23166 let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass); 23167 23168 if (params.loop && nextSlide.length === 0) { 23169 nextSlide = slides.eq(0); 23170 nextSlide.addClass(params.slideNextClass); 23171 } // Prev Slide 23172 23173 23174 let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass); 23175 23176 if (params.loop && prevSlide.length === 0) { 23177 prevSlide = slides.eq(-1); 23178 prevSlide.addClass(params.slidePrevClass); 23179 } 23180 23181 if (params.loop) { 23182 // Duplicate to all looped slides 23183 if (nextSlide.hasClass(params.slideDuplicateClass)) { 23184 $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); 23185 } else { 23186 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); 23187 } 23188 23189 if (prevSlide.hasClass(params.slideDuplicateClass)) { 23190 $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); 23191 } else { 23192 $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); 23193 } 23194 } 23195 23196 swiper.emitSlidesClasses(); 23197} 23198 23199/***/ }), 23200
vendor: 843 bytes, lines 23201-23222
23201/***/ "./node_modules/swiper/core/update/updateSlidesOffset.js": 23202/*!***************************************************************!*\ 23203 !*** ./node_modules/swiper/core/update/updateSlidesOffset.js ***! 23204 \***************************************************************/ 23205/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 23206 23207"use strict"; 23208__webpack_require__.r(__webpack_exports__); 23209/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23210/* harmony export */ "default": () => (/* binding */ updateSlidesOffset) 23211/* harmony export */ }); 23212function updateSlidesOffset() { 23213 const swiper = this; 23214 const slides = swiper.slides; 23215 23216 for (let i = 0; i < slides.length; i += 1) { 23217 slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; 23218 } 23219} 23220 23221/***/ }), 23222
vendor: 2,575 bytes, lines 23223-23281
23223/***/ "./node_modules/swiper/core/update/updateSlidesProgress.js": 23224/*!*****************************************************************!*\ 23225 !*** ./node_modules/swiper/core/update/updateSlidesProgress.js ***! 23226 \*****************************************************************/ 23227/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 23228 23229"use strict"; 23230__webpack_require__.r(__webpack_exports__); 23231/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23232/* harmony export */ "default": () => (/* binding */ updateSlidesProgress) 23233/* harmony export */ }); 23234/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 23235 23236function updateSlidesProgress(translate = this && this.translate || 0) { 23237 const swiper = this; 23238 const params = swiper.params; 23239 const { 23240 slides, 23241 rtlTranslate: rtl, 23242 snapGrid 23243 } = swiper; 23244 if (slides.length === 0) return; 23245 if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); 23246 let offsetCenter = -translate; 23247 if (rtl) offsetCenter = translate; // Visible Slides 23248 23249 slides.removeClass(params.slideVisibleClass); 23250 swiper.visibleSlidesIndexes = []; 23251 swiper.visibleSlides = []; 23252 23253 for (let i = 0; i < slides.length; i += 1) { 23254 const slide = slides[i]; 23255 let slideOffset = slide.swiperSlideOffset; 23256 23257 if (params.cssMode && params.centeredSlides) { 23258 slideOffset -= slides[0].swiperSlideOffset; 23259 } 23260 23261 const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); 23262 const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); 23263 const slideBefore = -(offsetCenter - slideOffset); 23264 const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; 23265 const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; 23266 23267 if (isVisible) { 23268 swiper.visibleSlides.push(slide); 23269 swiper.visibleSlidesIndexes.push(i); 23270 slides.eq(i).addClass(params.slideVisibleClass); 23271 } 23272 23273 slide.progress = rtl ? -slideProgress : slideProgress; 23274 slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; 23275 } 23276 23277 swiper.visibleSlides = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.visibleSlides); 23278} 23279 23280/***/ }), 23281
vendor: 9,405 bytes, lines 23282-23591
23282/***/ "./node_modules/swiper/modules/a11y/a11y.js": 23283/*!**************************************************!*\ 23284 !*** ./node_modules/swiper/modules/a11y/a11y.js ***! 23285 \**************************************************/ 23286/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 23287 23288"use strict"; 23289__webpack_require__.r(__webpack_exports__); 23290/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23291/* harmony export */ "default": () => (/* binding */ A11y) 23292/* harmony export */ }); 23293/* harmony import */ var _shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/classes-to-selector.js */ "./node_modules/swiper/shared/classes-to-selector.js"); 23294/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 23295 23296 23297function A11y({ 23298 swiper, 23299 extendParams, 23300 on 23301}) { 23302 extendParams({ 23303 a11y: { 23304 enabled: true, 23305 notificationClass: 'swiper-notification', 23306 prevSlideMessage: 'Previous slide', 23307 nextSlideMessage: 'Next slide', 23308 firstSlideMessage: 'This is the first slide', 23309 lastSlideMessage: 'This is the last slide', 23310 paginationBulletMessage: 'Go to slide {{index}}', 23311 slideLabelMessage: '{{index}} / {{slidesLength}}', 23312 containerMessage: null, 23313 containerRoleDescriptionMessage: null, 23314 itemRoleDescriptionMessage: null, 23315 slideRole: 'group' 23316 } 23317 }); 23318 let liveRegion = null; 23319 23320 function notify(message) { 23321 const notification = liveRegion; 23322 if (notification.length === 0) return; 23323 notification.html(''); 23324 notification.html(message); 23325 } 23326 23327 function getRandomNumber(size = 16) { 23328 const randomChar = () => Math.round(16 * Math.random()).toString(16); 23329 23330 return 'x'.repeat(size).replace(/x/g, randomChar); 23331 } 23332 23333 function makeElFocusable($el) { 23334 $el.attr('tabIndex', '0'); 23335 } 23336 23337 function makeElNotFocusable($el) { 23338 $el.attr('tabIndex', '-1'); 23339 } 23340 23341 function addElRole($el, role) { 23342 $el.attr('role', role); 23343 } 23344 23345 function addElRoleDescription($el, description) { 23346 $el.attr('aria-roledescription', description); 23347 } 23348 23349 function addElControls($el, controls) { 23350 $el.attr('aria-controls', controls); 23351 } 23352 23353 function addElLabel($el, label) { 23354 $el.attr('aria-label', label); 23355 } 23356 23357 function addElId($el, id) { 23358 $el.attr('id', id); 23359 } 23360 23361 function addElLive($el, live) { 23362 $el.attr('aria-live', live); 23363 } 23364 23365 function disableEl($el) { 23366 $el.attr('aria-disabled', true); 23367 } 23368 23369 function enableEl($el) { 23370 $el.attr('aria-disabled', false); 23371 } 23372 23373 function onEnterOrSpaceKey(e) { 23374 if (e.keyCode !== 13 && e.keyCode !== 32) return; 23375 const params = swiper.params.a11y; 23376 const $targetEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target); 23377 23378 if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { 23379 if (!(swiper.isEnd && !swiper.params.loop)) { 23380 swiper.slideNext(); 23381 } 23382 23383 if (swiper.isEnd) { 23384 notify(params.lastSlideMessage); 23385 } else { 23386 notify(params.nextSlideMessage); 23387 } 23388 } 23389 23390 if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { 23391 if (!(swiper.isBeginning && !swiper.params.loop)) { 23392 swiper.slidePrev(); 23393 } 23394 23395 if (swiper.isBeginning) { 23396 notify(params.firstSlideMessage); 23397 } else { 23398 notify(params.prevSlideMessage); 23399 } 23400 } 23401 23402 if (swiper.pagination && $targetEl.is((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.params.pagination.bulletClass))) { 23403 $targetEl[0].click(); 23404 } 23405 } 23406 23407 function updateNavigation() { 23408 if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return; 23409 const { 23410 $nextEl, 23411 $prevEl 23412 } = swiper.navigation; 23413 23414 if ($prevEl && $prevEl.length > 0) { 23415 if (swiper.isBeginning) { 23416 disableEl($prevEl); 23417 makeElNotFocusable($prevEl); 23418 } else { 23419 enableEl($prevEl); 23420 makeElFocusable($prevEl); 23421 } 23422 } 23423 23424 if ($nextEl && $nextEl.length > 0) { 23425 if (swiper.isEnd) { 23426 disableEl($nextEl); 23427 makeElNotFocusable($nextEl); 23428 } else { 23429 enableEl($nextEl); 23430 makeElFocusable($nextEl); 23431 } 23432 } 23433 } 23434 23435 function hasPagination() { 23436 return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length; 23437 } 23438 23439 function hasClickablePagination() { 23440 return hasPagination() && swiper.params.pagination.clickable; 23441 } 23442 23443 function updatePagination() { 23444 const params = swiper.params.a11y; 23445 if (!hasPagination()) return; 23446 swiper.pagination.bullets.each(bulletEl => { 23447 const $bulletEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(bulletEl); 23448 23449 if (swiper.params.pagination.clickable) { 23450 makeElFocusable($bulletEl); 23451 23452 if (!swiper.params.pagination.renderBullet) { 23453 addElRole($bulletEl, 'button'); 23454 addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1)); 23455 } 23456 } 23457 23458 if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) { 23459 $bulletEl.attr('aria-current', 'true'); 23460 } else { 23461 $bulletEl.removeAttr('aria-current'); 23462 } 23463 }); 23464 } 23465 23466 const initNavEl = ($el, wrapperId, message) => { 23467 makeElFocusable($el); 23468 23469 if ($el[0].tagName !== 'BUTTON') { 23470 addElRole($el, 'button'); 23471 $el.on('keydown', onEnterOrSpaceKey); 23472 } 23473 23474 addElLabel($el, message); 23475 addElControls($el, wrapperId); 23476 }; 23477 23478 function init() { 23479 const params = swiper.params.a11y; 23480 swiper.$el.append(liveRegion); // Container 23481 23482 const $containerEl = swiper.$el; 23483 23484 if (params.containerRoleDescriptionMessage) { 23485 addElRoleDescription($containerEl, params.containerRoleDescriptionMessage); 23486 } 23487 23488 if (params.containerMessage) { 23489 addElLabel($containerEl, params.containerMessage); 23490 } // Wrapper 23491 23492 23493 const $wrapperEl = swiper.$wrapperEl; 23494 const wrapperId = $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`; 23495 const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite'; 23496 addElId($wrapperEl, wrapperId); 23497 addElLive($wrapperEl, live); // Slide 23498 23499 if (params.itemRoleDescriptionMessage) { 23500 addElRoleDescription((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.slides), params.itemRoleDescriptionMessage); 23501 } 23502 23503 addElRole((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.slides), params.slideRole); 23504 const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length; 23505 swiper.slides.each((slideEl, index) => { 23506 const $slideEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl); 23507 const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index; 23508 const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength); 23509 addElLabel($slideEl, ariaLabelMessage); 23510 }); // Navigation 23511 23512 let $nextEl; 23513 let $prevEl; 23514 23515 if (swiper.navigation && swiper.navigation.$nextEl) { 23516 $nextEl = swiper.navigation.$nextEl; 23517 } 23518 23519 if (swiper.navigation && swiper.navigation.$prevEl) { 23520 $prevEl = swiper.navigation.$prevEl; 23521 } 23522 23523 if ($nextEl && $nextEl.length) { 23524 initNavEl($nextEl, wrapperId, params.nextSlideMessage); 23525 } 23526 23527 if ($prevEl && $prevEl.length) { 23528 initNavEl($prevEl, wrapperId, params.prevSlideMessage); 23529 } // Pagination 23530 23531 23532 if (hasClickablePagination()) { 23533 swiper.pagination.$el.on('keydown', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); 23534 } 23535 } 23536 23537 function destroy() { 23538 if (liveRegion && liveRegion.length > 0) liveRegion.remove(); 23539 let $nextEl; 23540 let $prevEl; 23541 23542 if (swiper.navigation && swiper.navigation.$nextEl) { 23543 $nextEl = swiper.navigation.$nextEl; 23544 } 23545 23546 if (swiper.navigation && swiper.navigation.$prevEl) { 23547 $prevEl = swiper.navigation.$prevEl; 23548 } 23549 23550 if ($nextEl) { 23551 $nextEl.off('keydown', onEnterOrSpaceKey); 23552 } 23553 23554 if ($prevEl) { 23555 $prevEl.off('keydown', onEnterOrSpaceKey); 23556 } // Pagination 23557 23558 23559 if (hasClickablePagination()) { 23560 swiper.pagination.$el.off('keydown', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); 23561 } 23562 } 23563 23564 on('beforeInit', () => { 23565 liveRegion = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`); 23566 }); 23567 on('afterInit', () => { 23568 if (!swiper.params.a11y.enabled) return; 23569 init(); 23570 updateNavigation(); 23571 }); 23572 on('toEdge', () => { 23573 if (!swiper.params.a11y.enabled) return; 23574 updateNavigation(); 23575 }); 23576 on('fromEdge', () => { 23577 if (!swiper.params.a11y.enabled) return; 23578 updateNavigation(); 23579 }); 23580 on('paginationUpdate', () => { 23581 if (!swiper.params.a11y.enabled) return; 23582 updatePagination(); 23583 }); 23584 on('destroy', () => { 23585 if (!swiper.params.a11y.enabled) return; 23586 destroy(); 23587 }); 23588} 23589 23590/***/ }), 23591
vendor: 6,774 bytes, lines 23592-23829
23592/***/ "./node_modules/swiper/modules/autoplay/autoplay.js": 23593/*!**********************************************************!*\ 23594 !*** ./node_modules/swiper/modules/autoplay/autoplay.js ***! 23595 \**********************************************************/ 23596/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 23597 23598"use strict"; 23599__webpack_require__.r(__webpack_exports__); 23600/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23601/* harmony export */ "default": () => (/* binding */ Autoplay) 23602/* harmony export */ }); 23603/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 23604/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 23605/* eslint no-underscore-dangle: "off" */ 23606 23607/* eslint no-use-before-define: "off" */ 23608 23609 23610function Autoplay({ 23611 swiper, 23612 extendParams, 23613 on, 23614 emit 23615}) { 23616 let timeout; 23617 swiper.autoplay = { 23618 running: false, 23619 paused: false 23620 }; 23621 extendParams({ 23622 autoplay: { 23623 enabled: false, 23624 delay: 3000, 23625 waitForTransition: true, 23626 disableOnInteraction: true, 23627 stopOnLastSlide: false, 23628 reverseDirection: false, 23629 pauseOnMouseEnter: false 23630 } 23631 }); 23632 23633 function run() { 23634 const $activeSlideEl = swiper.slides.eq(swiper.activeIndex); 23635 let delay = swiper.params.autoplay.delay; 23636 23637 if ($activeSlideEl.attr('data-swiper-autoplay')) { 23638 delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; 23639 } 23640 23641 clearTimeout(timeout); 23642 timeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.nextTick)(() => { 23643 let autoplayResult; 23644 23645 if (swiper.params.autoplay.reverseDirection) { 23646 if (swiper.params.loop) { 23647 swiper.loopFix(); 23648 autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); 23649 emit('autoplay'); 23650 } else if (!swiper.isBeginning) { 23651 autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); 23652 emit('autoplay'); 23653 } else if (!swiper.params.autoplay.stopOnLastSlide) { 23654 autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); 23655 emit('autoplay'); 23656 } else { 23657 stop(); 23658 } 23659 } else if (swiper.params.loop) { 23660 swiper.loopFix(); 23661 autoplayResult = swiper.slideNext(swiper.params.speed, true, true); 23662 emit('autoplay'); 23663 } else if (!swiper.isEnd) { 23664 autoplayResult = swiper.slideNext(swiper.params.speed, true, true); 23665 emit('autoplay'); 23666 } else if (!swiper.params.autoplay.stopOnLastSlide) { 23667 autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true); 23668 emit('autoplay'); 23669 } else { 23670 stop(); 23671 } 23672 23673 if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) { 23674 run(); 23675 } 23676 }, delay); 23677 } 23678 23679 function start() { 23680 if (typeof timeout !== 'undefined') return false; 23681 if (swiper.autoplay.running) return false; 23682 swiper.autoplay.running = true; 23683 emit('autoplayStart'); 23684 run(); 23685 return true; 23686 } 23687 23688 function stop() { 23689 if (!swiper.autoplay.running) return false; 23690 if (typeof timeout === 'undefined') return false; 23691 23692 if (timeout) { 23693 clearTimeout(timeout); 23694 timeout = undefined; 23695 } 23696 23697 swiper.autoplay.running = false; 23698 emit('autoplayStop'); 23699 return true; 23700 } 23701 23702 function pause(speed) { 23703 if (!swiper.autoplay.running) return; 23704 if (swiper.autoplay.paused) return; 23705 if (timeout) clearTimeout(timeout); 23706 swiper.autoplay.paused = true; 23707 23708 if (speed === 0 || !swiper.params.autoplay.waitForTransition) { 23709 swiper.autoplay.paused = false; 23710 run(); 23711 } else { 23712 ['transitionend', 'webkitTransitionEnd'].forEach(event => { 23713 swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd); 23714 }); 23715 } 23716 } 23717 23718 function onVisibilityChange() { 23719 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 23720 23721 if (document.visibilityState === 'hidden' && swiper.autoplay.running) { 23722 pause(); 23723 } 23724 23725 if (document.visibilityState === 'visible' && swiper.autoplay.paused) { 23726 run(); 23727 swiper.autoplay.paused = false; 23728 } 23729 } 23730 23731 function onTransitionEnd(e) { 23732 if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return; 23733 if (e.target !== swiper.$wrapperEl[0]) return; 23734 ['transitionend', 'webkitTransitionEnd'].forEach(event => { 23735 swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); 23736 }); 23737 swiper.autoplay.paused = false; 23738 23739 if (!swiper.autoplay.running) { 23740 stop(); 23741 } else { 23742 run(); 23743 } 23744 } 23745 23746 function onMouseEnter() { 23747 if (swiper.params.autoplay.disableOnInteraction) { 23748 stop(); 23749 } else { 23750 pause(); 23751 } 23752 23753 ['transitionend', 'webkitTransitionEnd'].forEach(event => { 23754 swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); 23755 }); 23756 } 23757 23758 function onMouseLeave() { 23759 if (swiper.params.autoplay.disableOnInteraction) { 23760 return; 23761 } 23762 23763 swiper.autoplay.paused = false; 23764 run(); 23765 } 23766 23767 function attachMouseEvents() { 23768 if (swiper.params.autoplay.pauseOnMouseEnter) { 23769 swiper.$el.on('mouseenter', onMouseEnter); 23770 swiper.$el.on('mouseleave', onMouseLeave); 23771 } 23772 } 23773 23774 function detachMouseEvents() { 23775 swiper.$el.off('mouseenter', onMouseEnter); 23776 swiper.$el.off('mouseleave', onMouseLeave); 23777 } 23778 23779 on('init', () => { 23780 if (swiper.params.autoplay.enabled) { 23781 start(); 23782 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 23783 document.addEventListener('visibilitychange', onVisibilityChange); 23784 attachMouseEvents(); 23785 } 23786 }); 23787 on('beforeTransitionStart', (_s, speed, internal) => { 23788 if (swiper.autoplay.running) { 23789 if (internal || !swiper.params.autoplay.disableOnInteraction) { 23790 swiper.autoplay.pause(speed); 23791 } else { 23792 stop(); 23793 } 23794 } 23795 }); 23796 on('sliderFirstMove', () => { 23797 if (swiper.autoplay.running) { 23798 if (swiper.params.autoplay.disableOnInteraction) { 23799 stop(); 23800 } else { 23801 pause(); 23802 } 23803 } 23804 }); 23805 on('touchEnd', () => { 23806 if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) { 23807 run(); 23808 } 23809 }); 23810 on('destroy', () => { 23811 detachMouseEvents(); 23812 23813 if (swiper.autoplay.running) { 23814 stop(); 23815 } 23816 23817 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 23818 document.removeEventListener('visibilitychange', onVisibilityChange); 23819 }); 23820 Object.assign(swiper.autoplay, { 23821 pause, 23822 run, 23823 start, 23824 stop 23825 }); 23826} 23827 23828/***/ }), 23829
vendor: 6,402 bytes, lines 23830-24035
23830/***/ "./node_modules/swiper/modules/controller/controller.js": 23831/*!**************************************************************!*\ 23832 !*** ./node_modules/swiper/modules/controller/controller.js ***! 23833 \**************************************************************/ 23834/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 23835 23836"use strict"; 23837__webpack_require__.r(__webpack_exports__); 23838/* harmony export */ __webpack_require__.d(__webpack_exports__, { 23839/* harmony export */ "default": () => (/* binding */ Controller) 23840/* harmony export */ }); 23841/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 23842/* eslint no-bitwise: ["error", { "allow": [">>"] }] */ 23843 23844function Controller({ 23845 swiper, 23846 extendParams, 23847 on 23848}) { 23849 extendParams({ 23850 controller: { 23851 control: undefined, 23852 inverse: false, 23853 by: 'slide' // or 'container' 23854 23855 } 23856 }); 23857 swiper.controller = { 23858 control: undefined 23859 }; 23860 23861 function LinearSpline(x, y) { 23862 const binarySearch = function search() { 23863 let maxIndex; 23864 let minIndex; 23865 let guess; 23866 return (array, val) => { 23867 minIndex = -1; 23868 maxIndex = array.length; 23869 23870 while (maxIndex - minIndex > 1) { 23871 guess = maxIndex + minIndex >> 1; 23872 23873 if (array[guess] <= val) { 23874 minIndex = guess; 23875 } else { 23876 maxIndex = guess; 23877 } 23878 } 23879 23880 return maxIndex; 23881 }; 23882 }(); 23883 23884 this.x = x; 23885 this.y = y; 23886 this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value: 23887 // (x1,y1) is the known point before given value, 23888 // (x3,y3) is the known point after given value. 23889 23890 let i1; 23891 let i3; 23892 23893 this.interpolate = function interpolate(x2) { 23894 if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2): 23895 23896 i3 = binarySearch(this.x, x2); 23897 i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already: 23898 // y2 := ((x2âx1) à (y3ây1)) ÷ (x3âx1) + y1 23899 23900 return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1]; 23901 }; 23902 23903 return this; 23904 } // xxx: for now i will just save one spline function to to 23905 23906 23907 function getInterpolateFunction(c) { 23908 if (!swiper.controller.spline) { 23909 swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid); 23910 } 23911 } 23912 23913 function setTranslate(_t, byController) { 23914 const controlled = swiper.controller.control; 23915 let multiplier; 23916 let controlledTranslate; 23917 const Swiper = swiper.constructor; 23918 23919 function setControlledTranslate(c) { 23920 // this will create an Interpolate function based on the snapGrids 23921 // x is the Grid of the scrolled scroller and y will be the controlled scroller 23922 // it makes sense to create this only once and recall it for the interpolation 23923 // the function does a lot of value caching for performance 23924 const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; 23925 23926 if (swiper.params.controller.by === 'slide') { 23927 getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid 23928 // but it did not work out 23929 23930 controlledTranslate = -swiper.controller.spline.interpolate(-translate); 23931 } 23932 23933 if (!controlledTranslate || swiper.params.controller.by === 'container') { 23934 multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); 23935 controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate(); 23936 } 23937 23938 if (swiper.params.controller.inverse) { 23939 controlledTranslate = c.maxTranslate() - controlledTranslate; 23940 } 23941 23942 c.updateProgress(controlledTranslate); 23943 c.setTranslate(controlledTranslate, swiper); 23944 c.updateActiveIndex(); 23945 c.updateSlidesClasses(); 23946 } 23947 23948 if (Array.isArray(controlled)) { 23949 for (let i = 0; i < controlled.length; i += 1) { 23950 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 23951 setControlledTranslate(controlled[i]); 23952 } 23953 } 23954 } else if (controlled instanceof Swiper && byController !== controlled) { 23955 setControlledTranslate(controlled); 23956 } 23957 } 23958 23959 function setTransition(duration, byController) { 23960 const Swiper = swiper.constructor; 23961 const controlled = swiper.controller.control; 23962 let i; 23963 23964 function setControlledTransition(c) { 23965 c.setTransition(duration, swiper); 23966 23967 if (duration !== 0) { 23968 c.transitionStart(); 23969 23970 if (c.params.autoHeight) { 23971 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => { 23972 c.updateAutoHeight(); 23973 }); 23974 } 23975 23976 c.$wrapperEl.transitionEnd(() => { 23977 if (!controlled) return; 23978 23979 if (c.params.loop && swiper.params.controller.by === 'slide') { 23980 c.loopFix(); 23981 } 23982 23983 c.transitionEnd(); 23984 }); 23985 } 23986 } 23987 23988 if (Array.isArray(controlled)) { 23989 for (i = 0; i < controlled.length; i += 1) { 23990 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 23991 setControlledTransition(controlled[i]); 23992 } 23993 } 23994 } else if (controlled instanceof Swiper && byController !== controlled) { 23995 setControlledTransition(controlled); 23996 } 23997 } 23998 23999 function removeSpline() { 24000 if (!swiper.controller.control) return; 24001 24002 if (swiper.controller.spline) { 24003 swiper.controller.spline = undefined; 24004 delete swiper.controller.spline; 24005 } 24006 } 24007 24008 on('beforeInit', () => { 24009 swiper.controller.control = swiper.params.controller.control; 24010 }); 24011 on('update', () => { 24012 removeSpline(); 24013 }); 24014 on('resize', () => { 24015 removeSpline(); 24016 }); 24017 on('observerUpdate', () => { 24018 removeSpline(); 24019 }); 24020 on('setTranslate', (_s, translate, byController) => { 24021 if (!swiper.controller.control) return; 24022 swiper.controller.setTranslate(translate, byController); 24023 }); 24024 on('setTransition', (_s, duration, byController) => { 24025 if (!swiper.controller.control) return; 24026 swiper.controller.setTransition(duration, byController); 24027 }); 24028 Object.assign(swiper.controller, { 24029 setTranslate, 24030 setTransition 24031 }); 24032} 24033 24034/***/ }), 24035
vendor: 5,318 bytes, lines 24036-24178
24036/***/ "./node_modules/swiper/modules/effect-cards/effect-cards.js": 24037/*!******************************************************************!*\ 24038 !*** ./node_modules/swiper/modules/effect-cards/effect-cards.js ***! 24039 \******************************************************************/ 24040/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 24041 24042"use strict"; 24043__webpack_require__.r(__webpack_exports__); 24044/* harmony export */ __webpack_require__.d(__webpack_exports__, { 24045/* harmony export */ "default": () => (/* binding */ EffectCards) 24046/* harmony export */ }); 24047/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); 24048/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); 24049/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); 24050/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); 24051 24052 24053 24054 24055function EffectCards({ 24056 swiper, 24057 extendParams, 24058 on 24059}) { 24060 extendParams({ 24061 cardsEffect: { 24062 slideShadows: true, 24063 transformEl: null 24064 } 24065 }); 24066 24067 const setTranslate = () => { 24068 const { 24069 slides, 24070 activeIndex 24071 } = swiper; 24072 const params = swiper.params.cardsEffect; 24073 const { 24074 startTranslate, 24075 isTouched 24076 } = swiper.touchEventsData; 24077 const currentTranslate = swiper.translate; 24078 24079 for (let i = 0; i < slides.length; i += 1) { 24080 const $slideEl = slides.eq(i); 24081 const slideProgress = $slideEl[0].progress; 24082 const progress = Math.min(Math.max(slideProgress, -4), 4); 24083 let offset = $slideEl[0].swiperSlideOffset; 24084 24085 if (swiper.params.centeredSlides && !swiper.params.cssMode) { 24086 swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`); 24087 } 24088 24089 if (swiper.params.centeredSlides && swiper.params.cssMode) { 24090 offset -= slides[0].swiperSlideOffset; 24091 } 24092 24093 let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset; 24094 let tY = 0; 24095 const tZ = -100 * Math.abs(progress); 24096 let scale = 1; 24097 let rotate = -2 * progress; 24098 let tXAdd = 8 - Math.abs(progress) * 0.75; 24099 const isSwipeToNext = (i === activeIndex || i === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate; 24100 const isSwipeToPrev = (i === activeIndex || i === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate; 24101 24102 if (isSwipeToNext || isSwipeToPrev) { 24103 const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5; 24104 rotate += -28 * progress * subProgress; 24105 scale += -0.5 * subProgress; 24106 tXAdd += 96 * subProgress; 24107 tY = `${-25 * subProgress * Math.abs(progress)}%`; 24108 } 24109 24110 if (progress < 0) { 24111 // next 24112 tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`; 24113 } else if (progress > 0) { 24114 // prev 24115 tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`; 24116 } else { 24117 tX = `${tX}px`; 24118 } 24119 24120 if (!swiper.isHorizontal()) { 24121 const prevY = tY; 24122 tY = tX; 24123 tX = prevY; 24124 } 24125 24126 const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`; 24127 const transform = ` 24128 translate3d(${tX}, ${tY}, ${tZ}px) 24129 rotateZ(${rotate}deg) 24130 scale(${scaleString}) 24131 `; 24132 24133 if (params.slideShadows) { 24134 // Set shadows 24135 let $shadowEl = $slideEl.find('.swiper-slide-shadow'); 24136 24137 if ($shadowEl.length === 0) { 24138 $shadowEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl); 24139 } 24140 24141 if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1); 24142 } 24143 24144 $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; 24145 const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); 24146 $targetEl.transform(transform); 24147 } 24148 }; 24149 24150 const setTransition = duration => { 24151 const { 24152 transformEl 24153 } = swiper.params.cardsEffect; 24154 const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; 24155 $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); 24156 (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__["default"])({ 24157 swiper, 24158 duration, 24159 transformEl 24160 }); 24161 }; 24162 24163 (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ 24164 effect: 'cards', 24165 swiper, 24166 on, 24167 setTranslate, 24168 setTransition, 24169 perspective: () => true, 24170 overwriteParams: () => ({ 24171 watchSlidesProgress: true, 24172 virtualTranslate: !swiper.params.cssMode 24173 }) 24174 }); 24175} 24176 24177/***/ }), 24178
vendor: 5,330 bytes, lines 24179-24298
24179/***/ "./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js": 24180/*!**************************************************************************!*\ 24181 !*** ./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js ***! 24182 \**************************************************************************/ 24183/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 24184 24185"use strict"; 24186__webpack_require__.r(__webpack_exports__); 24187/* harmony export */ __webpack_require__.d(__webpack_exports__, { 24188/* harmony export */ "default": () => (/* binding */ EffectCoverflow) 24189/* harmony export */ }); 24190/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); 24191/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); 24192/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); 24193 24194 24195 24196function EffectCoverflow({ 24197 swiper, 24198 extendParams, 24199 on 24200}) { 24201 extendParams({ 24202 coverflowEffect: { 24203 rotate: 50, 24204 stretch: 0, 24205 depth: 100, 24206 scale: 1, 24207 modifier: 1, 24208 slideShadows: true, 24209 transformEl: null 24210 } 24211 }); 24212 24213 const setTranslate = () => { 24214 const { 24215 width: swiperWidth, 24216 height: swiperHeight, 24217 slides, 24218 slidesSizesGrid 24219 } = swiper; 24220 const params = swiper.params.coverflowEffect; 24221 const isHorizontal = swiper.isHorizontal(); 24222 const transform = swiper.translate; 24223 const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2; 24224 const rotate = isHorizontal ? params.rotate : -params.rotate; 24225 const translate = params.depth; // Each slide offset from center 24226 24227 for (let i = 0, length = slides.length; i < length; i += 1) { 24228 const $slideEl = slides.eq(i); 24229 const slideSize = slidesSizesGrid[i]; 24230 const slideOffset = $slideEl[0].swiperSlideOffset; 24231 const offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier; 24232 let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; 24233 let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0 24234 24235 let translateZ = -translate * Math.abs(offsetMultiplier); 24236 let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders 24237 24238 if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) { 24239 stretch = parseFloat(params.stretch) / 100 * slideSize; 24240 } 24241 24242 let translateY = isHorizontal ? 0 : stretch * offsetMultiplier; 24243 let translateX = isHorizontal ? stretch * offsetMultiplier : 0; 24244 let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values 24245 24246 if (Math.abs(translateX) < 0.001) translateX = 0; 24247 if (Math.abs(translateY) < 0.001) translateY = 0; 24248 if (Math.abs(translateZ) < 0.001) translateZ = 0; 24249 if (Math.abs(rotateY) < 0.001) rotateY = 0; 24250 if (Math.abs(rotateX) < 0.001) rotateX = 0; 24251 if (Math.abs(scale) < 0.001) scale = 0; 24252 const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`; 24253 const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); 24254 $targetEl.transform(slideTransform); 24255 $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; 24256 24257 if (params.slideShadows) { 24258 // Set shadows 24259 let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 24260 let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 24261 24262 if ($shadowBeforeEl.length === 0) { 24263 $shadowBeforeEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, isHorizontal ? 'left' : 'top'); 24264 } 24265 24266 if ($shadowAfterEl.length === 0) { 24267 $shadowAfterEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, isHorizontal ? 'right' : 'bottom'); 24268 } 24269 24270 if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; 24271 if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0; 24272 } 24273 } 24274 }; 24275 24276 const setTransition = duration => { 24277 const { 24278 transformEl 24279 } = swiper.params.coverflowEffect; 24280 const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; 24281 $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); 24282 }; 24283 24284 (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ 24285 effect: 'coverflow', 24286 swiper, 24287 on, 24288 setTranslate, 24289 setTransition, 24290 perspective: () => true, 24291 overwriteParams: () => ({ 24292 watchSlidesProgress: true 24293 }) 24294 }); 24295} 24296 24297/***/ }), 24298
vendor: 6,169 bytes, lines 24299-24470
24299/***/ "./node_modules/swiper/modules/effect-creative/effect-creative.js": 24300/*!************************************************************************!*\ 24301 !*** ./node_modules/swiper/modules/effect-creative/effect-creative.js ***! 24302 \************************************************************************/ 24303/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 24304 24305"use strict"; 24306__webpack_require__.r(__webpack_exports__); 24307/* harmony export */ __webpack_require__.d(__webpack_exports__, { 24308/* harmony export */ "default": () => (/* binding */ EffectCreative) 24309/* harmony export */ }); 24310/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); 24311/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); 24312/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); 24313/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); 24314 24315 24316 24317 24318function EffectCreative({ 24319 swiper, 24320 extendParams, 24321 on 24322}) { 24323 extendParams({ 24324 creativeEffect: { 24325 transformEl: null, 24326 limitProgress: 1, 24327 shadowPerProgress: false, 24328 progressMultiplier: 1, 24329 perspective: true, 24330 prev: { 24331 translate: [0, 0, 0], 24332 rotate: [0, 0, 0], 24333 opacity: 1, 24334 scale: 1 24335 }, 24336 next: { 24337 translate: [0, 0, 0], 24338 rotate: [0, 0, 0], 24339 opacity: 1, 24340 scale: 1 24341 } 24342 } 24343 }); 24344 24345 const getTranslateValue = value => { 24346 if (typeof value === 'string') return value; 24347 return `${value}px`; 24348 }; 24349 24350 const setTranslate = () => { 24351 const { 24352 slides, 24353 $wrapperEl, 24354 slidesSizesGrid 24355 } = swiper; 24356 const params = swiper.params.creativeEffect; 24357 const { 24358 progressMultiplier: multiplier 24359 } = params; 24360 const isCenteredSlides = swiper.params.centeredSlides; 24361 24362 if (isCenteredSlides) { 24363 const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0; 24364 $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`); 24365 } 24366 24367 for (let i = 0; i < slides.length; i += 1) { 24368 const $slideEl = slides.eq(i); 24369 const slideProgress = $slideEl[0].progress; 24370 const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress); 24371 let originalProgress = progress; 24372 24373 if (!isCenteredSlides) { 24374 originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress); 24375 } 24376 24377 const offset = $slideEl[0].swiperSlideOffset; 24378 const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0]; 24379 const r = [0, 0, 0]; 24380 let custom = false; 24381 24382 if (!swiper.isHorizontal()) { 24383 t[1] = t[0]; 24384 t[0] = 0; 24385 } 24386 24387 let data = { 24388 translate: [0, 0, 0], 24389 rotate: [0, 0, 0], 24390 scale: 1, 24391 opacity: 1 24392 }; 24393 24394 if (progress < 0) { 24395 data = params.next; 24396 custom = true; 24397 } else if (progress > 0) { 24398 data = params.prev; 24399 custom = true; 24400 } // set translate 24401 24402 24403 t.forEach((value, index) => { 24404 t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`; 24405 }); // set rotates 24406 24407 r.forEach((value, index) => { 24408 r[index] = data.rotate[index] * Math.abs(progress * multiplier); 24409 }); 24410 $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; 24411 const translateString = t.join(', '); 24412 const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`; 24413 const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`; 24414 const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier; 24415 const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows 24416 24417 if (custom && data.shadow || !custom) { 24418 let $shadowEl = $slideEl.children('.swiper-slide-shadow'); 24419 24420 if ($shadowEl.length === 0 && data.shadow) { 24421 $shadowEl = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl); 24422 } 24423 24424 if ($shadowEl.length) { 24425 const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress; 24426 $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1); 24427 } 24428 } 24429 24430 const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); 24431 $targetEl.transform(transform).css({ 24432 opacity: opacityString 24433 }); 24434 24435 if (data.origin) { 24436 $targetEl.css('transform-origin', data.origin); 24437 } 24438 } 24439 }; 24440 24441 const setTransition = duration => { 24442 const { 24443 transformEl 24444 } = swiper.params.creativeEffect; 24445 const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; 24446 $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); 24447 (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__["default"])({ 24448 swiper, 24449 duration, 24450 transformEl, 24451 allSlides: true 24452 }); 24453 }; 24454 24455 (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ 24456 effect: 'creative', 24457 swiper, 24458 on, 24459 setTranslate, 24460 setTransition, 24461 perspective: () => swiper.params.creativeEffect.perspective, 24462 overwriteParams: () => ({ 24463 watchSlidesProgress: true, 24464 virtualTranslate: !swiper.params.cssMode 24465 }) 24466 }); 24467} 24468 24469/***/ }), 24470
vendor: 6,822 bytes, lines 24471-24666
24471/***/ "./node_modules/swiper/modules/effect-cube/effect-cube.js": 24472/*!****************************************************************!*\ 24473 !*** ./node_modules/swiper/modules/effect-cube/effect-cube.js ***! 24474 \****************************************************************/ 24475/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 24476 24477"use strict"; 24478__webpack_require__.r(__webpack_exports__); 24479/* harmony export */ __webpack_require__.d(__webpack_exports__, { 24480/* harmony export */ "default": () => (/* binding */ EffectCube) 24481/* harmony export */ }); 24482/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 24483/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); 24484 24485 24486function EffectCube({ 24487 swiper, 24488 extendParams, 24489 on 24490}) { 24491 extendParams({ 24492 cubeEffect: { 24493 slideShadows: true, 24494 shadow: true, 24495 shadowOffset: 20, 24496 shadowScale: 0.94 24497 } 24498 }); 24499 24500 const setTranslate = () => { 24501 const { 24502 $el, 24503 $wrapperEl, 24504 slides, 24505 width: swiperWidth, 24506 height: swiperHeight, 24507 rtlTranslate: rtl, 24508 size: swiperSize, 24509 browser 24510 } = swiper; 24511 const params = swiper.params.cubeEffect; 24512 const isHorizontal = swiper.isHorizontal(); 24513 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 24514 let wrapperRotate = 0; 24515 let $cubeShadowEl; 24516 24517 if (params.shadow) { 24518 if (isHorizontal) { 24519 $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); 24520 24521 if ($cubeShadowEl.length === 0) { 24522 $cubeShadowEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])('<div class="swiper-cube-shadow"></div>'); 24523 $wrapperEl.append($cubeShadowEl); 24524 } 24525 24526 $cubeShadowEl.css({ 24527 height: `${swiperWidth}px` 24528 }); 24529 } else { 24530 $cubeShadowEl = $el.find('.swiper-cube-shadow'); 24531 24532 if ($cubeShadowEl.length === 0) { 24533 $cubeShadowEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])('<div class="swiper-cube-shadow"></div>'); 24534 $el.append($cubeShadowEl); 24535 } 24536 } 24537 } 24538 24539 for (let i = 0; i < slides.length; i += 1) { 24540 const $slideEl = slides.eq(i); 24541 let slideIndex = i; 24542 24543 if (isVirtual) { 24544 slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); 24545 } 24546 24547 let slideAngle = slideIndex * 90; 24548 let round = Math.floor(slideAngle / 360); 24549 24550 if (rtl) { 24551 slideAngle = -slideAngle; 24552 round = Math.floor(-slideAngle / 360); 24553 } 24554 24555 const progress = Math.max(Math.min($slideEl[0].progress, 1), -1); 24556 let tx = 0; 24557 let ty = 0; 24558 let tz = 0; 24559 24560 if (slideIndex % 4 === 0) { 24561 tx = -round * 4 * swiperSize; 24562 tz = 0; 24563 } else if ((slideIndex - 1) % 4 === 0) { 24564 tx = 0; 24565 tz = -round * 4 * swiperSize; 24566 } else if ((slideIndex - 2) % 4 === 0) { 24567 tx = swiperSize + round * 4 * swiperSize; 24568 tz = swiperSize; 24569 } else if ((slideIndex - 3) % 4 === 0) { 24570 tx = -swiperSize; 24571 tz = 3 * swiperSize + swiperSize * 4 * round; 24572 } 24573 24574 if (rtl) { 24575 tx = -tx; 24576 } 24577 24578 if (!isHorizontal) { 24579 ty = tx; 24580 tx = 0; 24581 } 24582 24583 const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`; 24584 24585 if (progress <= 1 && progress > -1) { 24586 wrapperRotate = slideIndex * 90 + progress * 90; 24587 if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90; 24588 } 24589 24590 $slideEl.transform(transform); 24591 24592 if (params.slideShadows) { 24593 // Set shadows 24594 let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 24595 let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 24596 24597 if (shadowBefore.length === 0) { 24598 shadowBefore = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`); 24599 $slideEl.append(shadowBefore); 24600 } 24601 24602 if (shadowAfter.length === 0) { 24603 shadowAfter = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`); 24604 $slideEl.append(shadowAfter); 24605 } 24606 24607 if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); 24608 if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); 24609 } 24610 } 24611 24612 $wrapperEl.css({ 24613 '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`, 24614 'transform-origin': `50% 50% -${swiperSize / 2}px` 24615 }); 24616 24617 if (params.shadow) { 24618 if (isHorizontal) { 24619 $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`); 24620 } else { 24621 const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; 24622 const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); 24623 const scale1 = params.shadowScale; 24624 const scale2 = params.shadowScale / multiplier; 24625 const offset = params.shadowOffset; 24626 $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`); 24627 } 24628 } 24629 24630 const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0; 24631 $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`); 24632 }; 24633 24634 const setTransition = duration => { 24635 const { 24636 $el, 24637 slides 24638 } = swiper; 24639 slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); 24640 24641 if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { 24642 $el.find('.swiper-cube-shadow').transition(duration); 24643 } 24644 }; 24645 24646 (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ 24647 effect: 'cube', 24648 swiper, 24649 on, 24650 setTranslate, 24651 setTransition, 24652 perspective: () => true, 24653 overwriteParams: () => ({ 24654 slidesPerView: 1, 24655 slidesPerGroup: 1, 24656 watchSlidesProgress: true, 24657 resistanceRatio: 0, 24658 spaceBetween: 0, 24659 centeredSlides: false, 24660 virtualTranslate: true 24661 }) 24662 }); 24663} 24664 24665/***/ }), 24666
vendor: 2,975 bytes, lines 24667-24753
24667/***/ "./node_modules/swiper/modules/effect-fade/effect-fade.js": 24668/*!****************************************************************!*\ 24669 !*** ./node_modules/swiper/modules/effect-fade/effect-fade.js ***! 24670 \****************************************************************/ 24671/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 24672 24673"use strict"; 24674__webpack_require__.r(__webpack_exports__); 24675/* harmony export */ __webpack_require__.d(__webpack_exports__, { 24676/* harmony export */ "default": () => (/* binding */ EffectFade) 24677/* harmony export */ }); 24678/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); 24679/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); 24680/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); 24681 24682 24683 24684function EffectFade({ 24685 swiper, 24686 extendParams, 24687 on 24688}) { 24689 extendParams({ 24690 fadeEffect: { 24691 crossFade: false, 24692 transformEl: null 24693 } 24694 }); 24695 24696 const setTranslate = () => { 24697 const { 24698 slides 24699 } = swiper; 24700 const params = swiper.params.fadeEffect; 24701 24702 for (let i = 0; i < slides.length; i += 1) { 24703 const $slideEl = swiper.slides.eq(i); 24704 const offset = $slideEl[0].swiperSlideOffset; 24705 let tx = -offset; 24706 if (!swiper.params.virtualTranslate) tx -= swiper.translate; 24707 let ty = 0; 24708 24709 if (!swiper.isHorizontal()) { 24710 ty = tx; 24711 tx = 0; 24712 } 24713 24714 const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); 24715 const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params, $slideEl); 24716 $targetEl.css({ 24717 opacity: slideOpacity 24718 }).transform(`translate3d(${tx}px, ${ty}px, 0px)`); 24719 } 24720 }; 24721 24722 const setTransition = duration => { 24723 const { 24724 transformEl 24725 } = swiper.params.fadeEffect; 24726 const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; 24727 $transitionElements.transition(duration); 24728 (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_2__["default"])({ 24729 swiper, 24730 duration, 24731 transformEl, 24732 allSlides: true 24733 }); 24734 }; 24735 24736 (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_0__["default"])({ 24737 effect: 'fade', 24738 swiper, 24739 on, 24740 setTranslate, 24741 setTransition, 24742 overwriteParams: () => ({ 24743 slidesPerView: 1, 24744 slidesPerGroup: 1, 24745 watchSlidesProgress: true, 24746 spaceBetween: 0, 24747 virtualTranslate: !swiper.params.cssMode 24748 }) 24749 }); 24750} 24751 24752/***/ }), 24753
vendor: 4,590 bytes, lines 24754-24873
24754/***/ "./node_modules/swiper/modules/effect-flip/effect-flip.js": 24755/*!****************************************************************!*\ 24756 !*** ./node_modules/swiper/modules/effect-flip/effect-flip.js ***! 24757 \****************************************************************/ 24758/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 24759 24760"use strict"; 24761__webpack_require__.r(__webpack_exports__); 24762/* harmony export */ __webpack_require__.d(__webpack_exports__, { 24763/* harmony export */ "default": () => (/* binding */ EffectFlip) 24764/* harmony export */ }); 24765/* harmony import */ var _shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-shadow.js */ "./node_modules/swiper/shared/create-shadow.js"); 24766/* harmony import */ var _shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/effect-init.js */ "./node_modules/swiper/shared/effect-init.js"); 24767/* harmony import */ var _shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/effect-target.js */ "./node_modules/swiper/shared/effect-target.js"); 24768/* harmony import */ var _shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/effect-virtual-transition-end.js */ "./node_modules/swiper/shared/effect-virtual-transition-end.js"); 24769 24770 24771 24772 24773function EffectFlip({ 24774 swiper, 24775 extendParams, 24776 on 24777}) { 24778 extendParams({ 24779 flipEffect: { 24780 slideShadows: true, 24781 limitRotation: true, 24782 transformEl: null 24783 } 24784 }); 24785 24786 const setTranslate = () => { 24787 const { 24788 slides, 24789 rtlTranslate: rtl 24790 } = swiper; 24791 const params = swiper.params.flipEffect; 24792 24793 for (let i = 0; i < slides.length; i += 1) { 24794 const $slideEl = slides.eq(i); 24795 let progress = $slideEl[0].progress; 24796 24797 if (swiper.params.flipEffect.limitRotation) { 24798 progress = Math.max(Math.min($slideEl[0].progress, 1), -1); 24799 } 24800 24801 const offset = $slideEl[0].swiperSlideOffset; 24802 const rotate = -180 * progress; 24803 let rotateY = rotate; 24804 let rotateX = 0; 24805 let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset; 24806 let ty = 0; 24807 24808 if (!swiper.isHorizontal()) { 24809 ty = tx; 24810 tx = 0; 24811 rotateX = -rotateY; 24812 rotateY = 0; 24813 } else if (rtl) { 24814 rotateY = -rotateY; 24815 } 24816 24817 $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; 24818 24819 if (params.slideShadows) { 24820 // Set shadows 24821 let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 24822 let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 24823 24824 if (shadowBefore.length === 0) { 24825 shadowBefore = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top'); 24826 } 24827 24828 if (shadowAfter.length === 0) { 24829 shadowAfter = (0,_shared_create_shadow_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom'); 24830 } 24831 24832 if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); 24833 if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); 24834 } 24835 24836 const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; 24837 const $targetEl = (0,_shared_effect_target_js__WEBPACK_IMPORTED_MODULE_2__["default"])(params, $slideEl); 24838 $targetEl.transform(transform); 24839 } 24840 }; 24841 24842 const setTransition = duration => { 24843 const { 24844 transformEl 24845 } = swiper.params.flipEffect; 24846 const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; 24847 $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); 24848 (0,_shared_effect_virtual_transition_end_js__WEBPACK_IMPORTED_MODULE_3__["default"])({ 24849 swiper, 24850 duration, 24851 transformEl 24852 }); 24853 }; 24854 24855 (0,_shared_effect_init_js__WEBPACK_IMPORTED_MODULE_1__["default"])({ 24856 effect: 'flip', 24857 swiper, 24858 on, 24859 setTranslate, 24860 setTransition, 24861 perspective: () => true, 24862 overwriteParams: () => ({ 24863 slidesPerView: 1, 24864 slidesPerGroup: 1, 24865 watchSlidesProgress: true, 24866 spaceBetween: 0, 24867 virtualTranslate: !swiper.params.cssMode 24868 }) 24869 }); 24870} 24871 24872/***/ }), 24873
vendor: 8,637 bytes, lines 24874-25133
24874/***/ "./node_modules/swiper/modules/free-mode/free-mode.js": 24875/*!************************************************************!*\ 24876 !*** ./node_modules/swiper/modules/free-mode/free-mode.js ***! 24877 \************************************************************/ 24878/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 24879 24880"use strict"; 24881__webpack_require__.r(__webpack_exports__); 24882/* harmony export */ __webpack_require__.d(__webpack_exports__, { 24883/* harmony export */ "default": () => (/* binding */ freeMode) 24884/* harmony export */ }); 24885/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 24886 24887function freeMode({ 24888 swiper, 24889 extendParams, 24890 emit, 24891 once 24892}) { 24893 extendParams({ 24894 freeMode: { 24895 enabled: false, 24896 momentum: true, 24897 momentumRatio: 1, 24898 momentumBounce: true, 24899 momentumBounceRatio: 1, 24900 momentumVelocityRatio: 1, 24901 sticky: false, 24902 minimumVelocity: 0.02 24903 } 24904 }); 24905 24906 function onTouchMove() { 24907 const { 24908 touchEventsData: data, 24909 touches 24910 } = swiper; // Velocity 24911 24912 if (data.velocities.length === 0) { 24913 data.velocities.push({ 24914 position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], 24915 time: data.touchStartTime 24916 }); 24917 } 24918 24919 data.velocities.push({ 24920 position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], 24921 time: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)() 24922 }); 24923 } 24924 24925 function onTouchEnd({ 24926 currentPos 24927 }) { 24928 const { 24929 params, 24930 $wrapperEl, 24931 rtlTranslate: rtl, 24932 snapGrid, 24933 touchEventsData: data 24934 } = swiper; // Time diff 24935 24936 const touchEndTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)(); 24937 const timeDiff = touchEndTime - data.touchStartTime; 24938 24939 if (currentPos < -swiper.minTranslate()) { 24940 swiper.slideTo(swiper.activeIndex); 24941 return; 24942 } 24943 24944 if (currentPos > -swiper.maxTranslate()) { 24945 if (swiper.slides.length < snapGrid.length) { 24946 swiper.slideTo(snapGrid.length - 1); 24947 } else { 24948 swiper.slideTo(swiper.slides.length - 1); 24949 } 24950 24951 return; 24952 } 24953 24954 if (params.freeMode.momentum) { 24955 if (data.velocities.length > 1) { 24956 const lastMoveEvent = data.velocities.pop(); 24957 const velocityEvent = data.velocities.pop(); 24958 const distance = lastMoveEvent.position - velocityEvent.position; 24959 const time = lastMoveEvent.time - velocityEvent.time; 24960 swiper.velocity = distance / time; 24961 swiper.velocity /= 2; 24962 24963 if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) { 24964 swiper.velocity = 0; 24965 } // this implies that the user stopped moving a finger then released. 24966 // There would be no events with distance zero, so the last event is stale. 24967 24968 24969 if (time > 150 || (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.now)() - lastMoveEvent.time > 300) { 24970 swiper.velocity = 0; 24971 } 24972 } else { 24973 swiper.velocity = 0; 24974 } 24975 24976 swiper.velocity *= params.freeMode.momentumVelocityRatio; 24977 data.velocities.length = 0; 24978 let momentumDuration = 1000 * params.freeMode.momentumRatio; 24979 const momentumDistance = swiper.velocity * momentumDuration; 24980 let newPosition = swiper.translate + momentumDistance; 24981 if (rtl) newPosition = -newPosition; 24982 let doBounce = false; 24983 let afterBouncePosition; 24984 const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio; 24985 let needsLoopFix; 24986 24987 if (newPosition < swiper.maxTranslate()) { 24988 if (params.freeMode.momentumBounce) { 24989 if (newPosition + swiper.maxTranslate() < -bounceAmount) { 24990 newPosition = swiper.maxTranslate() - bounceAmount; 24991 } 24992 24993 afterBouncePosition = swiper.maxTranslate(); 24994 doBounce = true; 24995 data.allowMomentumBounce = true; 24996 } else { 24997 newPosition = swiper.maxTranslate(); 24998 } 24999 25000 if (params.loop && params.centeredSlides) needsLoopFix = true; 25001 } else if (newPosition > swiper.minTranslate()) { 25002 if (params.freeMode.momentumBounce) { 25003 if (newPosition - swiper.minTranslate() > bounceAmount) { 25004 newPosition = swiper.minTranslate() + bounceAmount; 25005 } 25006 25007 afterBouncePosition = swiper.minTranslate(); 25008 doBounce = true; 25009 data.allowMomentumBounce = true; 25010 } else { 25011 newPosition = swiper.minTranslate(); 25012 } 25013 25014 if (params.loop && params.centeredSlides) needsLoopFix = true; 25015 } else if (params.freeMode.sticky) { 25016 let nextSlide; 25017 25018 for (let j = 0; j < snapGrid.length; j += 1) { 25019 if (snapGrid[j] > -newPosition) { 25020 nextSlide = j; 25021 break; 25022 } 25023 } 25024 25025 if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { 25026 newPosition = snapGrid[nextSlide]; 25027 } else { 25028 newPosition = snapGrid[nextSlide - 1]; 25029 } 25030 25031 newPosition = -newPosition; 25032 } 25033 25034 if (needsLoopFix) { 25035 once('transitionEnd', () => { 25036 swiper.loopFix(); 25037 }); 25038 } // Fix duration 25039 25040 25041 if (swiper.velocity !== 0) { 25042 if (rtl) { 25043 momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); 25044 } else { 25045 momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); 25046 } 25047 25048 if (params.freeMode.sticky) { 25049 // If freeMode.sticky is active and the user ends a swipe with a slow-velocity 25050 // event, then durations can be 20+ seconds to slide one (or zero!) slides. 25051 // It's easy to see this when simulating touch with mouse events. To fix this, 25052 // limit single-slide swipes to the default slide duration. This also has the 25053 // nice side effect of matching slide speed if the user stopped moving before 25054 // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. 25055 // For faster swipes, also apply limits (albeit higher ones). 25056 const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); 25057 const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; 25058 25059 if (moveDistance < currentSlideSize) { 25060 momentumDuration = params.speed; 25061 } else if (moveDistance < 2 * currentSlideSize) { 25062 momentumDuration = params.speed * 1.5; 25063 } else { 25064 momentumDuration = params.speed * 2.5; 25065 } 25066 } 25067 } else if (params.freeMode.sticky) { 25068 swiper.slideToClosest(); 25069 return; 25070 } 25071 25072 if (params.freeMode.momentumBounce && doBounce) { 25073 swiper.updateProgress(afterBouncePosition); 25074 swiper.setTransition(momentumDuration); 25075 swiper.setTranslate(newPosition); 25076 swiper.transitionStart(true, swiper.swipeDirection); 25077 swiper.animating = true; 25078 $wrapperEl.transitionEnd(() => { 25079 if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return; 25080 emit('momentumBounce'); 25081 swiper.setTransition(params.speed); 25082 setTimeout(() => { 25083 swiper.setTranslate(afterBouncePosition); 25084 $wrapperEl.transitionEnd(() => { 25085 if (!swiper || swiper.destroyed) return; 25086 swiper.transitionEnd(); 25087 }); 25088 }, 0); 25089 }); 25090 } else if (swiper.velocity) { 25091 emit('_freeModeNoMomentumRelease'); 25092 swiper.updateProgress(newPosition); 25093 swiper.setTransition(momentumDuration); 25094 swiper.setTranslate(newPosition); 25095 swiper.transitionStart(true, swiper.swipeDirection); 25096 25097 if (!swiper.animating) { 25098 swiper.animating = true; 25099 $wrapperEl.transitionEnd(() => { 25100 if (!swiper || swiper.destroyed) return; 25101 swiper.transitionEnd(); 25102 }); 25103 } 25104 } else { 25105 swiper.updateProgress(newPosition); 25106 } 25107 25108 swiper.updateActiveIndex(); 25109 swiper.updateSlidesClasses(); 25110 } else if (params.freeMode.sticky) { 25111 swiper.slideToClosest(); 25112 return; 25113 } else if (params.freeMode) { 25114 emit('_freeModeNoMomentumRelease'); 25115 } 25116 25117 if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) { 25118 swiper.updateProgress(); 25119 swiper.updateActiveIndex(); 25120 swiper.updateSlidesClasses(); 25121 } 25122 } 25123 25124 Object.assign(swiper, { 25125 freeMode: { 25126 onTouchMove, 25127 onTouchEnd 25128 } 25129 }); 25130} 25131 25132/***/ }), 25133
vendor: 3,812 bytes, lines 25134-25263
25134/***/ "./node_modules/swiper/modules/grid/grid.js": 25135/*!**************************************************!*\ 25136 !*** ./node_modules/swiper/modules/grid/grid.js ***! 25137 \**************************************************/ 25138/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 25139 25140"use strict"; 25141__webpack_require__.r(__webpack_exports__); 25142/* harmony export */ __webpack_require__.d(__webpack_exports__, { 25143/* harmony export */ "default": () => (/* binding */ Grid) 25144/* harmony export */ }); 25145function Grid({ 25146 swiper, 25147 extendParams 25148}) { 25149 extendParams({ 25150 grid: { 25151 rows: 1, 25152 fill: 'column' 25153 } 25154 }); 25155 let slidesNumberEvenToRows; 25156 let slidesPerRow; 25157 let numFullColumns; 25158 25159 const initSlides = slidesLength => { 25160 const { 25161 slidesPerView 25162 } = swiper.params; 25163 const { 25164 rows, 25165 fill 25166 } = swiper.params.grid; 25167 slidesPerRow = slidesNumberEvenToRows / rows; 25168 numFullColumns = Math.floor(slidesLength / rows); 25169 25170 if (Math.floor(slidesLength / rows) === slidesLength / rows) { 25171 slidesNumberEvenToRows = slidesLength; 25172 } else { 25173 slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows; 25174 } 25175 25176 if (slidesPerView !== 'auto' && fill === 'row') { 25177 slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows); 25178 } 25179 }; 25180 25181 const updateSlide = (i, slide, slidesLength, getDirectionLabel) => { 25182 const { 25183 slidesPerGroup, 25184 spaceBetween 25185 } = swiper.params; 25186 const { 25187 rows, 25188 fill 25189 } = swiper.params.grid; // Set slides order 25190 25191 let newSlideOrderIndex; 25192 let column; 25193 let row; 25194 25195 if (fill === 'row' && slidesPerGroup > 1) { 25196 const groupIndex = Math.floor(i / (slidesPerGroup * rows)); 25197 const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex; 25198 const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup); 25199 row = Math.floor(slideIndexInGroup / columnsInGroup); 25200 column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup; 25201 newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows; 25202 slide.css({ 25203 '-webkit-order': newSlideOrderIndex, 25204 order: newSlideOrderIndex 25205 }); 25206 } else if (fill === 'column') { 25207 column = Math.floor(i / rows); 25208 row = i - column * rows; 25209 25210 if (column > numFullColumns || column === numFullColumns && row === rows - 1) { 25211 row += 1; 25212 25213 if (row >= rows) { 25214 row = 0; 25215 column += 1; 25216 } 25217 } 25218 } else { 25219 row = Math.floor(i / slidesPerRow); 25220 column = i - row * slidesPerRow; 25221 } 25222 25223 slide.css(getDirectionLabel('margin-top'), row !== 0 ? spaceBetween && `${spaceBetween}px` : ''); 25224 }; 25225 25226 const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => { 25227 const { 25228 spaceBetween, 25229 centeredSlides, 25230 roundLengths 25231 } = swiper.params; 25232 const { 25233 rows 25234 } = swiper.params.grid; 25235 swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows; 25236 swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween; 25237 swiper.$wrapperEl.css({ 25238 [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px` 25239 }); 25240 25241 if (centeredSlides) { 25242 snapGrid.splice(0, snapGrid.length); 25243 const newSlidesGrid = []; 25244 25245 for (let i = 0; i < snapGrid.length; i += 1) { 25246 let slidesGridItem = snapGrid[i]; 25247 if (roundLengths) slidesGridItem = Math.floor(slidesGridItem); 25248 if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); 25249 } 25250 25251 snapGrid.push(...newSlidesGrid); 25252 } 25253 }; 25254 25255 swiper.grid = { 25256 initSlides, 25257 updateSlide, 25258 updateWrapperSize 25259 }; 25260} 25261 25262/***/ }), 25263
vendor: 3,796 bytes, lines 25264-25375
25264/***/ "./node_modules/swiper/modules/hash-navigation/hash-navigation.js": 25265/*!************************************************************************!*\ 25266 !*** ./node_modules/swiper/modules/hash-navigation/hash-navigation.js ***! 25267 \************************************************************************/ 25268/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 25269 25270"use strict"; 25271__webpack_require__.r(__webpack_exports__); 25272/* harmony export */ __webpack_require__.d(__webpack_exports__, { 25273/* harmony export */ "default": () => (/* binding */ HashNavigation) 25274/* harmony export */ }); 25275/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 25276/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 25277 25278 25279function HashNavigation({ 25280 swiper, 25281 extendParams, 25282 emit, 25283 on 25284}) { 25285 let initialized = false; 25286 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 25287 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 25288 extendParams({ 25289 hashNavigation: { 25290 enabled: false, 25291 replaceState: false, 25292 watchState: false 25293 } 25294 }); 25295 25296 const onHashChange = () => { 25297 emit('hashChange'); 25298 const newHash = document.location.hash.replace('#', ''); 25299 const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); 25300 25301 if (newHash !== activeSlideHash) { 25302 const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index(); 25303 if (typeof newIndex === 'undefined') return; 25304 swiper.slideTo(newIndex); 25305 } 25306 }; 25307 25308 const setHash = () => { 25309 if (!initialized || !swiper.params.hashNavigation.enabled) return; 25310 25311 if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) { 25312 window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''); 25313 emit('hashSet'); 25314 } else { 25315 const slide = swiper.slides.eq(swiper.activeIndex); 25316 const hash = slide.attr('data-hash') || slide.attr('data-history'); 25317 document.location.hash = hash || ''; 25318 emit('hashSet'); 25319 } 25320 }; 25321 25322 const init = () => { 25323 if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return; 25324 initialized = true; 25325 const hash = document.location.hash.replace('#', ''); 25326 25327 if (hash) { 25328 const speed = 0; 25329 25330 for (let i = 0, length = swiper.slides.length; i < length; i += 1) { 25331 const slide = swiper.slides.eq(i); 25332 const slideHash = slide.attr('data-hash') || slide.attr('data-history'); 25333 25334 if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) { 25335 const index = slide.index(); 25336 swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true); 25337 } 25338 } 25339 } 25340 25341 if (swiper.params.hashNavigation.watchState) { 25342 (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(window).on('hashchange', onHashChange); 25343 } 25344 }; 25345 25346 const destroy = () => { 25347 if (swiper.params.hashNavigation.watchState) { 25348 (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(window).off('hashchange', onHashChange); 25349 } 25350 }; 25351 25352 on('init', () => { 25353 if (swiper.params.hashNavigation.enabled) { 25354 init(); 25355 } 25356 }); 25357 on('destroy', () => { 25358 if (swiper.params.hashNavigation.enabled) { 25359 destroy(); 25360 } 25361 }); 25362 on('transitionEnd _freeModeNoMomentumRelease', () => { 25363 if (initialized) { 25364 setHash(); 25365 } 25366 }); 25367 on('slideChange', () => { 25368 if (initialized && swiper.params.cssMode) { 25369 setHash(); 25370 } 25371 }); 25372} 25373 25374/***/ }), 25375
vendor: 4,714 bytes, lines 25376-25540
25376/***/ "./node_modules/swiper/modules/history/history.js": 25377/*!********************************************************!*\ 25378 !*** ./node_modules/swiper/modules/history/history.js ***! 25379 \********************************************************/ 25380/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 25381 25382"use strict"; 25383__webpack_require__.r(__webpack_exports__); 25384/* harmony export */ __webpack_require__.d(__webpack_exports__, { 25385/* harmony export */ "default": () => (/* binding */ History) 25386/* harmony export */ }); 25387/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 25388 25389function History({ 25390 swiper, 25391 extendParams, 25392 on 25393}) { 25394 extendParams({ 25395 history: { 25396 enabled: false, 25397 root: '', 25398 replaceState: false, 25399 key: 'slides' 25400 } 25401 }); 25402 let initialized = false; 25403 let paths = {}; 25404 25405 const slugify = text => { 25406 return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, ''); 25407 }; 25408 25409 const getPathValues = urlOverride => { 25410 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 25411 let location; 25412 25413 if (urlOverride) { 25414 location = new URL(urlOverride); 25415 } else { 25416 location = window.location; 25417 } 25418 25419 const pathArray = location.pathname.slice(1).split('/').filter(part => part !== ''); 25420 const total = pathArray.length; 25421 const key = pathArray[total - 2]; 25422 const value = pathArray[total - 1]; 25423 return { 25424 key, 25425 value 25426 }; 25427 }; 25428 25429 const setHistory = (key, index) => { 25430 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 25431 if (!initialized || !swiper.params.history.enabled) return; 25432 let location; 25433 25434 if (swiper.params.url) { 25435 location = new URL(swiper.params.url); 25436 } else { 25437 location = window.location; 25438 } 25439 25440 const slide = swiper.slides.eq(index); 25441 let value = slugify(slide.attr('data-history')); 25442 25443 if (swiper.params.history.root.length > 0) { 25444 let root = swiper.params.history.root; 25445 if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1); 25446 value = `${root}/${key}/${value}`; 25447 } else if (!location.pathname.includes(key)) { 25448 value = `${key}/${value}`; 25449 } 25450 25451 const currentState = window.history.state; 25452 25453 if (currentState && currentState.value === value) { 25454 return; 25455 } 25456 25457 if (swiper.params.history.replaceState) { 25458 window.history.replaceState({ 25459 value 25460 }, null, value); 25461 } else { 25462 window.history.pushState({ 25463 value 25464 }, null, value); 25465 } 25466 }; 25467 25468 const scrollToSlide = (speed, value, runCallbacks) => { 25469 if (value) { 25470 for (let i = 0, length = swiper.slides.length; i < length; i += 1) { 25471 const slide = swiper.slides.eq(i); 25472 const slideHistory = slugify(slide.attr('data-history')); 25473 25474 if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) { 25475 const index = slide.index(); 25476 swiper.slideTo(index, speed, runCallbacks); 25477 } 25478 } 25479 } else { 25480 swiper.slideTo(0, speed, runCallbacks); 25481 } 25482 }; 25483 25484 const setHistoryPopState = () => { 25485 paths = getPathValues(swiper.params.url); 25486 scrollToSlide(swiper.params.speed, swiper.paths.value, false); 25487 }; 25488 25489 const init = () => { 25490 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 25491 if (!swiper.params.history) return; 25492 25493 if (!window.history || !window.history.pushState) { 25494 swiper.params.history.enabled = false; 25495 swiper.params.hashNavigation.enabled = true; 25496 return; 25497 } 25498 25499 initialized = true; 25500 paths = getPathValues(swiper.params.url); 25501 if (!paths.key && !paths.value) return; 25502 scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit); 25503 25504 if (!swiper.params.history.replaceState) { 25505 window.addEventListener('popstate', setHistoryPopState); 25506 } 25507 }; 25508 25509 const destroy = () => { 25510 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 25511 25512 if (!swiper.params.history.replaceState) { 25513 window.removeEventListener('popstate', setHistoryPopState); 25514 } 25515 }; 25516 25517 on('init', () => { 25518 if (swiper.params.history.enabled) { 25519 init(); 25520 } 25521 }); 25522 on('destroy', () => { 25523 if (swiper.params.history.enabled) { 25524 destroy(); 25525 } 25526 }); 25527 on('transitionEnd _freeModeNoMomentumRelease', () => { 25528 if (initialized) { 25529 setHistory(swiper.params.history.key, swiper.activeIndex); 25530 } 25531 }); 25532 on('slideChange', () => { 25533 if (initialized && swiper.params.cssMode) { 25534 setHistory(swiper.params.history.key, swiper.activeIndex); 25535 } 25536 }); 25537} 25538 25539/***/ }), 25540
vendor: 5,194 bytes, lines 25541-25687
25541/***/ "./node_modules/swiper/modules/keyboard/keyboard.js": 25542/*!**********************************************************!*\ 25543 !*** ./node_modules/swiper/modules/keyboard/keyboard.js ***! 25544 \**********************************************************/ 25545/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 25546 25547"use strict"; 25548__webpack_require__.r(__webpack_exports__); 25549/* harmony export */ __webpack_require__.d(__webpack_exports__, { 25550/* harmony export */ "default": () => (/* binding */ Keyboard) 25551/* harmony export */ }); 25552/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 25553/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 25554/* eslint-disable consistent-return */ 25555 25556 25557function Keyboard({ 25558 swiper, 25559 extendParams, 25560 on, 25561 emit 25562}) { 25563 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 25564 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 25565 swiper.keyboard = { 25566 enabled: false 25567 }; 25568 extendParams({ 25569 keyboard: { 25570 enabled: false, 25571 onlyInViewport: true, 25572 pageUpDown: true 25573 } 25574 }); 25575 25576 function handle(event) { 25577 if (!swiper.enabled) return; 25578 const { 25579 rtlTranslate: rtl 25580 } = swiper; 25581 let e = event; 25582 if (e.originalEvent) e = e.originalEvent; // jquery fix 25583 25584 const kc = e.keyCode || e.charCode; 25585 const pageUpDown = swiper.params.keyboard.pageUpDown; 25586 const isPageUp = pageUpDown && kc === 33; 25587 const isPageDown = pageUpDown && kc === 34; 25588 const isArrowLeft = kc === 37; 25589 const isArrowRight = kc === 39; 25590 const isArrowUp = kc === 38; 25591 const isArrowDown = kc === 40; // Directions locks 25592 25593 if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { 25594 return false; 25595 } 25596 25597 if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { 25598 return false; 25599 } 25600 25601 if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { 25602 return undefined; 25603 } 25604 25605 if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) { 25606 return undefined; 25607 } 25608 25609 if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { 25610 let inView = false; // Check that swiper should be inside of visible area of window 25611 25612 if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) { 25613 return undefined; 25614 } 25615 25616 const $el = swiper.$el; 25617 const swiperWidth = $el[0].clientWidth; 25618 const swiperHeight = $el[0].clientHeight; 25619 const windowWidth = window.innerWidth; 25620 const windowHeight = window.innerHeight; 25621 const swiperOffset = swiper.$el.offset(); 25622 if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; 25623 const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]]; 25624 25625 for (let i = 0; i < swiperCoord.length; i += 1) { 25626 const point = swiperCoord[i]; 25627 25628 if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { 25629 if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line 25630 25631 inView = true; 25632 } 25633 } 25634 25635 if (!inView) return undefined; 25636 } 25637 25638 if (swiper.isHorizontal()) { 25639 if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { 25640 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 25641 } 25642 25643 if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(); 25644 if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(); 25645 } else { 25646 if (isPageUp || isPageDown || isArrowUp || isArrowDown) { 25647 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 25648 } 25649 25650 if (isPageDown || isArrowDown) swiper.slideNext(); 25651 if (isPageUp || isArrowUp) swiper.slidePrev(); 25652 } 25653 25654 emit('keyPress', kc); 25655 return undefined; 25656 } 25657 25658 function enable() { 25659 if (swiper.keyboard.enabled) return; 25660 (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document).on('keydown', handle); 25661 swiper.keyboard.enabled = true; 25662 } 25663 25664 function disable() { 25665 if (!swiper.keyboard.enabled) return; 25666 (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(document).off('keydown', handle); 25667 swiper.keyboard.enabled = false; 25668 } 25669 25670 on('init', () => { 25671 if (swiper.params.keyboard.enabled) { 25672 enable(); 25673 } 25674 }); 25675 on('destroy', () => { 25676 if (swiper.keyboard.enabled) { 25677 disable(); 25678 } 25679 }); 25680 Object.assign(swiper.keyboard, { 25681 enable, 25682 disable 25683 }); 25684} 25685 25686/***/ }), 25687
vendor: 10,784 bytes, lines 25688-25986
25688/***/ "./node_modules/swiper/modules/lazy/lazy.js": 25689/*!**************************************************!*\ 25690 !*** ./node_modules/swiper/modules/lazy/lazy.js ***! 25691 \**************************************************/ 25692/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 25693 25694"use strict"; 25695__webpack_require__.r(__webpack_exports__); 25696/* harmony export */ __webpack_require__.d(__webpack_exports__, { 25697/* harmony export */ "default": () => (/* binding */ Lazy) 25698/* harmony export */ }); 25699/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 25700/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 25701 25702 25703function Lazy({ 25704 swiper, 25705 extendParams, 25706 on, 25707 emit 25708}) { 25709 extendParams({ 25710 lazy: { 25711 checkInView: false, 25712 enabled: false, 25713 loadPrevNext: false, 25714 loadPrevNextAmount: 1, 25715 loadOnTransitionStart: false, 25716 scrollingElement: '', 25717 elementClass: 'swiper-lazy', 25718 loadingClass: 'swiper-lazy-loading', 25719 loadedClass: 'swiper-lazy-loaded', 25720 preloaderClass: 'swiper-lazy-preloader' 25721 } 25722 }); 25723 swiper.lazy = {}; 25724 let scrollHandlerAttached = false; 25725 let initialImageLoaded = false; 25726 25727 function loadInSlide(index, loadInDuplicate = true) { 25728 const params = swiper.params.lazy; 25729 if (typeof index === 'undefined') return; 25730 if (swiper.slides.length === 0) return; 25731 const isVirtual = swiper.virtual && swiper.params.virtual.enabled; 25732 const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index}"]`) : swiper.slides.eq(index); 25733 const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`); 25734 25735 if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { 25736 $images.push($slideEl[0]); 25737 } 25738 25739 if ($images.length === 0) return; 25740 $images.each(imageEl => { 25741 const $imageEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(imageEl); 25742 $imageEl.addClass(params.loadingClass); 25743 const background = $imageEl.attr('data-background'); 25744 const src = $imageEl.attr('data-src'); 25745 const srcset = $imageEl.attr('data-srcset'); 25746 const sizes = $imageEl.attr('data-sizes'); 25747 const $pictureEl = $imageEl.parent('picture'); 25748 swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => { 25749 if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return; 25750 25751 if (background) { 25752 $imageEl.css('background-image', `url("${background}")`); 25753 $imageEl.removeAttr('data-background'); 25754 } else { 25755 if (srcset) { 25756 $imageEl.attr('srcset', srcset); 25757 $imageEl.removeAttr('data-srcset'); 25758 } 25759 25760 if (sizes) { 25761 $imageEl.attr('sizes', sizes); 25762 $imageEl.removeAttr('data-sizes'); 25763 } 25764 25765 if ($pictureEl.length) { 25766 $pictureEl.children('source').each(sourceEl => { 25767 const $source = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(sourceEl); 25768 25769 if ($source.attr('data-srcset')) { 25770 $source.attr('srcset', $source.attr('data-srcset')); 25771 $source.removeAttr('data-srcset'); 25772 } 25773 }); 25774 } 25775 25776 if (src) { 25777 $imageEl.attr('src', src); 25778 $imageEl.removeAttr('data-src'); 25779 } 25780 } 25781 25782 $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); 25783 $slideEl.find(`.${params.preloaderClass}`).remove(); 25784 25785 if (swiper.params.loop && loadInDuplicate) { 25786 const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); 25787 25788 if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { 25789 const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`); 25790 loadInSlide(originalSlide.index(), false); 25791 } else { 25792 const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`); 25793 loadInSlide(duplicatedSlide.index(), false); 25794 } 25795 } 25796 25797 emit('lazyImageReady', $slideEl[0], $imageEl[0]); 25798 25799 if (swiper.params.autoHeight) { 25800 swiper.updateAutoHeight(); 25801 } 25802 }); 25803 emit('lazyImageLoad', $slideEl[0], $imageEl[0]); 25804 }); 25805 } 25806 25807 function load() { 25808 const { 25809 $wrapperEl, 25810 params: swiperParams, 25811 slides, 25812 activeIndex 25813 } = swiper; 25814 const isVirtual = swiper.virtual && swiperParams.virtual.enabled; 25815 const params = swiperParams.lazy; 25816 let slidesPerView = swiperParams.slidesPerView; 25817 25818 if (slidesPerView === 'auto') { 25819 slidesPerView = 0; 25820 } 25821 25822 function slideExist(index) { 25823 if (isVirtual) { 25824 if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index}"]`).length) { 25825 return true; 25826 } 25827 } else if (slides[index]) return true; 25828 25829 return false; 25830 } 25831 25832 function slideIndex(slideEl) { 25833 if (isVirtual) { 25834 return (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).attr('data-swiper-slide-index'); 25835 } 25836 25837 return (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).index(); 25838 } 25839 25840 if (!initialImageLoaded) initialImageLoaded = true; 25841 25842 if (swiper.params.watchSlidesProgress) { 25843 $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => { 25844 const index = isVirtual ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).attr('data-swiper-slide-index') : (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(slideEl).index(); 25845 loadInSlide(index); 25846 }); 25847 } else if (slidesPerView > 1) { 25848 for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) { 25849 if (slideExist(i)) loadInSlide(i); 25850 } 25851 } else { 25852 loadInSlide(activeIndex); 25853 } 25854 25855 if (params.loadPrevNext) { 25856 if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) { 25857 const amount = params.loadPrevNextAmount; 25858 const spv = slidesPerView; 25859 const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); 25860 const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides 25861 25862 for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) { 25863 if (slideExist(i)) loadInSlide(i); 25864 } // Prev Slides 25865 25866 25867 for (let i = minIndex; i < activeIndex; i += 1) { 25868 if (slideExist(i)) loadInSlide(i); 25869 } 25870 } else { 25871 const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`); 25872 if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide)); 25873 const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`); 25874 if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide)); 25875 } 25876 } 25877 } 25878 25879 function checkInViewOnLoad() { 25880 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 25881 if (!swiper || swiper.destroyed) return; 25882 const $scrollElement = swiper.params.lazy.scrollingElement ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.params.lazy.scrollingElement) : (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(window); 25883 const isWindow = $scrollElement[0] === window; 25884 const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth; 25885 const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight; 25886 const swiperOffset = swiper.$el.offset(); 25887 const { 25888 rtlTranslate: rtl 25889 } = swiper; 25890 let inView = false; 25891 if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; 25892 const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]]; 25893 25894 for (let i = 0; i < swiperCoord.length; i += 1) { 25895 const point = swiperCoord[i]; 25896 25897 if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) { 25898 if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line 25899 25900 inView = true; 25901 } 25902 } 25903 25904 const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? { 25905 passive: true, 25906 capture: false 25907 } : false; 25908 25909 if (inView) { 25910 load(); 25911 $scrollElement.off('scroll', checkInViewOnLoad, passiveListener); 25912 } else if (!scrollHandlerAttached) { 25913 scrollHandlerAttached = true; 25914 $scrollElement.on('scroll', checkInViewOnLoad, passiveListener); 25915 } 25916 } 25917 25918 on('beforeInit', () => { 25919 if (swiper.params.lazy.enabled && swiper.params.preloadImages) { 25920 swiper.params.preloadImages = false; 25921 } 25922 }); 25923 on('init', () => { 25924 if (swiper.params.lazy.enabled) { 25925 if (swiper.params.lazy.checkInView) { 25926 checkInViewOnLoad(); 25927 } else { 25928 load(); 25929 } 25930 } 25931 }); 25932 on('scroll', () => { 25933 if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) { 25934 load(); 25935 } 25936 }); 25937 on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => { 25938 if (swiper.params.lazy.enabled) { 25939 if (swiper.params.lazy.checkInView) { 25940 checkInViewOnLoad(); 25941 } else { 25942 load(); 25943 } 25944 } 25945 }); 25946 on('transitionStart', () => { 25947 if (swiper.params.lazy.enabled) { 25948 if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) { 25949 if (swiper.params.lazy.checkInView) { 25950 checkInViewOnLoad(); 25951 } else { 25952 load(); 25953 } 25954 } 25955 } 25956 }); 25957 on('transitionEnd', () => { 25958 if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { 25959 if (swiper.params.lazy.checkInView) { 25960 checkInViewOnLoad(); 25961 } else { 25962 load(); 25963 } 25964 } 25965 }); 25966 on('slideChange', () => { 25967 const { 25968 lazy, 25969 cssMode, 25970 watchSlidesProgress, 25971 touchReleaseOnEdges, 25972 resistanceRatio 25973 } = swiper.params; 25974 25975 if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) { 25976 load(); 25977 } 25978 }); 25979 Object.assign(swiper.lazy, { 25980 load, 25981 loadInSlide 25982 }); 25983} 25984 25985/***/ }), 25986
vendor: 2,177 bytes, lines 25987-26021
25987/***/ "./node_modules/swiper/modules/manipulation/manipulation.js": 25988/*!******************************************************************!*\ 25989 !*** ./node_modules/swiper/modules/manipulation/manipulation.js ***! 25990 \******************************************************************/ 25991/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 25992 25993"use strict"; 25994__webpack_require__.r(__webpack_exports__); 25995/* harmony export */ __webpack_require__.d(__webpack_exports__, { 25996/* harmony export */ "default": () => (/* binding */ Manipulation) 25997/* harmony export */ }); 25998/* harmony import */ var _methods_appendSlide_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./methods/appendSlide.js */ "./node_modules/swiper/modules/manipulation/methods/appendSlide.js"); 25999/* harmony import */ var _methods_prependSlide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./methods/prependSlide.js */ "./node_modules/swiper/modules/manipulation/methods/prependSlide.js"); 26000/* harmony import */ var _methods_addSlide_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./methods/addSlide.js */ "./node_modules/swiper/modules/manipulation/methods/addSlide.js"); 26001/* harmony import */ var _methods_removeSlide_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./methods/removeSlide.js */ "./node_modules/swiper/modules/manipulation/methods/removeSlide.js"); 26002/* harmony import */ var _methods_removeAllSlides_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./methods/removeAllSlides.js */ "./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js"); 26003 26004 26005 26006 26007 26008function Manipulation({ 26009 swiper 26010}) { 26011 Object.assign(swiper, { 26012 appendSlide: _methods_appendSlide_js__WEBPACK_IMPORTED_MODULE_0__["default"].bind(swiper), 26013 prependSlide: _methods_prependSlide_js__WEBPACK_IMPORTED_MODULE_1__["default"].bind(swiper), 26014 addSlide: _methods_addSlide_js__WEBPACK_IMPORTED_MODULE_2__["default"].bind(swiper), 26015 removeSlide: _methods_removeSlide_js__WEBPACK_IMPORTED_MODULE_3__["default"].bind(swiper), 26016 removeAllSlides: _methods_removeAllSlides_js__WEBPACK_IMPORTED_MODULE_4__["default"].bind(swiper) 26017 }); 26018} 26019 26020/***/ }), 26021
vendor: 2,102 bytes, lines 26022-26099
26022/***/ "./node_modules/swiper/modules/manipulation/methods/addSlide.js": 26023/*!**********************************************************************!*\ 26024 !*** ./node_modules/swiper/modules/manipulation/methods/addSlide.js ***! 26025 \**********************************************************************/ 26026/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26027 26028"use strict"; 26029__webpack_require__.r(__webpack_exports__); 26030/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26031/* harmony export */ "default": () => (/* binding */ addSlide) 26032/* harmony export */ }); 26033function addSlide(index, slides) { 26034 const swiper = this; 26035 const { 26036 $wrapperEl, 26037 params, 26038 activeIndex 26039 } = swiper; 26040 let activeIndexBuffer = activeIndex; 26041 26042 if (params.loop) { 26043 activeIndexBuffer -= swiper.loopedSlides; 26044 swiper.loopDestroy(); 26045 swiper.slides = $wrapperEl.children(`.${params.slideClass}`); 26046 } 26047 26048 const baseLength = swiper.slides.length; 26049 26050 if (index <= 0) { 26051 swiper.prependSlide(slides); 26052 return; 26053 } 26054 26055 if (index >= baseLength) { 26056 swiper.appendSlide(slides); 26057 return; 26058 } 26059 26060 let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; 26061 const slidesBuffer = []; 26062 26063 for (let i = baseLength - 1; i >= index; i -= 1) { 26064 const currentSlide = swiper.slides.eq(i); 26065 currentSlide.remove(); 26066 slidesBuffer.unshift(currentSlide); 26067 } 26068 26069 if (typeof slides === 'object' && 'length' in slides) { 26070 for (let i = 0; i < slides.length; i += 1) { 26071 if (slides[i]) $wrapperEl.append(slides[i]); 26072 } 26073 26074 newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; 26075 } else { 26076 $wrapperEl.append(slides); 26077 } 26078 26079 for (let i = 0; i < slidesBuffer.length; i += 1) { 26080 $wrapperEl.append(slidesBuffer[i]); 26081 } 26082 26083 if (params.loop) { 26084 swiper.loopCreate(); 26085 } 26086 26087 if (!params.observer) { 26088 swiper.update(); 26089 } 26090 26091 if (params.loop) { 26092 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 26093 } else { 26094 swiper.slideTo(newActiveIndex, 0, false); 26095 } 26096} 26097 26098/***/ }), 26099
vendor: 1,106 bytes, lines 26100-26140
26100/***/ "./node_modules/swiper/modules/manipulation/methods/appendSlide.js": 26101/*!*************************************************************************!*\ 26102 !*** ./node_modules/swiper/modules/manipulation/methods/appendSlide.js ***! 26103 \*************************************************************************/ 26104/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26105 26106"use strict"; 26107__webpack_require__.r(__webpack_exports__); 26108/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26109/* harmony export */ "default": () => (/* binding */ appendSlide) 26110/* harmony export */ }); 26111function appendSlide(slides) { 26112 const swiper = this; 26113 const { 26114 $wrapperEl, 26115 params 26116 } = swiper; 26117 26118 if (params.loop) { 26119 swiper.loopDestroy(); 26120 } 26121 26122 if (typeof slides === 'object' && 'length' in slides) { 26123 for (let i = 0; i < slides.length; i += 1) { 26124 if (slides[i]) $wrapperEl.append(slides[i]); 26125 } 26126 } else { 26127 $wrapperEl.append(slides); 26128 } 26129 26130 if (params.loop) { 26131 swiper.loopCreate(); 26132 } 26133 26134 if (!params.observer) { 26135 swiper.update(); 26136 } 26137} 26138 26139/***/ }), 26140
vendor: 1,268 bytes, lines 26141-26188
26141/***/ "./node_modules/swiper/modules/manipulation/methods/prependSlide.js": 26142/*!**************************************************************************!*\ 26143 !*** ./node_modules/swiper/modules/manipulation/methods/prependSlide.js ***! 26144 \**************************************************************************/ 26145/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26146 26147"use strict"; 26148__webpack_require__.r(__webpack_exports__); 26149/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26150/* harmony export */ "default": () => (/* binding */ prependSlide) 26151/* harmony export */ }); 26152function prependSlide(slides) { 26153 const swiper = this; 26154 const { 26155 params, 26156 $wrapperEl, 26157 activeIndex 26158 } = swiper; 26159 26160 if (params.loop) { 26161 swiper.loopDestroy(); 26162 } 26163 26164 let newActiveIndex = activeIndex + 1; 26165 26166 if (typeof slides === 'object' && 'length' in slides) { 26167 for (let i = 0; i < slides.length; i += 1) { 26168 if (slides[i]) $wrapperEl.prepend(slides[i]); 26169 } 26170 26171 newActiveIndex = activeIndex + slides.length; 26172 } else { 26173 $wrapperEl.prepend(slides); 26174 } 26175 26176 if (params.loop) { 26177 swiper.loopCreate(); 26178 } 26179 26180 if (!params.observer) { 26181 swiper.update(); 26182 } 26183 26184 swiper.slideTo(newActiveIndex, 0, false); 26185} 26186 26187/***/ }), 26188
vendor: 859 bytes, lines 26189-26212
26189/***/ "./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js": 26190/*!*****************************************************************************!*\ 26191 !*** ./node_modules/swiper/modules/manipulation/methods/removeAllSlides.js ***! 26192 \*****************************************************************************/ 26193/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26194 26195"use strict"; 26196__webpack_require__.r(__webpack_exports__); 26197/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26198/* harmony export */ "default": () => (/* binding */ removeAllSlides) 26199/* harmony export */ }); 26200function removeAllSlides() { 26201 const swiper = this; 26202 const slidesIndexes = []; 26203 26204 for (let i = 0; i < swiper.slides.length; i += 1) { 26205 slidesIndexes.push(i); 26206 } 26207 26208 swiper.removeSlide(slidesIndexes); 26209} 26210 26211/***/ }), 26212
vendor: 1,897 bytes, lines 26213-26273
26213/***/ "./node_modules/swiper/modules/manipulation/methods/removeSlide.js": 26214/*!*************************************************************************!*\ 26215 !*** ./node_modules/swiper/modules/manipulation/methods/removeSlide.js ***! 26216 \*************************************************************************/ 26217/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26218 26219"use strict"; 26220__webpack_require__.r(__webpack_exports__); 26221/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26222/* harmony export */ "default": () => (/* binding */ removeSlide) 26223/* harmony export */ }); 26224function removeSlide(slidesIndexes) { 26225 const swiper = this; 26226 const { 26227 params, 26228 $wrapperEl, 26229 activeIndex 26230 } = swiper; 26231 let activeIndexBuffer = activeIndex; 26232 26233 if (params.loop) { 26234 activeIndexBuffer -= swiper.loopedSlides; 26235 swiper.loopDestroy(); 26236 swiper.slides = $wrapperEl.children(`.${params.slideClass}`); 26237 } 26238 26239 let newActiveIndex = activeIndexBuffer; 26240 let indexToRemove; 26241 26242 if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { 26243 for (let i = 0; i < slidesIndexes.length; i += 1) { 26244 indexToRemove = slidesIndexes[i]; 26245 if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); 26246 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 26247 } 26248 26249 newActiveIndex = Math.max(newActiveIndex, 0); 26250 } else { 26251 indexToRemove = slidesIndexes; 26252 if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); 26253 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 26254 newActiveIndex = Math.max(newActiveIndex, 0); 26255 } 26256 26257 if (params.loop) { 26258 swiper.loopCreate(); 26259 } 26260 26261 if (!params.observer) { 26262 swiper.update(); 26263 } 26264 26265 if (params.loop) { 26266 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 26267 } else { 26268 swiper.slideTo(newActiveIndex, 0, false); 26269 } 26270} 26271 26272/***/ }), 26273
vendor: 15,582 bytes, lines 26274-26712
26274/***/ "./node_modules/swiper/modules/mousewheel/mousewheel.js": 26275/*!**************************************************************!*\ 26276 !*** ./node_modules/swiper/modules/mousewheel/mousewheel.js ***! 26277 \**************************************************************/ 26278/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26279 26280"use strict"; 26281__webpack_require__.r(__webpack_exports__); 26282/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26283/* harmony export */ "default": () => (/* binding */ Mousewheel) 26284/* harmony export */ }); 26285/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 26286/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 26287/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 26288/* eslint-disable consistent-return */ 26289 26290 26291 26292function Mousewheel({ 26293 swiper, 26294 extendParams, 26295 on, 26296 emit 26297}) { 26298 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 26299 extendParams({ 26300 mousewheel: { 26301 enabled: false, 26302 releaseOnEdges: false, 26303 invert: false, 26304 forceToAxis: false, 26305 sensitivity: 1, 26306 eventsTarget: 'container', 26307 thresholdDelta: null, 26308 thresholdTime: null 26309 } 26310 }); 26311 swiper.mousewheel = { 26312 enabled: false 26313 }; 26314 let timeout; 26315 let lastScrollTime = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(); 26316 let lastEventBeforeSnap; 26317 const recentWheelEvents = []; 26318 26319 function normalize(e) { 26320 // Reasonable defaults 26321 const PIXEL_STEP = 10; 26322 const LINE_HEIGHT = 40; 26323 const PAGE_HEIGHT = 800; 26324 let sX = 0; 26325 let sY = 0; // spinX, spinY 26326 26327 let pX = 0; 26328 let pY = 0; // pixelX, pixelY 26329 // Legacy 26330 26331 if ('detail' in e) { 26332 sY = e.detail; 26333 } 26334 26335 if ('wheelDelta' in e) { 26336 sY = -e.wheelDelta / 120; 26337 } 26338 26339 if ('wheelDeltaY' in e) { 26340 sY = -e.wheelDeltaY / 120; 26341 } 26342 26343 if ('wheelDeltaX' in e) { 26344 sX = -e.wheelDeltaX / 120; 26345 } // side scrolling on FF with DOMMouseScroll 26346 26347 26348 if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { 26349 sX = sY; 26350 sY = 0; 26351 } 26352 26353 pX = sX * PIXEL_STEP; 26354 pY = sY * PIXEL_STEP; 26355 26356 if ('deltaY' in e) { 26357 pY = e.deltaY; 26358 } 26359 26360 if ('deltaX' in e) { 26361 pX = e.deltaX; 26362 } 26363 26364 if (e.shiftKey && !pX) { 26365 // if user scrolls with shift he wants horizontal scroll 26366 pX = pY; 26367 pY = 0; 26368 } 26369 26370 if ((pX || pY) && e.deltaMode) { 26371 if (e.deltaMode === 1) { 26372 // delta in LINE units 26373 pX *= LINE_HEIGHT; 26374 pY *= LINE_HEIGHT; 26375 } else { 26376 // delta in PAGE units 26377 pX *= PAGE_HEIGHT; 26378 pY *= PAGE_HEIGHT; 26379 } 26380 } // Fall-back if spin cannot be determined 26381 26382 26383 if (pX && !sX) { 26384 sX = pX < 1 ? -1 : 1; 26385 } 26386 26387 if (pY && !sY) { 26388 sY = pY < 1 ? -1 : 1; 26389 } 26390 26391 return { 26392 spinX: sX, 26393 spinY: sY, 26394 pixelX: pX, 26395 pixelY: pY 26396 }; 26397 } 26398 26399 function handleMouseEnter() { 26400 if (!swiper.enabled) return; 26401 swiper.mouseEntered = true; 26402 } 26403 26404 function handleMouseLeave() { 26405 if (!swiper.enabled) return; 26406 swiper.mouseEntered = false; 26407 } 26408 26409 function animateSlider(newEvent) { 26410 if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) { 26411 // Prevent if delta of wheel scroll delta is below configured threshold 26412 return false; 26413 } 26414 26415 if (swiper.params.mousewheel.thresholdTime && (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)() - lastScrollTime < swiper.params.mousewheel.thresholdTime) { 26416 // Prevent if time between scrolls is below configured threshold 26417 return false; 26418 } // If the movement is NOT big enough and 26419 // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): 26420 // Don't go any further (avoid insignificant scroll movement). 26421 26422 26423 if (newEvent.delta >= 6 && (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)() - lastScrollTime < 60) { 26424 // Return false as a default 26425 return true; 26426 } // If user is scrolling towards the end: 26427 // If the slider hasn't hit the latest slide or 26428 // if the slider is a loop and 26429 // if the slider isn't moving right now: 26430 // Go to next slide and 26431 // emit a scroll event. 26432 // Else (the user is scrolling towards the beginning) and 26433 // if the slider hasn't hit the first slide or 26434 // if the slider is a loop and 26435 // if the slider isn't moving right now: 26436 // Go to prev slide and 26437 // emit a scroll event. 26438 26439 26440 if (newEvent.direction < 0) { 26441 if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { 26442 swiper.slideNext(); 26443 emit('scroll', newEvent.raw); 26444 } 26445 } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { 26446 swiper.slidePrev(); 26447 emit('scroll', newEvent.raw); 26448 } // If you got here is because an animation has been triggered so store the current time 26449 26450 26451 lastScrollTime = new window.Date().getTime(); // Return false as a default 26452 26453 return false; 26454 } 26455 26456 function releaseScroll(newEvent) { 26457 const params = swiper.params.mousewheel; 26458 26459 if (newEvent.direction < 0) { 26460 if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { 26461 // Return true to animate scroll on edges 26462 return true; 26463 } 26464 } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { 26465 // Return true to animate scroll on edges 26466 return true; 26467 } 26468 26469 return false; 26470 } 26471 26472 function handle(event) { 26473 let e = event; 26474 let disableParentSwiper = true; 26475 if (!swiper.enabled) return; 26476 const params = swiper.params.mousewheel; 26477 26478 if (swiper.params.cssMode) { 26479 e.preventDefault(); 26480 } 26481 26482 let target = swiper.$el; 26483 26484 if (swiper.params.mousewheel.eventsTarget !== 'container') { 26485 target = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.params.mousewheel.eventsTarget); 26486 } 26487 26488 if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true; 26489 if (e.originalEvent) e = e.originalEvent; // jquery fix 26490 26491 let delta = 0; 26492 const rtlFactor = swiper.rtlTranslate ? -1 : 1; 26493 const data = normalize(e); 26494 26495 if (params.forceToAxis) { 26496 if (swiper.isHorizontal()) { 26497 if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true; 26498 } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true; 26499 } else { 26500 delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; 26501 } 26502 26503 if (delta === 0) return true; 26504 if (params.invert) delta = -delta; // Get the scroll positions 26505 26506 let positions = swiper.getTranslate() + delta * params.sensitivity; 26507 if (positions >= swiper.minTranslate()) positions = swiper.minTranslate(); 26508 if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true: 26509 // the disableParentSwiper will be true. 26510 // When loop is false: 26511 // if the scroll positions is not on edge, 26512 // then the disableParentSwiper will be true. 26513 // if the scroll on edge positions, 26514 // then the disableParentSwiper will be false. 26515 26516 disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate()); 26517 if (disableParentSwiper && swiper.params.nested) e.stopPropagation(); 26518 26519 if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) { 26520 // Register the new event in a variable which stores the relevant data 26521 const newEvent = { 26522 time: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(), 26523 delta: Math.abs(delta), 26524 direction: Math.sign(delta), 26525 raw: event 26526 }; // Keep the most recent events 26527 26528 if (recentWheelEvents.length >= 2) { 26529 recentWheelEvents.shift(); // only store the last N events 26530 } 26531 26532 const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; 26533 recentWheelEvents.push(newEvent); // If there is at least one previous recorded event: 26534 // If direction has changed or 26535 // if the scroll is quicker than the previous one: 26536 // Animate the slider. 26537 // Else (this is the first time the wheel is moved): 26538 // Animate the slider. 26539 26540 if (prevEvent) { 26541 if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) { 26542 animateSlider(newEvent); 26543 } 26544 } else { 26545 animateSlider(newEvent); 26546 } // If it's time to release the scroll: 26547 // Return now so you don't hit the preventDefault. 26548 26549 26550 if (releaseScroll(newEvent)) { 26551 return true; 26552 } 26553 } else { 26554 // Freemode or scrollContainer: 26555 // If we recently snapped after a momentum scroll, then ignore wheel events 26556 // to give time for the deceleration to finish. Stop ignoring after 500 msecs 26557 // or if it's a new scroll (larger delta or inverse sign as last event before 26558 // an end-of-momentum snap). 26559 const newEvent = { 26560 time: (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.now)(), 26561 delta: Math.abs(delta), 26562 direction: Math.sign(delta) 26563 }; 26564 const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction; 26565 26566 if (!ignoreWheelEvents) { 26567 lastEventBeforeSnap = undefined; 26568 26569 if (swiper.params.loop) { 26570 swiper.loopFix(); 26571 } 26572 26573 let position = swiper.getTranslate() + delta * params.sensitivity; 26574 const wasBeginning = swiper.isBeginning; 26575 const wasEnd = swiper.isEnd; 26576 if (position >= swiper.minTranslate()) position = swiper.minTranslate(); 26577 if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); 26578 swiper.setTransition(0); 26579 swiper.setTranslate(position); 26580 swiper.updateProgress(); 26581 swiper.updateActiveIndex(); 26582 swiper.updateSlidesClasses(); 26583 26584 if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) { 26585 swiper.updateSlidesClasses(); 26586 } 26587 26588 if (swiper.params.freeMode.sticky) { 26589 // When wheel scrolling starts with sticky (aka snap) enabled, then detect 26590 // the end of a momentum scroll by storing recent (N=15?) wheel events. 26591 // 1. do all N events have decreasing or same (absolute value) delta? 26592 // 2. did all N events arrive in the last M (M=500?) msecs? 26593 // 3. does the earliest event have an (absolute value) delta that's 26594 // at least P (P=1?) larger than the most recent event's delta? 26595 // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? 26596 // If 1-4 are "yes" then we're near the end of a momentum scroll deceleration. 26597 // Snap immediately and ignore remaining wheel events in this scroll. 26598 // See comment above for "remaining wheel events in this scroll" determination. 26599 // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. 26600 clearTimeout(timeout); 26601 timeout = undefined; 26602 26603 if (recentWheelEvents.length >= 15) { 26604 recentWheelEvents.shift(); // only store the last N events 26605 } 26606 26607 const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; 26608 const firstEvent = recentWheelEvents[0]; 26609 recentWheelEvents.push(newEvent); 26610 26611 if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) { 26612 // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. 26613 recentWheelEvents.splice(0); 26614 } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) { 26615 // We're at the end of the deceleration of a momentum scroll, so there's no need 26616 // to wait for more events. Snap ASAP on the next tick. 26617 // Also, because there's some remaining momentum we'll bias the snap in the 26618 // direction of the ongoing scroll because it's better UX for the scroll to snap 26619 // in the same direction as the scroll instead of reversing to snap. Therefore, 26620 // if it's already scrolled more than 20% in the current direction, keep going. 26621 const snapToThreshold = delta > 0 ? 0.8 : 0.2; 26622 lastEventBeforeSnap = newEvent; 26623 recentWheelEvents.splice(0); 26624 timeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.nextTick)(() => { 26625 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 26626 }, 0); // no delay; move on next tick 26627 } 26628 26629 if (!timeout) { 26630 // if we get here, then we haven't detected the end of a momentum scroll, so 26631 // we'll consider a scroll "complete" when there haven't been any wheel events 26632 // for 500ms. 26633 timeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.nextTick)(() => { 26634 const snapToThreshold = 0.5; 26635 lastEventBeforeSnap = newEvent; 26636 recentWheelEvents.splice(0); 26637 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 26638 }, 500); 26639 } 26640 } // Emit event 26641 26642 26643 if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay 26644 26645 if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions 26646 26647 if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true; 26648 } 26649 } 26650 26651 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 26652 return false; 26653 } 26654 26655 function events(method) { 26656 let target = swiper.$el; 26657 26658 if (swiper.params.mousewheel.eventsTarget !== 'container') { 26659 target = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(swiper.params.mousewheel.eventsTarget); 26660 } 26661 26662 target[method]('mouseenter', handleMouseEnter); 26663 target[method]('mouseleave', handleMouseLeave); 26664 target[method]('wheel', handle); 26665 } 26666 26667 function enable() { 26668 if (swiper.params.cssMode) { 26669 swiper.wrapperEl.removeEventListener('wheel', handle); 26670 return true; 26671 } 26672 26673 if (swiper.mousewheel.enabled) return false; 26674 events('on'); 26675 swiper.mousewheel.enabled = true; 26676 return true; 26677 } 26678 26679 function disable() { 26680 if (swiper.params.cssMode) { 26681 swiper.wrapperEl.addEventListener(event, handle); 26682 return true; 26683 } 26684 26685 if (!swiper.mousewheel.enabled) return false; 26686 events('off'); 26687 swiper.mousewheel.enabled = false; 26688 return true; 26689 } 26690 26691 on('init', () => { 26692 if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { 26693 disable(); 26694 } 26695 26696 if (swiper.params.mousewheel.enabled) enable(); 26697 }); 26698 on('destroy', () => { 26699 if (swiper.params.cssMode) { 26700 enable(); 26701 } 26702 26703 if (swiper.mousewheel.enabled) disable(); 26704 }); 26705 Object.assign(swiper.mousewheel, { 26706 enable, 26707 disable 26708 }); 26709} 26710 26711/***/ }), 26712
vendor: 5,771 bytes, lines 26713-26913
26713/***/ "./node_modules/swiper/modules/navigation/navigation.js": 26714/*!**************************************************************!*\ 26715 !*** ./node_modules/swiper/modules/navigation/navigation.js ***! 26716 \**************************************************************/ 26717/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26718 26719"use strict"; 26720__webpack_require__.r(__webpack_exports__); 26721/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26722/* harmony export */ "default": () => (/* binding */ Navigation) 26723/* harmony export */ }); 26724/* harmony import */ var _shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/create-element-if-not-defined.js */ "./node_modules/swiper/shared/create-element-if-not-defined.js"); 26725/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 26726 26727 26728function Navigation({ 26729 swiper, 26730 extendParams, 26731 on, 26732 emit 26733}) { 26734 extendParams({ 26735 navigation: { 26736 nextEl: null, 26737 prevEl: null, 26738 hideOnClick: false, 26739 disabledClass: 'swiper-button-disabled', 26740 hiddenClass: 'swiper-button-hidden', 26741 lockClass: 'swiper-button-lock' 26742 } 26743 }); 26744 swiper.navigation = { 26745 nextEl: null, 26746 $nextEl: null, 26747 prevEl: null, 26748 $prevEl: null 26749 }; 26750 26751 function getEl(el) { 26752 let $el; 26753 26754 if (el) { 26755 $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(el); 26756 26757 if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) { 26758 $el = swiper.$el.find(el); 26759 } 26760 } 26761 26762 return $el; 26763 } 26764 26765 function toggleEl($el, disabled) { 26766 const params = swiper.params.navigation; 26767 26768 if ($el && $el.length > 0) { 26769 $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass); 26770 if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled; 26771 26772 if (swiper.params.watchOverflow && swiper.enabled) { 26773 $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 26774 } 26775 } 26776 } 26777 26778 function update() { 26779 // Update Navigation Buttons 26780 if (swiper.params.loop) return; 26781 const { 26782 $nextEl, 26783 $prevEl 26784 } = swiper.navigation; 26785 toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind); 26786 toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind); 26787 } 26788 26789 function onPrevClick(e) { 26790 e.preventDefault(); 26791 if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return; 26792 swiper.slidePrev(); 26793 } 26794 26795 function onNextClick(e) { 26796 e.preventDefault(); 26797 if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return; 26798 swiper.slideNext(); 26799 } 26800 26801 function init() { 26802 const params = swiper.params.navigation; 26803 swiper.params.navigation = (0,_shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_0__["default"])(swiper, swiper.originalParams.navigation, swiper.params.navigation, { 26804 nextEl: 'swiper-button-next', 26805 prevEl: 'swiper-button-prev' 26806 }); 26807 if (!(params.nextEl || params.prevEl)) return; 26808 const $nextEl = getEl(params.nextEl); 26809 const $prevEl = getEl(params.prevEl); 26810 26811 if ($nextEl && $nextEl.length > 0) { 26812 $nextEl.on('click', onNextClick); 26813 } 26814 26815 if ($prevEl && $prevEl.length > 0) { 26816 $prevEl.on('click', onPrevClick); 26817 } 26818 26819 Object.assign(swiper.navigation, { 26820 $nextEl, 26821 nextEl: $nextEl && $nextEl[0], 26822 $prevEl, 26823 prevEl: $prevEl && $prevEl[0] 26824 }); 26825 26826 if (!swiper.enabled) { 26827 if ($nextEl) $nextEl.addClass(params.lockClass); 26828 if ($prevEl) $prevEl.addClass(params.lockClass); 26829 } 26830 } 26831 26832 function destroy() { 26833 const { 26834 $nextEl, 26835 $prevEl 26836 } = swiper.navigation; 26837 26838 if ($nextEl && $nextEl.length) { 26839 $nextEl.off('click', onNextClick); 26840 $nextEl.removeClass(swiper.params.navigation.disabledClass); 26841 } 26842 26843 if ($prevEl && $prevEl.length) { 26844 $prevEl.off('click', onPrevClick); 26845 $prevEl.removeClass(swiper.params.navigation.disabledClass); 26846 } 26847 } 26848 26849 on('init', () => { 26850 init(); 26851 update(); 26852 }); 26853 on('toEdge fromEdge lock unlock', () => { 26854 update(); 26855 }); 26856 on('destroy', () => { 26857 destroy(); 26858 }); 26859 on('enable disable', () => { 26860 const { 26861 $nextEl, 26862 $prevEl 26863 } = swiper.navigation; 26864 26865 if ($nextEl) { 26866 $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); 26867 } 26868 26869 if ($prevEl) { 26870 $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); 26871 } 26872 }); 26873 on('click', (_s, e) => { 26874 const { 26875 $nextEl, 26876 $prevEl 26877 } = swiper.navigation; 26878 const targetEl = e.target; 26879 26880 if (swiper.params.navigation.hideOnClick && !(0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(targetEl).is($prevEl) && !(0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(targetEl).is($nextEl)) { 26881 if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return; 26882 let isHidden; 26883 26884 if ($nextEl) { 26885 isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); 26886 } else if ($prevEl) { 26887 isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); 26888 } 26889 26890 if (isHidden === true) { 26891 emit('navigationShow'); 26892 } else { 26893 emit('navigationHide'); 26894 } 26895 26896 if ($nextEl) { 26897 $nextEl.toggleClass(swiper.params.navigation.hiddenClass); 26898 } 26899 26900 if ($prevEl) { 26901 $prevEl.toggleClass(swiper.params.navigation.hiddenClass); 26902 } 26903 } 26904 }); 26905 Object.assign(swiper.navigation, { 26906 update, 26907 init, 26908 destroy 26909 }); 26910} 26911 26912/***/ }), 26913
vendor: 15,369 bytes, lines 26914-27340
26914/***/ "./node_modules/swiper/modules/pagination/pagination.js": 26915/*!**************************************************************!*\ 26916 !*** ./node_modules/swiper/modules/pagination/pagination.js ***! 26917 \**************************************************************/ 26918/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 26919 26920"use strict"; 26921__webpack_require__.r(__webpack_exports__); 26922/* harmony export */ __webpack_require__.d(__webpack_exports__, { 26923/* harmony export */ "default": () => (/* binding */ Pagination) 26924/* harmony export */ }); 26925/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 26926/* harmony import */ var _shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/classes-to-selector.js */ "./node_modules/swiper/shared/classes-to-selector.js"); 26927/* harmony import */ var _shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/create-element-if-not-defined.js */ "./node_modules/swiper/shared/create-element-if-not-defined.js"); 26928 26929 26930 26931function Pagination({ 26932 swiper, 26933 extendParams, 26934 on, 26935 emit 26936}) { 26937 const pfx = 'swiper-pagination'; 26938 extendParams({ 26939 pagination: { 26940 el: null, 26941 bulletElement: 'span', 26942 clickable: false, 26943 hideOnClick: false, 26944 renderBullet: null, 26945 renderProgressbar: null, 26946 renderFraction: null, 26947 renderCustom: null, 26948 progressbarOpposite: false, 26949 type: 'bullets', 26950 // 'bullets' or 'progressbar' or 'fraction' or 'custom' 26951 dynamicBullets: false, 26952 dynamicMainBullets: 1, 26953 formatFractionCurrent: number => number, 26954 formatFractionTotal: number => number, 26955 bulletClass: `${pfx}-bullet`, 26956 bulletActiveClass: `${pfx}-bullet-active`, 26957 modifierClass: `${pfx}-`, 26958 currentClass: `${pfx}-current`, 26959 totalClass: `${pfx}-total`, 26960 hiddenClass: `${pfx}-hidden`, 26961 progressbarFillClass: `${pfx}-progressbar-fill`, 26962 progressbarOppositeClass: `${pfx}-progressbar-opposite`, 26963 clickableClass: `${pfx}-clickable`, 26964 lockClass: `${pfx}-lock`, 26965 horizontalClass: `${pfx}-horizontal`, 26966 verticalClass: `${pfx}-vertical` 26967 } 26968 }); 26969 swiper.pagination = { 26970 el: null, 26971 $el: null, 26972 bullets: [] 26973 }; 26974 let bulletSize; 26975 let dynamicBulletIndex = 0; 26976 26977 function isPaginationDisabled() { 26978 return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0; 26979 } 26980 26981 function setSideBullets($bulletEl, position) { 26982 const { 26983 bulletActiveClass 26984 } = swiper.params.pagination; 26985 $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`); 26986 } 26987 26988 function update() { 26989 // Render || Update Pagination bullets/items 26990 const rtl = swiper.rtl; 26991 const params = swiper.params.pagination; 26992 if (isPaginationDisabled()) return; 26993 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 26994 const $el = swiper.pagination.$el; // Current/Total 26995 26996 let current; 26997 const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 26998 26999 if (swiper.params.loop) { 27000 current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); 27001 27002 if (current > slidesLength - 1 - swiper.loopedSlides * 2) { 27003 current -= slidesLength - swiper.loopedSlides * 2; 27004 } 27005 27006 if (current > total - 1) current -= total; 27007 if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current; 27008 } else if (typeof swiper.snapIndex !== 'undefined') { 27009 current = swiper.snapIndex; 27010 } else { 27011 current = swiper.activeIndex || 0; 27012 } // Types 27013 27014 27015 if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { 27016 const bullets = swiper.pagination.bullets; 27017 let firstIndex; 27018 let lastIndex; 27019 let midIndex; 27020 27021 if (params.dynamicBullets) { 27022 bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); 27023 $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`); 27024 27025 if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { 27026 dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0); 27027 27028 if (dynamicBulletIndex > params.dynamicMainBullets - 1) { 27029 dynamicBulletIndex = params.dynamicMainBullets - 1; 27030 } else if (dynamicBulletIndex < 0) { 27031 dynamicBulletIndex = 0; 27032 } 27033 } 27034 27035 firstIndex = Math.max(current - dynamicBulletIndex, 0); 27036 lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); 27037 midIndex = (lastIndex + firstIndex) / 2; 27038 } 27039 27040 bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' ')); 27041 27042 if ($el.length > 1) { 27043 bullets.each(bullet => { 27044 const $bullet = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(bullet); 27045 const bulletIndex = $bullet.index(); 27046 27047 if (bulletIndex === current) { 27048 $bullet.addClass(params.bulletActiveClass); 27049 } 27050 27051 if (params.dynamicBullets) { 27052 if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { 27053 $bullet.addClass(`${params.bulletActiveClass}-main`); 27054 } 27055 27056 if (bulletIndex === firstIndex) { 27057 setSideBullets($bullet, 'prev'); 27058 } 27059 27060 if (bulletIndex === lastIndex) { 27061 setSideBullets($bullet, 'next'); 27062 } 27063 } 27064 }); 27065 } else { 27066 const $bullet = bullets.eq(current); 27067 const bulletIndex = $bullet.index(); 27068 $bullet.addClass(params.bulletActiveClass); 27069 27070 if (params.dynamicBullets) { 27071 const $firstDisplayedBullet = bullets.eq(firstIndex); 27072 const $lastDisplayedBullet = bullets.eq(lastIndex); 27073 27074 for (let i = firstIndex; i <= lastIndex; i += 1) { 27075 bullets.eq(i).addClass(`${params.bulletActiveClass}-main`); 27076 } 27077 27078 if (swiper.params.loop) { 27079 if (bulletIndex >= bullets.length) { 27080 for (let i = params.dynamicMainBullets; i >= 0; i -= 1) { 27081 bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`); 27082 } 27083 27084 bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`); 27085 } else { 27086 setSideBullets($firstDisplayedBullet, 'prev'); 27087 setSideBullets($lastDisplayedBullet, 'next'); 27088 } 27089 } else { 27090 setSideBullets($firstDisplayedBullet, 'prev'); 27091 setSideBullets($lastDisplayedBullet, 'next'); 27092 } 27093 } 27094 } 27095 27096 if (params.dynamicBullets) { 27097 const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); 27098 const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize; 27099 const offsetProp = rtl ? 'right' : 'left'; 27100 bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`); 27101 } 27102 } 27103 27104 if (params.type === 'fraction') { 27105 $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.currentClass)).text(params.formatFractionCurrent(current + 1)); 27106 $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.totalClass)).text(params.formatFractionTotal(total)); 27107 } 27108 27109 if (params.type === 'progressbar') { 27110 let progressbarDirection; 27111 27112 if (params.progressbarOpposite) { 27113 progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; 27114 } else { 27115 progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; 27116 } 27117 27118 const scale = (current + 1) / total; 27119 let scaleX = 1; 27120 let scaleY = 1; 27121 27122 if (progressbarDirection === 'horizontal') { 27123 scaleX = scale; 27124 } else { 27125 scaleY = scale; 27126 } 27127 27128 $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed); 27129 } 27130 27131 if (params.type === 'custom' && params.renderCustom) { 27132 $el.html(params.renderCustom(swiper, current + 1, total)); 27133 emit('paginationRender', $el[0]); 27134 } else { 27135 emit('paginationUpdate', $el[0]); 27136 } 27137 27138 if (swiper.params.watchOverflow && swiper.enabled) { 27139 $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 27140 } 27141 } 27142 27143 function render() { 27144 // Render Container 27145 const params = swiper.params.pagination; 27146 if (isPaginationDisabled()) return; 27147 const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 27148 const $el = swiper.pagination.$el; 27149 let paginationHTML = ''; 27150 27151 if (params.type === 'bullets') { 27152 let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 27153 27154 if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) { 27155 numberOfBullets = slidesLength; 27156 } 27157 27158 for (let i = 0; i < numberOfBullets; i += 1) { 27159 if (params.renderBullet) { 27160 paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); 27161 } else { 27162 paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`; 27163 } 27164 } 27165 27166 $el.html(paginationHTML); 27167 swiper.pagination.bullets = $el.find((0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.bulletClass)); 27168 } 27169 27170 if (params.type === 'fraction') { 27171 if (params.renderFraction) { 27172 paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); 27173 } else { 27174 paginationHTML = `<span class="${params.currentClass}"></span>` + ' / ' + `<span class="${params.totalClass}"></span>`; 27175 } 27176 27177 $el.html(paginationHTML); 27178 } 27179 27180 if (params.type === 'progressbar') { 27181 if (params.renderProgressbar) { 27182 paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); 27183 } else { 27184 paginationHTML = `<span class="${params.progressbarFillClass}"></span>`; 27185 } 27186 27187 $el.html(paginationHTML); 27188 } 27189 27190 if (params.type !== 'custom') { 27191 emit('paginationRender', swiper.pagination.$el[0]); 27192 } 27193 } 27194 27195 function init() { 27196 swiper.params.pagination = (0,_shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_2__["default"])(swiper, swiper.originalParams.pagination, swiper.params.pagination, { 27197 el: 'swiper-pagination' 27198 }); 27199 const params = swiper.params.pagination; 27200 if (!params.el) return; 27201 let $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params.el); 27202 if ($el.length === 0) return; 27203 27204 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) { 27205 $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper 27206 27207 if ($el.length > 1) { 27208 $el = $el.filter(el => { 27209 if ((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(el).parents('.swiper')[0] !== swiper.el) return false; 27210 return true; 27211 }); 27212 } 27213 } 27214 27215 if (params.type === 'bullets' && params.clickable) { 27216 $el.addClass(params.clickableClass); 27217 } 27218 27219 $el.addClass(params.modifierClass + params.type); 27220 $el.addClass(params.modifierClass + swiper.params.direction); 27221 27222 if (params.type === 'bullets' && params.dynamicBullets) { 27223 $el.addClass(`${params.modifierClass}${params.type}-dynamic`); 27224 dynamicBulletIndex = 0; 27225 27226 if (params.dynamicMainBullets < 1) { 27227 params.dynamicMainBullets = 1; 27228 } 27229 } 27230 27231 if (params.type === 'progressbar' && params.progressbarOpposite) { 27232 $el.addClass(params.progressbarOppositeClass); 27233 } 27234 27235 if (params.clickable) { 27236 $el.on('click', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.bulletClass), function onClick(e) { 27237 e.preventDefault(); 27238 let index = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this).index() * swiper.params.slidesPerGroup; 27239 if (swiper.params.loop) index += swiper.loopedSlides; 27240 swiper.slideTo(index); 27241 }); 27242 } 27243 27244 Object.assign(swiper.pagination, { 27245 $el, 27246 el: $el[0] 27247 }); 27248 27249 if (!swiper.enabled) { 27250 $el.addClass(params.lockClass); 27251 } 27252 } 27253 27254 function destroy() { 27255 const params = swiper.params.pagination; 27256 if (isPaginationDisabled()) return; 27257 const $el = swiper.pagination.$el; 27258 $el.removeClass(params.hiddenClass); 27259 $el.removeClass(params.modifierClass + params.type); 27260 $el.removeClass(params.modifierClass + swiper.params.direction); 27261 if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass); 27262 27263 if (params.clickable) { 27264 $el.off('click', (0,_shared_classes_to_selector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.bulletClass)); 27265 } 27266 } 27267 27268 on('init', () => { 27269 init(); 27270 render(); 27271 update(); 27272 }); 27273 on('activeIndexChange', () => { 27274 if (swiper.params.loop) { 27275 update(); 27276 } else if (typeof swiper.snapIndex === 'undefined') { 27277 update(); 27278 } 27279 }); 27280 on('snapIndexChange', () => { 27281 if (!swiper.params.loop) { 27282 update(); 27283 } 27284 }); 27285 on('slidesLengthChange', () => { 27286 if (swiper.params.loop) { 27287 render(); 27288 update(); 27289 } 27290 }); 27291 on('snapGridLengthChange', () => { 27292 if (!swiper.params.loop) { 27293 render(); 27294 update(); 27295 } 27296 }); 27297 on('destroy', () => { 27298 destroy(); 27299 }); 27300 on('enable disable', () => { 27301 const { 27302 $el 27303 } = swiper.pagination; 27304 27305 if ($el) { 27306 $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass); 27307 } 27308 }); 27309 on('lock unlock', () => { 27310 update(); 27311 }); 27312 on('click', (_s, e) => { 27313 const targetEl = e.target; 27314 const { 27315 $el 27316 } = swiper.pagination; 27317 27318 if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !(0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(targetEl).hasClass(swiper.params.pagination.bulletClass)) { 27319 if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return; 27320 const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass); 27321 27322 if (isHidden === true) { 27323 emit('paginationShow'); 27324 } else { 27325 emit('paginationHide'); 27326 } 27327 27328 $el.toggleClass(swiper.params.pagination.hiddenClass); 27329 } 27330 }); 27331 Object.assign(swiper.pagination, { 27332 render, 27333 update, 27334 init, 27335 destroy 27336 }); 27337} 27338 27339/***/ }), 27340
vendor: 4,316 bytes, lines 27341-27469
27341/***/ "./node_modules/swiper/modules/parallax/parallax.js": 27342/*!**********************************************************!*\ 27343 !*** ./node_modules/swiper/modules/parallax/parallax.js ***! 27344 \**********************************************************/ 27345/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 27346 27347"use strict"; 27348__webpack_require__.r(__webpack_exports__); 27349/* harmony export */ __webpack_require__.d(__webpack_exports__, { 27350/* harmony export */ "default": () => (/* binding */ Parallax) 27351/* harmony export */ }); 27352/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 27353 27354function Parallax({ 27355 swiper, 27356 extendParams, 27357 on 27358}) { 27359 extendParams({ 27360 parallax: { 27361 enabled: false 27362 } 27363 }); 27364 27365 const setTransform = (el, progress) => { 27366 const { 27367 rtl 27368 } = swiper; 27369 const $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(el); 27370 const rtlFactor = rtl ? -1 : 1; 27371 const p = $el.attr('data-swiper-parallax') || '0'; 27372 let x = $el.attr('data-swiper-parallax-x'); 27373 let y = $el.attr('data-swiper-parallax-y'); 27374 const scale = $el.attr('data-swiper-parallax-scale'); 27375 const opacity = $el.attr('data-swiper-parallax-opacity'); 27376 27377 if (x || y) { 27378 x = x || '0'; 27379 y = y || '0'; 27380 } else if (swiper.isHorizontal()) { 27381 x = p; 27382 y = '0'; 27383 } else { 27384 y = p; 27385 x = '0'; 27386 } 27387 27388 if (x.indexOf('%') >= 0) { 27389 x = `${parseInt(x, 10) * progress * rtlFactor}%`; 27390 } else { 27391 x = `${x * progress * rtlFactor}px`; 27392 } 27393 27394 if (y.indexOf('%') >= 0) { 27395 y = `${parseInt(y, 10) * progress}%`; 27396 } else { 27397 y = `${y * progress}px`; 27398 } 27399 27400 if (typeof opacity !== 'undefined' && opacity !== null) { 27401 const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress)); 27402 $el[0].style.opacity = currentOpacity; 27403 } 27404 27405 if (typeof scale === 'undefined' || scale === null) { 27406 $el.transform(`translate3d(${x}, ${y}, 0px)`); 27407 } else { 27408 const currentScale = scale - (scale - 1) * (1 - Math.abs(progress)); 27409 $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`); 27410 } 27411 }; 27412 27413 const setTranslate = () => { 27414 const { 27415 $el, 27416 slides, 27417 progress, 27418 snapGrid 27419 } = swiper; 27420 $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { 27421 setTransform(el, progress); 27422 }); 27423 slides.each((slideEl, slideIndex) => { 27424 let slideProgress = slideEl.progress; 27425 27426 if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { 27427 slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1); 27428 } 27429 27430 slideProgress = Math.min(Math.max(slideProgress, -1), 1); 27431 (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { 27432 setTransform(el, slideProgress); 27433 }); 27434 }); 27435 }; 27436 27437 const setTransition = (duration = swiper.params.speed) => { 27438 const { 27439 $el 27440 } = swiper; 27441 $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => { 27442 const $parallaxEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(parallaxEl); 27443 let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; 27444 if (duration === 0) parallaxDuration = 0; 27445 $parallaxEl.transition(parallaxDuration); 27446 }); 27447 }; 27448 27449 on('beforeInit', () => { 27450 if (!swiper.params.parallax.enabled) return; 27451 swiper.params.watchSlidesProgress = true; 27452 swiper.originalParams.watchSlidesProgress = true; 27453 }); 27454 on('init', () => { 27455 if (!swiper.params.parallax.enabled) return; 27456 setTranslate(); 27457 }); 27458 on('setTranslate', () => { 27459 if (!swiper.params.parallax.enabled) return; 27460 setTranslate(); 27461 }); 27462 on('setTransition', (_swiper, duration) => { 27463 if (!swiper.params.parallax.enabled) return; 27464 setTransition(duration); 27465 }); 27466} 27467 27468/***/ }), 27469
vendor: 10,560 bytes, lines 27470-27848
27470/***/ "./node_modules/swiper/modules/scrollbar/scrollbar.js": 27471/*!************************************************************!*\ 27472 !*** ./node_modules/swiper/modules/scrollbar/scrollbar.js ***! 27473 \************************************************************/ 27474/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 27475 27476"use strict"; 27477__webpack_require__.r(__webpack_exports__); 27478/* harmony export */ __webpack_require__.d(__webpack_exports__, { 27479/* harmony export */ "default": () => (/* binding */ Scrollbar) 27480/* harmony export */ }); 27481/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 27482/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 27483/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 27484/* harmony import */ var _shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../shared/create-element-if-not-defined.js */ "./node_modules/swiper/shared/create-element-if-not-defined.js"); 27485 27486 27487 27488 27489function Scrollbar({ 27490 swiper, 27491 extendParams, 27492 on, 27493 emit 27494}) { 27495 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 27496 let isTouched = false; 27497 let timeout = null; 27498 let dragTimeout = null; 27499 let dragStartPos; 27500 let dragSize; 27501 let trackSize; 27502 let divider; 27503 extendParams({ 27504 scrollbar: { 27505 el: null, 27506 dragSize: 'auto', 27507 hide: false, 27508 draggable: false, 27509 snapOnRelease: true, 27510 lockClass: 'swiper-scrollbar-lock', 27511 dragClass: 'swiper-scrollbar-drag' 27512 } 27513 }); 27514 swiper.scrollbar = { 27515 el: null, 27516 dragEl: null, 27517 $el: null, 27518 $dragEl: null 27519 }; 27520 27521 function setTranslate() { 27522 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 27523 const { 27524 scrollbar, 27525 rtlTranslate: rtl, 27526 progress 27527 } = swiper; 27528 const { 27529 $dragEl, 27530 $el 27531 } = scrollbar; 27532 const params = swiper.params.scrollbar; 27533 let newSize = dragSize; 27534 let newPos = (trackSize - dragSize) * progress; 27535 27536 if (rtl) { 27537 newPos = -newPos; 27538 27539 if (newPos > 0) { 27540 newSize = dragSize - newPos; 27541 newPos = 0; 27542 } else if (-newPos + dragSize > trackSize) { 27543 newSize = trackSize + newPos; 27544 } 27545 } else if (newPos < 0) { 27546 newSize = dragSize + newPos; 27547 newPos = 0; 27548 } else if (newPos + dragSize > trackSize) { 27549 newSize = trackSize - newPos; 27550 } 27551 27552 if (swiper.isHorizontal()) { 27553 $dragEl.transform(`translate3d(${newPos}px, 0, 0)`); 27554 $dragEl[0].style.width = `${newSize}px`; 27555 } else { 27556 $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`); 27557 $dragEl[0].style.height = `${newSize}px`; 27558 } 27559 27560 if (params.hide) { 27561 clearTimeout(timeout); 27562 $el[0].style.opacity = 1; 27563 timeout = setTimeout(() => { 27564 $el[0].style.opacity = 0; 27565 $el.transition(400); 27566 }, 1000); 27567 } 27568 } 27569 27570 function setTransition(duration) { 27571 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 27572 swiper.scrollbar.$dragEl.transition(duration); 27573 } 27574 27575 function updateSize() { 27576 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 27577 const { 27578 scrollbar 27579 } = swiper; 27580 const { 27581 $dragEl, 27582 $el 27583 } = scrollbar; 27584 $dragEl[0].style.width = ''; 27585 $dragEl[0].style.height = ''; 27586 trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; 27587 divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0)); 27588 27589 if (swiper.params.scrollbar.dragSize === 'auto') { 27590 dragSize = trackSize * divider; 27591 } else { 27592 dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); 27593 } 27594 27595 if (swiper.isHorizontal()) { 27596 $dragEl[0].style.width = `${dragSize}px`; 27597 } else { 27598 $dragEl[0].style.height = `${dragSize}px`; 27599 } 27600 27601 if (divider >= 1) { 27602 $el[0].style.display = 'none'; 27603 } else { 27604 $el[0].style.display = ''; 27605 } 27606 27607 if (swiper.params.scrollbar.hide) { 27608 $el[0].style.opacity = 0; 27609 } 27610 27611 if (swiper.params.watchOverflow && swiper.enabled) { 27612 scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); 27613 } 27614 } 27615 27616 function getPointerPosition(e) { 27617 if (swiper.isHorizontal()) { 27618 return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX; 27619 } 27620 27621 return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY; 27622 } 27623 27624 function setDragPosition(e) { 27625 const { 27626 scrollbar, 27627 rtlTranslate: rtl 27628 } = swiper; 27629 const { 27630 $el 27631 } = scrollbar; 27632 let positionRatio; 27633 positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); 27634 positionRatio = Math.max(Math.min(positionRatio, 1), 0); 27635 27636 if (rtl) { 27637 positionRatio = 1 - positionRatio; 27638 } 27639 27640 const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio; 27641 swiper.updateProgress(position); 27642 swiper.setTranslate(position); 27643 swiper.updateActiveIndex(); 27644 swiper.updateSlidesClasses(); 27645 } 27646 27647 function onDragStart(e) { 27648 const params = swiper.params.scrollbar; 27649 const { 27650 scrollbar, 27651 $wrapperEl 27652 } = swiper; 27653 const { 27654 $el, 27655 $dragEl 27656 } = scrollbar; 27657 isTouched = true; 27658 dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; 27659 e.preventDefault(); 27660 e.stopPropagation(); 27661 $wrapperEl.transition(100); 27662 $dragEl.transition(100); 27663 setDragPosition(e); 27664 clearTimeout(dragTimeout); 27665 $el.transition(0); 27666 27667 if (params.hide) { 27668 $el.css('opacity', 1); 27669 } 27670 27671 if (swiper.params.cssMode) { 27672 swiper.$wrapperEl.css('scroll-snap-type', 'none'); 27673 } 27674 27675 emit('scrollbarDragStart', e); 27676 } 27677 27678 function onDragMove(e) { 27679 const { 27680 scrollbar, 27681 $wrapperEl 27682 } = swiper; 27683 const { 27684 $el, 27685 $dragEl 27686 } = scrollbar; 27687 if (!isTouched) return; 27688 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 27689 setDragPosition(e); 27690 $wrapperEl.transition(0); 27691 $el.transition(0); 27692 $dragEl.transition(0); 27693 emit('scrollbarDragMove', e); 27694 } 27695 27696 function onDragEnd(e) { 27697 const params = swiper.params.scrollbar; 27698 const { 27699 scrollbar, 27700 $wrapperEl 27701 } = swiper; 27702 const { 27703 $el 27704 } = scrollbar; 27705 if (!isTouched) return; 27706 isTouched = false; 27707 27708 if (swiper.params.cssMode) { 27709 swiper.$wrapperEl.css('scroll-snap-type', ''); 27710 $wrapperEl.transition(''); 27711 } 27712 27713 if (params.hide) { 27714 clearTimeout(dragTimeout); 27715 dragTimeout = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.nextTick)(() => { 27716 $el.css('opacity', 0); 27717 $el.transition(400); 27718 }, 1000); 27719 } 27720 27721 emit('scrollbarDragEnd', e); 27722 27723 if (params.snapOnRelease) { 27724 swiper.slideToClosest(); 27725 } 27726 } 27727 27728 function events(method) { 27729 const { 27730 scrollbar, 27731 touchEventsTouch, 27732 touchEventsDesktop, 27733 params, 27734 support 27735 } = swiper; 27736 const $el = scrollbar.$el; 27737 const target = $el[0]; 27738 const activeListener = support.passiveListener && params.passiveListeners ? { 27739 passive: false, 27740 capture: false 27741 } : false; 27742 const passiveListener = support.passiveListener && params.passiveListeners ? { 27743 passive: true, 27744 capture: false 27745 } : false; 27746 if (!target) return; 27747 const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; 27748 27749 if (!support.touch) { 27750 target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener); 27751 document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener); 27752 document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener); 27753 } else { 27754 target[eventMethod](touchEventsTouch.start, onDragStart, activeListener); 27755 target[eventMethod](touchEventsTouch.move, onDragMove, activeListener); 27756 target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener); 27757 } 27758 } 27759 27760 function enableDraggable() { 27761 if (!swiper.params.scrollbar.el) return; 27762 events('on'); 27763 } 27764 27765 function disableDraggable() { 27766 if (!swiper.params.scrollbar.el) return; 27767 events('off'); 27768 } 27769 27770 function init() { 27771 const { 27772 scrollbar, 27773 $el: $swiperEl 27774 } = swiper; 27775 swiper.params.scrollbar = (0,_shared_create_element_if_not_defined_js__WEBPACK_IMPORTED_MODULE_3__["default"])(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, { 27776 el: 'swiper-scrollbar' 27777 }); 27778 const params = swiper.params.scrollbar; 27779 if (!params.el) return; 27780 let $el = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(params.el); 27781 27782 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { 27783 $el = $swiperEl.find(params.el); 27784 } 27785 27786 let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`); 27787 27788 if ($dragEl.length === 0) { 27789 $dragEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(`<div class="${swiper.params.scrollbar.dragClass}"></div>`); 27790 $el.append($dragEl); 27791 } 27792 27793 Object.assign(scrollbar, { 27794 $el, 27795 el: $el[0], 27796 $dragEl, 27797 dragEl: $dragEl[0] 27798 }); 27799 27800 if (params.draggable) { 27801 enableDraggable(); 27802 } 27803 27804 if ($el) { 27805 $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); 27806 } 27807 } 27808 27809 function destroy() { 27810 disableDraggable(); 27811 } 27812 27813 on('init', () => { 27814 init(); 27815 updateSize(); 27816 setTranslate(); 27817 }); 27818 on('update resize observerUpdate lock unlock', () => { 27819 updateSize(); 27820 }); 27821 on('setTranslate', () => { 27822 setTranslate(); 27823 }); 27824 on('setTransition', (_s, duration) => { 27825 setTransition(duration); 27826 }); 27827 on('enable disable', () => { 27828 const { 27829 $el 27830 } = swiper.scrollbar; 27831 27832 if ($el) { 27833 $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); 27834 } 27835 }); 27836 on('destroy', () => { 27837 destroy(); 27838 }); 27839 Object.assign(swiper.scrollbar, { 27840 updateSize, 27841 setTranslate, 27842 init, 27843 destroy 27844 }); 27845} 27846 27847/***/ }), 27848
vendor: 8,460 bytes, lines 27849-28068
27849/***/ "./node_modules/swiper/modules/thumbs/thumbs.js": 27850/*!******************************************************!*\ 27851 !*** ./node_modules/swiper/modules/thumbs/thumbs.js ***! 27852 \******************************************************/ 27853/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 27854 27855"use strict"; 27856__webpack_require__.r(__webpack_exports__); 27857/* harmony export */ __webpack_require__.d(__webpack_exports__, { 27858/* harmony export */ "default": () => (/* binding */ Thumb) 27859/* harmony export */ }); 27860/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 27861/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 27862 27863 27864function Thumb({ 27865 swiper, 27866 extendParams, 27867 on 27868}) { 27869 extendParams({ 27870 thumbs: { 27871 swiper: null, 27872 multipleActiveThumbs: true, 27873 autoScrollOffset: 0, 27874 slideThumbActiveClass: 'swiper-slide-thumb-active', 27875 thumbsContainerClass: 'swiper-thumbs' 27876 } 27877 }); 27878 let initialized = false; 27879 let swiperCreated = false; 27880 swiper.thumbs = { 27881 swiper: null 27882 }; 27883 27884 function onThumbClick() { 27885 const thumbsSwiper = swiper.thumbs.swiper; 27886 if (!thumbsSwiper) return; 27887 const clickedIndex = thumbsSwiper.clickedIndex; 27888 const clickedSlide = thumbsSwiper.clickedSlide; 27889 if (clickedSlide && (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return; 27890 if (typeof clickedIndex === 'undefined' || clickedIndex === null) return; 27891 let slideToIndex; 27892 27893 if (thumbsSwiper.params.loop) { 27894 slideToIndex = parseInt((0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); 27895 } else { 27896 slideToIndex = clickedIndex; 27897 } 27898 27899 if (swiper.params.loop) { 27900 let currentIndex = swiper.activeIndex; 27901 27902 if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { 27903 swiper.loopFix(); // eslint-disable-next-line 27904 27905 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 27906 currentIndex = swiper.activeIndex; 27907 } 27908 27909 const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); 27910 const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); 27911 if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex; 27912 } 27913 27914 swiper.slideTo(slideToIndex); 27915 } 27916 27917 function init() { 27918 const { 27919 thumbs: thumbsParams 27920 } = swiper.params; 27921 if (initialized) return false; 27922 initialized = true; 27923 const SwiperClass = swiper.constructor; 27924 27925 if (thumbsParams.swiper instanceof SwiperClass) { 27926 swiper.thumbs.swiper = thumbsParams.swiper; 27927 Object.assign(swiper.thumbs.swiper.originalParams, { 27928 watchSlidesProgress: true, 27929 slideToClickedSlide: false 27930 }); 27931 Object.assign(swiper.thumbs.swiper.params, { 27932 watchSlidesProgress: true, 27933 slideToClickedSlide: false 27934 }); 27935 } else if ((0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_0__.isObject)(thumbsParams.swiper)) { 27936 const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper); 27937 Object.assign(thumbsSwiperParams, { 27938 watchSlidesProgress: true, 27939 slideToClickedSlide: false 27940 }); 27941 swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams); 27942 swiperCreated = true; 27943 } 27944 27945 swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); 27946 swiper.thumbs.swiper.on('tap', onThumbClick); 27947 return true; 27948 } 27949 27950 function update(initial) { 27951 const thumbsSwiper = swiper.thumbs.swiper; 27952 if (!thumbsSwiper) return; 27953 const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView; 27954 const autoScrollOffset = swiper.params.thumbs.autoScrollOffset; 27955 const useOffset = autoScrollOffset && !thumbsSwiper.params.loop; 27956 27957 if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) { 27958 let currentThumbsIndex = thumbsSwiper.activeIndex; 27959 let newThumbsIndex; 27960 let direction; 27961 27962 if (thumbsSwiper.params.loop) { 27963 if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) { 27964 thumbsSwiper.loopFix(); // eslint-disable-next-line 27965 27966 thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft; 27967 currentThumbsIndex = thumbsSwiper.activeIndex; 27968 } // Find actual thumbs index to slide to 27969 27970 27971 const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); 27972 const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); 27973 27974 if (typeof prevThumbsIndex === 'undefined') { 27975 newThumbsIndex = nextThumbsIndex; 27976 } else if (typeof nextThumbsIndex === 'undefined') { 27977 newThumbsIndex = prevThumbsIndex; 27978 } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) { 27979 newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex; 27980 } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) { 27981 newThumbsIndex = nextThumbsIndex; 27982 } else { 27983 newThumbsIndex = prevThumbsIndex; 27984 } 27985 27986 direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev'; 27987 } else { 27988 newThumbsIndex = swiper.realIndex; 27989 direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev'; 27990 } 27991 27992 if (useOffset) { 27993 newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset; 27994 } 27995 27996 if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { 27997 if (thumbsSwiper.params.centeredSlides) { 27998 if (newThumbsIndex > currentThumbsIndex) { 27999 newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; 28000 } else { 28001 newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; 28002 } 28003 } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {// newThumbsIndex = newThumbsIndex - slidesPerView + 1; 28004 } 28005 28006 thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); 28007 } 28008 } // Activate thumbs 28009 28010 28011 let thumbsToActivate = 1; 28012 const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; 28013 28014 if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { 28015 thumbsToActivate = swiper.params.slidesPerView; 28016 } 28017 28018 if (!swiper.params.thumbs.multipleActiveThumbs) { 28019 thumbsToActivate = 1; 28020 } 28021 28022 thumbsToActivate = Math.floor(thumbsToActivate); 28023 thumbsSwiper.slides.removeClass(thumbActiveClass); 28024 28025 if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) { 28026 for (let i = 0; i < thumbsToActivate; i += 1) { 28027 thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass); 28028 } 28029 } else { 28030 for (let i = 0; i < thumbsToActivate; i += 1) { 28031 thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass); 28032 } 28033 } 28034 } 28035 28036 on('beforeInit', () => { 28037 const { 28038 thumbs 28039 } = swiper.params; 28040 if (!thumbs || !thumbs.swiper) return; 28041 init(); 28042 update(true); 28043 }); 28044 on('slideChange update resize observerUpdate', () => { 28045 if (!swiper.thumbs.swiper) return; 28046 update(); 28047 }); 28048 on('setTransition', (_s, duration) => { 28049 const thumbsSwiper = swiper.thumbs.swiper; 28050 if (!thumbsSwiper) return; 28051 thumbsSwiper.setTransition(duration); 28052 }); 28053 on('beforeDestroy', () => { 28054 const thumbsSwiper = swiper.thumbs.swiper; 28055 if (!thumbsSwiper) return; 28056 28057 if (swiperCreated && thumbsSwiper) { 28058 thumbsSwiper.destroy(); 28059 } 28060 }); 28061 Object.assign(swiper.thumbs, { 28062 init, 28063 update 28064 }); 28065} 28066 28067/***/ }), 28068
vendor: 8,956 bytes, lines 28069-28375
28069/***/ "./node_modules/swiper/modules/virtual/virtual.js": 28070/*!********************************************************!*\ 28071 !*** ./node_modules/swiper/modules/virtual/virtual.js ***! 28072 \********************************************************/ 28073/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 28074 28075"use strict"; 28076__webpack_require__.r(__webpack_exports__); 28077/* harmony export */ __webpack_require__.d(__webpack_exports__, { 28078/* harmony export */ "default": () => (/* binding */ Virtual) 28079/* harmony export */ }); 28080/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 28081/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 28082 28083 28084function Virtual({ 28085 swiper, 28086 extendParams, 28087 on 28088}) { 28089 extendParams({ 28090 virtual: { 28091 enabled: false, 28092 slides: [], 28093 cache: true, 28094 renderSlide: null, 28095 renderExternal: null, 28096 renderExternalUpdate: true, 28097 addSlidesBefore: 0, 28098 addSlidesAfter: 0 28099 } 28100 }); 28101 let cssModeTimeout; 28102 swiper.virtual = { 28103 cache: {}, 28104 from: undefined, 28105 to: undefined, 28106 slides: [], 28107 offset: 0, 28108 slidesGrid: [] 28109 }; 28110 28111 function renderSlide(slide, index) { 28112 const params = swiper.params.virtual; 28113 28114 if (params.cache && swiper.virtual.cache[index]) { 28115 return swiper.virtual.cache[index]; 28116 } 28117 28118 const $slideEl = params.renderSlide ? (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(params.renderSlide.call(swiper, slide, index)) : (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index}">${slide}</div>`); 28119 if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index); 28120 if (params.cache) swiper.virtual.cache[index] = $slideEl; 28121 return $slideEl; 28122 } 28123 28124 function update(force) { 28125 const { 28126 slidesPerView, 28127 slidesPerGroup, 28128 centeredSlides 28129 } = swiper.params; 28130 const { 28131 addSlidesBefore, 28132 addSlidesAfter 28133 } = swiper.params.virtual; 28134 const { 28135 from: previousFrom, 28136 to: previousTo, 28137 slides, 28138 slidesGrid: previousSlidesGrid, 28139 offset: previousOffset 28140 } = swiper.virtual; 28141 28142 if (!swiper.params.cssMode) { 28143 swiper.updateActiveIndex(); 28144 } 28145 28146 const activeIndex = swiper.activeIndex || 0; 28147 let offsetProp; 28148 if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; 28149 let slidesAfter; 28150 let slidesBefore; 28151 28152 if (centeredSlides) { 28153 slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; 28154 slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; 28155 } else { 28156 slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter; 28157 slidesBefore = slidesPerGroup + addSlidesBefore; 28158 } 28159 28160 const from = Math.max((activeIndex || 0) - slidesBefore, 0); 28161 const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); 28162 const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); 28163 Object.assign(swiper.virtual, { 28164 from, 28165 to, 28166 offset, 28167 slidesGrid: swiper.slidesGrid 28168 }); 28169 28170 function onRendered() { 28171 swiper.updateSlides(); 28172 swiper.updateProgress(); 28173 swiper.updateSlidesClasses(); 28174 28175 if (swiper.lazy && swiper.params.lazy.enabled) { 28176 swiper.lazy.load(); 28177 } 28178 } 28179 28180 if (previousFrom === from && previousTo === to && !force) { 28181 if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { 28182 swiper.slides.css(offsetProp, `${offset}px`); 28183 } 28184 28185 swiper.updateProgress(); 28186 return; 28187 } 28188 28189 if (swiper.params.virtual.renderExternal) { 28190 swiper.params.virtual.renderExternal.call(swiper, { 28191 offset, 28192 from, 28193 to, 28194 slides: function getSlides() { 28195 const slidesToRender = []; 28196 28197 for (let i = from; i <= to; i += 1) { 28198 slidesToRender.push(slides[i]); 28199 } 28200 28201 return slidesToRender; 28202 }() 28203 }); 28204 28205 if (swiper.params.virtual.renderExternalUpdate) { 28206 onRendered(); 28207 } 28208 28209 return; 28210 } 28211 28212 const prependIndexes = []; 28213 const appendIndexes = []; 28214 28215 if (force) { 28216 swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove(); 28217 } else { 28218 for (let i = previousFrom; i <= previousTo; i += 1) { 28219 if (i < from || i > to) { 28220 swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove(); 28221 } 28222 } 28223 } 28224 28225 for (let i = 0; i < slides.length; i += 1) { 28226 if (i >= from && i <= to) { 28227 if (typeof previousTo === 'undefined' || force) { 28228 appendIndexes.push(i); 28229 } else { 28230 if (i > previousTo) appendIndexes.push(i); 28231 if (i < previousFrom) prependIndexes.push(i); 28232 } 28233 } 28234 } 28235 28236 appendIndexes.forEach(index => { 28237 swiper.$wrapperEl.append(renderSlide(slides[index], index)); 28238 }); 28239 prependIndexes.sort((a, b) => b - a).forEach(index => { 28240 swiper.$wrapperEl.prepend(renderSlide(slides[index], index)); 28241 }); 28242 swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`); 28243 onRendered(); 28244 } 28245 28246 function appendSlide(slides) { 28247 if (typeof slides === 'object' && 'length' in slides) { 28248 for (let i = 0; i < slides.length; i += 1) { 28249 if (slides[i]) swiper.virtual.slides.push(slides[i]); 28250 } 28251 } else { 28252 swiper.virtual.slides.push(slides); 28253 } 28254 28255 update(true); 28256 } 28257 28258 function prependSlide(slides) { 28259 const activeIndex = swiper.activeIndex; 28260 let newActiveIndex = activeIndex + 1; 28261 let numberOfNewSlides = 1; 28262 28263 if (Array.isArray(slides)) { 28264 for (let i = 0; i < slides.length; i += 1) { 28265 if (slides[i]) swiper.virtual.slides.unshift(slides[i]); 28266 } 28267 28268 newActiveIndex = activeIndex + slides.length; 28269 numberOfNewSlides = slides.length; 28270 } else { 28271 swiper.virtual.slides.unshift(slides); 28272 } 28273 28274 if (swiper.params.virtual.cache) { 28275 const cache = swiper.virtual.cache; 28276 const newCache = {}; 28277 Object.keys(cache).forEach(cachedIndex => { 28278 const $cachedEl = cache[cachedIndex]; 28279 const cachedElIndex = $cachedEl.attr('data-swiper-slide-index'); 28280 28281 if (cachedElIndex) { 28282 $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides); 28283 } 28284 28285 newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl; 28286 }); 28287 swiper.virtual.cache = newCache; 28288 } 28289 28290 update(true); 28291 swiper.slideTo(newActiveIndex, 0); 28292 } 28293 28294 function removeSlide(slidesIndexes) { 28295 if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return; 28296 let activeIndex = swiper.activeIndex; 28297 28298 if (Array.isArray(slidesIndexes)) { 28299 for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) { 28300 swiper.virtual.slides.splice(slidesIndexes[i], 1); 28301 28302 if (swiper.params.virtual.cache) { 28303 delete swiper.virtual.cache[slidesIndexes[i]]; 28304 } 28305 28306 if (slidesIndexes[i] < activeIndex) activeIndex -= 1; 28307 activeIndex = Math.max(activeIndex, 0); 28308 } 28309 } else { 28310 swiper.virtual.slides.splice(slidesIndexes, 1); 28311 28312 if (swiper.params.virtual.cache) { 28313 delete swiper.virtual.cache[slidesIndexes]; 28314 } 28315 28316 if (slidesIndexes < activeIndex) activeIndex -= 1; 28317 activeIndex = Math.max(activeIndex, 0); 28318 } 28319 28320 update(true); 28321 swiper.slideTo(activeIndex, 0); 28322 } 28323 28324 function removeAllSlides() { 28325 swiper.virtual.slides = []; 28326 28327 if (swiper.params.virtual.cache) { 28328 swiper.virtual.cache = {}; 28329 } 28330 28331 update(true); 28332 swiper.slideTo(0, 0); 28333 } 28334 28335 on('beforeInit', () => { 28336 if (!swiper.params.virtual.enabled) return; 28337 swiper.virtual.slides = swiper.params.virtual.slides; 28338 swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`); 28339 swiper.params.watchSlidesProgress = true; 28340 swiper.originalParams.watchSlidesProgress = true; 28341 28342 if (!swiper.params.initialSlide) { 28343 update(); 28344 } 28345 }); 28346 on('setTranslate', () => { 28347 if (!swiper.params.virtual.enabled) return; 28348 28349 if (swiper.params.cssMode && !swiper._immediateVirtual) { 28350 clearTimeout(cssModeTimeout); 28351 cssModeTimeout = setTimeout(() => { 28352 update(); 28353 }, 100); 28354 } else { 28355 update(); 28356 } 28357 }); 28358 on('init update resize', () => { 28359 if (!swiper.params.virtual.enabled) return; 28360 28361 if (swiper.params.cssMode) { 28362 (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_1__.setCSSProperty)(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`); 28363 } 28364 }); 28365 Object.assign(swiper.virtual, { 28366 appendSlide, 28367 prependSlide, 28368 removeSlide, 28369 removeAllSlides, 28370 update 28371 }); 28372} 28373 28374/***/ }), 28375
vendor: 21,662 bytes, lines 28376-29004
28376/***/ "./node_modules/swiper/modules/zoom/zoom.js": 28377/*!**************************************************!*\ 28378 !*** ./node_modules/swiper/modules/zoom/zoom.js ***! 28379 \**************************************************/ 28380/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 28381 28382"use strict"; 28383__webpack_require__.r(__webpack_exports__); 28384/* harmony export */ __webpack_require__.d(__webpack_exports__, { 28385/* harmony export */ "default": () => (/* binding */ Zoom) 28386/* harmony export */ }); 28387/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 28388/* harmony import */ var _shared_dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../shared/dom.js */ "./node_modules/swiper/shared/dom.js"); 28389/* harmony import */ var _shared_utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../shared/utils.js */ "./node_modules/swiper/shared/utils.js"); 28390 28391 28392 28393function Zoom({ 28394 swiper, 28395 extendParams, 28396 on, 28397 emit 28398}) { 28399 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 28400 extendParams({ 28401 zoom: { 28402 enabled: false, 28403 maxRatio: 3, 28404 minRatio: 1, 28405 toggle: true, 28406 containerClass: 'swiper-zoom-container', 28407 zoomedSlideClass: 'swiper-slide-zoomed' 28408 } 28409 }); 28410 swiper.zoom = { 28411 enabled: false 28412 }; 28413 let currentScale = 1; 28414 let isScaling = false; 28415 let gesturesEnabled; 28416 let fakeGestureTouched; 28417 let fakeGestureMoved; 28418 const gesture = { 28419 $slideEl: undefined, 28420 slideWidth: undefined, 28421 slideHeight: undefined, 28422 $imageEl: undefined, 28423 $imageWrapEl: undefined, 28424 maxRatio: 3 28425 }; 28426 const image = { 28427 isTouched: undefined, 28428 isMoved: undefined, 28429 currentX: undefined, 28430 currentY: undefined, 28431 minX: undefined, 28432 minY: undefined, 28433 maxX: undefined, 28434 maxY: undefined, 28435 width: undefined, 28436 height: undefined, 28437 startX: undefined, 28438 startY: undefined, 28439 touchesStart: {}, 28440 touchesCurrent: {} 28441 }; 28442 const velocity = { 28443 x: undefined, 28444 y: undefined, 28445 prevPositionX: undefined, 28446 prevPositionY: undefined, 28447 prevTime: undefined 28448 }; 28449 let scale = 1; 28450 Object.defineProperty(swiper.zoom, 'scale', { 28451 get() { 28452 return scale; 28453 }, 28454 28455 set(value) { 28456 if (scale !== value) { 28457 const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined; 28458 const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined; 28459 emit('zoomChange', value, imageEl, slideEl); 28460 } 28461 28462 scale = value; 28463 } 28464 28465 }); 28466 28467 function getDistanceBetweenTouches(e) { 28468 if (e.targetTouches.length < 2) return 1; 28469 const x1 = e.targetTouches[0].pageX; 28470 const y1 = e.targetTouches[0].pageY; 28471 const x2 = e.targetTouches[1].pageX; 28472 const y2 = e.targetTouches[1].pageY; 28473 const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2); 28474 return distance; 28475 } // Events 28476 28477 28478 function onGestureStart(e) { 28479 const support = swiper.support; 28480 const params = swiper.params.zoom; 28481 fakeGestureTouched = false; 28482 fakeGestureMoved = false; 28483 28484 if (!support.gestures) { 28485 if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { 28486 return; 28487 } 28488 28489 fakeGestureTouched = true; 28490 gesture.scaleStart = getDistanceBetweenTouches(e); 28491 } 28492 28493 if (!gesture.$slideEl || !gesture.$slideEl.length) { 28494 gesture.$slideEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target).closest(`.${swiper.params.slideClass}`); 28495 if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); 28496 gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); 28497 gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); 28498 gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 28499 28500 if (gesture.$imageWrapEl.length === 0) { 28501 gesture.$imageEl = undefined; 28502 return; 28503 } 28504 } 28505 28506 if (gesture.$imageEl) { 28507 gesture.$imageEl.transition(0); 28508 } 28509 28510 isScaling = true; 28511 } 28512 28513 function onGestureChange(e) { 28514 const support = swiper.support; 28515 const params = swiper.params.zoom; 28516 const zoom = swiper.zoom; 28517 28518 if (!support.gestures) { 28519 if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { 28520 return; 28521 } 28522 28523 fakeGestureMoved = true; 28524 gesture.scaleMove = getDistanceBetweenTouches(e); 28525 } 28526 28527 if (!gesture.$imageEl || gesture.$imageEl.length === 0) { 28528 if (e.type === 'gesturechange') onGestureStart(e); 28529 return; 28530 } 28531 28532 if (support.gestures) { 28533 zoom.scale = e.scale * currentScale; 28534 } else { 28535 zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale; 28536 } 28537 28538 if (zoom.scale > gesture.maxRatio) { 28539 zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5; 28540 } 28541 28542 if (zoom.scale < params.minRatio) { 28543 zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5; 28544 } 28545 28546 gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`); 28547 } 28548 28549 function onGestureEnd(e) { 28550 const device = swiper.device; 28551 const support = swiper.support; 28552 const params = swiper.params.zoom; 28553 const zoom = swiper.zoom; 28554 28555 if (!support.gestures) { 28556 if (!fakeGestureTouched || !fakeGestureMoved) { 28557 return; 28558 } 28559 28560 if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) { 28561 return; 28562 } 28563 28564 fakeGestureTouched = false; 28565 fakeGestureMoved = false; 28566 } 28567 28568 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 28569 zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); 28570 gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`); 28571 currentScale = zoom.scale; 28572 isScaling = false; 28573 if (zoom.scale === 1) gesture.$slideEl = undefined; 28574 } 28575 28576 function onTouchStart(e) { 28577 const device = swiper.device; 28578 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 28579 if (image.isTouched) return; 28580 if (device.android && e.cancelable) e.preventDefault(); 28581 image.isTouched = true; 28582 image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; 28583 image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; 28584 } 28585 28586 function onTouchMove(e) { 28587 const zoom = swiper.zoom; 28588 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 28589 swiper.allowClick = false; 28590 if (!image.isTouched || !gesture.$slideEl) return; 28591 28592 if (!image.isMoved) { 28593 image.width = gesture.$imageEl[0].offsetWidth; 28594 image.height = gesture.$imageEl[0].offsetHeight; 28595 image.startX = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.getTranslate)(gesture.$imageWrapEl[0], 'x') || 0; 28596 image.startY = (0,_shared_utils_js__WEBPACK_IMPORTED_MODULE_2__.getTranslate)(gesture.$imageWrapEl[0], 'y') || 0; 28597 gesture.slideWidth = gesture.$slideEl[0].offsetWidth; 28598 gesture.slideHeight = gesture.$slideEl[0].offsetHeight; 28599 gesture.$imageWrapEl.transition(0); 28600 } // Define if we need image drag 28601 28602 28603 const scaledWidth = image.width * zoom.scale; 28604 const scaledHeight = image.height * zoom.scale; 28605 if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; 28606 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 28607 image.maxX = -image.minX; 28608 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 28609 image.maxY = -image.minY; 28610 image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; 28611 image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; 28612 28613 if (!image.isMoved && !isScaling) { 28614 if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) { 28615 image.isTouched = false; 28616 return; 28617 } 28618 28619 if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) { 28620 image.isTouched = false; 28621 return; 28622 } 28623 } 28624 28625 if (e.cancelable) { 28626 e.preventDefault(); 28627 } 28628 28629 e.stopPropagation(); 28630 image.isMoved = true; 28631 image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX; 28632 image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY; 28633 28634 if (image.currentX < image.minX) { 28635 image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8; 28636 } 28637 28638 if (image.currentX > image.maxX) { 28639 image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8; 28640 } 28641 28642 if (image.currentY < image.minY) { 28643 image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8; 28644 } 28645 28646 if (image.currentY > image.maxY) { 28647 image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8; 28648 } // Velocity 28649 28650 28651 if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; 28652 if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; 28653 if (!velocity.prevTime) velocity.prevTime = Date.now(); 28654 velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; 28655 velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; 28656 if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; 28657 if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; 28658 velocity.prevPositionX = image.touchesCurrent.x; 28659 velocity.prevPositionY = image.touchesCurrent.y; 28660 velocity.prevTime = Date.now(); 28661 gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); 28662 } 28663 28664 function onTouchEnd() { 28665 const zoom = swiper.zoom; 28666 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 28667 28668 if (!image.isTouched || !image.isMoved) { 28669 image.isTouched = false; 28670 image.isMoved = false; 28671 return; 28672 } 28673 28674 image.isTouched = false; 28675 image.isMoved = false; 28676 let momentumDurationX = 300; 28677 let momentumDurationY = 300; 28678 const momentumDistanceX = velocity.x * momentumDurationX; 28679 const newPositionX = image.currentX + momentumDistanceX; 28680 const momentumDistanceY = velocity.y * momentumDurationY; 28681 const newPositionY = image.currentY + momentumDistanceY; // Fix duration 28682 28683 if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); 28684 if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); 28685 const momentumDuration = Math.max(momentumDurationX, momentumDurationY); 28686 image.currentX = newPositionX; 28687 image.currentY = newPositionY; // Define if we need image drag 28688 28689 const scaledWidth = image.width * zoom.scale; 28690 const scaledHeight = image.height * zoom.scale; 28691 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 28692 image.maxX = -image.minX; 28693 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 28694 image.maxY = -image.minY; 28695 image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); 28696 image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); 28697 gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); 28698 } 28699 28700 function onTransitionEnd() { 28701 const zoom = swiper.zoom; 28702 28703 if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { 28704 if (gesture.$imageEl) { 28705 gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); 28706 } 28707 28708 if (gesture.$imageWrapEl) { 28709 gesture.$imageWrapEl.transform('translate3d(0,0,0)'); 28710 } 28711 28712 zoom.scale = 1; 28713 currentScale = 1; 28714 gesture.$slideEl = undefined; 28715 gesture.$imageEl = undefined; 28716 gesture.$imageWrapEl = undefined; 28717 } 28718 } 28719 28720 function zoomIn(e) { 28721 const zoom = swiper.zoom; 28722 const params = swiper.params.zoom; 28723 28724 if (!gesture.$slideEl) { 28725 if (e && e.target) { 28726 gesture.$slideEl = (0,_shared_dom_js__WEBPACK_IMPORTED_MODULE_1__["default"])(e.target).closest(`.${swiper.params.slideClass}`); 28727 } 28728 28729 if (!gesture.$slideEl) { 28730 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 28731 gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); 28732 } else { 28733 gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); 28734 } 28735 } 28736 28737 gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); 28738 gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); 28739 } 28740 28741 if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; 28742 28743 if (swiper.params.cssMode) { 28744 swiper.wrapperEl.style.overflow = 'hidden'; 28745 swiper.wrapperEl.style.touchAction = 'none'; 28746 } 28747 28748 gesture.$slideEl.addClass(`${params.zoomedSlideClass}`); 28749 let touchX; 28750 let touchY; 28751 let offsetX; 28752 let offsetY; 28753 let diffX; 28754 let diffY; 28755 let translateX; 28756 let translateY; 28757 let imageWidth; 28758 let imageHeight; 28759 let scaledWidth; 28760 let scaledHeight; 28761 let translateMinX; 28762 let translateMinY; 28763 let translateMaxX; 28764 let translateMaxY; 28765 let slideWidth; 28766 let slideHeight; 28767 28768 if (typeof image.touchesStart.x === 'undefined' && e) { 28769 touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; 28770 touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; 28771 } else { 28772 touchX = image.touchesStart.x; 28773 touchY = image.touchesStart.y; 28774 } 28775 28776 zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 28777 currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 28778 28779 if (e) { 28780 slideWidth = gesture.$slideEl[0].offsetWidth; 28781 slideHeight = gesture.$slideEl[0].offsetHeight; 28782 offsetX = gesture.$slideEl.offset().left + window.scrollX; 28783 offsetY = gesture.$slideEl.offset().top + window.scrollY; 28784 diffX = offsetX + slideWidth / 2 - touchX; 28785 diffY = offsetY + slideHeight / 2 - touchY; 28786 imageWidth = gesture.$imageEl[0].offsetWidth; 28787 imageHeight = gesture.$imageEl[0].offsetHeight; 28788 scaledWidth = imageWidth * zoom.scale; 28789 scaledHeight = imageHeight * zoom.scale; 28790 translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0); 28791 translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0); 28792 translateMaxX = -translateMinX; 28793 translateMaxY = -translateMinY; 28794 translateX = diffX * zoom.scale; 28795 translateY = diffY * zoom.scale; 28796 28797 if (translateX < translateMinX) { 28798 translateX = translateMinX; 28799 } 28800 28801 if (translateX > translateMaxX) { 28802 translateX = translateMaxX; 28803 } 28804 28805 if (translateY < translateMinY) { 28806 translateY = translateMinY; 28807 } 28808 28809 if (translateY > translateMaxY) { 28810 translateY = translateMaxY; 28811 } 28812 } else { 28813 translateX = 0; 28814 translateY = 0; 28815 } 28816 28817 gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`); 28818 gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`); 28819 } 28820 28821 function zoomOut() { 28822 const zoom = swiper.zoom; 28823 const params = swiper.params.zoom; 28824 28825 if (!gesture.$slideEl) { 28826 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 28827 gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); 28828 } else { 28829 gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); 28830 } 28831 28832 gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); 28833 gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); 28834 } 28835 28836 if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; 28837 28838 if (swiper.params.cssMode) { 28839 swiper.wrapperEl.style.overflow = ''; 28840 swiper.wrapperEl.style.touchAction = ''; 28841 } 28842 28843 zoom.scale = 1; 28844 currentScale = 1; 28845 gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); 28846 gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); 28847 gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`); 28848 gesture.$slideEl = undefined; 28849 } // Toggle Zoom 28850 28851 28852 function zoomToggle(e) { 28853 const zoom = swiper.zoom; 28854 28855 if (zoom.scale && zoom.scale !== 1) { 28856 // Zoom Out 28857 zoomOut(); 28858 } else { 28859 // Zoom In 28860 zoomIn(e); 28861 } 28862 } 28863 28864 function getListeners() { 28865 const support = swiper.support; 28866 const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? { 28867 passive: true, 28868 capture: false 28869 } : false; 28870 const activeListenerWithCapture = support.passiveListener ? { 28871 passive: false, 28872 capture: true 28873 } : true; 28874 return { 28875 passiveListener, 28876 activeListenerWithCapture 28877 }; 28878 } 28879 28880 function getSlideSelector() { 28881 return `.${swiper.params.slideClass}`; 28882 } 28883 28884 function toggleGestures(method) { 28885 const { 28886 passiveListener 28887 } = getListeners(); 28888 const slideSelector = getSlideSelector(); 28889 swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener); 28890 swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener); 28891 swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener); 28892 } 28893 28894 function enableGestures() { 28895 if (gesturesEnabled) return; 28896 gesturesEnabled = true; 28897 toggleGestures('on'); 28898 } 28899 28900 function disableGestures() { 28901 if (!gesturesEnabled) return; 28902 gesturesEnabled = false; 28903 toggleGestures('off'); 28904 } // Attach/Detach Events 28905 28906 28907 function enable() { 28908 const zoom = swiper.zoom; 28909 if (zoom.enabled) return; 28910 zoom.enabled = true; 28911 const support = swiper.support; 28912 const { 28913 passiveListener, 28914 activeListenerWithCapture 28915 } = getListeners(); 28916 const slideSelector = getSlideSelector(); // Scale image 28917 28918 if (support.gestures) { 28919 swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener); 28920 swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener); 28921 } else if (swiper.touchEvents.start === 'touchstart') { 28922 swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); 28923 swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); 28924 swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); 28925 28926 if (swiper.touchEvents.cancel) { 28927 swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); 28928 } 28929 } // Move image 28930 28931 28932 swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); 28933 } 28934 28935 function disable() { 28936 const zoom = swiper.zoom; 28937 if (!zoom.enabled) return; 28938 const support = swiper.support; 28939 zoom.enabled = false; 28940 const { 28941 passiveListener, 28942 activeListenerWithCapture 28943 } = getListeners(); 28944 const slideSelector = getSlideSelector(); // Scale image 28945 28946 if (support.gestures) { 28947 swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener); 28948 swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener); 28949 } else if (swiper.touchEvents.start === 'touchstart') { 28950 swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); 28951 swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); 28952 swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); 28953 28954 if (swiper.touchEvents.cancel) { 28955 swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); 28956 } 28957 } // Move image 28958 28959 28960 swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); 28961 } 28962 28963 on('init', () => { 28964 if (swiper.params.zoom.enabled) { 28965 enable(); 28966 } 28967 }); 28968 on('destroy', () => { 28969 disable(); 28970 }); 28971 on('touchStart', (_s, e) => { 28972 if (!swiper.zoom.enabled) return; 28973 onTouchStart(e); 28974 }); 28975 on('touchEnd', (_s, e) => { 28976 if (!swiper.zoom.enabled) return; 28977 onTouchEnd(e); 28978 }); 28979 on('doubleTap', (_s, e) => { 28980 if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { 28981 zoomToggle(e); 28982 } 28983 }); 28984 on('transitionEnd', () => { 28985 if (swiper.zoom.enabled && swiper.params.zoom.enabled) { 28986 onTransitionEnd(); 28987 } 28988 }); 28989 on('slideChange', () => { 28990 if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { 28991 onTransitionEnd(); 28992 } 28993 }); 28994 Object.assign(swiper.zoom, { 28995 enable, 28996 disable, 28997 in: zoomIn, 28998 out: zoomOut, 28999 toggle: zoomToggle 29000 }); 29001} 29002 29003/***/ }), 29004
vendor: 735 bytes, lines 29005-29022
29005/***/ "./node_modules/swiper/shared/classes-to-selector.js": 29006/*!***********************************************************!*\ 29007 !*** ./node_modules/swiper/shared/classes-to-selector.js ***! 29008 \***********************************************************/ 29009/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29010 29011"use strict"; 29012__webpack_require__.r(__webpack_exports__); 29013/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29014/* harmony export */ "default": () => (/* binding */ classesToSelector) 29015/* harmony export */ }); 29016function classesToSelector(classes = '') { 29017 return `.${classes.trim().replace(/([\.:!\/])/g, '\\$1') // eslint-disable-line 29018 .replace(/ /g, '.')}`; 29019} 29020 29021/***/ }), 29022
vendor: 1,429 bytes, lines 29023-29060
29023/***/ "./node_modules/swiper/shared/create-element-if-not-defined.js": 29024/*!*********************************************************************!*\ 29025 !*** ./node_modules/swiper/shared/create-element-if-not-defined.js ***! 29026 \*********************************************************************/ 29027/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29028 29029"use strict"; 29030__webpack_require__.r(__webpack_exports__); 29031/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29032/* harmony export */ "default": () => (/* binding */ createElementIfNotDefined) 29033/* harmony export */ }); 29034/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 29035 29036function createElementIfNotDefined(swiper, originalParams, params, checkProps) { 29037 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 29038 29039 if (swiper.params.createElements) { 29040 Object.keys(checkProps).forEach(key => { 29041 if (!params[key] && params.auto === true) { 29042 let element = swiper.$el.children(`.${checkProps[key]}`)[0]; 29043 29044 if (!element) { 29045 element = document.createElement('div'); 29046 element.className = checkProps[key]; 29047 swiper.$el.append(element); 29048 } 29049 29050 params[key] = element; 29051 originalParams[key] = element; 29052 } 29053 }); 29054 } 29055 29056 return params; 29057} 29058 29059/***/ }), 29060
vendor: 1,203 bytes, lines 29061-29088
29061/***/ "./node_modules/swiper/shared/create-shadow.js": 29062/*!*****************************************************!*\ 29063 !*** ./node_modules/swiper/shared/create-shadow.js ***! 29064 \*****************************************************/ 29065/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29066 29067"use strict"; 29068__webpack_require__.r(__webpack_exports__); 29069/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29070/* harmony export */ "default": () => (/* binding */ createShadow) 29071/* harmony export */ }); 29072/* harmony import */ var _dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dom.js */ "./node_modules/swiper/shared/dom.js"); 29073 29074function createShadow(params, $slideEl, side) { 29075 const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`; 29076 const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl; 29077 let $shadowEl = $shadowContainer.children(`.${shadowClass}`); 29078 29079 if (!$shadowEl.length) { 29080 $shadowEl = (0,_dom_js__WEBPACK_IMPORTED_MODULE_0__["default"])(`<div class="swiper-slide-shadow${side ? `-${side}` : ''}"></div>`); 29081 $shadowContainer.append($shadowEl); 29082 } 29083 29084 return $shadowEl; 29085} 29086 29087/***/ }), 29088
vendor: 2,855 bytes, lines 29089-29149
29089/***/ "./node_modules/swiper/shared/dom.js": 29090/*!*******************************************!*\ 29091 !*** ./node_modules/swiper/shared/dom.js ***! 29092 \*******************************************/ 29093/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29094 29095"use strict"; 29096__webpack_require__.r(__webpack_exports__); 29097/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29098/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 29099/* harmony export */ }); 29100/* harmony import */ var dom7__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dom7 */ "./node_modules/dom7/dom7.esm.js"); 29101 29102const Methods = { 29103 addClass: dom7__WEBPACK_IMPORTED_MODULE_0__.addClass, 29104 removeClass: dom7__WEBPACK_IMPORTED_MODULE_0__.removeClass, 29105 hasClass: dom7__WEBPACK_IMPORTED_MODULE_0__.hasClass, 29106 toggleClass: dom7__WEBPACK_IMPORTED_MODULE_0__.toggleClass, 29107 attr: dom7__WEBPACK_IMPORTED_MODULE_0__.attr, 29108 removeAttr: dom7__WEBPACK_IMPORTED_MODULE_0__.removeAttr, 29109 transform: dom7__WEBPACK_IMPORTED_MODULE_0__.transform, 29110 transition: dom7__WEBPACK_IMPORTED_MODULE_0__.transition, 29111 on: dom7__WEBPACK_IMPORTED_MODULE_0__.on, 29112 off: dom7__WEBPACK_IMPORTED_MODULE_0__.off, 29113 trigger: dom7__WEBPACK_IMPORTED_MODULE_0__.trigger, 29114 transitionEnd: dom7__WEBPACK_IMPORTED_MODULE_0__.transitionEnd, 29115 outerWidth: dom7__WEBPACK_IMPORTED_MODULE_0__.outerWidth, 29116 outerHeight: dom7__WEBPACK_IMPORTED_MODULE_0__.outerHeight, 29117 styles: dom7__WEBPACK_IMPORTED_MODULE_0__.styles, 29118 offset: dom7__WEBPACK_IMPORTED_MODULE_0__.offset, 29119 css: dom7__WEBPACK_IMPORTED_MODULE_0__.css, 29120 each: dom7__WEBPACK_IMPORTED_MODULE_0__.each, 29121 html: dom7__WEBPACK_IMPORTED_MODULE_0__.html, 29122 text: dom7__WEBPACK_IMPORTED_MODULE_0__.text, 29123 is: dom7__WEBPACK_IMPORTED_MODULE_0__.is, 29124 index: dom7__WEBPACK_IMPORTED_MODULE_0__.index, 29125 eq: dom7__WEBPACK_IMPORTED_MODULE_0__.eq, 29126 append: dom7__WEBPACK_IMPORTED_MODULE_0__.append, 29127 prepend: dom7__WEBPACK_IMPORTED_MODULE_0__.prepend, 29128 next: dom7__WEBPACK_IMPORTED_MODULE_0__.next, 29129 nextAll: dom7__WEBPACK_IMPORTED_MODULE_0__.nextAll, 29130 prev: dom7__WEBPACK_IMPORTED_MODULE_0__.prev, 29131 prevAll: dom7__WEBPACK_IMPORTED_MODULE_0__.prevAll, 29132 parent: dom7__WEBPACK_IMPORTED_MODULE_0__.parent, 29133 parents: dom7__WEBPACK_IMPORTED_MODULE_0__.parents, 29134 closest: dom7__WEBPACK_IMPORTED_MODULE_0__.closest, 29135 find: dom7__WEBPACK_IMPORTED_MODULE_0__.find, 29136 children: dom7__WEBPACK_IMPORTED_MODULE_0__.children, 29137 filter: dom7__WEBPACK_IMPORTED_MODULE_0__.filter, 29138 remove: dom7__WEBPACK_IMPORTED_MODULE_0__.remove 29139}; 29140Object.keys(Methods).forEach(methodName => { 29141 Object.defineProperty(dom7__WEBPACK_IMPORTED_MODULE_0__.$.fn, methodName, { 29142 value: Methods[methodName], 29143 writable: true 29144 }); 29145}); 29146/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (dom7__WEBPACK_IMPORTED_MODULE_0__.$); 29147 29148/***/ }), 29149
vendor: 1,419 bytes, lines 29150-29194
29150/***/ "./node_modules/swiper/shared/effect-init.js": 29151/*!***************************************************!*\ 29152 !*** ./node_modules/swiper/shared/effect-init.js ***! 29153 \***************************************************/ 29154/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29155 29156"use strict"; 29157__webpack_require__.r(__webpack_exports__); 29158/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29159/* harmony export */ "default": () => (/* binding */ effectInit) 29160/* harmony export */ }); 29161function effectInit(params) { 29162 const { 29163 effect, 29164 swiper, 29165 on, 29166 setTranslate, 29167 setTransition, 29168 overwriteParams, 29169 perspective 29170 } = params; 29171 on('beforeInit', () => { 29172 if (swiper.params.effect !== effect) return; 29173 swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`); 29174 29175 if (perspective && perspective()) { 29176 swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); 29177 } 29178 29179 const overwriteParamsResult = overwriteParams ? overwriteParams() : {}; 29180 Object.assign(swiper.params, overwriteParamsResult); 29181 Object.assign(swiper.originalParams, overwriteParamsResult); 29182 }); 29183 on('setTranslate', () => { 29184 if (swiper.params.effect !== effect) return; 29185 setTranslate(); 29186 }); 29187 on('setTransition', (_s, duration) => { 29188 if (swiper.params.effect !== effect) return; 29189 setTransition(duration); 29190 }); 29191} 29192 29193/***/ }), 29194
vendor: 812 bytes, lines 29195-29218
29195/***/ "./node_modules/swiper/shared/effect-target.js": 29196/*!*****************************************************!*\ 29197 !*** ./node_modules/swiper/shared/effect-target.js ***! 29198 \*****************************************************/ 29199/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29200 29201"use strict"; 29202__webpack_require__.r(__webpack_exports__); 29203/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29204/* harmony export */ "default": () => (/* binding */ effectTarget) 29205/* harmony export */ }); 29206function effectTarget(effectParams, $slideEl) { 29207 if (effectParams.transformEl) { 29208 return $slideEl.find(effectParams.transformEl).css({ 29209 'backface-visibility': 'hidden', 29210 '-webkit-backface-visibility': 'hidden' 29211 }); 29212 } 29213 29214 return $slideEl; 29215} 29216 29217/***/ }), 29218
vendor: 1,529 bytes, lines 29219-29267
29219/***/ "./node_modules/swiper/shared/effect-virtual-transition-end.js": 29220/*!*********************************************************************!*\ 29221 !*** ./node_modules/swiper/shared/effect-virtual-transition-end.js ***! 29222 \*********************************************************************/ 29223/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29224 29225"use strict"; 29226__webpack_require__.r(__webpack_exports__); 29227/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29228/* harmony export */ "default": () => (/* binding */ effectVirtualTransitionEnd) 29229/* harmony export */ }); 29230function effectVirtualTransitionEnd({ 29231 swiper, 29232 duration, 29233 transformEl, 29234 allSlides 29235}) { 29236 const { 29237 slides, 29238 activeIndex, 29239 $wrapperEl 29240 } = swiper; 29241 29242 if (swiper.params.virtualTranslate && duration !== 0) { 29243 let eventTriggered = false; 29244 let $transitionEndTarget; 29245 29246 if (allSlides) { 29247 $transitionEndTarget = transformEl ? slides.find(transformEl) : slides; 29248 } else { 29249 $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex); 29250 } 29251 29252 $transitionEndTarget.transitionEnd(() => { 29253 if (eventTriggered) return; 29254 if (!swiper || swiper.destroyed) return; 29255 eventTriggered = true; 29256 swiper.animating = false; 29257 const triggerEvents = ['webkitTransitionEnd', 'transitionend']; 29258 29259 for (let i = 0; i < triggerEvents.length; i += 1) { 29260 $wrapperEl.trigger(triggerEvents[i]); 29261 } 29262 }); 29263 } 29264} 29265 29266/***/ }), 29267
vendor: 1,234 bytes, lines 29268-29308
29268/***/ "./node_modules/swiper/shared/get-browser.js": 29269/*!***************************************************!*\ 29270 !*** ./node_modules/swiper/shared/get-browser.js ***! 29271 \***************************************************/ 29272/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29273 29274"use strict"; 29275__webpack_require__.r(__webpack_exports__); 29276/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29277/* harmony export */ "getBrowser": () => (/* binding */ getBrowser) 29278/* harmony export */ }); 29279/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 29280 29281let browser; 29282 29283function calcBrowser() { 29284 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 29285 29286 function isSafari() { 29287 const ua = window.navigator.userAgent.toLowerCase(); 29288 return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0; 29289 } 29290 29291 return { 29292 isSafari: isSafari(), 29293 isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent) 29294 }; 29295} 29296 29297function getBrowser() { 29298 if (!browser) { 29299 browser = calcBrowser(); 29300 } 29301 29302 return browser; 29303} 29304 29305 29306 29307/***/ }), 29308
vendor: 2,407 bytes, lines 29309-29381
29309/***/ "./node_modules/swiper/shared/get-device.js": 29310/*!**************************************************!*\ 29311 !*** ./node_modules/swiper/shared/get-device.js ***! 29312 \**************************************************/ 29313/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29314 29315"use strict"; 29316__webpack_require__.r(__webpack_exports__); 29317/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29318/* harmony export */ "getDevice": () => (/* binding */ getDevice) 29319/* harmony export */ }); 29320/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 29321/* harmony import */ var _get_support_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./get-support.js */ "./node_modules/swiper/shared/get-support.js"); 29322 29323 29324let deviceCached; 29325 29326function calcDevice({ 29327 userAgent 29328} = {}) { 29329 const support = (0,_get_support_js__WEBPACK_IMPORTED_MODULE_1__.getSupport)(); 29330 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 29331 const platform = window.navigator.platform; 29332 const ua = userAgent || window.navigator.userAgent; 29333 const device = { 29334 ios: false, 29335 android: false 29336 }; 29337 const screenWidth = window.screen.width; 29338 const screenHeight = window.screen.height; 29339 const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line 29340 29341 let ipad = ua.match(/(iPad).*OS\s([\d_]+)/); 29342 const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); 29343 const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 29344 const windows = platform === 'Win32'; 29345 let macos = platform === 'MacIntel'; // iPadOs 13 fix 29346 29347 const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810']; 29348 29349 if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { 29350 ipad = ua.match(/(Version)\/([\d.]+)/); 29351 if (!ipad) ipad = [0, 1, '13_0_0']; 29352 macos = false; 29353 } // Android 29354 29355 29356 if (android && !windows) { 29357 device.os = 'android'; 29358 device.android = true; 29359 } 29360 29361 if (ipad || iphone || ipod) { 29362 device.os = 'ios'; 29363 device.ios = true; 29364 } // Export object 29365 29366 29367 return device; 29368} 29369 29370function getDevice(overrides = {}) { 29371 if (!deviceCached) { 29372 deviceCached = calcDevice(overrides); 29373 } 29374 29375 return deviceCached; 29376} 29377 29378 29379 29380/***/ }), 29381
vendor: 1,735 bytes, lines 29382-29437
29382/***/ "./node_modules/swiper/shared/get-support.js": 29383/*!***************************************************!*\ 29384 !*** ./node_modules/swiper/shared/get-support.js ***! 29385 \***************************************************/ 29386/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29387 29388"use strict"; 29389__webpack_require__.r(__webpack_exports__); 29390/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29391/* harmony export */ "getSupport": () => (/* binding */ getSupport) 29392/* harmony export */ }); 29393/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 29394 29395let support; 29396 29397function calcSupport() { 29398 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 29399 const document = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getDocument)(); 29400 return { 29401 smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style, 29402 touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch), 29403 passiveListener: function checkPassiveListener() { 29404 let supportsPassive = false; 29405 29406 try { 29407 const opts = Object.defineProperty({}, 'passive', { 29408 // eslint-disable-next-line 29409 get() { 29410 supportsPassive = true; 29411 } 29412 29413 }); 29414 window.addEventListener('testPassiveListener', null, opts); 29415 } catch (e) {// No support 29416 } 29417 29418 return supportsPassive; 29419 }(), 29420 gestures: function checkGestures() { 29421 return 'ongesturestart' in window; 29422 }() 29423 }; 29424} 29425 29426function getSupport() { 29427 if (!support) { 29428 support = calcSupport(); 29429 } 29430 29431 return support; 29432} 29433 29434 29435 29436/***/ }), 29437
vendor: 6,975 bytes, lines 29438-29657
29438/***/ "./node_modules/swiper/shared/utils.js": 29439/*!*********************************************!*\ 29440 !*** ./node_modules/swiper/shared/utils.js ***! 29441 \*********************************************/ 29442/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29443 29444"use strict"; 29445__webpack_require__.r(__webpack_exports__); 29446/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29447/* harmony export */ "animateCSSModeScroll": () => (/* binding */ animateCSSModeScroll), 29448/* harmony export */ "deleteProps": () => (/* binding */ deleteProps), 29449/* harmony export */ "extend": () => (/* binding */ extend), 29450/* harmony export */ "getComputedStyle": () => (/* binding */ getComputedStyle), 29451/* harmony export */ "getTranslate": () => (/* binding */ getTranslate), 29452/* harmony export */ "isObject": () => (/* binding */ isObject), 29453/* harmony export */ "nextTick": () => (/* binding */ nextTick), 29454/* harmony export */ "now": () => (/* binding */ now), 29455/* harmony export */ "setCSSProperty": () => (/* binding */ setCSSProperty) 29456/* harmony export */ }); 29457/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/ssr-window.esm.js"); 29458 29459 29460function deleteProps(obj) { 29461 const object = obj; 29462 Object.keys(object).forEach(key => { 29463 try { 29464 object[key] = null; 29465 } catch (e) {// no getter for object 29466 } 29467 29468 try { 29469 delete object[key]; 29470 } catch (e) {// something got wrong 29471 } 29472 }); 29473} 29474 29475function nextTick(callback, delay = 0) { 29476 return setTimeout(callback, delay); 29477} 29478 29479function now() { 29480 return Date.now(); 29481} 29482 29483function getComputedStyle(el) { 29484 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 29485 let style; 29486 29487 if (window.getComputedStyle) { 29488 style = window.getComputedStyle(el, null); 29489 } 29490 29491 if (!style && el.currentStyle) { 29492 style = el.currentStyle; 29493 } 29494 29495 if (!style) { 29496 style = el.style; 29497 } 29498 29499 return style; 29500} 29501 29502function getTranslate(el, axis = 'x') { 29503 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 29504 let matrix; 29505 let curTransform; 29506 let transformMatrix; 29507 const curStyle = getComputedStyle(el, null); 29508 29509 if (window.WebKitCSSMatrix) { 29510 curTransform = curStyle.transform || curStyle.webkitTransform; 29511 29512 if (curTransform.split(',').length > 6) { 29513 curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', '); 29514 } // Some old versions of Webkit choke when 'none' is passed; pass 29515 // empty string instead in this case 29516 29517 29518 transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); 29519 } else { 29520 transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); 29521 matrix = transformMatrix.toString().split(','); 29522 } 29523 29524 if (axis === 'x') { 29525 // Latest Chrome and webkits Fix 29526 if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix 29527 else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers 29528 else curTransform = parseFloat(matrix[4]); 29529 } 29530 29531 if (axis === 'y') { 29532 // Latest Chrome and webkits Fix 29533 if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix 29534 else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers 29535 else curTransform = parseFloat(matrix[5]); 29536 } 29537 29538 return curTransform || 0; 29539} 29540 29541function isObject(o) { 29542 return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object'; 29543} 29544 29545function isNode(node) { 29546 // eslint-disable-next-line 29547 if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') { 29548 return node instanceof HTMLElement; 29549 } 29550 29551 return node && (node.nodeType === 1 || node.nodeType === 11); 29552} 29553 29554function extend(...args) { 29555 const to = Object(args[0]); 29556 const noExtend = ['__proto__', 'constructor', 'prototype']; 29557 29558 for (let i = 1; i < args.length; i += 1) { 29559 const nextSource = args[i]; 29560 29561 if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) { 29562 const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0); 29563 29564 for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { 29565 const nextKey = keysArray[nextIndex]; 29566 const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 29567 29568 if (desc !== undefined && desc.enumerable) { 29569 if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) { 29570 if (nextSource[nextKey].__swiper__) { 29571 to[nextKey] = nextSource[nextKey]; 29572 } else { 29573 extend(to[nextKey], nextSource[nextKey]); 29574 } 29575 } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) { 29576 to[nextKey] = {}; 29577 29578 if (nextSource[nextKey].__swiper__) { 29579 to[nextKey] = nextSource[nextKey]; 29580 } else { 29581 extend(to[nextKey], nextSource[nextKey]); 29582 } 29583 } else { 29584 to[nextKey] = nextSource[nextKey]; 29585 } 29586 } 29587 } 29588 } 29589 } 29590 29591 return to; 29592} 29593 29594function setCSSProperty(el, varName, varValue) { 29595 el.style.setProperty(varName, varValue); 29596} 29597 29598function animateCSSModeScroll({ 29599 swiper, 29600 targetPosition, 29601 side 29602}) { 29603 const window = (0,ssr_window__WEBPACK_IMPORTED_MODULE_0__.getWindow)(); 29604 const startPosition = -swiper.translate; 29605 let startTime = null; 29606 let time; 29607 const duration = swiper.params.speed; 29608 swiper.wrapperEl.style.scrollSnapType = 'none'; 29609 window.cancelAnimationFrame(swiper.cssModeFrameID); 29610 const dir = targetPosition > startPosition ? 'next' : 'prev'; 29611 29612 const isOutOfBound = (current, target) => { 29613 return dir === 'next' && current >= target || dir === 'prev' && current <= target; 29614 }; 29615 29616 const animate = () => { 29617 time = new Date().getTime(); 29618 29619 if (startTime === null) { 29620 startTime = time; 29621 } 29622 29623 const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 29624 const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; 29625 let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); 29626 29627 if (isOutOfBound(currentPosition, targetPosition)) { 29628 currentPosition = targetPosition; 29629 } 29630 29631 swiper.wrapperEl.scrollTo({ 29632 [side]: currentPosition 29633 }); 29634 29635 if (isOutOfBound(currentPosition, targetPosition)) { 29636 swiper.wrapperEl.style.overflow = 'hidden'; 29637 swiper.wrapperEl.style.scrollSnapType = ''; 29638 setTimeout(() => { 29639 swiper.wrapperEl.style.overflow = ''; 29640 swiper.wrapperEl.scrollTo({ 29641 [side]: currentPosition 29642 }); 29643 }); 29644 window.cancelAnimationFrame(swiper.cssModeFrameID); 29645 return; 29646 } 29647 29648 swiper.cssModeFrameID = window.requestAnimationFrame(animate); 29649 }; 29650 29651 animate(); 29652} 29653 29654 29655 29656/***/ }), 29657
vendor: 9,382 bytes, lines 29658-29757
29658/***/ "./node_modules/swiper/swiper.esm.js": 29659/*!*******************************************!*\ 29660 !*** ./node_modules/swiper/swiper.esm.js ***! 29661 \*******************************************/ 29662/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 29663 29664"use strict"; 29665__webpack_require__.r(__webpack_exports__); 29666/* harmony export */ __webpack_require__.d(__webpack_exports__, { 29667/* harmony export */ "A11y": () => (/* reexport safe */ _modules_a11y_a11y_js__WEBPACK_IMPORTED_MODULE_11__["default"]), 29668/* harmony export */ "Autoplay": () => (/* reexport safe */ _modules_autoplay_autoplay_js__WEBPACK_IMPORTED_MODULE_14__["default"]), 29669/* harmony export */ "Controller": () => (/* reexport safe */ _modules_controller_controller_js__WEBPACK_IMPORTED_MODULE_10__["default"]), 29670/* harmony export */ "EffectCards": () => (/* reexport safe */ _modules_effect_cards_effect_cards_js__WEBPACK_IMPORTED_MODULE_24__["default"]), 29671/* harmony export */ "EffectCoverflow": () => (/* reexport safe */ _modules_effect_coverflow_effect_coverflow_js__WEBPACK_IMPORTED_MODULE_22__["default"]), 29672/* harmony export */ "EffectCreative": () => (/* reexport safe */ _modules_effect_creative_effect_creative_js__WEBPACK_IMPORTED_MODULE_23__["default"]), 29673/* harmony export */ "EffectCube": () => (/* reexport safe */ _modules_effect_cube_effect_cube_js__WEBPACK_IMPORTED_MODULE_20__["default"]), 29674/* harmony export */ "EffectFade": () => (/* reexport safe */ _modules_effect_fade_effect_fade_js__WEBPACK_IMPORTED_MODULE_19__["default"]), 29675/* harmony export */ "EffectFlip": () => (/* reexport safe */ _modules_effect_flip_effect_flip_js__WEBPACK_IMPORTED_MODULE_21__["default"]), 29676/* harmony export */ "FreeMode": () => (/* reexport safe */ _modules_free_mode_free_mode_js__WEBPACK_IMPORTED_MODULE_16__["default"]), 29677/* harmony export */ "Grid": () => (/* reexport safe */ _modules_grid_grid_js__WEBPACK_IMPORTED_MODULE_17__["default"]), 29678/* harmony export */ "HashNavigation": () => (/* reexport safe */ _modules_hash_navigation_hash_navigation_js__WEBPACK_IMPORTED_MODULE_13__["default"]), 29679/* harmony export */ "History": () => (/* reexport safe */ _modules_history_history_js__WEBPACK_IMPORTED_MODULE_12__["default"]), 29680/* harmony export */ "Keyboard": () => (/* reexport safe */ _modules_keyboard_keyboard_js__WEBPACK_IMPORTED_MODULE_2__["default"]), 29681/* harmony export */ "Lazy": () => (/* reexport safe */ _modules_lazy_lazy_js__WEBPACK_IMPORTED_MODULE_9__["default"]), 29682/* harmony export */ "Manipulation": () => (/* reexport safe */ _modules_manipulation_manipulation_js__WEBPACK_IMPORTED_MODULE_18__["default"]), 29683/* harmony export */ "Mousewheel": () => (/* reexport safe */ _modules_mousewheel_mousewheel_js__WEBPACK_IMPORTED_MODULE_3__["default"]), 29684/* harmony export */ "Navigation": () => (/* reexport safe */ _modules_navigation_navigation_js__WEBPACK_IMPORTED_MODULE_4__["default"]), 29685/* harmony export */ "Pagination": () => (/* reexport safe */ _modules_pagination_pagination_js__WEBPACK_IMPORTED_MODULE_5__["default"]), 29686/* harmony export */ "Parallax": () => (/* reexport safe */ _modules_parallax_parallax_js__WEBPACK_IMPORTED_MODULE_7__["default"]), 29687/* harmony export */ "Scrollbar": () => (/* reexport safe */ _modules_scrollbar_scrollbar_js__WEBPACK_IMPORTED_MODULE_6__["default"]), 29688/* harmony export */ "Swiper": () => (/* reexport safe */ _core_core_js__WEBPACK_IMPORTED_MODULE_0__["default"]), 29689/* harmony export */ "Thumbs": () => (/* reexport safe */ _modules_thumbs_thumbs_js__WEBPACK_IMPORTED_MODULE_15__["default"]), 29690/* harmony export */ "Virtual": () => (/* reexport safe */ _modules_virtual_virtual_js__WEBPACK_IMPORTED_MODULE_1__["default"]), 29691/* harmony export */ "Zoom": () => (/* reexport safe */ _modules_zoom_zoom_js__WEBPACK_IMPORTED_MODULE_8__["default"]), 29692/* harmony export */ "default": () => (/* reexport safe */ _core_core_js__WEBPACK_IMPORTED_MODULE_0__["default"]) 29693/* harmony export */ }); 29694/* harmony import */ var _core_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core/core.js */ "./node_modules/swiper/core/core.js"); 29695/* harmony import */ var _modules_virtual_virtual_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/virtual/virtual.js */ "./node_modules/swiper/modules/virtual/virtual.js"); 29696/* harmony import */ var _modules_keyboard_keyboard_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/keyboard/keyboard.js */ "./node_modules/swiper/modules/keyboard/keyboard.js"); 29697/* harmony import */ var _modules_mousewheel_mousewheel_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/mousewheel/mousewheel.js */ "./node_modules/swiper/modules/mousewheel/mousewheel.js"); 29698/* harmony import */ var _modules_navigation_navigation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/navigation/navigation.js */ "./node_modules/swiper/modules/navigation/navigation.js"); 29699/* harmony import */ var _modules_pagination_pagination_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/pagination/pagination.js */ "./node_modules/swiper/modules/pagination/pagination.js"); 29700/* harmony import */ var _modules_scrollbar_scrollbar_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/scrollbar/scrollbar.js */ "./node_modules/swiper/modules/scrollbar/scrollbar.js"); 29701/* harmony import */ var _modules_parallax_parallax_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/parallax/parallax.js */ "./node_modules/swiper/modules/parallax/parallax.js"); 29702/* harmony import */ var _modules_zoom_zoom_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/zoom/zoom.js */ "./node_modules/swiper/modules/zoom/zoom.js"); 29703/* harmony import */ var _modules_lazy_lazy_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/lazy/lazy.js */ "./node_modules/swiper/modules/lazy/lazy.js"); 29704/* harmony import */ var _modules_controller_controller_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./modules/controller/controller.js */ "./node_modules/swiper/modules/controller/controller.js"); 29705/* harmony import */ var _modules_a11y_a11y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./modules/a11y/a11y.js */ "./node_modules/swiper/modules/a11y/a11y.js"); 29706/* harmony import */ var _modules_history_history_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modules/history/history.js */ "./node_modules/swiper/modules/history/history.js"); 29707/* harmony import */ var _modules_hash_navigation_hash_navigation_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./modules/hash-navigation/hash-navigation.js */ "./node_modules/swiper/modules/hash-navigation/hash-navigation.js"); 29708/* harmony import */ var _modules_autoplay_autoplay_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./modules/autoplay/autoplay.js */ "./node_modules/swiper/modules/autoplay/autoplay.js"); 29709/* harmony import */ var _modules_thumbs_thumbs_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./modules/thumbs/thumbs.js */ "./node_modules/swiper/modules/thumbs/thumbs.js"); 29710/* harmony import */ var _modules_free_mode_free_mode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./modules/free-mode/free-mode.js */ "./node_modules/swiper/modules/free-mode/free-mode.js"); 29711/* harmony import */ var _modules_grid_grid_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./modules/grid/grid.js */ "./node_modules/swiper/modules/grid/grid.js"); 29712/* harmony import */ var _modules_manipulation_manipulation_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./modules/manipulation/manipulation.js */ "./node_modules/swiper/modules/manipulation/manipulation.js"); 29713/* harmony import */ var _modules_effect_fade_effect_fade_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./modules/effect-fade/effect-fade.js */ "./node_modules/swiper/modules/effect-fade/effect-fade.js"); 29714/* harmony import */ var _modules_effect_cube_effect_cube_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./modules/effect-cube/effect-cube.js */ "./node_modules/swiper/modules/effect-cube/effect-cube.js"); 29715/* harmony import */ var _modules_effect_flip_effect_flip_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./modules/effect-flip/effect-flip.js */ "./node_modules/swiper/modules/effect-flip/effect-flip.js"); 29716/* harmony import */ var _modules_effect_coverflow_effect_coverflow_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./modules/effect-coverflow/effect-coverflow.js */ "./node_modules/swiper/modules/effect-coverflow/effect-coverflow.js"); 29717/* harmony import */ var _modules_effect_creative_effect_creative_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./modules/effect-creative/effect-creative.js */ "./node_modules/swiper/modules/effect-creative/effect-creative.js"); 29718/* harmony import */ var _modules_effect_cards_effect_cards_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./modules/effect-cards/effect-cards.js */ "./node_modules/swiper/modules/effect-cards/effect-cards.js"); 29719/** 29720 * Swiper 7.4.1 29721 * Most modern mobile touch slider and framework with hardware accelerated transitions 29722 * https://swiperjs.com 29723 * 29724 * Copyright 2014-2021 Vladimir Kharlampidi 29725 * 29726 * Released under the MIT License 29727 * 29728 * Released on: December 24, 2021 29729 */ 29730 29731 29732 29733 29734 29735 29736 29737 29738 29739 29740 29741 29742 29743 29744 29745 29746 29747 29748 29749 29750 29751 29752 29753 29754 29755 29756 29757/***/ })
vendor: 3,950 bytes, lines 29757-29858
29757 29758 29759/******/ }); 29760/************************************************************************/ 29761/******/ // The module cache 29762/******/ var __webpack_module_cache__ = {}; 29763/******/ 29764/******/ // The require function 29765/******/ function __webpack_require__(moduleId) { 29766/******/ // Check if module is in cache 29767/******/ var cachedModule = __webpack_module_cache__[moduleId]; 29768/******/ if (cachedModule !== undefined) { 29769/******/ return cachedModule.exports; 29770/******/ } 29771/******/ // Create a new module (and put it into the cache) 29772/******/ var module = __webpack_module_cache__[moduleId] = { 29773/******/ // no module.id needed 29774/******/ // no module.loaded needed 29775/******/ exports: {} 29776/******/ }; 29777/******/ 29778/******/ // Execute the module function 29779/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); 29780/******/ 29781/******/ // Return the exports of the module 29782/******/ return module.exports; 29783/******/ } 29784/******/ 29785/************************************************************************/ 29786/******/ /* webpack/runtime/compat get default export */ 29787/******/ (() => { 29788/******/ // getDefaultExport function for compatibility with non-harmony modules 29789/******/ __webpack_require__.n = (module) => { 29790/******/ var getter = module && module.__esModule ? 29791/******/ () => (module['default']) : 29792/******/ () => (module); 29793/******/ __webpack_require__.d(getter, { a: getter }); 29794/******/ return getter; 29795/******/ }; 29796/******/ })(); 29797/******/ 29798/******/ /* webpack/runtime/define property getters */ 29799/******/ (() => { 29800/******/ // define getter functions for harmony exports 29801/******/ __webpack_require__.d = (exports, definition) => { 29802/******/ for(var key in definition) { 29803/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 29804/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 29805/******/ } 29806/******/ } 29807/******/ }; 29808/******/ })(); 29809/******/ 29810/******/ /* webpack/runtime/global */ 29811/******/ (() => { 29812/******/ __webpack_require__.g = (function() { 29813/******/ if (typeof globalThis === 'object') return globalThis; 29814/******/ try { 29815/******/ return this || new Function('return this')(); 29816/******/ } catch (e) { 29817/******/ if (typeof window === 'object') return window; 29818/******/ } 29819/******/ })(); 29820/******/ })(); 29821/******/ 29822/******/ /* webpack/runtime/hasOwnProperty shorthand */ 29823/******/ (() => { 29824/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 29825/******/ })(); 29826/******/ 29827/******/ /* webpack/runtime/make namespace object */ 29828/******/ (() => { 29829/******/ // define __esModule on exports 29830/******/ __webpack_require__.r = (exports) => { 29831/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 29832/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 29833/******/ } 29834/******/ Object.defineProperty(exports, '__esModule', { value: true }); 29835/******/ }; 29836/******/ })(); 29837/******/ 29838/************************************************************************/ 29839var __webpack_exports__ = {}; 29840// This entry need to be wrapped in an IIFE because it need to be in strict mode. 29841(() => { 29842"use strict"; 29843/*!************************!*\ 29844 !*** ./src/js/main.js ***! 29845 \************************/ 29846__webpack_require__.r(__webpack_exports__); 29847/* harmony import */ var _vendor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_vendor */ "./src/js/_vendor.js"); 29848/* harmony import */ var _vars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_vars */ "./src/js/_vars.js"); 29849/* harmony import */ var _functions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_functions */ "./src/js/_functions.js"); 29850/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_components */ "./src/js/_components.js"); 29851 29852 29853 29854 29855})(); 29856 29857/******/ })() 29858;
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.