JAVASCRIPT   95

vendor.js

Guest on 14th October 2021 01:52:05 PM

  1. function detectIE(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var s=e.indexOf("Edge/");return s>0&&parseInt(e.substring(s+5,e.indexOf(".",s)),10)}function PointerEventsPolyfill(e){if(this.options={selector:"*",mouseEvents:["click","dblclick","mousedown","mouseup"],usePolyfillIf:function(){if("Microsoft Internet Explorer"==navigator.appName){if(null!=navigator.userAgent.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/)){if(parseFloat(RegExp.$1)<11)return!0}}return!1}},e){var t=this;$.each(e,function(e,i){t.options[e]=i})}this.options.usePolyfillIf()&&this.register_mouse_events()}(function(){var e,t,i,s,n,o,r,a,l,d;t=window.device,e={},window.device=e,s=window.document.documentElement,d=window.navigator.userAgent.toLowerCase(),e.ios=function(){return e.iphone()||e.ipod()||e.ipad()},e.iphone=function(){return!e.windows()&&n("iphone")},e.ipod=function(){return n("ipod")},e.ipad=function(){return n("ipad")},e.android=function(){return!e.windows()&&n("android")},e.androidPhone=function(){return e.android()&&n("mobile")},e.androidTablet=function(){return e.android()&&!n("mobile")},e.blackberry=function(){return n("blackberry")||n("bb10")||n("rim")},e.blackberryPhone=function(){return e.blackberry()&&!n("tablet")},e.blackberryTablet=function(){return e.blackberry()&&n("tablet")},e.windows=function(){return n("windows")},e.windowsPhone=function(){return e.windows()&&n("phone")},e.windowsTablet=function(){return e.windows()&&n("touch")&&!e.windowsPhone()},e.fxos=function(){return(n("(mobile;")||n("(tablet;"))&&n("; rv:")},e.fxosPhone=function(){return e.fxos()&&n("mobile")},e.fxosTablet=function(){return e.fxos()&&n("tablet")},e.meego=function(){return n("meego")},e.cordova=function(){return window.cordova&&"file:"===location.protocol},e.nodeWebkit=function(){return"object"==typeof window.process},e.mobile=function(){return e.androidPhone()||e.iphone()||e.ipod()||e.windowsPhone()||e.blackberryPhone()||e.fxosPhone()||e.meego()},e.tablet=function(){return e.ipad()||e.androidTablet()||e.blackberryTablet()||e.windowsTablet()||e.fxosTablet()},e.desktop=function(){return!e.tablet()&&!e.mobile()},e.television=function(){var e,t=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","roku","pov_tv","hbbtv","ce-html"];for(e=0;e<t.length;){if(n(t[e]))return!0;e++}return!1},e.portrait=function(){return window.innerHeight/window.innerWidth>1},e.landscape=function(){return window.innerHeight/window.innerWidth<1},e.noConflict=function(){return window.device=t,this},n=function(e){return-1!==d.indexOf(e)},r=function(e){var t;return t=new RegExp(e,"i"),s.className.match(t)},i=function(e){var t=null;r(e)||(t=s.className.replace(/^\s+|\s+$/g,""),s.className=t+" "+e)},l=function(e){r(e)&&(s.className=s.className.replace(" "+e,""))},e.ios()?e.ipad()?i("ios ipad tablet"):e.iphone()?i("ios iphone mobile"):e.ipod()&&i("ios ipod mobile"):e.android()?i(e.androidTablet()?"android tablet":"android mobile"):e.blackberry()?i(e.blackberryTablet()?"blackberry tablet":"blackberry mobile"):e.windows()?i(e.windowsTablet()?"windows tablet":e.windowsPhone()?"windows mobile":"desktop"):e.fxos()?i(e.fxosTablet()?"fxos tablet":"fxos mobile"):e.meego()?i("meego mobile"):e.nodeWebkit()?i("node-webkit"):e.television()?i("television"):e.desktop()&&i("desktop"),e.cordova()&&i("cordova"),o=function(){e.landscape()?(l("portrait"),i("landscape")):(l("landscape"),i("portrait"))},a=Object.prototype.hasOwnProperty.call(window,"onorientationchange")?"orientationchange":"resize",window.addEventListener?window.addEventListener(a,o,!1):window.attachEvent?window.attachEvent(a,o):window[a]=o,o(),"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:window.device=e}).call(this),function(e,t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):e.jQuery)}(this,function(e){"use strict";function t(e){var t,i,s,n,o,r,a,l={};for(o=e.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,",").split(","),a=0,r=o.length;a<r&&(i=o[a],-1===i.search(/^(http|https|ftp):\/\//)&&-1!==i.search(":"));a++)t=i.indexOf(":"),s=i.substring(0,t),n=i.substring(t+1),n||(n=void 0),"string"==typeof n&&(n="true"===n||"false"!==n&&n),"string"==typeof n&&(n=isNaN(n)?n:+n),l[s]=n;return null==s&&null==n?e:l}function i(e){e=""+e;var t,i,s,n=e.split(/\s+/),o="50%",r="50%";for(s=0,t=n.length;s<t;s++)i=n[s],"left"===i?o="0%":"right"===i?o="100%":"top"===i?r="0%":"bottom"===i?r="100%":"center"===i?0===s?o="50%":r="50%":0===s?o=i:r=i;return{x:o,y:r}}function s(t,i){var s=function(){i(this.src)};e('<img src="'+t+'.gif">').on("load",s),e('<img src="'+t+'.jpg">').on("load",s),e('<img src="'+t+'.jpeg">').on("load",s),e('<img src="'+t+'.png">').on("load",s)}function n(i,s,n){if(this.$element=e(i),"string"==typeof s&&(s=t(s)),n?"string"==typeof n&&(n=t(n)):n={},"string"==typeof s)s=s.replace(/\.\w*$/,"");else if("object"==typeof s)for(var a in s)s.hasOwnProperty(a)&&(s[a]=s[a].replace(/\.\w*$/,""));this.settings=e.extend({},o,n),this.path=s;try{this.init()}catch(e){if(e.message!==r)throw e}}var o={volume:1,playbackRate:1,muted:!0,loop:!0,autoplay:!0,position:"50% 50%",posterType:"detect",resizing:!0,bgColor:"transparent",className:""},r="Not implemented";n.prototype.init=function(){var t,n,o=this,a=o.path,l=a,d="",c=o.$element,u=o.settings,h=i(u.position),f=u.posterType;n=o.$wrapper=e("<div>").addClass(u.className).css({position:"absolute","z-index":-1,top:0,left:0,bottom:0,right:0,overflow:"hidden","-webkit-background-size":"cover","-moz-background-size":"cover","-o-background-size":"cover","background-size":"cover","background-color":u.bgColor,"background-repeat":"no-repeat","background-position":h.x+" "+h.y}),"object"==typeof a&&(a.poster?l=a.poster:a.mp4?l=a.mp4:a.webm?l=a.webm:a.ogv&&(l=a.ogv)),"detect"===f?s(l,function(e){n.css("background-image","url("+e+")")}):"none"!==f&&n.css("background-image","url("+l+"."+f+")"),"static"===c.css("position")&&c.css("position","relative"),c.prepend(n),"object"==typeof a?(a.mp4&&(d+='<source src="'+a.mp4+'.mp4" type="video/mp4">'),a.webm&&(d+='<source src="'+a.webm+'.webm" type="video/webm">'),a.ogv&&(d+='<source src="'+a.ogv+'.ogv" type="video/ogg">'),t=o.$video=e("<video>"+d+"</video>")):t=o.$video=e('<video><source src="'+a+'.mp4" type="video/mp4"><source src="'+a+'.webm" type="video/webm"><source src="'+a+'.ogv" type="video/ogg"></video>');try{t.prop({autoplay:u.autoplay,loop:u.loop,volume:u.volume,muted:u.muted,defaultMuted:u.muted,playbackRate:u.playbackRate,defaultPlaybackRate:u.playbackRate})}catch(e){throw new Error(r)}t.css({margin:"auto",position:"absolute","z-index":-1,top:h.y,left:h.x,"-webkit-transform":"translate(-"+h.x+", -"+h.y+")","-ms-transform":"translate(-"+h.x+", -"+h.y+")","-moz-transform":"translate(-"+h.x+", -"+h.y+")",transform:"translate(-"+h.x+", -"+h.y+")",visibility:"hidden",opacity:0}).one("canplaythrough.vide",function(){o.resize()}).one("playing.vide",function(){t.css({visibility:"visible",opacity:1}),n.css("background-image","none")}),c.on("resize.vide",function(){u.resizing&&o.resize()}),n.append(t)},n.prototype.getVideoObject=function(){return this.$video[0]},n.prototype.resize=function(){if(this.$video){var e=this.$wrapper,t=this.$video,i=t[0],s=i.videoHeight,n=i.videoWidth,o=e.height(),r=e.width();r/n>o/s?t.css({width:r+2,height:"auto"}):t.css({width:"auto",height:o+2})}},n.prototype.destroy=function(){delete e.vide.lookup[this.index],this.$video&&this.$video.off("vide"),this.$element.off("vide").removeData("vide"),this.$wrapper.remove()},e.vide={lookup:[]},e.fn.vide=function(t,i){var s;return this.each(function(){s=e.data(this,"vide"),s&&s.destroy(),s=new n(this,t,i),s.index=e.vide.lookup.push(s)-1,e.data(this,"vide",s)}),this},e(document).ready(function(){var t=e(window);t.on("resize.vide",function(){for(var t,i=e.vide.lookup.length,s=0;s<i;s++)(t=e.vide.lookup[s])&&t.settings.resizing&&t.resize()}),t.on("unload.vide",function(){return!1}),e(document).find("[data-vide-bg]").each(function(t,i){var s=e(i),n=s.data("vide-options"),o=s.data("vide-bg");s.vide(o,n)})})}),function(e,t,i){function s(e){var t=T.className,i=S._config.classPrefix||"";if(x&&(t=t.baseVal),S._config.enableJSClass){var s=new RegExp("(^|\\s)"+i+"no-js(\\s|$)");t=t.replace(s,"$1"+i+"js$2")}S._config.enableClasses&&(t+=" "+i+e.join(" "+i),x?T.className.baseVal=t:T.className=t)}function n(e,t){return typeof e===t}function o(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):x?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function r(t,i,s){var n;if("getComputedStyle"in e){n=getComputedStyle.call(e,t,i);var o=e.console;if(null!==n)s&&(n=n.getPropertyValue(s));else if(o){var r=o.error?"error":"log";o[r].call(o,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}}else n=!i&&t.currentStyle&&t.currentStyle[s];return n}function a(){var e=t.body;return e||(e=o(x?"svg":"body"),e.fake=!0),e}function l(e,i,s,n){var r,l,d,c,u="modernizr",h=o("div"),f=a();if(parseInt(s,10))for(;s--;)d=o("div"),d.id=n?n[s]:u+(s+1),h.appendChild(d);return r=o("style"),r.type="text/css",r.id="s"+u,(f.fake?f:h).appendChild(r),f.appendChild(h),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(t.createTextNode(e)),h.id=u,f.fake&&(f.style.background="",f.style.overflow="hidden",c=T.style.overflow,T.style.overflow="hidden",T.appendChild(f)),l=i(h,e),f.fake?(f.parentNode.removeChild(f),T.style.overflow=c,T.offsetHeight):h.parentNode.removeChild(h),!!l}function d(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,i){return t+i.toUpperCase()}).replace(/^-/,"")}function c(e,t){if("object"==typeof e)for(var i in e)E(e,i)&&c(i,e[i]);else{e=e.toLowerCase();var n=e.split("."),o=S[n[0]];if(2==n.length&&(o=o[n[1]]),void 0!==o)return S;t="function"==typeof t?t():t,1==n.length?S[n[0]]=t:(!S[n[0]]||S[n[0]]instanceof Boolean||(S[n[0]]=new Boolean(S[n[0]])),S[n[0]][n[1]]=t),s([(t&&0!=t?"":"no-")+n.join("-")]),S._trigger(e,t)}return S}function u(e,t){return!!~(""+e).indexOf(t)}function h(e,t){return function(){return e.apply(t,arguments)}}function f(e,t,i){var s;for(var o in e)if(e[o]in t)return!1===i?e[o]:(s=t[e[o]],n(s,"function")?h(s,i||t):s);return!1}function _(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(t,s){var n=t.length;if("CSS"in e&&"supports"in e.CSS){for(;n--;)if(e.CSS.supports(_(t[n]),s))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];n--;)o.push("("+_(t[n])+":"+s+")");return o=o.join(" or "),l("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==r(e,null,"position")})}return i}function m(e,t,s,r){function a(){c&&(delete L.style,delete L.modElem)}if(r=!n(r,"undefined")&&r,!n(s,"undefined")){var l=p(e,s);if(!n(l,"undefined"))return l}for(var c,h,f,_,m,v=["modernizr","tspan","samp"];!L.style&&v.length;)c=!0,L.modElem=o(v.shift()),L.style=L.modElem.style;for(f=e.length,h=0;f>h;h++)if(_=e[h],m=L.style[_],u(_,"-")&&(_=d(_)),L.style[_]!==i){if(r||n(s,"undefined"))return a(),"pfx"!=t||_;try{L.style[_]=s}catch(e){}if(L.style[_]!=m)return a(),"pfx"!=t||_}return a(),!1}function v(e,t,i,s,o){var r=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+M.join(r+" ")+r).split(" ");return n(t,"string")||n(t,"undefined")?m(a,t,s,o):(a=(e+" "+H.join(r+" ")+r).split(" "),f(a,t,i))}function g(e,t,s){return v(e,i,i,t,s)}var w=[],b=[],y={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var i=this;setTimeout(function(){t(i[e])},0)},addTest:function(e,t,i){b.push({name:e,fn:t,options:i})},addAsyncTest:function(e){b.push({name:null,fn:e})}},S=function(){};S.prototype=y,S=new S,S.addTest("history",function(){var t=navigator.userAgent;return(-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")||"file:"===location.protocol)&&(e.history&&"pushState"in e.history)}),S.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var T=t.documentElement,x="svg"===T.nodeName.toLowerCase();S.addTest("canvas",function(){var e=o("canvas");return!(!e.getContext||!e.getContext("2d"))}),S.addTest("video",function(){var e=o("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(e){}return t});var I=function(){function e(e,t){var n;return!!e&&(t&&"string"!=typeof t||(t=o(t||"div")),e="on"+e,n=e in t,!n&&s&&(t.setAttribute||(t=o("div")),t.setAttribute(e,""),n="function"==typeof t[e],t[e]!==i&&(t[e]=i),t.removeAttribute(e)),n)}var s=!("onblur"in t.documentElement);return e}();y.hasEvent=I,S.addTest("hashchange",function(){return!1!==I("hashchange",e)&&(t.documentMode===i||t.documentMode>7)});var k=y._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];y._prefixes=k,S.addTest("csscalc",function(){var e="width:",t=o("a");return t.style.cssText=e+k.join("calc(10px);"+e),!!t.style.length}),S.addTest("csspositionsticky",function(){var e="position:",t="sticky",i=o("a"),s=i.style;return s.cssText=e+k.join(t+";"+e).slice(0,-e.length),-1!==s.position.indexOf(t)});var C="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;S.addTest("supports",C||A);var P=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var i=t(e);return i&&i.matches||!1}:function(t){var i=!1;return l("@media "+t+" { #modernizr { position: absolute; } }",function(t){i="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),i}}();y.mq=P;var z=y.testStyles=l;S.addTest("touchevents",function(){var i;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)i=!0;else{var s=["@media (",k.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");z(s,function(e){i=9===e.offsetTop})}return i}),z("#modernizr { height: 50vh; }",function(t){var i=parseInt(e.innerHeight/2,10),s=parseInt(r(t,null,"height"),10);S.addTest("cssvhunit",s==i)}),z("#modernizr { width: 50vw; }",function(t){var i=parseInt(e.innerWidth/2,10),s=parseInt(r(t,null,"width"),10);S.addTest("cssvwunit",s==i)});var E;!function(){var e={}.hasOwnProperty;E=n(e,"undefined")||n(e.call,"undefined")?function(e,t){return t in e&&n(e.constructor.prototype[t],"undefined")}:function(t,i){return e.call(t,i)}}(),y._l={},y.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),S.hasOwnProperty(e)&&setTimeout(function(){S._trigger(e,S[e])},0)},y._trigger=function(e,t){if(this._l[e]){var i=this._l[e];setTimeout(function(){var e;for(e=0;e<i.length;e++)(0,i[e])(t)},0),delete this._l[e]}},S._q.push(function(){y.addTest=c}),S.addTest("svgasimg",t.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"));var O="Moz O ms Webkit",M=y._config.usePrefixes?O.split(" "):[];y._cssomPrefixes=M;var N=function(t){var s,n=k.length,o=e.CSSRule;if(void 0===o)return i;if(!t)return!1;if(t=t.replace(/^@/,""),(s=t.replace(/-/g,"_").toUpperCase()+"_RULE")in o)return"@"+t;for(var r=0;n>r;r++){var a=k[r];if(a.toUpperCase()+"_"+s in o)return"@-"+a.toLowerCase()+"-"+t}return!1};y.atRule=N;var H=y._config.usePrefixes?O.toLowerCase().split(" "):[];y._domPrefixes=H;var j={elem:o("modernizr")};S._q.push(function(){delete j.elem});var L={style:j.elem.style};S._q.unshift(function(){delete L.style}),y.testAllProps=v;var V=y.prefixed=function(e,t,i){return 0===e.indexOf("@")?N(e):(-1!=e.indexOf("-")&&(e=d(e)),t?v(e,t,i):v(e,"pfx"))};S.addTest("backgroundblendmode",V("backgroundBlendMode","text")),y.testAllProps=g,function(){S.addTest("csscolumns",function(){var e=!1,t=g("columnCount");try{(e=!!t)&&(e=new Boolean(e))}catch(e){}return e});for(var e,t,i=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],s=0;s<i.length;s++)e=i[s].toLowerCase(),t=g("column"+i[s]),("breakbefore"===e||"breakafter"===e||"breakinside"==e)&&(t=t||g(i[s])),S.addTest("csscolumns."+e,t)}(),S.addTest("cssfilters",function(){if(S.supports)return g("filter","blur(2px)");var e=o("a");return e.style.cssText=k.join("filter:blur(2px); "),!!e.style.length&&(t.documentMode===i||t.documentMode>9)}),S.addTest("flexbox",g("flexBasis","1px",!0)),S.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&g("transform","scale(1)",!0)}),S.addTest("csstransforms3d",function(){var e=!!g("perspective","1px",!0),t=S._config.usePrefixes;if(e&&(!t||"webkitPerspective"in T.style)){var i;S.supports?i="@supports (perspective: 1px)":(i="@media (transform-3d)",t&&(i+=",(-webkit-transform-3d)")),i+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}",z("#modernizr{width:0;height:0}"+i,function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),S.addTest("csstransitions",g("transition","all",!0)),S.addTest("csspointerevents",function(){var e=o("a").style;return e.cssText="pointer-events:auto","auto"===e.pointerEvents}),function(){var e,t,i,s,o,r,a;for(var l in b)if(b.hasOwnProperty(l)){if(e=[],t=b[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(i=0;i<t.options.aliases.length;i++)e.push(t.options.aliases[i].toLowerCase());for(s=n(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)r=e[o],a=r.split("."),1===a.length?S[a[0]]=s:(!S[a[0]]||S[a[0]]instanceof Boolean||(S[a[0]]=new Boolean(S[a[0]])),S[a[0]][a[1]]=s),w.push((s?"":"no-")+a.join("-"))}}(),s(w),delete y.addTest,delete y.addAsyncTest;for(var B=0;B<S._q.length;B++)S._q[B]();e.Modernizr=S}(window,document),PointerEventsPolyfill.initialize=function(e){return null==PointerEventsPolyfill.singleton&&(PointerEventsPolyfill.singleton=new PointerEventsPolyfill(e)),PointerEventsPolyfill.singleton},PointerEventsPolyfill.prototype.register_mouse_events=function(){$(document).on(this.options.mouseEvents.join(" "),this.options.selector,function(e){if("none"==$(this).css("pointer-events")){var t=$(this).css("display");$(this).css("display","none");var i=document.elementFromPoint(e.clientX,e.clientY);return t?$(this).css("display",t):$(this).css("display",""),e.target=i,$(i).trigger(e),!1}return!0})},function(e){function t(t,i){var s,n=this,o=window.navigator,r=o.userAgent.toLowerCase();n.uid=e.rsModules.uid++,n.ns=".rs"+n.uid;var a,l=document.createElement("div").style,d=["webkit","Moz","ms","O"],c="",u=0;for(s=0;s<d.length;s++)a=d[s],!c&&a+"Transform"in l&&(c=a),a=a.toLowerCase(),window.requestAnimationFrame||(window.requestAnimationFrame=window[a+"RequestAnimationFrame"],window.cancelAnimationFrame=window[a+"CancelAnimationFrame"]||window[a+"CancelRequestAnimationFrame"]);window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var i=(new Date).getTime(),s=Math.max(0,16-(i-u)),n=window.setTimeout(function(){e(i+s)},s);return u=i+s,n}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)}),n.isIPAD=r.match(/(ipad)/),n.isIOS=n.isIPAD||r.match(/(iphone|ipod)/),s=function(e){return e=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],{browser:e[1]||"",version:e[2]||"0"}}(r),d={},s.browser&&(d[s.browser]=!0,d.version=s.version),d.chrome&&(d.webkit=!0),n._a=d,n.isAndroid=-1<r.indexOf("android"),n.slider=e(t),n.ev=e(n),n._b=e(document),n.st=e.extend({},e.fn.royalSlider.defaults,i),n._c=n.st.transitionSpeed,n._d=0,!n.st.allowCSS3||d.webkit&&!n.st.allowCSS3OnWebkit||(s=c+(c?"T":"t"),n._e=s+"ransform"in l&&s+"ransition"in l,n._e&&(n._f=c+(c?"P":"p")+"erspective"in l)),c=c.toLowerCase(),n._g="-"+c+"-",n._h="vertical"!==n.st.slidesOrientation,n._i=n._h?"left":"top",n._j=n._h?"width":"height",n._k=-1,n._l="fade"!==n.st.transitionType,n._l||(n.st.sliderDrag=!1,n._m=10),n._n="z-index:0; display:none; opacity:0;",n._o=0,n._p=0,n._q=0,e.each(e.rsModules,function(e,t){"uid"!==e&&t.call(n)}),n.slides=[],n._r=0,(n.st.slides?e(n.st.slides):n.slider.children().detach()).each(function(){n._s(this,!0)}),n.st.randomizeSlides&&n.slides.sort(function(){return.5-Math.random()}),n.numSlides=n.slides.length,n._t(),n.st.startSlideId?n.st.startSlideId>n.numSlides-1&&(n.st.startSlideId=n.numSlides-1):n.st.startSlideId=0,n._o=n.staticSlideId=n.currSlideId=n._u=n.st.startSlideId,n.currSlide=n.slides[n.currSlideId],n._v=0,n.pointerMultitouch=!1,n.slider.addClass((n._h?"rsHor":"rsVer")+(n._l?"":" rsFade")),l='<div class="rsOverflow"><div class="rsContainer">',n.slidesSpacing=n.st.slidesSpacing,n._w=(n._h?n.slider.width():n.slider.height())+n.st.slidesSpacing,n._x=Boolean(0<n._y),1>=n.numSlides&&(n._z=!1),n._a1=n._z&&n._l?2===n.numSlides?1:2:0,n._b1=6>n.numSlides?n.numSlides:6,n._c1=0,n._d1=0,n.slidesJQ=[];for(s=0;s<n.numSlides;s++)n.slidesJQ.push(e('<div style="'+(n._l?"":s!==n.currSlideId?n._n:"z-index:0;")+'" class="rsSlide "></div>'));n._e1=l=e(l+"</div></div>");var h=n.ns,c=function(e,t,i,s,o){n._j1=e+t+h,n._k1=e+i+h,n._l1=e+s+h,o&&(n._m1=e+o+h)};s=o.pointerEnabled,n.pointerEnabled=s||o.msPointerEnabled,n.pointerEnabled?(n.hasTouch=!1,n._n1=.2,n.pointerMultitouch=Boolean(1<o[(s?"m":"msM")+"axTouchPoints"]),s?c("pointer","down","move","up","cancel"):c("MSPointer","Down","Move","Up","Cancel")):(n.isIOS?n._j1=n._k1=n._l1=n._m1="":c("mouse","down","move","up"),"ontouchstart"in window||"createTouch"in document?(n.hasTouch=!0,n._j1+=" touchstart"+h,n._k1+=" touchmove"+h,n._l1+=" touchend"+h,n._m1+=" touchcancel"+h,n._n1=.5,n.st.sliderTouch&&(n._f1=!0)):(n.hasTouch=!1,n._n1=.2)),n.st.sliderDrag&&(n._f1=!0,d.msie||d.opera?n._g1=n._h1="move":d.mozilla?(n._g1="-moz-grab",n._h1="-moz-grabbing"):d.webkit&&-1!=o.platform.indexOf("Mac")&&(n._g1="-webkit-grab",n._h1="-webkit-grabbing"),n._i1()),n.slider.html(l),n._o1=n.st.controlsInside?n._e1:n.slider,n._p1=n._e1.children(".rsContainer"),n.pointerEnabled&&n._p1.css((s?"":"-ms-")+"touch-action",n._h?"pan-y":"pan-x"),n._q1=e('<div class="rsPreloader"></div>'),o=n._p1.children(".rsSlide"),n._r1=n.slidesJQ[n.currSlideId],n._s1=0,n._e?(n._t1="transition-property",n._u1="transition-duration",n._v1="transition-timing-function",n._w1=n._x1=n._g+"transform",n._f?(d.webkit&&!d.chrome&&n.slider.addClass("rsWebkit3d"),n._y1="translate3d(",n._z1="px, ",n._a2="px, 0px)"):(n._y1="translate(",n._z1="px, ",n._a2="px)"),n._l?n._p1[n._g+n._t1]=n._g+"transform":(d={},d[n._g+n._t1]="opacity",d[n._g+n._u1]=n.st.transitionSpeed+"ms",d[n._g+n._v1]=n.st.css3easeInOut,o.css(d))):(n._x1="left",n._w1="top");var f;e(window).on("resize"+n.ns,function(){f&&clearTimeout(f),f=setTimeout(function(){n.updateSliderSize()},50)}),n.ev.trigger("rsAfterPropsSetup"),n.updateSliderSize(),n.st.keyboardNavEnabled&&n._b2(),n.st.arrowsNavHideOnTouch&&(n.hasTouch||n.pointerMultitouch)&&(n.st.arrowsNav=!1),n.st.arrowsNav&&(o=n._o1,e('<div class="rsArrow rsArrowLeft"><div class="rsArrowIcn"></div></div><div class="rsArrow rsArrowRight"><div class="rsArrowIcn"></div></div>').appendTo(o),n._c2=o.children(".rsArrowLeft").click(function(e){e.preventDefault(),n.prev()}),n._d2=o.children(".rsArrowRight").click(function(e){e.preventDefault(),n.next()}),n.st.arrowsNavAutoHide&&!n.hasTouch&&(n._c2.addClass("rsHidden"),n._d2.addClass("rsHidden"),o.one("mousemove.arrowshover",function(){n._c2.removeClass("rsHidden"),n._d2.removeClass("rsHidden")}),o.hover(function(){n._e2||(n._c2.removeClass("rsHidden"),n._d2.removeClass("rsHidden"))},function(){n._e2||(n._c2.addClass("rsHidden"),n._d2.addClass("rsHidden"))})),n.ev.on("rsOnUpdateNav",function(){n._f2()}),n._f2()),n.hasTouch&&n.st.sliderTouch||!n.hasTouch&&n.st.sliderDrag?n._p1.on(n._j1,function(e){n._g2(e)}):n.dragSuccess=!1;var _=["rsPlayBtnIcon","rsPlayBtn","rsCloseVideoBtn","rsCloseVideoIcn"];n._p1.click(function(t){if(!n.dragSuccess){var i=e(t.target).attr("class");if(-1!==e.inArray(i,_)&&n.toggleVideo())return!1;if(n.st.navigateByClick&&!n._h2){if(e(t.target).closest(".rsNoDrag",n._r1).length)return!0;n._i2(t)}n.ev.trigger("rsSlideClick",t)}}).on("click.rs","a",function(e){if(n.dragSuccess)return!1;n._h2=!0,setTimeout(function(){n._h2=!1},3)}),n.ev.trigger("rsAfterInit")}e.rsModules||(e.rsModules={uid:0}),t.prototype={constructor:t,_i2:function(e){e=e[this._h?"pageX":"pageY"]-this._j2,e>=this._q?this.next():0>e&&this.prev()},_t:function(){var e;e=this.st.numImagesToPreload,(this._z=this.st.loop)&&(2===this.numSlides?(this._z=!1,this.st.loopRewind=!0):2>this.numSlides&&(this.st.loopRewind=this._z=!1)),this._z&&0<e&&(4>=this.numSlides?e=1:this.st.numImagesToPreload>(this.numSlides-1)/2&&(e=Math.floor((this.numSlides-1)/2))),this._y=e},_s:function(t,i){function s(e,t){if(t?a.images.push(e.attr(t)):a.images.push(e.text()),l){l=!1,a.caption="src"===t?e.attr("alt"):e.contents(),a.image=a.images[0],a.videoURL=e.attr("data-rsVideo");var i=e.attr("data-rsw"),s=e.attr("data-rsh");void 0!==i&&!1!==i&&void 0!==s&&!1!==s?(a.iW=parseInt(i,10),a.iH=parseInt(s,10)):r.st.imgWidth&&r.st.imgHeight&&(a.iW=r.st.imgWidth,a.iH=r.st.imgHeight)}}var n,o,r=this,a={},l=!0;if(t=e(t),r._k2=t,r.ev.trigger("rsBeforeParseNode",[t,a]),!a.stopParsing)return t=r._k2,a.id=r._r,a.contentAdded=!1,r._r++,a.images=[],a.isBig=!1,a.hasCover||(t.hasClass("rsImg")?(o=t,n=!0):(o=t.find(".rsImg"),o.length&&(n=!0)),n?(a.bigImage=o.eq(0).attr("data-rsBigImg"),o.each(function(){var t=e(this);t.is("a")?s(t,"href"):t.is("img")?s(t,"src"):s(t)})):t.is("img")&&(t.addClass("rsImg rsMainSlideImage"),s(t,"src"))),o=t.find(".rsCaption"),o.length&&(a.caption=o.remove()),a.content=t,r.ev.trigger("rsAfterParseNode",[t,a]),i&&r.slides.push(a),0===a.images.length&&(a.isLoaded=!0,a.isRendered=!1,a.isLoading=!1,a.images=null),a},_b2:function(){var e,t,i=this,s=function(e){37===e?i.prev():39===e&&i.next()};i._b.on("keydown"+i.ns,function(n){if(!i.st.keyboardNavEnabled)return!0;if(!(i._l2||37!==(t=n.keyCode)&&39!==t||e)){if(document.activeElement&&/(INPUT|SELECT|TEXTAREA)/i.test(document.activeElement.tagName))return!0;i.isFullscreen&&n.preventDefault(),s(t),e=setInterval(function(){s(t)},700)}}).on("keyup"+i.ns,function(t){e&&(clearInterval(e),e=null)})},goTo:function(e,t){e!==this.currSlideId&&this._m2(e,this.st.transitionSpeed,!0,!t)},destroy:function(t){this.ev.trigger("rsBeforeDestroy"),this._b.off("keydown"+this.ns+" keyup"+this.ns+" "+this._k1+" "+this._l1),this._p1.off(this._j1+" click"),this.slider.data("royalSlider",null),e.removeData(this.slider,"royalSlider"),e(window).off("resize"+this.ns),this.loadingTimeout&&clearTimeout(this.loadingTimeout),t&&this.slider.remove(),this.ev=this.slider=this.slides=null},_n2:function(t,i){function s(i,s,r){i.isAdded?(n(s,i),o(s,i)):(r||(r=d.slidesJQ[s]),i.holder?r=i.holder:(r=d.slidesJQ[s]=e(r),i.holder=r),i.appendOnLoaded=!1,o(s,i,r),n(s,i),d._p2(i,r,t),i.isAdded=!0)}function n(e,i){i.contentAdded||(d.setItemHtml(i,t),t||(i.contentAdded=!0))}function o(e,t,i){d._l&&(i||(i=d.slidesJQ[e]),i.css(d._i,(e+d._d1+h)*d._w))}function r(e){if(c){if(e>u-1)return r(e-u);if(0>e)return r(u+e)}return e}var a,l,d=this,c=d._z,u=d.numSlides;if(!isNaN(i))return r(i);var h,f,_=d.currSlideId,p=t?Math.abs(d._o2-d.currSlideId)>=d.numSlides-1?0:1:d._y,m=Math.min(2,p),v=!1,g=!1;for(l=_;l<_+1+m;l++)if(f=r(l),(a=d.slides[f])&&(!a.isAdded||!a.positionSet)){v=!0;break}for(l=_-1;l>_-1-m;l--)if(f=r(l),(a=d.slides[f])&&(!a.isAdded||!a.positionSet)){g=!0;break}if(v)for(l=_;l<_+p+1;l++)f=r(l),h=Math.floor((d._u-(_-l))/d.numSlides)*d.numSlides,(a=d.slides[f])&&s(a,f);if(g)for(l=_-1;l>_-1-p;l--)f=r(l),h=Math.floor((d._u-(_-l))/u)*u,(a=d.slides[f])&&s(a,f);if(!t)for(m=r(_-p),_=r(_+p),p=m>_?0:m,l=0;l<u;l++)m>_&&l>m-1||!(l<p||l>_)||(a=d.slides[l])&&a.holder&&(a.holder.detach(),a.isAdded=!1)},setItemHtml:function(t,i){var s=this,n=function(){if(t.images){if(!t.isLoading){var i,n;if(t.content.hasClass("rsImg")?(i=t.content,n=!0):i=t.content.find(".rsImg:not(img)"),i&&!i.is("img")&&i.each(function(){var i=e(this),s='<img class="rsImg" src="'+(i.is("a")?i.attr("href"):i.text())+'" />';n?t.content=e(s):i.replaceWith(s)}),i=n?t.content:t.content.find("img.rsImg"),d(),i.eq(0).addClass("rsMainSlideImage"),t.iW&&t.iH&&(t.isLoaded||s._q2(t),a()),t.isLoading=!0,t.isBig)e("<img />").on("load.rs error.rs",function(t){e(this).off("load.rs error.rs"),o([this],!0)}).attr("src",t.image);else{t.loaded=[],t.numStartedLoad=0,i=function(i){e(this).off("load.rs error.rs"),t.loaded.push(this),t.loaded.length===t.numStartedLoad&&o(t.loaded,!1)};for(var r=0;r<t.images.length;r++){var l=e("<img />");t.numStartedLoad++,l.on("load.rs error.rs",i).attr("src",t.images[r])}}}}else t.isRendered=!0,t.isLoaded=!0,t.isLoading=!1,a(!0)},o=function(e,i){if(e.length){var s=e[0];if(i!==t.isBig)(s=t.holder.children())&&1<s.length&&c();else if(t.iW&&t.iH)r();else if(t.iW=s.width,t.iH=s.height,t.iW&&t.iH)r();else{var n=new Image;n.onload=function(){n.width?(t.iW=n.width,t.iH=n.height,r()):setTimeout(function(){n.width&&(t.iW=n.width,t.iH=n.height),r()},1e3)},n.src=s.src}}else r()},r=function(){t.isLoaded=!0,t.isLoading=!1,a(),c(),l()},a=function(){if(!t.isAppended&&s.ev){var e=s.st.visibleNearby,n=t.id-s._o;i||t.appendOnLoaded||!s.st.fadeinLoadedSlide||0!==n&&(!(e||s._r2||s._l2)||-1!==n&&1!==n)||(e={visibility:"visible",opacity:0},e[s._g+"transition"]="opacity 400ms ease-in-out",t.content.css(e),setTimeout(function(){t.content.css("opacity",1)},16)),t.holder.find(".rsPreloader").length?t.holder.append(t.content):t.holder.html(t.content),t.isAppended=!0,t.isLoaded&&(s._q2(t),l()),t.sizeReady||(t.sizeReady=!0,setTimeout(function(){s.ev.trigger("rsMaybeSizeReady",t)},100))}},l=function(){!t.loadedTriggered&&s.ev&&(t.isLoaded=t.loadedTriggered=!0,t.holder.trigger("rsAfterContentSet"),s.ev.trigger("rsAfterContentSet",t))},d=function(){s.st.usePreloader&&t.holder.html(s._q1.clone())},c=function(e){s.st.usePreloader&&(e=t.holder.find(".rsPreloader"),e.length&&e.remove())};t.isLoaded?a():i?!s._l&&t.images&&t.iW&&t.iH?n():(t.holder.isWaiting=!0,d(),t.holder.slideId=-99):n()},_p2:function(e,t,i){this._p1.append(e.holder),e.appendOnLoaded=!1},_g2:function(t,i){var s,n=this,o="touchstart"===t.type;if(n._s2=o,n.ev.trigger("rsDragStart"),e(t.target).closest(".rsNoDrag",n._r1).length)return n.dragSuccess=!1,!0;if(!i&&n._r2&&(n._t2=!0,n._u2()),n.dragSuccess=!1,n._l2)o&&(n._v2=!0);else{if(o&&(n._v2=!1),n._w2(),o){var r=t.originalEvent.touches;if(!(r&&0<r.length))return;s=r[0],1<r.length&&(n._v2=!0)}else t.preventDefault(),s=t,n.pointerEnabled&&(s=s.originalEvent);n._l2=!0,n._b.on(n._k1,function(e){n._x2(e,i)}).on(n._l1,function(e){n._y2(e,i)}),n._z2="",n._a3=!1,n._b3=s.pageX,n._c3=s.pageY,n._d3=n._v=(i?n._e3:n._h)?s.pageX:s.pageY,n._f3=0,n._g3=0,n._h3=i?n._i3:n._p,n._j3=(new Date).getTime(),o&&n._e1.on(n._m1,function(e){n._y2(e,i)})}},_k3:function(e,t){if(this._l3){var i=this._m3,s=e.pageX-this._b3,n=e.pageY-this._c3,o=this._h3+s,r=this._h3+n,a=t?this._e3:this._h,o=a?o:r,r=this._z2;this._a3=!0,this._b3=e.pageX,this._c3=e.pageY,"x"===r&&0!==s?this._f3=0<s?1:-1:"y"===r&&0!==n&&(this._g3=0<n?1:-1),r=a?this._b3:this._c3,s=a?s:n,t?o>this._n3?o=this._h3+s*this._n1:o<this._o3&&(o=this._h3+s*this._n1):this._z||(0>=this.currSlideId&&0<r-this._d3&&(o=this._h3+s*this._n1),this.currSlideId>=this.numSlides-1&&0>r-this._d3&&(o=this._h3+s*this._n1)),this._h3=o,200<i-this._j3&&(this._j3=i,this._v=r),t?this._q3(this._h3):this._l&&this._p3(this._h3)}},_x2:function(e,t){
  2. var i,s=this,n="touchmove"===e.type;if(!s._s2||n){if(n){if(s._r3)return;var o=e.originalEvent.touches;if(!o)return;if(1<o.length)return;i=o[0]}else i=e,s.pointerEnabled&&(i=i.originalEvent);if(s._a3||(s._e&&(t?s._s3:s._p1).css(s._g+s._u1,"0s"),function e(){s._l2&&(s._t3=requestAnimationFrame(e),s._u3&&s._k3(s._u3,t))}()),s._l3)e.preventDefault(),s._m3=(new Date).getTime(),s._u3=i;else if(o=t?s._e3:s._h,7<(i=Math.abs(i.pageX-s._b3)-Math.abs(i.pageY-s._c3)-(o?-7:7))){if(o)e.preventDefault(),s._z2="x";else if(n)return void s._v3(e);s._l3=!0}else if(-7>i){if(o){if(n)return void s._v3(e)}else e.preventDefault(),s._z2="y";s._l3=!0}}},_v3:function(e,t){this._r3=!0,this._a3=this._l2=!1,this._y2(e)},_y2:function(t,i){function s(e){return 100>e?100:500<e?500:e}function n(e,t){(d._l||i)&&(a=(-d._u-d._d1)*d._w,l=Math.abs(d._p-a),d._c=l/t,e&&(d._c+=250),d._c=s(d._c),d._x3(a,!1))}var o,r,a,l,d=this;if(o=-1<t.type.indexOf("touch"),!d._s2||o)if(d._s2=!1,d.ev.trigger("rsDragRelease"),d._u3=null,d._l2=!1,d._r3=!1,d._l3=!1,d._m3=0,cancelAnimationFrame(d._t3),d._a3&&(i?d._q3(d._h3):d._l&&d._p3(d._h3)),d._b.off(d._k1).off(d._l1),o&&d._e1.off(d._m1),d._i1(),!d._a3&&!d._v2&&i&&d._w3){var c=e(t.target).closest(".rsNavItem");c.length&&d.goTo(c.index())}else{if(r=i?d._e3:d._h,!d._a3||"y"===d._z2&&r||"x"===d._z2&&!r){if(i||!d._t2)return d._t2=!1,void(d.dragSuccess=!1);if(d._t2=!1,d.st.navigateByClick)return d._i2(d.pointerEnabled?t.originalEvent:t),void(d.dragSuccess=!0);d.dragSuccess=!0}else d.dragSuccess=!0;d._t2=!1,d._z2="";var u=d.st.minSlideOffset;o=o?t.originalEvent.changedTouches[0]:d.pointerEnabled?t.originalEvent:t;var h=r?o.pageX:o.pageY,f=d._d3;o=d._v;var _=d.currSlideId,p=d.numSlides,m=r?d._f3:d._g3,v=d._z;if(Math.abs(h-f),o=h-o,r=(new Date).getTime()-d._j3,r=Math.abs(o)/r,0===m||1>=p)n(!0,r);else{if(!v&&!i)if(0>=_){if(0<m)return void n(!0,r)}else if(_>=p-1&&0>m)return void n(!0,r);if(i){if((a=d._i3)>d._n3)a=d._n3;else if(a<d._o3)a=d._o3;else{if(h=r*r/.006,c=-d._i3,f=d._y3-d._z3+d._i3,0<o&&h>c?(c+=d._z3/(15/(h/r*.003)),r=r*c/h,h=c):0>o&&h>f&&(f+=d._z3/(15/(h/r*.003)),r=r*f/h,h=f),c=Math.max(Math.round(r/.003),50),(a+=h*(0>o?-1:1))>d._n3)return void d._a4(a,c,!0,d._n3,200);if(a<d._o3)return void d._a4(a,c,!0,d._o3,200)}d._a4(a,c,!0)}else c=function(e){var t=Math.floor(e/d._w);return e-t*d._w>u&&t++,t},f+u<h?0>m?n(!1,r):(c=c(h-f),d._m2(d.currSlideId-c,s(Math.abs(d._p-(-d._u-d._d1+c)*d._w)/r),!1,!0,!0)):f-u>h?0<m?n(!1,r):(c=c(f-h),d._m2(d.currSlideId+c,s(Math.abs(d._p-(-d._u-d._d1-c)*d._w)/r),!1,!0,!0)):n(!1,r)}}},_p3:function(e){e=this._p=e,this._e?this._p1.css(this._x1,this._y1+(this._h?e+this._z1+0:0+this._z1+e)+this._a2):this._p1.css(this._h?this._x1:this._w1,e)},updateSliderSize:function(e){var t,i;if(this.slider){if(this.st.autoScaleSlider){var s=this.st.autoScaleSliderWidth,n=this.st.autoScaleSliderHeight;this.st.autoScaleHeight?(t=this.slider.width(),t!=this.width&&(this.slider.css("height",n/s*t),t=this.slider.width()),i=this.slider.height()):(i=this.slider.height(),i!=this.height&&(this.slider.css("width",s/n*i),i=this.slider.height()),t=this.slider.width())}else t=this.slider.width(),i=this.slider.height();if(e||t!=this.width||i!=this.height){for(this.width=t,this.height=i,this._b4=t,this._c4=i,this.ev.trigger("rsBeforeSizeSet"),this.ev.trigger("rsAfterSizePropSet"),this._e1.css({width:this._b4,height:this._c4}),this._w=(this._h?this._b4:this._c4)+this.st.slidesSpacing,this._d4=this.st.imageScalePadding,t=0;t<this.slides.length;t++)e=this.slides[t],e.positionSet=!1,e&&e.images&&e.isLoaded&&(e.isRendered=!1,this._q2(e));if(this._e4)for(t=0;t<this._e4.length;t++)e=this._e4[t],e.holder.css(this._i,(e.id+this._d1)*this._w);this._n2(),this._l&&(this._e&&this._p1.css(this._g+"transition-duration","0s"),this._p3((-this._u-this._d1)*this._w)),this.ev.trigger("rsOnUpdateNav")}this._j2=this._e1.offset(),this._j2=this._j2[this._i]}},appendSlide:function(t,i){var s=this._s(t);(isNaN(i)||i>this.numSlides)&&(i=this.numSlides),this.slides.splice(i,0,s),this.slidesJQ.splice(i,0,e('<div style="'+(this._l?"position:absolute;":this._n)+'" class="rsSlide"></div>')),i<=this.currSlideId&&this.currSlideId++,this.ev.trigger("rsOnAppendSlide",[s,i]),this._f4(i),i===this.currSlideId&&this.ev.trigger("rsAfterSlideChange")},removeSlide:function(e){var t=this.slides[e];t&&(t.holder&&t.holder.remove(),e<this.currSlideId&&this.currSlideId--,this.slides.splice(e,1),this.slidesJQ.splice(e,1),this.ev.trigger("rsOnRemoveSlide",[e]),this._f4(e),e===this.currSlideId&&this.ev.trigger("rsAfterSlideChange"))},_f4:function(e){var t=this;for(e=t.numSlides,e=0>=t._u?0:Math.floor(t._u/e),t.numSlides=t.slides.length,0===t.numSlides?(t.currSlideId=t._d1=t._u=0,t.currSlide=t._g4=null):t._u=e*t.numSlides+t.currSlideId,e=0;e<t.numSlides;e++)t.slides[e].id=e;t.currSlide=t.slides[t.currSlideId],t._r1=t.slidesJQ[t.currSlideId],t.currSlideId>=t.numSlides?t.goTo(t.numSlides-1):0>t.currSlideId&&t.goTo(0),t._t(),t._l&&t._p1.css(t._g+t._u1,"0ms"),t._h4&&clearTimeout(t._h4),t._h4=setTimeout(function(){t._l&&t._p3((-t._u-t._d1)*t._w),t._n2(),t._l||t._r1.css({display:"block",opacity:1})},14),t.ev.trigger("rsOnUpdateNav")},_i1:function(){this._f1&&this._l&&(this._g1?this._e1.css("cursor",this._g1):(this._e1.removeClass("grabbing-cursor"),this._e1.addClass("grab-cursor")))},_w2:function(){this._f1&&this._l&&(this._h1?this._e1.css("cursor",this._h1):(this._e1.removeClass("grab-cursor"),this._e1.addClass("grabbing-cursor")))},next:function(e){this._m2("next",this.st.transitionSpeed,!0,!e)},prev:function(e){this._m2("prev",this.st.transitionSpeed,!0,!e)},_m2:function(e,t,i,s,n){var o,r,a,l=this;if(l.ev.trigger("rsBeforeMove",[e,s]),a="next"===e?l.currSlideId+1:"prev"===e?l.currSlideId-1:e=parseInt(e,10),!l._z){if(0>a)return void l._i4("left",!s);if(a>=l.numSlides)return void l._i4("right",!s)}l._r2&&(l._u2(!0),i=!1),r=a-l.currSlideId,a=l._o2=l.currSlideId;var d=l.currSlideId+r;s=l._u;var c;l._z?(d=l._n2(!1,d),s+=r):s=d,l._o=d,l._g4=l.slidesJQ[l.currSlideId],l._u=s,l.currSlideId=l._o,l.currSlide=l.slides[l.currSlideId],l._r1=l.slidesJQ[l.currSlideId];var d=l.st.slidesDiff,u=Boolean(0<r);r=Math.abs(r);var h=Math.floor(a/l._y),f=Math.floor((a+(u?d:-d))/l._y),h=(u?Math.max(h,f):Math.min(h,f))*l._y+(u?l._y-1:0);if(h>l.numSlides-1?h=l.numSlides-1:0>h&&(h=0),a=u?h-a:a-h,a>l._y&&(a=l._y),r>a+d)for(l._d1+=(r-(a+d))*(u?-1:1),t*=1.4,a=0;a<l.numSlides;a++)l.slides[a].positionSet=!1;l._c=t,l._n2(!0),n||(c=!0),o=(-s-l._d1)*l._w,c?setTimeout(function(){l._j4=!1,l._x3(o,e,!1,i),l.ev.trigger("rsOnUpdateNav")},0):(l._x3(o,e,!1,i),l.ev.trigger("rsOnUpdateNav"))},_f2:function(){this.st.arrowsNav&&(1>=this.numSlides?(this._c2.css("display","none"),this._d2.css("display","none")):(this._c2.css("display","block"),this._d2.css("display","block"),this._z||this.st.loopRewind||(0===this.currSlideId?this._c2.addClass("rsArrowDisabled"):this._c2.removeClass("rsArrowDisabled"),this.currSlideId===this.numSlides-1?this._d2.addClass("rsArrowDisabled"):this._d2.removeClass("rsArrowDisabled"))))},_x3:function(t,i,s,n,o){function r(){var e;a&&(e=a.data("rsTimeout"))&&(a!==l&&a.css({opacity:0,display:"none",zIndex:0}),clearTimeout(e),a.data("rsTimeout","")),(e=l.data("rsTimeout"))&&(clearTimeout(e),l.data("rsTimeout",""))}var a,l,d=this,c={};isNaN(d._c)&&(d._c=400),d._p=d._h3=t,d.ev.trigger("rsBeforeAnimStart"),d._e?d._l?(d._c=parseInt(d._c,10),s=d._g+d._v1,c[d._g+d._u1]=d._c+"ms",c[s]=n?e.rsCSS3Easing[d.st.easeInOut]:e.rsCSS3Easing[d.st.easeOut],d._p1.css(c),n||!d.hasTouch?setTimeout(function(){d._p3(t)},5):d._p3(t)):(d._c=d.st.transitionSpeed,a=d._g4,l=d._r1,l.data("rsTimeout")&&l.css("opacity",0),r(),a&&a.data("rsTimeout",setTimeout(function(){c[d._g+d._u1]="0ms",c.zIndex=0,c.display="none",a.data("rsTimeout",""),a.css(c),setTimeout(function(){a.css("opacity",0)},16)},d._c+60)),c.display="block",c.zIndex=d._m,c.opacity=0,c[d._g+d._u1]="0ms",c[d._g+d._v1]=e.rsCSS3Easing[d.st.easeInOut],l.css(c),l.data("rsTimeout",setTimeout(function(){l.css(d._g+d._u1,d._c+"ms"),l.data("rsTimeout",setTimeout(function(){l.css("opacity",1),l.data("rsTimeout","")},20))},20))):d._l?(c[d._h?d._x1:d._w1]=t+"px",d._p1.animate(c,d._c,n?d.st.easeInOut:d.st.easeOut)):(a=d._g4,l=d._r1,l.stop(!0,!0).css({opacity:0,display:"block",zIndex:d._m}),d._c=d.st.transitionSpeed,l.animate({opacity:1},d._c,d.st.easeInOut),r(),a&&a.data("rsTimeout",setTimeout(function(){a.stop(!0,!0).css({opacity:0,display:"none",zIndex:0})},d._c+60))),d._r2=!0,d.loadingTimeout&&clearTimeout(d.loadingTimeout),d.loadingTimeout=o?setTimeout(function(){d.loadingTimeout=null,o.call()},d._c+60):setTimeout(function(){d.loadingTimeout=null,d._k4(i)},d._c+60)},_u2:function(e){if(this._r2=!1,clearTimeout(this.loadingTimeout),this._l)if(this._e){if(!e){e=this._p;var t=this._h3=this._l4();this._p1.css(this._g+this._u1,"0ms"),e!==t&&this._p3(t)}}else this._p1.stop(!0),this._p=parseInt(this._p1.css(this._h?this._x1:this._w1),10);else 20<this._m?this._m=10:this._m++},_l4:function(){var e=window.getComputedStyle(this._p1.get(0),null).getPropertyValue(this._g+"transform").replace(/^matrix\(/i,"").split(/, |\)$/g),t=0===e[0].indexOf("matrix3d");return parseInt(e[this._h?t?12:4:t?13:5],10)},_m4:function(e,t){return this._e?this._y1+(t?e+this._z1+0:0+this._z1+e)+this._a2:e},_k4:function(e){this._l||(this._r1.css("z-index",0),this._m=10),this._r2=!1,this.staticSlideId=this.currSlideId,this._n2(),this._n4=!1,this.ev.trigger("rsAfterSlideChange")},_i4:function(e,t){var i=this,s=(-i._u-i._d1)*i._w;if(0!==i.numSlides&&!i._r2)if(i.st.loopRewind)i.goTo("left"===e?i.numSlides-1:0,t);else if(i._l){i._c=200;var n=function(){i._r2=!1};i._x3(s+("left"===e?30:-30),"",!1,!0,function(){i._r2=!1,i._x3(s,"",!1,!0,n)})}},_q2:function(t,i){if(!t.isRendered){var s,n,o=t.content,r="rsMainSlideImage",a=e.isFunction(this.st.imageAlignCenter)?this.st.imageAlignCenter(t):this.st.imageAlignCenter,l=e.isFunction(this.st.imageScaleMode)?this.st.imageScaleMode(t):this.st.imageScaleMode;if(t.videoURL&&(r="rsVideoContainer","fill"!==l?s=!0:(n=o,n.hasClass(r)||(n=n.find("."+r)),n.css({width:"100%",height:"100%"}),r="rsMainSlideImage")),o.hasClass(r)||(o=o.find("."+r)),o){var d=t.iW,c=t.iH;if(t.isRendered=!0,"none"!==l||a){r="fill"!==l?this._d4:0,n=this._b4-2*r;var u,h,f=this._c4-2*r,_={};"fit-if-smaller"===l&&(d>n||c>f)&&(l="fit"),"fill"!==l&&"fit"!==l||(u=n/d,h=f/c,u="fill"==l?u>h?u:h:"fit"==l?u<h?u:h:1,d=Math.ceil(d*u,10),c=Math.ceil(c*u,10)),"none"!==l&&(_.width=d,_.height=c,s&&o.find(".rsImg").css({width:"100%",height:"100%"})),a&&(_.marginLeft=Math.floor((n-d)/2)+r,_.marginTop=Math.floor((f-c)/2)+r),o.css(_)}}}}},e.rsProto=t.prototype,e.fn.royalSlider=function(i){var s=arguments;return this.each(function(){var n=e(this);if("object"!=typeof i&&i){if((n=n.data("royalSlider"))&&n[i])return n[i].apply(n,Array.prototype.slice.call(s,1))}else n.data("royalSlider")||n.data("royalSlider",new t(n,i))})},e.fn.royalSlider.defaults={slidesSpacing:8,startSlideId:0,loop:!1,loopRewind:!1,numImagesToPreload:4,fadeinLoadedSlide:!0,slidesOrientation:"horizontal",transitionType:"move",transitionSpeed:600,controlNavigation:"bullets",controlsInside:!0,arrowsNav:!0,arrowsNavAutoHide:!0,navigateByClick:!0,randomizeSlides:!1,sliderDrag:!0,sliderTouch:!0,keyboardNavEnabled:!1,fadeInAfterLoaded:!0,allowCSS3:!0,allowCSS3OnWebkit:!0,addActiveClass:!1,autoHeight:!1,easeOut:"easeOutSine",easeInOut:"easeInOutSine",minSlideOffset:10,imageScaleMode:"fit-if-smaller",imageAlignCenter:!0,imageScalePadding:4,usePreloader:!0,autoScaleSlider:!1,autoScaleSliderWidth:800,autoScaleSliderHeight:400,autoScaleHeight:!0,arrowsNavHideOnTouch:!1,globalCaption:!1,slidesDiff:2},e.rsCSS3Easing={easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"},e.extend(jQuery.easing,{easeInOutSine:function(e,t,i,s,n){return-s/2*(Math.cos(Math.PI*t/n)-1)+i},easeOutSine:function(e,t,i,s,n){return s*Math.sin(t/n*(Math.PI/2))+i},easeOutCubic:function(e,t,i,s,n){return s*((t=t/n-1)*t*t+1)+i}})}(jQuery,window),function(e){e.extend(e.rsProto,{_i5:function(){var t=this;"bullets"===t.st.controlNavigation&&(t.ev.one("rsAfterPropsSetup",function(){t._j5=!0,t.slider.addClass("rsWithBullets");for(var i='<div class="rsNav rsBullets">',s=0;s<t.numSlides;s++)i+='<div class="rsNavItem rsBullet"><span></span></div>';t._k5=i=e(i+"</div>"),t._l5=i.appendTo(t.slider).children(),t._k5.on("click.rs",".rsNavItem",function(i){t._m5||t.goTo(e(this).index())})}),t.ev.on("rsOnAppendSlide",function(e,i,s){s>=t.numSlides?t._k5.append('<div class="rsNavItem rsBullet"><span></span></div>'):t._l5.eq(s).before('<div class="rsNavItem rsBullet"><span></span></div>'),t._l5=t._k5.children()}),t.ev.on("rsOnRemoveSlide",function(e,i){var s=t._l5.eq(i);s&&s.length&&(s.remove(),t._l5=t._k5.children())}),t.ev.on("rsOnUpdateNav",function(){var e=t.currSlideId;t._n5&&t._n5.removeClass("rsNavSelected"),e=t._l5.eq(e),e.addClass("rsNavSelected"),t._n5=e}))}}),e.rsModules.bullets=e.rsProto._i5}(jQuery),function(e){e.extend(e.rsProto,{_x4:function(){var t,i=this;i._y4={enabled:!1,stopAtAction:!0,pauseOnHover:!0,delay:2e3},!i.st.autoPlay&&i.st.autoplay&&(i.st.autoPlay=i.st.autoplay),i.st.autoPlay=e.extend({},i._y4,i.st.autoPlay),i.st.autoPlay.enabled&&(i.ev.on("rsBeforeParseNode",function(i,s,n){s=e(s),(t=s.attr("data-rsDelay"))&&(n.customDelay=parseInt(t,10))}),i.ev.one("rsAfterInit",function(){i._z4()}),i.ev.on("rsBeforeDestroy",function(){i.stopAutoPlay(),i.slider.off("mouseenter mouseleave"),e(window).off("blur"+i.ns+" focus"+i.ns)}))},_z4:function(){var t=this;t.startAutoPlay(),t.ev.on("rsAfterContentSet",function(e,i){t._l2||t._r2||!t._a5||i!==t.currSlide||t._b5()}),t.ev.on("rsDragRelease",function(){t._a5&&t._c5&&(t._c5=!1,t._b5())}),t.ev.on("rsAfterSlideChange",function(){t._a5&&t._c5&&(t._c5=!1,t.currSlide.isLoaded&&t._b5())}),t.ev.on("rsDragStart",function(){t._a5&&(t.st.autoPlay.stopAtAction?t.stopAutoPlay():(t._c5=!0,t._d5()))}),t.ev.on("rsBeforeMove",function(e,i,s){t._a5&&(s&&t.st.autoPlay.stopAtAction?t.stopAutoPlay():(t._c5=!0,t._d5()))}),t._e5=!1,t.ev.on("rsVideoStop",function(){t._a5&&(t._e5=!1,t._b5())}),t.ev.on("rsVideoPlay",function(){t._a5&&(t._c5=!1,t._d5(),t._e5=!0)}),e(window).on("blur"+t.ns,function(){t._a5&&(t._c5=!0,t._d5())}).on("focus"+t.ns,function(){t._a5&&t._c5&&(t._c5=!1,t._b5())}),t.st.autoPlay.pauseOnHover&&(t._f5=!1,t.slider.hover(function(){t._a5&&(t._c5=!1,t._d5(),t._f5=!0)},function(){t._a5&&(t._f5=!1,t._b5())}))},toggleAutoPlay:function(){this._a5?this.stopAutoPlay():this.startAutoPlay()},startAutoPlay:function(){this._a5=!0,this.currSlide.isLoaded&&this._b5()},stopAutoPlay:function(){this._e5=this._f5=this._c5=this._a5=!1,this._d5()},_b5:function(){var e=this;e._f5||e._e5||(e._g5=!0,e._h5&&clearTimeout(e._h5),e._h5=setTimeout(function(){var t;e._z||e.st.loopRewind||(t=!0,e.st.loopRewind=!0),e.next(!0),t&&(e.st.loopRewind=!1)},e.currSlide.customDelay?e.currSlide.customDelay:e.st.autoPlay.delay))},_d5:function(){this._f5||this._e5||(this._g5=!1,this._h5&&(clearTimeout(this._h5),this._h5=null))}}),e.rsModules.autoplay=e.rsProto._x4}(jQuery),function(e){e.rsProto._o4=function(){var e,t=this;t.st.addActiveClass&&t.ev.on("rsOnUpdateNav",function(){e&&clearTimeout(e),e=setTimeout(function(){t._g4&&t._g4.removeClass("rsActiveSlide"),t._r1&&t._r1.addClass("rsActiveSlide"),e=null},50)})},e.rsModules.activeClass=e.rsProto._o4}(jQuery),function(e){"undefined"!=typeof define&&define.amd?define([],e):"undefined"!=typeof module&&module.exports?module.exports=e():e()}(function(){function e(){if(d.viewportTop=l(),d.viewportBottom=d.viewportTop+d.viewportHeight,d.documentHeight=y(),d.documentHeight!==S){for(x=c.length;x--;)c[x].recalculateLocation();S=d.documentHeight}}function t(){d.viewportHeight=b(),e(),s()}function i(){clearTimeout(I),I=setTimeout(t,100)}function s(){for(k=c.length;k--;)c[k].update();for(k=c.length;k--;)c[k].triggerCallbacks()}function n(e,t){function i(e){if(0!==e.length)for(b=e.length;b--;)y=e[b],y.callback.call(s,T),y.isOne&&e.splice(b,1)}var s=this;this.watchItem=e,this.offsets=t?t===+t?{top:t,bottom:t}:{top:t.top||w.top,bottom:t.bottom||w.bottom}:w,this.callbacks={};for(var n=0,o=g.length;n<o;n++)s.callbacks[g[n]]=[];this.locked=!1;var r,a,l,c,b,y;this.triggerCallbacks=function(){switch(this.isInViewport&&!r&&i(this.callbacks[h]),this.isFullyInViewport&&!a&&i(this.callbacks[f]),this.isAboveViewport!==l&&this.isBelowViewport!==c&&(i(this.callbacks[u]),a||this.isFullyInViewport||(i(this.callbacks[f]),i(this.callbacks[p])),r||this.isInViewport||(i(this.callbacks[h]),i(this.callbacks[_]))),!this.isFullyInViewport&&a&&i(this.callbacks[p]),!this.isInViewport&&r&&i(this.callbacks[_]),this.isInViewport!==r&&i(this.callbacks[u]),!0){case r!==this.isInViewport:case a!==this.isFullyInViewport:case l!==this.isAboveViewport:case c!==this.isBelowViewport:i(this.callbacks[v])}r=this.isInViewport,a=this.isFullyInViewport,l=this.isAboveViewport,c=this.isBelowViewport},this.recalculateLocation=function(){if(!this.locked){var e=this.top,t=this.bottom;if(this.watchItem.nodeName){var s=this.watchItem.style.display;"none"===s&&(this.watchItem.style.display="");var n=this.watchItem.getBoundingClientRect();this.top=n.top+d.viewportTop,this.bottom=n.bottom+d.viewportTop,"none"===s&&(this.watchItem.style.display=s)}else this.watchItem===+this.watchItem?this.watchItem>0?this.top=this.bottom=this.watchItem:this.top=this.bottom=d.documentHeight-this.watchItem:(this.top=this.watchItem.top,this.bottom=this.watchItem.bottom);this.top-=this.offsets.top,this.bottom+=this.offsets.bottom,this.height=this.bottom-this.top,void 0===e&&void 0===t||this.top===e&&this.bottom===t||i(this.callbacks[m])}},this.recalculateLocation(),this.update(),r=this.isInViewport,a=this.isFullyInViewport,l=this.isAboveViewport,c=this.isBelowViewport}function o(t){T=t,e(),s()}var r="undefined"==typeof window,a=!r,l=function(){return r?0:window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop},d={},c=[],u="visibilityChange",h="enterViewport",f="fullyEnterViewport",_="exitViewport",p="partiallyExitViewport",m="locationChange",v="stateChange",g=[u,h,f,_,p,m,v],w={top:0,bottom:0},b=function(){return r?0:window.innerHeight||document.documentElement.clientHeight},y=function(){return r?0:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.documentElement.clientHeight)};d.viewportTop=null,d.viewportBottom=null,d.documentHeight=null,d.viewportHeight=b();var S,T,x,I,k;n.prototype={on:function(e,t,i){switch(!0){case e===u&&!this.isInViewport&&this.isAboveViewport:case e===h&&this.isInViewport:case e===f&&this.isFullyInViewport:case e===_&&this.isAboveViewport&&!this.isInViewport:case e===p&&this.isAboveViewport:if(t.call(this,T),i)return}if(!this.callbacks[e])throw new Error("Tried to add a scroll monitor listener of type "+e+". Your options are: "+g.join(", "));this.callbacks[e].push({callback:t,isOne:i||!1})},off:function(e,t){if(!this.callbacks[e])throw new Error("Tried to remove a scroll monitor listener of type "+e+". Your options are: "+g.join(", "));for(var i,s=0;i=this.callbacks[e][s];s++)if(i.callback===t){this.callbacks[e].splice(s,1);break}},one:function(e,t){this.on(e,t,!0)},recalculateSize:function(){this.height=this.watchItem.offsetHeight+this.offsets.top+this.offsets.bottom,this.bottom=this.top+this.height},update:function(){this.isAboveViewport=this.top<d.viewportTop,this.isBelowViewport=this.bottom>d.viewportBottom,this.isInViewport=this.top<=d.viewportBottom&&this.bottom>=d.viewportTop,this.isFullyInViewport=this.top>=d.viewportTop&&this.bottom<=d.viewportBottom||this.isAboveViewport&&this.isBelowViewport},destroy:function(){var e=c.indexOf(this),t=this;c.splice(e,1);for(var i=0,s=g.length;i<s;i++)t.callbacks[g[i]].length=0},lock:function(){this.locked=!0},unlock:function(){this.locked=!1}};for(var C=0,A=g.length;C<A;C++){var P=g[C];n.prototype[P]=function(e){return function(t,i){this.on.call(this,e,t,i)}}(P)}if(a)try{e()}catch(t){try{window.$(e)}catch(e){throw new Error("If you must put scrollMonitor in the <head>, you must use jQuery.")}}return a&&(window.addEventListener?(window.addEventListener("scroll",o),window.addEventListener("resize",i)):(window.attachEvent("onscroll",o),window.attachEvent("onresize",i))),d.beget=d.create=function(e,t){"string"==typeof e?e=document.querySelector(e):e&&e.length>0&&(e=e[0]);var i=new n(e,t);return c.push(i),i.update(),i},d.update=function(){T=null,e(),s()},d.recalculateLocations=function(){d.documentHeight=0,d.update()},d.eventTypes=g,a&&(window.scrollMonitor=d),d});

Raw Paste


Login or Register to edit or fork this paste. It's free.