(function () { var lazyLoadInstances = []; // The "lazyLazy" instance of lazyload is used // to check when the .horizContainer divs enter the viewport var lazyLazy = new LazyLoad({ elements_selector: ".lazy", unobserve_entered: true, // <- To avoid executing the script multiple times // Assign the callbacks defined above }); })(); window.lazyLoadOptions = { threshold: 0, // Assign the callbacks defined above }; window.addEventListener( "LazyLoad::Initialized", function (e) { var instance = e.detail.instance; console.log(e.detail.instance); window.lazyLoadInstances = instance; }, false ); var countdown=function(){function z(a,b){var c=a.getTime();a.setMonth(a.getMonth()+b);return Math.round((a.getTime()-c)/864E5)}function v(a){var b=a.getTime(),c=new Date(b);c.setMonth(a.getMonth()+1);return Math.round((c.getTime()-b)/864E5)}function w(a,b){b=b instanceof Date||null!==b&&isFinite(b)?new Date(+b):new Date;if(!a)return b;var c=+a.value||0;if(c)return b.setTime(b.getTime()+c),b;(c=+a.milliseconds||0)&&b.setMilliseconds(b.getMilliseconds()+c);(c=+a.seconds||0)&&b.setSeconds(b.getSeconds()+ c);(c=+a.minutes||0)&&b.setMinutes(b.getMinutes()+c);(c=+a.hours||0)&&b.setHours(b.getHours()+c);(c=+a.weeks||0)&&(c*=7);(c+=+a.days||0)&&b.setDate(b.getDate()+c);(c=+a.months||0)&&b.setMonth(b.getMonth()+c);(c=+a.millennia||0)&&(c*=10);(c+=+a.centuries||0)&&(c*=10);(c+=+a.decades||0)&&(c*=10);(c+=+a.years||0)&&b.setFullYear(b.getFullYear()+c);return b}function C(a,b){return x(a)+(1===a?p[b]:q[b])}function n(){}function k(a,b,c,e,l,d){0<=a[c]&&(b+=a[c],delete a[c]);b/=l;if(1>=b+1)return 0;if(0<=a[e]){a[e]= +(a[e]+b).toFixed(d);switch(e){case "seconds":if(60!==a.seconds||isNaN(a.minutes))break;a.minutes++;a.seconds=0;case "minutes":if(60!==a.minutes||isNaN(a.hours))break;a.hours++;a.minutes=0;case "hours":if(24!==a.hours||isNaN(a.days))break;a.days++;a.hours=0;case "days":if(7!==a.days||isNaN(a.weeks))break;a.weeks++;a.days=0;case "weeks":if(a.weeks!==v(a.refMonth)/7||isNaN(a.months))break;a.months++;a.weeks=0;case "months":if(12!==a.months||isNaN(a.years))break;a.years++;a.months=0;case "years":if(10!== a.years||isNaN(a.decades))break;a.decades++;a.years=0;case "decades":if(10!==a.decades||isNaN(a.centuries))break;a.centuries++;a.decades=0;case "centuries":if(10!==a.centuries||isNaN(a.millennia))break;a.millennia++;a.centuries=0}return 0}return b}function A(a,b,c,e,l,d){var f=new Date;a.start=b=b||f;a.end=c=c||f;a.units=e;a.value=c.getTime()-b.getTime();0>a.value&&(f=c,c=b,b=f);a.refMonth=new Date(b.getFullYear(),b.getMonth(),15,12,0,0);try{a.millennia=0;a.centuries=0;a.decades=0;a.years=c.getFullYear()- b.getFullYear();a.months=c.getMonth()-b.getMonth();a.weeks=0;a.days=c.getDate()-b.getDate();a.hours=c.getHours()-b.getHours();a.minutes=c.getMinutes()-b.getMinutes();a.seconds=c.getSeconds()-b.getSeconds();a.milliseconds=c.getMilliseconds()-b.getMilliseconds();var g;0>a.milliseconds?(g=s(-a.milliseconds/1E3),a.seconds-=g,a.milliseconds+=1E3*g):1E3<=a.milliseconds&&(a.seconds+=m(a.milliseconds/1E3),a.milliseconds%=1E3);0>a.seconds?(g=s(-a.seconds/60),a.minutes-=g,a.seconds+=60*g):60<=a.seconds&&(a.minutes+= m(a.seconds/60),a.seconds%=60);0>a.minutes?(g=s(-a.minutes/60),a.hours-=g,a.minutes+=60*g):60<=a.minutes&&(a.hours+=m(a.minutes/60),a.minutes%=60);0>a.hours?(g=s(-a.hours/24),a.days-=g,a.hours+=24*g):24<=a.hours&&(a.days+=m(a.hours/24),a.hours%=24);for(;0>a.days;)a.months--,a.days+=z(a.refMonth,1);7<=a.days&&(a.weeks+=m(a.days/7),a.days%=7);0>a.months?(g=s(-a.months/12),a.years-=g,a.months+=12*g):12<=a.months&&(a.years+=m(a.months/12),a.months%=12);10<=a.years&&(a.decades+=m(a.years/10),a.years%= 10,10<=a.decades&&(a.centuries+=m(a.decades/10),a.decades%=10,10<=a.centuries&&(a.millennia+=m(a.centuries/10),a.centuries%=10)));b=0;!(e&1024)||b>=l?(a.centuries+=10*a.millennia,delete a.millennia):a.millennia&&b++;!(e&512)||b>=l?(a.decades+=10*a.centuries,delete a.centuries):a.centuries&&b++;!(e&256)||b>=l?(a.years+=10*a.decades,delete a.decades):a.decades&&b++;!(e&128)||b>=l?(a.months+=12*a.years,delete a.years):a.years&&b++;!(e&64)||b>=l?(a.months&&(a.days+=z(a.refMonth,a.months)),delete a.months, 7<=a.days&&(a.weeks+=m(a.days/7),a.days%=7)):a.months&&b++;!(e&32)||b>=l?(a.days+=7*a.weeks,delete a.weeks):a.weeks&&b++;!(e&16)||b>=l?(a.hours+=24*a.days,delete a.days):a.days&&b++;!(e&8)||b>=l?(a.minutes+=60*a.hours,delete a.hours):a.hours&&b++;!(e&4)||b>=l?(a.seconds+=60*a.minutes,delete a.minutes):a.minutes&&b++;!(e&2)||b>=l?(a.milliseconds+=1E3*a.seconds,delete a.seconds):a.seconds&&b++;if(!(e&1)||b>=l){var h=k(a,0,"milliseconds","seconds",1E3,d);if(h&&(h=k(a,h,"seconds","minutes",60,d))&&(h= k(a,h,"minutes","hours",60,d))&&(h=k(a,h,"hours","days",24,d))&&(h=k(a,h,"days","weeks",7,d))&&(h=k(a,h,"weeks","months",v(a.refMonth)/7,d))){e=h;var n,p=a.refMonth,q=p.getTime(),r=new Date(q);r.setFullYear(p.getFullYear()+1);n=Math.round((r.getTime()-q)/864E5);if(h=k(a,e,"months","years",n/v(a.refMonth),d))if(h=k(a,h,"years","decades",10,d))if(h=k(a,h,"decades","centuries",10,d))if(h=k(a,h,"centuries","millennia",10,d))throw Error("Fractional unit overflow");}}}finally{delete a.refMonth}return a} function d(a,b,c,e,d){var f;c=+c||222;e=0d?Math.round(d):20:0;var k=null;"function"===typeof a?(f=a,a=null):a instanceof Date||(null!==a&&isFinite(a)?a=new Date(+a):("object"===typeof k&&(k=a),a=null));var g=null;"function"===typeof b?(f=b,b=null):b instanceof Date||(null!==b&&isFinite(b)?b=new Date(+b):("object"===typeof b&&(g=b),b=null));k&&(a=w(k,b));g&&(b=w(g,a));if(!a&&!b)return new n;if(!f)return A(new n,a,b,c,e,d);var k=c&1?1E3/30:c&2?1E3:c&4?6E4:c&8?36E5:c&16?864E5:6048E5, h,g=function(){f(A(new n,a,b,c,e,d),h)};g();return h=setInterval(g,k)}var s=Math.ceil,m=Math.floor,p,q,r,t,u,f,x,y;n.prototype.toString=function(a){var b=y(this),c=b.length;if(!c)return a?""+a:u;if(1===c)return b[0];a=r+b.pop();return b.join(t)+a};n.prototype.toHTML=function(a,b){a=a||"span";var c=y(this),e=c.length;if(!e)return(b=b||u)?"\x3c"+a+"\x3e"+b+"\x3c/"+a+"\x3e":b;for(var d=0;d=d;d++)p[d]=b[d]||p[d],q[d]=c[d]||q[d]}"string"===typeof a.last&&(r=a.last);"string"===typeof a.delim&&(t=a.delim);"string"===typeof a.empty&&(u=a.empty);"function"===typeof a.formatNumber&&(x=a.formatNumber);"function"===typeof a.formatter&&(f=a.formatter)}},B=d.resetFormat= function(){p=" millisecond; second; minute; hour; day; week; month; year; decade; century; millennium".split(";");q=" milliseconds; seconds; minutes; hours; days; weeks; months; years; decades; centuries; millennia".split(";");r=" and ";t=", ";u="";x=function(a){return a};f=C};d.setLabels=function(a,b,c,d,f,k,m){D({singular:a,plural:b,last:c,delim:d,empty:f,formatNumber:k,formatter:m})};d.resetLabels=B;B();"undefined"!==typeof module&&module.exports?module.exports=d:"undefined"!==typeof window&&("function"=== typeof window.define&&"undefined"!==typeof window.define.amd)&&window.define("countdown",[],function(){return d});return d}(); !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).LazyLoad=n()}(this,(function(){"use strict";function t(){return(t=Object.assign||function(t){for(var n=1;n1,a={elements_selector:".lazy",container:e||n?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1},c=function(n){return t({},a,n)},s=function(t,n){var e,i="LazyLoad::Initialized",o=new t(n);try{e=new CustomEvent(i,{detail:{instance:o}})}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent(i,!1,!1,{instance:o})}window.dispatchEvent(e)},l="loading",u="loaded",d="applied",f="error",_="native",g="data-",v="ll-status",b=function(t,n){return t.getAttribute(g+n)},p=function(t){return b(t,v)},h=function(t,n){return function(t,n,e){var i="data-ll-status";null!==e?t.setAttribute(i,e):t.removeAttribute(i)}(t,0,n)},m=function(t){return h(t,null)},E=function(t){return null===p(t)},y=function(t){return p(t)===_},I=[l,u,d,f],A=function(t,n,e,i){t&&(void 0===i?void 0===e?t(n):t(n,e):t(n,e,i))},L=function(t,n){o?t.classList.add(n):t.className+=(t.className?" ":"")+n},w=function(t,n){o?t.classList.remove(n):t.className=t.className.replace(new RegExp("(^|\\s+)"+n+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},k=function(t){return t.llTempImage},O=function(t,n){if(n){var e=n._observer;e&&e.unobserve(t)}},x=function(t,n){t&&(t.loadingCount+=n)},z=function(t,n){t&&(t.toLoadCount=n)},C=function(t){for(var n,e=[],i=0;n=t.children[i];i+=1)"SOURCE"===n.tagName&&e.push(n);return e},N=function(t,n,e){e&&t.setAttribute(n,e)},M=function(t,n){t.removeAttribute(n)},R=function(t){return!!t.llOriginalAttrs},T=function(t){if(!R(t)){var n={};n.src=t.getAttribute("src"),n.srcset=t.getAttribute("srcset"),n.sizes=t.getAttribute("sizes"),t.llOriginalAttrs=n}},G=function(t){if(R(t)){var n=t.llOriginalAttrs;N(t,"src",n.src),N(t,"srcset",n.srcset),N(t,"sizes",n.sizes)}},D=function(t,n){N(t,"sizes",b(t,n.data_sizes)),N(t,"srcset",b(t,n.data_srcset)),N(t,"src",b(t,n.data_src))},V=function(t){M(t,"src"),M(t,"srcset"),M(t,"sizes")},j=function(t,n){var e=t.parentNode;e&&"PICTURE"===e.tagName&&C(e).forEach(n)},F={IMG:function(t,n){j(t,(function(t){T(t),D(t,n)})),T(t),D(t,n)},IFRAME:function(t,n){N(t,"src",b(t,n.data_src))},VIDEO:function(t,n){!function(t,e){C(t).forEach((function(t){N(t,"src",b(t,n.data_src))}))}(t),N(t,"poster",b(t,n.data_poster)),N(t,"src",b(t,n.data_src)),t.load()}},P=function(t,n){var e=F[t.tagName];e&&e(t,n)},S=function(t,n,e){x(e,1),L(t,n.class_loading),h(t,l),A(n.callback_loading,t,e)},U=["IMG","IFRAME","VIDEO"],$=function(t,n){!n||function(t){return t.loadingCount>0}(n)||function(t){return t.toLoadCount>0}(n)||A(t.callback_finish,n)},q=function(t,n,e){t.addEventListener(n,e),t.llEvLisnrs[n]=e},H=function(t,n,e){t.removeEventListener(n,e)},B=function(t){return!!t.llEvLisnrs},J=function(t){if(B(t)){var n=t.llEvLisnrs;for(var e in n){var i=n[e];H(t,e,i)}delete t.llEvLisnrs}},K=function(t,n,e){!function(t){delete t.llTempImage}(t),x(e,-1),function(t){t&&(t.toLoadCount-=1)}(e),w(t,n.class_loading),n.unobserve_completed&&O(t,e)},Q=function(t,n,e){var i=k(t)||t;B(i)||function(t,n,e){B(t)||(t.llEvLisnrs={});var i="VIDEO"===t.tagName?"loadeddata":"load";q(t,i,n),q(t,"error",e)}(i,(function(o){!function(t,n,e,i){var o=y(n);K(n,e,i),L(n,e.class_loaded),h(n,u),A(e.callback_loaded,n,i),o||$(e,i)}(0,t,n,e),J(i)}),(function(o){!function(t,n,e,i){var o=y(n);K(n,e,i),L(n,e.class_error),h(n,f),A(e.callback_error,n,i),o||$(e,i)}(0,t,n,e),J(i)}))},W=function(t,n,e){!function(t){t.llTempImage=document.createElement("IMG")}(t),Q(t,n,e),function(t,n,e){var i=b(t,n.data_bg),o=b(t,n.data_bg_hidpi),a=r&&o?o:i;a&&(t.style.backgroundImage='url("'.concat(a,'")'),k(t).setAttribute("src",a),S(t,n,e))}(t,n,e),function(t,n,e){var i=b(t,n.data_bg_multi),o=b(t,n.data_bg_multi_hidpi),a=r&&o?o:i;a&&(t.style.backgroundImage=a,function(t,n,e){L(t,n.class_applied),h(t,d),n.unobserve_completed&&O(t,n),A(n.callback_applied,t,e)}(t,n,e))}(t,n,e)},X=function(t,n,e){!function(t){return U.indexOf(t.tagName)>-1}(t)?W(t,n,e):function(t,n,e){Q(t,n,e),P(t,n),S(t,n,e)}(t,n,e)},Y=["IMG","IFRAME","VIDEO"],Z=function(t){return t.use_native&&"loading"in HTMLImageElement.prototype},tt=function(t,n,e){t.forEach((function(t){return function(t){return t.isIntersecting||t.intersectionRatio>0}(t)?function(t,n,e,i){var o=function(t){return I.indexOf(p(t))>=0}(t);h(t,"entered"),L(t,e.class_entered),w(t,e.class_exited),function(t,n,e){n.unobserve_entered&&O(t,e)}(t,e,i),A(e.callback_enter,t,n,i),o||X(t,e,i)}(t.target,t,n,e):function(t,n,e,i){E(t)||(L(t,e.class_exited),function(t,n,e,i){e.cancel_on_exit&&function(t){return p(t)===l}(t)&&"IMG"===t.tagName&&(J(t),function(t){j(t,(function(t){V(t)})),V(t)}(t),function(t){j(t,(function(t){G(t)})),G(t)}(t),w(t,e.class_loading),x(i,-1),m(t),A(e.callback_cancel,t,n,i))}(t,n,e,i),A(e.callback_exit,t,n,i))}(t.target,t,n,e)}))},nt=function(t){return Array.prototype.slice.call(t)},et=function(t){return t.container.querySelectorAll(t.elements_selector)},it=function(t){return function(t){return p(t)===f}(t)},ot=function(t,n){return function(t){return nt(t).filter(E)}(t||et(n))},rt=function(t,e){var o=c(t);this._settings=o,this.loadingCount=0,function(t,n){i&&!Z(t)&&(n._observer=new IntersectionObserver((function(e){tt(e,t,n)}),function(t){return{root:t.container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}}(t)))}(o,this),function(t,e){n&&window.addEventListener("online",(function(){!function(t,n){var e;(e=et(t),nt(e).filter(it)).forEach((function(n){w(n,t.class_error),m(n)})),n.update()}(t,e)}))}(o,this),this.update(e)};return rt.prototype={update:function(t){var n,o,r=this._settings,a=ot(t,r);z(this,a.length),!e&&i?Z(r)?function(t,n,e){t.forEach((function(t){-1!==Y.indexOf(t.tagName)&&function(t,n,e){t.setAttribute("loading","lazy"),Q(t,n,e),P(t,n),h(t,_)}(t,n,e)})),z(e,0)}(a,r,this):(o=a,function(t){t.disconnect()}(n=this._observer),function(t,n){n.forEach((function(n){t.observe(n)}))}(n,o)):this.loadAll(a)},destroy:function(){this._observer&&this._observer.disconnect(),et(this._settings).forEach((function(t){delete t.llOriginalAttrs})),delete this._observer,delete this._settings,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){var n=this,e=this._settings;ot(t,e).forEach((function(t){O(t,n),X(t,e,n)}))}},rt.load=function(t,n){var e=c(n);X(t,e)},rt.resetStatus=function(t){m(t)},n&&function(t,n){if(n)if(n.length)for(var e,i=0;e=n[i];i+=1)s(t,e);else s(t,n)}(rt,window.lazyLoadOptions),rt})); !function(C,n,A,S){"use strict";n=void 0!==n&&n.Math==Math?n:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),C.fn.transition=function(){var u,r=C(this),p=r.selector||"",g=(new Date).getTime(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||n.msRequestAnimationFrame;return r.each(function(t){var d,s,e,c,i,a,n,o,m,f=C(this),l=this;(m={initialize:function(){d=m.get.settings.apply(l,b),c=d.className,e=d.error,i=d.metadata,o="."+d.namespace,n="module-"+d.namespace,s=f.data(n)||m,a=m.get.animationEndEvent(),w&&(w=m.invoke(y)),!1===w&&(m.verbose("Converted arguments into settings object",d),d.interval?m.delay(d.animate):m.animate(),m.instantiate())},instantiate:function(){m.verbose("Storing instance of module",m),s=m,f.data(n,s)},destroy:function(){m.verbose("Destroying previous module for",l),f.removeData(n)},refresh:function(){m.verbose("Refreshing display type on next animation"),delete m.displayType},forceRepaint:function(){m.verbose("Forcing element repaint");var n=f.parent(),e=f.next();0===e.length?f.detach().appendTo(n):f.detach().insertBefore(e)},repaint:function(){m.verbose("Repainting element");l.offsetWidth},delay:function(n){var e,i=m.get.animationDirection();i||(i=m.can.transition()?m.get.direction():"static"),n=n!==S?n:d.interval,e="auto"==d.reverse&&i==c.outward||1==d.reverse?(r.length-t)*d.interval:t*d.interval,m.debug("Delaying animation by",e),setTimeout(m.animate,e)},animate:function(n){if(d=n||d,!m.is.supported())return m.error(e.support),!1;if(m.debug("Preparing animation",d.animation),m.is.animating()){if(d.queue)return!d.allowRepeats&&m.has.direction()&&m.is.occurring()&&!0!==m.queuing?m.debug("Animation is currently occurring, preventing queueing same animation",d.animation):m.queue(d.animation),!1;if(!d.allowRepeats&&m.is.occurring())return m.debug("Animation is already occurring, will not execute repeated animation",d.animation),!1;m.debug("New animation started, completing previous early",d.animation),s.complete()}m.can.animate()?m.set.animating(d.animation):m.error(e.noAnimation,d.animation,l)},reset:function(){m.debug("Resetting animation to beginning conditions"),m.remove.animationCallbacks(),m.restore.conditions(),m.remove.animating()},queue:function(n){m.debug("Queueing animation of",n),m.queuing=!0,f.one(a+".queue"+o,function(){m.queuing=!1,m.repaint(),m.animate.apply(this,d)})},complete:function(n){m.debug("Animation complete",d.animation),m.remove.completeCallback(),m.remove.failSafe(),m.is.looping()||(m.is.outward()?(m.verbose("Animation is outward, hiding element"),m.restore.conditions(),m.hide()):m.is.inward()?(m.verbose("Animation is outward, showing element"),m.restore.conditions(),m.show()):(m.verbose("Static animation completed"),m.restore.conditions(),d.onComplete.call(l)))},force:{visible:function(){var n=f.attr("style"),e=m.get.userStyle(),i=m.get.displayType(),t=e+"display: "+i+" !important;",a=f.css("display"),o=n===S||""===n;a!==i?(m.verbose("Overriding default display to show element",i),f.attr("style",t)):o&&f.removeAttr("style")},hidden:function(){var n=f.attr("style"),e=f.css("display"),i=n===S||""===n;"none"===e||m.is.hidden()?i&&f.removeAttr("style"):(m.verbose("Overriding default display to hide element"),f.css("display","none"))}},has:{direction:function(n){var i=!1;return"string"==typeof(n=n||d.animation)&&(n=n.split(" "),C.each(n,function(n,e){e!==c.inward&&e!==c.outward||(i=!0)})),i},inlineDisplay:function(){var n=f.attr("style")||"";return C.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){var e;m.remove.completeCallback(),n=n||d.animation,e=m.get.animationClass(n),m.save.animation(e),m.force.visible(),m.remove.hidden(),m.remove.direction(),m.start.animation(e)},duration:function(n,e){((e="number"==typeof(e=e||d.duration)?e+"ms":e)||0===e)&&(m.verbose("Setting animation duration",e),f.css({"animation-duration":e}))},direction:function(n){(n=n||m.get.direction())==c.inward?m.set.inward():m.set.outward()},looping:function(){m.debug("Transition set to loop"),f.addClass(c.looping)},hidden:function(){f.addClass(c.transition).addClass(c.hidden)},inward:function(){m.debug("Setting direction to inward"),f.removeClass(c.outward).addClass(c.inward)},outward:function(){m.debug("Setting direction to outward"),f.removeClass(c.inward).addClass(c.outward)},visible:function(){f.addClass(c.transition).addClass(c.visible)}},start:{animation:function(n){n=n||m.get.animationClass(),m.debug("Starting tween",n),f.addClass(n).one(a+".complete"+o,m.complete),d.useFailSafe&&m.add.failSafe(),m.set.duration(d.duration),d.onStart.call(l)}},save:{animation:function(n){m.cache||(m.cache={}),m.cache.animation=n},displayType:function(n){"none"!==n&&f.data(i.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,m.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=m.get.currentAnimation();n&&(f.removeClass(n),m.verbose("Removing animation class",m.cache)),m.remove.duration()}},add:{failSafe:function(){var n=m.get.duration();m.timer=setTimeout(function(){f.triggerHandler(a)},n+d.failSafeDelay),m.verbose("Adding fail safe timer",m.timer)}},remove:{animating:function(){f.removeClass(c.animating)},animationCallbacks:function(){m.remove.queueCallback(),m.remove.completeCallback()},queueCallback:function(){f.off(".queue"+o)},completeCallback:function(){f.off(".complete"+o)},display:function(){f.css("display","")},direction:function(){f.removeClass(c.inward).removeClass(c.outward)},duration:function(){f.css("animation-duration","")},failSafe:function(){m.verbose("Removing fail safe timer",m.timer),m.timer&&clearTimeout(m.timer)},hidden:function(){f.removeClass(c.hidden)},visible:function(){f.removeClass(c.visible)},looping:function(){m.debug("Transitions are no longer looping"),m.is.looping()&&(m.reset(),f.removeClass(c.looping))},transition:function(){f.removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?C.extend(!0,{},C.fn.transition.settings,n):"function"==typeof i?C.extend({},C.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?C.extend({},C.fn.transition.settings,e,{animation:n}):"function"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,onComplete:e}):C.extend({},C.fn.transition.settings,{animation:n})},animationClass:function(n){var e=n||d.animation,i=m.can.transition()&&!m.has.direction()?m.get.direction()+" ":"";return c.animating+" "+c.transition+" "+i+e},currentAnimation:function(){return!(!m.cache||m.cache.animation===S)&&m.cache.animation},currentDirection:function(){return m.is.inward()?c.inward:c.outward},direction:function(){return m.is.hidden()||!m.is.visible()?c.inward:c.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||d.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===c.inward?i=c.inward:e===c.outward&&(i=c.outward)})),i||!1},duration:function(n){return!1===(n=n||d.duration)&&(n=f.css("animation-duration")||0),"string"==typeof n?-1").addClass(e).insertAfter(f)).addClass(s).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),o=t.addClass(c.inward).css("animationName"),u||(u=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),m.verbose("Determining final display state",u),m.save.displayType(u)),t.remove(),a!=o)m.debug("Direction exists for animation",s),r=!0;else{if("none"==a||!a)return void m.debug("No animation defined in css",s);m.debug("Static animation found",s,u),r=!1}m.save.transitionExists(s,r)}return l!==S?l:r},animate:function(){return m.can.transition()!==S}},is:{animating:function(){return f.hasClass(c.animating)},inward:function(){return f.hasClass(c.inward)},outward:function(){return f.hasClass(c.outward)},looping:function(){return f.hasClass(c.looping)},occurring:function(n){return n="."+(n=n||d.animation).replace(" ","."),0").html(a).attr("data-"+b.value,t).attr("data-"+b.text,t).addClass(g.addition).addClass(g.item),h.hideAdditions&&i.addClass(g.hidden),n=n===J?i:n.add(i),m.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=m.get.userValues();t&&(m.debug("Adding user labels",t),X.each(t,function(e,t){m.verbose("Adding custom user value"),m.add.label(t,t)}))},menu:function(){q=X("
").addClass(g.menu).appendTo(S)},sizer:function(){k=X("").addClass(g.sizer).insertAfter(T)}},search:function(e){e=e!==J?e:m.get.query(),m.verbose("Searching for query",e),m.has.minCharacters(e)?m.filter(e):m.hide()},select:{firstUnfiltered:function(){m.verbose("Selecting first non-filtered element"),m.remove.selectedItem(),R.not(w.unselectable).not(w.addition+w.hidden).eq(0).addClass(g.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(w.item).not(w.unselectable).eq(0),n=e.prevAll(w.item).not(w.unselectable).eq(0);0").addClass(g.search).prop("autocomplete","off").insertBefore(A)),m.is.multiple()&&m.is.searchSelection()&&!m.has.sizer()&&m.create.sizer(),h.allowTab&&m.set.tabbable()},select:function(){var e=m.get.selectValues();m.debug("Dropdown initialized on a select",e),S.is("select")&&(L=S),0").attr("class",L.attr("class")).addClass(g.selection).addClass(g.dropdown).html(f.dropdown(e)).insertBefore(L),L.hasClass(g.multiple)&&!1===L.prop("multiple")&&(m.error(v.missingMultiple),L.prop("multiple",!0)),L.is("[multiple]")&&m.set.multiple(),L.prop("disabled")&&(m.debug("Disabling dropdown"),S.addClass(g.disabled)),L.removeAttr("class").detach().prependTo(S)),m.refresh()},menu:function(e){q.html(f.menu(e,l)),R=q.find(w.item)},reference:function(){m.debug("Dropdown behavior was called on select, replacing with closest dropdown"),S=S.parent(w.dropdown),F=S.data(C),M=S.get(0),m.refresh(),m.setup.returnedObject()},returnedObject:function(){var e=H.slice(0,n),t=H.slice(n+1);H=e.add(S).add(t)}},refresh:function(){m.refreshSelectors(),m.refreshData()},refreshItems:function(){R=q.find(w.item)},refreshSelectors:function(){m.verbose("Refreshing selector cache"),A=S.find(w.text),T=S.find(w.search),L=S.find(w.input),I=S.find(w.icon),D=0 modified, recreating menu");var n=!1;X.each(e,function(e,t){if(X(t.target).is("select")||X(t.addedNodes).is("select"))return n=!0}),n&&(m.disconnect.selectObserver(),m.refresh(),m.setup.select(),m.set.selected(),m.observe.select())}},menu:{mutation:function(e){var t=e[0],n=t.addedNodes?X(t.addedNodes[0]):X(!1),i=t.removedNodes?X(t.removedNodes[0]):X(!1),a=n.add(i),o=a.is(w.addition)||0t.name?1:-1}),m.debug("Retrieved and sorted values from select",a)):m.debug("Retrieved values from select",a),a},activeItem:function(){return R.filter("."+g.active)},selectedItem:function(){var e=R.not(w.unselectable).filter("."+g.selected);return 0=h.maxSelections?(m.debug("Maximum selection count reached"),h.useLabels&&(R.addClass(g.filtered),m.add.message(c.maxSelections)),!0):(m.verbose("No longer at maximum selection count"),m.remove.message(),m.remove.filteredItem(),m.is.searchSelection()&&m.filterItems(),!1))}},restore:{defaults:function(){m.clear(),m.restore.defaultText(),m.restore.defaultValue()},defaultText:function(){var e=m.get.defaultText();e===m.get.placeholderText?(m.debug("Restoring default placeholder text",e),m.set.placeholderText(e)):(m.debug("Restoring default text",e),m.set.text(e))},placeholderText:function(){m.set.placeholderText()},defaultValue:function(){var e=m.get.defaultValue();e!==J&&(m.debug("Restoring default value",e),""!==e?(m.set.value(e),m.set.selected()):(m.remove.activeItem(),m.remove.selectedItem()))},labels:function(){h.allowAdditions&&(h.useLabels||(m.error(v.labels),h.useLabels=!0),m.debug("Restoring selected values"),m.create.userLabels()),m.check.maxSelections()},selected:function(){m.restore.values(),m.is.multiple()?(m.debug("Restoring previously selected values and labels"),m.restore.labels()):m.debug("Restoring previously selected values")},values:function(){m.set.initialLoad(),h.apiSettings&&h.saveRemoteData&&m.get.remoteValues()?m.restore.remoteValues():m.set.selected(),m.remove.initialLoad()},remoteValues:function(){var e=m.get.remoteValues();m.debug("Recreating selected from session data",e),e&&(m.is.single()?X.each(e,function(e,t){m.set.text(t)}):X.each(e,function(e,t){m.add.label(e,t)}))}},read:{remoteData:function(e){var t;if(Y.Storage!==J)return(t=sessionStorage.getItem(e))!==J&&t;m.error(v.noStorage)}},save:{defaults:function(){m.save.defaultText(),m.save.placeholderText(),m.save.defaultValue()},defaultValue:function(){var e=m.get.value();m.verbose("Saving default value as",e),S.data(b.defaultValue,e)},defaultText:function(){var e=m.get.text();m.verbose("Saving default text as",e),S.data(b.defaultText,e)},placeholderText:function(){var e;!1!==h.placeholder&&A.hasClass(g.placeholder)&&(e=m.get.text(),m.verbose("Saving placeholder text as",e),S.data(b.placeholderText,e))},remoteData:function(e,t){Y.Storage!==J?(m.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):m.error(v.noStorage)}},clear:function(){m.is.multiple()&&h.useLabels?m.remove.labels():(m.remove.activeItem(),m.remove.selectedItem()),m.set.placeholderText(),m.clearValue()},clearValue:function(){m.set.value("")},scrollPage:function(e,t){var n,i,a=t||m.get.selectedItem(),o=a.closest(w.menu),s=o.outerHeight(),r=o.scrollTop(),l=R.eq(0).outerHeight(),c=Math.floor(s/l),u=(o.prop("scrollHeight"),"up"==e?r-l*c:r+l*c),d=R.not(w.unselectable);i="up"==e?d.index(a)-c:d.index(a)+c,0<(n=("up"==e?0<=i:i").addClass(g.label).attr("data-"+b.value,o).html(f.label(o,t)),i=h.onLabelCreate.call(i,o,t),m.has.label(e)?m.debug("User selection already exists, skipping",o):(h.label.variation&&i.addClass(h.label.variation),!0===n?(m.debug("Animating in label",i),i.addClass(g.hidden).insertBefore(a).transition(h.label.transition,h.label.duration)):(m.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=q.children(w.message),n=h.templates.message(m.add.variables(e));0").html(n).addClass(g.message).appendTo(q)},optionValue:function(e){var t=m.escape.value(e);0").prop("value",t).addClass(g.addition).html(e).appendTo(L),m.verbose("Adding user addition as an
"),b.shortnames&&(a=e.shortnameToUnicode(a)),A(a,b.emojiTemplate).replace(/\t/g,"    ").replace(/ /g,"  ")}function C(a,b){switch(a=a.replace(/ /g,"\n").replace(/ /g,"\t").replace(/]*alt="([^"]+)"[^>]*>/gi,"$1").replace(/\n|\r/g,"").replace(/]*>/gi,"\n").replace(/(?:<(?:div|p|ol|ul|li|pre|code|object)[^>]*>)+/gi,"
").replace(/(?:<\/(?:div|p|ol|ul|li|pre|code|object)>)+/gi,"
").replace(/\n
<\/div>/gi,"\n").replace(/
<\/div>\n/gi,"\n").replace(/(?:
)+<\/div>/gi,"\n").replace(/([^\n])<\/div>
/gi,"$1\n").replace(/(?:<\/div>)+/gi,"
").replace(/([^\n])<\/div>([^\n])/gi,"$1\n$2").replace(/<\/div>/gi,"").replace(/([^\n])
/gi,"$1\n").replace(/\n
/gi,"\n").replace(/
\n/gi,"\n\n").replace(/<(?:[^>]+)?>/g,"").replace(new RegExp(l,"g"),"").replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/`/g,"`").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),b.saveEmojisAs){case"image":a=A(a,b.emojiTemplate);break;case"shortname":a=e.toShort(a)}return a}function D(){var a=this,b=a.editor[0].offsetWidth-a.editor[0].clientWidth,c=parseInt(a.button.css("marginRight"));c!==b&&(a.button.css({marginRight:b}),a.floatingPicker&&a.picker.css({right:parseInt(a.picker.css("right"))-c+b}))}function E(){var b=this;if(!b.sprite&&b.lasyEmoji[0]&&b.lasyEmoji.eq(0).is(".lazy-emoji")){var c=b.picker.offset().top,d=c+b.picker.height()+20;b.lasyEmoji.each(function(){var b=a(this),e=b.offset().top;if(e>c&&ed)return!1}),b.lasyEmoji=b.lasyEmoji.filter(".lazy-emoji")}}function F(a,b){return(b?"":".")+j+(a?"-"+a:"")}function G(b){var c=a("
",s(b)?b:{"class":F(b,!0)});return a.each(i.call(arguments).slice(1),function(b,d){a.isFunction(d)&&(d=d.call(c)),d&&a(d).appendTo(c)}),c}function H(){return localStorage.getItem("recent_emojis")||""}function I(b,c){var d=H();if(!b.recent||b.recent!==d||c){if(d.length){var e=b.scrollArea.is(".skinnable"),f,g;e||(f=b.scrollArea.scrollTop(),c&&b.recentCategory.show(),g=b.recentCategory.is(":visible")?b.recentCategory.height():0);var h=p(d,b.emojiBtnTemplate,!0).split("|").join("");if(b.recentCategory.children(".emojibtn").remove(),a(h).insertAfter(b.recentCategory.children(".emojionearea-category-title")),b.recentCategory.children(".emojibtn").on("click",function(){b.trigger("emojibtn.click",a(this))}),b.recentFilter.show(),!e){b.recentCategory.show();var i=b.recentCategory.height();g!==i&&b.scrollArea.scrollTop(f+i-g)}}else b.recentFilter.hasClass("active")&&b.recentFilter.removeClass("active").next().addClass("active"),b.recentCategory.hide(),b.recentFilter.hide();b.recent=d}}function J(a,b){var c=H(),d=c.split("|"),e=d.indexOf(b);e!==-1&&d.splice(e,1),d.unshift(b),d.length>9&&d.pop(),localStorage.setItem("recent_emojis",d.join("|")),I(a)}function K(){var a="test";try{return localStorage.setItem(a,a),localStorage.removeItem(a),!0}catch(b){return!1}}function L(b,c,d){b.options=d=w(d),b.sprite=d.sprite&&k<3,b.inline=null===d.inline?c.is("INPUT"):d.inline,b.shortnames=d.shortnames,b.saveEmojisAs=d.saveEmojisAs,b.standalone=d.standalone,b.emojiTemplate='{alt}':'emoji" src="{img}"/>'),b.emojiTemplateAlt=b.sprite?'':'',b.emojiBtnTemplate=''+b.emojiTemplateAlt+"",b.recentEmojis=d.recentEmojis&&K();var f=d.pickerPosition;b.floatingPicker="top"===f||"bottom"===f,b.source=c,(c.is(":disabled")||c.is(".disabled"))&&b.disable();var g=c.is("TEXTAREA")||c.is("INPUT")?"val":"text",i,o,r,t,u,v,z,A,L,M,N=G("tones",d.tones?function(){this.addClass(F("tones-"+d.tonesStyle,!0));for(var b=0;b<=5;b++)this.append(a("",{"class":"btn-tone btn-tone-"+b+(b?"":" active"),"data-skin":b,role:"button"}))}:null),O=G({"class":j+(b.standalone?" "+j+"-standalone ":" ")+(c.attr("class")||""),role:"application"},i=b.editor=G("editor").attr({contenteditable:!b.standalone,placeholder:d.placeholder||c.data("placeholder")||c.attr("placeholder")||"",tabindex:0}),o=b.button=G("button",G("button-open"),G("button-close")).attr("title",d.buttonTitle),r=b.picker=G("picker",G("wrapper",t=G("filters"),d.search?v=G("search-panel",G("search",d.search?function(){b.search=a("",{placeholder:d.searchPlaceholder||"",type:"text","class":"search"}),this.append(b.search)}:null),N):null,M=G("scroll-area",d.tones&&!d.search?G("tones-panel",N):null,z=G("emojis-list")))).addClass(F("picker-position-"+d.pickerPosition,!0)).addClass(F("filters-position-"+d.filtersPosition,!0)).addClass(F("search-position-"+d.searchPosition,!0)).addClass("hidden"));d.search&&v.addClass(F("with-search",!0)),b.searchSel=null,i.data(c.data()),a.each(d.attributes,function(a,b){i.attr(a,b)});var P=G("category-block").attr({"data-tone":0}).prependTo(z);if(a.each(d.filters,function(c,e){var f=0;if("recent"!==c||b.recentEmojis){if("tones"!==c)a("",{"class":F("filter",!0)+" "+F("filter-"+c,!0),"data-filter":c,title:e.title}).wrapInner(p(e.icon,b.emojiTemplateAlt)).appendTo(t);else{if(!d.tones)return;f=5}do{var g,h=e.emoji.replace(/[\s,;]+/g,"|");g=0===f?G("category").attr({name:c,"data-tone":f}).appendTo(P):G("category-block").attr({name:c,"data-tone":f}).appendTo(z),f>0&&(g.hide(),h=h.split("|").join("_tone"+f+"|")+"_tone"+f),"recent"===c&&(h=H()),h=p(h,b.sprite?'':'',!0).split("|").join(""),g.html(h),a('
').text(e.title).prependTo(g)}while(--f>0)}}),d.filters=null,b.sprite||(b.lasyEmoji=z.find(".lazy-emoji")),u=t.find(F("filter")),u.eq(0).addClass("active"),L=z.find(F("category-block")),A=z.find(F("category")),b.recentFilter=u.filter('[data-filter="recent"]'),b.recentCategory=A.filter("[name=recent]"),b.scrollArea=M,d.container?a(d.container).wrapInner(O):O.insertAfter(c),d.hideSource&&c.hide(),b.setText(c[g]()),c[g](b.getText()),D.apply(b),b.standalone&&!b.getText().length){var Q=a(c).data("emoji-placeholder")||d.emojiPlaceholder;b.setText(Q),i.addClass("has-placeholder")}n(b,z.find(".emojibtn"),{click:"emojibtn.click"}),n(b,window,{resize:"!resize"}),n(b,N.children(),{click:"tone.click"}),n(b,[r,o],{mousedown:"!mousedown"},i),n(b,o,{click:"button.click"}),n(b,i,{paste:"!paste"},i),n(b,i,["focus","blur"],function(){return!b.stayFocused&&i}),n(b,r,{mousedown:"picker.mousedown",mouseup:"picker.mouseup",click:"picker.click",keyup:"picker.keyup",keydown:"picker.keydown",keypress:"picker.keypress"}),n(b,i,["mousedown","mouseup","click","keyup","keydown","keypress"]),n(b,r.find(".emojionearea-filter"),{click:"filter.click"}),n(b,c,{change:"source.change"}),d.search&&n(b,b.search,{keyup:"search.keypress",focus:"search.focus",blur:"search.blur"});var R=!1;if(M.on("scroll",function(){if(!R&&(E.call(b),M.is(":not(.skinnable)"))){var c=A.eq(0),d=M.offset().top;A.each(function(b,e){return!(a(e).offset().top-d>=10)&&void(c=a(e))});var e=u.filter('[data-filter="'+c.attr("name")+'"]');e[0]&&!e.is(".active")&&(u.removeClass("active"),e.addClass("active"))}}),b.on("@filter.click",function(a){var c=a.is(".active");if(M.is(".skinnable")){if(c)return;N.children().eq(0).click()}R=!0,c||(u.filter(".active").removeClass("active"),a.addClass("active"));var d=A.filter('[name="'+a.data("filter")+'"]').offset().top,e=M.scrollTop(),f=M.offset().top;M.stop().animate({scrollTop:d+e-f-2},200,"swing",function(){E.call(b),R=!1})}).on("@picker.show",function(){b.recentEmojis&&I(b),E.call(b)}).on("@tone.click",function(a){N.children().removeClass("active");var c=a.addClass("active").data("skin");c?(M.addClass("skinnable"),L.hide().filter("[data-tone="+c+"]").show(),u.removeClass("active")):(M.removeClass("skinnable"),L.hide().filter("[data-tone=0]").show(),u.eq(0).click()),E.call(b),d.search&&b.trigger("search.keypress")}).on("@button.click",function(a){a.is(".active")?b.hidePicker():(b.showPicker(),b.searchSel=null)}).on("@!paste",function(c,d){var e=function(d){var e="caret-"+(new Date).getTime(),f=B(d,b);q(f),q(''),c.scrollTop(h);var g=a("#"+e),i=g.offset().top-c.offset().top,j=c.height();(h+i>=j||h>i)&&c.scrollTop(h+i-2*j/3),g.remove(),b.stayFocused=!1,D.apply(b),m(b,"paste",[c,d,f])};if(d.originalEvent.clipboardData){var f=d.originalEvent.clipboardData.getData("text/plain");return e(f),d.preventDefault?d.preventDefault():d.stop(),d.returnValue=!1,d.stopPropagation(),!1}b.stayFocused=!0,q(""+l+"");var g=x(c[0]),h=c.scrollTop(),i=a("
",{contenteditable:!0}).css({position:"fixed",left:"-999px",width:"1px",height:"1px",top:"20px",overflow:"hidden"}).appendTo(a("BODY")).focus();window.setTimeout(function(){c.focus(),y(c[0],g);var a=C(i.html().replace(/\r\n|\n|\r/g,"
"),b);i.remove(),e(a)},200)}).on("@emojibtn.click",function(a){i.removeClass("has-placeholder"),null!==b.searchSel&&(i.focus(),y(i[0],b.searchSel),b.searchSel=null),b.standalone?(i.html(p(a.data("name"),b.emojiTemplate)),b.trigger("blur")):(x(i[0]),q(p(a.data("name"),b.emojiTemplate))),b.recentEmojis&&J(b,a.data("name")),b.trigger("search.keypress")}).on("@!resize @keyup @emojibtn.click",D).on("@!mousedown",function(c,d){return a(d.target).hasClass("search")?(b.stayFocused=!0,null===b.searchSel&&(b.searchSel=x(c[0]))):(O.is(".focused")||c.trigger("focus"),d.preventDefault()),!1}).on("@change",function(){var a=b.editor.html().replace(/<\/?(?:div|span|p)[^>]*>/gi,"");a.length&&!/^]*>$/i.test(a)||b.editor.html(b.content=""),c[g](b.getText())}).on("@source.change",function(){b.setText(c[g]()),m("change")}).on("@focus",function(){O.addClass("focused")}).on("@blur",function(){O.removeClass("focused"),d.hidePickerOnBlur&&b.hidePicker();var a=b.editor.html();b.content!==a?(b.content=a,m(b,"change",[b.editor]),c.trigger("blur").trigger("change")):c.trigger("blur"),d.search&&(b.search.val(""),b.trigger("search.keypress",!0))}),d.search&&b.on("@search.focus",function(){b.stayFocused=!0,b.search.addClass("focused")}).on("@search.keypress",function(c){var e=r.find(".emojionearea-filter"),f=d.tones?N.find("i.active").data("skin"):0,g=b.search.val().replace(/ /g,"_").replace(/"/g,'\\"');g&&g.length?(b.recentFilter.hasClass("active")&&b.recentFilter.removeClass("active").next().addClass("active"),b.recentCategory.hide(),b.recentFilter.hide(),L.each(function(){var b=function(a,b){var c=a.find('.emojibtn[data-name*="'+g+'"]');if(0===c.length)a.data("tone")===b&&a.hide(),e.filter('[data-filter="'+a.attr("name")+'"]').hide();else{var d=a.find('.emojibtn:not([data-name*="'+g+'"])');d.hide(),c.show(),a.data("tone")===b&&a.show(),e.filter('[data-filter="'+a.attr("name")+'"]').show()}},c=a(this);0===c.data("tone")?A.filter(':not([name="recent"])').each(function(){b(a(this),0)}):b(c,f)}),R?E.call(b):M.trigger("scroll")):(I(b,!0),L.filter('[data-tone="'+N.find("i.active").data("skin")+'"]:not([name="recent"])').show(),a(".emojibtn",L).show(),e.show(),E.call(b))}).on("@search.blur",function(){b.stayFocused=!1,b.search.removeClass("focused"),b.trigger("blur")}),d.shortcuts&&b.on("@keydown",function(a,c){c.ctrlKey||(9==c.which?(c.preventDefault(),o.click()):27==c.which&&(c.preventDefault(),o.is(".active")&&b.hidePicker()))}),s(d.events)&&!a.isEmptyObject(d.events)&&a.each(d.events,function(a,c){b.on(a.replace(/_/g,"."),c)}),d.autocomplete){var S=function(){var c={maxCount:d.textcomplete.maxCount,placement:d.textcomplete.placement};d.shortcuts&&(c.onKeydown=function(a,b){if(!a.ctrlKey&&13==a.which)return b.KEY_ENTER});var f=a.map(e.emojioneList,function(a,b){return d.autocompleteTones?b:/_tone[12345]/.test(b)?null:b});f.sort(),i.textcomplete([{id:j,match:/\B(:[\-+\w]*)$/,search:function(b,c){c(a.map(f,function(a){return 0===a.indexOf(b)?a:null}))},template:function(a){return p(a,b.emojiTemplate)+" "+a.replace(/:/g,"")},replace:function(a){return p(a,b.emojiTemplate)},cache:!0,index:1}],c),d.textcomplete.placement&&"static"==a(i.data("textComplete").option.appendTo).css("position")&&a(i.data("textComplete").option.appendTo).css("position","relative")},T=function(){if(b.disabled){var a=function(){b.off("enabled",a),S()};b.on("enabled",a)}else S()};a.fn.textcomplete?T():a.ajax({url:"https://cdn.rawgit.com/yuku-t/jquery-textcomplete/v1.3.4/dist/jquery.textcomplete.js",dataType:"script",cache:!0,success:T})}b.inline&&(O.addClass(F("inline",!0)),b.on("@keydown",function(a,b){13==b.which&&b.preventDefault()})),/firefox/i.test(navigator.userAgent)&&document.execCommand("enableObjectResizing",!1,!1),b.isReady=!0,b.trigger("onLoad",i),b.trigger("ready",i)}var M={defaultBase:"https://cdnjs.cloudflare.com/ajax/libs/emojione/",defaultBase3:"https://cdn.jsdelivr.net/",base:null,isLoading:!1};function N(b){var c=r();if(b=w(b),!M.isLoading)if(!e||u(t(e))<2){M.isLoading=!0;var d;d=u(c)>5?M.defaultBase3+"npm/emojione@"+c:u(c)>4?M.defaultBase3+"emojione/"+c:M.defaultBase+"/"+c,a.ajax({url:d+"/lib/js/emojione.min.js",dataType:"script",cache:!0,success:function(){e=window.emojione,c=t(e),k=u(c);var d;k>4?(M.base=M.defaultBase3+"emojione/assets/"+c,d=M.base+"/sprites/emojione-sprite-"+e.emojiSize+".css"):(M.base=M.defaultBase+c+"/assets",d=M.base+"/sprites/emojione.sprites.css"),b.sprite&&(document.createStyleSheet?document.createStyleSheet(d):a("",{rel:"stylesheet",href:d}).appendTo("head"));while(f.length)f.shift().call();M.isLoading=!1}})}else c=t(e),k=u(c),k>4?M.base=M.defaultBase3+"emojione/assets/"+c:M.base=M.defaultBase+c+"/assets";g(function(){var a="";b.useInternalCDN&&(k>4&&(a=e.emojiSize+"/"),e.imagePathPNG=M.base+"/png/"+a,e.imagePathSVG=M.base+"/svg/"+a,e.imagePathSVGSprites=M.base+"/sprites/emojione.sprites.svg",e.imageType=b.imageType),u(c)>4?(z=e.regUnicode,e.imageType=b.imageType||"png"):z=new RegExp("]*>.*?|]*>.*?|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+e.unicodeRegexp+")","gi")})}var O=function(a,e){var f=this;N(e),c[f.id=++b]={},d[f.id]={},g(function(){L(f,a,e)})};function P(b,c){c=c.replace(/^@/,"");var e=b.id;d[e][c]&&(a.each(d[e][c],function(d,e){a.each(a.isArray(e[0])?e[0]:[e[0]],function(d,f){a(f).on(e[1],function(){var d=i.call(arguments),f=a.isFunction(e[2])?e[2].apply(b,[c].concat(d)):e[2];f&&m(b,c,[f].concat(d))})})}),d[e][c]=null)}O.prototype.on=function(b,d){if(b&&a.isFunction(d)){var e=this;a.each(b.toLowerCase().split(" "),function(a,b){P(e,b),(c[e.id][b]||(c[e.id][b]=[])).push(d)})}return this},O.prototype.off=function(b,d){if(b){var e=this.id;a.each(b.toLowerCase().replace(/_/g,".").split(" "),function(b,f){c[e][f]&&!/^@/.test(f)&&(d?a.each(c[e][f],function(a,b){b===d&&(c[e][f]=c[e][f].splice(a,1))}):c[e][f]=[])})}return this},O.prototype.trigger=function(){var a=i.call(arguments),b=[this].concat(a.slice(0,1));return b.push(a.slice(1)),m.apply(this,b)},O.prototype.setFocus=function(){var a=this;return g(function(){a.editor.focus()}),a},O.prototype.setText=function(a){var b=this;return g(function(){b.editor.html(B(a,b)),b.content=b.editor.html(),m(b,"change",[b.editor]),D.apply(b)}),b},O.prototype.getText=function(){return C(this.editor.html(),this)},O.prototype.showPicker=function(){var a=this;return a._sh_timer&&window.clearTimeout(a._sh_timer),a.picker.removeClass("hidden"),a._sh_timer=window.setTimeout(function(){a.button.addClass("active")},50),m(a,"picker.show",[a.picker]),a},O.prototype.hidePicker=function(){var a=this;return a._sh_timer&&window.clearTimeout(a._sh_timer),a.button.removeClass("active"),a._sh_timer=window.setTimeout(function(){a.picker.addClass("hidden")},500),m(a,"picker.hide",[a.picker]),a},O.prototype.enable=function(){var a=this,b=function(){a.disabled=!1,a.editor.prop("contenteditable",!0),a.button.show();var b=a[a.standalone?"button":"editor"];b.parent().removeClass("emojionearea-disable"),m(a,"enabled",[b])};return a.isReady?b():a.on("ready",b),a},O.prototype.disable=function(){var a=this;a.disabled=!0;var b=function(){a.editor.prop("contenteditable",!1),a.hidePicker(),a.button.hide();var b=a[a.standalone?"button":"editor"];b.parent().addClass("emojionearea-disable"),m(a,"disabled",[b])};return a.isReady?b():a.on("ready",b),a},a.fn.emojioneArea=function(b){return this.each(function(){return this.emojioneArea?this.emojioneArea:(a.data(this,"emojioneArea",this.emojioneArea=new O(a(this),b)),this.emojioneArea)})},a.fn.emojioneArea.defaults=v(),a.fn.emojioneAreaText=function(b){b=w(b);var c=this,d={shortnames:!b||"undefined"==typeof b.shortnames||b.shortnames,emojiTemplate:'{alt}'};return N(b),g(function(){c.each(function(){var b=a(this);return b.hasClass("emojionearea-text")||b.addClass("emojionearea-text").html(B(b.is("TEXTAREA")||b.is("INPUT")?b.val():b.text(),d)),b})}),this}},window); //# sourceMappingURL=emojionearea.min.map // Ion.RangeSlider, 2.3.0, © Denis Ineshin, 2010 - 2018, IonDen.com, Build date: 2018-12-11 23:11:14 !function(i){!jQuery&&"function"==typeof define&&define.amd?define(["jquery"],function(t){return i(t,document,window,navigator)}):jQuery||"object"!=typeof exports?i(jQuery,document,window,navigator):i(require("jquery"),document,window,navigator)}(function(a,c,l,t,_){"use strict";var i,s,o=0,e=(i=t.userAgent,s=/msie\s\d+/i,0>>0;if(0===e)return-1;var h=+i||0;if(Math.abs(h)===1/0&&(h=0),e<=h)return-1;for(s=Math.max(0<=h?h:e-Math.abs(h),0);s!",r[0]),(e={skin:r.data("skin"),type:r.data("type"),min:r.data("min"),max:r.data("max"),from:r.data("from"),to:r.data("to"),step:r.data("step"),min_interval:r.data("minInterval"),max_interval:r.data("maxInterval"),drag_interval:r.data("dragInterval"),values:r.data("values"),from_fixed:r.data("fromFixed"),from_min:r.data("fromMin"),from_max:r.data("fromMax"),from_shadow:r.data("fromShadow"),to_fixed:r.data("toFixed"),to_min:r.data("toMin"),to_max:r.data("toMax"),to_shadow:r.data("toShadow"),prettify_enabled:r.data("prettifyEnabled"),prettify_separator:r.data("prettifySeparator"),force_edges:r.data("forceEdges"),keyboard:r.data("keyboard"),grid:r.data("grid"),grid_margin:r.data("gridMargin"),grid_num:r.data("gridNum"),grid_snap:r.data("gridSnap"),hide_min_max:r.data("hideMinMax"),hide_from_to:r.data("hideFromTo"),prefix:r.data("prefix"),postfix:r.data("postfix"),max_postfix:r.data("maxPostfix"),decorate_both:r.data("decorateBoth"),values_separator:r.data("valuesSeparator"),input_values_separator:r.data("inputValuesSeparator"),disable:r.data("disable"),block:r.data("block"),extra_classes:r.data("extraClasses")}).values=e.values&&e.values.split(","),e)e.hasOwnProperty(h)&&(e[h]!==_&&""!==e[h]||delete e[h]);n!==_&&""!==n&&((n=n.split(e.input_values_separator||i.input_values_separator||";"))[0]&&n[0]==+n[0]&&(n[0]=+n[0]),n[1]&&n[1]==+n[1]&&(n[1]=+n[1]),i&&i.values&&i.values.length?(o.from=n[0]&&i.values.indexOf(n[0]),o.to=n[1]&&i.values.indexOf(n[1])):(o.from=n[0]&&+n[0],o.to=n[1]&&+n[1])),a.extend(o,i),a.extend(o,e),this.options=o,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};h.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,i=this.options.max,s=this.options.from,o=this.options.to;t'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),e&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),e&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var i,s;this.target||(i=(s="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,i+=s.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:i}))},pointerMove:function(t){if(this.dragging){var i=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=i-this.coords.x_gap,this.calc()}},pointerUp:function(t){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,e&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],t.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&("both"===t&&this.setTempMinInterval(),t||(t=this.target||"from"),this.current_plugin=this.plugin_count,this.target=t,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=s-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(t),e&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(s-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,i){if(!(this.current_plugin!==this.plugin_count||i.altKey||i.ctrlKey||i.shiftKey||i.metaKey)){switch(i.which){case 83:case 65:case 40:case 37:i.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:i.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var i=this.coords.p_pointer,s=(this.options.max-this.options.min)/100;s=this.options.step/s,t?i+=s:i-=s,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*i),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),i=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=i,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(i,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var i=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,i=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,i=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(i)),this.target){case"base":var s=(this.options.max-this.options.min)/100,o=(this.result.from-this.options.min)/s,e=(this.result.to-this.options.min)/s;this.coords.p_single_real=this.toFixed(o),this.coords.p_from_real=this.toFixed(o),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(i),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(i),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(i),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_realthis.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return i<0?i=0:t100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{s=h?(this.options.decorate_both?(t=this.decorate(r[this.result.from]),t+=this.options.values_separator,t+=this.decorate(r[this.result.to])):t=this.decorate(r[this.result.from]+this.options.values_separator+r[this.result.to]),i=this.decorate(r[this.result.from]),this.decorate(r[this.result.to])):(o=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(o,this.result.from),t+=this.options.values_separator,t+=this.decorate(e,this.result.to)):t=this.decorate(o+this.options.values_separator+e,this.result.to),i=this.decorate(o,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s),this.calcLabels();var n=Math.min(this.labels.p_single_left,this.labels.p_from_left),a=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,l=Math.max(a,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",l=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),n100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,i,s,o,e=this.options,h=this.$cache,r="number"==typeof e.from_min&&!isNaN(e.from_min),n="number"==typeof e.from_max&&!isNaN(e.from_max),a="number"==typeof e.to_min&&!isNaN(e.to_min),c="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_single[0].style.display="block",h.shad_single[0].style.left=t+"%",h.shad_single[0].style.width=i+"%"):h.shad_single[0].style.display="none":(e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_from[0].style.display="block",h.shad_from[0].style.left=t+"%",h.shad_from[0].style.width=i+"%"):h.shad_from[0].style.display="none",e.to_shadow&&(a||c)?(s=this.convertToPercent(a?e.to_min:e.min),o=this.convertToPercent(c?e.to_max:e.max)-s,s=this.toFixed(s-this.coords.p_handle/100*s),o=this.toFixed(o-this.coords.p_handle/100*o),s+=this.coords.p_handle/2,h.shad_to[0].style.display="block",h.shad_to[0].style.left=s+"%",h.shad_to[0].style.width=o+"%"):h.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,i){var s,o=this.options.max-this.options.min,e=o/100;return o?(s=(i?t:t-this.options.min)/e,this.toFixed(s)):(this.no_diapason=!0,0)},convertToValue:function(t){var i,s,o=this.options.min,e=this.options.max,h=o.toString().split(".")[1],r=e.toString().split(".")[1],n=0,a=0;if(0===t)return this.options.min;if(100===t)return this.options.max;h&&(n=i=h.length),r&&(n=s=r.length),i&&s&&(n=s<=i?i:s),o<0&&(o=+(o+(a=Math.abs(o))).toFixed(n),e=+(e+a).toFixed(n));var c,l=(e-o)/100*t+o,_=this.options.step.toString().split(".")[1];return l=_?+l.toFixed(_.length):(l/=this.options.step,+(l*=this.options.step).toFixed(0)),a&&(l-=a),(c=_?+l.toFixed(_.length):this.toFixed(l))this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var i=Math.round(t/this.coords.p_step)*this.coords.p_step;return 100h.max_interval&&(o=e-h.max_interval):o-e>h.max_interval&&(o=e+h.max_interval),this.convertToPercent(o)):t},checkDiapason:function(t,i,s){var o=this.convertToValue(t),e=this.options;return"number"!=typeof i&&(i=e.min),"number"!=typeof s&&(s=e.max),os.max&&(s.from=s.max)):(s.froms.max&&(s.from=s.max),s.tos.max&&(s.to=s.max),this.update_check.from&&(this.update_check.from!==s.from&&s.from>s.to&&(s.from=s.to),this.update_check.to!==s.to&&s.tos.to&&(s.from=s.to),s.tos.from_max&&(s.from=s.from_max),"number"==typeof s.to_min&&s.tos.to_max&&(s.to=s.to_max),o&&(o.min!==s.min&&(o.min=s.min),o.max!==s.max&&(o.max=s.max),(o.fromo.max)&&(o.from=s.from),(o.too.max)&&(o.to=s.to)),("number"!=typeof s.min_interval||isNaN(s.min_interval)||!s.min_interval||s.min_interval<0)&&(s.min_interval=0),("number"!=typeof s.max_interval||isNaN(s.max_interval)||!s.max_interval||s.max_interval<0)&&(s.max_interval=0),s.min_interval&&s.min_interval>s.max-s.min&&(s.min_interval=s.max-s.min),s.max_interval&&s.max_interval>s.max-s.min&&(s.max_interval=s.max-s.min)},decorate:function(t,i){var s="",o=this.options;return o.prefix&&(s+=o.prefix),s+=t,o.max_postfix&&(o.values.length&&t===o.p_values[o.max]?(s+=o.max_postfix,o.postfix&&(s+=" ")):i===o.max&&(s+=o.max_postfix,o.postfix&&(s+=" "))),o.postfix&&(s+=o.postfix),s},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,i,s,o,e,h,r=this.options,n=r.max-r.min,a=r.grid_num,c=0,l=4,_="";for(this.calcGridMargin(),r.grid_snap&&(a=n/r.step),50';_+='',h=this.convertToValue(c),_+=''+(h=r.values.length?r.p_values[h]:this._prettify(h))+""}this.coords.big_num=Math.ceil(a+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(_),this.cacheGridLabels()}},cacheGridLabels:function(){var t,i,s=this.coords.big_num;for(i=0;i100+this.coords.grid_gap&&(o[e-1]=100+this.coords.grid_gap,s[e-1]=this.toFixed(o[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,s,o),this.calcGridCollision(4,s,o),t=0;t")) { var o = "div"; for (0 === n.indexOf(":~]/) ? (t || f).querySelectorAll(e.trim()) : [f.getElementById(e.trim().split("#")[1])], i = 0; i < s.length; i += 1) s[i] && a.push(s[i]) } else if (e.nodeType || e === Y || e === f) a.push(e); else if (0 < e.length && e[0].nodeType) for (i = 0; i < e.length; i += 1) a.push(e[i]); return new l(a) } function r(e) { for (var t = [], a = 0; a < e.length; a += 1) - 1 === t.indexOf(e[a]) && t.push(e[a]); return t } L.fn = l.prototype, L.Class = l, L.Dom7 = l; var t = { addClass: function(e) { if (void 0 === e) return this; for (var t = e.split(" "), a = 0; a < t.length; a += 1) for (var i = 0; i < this.length; i += 1) void 0 !== this[i] && void 0 !== this[i].classList && this[i].classList.add(t[a]); return this }, removeClass: function(e) { for (var t = e.split(" "), a = 0; a < t.length; a += 1) for (var i = 0; i < this.length; i += 1) void 0 !== this[i] && void 0 !== this[i].classList && this[i].classList.remove(t[a]); return this }, hasClass: function(e) { return !!this[0] && this[0].classList.contains(e) }, toggleClass: function(e) { for (var t = e.split(" "), a = 0; a < t.length; a += 1) for (var i = 0; i < this.length; i += 1) void 0 !== this[i] && void 0 !== this[i].classList && this[i].classList.toggle(t[a]); return this }, attr: function(e, t) { var a = arguments; if (1 === arguments.length && "string" == typeof e) return this[0] ? this[0].getAttribute(e) : void 0; for (var i = 0; i < this.length; i += 1) if (2 === a.length) this[i].setAttribute(e, t); else for (var s in e) this[i][s] = e[s], this[i].setAttribute(s, e[s]); return this }, removeAttr: function(e) { for (var t = 0; t < this.length; t += 1) this[t].removeAttribute(e); return this }, data: function(e, t) { var a; if (void 0 !== t) { for (var i = 0; i < this.length; i += 1)(a = this[i]).dom7ElementDataStorage || (a.dom7ElementDataStorage = {}), a.dom7ElementDataStorage[e] = t; return this } if (a = this[0]) { if (a.dom7ElementDataStorage && e in a.dom7ElementDataStorage) return a.dom7ElementDataStorage[e]; var s = a.getAttribute("data-" + e); return s || void 0 } }, transform: function(e) { for (var t = 0; t < this.length; t += 1) { var a = this[t].style; a.webkitTransform = e, a.transform = e } return this }, transition: function(e) { "string" != typeof e && (e += "ms"); for (var t = 0; t < this.length; t += 1) { var a = this[t].style; a.webkitTransitionDuration = e, a.transitionDuration = e } return this }, on: function() { for (var e, t = [], a = arguments.length; a--;) t[a] = arguments[a]; var i = t[0], r = t[1], n = t[2], s = t[3]; function o(e) { var t = e.target; if (t) { var a = e.target.dom7EventData || []; if (a.indexOf(e) < 0 && a.unshift(e), L(t).is(r)) n.apply(t, a); else for (var i = L(t).parents(), s = 0; s < i.length; s += 1) L(i[s]).is(r) && n.apply(i[s], a) } } function l(e) { var t = e && e.target && e.target.dom7EventData || []; t.indexOf(e) < 0 && t.unshift(e), n.apply(this, t) } "function" == typeof t[1] && (i = (e = t)[0], n = e[1], s = e[2], r = void 0), s || (s = !1); for (var d, p = i.split(" "), c = 0; c < this.length; c += 1) { var u = this[c]; if (r) for (d = 0; d < p.length; d += 1) { var h = p[d]; u.dom7LiveListeners || (u.dom7LiveListeners = {}), u.dom7LiveListeners[h] || (u.dom7LiveListeners[h] = []), u.dom7LiveListeners[h].push({ listener: n, proxyListener: o }), u.addEventListener(h, o, s) } else for (d = 0; d < p.length; d += 1) { var v = p[d]; u.dom7Listeners || (u.dom7Listeners = {}), u.dom7Listeners[v] || (u.dom7Listeners[v] = []), u.dom7Listeners[v].push({ listener: n, proxyListener: l }), u.addEventListener(v, l, s) } } return this }, off: function() { for (var e, t = [], a = arguments.length; a--;) t[a] = arguments[a]; var i = t[0], s = t[1], r = t[2], n = t[3]; "function" == typeof t[1] && (i = (e = t)[0], r = e[1], n = e[2], s = void 0), n || (n = !1); for (var o = i.split(" "), l = 0; l < o.length; l += 1) for (var d = o[l], p = 0; p < this.length; p += 1) { var c = this[p], u = void 0; if (!s && c.dom7Listeners ? u = c.dom7Listeners[d] : s && c.dom7LiveListeners && (u = c.dom7LiveListeners[d]), u && u.length) for (var h = u.length - 1; 0 <= h; h -= 1) { var v = u[h]; r && v.listener === r ? (c.removeEventListener(d, v.proxyListener, n), u.splice(h, 1)) : r || (c.removeEventListener(d, v.proxyListener, n), u.splice(h, 1)) } } return this }, trigger: function() { for (var e = [], t = arguments.length; t--;) e[t] = arguments[t]; for (var a = e[0].split(" "), i = e[1], s = 0; s < a.length; s += 1) for (var r = a[s], n = 0; n < this.length; n += 1) { var o = this[n], l = void 0; try { l = new Y.CustomEvent(r, { detail: i, bubbles: !0, cancelable: !0 }) } catch (e) { (l = f.createEvent("Event")).initEvent(r, !0, !0), l.detail = i } o.dom7EventData = e.filter(function(e, t) { return 0 < t }), o.dispatchEvent(l), o.dom7EventData = [], delete o.dom7EventData } return this }, transitionEnd: function(t) { var a, i = ["webkitTransitionEnd", "transitionend"], s = this; function r(e) { if (e.target === this) for (t.call(this, e), a = 0; a < i.length; a += 1) s.off(i[a], r) } if (t) for (a = 0; a < i.length; a += 1) s.on(i[a], r); return this }, outerWidth: function(e) { if (0 < this.length) { if (e) { var t = this.styles(); return this[0].offsetWidth + parseFloat(t.getPropertyValue("margin-right")) + parseFloat(t.getPropertyValue("margin-left")) } return this[0].offsetWidth } return null }, outerHeight: function(e) { if (0 < this.length) { if (e) { var t = this.styles(); return this[0].offsetHeight + parseFloat(t.getPropertyValue("margin-top")) + parseFloat(t.getPropertyValue("margin-bottom")) } return this[0].offsetHeight } return null }, offset: function() { if (0 < this.length) { var e = this[0], t = e.getBoundingClientRect(), a = f.body, i = e.clientTop || a.clientTop || 0, s = e.clientLeft || a.clientLeft || 0, r = e === Y ? Y.scrollY : e.scrollTop, n = e === Y ? Y.scrollX : e.scrollLeft; return { top: t.top + r - i, left: t.left + n - s } } return null }, css: function(e, t) { var a; if (1 === arguments.length) { if ("string" != typeof e) { for (a = 0; a < this.length; a += 1) for (var i in e) this[a].style[i] = e[i]; return this } if (this[0]) return Y.getComputedStyle(this[0], null).getPropertyValue(e) } if (2 === arguments.length && "string" == typeof e) { for (a = 0; a < this.length; a += 1) this[a].style[e] = t; return this } return this }, each: function(e) { if (!e) return this; for (var t = 0; t < this.length; t += 1) if (!1 === e.call(this[t], t, this[t])) return this; return this }, html: function(e) { if (void 0 === e) return this[0] ? this[0].innerHTML : void 0; for (var t = 0; t < this.length; t += 1) this[t].innerHTML = e; return this }, text: function(e) { if (void 0 === e) return this[0] ? this[0].textContent.trim() : null; for (var t = 0; t < this.length; t += 1) this[t].textContent = e; return this }, is: function(e) { var t, a, i = this[0]; if (!i || void 0 === e) return !1; if ("string" == typeof e) { if (i.matches) return i.matches(e); if (i.webkitMatchesSelector) return i.webkitMatchesSelector(e); if (i.msMatchesSelector) return i.msMatchesSelector(e); for (t = L(e), a = 0; a < t.length; a += 1) if (t[a] === i) return !0; return !1 } if (e === f) return i === f; if (e === Y) return i === Y; if (e.nodeType || e instanceof l) { for (t = e.nodeType ? [e] : e, a = 0; a < t.length; a += 1) if (t[a] === i) return !0; return !1 } return !1 }, index: function() { var e, t = this[0]; if (t) { for (e = 0; null !== (t = t.previousSibling);) 1 === t.nodeType && (e += 1); return e } }, eq: function(e) { if (void 0 === e) return this; var t, a = this.length; return new l(a - 1 < e ? [] : e < 0 ? (t = a + e) < 0 ? [] : [this[t]] : [this[e]]) }, append: function() { for (var e, t = [], a = arguments.length; a--;) t[a] = arguments[a]; for (var i = 0; i < t.length; i += 1) { e = t[i]; for (var s = 0; s < this.length; s += 1) if ("string" == typeof e) { var r = f.createElement("div"); for (r.innerHTML = e; r.firstChild;) this[s].appendChild(r.firstChild) } else if (e instanceof l) for (var n = 0; n < e.length; n += 1) this[s].appendChild(e[n]); else this[s].appendChild(e) } return this }, prepend: function(e) { var t, a; for (t = 0; t < this.length; t += 1) if ("string" == typeof e) { var i = f.createElement("div"); for (i.innerHTML = e, a = i.childNodes.length - 1; 0 <= a; a -= 1) this[t].insertBefore(i.childNodes[a], this[t].childNodes[0]) } else if (e instanceof l) for (a = 0; a < e.length; a += 1) this[t].insertBefore(e[a], this[t].childNodes[0]); else this[t].insertBefore(e, this[t].childNodes[0]); return this }, next: function(e) { return 0 < this.length ? e ? this[0].nextElementSibling && L(this[0].nextElementSibling).is(e) ? new l([this[0].nextElementSibling]) : new l([]) : this[0].nextElementSibling ? new l([this[0].nextElementSibling]) : new l([]) : new l([]) }, nextAll: function(e) { var t = [], a = this[0]; if (!a) return new l([]); for (; a.nextElementSibling;) { var i = a.nextElementSibling; e ? L(i).is(e) && t.push(i) : t.push(i), a = i } return new l(t) }, prev: function(e) { if (0 < this.length) { var t = this[0]; return e ? t.previousElementSibling && L(t.previousElementSibling).is(e) ? new l([t.previousElementSibling]) : new l([]) : t.previousElementSibling ? new l([t.previousElementSibling]) : new l([]) } return new l([]) }, prevAll: function(e) { var t = [], a = this[0]; if (!a) return new l([]); for (; a.previousElementSibling;) { var i = a.previousElementSibling; e ? L(i).is(e) && t.push(i) : t.push(i), a = i } return new l(t) }, parent: function(e) { for (var t = [], a = 0; a < this.length; a += 1) null !== this[a].parentNode && (e ? L(this[a].parentNode).is(e) && t.push(this[a].parentNode) : t.push(this[a].parentNode)); return L(r(t)) }, parents: function(e) { for (var t = [], a = 0; a < this.length; a += 1) for (var i = this[a].parentNode; i;) e ? L(i).is(e) && t.push(i) : t.push(i), i = i.parentNode; return L(r(t)) }, closest: function(e) { var t = this; return void 0 === e ? new l([]) : (t.is(e) || (t = t.parents(e).eq(0)), t) }, find: function(e) { for (var t = [], a = 0; a < this.length; a += 1) for (var i = this[a].querySelectorAll(e), s = 0; s < i.length; s += 1) t.push(i[s]); return new l(t) }, children: function(e) { for (var t = [], a = 0; a < this.length; a += 1) for (var i = this[a].childNodes, s = 0; s < i.length; s += 1) e ? 1 === i[s].nodeType && L(i[s]).is(e) && t.push(i[s]) : 1 === i[s].nodeType && t.push(i[s]); return new l(r(t)) }, remove: function() { for (var e = 0; e < this.length; e += 1) this[e].parentNode && this[e].parentNode.removeChild(this[e]); return this }, add: function() { for (var e = [], t = arguments.length; t--;) e[t] = arguments[t]; var a, i; for (a = 0; a < e.length; a += 1) { var s = L(e[a]); for (i = 0; i < s.length; i += 1) this[this.length] = s[i], this.length += 1 } return this }, styles: function() { return this[0] ? Y.getComputedStyle(this[0], null) : {} } }; Object.keys(t).forEach(function(e) { L.fn[e] = t[e] }); var e, a, i, V = { deleteProps: function(e) { var t = e; Object.keys(t).forEach(function(e) { try { t[e] = null } catch (e) {} try { delete t[e] } catch (e) {} }) }, nextTick: function(e, t) { return void 0 === t && (t = 0), setTimeout(e, t) }, now: function() { return Date.now() }, getTranslate: function(e, t) { var a, i, s; void 0 === t && (t = "x"); var r = Y.getComputedStyle(e, null); return Y.WebKitCSSMatrix ? (6 < (i = r.transform || r.webkitTransform).split(",").length && (i = i.split(", ").map(function(e) { return e.replace(",", ".") }).join(", ")), s = new Y.WebKitCSSMatrix("none" === i ? "" : i)) : a = (s = r.MozTransform || r.OTransform || r.MsTransform || r.msTransform || r.transform || r.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,")).toString().split(","), "x" === t && (i = Y.WebKitCSSMatrix ? s.m41 : 16 === a.length ? parseFloat(a[12]) : parseFloat(a[4])), "y" === t && (i = Y.WebKitCSSMatrix ? s.m42 : 16 === a.length ? parseFloat(a[13]) : parseFloat(a[5])), i || 0 }, parseUrlQuery: function(e) { var t, a, i, s, r = {}, n = e || Y.location.href; if ("string" == typeof n && n.length) for (s = (a = (n = -1 < n.indexOf("?") ? n.replace(/\S*\?/, "") : "").split("&").filter(function(e) { return "" !== e })).length, t = 0; t < s; t += 1) i = a[t].replace(/#\S+/g, "").split("="), r[decodeURIComponent(i[0])] = void 0 === i[1] ? void 0 : decodeURIComponent(i[1]) || ""; return r }, isObject: function(e) { return "object" == typeof e && null !== e && e.constructor && e.constructor === Object }, extend: function() { for (var e = [], t = arguments.length; t--;) e[t] = arguments[t]; for (var a = Object(e[0]), i = 1; i < e.length; i += 1) { var s = e[i]; if (null != s) for (var r = Object.keys(Object(s)), n = 0, o = r.length; n < o; n += 1) { var l = r[n], d = Object.getOwnPropertyDescriptor(s, l); void 0 !== d && d.enumerable && (V.isObject(a[l]) && V.isObject(s[l]) ? V.extend(a[l], s[l]) : !V.isObject(a[l]) && V.isObject(s[l]) ? (a[l] = {}, V.extend(a[l], s[l])) : a[l] = s[l]) } } return a } }, F = (i = f.createElement("div"), { touch: Y.Modernizr && !0 === Y.Modernizr.touch || !!("ontouchstart" in Y || Y.DocumentTouch && f instanceof Y.DocumentTouch), pointerEvents: !!(Y.navigator.pointerEnabled || Y.PointerEvent || "maxTouchPoints" in Y.navigator), prefixedPointerEvents: !!Y.navigator.msPointerEnabled, transition: (a = i.style, "transition" in a || "webkitTransition" in a || "MozTransition" in a), transforms3d: Y.Modernizr && !0 === Y.Modernizr.csstransforms3d || (e = i.style, "webkitPerspective" in e || "MozPerspective" in e || "OPerspective" in e || "MsPerspective" in e || "perspective" in e), flexbox: function() { for (var e = i.style, t = "alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "), a = 0; a < t.length; a += 1) if (t[a] in e) return !0; return !1 }(), observer: "MutationObserver" in Y || "WebkitMutationObserver" in Y, passiveListener: function() { var e = !1; try { var t = Object.defineProperty({}, "passive", { get: function() { e = !0 } }); Y.addEventListener("testPassiveListener", null, t) } catch (e) {} return e }(), gestures: "ongesturestart" in Y }), s = function(e) { void 0 === e && (e = {}); var t = this; t.params = e, t.eventsListeners = {}, t.params && t.params.on && Object.keys(t.params.on).forEach(function(e) { t.on(e, t.params.on[e]) }) }, n = { components: { configurable: !0 } }; s.prototype.on = function(e, t, a) { var i = this; if ("function" != typeof t) return i; var s = a ? "unshift" : "push"; return e.split(" ").forEach(function(e) { i.eventsListeners[e] || (i.eventsListeners[e] = []), i.eventsListeners[e][s](t) }), i }, s.prototype.once = function(i, s, e) { var r = this; if ("function" != typeof s) return r; return r.on(i, function e() { for (var t = [], a = arguments.length; a--;) t[a] = arguments[a]; s.apply(r, t), r.off(i, e) }, e) }, s.prototype.off = function(e, i) { var s = this; return s.eventsListeners && e.split(" ").forEach(function(a) { void 0 === i ? s.eventsListeners[a] = [] : s.eventsListeners[a] && s.eventsListeners[a].length && s.eventsListeners[a].forEach(function(e, t) { e === i && s.eventsListeners[a].splice(t, 1) }) }), s }, s.prototype.emit = function() { for (var e = [], t = arguments.length; t--;) e[t] = arguments[t]; var a, i, s, r = this; return r.eventsListeners && ("string" == typeof e[0] || Array.isArray(e[0]) ? (a = e[0], i = e.slice(1, e.length), s = r) : (a = e[0].events, i = e[0].data, s = e[0].context || r), (Array.isArray(a) ? a : a.split(" ")).forEach(function(e) { if (r.eventsListeners && r.eventsListeners[e]) { var t = []; r.eventsListeners[e].forEach(function(e) { t.push(e) }), t.forEach(function(e) { e.apply(s, i) }) } })), r }, s.prototype.useModulesParams = function(a) { var i = this; i.modules && Object.keys(i.modules).forEach(function(e) { var t = i.modules[e]; t.params && V.extend(a, t.params) }) }, s.prototype.useModules = function(i) { void 0 === i && (i = {}); var s = this; s.modules && Object.keys(s.modules).forEach(function(e) { var a = s.modules[e], t = i[e] || {}; a.instance && Object.keys(a.instance).forEach(function(e) { var t = a.instance[e]; s[e] = "function" == typeof t ? t.bind(s) : t }), a.on && s.on && Object.keys(a.on).forEach(function(e) { s.on(e, a.on[e]) }), a.create && a.create.bind(s)(t) }) }, n.components.set = function(e) { this.use && this.use(e) }, s.installModule = function(t) { for (var e = [], a = arguments.length - 1; 0 < a--;) e[a] = arguments[a + 1]; var i = this; i.prototype.modules || (i.prototype.modules = {}); var s = t.name || Object.keys(i.prototype.modules).length + "_" + V.now(); return (i.prototype.modules[s] = t).proto && Object.keys(t.proto).forEach(function(e) { i.prototype[e] = t.proto[e] }), t.static && Object.keys(t.static).forEach(function(e) { i[e] = t.static[e] }), t.install && t.install.apply(i, e), i }, s.use = function(e) { for (var t = [], a = arguments.length - 1; 0 < a--;) t[a] = arguments[a + 1]; var i = this; return Array.isArray(e) ? (e.forEach(function(e) { return i.installModule(e) }), i) : i.installModule.apply(i, [e].concat(t)) }, Object.defineProperties(s, n); var o = { updateSize: function() { var e, t, a = this, i = a.$el; e = void 0 !== a.params.width ? a.params.width : i[0].clientWidth, t = void 0 !== a.params.height ? a.params.height : i[0].clientHeight, 0 === e && a.isHorizontal() || 0 === t && a.isVertical() || (e = e - parseInt(i.css("padding-left"), 10) - parseInt(i.css("padding-right"), 10), t = t - parseInt(i.css("padding-top"), 10) - parseInt(i.css("padding-bottom"), 10), V.extend(a, { width: e, height: t, size: a.isHorizontal() ? e : t })) }, updateSlides: function() { var e = this, t = e.params, a = e.$wrapperEl, i = e.size, s = e.rtlTranslate, r = e.wrongRTL, n = e.virtual && t.virtual.enabled, o = n ? e.virtual.slides.length : e.slides.length, l = a.children("." + e.params.slideClass), d = n ? e.virtual.slides.length : l.length, p = [], c = [], u = [], h = t.slidesOffsetBefore; "function" == typeof h && (h = t.slidesOffsetBefore.call(e)); var v = t.slidesOffsetAfter; "function" == typeof v && (v = t.slidesOffsetAfter.call(e)); var f = e.snapGrid.length, m = e.snapGrid.length, g = t.spaceBetween, b = -h, w = 0, y = 0; if (void 0 !== i) { var x, T; "string" == typeof g && 0 <= g.indexOf("%") && (g = parseFloat(g.replace("%", "")) / 100 * i), e.virtualSize = -g, s ? l.css({ marginLeft: "", marginTop: "" }) : l.css({ marginRight: "", marginBottom: "" }), 1 < t.slidesPerColumn && (x = Math.floor(d / t.slidesPerColumn) === d / e.params.slidesPerColumn ? d : Math.ceil(d / t.slidesPerColumn) * t.slidesPerColumn, "auto" !== t.slidesPerView && "row" === t.slidesPerColumnFill && (x = Math.max(x, t.slidesPerView * t.slidesPerColumn))); for (var E, S = t.slidesPerColumn, C = x / S, M = C - (t.slidesPerColumn * C - d), k = 0; k < d; k += 1) { T = 0; var P = l.eq(k); if (1 < t.slidesPerColumn) { var z = void 0, $ = void 0, L = void 0; "column" === t.slidesPerColumnFill ? (L = k - ($ = Math.floor(k / S)) * S, (M < $ || $ === M && L === S - 1) && S <= (L += 1) && (L = 0, $ += 1), z = $ + L * x / S, P.css({ "-webkit-box-ordinal-group": z, "-moz-box-ordinal-group": z, "-ms-flex-order": z, "-webkit-order": z, order: z })) : $ = k - (L = Math.floor(k / C)) * C, P.css("margin-" + (e.isHorizontal() ? "top" : "left"), 0 !== L && t.spaceBetween && t.spaceBetween + "px").attr("data-swiper-column", $).attr("data-swiper-row", L) } if ("none" !== P.css("display")) { if ("auto" === t.slidesPerView) { var I = Y.getComputedStyle(P[0], null), D = P[0].style.transform, O = P[0].style.webkitTransform; D && (P[0].style.transform = "none"), O && (P[0].style.webkitTransform = "none"), T = t.roundLengths ? e.isHorizontal() ? P.outerWidth(!0) : P.outerHeight(!0) : e.isHorizontal() ? parseFloat(I.getPropertyValue("width")) + parseFloat(I.getPropertyValue("margin-left")) + parseFloat(I.getPropertyValue("margin-right")) : parseFloat(I.getPropertyValue("height")) + parseFloat(I.getPropertyValue("margin-top")) + parseFloat(I.getPropertyValue("margin-bottom")), D && (P[0].style.transform = D), O && (P[0].style.webkitTransform = O), t.roundLengths && (T = Math.floor(T)) } else T = (i - (t.slidesPerView - 1) * g) / t.slidesPerView, t.roundLengths && (T = Math.floor(T)), l[k] && (e.isHorizontal() ? l[k].style.width = T + "px" : l[k].style.height = T + "px"); l[k] && (l[k].swiperSlideSize = T), u.push(T), t.centeredSlides ? (b = b + T / 2 + w / 2 + g, 0 === w && 0 !== k && (b = b - i / 2 - g), 0 === k && (b = b - i / 2 - g), Math.abs(b) < .001 && (b = 0), t.roundLengths && (b = Math.floor(b)), y % t.slidesPerGroup == 0 && p.push(b), c.push(b)) : (t.roundLengths && (b = Math.floor(b)), y % t.slidesPerGroup == 0 && p.push(b), c.push(b), b = b + T + g), e.virtualSize += T + g, w = T, y += 1 } } if (e.virtualSize = Math.max(e.virtualSize, i) + v, s && r && ("slide" === t.effect || "coverflow" === t.effect) && a.css({ width: e.virtualSize + t.spaceBetween + "px" }), F.flexbox && !t.setWrapperSize || (e.isHorizontal() ? a.css({ width: e.virtualSize + t.spaceBetween + "px" }) : a.css({ height: e.virtualSize + t.spaceBetween + "px" })), 1 < t.slidesPerColumn && (e.virtualSize = (T + t.spaceBetween) * x, e.virtualSize = Math.ceil(e.virtualSize / t.slidesPerColumn) - t.spaceBetween, e.isHorizontal() ? a.css({ width: e.virtualSize + t.spaceBetween + "px" }) : a.css({ height: e.virtualSize + t.spaceBetween + "px" }), t.centeredSlides)) { E = []; for (var A = 0; A < p.length; A += 1) { var N = p[A]; t.roundLengths && (N = Math.floor(N)), p[A] < e.virtualSize + p[0] && E.push(N) } p = E } if (!t.centeredSlides) { E = []; for (var H = 0; H < p.length; H += 1) { var G = p[H]; t.roundLengths && (G = Math.floor(G)), p[H] <= e.virtualSize - i && E.push(G) } p = E, 1 < Math.floor(e.virtualSize - i) - Math.floor(p[p.length - 1]) && p.push(e.virtualSize - i) } if (0 === p.length && (p = [0]), 0 !== t.spaceBetween && (e.isHorizontal() ? s ? l.css({ marginLeft: g + "px" }) : l.css({ marginRight: g + "px" }) : l.css({ marginBottom: g + "px" })), t.centerInsufficientSlides) { var B = 0; if (u.forEach(function(e) { B += e + (t.spaceBetween ? t.spaceBetween : 0) }), (B -= t.spaceBetween) < i) { var X = (i - B) / 2; p.forEach(function(e, t) { p[t] = e - X }), c.forEach(function(e, t) { c[t] = e + X }) } } V.extend(e, { slides: l, snapGrid: p, slidesGrid: c, slidesSizesGrid: u }), d !== o && e.emit("slidesLengthChange"), p.length !== f && (e.params.watchOverflow && e.checkOverflow(), e.emit("snapGridLengthChange")), c.length !== m && e.emit("slidesGridLengthChange"), (t.watchSlidesProgress || t.watchSlidesVisibility) && e.updateSlidesOffset() } }, updateAutoHeight: function(e) { var t, a = this, i = [], s = 0; if ("number" == typeof e ? a.setTransition(e) : !0 === e && a.setTransition(a.params.speed), "auto" !== a.params.slidesPerView && 1 < a.params.slidesPerView) for (t = 0; t < Math.ceil(a.params.slidesPerView); t += 1) { var r = a.activeIndex + t; if (r > a.slides.length) break; i.push(a.slides.eq(r)[0]) } else i.push(a.slides.eq(a.activeIndex)[0]); for (t = 0; t < i.length; t += 1) if (void 0 !== i[t]) { var n = i[t].offsetHeight; s = s < n ? n : s } s && a.$wrapperEl.css("height", s + "px") }, updateSlidesOffset: function() { for (var e = this.slides, t = 0; t < e.length; t += 1) e[t].swiperSlideOffset = this.isHorizontal() ? e[t].offsetLeft : e[t].offsetTop }, updateSlidesProgress: function(e) { void 0 === e && (e = this && this.translate || 0); var t = this, a = t.params, i = t.slides, s = t.rtlTranslate; if (0 !== i.length) { void 0 === i[0].swiperSlideOffset && t.updateSlidesOffset(); var r = -e; s && (r = e), i.removeClass(a.slideVisibleClass), t.visibleSlidesIndexes = [], t.visibleSlides = []; for (var n = 0; n < i.length; n += 1) { var o = i[n], l = (r + (a.centeredSlides ? t.minTranslate() : 0) - o.swiperSlideOffset) / (o.swiperSlideSize + a.spaceBetween); if (a.watchSlidesVisibility) { var d = -(r - o.swiperSlideOffset), p = d + t.slidesSizesGrid[n]; (0 <= d && d < t.size || 0 < p && p <= t.size || d <= 0 && p >= t.size) && (t.visibleSlides.push(o), t.visibleSlidesIndexes.push(n), i.eq(n).addClass(a.slideVisibleClass)) } o.progress = s ? -l : l } t.visibleSlides = L(t.visibleSlides) } }, updateProgress: function(e) { void 0 === e && (e = this && this.translate || 0); var t = this, a = t.params, i = t.maxTranslate() - t.minTranslate(), s = t.progress, r = t.isBeginning, n = t.isEnd, o = r, l = n; 0 === i ? n = r = !(s = 0) : (r = (s = (e - t.minTranslate()) / i) <= 0, n = 1 <= s), V.extend(t, { progress: s, isBeginning: r, isEnd: n }), (a.watchSlidesProgress || a.watchSlidesVisibility) && t.updateSlidesProgress(e), r && !o && t.emit("reachBeginning toEdge"), n && !l && t.emit("reachEnd toEdge"), (o && !r || l && !n) && t.emit("fromEdge"), t.emit("progress", s) }, updateSlidesClasses: function() { var e, t = this, a = t.slides, i = t.params, s = t.$wrapperEl, r = t.activeIndex, n = t.realIndex, o = t.virtual && i.virtual.enabled; a.removeClass(i.slideActiveClass + " " + i.slideNextClass + " " + i.slidePrevClass + " " + i.slideDuplicateActiveClass + " " + i.slideDuplicateNextClass + " " + i.slideDuplicatePrevClass), (e = o ? t.$wrapperEl.find("." + i.slideClass + '[data-swiper-slide-index="' + r + '"]') : a.eq(r)).addClass(i.slideActiveClass), i.loop && (e.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + n + '"]').addClass(i.slideDuplicateActiveClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + n + '"]').addClass(i.slideDuplicateActiveClass)); var l = e.nextAll("." + i.slideClass).eq(0).addClass(i.slideNextClass); i.loop && 0 === l.length && (l = a.eq(0)).addClass(i.slideNextClass); var d = e.prevAll("." + i.slideClass).eq(0).addClass(i.slidePrevClass); i.loop && 0 === d.length && (d = a.eq(-1)).addClass(i.slidePrevClass), i.loop && (l.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + l.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicateNextClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + l.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicateNextClass), d.hasClass(i.slideDuplicateClass) ? s.children("." + i.slideClass + ":not(." + i.slideDuplicateClass + ')[data-swiper-slide-index="' + d.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicatePrevClass) : s.children("." + i.slideClass + "." + i.slideDuplicateClass + '[data-swiper-slide-index="' + d.attr("data-swiper-slide-index") + '"]').addClass(i.slideDuplicatePrevClass)) }, updateActiveIndex: function(e) { var t, a = this, i = a.rtlTranslate ? a.translate : -a.translate, s = a.slidesGrid, r = a.snapGrid, n = a.params, o = a.activeIndex, l = a.realIndex, d = a.snapIndex, p = e; if (void 0 === p) { for (var c = 0; c < s.length; c += 1) void 0 !== s[c + 1] ? i >= s[c] && i < s[c + 1] - (s[c + 1] - s[c]) / 2 ? p = c : i >= s[c] && i < s[c + 1] && (p = c + 1) : i >= s[c] && (p = c); n.normalizeSlideIndex && (p < 0 || void 0 === p) && (p = 0) } if ((t = 0 <= r.indexOf(i) ? r.indexOf(i) : Math.floor(p / n.slidesPerGroup)) >= r.length && (t = r.length - 1), p !== o) { var u = parseInt(a.slides.eq(p).attr("data-swiper-slide-index") || p, 10); V.extend(a, { snapIndex: t, realIndex: u, previousIndex: o, activeIndex: p }), a.emit("activeIndexChange"), a.emit("snapIndexChange"), l !== u && a.emit("realIndexChange"), a.emit("slideChange") } else t !== d && (a.snapIndex = t, a.emit("snapIndexChange")) }, updateClickedSlide: function(e) { var t = this, a = t.params, i = L(e.target).closest("." + a.slideClass)[0], s = !1; if (i) for (var r = 0; r < t.slides.length; r += 1) t.slides[r] === i && (s = !0); if (!i || !s) return t.clickedSlide = void 0, void(t.clickedIndex = void 0); t.clickedSlide = i, t.virtual && t.params.virtual.enabled ? t.clickedIndex = parseInt(L(i).attr("data-swiper-slide-index"), 10) : t.clickedIndex = L(i).index(), a.slideToClickedSlide && void 0 !== t.clickedIndex && t.clickedIndex !== t.activeIndex && t.slideToClickedSlide() } }; var d = { getTranslate: function(e) { void 0 === e && (e = this.isHorizontal() ? "x" : "y"); var t = this.params, a = this.rtlTranslate, i = this.translate, s = this.$wrapperEl; if (t.virtualTranslate) return a ? -i : i; var r = V.getTranslate(s[0], e); return a && (r = -r), r || 0 }, setTranslate: function(e, t) { var a = this, i = a.rtlTranslate, s = a.params, r = a.$wrapperEl, n = a.progress, o = 0, l = 0; a.isHorizontal() ? o = i ? -e : e : l = e, s.roundLengths && (o = Math.floor(o), l = Math.floor(l)), s.virtualTranslate || (F.transforms3d ? r.transform("translate3d(" + o + "px, " + l + "px, 0px)") : r.transform("translate(" + o + "px, " + l + "px)")), a.previousTranslate = a.translate, a.translate = a.isHorizontal() ? o : l; var d = a.maxTranslate() - a.minTranslate(); (0 === d ? 0 : (e - a.minTranslate()) / d) !== n && a.updateProgress(e), a.emit("setTranslate", a.translate, t) }, minTranslate: function() { return -this.snapGrid[0] }, maxTranslate: function() { return -this.snapGrid[this.snapGrid.length - 1] } }; var p = { setTransition: function(e, t) { this.$wrapperEl.transition(e), this.emit("setTransition", e, t) }, transitionStart: function(e, t) { void 0 === e && (e = !0); var a = this, i = a.activeIndex, s = a.params, r = a.previousIndex; s.autoHeight && a.updateAutoHeight(); var n = t; if (n || (n = r < i ? "next" : i < r ? "prev" : "reset"), a.emit("transitionStart"), e && i !== r) { if ("reset" === n) return void a.emit("slideResetTransitionStart"); a.emit("slideChangeTransitionStart"), "next" === n ? a.emit("slideNextTransitionStart") : a.emit("slidePrevTransitionStart") } }, transitionEnd: function(e, t) { void 0 === e && (e = !0); var a = this, i = a.activeIndex, s = a.previousIndex; a.animating = !1, a.setTransition(0); var r = t; if (r || (r = s < i ? "next" : i < s ? "prev" : "reset"), a.emit("transitionEnd"), e && i !== s) { if ("reset" === r) return void a.emit("slideResetTransitionEnd"); a.emit("slideChangeTransitionEnd"), "next" === r ? a.emit("slideNextTransitionEnd") : a.emit("slidePrevTransitionEnd") } } }; var c = { slideTo: function(e, t, a, i) { void 0 === e && (e = 0), void 0 === t && (t = this.params.speed), void 0 === a && (a = !0); var s = this, r = e; r < 0 && (r = 0); var n = s.params, o = s.snapGrid, l = s.slidesGrid, d = s.previousIndex, p = s.activeIndex, c = s.rtlTranslate; if (s.animating && n.preventInteractionOnTransition) return !1; var u = Math.floor(r / n.slidesPerGroup); u >= o.length && (u = o.length - 1), (p || n.initialSlide || 0) === (d || 0) && a && s.emit("beforeSlideChangeStart"); var h, v = -o[u]; if (s.updateProgress(v), n.normalizeSlideIndex) for (var f = 0; f < l.length; f += 1) - Math.floor(100 * v) >= Math.floor(100 * l[f]) && (r = f); if (s.initialized && r !== p) { if (!s.allowSlideNext && v < s.translate && v < s.minTranslate()) return !1; if (!s.allowSlidePrev && v > s.translate && v > s.maxTranslate() && (p || 0) !== r) return !1 } return h = p < r ? "next" : r < p ? "prev" : "reset", c && -v === s.translate || !c && v === s.translate ? (s.updateActiveIndex(r), n.autoHeight && s.updateAutoHeight(), s.updateSlidesClasses(), "slide" !== n.effect && s.setTranslate(v), "reset" !== h && (s.transitionStart(a, h), s.transitionEnd(a, h)), !1) : (0 !== t && F.transition ? (s.setTransition(t), s.setTranslate(v), s.updateActiveIndex(r), s.updateSlidesClasses(), s.emit("beforeTransitionStart", t, i), s.transitionStart(a, h), s.animating || (s.animating = !0, s.onSlideToWrapperTransitionEnd || (s.onSlideToWrapperTransitionEnd = function(e) { s && !s.destroyed && e.target === this && (s.$wrapperEl[0].removeEventListener("transitionend", s.onSlideToWrapperTransitionEnd), s.$wrapperEl[0].removeEventListener("webkitTransitionEnd", s.onSlideToWrapperTransitionEnd), s.onSlideToWrapperTransitionEnd = null, delete s.onSlideToWrapperTransitionEnd, s.transitionEnd(a, h)) }), s.$wrapperEl[0].addEventListener("transitionend", s.onSlideToWrapperTransitionEnd), s.$wrapperEl[0].addEventListener("webkitTransitionEnd", s.onSlideToWrapperTransitionEnd))) : (s.setTransition(0), s.setTranslate(v), s.updateActiveIndex(r), s.updateSlidesClasses(), s.emit("beforeTransitionStart", t, i), s.transitionStart(a, h), s.transitionEnd(a, h)), !0) }, slideToLoop: function(e, t, a, i) { void 0 === e && (e = 0), void 0 === t && (t = this.params.speed), void 0 === a && (a = !0); var s = e; return this.params.loop && (s += this.loopedSlides), this.slideTo(s, t, a, i) }, slideNext: function(e, t, a) { void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); var i = this, s = i.params, r = i.animating; return s.loop ? !r && (i.loopFix(), i._clientLeft = i.$wrapperEl[0].clientLeft, i.slideTo(i.activeIndex + s.slidesPerGroup, e, t, a)) : i.slideTo(i.activeIndex + s.slidesPerGroup, e, t, a) }, slidePrev: function(e, t, a) { void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); var i = this, s = i.params, r = i.animating, n = i.snapGrid, o = i.slidesGrid, l = i.rtlTranslate; if (s.loop) { if (r) return !1; i.loopFix(), i._clientLeft = i.$wrapperEl[0].clientLeft } function d(e) { return e < 0 ? -Math.floor(Math.abs(e)) : Math.floor(e) } var p, c = d(l ? i.translate : -i.translate), u = n.map(function(e) { return d(e) }), h = (o.map(function(e) { return d(e) }), n[u.indexOf(c)], n[u.indexOf(c) - 1]); return void 0 !== h && (p = o.indexOf(h)) < 0 && (p = i.activeIndex - 1), i.slideTo(p, e, t, a) }, slideReset: function(e, t, a) { return void 0 === e && (e = this.params.speed), void 0 === t && (t = !0), this.slideTo(this.activeIndex, e, t, a) }, slideToClosest: function(e, t, a) { void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); var i = this, s = i.activeIndex, r = Math.floor(s / i.params.slidesPerGroup); if (r < i.snapGrid.length - 1) { var n = i.rtlTranslate ? i.translate : -i.translate, o = i.snapGrid[r]; (i.snapGrid[r + 1] - o) / 2 < n - o && (s = i.params.slidesPerGroup) } return i.slideTo(s, e, t, a) }, slideToClickedSlide: function() { var e, t = this, a = t.params, i = t.$wrapperEl, s = "auto" === a.slidesPerView ? t.slidesPerViewDynamic() : a.slidesPerView, r = t.clickedIndex; if (a.loop) { if (t.animating) return; e = parseInt(L(t.clickedSlide).attr("data-swiper-slide-index"), 10), a.centeredSlides ? r < t.loopedSlides - s / 2 || r > t.slides.length - t.loopedSlides + s / 2 ? (t.loopFix(), r = i.children("." + a.slideClass + '[data-swiper-slide-index="' + e + '"]:not(.' + a.slideDuplicateClass + ")").eq(0).index(), V.nextTick(function() { t.slideTo(r) })) : t.slideTo(r) : r > t.slides.length - s ? (t.loopFix(), r = i.children("." + a.slideClass + '[data-swiper-slide-index="' + e + '"]:not(.' + a.slideDuplicateClass + ")").eq(0).index(), V.nextTick(function() { t.slideTo(r) })) : t.slideTo(r) } else t.slideTo(r) } }; var u = { loopCreate: function() { var i = this, e = i.params, t = i.$wrapperEl; t.children("." + e.slideClass + "." + e.slideDuplicateClass).remove(); var s = t.children("." + e.slideClass); if (e.loopFillGroupWithBlank) { var a = e.slidesPerGroup - s.length % e.slidesPerGroup; if (a !== e.slidesPerGroup) { for (var r = 0; r < a; r += 1) { var n = L(f.createElement("div")).addClass(e.slideClass + " " + e.slideBlankClass); t.append(n) } s = t.children("." + e.slideClass) } } "auto" !== e.slidesPerView || e.loopedSlides || (e.loopedSlides = s.length), i.loopedSlides = parseInt(e.loopedSlides || e.slidesPerView, 10), i.loopedSlides += e.loopAdditionalSlides, i.loopedSlides > s.length && (i.loopedSlides = s.length); var o = [], l = []; s.each(function(e, t) { var a = L(t); e < i.loopedSlides && l.push(t), e < s.length && e >= s.length - i.loopedSlides && o.push(t), a.attr("data-swiper-slide-index", e) }); for (var d = 0; d < l.length; d += 1) t.append(L(l[d].cloneNode(!0)).addClass(e.slideDuplicateClass)); for (var p = o.length - 1; 0 <= p; p -= 1) t.prepend(L(o[p].cloneNode(!0)).addClass(e.slideDuplicateClass)) }, loopFix: function() { var e, t = this, a = t.params, i = t.activeIndex, s = t.slides, r = t.loopedSlides, n = t.allowSlidePrev, o = t.allowSlideNext, l = t.snapGrid, d = t.rtlTranslate; t.allowSlidePrev = !0, t.allowSlideNext = !0; var p = -l[i] - t.getTranslate(); i < r ? (e = s.length - 3 * r + i, e += r, t.slideTo(e, 0, !1, !0) && 0 !== p && t.setTranslate((d ? -t.translate : t.translate) - p)) : ("auto" === a.slidesPerView && 2 * r <= i || i >= s.length - r) && (e = -s.length + i + r, e += r, t.slideTo(e, 0, !1, !0) && 0 !== p && t.setTranslate((d ? -t.translate : t.translate) - p)); t.allowSlidePrev = n, t.allowSlideNext = o }, loopDestroy: function() { var e = this.$wrapperEl, t = this.params, a = this.slides; e.children("." + t.slideClass + "." + t.slideDuplicateClass).remove(), a.removeAttr("data-swiper-slide-index") } }; var h = { setGrabCursor: function(e) { if (!(F.touch || !this.params.simulateTouch || this.params.watchOverflow && this.isLocked)) { var t = this.el; t.style.cursor = "move", t.style.cursor = e ? "-webkit-grabbing" : "-webkit-grab", t.style.cursor = e ? "-moz-grabbin" : "-moz-grab", t.style.cursor = e ? "grabbing" : "grab" } }, unsetGrabCursor: function() { F.touch || this.params.watchOverflow && this.isLocked || (this.el.style.cursor = "") } }; var v = { appendSlide: function(e) { var t = this, a = t.$wrapperEl, i = t.params; if (i.loop && t.loopDestroy(), "object" == typeof e && "length" in e) for (var s = 0; s < e.length; s += 1) e[s] && a.append(e[s]); else a.append(e); i.loop && t.loopCreate(), i.observer && F.observer || t.update() }, prependSlide: function(e) { var t = this, a = t.params, i = t.$wrapperEl, s = t.activeIndex; a.loop && t.loopDestroy(); var r = s + 1; if ("object" == typeof e && "length" in e) { for (var n = 0; n < e.length; n += 1) e[n] && i.prepend(e[n]); r = s + e.length } else i.prepend(e); a.loop && t.loopCreate(), a.observer && F.observer || t.update(), t.slideTo(r, 0, !1) }, addSlide: function(e, t) { var a = this, i = a.$wrapperEl, s = a.params, r = a.activeIndex; s.loop && (r -= a.loopedSlides, a.loopDestroy(), a.slides = i.children("." + s.slideClass)); var n = a.slides.length; if (e <= 0) a.prependSlide(t); else if (n <= e) a.appendSlide(t); else { for (var o = e < r ? r + 1 : r, l = [], d = n - 1; e <= d; d -= 1) { var p = a.slides.eq(d); p.remove(), l.unshift(p) } if ("object" == typeof t && "length" in t) { for (var c = 0; c < t.length; c += 1) t[c] && i.append(t[c]); o = e < r ? r + t.length : r } else i.append(t); for (var u = 0; u < l.length; u += 1) i.append(l[u]); s.loop && a.loopCreate(), s.observer && F.observer || a.update(), s.loop ? a.slideTo(o + a.loopedSlides, 0, !1) : a.slideTo(o, 0, !1) } }, removeSlide: function(e) { var t = this, a = t.params, i = t.$wrapperEl, s = t.activeIndex; a.loop && (s -= t.loopedSlides, t.loopDestroy(), t.slides = i.children("." + a.slideClass)); var r, n = s; if ("object" == typeof e && "length" in e) { for (var o = 0; o < e.length; o += 1) r = e[o], t.slides[r] && t.slides.eq(r).remove(), r < n && (n -= 1); n = Math.max(n, 0) } else r = e, t.slides[r] && t.slides.eq(r).remove(), r < n && (n -= 1), n = Math.max(n, 0); a.loop && t.loopCreate(), a.observer && F.observer || t.update(), a.loop ? t.slideTo(n + t.loopedSlides, 0, !1) : t.slideTo(n, 0, !1) }, removeAllSlides: function() { for (var e = [], t = 0; t < this.slides.length; t += 1) e.push(t); this.removeSlide(e) } }, m = function() { var e = Y.navigator.userAgent, t = { ios: !1, android: !1, androidChrome: !1, desktop: !1, windows: !1, iphone: !1, ipod: !1, ipad: !1, cordova: Y.cordova || Y.phonegap, phonegap: Y.cordova || Y.phonegap }, a = e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/), i = e.match(/(Android);?[\s\/]+([\d.]+)?/), s = e.match(/(iPad).*OS\s([\d_]+)/), r = e.match(/(iPod)(.*OS\s([\d_]+))?/), n = !s && e.match(/(iPhone\sOS|iOS)\s([\d_]+)/); if (a && (t.os = "windows", t.osVersion = a[2], t.windows = !0), i && !a && (t.os = "android", t.osVersion = i[2], t.android = !0, t.androidChrome = 0 <= e.toLowerCase().indexOf("chrome")), (s || n || r) && (t.os = "ios", t.ios = !0), n && !r && (t.osVersion = n[2].replace(/_/g, "."), t.iphone = !0), s && (t.osVersion = s[2].replace(/_/g, "."), t.ipad = !0), r && (t.osVersion = r[3] ? r[3].replace(/_/g, ".") : null, t.iphone = !0), t.ios && t.osVersion && 0 <= e.indexOf("Version/") && "10" === t.osVersion.split(".")[0] && (t.osVersion = e.toLowerCase().split("version/")[1].split(" ")[0]), t.desktop = !(t.os || t.android || t.webView), t.webView = (n || s || r) && e.match(/.*AppleWebKit(?!.*Safari)/i), t.os && "ios" === t.os) { var o = t.osVersion.split("."), l = f.querySelector('meta[name="viewport"]'); t.minimalUi = !t.webView && (r || n) && (1 * o[0] == 7 ? 1 <= 1 * o[1] : 7 < 1 * o[0]) && l && 0 <= l.getAttribute("content").indexOf("minimal-ui") } return t.pixelRatio = Y.devicePixelRatio || 1, t }(); function g() { var e = this, t = e.params, a = e.el; if (!a || 0 !== a.offsetWidth) { t.breakpoints && e.setBreakpoint(); var i = e.allowSlideNext, s = e.allowSlidePrev, r = e.snapGrid; if (e.allowSlideNext = !0, e.allowSlidePrev = !0, e.updateSize(), e.updateSlides(), t.freeMode) { var n = Math.min(Math.max(e.translate, e.maxTranslate()), e.minTranslate()); e.setTranslate(n), e.updateActiveIndex(), e.updateSlidesClasses(), t.autoHeight && e.updateAutoHeight() } else e.updateSlidesClasses(), ("auto" === t.slidesPerView || 1 < t.slidesPerView) && e.isEnd && !e.params.centeredSlides ? e.slideTo(e.slides.length - 1, 0, !1, !0) : e.slideTo(e.activeIndex, 0, !1, !0); e.allowSlidePrev = s, e.allowSlideNext = i, e.params.watchOverflow && r !== e.snapGrid && e.checkOverflow() } } var b = { attachEvents: function() { var e = this, t = e.params, a = e.touchEvents, i = e.el, s = e.wrapperEl; e.onTouchStart = function(e) { var t = this, a = t.touchEventsData, i = t.params, s = t.touches; if (!t.animating || !i.preventInteractionOnTransition) { var r = e; if (r.originalEvent && (r = r.originalEvent), a.isTouchEvent = "touchstart" === r.type, (a.isTouchEvent || !("which" in r) || 3 !== r.which) && !(!a.isTouchEvent && "button" in r && 0 < r.button || a.isTouched && a.isMoved)) if (i.noSwiping && L(r.target).closest(i.noSwipingSelector ? i.noSwipingSelector : "." + i.noSwipingClass)[0]) t.allowClick = !0; else if (!i.swipeHandler || L(r).closest(i.swipeHandler)[0]) { s.currentX = "touchstart" === r.type ? r.targetTouches[0].pageX : r.pageX, s.currentY = "touchstart" === r.type ? r.targetTouches[0].pageY : r.pageY; var n = s.currentX, o = s.currentY, l = i.edgeSwipeDetection || i.iOSEdgeSwipeDetection, d = i.edgeSwipeThreshold || i.iOSEdgeSwipeThreshold; if (!l || !(n <= d || n >= Y.screen.width - d)) { if (V.extend(a, { isTouched: !0, isMoved: !1, allowTouchCallbacks: !0, isScrolling: void 0, startMoving: void 0 }), s.startX = n, s.startY = o, a.touchStartTime = V.now(), t.allowClick = !0, t.updateSize(), t.swipeDirection = void 0, 0 < i.threshold && (a.allowThresholdMove = !1), "touchstart" !== r.type) { var p = !0; L(r.target).is(a.formElements) && (p = !1), f.activeElement && L(f.activeElement).is(a.formElements) && f.activeElement !== r.target && f.activeElement.blur(); var c = p && t.allowTouchMove && i.touchStartPreventDefault; (i.touchStartForcePreventDefault || c) && r.preventDefault() } t.emit("touchStart", r) } } } }.bind(e), e.onTouchMove = function(e) { var t = this, a = t.touchEventsData, i = t.params, s = t.touches, r = t.rtlTranslate, n = e; if (n.originalEvent && (n = n.originalEvent), a.isTouched) { if (!a.isTouchEvent || "mousemove" !== n.type) { var o = "touchmove" === n.type ? n.targetTouches[0].pageX : n.pageX, l = "touchmove" === n.type ? n.targetTouches[0].pageY : n.pageY; if (n.preventedByNestedSwiper) return s.startX = o, void(s.startY = l); if (!t.allowTouchMove) return t.allowClick = !1, void(a.isTouched && (V.extend(s, { startX: o, startY: l, currentX: o, currentY: l }), a.touchStartTime = V.now())); if (a.isTouchEvent && i.touchReleaseOnEdges && !i.loop) if (t.isVertical()) { if (l < s.startY && t.translate <= t.maxTranslate() || l > s.startY && t.translate >= t.minTranslate()) return a.isTouched = !1, void(a.isMoved = !1) } else if (o < s.startX && t.translate <= t.maxTranslate() || o > s.startX && t.translate >= t.minTranslate()) return; if (a.isTouchEvent && f.activeElement && n.target === f.activeElement && L(n.target).is(a.formElements)) return a.isMoved = !0, void(t.allowClick = !1); if (a.allowTouchCallbacks && t.emit("touchMove", n), !(n.targetTouches && 1 < n.targetTouches.length)) { s.currentX = o, s.currentY = l; var d, p = s.currentX - s.startX, c = s.currentY - s.startY; if (!(t.params.threshold && Math.sqrt(Math.pow(p, 2) + Math.pow(c, 2)) < t.params.threshold)) if (void 0 === a.isScrolling && (t.isHorizontal() && s.currentY === s.startY || t.isVertical() && s.currentX === s.startX ? a.isScrolling = !1 : 25 <= p * p + c * c && (d = 180 * Math.atan2(Math.abs(c), Math.abs(p)) / Math.PI, a.isScrolling = t.isHorizontal() ? d > i.touchAngle : 90 - d > i.touchAngle)), a.isScrolling && t.emit("touchMoveOpposite", n), void 0 === a.startMoving && (s.currentX === s.startX && s.currentY === s.startY || (a.startMoving = !0)), a.isScrolling) a.isTouched = !1; else if (a.startMoving) { t.allowClick = !1, n.preventDefault(), i.touchMoveStopPropagation && !i.nested && n.stopPropagation(), a.isMoved || (i.loop && t.loopFix(), a.startTranslate = t.getTranslate(), t.setTransition(0), t.animating && t.$wrapperEl.trigger("webkitTransitionEnd transitionend"), a.allowMomentumBounce = !1, !i.grabCursor || !0 !== t.allowSlideNext && !0 !== t.allowSlidePrev || t.setGrabCursor(!0), t.emit("sliderFirstMove", n)), t.emit("sliderMove", n), a.isMoved = !0; var u = t.isHorizontal() ? p : c; s.diff = u, u *= i.touchRatio, r && (u = -u), t.swipeDirection = 0 < u ? "prev" : "next", a.currentTranslate = u + a.startTranslate; var h = !0, v = i.resistanceRatio; if (i.touchReleaseOnEdges && (v = 0), 0 < u && a.currentTranslate > t.minTranslate() ? (h = !1, i.resistance && (a.currentTranslate = t.minTranslate() - 1 + Math.pow(-t.minTranslate() + a.startTranslate + u, v))) : u < 0 && a.currentTranslate < t.maxTranslate() && (h = !1, i.resistance && (a.currentTranslate = t.maxTranslate() + 1 - Math.pow(t.maxTranslate() - a.startTranslate - u, v))), h && (n.preventedByNestedSwiper = !0), !t.allowSlideNext && "next" === t.swipeDirection && a.currentTranslate < a.startTranslate && (a.currentTranslate = a.startTranslate), !t.allowSlidePrev && "prev" === t.swipeDirection && a.currentTranslate > a.startTranslate && (a.currentTranslate = a.startTranslate), 0 < i.threshold) { if (!(Math.abs(u) > i.threshold || a.allowThresholdMove)) return void(a.currentTranslate = a.startTranslate); if (!a.allowThresholdMove) return a.allowThresholdMove = !0, s.startX = s.currentX, s.startY = s.currentY, a.currentTranslate = a.startTranslate, void(s.diff = t.isHorizontal() ? s.currentX - s.startX : s.currentY - s.startY) } i.followFinger && ((i.freeMode || i.watchSlidesProgress || i.watchSlidesVisibility) && (t.updateActiveIndex(), t.updateSlidesClasses()), i.freeMode && (0 === a.velocities.length && a.velocities.push({ position: s[t.isHorizontal() ? "startX" : "startY"], time: a.touchStartTime }), a.velocities.push({ position: s[t.isHorizontal() ? "currentX" : "currentY"], time: V.now() })), t.updateProgress(a.currentTranslate), t.setTranslate(a.currentTranslate)) } } } } else a.startMoving && a.isScrolling && t.emit("touchMoveOpposite", n) }.bind(e), e.onTouchEnd = function(e) { var t = this, a = t.touchEventsData, i = t.params, s = t.touches, r = t.rtlTranslate, n = t.$wrapperEl, o = t.slidesGrid, l = t.snapGrid, d = e; if (d.originalEvent && (d = d.originalEvent), a.allowTouchCallbacks && t.emit("touchEnd", d), a.allowTouchCallbacks = !1, !a.isTouched) return a.isMoved && i.grabCursor && t.setGrabCursor(!1), a.isMoved = !1, void(a.startMoving = !1); i.grabCursor && a.isMoved && a.isTouched && (!0 === t.allowSlideNext || !0 === t.allowSlidePrev) && t.setGrabCursor(!1); var p, c = V.now(), u = c - a.touchStartTime; if (t.allowClick && (t.updateClickedSlide(d), t.emit("tap", d), u < 300 && 300 < c - a.lastClickTime && (a.clickTimeout && clearTimeout(a.clickTimeout), a.clickTimeout = V.nextTick(function() { t && !t.destroyed && t.emit("click", d) }, 300)), u < 300 && c - a.lastClickTime < 300 && (a.clickTimeout && clearTimeout(a.clickTimeout), t.emit("doubleTap", d))), a.lastClickTime = V.now(), V.nextTick(function() { t.destroyed || (t.allowClick = !0) }), !a.isTouched || !a.isMoved || !t.swipeDirection || 0 === s.diff || a.currentTranslate === a.startTranslate) return a.isTouched = !1, a.isMoved = !1, void(a.startMoving = !1); if (a.isTouched = !1, a.isMoved = !1, a.startMoving = !1, p = i.followFinger ? r ? t.translate : -t.translate : -a.currentTranslate, i.freeMode) { if (p < -t.minTranslate()) return void t.slideTo(t.activeIndex); if (p > -t.maxTranslate()) return void(t.slides.length < l.length ? t.slideTo(l.length - 1) : t.slideTo(t.slides.length - 1)); if (i.freeModeMomentum) { if (1 < a.velocities.length) { var h = a.velocities.pop(), v = a.velocities.pop(), f = h.position - v.position, m = h.time - v.time; t.velocity = f / m, t.velocity /= 2, Math.abs(t.velocity) < i.freeModeMinimumVelocity && (t.velocity = 0), (150 < m || 300 < V.now() - h.time) && (t.velocity = 0) } else t.velocity = 0; t.velocity *= i.freeModeMomentumVelocityRatio, a.velocities.length = 0; var g = 1e3 * i.freeModeMomentumRatio, b = t.velocity * g, w = t.translate + b; r && (w = -w); var y, x, T = !1, E = 20 * Math.abs(t.velocity) * i.freeModeMomentumBounceRatio; if (w < t.maxTranslate()) i.freeModeMomentumBounce ? (w + t.maxTranslate() < -E && (w = t.maxTranslate() - E), y = t.maxTranslate(), T = !0, a.allowMomentumBounce = !0) : w = t.maxTranslate(), i.loop && i.centeredSlides && (x = !0); else if (w > t.minTranslate()) i.freeModeMomentumBounce ? (w - t.minTranslate() > E && (w = t.minTranslate() + E), y = t.minTranslate(), T = !0, a.allowMomentumBounce = !0) : w = t.minTranslate(), i.loop && i.centeredSlides && (x = !0); else if (i.freeModeSticky) { for (var S, C = 0; C < l.length; C += 1) if (l[C] > -w) { S = C; break } w = -(w = Math.abs(l[S] - w) < Math.abs(l[S - 1] - w) || "next" === t.swipeDirection ? l[S] : l[S - 1]) } if (x && t.once("transitionEnd", function() { t.loopFix() }), 0 !== t.velocity) g = r ? Math.abs((-w - t.translate) / t.velocity) : Math.abs((w - t.translate) / t.velocity); else if (i.freeModeSticky) return void t.slideToClosest(); i.freeModeMomentumBounce && T ? (t.updateProgress(y), t.setTransition(g), t.setTranslate(w), t.transitionStart(!0, t.swipeDirection), t.animating = !0, n.transitionEnd(function() { t && !t.destroyed && a.allowMomentumBounce && (t.emit("momentumBounce"), t.setTransition(i.speed), t.setTranslate(y), n.transitionEnd(function() { t && !t.destroyed && t.transitionEnd() })) })) : t.velocity ? (t.updateProgress(w), t.setTransition(g), t.setTranslate(w), t.transitionStart(!0, t.swipeDirection), t.animating || (t.animating = !0, n.transitionEnd(function() { t && !t.destroyed && t.transitionEnd() }))) : t.updateProgress(w), t.updateActiveIndex(), t.updateSlidesClasses() } else if (i.freeModeSticky) return void t.slideToClosest(); (!i.freeModeMomentum || u >= i.longSwipesMs) && (t.updateProgress(), t.updateActiveIndex(), t.updateSlidesClasses()) } else { for (var M = 0, k = t.slidesSizesGrid[0], P = 0; P < o.length; P += i.slidesPerGroup) void 0 !== o[P + i.slidesPerGroup] ? p >= o[P] && p < o[P + i.slidesPerGroup] && (k = o[(M = P) + i.slidesPerGroup] - o[P]) : p >= o[P] && (M = P, k = o[o.length - 1] - o[o.length - 2]); var z = (p - o[M]) / k; if (u > i.longSwipesMs) { if (!i.longSwipes) return void t.slideTo(t.activeIndex); "next" === t.swipeDirection && (z >= i.longSwipesRatio ? t.slideTo(M + i.slidesPerGroup) : t.slideTo(M)), "prev" === t.swipeDirection && (z > 1 - i.longSwipesRatio ? t.slideTo(M + i.slidesPerGroup) : t.slideTo(M)) } else { if (!i.shortSwipes) return void t.slideTo(t.activeIndex); "next" === t.swipeDirection && t.slideTo(M + i.slidesPerGroup), "prev" === t.swipeDirection && t.slideTo(M) } } }.bind(e), e.onClick = function(e) { this.allowClick || (this.params.preventClicks && e.preventDefault(), this.params.preventClicksPropagation && this.animating && (e.stopPropagation(), e.stopImmediatePropagation())) }.bind(e); var r = "container" === t.touchEventsTarget ? i : s, n = !!t.nested; if (F.touch || !F.pointerEvents && !F.prefixedPointerEvents) { if (F.touch) { var o = !("touchstart" !== a.start || !F.passiveListener || !t.passiveListeners) && { passive: !0, capture: !1 }; r.addEventListener(a.start, e.onTouchStart, o), r.addEventListener(a.move, e.onTouchMove, F.passiveListener ? { passive: !1, capture: n } : n), r.addEventListener(a.end, e.onTouchEnd, o) }(t.simulateTouch && !m.ios && !m.android || t.simulateTouch && !F.touch && m.ios) && (r.addEventListener("mousedown", e.onTouchStart, !1), f.addEventListener("mousemove", e.onTouchMove, n), f.addEventListener("mouseup", e.onTouchEnd, !1)) } else r.addEventListener(a.start, e.onTouchStart, !1), f.addEventListener(a.move, e.onTouchMove, n), f.addEventListener(a.end, e.onTouchEnd, !1); (t.preventClicks || t.preventClicksPropagation) && r.addEventListener("click", e.onClick, !0), e.on(m.ios || m.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", g, !0) }, detachEvents: function() { var e = this, t = e.params, a = e.touchEvents, i = e.el, s = e.wrapperEl, r = "container" === t.touchEventsTarget ? i : s, n = !!t.nested; if (F.touch || !F.pointerEvents && !F.prefixedPointerEvents) { if (F.touch) { var o = !("onTouchStart" !== a.start || !F.passiveListener || !t.passiveListeners) && { passive: !0, capture: !1 }; r.removeEventListener(a.start, e.onTouchStart, o), r.removeEventListener(a.move, e.onTouchMove, n), r.removeEventListener(a.end, e.onTouchEnd, o) }(t.simulateTouch && !m.ios && !m.android || t.simulateTouch && !F.touch && m.ios) && (r.removeEventListener("mousedown", e.onTouchStart, !1), f.removeEventListener("mousemove", e.onTouchMove, n), f.removeEventListener("mouseup", e.onTouchEnd, !1)) } else r.removeEventListener(a.start, e.onTouchStart, !1), f.removeEventListener(a.move, e.onTouchMove, n), f.removeEventListener(a.end, e.onTouchEnd, !1); (t.preventClicks || t.preventClicksPropagation) && r.removeEventListener("click", e.onClick, !0), e.off(m.ios || m.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", g) } }; var w, y = { setBreakpoint: function() { var e = this, t = e.activeIndex, a = e.initialized, i = e.loopedSlides; void 0 === i && (i = 0); var s = e.params, r = s.breakpoints; if (r && (!r || 0 !== Object.keys(r).length)) { var n = e.getBreakpoint(r); if (n && e.currentBreakpoint !== n) { var o = n in r ? r[n] : void 0; o && ["slidesPerView", "spaceBetween", "slidesPerGroup"].forEach(function(e) { var t = o[e]; void 0 !== t && (o[e] = "slidesPerView" !== e || "AUTO" !== t && "auto" !== t ? "slidesPerView" === e ? parseFloat(t) : parseInt(t, 10) : "auto") }); var l = o || e.originalParams, d = s.loop && l.slidesPerView !== s.slidesPerView; V.extend(e.params, l), V.extend(e, { allowTouchMove: e.params.allowTouchMove, allowSlideNext: e.params.allowSlideNext, allowSlidePrev: e.params.allowSlidePrev }), e.currentBreakpoint = n, d && a && (e.loopDestroy(), e.loopCreate(), e.updateSlides(), e.slideTo(t - i + e.loopedSlides, 0, !1)), e.emit("breakpoint", l) } } }, getBreakpoint: function(e) { if (e) { var t = !1, a = []; Object.keys(e).forEach(function(e) { a.push(e) }), a.sort(function(e, t) { return parseInt(e, 10) - parseInt(t, 10) }); for (var i = 0; i < a.length; i += 1) { var s = a[i]; this.params.breakpointsInverse ? s <= Y.innerWidth && (t = s) : s >= Y.innerWidth && !t && (t = s) } return t || "max" } } }, I = { isIE: !!Y.navigator.userAgent.match(/Trident/g) || !!Y.navigator.userAgent.match(/MSIE/g), isEdge: !!Y.navigator.userAgent.match(/Edge/g), isSafari: (w = Y.navigator.userAgent.toLowerCase(), 0 <= w.indexOf("safari") && w.indexOf("chrome") < 0 && w.indexOf("android") < 0), isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(Y.navigator.userAgent) }; var x = { init: !0, direction: "horizontal", touchEventsTarget: "container", initialSlide: 0, speed: 300, preventInteractionOnTransition: !1, edgeSwipeDetection: !1, edgeSwipeThreshold: 20, freeMode: !1, freeModeMomentum: !0, freeModeMomentumRatio: 1, freeModeMomentumBounce: !0, freeModeMomentumBounceRatio: 1, freeModeMomentumVelocityRatio: 1, freeModeSticky: !1, freeModeMinimumVelocity: .02, autoHeight: !1, setWrapperSize: !1, virtualTranslate: !1, effect: "slide", breakpoints: void 0, breakpointsInverse: !1, spaceBetween: 0, slidesPerView: 1, slidesPerColumn: 1, slidesPerColumnFill: "column", slidesPerGroup: 1, centeredSlides: !1, slidesOffsetBefore: 0, slidesOffsetAfter: 0, normalizeSlideIndex: !0, centerInsufficientSlides: !1, watchOverflow: !1, roundLengths: !1, touchRatio: 1, touchAngle: 45, simulateTouch: !0, shortSwipes: !0, longSwipes: !0, longSwipesRatio: .5, longSwipesMs: 300, followFinger: !0, allowTouchMove: !0, threshold: 0, touchMoveStopPropagation: !0, touchStartPreventDefault: !0, touchStartForcePreventDefault: !1, touchReleaseOnEdges: !1, uniqueNavElements: !0, resistance: !0, resistanceRatio: .85, watchSlidesProgress: !1, watchSlidesVisibility: !1, grabCursor: !1, preventClicks: !0, preventClicksPropagation: !0, slideToClickedSlide: !1, preloadImages: !0, updateOnImagesReady: !0, loop: !1, loopAdditionalSlides: 0, loopedSlides: null, loopFillGroupWithBlank: !1, allowSlidePrev: !0, allowSlideNext: !0, swipeHandler: null, noSwiping: !0, noSwipingClass: "swiper-no-swiping", noSwipingSelector: null, passiveListeners: !0, containerModifierClass: "swiper-container-", slideClass: "swiper-slide", slideBlankClass: "swiper-slide-invisible-blank", slideActiveClass: "swiper-slide-active", slideDuplicateActiveClass: "swiper-slide-duplicate-active", slideVisibleClass: "swiper-slide-visible", slideDuplicateClass: "swiper-slide-duplicate", slideNextClass: "swiper-slide-next", slideDuplicateNextClass: "swiper-slide-duplicate-next", slidePrevClass: "swiper-slide-prev", slideDuplicatePrevClass: "swiper-slide-duplicate-prev", wrapperClass: "swiper-wrapper", runCallbacksOnInit: !0 }, T = { update: o, translate: d, transition: p, slide: c, loop: u, grabCursor: h, manipulation: v, events: b, breakpoints: y, checkOverflow: { checkOverflow: function() { var e = this, t = e.isLocked; e.isLocked = 1 === e.snapGrid.length, e.allowSlideNext = !e.isLocked, e.allowSlidePrev = !e.isLocked, t !== e.isLocked && e.emit(e.isLocked ? "lock" : "unlock"), t && t !== e.isLocked && (e.isEnd = !1, e.navigation.update()) } }, classes: { addClasses: function() { var t = this.classNames, a = this.params, e = this.rtl, i = this.$el, s = []; s.push(a.direction), a.freeMode && s.push("free-mode"), F.flexbox || s.push("no-flexbox"), a.autoHeight && s.push("autoheight"), e && s.push("rtl"), 1 < a.slidesPerColumn && s.push("multirow"), m.android && s.push("android"), m.ios && s.push("ios"), (I.isIE || I.isEdge) && (F.pointerEvents || F.prefixedPointerEvents) && s.push("wp8-" + a.direction), s.forEach(function(e) { t.push(a.containerModifierClass + e) }), i.addClass(t.join(" ")) }, removeClasses: function() { var e = this.$el, t = this.classNames; e.removeClass(t.join(" ")) } }, images: { loadImage: function(e, t, a, i, s, r) { var n; function o() { r && r() } e.complete && s ? o() : t ? ((n = new Y.Image).onload = o, n.onerror = o, i && (n.sizes = i), a && (n.srcset = a), t && (n.src = t)) : o() }, preloadImages: function() { var e = this; function t() { null != e && e && !e.destroyed && (void 0 !== e.imagesLoaded && (e.imagesLoaded += 1), e.imagesLoaded === e.imagesToLoad.length && (e.params.updateOnImagesReady && e.update(), e.emit("imagesReady"))) } e.imagesToLoad = e.$el.find("img"); for (var a = 0; a < e.imagesToLoad.length; a += 1) { var i = e.imagesToLoad[a]; e.loadImage(i, i.currentSrc || i.getAttribute("src"), i.srcset || i.getAttribute("srcset"), i.sizes || i.getAttribute("sizes"), !0, t) } } } }, E = {}, S = function(u) { function h() { for (var e, t, s, a = [], i = arguments.length; i--;) a[i] = arguments[i]; 1 === a.length && a[0].constructor && a[0].constructor === Object ? s = a[0] : (t = (e = a)[0], s = e[1]), s || (s = {}), s = V.extend({}, s), t && !s.el && (s.el = t), u.call(this, s), Object.keys(T).forEach(function(t) { Object.keys(T[t]).forEach(function(e) { h.prototype[e] || (h.prototype[e] = T[t][e]) }) }); var r = this; void 0 === r.modules && (r.modules = {}), Object.keys(r.modules).forEach(function(e) { var t = r.modules[e]; if (t.params) { var a = Object.keys(t.params)[0], i = t.params[a]; if ("object" != typeof i || null === i) return; if (!(a in s && "enabled" in i)) return; !0 === s[a] && (s[a] = { enabled: !0 }), "object" != typeof s[a] || "enabled" in s[a] || (s[a].enabled = !0), s[a] || (s[a] = { enabled: !1 }) } }); var n = V.extend({}, x); r.useModulesParams(n), r.params = V.extend({}, n, E, s), r.originalParams = V.extend({}, r.params), r.passedParams = V.extend({}, s); var o = (r.$ = L)(r.params.el); if (t = o[0]) { if (1 < o.length) { var l = []; return o.each(function(e, t) { var a = V.extend({}, s, { el: t }); l.push(new h(a)) }), l } t.swiper = r, o.data("swiper", r); var d, p, c = o.children("." + r.params.wrapperClass); return V.extend(r, { $el: o, el: t, $wrapperEl: c, wrapperEl: c[0], classNames: [], slides: L(), slidesGrid: [], snapGrid: [], slidesSizesGrid: [], isHorizontal: function() { return "horizontal" === r.params.direction }, isVertical: function() { return "vertical" === r.params.direction }, rtl: "rtl" === t.dir.toLowerCase() || "rtl" === o.css("direction"), rtlTranslate: "horizontal" === r.params.direction && ("rtl" === t.dir.toLowerCase() || "rtl" === o.css("direction")), wrongRTL: "-webkit-box" === c.css("display"), activeIndex: 0, realIndex: 0, isBeginning: !0, isEnd: !1, translate: 0, previousTranslate: 0, progress: 0, velocity: 0, animating: !1, allowSlideNext: r.params.allowSlideNext, allowSlidePrev: r.params.allowSlidePrev, touchEvents: (d = ["touchstart", "touchmove", "touchend"], p = ["mousedown", "mousemove", "mouseup"], F.pointerEvents ? p = ["pointerdown", "pointermove", "pointerup"] : F.prefixedPointerEvents && (p = ["MSPointerDown", "MSPointerMove", "MSPointerUp"]), r.touchEventsTouch = { start: d[0], move: d[1], end: d[2] }, r.touchEventsDesktop = { start: p[0], move: p[1], end: p[2] }, F.touch || !r.params.simulateTouch ? r.touchEventsTouch : r.touchEventsDesktop), touchEventsData: { isTouched: void 0, isMoved: void 0, allowTouchCallbacks: void 0, touchStartTime: void 0, isScrolling: void 0, currentTranslate: void 0, startTranslate: void 0, allowThresholdMove: void 0, formElements: "input, select, option, textarea, button, video", lastClickTime: V.now(), clickTimeout: void 0, velocities: [], allowMomentumBounce: void 0, isTouchEvent: void 0, startMoving: void 0 }, allowClick: !0, allowTouchMove: r.params.allowTouchMove, touches: { startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0 }, imagesToLoad: [], imagesLoaded: 0 }), r.useModules(), r.params.init && r.init(), r } } u && (h.__proto__ = u); var e = { extendedDefaults: { configurable: !0 }, defaults: { configurable: !0 }, Class: { configurable: !0 }, $: { configurable: !0 } }; return ((h.prototype = Object.create(u && u.prototype)).constructor = h).prototype.slidesPerViewDynamic = function() { var e = this, t = e.params, a = e.slides, i = e.slidesGrid, s = e.size, r = e.activeIndex, n = 1; if (t.centeredSlides) { for (var o, l = a[r].swiperSlideSize, d = r + 1; d < a.length; d += 1) a[d] && !o && (n += 1, s < (l += a[d].swiperSlideSize) && (o = !0)); for (var p = r - 1; 0 <= p; p -= 1) a[p] && !o && (n += 1, s < (l += a[p].swiperSlideSize) && (o = !0)) } else for (var c = r + 1; c < a.length; c += 1) i[c] - i[r] < s && (n += 1); return n }, h.prototype.update = function() { var a = this; if (a && !a.destroyed) { var e = a.snapGrid, t = a.params; t.breakpoints && a.setBreakpoint(), a.updateSize(), a.updateSlides(), a.updateProgress(), a.updateSlidesClasses(), a.params.freeMode ? (i(), a.params.autoHeight && a.updateAutoHeight()) : (("auto" === a.params.slidesPerView || 1 < a.params.slidesPerView) && a.isEnd && !a.params.centeredSlides ? a.slideTo(a.slides.length - 1, 0, !1, !0) : a.slideTo(a.activeIndex, 0, !1, !0)) || i(), t.watchOverflow && e !== a.snapGrid && a.checkOverflow(), a.emit("update") } function i() { var e = a.rtlTranslate ? -1 * a.translate : a.translate, t = Math.min(Math.max(e, a.maxTranslate()), a.minTranslate()); a.setTranslate(t), a.updateActiveIndex(), a.updateSlidesClasses() } }, h.prototype.init = function() { var e = this; e.initialized || (e.emit("beforeInit"), e.params.breakpoints && e.setBreakpoint(), e.addClasses(), e.params.loop && e.loopCreate(), e.updateSize(), e.updateSlides(), e.params.watchOverflow && e.checkOverflow(), e.params.grabCursor && e.setGrabCursor(), e.params.preloadImages && e.preloadImages(), e.params.loop ? e.slideTo(e.params.initialSlide + e.loopedSlides, 0, e.params.runCallbacksOnInit) : e.slideTo(e.params.initialSlide, 0, e.params.runCallbacksOnInit), e.attachEvents(), e.initialized = !0, e.emit("init")) }, h.prototype.destroy = function(e, t) { void 0 === e && (e = !0), void 0 === t && (t = !0); var a = this, i = a.params, s = a.$el, r = a.$wrapperEl, n = a.slides; return void 0 === a.params || a.destroyed || (a.emit("beforeDestroy"), a.initialized = !1, a.detachEvents(), i.loop && a.loopDestroy(), t && (a.removeClasses(), s.removeAttr("style"), r.removeAttr("style"), n && n.length && n.removeClass([i.slideVisibleClass, i.slideActiveClass, i.slideNextClass, i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")), a.emit("destroy"), Object.keys(a.eventsListeners).forEach(function(e) { a.off(e) }), !1 !== e && (a.$el[0].swiper = null, a.$el.data("swiper", null), V.deleteProps(a)), a.destroyed = !0), null }, h.extendDefaults = function(e) { V.extend(E, e) }, e.extendedDefaults.get = function() { return E }, e.defaults.get = function() { return x }, e.Class.get = function() { return u }, e.$.get = function() { return L }, Object.defineProperties(h, e), h }(s), C = { name: "device", proto: { device: m }, static: { device: m } }, M = { name: "support", proto: { support: F }, static: { support: F } }, k = { name: "browser", proto: { browser: I }, static: { browser: I } }, P = { name: "resize", create: function() { var e = this; V.extend(e, { resize: { resizeHandler: function() { e && !e.destroyed && e.initialized && (e.emit("beforeResize"), e.emit("resize")) }, orientationChangeHandler: function() { e && !e.destroyed && e.initialized && e.emit("orientationchange") } } }) }, on: { init: function() { Y.addEventListener("resize", this.resize.resizeHandler), Y.addEventListener("orientationchange", this.resize.orientationChangeHandler) }, destroy: function() { Y.removeEventListener("resize", this.resize.resizeHandler), Y.removeEventListener("orientationchange", this.resize.orientationChangeHandler) } } }, z = { func: Y.MutationObserver || Y.WebkitMutationObserver, attach: function(e, t) { void 0 === t && (t = {}); var a = this, i = new z.func(function(e) { if (1 !== e.length) { var t = function() { a.emit("observerUpdate", e[0]) }; Y.requestAnimationFrame ? Y.requestAnimationFrame(t) : Y.setTimeout(t, 0) } else a.emit("observerUpdate", e[0]) }); i.observe(e, { attributes: void 0 === t.attributes || t.attributes, childList: void 0 === t.childList || t.childList, characterData: void 0 === t.characterData || t.characterData }), a.observer.observers.push(i) }, init: function() { var e = this; if (F.observer && e.params.observer) { if (e.params.observeParents) for (var t = e.$el.parents(), a = 0; a < t.length; a += 1) e.observer.attach(t[a]); e.observer.attach(e.$el[0], { childList: !1 }), e.observer.attach(e.$wrapperEl[0], { attributes: !1 }) } }, destroy: function() { this.observer.observers.forEach(function(e) { e.disconnect() }), this.observer.observers = [] } }, $ = { name: "observer", params: { observer: !1, observeParents: !1 }, create: function() { V.extend(this, { observer: { init: z.init.bind(this), attach: z.attach.bind(this), destroy: z.destroy.bind(this), observers: [] } }) }, on: { init: function() { this.observer.init() }, destroy: function() { this.observer.destroy() } } }, D = { update: function(e) { var t = this, a = t.params, i = a.slidesPerView, s = a.slidesPerGroup, r = a.centeredSlides, n = t.params.virtual, o = n.addSlidesBefore, l = n.addSlidesAfter, d = t.virtual, p = d.from, c = d.to, u = d.slides, h = d.slidesGrid, v = d.renderSlide, f = d.offset; t.updateActiveIndex(); var m, g, b, w = t.activeIndex || 0; m = t.rtlTranslate ? "right" : t.isHorizontal() ? "left" : "top", r ? (g = Math.floor(i / 2) + s + o, b = Math.floor(i / 2) + s + l) : (g = i + (s - 1) + o, b = s + l); var y = Math.max((w || 0) - b, 0), x = Math.min((w || 0) + g, u.length - 1), T = (t.slidesGrid[y] || 0) - (t.slidesGrid[0] || 0); function E() { t.updateSlides(), t.updateProgress(), t.updateSlidesClasses(), t.lazy && t.params.lazy.enabled && t.lazy.load() } if (V.extend(t.virtual, { from: y, to: x, offset: T, slidesGrid: t.slidesGrid }), p === y && c === x && !e) return t.slidesGrid !== h && T !== f && t.slides.css(m, T + "px"), void t.updateProgress(); if (t.params.virtual.renderExternal) return t.params.virtual.renderExternal.call(t, { offset: T, from: y, to: x, slides: function() { for (var e = [], t = y; t <= x; t += 1) e.push(u[t]); return e }() }), void E(); var S = [], C = []; if (e) t.$wrapperEl.find("." + t.params.slideClass).remove(); else for (var M = p; M <= c; M += 1)(M < y || x < M) && t.$wrapperEl.find("." + t.params.slideClass + '[data-swiper-slide-index="' + M + '"]').remove(); for (var k = 0; k < u.length; k += 1) y <= k && k <= x && (void 0 === c || e ? C.push(k) : (c < k && C.push(k), k < p && S.push(k))); C.forEach(function(e) { t.$wrapperEl.append(v(u[e], e)) }), S.sort(function(e, t) { return t - e }).forEach(function(e) { t.$wrapperEl.prepend(v(u[e], e)) }), t.$wrapperEl.children(".swiper-slide").css(m, T + "px"), E() }, renderSlide: function(e, t) { var a = this, i = a.params.virtual; if (i.cache && a.virtual.cache[t]) return a.virtual.cache[t]; var s = i.renderSlide ? L(i.renderSlide.call(a, e, t)) : L('
' + e + "
"); return s.attr("data-swiper-slide-index") || s.attr("data-swiper-slide-index", t), i.cache && (a.virtual.cache[t] = s), s }, appendSlide: function(e) { this.virtual.slides.push(e), this.virtual.update(!0) }, prependSlide: function(e) { var t = this; if (t.virtual.slides.unshift(e), t.params.virtual.cache) { var a = t.virtual.cache, i = {}; Object.keys(a).forEach(function(e) { i[e + 1] = a[e] }), t.virtual.cache = i } t.virtual.update(!0), t.slideNext(0) } }, O = { name: "virtual", params: { virtual: { enabled: !1, slides: [], cache: !0, renderSlide: null, renderExternal: null, addSlidesBefore: 0, addSlidesAfter: 0 } }, create: function() { var e = this; V.extend(e, { virtual: { update: D.update.bind(e), appendSlide: D.appendSlide.bind(e), prependSlide: D.prependSlide.bind(e), renderSlide: D.renderSlide.bind(e), slides: e.params.virtual.slides, cache: {} } }) }, on: { beforeInit: function() { var e = this; if (e.params.virtual.enabled) { e.classNames.push(e.params.containerModifierClass + "virtual"); var t = { watchSlidesProgress: !0 }; V.extend(e.params, t), V.extend(e.originalParams, t), e.params.initialSlide || e.virtual.update() } }, setTranslate: function() { this.params.virtual.enabled && this.virtual.update() } } }, A = { handle: function(e) { var t = this, a = t.rtlTranslate, i = e; i.originalEvent && (i = i.originalEvent); var s = i.keyCode || i.charCode; if (!t.allowSlideNext && (t.isHorizontal() && 39 === s || t.isVertical() && 40 === s)) return !1; if (!t.allowSlidePrev && (t.isHorizontal() && 37 === s || t.isVertical() && 38 === s)) return !1; if (!(i.shiftKey || i.altKey || i.ctrlKey || i.metaKey || f.activeElement && f.activeElement.nodeName && ("input" === f.activeElement.nodeName.toLowerCase() || "textarea" === f.activeElement.nodeName.toLowerCase()))) { if (t.params.keyboard.onlyInViewport && (37 === s || 39 === s || 38 === s || 40 === s)) { var r = !1; if (0 < t.$el.parents("." + t.params.slideClass).length && 0 === t.$el.parents("." + t.params.slideActiveClass).length) return; var n = Y.innerWidth, o = Y.innerHeight, l = t.$el.offset(); a && (l.left -= t.$el[0].scrollLeft); for (var d = [ [l.left, l.top], [l.left + t.width, l.top], [l.left, l.top + t.height], [l.left + t.width, l.top + t.height] ], p = 0; p < d.length; p += 1) { var c = d[p]; 0 <= c[0] && c[0] <= n && 0 <= c[1] && c[1] <= o && (r = !0) } if (!r) return } t.isHorizontal() ? (37 !== s && 39 !== s || (i.preventDefault ? i.preventDefault() : i.returnValue = !1), (39 === s && !a || 37 === s && a) && t.slideNext(), (37 === s && !a || 39 === s && a) && t.slidePrev()) : (38 !== s && 40 !== s || (i.preventDefault ? i.preventDefault() : i.returnValue = !1), 40 === s && t.slideNext(), 38 === s && t.slidePrev()), t.emit("keyPress", s) } }, enable: function() { this.keyboard.enabled || (L(f).on("keydown", this.keyboard.handle), this.keyboard.enabled = !0) }, disable: function() { this.keyboard.enabled && (L(f).off("keydown", this.keyboard.handle), this.keyboard.enabled = !1) } }, N = { name: "keyboard", params: { keyboard: { enabled: !1, onlyInViewport: !0 } }, create: function() { V.extend(this, { keyboard: { enabled: !1, enable: A.enable.bind(this), disable: A.disable.bind(this), handle: A.handle.bind(this) } }) }, on: { init: function() { this.params.keyboard.enabled && this.keyboard.enable() }, destroy: function() { this.keyboard.enabled && this.keyboard.disable() } } }; var H = { lastScrollTime: V.now(), event: -1 < Y.navigator.userAgent.indexOf("firefox") ? "DOMMouseScroll" : function() { var e = "onwheel", t = e in f; if (!t) { var a = f.createElement("div"); a.setAttribute(e, "return;"), t = "function" == typeof a[e] } return !t && f.implementation && f.implementation.hasFeature && !0 !== f.implementation.hasFeature("", "") && (t = f.implementation.hasFeature("Events.wheel", "3.0")), t }() ? "wheel" : "mousewheel", normalize: function(e) { var t = 0, a = 0, i = 0, s = 0; return "detail" in e && (a = e.detail), "wheelDelta" in e && (a = -e.wheelDelta / 120), "wheelDeltaY" in e && (a = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = a, a = 0), i = 10 * t, s = 10 * a, "deltaY" in e && (s = e.deltaY), "deltaX" in e && (i = e.deltaX), (i || s) && e.deltaMode && (1 === e.deltaMode ? (i *= 40, s *= 40) : (i *= 800, s *= 800)), i && !t && (t = i < 1 ? -1 : 1), s && !a && (a = s < 1 ? -1 : 1), { spinX: t, spinY: a, pixelX: i, pixelY: s } }, handleMouseEnter: function() { this.mouseEntered = !0 }, handleMouseLeave: function() { this.mouseEntered = !1 }, handle: function(e) { var t = e, a = this, i = a.params.mousewheel; if (!a.mouseEntered && !i.releaseOnEdges) return !0; t.originalEvent && (t = t.originalEvent); var s = 0, r = a.rtlTranslate ? -1 : 1, n = H.normalize(t); if (i.forceToAxis) if (a.isHorizontal()) { if (!(Math.abs(n.pixelX) > Math.abs(n.pixelY))) return !0; s = n.pixelX * r } else { if (!(Math.abs(n.pixelY) > Math.abs(n.pixelX))) return !0; s = n.pixelY } else s = Math.abs(n.pixelX) > Math.abs(n.pixelY) ? -n.pixelX * r : -n.pixelY; if (0 === s) return !0; if (i.invert && (s = -s), a.params.freeMode) { a.params.loop && a.loopFix(); var o = a.getTranslate() + s * i.sensitivity, l = a.isBeginning, d = a.isEnd; if (o >= a.minTranslate() && (o = a.minTranslate()), o <= a.maxTranslate() && (o = a.maxTranslate()), a.setTransition(0), a.setTranslate(o), a.updateProgress(), a.updateActiveIndex(), a.updateSlidesClasses(), (!l && a.isBeginning || !d && a.isEnd) && a.updateSlidesClasses(), a.params.freeModeSticky && (clearTimeout(a.mousewheel.timeout), a.mousewheel.timeout = V.nextTick(function() { a.slideToClosest() }, 300)), a.emit("scroll", t), a.params.autoplay && a.params.autoplayDisableOnInteraction && a.autoplay.stop(), o === a.minTranslate() || o === a.maxTranslate()) return !0 } else { if (60 < V.now() - a.mousewheel.lastScrollTime) if (s < 0) if (a.isEnd && !a.params.loop || a.animating) { if (i.releaseOnEdges) return !0 } else a.slideNext(), a.emit("scroll", t); else if (a.isBeginning && !a.params.loop || a.animating) { if (i.releaseOnEdges) return !0 } else a.slidePrev(), a.emit("scroll", t); a.mousewheel.lastScrollTime = (new Y.Date).getTime() } return t.preventDefault ? t.preventDefault() : t.returnValue = !1, !1 }, enable: function() { var e = this; if (!H.event) return !1; if (e.mousewheel.enabled) return !1; var t = e.$el; return "container" !== e.params.mousewheel.eventsTarged && (t = L(e.params.mousewheel.eventsTarged)), t.on("mouseenter", e.mousewheel.handleMouseEnter), t.on("mouseleave", e.mousewheel.handleMouseLeave), t.on(H.event, e.mousewheel.handle), e.mousewheel.enabled = !0 }, disable: function() { var e = this; if (!H.event) return !1; if (!e.mousewheel.enabled) return !1; var t = e.$el; return "container" !== e.params.mousewheel.eventsTarged && (t = L(e.params.mousewheel.eventsTarged)), t.off(H.event, e.mousewheel.handle), !(e.mousewheel.enabled = !1) } }, G = { update: function() { var e = this, t = e.params.navigation; if (!e.params.loop) { var a = e.navigation, i = a.$nextEl, s = a.$prevEl; s && 0 < s.length && (e.isBeginning ? s.addClass(t.disabledClass) : s.removeClass(t.disabledClass), s[e.params.watchOverflow && e.isLocked ? "addClass" : "removeClass"](t.lockClass)), i && 0 < i.length && (e.isEnd ? i.addClass(t.disabledClass) : i.removeClass(t.disabledClass), i[e.params.watchOverflow && e.isLocked ? "addClass" : "removeClass"](t.lockClass)) } }, onPrevClick: function(e) { e.preventDefault(), this.isBeginning && !this.params.loop || this.slidePrev() }, onNextClick: function(e) { e.preventDefault(), this.isEnd && !this.params.loop || this.slideNext() }, init: function() { var e, t, a = this, i = a.params.navigation; (i.nextEl || i.prevEl) && (i.nextEl && (e = L(i.nextEl), a.params.uniqueNavElements && "string" == typeof i.nextEl && 1 < e.length && 1 === a.$el.find(i.nextEl).length && (e = a.$el.find(i.nextEl))), i.prevEl && (t = L(i.prevEl), a.params.uniqueNavElements && "string" == typeof i.prevEl && 1 < t.length && 1 === a.$el.find(i.prevEl).length && (t = a.$el.find(i.prevEl))), e && 0 < e.length && e.on("click", a.navigation.onNextClick), t && 0 < t.length && t.on("click", a.navigation.onPrevClick), V.extend(a.navigation, { $nextEl: e, nextEl: e && e[0], $prevEl: t, prevEl: t && t[0] })) }, destroy: function() { var e = this, t = e.navigation, a = t.$nextEl, i = t.$prevEl; a && a.length && (a.off("click", e.navigation.onNextClick), a.removeClass(e.params.navigation.disabledClass)), i && i.length && (i.off("click", e.navigation.onPrevClick), i.removeClass(e.params.navigation.disabledClass)) } }, B = { update: function() { var e = this, t = e.rtl, s = e.params.pagination; if (s.el && e.pagination.el && e.pagination.$el && 0 !== e.pagination.$el.length) { var r, a = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, i = e.pagination.$el, n = e.params.loop ? Math.ceil((a - 2 * e.loopedSlides) / e.params.slidesPerGroup) : e.snapGrid.length; if (e.params.loop ? ((r = Math.ceil((e.activeIndex - e.loopedSlides) / e.params.slidesPerGroup)) > a - 1 - 2 * e.loopedSlides && (r -= a - 2 * e.loopedSlides), n - 1 < r && (r -= n), r < 0 && "bullets" !== e.params.paginationType && (r = n + r)) : r = void 0 !== e.snapIndex ? e.snapIndex : e.activeIndex || 0, "bullets" === s.type && e.pagination.bullets && 0 < e.pagination.bullets.length) { var o, l, d, p = e.pagination.bullets; if (s.dynamicBullets && (e.pagination.bulletSize = p.eq(0)[e.isHorizontal() ? "outerWidth" : "outerHeight"](!0), i.css(e.isHorizontal() ? "width" : "height", e.pagination.bulletSize * (s.dynamicMainBullets + 4) + "px"), 1 < s.dynamicMainBullets && void 0 !== e.previousIndex && (e.pagination.dynamicBulletIndex += r - e.previousIndex, e.pagination.dynamicBulletIndex > s.dynamicMainBullets - 1 ? e.pagination.dynamicBulletIndex = s.dynamicMainBullets - 1 : e.pagination.dynamicBulletIndex < 0 && (e.pagination.dynamicBulletIndex = 0)), o = r - e.pagination.dynamicBulletIndex, d = ((l = o + (Math.min(p.length, s.dynamicMainBullets) - 1)) + o) / 2), p.removeClass(s.bulletActiveClass + " " + s.bulletActiveClass + "-next " + s.bulletActiveClass + "-next-next " + s.bulletActiveClass + "-prev " + s.bulletActiveClass + "-prev-prev " + s.bulletActiveClass + "-main"), 1 < i.length) p.each(function(e, t) { var a = L(t), i = a.index(); i === r && a.addClass(s.bulletActiveClass), s.dynamicBullets && (o <= i && i <= l && a.addClass(s.bulletActiveClass + "-main"), i === o && a.prev().addClass(s.bulletActiveClass + "-prev").prev().addClass(s.bulletActiveClass + "-prev-prev"), i === l && a.next().addClass(s.bulletActiveClass + "-next").next().addClass(s.bulletActiveClass + "-next-next")) }); else if (p.eq(r).addClass(s.bulletActiveClass), s.dynamicBullets) { for (var c = p.eq(o), u = p.eq(l), h = o; h <= l; h += 1) p.eq(h).addClass(s.bulletActiveClass + "-main"); c.prev().addClass(s.bulletActiveClass + "-prev").prev().addClass(s.bulletActiveClass + "-prev-prev"), u.next().addClass(s.bulletActiveClass + "-next").next().addClass(s.bulletActiveClass + "-next-next") } if (s.dynamicBullets) { var v = Math.min(p.length, s.dynamicMainBullets + 4), f = (e.pagination.bulletSize * v - e.pagination.bulletSize) / 2 - d * e.pagination.bulletSize, m = t ? "right" : "left"; p.css(e.isHorizontal() ? m : "top", f + "px") } } if ("fraction" === s.type && (i.find("." + s.currentClass).text(s.formatFractionCurrent(r + 1)), i.find("." + s.totalClass).text(s.formatFractionTotal(n))), "progressbar" === s.type) { var g; g = s.progressbarOpposite ? e.isHorizontal() ? "vertical" : "horizontal" : e.isHorizontal() ? "horizontal" : "vertical"; var b = (r + 1) / n, w = 1, y = 1; "horizontal" === g ? w = b : y = b, i.find("." + s.progressbarFillClass).transform("translate3d(0,0,0) scaleX(" + w + ") scaleY(" + y + ")").transition(e.params.speed) } "custom" === s.type && s.renderCustom ? (i.html(s.renderCustom(e, r + 1, n)), e.emit("paginationRender", e, i[0])) : e.emit("paginationUpdate", e, i[0]), i[e.params.watchOverflow && e.isLocked ? "addClass" : "removeClass"](s.lockClass) } }, render: function() { var e = this, t = e.params.pagination; if (t.el && e.pagination.el && e.pagination.$el && 0 !== e.pagination.$el.length) { var a = e.virtual && e.params.virtual.enabled ? e.virtual.slides.length : e.slides.length, i = e.pagination.$el, s = ""; if ("bullets" === t.type) { for (var r = e.params.loop ? Math.ceil((a - 2 * e.loopedSlides) / e.params.slidesPerGroup) : e.snapGrid.length, n = 0; n < r; n += 1) t.renderBullet ? s += t.renderBullet.call(e, n, t.bulletClass) : s += "<" + t.bulletElement + ' class="' + t.bulletClass + '">"; i.html(s), e.pagination.bullets = i.find("." + t.bulletClass) } "fraction" === t.type && (s = t.renderFraction ? t.renderFraction.call(e, t.currentClass, t.totalClass) : ' / ', i.html(s)), "progressbar" === t.type && (s = t.renderProgressbar ? t.renderProgressbar.call(e, t.progressbarFillClass) : '', i.html(s)), "custom" !== t.type && e.emit("paginationRender", e.pagination.$el[0]) } }, init: function() { var a = this, e = a.params.pagination; if (e.el) { var t = L(e.el); 0 !== t.length && (a.params.uniqueNavElements && "string" == typeof e.el && 1 < t.length && 1 === a.$el.find(e.el).length && (t = a.$el.find(e.el)), "bullets" === e.type && e.clickable && t.addClass(e.clickableClass), t.addClass(e.modifierClass + e.type), "bullets" === e.type && e.dynamicBullets && (t.addClass("" + e.modifierClass + e.type + "-dynamic"), a.pagination.dynamicBulletIndex = 0, e.dynamicMainBullets < 1 && (e.dynamicMainBullets = 1)), "progressbar" === e.type && e.progressbarOpposite && t.addClass(e.progressbarOppositeClass), e.clickable && t.on("click", "." + e.bulletClass, function(e) { e.preventDefault(); var t = L(this).index() * a.params.slidesPerGroup; a.params.loop && (t += a.loopedSlides), a.slideTo(t) }), V.extend(a.pagination, { $el: t, el: t[0] })) } }, destroy: function() { var e = this, t = e.params.pagination; if (t.el && e.pagination.el && e.pagination.$el && 0 !== e.pagination.$el.length) { var a = e.pagination.$el; a.removeClass(t.hiddenClass), a.removeClass(t.modifierClass + t.type), e.pagination.bullets && e.pagination.bullets.removeClass(t.bulletActiveClass), t.clickable && a.off("click", "." + t.bulletClass) } } }, X = { setTranslate: function() { var e = this; if (e.params.scrollbar.el && e.scrollbar.el) { var t = e.scrollbar, a = e.rtlTranslate, i = e.progress, s = t.dragSize, r = t.trackSize, n = t.$dragEl, o = t.$el, l = e.params.scrollbar, d = s, p = (r - s) * i; a ? 0 < (p = -p) ? (d = s - p, p = 0) : r < -p + s && (d = r + p) : p < 0 ? (d = s + p, p = 0) : r < p + s && (d = r - p), e.isHorizontal() ? (F.transforms3d ? n.transform("translate3d(" + p + "px, 0, 0)") : n.transform("translateX(" + p + "px)"), n[0].style.width = d + "px") : (F.transforms3d ? n.transform("translate3d(0px, " + p + "px, 0)") : n.transform("translateY(" + p + "px)"), n[0].style.height = d + "px"), l.hide && (clearTimeout(e.scrollbar.timeout), o[0].style.opacity = 1, e.scrollbar.timeout = setTimeout(function() { o[0].style.opacity = 0, o.transition(400) }, 1e3)) } }, setTransition: function(e) { this.params.scrollbar.el && this.scrollbar.el && this.scrollbar.$dragEl.transition(e) }, updateSize: function() { var e = this; if (e.params.scrollbar.el && e.scrollbar.el) { var t = e.scrollbar, a = t.$dragEl, i = t.$el; a[0].style.width = "", a[0].style.height = ""; var s, r = e.isHorizontal() ? i[0].offsetWidth : i[0].offsetHeight, n = e.size / e.virtualSize, o = n * (r / e.size); s = "auto" === e.params.scrollbar.dragSize ? r * n : parseInt(e.params.scrollbar.dragSize, 10), e.isHorizontal() ? a[0].style.width = s + "px" : a[0].style.height = s + "px", i[0].style.display = 1 <= n ? "none" : "", e.params.scrollbarHide && (i[0].style.opacity = 0), V.extend(t, { trackSize: r, divider: n, moveDivider: o, dragSize: s }), t.$el[e.params.watchOverflow && e.isLocked ? "addClass" : "removeClass"](e.params.scrollbar.lockClass) } }, setDragPosition: function(e) { var t, a = this, i = a.scrollbar, s = a.rtlTranslate, r = i.$el, n = i.dragSize, o = i.trackSize; t = ((a.isHorizontal() ? "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX || e.clientX : "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY || e.clientY) - r.offset()[a.isHorizontal() ? "left" : "top"] - n / 2) / (o - n), t = Math.max(Math.min(t, 1), 0), s && (t = 1 - t); var l = a.minTranslate() + (a.maxTranslate() - a.minTranslate()) * t; a.updateProgress(l), a.setTranslate(l), a.updateActiveIndex(), a.updateSlidesClasses() }, onDragStart: function(e) { var t = this, a = t.params.scrollbar, i = t.scrollbar, s = t.$wrapperEl, r = i.$el, n = i.$dragEl; t.scrollbar.isTouched = !0, e.preventDefault(), e.stopPropagation(), s.transition(100), n.transition(100), i.setDragPosition(e), clearTimeout(t.scrollbar.dragTimeout), r.transition(0), a.hide && r.css("opacity", 1), t.emit("scrollbarDragStart", e) }, onDragMove: function(e) { var t = this.scrollbar, a = this.$wrapperEl, i = t.$el, s = t.$dragEl; this.scrollbar.isTouched && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, t.setDragPosition(e), a.transition(0), i.transition(0), s.transition(0), this.emit("scrollbarDragMove", e)) }, onDragEnd: function(e) { var t = this, a = t.params.scrollbar, i = t.scrollbar.$el; t.scrollbar.isTouched && (t.scrollbar.isTouched = !1, a.hide && (clearTimeout(t.scrollbar.dragTimeout), t.scrollbar.dragTimeout = V.nextTick(function() { i.css("opacity", 0), i.transition(400) }, 1e3)), t.emit("scrollbarDragEnd", e), a.snapOnRelease && t.slideToClosest()) }, enableDraggable: function() { var e = this; if (e.params.scrollbar.el) { var t = e.scrollbar, a = e.touchEventsTouch, i = e.touchEventsDesktop, s = e.params, r = t.$el[0], n = !(!F.passiveListener || !s.passiveListeners) && { passive: !1, capture: !1 }, o = !(!F.passiveListener || !s.passiveListeners) && { passive: !0, capture: !1 }; F.touch ? (r.addEventListener(a.start, e.scrollbar.onDragStart, n), r.addEventListener(a.move, e.scrollbar.onDragMove, n), r.addEventListener(a.end, e.scrollbar.onDragEnd, o)) : (r.addEventListener(i.start, e.scrollbar.onDragStart, n), f.addEventListener(i.move, e.scrollbar.onDragMove, n), f.addEventListener(i.end, e.scrollbar.onDragEnd, o)) } }, disableDraggable: function() { var e = this; if (e.params.scrollbar.el) { var t = e.scrollbar, a = e.touchEventsTouch, i = e.touchEventsDesktop, s = e.params, r = t.$el[0], n = !(!F.passiveListener || !s.passiveListeners) && { passive: !1, capture: !1 }, o = !(!F.passiveListener || !s.passiveListeners) && { passive: !0, capture: !1 }; F.touch ? (r.removeEventListener(a.start, e.scrollbar.onDragStart, n), r.removeEventListener(a.move, e.scrollbar.onDragMove, n), r.removeEventListener(a.end, e.scrollbar.onDragEnd, o)) : (r.removeEventListener(i.start, e.scrollbar.onDragStart, n), f.removeEventListener(i.move, e.scrollbar.onDragMove, n), f.removeEventListener(i.end, e.scrollbar.onDragEnd, o)) } }, init: function() { var e = this; if (e.params.scrollbar.el) { var t = e.scrollbar, a = e.$el, i = e.params.scrollbar, s = L(i.el); e.params.uniqueNavElements && "string" == typeof i.el && 1 < s.length && 1 === a.find(i.el).length && (s = a.find(i.el)); var r = s.find("." + e.params.scrollbar.dragClass); 0 === r.length && (r = L('
'), s.append(r)), V.extend(t, { $el: s, el: s[0], $dragEl: r, dragEl: r[0] }), i.draggable && t.enableDraggable() } }, destroy: function() { this.scrollbar.disableDraggable() } }, R = { setTransform: function(e, t) { var a = this.rtl, i = L(e), s = a ? -1 : 1, r = i.attr("data-swiper-parallax") || "0", n = i.attr("data-swiper-parallax-x"), o = i.attr("data-swiper-parallax-y"), l = i.attr("data-swiper-parallax-scale"), d = i.attr("data-swiper-parallax-opacity"); if (n || o ? (n = n || "0", o = o || "0") : this.isHorizontal() ? (n = r, o = "0") : (o = r, n = "0"), n = 0 <= n.indexOf("%") ? parseInt(n, 10) * t * s + "%" : n * t * s + "px", o = 0 <= o.indexOf("%") ? parseInt(o, 10) * t + "%" : o * t + "px", null != d) { var p = d - (d - 1) * (1 - Math.abs(t)); i[0].style.opacity = p } if (null == l) i.transform("translate3d(" + n + ", " + o + ", 0px)"); else { var c = l - (l - 1) * (1 - Math.abs(t)); i.transform("translate3d(" + n + ", " + o + ", 0px) scale(" + c + ")") } }, setTranslate: function() { var i = this, e = i.$el, t = i.slides, s = i.progress, r = i.snapGrid; e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(e, t) { i.parallax.setTransform(t, s) }), t.each(function(e, t) { var a = t.progress; 1 < i.params.slidesPerGroup && "auto" !== i.params.slidesPerView && (a += Math.ceil(e / 2) - s * (r.length - 1)), a = Math.min(Math.max(a, -1), 1), L(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(e, t) { i.parallax.setTransform(t, a) }) }) }, setTransition: function(s) { void 0 === s && (s = this.params.speed); this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(e, t) { var a = L(t), i = parseInt(a.attr("data-swiper-parallax-duration"), 10) || s; 0 === s && (i = 0), a.transition(i) }) } }, q = { getDistanceBetweenTouches: function(e) { if (e.targetTouches.length < 2) return 1; var t = e.targetTouches[0].pageX, a = e.targetTouches[0].pageY, i = e.targetTouches[1].pageX, s = e.targetTouches[1].pageY; return Math.sqrt(Math.pow(i - t, 2) + Math.pow(s - a, 2)) }, onGestureStart: function(e) { var t = this, a = t.params.zoom, i = t.zoom, s = i.gesture; if (i.fakeGestureTouched = !1, i.fakeGestureMoved = !1, !F.gestures) { if ("touchstart" !== e.type || "touchstart" === e.type && e.targetTouches.length < 2) return; i.fakeGestureTouched = !0, s.scaleStart = q.getDistanceBetweenTouches(e) } s.$slideEl && s.$slideEl.length || (s.$slideEl = L(e.target).closest(".swiper-slide"), 0 === s.$slideEl.length && (s.$slideEl = t.slides.eq(t.activeIndex)), s.$imageEl = s.$slideEl.find("img, svg, canvas"), s.$imageWrapEl = s.$imageEl.parent("." + a.containerClass), s.maxRatio = s.$imageWrapEl.attr("data-swiper-zoom") || a.maxRatio, 0 !== s.$imageWrapEl.length) ? (s.$imageEl.transition(0), t.zoom.isScaling = !0) : s.$imageEl = void 0 }, onGestureChange: function(e) { var t = this.params.zoom, a = this.zoom, i = a.gesture; if (!F.gestures) { if ("touchmove" !== e.type || "touchmove" === e.type && e.targetTouches.length < 2) return; a.fakeGestureMoved = !0, i.scaleMove = q.getDistanceBetweenTouches(e) } i.$imageEl && 0 !== i.$imageEl.length && (F.gestures ? this.zoom.scale = e.scale * a.currentScale : a.scale = i.scaleMove / i.scaleStart * a.currentScale, a.scale > i.maxRatio && (a.scale = i.maxRatio - 1 + Math.pow(a.scale - i.maxRatio + 1, .5)), a.scale < t.minRatio && (a.scale = t.minRatio + 1 - Math.pow(t.minRatio - a.scale + 1, .5)), i.$imageEl.transform("translate3d(0,0,0) scale(" + a.scale + ")")) }, onGestureEnd: function(e) { var t = this.params.zoom, a = this.zoom, i = a.gesture; if (!F.gestures) { if (!a.fakeGestureTouched || !a.fakeGestureMoved) return; if ("touchend" !== e.type || "touchend" === e.type && e.changedTouches.length < 2 && !m.android) return; a.fakeGestureTouched = !1, a.fakeGestureMoved = !1 } i.$imageEl && 0 !== i.$imageEl.length && (a.scale = Math.max(Math.min(a.scale, i.maxRatio), t.minRatio), i.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale(" + a.scale + ")"), a.currentScale = a.scale, a.isScaling = !1, 1 === a.scale && (i.$slideEl = void 0)) }, onTouchStart: function(e) { var t = this.zoom, a = t.gesture, i = t.image; a.$imageEl && 0 !== a.$imageEl.length && (i.isTouched || (m.android && e.preventDefault(), i.isTouched = !0, i.touchesStart.x = "touchstart" === e.type ? e.targetTouches[0].pageX : e.pageX, i.touchesStart.y = "touchstart" === e.type ? e.targetTouches[0].pageY : e.pageY)) }, onTouchMove: function(e) { var t = this, a = t.zoom, i = a.gesture, s = a.image, r = a.velocity; if (i.$imageEl && 0 !== i.$imageEl.length && (t.allowClick = !1, s.isTouched && i.$slideEl)) { s.isMoved || (s.width = i.$imageEl[0].offsetWidth, s.height = i.$imageEl[0].offsetHeight, s.startX = V.getTranslate(i.$imageWrapEl[0], "x") || 0, s.startY = V.getTranslate(i.$imageWrapEl[0], "y") || 0, i.slideWidth = i.$slideEl[0].offsetWidth, i.slideHeight = i.$slideEl[0].offsetHeight, i.$imageWrapEl.transition(0), t.rtl && (s.startX = -s.startX, s.startY = -s.startY)); var n = s.width * a.scale, o = s.height * a.scale; if (!(n < i.slideWidth && o < i.slideHeight)) { if (s.minX = Math.min(i.slideWidth / 2 - n / 2, 0), s.maxX = -s.minX, s.minY = Math.min(i.slideHeight / 2 - o / 2, 0), s.maxY = -s.minY, s.touchesCurrent.x = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, s.touchesCurrent.y = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, !s.isMoved && !a.isScaling) { if (t.isHorizontal() && (Math.floor(s.minX) === Math.floor(s.startX) && s.touchesCurrent.x < s.touchesStart.x || Math.floor(s.maxX) === Math.floor(s.startX) && s.touchesCurrent.x > s.touchesStart.x)) return void(s.isTouched = !1); if (!t.isHorizontal() && (Math.floor(s.minY) === Math.floor(s.startY) && s.touchesCurrent.y < s.touchesStart.y || Math.floor(s.maxY) === Math.floor(s.startY) && s.touchesCurrent.y > s.touchesStart.y)) return void(s.isTouched = !1) } e.preventDefault(), e.stopPropagation(), s.isMoved = !0, s.currentX = s.touchesCurrent.x - s.touchesStart.x + s.startX, s.currentY = s.touchesCurrent.y - s.touchesStart.y + s.startY, s.currentX < s.minX && (s.currentX = s.minX + 1 - Math.pow(s.minX - s.currentX + 1, .8)), s.currentX > s.maxX && (s.currentX = s.maxX - 1 + Math.pow(s.currentX - s.maxX + 1, .8)), s.currentY < s.minY && (s.currentY = s.minY + 1 - Math.pow(s.minY - s.currentY + 1, .8)), s.currentY > s.maxY && (s.currentY = s.maxY - 1 + Math.pow(s.currentY - s.maxY + 1, .8)), r.prevPositionX || (r.prevPositionX = s.touchesCurrent.x), r.prevPositionY || (r.prevPositionY = s.touchesCurrent.y), r.prevTime || (r.prevTime = Date.now()), r.x = (s.touchesCurrent.x - r.prevPositionX) / (Date.now() - r.prevTime) / 2, r.y = (s.touchesCurrent.y - r.prevPositionY) / (Date.now() - r.prevTime) / 2, Math.abs(s.touchesCurrent.x - r.prevPositionX) < 2 && (r.x = 0), Math.abs(s.touchesCurrent.y - r.prevPositionY) < 2 && (r.y = 0), r.prevPositionX = s.touchesCurrent.x, r.prevPositionY = s.touchesCurrent.y, r.prevTime = Date.now(), i.$imageWrapEl.transform("translate3d(" + s.currentX + "px, " + s.currentY + "px,0)") } } }, onTouchEnd: function() { var e = this.zoom, t = e.gesture, a = e.image, i = e.velocity; if (t.$imageEl && 0 !== t.$imageEl.length) { if (!a.isTouched || !a.isMoved) return a.isTouched = !1, void(a.isMoved = !1); a.isTouched = !1, a.isMoved = !1; var s = 300, r = 300, n = i.x * s, o = a.currentX + n, l = i.y * r, d = a.currentY + l; 0 !== i.x && (s = Math.abs((o - a.currentX) / i.x)), 0 !== i.y && (r = Math.abs((d - a.currentY) / i.y)); var p = Math.max(s, r); a.currentX = o, a.currentY = d; var c = a.width * e.scale, u = a.height * e.scale; a.minX = Math.min(t.slideWidth / 2 - c / 2, 0), a.maxX = -a.minX, a.minY = Math.min(t.slideHeight / 2 - u / 2, 0), a.maxY = -a.minY, a.currentX = Math.max(Math.min(a.currentX, a.maxX), a.minX), a.currentY = Math.max(Math.min(a.currentY, a.maxY), a.minY), t.$imageWrapEl.transition(p).transform("translate3d(" + a.currentX + "px, " + a.currentY + "px,0)") } }, onTransitionEnd: function() { var e = this.zoom, t = e.gesture; t.$slideEl && this.previousIndex !== this.activeIndex && (t.$imageEl.transform("translate3d(0,0,0) scale(1)"), t.$imageWrapEl.transform("translate3d(0,0,0)"), t.$slideEl = void 0, t.$imageEl = void 0, t.$imageWrapEl = void 0, e.scale = 1, e.currentScale = 1) }, toggle: function(e) { var t = this.zoom; t.scale && 1 !== t.scale ? t.out() : t.in(e) }, in : function(e) { var t, a, i, s, r, n, o, l, d, p, c, u, h, v, f, m, g = this, b = g.zoom, w = g.params.zoom, y = b.gesture, x = b.image; (y.$slideEl || (y.$slideEl = g.clickedSlide ? L(g.clickedSlide) : g.slides.eq(g.activeIndex), y.$imageEl = y.$slideEl.find("img, svg, canvas"), y.$imageWrapEl = y.$imageEl.parent("." + w.containerClass)), y.$imageEl && 0 !== y.$imageEl.length) && (y.$slideEl.addClass("" + w.zoomedSlideClass), void 0 === x.touchesStart.x && e ? (t = "touchend" === e.type ? e.changedTouches[0].pageX : e.pageX, a = "touchend" === e.type ? e.changedTouches[0].pageY : e.pageY) : (t = x.touchesStart.x, a = x.touchesStart.y), b.scale = y.$imageWrapEl.attr("data-swiper-zoom") || w.maxRatio, b.currentScale = y.$imageWrapEl.attr("data-swiper-zoom") || w.maxRatio, e ? (f = y.$slideEl[0].offsetWidth, m = y.$slideEl[0].offsetHeight, i = y.$slideEl.offset().left + f / 2 - t, s = y.$slideEl.offset().top + m / 2 - a, o = y.$imageEl[0].offsetWidth, l = y.$imageEl[0].offsetHeight, d = o * b.scale, p = l * b.scale, h = -(c = Math.min(f / 2 - d / 2, 0)), v = -(u = Math.min(m / 2 - p / 2, 0)), (r = i * b.scale) < c && (r = c), h < r && (r = h), (n = s * b.scale) < u && (n = u), v < n && (n = v)) : n = r = 0, y.$imageWrapEl.transition(300).transform("translate3d(" + r + "px, " + n + "px,0)"), y.$imageEl.transition(300).transform("translate3d(0,0,0) scale(" + b.scale + ")")) }, out: function() { var e = this, t = e.zoom, a = e.params.zoom, i = t.gesture; i.$slideEl || (i.$slideEl = e.clickedSlide ? L(e.clickedSlide) : e.slides.eq(e.activeIndex), i.$imageEl = i.$slideEl.find("img, svg, canvas"), i.$imageWrapEl = i.$imageEl.parent("." + a.containerClass)), i.$imageEl && 0 !== i.$imageEl.length && (t.scale = 1, t.currentScale = 1, i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"), i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"), i.$slideEl.removeClass("" + a.zoomedSlideClass), i.$slideEl = void 0) }, enable: function() { var e = this, t = e.zoom; if (!t.enabled) { t.enabled = !0; var a = !("touchstart" !== e.touchEvents.start || !F.passiveListener || !e.params.passiveListeners) && { passive: !0, capture: !1 }; F.gestures ? (e.$wrapperEl.on("gesturestart", ".swiper-slide", t.onGestureStart, a), e.$wrapperEl.on("gesturechange", ".swiper-slide", t.onGestureChange, a), e.$wrapperEl.on("gestureend", ".swiper-slide", t.onGestureEnd, a)) : "touchstart" === e.touchEvents.start && (e.$wrapperEl.on(e.touchEvents.start, ".swiper-slide", t.onGestureStart, a), e.$wrapperEl.on(e.touchEvents.move, ".swiper-slide", t.onGestureChange, a), e.$wrapperEl.on(e.touchEvents.end, ".swiper-slide", t.onGestureEnd, a)), e.$wrapperEl.on(e.touchEvents.move, "." + e.params.zoom.containerClass, t.onTouchMove) } }, disable: function() { var e = this, t = e.zoom; if (t.enabled) { e.zoom.enabled = !1; var a = !("touchstart" !== e.touchEvents.start || !F.passiveListener || !e.params.passiveListeners) && { passive: !0, capture: !1 }; F.gestures ? (e.$wrapperEl.off("gesturestart", ".swiper-slide", t.onGestureStart, a), e.$wrapperEl.off("gesturechange", ".swiper-slide", t.onGestureChange, a), e.$wrapperEl.off("gestureend", ".swiper-slide", t.onGestureEnd, a)) : "touchstart" === e.touchEvents.start && (e.$wrapperEl.off(e.touchEvents.start, ".swiper-slide", t.onGestureStart, a), e.$wrapperEl.off(e.touchEvents.move, ".swiper-slide", t.onGestureChange, a), e.$wrapperEl.off(e.touchEvents.end, ".swiper-slide", t.onGestureEnd, a)), e.$wrapperEl.off(e.touchEvents.move, "." + e.params.zoom.containerClass, t.onTouchMove) } } }, W = { loadInSlide: function(e, l) { void 0 === l && (l = !0); var d = this, p = d.params.lazy; if (void 0 !== e && 0 !== d.slides.length) { var c = d.virtual && d.params.virtual.enabled ? d.$wrapperEl.children("." + d.params.slideClass + '[data-swiper-slide-index="' + e + '"]') : d.slides.eq(e), t = c.find("." + p.elementClass + ":not(." + p.loadedClass + "):not(." + p.loadingClass + ")"); !c.hasClass(p.elementClass) || c.hasClass(p.loadedClass) || c.hasClass(p.loadingClass) || (t = t.add(c[0])), 0 !== t.length && t.each(function(e, t) { var i = L(t); i.addClass(p.loadingClass); var s = i.attr("data-background"), r = i.attr("data-src"), n = i.attr("data-srcset"), o = i.attr("data-sizes"); d.loadImage(i[0], r || s, n, o, !1, function() { if (null != d && d && (!d || d.params) && !d.destroyed) { if (s ? (i.css("background-image", 'url("' + s + '")'), i.removeAttr("data-background")) : (n && (i.attr("srcset", n), i.removeAttr("data-srcset")), o && (i.attr("sizes", o), i.removeAttr("data-sizes")), r && (i.attr("src", r), i.removeAttr("data-src"))), i.addClass(p.loadedClass).removeClass(p.loadingClass), c.find("." + p.preloaderClass).remove(), d.params.loop && l) { var e = c.attr("data-swiper-slide-index"); if (c.hasClass(d.params.slideDuplicateClass)) { var t = d.$wrapperEl.children('[data-swiper-slide-index="' + e + '"]:not(.' + d.params.slideDuplicateClass + ")"); d.lazy.loadInSlide(t.index(), !1) } else { var a = d.$wrapperEl.children("." + d.params.slideDuplicateClass + '[data-swiper-slide-index="' + e + '"]'); d.lazy.loadInSlide(a.index(), !1) } } d.emit("lazyImageReady", c[0], i[0]) } }), d.emit("lazyImageLoad", c[0], i[0]) }) } }, load: function() { var i = this, t = i.$wrapperEl, a = i.params, s = i.slides, e = i.activeIndex, r = i.virtual && a.virtual.enabled, n = a.lazy, o = a.slidesPerView; function l(e) { if (r) { if (t.children("." + a.slideClass + '[data-swiper-slide-index="' + e + '"]').length) return !0 } else if (s[e]) return !0; return !1 } function d(e) { return r ? L(e).attr("data-swiper-slide-index") : L(e).index() } if ("auto" === o && (o = 0), i.lazy.initialImageLoaded || (i.lazy.initialImageLoaded = !0), i.params.watchSlidesVisibility) t.children("." + a.slideVisibleClass).each(function(e, t) { var a = r ? L(t).attr("data-swiper-slide-index") : L(t).index(); i.lazy.loadInSlide(a) }); else if (1 < o) for (var p = e; p < e + o; p += 1) l(p) && i.lazy.loadInSlide(p); else i.lazy.loadInSlide(e); if (n.loadPrevNext) if (1 < o || n.loadPrevNextAmount && 1 < n.loadPrevNextAmount) { for (var c = n.loadPrevNextAmount, u = o, h = Math.min(e + u + Math.max(c, u), s.length), v = Math.max(e - Math.max(u, c), 0), f = e + o; f < h; f += 1) l(f) && i.lazy.loadInSlide(f); for (var m = v; m < e; m += 1) l(m) && i.lazy.loadInSlide(m) } else { var g = t.children("." + a.slideNextClass); 0 < g.length && i.lazy.loadInSlide(d(g)); var b = t.children("." + a.slidePrevClass); 0 < b.length && i.lazy.loadInSlide(d(b)) } } }, j = { LinearSpline: function(e, t) { var a, i, s, r, n, o = function(e, t) { for (i = -1, a = e.length; 1 < a - i;) e[s = a + i >> 1] <= t ? i = s : a = s; return a }; return this.x = e, this.y = t, this.lastIndex = e.length - 1, this.interpolate = function(e) { return e ? (n = o(this.x, e), r = n - 1, (e - this.x[r]) * (this.y[n] - this.y[r]) / (this.x[n] - this.x[r]) + this.y[r]) : 0 }, this }, getInterpolateFunction: function(e) { var t = this; t.controller.spline || (t.controller.spline = t.params.loop ? new j.LinearSpline(t.slidesGrid, e.slidesGrid) : new j.LinearSpline(t.snapGrid, e.snapGrid)) }, setTranslate: function(e, t) { var a, i, s = this, r = s.controller.control; function n(e) { var t = s.rtlTranslate ? -s.translate : s.translate; "slide" === s.params.controller.by && (s.controller.getInterpolateFunction(e), i = -s.controller.spline.interpolate(-t)), i && "container" !== s.params.controller.by || (a = (e.maxTranslate() - e.minTranslate()) / (s.maxTranslate() - s.minTranslate()), i = (t - s.minTranslate()) * a + e.minTranslate()), s.params.controller.inverse && (i = e.maxTranslate() - i), e.updateProgress(i), e.setTranslate(i, s), e.updateActiveIndex(), e.updateSlidesClasses() } if (Array.isArray(r)) for (var o = 0; o < r.length; o += 1) r[o] !== t && r[o] instanceof S && n(r[o]); else r instanceof S && t !== r && n(r) }, setTransition: function(t, e) { var a, i = this, s = i.controller.control; function r(e) { e.setTransition(t, i), 0 !== t && (e.transitionStart(), e.params.autoHeight && V.nextTick(function() { e.updateAutoHeight() }), e.$wrapperEl.transitionEnd(function() { s && (e.params.loop && "slide" === i.params.controller.by && e.loopFix(), e.transitionEnd()) })) } if (Array.isArray(s)) for (a = 0; a < s.length; a += 1) s[a] !== e && s[a] instanceof S && r(s[a]); else s instanceof S && e !== s && r(s) } }, U = { makeElFocusable: function(e) { return e.attr("tabIndex", "0"), e }, addElRole: function(e, t) { return e.attr("role", t), e }, addElLabel: function(e, t) { return e.attr("aria-label", t), e }, disableEl: function(e) { return e.attr("aria-disabled", !0), e }, enableEl: function(e) { return e.attr("aria-disabled", !1), e }, onEnterKey: function(e) { var t = this, a = t.params.a11y; if (13 === e.keyCode) { var i = L(e.target); t.navigation && t.navigation.$nextEl && i.is(t.navigation.$nextEl) && (t.isEnd && !t.params.loop || t.slideNext(), t.isEnd ? t.a11y.notify(a.lastSlideMessage) : t.a11y.notify(a.nextSlideMessage)), t.navigation && t.navigation.$prevEl && i.is(t.navigation.$prevEl) && (t.isBeginning && !t.params.loop || t.slidePrev(), t.isBeginning ? t.a11y.notify(a.firstSlideMessage) : t.a11y.notify(a.prevSlideMessage)), t.pagination && i.is("." + t.params.pagination.bulletClass) && i[0].click() } }, notify: function(e) { var t = this.a11y.liveRegion; 0 !== t.length && (t.html(""), t.html(e)) }, updateNavigation: function() { var e = this; if (!e.params.loop) { var t = e.navigation, a = t.$nextEl, i = t.$prevEl; i && 0 < i.length && (e.isBeginning ? e.a11y.disableEl(i) : e.a11y.enableEl(i)), a && 0 < a.length && (e.isEnd ? e.a11y.disableEl(a) : e.a11y.enableEl(a)) } }, updatePagination: function() { var i = this, s = i.params.a11y; i.pagination && i.params.pagination.clickable && i.pagination.bullets && i.pagination.bullets.length && i.pagination.bullets.each(function(e, t) { var a = L(t); i.a11y.makeElFocusable(a), i.a11y.addElRole(a, "button"), i.a11y.addElLabel(a, s.paginationBulletMessage.replace(/{{index}}/, a.index() + 1)) }) }, init: function() { var e = this; e.$el.append(e.a11y.liveRegion); var t, a, i = e.params.a11y; e.navigation && e.navigation.$nextEl && (t = e.navigation.$nextEl), e.navigation && e.navigation.$prevEl && (a = e.navigation.$prevEl), t && (e.a11y.makeElFocusable(t), e.a11y.addElRole(t, "button"), e.a11y.addElLabel(t, i.nextSlideMessage), t.on("keydown", e.a11y.onEnterKey)), a && (e.a11y.makeElFocusable(a), e.a11y.addElRole(a, "button"), e.a11y.addElLabel(a, i.prevSlideMessage), a.on("keydown", e.a11y.onEnterKey)), e.pagination && e.params.pagination.clickable && e.pagination.bullets && e.pagination.bullets.length && e.pagination.$el.on("keydown", "." + e.params.pagination.bulletClass, e.a11y.onEnterKey) }, destroy: function() { var e, t, a = this; a.a11y.liveRegion && 0 < a.a11y.liveRegion.length && a.a11y.liveRegion.remove(), a.navigation && a.navigation.$nextEl && (e = a.navigation.$nextEl), a.navigation && a.navigation.$prevEl && (t = a.navigation.$prevEl), e && e.off("keydown", a.a11y.onEnterKey), t && t.off("keydown", a.a11y.onEnterKey), a.pagination && a.params.pagination.clickable && a.pagination.bullets && a.pagination.bullets.length && a.pagination.$el.off("keydown", "." + a.params.pagination.bulletClass, a.a11y.onEnterKey) } }, K = { init: function() { var e = this; if (e.params.history) { if (!Y.history || !Y.history.pushState) return e.params.history.enabled = !1, void(e.params.hashNavigation.enabled = !0); var t = e.history; t.initialized = !0, t.paths = K.getPathValues(), (t.paths.key || t.paths.value) && (t.scrollToSlide(0, t.paths.value, e.params.runCallbacksOnInit), e.params.history.replaceState || Y.addEventListener("popstate", e.history.setHistoryPopState)) } }, destroy: function() { this.params.history.replaceState || Y.removeEventListener("popstate", this.history.setHistoryPopState) }, setHistoryPopState: function() { this.history.paths = K.getPathValues(), this.history.scrollToSlide(this.params.speed, this.history.paths.value, !1) }, getPathValues: function() { var e = Y.location.pathname.slice(1).split("/").filter(function(e) { return "" !== e }), t = e.length; return { key: e[t - 2], value: e[t - 1] } }, setHistory: function(e, t) { if (this.history.initialized && this.params.history.enabled) { var a = this.slides.eq(t), i = K.slugify(a.attr("data-history")); Y.location.pathname.includes(e) || (i = e + "/" + i); var s = Y.history.state; s && s.value === i || (this.params.history.replaceState ? Y.history.replaceState({ value: i }, null, i) : Y.history.pushState({ value: i }, null, i)) } }, slugify: function(e) { return e.toString().toLowerCase().replace(/\s+/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, "") }, scrollToSlide: function(e, t, a) { var i = this; if (t) for (var s = 0, r = i.slides.length; s < r; s += 1) { var n = i.slides.eq(s); if (K.slugify(n.attr("data-history")) === t && !n.hasClass(i.params.slideDuplicateClass)) { var o = n.index(); i.slideTo(o, e, a) } } else i.slideTo(0, e, a) } }, _ = { onHashCange: function() { var e = this, t = f.location.hash.replace("#", ""); if (t !== e.slides.eq(e.activeIndex).attr("data-hash")) { var a = e.$wrapperEl.children("." + e.params.slideClass + '[data-hash="' + t + '"]').index(); if (void 0 === a) return; e.slideTo(a) } }, setHash: function() { var e = this; if (e.hashNavigation.initialized && e.params.hashNavigation.enabled) if (e.params.hashNavigation.replaceState && Y.history && Y.history.replaceState) Y.history.replaceState(null, null, "#" + e.slides.eq(e.activeIndex).attr("data-hash") || ""); else { var t = e.slides.eq(e.activeIndex), a = t.attr("data-hash") || t.attr("data-history"); f.location.hash = a || "" } }, init: function() { var e = this; if (!(!e.params.hashNavigation.enabled || e.params.history && e.params.history.enabled)) { e.hashNavigation.initialized = !0; var t = f.location.hash.replace("#", ""); if (t) for (var a = 0, i = e.slides.length; a < i; a += 1) { var s = e.slides.eq(a); if ((s.attr("data-hash") || s.attr("data-history")) === t && !s.hasClass(e.params.slideDuplicateClass)) { var r = s.index(); e.slideTo(r, 0, e.params.runCallbacksOnInit, !0) } } e.params.hashNavigation.watchState && L(Y).on("hashchange", e.hashNavigation.onHashCange) } }, destroy: function() { this.params.hashNavigation.watchState && L(Y).off("hashchange", this.hashNavigation.onHashCange) } }, Z = { run: function() { var e = this, t = e.slides.eq(e.activeIndex), a = e.params.autoplay.delay; t.attr("data-swiper-autoplay") && (a = t.attr("data-swiper-autoplay") || e.params.autoplay.delay), e.autoplay.timeout = V.nextTick(function() { e.params.autoplay.reverseDirection ? e.params.loop ? (e.loopFix(), e.slidePrev(e.params.speed, !0, !0), e.emit("autoplay")) : e.isBeginning ? e.params.autoplay.stopOnLastSlide ? e.autoplay.stop() : (e.slideTo(e.slides.length - 1, e.params.speed, !0, !0), e.emit("autoplay")) : (e.slidePrev(e.params.speed, !0, !0), e.emit("autoplay")) : e.params.loop ? (e.loopFix(), e.slideNext(e.params.speed, !0, !0), e.emit("autoplay")) : e.isEnd ? e.params.autoplay.stopOnLastSlide ? e.autoplay.stop() : (e.slideTo(0, e.params.speed, !0, !0), e.emit("autoplay")) : (e.slideNext(e.params.speed, !0, !0), e.emit("autoplay")) }, a) }, start: function() { var e = this; return void 0 === e.autoplay.timeout && (!e.autoplay.running && (e.autoplay.running = !0, e.emit("autoplayStart"), e.autoplay.run(), !0)) }, stop: function() { var e = this; return !!e.autoplay.running && (void 0 !== e.autoplay.timeout && (e.autoplay.timeout && (clearTimeout(e.autoplay.timeout), e.autoplay.timeout = void 0), e.autoplay.running = !1, e.emit("autoplayStop"), !0)) }, pause: function(e) { var t = this; t.autoplay.running && (t.autoplay.paused || (t.autoplay.timeout && clearTimeout(t.autoplay.timeout), t.autoplay.paused = !0, 0 !== e && t.params.autoplay.waitForTransition ? (t.$wrapperEl[0].addEventListener("transitionend", t.autoplay.onTransitionEnd), t.$wrapperEl[0].addEventListener("webkitTransitionEnd", t.autoplay.onTransitionEnd)) : (t.autoplay.paused = !1, t.autoplay.run()))) } }, Q = { setTranslate: function() { for (var e = this, t = e.slides, a = 0; a < t.length; a += 1) { var i = e.slides.eq(a), s = -i[0].swiperSlideOffset; e.params.virtualTranslate || (s -= e.translate); var r = 0; e.isHorizontal() || (r = s, s = 0); var n = e.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(i[0].progress), 0) : 1 + Math.min(Math.max(i[0].progress, -1), 0); i.css({ opacity: n }).transform("translate3d(" + s + "px, " + r + "px, 0px)") } }, setTransition: function(e) { var a = this, t = a.slides, i = a.$wrapperEl; if (t.transition(e), a.params.virtualTranslate && 0 !== e) { var s = !1; t.transitionEnd(function() { if (!s && a && !a.destroyed) { s = !0, a.animating = !1; for (var e = ["webkitTransitionEnd", "transitionend"], t = 0; t < e.length; t += 1) i.trigger(e[t]) } }) } } }, J = { setTranslate: function() { var e, t = this, a = t.$el, i = t.$wrapperEl, s = t.slides, r = t.width, n = t.height, o = t.rtlTranslate, l = t.size, d = t.params.cubeEffect, p = t.isHorizontal(), c = t.virtual && t.params.virtual.enabled, u = 0; d.shadow && (p ? (0 === (e = i.find(".swiper-cube-shadow")).length && (e = L('
'), i.append(e)), e.css({ height: r + "px" })) : 0 === (e = a.find(".swiper-cube-shadow")).length && (e = L('
'), a.append(e))); for (var h = 0; h < s.length; h += 1) { var v = s.eq(h), f = h; c && (f = parseInt(v.attr("data-swiper-slide-index"), 10)); var m = 90 * f, g = Math.floor(m / 360); o && (m = -m, g = Math.floor(-m / 360)); var b = Math.max(Math.min(v[0].progress, 1), -1), w = 0, y = 0, x = 0; f % 4 == 0 ? (w = 4 * -g * l, x = 0) : (f - 1) % 4 == 0 ? (w = 0, x = 4 * -g * l) : (f - 2) % 4 == 0 ? (w = l + 4 * g * l, x = l) : (f - 3) % 4 == 0 && (w = -l, x = 3 * l + 4 * l * g), o && (w = -w), p || (y = w, w = 0); var T = "rotateX(" + (p ? 0 : -m) + "deg) rotateY(" + (p ? m : 0) + "deg) translate3d(" + w + "px, " + y + "px, " + x + "px)"; if (b <= 1 && -1 < b && (u = 90 * f + 90 * b, o && (u = 90 * -f - 90 * b)), v.transform(T), d.slideShadows) { var E = p ? v.find(".swiper-slide-shadow-left") : v.find(".swiper-slide-shadow-top"), S = p ? v.find(".swiper-slide-shadow-right") : v.find(".swiper-slide-shadow-bottom"); 0 === E.length && (E = L('
'), v.append(E)), 0 === S.length && (S = L('
'), v.append(S)), E.length && (E[0].style.opacity = Math.max(-b, 0)), S.length && (S[0].style.opacity = Math.max(b, 0)) } } if (i.css({ "-webkit-transform-origin": "50% 50% -" + l / 2 + "px", "-moz-transform-origin": "50% 50% -" + l / 2 + "px", "-ms-transform-origin": "50% 50% -" + l / 2 + "px", "transform-origin": "50% 50% -" + l / 2 + "px" }), d.shadow) if (p) e.transform("translate3d(0px, " + (r / 2 + d.shadowOffset) + "px, " + -r / 2 + "px) rotateX(90deg) rotateZ(0deg) scale(" + d.shadowScale + ")"); else { var C = Math.abs(u) - 90 * Math.floor(Math.abs(u) / 90), M = 1.5 - (Math.sin(2 * C * Math.PI / 360) / 2 + Math.cos(2 * C * Math.PI / 360) / 2), k = d.shadowScale, P = d.shadowScale / M, z = d.shadowOffset; e.transform("scale3d(" + k + ", 1, " + P + ") translate3d(0px, " + (n / 2 + z) + "px, " + -n / 2 / P + "px) rotateX(-90deg)") } var $ = I.isSafari || I.isUiWebView ? -l / 2 : 0; i.transform("translate3d(0px,0," + $ + "px) rotateX(" + (t.isHorizontal() ? 0 : u) + "deg) rotateY(" + (t.isHorizontal() ? -u : 0) + "deg)") }, setTransition: function(e) { var t = this.$el; this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), this.params.cubeEffect.shadow && !this.isHorizontal() && t.find(".swiper-cube-shadow").transition(e) } }, ee = { setTranslate: function() { for (var e = this, t = e.slides, a = e.rtlTranslate, i = 0; i < t.length; i += 1) { var s = t.eq(i), r = s[0].progress; e.params.flipEffect.limitRotation && (r = Math.max(Math.min(s[0].progress, 1), -1)); var n = -180 * r, o = 0, l = -s[0].swiperSlideOffset, d = 0; if (e.isHorizontal() ? a && (n = -n) : (d = l, o = -n, n = l = 0), s[0].style.zIndex = -Math.abs(Math.round(r)) + t.length, e.params.flipEffect.slideShadows) { var p = e.isHorizontal() ? s.find(".swiper-slide-shadow-left") : s.find(".swiper-slide-shadow-top"), c = e.isHorizontal() ? s.find(".swiper-slide-shadow-right") : s.find(".swiper-slide-shadow-bottom"); 0 === p.length && (p = L('
'), s.append(p)), 0 === c.length && (c = L('
'), s.append(c)), p.length && (p[0].style.opacity = Math.max(-r, 0)), c.length && (c[0].style.opacity = Math.max(r, 0)) } s.transform("translate3d(" + l + "px, " + d + "px, 0px) rotateX(" + o + "deg) rotateY(" + n + "deg)") } }, setTransition: function(e) { var a = this, t = a.slides, i = a.activeIndex, s = a.$wrapperEl; if (t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), a.params.virtualTranslate && 0 !== e) { var r = !1; t.eq(i).transitionEnd(function() { if (!r && a && !a.destroyed) { r = !0, a.animating = !1; for (var e = ["webkitTransitionEnd", "transitionend"], t = 0; t < e.length; t += 1) s.trigger(e[t]) } }) } } }, te = { setTranslate: function() { for (var e = this, t = e.width, a = e.height, i = e.slides, s = e.$wrapperEl, r = e.slidesSizesGrid, n = e.params.coverflowEffect, o = e.isHorizontal(), l = e.translate, d = o ? t / 2 - l : a / 2 - l, p = o ? n.rotate : -n.rotate, c = n.depth, u = 0, h = i.length; u < h; u += 1) { var v = i.eq(u), f = r[u], m = (d - v[0].swiperSlideOffset - f / 2) / f * n.modifier, g = o ? p * m : 0, b = o ? 0 : p * m, w = -c * Math.abs(m), y = o ? 0 : n.stretch * m, x = o ? n.stretch * m : 0; Math.abs(x) < .001 && (x = 0), Math.abs(y) < .001 && (y = 0), Math.abs(w) < .001 && (w = 0), Math.abs(g) < .001 && (g = 0), Math.abs(b) < .001 && (b = 0); var T = "translate3d(" + x + "px," + y + "px," + w + "px) rotateX(" + b + "deg) rotateY(" + g + "deg)"; if (v.transform(T), v[0].style.zIndex = 1 - Math.abs(Math.round(m)), n.slideShadows) { var E = o ? v.find(".swiper-slide-shadow-left") : v.find(".swiper-slide-shadow-top"), S = o ? v.find(".swiper-slide-shadow-right") : v.find(".swiper-slide-shadow-bottom"); 0 === E.length && (E = L('
'), v.append(E)), 0 === S.length && (S = L('
'), v.append(S)), E.length && (E[0].style.opacity = 0 < m ? m : 0), S.length && (S[0].style.opacity = 0 < -m ? -m : 0) } }(F.pointerEvents || F.prefixedPointerEvents) && (s[0].style.perspectiveOrigin = d + "px 50%") }, setTransition: function(e) { this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e) } }, ae = { init: function() { var e = this, t = e.params.thumbs, a = e.constructor; t.swiper instanceof a ? (e.thumbs.swiper = t.swiper, V.extend(e.thumbs.swiper.originalParams, { watchSlidesProgress: !0, slideToClickedSlide: !1 }), V.extend(e.thumbs.swiper.params, { watchSlidesProgress: !0, slideToClickedSlide: !1 })) : V.isObject(t.swiper) && (e.thumbs.swiper = new a(V.extend({}, t.swiper, { watchSlidesVisibility: !0, watchSlidesProgress: !0, slideToClickedSlide: !1 })), e.thumbs.swiperCreated = !0), e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass), e.thumbs.swiper.on("tap", e.thumbs.onThumbClick) }, onThumbClick: function() { var e = this, t = e.thumbs.swiper; if (t) { var a = t.clickedIndex, i = t.clickedSlide; if (!(i && L(i).hasClass(e.params.thumbs.slideThumbActiveClass) || null == a)) { var s; if (s = t.params.loop ? parseInt(L(t.clickedSlide).attr("data-swiper-slide-index"), 10) : a, e.params.loop) { var r = e.activeIndex; e.slides.eq(r).hasClass(e.params.slideDuplicateClass) && (e.loopFix(), e._clientLeft = e.$wrapperEl[0].clientLeft, r = e.activeIndex); var n = e.slides.eq(r).prevAll('[data-swiper-slide-index="' + s + '"]').eq(0).index(), o = e.slides.eq(r).nextAll('[data-swiper-slide-index="' + s + '"]').eq(0).index(); s = void 0 === n ? o : void 0 === o ? n : o - r < r - n ? o : n } e.slideTo(s) } } }, update: function(e) { var t = this, a = t.thumbs.swiper; if (a) { var i = "auto" === a.params.slidesPerView ? a.slidesPerViewDynamic() : a.params.slidesPerView; if (t.realIndex !== a.realIndex) { var s, r = a.activeIndex; if (a.params.loop) { a.slides.eq(r).hasClass(a.params.slideDuplicateClass) && (a.loopFix(), a._clientLeft = a.$wrapperEl[0].clientLeft, r = a.activeIndex); var n = a.slides.eq(r).prevAll('[data-swiper-slide-index="' + t.realIndex + '"]').eq(0).index(), o = a.slides.eq(r).nextAll('[data-swiper-slide-index="' + t.realIndex + '"]').eq(0).index(); s = void 0 === n ? o : void 0 === o ? n : o - r == r - n ? r : o - r < r - n ? o : n } else s = t.realIndex; a.visibleSlidesIndexes.indexOf(s) < 0 && (a.params.centeredSlides ? s = r < s ? s - Math.floor(i / 2) + 1 : s + Math.floor(i / 2) - 1 : r < s && (s = s - i + 1), a.slideTo(s, e ? 0 : void 0)) } var l = 1, d = t.params.thumbs.slideThumbActiveClass; if (1 < t.params.slidesPerView && !t.params.centeredSlides && (l = t.params.slidesPerView), a.slides.removeClass(d), a.params.loop) for (var p = 0; p < l; p += 1) a.$wrapperEl.children('[data-swiper-slide-index="' + (t.realIndex + p) + '"]').addClass(d); else for (var c = 0; c < l; c += 1) a.slides.eq(t.realIndex + c).addClass(d) } } }, ie = [C, M, k, P, $, O, N, { name: "mousewheel", params: { mousewheel: { enabled: !1, releaseOnEdges: !1, invert: !1, forceToAxis: !1, sensitivity: 1, eventsTarged: "container" } }, create: function() { var e = this; V.extend(e, { mousewheel: { enabled: !1, enable: H.enable.bind(e), disable: H.disable.bind(e), handle: H.handle.bind(e), handleMouseEnter: H.handleMouseEnter.bind(e), handleMouseLeave: H.handleMouseLeave.bind(e), lastScrollTime: V.now() } }) }, on: { init: function() { this.params.mousewheel.enabled && this.mousewheel.enable() }, destroy: function() { this.mousewheel.enabled && this.mousewheel.disable() } } }, { name: "navigation", params: { navigation: { nextEl: null, prevEl: null, hideOnClick: !1, disabledClass: "swiper-button-disabled", hiddenClass: "swiper-button-hidden", lockClass: "swiper-button-lock" } }, create: function() { var e = this; V.extend(e, { navigation: { init: G.init.bind(e), update: G.update.bind(e), destroy: G.destroy.bind(e), onNextClick: G.onNextClick.bind(e), onPrevClick: G.onPrevClick.bind(e) } }) }, on: { init: function() { this.navigation.init(), this.navigation.update() }, toEdge: function() { this.navigation.update() }, fromEdge: function() { this.navigation.update() }, destroy: function() { this.navigation.destroy() }, click: function(e) { var t = this.navigation, a = t.$nextEl, i = t.$prevEl; !this.params.navigation.hideOnClick || L(e.target).is(i) || L(e.target).is(a) || (a && a.toggleClass(this.params.navigation.hiddenClass), i && i.toggleClass(this.params.navigation.hiddenClass)) } } }, { name: "pagination", params: { pagination: { el: null, bulletElement: "span", clickable: !1, hideOnClick: !1, renderBullet: null, renderProgressbar: null, renderFraction: null, renderCustom: null, progressbarOpposite: !1, type: "bullets", dynamicBullets: !1, dynamicMainBullets: 1, formatFractionCurrent: function(e) { return e }, formatFractionTotal: function(e) { return e }, bulletClass: "swiper-pagination-bullet", bulletActiveClass: "swiper-pagination-bullet-active", modifierClass: "swiper-pagination-", currentClass: "swiper-pagination-current", totalClass: "swiper-pagination-total", hiddenClass: "swiper-pagination-hidden", progressbarFillClass: "swiper-pagination-progressbar-fill", progressbarOppositeClass: "swiper-pagination-progressbar-opposite", clickableClass: "swiper-pagination-clickable", lockClass: "swiper-pagination-lock" } }, create: function() { var e = this; V.extend(e, { pagination: { init: B.init.bind(e), render: B.render.bind(e), update: B.update.bind(e), destroy: B.destroy.bind(e), dynamicBulletIndex: 0 } }) }, on: { init: function() { this.pagination.init(), this.pagination.render(), this.pagination.update() }, activeIndexChange: function() { this.params.loop ? this.pagination.update() : void 0 === this.snapIndex && this.pagination.update() }, snapIndexChange: function() { this.params.loop || this.pagination.update() }, slidesLengthChange: function() { this.params.loop && (this.pagination.render(), this.pagination.update()) }, snapGridLengthChange: function() { this.params.loop || (this.pagination.render(), this.pagination.update()) }, destroy: function() { this.pagination.destroy() }, click: function(e) { var t = this; t.params.pagination.el && t.params.pagination.hideOnClick && 0 < t.pagination.$el.length && !L(e.target).hasClass(t.params.pagination.bulletClass) && t.pagination.$el.toggleClass(t.params.pagination.hiddenClass) } } }, { name: "scrollbar", params: { scrollbar: { el: null, dragSize: "auto", hide: !1, draggable: !1, snapOnRelease: !0, lockClass: "swiper-scrollbar-lock", dragClass: "swiper-scrollbar-drag" } }, create: function() { var e = this; V.extend(e, { scrollbar: { init: X.init.bind(e), destroy: X.destroy.bind(e), updateSize: X.updateSize.bind(e), setTranslate: X.setTranslate.bind(e), setTransition: X.setTransition.bind(e), enableDraggable: X.enableDraggable.bind(e), disableDraggable: X.disableDraggable.bind(e), setDragPosition: X.setDragPosition.bind(e), onDragStart: X.onDragStart.bind(e), onDragMove: X.onDragMove.bind(e), onDragEnd: X.onDragEnd.bind(e), isTouched: !1, timeout: null, dragTimeout: null } }) }, on: { init: function() { this.scrollbar.init(), this.scrollbar.updateSize(), this.scrollbar.setTranslate() }, update: function() { this.scrollbar.updateSize() }, resize: function() { this.scrollbar.updateSize() }, observerUpdate: function() { this.scrollbar.updateSize() }, setTranslate: function() { this.scrollbar.setTranslate() }, setTransition: function(e) { this.scrollbar.setTransition(e) }, destroy: function() { this.scrollbar.destroy() } } }, { name: "parallax", params: { parallax: { enabled: !1 } }, create: function() { V.extend(this, { parallax: { setTransform: R.setTransform.bind(this), setTranslate: R.setTranslate.bind(this), setTransition: R.setTransition.bind(this) } }) }, on: { beforeInit: function() { this.params.parallax.enabled && (this.params.watchSlidesProgress = !0, this.originalParams.watchSlidesProgress = !0) }, init: function() { this.params.parallax && this.parallax.setTranslate() }, setTranslate: function() { this.params.parallax && this.parallax.setTranslate() }, setTransition: function(e) { this.params.parallax && this.parallax.setTransition(e) } } }, { name: "zoom", params: { zoom: { enabled: !1, maxRatio: 3, minRatio: 1, toggle: !0, containerClass: "swiper-zoom-container", zoomedSlideClass: "swiper-slide-zoomed" } }, create: function() { var t = this, a = { enabled: !1, scale: 1, currentScale: 1, isScaling: !1, gesture: { $slideEl: void 0, slideWidth: void 0, slideHeight: void 0, $imageEl: void 0, $imageWrapEl: void 0, maxRatio: 3 }, image: { isTouched: void 0, isMoved: void 0, currentX: void 0, currentY: void 0, minX: void 0, minY: void 0, maxX: void 0, maxY: void 0, width: void 0, height: void 0, startX: void 0, startY: void 0, touchesStart: {}, touchesCurrent: {} }, velocity: { x: void 0, y: void 0, prevPositionX: void 0, prevPositionY: void 0, prevTime: void 0 } }; "onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(function(e) { a[e] = q[e].bind(t) }), V.extend(t, { zoom: a }) }, on: { init: function() { this.params.zoom.enabled && this.zoom.enable() }, destroy: function() { this.zoom.disable() }, touchStart: function(e) { this.zoom.enabled && this.zoom.onTouchStart(e) }, touchEnd: function(e) { this.zoom.enabled && this.zoom.onTouchEnd(e) }, doubleTap: function(e) { this.params.zoom.enabled && this.zoom.enabled && this.params.zoom.toggle && this.zoom.toggle(e) }, transitionEnd: function() { this.zoom.enabled && this.params.zoom.enabled && this.zoom.onTransitionEnd() } } }, { name: "lazy", params: { lazy: { enabled: !1, loadPrevNext: !1, loadPrevNextAmount: 1, loadOnTransitionStart: !1, elementClass: "swiper-lazy", loadingClass: "swiper-lazy-loading", loadedClass: "swiper-lazy-loaded", preloaderClass: "swiper-lazy-preloader" } }, create: function() { V.extend(this, { lazy: { initialImageLoaded: !1, load: W.load.bind(this), loadInSlide: W.loadInSlide.bind(this) } }) }, on: { beforeInit: function() { this.params.lazy.enabled && this.params.preloadImages && (this.params.preloadImages = !1) }, init: function() { this.params.lazy.enabled && !this.params.loop && 0 === this.params.initialSlide && this.lazy.load() }, scroll: function() { this.params.freeMode && !this.params.freeModeSticky && this.lazy.load() }, resize: function() { this.params.lazy.enabled && this.lazy.load() }, scrollbarDragMove: function() { this.params.lazy.enabled && this.lazy.load() }, transitionStart: function() { var e = this; e.params.lazy.enabled && (e.params.lazy.loadOnTransitionStart || !e.params.lazy.loadOnTransitionStart && !e.lazy.initialImageLoaded) && e.lazy.load() }, transitionEnd: function() { this.params.lazy.enabled && !this.params.lazy.loadOnTransitionStart && this.lazy.load() } } }, { name: "controller", params: { controller: { control: void 0, inverse: !1, by: "slide" } }, create: function() { var e = this; V.extend(e, { controller: { control: e.params.controller.control, getInterpolateFunction: j.getInterpolateFunction.bind(e), setTranslate: j.setTranslate.bind(e), setTransition: j.setTransition.bind(e) } }) }, on: { update: function() { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, resize: function() { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, observerUpdate: function() { this.controller.control && this.controller.spline && (this.controller.spline = void 0, delete this.controller.spline) }, setTranslate: function(e, t) { this.controller.control && this.controller.setTranslate(e, t) }, setTransition: function(e, t) { this.controller.control && this.controller.setTransition(e, t) } } }, { name: "a11y", params: { a11y: { enabled: !0, notificationClass: "swiper-notification", prevSlideMessage: "Previous slide", nextSlideMessage: "Next slide", firstSlideMessage: "This is the first slide", lastSlideMessage: "This is the last slide", paginationBulletMessage: "Go to slide {{index}}" } }, create: function() { var t = this; V.extend(t, { a11y: { liveRegion: L('') } }), Object.keys(U).forEach(function(e) { t.a11y[e] = U[e].bind(t) }) }, on: { init: function() { this.params.a11y.enabled && (this.a11y.init(), this.a11y.updateNavigation()) }, toEdge: function() { this.params.a11y.enabled && this.a11y.updateNavigation() }, fromEdge: function() { this.params.a11y.enabled && this.a11y.updateNavigation() }, paginationUpdate: function() { this.params.a11y.enabled && this.a11y.updatePagination() }, destroy: function() { this.params.a11y.enabled && this.a11y.destroy() } } }, { name: "history", params: { history: { enabled: !1, replaceState: !1, key: "slides" } }, create: function() { var e = this; V.extend(e, { history: { init: K.init.bind(e), setHistory: K.setHistory.bind(e), setHistoryPopState: K.setHistoryPopState.bind(e), scrollToSlide: K.scrollToSlide.bind(e), destroy: K.destroy.bind(e) } }) }, on: { init: function() { this.params.history.enabled && this.history.init() }, destroy: function() { this.params.history.enabled && this.history.destroy() }, transitionEnd: function() { this.history.initialized && this.history.setHistory(this.params.history.key, this.activeIndex) } } }, { name: "hash-navigation", params: { hashNavigation: { enabled: !1, replaceState: !1, watchState: !1 } }, create: function() { var e = this; V.extend(e, { hashNavigation: { initialized: !1, init: _.init.bind(e), destroy: _.destroy.bind(e), setHash: _.setHash.bind(e), onHashCange: _.onHashCange.bind(e) } }) }, on: { init: function() { this.params.hashNavigation.enabled && this.hashNavigation.init() }, destroy: function() { this.params.hashNavigation.enabled && this.hashNavigation.destroy() }, transitionEnd: function() { this.hashNavigation.initialized && this.hashNavigation.setHash() } } }, { name: "autoplay", params: { autoplay: { enabled: !1, delay: 3e3, waitForTransition: !0, disableOnInteraction: !0, stopOnLastSlide: !1, reverseDirection: !1 } }, create: function() { var t = this; V.extend(t, { autoplay: { running: !1, paused: !1, run: Z.run.bind(t), start: Z.start.bind(t), stop: Z.stop.bind(t), pause: Z.pause.bind(t), onTransitionEnd: function(e) { t && !t.destroyed && t.$wrapperEl && e.target === this && (t.$wrapperEl[0].removeEventListener("transitionend", t.autoplay.onTransitionEnd), t.$wrapperEl[0].removeEventListener("webkitTransitionEnd", t.autoplay.onTransitionEnd), t.autoplay.paused = !1, t.autoplay.running ? t.autoplay.run() : t.autoplay.stop()) } } }) }, on: { init: function() { this.params.autoplay.enabled && this.autoplay.start() }, beforeTransitionStart: function(e, t) { this.autoplay.running && (t || !this.params.autoplay.disableOnInteraction ? this.autoplay.pause(e) : this.autoplay.stop()) }, sliderFirstMove: function() { this.autoplay.running && (this.params.autoplay.disableOnInteraction ? this.autoplay.stop() : this.autoplay.pause()) }, destroy: function() { this.autoplay.running && this.autoplay.stop() } } }, { name: "effect-fade", params: { fadeEffect: { crossFade: !1 } }, create: function() { V.extend(this, { fadeEffect: { setTranslate: Q.setTranslate.bind(this), setTransition: Q.setTransition.bind(this) } }) }, on: { beforeInit: function() { var e = this; if ("fade" === e.params.effect) { e.classNames.push(e.params.containerModifierClass + "fade"); var t = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 }; V.extend(e.params, t), V.extend(e.originalParams, t) } }, setTranslate: function() { "fade" === this.params.effect && this.fadeEffect.setTranslate() }, setTransition: function(e) { "fade" === this.params.effect && this.fadeEffect.setTransition(e) } } }, { name: "effect-cube", params: { cubeEffect: { slideShadows: !0, shadow: !0, shadowOffset: 20, shadowScale: .94 } }, create: function() { V.extend(this, { cubeEffect: { setTranslate: J.setTranslate.bind(this), setTransition: J.setTransition.bind(this) } }) }, on: { beforeInit: function() { var e = this; if ("cube" === e.params.effect) { e.classNames.push(e.params.containerModifierClass + "cube"), e.classNames.push(e.params.containerModifierClass + "3d"); var t = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, resistanceRatio: 0, spaceBetween: 0, centeredSlides: !1, virtualTranslate: !0 }; V.extend(e.params, t), V.extend(e.originalParams, t) } }, setTranslate: function() { "cube" === this.params.effect && this.cubeEffect.setTranslate() }, setTransition: function(e) { "cube" === this.params.effect && this.cubeEffect.setTransition(e) } } }, { name: "effect-flip", params: { flipEffect: { slideShadows: !0, limitRotation: !0 } }, create: function() { V.extend(this, { flipEffect: { setTranslate: ee.setTranslate.bind(this), setTransition: ee.setTransition.bind(this) } }) }, on: { beforeInit: function() { var e = this; if ("flip" === e.params.effect) { e.classNames.push(e.params.containerModifierClass + "flip"), e.classNames.push(e.params.containerModifierClass + "3d"); var t = { slidesPerView: 1, slidesPerColumn: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !0 }; V.extend(e.params, t), V.extend(e.originalParams, t) } }, setTranslate: function() { "flip" === this.params.effect && this.flipEffect.setTranslate() }, setTransition: function(e) { "flip" === this.params.effect && this.flipEffect.setTransition(e) } } }, { name: "effect-coverflow", params: { coverflowEffect: { rotate: 50, stretch: 0, depth: 100, modifier: 1, slideShadows: !0 } }, create: function() { V.extend(this, { coverflowEffect: { setTranslate: te.setTranslate.bind(this), setTransition: te.setTransition.bind(this) } }) }, on: { beforeInit: function() { var e = this; "coverflow" === e.params.effect && (e.classNames.push(e.params.containerModifierClass + "coverflow"), e.classNames.push(e.params.containerModifierClass + "3d"), e.params.watchSlidesProgress = !0, e.originalParams.watchSlidesProgress = !0) }, setTranslate: function() { "coverflow" === this.params.effect && this.coverflowEffect.setTranslate() }, setTransition: function(e) { "coverflow" === this.params.effect && this.coverflowEffect.setTransition(e) } } }, { name: "thumbs", params: { thumbs: { swiper: null, slideThumbActiveClass: "swiper-slide-thumb-active", thumbsContainerClass: "swiper-container-thumbs" } }, create: function() { V.extend(this, { thumbs: { swiper: null, init: ae.init.bind(this), update: ae.update.bind(this), onThumbClick: ae.onThumbClick.bind(this) } }) }, on: { beforeInit: function() { var e = this.params.thumbs; e && e.swiper && (this.thumbs.init(), this.thumbs.update(!0)) }, slideChange: function() { this.thumbs.swiper && this.thumbs.update() }, update: function() { this.thumbs.swiper && this.thumbs.update() }, resize: function() { this.thumbs.swiper && this.thumbs.update() }, observerUpdate: function() { this.thumbs.swiper && this.thumbs.update() }, setTransition: function(e) { var t = this.thumbs.swiper; t && t.setTransition(e) }, beforeDestroy: function() { var e = this.thumbs.swiper; e && this.thumbs.swiperCreated && e && e.destroy() } } }]; return void 0 === S.use && (S.use = S.Class.use, S.installModule = S.Class.installModule), S.use(ie), S }); function _extends() { return (_extends = Object.assign || function(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]) } return t }).apply(this, arguments) } function _typeof(t) { return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) { return typeof t } : function(t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t })(t) }! function(t, e) { "object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.LazyLoad = e() }(this, function() { "use strict"; var t = "undefined" != typeof window, e = t && !("onscroll" in window) || "undefined" != typeof navigator && /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent), n = t && "IntersectionObserver" in window, o = t && "classList" in document.createElement("p"), r = { elements_selector: "img", container: e || t ? document : null, threshold: 300, thresholds: null, data_src: "src", data_srcset: "srcset", data_sizes: "sizes", data_bg: "bg", class_loading: "loading", class_loaded: "loaded", class_error: "error", load_delay: 0, auto_unobserve: !0, callback_enter: null, callback_exit: null, callback_reveal: null, callback_loaded: null, callback_error: null, callback_finish: null, use_native: !1 }, a = function(t, e) { var n, o = new t(e); try { n = new CustomEvent("LazyLoad::Initialized", { detail: { instance: o } }) } catch (t) { (n = document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized", !1, !1, { instance: o }) } window.dispatchEvent(n) }; var i = function(t, e) { return t.getAttribute("data-" + e) }, s = function(t, e, n) { var o = "data-" + e; null !== n ? t.setAttribute(o, n) : t.removeAttribute(o) }, c = function(t) { return "true" === i(t, "was-processed") }, l = function(t, e) { return s(t, "ll-timeout", e) }, u = function(t) { return i(t, "ll-timeout") }, d = function(t, e) { t && t(e) }, f = function(t, e) { t._loadingCount += e, 0 === t._elements.length && 0 === t._loadingCount && d(t._settings.callback_finish) }, _ = function(t) { for (var e, n = [], o = 0; e = t.children[o]; o += 1) "SOURCE" === e.tagName && n.push(e); return n }, v = function(t, e, n) { n && t.setAttribute(e, n) }, g = function(t, e) { v(t, "sizes", i(t, e.data_sizes)), v(t, "srcset", i(t, e.data_srcset)), v(t, "src", i(t, e.data_src)) }, m = { IMG: function(t, e) { var n = t.parentNode; n && "PICTURE" === n.tagName && _(n).forEach(function(t) { g(t, e) }); g(t, e) }, IFRAME: function(t, e) { v(t, "src", i(t, e.data_src)) }, VIDEO: function(t, e) { _(t).forEach(function(t) { v(t, "src", i(t, e.data_src)) }), v(t, "src", i(t, e.data_src)), t.load() } }, b = function(t, e) { var n, o, r = e._settings, a = t.tagName, s = m[a]; if (s) return s(t, r), f(e, 1), void(e._elements = (n = e._elements, o = t, n.filter(function(t) { return t !== o }))); ! function(t, e) { var n = i(t, e.data_src), o = i(t, e.data_bg); n && (t.style.backgroundImage = 'url("'.concat(n, '")')), o && (t.style.backgroundImage = o) }(t, r) }, h = function(t, e) { o ? t.classList.add(e) : t.className += (t.className ? " " : "") + e }, p = function(t, e, n) { t.addEventListener(e, n) }, y = function(t, e, n) { t.removeEventListener(e, n) }, E = function(t, e, n) { y(t, "load", e), y(t, "loadeddata", e), y(t, "error", n) }, w = function(t, e, n) { var r = n._settings, a = e ? r.class_loaded : r.class_error, i = e ? r.callback_loaded : r.callback_error, s = t.target; ! function(t, e) { o ? t.classList.remove(e) : t.className = t.className.replace(new RegExp("(^|\\s+)" + e + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, "") }(s, r.class_loading), h(s, a), d(i, s), f(n, -1) }, I = function(t, e) { var n = function n(r) { w(r, !0, e), E(t, n, o) }, o = function o(r) { w(r, !1, e), E(t, n, o) }; ! function(t, e, n) { p(t, "load", e), p(t, "loadeddata", e), p(t, "error", n) }(t, n, o) }, k = ["IMG", "IFRAME", "VIDEO"], A = function(t, e) { var n = e._observer; z(t, e), n && e._settings.auto_unobserve && n.unobserve(t) }, L = function(t) { var e = u(t); e && (clearTimeout(e), l(t, null)) }, x = function(t, e) { var n = e._settings.load_delay, o = u(t); o || (o = setTimeout(function() { A(t, e), L(t) }, n), l(t, o)) }, z = function(t, e, n) { var o = e._settings; !n && c(t) || (k.indexOf(t.tagName) > -1 && (I(t, e), h(t, o.class_loading)), b(t, e), function(t) { s(t, "was-processed", "true") }(t), d(o.callback_reveal, t), d(o.callback_set, t)) }, O = function(t) { return !!n && (t._observer = new IntersectionObserver(function(e) { e.forEach(function(e) { return function(t) { return t.isIntersecting || t.intersectionRatio > 0 }(e) ? function(t, e) { var n = e._settings; d(n.callback_enter, t), n.load_delay ? x(t, e) : A(t, e) }(e.target, t) : function(t, e) { var n = e._settings; d(n.callback_exit, t), n.load_delay && L(t) }(e.target, t) }) }, { root: (e = t._settings).container === document ? null : e.container, rootMargin: e.thresholds || e.threshold + "px" }), !0); var e }, N = ["IMG", "IFRAME"], C = function(t, e) { return function(t) { return t.filter(function(t) { return !c(t) }) }((n = t || function(t) { return t.container.querySelectorAll(t.elements_selector) }(e), Array.prototype.slice.call(n))); var n }, M = function(t, e) { this._settings = function(t) { return _extends({}, r, t) }(t), this._loadingCount = 0, O(this), this.update(e) }; return M.prototype = { update: function(t) { var n, o = this, r = this._settings; (this._elements = C(t, r), !e && this._observer) ? (function(t) { return t.use_native && "loading" in HTMLImageElement.prototype }(r) && ((n = this)._elements.forEach(function(t) { -1 !== N.indexOf(t.tagName) && (t.setAttribute("loading", "lazy"), z(t, n)) }), this._elements = C(t, r)), this._elements.forEach(function(t) { o._observer.observe(t) })) : this.loadAll() }, destroy: function() { var t = this; this._observer && (this._elements.forEach(function(e) { t._observer.unobserve(e) }), this._observer = null), this._elements = null, this._settings = null }, load: function(t, e) { z(t, this, e) }, loadAll: function() { var t = this; this._elements.forEach(function(e) { A(e, t) }) } }, t && function(t, e) { if (e) if (e.length) for (var n, o = 0; n = e[o]; o += 1) a(t, n); else a(t, e) }(M, window.lazyLoadOptions), M }); ! function(t, e) { "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.Sweetalert2 = e() }(this, function() { "use strict"; function r(t) { return (r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) { return typeof t } : function(t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t })(t) } function o(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } function i(t, e) { for (var n = 0; n < e.length; n++) { var o = e[n]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o) } } function a(t, e, n) { return e && i(t.prototype, e), n && i(t, n), t } function s() { return (s = Object.assign || function(t) { for (var e = 1; e < arguments.length; e++) { var n = arguments[e]; for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]) } return t }).apply(this, arguments) } function u(t) { return (u = Object.setPrototypeOf ? Object.getPrototypeOf : function(t) { return t.__proto__ || Object.getPrototypeOf(t) })(t) } function c(t, e) { return (c = Object.setPrototypeOf || function(t, e) { return t.__proto__ = e, t })(t, e) } function l(t, e, n) { return (l = function() { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0 } catch (t) { return !1 } }() ? Reflect.construct : function(t, e, n) { var o = [null]; o.push.apply(o, e); var i = new(Function.bind.apply(t, o)); return n && c(i, n.prototype), i }).apply(null, arguments) } function d(t, e) { return !e || "object" != typeof e && "function" != typeof e ? function(t) { if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t }(t) : e } function p(t, e, n) { return (p = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function(t, e, n) { var o = function(t, e) { for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = u(t));); return t }(t, e); if (o) { var i = Object.getOwnPropertyDescriptor(o, e); return i.get ? i.get.call(n) : i.value } })(t, e, n || t) } function f(e) { return Object.keys(e).map(function(t) { return e[t] }) } function m(t) { return Array.prototype.slice.call(t) } function g(t) { console.error("".concat(e, " ").concat(t)) } function h(t, e) { ! function(t) { -1 === n.indexOf(t) && (n.push(t), w(t)) }('"'.concat(t, '" is deprecated and will be removed in the next major release. Please use "').concat(e, '" instead.')) } function v(t) { return t && Promise.resolve(t) === t } function t(t) { var e = {}; for (var n in t) e[t[n]] = "swal2-" + t[n]; return e } function b(t, e) { return t.classList.contains(e) } function y(e, t, n) { m(e.classList).forEach(function(t) { -1 === f(x).indexOf(t) && -1 === f(S).indexOf(t) && e.classList.remove(t) }), t && t[n] && rt(e, t[n]) } var e = "SweetAlert2:", w = function(t) { console.warn("".concat(e, " ").concat(t)) }, n = [], C = function(t) { return "function" == typeof t ? t() : t }, k = Object.freeze({ cancel: "cancel", backdrop: "backdrop", close: "close", esc: "esc", timer: "timer" }), x = t(["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "toast", "toast-shown", "toast-column", "fade", "show", "hide", "noanimation", "close", "title", "header", "content", "actions", "confirm", "cancel", "footer", "icon", "image", "input", "file", "range", "select", "radio", "checkbox", "label", "textarea", "inputerror", "validation-message", "progress-steps", "active-progress-step", "progress-step", "progress-step-line", "loading", "styled", "top", "top-start", "top-end", "top-left", "top-right", "center", "center-start", "center-end", "center-left", "center-right", "bottom", "bottom-start", "bottom-end", "bottom-left", "bottom-right", "grow-row", "grow-column", "grow-fullscreen", "rtl"]), S = t(["success", "warning", "info", "question", "error"]), P = { previousBodyPadding: null }; function B(t, e) { if (!e) return null; switch (e) { case "select": case "textarea": case "file": return st(t, x[e]); case "checkbox": return t.querySelector(".".concat(x.checkbox, " input")); case "radio": return t.querySelector(".".concat(x.radio, " input:checked")) || t.querySelector(".".concat(x.radio, " input:first-child")); case "range": return t.querySelector(".".concat(x.range, " input")); default: return st(t, x.input) } } function A(t) { if (t.focus(), "file" !== t.type) { var e = t.value; t.value = "", t.value = e } } function E(t, e, n) { t && e && ("string" == typeof e && (e = e.split(/\s+/).filter(Boolean)), e.forEach(function(e) { t.forEach ? t.forEach(function(t) { n ? t.classList.add(e) : t.classList.remove(e) }) : n ? t.classList.add(e) : t.classList.remove(e) })) } function T(t, e, n) { n || 0 === parseInt(n) ? t.style[e] = "number" == typeof n ? n + "px" : n : t.style.removeProperty(e) } function L(t, e) { var n = 1 < arguments.length && void 0 !== e ? e : "flex"; t.style.opacity = "", t.style.display = n } function O(t) { t.style.opacity = "", t.style.display = "none" } function M(t, e, n) { e ? L(t, n) : O(t) } function V(t) { return !(!t || !(t.offsetWidth || t.offsetHeight || t.getClientRects().length)) } function H(t) { var e = window.getComputedStyle(t), n = parseFloat(e.getPropertyValue("animation-duration") || "0"), o = parseFloat(e.getPropertyValue("transition-duration") || "0"); return 0 < n || 0 < o } function j() { return document.body.querySelector("." + x.container) } function I(t) { var e = j(); return e ? e.querySelector(t) : null } function q(t) { return I("." + t) } function R() { return q(x.popup) } function D() { var t = R(); return m(t.querySelectorAll("." + x.icon)) } function N() { var t = D().filter(function(t) { return V(t) }); return t.length ? t[0] : null } function U() { return q(x.title) } function F() { return q(x.content) } function _() { return q(x.image) } function z() { return q(x["progress-steps"]) } function W() { return q(x["validation-message"]) } function K() { return I("." + x.actions + " ." + x.confirm) } function Z() { return I("." + x.actions + " ." + x.cancel) } function Q() { return q(x.actions) } function Y() { return q(x.header) } function $() { return q(x.footer) } function J() { return q(x.close) } function X() { var t = m(R().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(function(t, e) { return t = parseInt(t.getAttribute("tabindex")), (e = parseInt(e.getAttribute("tabindex"))) < t ? 1 : t < e ? -1 : 0 }), e = m(R().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]')).filter(function(t) { return "-1" !== t.getAttribute("tabindex") }); return function(t) { for (var e = [], n = 0; n < t.length; n++) - 1 === e.indexOf(t[n]) && e.push(t[n]); return e }(t.concat(e)).filter(function(t) { return V(t) }) } function G() { return !ut() && !document.body.classList.contains(x["no-backdrop"]) } function tt() { return "undefined" == typeof window || "undefined" == typeof document } function et(t) { Fe.isVisible() && it !== t.target.value && Fe.resetValidationMessage(), it = t.target.value } function nt(t, e) { t instanceof HTMLElement ? e.appendChild(t) : "object" === r(t) ? dt(e, t) : t && (e.innerHTML = t) } function ot(t, e) { var n = Q(), o = K(), i = Z(); e.showConfirmButton || e.showCancelButton || O(n), y(n, e.customClass, "actions"), ft(o, "confirm", e), ft(i, "cancel", e), e.buttonsStyling ? function(t, e, n) { rt([t, e], x.styled), n.confirmButtonColor && (t.style.backgroundColor = n.confirmButtonColor); n.cancelButtonColor && (e.style.backgroundColor = n.cancelButtonColor); var o = window.getComputedStyle(t).getPropertyValue("background-color"); t.style.borderLeftColor = o, t.style.borderRightColor = o }(o, i, e) : (at([o, i], x.styled), o.style.backgroundColor = o.style.borderLeftColor = o.style.borderRightColor = "", i.style.backgroundColor = i.style.borderLeftColor = i.style.borderRightColor = ""), e.reverseButtons && o.parentNode.insertBefore(i, o) } var it, rt = function(t, e) { E(t, e, !0) }, at = function(t, e) { E(t, e, !1) }, st = function(t, e) { for (var n = 0; n < t.childNodes.length; n++) if (b(t.childNodes[n], e)) return t.childNodes[n] }, ut = function() { return document.body.classList.contains(x["toast-shown"]) }, ct = '\n
\n
\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g, ""), lt = function(t) { if (function() { var t = j(); t && (t.parentNode.removeChild(t), at([document.documentElement, document.body], [x["no-backdrop"], x["toast-shown"], x["has-column"]])) }(), tt()) g("SweetAlert2 requires document to initialize"); else { var e = document.createElement("div"); e.className = x.container, e.innerHTML = ct; var n = function(t) { return "string" == typeof t ? document.querySelector(t) : t }(t.target); n.appendChild(e), function(t) { var e = R(); e.setAttribute("role", t.toast ? "alert" : "dialog"), e.setAttribute("aria-live", t.toast ? "polite" : "assertive"), t.toast || e.setAttribute("aria-modal", "true") }(t), function(t) { "rtl" === window.getComputedStyle(t).direction && rt(j(), x.rtl) }(n), function() { var t = F(), e = st(t, x.input), n = st(t, x.file), o = t.querySelector(".".concat(x.range, " input")), i = t.querySelector(".".concat(x.range, " output")), r = st(t, x.select), a = t.querySelector(".".concat(x.checkbox, " input")), s = st(t, x.textarea); e.oninput = et, n.onchange = et, r.onchange = et, a.onchange = et, s.oninput = et, o.oninput = function(t) { et(t), i.value = o.value }, o.onchange = function(t) { et(t), o.nextSibling.value = o.value } }() } }, dt = function(t, e) { if (t.innerHTML = "", 0 in e) for (var n = 0; n in e; n++) t.appendChild(e[n].cloneNode(!0)); else t.appendChild(e.cloneNode(!0)) }, pt = function() { if (tt()) return !1; var t = document.createElement("div"), e = { WebkitAnimation: "webkitAnimationEnd", OAnimation: "oAnimationEnd oanimationend", animation: "animationend" }; for (var n in e) if (Object.prototype.hasOwnProperty.call(e, n) && void 0 !== t.style[n]) return e[n]; return !1 }(); function ft(t, e, n) { M(t, n["showC" + e.substring(1) + "Button"], "inline-block"), t.innerHTML = n[e + "ButtonText"], t.setAttribute("aria-label", n[e + "ButtonAriaLabel"]), t.className = x[e], y(t, n.customClass, e + "Button"), rt(t, n[e + "ButtonClass"]) } function mt(t, e) { var n = j(); n && (function(t, e) { "string" == typeof e ? t.style.background = e : e || rt([document.documentElement, document.body], x["no-backdrop"]) }(n, e.backdrop), !e.backdrop && e.allowOutsideClick && w('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'), function(t, e) { e in x ? rt(t, x[e]) : (w('The "position" parameter is not valid, defaulting to "center"'), rt(t, x.center)) }(n, e.position), function(t, e) { if (e && "string" == typeof e) { var n = "grow-" + e; n in x && rt(t, x[n]) } }(n, e.grow), y(n, e.customClass, "container"), e.customContainerClass && rt(n, e.customContainerClass)) } function gt(t, e) { t.placeholder && !e.inputPlaceholder || (t.placeholder = e.inputPlaceholder) } var ht = { promise: new WeakMap, innerParams: new WeakMap, domCache: new WeakMap }, vt = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], bt = function(t) { if (!Ct[t.input]) return g('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(t.input, '"')); var e = Ct[t.input](t); L(e), setTimeout(function() { A(e) }) }, yt = function(t, e) { var n = B(F(), t); if (n) for (var o in function(t) { for (var e = 0; e < t.attributes.length; e++) { var n = t.attributes[e].name; - 1 === ["type", "value", "style"].indexOf(n) && t.removeAttribute(n) } }(n), e) "range" === t && "placeholder" === o || n.setAttribute(o, e[o]) }, wt = function(t, e, n) { t.className = e, n.inputClass && rt(t, n.inputClass), n.customClass && rt(t, n.customClass.input) }, Ct = {}; Ct.text = Ct.email = Ct.password = Ct.number = Ct.tel = Ct.url = function(t) { var e = st(F(), x.input); return "string" == typeof t.inputValue || "number" == typeof t.inputValue ? e.value = t.inputValue : v(t.inputValue) || w('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(r(t.inputValue), '"')), gt(e, t), e.type = t.input, e }, Ct.file = function(t) { var e = st(F(), x.file); return gt(e, t), e.type = t.input, e }, Ct.range = function(t) { var e = st(F(), x.range), n = e.querySelector("input"), o = e.querySelector("output"); return n.value = t.inputValue, n.type = t.input, o.value = t.inputValue, e }, Ct.select = function(t) { var e = st(F(), x.select); if (e.innerHTML = "", t.inputPlaceholder) { var n = document.createElement("option"); n.innerHTML = t.inputPlaceholder, n.value = "", n.disabled = !0, n.selected = !0, e.appendChild(n) } return e }, Ct.radio = function() { var t = st(F(), x.radio); return t.innerHTML = "", t }, Ct.checkbox = function(t) { var e = st(F(), x.checkbox), n = B(F(), "checkbox"); return n.type = "checkbox", n.value = 1, n.id = x.checkbox, n.checked = Boolean(t.inputValue), e.querySelector("span").innerHTML = t.inputPlaceholder, e }, Ct.textarea = function(t) { var e = st(F(), x.textarea); if (e.value = t.inputValue, gt(e, t), "MutationObserver" in window) { var n = parseInt(window.getComputedStyle(R()).width), o = parseInt(window.getComputedStyle(R()).paddingLeft) + parseInt(window.getComputedStyle(R()).paddingRight); new MutationObserver(function() { var t = e.offsetWidth + o; R().style.width = n < t ? t + "px" : null }).observe(e, { attributes: !0, attributeFilter: ["style"] }) } return e }; function kt(t, e) { var n = F().querySelector("#" + x.content); e.html ? (nt(e.html, n), L(n, "block")) : e.text ? (n.textContent = e.text, L(n, "block")) : O(n), function(t, o) { var i = F(), e = ht.innerParams.get(t), r = !e || o.input !== e.input; vt.forEach(function(t) { var e = x[t], n = st(i, e); yt(t, o.inputAttributes), wt(n, e, o), r && O(n) }), o.input && r && bt(o) }(t, e), y(F(), e.customClass, "content") } function xt(t, i) { var r = z(); if (!i.progressSteps || 0 === i.progressSteps.length) return O(r); L(r), r.innerHTML = ""; var a = parseInt(null === i.currentProgressStep ? Fe.getQueueStep() : i.currentProgressStep); a >= i.progressSteps.length && w("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), i.progressSteps.forEach(function(t, e) { var n = function(t) { var e = document.createElement("li"); return rt(e, x["progress-step"]), e.innerHTML = t, e }(t); if (r.appendChild(n), e === a && rt(n, x["active-progress-step"]), e !== i.progressSteps.length - 1) { var o = function(t) { var e = document.createElement("li"); return rt(e, x["progress-step-line"]), t.progressStepsDistance && (e.style.width = t.progressStepsDistance), e }(t); r.appendChild(o) } }) } function St(t, e) { var n = Y(); y(n, e.customClass, "header"), xt(0, e), function(t, e) { var n = ht.innerParams.get(t); if (n && e.type === n.type && N()) y(N(), e.customClass, "icon"); else if (At(), e.type) if (Et(), -1 !== Object.keys(S).indexOf(e.type)) { var o = I(".".concat(x.icon, ".").concat(S[e.type])); L(o), y(o, e.customClass, "icon"), E(o, "swal2-animate-".concat(e.type, "-icon"), e.animation) } else g('Unknown type! Expected "success", "error", "warning", "info" or "question", got "'.concat(e.type, '"')) }(t, e), function(t, e) { var n = _(); if (!e.imageUrl) return O(n); L(n), n.setAttribute("src", e.imageUrl), n.setAttribute("alt", e.imageAlt), T(n, "width", e.imageWidth), T(n, "height", e.imageHeight), n.className = x.image, y(n, e.customClass, "image"), e.imageClass && rt(n, e.imageClass) }(0, e), function(t, e) { var n = U(); M(n, e.title || e.titleText), e.title && nt(e.title, n), e.titleText && (n.innerText = e.titleText), y(n, e.customClass, "title") }(0, e), function(t, e) { var n = J(); n.innerHTML = e.closeButtonHtml, y(n, e.customClass, "closeButton"), M(n, e.showCloseButton), n.setAttribute("aria-label", e.closeButtonAriaLabel) }(0, e) } function Pt(t, e) { ! function(t, e) { var n = R(); T(n, "width", e.width), T(n, "padding", e.padding), e.background && (n.style.background = e.background), n.className = x.popup, e.toast ? (rt([document.documentElement, document.body], x["toast-shown"]), rt(n, x.toast)) : rt(n, x.modal), y(n, e.customClass, "popup"), "string" == typeof e.customClass && rt(n, e.customClass), E(n, x.noanimation, !e.animation) }(0, e), mt(0, e), St(t, e), kt(t, e), ot(0, e), function(t, e) { var n = $(); M(n, e.footer), e.footer && nt(e.footer, n), y(n, e.customClass, "footer") }(0, e) } function Bt() { return K() && K().click() } var At = function() { for (var t = D(), e = 0; e < t.length; e++) O(t[e]) }, Et = function() { for (var t = R(), e = window.getComputedStyle(t).getPropertyValue("background-color"), n = t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"), o = 0; o < n.length; o++) n[o].style.backgroundColor = e }; function Tt() { var t = R(); t || Fe.fire(""), t = R(); var e = Q(), n = K(), o = Z(); L(e), L(n), rt([t, e], x.loading), n.disabled = !0, o.disabled = !0, t.setAttribute("data-loading", !0), t.setAttribute("aria-busy", !0), t.focus() } function Lt() { return new Promise(function(t) { var e = window.scrollX, n = window.scrollY; Ht.restoreFocusTimeout = setTimeout(function() { Ht.previousActiveElement && Ht.previousActiveElement.focus ? (Ht.previousActiveElement.focus(), Ht.previousActiveElement = null) : document.body && document.body.focus(), t() }, 100), void 0 !== e && void 0 !== n && window.scrollTo(e, n) }) } function Ot(t) { return Object.prototype.hasOwnProperty.call(jt, t) } function Mt(t) { return qt[t] } var Vt = [], Ht = {}, jt = { title: "", titleText: "", text: "", html: "", footer: "", type: null, toast: !1, customClass: "", customContainerClass: "", target: "body", backdrop: !0, animation: !0, heightAuto: !0, allowOutsideClick: !0, allowEscapeKey: !0, allowEnterKey: !0, stopKeydownPropagation: !0, keydownListenerCapture: !1, showConfirmButton: !0, showCancelButton: !1, preConfirm: null, confirmButtonText: "OK", confirmButtonAriaLabel: "", confirmButtonColor: null, confirmButtonClass: "", cancelButtonText: "Cancel", cancelButtonAriaLabel: "", cancelButtonColor: null, cancelButtonClass: "", buttonsStyling: !0, reverseButtons: !1, focusConfirm: !0, focusCancel: !1, showCloseButton: !1, closeButtonHtml: "×", closeButtonAriaLabel: "Close this dialog", showLoaderOnConfirm: !1, imageUrl: null, imageWidth: null, imageHeight: null, imageAlt: "", imageClass: "", timer: null, width: null, padding: null, background: null, input: null, inputPlaceholder: "", inputValue: "", inputOptions: {}, inputAutoTrim: !0, inputClass: "", inputAttributes: {}, inputValidator: null, validationMessage: null, grow: !1, position: "center", progressSteps: [], currentProgressStep: null, progressStepsDistance: null, onBeforeOpen: null, onAfterClose: null, onOpen: null, onClose: null, scrollbarPadding: !0 }, It = ["title", "titleText", "text", "html", "type", "customClass", "showConfirmButton", "showCancelButton", "confirmButtonText", "confirmButtonAriaLabel", "confirmButtonColor", "confirmButtonClass", "cancelButtonText", "cancelButtonAriaLabel", "cancelButtonColor", "cancelButtonClass", "buttonsStyling", "reverseButtons", "imageUrl", "imageWidth", "imageHeigth", "imageAlt", "imageClass", "progressSteps", "currentProgressStep"], qt = { customContainerClass: "customClass", confirmButtonClass: "customClass", cancelButtonClass: "customClass", imageClass: "customClass", inputClass: "customClass" }, Rt = ["allowOutsideClick", "allowEnterKey", "backdrop", "focusConfirm", "focusCancel", "heightAuto", "keydownListenerCapture"], Dt = Object.freeze({ isValidParameter: Ot, isUpdatableParameter: function(t) { return -1 !== It.indexOf(t) }, isDeprecatedParameter: Mt, argsToParams: function(n) { var o = {}; switch (r(n[0])) { case "object": s(o, n[0]); break; default: ["title", "html", "type"].forEach(function(t, e) { switch (r(n[e])) { case "string": o[t] = n[e]; break; case "undefined": break; default: g("Unexpected type of ".concat(t, '! Expected "string", got ').concat(r(n[e]))) } }) } return o }, isVisible: function() { return V(R()) }, clickConfirm: Bt, clickCancel: function() { return Z() && Z().click() }, getContainer: j, getPopup: R, getTitle: U, getContent: F, getImage: _, getIcon: N, getIcons: D, getCloseButton: J, getActions: Q, getConfirmButton: K, getCancelButton: Z, getHeader: Y, getFooter: $, getFocusableElements: X, getValidationMessage: W, isLoading: function() { return R().hasAttribute("data-loading") }, fire: function() { for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; return l(this, e) }, mixin: function(n) { return function(t) { function e() { return o(this, e), d(this, u(e).apply(this, arguments)) } return function(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), e && c(t, e) }(e, t), a(e, [{ key: "_main", value: function(t) { return p(u(e.prototype), "_main", this).call(this, s({}, n, t)) } }]), e }(this) }, queue: function(t) { var r = this; Vt = t; function a(t, e) { Vt = [], document.body.removeAttribute("data-swal2-queue-step"), t(e) } var s = []; return new Promise(function(i) { ! function e(n, o) { n < Vt.length ? (document.body.setAttribute("data-swal2-queue-step", n), r.fire(Vt[n]).then(function(t) { void 0 !== t.value ? (s.push(t.value), e(n + 1, o)) : a(i, { dismiss: t.dismiss }) })) : a(i, { value: s }) }(0) }) }, getQueueStep: function() { return document.body.getAttribute("data-swal2-queue-step") }, insertQueueStep: function(t, e) { return e && e < Vt.length ? Vt.splice(e, 0, t) : Vt.push(t) }, deleteQueueStep: function(t) { void 0 !== Vt[t] && Vt.splice(t, 1) }, showLoading: Tt, enableLoading: Tt, getTimerLeft: function() { return Ht.timeout && Ht.timeout.getTimerLeft() }, stopTimer: function() { return Ht.timeout && Ht.timeout.stop() }, resumeTimer: function() { return Ht.timeout && Ht.timeout.start() }, toggleTimer: function() { var t = Ht.timeout; return t && (t.running ? t.stop() : t.start()) }, increaseTimer: function(t) { return Ht.timeout && Ht.timeout.increase(t) }, isTimerRunning: function() { return Ht.timeout && Ht.timeout.isRunning() } }); function Nt() { var t = ht.innerParams.get(this), e = ht.domCache.get(this); t.showConfirmButton || (O(e.confirmButton), t.showCancelButton || O(e.actions)), at([e.popup, e.actions], x.loading), e.popup.removeAttribute("aria-busy"), e.popup.removeAttribute("data-loading"), e.confirmButton.disabled = !1, e.cancelButton.disabled = !1 } function Ut() { null === P.previousBodyPadding && document.body.scrollHeight > window.innerHeight && (P.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = P.previousBodyPadding + function() { if ("ontouchstart" in window || navigator.msMaxTouchPoints) return 0; var t = document.createElement("div"); t.style.width = "50px", t.style.height = "50px", t.style.overflow = "scroll", document.body.appendChild(t); var e = t.offsetWidth - t.clientWidth; return document.body.removeChild(t), e }() + "px") } function Ft() { return !!window.MSInputMethodContext && !!document.documentMode } function _t() { var t = j(), e = R(); t.style.removeProperty("align-items"), e.offsetTop < 0 && (t.style.alignItems = "flex-start") } var zt = function() { var e, n = j(); n.ontouchstart = function(t) { e = t.target === n || ! function(t) { return !!(t.scrollHeight > t.clientHeight) }(n) && "INPUT" !== t.target.tagName }, n.ontouchmove = function(t) { e && (t.preventDefault(), t.stopPropagation()) } }, Wt = { swalPromiseResolve: new WeakMap }; function Kt(t, e, n, o) { n ? $t(t, o) : (Lt().then(function() { return $t(t, o) }), Ht.keydownTarget.removeEventListener("keydown", Ht.keydownHandler, { capture: Ht.keydownListenerCapture }), Ht.keydownHandlerAdded = !1), e.parentNode && e.parentNode.removeChild(e), G() && (null !== P.previousBodyPadding && (document.body.style.paddingRight = P.previousBodyPadding + "px", P.previousBodyPadding = null), function() { if (b(document.body, x.iosfix)) { var t = parseInt(document.body.style.top, 10); at(document.body, x.iosfix), document.body.style.top = "", document.body.scrollTop = -1 * t } }(), "undefined" != typeof window && Ft() && window.removeEventListener("resize", _t), m(document.body.children).forEach(function(t) { t.hasAttribute("data-previous-aria-hidden") ? (t.setAttribute("aria-hidden", t.getAttribute("data-previous-aria-hidden")), t.removeAttribute("data-previous-aria-hidden")) : t.removeAttribute("aria-hidden") })), at([document.documentElement, document.body], [x.shown, x["height-auto"], x["no-backdrop"], x["toast-shown"], x["toast-column"]]) } function Zt(t) { var e = R(); if (e && !b(e, x.hide)) { var n = ht.innerParams.get(this); if (n) { var o = Wt.swalPromiseResolve.get(this); at(e, x.show), rt(e, x.hide), function(t, e, n) { var o = j(), i = pt && H(e), r = n.onClose, a = n.onAfterClose; if (r !== null && typeof r === "function") { r(e) } if (i) { Yt(t, e, o, a) } else { Kt(t, o, ut(), a) } }(this, e, n), o(t || {}) } } } function Qt(t) { for (var e in t) t[e] = new WeakMap } var Yt = function(t, e, n, o) { Ht.swalCloseEventFinishedCallback = Kt.bind(null, t, n, ut(), o), e.addEventListener(pt, function(t) { t.target === e && (Ht.swalCloseEventFinishedCallback(), delete Ht.swalCloseEventFinishedCallback) }) }, $t = function(t, e) { setTimeout(function() { null !== e && "function" == typeof e && e(), R() || function(t) { delete t.params, delete Ht.keydownHandler, delete Ht.keydownTarget, Qt(ht), Qt(Wt) }(t) }) }; function Jt(t, e, n) { var o = ht.domCache.get(t); e.forEach(function(t) { o[t].disabled = n }) } function Xt(t, e) { if (!t) return !1; if ("radio" === t.type) for (var n = t.parentNode.parentNode.querySelectorAll("input"), o = 0; o < n.length; o++) n[o].disabled = e; else t.disabled = e } var Gt = function() { function n(t, e) { o(this, n), this.callback = t, this.remaining = e, this.running = !1, this.start() } return a(n, [{ key: "start", value: function() { return this.running || (this.running = !0, this.started = new Date, this.id = setTimeout(this.callback, this.remaining)), this.remaining } }, { key: "stop", value: function() { return this.running && (this.running = !1, clearTimeout(this.id), this.remaining -= new Date - this.started), this.remaining } }, { key: "increase", value: function(t) { var e = this.running; return e && this.stop(), this.remaining += t, e && this.start(), this.remaining } }, { key: "getTimerLeft", value: function() { return this.running && (this.stop(), this.start()), this.remaining } }, { key: "isRunning", value: function() { return this.running } }]), n }(), te = { email: function(t, e) { return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t) ? Promise.resolve() : Promise.resolve(e || "Invalid email address") }, url: function(t, e) { return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t) ? Promise.resolve() : Promise.resolve(e || "Invalid URL") } }; function ee(t) { ! function(e) { e.inputValidator || Object.keys(te).forEach(function(t) { e.input === t && (e.inputValidator = te[t]) }) }(t), t.showLoaderOnConfirm && !t.preConfirm && w("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"), t.animation = C(t.animation), function(t) { t.target && ("string" != typeof t.target || document.querySelector(t.target)) && ("string" == typeof t.target || t.target.appendChild) || (w('Target parameter is not valid, defaulting to "body"'), t.target = "body") }(t), "string" == typeof t.title && (t.title = t.title.split("\n").join("
    ")), lt(t) } function ne(t, e) { t.removeEventListener(pt, ne), e.style.overflowY = "auto" } function oe(t) { var e = j(), n = R(); "function" == typeof t.onBeforeOpen && t.onBeforeOpen(n), fe(e, n, t), de(e, n), G() && pe(e, t.scrollbarPadding), ut() || Ht.previousActiveElement || (Ht.previousActiveElement = document.activeElement), "function" == typeof t.onOpen && setTimeout(function() { return t.onOpen(n) }) } function ie(t, e) { "select" === e.input || "radio" === e.input ? me(t, e) : -1 !== ["text", "email", "number", "tel", "textarea"].indexOf(e.input) && v(e.inputValue) && ge(t, e) } function re(t, e) { t.disableButtons(), e.input ? be(t, e) : ye(t, e, !0) } function ae(t, e) { t.disableButtons(), e(k.cancel) } function se(t, e) { t.closePopup({ value: e }) } function ue(e, t, n, o) { t.keydownTarget && t.keydownHandlerAdded && (t.keydownTarget.removeEventListener("keydown", t.keydownHandler, { capture: t.keydownListenerCapture }), t.keydownHandlerAdded = !1), n.toast || (t.keydownHandler = function(t) { return Be(e, t, n, o) }, t.keydownTarget = n.keydownListenerCapture ? window : R(), t.keydownListenerCapture = n.keydownListenerCapture, t.keydownTarget.addEventListener("keydown", t.keydownHandler, { capture: t.keydownListenerCapture }), t.keydownHandlerAdded = !0) } function ce(t, e, n) { for (var o = X(t.focusCancel), i = 0; i < o.length; i++) return (e += n) === o.length ? e = 0 : -1 === e && (e = o.length - 1), o[e].focus(); R().focus() } function le(t, e, n) { e.toast ? Oe(t, e, n) : (Ve(t), He(t), je(t, e, n)) } var de = function(t, e) { pt && H(e) ? (t.style.overflowY = "hidden", e.addEventListener(pt, ne.bind(null, e, t))) : t.style.overflowY = "auto" }, pe = function(t, e) { ! function() { if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && !b(document.body, x.iosfix)) { var t = document.body.scrollTop; document.body.style.top = -1 * t + "px", rt(document.body, x.iosfix), zt() } }(), "undefined" != typeof window && Ft() && (_t(), window.addEventListener("resize", _t)), m(document.body.children).forEach(function(t) { t === j() || function(t, e) { if ("function" == typeof t.contains) return t.contains(e) }(t, j()) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden")), t.setAttribute("aria-hidden", "true")) }), e && Ut(), setTimeout(function() { t.scrollTop = 0 }) }, fe = function(t, e, n) { n.animation && (rt(e, x.show), rt(t, x.fade)), L(e), rt([document.documentElement, document.body, t], x.shown), n.heightAuto && n.backdrop && !n.toast && rt([document.documentElement, document.body], x["height-auto"]) }, me = function(e, n) { function o(t) { return he[n.input](i, ve(t), n) } var i = F(); v(n.inputOptions) ? (Tt(), n.inputOptions.then(function(t) { e.hideLoading(), o(t) })) : "object" === r(n.inputOptions) ? o(n.inputOptions) : g("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(r(n.inputOptions))) }, ge = function(e, n) { var o = e.getInput(); O(o), n.inputValue.then(function(t) { o.value = "number" === n.input ? parseFloat(t) || 0 : t + "", L(o), o.focus(), e.hideLoading() }).catch(function(t) { g("Error in inputValue promise: " + t), o.value = "", L(o), o.focus(), e.hideLoading() }) }, he = { select: function(t, e, i) { var r = st(t, x.select); e.forEach(function(t) { var e = t[0], n = t[1], o = document.createElement("option"); o.value = e, o.innerHTML = n, i.inputValue.toString() === e.toString() && (o.selected = !0), r.appendChild(o) }), r.focus() }, radio: function(t, e, a) { var s = st(t, x.radio); e.forEach(function(t) { var e = t[0], n = t[1], o = document.createElement("input"), i = document.createElement("label"); o.type = "radio", o.name = x.radio, o.value = e, a.inputValue.toString() === e.toString() && (o.checked = !0); var r = document.createElement("span"); r.innerHTML = n, r.className = x.label, i.appendChild(o), i.appendChild(r), s.appendChild(i) }); var n = s.querySelectorAll("input"); n.length && n[0].focus() } }, ve = function(e) { var n = []; return "undefined" != typeof Map && e instanceof Map ? e.forEach(function(t, e) { n.push([e, t]) }) : Object.keys(e).forEach(function(t) { n.push([t, e[t]]) }), n }, be = function(e, n) { var o = we(e, n); n.inputValidator ? (e.disableInput(), Promise.resolve().then(function() { return n.inputValidator(o, n.validationMessage) }).then(function(t) { e.enableButtons(), e.enableInput(), t ? e.showValidationMessage(t) : ye(e, n, o) })) : e.getInput().checkValidity() ? ye(e, n, o) : (e.enableButtons(), e.showValidationMessage(n.validationMessage)) }, ye = function(e, t, n) { (t.showLoaderOnConfirm && Tt(), t.preConfirm) ? (e.resetValidationMessage(), Promise.resolve().then(function() { return t.preConfirm(n, t.validationMessage) }).then(function(t) { V(W()) || !1 === t ? e.hideLoading() : se(e, void 0 === t ? n : t) })) : se(e, n) }, we = function(t, e) { var n = t.getInput(); if (!n) return null; switch (e.input) { case "checkbox": return Ce(n); case "radio": return ke(n); case "file": return xe(n); default: return e.inputAutoTrim ? n.value.trim() : n.value } }, Ce = function(t) { return t.checked ? 1 : 0 }, ke = function(t) { return t.checked ? t.value : null }, xe = function(t) { return t.files.length ? t.files[0] : null }, Se = ["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Left", "Right", "Up", "Down"], Pe = ["Escape", "Esc"], Be = function(t, e, n, o) { n.stopKeydownPropagation && e.stopPropagation(), "Enter" === e.key ? Ae(t, e, n) : "Tab" === e.key ? Ee(e, n) : -1 !== Se.indexOf(e.key) ? Te() : -1 !== Pe.indexOf(e.key) && Le(e, n, o) }, Ae = function(t, e, n) { if (!e.isComposing && e.target && t.getInput() && e.target.outerHTML === t.getInput().outerHTML) { if (-1 !== ["textarea", "file"].indexOf(n.input)) return; Bt(), e.preventDefault() } }, Ee = function(t, e) { for (var n = t.target, o = X(e.focusCancel), i = -1, r = 0; r < o.length; r++) if (n === o[r]) { i = r; break } t.shiftKey ? ce(e, i, -1) : ce(e, i, 1), t.stopPropagation(), t.preventDefault() }, Te = function() { var t = K(), e = Z(); document.activeElement === t && V(e) ? e.focus() : document.activeElement === e && V(t) && t.focus() }, Le = function(t, e, n) { C(e.allowEscapeKey) && (t.preventDefault(), n(k.esc)) }, Oe = function(t, e, n) { t.popup.onclick = function() { e.showConfirmButton || e.showCancelButton || e.showCloseButton || e.input || n(k.close) } }, Me = !1, Ve = function(e) { e.popup.onmousedown = function() { e.container.onmouseup = function(t) { e.container.onmouseup = void 0, t.target === e.container && (Me = !0) } } }, He = function(e) { e.container.onmousedown = function() { e.popup.onmouseup = function(t) { e.popup.onmouseup = void 0, t.target !== e.popup && !e.popup.contains(t.target) || (Me = !0) } } }, je = function(e, n, o) { e.container.onclick = function(t) { Me ? Me = !1 : t.target === e.container && C(n.allowOutsideClick) && o(k.backdrop) } }; var Ie = function(t, e, n) { e.timer && (t.timeout = new Gt(function() { n("timer"), delete t.timeout }, e.timer)) }, qe = function(t, e) { if (!e.toast) return C(e.allowEnterKey) ? e.focusCancel && V(t.cancelButton) ? t.cancelButton.focus() : e.focusConfirm && V(t.confirmButton) ? t.confirmButton.focus() : void ce(e, -1, 1) : Re() }, Re = function() { document.activeElement && "function" == typeof document.activeElement.blur && document.activeElement.blur() }; var De, Ne = Object.freeze({ hideLoading: Nt, disableLoading: Nt, getInput: function(t) { var e = ht.innerParams.get(t || this), n = ht.domCache.get(t || this); return n ? B(n.content, e.input) : null }, close: Zt, closePopup: Zt, closeModal: Zt, closeToast: Zt, enableButtons: function() { Jt(this, ["confirmButton", "cancelButton"], !1) }, disableButtons: function() { Jt(this, ["confirmButton", "cancelButton"], !0) }, enableConfirmButton: function() { h("Swal.disableConfirmButton()", "Swal.getConfirmButton().removeAttribute('disabled')"), Jt(this, ["confirmButton"], !1) }, disableConfirmButton: function() { h("Swal.enableConfirmButton()", "Swal.getConfirmButton().setAttribute('disabled', '')"), Jt(this, ["confirmButton"], !0) }, enableInput: function() { return Xt(this.getInput(), !1) }, disableInput: function() { return Xt(this.getInput(), !0) }, showValidationMessage: function(t) { var e = ht.domCache.get(this); e.validationMessage.innerHTML = t; var n = window.getComputedStyle(e.popup); e.validationMessage.style.marginLeft = "-".concat(n.getPropertyValue("padding-left")), e.validationMessage.style.marginRight = "-".concat(n.getPropertyValue("padding-right")), L(e.validationMessage); var o = this.getInput(); o && (o.setAttribute("aria-invalid", !0), o.setAttribute("aria-describedBy", x["validation-message"]), A(o), rt(o, x.inputerror)) }, resetValidationMessage: function() { var t = ht.domCache.get(this); t.validationMessage && O(t.validationMessage); var e = this.getInput(); e && (e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedBy"), at(e, x.inputerror)) }, getProgressSteps: function() { return h("Swal.getProgressSteps()", "const swalInstance = Swal.fire({progressSteps: ['1', '2', '3']}); const progressSteps = swalInstance.params.progressSteps"), ht.innerParams.get(this).progressSteps }, setProgressSteps: function(t) { h("Swal.setProgressSteps()", "Swal.update()"); var e = s({}, ht.innerParams.get(this), { progressSteps: t }); xt(0, e), ht.innerParams.set(this, e) }, showProgressSteps: function() { var t = ht.domCache.get(this); L(t.progressSteps) }, hideProgressSteps: function() { var t = ht.domCache.get(this); O(t.progressSteps) }, _main: function(t) { ! function(t) { for (var e in t) Ot(i = e) || w('Unknown parameter "'.concat(i, '"')), t.toast && (o = e, -1 !== Rt.indexOf(o) && w('The parameter "'.concat(o, '" is incompatible with toasts'))), Mt(n = void 0) && h(n, Mt(n)); var n, o, i }(t), R() && Ht.swalCloseEventFinishedCallback && (Ht.swalCloseEventFinishedCallback(), delete Ht.swalCloseEventFinishedCallback), Ht.deferDisposalTimer && (clearTimeout(Ht.deferDisposalTimer), delete Ht.deferDisposalTimer); var e = s({}, jt, t); ee(e), Object.freeze(e), Ht.timeout && (Ht.timeout.stop(), delete Ht.timeout), clearTimeout(Ht.restoreFocusTimeout); var n = function(t) { var e = { popup: R(), container: j(), content: F(), actions: Q(), confirmButton: K(), cancelButton: Z(), closeButton: J(), validationMessage: W(), progressSteps: z() }; return ht.domCache.set(t, e), e }(this); return Pt(this, e), ht.innerParams.set(this, e), function(n, o, i) { return new Promise(function(t) { var e = function t(e) { n.closePopup({ dismiss: e }) }; Wt.swalPromiseResolve.set(n, t); Ie(Ht, i, e); o.confirmButton.onclick = function() { return re(n, i) }; o.cancelButton.onclick = function() { return ae(n, e) }; o.closeButton.onclick = function() { return e(k.close) }; le(o, i, e); ue(n, Ht, i, e); if (i.toast && (i.input || i.footer || i.showCloseButton)) { rt(document.body, x["toast-column"]) } else { at(document.body, x["toast-column"]) } ie(n, i); oe(i); qe(o, i); o.container.scrollTop = 0 }) }(this, n, e) }, update: function(e) { var n = {}; Object.keys(e).forEach(function(t) { Fe.isUpdatableParameter(t) ? n[t] = e[t] : w('Invalid parameter to update: "'.concat(t, '". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js')) }); var t = s({}, ht.innerParams.get(this), n); Pt(this, t), ht.innerParams.set(this, t), Object.defineProperties(this, { params: { value: s({}, this.params, e), writable: !1, enumerable: !0 } }) } }); function Ue() { if ("undefined" != typeof window) { "undefined" == typeof Promise && g("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"), De = this; for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n]; var o = Object.freeze(this.constructor.argsToParams(e)); Object.defineProperties(this, { params: { value: o, writable: !1, enumerable: !0, configurable: !0 } }); var i = this._main(this.params); ht.promise.set(this, i) } } Ue.prototype.then = function(t) { return ht.promise.get(this).then(t) }, Ue.prototype.finally = function(t) { return ht.promise.get(this).finally(t) }, s(Ue.prototype, Ne), s(Ue, Dt), Object.keys(Ne).forEach(function(e) { Ue[e] = function() { var t; if (De) return (t = De)[e].apply(t, arguments) } }), Ue.DismissReason = k, Ue.version = "8.15.3"; var Fe = Ue; return Fe.default = Fe }), void 0 !== this && this.Sweetalert2 && (this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2); $(window).on('load', () => { $('body').removeClass('preload'); }); (function(){ var docElem = document.documentElement; window.lazySizesConfig = window.lazySizesConfig || {}; window.lazySizesConfig.loadMode = 1; window.lazySizesConfig.lazyClass = 'lazy'; lazySizesConfig.srcAttr = 'data-src'; //set expand to a higher value on larger displays window.lazySizesConfig.expand = 10; // window.lazySizesConfig.expFactor = lazySizesConfig.expand < 380 ? 3 : 2; })(); $(document).on("click", ".comment-spoiler-content", function() { $(this).closest(".comment-review-box").removeClass("comment-spoiler"); $(".spoiler-content").removeClass("comment-spoiler-2") $(this).remove() }); $(document).on("click", "[data-target]", function() { $(".modal").fadeOut(); var data = $(this).data("target"); $(data).fadeIn(); $("body").css("overflow-y", "hidden"); }); $(document).on("click", ".modal-close", function() { $(".modal").fadeOut(); $("body").css("overflow-y", "auto"); $(".trailer-movie iframe").attr("src", ""); }); $(document).on("click", "[data-close]", function () { $(".group-create-modal").fadeOut(); $(".group-edit-modal").fadeOut(); $("body").css("overflow-y", "auto"); }); $(document).on("click", function (e) { var check =$(".modal").is(":visible") ? 1 : 0; if(check){ if (!$(e.target).is(".modal-close, .modal-close *, .seriesFragmans, .seriesFragmans *")) { $(".modal").fadeOut(); $("body").css("overflow-y", "auto"); $(".trailer-movie iframe").attr("src", ""); } } }); $(".ui.dropdown").dropdown(); function getInputSelection(elem) { if (typeof elem != "undefined") { s = elem[0].selectionStart; e = elem[0].selectionEnd; return elem.val().substring(s, e); } else { return ''; } } function dropDown(clickElement, openElement) { $(clickElement).click(function() { const display = $(this).children(openElement).is(':visible') ? 1 : 0; $(openElement).slideUp(); if (display) { $(this).children(openElement).slideUp(); } else { $(this).children(openElement).slideDown(); } }); } dropDown('.user-action-profile', '.user-action-profile-drop'); dropDown('.user-notification', '.user-notification-drop'); $(document).on("click", '.comment-action', function() { var display = $(this).children('.comment-action-options').is(':visible') ? 1 : 0; if (display) { $(this).children(".comment-action-options").slideUp(); } else { $(this).children(".comment-action-options").slideDown(); } }); $.each($("textarea[data-autoresize]"), function() { var offset = this.offsetHeight - this.clientHeight; var resizeTextarea = function(el) { $(el).css("height", "46px").css("height", el.scrollHeight + offset); }; $(this).on("keyup input", function() { resizeTextarea(this); }).removeAttr("data-autoresize"); }); $.each($('.emojionearea.emojionearea-inline>.emojionearea-editor'), function() { var offset = this.offsetHeight - this.clientHeight; var resizeTextarea = function(el) { $(el).css("height", "46px").css("height", el.scrollHeight + offset); }; $(this).on("keyup input", function() { resizeTextarea(this); }).removeAttr("data-autoresize"); }); function seasonSwiper(){ if ($(".episodes-slide").length) { var swiper = new Swiper(".episodes-slide", { slidesPerView: 6, spaceBetween: 0, mousewheel: true, pagination: false, mousewheelControl: true, parallax: true, speed: 300, breakpoints: { 1024: { slidesPerView: 5 }, 768: { slidesPerView: 4 }, 640: { slidesPerView: 2 }, 320: { slidesPerView: 1 } } }); var seasonNum = $(".series-season-nav-active").data("season-item"); var count = $("[data-season=" + seasonNum + "]:first").index(); if (count) { swiper.slideTo(count, 100); } swiper.on('sliderMove', function(e) { $(".series-watch-season-nav ul li").removeClass("series-season-nav-active"); var season = $(".swiper-slide-active").data("season"); $("[data-season-item=" + season + "]").addClass("series-season-nav-active") }); swiper.on('reachEnd', function(e) { var id = $(".episodes-slide").data("id"); var loadActive = $(".episodes-slide").data("load"); if(id && loadActive){ var type = 2; var page = parseInt($(".episodes-slide").attr("data-page")); page = page + 1; $.ajax({ type: "POST", url: "/episode/item/load", data: {page,type,id }, dataType:"json", success: function(result) { if(result.success) { $(".episodes-slide").attr('data-page',page); $(".episodes-slide .swiper-wrapper").append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { window.lazyLoadInstances.update(); swiper.update() } }); } }); $(document).on("click","[data-season-item]",function() { $(".series-watch-season-nav ul li").removeClass("series-season-nav-active"); var season = $(this).data("season-item"); $("[data-season-item=" + season + "]").addClass("series-season-nav-active") var count = $("[data-season=" + season + "]:first").index(); swiper.slideTo(count, 100) }); $(document).on("click",".move-episode",function() { var episodeCount = $(this).data("count"); $(".move-episode").parent("li").removeClass("series-season-nav-active") $(this).parent("li").addClass('series-season-nav-active'); // $(".series-watch-season-nav ul li").removeClass("series-season-nav-active"); // $("[data-season-item=" + season + "]").addClass("series-season-nav-active") var count = $("[data-move-episode=" + episodeCount + "]").index(); swiper.slideTo(count, 100) }); $(document).on("input",".go-to-episode",function(){ var episode = $(this).val(); $("[data-move-episode]").removeClass('pulse-active') var count = $("[data-move-episode*=" + episode + "]").index(); $("[data-move-episode*=" + episode + "]").addClass('pulse-active') swiper.slideTo(count, 100) }) /*$(".swiper-wrapper [data-season]").each(function() { var season = $(this).data("season"); var first = $("[data-season=" + season + "]:first"); var last = $("[data-season=" + season + "]:last"); if (first.attr("class").indexOf('new-season') == "-1") { first.addClass("new-season") } if (last.attr("class").indexOf('season-finale') == "-1") { // last.addClass("season-finale"); } });*/ if ($(".swiper-slide .active").length) { var positionActive = $(".swiper-slide .active").parent(".swiper-slide").index(); swiper.slideTo(positionActive, 100); } } } seasonSwiper(); $(document).on("click", '.reply-comment', function() { var parent = $(this).closest(".comment-review-box-bottom").next('.comment-review-box-reply-list').children('.comment-review-box-reply-form').toggle().children("input").focus() event.preventDefault(); }); $('#commentData').on("input", function() { var maxlength = $(this).attr("maxlength", 500); maxlength = $(this).attr("maxlength"); var currentLength = $(this).val().length; if (currentLength >= maxlength) { $(".textarea-length").html("Maksimum karakter sayısına ulaştınız."); } else { $(".textarea-length").html("" + (maxlength - currentLength) + " karakter daha yazabilirsiniz."); } }); function tabs(clickElement, dataName, content, navActiveClass, areaActiveClass) { $(document).on("click",clickElement,function() { const tabId = $(this).attr(dataName); if ($(".allseries").length) { var watched = $(this).data("watched"); $(".allseries").prop("checked", watched) } $(clickElement).removeClass(navActiveClass); $(content).removeClass(areaActiveClass); $(this).addClass(navActiveClass); $("#" + tabId).addClass(areaActiveClass); }); } function serialSwiper(){ if($(".serial-movies ul li").length) { var serialMovies = new Swiper(".serial-movies", { slidesPerView: 5, spaceBetween: 20, navigation: { nextEl: ".serial-right", prevEl: ".serial-left" }, breakpoints: { 768: { slidesPerView: 4 }, 640: { slidesPerView: 3 }, 320: { slidesPerView: 2 } } }); return serialMovies; } } var ss = serialSwiper() $(document).one('click','[data-number=tab-6]', function(){ var ss = serialSwiperWatch(); }); function serialSwiperWatch(){ if($(".serial-movies-watch ul li").length) { $(".serial-movies-watch").each(function(a,i){ var serialMovies = new Swiper(".serial-movies-watch-loop-"+a, { slidesPerView: 5, spaceBetween: 20, navigation: { nextEl: ".serial-right-"+a, prevEl: ".serial-left-"+a }, breakpoints: { 768: { slidesPerView: 4 }, 640: { slidesPerView: 3 }, 320: { slidesPerView: 2 } } }); }); return serialMovies; } } tabs('.settings-nav ul li', 'data-tab', '.settings-content', 'settings-nav-active', 'settings-content-active', ); tabs('.profile-nav ul li', 'data-number', '.profile-area', 'profile-nav-active', 'profile-area-active'); tabs(".series-profile-episodes-nav ul li", "data-season", ".series-profile-episodes-area", "series-tab-nav-active", "series-tab-content-active"); (function translateStatus() { const percent = document.querySelectorAll('.translate-status-progress[data-percent]'); const bars = document.querySelectorAll('.translate-status-progress-bar'); if (percent && bars) { for (let i = 0; i < percent.length; i += 1) { for (let j = 0; j < bars.length; j += 1) { $(bars[i]).css('width', `${percent[i].dataset.percent}%`); } } } }()); (function trendsUserStatus() { const percent = document.querySelectorAll('.trends-box-progress[data-percent]'); const bars = document.querySelectorAll('.trends-box-progress-bar'); if (percent && bars) { for (let i = 0; i < percent.length; i += 1) { for (let j = 0; j < bars.length; j += 1) { $(bars[i]).css('width', `${percent[i].dataset.percent}%`); } } } }()); $(document).on("click",".seriesFragmans",function() { var trailer = $(this).attr("data-yt"); trailer = trailer.split(","); var say = 0; var tt; var cc; $(".tv-trailer-pagi ul").html(""); $.each(trailer, function(a, i) { say += 1; if (say == 1) { cc = 'class="active"'; tt = 'https://www.youtube.com/embed/' + trailer[a] + '?rel=0&hd=1'; $(".trailer-modal iframe").attr("src", tt); } else { cc = ""; } $(".tv-trailer-pagi ul").append('
  • ' + say + '. Trailer
  • '); }); }); $(".seriesFragmans a").click(function(){ event.preventDefault(); }); function showConfetti() { setTimeout(() => { $(".wrapper-inner").append('') canvas = document.getElementById("confetti"); context = canvas.getContext("2d"); width = canvas.width = window.innerWidth; height = canvas.height = window.innerHeight; particle = []; particleCount = 0, gravity = 0.3, colors = ['#f44336', '#e91e63', '#9c27b0', '#673ab7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4CAF50', '#8BC34A', '#CDDC39', '#FFEB3B', '#FFC107', '#FF9800', '#FF5722', '#795548']; for (var i = 0; i < 700; i++) { particle.push({ x: width / 2, y: height / 2, boxW: randomRange(5, 20), boxH: randomRange(5, 20), size: randomRange(2, 8), spikeran: randomRange(3, 5), velX: randomRange(-8, 8), velY: randomRange(-50, -10), angle: convertToRadians(randomRange(0, 360)), color: colors[Math.floor(Math.random() * colors.length)], anglespin: randomRange(-0.2, 0.2), draw: function() { context.save(); context.translate(this.x, this.y); context.rotate(this.angle); context.fillStyle = this.color; context.beginPath(); context.fillRect(this.boxW / 2 * -1, this.boxH / 2 * -1, this.boxW, this.boxH); context.fill(); context.closePath(); context.restore(); this.angle += this.anglespin; this.velY *= 0.999; this.velY += 0.3; this.x += this.velX; this.y += this.velY; if (this.y < 0) { this.velY *= -0.2; this.velX *= 0.9; }; if (this.y > height) { this.anglespin = 0; this.y = height; this.velY *= -0.2; this.velX *= 0.9; }; if (this.x > width || this.x < 0) { this.velX *= -0.5; }; }, }); } r1 = { x: width / 2 - 150, y: height / 2 - 150, width: 300, height: 300, velX: 0, velY: -10, img: loadImage(""), alphatop: 0 }; function drawScreen() { size = 50; pFontName = "Lucida Sans Unicode"; context.font = size + "pt " + pFontName; context.fillText("", width / 2, 150); if (r1.alphatop < 1) { r1.alphatop += 0.01; } else { r1.alphatop = 1; } context.globalAlpha = r1.alphatop; context.drawImage(r1.img, r1.x, r1.y); context.textAlign = 'center'; if (r1.alphatop === 1) { r1.velY *= 0.999; r1.velY += 0.3; r1.x += r1.velX; r1.y += r1.velY; } if (r1.y + r1.height > height) { r1.anglespin = 0; r1.y = height - r1.height; r1.velY *= -0.8; r1.velX *= 0.9; }; context.globalAlpha = 1; for (var i = 0; i < particle.length; i++) { particle[i].draw(); } } function loadImage(url) { var img = document.createElement("img"); img.src = url; return img; } function update() { context.clearRect(0, 0, width, height); drawScreen(); requestAnimationFrame(update); } update(); function randomRange(min, max) { return min + Math.random() * (max - min); } function randomInt(min, max) { return Math.floor(min + Math.random() * (max - min + 1)); } function convertToRadians(degree) { return degree * (Math.PI / 180); } function drawStar(cx, cy, spikes, outerRadius, innerRadius, color) { var rot = Math.PI / 2 * 3; var x = cx; var y = cy; var step = Math.PI / spikes; context.strokeSyle = "#000"; context.beginPath(); context.moveTo(cx, cy - outerRadius) for (i = 0; i < spikes; i++) { x = cx + Math.cos(rot) * outerRadius; y = cy + Math.sin(rot) * outerRadius; context.lineTo(x, y) rot += step x = cx + Math.cos(rot) * innerRadius; y = cy + Math.sin(rot) * innerRadius; context.lineTo(x, y) rot += step } context.lineTo(cx, cy - outerRadius) context.closePath(); context.fillStyle = color; context.fill(); } }, 10) setTimeout(function() { $("#confetti").fadeOut(); }, 3300) setTimeout(function() { $("#confetti").remove(); }, 4500) } var boxSlide = new Swiper(".box-slide", { slidesPerView: 5, spaceBetween: 30, navigation: { nextEl: ".box-slide-right", prevEl: ".box-slide-left" } }); var boxSlide2 = new Swiper(".box-slide2", { slidesPerView: 5, spaceBetween: 30, navigation: { nextEl: ".box-slide-right", prevEl: ".box-slide-left" } }); var boxSlide3 = new Swiper(".box-slide3", { slidesPerView: 5, spaceBetween: 30, navigation: { nextEl: ".box-slide-right", prevEl: ".box-slide-left" } }); $('.mobile-nav-icon').click(function() { var display = $('.leftbar').is(':visible') ? 1 : 0; if (!display) { $(".leftbar").show(); $(".leftbar").css({ 'top': '76px', 'height': 'calc(100% - 76px)', 'position': 'fixed', 'z-index': '100', 'overflow-y': 'scroll', 'background': '#14161D' }); } else { $(".leftbar").hide(); $(".leftbar").css({ 'top': '0', 'height': 'auto', 'position': 'relative', 'z-index': '100', 'overflow-y': 'scroll', 'background': '#14161D' }); } }); /*if($(".homeTrailers").length){ var homeTrailers = new Swiper(".homeTrailers", { slidesPerView: 8, spaceBetween: 15, breakpoints: { 1024: { slidesPerView: 6, spaceBetween: 40 }, 768: { slidesPerView: 6, spaceBetween: 30 }, 640: { slidesPerView: 4, spaceBetween: 20 }, 320: { slidesPerView: 2, spaceBetween: 10 } } }); }*/ if ($(".serial-movies ul li").length) { var serialMovies = new Swiper(".serial-movies", { slidesPerView: 5, spaceBetween: 20, navigation: { nextEl: ".serial-right", prevEl: ".serial-left" }, breakpoints: { 768: { slidesPerView: 4 }, 640: { slidesPerView: 3 }, 320: { slidesPerView: 2 } } }); } var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split("&"), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split("="); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : sParameterName[1]; } } }; $.expr[":"].contains = $.expr.createPseudo(function(arg) { return function( elem ) { return $(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; }; }); function countdownItem(time,element){ var countDownDate = new Date(time).getTime();; // Update the count down every 1 second var x = setInterval(function() { // Get today's date and time var now = new Date().getTime(); // Find the distance between now and the count down date var distance = countDownDate - now; // Time calculations for days, hours, minutes and seconds var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); $(element).find(".days").children(".countdown-value").text(days); $(element).find(".hours").children(".countdown-value").text(hours); $(element).find(".minutes").children(".countdown-value").text(minutes); $(element).find(".seconds").children(".countdown-value").text(seconds); // If the count down is finished, write some text if (distance < 0) { clearInterval(x); $(element).find(".countdown-items").html('
    Yayınlandı Hemen İzle
    ') } }, 1000); } $("[data-countdown-item]").each(function(){ var time = $(this).data("countdown-item"); countdownItem(time,this) }); var origin = window.location.origin; var loader = '
    '; var loaderIco = '
    '; var checkedIco = ''; var addIco = ''; $(document).ready(function() { var pathName = window.location.href; $(".user-left-nav li a[href='"+pathName+"']").parent("li").addClass("user-left-nav-active") if($("[data-navigo]").length){ var leftNavActive = function(){ $(".sidebar-box ul li").removeClass('active') $(".user-left-nav li").each(function(){ var link = $(this).find('a').attr('href'); var href = window.location.href; if(link == href){ $(this).parent().addClass('user-left-nav-active'); } }); } leftNavActive(); } var modal = document.querySelector(".watch-together-modal"); $(".watch-together-button").click(function() { $(".watch-together-modal").fadeIn(); }); $(".watch-together-modal-close button").click(function() { $(".watch-together-modal").fadeOut(); }); var showChar = 550; var ellipsestext = "..."; var moretext = $("[data-more]").data("more") var lesstext = $("[data-less]").data("less") $('.article p').each(function() { var content = $(this).html(); if (content.length > showChar) { var c = content.substr(0, showChar); var h = content.substr(showChar, content.length - showChar); var html = c + '' + ellipsestext + '' + h + '' + moretext + ''; $(this).html(html); } }); $(".morelink").click(function() { if ($(this).hasClass("less")) { $(this).removeClass("less"); $(this).html(moretext); } else { $(this).addClass("less"); $(this).html(lesstext); } $(this).parent().prev().toggle(); $(this).prev().toggle(); return false; }); }); var CaptchaCallback = function() { jQuery('.g-recaptcha').each(function(index, el) { grecaptcha.render(el, { 'sitekey': jQuery(el).attr('data-sitekey'), 'theme': jQuery(el).attr('data-theme'), 'size': jQuery(el).attr('data-size'), 'tabindex': jQuery(el).attr('data-tabindex'), 'callback': jQuery(el).attr('data-callback'), 'expired-callback': jQuery(el).attr('data-expired-callback'), 'error-callback': jQuery(el).attr('data-error-callback') }); }); }; function GetReCaptchaID(containerID) { var retval = -1; $(".g-recaptcha").each(function(index) { if (this.id == containerID) { retval = index; return; } }); return retval; } humane.error = humane.spawn({ addnCls: 'humane-error', timeout: 7000, clickToClose: true }) humane.success = humane.spawn({ addnCls: 'humane-success', timeout: 7000, clickToClose: true }) if($(".leftbar-search").length){ function getNotification(status, value) { if (status == 'error') { humane.error(value); } else { humane.success(value); } } }else { function getNotification(type, text) { Swal.fire({ title: '', html: text, type: type, confirmButtonText: 'Tamam' }); } } function getNotification2(type, text) { const Toast = Swal.mixin({ toast: true, position: 'top-end', showConfirmButton: false, timer: 3000, }) Toast.fire({ type: type, title: text, }) } function setCookie(name,value,days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + (value || "") + expires + "; path=/"; } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } $(document).on("click", "[data-load-episode]", function() { var _t = $(this).data("load-episode"); var page = $(this).attr("data-page"); var stable = $(this).attr("data-stable"); var tag = $(this).attr("data-tag"); if (page && _t) { var t = $(this); var html = t.html(); t.html(loaderIco); t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "_t": _t, "_t_id": tag, "stable": stable, "page": page, "type": "loadEpisode" }, success: function(result) { if (result) { if (result.success) { t.attr("data-page", parseInt(page) + 1); if (_t == 1) { $(".little-series").append(result.theme) }if (_t == 55) { $(".anime-series").append(result.theme) } else if (_t == 2) { $(".little-series").append(result.theme) var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); } else if (_t == 22) { $(".little-series").append(result.theme) var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); }else if (_t == 4) { $(result.theme).insertBefore("#tab-6 > .load-more-series"); serialSwiperWatch(); var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); } } else { getNotification2("info", "Listelenecek içerik kalmadı !") } } }, complete: function() { t.html(html); t.prop("disabled", false) } }); } }); $(document).on("click", "[data-load-comment]", function() { var id = $(this).data("load-comment"); var page = $(this).attr("data-page"); var type = $(this).attr("data-type"); if (page && id) { var t = $(this); var html = t.html(); t.html(loaderIco); t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/get/more/comment", dataType: "json", data: { type, id, page, }, success: function(result) { if (result.theme) { t.attr("data-page", parseInt(page) + 1); $(".comment-review-list").append(result.theme) } else { t.remove() getNotification2("error", "Listelenecek yorum kalmadı !") } }, complete: function() { t.html(html); t.prop("disabled", false) window.lazyLoadInstances.update(); } }); } }); function currentYPosition() { if (self.pageYOffset) return self.pageYOffset; if (document.documentElement && document.documentElement.scrollTop) return document.documentElement.scrollTop; if (document.body.scrollTop) return document.body.scrollTop; return 0; } function elmYPosition(eID) { var elm = document.getElementById(eID); var y = elm.offsetTop; var node = elm; while (node.offsetParent && node.offsetParent != document.body) { node = node.offsetParent; y += node.offsetTop; } return y; } function smoothScroll(eID) { $('html,body').stop().animate({ 'scrollTop': elmYPosition(eID) }, 900, 'swing'); return false; } function addComment(val) { event.preventDefault(); var spoiler = $("#commentSpoiler").is(":checked") ? 1 : 0; var comment = $("#commentData").data("emojioneArea").getText().replace(':)', ':slight_smile:').replace(':(', ':frowning2:').replace(':D', ':smiley:').replace(':O', ':astonished:').replace(':P', ':stuck_out_tongue_winking_eye:').replace(':/', ':confused:').replace(':S', ':dizzy_face:').replace('<3', ':heart:'); var id = $("#commentData").data("id"); var type = $("#commentData").data("type"); if (comment) { var html = $(val).html(); $(val).html('
    '); $("#commentData").data("emojioneArea").disable(); var s = emojione.toShort(comment); $(val).prop("disabled", true); $("input").prop("disabled", true); $.ajax({ type: "POST", url: origin + "/add/comment", dataType: "json", data: { "id":id, "comment":s, "type": type, "spoiler": spoiler, }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { if (type == 3 || type == 2) { $(".comment-review-list").prepend(result.data); if (result.data) { if ($(".tv-ta-bx:last").length) { smoothScroll("comment-"+result.id) } $(".alert-danger").remove(); } } else { $(".comment-review-list").prepend(result.data); } getNotification2("success", result.message); } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } }, error: function(e) {}, complete: function() { $("#commentData").data("emojioneArea").setText(''); $("#commentData").data("emojioneArea").enable(); $("#commentData").val(""); $(val).prop("disabled", false); $("input").prop("disabled", false); $(val).html(html); } }); } event.preventDefault(); } $(document).on("click", ".commentReply", function() { var replyElem = $(this).children("span"); var replyCount = $.trim(replyElem.text()); var parent = $(this).closest('.comment-review-box-reply-list'); replyCount = replyCount.match(/(\d+)/gi); input = $(this).prev("input"); var comment = $(input).val(); var episode = $(input).data("id"); var commentId = $(input).data("comment"); var t = $(this); if (comment && commentId) { var html = t.html(); t.html(loader); t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/set/comment/reply", dataType: "json", data: { episode, "message": comment, "id":commentId }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { if (result.reply) { var check = parent.find("ul").length ? 1 : 0; if (!check) { parent.append('
      '); } parent.find("ul").append(result.reply); var eq = parent.find('.reply-list-wrapper > li').length - 1 smoothScroll("comment-"+commentId) } getNotification2("success", result.message); } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } }, error: function(e) {}, complete: function() { input.val(""); t.prop("disabled", false); t.html(html); input.prop("disabled", false) } }); } event.preventDefault(); }); $(document).on("click",".fnc_addFeel",function(){ event.preventDefault(); var t = $(this); $(t).prop("disabled",true); var id = $(this).data("id"); var action = $(this).data("action"); var type = $(this).data("type"); var series_id = $(this).data("series_id"); if (id && type) { $.ajax({ type: "POST", url: origin + "/set/action", dataType: "json", data: { series_id, "post_id":id, "action":action, "type":type }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { var count = parseInt($(t).next("span").text()); if (result.status == 1) { count = parseInt(count) + 1; } else { count = parseInt(count) - 1; } $(t).next("span").text(count); if(type != "discussion"){ if (action == 1) { $(t).addClass("comment-action-active"); var like = $(t).children("span").text() $(t).children("span").html(parseInt(like) + 1); } else if (action == 3) { $(t).addClass("comment-action-active"); var like = $(t).children("span").text() $(t).children("span").html(parseInt(like) + 1); } }else { $(t).addClass('active') } } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } }, error: function(e) {}, complete: function() { $(this).prop("disabled",false); } }); } }) var seasonWatchCheck = $(".series-tab-nav-active").data("watched"); $(".series-profile-episodes-top .allseries").prop('checked',seasonWatchCheck) $(document).on("click", ".allseries", function() { var season = $(this).data("season") var s_id = $(this).data("tvseries"); var series = $(this).data("series"); var all = $(this).data("all"); if(all){ season = $(".series-tab-nav-active").data("num"); var data = { series_id:s_id, season } }else { var data = { "episode_id": s_id, "season": season, "series_id": series, } } if (s_id) { $.ajax({ type: "POST", url: origin + "/set/episode/watch", dataType: "json", data: data, success: function(result) { if (result.success) { if(all){ $(".episodeWc_" + season).prop("checked", result.active); } getNotification2("success", result.message); } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } else { getNotification2("error", result.message); } }, complete: function() {} }); } else {} }); $(document).on("click", "[data-addwatch]", function() { var e_id = $(this).data("addwatch"); var season = $(this).data("season"); var series = $(this).data("series"); var t = $(this); if (e_id) { $.ajax({ type: "POST", url: origin + "/set/episode/watch", dataType: "json", data: { "episode_id": e_id, "season":season, "series_id":series, }, success: function(result) { if (result.success) { getNotification2("success", result.message); } else if (result.session) { if($(".login-modal").length){ t.prop("checked",false) $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } else { getNotification2("error", result.message); } }, complete: function() { } }); } }); $(document).on("click", "[data-addwatchanime]", function() { var e_id = $(this).data("addwatchanime"); var season = $(this).data("season"); var series = $(this).data("series"); var t = $(this); if (e_id) { $.ajax({ type: "POST", url: origin + "/set/anime/episode/watch", dataType: "json", data: { "episode_id": e_id, "season":season, "series_id":series, }, success: function(result) { if (result.success) { getNotification2("success", result.message); } else if (result.session) { if($(".login-modal").length){ t.prop("checked",false) $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } else { getNotification2("error", result.message); } }, complete: function() { } }); } }); $(document).on("click",".set-follow",function(){ var content_id = $(this).data("data"); var type = $(this).data("type"); if (content_id && type) { var html = $(this).html(); var t = $(this); $(this).html(loaderIco) t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/set/follow", dataType: "json", data: { type, content_id }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { getNotification2("success", result.message); if(type != 5){ t.html(result._t); }else { t.toggleClass('active') } } else if (result.session) { $(t).html(html) if ($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } }, error: function(e) {}, complete: function() { t.prop("disabled", false); if(type == 5){ t.html(html) } } }); } event.preventDefault(); }) function addFavorite(type, val, t) { if (type && val) { $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "data": val, "status": type, "type": "addFavorite" }, success: function(result) { if (result.status) { $(t).addClass("favorite-active"); } else { $(t).removeClass("favorite-active"); } if (result.error) { getNotification2("error", result.error); } else if (result.success) { getNotification2("success", result.success); } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } }, error: function(e) {}, complete: function() {} }); } event.preventDefault(); } $('body').off("click", "[data-bbcode]").on("click", "[data-bbcode]", function() { var editor = $("[data-editor]"); var str = editor.val(); var selection = getInputSelection(editor); if (selection.length > 0) { editor.val(str.replace(selection, "[" + $(this).attr("data-bbcode") + "]" + selection + "[/" + $(this).attr("data-bbcode") + "]")); } else { editor.val(str + "[" + $(this).attr("data-bbcode") + "]" + "[/" + $(this).attr("data-bbcode") + "]"); } editor.focus(); }); $(document).on("click", "[data-newtopic]", function() { var title = $("#topicTitle").val(); var desc = $("#topicDesc").val(); var category = $("#category").val(); if (title && desc && category) { var t = $(this); var html = $(this).html(); t.html(loaderIco); t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/set/discussion", dataType: "json", data: { title, category, desc }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { getNotification2("success", result.message); if(result.link){ setTimeout(function() { window.location.href = result.link; }, 1500) } } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } }, error: function(e) {}, complete: function() { t.html(html); $("#forumTopic").trigger("reset") t.prop("disabled", false); $("[data-close]").click() } }); } else { getNotification("error", "Lütfen gerekli alanları doldurunuz !"); } }); if($(".leftbar-search").length){ $('#forumTopic .dropdown').dropdown('setting', 'onChange', function(a){ $("#series").val(a); if(a == 1){ $(".forum-cat-text").removeClass("forum-movies,forum-series").addClass('forum-general') }else if(a == 2 || a == 3){ $(".forum-cat-text").removeClass("forum-series,forum-general").addClass('forum-movies') }else if(a == 4 || a == 5){ $(".forum-cat-text").removeClass("forum-movies,forum-general").addClass('forum-series') } }); $('#contactForm .dropdown').dropdown('setting', 'onChange', function(a){ $("#subject-id").val(a); }); } $(document).on("click", "[data-add-forum]", function() { var title = $("#topicTitle").val(); var desc = $("#topicDesc").val(); var series = $("#series").val(); if (title && desc && series) { var t = $(this); var html = $(this).html(); t.html(loaderIco); t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "series": series, "title": title, "desc": desc, "type": "newTopic2" }, success: function(result) { if (result) { if (result.error) { getNotification2("error", result.error); } else if (result.success) { getNotification2("success", result.success); if(result.link){ setTimeout(function() { window.location.href = result.link; }, 1500) } } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } } }, error: function(e) {}, complete: function() { t.html(html); $("#forumTopic").trigger("reset") t.prop("disabled", false); $("[data-close]").click() } }); } else { getNotification("error", "Lütfen gerekli alanları doldurunuz !"); } }); function spoox(e_id) { var e_id = e_id ? e_id : $("#tv-spoox").data("spoox"); var room = $("#tv-spoox").data("room"); var eg_id = $(".tab-active").data("eg"); if (e_id) { if (eg_id) { var id = $("[data-eg=" + eg_id + "]").data("number"); $("#" + id + " li").removeClass('series-alter-active') $("#" + id).find("li:first").addClass('series-alter-active') } $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "vid": e_id, "eg_id": eg_id, "room": room, "type": "get_stream" }, success: function(result) { if (result.success) { $(".tv-loader-wp-cnt").fadeOut(function() { $("#tv-spoox").html(' '); setTimeout(function() { var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); }, 1500) }); } else if(result.error) { $(".tv-loader-wp-cnt").fadeOut(function() { $("#tv-spoox").html(result.theme); }); } }, complete: function() { setTimeout(function() { var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); }, 1500) } }); } } window.onload = function() { spoox(); } $(document).on("click", "[data-hs]", function() { var hash = $(this).data("hs"); var t = $(this); if (hash) { t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "hash": hash, "type": "videoGet" }, success: function(result) { if (result) { if (result.success) { $("#spooxFrame").attr("src", result.hash); $(".series-watch-alternatives ul li").removeClass("series-alter-active"); t.parent().addClass('series-alter-active'); } else if (result.empty) { getNotification("error", "hash yok"); } else { getNotification("error", result.error); } } }, complete: function() { t.prop("disabled", false); } }); } }); $(document).on("click", "[data-hhs]", function() { var hash = $(this).data("hhs"); var lock = $(this).data("lock"); var t = $(this); if (hash) { $(".series-watch-alternatives ul li").removeClass("series-alter-active"); $(this).parent().addClass("series-alter-active") $("#tv-spoox2").html('') }else if (lock){ var decode = $("
      ").html(atob(lock)).text() $("#tv-spoox2").html(decode) } }); jQuery.loadScript = function(t, e) { jQuery.ajax({ url: t, dataType: "script", success: e, async: !0 }) } var exp = $('.experiance').data("value"); if ($(".user-action-profile-text").length && $(".toto").length < 1) { if (getCookie("level") == 1) { // setInterval('getLevel()', 10000); } // setInterval('getNotification2()', 10000); } $(document).on("change", "#profilePhoto", function() { var file_data = $('#profilePhoto').prop('files')[0]; var form_data = new FormData(); form_data.append('file', file_data); form_data.append('type', "addPhoto"); $(".tv-profile-photo").prepend('
      ' + loader + '
      ') $(".tv-profile-photo").css("opacity", "0.5"); $.ajax({ url: origin + "/user/set/avatar", dataType: 'json', cache: false, contentType: false, processData: false, data: form_data, type: 'post', success: function(result) { if (result.success) { $(".settings-profile-photo-change img").attr("src", "/uploads/users/" + result.image); $(".user-action-photo img").attr("src", "/uploads/users/" + result.image); getNotification2("success", result.message) } else if (result.error) { getNotification2("error", result.message) } }, complete: function() { $(".img-loader").remove(); $("form").trigger("reset"); $(".tv-profile-photo").css("opacity", 1); } }); }); var contentHtml = $(".content-inner").html(); var Search = function(){ var typingTimer; //timer identifier var doneTypingInterval = 300; //time in ms, 5 second for example var contentHtml = $(".leftbar-search-result-in").html(); $(document).off("input", ".tvSearch").on("input", ".tvSearch", function(t) { $(".leftbar-search-result-in").html(""); clearTimeout(typingTimer); var data = $(this).val(); if (data && data.length >= 3) { typingTimer = setTimeout(function(){ $(".leftbar-search-result").show(); $.ajax({ type: "POST", url: "/search", dataType: "json", data: {query:data}, success: function(result) { if(result) { if(result.success) { $(".leftbar-search-result-in").append(result.theme); } else { $(".leftbar-search-result-in").append(result.error); } } }, complete: function() { window.lazyLoadInstances.update(); } }); }, doneTypingInterval); } else { } }); }() $(document).on("click", "#save-btn", function() { var profileName = $("#name").val(); var username = $("#username").val(); var emailAddress = $("#email").val(); var location = $("#location").val(); var bio = $("#bio").val(); if (profileName && emailAddress) { $("input,textarea").prop("disabled", true); var html = $(this).html(); var t = $(this); $(this).html(loader); $.ajax({ type: "POST", url: origin + "/set/user/info", dataType: "json", data: { profileName, emailAddress, about:bio, country:location }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { getNotification2("success", result.message); } else if (result.session) { window.location.href = '/login'; } }, error: function(e) {}, complete: function() { t.html(html); $("input[name!=username],textarea").prop("disabled", false); } }); } else { getNotification2("error", "Lütfen gerekli alanları boş bırakmayınız !"); } }); // $(document).on("click", "#ps-btn", function() { // var oldPw = $("#old-ps").val(); // var newPw = $("#new-ps").val(); // var newPwAgain = $("#newPasswordAgain").val(); // if (oldPw && newPw) { // var html = $(this).html(); // var t = $(this); // $(this).html(loader); // $.ajax({ // type: "POST", // url: origin + "/ajax/service", // dataType: "json", // data: { // "old": oldPw, // "new": newPw, // "try": newPwAgain, // "type": "changePass" // }, // success: function(result) { // if (result) { // if (result.error) { // getNotification2("error", result.error); // } else if (result.success) { // getNotification2("success", result.success); // window.location.href = '/signout'; // } else if (result.session) { // window.location.href = '/login'; // } // } // }, // error: function(e) {}, // complete: function() { // t.html(html); // $("input").prop("disabled", false); // } // }); // } else { // getNotification2("error", "Lütfen gerekli alanları boş bırakmayınız !"); // } // }); $(document).on("click", "#ps-btn",function(){ event.preventDefault() var t = $(this); var html = t.html(); t.html(loaderIco); var form = $(".password-form").serialize(); if(form){ $.ajax({ type: "POST", url: "/set/user/password", data: form, dataType:"json", success: function(result) { if(result.success) { $(".password-form").prev(".form-result").html(result.message) }else { $(".password-form").prev(".form-result").html(result.message) } }, complete: function() { t.html(html); t.prop('disabled',false); $(".password-form").trigger('reset') } }); } }); // $(document).on("change", "#profilePhoto", function() { // var file_data = $('#profilePhoto').prop('files')[0]; // var form_data = new FormData(); // form_data.append('file', file_data); // form_data.append('type', "addPhoto"); // $(".settings-profile-photo-change").prepend('
      ' + loader + '
      ') // $(".settings-profile-photo-change").css("opacity", "0.5"); // $.ajax({ // url: origin + "/ajax/service", // dataType: 'json', // cache: false, // contentType: false, // processData: false, // data: form_data, // type: 'post', // success: function(result) { // if (result) { // if (result.success) { // $(".settings-profile-photo-change img").attr("src", "uploads/users/" + result.image); // $(".user-action-profile img").attr("src", "uploads/users/" + result.image); // } else if (result.error) { // getNotification2("error", result.error) // } // } // }, // complete: function() { // $(".img-loader").remove(); // $("form").trigger("reset"); // $(".settings-profile-photo-change").css("opacity", 1); // } // }); // }); $(document).on("click", "[data-follow]", function() { var id = $(this).data("follow"); if (id) { $(this).prop("disabled", true); var html = $(this).html(); $(this).html(loaderIco); var t = $(this); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "data": id, "type": "following" }, success: function(result) { if (result) { if (result.error) { t.html(html); getNotification2("error", result.error); } else if (result.success) { if (result.type == "follow") { var followers = parseInt($(".tv-profile-followers p").text()) $(".tv-profile-followers p").text(followers + 1); notType = "success"; $("#messageList").show(); t.html(" Takip ediliyor"); } else { var followers = parseInt($(".tv-profile-followers p").text()) $(".tv-profile-followers p").text(followers - 1); notType = "info"; t.html("Takip et"); $("#messageList").hide(); } getNotification2(notType, result.success); } else if (result.session) { window.location.href = '/login'; } else {} } else {} }, error: function(e) {}, complete: function() { t.prop("disabled", false); } }); } else {} }); $(document).on("click", "[data-social]", function() { var facebook = $("#facebook").val(); var twitter = $("#twitter").val(); var instagram = $("#instagram").val(); if (facebook && twitter && instagram) { $(this).html(loaderIco); var t = $(this); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "facebook": facebook, "twitter": twitter, "instagram": instagram, "type": "addSocial" }, success: function(result) { if (result) { if (result.error) { getNotification("error", result.error); } else if (result.success) { getNotification("success", result.success); } else if (result.session) { window.location.href = '/login'; } } }, error: function(e) {}, complete: function() { t.html("Ekle"); } }); } else {} }); $(document).on("click", "[data-send]", function() { var id = $(this).data("send"); var message = $("#message").val(); if (id && message) { var t = $(this); var html = t.html(); t.html(loaderIco); t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "message": message, "id": id, "type": "sendMessage" }, success: function(result) { if (result) { if (result.success) { getNotification2("success", result.success); } else if (result.session) { window.location.href = '/login'; } else { getNotification2("error", result.error); } } }, complete: function() { $("#message").val(""); t.html(html); t.prop("disabled", false); } }); } }); $(".tv-mess-lft-bx").click(function() { $(".tv-mess-lft-bx").removeClass("tv-mess-lft-bx-act"); $(this).addClass("tv-mess-lft-bx-act"); var name = $(this).find(".tv-mess-lft-bx-txt").children("span").text(); var uname = $(this).data("uname"); $(".tv-mess-hd-txt-any a").attr("href", "/profile/" + uname) $(".tv-mess-hd-txt-any span").text(name); }) $(document).on("click", "[data-get]", function() { var hash = $(this).data("get"); var id = $(this).data("id"); var uname = $(this).data("uname"); if (hash) { $("#mHash").val(hash); $("#any").val(id); $(".tv-mess-rgt-bxs").html(loader); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "hash": hash, "type": "getMessage" }, success: function(result) { if (result) { $(".tv-mess-rgt-wrt-wp").html(result.send); if (result.message) { console.log(uname) $(".tv-mess-rgt-wrt").show(); $(".tv-mess-rgt-bxs").html(result.message); window.history.replaceState("", "", "./profile/message/" + uname); $(".msg-count").removeClass("msg-count-log"); } else if (result.session) { window.location.href = '/login'; } else { $(".tv-mess-rgt-wrt").hide(); getNotification("error", result.error); } } }, complete: function() { $('.tv-mess-rgt-bxs').stop().animate({ 'scrollTop': $(".tv-mess-rgt-bxs-okt:last").offset().top }, 900, 'swing'); } }); } }); $(document).on("keyup", "#sendMessage", function() { var data = $(this).val(); var hash = $("#mHash").val(); var id = $("#any").val(); var t = $(this); var key = event.which ? event.which : event.keyCode; if (data) { if (key == 13) { t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "hash": hash, "id": id, "message": data, "type": "sendMessage" }, success: function(result) { if (result) { if (result.message) { $(".tv-mess-rgt-bxs").append(result.message) } else if (result.session) { window.location.href = '/login'; } else { getNotification("error", result.error); } } }, complete: function() { t.val(""); t.prop("disabled", false); $('.tv-mess-rgt-bxs').stop().animate({ 'scrollTop': 9999 }, 900, 'swing'); } }); } } }); var opens = 0; $("#mSearchBox").click(function() { $(".tv-mss-search-cnt").slideToggle(); if (opens == 0) { $(this).children("svg").find("use").attr("xlink:href", "assets/default/img/icons/close.svg#close"); opens = 1; } else if (opens == 1) { $(this).children("svg").find("use").attr("xlink:href", "assets/default/img/icons/search.svg#search"); opens = 0; $(".tv-mess-lft-bx").show(); } event.preventDefault(); }); var commentId = ""; var comType = ""; /*$(document).on("click", "[data-delete]", function() { commentId = $(this).data("delete"); if (commentId) { comType = $(this).data("type") ? $(this).data("type") : 1; $(".delete-modal").is(":hidden") ? $(".delete-modal").fadeIn() : ""; } });*/ $(document).on("click", "[data-report]", function() { commentId = $(this).data("report"); if (commentId) { comType = $(this).data("type"); $(".tv-tou-mdl-report").is(":hidden") ? $(".tv-tou-mdl-report").show() : ""; } }); $(document).on("click", "[data-delete]", function() { var id = $(this).data("delete"); var type = $(this).data("type"); var title = type == "comment" ? 'Yorumun' : 'Konu'; var titleS = type == "comment" ? 'Yorumu' : 'Konuyu'; var issue = $("#reportIssue").val(); var t = $(this); var html = t.html(); Swal.fire({ title: title+' Silinecek', heightAuto: false, text: "Bu işlemi yapmak istediğinden emin misin?", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonText: 'Hayır', cancelButtonColor: '#d33', confirmButtonText: titleS+' sil' }).then((result) => { if (result.value) { if (id) { $.ajax({ type: "POST", url: origin + "/"+type+"/delete/post", dataType: "json", data: { id }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { getNotification2("success", result.message); if (type == "comment") { $("[data-delete=" + id + "]").closest('.comment-review-box').remove(); $(".delete-modal").fadeOut(); } else if (type == "discussion") { window.location.href = "./tartismalar"; } id = ""; } else if (result.session) { window.location.href = '/login'; } }, error: function(e) {}, complete: function() { id = ""; $("#reportIssue").val(""); $(".tv-tou-mdl-cls").click() $("[data-close]").click() t.html(html) } }); } } }) }); $(document).on("click", "[data-delete-discuss]", function() { var id = $(this).data("delete-discuss"); var t = $(this); var html = t.html(); Swal.fire({ title: 'Konu Silinecek', heightAuto: false, text: "Bu işlemi yapmak istediğinden emin misin?", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonText: 'Hayır', cancelButtonColor: '#d33', confirmButtonText: "Konuyu sil" }).then((result) => { if (result.value) { if (id) { $.ajax({ type: "POST", url: origin + "/delete/discussion", dataType: "json", data: { id }, success: function(result) { if (result.error) { getNotification2("error", result.message); } else if (result.success) { getNotification2("success", result.message); window.location.href = "/tartismalar"; id = ""; } else if (result.session) { window.location.href = '/login'; } }, error: function(e) {}, complete: function() { } }); } } }) }); $(".tv-yes-btn").click(function() { if (commentId && comType) { var html = $(this).html(); $(this).html(loaderIco); var t = $(this); var issue = $("#reportIssue").val(); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "issue": issue, "status": comType, "data": commentId, "type": "actionData" }, success: function(result) { if (result) { if (result.error) { getNotification2("error", result.error); } else if (result.success) { getNotification2("success", result.success); if (comType == 1) { $("[data-delete=" + commentId + "]").closest('.comment-review-box').remove(); $(".delete-modal").fadeOut(); } else if (comType == 2) { window.location.href = "./tartismalar"; } commentId = ""; } else if (result.session) { window.location.href = '/login'; } else {} } else {} }, error: function(e) {}, complete: function() { commentId = ""; $("#reportIssue").val(""); $(".tv-tou-mdl-cls").click() $("[data-close]").click() t.html(html) } }); } }); $(document).on("click", "[data-edittopic]", function() { var title = $("#topicTitle").val(); var content = $("#topicDesc").val(); var series = $("#series").val(); var id = $(this).data("edittopic"); if (title && content && id) { var t = $(this); var html = t.html(); t.html(loaderIco); t.prop("disabled", true); $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "id": id, "title": title, "content": content, "series": series, "type": "editTopic" }, success: function(result) { if (result) { if (result.success) { getNotification2("success", result.success); } else if (result.session) { window.location.href = '/login'; } else { getNotification2("error", result.error); } } }, complete: function() { t.prop("disabled", false); t.html(html) } }); } else { getNotification("error", "Eksik deÄŸerler var !"); } }); var arrRek = [] $(".a-container").each(function(a, i) { var html = $(this).html(); var time = $(this).data("time"); arrRek.push('
      ' + html + '
      '); }); if (arrRek.length) { $(".a-container").remove(); rek(".rek-0", 0); } var n = 0; var my; $(document).on("click", ".skip-button", function() { var d = n + 1; clearInterval(my) console.log(n,d) if (arrRek[n].length) { $(".rek-" + n).remove(); n = n + 1; rek(".rek-" + d, d); } else { $(this).closest(".a-container").remove(); } }); function rek(elem, up) { $(".series-watch-player").prepend(arrRek[up]); var time = $(elem).attr("data-time"); var t = $(elem); var b = $(elem).find(".skip-button span"); $(elem).find(".countdown").text(time); var c = time; var bc = 5; my = setInterval(function() { bc = bc - 1; $(".skip-button span").text(bc); if (bc == 0) { $(".skip-button").prop("disabled", false); $(".skip-button").text("Reklamı Geç"); } c = c - 1; $(".countdown").text(c); if (c == 0) { $(elem).remove(); clearInterval(my) n = n + 1; if (n <= arrRek.length) { rek(".rek-" + n, n); } else { clearInterval(my) $(".a-container").remove(); } console.log(n) } }, 1000) } if ($(".progress").length) { $(".progress").each(function(){ var percent = $(this).data("percent") var progressValue = $(this).children(".progress__value"); var RADIUS = 54; var CIRCUMFERENCE = 2 * Math.PI * RADIUS; function progress(value) { var progress = value / 100; var dashoffset = CIRCUMFERENCE * (1 - progress); progressValue.css("stroke-dashoffset", dashoffset); } progressValue.css("stroke-dasharray",CIRCUMFERENCE); progress(percent); }); } $('.circle-progress').each(function(a,i){ $(this).html('\t\t\t\t\t\t\t\t\t\t') }); if ($(".control").length) { $(".control").each(function(a,i){ var percent = $(this).data("percent"); var progressValue = $(this).find('.progress__value') var RADIUS = 54; var CIRCUMFERENCE = 2 * Math.PI * RADIUS; var progress = percent / 100; var dashoffset = CIRCUMFERENCE * (1 - progress); progressValue.css('strokeDashoffset',dashoffset); progressValue.css('strokeDasharray',CIRCUMFERENCE); }); } $("[data-rec]").click(function() { var email = $("#email").val(); if (email) { var t = $(this); var html = t.html(); t.html(loaderIco); t.prop("disabled", true); var key = $("[data-key]").data("key"); grecaptcha.execute(key, { action: 'login' }).then(function(token) { $.ajax({ type: "POST", url: origin + "/ajax/service", dataType: "json", data: { "data": email, "recaptcha_response_field": token, "type": "forgot_pw" }, success: function(result) { if (result) { if (result.success) { getNotification("success", result.success); $(".tv-pas-mdl-cls").click(); } else { getNotification("error", result.error); } } }, complete: function() { t.html(html); t.prop("disabled", false) } }); }); } }); $(document).on("click", "[data-clap]", function() { var id = $(this).data("clap"); if (id) { $.ajax({ type: "POST", url: "/ajax/service", data: { "clap": id, "type": "addClap" }, dataType: "json", success: function(result) { if (result) { if (result.success) { var clap = parseInt($(".clap-count").text()); $(".clap-count").text(clap += 1); } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } } }, complete: function() {} }); } }); $(document).on("click", "[data-remove]", function() { var id = $(this).data("remove"); Swal.fire({ title: 'Koleksiyonun Silinecek', text: "Bu işlemi yapmak istediğine emin misin?", type: 'warning', heightAuto: false, showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonText: 'Hayır', cancelButtonColor: '#d33', confirmButtonText: 'Koleksiyonu sil' }).then((result) => { if (result.value) { if (id) { $.ajax({ type: "POST", url: "/collection/delete", data: { "collection_id": id, }, dataType: "json", success: function(result) { if (result.success) { getNotification2("success", result.message) } else if (result.error) { getNotification2("info", result.message) } else if (result.session) { if($(".login-modal").length){ $(".login-modal").fadeIn(); }else { window.location.href = "/giris-yap"; } } }, complete: function() { window.location.href = "/koleksiyonlar"; } }); } } }) }); $(document).on("click", "[data-createroom]", function() { var invite_list = [] $(".invite-id").each(function(a, i) { var check = $(this).is(":checked") ? 1 : 0; if (check) { var id = $(this).val(); if (invite_list.indexOf(id) == "-1") { invite_list.push(id); } } }); var e_id = $("[data-watchtogether]").data("watchtogether"); var title = $("#roomTitle").val(); if (e_id && title) { var t = $(this); var html = t.html(); t.html(loader); $.ajax({ type: "POST", url: "/ajax/service", dataType: "json", data: { "e_id": e_id, "title": title, "invite": invite_list, "type": "create_room" }, success: function(result) { if (result.success) { window.location.href = result.link; } else { getNotification("error", result.error); } }, complete: function() { t.html(html); t.prop("disabled", false); } }); } }); $(document).on("keyup", "#sendChat", function() { var key = event.which ? event.which : event.keyCode; if (key == 13) { var t = $(this); var data = $(this).val(); var code = $("#room").val(); if (data && code) { t.prop('disabled', true); var html = $(".send-m-btn").html(); $(".send-m-btn").html(loader); $.ajax({ type: "POST", url: "/ajax/service", dataType: "json", data: { "code": code, "data": data, "type": "add_chat" }, success: function(result) { if (result.success) { $(".tv-mess-rgt-bxs").append(result.theme); $('.tv-mess-rgt-bxs').stop().animate({ 'scrollTop': 999999999 + "px" }, 900, 'swing'); } else { getNotification("error", result.error); } }, complete: function() { t.prop('disabled', false); $("#sendChat").val(""); $(".send-m-btn").html(html); t.focus(); } }); } } $("#sendChat").focus(); }); $(document).on("click", "[data-followls]", function() { var len = $(".follow-list ul li").length; if (len == 0) { var status = $(this).data("followls"); var type = $(this).data("type") ? 1 : 0; if (status) { $.ajax({ type: "POST", url: "/ajax/service", dataType: "json", data: { "status": status, "t": type, "type": "getList" }, success: function(result) { if (result.success) { $(".follow-list-ct").html(result.data) } else if (result.empty) { $(".follow-list-ct").html(result.data) getNotification2("warning", result.empty); } }, error: function(e) {}, complete: function() {} }); } } else {} }); function getChat() { var id = $("[data-rc]:last").data("rc"); var code = $("#room").val(); if ( code) { $.ajax({ type: "POST", url: "/ajax/service", dataType: "json", data: { "code": code, "id": id, "type": "get_chat" }, success: function(result) { if (result.success) { $(".tv-mess-rgt-bxs").append(result.theme); $('.tv-mess-rgt-bxs').stop().animate({ 'scrollTop': 999999999 + "px" }, 900, 'swing'); } else {} }, complete: function() {} }); } else {} } setInterval('getChat()', 5000); $(".sort-box").click(function(){ $(".sort-action-profile-drop").toggle(); }); function ShareOnFacebook(e) { return window.open("https://www.facebook.com/sharer/sharer.php?u=" + encodeURIComponent(e), "facebooksharedialog", "toolbar=0,status=0,width=626,height=436"), !1 } function ShareOnTwitter(e, t, o, n) { return window.open("https://twitter.com/intent/tweet?hashtags=" + o + "&original_referer=" + encodeURIComponent(e) + "&related=" + o + "&text=" + encodeURIComponent(n) + "&url=" + encodeURIComponent(e) + "&via=" + o, "shareit", "toolbar=0,status=0,width=626,height=436"), !1 } $(document).click(function(event) { var target = event.target; if (!$(target).is(".user-notification-drop, .user-notification-drop *,.user-notification,.user-notification *")) { $(".user-notification-drop").slideUp(); } if (!$(target).is(".user-action-profile-drop,.user-action-profile-drop *,.user-action-profile, .user-action-profile *")) { $(".user-action-profile-drop").slideUp(); } if (!$(target).is(".profile-modal-content,.profile-modal-content *,.profile-stats,.profile-stats *")) { $(".profile-modal").fadeOut(); } if (!$(target).is(".main-search, .main-search *")) { $(".leftbar-search-result").fadeOut(); } }); $(".leftbar-box-mobile ul li").click(function(event) { // $(".leftbar").hide(); }); // Trigger var ioxRange = $(document).ready(function(){ $("#yearRange").ionRangeSlider({ type: "double", skin: "round", grid: false, min: 2000, max: new Date().getFullYear(), from: 2000, to: new Date().getFullYear(), hide_min_max: 0, hide_from_to: 0, onFinish: function(t) { var e = window.location.pathname.split("kesfet/")[1]; if (e && -1 !== e.indexOf("/") && (e = e.split("/")[0]), e && "W10=" != e) { var a = e; a = (a = a.replace("-", "+")).replace("_", "/"), a = atob(a); var o = JSON.parse(a) } else o = {}; o.year = {}, o.year.from = t.from, o.year.to = t.to; var i = JSON.stringify(o) , n = btoa(i) , s = n = (n = n.replace("+", "-")).replace("/", "_"); if($("[data-navigo]").length){ router.navigate("kesfet/" + s, !0) }else { window.location.href = "/kesfet/" + s } }, onStart: function(t) { $("#range-years span:first-child").html(t.from), $("#range-years span:last-child").html(t.to) }, onChange: function(t) { $("#range-years span:first-child").html(t.from), $("#range-years span:last-child").html(t.to) } }); var point = $("#imdbRange").data("point"); $("#imdbRange").ionRangeSlider({ type: "double", skin: "round", grid: false, min: 0, max: point, from: 0, to: point, hide_min_max: 0, hide_from_to: 0, onFinish: function(t) { var e = window.location.pathname.split("kesfet/")[1]; if (e && -1 !== e.indexOf("/") && (e = e.split("/")[0]), e && "W10=" != e) { var a = e; a = (a = a.replace("-", "+")).replace("_", "/"), a = atob(a); var o = JSON.parse(a) } else o = {}; o.imdb = {}, o.imdb.from = t.from, o.imdb.to = t.to; var i = JSON.stringify(o) , n = btoa(unescape(encodeURIComponent(i))) , s = n = (n = n.replace("+", "-")).replace("/", "_"); if($("[data-navigo]").length){ router.navigate("kesfet/" + s, !0) }else { window.location.href = "/kesfet/" + s } }, onStart: function(t) { $("#range-imdb span:first-child").html(t.from), $("#range-imdb span:last-child").html(t.to) }, onChange: function(t) { $("#range-imdb span:first-child").html(t.from), $("#range-imdb span:last-child").html(t.to) } }); }); $(document).on("click",".download-box",function(){ $(this).toggleClass("active") }); $(document).on("click",".alternative-group li",function(){ var id =$(this).data("number"); if(id){ $("#"+id+" ul li:first button").click(); } }); const hmoveiSlide = new Swiper(".hmovie-slide", { slidesPerView: 5.5, spaceBetween: 12, watchSlidesProgress: true, touchStartPreventDefault: true, touchStartForcePreventDefault: true, slidesPerView: 'auto', noSwiping: true, freeMode: true, loop: false, navigation: { nextEl: ".hmovie-next", prevEl: ".hmovie-prev" } }); $('.notification-button').click(function() { $('.header-user-profile-drop').slideUp(); var display = $(this).children('.notification-drop').is(':visible') ? 1 : 0; if (display) { $(this).children('.notification-drop').slideUp(); } else { $(this).children('.notification-drop').slideDown(); } }); $('.user-button').click(function() { $('.notification-drop').slideUp(); var display = $(this).children('.header-user-profile-drop').is(':visible') ? 1 : 0; if (display) { $(this).children('.header-user-profile-drop').slideUp(); } else { $(this).children('.header-user-profile-drop').slideDown(); } }); $(document).on("input",".leftbar-search input",function() { var data = $(this).val(); if (data && data.length >= 1) { $(".leftbar-search-result").show() $.ajax({ type: "POST", url: "/search?qr=" + data, dataType: "json", data: {}, success: function(result) { if(result) { $(".leftbar-search-result-in").html(result.data) router.updatePageLinks(); } }, complete: function() { var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); } }); } else { $(".leftbar-search-result").hide() $(".leftbar-search-result-in").html('') var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); } }); var typingTimer; //timer identifier var doneTypingInterval = 300; //time in ms, 5 second for example $(document).off("input", ".sm-request-search input").on("input", ".sm-request-search input", function(t) { var type = $(this).parent("div").data("type"); var parent = $(this).parent('div'); var key = event.which ? event.which : event.keyCode; if(key == 13){ if (data && data.length >= 2) { }else { } } clearTimeout(typingTimer); var data = $(this).val(); if (data && data.length >= 2) { typingTimer = setTimeout(function(){ $.ajax({ type: "POST", url: "/get/search", dataType: "json", data: { "content":data, "type":type }, success: function(result) { if(result.success){ $(".request-list-"+type).html(`
        ${result.theme}
      `) $(".request-original-"+type).hide(); } }, complete: function() { window.lazyLoadInstances.update(); } }); }, doneTypingInterval); } else { $(".request-list-"+type).html(''); $(".request-original-"+type).show(); } }); $(document).on("click",".request-set-button",function(){ var id = $(this).data('id'); var type = $(this).data('type'); var image = $(this).data('image'); var name = $(this).data('name'); if(id){ Swal.fire({ title: 'İsteğiniz alınıyor.', text: "Bu işlem bazen biraz uzun sürebilir. Lütfen bekleyin.", type: 'warning', heightAuto: false, showCancelButton: false, showConfirmButton: false, allowOutsideClick: false }); $.ajax({ type: "POST", url: "/set/request", dataType: "json", data: { image, name, id, type }, success: function(result) { if(result.success) { getNotification('success',result.message); }else if(result.session) { getNotification('error',result.message); setTimeout(function(){ window.location.href = "/giris-yap"; },2000) }else { swal.close() getNotification('error',result.message); } }, complete: function() { window.lazyLoadInstances.update(); } }); } }); $(document).on("click","[data-vote]",function(){ var id = $(this).data("vote"); var type = $(this).data("type"); var parent = $(this).parent('div'); var count = parent.find('.story-vote-count').text(); if(id){ $.ajax({ type: "POST", url: "/set/request/vote", dataType: "json", data: { id, type }, success: function(result) { if(result.success){ var vote_count = parseInt(count); parent.removeClass('upvoted,downvoted') if(type == 1){ vote_count = vote_count + 1; parent.addClass('upvoted'); }else if(type == 2){ vote_count = vote_count - 1; parent.addClass('downvoted'); } parent.find('.story-vote-count').text(vote_count); }else { getNotification('error',result.message) } }, complete: function() { var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); } }); } }); $(document).on("click",".more-request",function(){ var page = parseInt($(this).attr("data-page")); var type = $(this).data("type"); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/request/load", data: {page,type}, dataType:"json", success: function(result) { if(!result.theme){ t.remove(); getNotification('success','Gösterilecek içerik kalmadı.'); } if(result.success) { t.attr('data-page',page); $(".request-original-"+type+" ul").append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); // $(document).on("keyup",".sm-request-search input",function() { // var data = $(this).val(); // var mt = $(this).parent("div").data("type"); // var parent = $(this).parent('div'); // if(mt == "movie"){ // var slug = "-movie"; // var slugLink = 'film' // }else { // var slug = ""; // var slugLink = 'dizi' // } // var key = event.which ? event.which : event.keyCode; // if(key == 13){ // if (data && data.length >= 2) { // $.ajax({ // type: "POST", // url: "/ajax/service", // dataType: "json", // data: {"type":"request_search","mov_type":mt,"rs_query":data}, // success: function(result) { // if(result.result) { // $(".sm-request-original"+slug).hide(); // $(".request-response"+slug).show(); // var theme = ""; // $.each(result.result,function(a,i){ // var name = mt == 'movie' ? i.original_title : i.original_name; // var vote = ""; // if(i.found != false){ // if(i.found.check_vote != null){ // if(i.found.check_vote.type == 1){ // vote = 'upvoted'; // }else if(i.found.check_vote.type == 2){ // vote = 'downvoted'; // }else { // vote = ''; // } // } // if(i.found.avarage == null){ // var subInfo = '

      '+name+' izle

      '; // var avarage = 0; // var topButton =""; // var bottomButton = ""; // }else { // var subInfo = '

      Bir başkası tarafından istekte bulunulmuş.

      '; // var avarage = i.found.avarage; // var topButton = ``; // var bottomButton = ``; // } // theme += ` //
    • //
      //
      // `+topButton+` // `+avarage +` // `+bottomButton+` //
      //
      //
      // // `+name+` // //
      //
      // // `+name+` // // `+subInfo+` //
      //
      // `+i.found.req_status+` //
      //
    • // `; // }else { // theme += ` //
    • //
      //
      // //
      //
      //
      // //  `+name+` // //
      //
      // // `+name+` // //

      Henüz istekte bulunulmadı.

      //
      //
      //
      //
    • // `; // } // }); // parent.next('.request-response'+slug).html('
        '+theme+'
      '); // // $(".leftbar-search-result-in").html(result.data) // }else if(result.session){ // window.location.href = "/giris-yap"; // }else if(result.error){ // getNotification('error',result.error) // }else { // $(".sm-request-original"+slug).show(); // $(".request-response"+slug).hide(); // $(".request-response"+slug).html(''); // } // }, // complete: function() { // var lazyLoadInstance = new LazyLoad({ // elements_selector: ".lazy-wc" // }); // } // }); // }else { // $(".sm-request-original"+slug).show(); // $(".request-response"+slug).hide(); // $(".request-response"+slug).html(' '); // } // } // }); $(document).on("click",".request-set-button",function(){ var id = $(this).data('tid'); var mt = $(this).data('type'); if(id){ Swal.fire({ title: 'İsteğiniz alınıyor.', text: "Bu işlem bazen biraz uzun sürebilir. Lütfen bekleyin.", type: 'warning', heightAuto: false, showCancelButton: false, showConfirmButton: false, allowOutsideClick: false }); $.ajax({ type: "POST", url: "/ajax/service", dataType: "json", data: {"tid":id,'mov_type':mt,"type":"request_content"}, success: function(result) { if(result.success) { swal.close(); getNotification('success',result.success); $(".sm-request-search input").val(''); $(".sm-request-search input").keyup(); if($("[data-navigo]").length){ router.navigate('/istek'); }else { setTimeout(function(){ window.location.reload(); },1500) } }else { swal.close(); getNotification('error',result.error); } }, complete: function() { var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); } }); } }); $(document).on("click","[data-request-vote]",function(){ var vote_type = $(this).data('request-vote'); var s_id = $(this).closest('li').data('sid'); var parent = $(this).parent('div'); var count = parent.find('.story-vote-count').text(); if(s_id){ $.ajax({ type: "POST", url: "/ajax/service", dataType: "json", data: {"s_id":s_id,'vote_type':vote_type,"type":"requestVote"}, success: function(result) { if(result.success){ var vote_count = parseInt(count); parent.removeClass('upvoted,downvoted') if(vote_type == 1){ vote_count = vote_count + 1; parent.addClass('upvoted'); }else if(vote_type == 2){ vote_count = vote_count - 1; parent.addClass('downvoted'); } parent.find('.story-vote-count').text(vote_count); } }, complete: function() { var lazyLoadInstance = new LazyLoad({ elements_selector: ".lazy-wc" }); } }); } }); function run_emojiarea() { if (window.emoonever !== undefined) { window.emoonever++; } else { window.emoonever = 1; } var newid = 'emoarea' + window.emoonever; var title = $("#commentData").addClass(newid); var emoone = $("." + newid).emojioneArea({ container: "#commentData-container", hideSource: true, autocomplete: false, events: { keypress: function(editor, e) { var $press = $(".".newid).data("emojioneArea"); if (e.which == 13 && !e.shiftKey) { e.preventDefault(); if ($press != true) { addComment(); } return false; } }, emojibtn_click: function(button, event) { button.closest('.emojionearea').find('.emojionearea-button-close').click(); } } }); return window.emoone; } run_emojiarea() $('.mobile-menu-icon button').click(function() { var display = $(this).parent().next('.mobile-menu').is(':visible') ? 1 : 0; if (display) { $(".wrapper-inner").removeClass("mm-triggered"); $(this).removeClass("mm-triggered"); $(this).parent().next('.mobile-menu').fadeOut(); } else { $(this).addClass("mm-triggered"); $(this).parent().next(".mobile-menu").fadeIn(); $(".wrapper-inner").addClass("mm-triggered"); } }) $('.mobile-search button').click(function() { var display = $('.mobile-search-area').is(':visible') ? 1 : 0; if (display) { $(this).parent().removeClass("activated"); $(this).html( `` ); $('.mobile-search-area').hide(); $(".leftbar-search input").val('') $(".leftbar-search-result").hide() } else { $(this).parent().addClass("activated"); $(this).html( `` ); $(".mobile-search-area").show(); } }) $('body').off("click", ".cl_add_item").on("click", ".cl_add_item", function(e) { e.preventDefault(); var cl_id = $(this).data("clid"), list = $(this).data("list"); if (cl_id && list) { $.ajax({ type: "POST", url: "/set/collection", dataType: "json", data: { "collection_id": cl_id, "list": JSON.stringify(list), }, success: function(result) { if (result.success) { getNotification2("success", result.message); } else if (result.session) { window.location.href = '/login'; } else { getNotification2("error", result.message); } } }); } }); $(document).on("click","[data-report]",function(){ var html = $(".report-modal").html() Swal.fire({ title: '', icon: '', html:html, heightAuto: false, showCloseButton: false, showConfirmButton: false, showCancelButton: false, focusConfirm: false, customClass: { container: 'container-class', popup: 'popup-class', header: 'header-class', title: 'title-class', closeButton: 'close-button-class', icon: 'icon-class', image: 'image-class', content: 'content-class', input: 'input-class', actions: 'actions-class', confirmButton: 'confirm-button-class', cancelButton: 'cancel-button-class', footer: 'footer-class' }, confirmButtonText: '', confirmButtonAriaLabel: '', cancelButtonText: '', cancelButtonAriaLabel: '' }) }); $(document).on("click","[data-send-report]",function(e){ var id = $(this).data("send-report"); var reportId = $(".report-modal-problem-select input:checked").val(); var desc = $(this).prev("textarea").val(); var type = $(this).data("type"); if(reportId && id) { $.ajax({ type: "POST", url: "/set/report", dataType: "json", data: { "id": id, "value": reportId, "desc": desc, "type": type }, success: function(result) { if (result.error) { getNotification("error", result.message); } else if (result.session) { window.location.href = '/login'; }else { swal.close() getNotification("success", result.message); } }, error: function(e) {} }); } }); $(document).on("click",".notification-button",function(){ $.ajax({ type: "POST", url: "/ajax/service", dataType: "json", data: { "type": "readNotification" }, success: function(result) { if(result.success){ $(".notification-badge").remove() } }, error: function(e) {} }); }); function loginMessage() { var message = document.querySelector('.login-other-message'); var time = new Date().getHours(); if (time >= 18 && time <= 23) { message.textContent = 'İyi Akşamlar!'; } else if (time >= 0 && time <= 6) { message.textContent = 'Zabaha Kadar Burdayız!'; } else if (time >= 7 && time <= 11) { message.textContent = 'Günaydın!'; } else if (time >= 12 && time <= 17) { message.textContent = 'Tünaydın!'; } } if($(".login-other-message").length){ document.addEventListener('DOMContentLoaded', loginMessage); } /*$(".mobile-menu ul li a").click(function () { $(".wrapper-inner").removeClass("mm-triggered"); $(".mobile-menu-icon button").removeClass("mm-triggered"); $(".mobile-menu-icon button").parent().next(".mobile-menu").fadeOut(); });*/ $(document).on("click",".just-mobile",function(){ var target = event.target; var sub_menu = $(this).find(".sub-menu"); if (!$(target).is(".sub-menu,.sub-menu *")) { if(sub_menu.hasClass("open")){ sub_menu.hide() }else { sub_menu.show() } sub_menu.toggleClass("open") } }); $.fn.toggleAttr = function(attr, val) { var test = $(this).attr(attr); if ( test ) { // if attrib exists with ANY value, still remove it $(this).removeAttr(attr); } else { $(this).attr(attr, val); } return this; }; // jquery toggle just the attribute value $.fn.toggleAttrVal = function(attr, val1, val2) { var test = $(this).attr(attr); if ( test === val1) { $(this).attr(attr, val2); return this; } if ( test === val2) { $(this).attr(attr, val1); return this; } // default to val1 if neither $(this).attr(attr, val1); return this; }; $(".toggle-password").click(function(){ $("#log-password").toggleAttr('type', "password"); }) $(document).on("click",".send-contact",function(){ event.preventDefault() var t = $(this); var name = $("#full_name").val(); var email = $("#email").val(); var message = $("#message").val(); var subject = $("#subject").val(); if (name && email && subject && message) { var key = $("[data-key]").data("key"); $.loadScript("https://www.google.com/recaptcha/api.js?render=" + key, function() { var html = t.html(); t.html(loaderIco); t.prop('disabled',true); grecaptcha.ready(function() { grecaptcha.execute(key, { action: 'contact' }).then(function(token) { $.ajax({ type: "POST", url: "/send/contact", dataType: "json", data: { "recaptcha_response_field": token, "name": name, "email": email, "subject": subject, "message": message, }, success: function(result) { if (result.success) { getNotification('success', result.message); t.prop("disabled", true); t.html(html) } else { getNotification('error', result.message); } }, complete: function() { t.prop("disabled", false); t.html(html); $("form").trigger('reset'); } }); }); }); }) } else { t.html(html); getNotification('error','Lütfen tüm alanları doldurunuz.') } event.preventDefault(); }); if($("[data-censor]").length){ if(getCookie('censor')){ $("#censor").html(''); }else { $("#censor").html(` `); } } $(document).on("click","#yes-age",function(){ setCookie('censor',1,18); $("#censor").html(''); }); $(document).on("click","#no-age",function(){ window.location.href = "/"; }); var body = document.querySelector("body"); body.addEventListener("scroll", function() { if (body.scrollTop > 200) { $('.go-top').fadeIn(); } else { $(".go-top").fadeOut(); } }); $(document).on("click",".go-top",function(){ $('html, body').animate({scrollTop:0}, 'slow'); }); if($(".collect-list").length){ var collectSlider = new Swiper(".collect-new-series", { slidesPerView: 6, spaceBetween: 15, navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev", clickable: true, }, breakpoints: { 0: { slidesPerView: 2 }, 640: { slidesPerView: 2 }, 768: { slidesPerView: 5 }, 1280: { slidesPerView: 6 } } }); } var getVideoList = function(){ $(document).on("click","[data-group-hash]",function(){ var count = $(this).data("trans") $(".alternative-group li").removeClass('tab-active'); $(".translator-wrapper").removeClass('trans-active'); $(this).addClass("tab-active") $(".trans-"+count).addClass("trans-active") var hash = $(this).data('group-hash'); $("[data-group-hash]").removeClass('active'); $(this).addClass('active') if(hash){ $.ajax({ type: "POST", url: "/get/video/group", data: {hash}, dataType:"json", success: function(result) { if(result.success) { if(result.videos){ var data = ""; $.each(result.videos,function(a,i){ var svg = '' if(i.lock){ svg = ''; } var active = a == 0 ? 'class="series-alter-active"' : ''; if(a == 0){ if(i.download){ $("#download-link").attr('href',i.download).removeClass('hidden'); } } data += `
    • `; }); $(".video-services ul").html(data) } }else { } }, complete: function() { $(".series-watch-alternatives ul li:first button").click() } }); } }); var activeTrans = $(".alternative-group .tab-active").data("trans"); $(".translator-wrapper").removeClass('trans-active'); $(".trans-"+activeTrans).addClass("trans-active") }() $(document).on("click",".more-episodes",function(){ var page = parseInt($(this).attr("data-page")); var season = $(this).data("season"); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/calendar/anime/airing", data: {page,widget}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $(".little-series").append(result.theme) }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); var seeMoreSeries = function(){ $(document).on("click",".see-more-all",function(){ var page = parseInt($(this).attr("data-page")); var alphabet = $(this).data("alphabet") var type = $(this).data("type") page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.append(loader); t.prop('disabled',true); $.ajax({ type: "POST", url: "/"+type+"/all/load", data: {page,alphabet}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { count = count - result.count; t.find('data').text(count); t.attr('data-page',page); $(t).closest(".series-list-box").find("ul").append(result.theme) }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); }() $(document).on("click",".more-airing",function(){ var page = parseInt($(this).attr("data-page")); var type = $(this).data("season") page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/anime/load/airing", data: {page,type}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $(".calendar").append(result.theme) }else { t.remove() getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); var episodeLoad = function(){ $(document).on("click",".widget-more-episodes",function(){ var parent = $(this).closest(".last-episodes"); var page = parseInt($(this).attr("data-page")); var widget = $(this).data("widget"); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.append(loader); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/widget/episode/load", data: {page,widget}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); parent.find(".little-series").append(result.theme) }else { getNotif('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); $(document).on("click",".more-episode",function(){ var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loader); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/episode/load", data: {page}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $("#load-episode-container").append(result.theme) }else { getNotif('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); $(document).on("click",".more-montly-list",function(){ var page = $(this).attr("data-page"); var t = $(this); var html = t.html(); var count = t.find('data').text(); t.html(loader); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/global/load", data: {page}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',result.pageInfo.endCursor); $(".movies-list ul").append(result.theme) }else { getNotif('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); }() $(document).on("click",".more-anime-episode",function(){ var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/anime/episode/load", data: {page}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $(".little-animes").append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); $(document).on("click",".more-episode",function(){ var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/episode/load", data: {page}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $(".little-series").append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); $(document).on("click",".more-watch-episodes",function(){ var page = parseInt($(this).attr("data-page")); var type = $(this).data("type"); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/get/more/watchlist", data: {page,type}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $("#tab-6 ul").append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); $(document).on("click",".more-lastwatch",function(){ var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/get/more/lastwatch", data: {page}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $("#tab-11 ul").append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); $(document).on("click",".item-episode",function(){ var page = parseInt($(this).attr("data-page")); var load = $(this).data("load") var type = $(this).data("type") var id = $(this).data("id") var season = $(".series-tab-nav-active").data("num") if(season){ load = "#sea-"+season+" ul"; } page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); t.prop('disabled',true); var filter = window.filter; $.ajax({ type: "POST", url: "/episode/item/load", data: {page,type,id,season}, dataType:"json", success: function(result) { if(result.last){ t.remove(); } if(result.success) { t.attr('data-page',page); $(load).append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); $(document).on("click","[data-add-collection]",function(){ var html = ``; Swal.fire({ title: '', icon: '', html:html, heightAuto: false, showCloseButton: false, showConfirmButton: false, showCancelButton: false, focusConfirm: false, allowOutsideClick:false, customClass: { container: 'container-class', popup: 'popup-class', header: 'header-class', title: 'title-class', closeButton: 'close-button-class', icon: 'icon-class', image: 'image-class', content: 'content-class', input: 'input-class', actions: 'actions-class', confirmButton: 'confirm-button-class', cancelButton: 'cancel-button-class', footer: 'footer-class' }, confirmButtonText: '', confirmButtonAriaLabel: '', cancelButtonText: '', cancelButtonAriaLabel: '' }) }); $(document).on("click","[data-message]",function(){ var id = $(this).data("message") var html = ``; Swal.fire({ title: '', icon: '', html:html, heightAuto: false, showCloseButton: false, showConfirmButton: false, showCancelButton: false, focusConfirm: false, allowOutsideClick:false, customClass: { container: 'container-class', popup: 'popup-class', header: 'header-class', title: 'title-class', closeButton: 'close-button-class', icon: 'icon-class', image: 'image-class', content: 'content-class', input: 'input-class', actions: 'actions-class', confirmButton: 'confirm-button-class', cancelButton: 'cancel-button-class', footer: 'footer-class' }, confirmButtonText: '', confirmButtonAriaLabel: '', cancelButtonText: '', cancelButtonAriaLabel: '' }) }); var CollectionSearch = function(){ var typingTimer; var doneTypingInterval = 500; var contentHtml = $(".collection-create-list").html(); var query = $("#movieOrTvshowName").val(); $(document).off("input", "#movieOrTvshowName").on("input", "#movieOrTvshowName", function(t) { var parent = $(this).closest(".modal-content") $(".collection-create-list p.cl-src-result").hide() clearTimeout(typingTimer); var data = $(this).val(); if (data && data.length >= 2) { typingTimer = setTimeout(function(){ $(".collection-create-list ul").html(""); $(".collection-create-list").show(); $(".collection-create-list ul").show(); $.ajax({ type: "POST", url: origin + "/collection/search", dataType: "json", data: {query:data}, success: function(result) { if(result) { if(result.success) { $(".collection-create-list ul").html(result.theme); } else { $(".collection-create-list ul").html(""); $("p.cl-src-result").show().html(result.message); } } }, complete: function() { window.lazyLoadInstances.update(); var list = parent.find("#selected-list").val(); list = list ? JSON.parse(list) : []; parent.find("ul li :checkbox").each(function(){ var value = $(this).val(); var type = $(this).data("type"); var status = $(this).is(":checked") ? 1 : 0 var selected = Object.keys(list).filter(key => list[key].id == value && list[key].type == type)[0]; if(status == 0 && selected){ $(this).prop('checked',true); } }); } }); }, doneTypingInterval); } else { $(".collection-create-list").hide(); } }); }(); var CollectionSet = function(){ $(document).on("click",".modal-fire-close",function(){ Swal.close() }) $(document).on("click",".set-item-collection",function(){ var status = $(this).prev(":checkbox").is(":checked") ? 1 : 0; if(status == 0){ $(this).prev(":checkbox").click(); $(this).text("Eklendi") $(this).addClass("active") }else { $(this).prev(":checkbox").click(); $(this).text("Ekle") $(this).removeClass("active") } }); $(document).on("change",".collection-icon :checkbox",function(){ var parent = $(this).closest(".modal-content") var list = parent.find("#selected-list").val(); list = list ? JSON.parse(list) : []; var t = $(this); var name = t.closest("li").find("h1").text(); var value = $(this).val(); var type = $(this).data("type"); var status = $(this).is(":checked") ? 1 : 0; var selected = Object.keys(list).filter(key => list[key].id == value && list[key].type == type)[0]; if(status == 1 && !selected){ var obj = { id:value, type:type, name:name } list.push(obj) }else if(status == 0 && typeof selected != "undefined") { delete list[selected]; list = list.filter(Boolean); } if(list.length >= 1){ var theme = ""; if(!$(".collection-create-modal .collections-selected").length){ $('
        ').insertAfter(".collection-create-modal .collection-form"); } $.each(list,function(a,i){ theme += `
      • ${i.name}
      • `; }); $(".collections-selected ul").html(theme) }else { $(".collections-selected").remove() } parent.find("#selected-list").val(JSON.stringify(list)); }); $(document).on("click",".collections-selected ul li svg",function(){ var parent = $(this).closest(".modal-content"); var t = $(this).closest("li"); var id = $(this).data("id"); var type = $(this).data("type"); var list = parent.find("#selected-list").val(); list = list ? JSON.parse(list) : [] var selected = Object.keys(list).filter(key => list[key].id == id && list[key].type == type)[0]; if(id && selected != "undefined"){ t.remove(); delete list[selected]; list = list.filter(Boolean); parent.find("#selected-list").val(JSON.stringify(list)); parent.find(".collection-icon :checkbox").each(function(a,i){ var types = $(this).data("type"); var val = $(this).val(); if(val == id && types == type){ $(this).prop('checked',false); } }); } }); $(document).on("click",".set-collection",function(){ var parent = $(this).closest(".modal-content"); var list = parent.find("#selected-list").val(); var name = parent.find("#collectionName").val(); var desc = parent.find("#collectionDesc").val(); if(list && name){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: origin + "/collection/set", dataType: "json", data: {list,name,desc}, success: function(result) { if(result.success) { getNotification2('success',result.message); setTimeout(function(){ window.location.href = result.link },400) } else { getNotification2('error',result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); } }); }else { getNotification2("error","Lütfen gerekli alanları doldurunuz."); } }); }() var Login = function(){ $(document).on("click", ".user-login", function() { var username = $("#usernameOrEmail").val(); var password = $("#user-password").val(); var remember = $("#remember-me").is(":checked") ? 1: 0; var t = $(this); if(username && password) { var kk = $("[data-key]").data("key"); $.loadScript("https://www.google.com/recaptcha/api.js?render=" + kk, function() { var key = $("[data-key]").data("key"); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); grecaptcha.ready(function() { grecaptcha.execute(key, { action: 'login' }).then(function(token) { $.ajax({ type: "POST", url: origin + "/auth/login", dataType: "json", data: { "recaptcha_response_field": token, "username": username, "password": password, "remember": remember, }, success: function(result) { if(result.success) { getNotification2('success', result.message); window.location.reload(); }else { getNotification2('error', result.message); } }, complete: function() { t.prop("disabled", false); t.html(html); } }); }); }); }) } else { } event.preventDefault(); }); }() var Register = function(){ $(document).on("click", ".user-register", function() { var emailAddress = $("#emailAddress").val(); var username = $("#username").val(); var password = $("#password").val(); var passwordAgain = $("#passwordAgain").val(); var t = $(this); if(emailAddress && username && password && passwordAgain) { var kk = $("[data-key]").data("key"); $.loadScript("https://www.google.com/recaptcha/api.js?render=" + kk, function() { var key = $("[data-key]").data("key"); t.prop('disabled',true); var html = t.html(); t.html(loaderIco); grecaptcha.ready(function() { grecaptcha.execute(key, { action: 'register' }).then(function(token) { $.ajax({ type: "POST", url: origin + "/auth/register", dataType: "json", data: { "recaptcha_response_field": token, "username": username, "emailAddress": emailAddress, "password": password, "passwordAgain": passwordAgain, }, success: function(result) { if(result){ if(result.success) { getNotification2('success', result.message); window.location.reload(); }else { getNotification2('error', result.message); } } }, complete: function() { t.prop("disabled", false); t.html(html) } }); }); }); }) } event.preventDefault(); }); }() var ForgotPassword = function(){ $(document).on("click", ".user-forgot", function() { var email = $("#userForgotEmail").val(); var t = $(this); if(email) { var kk = $("[data-key]").data("key"); $.loadScript("https://www.google.com/recaptcha/api.js?render=" + kk, function() { var key = $("[data-key]").data("key"); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); grecaptcha.ready(function() { grecaptcha.execute(key, { action: 'login' }).then(function(token) { $.ajax({ type: "POST", url: origin + "/auth/forgot-password", dataType: "json", data: { "recaptcha_response_field": token, "email": email, }, success: function(result) { if(result.success) { getNotification2('success', result.message); window.location.reload(); }else { getNotification2('error', result.message); } }, complete: function() { t.prop("disabled", false); t.html(html); } }); }); }); }) } else { } event.preventDefault(); }); }() var ActiovationMail = function(){ $(document).on("click", ".user-activation", function() { var email = $("#userActivationEmail").val(); var t = $(this); if(email) { var kk = $("[data-key]").data("key"); $.loadScript("https://www.google.com/recaptcha/api.js?render=" + kk, function() { var key = $("[data-key]").data("key"); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); grecaptcha.ready(function() { grecaptcha.execute(key, { action: 'login' }).then(function(token) { $.ajax({ type: "POST", url: origin + "/auth/activation-mail", dataType: "json", data: { "recaptcha_response_field": token, "email": email, }, success: function(result) { if(result.success) { getNotification2('success', result.message); window.location.reload(); }else { getNotification2('error', result.message); } }, complete: function() { t.prop("disabled", false); t.html(html); } }); }); }); }) } else { } event.preventDefault(); }); }() var ChangePassword = function(){ $(document).on("click", ".change-forgot-password", function() { var password = $("#new-ps").val(); var token = $("#token").val(); var t = $(this); var html = t.html() if(password && token) { t.html(loaderIco) $.ajax({ type: "POST", url: origin + "/auth/change/password", dataType: "json", data: { "password": password, "token": token, }, success: function(result) { if(result.success) { getNotification2('success', result.message); setTimeout(function(){ window.location.href = "/"; },1500); }else { getNotification2('error', result.message); } }, complete: function() { t.prop("disabled", false); t.html(html); } }); } else { } event.preventDefault(); }); }() if (document.querySelector('.channels-slide')) { new Swiper('.channels-slide', { slidesPerView: 6, spaceBetween: 20, navigation: { nextEl: '.channels-next', prevEl: '.channels-prev' }, breakpoints: { 0: { slidesPerView: 2 }, 640: { slidesPerView: 4 }, 768: { slidesPerView: 5 }, 1280: { slidesPerView: 6 } } }); } if (document.querySelector('.first-movies')) { new Swiper('.first-movies', { slidesPerView: 4, spaceBetween: 20, navigation: { nextEl: '.first-movies-next', prevEl: '.first-movies-prev' }, breakpoints: { 0: { slidesPerView: 2 }, 640: { slidesPerView: 2 }, 768: { slidesPerView: 3 }, 1280: { slidesPerView: 3 } } }); } var GetMessage = function(){ var user = getUrlParameter('user'); if(user){ setTimeout(function(){ $(".item-"+user).click() },100) } $(document).on("click",".messages-leftbar li",function(){ var hash = $(this).data("hash"); var id = $(this).data("id"); if(hash){ $(".messages-leftbar li").removeClass("active"); $(this).removeClass("unread"); $(this).addClass('active'); $.ajax({ type: "POST", url: "/user/get/message", data: {hash,id}, dataType:"json", success: function(result) { if(result.success) { $(".empty-view").hide(); $("#user-profile").attr('href',result.user.profile); $("#user-name").html(result.user.name); $(".messages-content-in").html(result.theme); $(".messages-content-in").removeClass('hidden'); $(".messages-content-user").removeClass('hidden'); $(".messages-content-write").removeClass('hidden'); }else { getNotification2('error', result.message); } }, complete: function() { window.lazyLoadInstances.update(); var container = $('.messages-content-in'); var scrollTo = $('.messages-box:last'); var position = scrollTo.offset().top - container.offset().top + container.scrollTop(); $('.messages-content-in').stop().animate({ 'scrollTop': position }, 400, 'swing'); } }); } }); }() var SendMessage = function(){ $(document).on("click",".send-message",function(){ event.preventDefault(); var message = $("#message-form input").val(); var hash = $(".messages-leftbar li.active").data("hash"); var id = $(".messages-leftbar li.active").data("id"); if(hash && message){ var t = $(this); var html = t.html(); t.html(loaderIco); $.ajax({ type: "POST", url: "/user/send/message", data: {hash,message,id}, dataType:"json", success: function(result) { if(result.success) { if(result.message){ getNotification2('success', result.message); } $(".messages-content-in").append(result.theme); var container = $('.messages-content-in'); var scrollTo = $('.me:last'); var position = scrollTo.offset().top - container.offset().top + container.scrollTop(); $('.messages-content-in').stop().animate({ 'scrollTop': position }, 400, 'swing'); $(".messages-wrapper ul li.active").find(".messages-leftbar-box-text p").text(message) }else { getNotification2('error', result.message); } }, complete: function() { t.html(html) $("#message-form input").val(""); } }); } }); }() var messageFilter = function(){ $(document).on("input",".messages-user-search input",function(){ var val = $(this).val(); if(val){ $(".messages-leftbar > ul li").hide() $(".messages-leftbar > ul li").hide().filter(':contains("' + val + '")').show(); }else { $(".messages-leftbar > ul li").show() } }); }() var SendFirstMessage = function(){ $(document).on("click",".send-first-message",function(){ event.preventDefault(); var message = $("#messageArea").val(); var id = $(this).data("id"); if(message){ var t = $(this); var html = t.html(); t.html(loaderIco); $.ajax({ type: "POST", url: "/user/send/message", data: {id,message,"first":1}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success', result.message); }else { getNotification2('error', result.message); } }, complete: function() { t.html(html) $("#messageArea").val(""); } }); } }); }() var letMeKnow = function(){ $(document).on("click","[data-let-me-know]",function(){ var id = $(this).data("let-me-know"); var type = $(this).data("type"); var t = $(this); if(id){ $.ajax({ type: "POST", url: "/user/letmeknow", data: {id,type}, dataType:"json", success: function(result) { if(result.success) { if(result.type == 1){ t.html(`Haber verme`); }else { t.html(`Haber ver`); } }else { t.prop('disabled',false); } }, complete: function() { } }); } }); }() var setContinueWatch = function(){ $(document).on("click","[data-continue-watch]",function(){ var content_id = $(this).data("continue-watch"); var season = $(this).data("season"); var item = $(this).data("item"); var continueId = $(this).data("continue"); if(continueId){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true) $.ajax({ type: "POST", url: "/set/continue/watch", data: {content_id,season,item,"continue-watch":continueId}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success',result.message); t.closest(".countdown-box").remove() }else if(result.session) { window.location.href = "/giris-yap" }else { getNotification2('error',result.message); } }, complete: function() { t.html(html) t.prop('disabled',false) } }); } }); }() var deleteContinueWatch = function(){ $(document).on("click","[data-delete-continue]",function(){ var continueId = $(this).data("delete-continue"); if(continueId){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true) $.ajax({ type: "POST", url: "/delete/continue/watch", data: {id: continueId}, dataType:"json", success: function(result) { if(result.success) { t.closest(".countdown-box").remove() }else if(result.session) { window.location.href = "/giris-yap" }else { getNotification2('error',result.message); } }, complete: function() { t.html(html) t.prop('disabled',false) } }); } }); }() var SetPost = function(){ var datas = new FormData(); $(document).on("click",".set-post",function(){ var type = $(".flow-write-header ul li.tab-active").data("type"); $.each($("#wc-input")[0].files,function(j, file){ datas.append('photo['+j+']', file); }); var group_id = $(this).data("id"); if(group_id){ datas.append('group_id',group_id); var url ='/set/group/post'; }else { var url ='/set/flow/post'; } if(type == 'post'){ var message = $("#discussion_write").val(); var data = { message, group_id, type, } datas.append('message',message); datas.append('type',type); }else if(type == 'poll'){ var questOrTitle = $("#questOrTitle").val(); var questAnswer = []; $(".newPollItem").each(function(a,i){ var value = $(this).val(); if(value){ var obj = { value } var find = Object.keys(questAnswer).filter( key => questAnswer[key].value === value); if(find.length){ getNotification2('error','Birden fazla aynı cevap olamaz.'); return false; } questAnswer.push(obj); } }); var data = { questOrTitle, questAnswer, group_id, type, } datas.append('questOrTitle',questOrTitle); datas.append('questAnswer',JSON.stringify(questAnswer)); datas.append('type',type); if(questAnswer.length < 2){ getNotification2('error','En az iki adet cevap girmelisiniz.'); return false; } } $.each(window.images,function(j, file){ datas.append('photo['+j+']', file); }) if(data ){ var t = $(this); var html = t.html(); t.prop('disabled',true); t.html(loaderIco); $.ajax({ type: "POST", url: url, data: datas, dataType:"json", contentType: false, processData: false, success: function(result) { if(result.success) { getNotification2('success', result.message); $(".flow-posts > ul").prepend(result.theme); datas = new FormData(); window.images = []; $(".result-images").html('') $(".image-upload-preview").addClass('hidden') }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.closest("div").find(".replyComment").val(""); t.prop('disabled',false); $(".poll-create input").val("") $("#discussion_write").val("") window.lazyLoadInstances.update(); datas = new FormData(); data = {} } }); } }); }() var SetVote = function(){ $(document).on("click",".set-vote",function(){ var group_id = $(this).data("id"); var poll_id = $(this).data("poll-id"); var post_id = $(this).data("post-id"); var parent = $(this).closest('.poll-box'); var value = parent.find(".poll-vote").find("input:checked").val(); if(group_id){ var url = "/set/poll/vote"; }else { var url = "/flow/set/poll/vote"; } if(value){ var t = $(this); var html = t.html(); t.html(loaderIco); $.ajax({ type: "POST", url: url, data: {value,group_id,post_id,poll_id}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success', result.message); t.closest('.poll-box').find(".poll-content").html(result.theme); t.remove() }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.closest("div").find(".addComment").val(""); window.lazyLoadInstances.update(); } }); } }); }() var flowLoadPost = function(){ $(document).on("click",".see-more-flow",function(){ var me = $(this).data("me"); var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.append(loader); t.prop('disabled',true); $.ajax({ type: "POST", url: "/akis/"+page, data: {page,me}, dataType:"json", success: function(result) { if(result.success) { count = count - result.count; t.find('data').text(count); t.attr('data-page',page); $(".flow-posts > ul").append(result.theme) }else { getNotification2('error', result.message); t.remove() } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); }() var SetAction = function(){ $(document).on("click",".set-action",function(){ var series_id = $(this).data("series_id"); var post_id = $(this).data("id"); var action = $(this).data("action"); var type = $(this).data("type"); var status = $(this).data("status"); var post_type = $(this).data("post"); if(post_type){ var parent = $(this).closest("li").prev("li"); }else { var parent = $(this).closest(".post-footer").prev(".post-action"); } if(post_id){ var t = $(this); $.ajax({ type: "POST", url: "/set/action", data: {post_id,series_id,action,status,type}, dataType:"json", success: function(result) { if(result.success) { var count = parseInt(parent.children(".reactions").children("span").text()); t.closest(".post-footer").find(".actions-content button").html(result.button) t.closest(".post-footer").find(".actions-content button").next(".reactions-drop").removeClass('active') t.closest(".post-footer").find(".actions-content button").attr('data-status',result.status).attr("data-type",type).addClass('active delete-action').removeClass('set-action').attr('data-act',action).attr('data-delete-action',result.action); if(post_type){ t.attr('data-status',result.status).attr("data-type",type).addClass('active delete-action').removeClass('set-action').attr('data-act',action).attr('data-delete-action',result.action); } var action_image = $(result.button).attr('src'); var check_action = parent.find(".reactions img[data-src='"+action_image+"']").length; if(check_action == 0){ var user_name = $(".user-action-profile-drop-header-left span").text(); $(parent).find(".reactions > ul").append(`
      • ${result.name}
        ${result.name}${result.name}
        • ${user_name}
      • `); }else { parent.find("[data-action-id="+action+"]").attr("data-total",count + 1); } count += 1; parent.children(".reactions").children("span").text(count) }else if(result.session){ window.location.href = "/giris-yap"; }else { getNotification('error', result.message); } }, complete: function() { } }); } }); }() var GroupLoadCommentPage = function(){ $(document).on("click",".get-comment-load",function(){ var page = parseInt($(this).attr("data-page")); var post_id = $(this).data("post_id"); var group_id = $(this).data("group_id"); var type; if(group_id){ type ='group'; }else { type = 'flow'; } var path = window.location.pathname.split('/')[2]; if(post_id){ page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.append(loader); t.prop('disabled',true); $.ajax({ type: "POST", url: "/"+type+"/load/comment", data: {page,post_id,group_id}, dataType:"json", success: function(result) { if(result.success) { count = count - result.count; t.find('data').text(count); t.attr('data-page',page); t.closest('.post-comment').children('ul').append(result.theme); if(count == 0){ t.remove() } }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); } }); }() var SetReply = function(){ var id; var group_id; var commentReply; var url; $(document).on("click",".reply-button",function(){ id = $(this).data("id"); commentReply = $(this).data("cr"); group_id = $(this).data("group"); if(commentReply){ url = "/set/comment/reply"; }else { if(group_id){ url = "/set/group/reply"; }else { url = "/set/flow/reply"; } } }); $(document).on("click",".reply-comment",function(){ var message = $(this).closest("div").find(".replyComment").val(); if(id && message){ var t = $(this); var html = t.html(); var content = t.closest("li"); t.html(loaderIco); $.ajax({ type: "POST", url: url, data: {message,id,group_id}, dataType:"json", success: function(result) { if(result.success) { if(result.message){ getNotification('success', result.message); } content.append(result.reply); t.closest(".comments-reply").hide() }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.closest("div").find(".replyComment").val(""); window.lazyLoadInstances.update(); } }); } }); $(document).on("click",".reply-post-comment",function(){ var id = $(this).data("id"); var group_id = $(this).data("group"); if(group_id){ var url = "/set/group/reply"; }else { var url = "/set/flow/reply"; } var message = $(this).closest('.form-group').find('.addComment').val(); if(id && message){ var t = $(this); var html = t.html(); var content = t.closest(".post-comment").children("ul"); t.html(loaderIco); $.ajax({ type: "POST", url: url, data: {message,id,group_id,_:1}, dataType:"json", success: function(result) { if(result.success) { if(result.message){ getNotification('success', result.message); } content.append(result.reply) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.closest("div").find(".addComment").val(""); window.lazyLoadInstances.update(); } }); } }); }() var DeleteAction = function(){ $(document).on("click",".delete-action",function(){ var action = $(this).attr("data-id"); var actions = $(this).attr("data-delete-action"); var action_id = $(this).attr("data-act"); var type = $(this).attr("data-type"); var action_image = $(this).children('img').attr('src'); var post_type = $(this).data("post"); if(post_type){ var parent = $(this).closest("li").prev("li"); }else { var parent = $(this).closest(".post-footer").prev(".post-action"); } if(actions){ var t = $(this); $.ajax({ type: "POST", url: "/delete/action", data: {action:actions,type}, dataType:"json", success: function(result) { if(result.success) { var item = parent.children(".reactions").find("[data-action-id="+action_id+"]"); var total = item.data("total"); if(total == 1){ item.closest("li").remove(); } var count = parent.children(".reactions").children("span").text(); count = (count - 1) parent.children(".reactions").children("span").html(count) item.attr('data-total',count) t.html(result.button).removeClass('active delete-action').addClass('set-action').removeAttr('data-delete-action') }else { getNotification('error', result.message); } }, complete: function() { } }); } }); }() var addWatchList = function(){ $(document).on("click","[data-add-watch-list]",function(){ var id = $(this).data("add-watch-list"); var type = $(this).data("type"); var watched = $(this).data("watched"); var t = $(this); if(id && type){ $.ajax({ type: "POST", url: "/set/"+type+"/watch/list", data: {id,watched}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success',result.message); if(result.status == 0){ t.removeClass("active"); t.html(` Animeyi izlemedim `) }else { t.addClass("active"); t.html(` Animeyi izledim `) } }else if(result.session) { window.location.href = "/giris-yap" }else { getNotification2('error',result.message); } }, complete: function() { window.lazyLoadInstances.update(); } }); } }); }(); var getMoreNotification = function(){ $(document).on("click",".more-notification",function(){ var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/get/more/notification", data: {page,}, dataType:"json", success: function(result) { if(result.success) { $(".notifications > ul").append(result.theme); t.attr('data-page',page); }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); window.lazyLoadInstances.update(); } }); }); }(); var flowPostEdit = function(){ $(document).on("click","[data-flow-edit]",function(){ var flow_id = $(this).data("flow-edit"); if(flow_id){ $.ajax({ type: "POST", url: "/get/flow/post", data: {flow_id}, dataType:"json", success: function(result) { if(result.success) { $(".post-edit-modal").remove(); $("body").append(result.theme); $(".post-edit-modal").fadeIn().css('display','flex'); }else if(result.session) { window.location.href = "/giris-yap"; }else { getNotification2('error', result.message); } }, complete: function() { window.lazyLoadInstances.update(); } }); } }); $(document).on("click",".flow-post-edit",function(){ var flow_id = $(this).data("id"); var postEditText = $("#postEditText").val(); var datas = new FormData(); $.each($("#flow-files")[0].files,function(j, file){ datas.append('photo['+j+']', file); }); if(flow_id && postEditText){ datas.append('flow_id',flow_id); datas.append('post',postEditText); var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/edit/flow/post", data: datas, dataType:"json", contentType: false, processData: false, success: function(result) { if(result.success) { getNotification2('success', result.message); $("#post"+flow_id).html(postEditText) }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); } }); } }); $(document).on("click","[data-delete-flow-image]",function(){ var image_id = $(this).data("delete-flow-image"); if(image_id){ var t = $(this); var html = t.html(); t.prop('disabled',true); t.html(loaderIco); $.ajax({ type: "POST", url: "/delete/flow/post/image", data: {image_id}, dataType:"json", success: function(result) { if(result.success) { t.closest('li').remove() getNotification2('success', result.message); }else if(result.session) { window.location.href = "/giris-yap"; }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); window.lazyLoadInstances.update(); } }); } }); } var DeletePost = function(){ $(document).on("click","[data-delete-post]",function(){ var type = $(this).data("type") ? $(this).data("type") : 'group'; var id = $(this).data("delete-post"); var t = $(this); if(id){ $.ajax({ type: "POST", url: "/"+type+"/delete/post", data: {id}, dataType:"json", success: function(result) { if(result.success) { var className = t.closest(".post-comment-box").attr('class'); if(className){ className = className.indexOf('post-comment-reply-box'); if(className == "-1"){ var li = t.closest('.post-comment-box').closest('li').find('.post-comment-box').remove(); t.closest('.post').parent("li").remove(); }else { t.closest('.post-comment-box').remove(); } }else { t.closest('.post').parent("li").remove() } }else { getNotification2('error', result.message); } }, complete: function() { } }); } }); }() var DeleteGroup = function(){ $(document).on("click",".remove-group",function(){ var check = confirm('Grubu silmek istediğinize emin misiniz ?') ? true : false; var group_id = $(this).data("group"); if(group_id && check){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/group/delete", data: {group_id}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success', result.message); window.location.href = result.go }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); } }); } }); }() var getProgress = function(){ // window.login_on if($(".user-action-profile").length){ } var room = $("[data-room]").data("room"); if(!room){ setInterval(function(){ $.ajax({ type: "POST", url: "/activity/progress", data: {}, dataType:"json", success: function(result) { if(result.notificationCount){ var notiCount = parseInt($(".user-notification-badge").text()); $(".user-notification-badge").text(result.notificationCount) $(".user-notification-badge").addClass('unread') } if(result.success) { if(result.notification){ new Audio('/assets/notification-sound.mp3').play(); var check_ul = $(".user-notification-drop ul").length; $(".notification-drop-footer").removeClass('hidden') if(check_ul){ $(".user-notification-drop ul").prepend(result.notification); }else { $(".user-notification-drop").html(`
          ${result.notification}
        `); } } if(result.messages){ var now_message_count = Number($(".messages-count").attr('data-count')); $(".messages-count").addClass('unread').attr('data-count',now_message_count + 1); $.each(result.messages,function(a,i){ var hash = i.hash; if($("."+hash).length){ $(`.${hash}`).find('.messages-leftbar-box-text p').text(i.message); $(`.${hash}`).find('.messages-leftbar-box-text-head small').text(i.time); }else { var check_ul = $(".user-action-messages-drop .user-action-drop-content ul").length; if(check_ul){ $(".user-action-messages-drop ul").prepend(i.theme) }else { $(".user-action-messages-drop .user-action-drop-content").html(`
          ${i.theme}
        `) } } }); } if(result.friends){ var count = parseInt($(".friends-count").attr('data-count')); var emptyCheck = $(".user-action-requests-drop .empty-state").length if(emptyCheck){ $("
          ").insertAfter(".user-action-requests-drop .empty-state") $(".user-action-requests-drop .empty-state").remove() } $(".user-action-requests-drop .user-action-drop-content > ul").append(result.friends); $(".friends-count").addClass("unread").attr('data-count',result.friends_count + count) } }else { } }, complete: function() { window.lazyLoadInstances.update(); } }); },10000) } }() var SetRequest = function(){ $(document).on("click",".set-group-request",function(){ var id = $(this).data("id"); if(id){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/set/group/request", data: {id}, dataType:"json", success: function(result) { if(result.success) { if(result.type == "request"){ t.html(` `); }else { t.html(` `); } getNotification2('success', result.message); }else { getNotification2('error', result.message); } }, complete: function() { t.prop('disabled',false); } }); } }); }() var SetGroupInvite = function(){ $(document).on("click",".set-group-invite",function(){ var id = $(this).data("id"); var group_id= $(".update-group").data("id"); if(id){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/set/group/invite", data: {id,group_id}, dataType:"json", success: function(result) { if(result.success) { if(result.theme){ t.html(result.theme); t.removeClass('set-group-invite').addClass('active remove-group-invite'); } getNotification2('success', result.message); }else { getNotification2('error', result.message); t.html(html) } }, complete: function() { t.prop('disabled',false); } }); } }); $(document).on("click",".remove-group-invite",function(){ var id = $(this).data("id"); var group_id= $(".update-group").data("id"); if(id){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/remove/group/invite", data: {id,group_id}, dataType:"json", success: function(result) { if(result.success) { if(result.theme){ t.html(result.theme); t.removeClass('active remove-group-invite').addClass('set-group-invite'); } getNotification2('success', result.message); }else { getNotification2('error', result.message); t.html(html) } }, complete: function() { t.prop('disabled',false); } }); } }); }() var AcceptRequest = function(){ $(document).on("click",".accept-group-request",function(){ var id = $(this).data("id"); if(id){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/accept/group/request", data: {id}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success', result.message); t.closest(".user-box").parent('li').remove() }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); } }); } }); }() var CancelRequest = function(){ $(document).on("click",".cancel-group-request",function(){ var id = $(this).data("id"); if(id){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/cancel/group/request", data: {id}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success', result.message); t.closest(".user-box").parent('li').remove() }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); } }); } }); }() var LeaveGroup = function(){ $(document).on("click",".leave-group",function(){ var id = $(this).data("id"); if(id){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/leave/group", data: {id}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success', result.message); }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); } }); } }); }() var DeleteUserGroup = function(){ $(document).on("click",".delete-in-group",function(){ var user_id = $(this).data("id"); var group_id = $(this).data("group"); if(user_id && group_id){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); $.ajax({ type: "POST", url: "/group/delete/user", data: {user_id,group_id}, dataType:"json", success: function(result) { if(result.success) { t.closest('.user-box').parent("li").remove() }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); } }); } }); }() var GroupInfiniteScroll = function(){ $(document).on("click",".see-more-group",function(){ var page = parseInt($(this).attr("data-page")); var group = $(this).data("group"); var path = window.location.pathname.split('/')[2]; if(group){ page = page + 1; var t = $(this); var html = t.html(); t.append(loader); t.prop('disabled',true); $.ajax({ type: "POST", url: path+"/"+page, data: {page,group}, dataType:"json", success: function(result) { if(result.success) { $(".flow-posts > ul").append(result.theme); t.attr('data-page',page); }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false); window.lazyLoadInstances.update(); } }); } }); }() var SetGroup = function(){ $(document).on("click",".set-group",function(){ var groupName = $("#groupName").val(); var groupTagline = $("#groupTagline").val(); var groupWebsite = $("#groupWebsite").val(); var groupDesc = $("#groupDesc").val(); var cover = $("#coverUpload")[0].files[0]; var poster = $("#avatarUpload")[0].files[0]; var private = $("#private").is(":checked") ? 1 : null var privacy = $("#privacy").is(":checked") ? 1 : null var fbUsername = $("#fbUsername").val(); var twUsername = $("#twUsername").val(); var igUsername = $("#igUsername").val(); var thUsername = $("#thUsername").val(); var ytUsername = $("#ytUsername").val(); var dcUsername = $("#dcUsername").val(); if(groupName && groupDesc){ var t = $(this); var html = t.html(); t.html(loaderIco); t.prop('disabled',true); var data = new FormData(); data.append('groupName',groupName); data.append('groupTagline',groupTagline); data.append('groupWebsite',groupWebsite); data.append('groupDesc',groupDesc); data.append('cover',cover); data.append('poster',poster); data.append('private',private); data.append('privacy',privacy); data.append('fbUsername',fbUsername); data.append('twUsername',twUsername); data.append('igUsername',igUsername); data.append('thUsername',thUsername); data.append('ytUsername',ytUsername); data.append('dcUsername',dcUsername); $.ajax({ type: "POST", url: "/group/create", data: data, contentType: false, processData: false, success: function(result) { result = JSON.parse(result) if(result.success) { setTimeout(function(){ window.location.href = result.group },1200) getNotification2('success', result.message); }else { getNotification2('error', result.message); } }, complete: function() { t.html(html); t.prop('disabled',false) } }); } }); }() var UpdateGroup = function(){ if(window.location.hash == '#manage'){ if($('[data-target=".group-edit-modal"]').length){ console.log('dsadas') $('[data-target=".group-edit-modal"]').click() } history.pushState("", document.title, window.location.pathname + window.location.search) } $(document).on("click",".update-group",function(){ var groupId = $(this).data("id"); var groupName = $(".groupName").val(); var groupTagline = $(".groupTagline").val(); var groupWebsite = $(".groupWebsite").val(); var groupDesc = $(".groupDesc").val(); var cover = $(".coverUpload")[0].files[0] ? $(".coverUpload")[0].files[0] : ''; var poster = $(".avatarUpload")[0].files[0] ? $(".avatarUpload")[0].files[0] : ''; var private = $(".private").is(":checked") ? 1 : null var privacy = $(".privacy").is(":checked") ? 1 : null var fbUsername = $(".fbUsername").val(); var twUsername = $(".twUsername").val(); var igUsername = $(".igUsername").val(); var thUsername = $(".thUsername").val(); var ytUsername = $(".ytUsername").val(); var dcUsername = $(".dcUsername").val(); if(groupName && groupDesc){ var data = new FormData(); data.append('groupId',groupId); data.append('groupName',groupName); data.append('groupTagline',groupTagline); data.append('groupWebsite',groupWebsite); data.append('groupDesc',groupDesc); data.append('cover',cover); data.append('poster',poster); data.append('private',private); data.append('privacy',privacy); data.append('fbUsername',fbUsername); data.append('twUsername',twUsername); data.append('igUsername',igUsername); data.append('thUsername',thUsername); data.append('ytUsername',ytUsername); data.append('dcUsername',dcUsername); $.ajax({ type: "POST", url: "/group/update", data: data, contentType: false, processData: false, success: function(result) { result = JSON.parse(result) if(result.success) { getNotification2('success', result.message); }else { getNotification2('error', result.message); } }, complete: function() { } }); } }); }() var GroupSearchUser = function(){ var typingTimer; var doneTypingInterval = 500; $(document).off("input", ".organized-modal-content-search #username").on("input", ".organized-modal-content-search #username", function(t) { clearTimeout(typingTimer); var data = $(this).val(); var group_id= $(".update-group").data("id"); if (data && data.length >= 2) { $(".group-user-list").hide(); $(".user-search-list").show(); typingTimer = setTimeout(function(){ $.ajax({ type: "POST", url: origin + "/user/search", dataType: "json", data: {query:data,group_id}, success: function(result) { if(result.theme){ $(".user-search-list").html(result.theme) } }, complete: function() { window.lazyLoadInstances.update(); } }); }, doneTypingInterval); } else { $(".group-user-list").show(); $(".user-search-list").hide(); $(".user-search-list").html(""); } }); }() $(document).on("click",".question",function(){ $(".answer").addClass('hidden'); $(".q-svg").html(``); $(this).find(".answer").removeClass('hidden'); $(this).find(".q-svg").html(``) }) window.startVideo = 0; function getFrontVideo(index){ var frontVideo = $("#tv-spoox2").data("front"); if(frontVideo && frontVideo[window.startVideo]){ window.activeTime = 1; window.totalFrontVideo = frontVideo.length - 1; var adsLink = frontVideo[window.startVideo].link; var adsTime = frontVideo[window.startVideo].time; var adsVideo = frontVideo[window.startVideo].video; var adsImage = frontVideo[window.startVideo].image ? `` : ''; var frontBg = ` ${adsImage}
          `; var themeAds = `
          Reklamı Geç ()
          `; if(window.startVideo < 1){ $(frontBg).insertBefore("#tv-spoox2 iframe"); }else { $(themeAds).insertAfter("#tv-spoox2 iframe"); setTimeout(function(){ document.getElementById('frontVideo').play(); },300) var timer = setInterval(function(){ adsTime -= 1; $("#preRollBdTimer time").text(adsTime); if(adsTime == 0){ $("#preRollBdTimer").text("Reklamı Geç"); clearInterval(timer); window.startVideo += 1; window.activeTime = 0; $("#preRollBdTimer").attr('data-video',window.startVideo); } },1000); } $(document).on("click","#activeFrontVid",function(){ $(".frontBgItem").remove() $(themeAds).insertAfter("#tv-spoox2 iframe"); var timer = setInterval(function(){ adsTime -= 1; $("#preRollBdTimer time").text(adsTime); if(adsTime == 0){ $("#preRollBdTimer").text("Reklamı Geç"); clearInterval(timer); window.startVideo += 1; window.activeTime = 0; $("#preRollBdTimer").attr('data-video',window.startVideo); } },1000); }); }else { $("#preRollBd").remove(); } } // Countdown Button Drop $(document).on("click", ".countdown-actions button", function (e) { $(this).parent(".countdown-actions").stop().toggleClass("active"); $(document).on("click", function (e) { if (!$(e.target).is(".countdown-actions, .countdown-actions *, .options-drop, .options-drop *, .options-drop button, .options-drop button *")) { $(".countdown-actions").removeClass("active"); } }); }); $(document).on("click", ".options-drop button", function (e) { $(this).parent(".options-drop").stop().toggleClass("active"); $(document).on("click", function (e) { if ( !$(e.target).is( ".options-drop, .options-drop *, .options-drop button, .options-drop button *" ) ) { $(".options-drop").removeClass("active"); } }); }); var groupEpisodeLoad = function(){ $(document).on("click",".episode-groups ul li a",function(){ $(".episode-groups ul li a").removeClass('active-tab'); $(this).addClass('active-tab') var prefix = ""; var tag_id = $(this).data("episodes"); var type = $(this).data("type"); if(type == 3){ prefix = '/anime' } var t = $(this); $(".more-group-episode").prop('disabled',false) $(".more-group-episode").attr('data-page',1) var html = t.html(); $(".episodes-group-inner").html(`
          `); $.ajax({ type: "POST", url: prefix +"/episode/load", data: {page:1,tag_id}, dataType:"json", success: function(result) { if(result.success) { $(".episodes-group-inner").html(result.theme) }else { getNotification('error', result.message); } }, complete: function() { window.lazyLoadInstances.update(); } }); }) $(document).on("click",".more-group-episode",function(){ var tag_id = $(".episode-groups ul li a.active-tab").data("episodes"); var type = $(".episode-groups ul li a.active-tab").data("type"); var prefix =""; if(type == 3){ prefix = '/anime' } var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.html(loaderIco); var filter = window.filter; $.ajax({ type: "POST", url: prefix +"/episode/load", data: {page,tag_id}, dataType:"json", success: function(result) { if(result.last){ getNotification2('success','Listelenecek bölüm kalmadı') t.prop('disabled',true) }else { t.prop('disabled',false); } if(result.success) { t.attr('data-page',page); $(".episodes-group-inner").append(result.theme) }else { getNotification('error', result.message); } }, complete: function() { t.html(html); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); }(); var lastWatch = function(){ $(document).on("change","[data-last-watch]",function(){ var content_id = $(this).data("last-watch"); var type = $(this).data("type"); if(content_id){ $.ajax({ type: "POST", url: "/watch/insert", data: {content_id,type}, dataType:"json", success: function(result) { if(result.success) { getNotification2('success', result.message); }else { getNotification2('error', result.message); } }, complete: function() { window.lazyLoadInstances.update(); } }); } }); }(); var badgesLoadPost = function(){ $(document).on("click",".see-more-badges",function(){ var me = $(this).data("me"); var page = parseInt($(this).attr("data-page")); page = page + 1; var t = $(this); var html = t.html(); var count = parseInt(t.find('data').text()); t.append(loader); t.prop('disabled',true); $.ajax({ type: "POST", url: "/user/badges/load", data: {page,me}, dataType:"json", success: function(result) { if(result.success) { count = count - result.count; t.find('data').text(count); t.attr('data-page',page); $(".user-profile-badges > ul").append(result.theme) }else { getNotification2('error', result.message); t.remove() } }, complete: function() { t.html(html); t.prop('disabled',false); t.find('data').text(count); window.lazyLoadInstances.update(); } }); }); }() $(document).on("change", "[data-upload-area]", function () { var uploadArea = $(this); var type = $(this).data("type"); var flowUploadArea = $(".flow-content"); var settingsUploadArea = $(".settings-content"); if (this.files && this.files[0]) { var files = Array.from(this.files); var fileTypes = ["image/jpeg", "image/png"]; files.forEach(function (file) { var imageReader = new FileReader(); imageReader.addEventListener("load", function (e) { var imageSource = e.target.result; var checkFile = fileTypes.some( (fileType) => files[0].type === fileType ); if (checkFile) { if (type == 'flow') { $(flowUploadArea).find("[data-preview-area]").removeClass("hidden"); var preview = $(flowUploadArea) .find("[data-preview-area]") .find("ul"); // var className = $('.post-edit-modal').is(':visible') // ? 'w-1/3' // : 'w-1/5'; $(preview).append( `
        • ` ); $(preview).hide(); $(preview).fadeIn(650); } else if (type == 'settings') { var uPreview = $(uploadArea).data("uploadArea"); $(uPreview).find("img").attr("src", imageSource); } else { $(uploadArea) .next("[data-preview-area]") .find("img") .attr("src", imageSource); $(uploadArea).next("[data-preview-area]").find("img").hide(); $(uploadArea).next("[data-preview-area]").find("img").fadeIn(650); } } }); imageReader.readAsDataURL(file); }); } }); $(document).on("click", ".reply-button", function () { $(".comments-reply").hide() $(this).closest("div.post-comment-box").parent().find(".comments-reply").fadeIn().css("display", "flex"); $(this).closest("div.post-comment-box").parent().find(".comments-reply").find("input").focus() }); (function($) { $(document).on("click", "[data-tab] li", function () { var index = $(this).index(); var parent = $(this).parent("ul"); var parentContent = $(this).parent("ul").data("tab"); $(parent).children("li").removeClass("tab-active"); $(this).addClass("tab-active"); $(`#${parentContent}`).children("div").removeClass("tab-active"); $(`#${parentContent}`) .children(`div:eq(${index})`) .addClass("tab-active"); }); $(document).on("click", ".poll-footer .button-third", function () { $(".poll-vote").addClass("hidden"); $(".poll-footer").addClass("hidden"); $(".poll-result").removeClass("hidden"); }); getFrontVideo(0); $(document).on("click","#preRollBdTimer",function(){ var video = $(this).data("video"); if(window.activeTime == 0){ $("#preRollBd").remove(); getFrontVideo(window.startVideo) } }); $(document).on("click",".cinema-mode",function(){ var check = $("body").hasClass("cinema-mode-active") if(!check){ $("body").addClass("cinema-mode-active") }else { $("body").removeClass("cinema-mode-active") } }) $(document).on("click", function (e) { var check = $("body").hasClass("cinema-mode-active") if(check){ if (!$(e.target).is("#tv-spoox2, #tv-spoox2 *, .cinema-mode, .cinema-mode *")) { $("body").removeClass("cinema-mode-active") } } }); })(jQuery);