1/*! 2 * @cycjimmy/swiper-animation v4.1.2 3 * Homepage: https://github.com/cycjimmy/swiper-animation#readme 4 * Released under the MIT License. 5 */ 6!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SwiperAnimation=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function n(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}function a(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}var r=!1,o=function(){return!!window.Promise};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u={},c={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(t){return"[object NodeList]"===Object.prototype.toString.call(t)}}(c);var l={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(t){return"Array"===Object.prototype.toString.call(t).slice(8,-1)}}(l),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=a(c),n=a(l);function a(t){return t&&t.__esModule?t:{default:t}}t.default=function(t){return(0,n.default)(t)?t:(0,e.default)(t)?Array.from?Array.from(t):Array.prototype.slice.call(t):new Array(t)}}(u);var f=s(u),d="visibility: hidden;",m={},y={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(t){return"Promise"===Object.prototype.toString.call(t).slice(8,-1)}}(y),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e,n=(e=y)&&e.__esModule?e:{default:e};t.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,n.default)(t)?t:new Promise((function(n){t(),setTimeout(n,e)}))}}(m);var p=s(m),v=["animated","animate__animated"],h=function(){function e(n){t(this,e),this.swiper=n,this.container=function(t){if(t.el)return t.el;if(t.container)return t.container[0];throw new Error("Illegal swiper instance")}(this.swiper),this.animationElements=[].concat(a(f(this.container.querySelectorAll("[data-swiper-animation]"))),a(f(this.container.querySelectorAll("[data-swiper-animation-once]")))),this.activeElements=[],this.animationElements.forEach((function(t){t.animationData={styleCache:t.attributes.style?d+t.style.cssText:d,effect:t.dataset.swiperAnimation||t.dataset.swiperAnimationOnce||"",duration:t.dataset.duration||".5s",delay:t.dataset.delay||".5s",outEffect:t.dataset.swiperOutAnimation||"",outDuration:t.dataset.outDuration||".5s",isRecovery:!0,runOnce:!!t.dataset.swiperAnimationOnce},t.style.cssText=t.animationData.styleCache}))}return n(e,[{key:"animate",value:function(){var t=this;return Promise.resolve().then((function(){return e=t.activeElements,n=e.map((function(t){return t.animationData.isRecovery?Promise.resolve():t.animationData.outEffect?p((function(){t.style.cssText=t.animationData.styleCache,t.style.visibility="visible",t.style.cssText+=" animation-duration:".concat(t.animationData.outDuration,"; -webkit-animation-duration:").concat(t.animationData.outDuration,";"),t.classList.add(t.animationData.outEffect,"animated")}),500):Promise.resolve()})),Promise.all(n);var e,n})).then((function(){return e=t.activeElements,n=e.map((function(t){return t.animationData.isRecovery||t.animationData.runOnce?Promise.resolve():p((function(){var e;t.style.cssText=t.animationData.styleCache,(e=t.classList).remove.apply(e,a([t.animationData.effect,t.animationData.outEffect].concat(a(v)).filter((function(t){return!!t})))),t.animationData.isRecovery=!0}))}
vendor: 1,411 bytes, line 6
6)),Promise.all(n);var e,n})).then((function(){return e=t._updateActiveElements(),n=e.map((function(t){return t.animationData?p((function(){var e;t.style.visibility="visible",t.style.cssText+=" animation-duration:".concat(t.animationData.duration,"; -webkit-animation-duration:").concat(t.animationData.duration,"; animation-delay:").concat(t.animationData.delay,"; -webkit-animation-delay:").concat(t.animationData.delay,";"),(e=t.classList).add.apply(e,[t.animationData.effect].concat(a(v))),t.animationData.isRecovery=!1})):Promise.resolve()})),Promise.all(n);var e,n}))}},{key:"_updateActiveElements",value:function(){return this.activeElements=[].concat(a(f(this.swiper.slides[this.swiper.activeIndex].querySelectorAll("[data-swiper-animation]"))),a(f(this.swiper.slides[this.swiper.activeIndex].querySelectorAll("[data-swiper-animation-once]")))),this.activeElements}}]),e}();return function(){function e(){t(this,e),this.animations=null,o()||function(){if(!r&&!o()){var t=document.createElement("script");t.type="text/javascript",t.src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js",document.querySelector("head").appendChild(t),r=!0}}()}return n(e,[{key:"init",value:function(t){return this.animations||(this.animations=new h(t)),this}},{key:"animate",value:function(){var t=this;return o()?this.animations.animate():setTimeout((function(){return t.animate()}),500)}}]),e}()}));
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.