(()=>{var e,t,n,r,o={333:(e,t,n)=>{var r,o,i;
/*!
 * https://github.com/PrestaShop/jquery.live-polyfill
 *
 * Released under the MIT license
 */o=[n(204)],void 0===(i="function"==typeof(r=function(e){var t=e.fn.init;e.fn.init=function(e){var n=Array.prototype.slice.call(arguments);"string"==typeof e&&"#"===e&&(console.warn("jQuery('#') is not a valid selector"),n[0]=[]);var r=t.apply(this,arguments);return r.selector="string"==typeof e?e:"",r},e.fn.init.prototype=e.fn,void 0!==e.fn.live&&e.isFunction(e.fn.live)||e.fn.extend({live:function(t,n,r){return this.selector&&e(document).on(t,this.selector,n,r),console.warn("jQuery.live() has been removed since jquery v1.9, please use jQuery.on() instead."),this}})})?r.apply(t,o):r)||(e.exports=i)},290:(e,t,n)=>{var r,o;
/*!
 * jQuery Migrate - v3.1.0 - 2019-06-08
 * Copyright OpenJS Foundation and other contributors
 */r=[n(204)],void 0===(o=function(e){return function(e,t){"use strict";function n(e,t){for(var n=/^(\d+)\.(\d+)\.(\d+)/,r=n.exec(e)||[],o=n.exec(t)||[],i=1;i<=3;i++){if(+r[i]>+o[i])return 1;if(+r[i]<+o[i])return-1}return 0}function r(t){return n(e.fn.jquery,t)>=0}e.migrateVersion="3.1.0",t.console&&t.console.log&&(e&&r("3.0.0")||t.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),e.migrateWarnings&&t.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),t.console.log("JQMIGRATE: Migrate is installed"+(e.migrateMute?"":" with logging active")+", version "+e.migrateVersion));var o={};function i(n){var r=t.console;o[n]||(o[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(e,t,n,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return i(r),n},set:function(e){i(r),n=e}})}function s(e,t,n,r){e[t]=function(){return i(r),n.apply(this,arguments)}}e.migrateWarnings=[],void 0===e.migrateTrace&&(e.migrateTrace=!0),e.migrateReset=function(){o={},e.migrateWarnings.length=0},"BackCompat"===t.document.compatMode&&i("jQuery is not compatible with Quirks Mode");var c,u=e.fn.init,l=e.isNumeric,d=e.find,p=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;for(c in e.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(i("jQuery( '#' ) is not a valid selector"),t[0]=[]),u.apply(this,t)},e.fn.init.prototype=e.fn,e.find=function(e){var n=Array.prototype.slice.call(arguments);if("string"==typeof e&&p.test(e))try{t.document.querySelector(e)}catch(r){e=e.replace(f,(function(e,t,n,r){return"["+t+n+'"'+r+'"]'}));try{t.document.querySelector(e),i("Attribute selector with '#' must be quoted: "+n[0]),n[0]=e}catch(e){i("Attribute selector with '#' was not fixed: "+n[0])}}return d.apply(this,n)},d)Object.prototype.hasOwnProperty.call(d,c)&&(e.find[c]=d[c]);e.fn.size=function(){return i("jQuery.fn.size() is deprecated and removed; use the .length property"),this.length},e.parseJSON=function(){return i("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},e.isNumeric=function(t){function n(t){var n=t&&t.toString();return!e.isArray(t)&&n-parseFloat(n)+1>=0}var r=l(t),o=n(t);return r!==o&&i("jQuery.isNumeric() should not be called on constructed objects"),o},r("3.3.0")&&s(e,"isWindow",(function(e){return null!=e&&e===e.window}),"jQuery.isWindow() is deprecated"),s(e,"holdReady",e.holdReady,"jQuery.holdReady is deprecated"),s(e,"unique",e.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),a(e.expr,"filters",e.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),a(e.expr,":",e.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),r("3.2.0")&&s(e,"nodeName",e.nodeName,"jQuery.nodeName is deprecated");var h=e.ajax;e.ajax=function(){var e=h.apply(this,arguments);return e.promise&&(s(e,"success",e.done,"jQXHR.success is deprecated and removed"),s(e,"error",e.fail,"jQXHR.error is deprecated and removed"),s(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e};var m=e.fn.removeAttr,v=e.fn.toggleClass,g=/\S+/g;e.fn.removeAttr=function(t){var n=this;return e.each(t.match(g),(function(t,r){e.expr.match.bool.test(r)&&(i("jQuery.fn.removeAttr no longer sets boolean properties: "+r),n.prop(r,!1))})),m.apply(this,arguments)},e.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?v.apply(this,arguments):(i("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each((function(){var n=this.getAttribute&&this.getAttribute("class")||"";n&&e.data(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":e.data(this,"__className__")||"")})))};var y=!1;e.swap&&e.each(["height","width","reliableMarginRight"],(function(t,n){var r=e.cssHooks[n]&&e.cssHooks[n].get;r&&(e.cssHooks[n].get=function(){var e;return y=!0,e=r.apply(this,arguments),y=!1,e})})),e.swap=function(e,t,n,r){var o,a,s={};for(a in y||i("jQuery.swap() is undocumented and deprecated"),t)s[a]=e.style[a],e.style[a]=t[a];for(a in o=n.apply(e,r||[]),t)e.style[a]=s[a];return o};var b=e.data;e.data=function(t,n,r){var o;if(n&&"object"==typeof n&&2===arguments.length){o=e.hasData(t)&&b.call(this,t);var a={};for(var s in n)s!==e.camelCase(s)?(i("jQuery.data() always sets/gets camelCased names: "+s),o[s]=n[s]):a[s]=n[s];return b.call(this,t,a),n}return n&&"string"==typeof n&&n!==e.camelCase(n)&&(o=e.hasData(t)&&b.call(this,t))&&n in o?(i("jQuery.data() always sets/gets camelCased names: "+n),arguments.length>2&&(o[n]=r),o[n]):b.apply(this,arguments)};var x=e.Tween.prototype.run,w=function(e){return e};e.Tween.prototype.run=function(){e.easing[this.easing].length>1&&(i("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),e.easing[this.easing]=w),x.apply(this,arguments)};var k=e.fx.interval||13,C="jQuery.fx.interval is deprecated";t.requestAnimationFrame&&Object.defineProperty(e.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return t.document.hidden||i(C),k},set:function(e){i(C),k=e}});var j=e.fn.load,T=e.event.add,S=e.event.fix;e.event.props=[],e.event.fixHooks={},a(e.event.props,"concat",e.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),e.event.fix=function(t){var n,r=t.type,o=this.fixHooks[r],a=e.event.props;if(a.length)for(i("jQuery.event.props are deprecated and removed: "+a.join());a.length;)e.event.addProp(a.pop());if(o&&!o._migrated_&&(o._migrated_=!0,i("jQuery.event.fixHooks are deprecated and removed: "+r),(a=o.props)&&a.length))for(;a.length;)e.event.addProp(a.pop());return n=S.call(this,t),o&&o.filter?o.filter(n,t):n},e.event.add=function(e,n){return e===t&&"load"===n&&"complete"===t.document.readyState&&i("jQuery(window).on('load'...) called after load event occurred"),T.apply(this,arguments)},e.each(["load","unload","error"],(function(t,n){e.fn[n]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===n&&"string"==typeof e[0]?j.apply(this,e):(i("jQuery.fn."+n+"() is deprecated"),e.splice(0,0,n),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}})),e.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,n){e.fn[n]=function(e,t){return i("jQuery.fn."+n+"() event shorthand is deprecated"),arguments.length>0?this.on(n,null,e,t):this.trigger(n)}})),e((function(){e(t.document).triggerHandler("ready")})),e.event.special.ready={setup:function(){this===t.document&&i("'ready' event is deprecated")}},e.fn.extend({bind:function(e,t,n){return i("jQuery.fn.bind() is deprecated"),this.on(e,null,t,n)},unbind:function(e,t){return i("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,n,r){return i("jQuery.fn.delegate() is deprecated"),this.on(t,e,n,r)},undelegate:function(e,t,n){return i("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return i("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});var A=e.fn.offset;e.fn.offset=function(){var n,r=this[0],o={top:0,left:0};return r&&r.nodeType?(n=(r.ownerDocument||t.document).documentElement,e.contains(n,r)?A.apply(this,arguments):(i("jQuery.fn.offset() requires an element connected to a document"),o)):(i("jQuery.fn.offset() requires a valid DOM element"),o)};var E=e.param;e.param=function(t,n){var r=e.ajaxSettings&&e.ajaxSettings.traditional;return void 0===n&&r&&(i("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),n=r),E.call(this,t,n)};var N=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return i("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),N.apply(this,arguments)};var q=e.Deferred,D=[["resolve","done",e.Callbacks("once memory"),e.Callbacks("once memory"),"resolved"],["reject","fail",e.Callbacks("once memory"),e.Callbacks("once memory"),"rejected"],["notify","progress",e.Callbacks("memory"),e.Callbacks("memory")]];return e.Deferred=function(t){var n=q(),r=n.promise();return n.pipe=r.pipe=function(){var t=arguments;return i("deferred.pipe() is deprecated"),e.Deferred((function(o){e.each(D,(function(i,a){var s=e.isFunction(t[i])&&t[i];n[a[1]]((function(){var t=s&&s.apply(this,arguments);t&&e.isFunction(t.promise)?t.promise().done(o.resolve).fail(o.reject).progress(o.notify):o[a[0]+"With"](this===r?o.promise():this,s?[t]:arguments)}))})),t=null})).promise()},t&&t.call(n,n),n},e.Deferred.exceptionHook=q.exceptionHook,e}(e,window)}.apply(t,r))||(e.exports=o)},768:(e,t,n)=>{var r,o;
/*!
 * jQuery Browser Plugin 0.1.0
 * https://github.com/gabceb/jquery-browser-plugin
 *
 * Original jquery-browser code Copyright 2005, 2015 jQuery Foundation, Inc. and other contributors
 * http://jquery.org/license
 *
 * Modifications Copyright 2015 Gabriel Cebrian
 * https://github.com/gabceb
 *
 * Released under the MIT license
 *
 * Date: 05-07-2015
 */r=[n(204)],void 0===(o=function(e){return function(e){"use strict";function t(e){void 0===e&&(e=window.navigator.userAgent),e=e.toLowerCase();var t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(silk)/.exec(e)||/(android)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||/(playbook)/.exec(e)||/(bb)/.exec(e)||/(blackberry)/.exec(e)||[],r={},o={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",versionNumber:t[4]||t[2]||"0",platform:n[0]||""};if(o.browser&&(r[o.browser]=!0,r.version=o.version,r.versionNumber=parseInt(o.versionNumber,10)),o.platform&&(r[o.platform]=!0),(r.android||r.bb||r.blackberry||r.ipad||r.iphone||r.ipod||r.kindle||r.playbook||r.silk||r["windows phone"])&&(r.mobile=!0),(r.cros||r.mac||r.linux||r.win)&&(r.desktop=!0),(r.chrome||r.opr||r.safari)&&(r.webkit=!0),r.rv||r.iemobile){var i="msie";o.browser=i,r[i]=!0}if(r.edge){delete r.edge;var a="msedge";o.browser=a,r[a]=!0}if(r.safari&&r.blackberry){var s="blackberry";o.browser=s,r[s]=!0}if(r.safari&&r.playbook){var c="playbook";o.browser=c,r[c]=!0}if(r.bb){var u="blackberry";o.browser=u,r[u]=!0}if(r.opr){var l="opera";o.browser=l,r[l]=!0}if(r.safari&&r.android){var d="android";o.browser=d,r[d]=!0}if(r.safari&&r.kindle){var p="kindle";o.browser=p,r[p]=!0}if(r.safari&&r.silk){var f="silk";o.browser=f,r[f]=!0}return r.name=o.browser,r.platform=o.platform,r}return window.jQBrowser=t(window.navigator.userAgent),window.jQBrowser.uaMatch=t,e&&(e.browser=window.jQBrowser),window.jQBrowser}(e)}.apply(t,r))||(e.exports=o)},204:function(e,t){var n;
/*!
 * jQuery JavaScript Library v3.5.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2020-05-04T22:49Z
 */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,o){"use strict";var i=[],a=Object.getPrototypeOf,s=i.slice,c=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},u=i.push,l=i.indexOf,d={},p=d.toString,f=d.hasOwnProperty,h=f.toString,m=h.call(Object),v={},g=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},y=function(e){return null!=e&&e===e.window},b=r.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,o,i=(n=n||b).createElement("script");if(i.text=e,t)for(r in x)(o=t[r]||t.getAttribute&&t.getAttribute(r))&&i.setAttribute(r,o);n.head.appendChild(i).parentNode.removeChild(i)}function k(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[p.call(e)]||"object":typeof e}var C="3.5.1",j=function(e,t){return new j.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,n=k(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}j.fn=j.prototype={jquery:C,constructor:j,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=j.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return j.each(this,e)},map:function(e){return this.pushStack(j.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(j.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(j.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:i.sort,splice:i.splice},j.extend=j.fn.extend=function(){var e,t,n,r,o,i,a=arguments[0]||{},s=1,c=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===c&&(a=this,s--);s<c;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(u&&r&&(j.isPlainObject(r)||(o=Array.isArray(r)))?(n=a[t],i=o&&!Array.isArray(n)?[]:o||j.isPlainObject(n)?n:{},o=!1,a[t]=j.extend(u,i,r)):void 0!==r&&(a[t]=r));return a},j.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==p.call(e))&&(!(t=a(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&h.call(n)===m)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(T(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(T(Object(e))?j.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:l.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r=[],o=0,i=e.length,a=!n;o<i;o++)!t(e[o],o)!==a&&r.push(e[o]);return r},map:function(e,t,n){var r,o,i=0,a=[];if(T(e))for(r=e.length;i<r;i++)null!=(o=t(e[i],i,n))&&a.push(o);else for(i in e)null!=(o=t(e[i],i,n))&&a.push(o);return c(a)},guid:1,support:v}),"function"==typeof Symbol&&(j.fn[Symbol.iterator]=i[Symbol.iterator]),j.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var S=function(e){var t,n,r,o,i,a,s,c,u,l,d,p,f,h,m,v,g,y,b,x="sizzle"+1*new Date,w=e.document,k=0,C=0,j=ce(),T=ce(),S=ce(),A=ce(),E=function(e,t){return e===t&&(d=!0),0},N={}.hasOwnProperty,q=[],D=q.pop,O=q.push,P=q.push,_=q.slice,L=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},$="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",R="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",I="\\[[\\x20\\t\\r\\n\\f]*("+R+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+H+"*\\]",M=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",W=new RegExp(H+"+","g"),F=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),B=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),Q=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),z=new RegExp(H+"|>"),U=new RegExp(M),X=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+$+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,oe=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},ie=function(){p()},ae=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(q=_.call(w.childNodes),w.childNodes),q[w.childNodes.length].nodeType}catch(e){P={apply:q.length?function(e,t){O.apply(e,_.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,o){var i,s,u,l,d,h,g,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!o&&(p(t),t=t||f,m)){if(11!==w&&(d=Z.exec(e)))if(i=d[1]){if(9===w){if(!(u=t.getElementById(i)))return r;if(u.id===i)return r.push(u),r}else if(y&&(u=y.getElementById(i))&&b(t,u)&&u.id===i)return r.push(u),r}else{if(d[2])return P.apply(r,t.getElementsByTagName(e)),r;if((i=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(r,t.getElementsByClassName(i)),r}if(n.qsa&&!A[e+" "]&&(!v||!v.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===w&&(z.test(e)||Q.test(e))){for((y=ee.test(e)&&ge(t.parentNode)||t)===t&&n.scope||((l=t.getAttribute("id"))?l=l.replace(re,oe):t.setAttribute("id",l=x)),s=(h=a(e)).length;s--;)h[s]=(l?"#"+l:":scope")+" "+be(h[s]);g=h.join(",")}try{return P.apply(r,y.querySelectorAll(g)),r}catch(t){A(e,!0)}finally{l===x&&t.removeAttribute("id")}}}return c(e.replace(F,"$1"),t,r,o)}function ce(){var e=[];return function t(n,o){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=o}}function ue(e){return e[x]=!0,e}function le(e){var t=f.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),o=n.length;o--;)r.attrHandle[n[o]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function me(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ve(e){return ue((function(t){return t=+t,ue((function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))}))}))}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},p=se.setDocument=function(e){var t,o,a=e?e.ownerDocument||e:w;return a!=f&&9===a.nodeType&&a.documentElement?(h=(f=a).documentElement,m=!i(f),w!=f&&(o=f.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",ie,!1):o.attachEvent&&o.attachEvent("onunload",ie)),n.scope=le((function(e){return h.appendChild(e).appendChild(f.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=le((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=le((function(e){return e.appendChild(f.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(f.getElementsByClassName),n.getById=le((function(e){return h.appendChild(e).id=x,!f.getElementsByName||!f.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&m){var n,r,o,i=t.getElementById(e);if(i){if((n=i.getAttributeNode("id"))&&n.value===e)return[i];for(o=t.getElementsByName(e),r=0;i=o[r++];)if((n=i.getAttributeNode("id"))&&n.value===e)return[i]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&m)return t.getElementsByClassName(e)},g=[],v=[],(n.qsa=K.test(f.querySelectorAll))&&(le((function(e){var t;h.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+$+")"),e.querySelectorAll("[id~="+x+"-]").length||v.push("~="),(t=f.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")})),le((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=f.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")}))),(n.matchesSelector=K.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&le((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",M)})),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),t=K.test(h.compareDocumentPosition),b=t||K.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==f||e.ownerDocument==w&&b(w,e)?-1:t==f||t.ownerDocument==w&&b(w,t)?1:l?L(l,e)-L(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],s=[t];if(!o||!i)return e==f?-1:t==f?1:o?-1:i?1:l?L(l,e)-L(l,t):0;if(o===i)return pe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?pe(a[r],s[r]):a[r]==w?-1:s[r]==w?1:0},f):f},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(p(e),n.matchesSelector&&m&&!A[t+" "]&&(!g||!g.test(t))&&(!v||!v.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){A(t,!0)}return se(t,f,null,[e]).length>0},se.contains=function(e,t){return(e.ownerDocument||e)!=f&&p(e),b(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=f&&p(e);var o=r.attrHandle[t.toLowerCase()],i=o&&N.call(r.attrHandle,t.toLowerCase())?o(e,t,!m):void 0;return void 0!==i?i:n.attributes||!m?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},se.escape=function(e){return(e+"").replace(re,oe)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,r=[],o=0,i=0;if(d=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(E),d){for(;t=e[i++];)t===e[i]&&(o=r.push(i));for(;o--;)e.splice(r[o],1)}return l=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(r=se.selectors={cacheLength:50,createPseudo:ue,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=j[e+" "];return t||(t=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+e+"("+H+"|$)"))&&j(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var o=se.attr(r,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(W," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var u,l,d,p,f,h,m=i!==a?"nextSibling":"previousSibling",v=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!c&&!s,b=!1;if(v){if(i){for(;m;){for(p=t;p=p[m];)if(s?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&y){for(b=(f=(u=(l=(d=(p=v)[x]||(p[x]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===k&&u[1])&&u[2],p=f&&v.childNodes[f];p=++f&&p&&p[m]||(b=f=0)||h.pop();)if(1===p.nodeType&&++b&&p===t){l[e]=[k,f,b];break}}else if(y&&(b=f=(u=(l=(d=(p=t)[x]||(p[x]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]||[])[0]===k&&u[1]),!1===b)for(;(p=++f&&p&&p[m]||(b=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++b||(y&&((l=(d=p[x]||(p[x]={}))[p.uniqueID]||(d[p.uniqueID]={}))[e]=[k,b]),p!==t)););return(b-=o)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,o=r.pseudos[e]||r.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return o[x]?o(t):o.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue((function(e,n){for(var r,i=o(e,t),a=i.length;a--;)e[r=L(e,i[a])]=!(n[r]=i[a])})):function(e){return o(e,0,n)}):o}},pseudos:{not:ue((function(e){var t=[],n=[],r=s(e.replace(F,"$1"));return r[x]?ue((function(e,t,n,o){for(var i,a=r(e,null,o,[]),s=e.length;s--;)(i=a[s])&&(e[s]=!(t[s]=i))})):function(e,o,i){return t[0]=e,r(t,null,i,n),t[0]=null,!n.pop()}})),has:ue((function(e){return function(t){return se(e,t).length>0}})),contains:ue((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||o(t)).indexOf(e)>-1}})),lang:ue((function(e){return X.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=m?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve((function(){return[0]})),last:ve((function(e,t){return[t-1]})),eq:ve((function(e,t,n){return[n<0?n+t:n]})),even:ve((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ve((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ve((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ve((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=he(t);function ye(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,o=t.next,i=o||r,a=n&&"parentNode"===i,s=C++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,o);return!1}:function(t,n,c){var u,l,d,p=[k,s];if(c){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,c))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(l=(d=t[x]||(t[x]={}))[t.uniqueID]||(d[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[r]||t;else{if((u=l[i])&&u[0]===k&&u[1]===s)return p[2]=u[2];if(l[i]=p,p[2]=e(t,n,c))return!0}return!1}}function we(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function ke(e,t,n,r,o){for(var i,a=[],s=0,c=e.length,u=null!=t;s<c;s++)(i=e[s])&&(n&&!n(i,r,o)||(a.push(i),u&&t.push(s)));return a}function Ce(e,t,n,r,o,i){return r&&!r[x]&&(r=Ce(r)),o&&!o[x]&&(o=Ce(o,i)),ue((function(i,a,s,c){var u,l,d,p=[],f=[],h=a.length,m=i||function(e,t,n){for(var r=0,o=t.length;r<o;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?m:ke(m,p,e,s,c),g=n?o||(i?e:h||r)?[]:a:v;if(n&&n(v,g,s,c),r)for(u=ke(g,f),r(u,[],s,c),l=u.length;l--;)(d=u[l])&&(g[f[l]]=!(v[f[l]]=d));if(i){if(o||e){if(o){for(u=[],l=g.length;l--;)(d=g[l])&&u.push(v[l]=d);o(null,g=[],u,c)}for(l=g.length;l--;)(d=g[l])&&(u=o?L(i,d):p[l])>-1&&(i[u]=!(a[u]=d))}}else g=ke(g===a?g.splice(h,g.length):g),o?o(null,a,g,c):P.apply(a,g)}))}function je(e){for(var t,n,o,i=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],c=a?1:0,l=xe((function(e){return e===t}),s,!0),d=xe((function(e){return L(t,e)>-1}),s,!0),p=[function(e,n,r){var o=!a&&(r||n!==u)||((t=n).nodeType?l(e,n,r):d(e,n,r));return t=null,o}];c<i;c++)if(n=r.relative[e[c].type])p=[xe(we(p),n)];else{if((n=r.filter[e[c].type].apply(null,e[c].matches))[x]){for(o=++c;o<i&&!r.relative[e[o].type];o++);return Ce(c>1&&we(p),c>1&&be(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(F,"$1"),n,c<o&&je(e.slice(c,o)),o<i&&je(e=e.slice(o)),o<i&&be(e))}p.push(n)}return we(p)}return ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=se.tokenize=function(e,t){var n,o,i,a,s,c,u,l=T[e+" "];if(l)return t?0:l.slice(0);for(s=e,c=[],u=r.preFilter;s;){for(a in n&&!(o=B.exec(s))||(o&&(s=s.slice(o[0].length)||s),c.push(i=[])),n=!1,(o=Q.exec(s))&&(n=o.shift(),i.push({value:n,type:o[0].replace(F," ")}),s=s.slice(n.length)),r.filter)!(o=V[a].exec(s))||u[a]&&!(o=u[a](o))||(n=o.shift(),i.push({value:n,type:a,matches:o}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):T(e,c).slice(0)},s=se.compile=function(e,t){var n,o=[],i=[],s=S[e+" "];if(!s){for(t||(t=a(e)),n=t.length;n--;)(s=je(t[n]))[x]?o.push(s):i.push(s);(s=S(e,function(e,t){var n=t.length>0,o=e.length>0,i=function(i,a,s,c,l){var d,h,v,g=0,y="0",b=i&&[],x=[],w=u,C=i||o&&r.find.TAG("*",l),j=k+=null==w?1:Math.random()||.1,T=C.length;for(l&&(u=a==f||a||l);y!==T&&null!=(d=C[y]);y++){if(o&&d){for(h=0,a||d.ownerDocument==f||(p(d),s=!m);v=e[h++];)if(v(d,a||f,s)){c.push(d);break}l&&(k=j)}n&&((d=!v&&d)&&g--,i&&b.push(d))}if(g+=y,n&&y!==g){for(h=0;v=t[h++];)v(b,x,a,s);if(i){if(g>0)for(;y--;)b[y]||x[y]||(x[y]=D.call(c));x=ke(x)}P.apply(c,x),l&&!i&&x.length>0&&g+t.length>1&&se.uniqueSort(c)}return l&&(k=j,u=w),b};return n?ue(i):i}(i,o))).selector=e}return s},c=se.select=function(e,t,n,o){var i,c,u,l,d,p="function"==typeof e&&e,f=!o&&a(e=p.selector||e);if(n=n||[],1===f.length){if((c=f[0]=f[0].slice(0)).length>2&&"ID"===(u=c[0]).type&&9===t.nodeType&&m&&r.relative[c[1].type]){if(!(t=(r.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(c.shift().value.length)}for(i=V.needsContext.test(e)?0:c.length;i--&&(u=c[i],!r.relative[l=u.type]);)if((d=r.find[l])&&(o=d(u.matches[0].replace(te,ne),ee.test(c[0].type)&&ge(t.parentNode)||t))){if(c.splice(i,1),!(e=o.length&&be(c)))return P.apply(n,o),n;break}}return(p||s(e,f))(o,t,!m,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=x.split("").sort(E).join("")===x,n.detectDuplicates=!!d,p(),n.sortDetached=le((function(e){return 1&e.compareDocumentPosition(f.createElement("fieldset"))})),le((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||de("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&le((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||de("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),le((function(e){return null==e.getAttribute("disabled")}))||de($,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),se}(r);j.find=S,j.expr=S.selectors,j.expr[":"]=j.expr.pseudos,j.uniqueSort=j.unique=S.uniqueSort,j.text=S.getText,j.isXMLDoc=S.isXML,j.contains=S.contains,j.escapeSelector=S.escape;var A=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&j(e).is(n))break;r.push(e)}return r},E=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=j.expr.match.needsContext;function q(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(e,t,n){return g(t)?j.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?j.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?j.grep(e,(function(e){return l.call(t,e)>-1!==n})):j.filter(t,e,n)}j.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?j.find.matchesSelector(r,e)?[r]:[]:j.find.matches(e,j.grep(t,(function(e){return 1===e.nodeType})))},j.fn.extend({find:function(e){var t,n,r=this.length,o=this;if("string"!=typeof e)return this.pushStack(j(e).filter((function(){for(t=0;t<r;t++)if(j.contains(o[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)j.find(e,o[t],n);return r>1?j.uniqueSort(n):n},filter:function(e){return this.pushStack(O(this,e||[],!1))},not:function(e){return this.pushStack(O(this,e||[],!0))},is:function(e){return!!O(this,"string"==typeof e&&N.test(e)?j(e):e||[],!1).length}});var P,_=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(j.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||P,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:_.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof j?t[0]:t,j.merge(this,j.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),D.test(r[1])&&j.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(o=b.getElementById(r[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(j):j.makeArray(e,this)}).prototype=j.fn,P=j(b);var L=/^(?:parents|prev(?:Until|All))/,$={children:!0,contents:!0,next:!0,prev:!0};function H(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}j.fn.extend({has:function(e){var t=j(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(j.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,o=this.length,i=[],a="string"!=typeof e&&j(e);if(!N.test(e))for(;r<o;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&j.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?j.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?l.call(j(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(j.uniqueSort(j.merge(this.get(),j(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),j.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return E((e.parentNode||{}).firstChild,e)},children:function(e){return E(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(q(e,"template")&&(e=e.content||e),j.merge([],e.childNodes))}},(function(e,t){j.fn[e]=function(n,r){var o=j.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=j.filter(r,o)),this.length>1&&($[e]||j.uniqueSort(o),L.test(e)&&o.reverse()),this.pushStack(o)}}));var R=/[^\x20\t\r\n\f]+/g;function I(e){return e}function M(e){throw e}function W(e,t,n,r){var o;try{e&&g(o=e.promise)?o.call(e).done(t).fail(n):e&&g(o=e.then)?o.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}j.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return j.each(e.match(R)||[],(function(e,n){t[n]=!0})),t}(e):j.extend({},e);var t,n,r,o,i=[],a=[],s=-1,c=function(){for(o=o||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s<i.length;)!1===i[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},u={add:function(){return i&&(n&&!t&&(s=i.length-1,a.push(n)),function t(n){j.each(n,(function(n,r){g(r)?e.unique&&u.has(r)||i.push(r):r&&r.length&&"string"!==k(r)&&t(r)}))}(arguments),n&&!t&&c()),this},remove:function(){return j.each(arguments,(function(e,t){for(var n;(n=j.inArray(t,i,n))>-1;)i.splice(n,1),n<=s&&s--})),this},has:function(e){return e?j.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||t||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},j.extend({Deferred:function(e){var t=[["notify","progress",j.Callbacks("memory"),j.Callbacks("memory"),2],["resolve","done",j.Callbacks("once memory"),j.Callbacks("once memory"),0,"resolved"],["reject","fail",j.Callbacks("once memory"),j.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return j.Deferred((function(n){j.each(t,(function(t,r){var o=g(e[r[4]])&&e[r[4]];i[r[1]]((function(){var e=o&&o.apply(this,arguments);e&&g(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,o?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,o){var i=0;function a(e,t,n,o){return function(){var s=this,c=arguments,u=function(){var r,u;if(!(e<i)){if((r=n.apply(s,c))===t.promise())throw new TypeError("Thenable self-resolution");u=r&&("object"==typeof r||"function"==typeof r)&&r.then,g(u)?o?u.call(r,a(i,t,I,o),a(i,t,M,o)):(i++,u.call(r,a(i,t,I,o),a(i,t,M,o),a(i,t,I,t.notifyWith))):(n!==I&&(s=void 0,c=[r]),(o||t.resolveWith)(s,c))}},l=o?u:function(){try{u()}catch(r){j.Deferred.exceptionHook&&j.Deferred.exceptionHook(r,l.stackTrace),e+1>=i&&(n!==M&&(s=void 0,c=[r]),t.rejectWith(s,c))}};e?l():(j.Deferred.getStackHook&&(l.stackTrace=j.Deferred.getStackHook()),r.setTimeout(l))}}return j.Deferred((function(r){t[0][3].add(a(0,r,g(o)?o:I,r.notifyWith)),t[1][3].add(a(0,r,g(e)?e:I)),t[2][3].add(a(0,r,g(n)?n:M))})).promise()},promise:function(e){return null!=e?j.extend(e,o):o}},i={};return j.each(t,(function(e,r){var a=r[2],s=r[5];o[r[1]]=a.add,s&&a.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(r[3].fire),i[r[0]]=function(){return i[r[0]+"With"](this===i?void 0:this,arguments),this},i[r[0]+"With"]=a.fireWith})),o.promise(i),e&&e.call(i,i),i},when:function(e){var t=arguments.length,n=t,r=Array(n),o=s.call(arguments),i=j.Deferred(),a=function(e){return function(n){r[e]=this,o[e]=arguments.length>1?s.call(arguments):n,--t||i.resolveWith(r,o)}};if(t<=1&&(W(e,i.done(a(n)).resolve,i.reject,!t),"pending"===i.state()||g(o[n]&&o[n].then)))return i.then();for(;n--;)W(o[n],a(n),i.reject);return i.promise()}});var F=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;j.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&F.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},j.readyException=function(e){r.setTimeout((function(){throw e}))};var B=j.Deferred();function Q(){b.removeEventListener("DOMContentLoaded",Q),r.removeEventListener("load",Q),j.ready()}j.fn.ready=function(e){return B.then(e).catch((function(e){j.readyException(e)})),this},j.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--j.readyWait:j.isReady)||(j.isReady=!0,!0!==e&&--j.readyWait>0||B.resolveWith(b,[j]))}}),j.ready.then=B.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(j.ready):(b.addEventListener("DOMContentLoaded",Q),r.addEventListener("load",Q));var z=function(e,t,n,r,o,i,a){var s=0,c=e.length,u=null==n;if("object"===k(n))for(s in o=!0,n)z(e,t,s,n[s],!0,i,a);else if(void 0!==r&&(o=!0,g(r)||(a=!0),u&&(a?(t.call(e,r),t=null):(u=t,t=function(e,t,n){return u.call(j(e),n)})),t))for(;s<c;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return o?e:u?t.call(e):c?t(e[0],n):i},U=/^-ms-/,X=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(U,"ms-").replace(X,V)}var J=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=j.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},J(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[G(t)]=n;else for(r in t)o[G(r)]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(R)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||j.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!j.isEmptyObject(t)}};var K=new Y,Z=new Y,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:ee.test(e)?JSON.parse(e):e)}(n)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}j.extend({hasData:function(e){return Z.hasData(e)||K.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return K.access(e,t,n)},_removeData:function(e,t){K.remove(e,t)}}),j.fn.extend({data:function(e,t){var n,r,o,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(o=Z.get(i),1===i.nodeType&&!K.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(i,r,o[r]));K.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each((function(){Z.set(this,e)})):z(this,(function(t){var n;if(i&&void 0===t)return void 0!==(n=Z.get(i,e))||void 0!==(n=ne(i,e))?n:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),j.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,j.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=j.queue(e,t),r=n.length,o=n.shift(),i=j._queueHooks(e,t);"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,(function(){j.dequeue(e,t)}),i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:j.Callbacks("once memory").add((function(){K.remove(e,[t+"queue",n])}))})}}),j.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?j.queue(this[0],e):void 0===t?this:this.each((function(){var n=j.queue(this,e,t);j._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&j.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){j.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=j.Deferred(),i=this,a=this.length,s=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=K.get(i[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),o.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,oe=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],ae=b.documentElement,se=function(e){return j.contains(e.ownerDocument,e)},ce={composed:!0};ae.getRootNode&&(se=function(e){return j.contains(e.ownerDocument,e)||e.getRootNode(ce)===e.ownerDocument});var ue=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&se(e)&&"none"===j.css(e,"display")};function le(e,t,n,r){var o,i,a=20,s=r?function(){return r.cur()}:function(){return j.css(e,t,"")},c=s(),u=n&&n[3]||(j.cssNumber[t]?"":"px"),l=e.nodeType&&(j.cssNumber[t]||"px"!==u&&+c)&&oe.exec(j.css(e,t));if(l&&l[3]!==u){for(c/=2,u=u||l[3],l=+c||1;a--;)j.style(e,t,l+u),(1-i)*(1-(i=s()/c||.5))<=0&&(a=0),l/=i;l*=2,j.style(e,t,l+u),n=n||[]}return n&&(l=+l||+c||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=l,r.end=o)),o}var de={};function pe(e){var t,n=e.ownerDocument,r=e.nodeName,o=de[r];return o||(t=n.body.appendChild(n.createElement(r)),o=j.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),de[r]=o,o)}function fe(e,t){for(var n,r,o=[],i=0,a=e.length;i<a;i++)(r=e[i]).style&&(n=r.style.display,t?("none"===n&&(o[i]=K.get(r,"display")||null,o[i]||(r.style.display="")),""===r.style.display&&ue(r)&&(o[i]=pe(r))):"none"!==n&&(o[i]="none",K.set(r,"display",n)));for(i=0;i<a;i++)null!=o[i]&&(e[i].style.display=o[i]);return e}j.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ue(this)?j(this).show():j(this).hide()}))}});var he,me,ve=/^(?:checkbox|radio)$/i,ge=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ye=/^$|^module$|\/(?:java|ecma)script/i;he=b.createDocumentFragment().appendChild(b.createElement("div")),(me=b.createElement("input")).setAttribute("type","radio"),me.setAttribute("checked","checked"),me.setAttribute("name","t"),he.appendChild(me),v.checkClone=he.cloneNode(!0).cloneNode(!0).lastChild.checked,he.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!he.cloneNode(!0).lastChild.defaultValue,he.innerHTML="<option></option>",v.option=!!he.lastChild;var be={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function xe(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&q(e,t)?j.merge([e],n):n}function we(e,t){for(var n=0,r=e.length;n<r;n++)K.set(e[n],"globalEval",!t||K.get(t[n],"globalEval"))}be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,v.option||(be.optgroup=be.option=[1,"<select multiple='multiple'>","</select>"]);var ke=/<|&#?\w+;/;function Ce(e,t,n,r,o){for(var i,a,s,c,u,l,d=t.createDocumentFragment(),p=[],f=0,h=e.length;f<h;f++)if((i=e[f])||0===i)if("object"===k(i))j.merge(p,i.nodeType?[i]:i);else if(ke.test(i)){for(a=a||d.appendChild(t.createElement("div")),s=(ge.exec(i)||["",""])[1].toLowerCase(),c=be[s]||be._default,a.innerHTML=c[1]+j.htmlPrefilter(i)+c[2],l=c[0];l--;)a=a.lastChild;j.merge(p,a.childNodes),(a=d.firstChild).textContent=""}else p.push(t.createTextNode(i));for(d.textContent="",f=0;i=p[f++];)if(r&&j.inArray(i,r)>-1)o&&o.push(i);else if(u=se(i),a=xe(d.appendChild(i),"script"),u&&we(a),n)for(l=0;i=a[l++];)ye.test(i.type||"")&&n.push(i);return d}var je=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Se=/^([^.]*)(?:\.(.+)|)/;function Ae(){return!0}function Ee(){return!1}function Ne(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function qe(e,t,n,r,o,i){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)qe(e,s,n,r,t[s],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),!1===o)o=Ee;else if(!o)return e;return 1===i&&(a=o,(o=function(e){return j().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=j.guid++)),e.each((function(){j.event.add(this,t,o,r,n)}))}function De(e,t,n){n?(K.set(e,t,!1),j.event.add(e,t,{namespace:!1,handler:function(e){var r,o,i=K.get(this,t);if(1&e.isTrigger&&this[t]){if(i.length)(j.event.special[t]||{}).delegateType&&e.stopPropagation();else if(i=s.call(arguments),K.set(this,t,i),r=n(this,t),this[t](),i!==(o=K.get(this,t))||r?K.set(this,t,!1):o={},i!==o)return e.stopImmediatePropagation(),e.preventDefault(),o.value}else i.length&&(K.set(this,t,{value:j.event.trigger(j.extend(i[0],j.Event.prototype),i.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===K.get(e,t)&&j.event.add(e,t,Ae)}j.event={global:{},add:function(e,t,n,r,o){var i,a,s,c,u,l,d,p,f,h,m,v=K.get(e);if(J(e))for(n.handler&&(n=(i=n).handler,o=i.selector),o&&j.find.matchesSelector(ae,o),n.guid||(n.guid=j.guid++),(c=v.events)||(c=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return void 0!==j&&j.event.triggered!==t.type?j.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(R)||[""]).length;u--;)f=m=(s=Se.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),f&&(d=j.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=j.event.special[f]||{},l=j.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&j.expr.match.needsContext.test(o),namespace:h.join(".")},i),(p=c[f])||((p=c[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(f,a)),d.add&&(d.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,l):p.push(l),j.event.global[f]=!0)},remove:function(e,t,n,r,o){var i,a,s,c,u,l,d,p,f,h,m,v=K.hasData(e)&&K.get(e);if(v&&(c=v.events)){for(u=(t=(t||"").match(R)||[""]).length;u--;)if(f=m=(s=Se.exec(t[u])||[])[1],h=(s[2]||"").split(".").sort(),f){for(d=j.event.special[f]||{},p=c[f=(r?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=p.length;i--;)l=p[i],!o&&m!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(i,1),l.selector&&p.delegateCount--,d.remove&&d.remove.call(e,l));a&&!p.length&&(d.teardown&&!1!==d.teardown.call(e,h,v.handle)||j.removeEvent(e,f,v.handle),delete c[f])}else for(f in c)j.event.remove(e,f+t[u],n,r,!0);j.isEmptyObject(c)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,r,o,i,a,s=new Array(arguments.length),c=j.event.fix(e),u=(K.get(this,"events")||Object.create(null))[c.type]||[],l=j.event.special[c.type]||{};for(s[0]=c,t=1;t<arguments.length;t++)s[t]=arguments[t];if(c.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,c)){for(a=j.event.handlers.call(this,c,u),t=0;(o=a[t++])&&!c.isPropagationStopped();)for(c.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!c.isImmediatePropagationStopped();)c.rnamespace&&!1!==i.namespace&&!c.rnamespace.test(i.namespace)||(c.handleObj=i,c.data=i.data,void 0!==(r=((j.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,s))&&!1===(c.result=r)&&(c.preventDefault(),c.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,c),c.result}},handlers:function(e,t){var n,r,o,i,a,s=[],c=t.delegateCount,u=e.target;if(c&&u.nodeType&&!("click"===e.type&&e.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(i=[],a={},n=0;n<c;n++)void 0===a[o=(r=t[n]).selector+" "]&&(a[o]=r.needsContext?j(o,this).index(u)>-1:j.find(o,this,null,[u]).length),a[o]&&i.push(r);i.length&&s.push({elem:u,handlers:i})}return u=this,c<t.length&&s.push({elem:u,handlers:t.slice(c)}),s},addProp:function(e,t){Object.defineProperty(j.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[j.expando]?e:new j.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ve.test(t.type)&&t.click&&q(t,"input")&&De(t,"click",Ae),!1},trigger:function(e){var t=this||e;return ve.test(t.type)&&t.click&&q(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return ve.test(t.type)&&t.click&&q(t,"input")&&K.get(t,"click")||q(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},j.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},j.Event=function(e,t){if(!(this instanceof j.Event))return new j.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ae:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&j.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[j.expando]=!0},j.Event.prototype={constructor:j.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ae,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ae,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ae,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},j.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&je.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},j.event.addProp),j.each({focus:"focusin",blur:"focusout"},(function(e,t){j.event.special[e]={setup:function(){return De(this,e,Ne),!1},trigger:function(){return De(this,e),!0},delegateType:t}})),j.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){j.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,o=e.relatedTarget,i=e.handleObj;return o&&(o===r||j.contains(r,o))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),j.fn.extend({on:function(e,t,n,r){return qe(this,e,t,n,r)},one:function(e,t,n,r){return qe(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,j(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each((function(){j.event.remove(this,e,n,t)}))}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,_e=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return q(e,"table")&&q(11!==t.nodeType?t:t.firstChild,"tr")&&j(e).children("tbody")[0]||e}function $e(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Re(e,t){var n,r,o,i,a,s;if(1===t.nodeType){if(K.hasData(e)&&(s=K.get(e).events))for(o in K.remove(t,"handle events"),s)for(n=0,r=s[o].length;n<r;n++)j.event.add(t,o,s[o][n]);Z.hasData(e)&&(i=Z.access(e),a=j.extend({},i),Z.set(t,a))}}function Ie(e,t,n,r){t=c(t);var o,i,a,s,u,l,d=0,p=e.length,f=p-1,h=t[0],m=g(h);if(m||p>1&&"string"==typeof h&&!v.checkClone&&Pe.test(h))return e.each((function(o){var i=e.eq(o);m&&(t[0]=h.call(this,o,i.html())),Ie(i,t,n,r)}));if(p&&(i=(o=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=(a=j.map(xe(o,"script"),$e)).length;d<p;d++)u=o,d!==f&&(u=j.clone(u,!0,!0),s&&j.merge(a,xe(u,"script"))),n.call(e[d],u,d);if(s)for(l=a[a.length-1].ownerDocument,j.map(a,He),d=0;d<s;d++)u=a[d],ye.test(u.type||"")&&!K.access(u,"globalEval")&&j.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?j._evalUrl&&!u.noModule&&j._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):w(u.textContent.replace(_e,""),u,l))}return e}function Me(e,t,n){for(var r,o=t?j.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||j.cleanData(xe(r)),r.parentNode&&(n&&se(r)&&we(xe(r,"script")),r.parentNode.removeChild(r));return e}j.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,o,i,a,s,c,u,l=e.cloneNode(!0),d=se(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||j.isXMLDoc(e)))for(a=xe(l),r=0,o=(i=xe(e)).length;r<o;r++)s=i[r],c=a[r],u=void 0,"input"===(u=c.nodeName.toLowerCase())&&ve.test(s.type)?c.checked=s.checked:"input"!==u&&"textarea"!==u||(c.defaultValue=s.defaultValue);if(t)if(n)for(i=i||xe(e),a=a||xe(l),r=0,o=i.length;r<o;r++)Re(i[r],a[r]);else Re(e,l);return(a=xe(l,"script")).length>0&&we(a,!d&&xe(e,"script")),l},cleanData:function(e){for(var t,n,r,o=j.event.special,i=0;void 0!==(n=e[i]);i++)if(J(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)o[r]?j.event.remove(n,r):j.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),j.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return z(this,(function(e){return void 0===e?j.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ie(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)}))},prepend:function(){return Ie(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(j.cleanData(xe(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return j.clone(this,e,t)}))},html:function(e){return z(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!be[(ge.exec(e)||["",""])[1].toLowerCase()]){e=j.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(j.cleanData(xe(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ie(this,arguments,(function(t){var n=this.parentNode;j.inArray(this,e)<0&&(j.cleanData(xe(this)),n&&n.replaceChild(t,this))}),e)}}),j.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){j.fn[e]=function(e){for(var n,r=[],o=j(e),i=o.length-1,a=0;a<=i;a++)n=a===i?this:this.clone(!0),j(o[a])[t](n),u.apply(r,n.get());return this.pushStack(r)}}));var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=r),t.getComputedStyle(e)},Be=function(e,t,n){var r,o,i={};for(o in t)i[o]=e.style[o],e.style[o]=t[o];for(o in r=n.call(e),t)e.style[o]=i[o];return r},Qe=new RegExp(ie.join("|"),"i");function ze(e,t,n){var r,o,i,a,s=e.style;return(n=n||Fe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||se(e)||(a=j.style(e,t)),!v.pixelBoxStyles()&&We.test(a)&&Qe.test(t)&&(r=s.width,o=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=o,s.maxWidth=i)),void 0!==a?a+"":a}function Ue(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ae.appendChild(u).appendChild(l);var e=r.getComputedStyle(l);n="1%"!==e.top,c=12===t(e.marginLeft),l.style.right="60%",a=36===t(e.right),o=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),ae.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,o,i,a,s,c,u=b.createElement("div"),l=b.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,j.extend(v,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),c},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,o;return null==s&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",ae.appendChild(e).appendChild(t).appendChild(n),o=r.getComputedStyle(t),s=parseInt(o.height)>3,ae.removeChild(e)),s}}))}();var Xe=["Webkit","Moz","ms"],Ve=b.createElement("div").style,Ge={};function Je(e){var t=j.cssProps[e]||Ge[e];return t||(e in Ve?e:Ge[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Xe.length;n--;)if((e=Xe[n]+t)in Ve)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Ke=/^--/,Ze={position:"absolute",visibility:"hidden",display:"block"},et={letterSpacing:"0",fontWeight:"400"};function tt(e,t,n){var r=oe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function nt(e,t,n,r,o,i){var a="width"===t?1:0,s=0,c=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=j.css(e,n+ie[a],!0,o)),r?("content"===n&&(c-=j.css(e,"padding"+ie[a],!0,o)),"margin"!==n&&(c-=j.css(e,"border"+ie[a]+"Width",!0,o))):(c+=j.css(e,"padding"+ie[a],!0,o),"padding"!==n?c+=j.css(e,"border"+ie[a]+"Width",!0,o):s+=j.css(e,"border"+ie[a]+"Width",!0,o));return!r&&i>=0&&(c+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-i-c-s-.5))||0),c}function rt(e,t,n){var r=Fe(e),o=(!v.boxSizingReliable()||n)&&"border-box"===j.css(e,"boxSizing",!1,r),i=o,a=ze(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(We.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&o||!v.reliableTrDimensions()&&q(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===j.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===j.css(e,"boxSizing",!1,r),(i=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+nt(e,t,n||(o?"border":"content"),i,r,a)+"px"}function ot(e,t,n,r,o){return new ot.prototype.init(e,t,n,r,o)}j.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ze(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,a,s=G(t),c=Ke.test(t),u=e.style;if(c||(t=Je(s)),a=j.cssHooks[t]||j.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(e,!1,r))?o:u[t];"string"===(i=typeof n)&&(o=oe.exec(n))&&o[1]&&(n=le(e,t,o),i="number"),null!=n&&n==n&&("number"!==i||c||(n+=o&&o[3]||(j.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(c?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,r){var o,i,a,s=G(t);return Ke.test(t)||(t=Je(s)),(a=j.cssHooks[t]||j.cssHooks[s])&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=ze(e,t,r)),"normal"===o&&t in et&&(o=et[t]),""===n||n?(i=parseFloat(o),!0===n||isFinite(i)?i||0:o):o}}),j.each(["height","width"],(function(e,t){j.cssHooks[t]={get:function(e,n,r){if(n)return!Ye.test(j.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,r):Be(e,Ze,(function(){return rt(e,t,r)}))},set:function(e,n,r){var o,i=Fe(e),a=!v.scrollboxSize()&&"absolute"===i.position,s=(a||r)&&"border-box"===j.css(e,"boxSizing",!1,i),c=r?nt(e,t,r,s,i):0;return s&&a&&(c-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-nt(e,t,"border",!1,i)-.5)),c&&(o=oe.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=j.css(e,t)),tt(0,n,c)}}})),j.cssHooks.marginLeft=Ue(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(ze(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),j.each({margin:"",padding:"",border:"Width"},(function(e,t){j.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];r<4;r++)o[e+ie[r]+t]=i[r]||i[r-2]||i[0];return o}},"margin"!==e&&(j.cssHooks[e+t].set=tt)})),j.fn.extend({css:function(e,t){return z(this,(function(e,t,n){var r,o,i={},a=0;if(Array.isArray(t)){for(r=Fe(e),o=t.length;a<o;a++)i[t[a]]=j.css(e,t[a],!1,r);return i}return void 0!==n?j.style(e,t,n):j.css(e,t)}),e,t,arguments.length>1)}}),j.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||j.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(j.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.options.duration?this.pos=t=j.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=j.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){j.fx.step[e.prop]?j.fx.step[e.prop](e):1!==e.elem.nodeType||!j.cssHooks[e.prop]&&null==e.elem.style[Je(e.prop)]?e.elem[e.prop]=e.now:j.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},j.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},j.fx=ot.prototype.init,j.fx.step={};var it,at,st=/^(?:toggle|show|hide)$/,ct=/queueHooks$/;function ut(){at&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ut):r.setTimeout(ut,j.fx.interval),j.fx.tick())}function lt(){return r.setTimeout((function(){it=void 0})),it=Date.now()}function dt(e,t){var n,r=0,o={height:e};for(t=t?1:0;r<4;r+=2-t)o["margin"+(n=ie[r])]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function pt(e,t,n){for(var r,o=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),i=0,a=o.length;i<a;i++)if(r=o[i].call(n,t,e))return r}function ft(e,t,n){var r,o,i=0,a=ft.prefilters.length,s=j.Deferred().always((function(){delete c.elem})),c=function(){if(o)return!1;for(var t=it||lt(),n=Math.max(0,u.startTime+u.duration-t),r=1-(n/u.duration||0),i=0,a=u.tweens.length;i<a;i++)u.tweens[i].run(r);return s.notifyWith(e,[u,r,n]),r<1&&a?n:(a||s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:j.extend({},t),opts:j.extend(!0,{specialEasing:{},easing:j.easing._default},n),originalProperties:t,originalOptions:n,startTime:it||lt(),duration:n.duration,tweens:[],createTween:function(t,n){var r=j.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;n<r;n++)u.tweens[n].run(1);return t?(s.notifyWith(e,[u,1,0]),s.resolveWith(e,[u,t])):s.rejectWith(e,[u,t]),this}}),l=u.props;for(!function(e,t){var n,r,o,i,a;for(n in e)if(o=t[r=G(n)],i=e[n],Array.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),(a=j.cssHooks[r])&&"expand"in a)for(n in i=a.expand(i),delete e[r],i)n in e||(e[n]=i[n],t[n]=o);else t[r]=o}(l,u.opts.specialEasing);i<a;i++)if(r=ft.prefilters[i].call(u,e,l,u.opts))return g(r.stop)&&(j._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return j.map(l,pt,u),g(u.opts.start)&&u.opts.start.call(e,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),j.fx.timer(j.extend(c,{elem:e,anim:u,queue:u.opts.queue})),u}j.Animation=j.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,oe.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(R);for(var n,r=0,o=e.length;r<o;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,o,i,a,s,c,u,l,d="width"in t||"height"in t,p=this,f={},h=e.style,m=e.nodeType&&ue(e),v=K.get(e,"fxshow");for(r in n.queue||(null==(a=j._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always((function(){p.always((function(){a.unqueued--,j.queue(e,"fx").length||a.empty.fire()}))}))),t)if(o=t[r],st.test(o)){if(delete t[r],i=i||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!v||void 0===v[r])continue;m=!0}f[r]=v&&v[r]||j.style(e,r)}if((c=!j.isEmptyObject(t))||!j.isEmptyObject(f))for(r in d&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(u=v&&v.display)&&(u=K.get(e,"display")),"none"===(l=j.css(e,"display"))&&(u?l=u:(fe([e],!0),u=e.style.display||u,l=j.css(e,"display"),fe([e]))),("inline"===l||"inline-block"===l&&null!=u)&&"none"===j.css(e,"float")&&(c||(p.done((function(){h.display=u})),null==u&&(l=h.display,u="none"===l?"":l)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always((function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}))),c=!1,f)c||(v?"hidden"in v&&(m=v.hidden):v=K.access(e,"fxshow",{display:u}),i&&(v.hidden=!m),m&&fe([e],!0),p.done((function(){for(r in m||fe([e]),K.remove(e,"fxshow"),f)j.style(e,r,f[r])}))),c=pt(m?v[r]:0,r,p),r in v||(v[r]=c.start,m&&(c.end=c.start,c.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),j.speed=function(e,t,n){var r=e&&"object"==typeof e?j.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return j.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in j.fx.speeds?r.duration=j.fx.speeds[r.duration]:r.duration=j.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&j.dequeue(this,r.queue)},r},j.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ue).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=j.isEmptyObject(e),i=j.speed(t,n,r),a=function(){var t=ft(this,j.extend({},e),i);(o||K.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===i.queue?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,o=null!=e&&e+"queueHooks",i=j.timers,a=K.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&ct.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||j.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=K.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=j.timers,a=r?r.length:0;for(n.finish=!0,j.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),j.each(["toggle","show","hide"],(function(e,t){var n=j.fn[t];j.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(dt(t,!0),e,r,o)}})),j.each({slideDown:dt("show"),slideUp:dt("hide"),slideToggle:dt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){j.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),j.timers=[],j.fx.tick=function(){var e,t=0,n=j.timers;for(it=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||j.fx.stop(),it=void 0},j.fx.timer=function(e){j.timers.push(e),j.fx.start()},j.fx.interval=13,j.fx.start=function(){at||(at=!0,ut())},j.fx.stop=function(){at=null},j.fx.speeds={slow:600,fast:200,_default:400},j.fn.delay=function(e,t){return e=j.fx&&j.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,n){var o=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(o)}}))},function(){var e=b.createElement("input"),t=b.createElement("select").appendChild(b.createElement("option"));e.type="checkbox",v.checkOn=""!==e.value,v.optSelected=t.selected,(e=b.createElement("input")).value="t",e.type="radio",v.radioValue="t"===e.value}();var ht,mt=j.expr.attrHandle;j.fn.extend({attr:function(e,t){return z(this,j.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each((function(){j.removeAttr(this,e)}))}}),j.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return void 0===e.getAttribute?j.prop(e,t,n):(1===i&&j.isXMLDoc(e)||(o=j.attrHooks[t.toLowerCase()]||(j.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void j.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:null==(r=j.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&q(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,o=t&&t.match(R);if(o&&1===e.nodeType)for(;n=o[r++];)e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?j.removeAttr(e,n):e.setAttribute(n,n),n}},j.each(j.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=mt[t]||j.find.attr;mt[t]=function(e,t,r){var o,i,a=t.toLowerCase();return r||(i=mt[a],mt[a]=o,o=null!=n(e,t,r)?a:null,mt[a]=i),o}}));var vt=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(R)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}j.fn.extend({prop:function(e,t){return z(this,j.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[j.propFix[e]||e]}))}}),j.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&j.isXMLDoc(e)||(t=j.propFix[t]||t,o=j.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=j.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(j.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),j.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){j.propFix[this.toLowerCase()]=this})),j.fn.extend({addClass:function(e){var t,n,r,o,i,a,s,c=0;if(g(e))return this.each((function(t){j(this).addClass(e.call(this,t,bt(this)))}));if((t=xt(e)).length)for(;n=this[c++];)if(o=bt(n),r=1===n.nodeType&&" "+yt(o)+" "){for(a=0;i=t[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");o!==(s=yt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,o,i,a,s,c=0;if(g(e))return this.each((function(t){j(this).removeClass(e.call(this,t,bt(this)))}));if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)for(;n=this[c++];)if(o=bt(n),r=1===n.nodeType&&" "+yt(o)+" "){for(a=0;i=t[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");o!==(s=yt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each((function(n){j(this).toggleClass(e.call(this,n,bt(this),t),t)})):this.each((function(){var t,o,i,a;if(r)for(o=0,i=j(this),a=xt(e);t=a[o++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||((t=bt(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+yt(bt(n))+" ").indexOf(t)>-1)return!0;return!1}});var wt=/\r/g;j.fn.extend({val:function(e){var t,n,r,o=this[0];return arguments.length?(r=g(e),this.each((function(n){var o;1===this.nodeType&&(null==(o=r?e.call(this,n,j(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=j.map(o,(function(e){return null==e?"":e+""}))),(t=j.valHooks[this.type]||j.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))}))):o?(t=j.valHooks[o.type]||j.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(wt,""):null==n?"":n:void 0}}),j.extend({valHooks:{option:{get:function(e){var t=j.find.attr(e,"value");return null!=t?t:yt(j.text(e))}},select:{get:function(e){var t,n,r,o=e.options,i=e.selectedIndex,a="select-one"===e.type,s=a?null:[],c=a?i+1:o.length;for(r=i<0?c:a?i:0;r<c;r++)if(((n=o[r]).selected||r===i)&&!n.disabled&&(!n.parentNode.disabled||!q(n.parentNode,"optgroup"))){if(t=j(n).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=j.makeArray(t),a=o.length;a--;)((r=o[a]).selected=j.inArray(j.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),j.each(["radio","checkbox"],(function(){j.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=j.inArray(j(e).val(),t)>-1}},v.checkOn||(j.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in r;var kt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};j.extend(j.event,{trigger:function(e,t,n,o){var i,a,s,c,u,l,d,p,h=[n||b],m=f.call(e,"type")?e.type:e,v=f.call(e,"namespace")?e.namespace.split("."):[];if(a=p=s=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!kt.test(m+j.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),u=m.indexOf(":")<0&&"on"+m,(e=e[j.expando]?e:new j.Event(m,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:j.makeArray(t,[e]),d=j.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(n,t))){if(!o&&!d.noBubble&&!y(n)){for(c=d.delegateType||m,kt.test(c+m)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||b)&&h.push(s.defaultView||s.parentWindow||r)}for(i=0;(a=h[i++])&&!e.isPropagationStopped();)p=a,e.type=i>1?c:d.bindType||m,(l=(K.get(a,"events")||Object.create(null))[e.type]&&K.get(a,"handle"))&&l.apply(a,t),(l=u&&a[u])&&l.apply&&J(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,o||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),t)||!J(n)||u&&g(n[m])&&!y(n)&&((s=n[u])&&(n[u]=null),j.event.triggered=m,e.isPropagationStopped()&&p.addEventListener(m,Ct),n[m](),e.isPropagationStopped()&&p.removeEventListener(m,Ct),j.event.triggered=void 0,s&&(n[u]=s)),e.result}},simulate:function(e,t,n){var r=j.extend(new j.Event,n,{type:e,isSimulated:!0});j.event.trigger(r,null,t)}}),j.fn.extend({trigger:function(e,t){return this.each((function(){j.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return j.event.trigger(e,t,n,!0)}}),v.focusin||j.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){j.event.simulate(t,e.target,j.event.fix(e))};j.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,o=K.access(r,t);o||r.addEventListener(e,n,!0),K.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,o=K.access(r,t)-1;o?K.access(r,t,o):(r.removeEventListener(e,n,!0),K.remove(r,t))}}}));var jt=r.location,Tt={guid:Date.now()},St=/\?/;j.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||j.error("Invalid XML: "+e),t};var At=/\[\]$/,Et=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,qt=/^(?:input|select|textarea|keygen)/i;function Dt(e,t,n,r){var o;if(Array.isArray(t))j.each(t,(function(t,o){n||At.test(e)?r(e,o):Dt(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)}));else if(n||"object"!==k(t))r(e,t);else for(o in t)Dt(e+"["+o+"]",t[o],n,r)}j.param=function(e,t){var n,r=[],o=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!j.isPlainObject(e))j.each(e,(function(){o(this.name,this.value)}));else for(n in e)Dt(n,e[n],t,o);return r.join("&")},j.fn.extend({serialize:function(){return j.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=j.prop(this,"elements");return e?j.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!j(this).is(":disabled")&&qt.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=j(this).val();return null==n?null:Array.isArray(n)?j.map(n,(function(e){return{name:t.name,value:e.replace(Et,"\r\n")}})):{name:t.name,value:n.replace(Et,"\r\n")}})).get()}});var Ot=/%20/g,Pt=/#.*$/,_t=/([?&])_=[^&]*/,Lt=/^(.*?):[ \t]*([^\r\n]*)$/gm,$t=/^(?:GET|HEAD)$/,Ht=/^\/\//,Rt={},It={},Mt="*/".concat("*"),Wt=b.createElement("a");function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(R)||[];if(g(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var o={},i=e===It;function a(s){var c;return o[s]=!0,j.each(e[s]||[],(function(e,s){var u=s(t,n,r);return"string"!=typeof u||i||o[u]?i?!(c=u):void 0:(t.dataTypes.unshift(u),a(u),!1)})),c}return a(t.dataTypes[0])||!o["*"]&&a("*")}function Qt(e,t){var n,r,o=j.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&j.extend(!0,e,r),e}Wt.href=jt.href,j.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(jt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":j.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Qt(Qt(e,j.ajaxSettings),t):Qt(j.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(It),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o,i,a,s,c,u,l,d,p,f=j.ajaxSetup({},t),h=f.context||f,m=f.context&&(h.nodeType||h.jquery)?j(h):j.event,v=j.Deferred(),g=j.Callbacks("once memory"),y=f.statusCode||{},x={},w={},k="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Lt.exec(i);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?i:null},setRequestHeader:function(e,t){return null==u&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||k;return n&&n.abort(t),T(0,t),this}};if(v.promise(C),f.url=((e||f.url||jt.href)+"").replace(Ht,jt.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(R)||[""],null==f.crossDomain){c=b.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Wt.protocol+"//"+Wt.host!=c.protocol+"//"+c.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=j.param(f.data,f.traditional)),Bt(Rt,f,t,C),u)return C;for(d in(l=j.event&&f.global)&&0==j.active++&&j.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!$t.test(f.type),o=f.url.replace(Pt,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ot,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(St.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(_t,"$1"),p=(St.test(o)?"&":"?")+"_="+Tt.guid+++p),f.url=o+p),f.ifModified&&(j.lastModified[o]&&C.setRequestHeader("If-Modified-Since",j.lastModified[o]),j.etag[o]&&C.setRequestHeader("If-None-Match",j.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Mt+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(h,C,f)||u))return C.abort();if(k="abort",g.add(f.complete),C.done(f.success),C.fail(f.error),n=Bt(It,f,t,C)){if(C.readyState=1,l&&m.trigger("ajaxSend",[C,f]),u)return C;f.async&&f.timeout>0&&(s=r.setTimeout((function(){C.abort("timeout")}),f.timeout));try{u=!1,n.send(x,T)}catch(e){if(u)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,a,c){var d,p,b,x,w,k=t;u||(u=!0,s&&r.clearTimeout(s),n=void 0,i=c||"",C.readyState=e>0?4:0,d=e>=200&&e<300||304===e,a&&(x=function(e,t,n){for(var r,o,i,a,s=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in s)if(s[o]&&s[o].test(r)){c.unshift(o);break}if(c[0]in n)i=c[0];else{for(o in n){if(!c[0]||e.converters[o+" "+c[0]]){i=o;break}a||(a=o)}i=i||a}if(i)return i!==c[0]&&c.unshift(i),n[i]}(f,C,a)),!d&&j.inArray("script",f.dataTypes)>-1&&(f.converters["text script"]=function(){}),x=function(e,t,n,r){var o,i,a,s,c,u={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(i=l.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=i,i=l.shift())if("*"===i)i=c;else if("*"!==c&&c!==i){if(!(a=u[c+" "+i]||u["* "+i]))for(o in u)if((s=o.split(" "))[1]===i&&(a=u[c+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[o]:!0!==u[o]&&(i=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+c+" to "+i}}}return{state:"success",data:t}}(f,x,C,d),d?(f.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(j.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(j.etag[o]=w)),204===e||"HEAD"===f.type?k="nocontent":304===e?k="notmodified":(k=x.state,p=x.data,d=!(b=x.error))):(b=k,!e&&k||(k="error",e<0&&(e=0))),C.status=e,C.statusText=(t||k)+"",d?v.resolveWith(h,[p,k,C]):v.rejectWith(h,[C,k,b]),C.statusCode(y),y=void 0,l&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?p:b]),g.fireWith(h,[C,k]),l&&(m.trigger("ajaxComplete",[C,f]),--j.active||j.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return j.get(e,t,n,"json")},getScript:function(e,t){return j.get(e,void 0,t,"script")}}),j.each(["get","post"],(function(e,t){j[t]=function(e,n,r,o){return g(n)&&(o=o||r,r=n,n=void 0),j.ajax(j.extend({url:e,type:t,dataType:o,data:n,success:r},j.isPlainObject(e)&&e))}})),j.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),j._evalUrl=function(e,t,n){return j.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){j.globalEval(e,t,n)}})},j.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=j(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return g(e)?this.each((function(t){j(this).wrapInner(e.call(this,t))})):this.each((function(){var t=j(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=g(e);return this.each((function(n){j(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){j(this).replaceWith(this.childNodes)})),this}}),j.expr.pseudos.hidden=function(e){return!j.expr.pseudos.visible(e)},j.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},j.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var zt={0:200,1223:204},Ut=j.ajaxSettings.xhr();v.cors=!!Ut&&"withCredentials"in Ut,v.ajax=Ut=!!Ut,j.ajaxTransport((function(e){var t,n;if(v.cors||Ut&&!e.crossDomain)return{send:function(o,i){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?i(0,"error"):i(s.status,s.statusText):i(zt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),j.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),j.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return j.globalEval(e),e}}}),j.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),j.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,o){t=j("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Xt,Vt=[],Gt=/(=)\?(?=&|$)|\?\?/;j.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Vt.pop()||j.expando+"_"+Tt.guid++;return this[e]=!0,e}}),j.ajaxPrefilter("json jsonp",(function(e,t,n){var o,i,a,s=!1!==e.jsonp&&(Gt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Gt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Gt,"$1"+o):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||j.error(o+" was not called"),a[0]},e.dataTypes[0]="json",i=r[o],r[o]=function(){a=arguments},n.always((function(){void 0===i?j(r).removeProp(o):r[o]=i,e[o]&&(e.jsonpCallback=t.jsonpCallback,Vt.push(o)),a&&g(i)&&i(a[0]),a=i=void 0})),"script"})),v.createHTMLDocument=((Xt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Xt.childNodes.length),j.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),i=!n&&[],(o=D.exec(e))?[t.createElement(o[1])]:(o=Ce([e],t,i),i&&i.length&&j(i).remove(),j.merge([],o.childNodes)));var r,o,i},j.fn.load=function(e,t,n){var r,o,i,a=this,s=e.indexOf(" ");return s>-1&&(r=yt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&j.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done((function(e){i=arguments,a.html(r?j("<div>").append(j.parseHTML(e)).find(r):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,i||[e.responseText,t,e])}))}),this},j.expr.pseudos.animated=function(e){return j.grep(j.timers,(function(t){return e===t.elem})).length},j.offset={setOffset:function(e,t,n){var r,o,i,a,s,c,u=j.css(e,"position"),l=j(e),d={};"static"===u&&(e.style.position="relative"),s=l.offset(),i=j.css(e,"top"),c=j.css(e,"left"),("absolute"===u||"fixed"===u)&&(i+c).indexOf("auto")>-1?(a=(r=l.position()).top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(c)||0),g(t)&&(t=t.call(e,n,j.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+o),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),l.css(d))}},j.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){j.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],o={top:0,left:0};if("fixed"===j.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===j.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((o=j(e).offset()).top+=j.css(e,"borderTopWidth",!0),o.left+=j.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-j.css(r,"marginTop",!0),left:t.left-o.left-j.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===j.css(e,"position");)e=e.offsetParent;return e||ae}))}}),j.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;j.fn[e]=function(r){return z(this,(function(e,r,o){var i;if(y(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===o)return i?i[t]:e[r];i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o}),e,r,arguments.length)}})),j.each(["top","left"],(function(e,t){j.cssHooks[t]=Ue(v.pixelPosition,(function(e,n){if(n)return n=ze(e,t),We.test(n)?j(e).position()[t]+"px":n}))})),j.each({Height:"height",Width:"width"},(function(e,t){j.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){j.fn[r]=function(o,i){var a=arguments.length&&(n||"boolean"!=typeof o),s=n||(!0===o||!0===i?"margin":"border");return z(this,(function(t,n,o){var i;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===o?j.css(t,n,s):j.style(t,n,o,s)}),t,a?o:void 0,a)}}))})),j.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){j.fn[t]=function(e){return this.on(t,e)}})),j.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),j.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){j.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Jt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;j.proxy=function(e,t){var n,r,o;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=s.call(arguments,2),(o=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||j.guid++,o},j.holdReady=function(e){e?j.readyWait++:j.ready(!0)},j.isArray=Array.isArray,j.parseJSON=JSON.parse,j.nodeName=q,j.isFunction=g,j.isWindow=y,j.camelCase=G,j.type=k,j.now=Date.now,j.isNumeric=function(e){var t=j.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},j.trim=function(e){return null==e?"":(e+"").replace(Jt,"")},void 0===(n=function(){return j}.apply(t,[]))||(e.exports=n);var Yt=r.jQuery,Kt=r.$;return j.noConflict=function(e){return r.$===j&&(r.$=Kt),e&&r.jQuery===j&&(r.jQuery=Yt),j},void 0===o&&(r.jQuery=r.$=j),j}))}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return o[e].call(n.exports,n,n.exports,a),n.exports}a.m=o,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);a.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>"a434b5f71c30e8dcef50-chunk.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="prestashop-core-theme-js:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var s,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+o){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+o),s.src=e),n[e]=[t];var p=(t,r)=>{s.onerror=s.onload=null,clearTimeout(f);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(r))),t)return t(r)},f=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={179:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=a.p+a.u(t),s=new Error;a.l(i,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,s,c]=n,u=0;for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(c)c(a);for(t&&t(n);u<i.length;u++)o=i[u],a.o(e,o)&&e[o]&&e[o][0](),e[i[u]]=0},n=self.webpackChunkprestashop_core_theme_js=self.webpackChunkprestashop_core_theme_js||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";var e=a(204),t=a.n(e);void 0===t().migrateMute&&(t().migrateMute=!window.prestashop.debug);a(290),a(768),a(333);const n=prestashop;var r=a.n(n);
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
r().selectors={quantityWanted:"#quantity_wanted",product:{imageContainer:".quickview .images-container, .page-product:not(.modal-open) .row .images-container, .page-product:not(.modal-open) .product-container .images-container, .quickview .js-images-container, .page-product:not(.modal-open) .row .js-images-container, .page-product:not(.modal-open) .product-container .js-images-container",container:".product-container, .js-product-container",availability:"#product-availability, .js-product-availability",actions:".product-actions, .js-product-actions",variants:".product-variants, .js-product-variants",refresh:".product-refresh, .js-product-refresh",miniature:".js-product-miniature",minimalQuantity:".product-minimal-quantity, .js-product-minimal-quantity",addToCart:".quickview .product-add-to-cart, .page-product:not(.modal-open) .row .product-add-to-cart, .page-product:not(.modal-open) .product-container .product-add-to-cart, .quickview .js-product-add-to-cart, .page-product:not(.modal-open) .row .js-product-add-to-cart, .page-product:not(.modal-open) .product-container .js-product-add-to-cart",prices:".quickview .product-prices, .page-product:not(.modal-open) .row .product-prices, .page-product:not(.modal-open) .product-container .product-prices, .quickview .js-product-prices, .page-product:not(.modal-open) .row .js-product-prices, .page-product:not(.modal-open) .product-container .js-product-prices",inputCustomization:'.product-actions input[name="id_customization"], .js-product-actions .js-product-customization-id',customization:".quickview .product-customization, .page-product:not(.modal-open) .row .product-customization, .page-product:not(.modal-open) .product-container .product-customization, .quickview .js-product-customization, .page-product:not(.modal-open) .row .js-product-customization, .page-product:not(.modal-open) .product-container .js-product-customization",variantsUpdate:".quickview .product-variants, .page-product:not(.modal-open) .row .product-variants, .page-product:not(.modal-open) .product-container .product-variants, .quickview .js-product-variants, .page-product:not(.modal-open) .row .js-product-variants, .page-product:not(.modal-open) .js-product-container .js-product-variants",discounts:".quickview .product-discounts, .page-product:not(.modal-open) .row .product-discounts, .page-product:not(.modal-open) .product-container .product-discounts, .quickview .js-product-discounts, .page-product:not(.modal-open) .row .js-product-discounts, .page-product:not(.modal-open) .product-container .js-product-discounts",additionalInfos:".quickview .product-additional-info, .page-product:not(.modal-open) .row .product-additional-info, .page-product:not(.modal-open) .product-container .product-additional-info, .quickview .js-product-additional-info, .page-product:not(.modal-open) .row .js-product-additional-info, .page-product:not(.modal-open) .js-product-container .js-product-additional-info",details:".quickview #product-details, #product-details, .quickview .js-product-details, .js-product-details",flags:".quickview .product-flags, .page-product:not(.modal-open) .row .product-flags, .page-product:not(.modal-open) .product-container .product-flags, .quickview .js-product-flags, .page-product:not(.modal-open) .row .js-product-flags, .page-product:not(.modal-open) .js-product-container .js-product-flags"},listing:{quickview:".quick-view, .js-quick-view"},checkout:{form:".checkout-step form",currentStep:"js-current-step",step:".checkout-step",stepTitle:".step-title, .js-step-title",confirmationSelector:"#payment-confirmation button, .js-payment-confirmation",conditionsSelector:'#conditions-to-approve input[type="checkbox"], .js-conditions-to-approve',conditionAlertSelector:".js-alert-payment-conditions",additionalInformatonSelector:".js-additional-information",optionsForm:".js-payment-option-form",termsCheckboxSelector:'#conditions-to-approve input[name="conditions_to_approve[terms-and-conditions]"], .js-conditions-to-approve input[name="conditions_to_approve[terms-and-conditions]"]',paymentBinary:".payment-binary, .js-payment-binary",deliveryFormSelector:"#js-delivery",summarySelector:"#js-checkout-summary",deliveryStepSelector:"#checkout-delivery-step",editDeliveryButtonSelector:".js-edit-delivery",deliveryOption:".delivery-option, .js-delivery-option",cartPaymentStepRefresh:".js-cart-payment-step-refresh",editAddresses:".js-edit-addresses",deliveryAddressRadios:"#delivery-addresses input[type=radio], #invoice-addresses input[type=radio], .js-address-selector input[type=radio]",addressItem:".address-item, .js-address-item",addressesStep:"#checkout-addresses-step",addressItemChecked:".address-item:has(input[type=radio]:checked), .js-address-item:has(input[type=radio]:checked)",addressError:".js-address-error",notValidAddresses:"#not-valid-addresses, .js-not-valid-addresses",invoiceAddresses:"#invoice-addresses, .js-address-selector",addressForm:".js-address-form"},cart:{detailedTotals:".cart-detailed-totals, .js-cart-detailed-totals",summaryItemsSubtotal:".cart-summary-items-subtotal, .js-cart-summary-items-subtotal",summarySubTotalsContainer:".cart-summary-subtotals-container, .js-cart-summary-subtotals-container",summaryTotals:".cart-summary-totals, .js-cart-summary-totals",summaryProducts:".cart-summary-products, .js-cart-summary-products",detailedActions:".cart-detailed-actions, .js-cart-detailed-actions",voucher:".cart-voucher, .js-cart-voucher",overview:".cart-overview",summaryTop:".cart-summary-top, .js-cart-summary-top",productCustomizationId:"#product_customization_id, .js-product-customization-id",lineProductQuantity:".js-cart-line-product-quantity"}},t()(document).ready((()=>{r().emit("selectorsInit")}));function o(e){const t={};return window.location.href.replace(location.hash,"").replace(/[?&]+([^=&]+)=?([^&]*)?/gi,((e,n,r)=>{t[n]=void 0!==r?r:""})),void 0!==e?t[e]?t[e]:null:t}function i(){const e=o();if(e.updatedTransaction)return void window.location.reload();e.updatedTransaction=1;const t=Object.entries(e).map((e=>e.join("="))).join("&");window.location.href=`${window.location.pathname}?${t}`}r().checkPasswordScore=e=>{return t=void 0,n=null,r=function*(){return(0,(yield a.e(341).then(a.t.bind(a,341,23))).default)(e)},new Promise(((e,o)=>{var i=e=>{try{s(r.next(e))}catch(e){o(e)}},a=e=>{try{s(r.throw(e))}catch(e){o(e)}},s=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,a);s((r=r.apply(t,n)).next())}));var t,n,r},
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
t()(document).ready((()=>{r().on("updateCart",(e=>{r().cart=e.resp.cart;const n=t()(".js-cart").data("refresh-url");if(!n)return;let o={};e&&e.reason&&(o={id_product_attribute:e.reason.idProductAttribute,id_product:e.reason.idProduct}),t().post(n,o).then((e=>{t()(r().selectors.cart.detailedTotals).replaceWith(e.cart_detailed_totals),t()(r().selectors.cart.summaryItemsSubtotal).replaceWith(e.cart_summary_items_subtotal),t()(r().selectors.cart.summarySubTotalsContainer).replaceWith(e.cart_summary_subtotals_container),t()(r().selectors.cart.summaryProducts).replaceWith(e.cart_summary_products),t()(r().selectors.cart.summaryTotals).replaceWith(e.cart_summary_totals),t()(r().selectors.cart.detailedActions).replaceWith(e.cart_detailed_actions),t()(r().selectors.cart.voucher).replaceWith(e.cart_voucher),t()(r().selectors.cart.overview).replaceWith(e.cart_detailed),t()(r().selectors.cart.summaryTop).replaceWith(e.cart_summary_top),t()(r().selectors.cart.productCustomizationId).val(0),t()(r().selectors.cart.lineProductQuantity).each(((e,n)=>{const r=t()(n);r.attr("value",r.val())})),t()(r().selectors.checkout.cartPaymentStepRefresh).length&&i(),r().emit("updatedCart",{eventType:"updateCart",resp:e})})).fail((e=>{r().emit("handleError",{eventType:"updateCart",resp:e})}))}));const e=t()("body");e.on("click",'[data-button-action="add-to-cart"]',(e=>{e.preventDefault();const n=t()(e.currentTarget.form),o=`${n.serialize()}&add=1&action=update`,i=n.attr("action"),a=t()(e.currentTarget);a.prop("disabled",!0);let s=e=>{e.parents(r().selectors.product.addToCart).first().find(r().selectors.product.minimalQuantity).addClass("error"),e.parent().find("label").addClass("error")};const c=n.find("input[min]");(e=>{let n=!0;return e.each(((e,r)=>{const o=t()(r),i=parseInt(o.attr("min"),10);i&&o.val()<i&&(s(o),n=!1)})),n})(c)?t().post(i,o,null,"json").then((e=>{e.hasError?r().emit("handleError",{eventType:"addProductToCart",resp:e}):r().emit("updateCart",{reason:{idProduct:e.id_product,idProductAttribute:e.id_product_attribute,idCustomization:e.id_customization,linkAction:"add-to-cart",cart:e.cart},resp:e})})).fail((e=>{r().emit("handleError",{eventType:"addProductToCart",resp:e})})).always((()=>{setTimeout((()=>{a.prop("disabled",!1)}),1e3)})):s(c)})),e.on("submit",'[data-link-action="add-voucher"]',(e=>{e.preventDefault();const n=t()(e.currentTarget),o=n.attr("action");0===n.find("[name=action]").length&&n.append(t()("<input>",{type:"hidden",name:"ajax",value:1})),0===n.find("[name=action]").length&&n.append(t()("<input>",{type:"hidden",name:"action",value:"update"})),t().post(o,n.serialize(),null,"json").then((n=>{n.hasError?t()(".js-error").show().find(".js-error-text").text(n.errors[0]):r().emit("updateCart",{reason:e.target.dataset,resp:n})})).fail((e=>{r().emit("handleError",{eventType:"updateCart",resp:e})}))}))}));
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
const s=o("editAddress"),c=o("use_same_address");t()(window).on("load",(()=>{let e=t()(`${r().selectors.checkout.addressError}:visible`);if(0===parseInt(c,10)&&t()(r().selectors.checkout.invoiceAddresses).trigger("click"),(null!==s||t()(`${r().selectors.checkout.addressForm}:visible`).length>1)&&e.hide(),e.length>0){const n=t()(r().selectors.checkout.addressError).prop("id").split("-").pop();e.each((function(){u(!0,n,t()(this).attr("name").split("-").pop())}))}e=t()(`${r().selectors.checkout.addressError}:visible`),l(e.length<=0)}));const u=function(e,n,r){const o=t()(`#id-address-${r}-address-${n} a.edit-address`),i=["text-info","address-item-invalid"];t()(`#${r}-addresses a.edit-address`).removeClass(i),o.toggleClass(i,e)},l=function(e){t()("button[name=confirm-addresses]").prop("disabled",!e)};
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
r().checkout=r().checkout||{},r().checkout.onCheckOrderableCartResponse=(e,t)=>!0===e.errors&&(r().emit("orderConfirmationErrors",{resp:e,paymentObject:t}),!0);class d{constructor(){this.confirmationSelector=r().selectors.checkout.confirmationSelector,this.conditionsSelector=r().selectors.checkout.conditionsSelector,this.conditionAlertSelector=r().selectors.checkout.conditionAlertSelector,this.additionalInformatonSelector=r().selectors.checkout.additionalInformatonSelector,this.optionsForm=r().selectors.checkout.optionsForm,this.termsCheckboxSelector=r().selectors.checkout.termsCheckboxSelector}init(){r().on("orderConfirmationErrors",(({resp:e,paymentObject:t})=>{""!==e.cartUrl&&(location.href=e.cartUrl)}));const e=t()("body");e.on("change",`${this.conditionsSelector} input[type="checkbox"]`,t().proxy(this.toggleOrderButton,this)),e.on("change",'input[name="payment-option"]',t().proxy(this.toggleOrderButton,this)),this.toggleOrderButton(),e.on("click",`${this.confirmationSelector} button`,t().proxy(this.confirm,this)),this.getSelectedOption()||this.collapseOptions()}collapseOptions(){t()(`${this.additionalInformatonSelector}, ${this.optionsForm}`).hide()}getSelectedOption(){return t()('input[name="payment-option"]:checked').attr("id")}haveTermsBeenAccepted(){return t()(this.termsCheckboxSelector).prop("checked")}hideConfirmation(){t()(this.confirmationSelector).hide()}showConfirmation(){t()(this.confirmationSelector).show()}toggleOrderButton(){let e=!0;t()(`${this.conditionsSelector} input[type="checkbox"]`).each(((t,n)=>{n.checked||(e=!1)})),r().emit("termsUpdated",{isChecked:e}),this.collapseOptions();const n=this.getSelectedOption();if(n||(e=!1),t()(`#${n}-additional-information`).show(),t()(`#pay-with-${n}-form`).show(),t()(r().selectors.checkout.paymentBinary).hide(),t()(`#${n}`).hasClass("binary")){const r=this.getPaymentOptionSelector(n);this.hideConfirmation(),t()(r).show(),document.querySelectorAll(`${r} button, ${r} input`).forEach((t=>{e?t.removeAttribute("disabled"):t.setAttribute("disabled",!e)})),e?t()(r).removeClass("disabled"):t()(r).addClass("disabled")}else this.showConfirmation(),t()(`${this.confirmationSelector} button`).toggleClass("disabled",!e),t()(`${this.confirmationSelector} button`).attr("disabled",!e),e?t()(this.conditionAlertSelector).hide():t()(this.conditionAlertSelector).show()}getPaymentOptionSelector(e){return`.js-payment-${t()(`#${e}`).data("module-name")}`}showNativeFormErrors(){t()(`input[name=payment-option], ${this.termsCheckboxSelector}`).each((function(){this.reportValidity()}))}confirm(){return e=this,n=null,o=function*(){const e=this.getSelectedOption(),n=this.haveTermsBeenAccepted();if(void 0===e||!1===n)return void this.showNativeFormErrors();const o=yield t().post(window.prestashop.urls.pages.order,{ajax:1,action:"checkCartStillOrderable"});r().checkout.onCheckOrderableCartResponse(o,this)||(t()(`${this.confirmationSelector} button`).addClass("disabled"),t()(`#pay-with-${e}-form form`).submit())},new Promise(((t,r)=>{var i=e=>{try{s(o.next(e))}catch(e){r(e)}},a=e=>{try{s(o.throw(e))}catch(e){r(e)}},s=e=>e.done?t(e.value):Promise.resolve(e.value).then(i,a);s((o=o.apply(e,n)).next())}));var e,n,o}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
const p=r().selectors.checkout.currentStep,f=`.${p}`;class h{constructor(){this.$steps=t()(r().selectors.checkout.step),this.$steps.off("click"),this.$clickableSteps=t()(f).prevAll().addBack(),this.$clickableSteps.addClass("-clickable")}getClickableSteps(){return this.$clickableSteps}makeCurrent(e){this.$steps.removeClass("-current"),this.$steps.removeClass(p),e.makeCurrent()}static getClickedStep(e){return new m(t()(e.target).closest(r().selectors.checkout.step))}}class m{constructor(e){this.$step=e}isUnreachable(){return this.$step.hasClass("-unreachable")}makeCurrent(){this.$step.addClass("-current"),this.$step.addClass(p)}hasContinueButton(){return t()("button.continue",this.$step).length>0}disableAllAfter(){const e=this.$step.nextAll();e.addClass("-unreachable").removeClass("-complete"),t()(r().selectors.checkout.stepTitle,e).addClass("not-allowed")}enableAllBefore(){const e=this.$step.nextAll(`${r().selectors.checkout.step}.-clickable`);e.removeClass("-unreachable").addClass("-complete"),t()(r().selectors.checkout.stepTitle,e).removeClass("not-allowed")}}
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
function v(){t()(r().selectors.checkout.editAddresses).on("click",(e=>{e.stopPropagation(),t()(r().selectors.checkout.addressesStep).trigger("click"),r().emit("editAddress")})),t()(r().selectors.checkout.deliveryAddressRadios).on("click",(function(){t()(r().selectors.checkout.addressItem).removeClass("selected"),t()(r().selectors.checkout.addressItemChecked).addClass("selected");const e=t()(r().selectors.checkout.addressError).prop("id").split("-").pop(),n=t()(r().selectors.checkout.notValidAddresses).val(),o=this.name.split("_").pop(),i=t()(`${r().selectors.checkout.addressError}[name=alert-${o}]`);u(!1,e,o),""!==n&&null===s&&n.split(",").indexOf(this.value)>=0?(i.show(),u(!0,this.value,o),t()(r().selectors.checkout.addressError).prop("id",`id-failure-address-${this.value}`)):i.hide();const a=t()(`${r().selectors.checkout.addressError}:visible`);l(a.length<=0)})),
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */function(){const e=t()("body"),{deliveryFormSelector:n}=r().selectors.checkout,{summarySelector:o}=r().selectors.checkout,{deliveryStepSelector:a}=r().selectors.checkout,{editDeliveryButtonSelector:s}=r().selectors.checkout;e.on("change",`${n} input`,(e=>{const a=t()(n),s=a.serialize(),c=t()(e.currentTarget).parents(r().selectors.checkout.deliveryOption);t().post(a.data("url-update"),s).then((e=>{t()(o).replaceWith(e.preview),t()(r().selectors.checkout.cartPaymentStepRefresh).length&&i(),r().emit("updatedDeliveryForm",{dataForm:a.serializeArray(),deliveryOption:c,resp:e})})).fail((e=>{r().trigger("handleError",{eventType:"updateDeliveryOptions",resp:e})}))})),e.on("click",s,(e=>{e.stopPropagation(),t()(a).trigger("click"),r().emit("editDelivery")}))}(),function(){const e=new d;e.init()}(),function(){const e=new h;e.getClickableSteps().on("click",(t=>{const n=h.getClickedStep(t);n.isUnreachable()||(e.makeCurrent(n),n.hasContinueButton()?n.disableAllAfter():n.enableAllBefore()),r().emit("changedCheckoutStep",{event:t})}))}(),function(){const e=r().selectors.checkout.form;t()(e).submit((function(e){!0===t()(this).data("disabled")&&e.preventDefault(),t()(this).data("disabled",!0),t()('button[type="submit"]',this).addClass("disabled")}))}()}t()(document).ready((()=>{1===t()("#checkout").length&&v()}));
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
let g=null;function y(e){r().emit("updateProductList",e),window.history.pushState(e,document.title,e.current_url)}function b(e,t){return"abort"!==t}function x(e){g===e&&(g=null)}t()(document).ready((()=>{r().on("updateFacets",(e=>{!function(e){g&&g.abort();const n=e.indexOf("?")>=0?"&":"?",r=`${e+n}from-xhr`;g=t().ajax({url:r,dataType:"json",success:y,error:b,complete:x})}(e)}))})),
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
t()(document).ready((()=>{t()("body").on("click",r().selectors.listing.quickview,(e=>{r().emit("clickQuickView",{dataset:t()(e.target).closest(r().selectors.product.miniature).data()}),e.preventDefault()}))}));var w=Object.defineProperty,k=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,T=(e,t,n)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))C.call(t,n)&&T(e,n,t[n]);if(k)for(var n of k(t))j.call(t,n)&&T(e,n,t[n]);return e};
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
let A=null,E=null,N=!1;const q=[];let D=!1;function O(e){!function(e,n){const r=t()(`<div class="alert alert-danger ajax-error" role="alert">${n}</div>`);e.replaceWith(r)}(t()(".quickview #product-availability, .page-product:not(.modal-open) .row #product-availability, .page-product:not(.modal-open) .product-container #product-availability"),e)}function P(e,n,i){const a=t()(r().selectors.product.actions),s=a.find(r().selectors.quantityWanted),c=a.find("form:first"),u=c.serialize();let l,d=o("preview");if("function"==typeof Event?l=new Event("updateRating"):(l=document.createEvent("Event"),l.initEvent("updateRating",!0,!0)),d=null!==d?`&preview=${d}`:"",null===i)return void O();if(e&&"keyup"===e.type&&s.val()===s.data("old-value"))return;s.data("old-value",s.val()),E&&clearTimeout(E);let p=30;"updatedProductQuantity"===n&&(p=750),E=setTimeout((()=>{""!==u&&(A=t().ajax({url:i+(-1===i.indexOf("?")?"?":"&")+u+d,method:"POST",data:{quickview:t()(".modal.quickview.in").length,ajax:1,action:"refresh",quantity_wanted:"updatedProductCombination"===n?s.attr("min"):s.val()},dataType:"json",beforeSend(){null!==A&&A.abort()},error(e,n){"abort"!==n&&0===t()("section#main > .ajax-error").length&&O()},success(e){const o=t()("<div>").append(e.product_cover_thumbnails);t()(r().selectors.product.imageContainer).html()!==o.find(r().selectors.product.imageContainer).html()&&t()(r().selectors.product.imageContainer).replaceWith(e.product_cover_thumbnails),t()(r().selectors.product.prices).first().replaceWith(e.product_prices),t()(r().selectors.product.customization).first().replaceWith(e.product_customization),"updatedProductQuantity"!==n&&"updatedProductCombination"!==n||!e.id_customization?t()(r().selectors.product.inputCustomization).val(0):t()(r().selectors.cart.productCustomizationId).val(e.id_customization),t()(r().selectors.product.variantsUpdate).first().replaceWith(e.product_variants),t()(r().selectors.product.discounts).first().replaceWith(e.product_discounts),t()(r().selectors.product.additionalInfos).first().replaceWith(e.product_additional_info),t()(r().selectors.product.details).replaceWith(e.product_details),t()(r().selectors.product.flags).first().replaceWith(e.product_flags),function(e){let n=null;t()(e.product_add_to_cart).each(((e,r)=>!t()(r).hasClass("product-add-to-cart")||(n=t()(r),!1))),null===n&&O();const o=t()(r().selectors.product.addToCart),i="#product-availability",a=".product-minimal-quantity";_({$addToCartSnippet:n,$targetParent:o,targetSelector:".add"}),_({$addToCartSnippet:n,$targetParent:o,targetSelector:i}),_({$addToCartSnippet:n,$targetParent:o,targetSelector:a})}(e);const i=parseInt(e.product_minimal_quantity,10);document.dispatchEvent(l),isNaN(i)||"updatedProductQuantity"===n||(s.attr("min",i),s.val(i)),r().emit("updatedProduct",e,c.serializeArray())},complete(){A=null,E=null}}))}),p)}function _(e){const n=t()(e.$targetParent.find(e.targetSelector));if(n.length<=0)return;const r=e.$addToCartSnippet.find(e.targetSelector);r.length>0?n.replaceWith(r[0].outerHTML):n.html("")}t()(document).ready((()=>{const e=t()(r().selectors.product.actions);t()("body").on("change touchspin.on.startspin",`${r().selectors.product.variants} *[name]`,(e=>{D=!0,r().emit("updateProduct",{eventType:"updatedProductCombination",event:e,resp:{},reason:{productUrl:r().urls.pages.product||""}})})),t()(e.find("form:first").serializeArray()).each(((e,{value:t,name:n})=>{q.push({value:t,name:n})})),window.addEventListener("popstate",(e=>{if(N=!0,(!e.state||e.state&&e.state.form&&0===e.state.form.length)&&!D)return;const n=t()(r().selectors.product.actions).find("form:first");e.state&&e.state.form?e.state.form.forEach((e=>{n.find(`[name="${e.name}"]`).val(e.value)})):q.forEach((e=>{n.find(`[name="${e.name}"]`).val(e.value)})),r().emit("updateProduct",{eventType:"updatedProductCombination",event:e,resp:{},reason:{productUrl:r().urls.pages.product||""}})})),t()("body").on("click",r().selectors.product.refresh,((e,t)=>{e.preventDefault();let n="updatedProductCombination";void 0!==t&&t.eventType&&(n=t.eventType),r().emit("updateProduct",{eventType:n,event:e,resp:{},reason:{productUrl:r().urls.pages.product||""}})})),r().on("updateProduct",(e=>{const{eventType:n}=e,{event:o}=e;(function(){const e=t().Deferred(),n=t()(r().selectors.product.actions),o=t()(r().selectors.quantityWanted);if(null!==r()&&null!==r().urls&&null!==r().urls.pages&&""!==r().urls.pages.product&&null!==r().urls.pages.product)return e.resolve(r().urls.pages.product),e.promise();const i={};return t()(n.find("form:first").serializeArray()).each(((e,t)=>{i[t.name]=t.value})),t().ajax({url:n.find("form:first").attr("action"),method:"POST",data:S({ajax:1,action:"productrefresh",quantity_wanted:o.val()},i),dataType:"json",success(t){const n=t.productUrl;r().page.canonical=n,e.resolve(n)},error(t,n,r){e.reject({jqXHR:t,textStatus:n,errorThrown:r})}}),e.promise()})().done((e=>P(o,n,e))).fail((()=>{0===t()("section#main > .ajax-error").length&&O()}))})),r().on("updatedProduct",((e,n)=>{if(!e.product_url||!e.id_product_attribute)return;if(t()(".modal.quickview").length)return;let r=document.title;e.product_title&&(r=e.product_title,t()(document).attr("title",r)),N||window.history.pushState({id_product_attribute:e.id_product_attribute,form:n},r,e.product_url),N=!1})),r().on("updateCart",(e=>{if(!e||!e.reason||"add-to-cart"!==e.reason.linkAction)return;t()("#quantity_wanted").val(1)})),r().on("showErrorNextToAddtoCartButton",(e=>{e&&e.errorMessage&&O(e.errorMessage)}))})),t()(document).ready((()=>{var e;e={country:".js-country",address:".js-address-form"},t()("body").on("change",e.country,(()=>{const n={id_country:t()(e.country).val(),id_address:t()(`${e.address} form`).data("id-address")},o=t()(`${e.address} form`).data("refresh-url"),i=`${e.address} input`;t().post(o,n).then((n=>{const o=[];t()(i).each((function(){o[t()(this).prop("name")]=t()(this).val()})),t()(e.address).replaceWith(n.address_form),t()(i).each((function(){t()(this).val(o[t()(this).prop("name")])})),r().emit("updatedAddressForm",{target:t()(e.address),resp:n})})).fail((e=>{r().emit("handleError",{eventType:"updateAddressForm",resp:e})}))}))}));const L=2147483647,$=36,H=/^xn--/,R=/[^\0-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,M={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},W=Math.floor,F=String.fromCharCode;function B(e){throw new RangeError(M[e])}function Q(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(I,".")).split("."),t).join(".");return r+o}function z(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),n--)}else t.push(o)}return t}const U=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},X=function(e,t,n){let r=0;for(e=n?W(e/700):e>>1,e+=W(e/t);e>455;r+=$)e=W(e/35);return W(r+36*e/(e+38))},V=function(e){const t=[],n=e.length;let r=0,o=128,i=72,a=e.lastIndexOf("-");a<0&&(a=0);for(let n=0;n<a;++n)e.charCodeAt(n)>=128&&B("not-basic"),t.push(e.charCodeAt(n));for(let c=a>0?a+1:0;c<n;){let a=r;for(let t=1,o=$;;o+=$){c>=n&&B("invalid-input");const a=(s=e.charCodeAt(c++))-48<10?s-22:s-65<26?s-65:s-97<26?s-97:$;(a>=$||a>W((L-r)/t))&&B("overflow"),r+=a*t;const u=o<=i?1:o>=i+26?26:o-i;if(a<u)break;const l=$-u;t>W(L/l)&&B("overflow"),t*=l}const u=t.length+1;i=X(r-a,u,0==a),W(r/u)>L-o&&B("overflow"),o+=W(r/u),r%=u,t.splice(r++,0,o)}var s;return String.fromCodePoint(...t)},G=function(e){const t=[];let n=(e=z(e)).length,r=128,o=0,i=72;for(const n of e)n<128&&t.push(F(n));let a=t.length,s=a;for(a&&t.push("-");s<n;){let n=L;for(const t of e)t>=r&&t<n&&(n=t);const c=s+1;n-r>W((L-o)/c)&&B("overflow"),o+=(n-r)*c,r=n;for(const n of e)if(n<r&&++o>L&&B("overflow"),n==r){let e=o;for(let n=$;;n+=$){const r=n<=i?1:n>=i+26?26:n-i;if(e<r)break;const o=e-r,a=$-r;t.push(F(U(r+o%a,0))),e=W(o/a)}t.push(F(U(e,0))),i=X(o,c,s==a),o=0,++s}++o,++r}return t.join("")},J={version:"2.1.0",ucs2:{decode:z,encode:e=>String.fromCodePoint(...e)},decode:V,encode:G,toASCII:function(e){return Q(e,(function(e){return R.test(e)?"xn--"+G(e):e}))},toUnicode:function(e){return Q(e,(function(e){return H.test(e)?V(e.slice(4).toLowerCase()):e}))}},Y=function(e){const n=t()(e);t().each(n,((e,t)=>{if(!t.checkValidity()){const e=t.value.split("@");J.toASCII(e[0])===e[0]&&(t.value=J.toASCII(t.value))}}))};
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
 */
a.p=window.prestashop.core_js_public_path,window.$=t(),window.jQuery=t(),t()(document).ready((()=>{t()(".ps-shown-by-js").show(),t()(".ps-hidden-by-js").hide(),Y('input[type="email"]')}))})()})();/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
!function(a,b){function e(b,c){var d,e,g,h=b.nodeName.toLowerCase();return"area"===h?(d=b.parentNode,e=d.name,!(!b.href||!e||"map"!==d.nodeName.toLowerCase())&&(g=a("img[usemap=#"+e+"]")[0],!!g&&f(g))):(/input|select|textarea|button|object/.test(h)?!b.disabled:"a"===h?b.href||c:c)&&f(b)}function f(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}var c=0,d=/^ui-id-\d+$/;a.ui=a.ui||{},a.extend(a.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),scrollParent:function(){var b;return b=a.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.css(this,"position"))&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length)for(var e,f,d=a(this[0]);d.length&&d[0]!==document;){if(e=d.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(f=parseInt(d.css("zIndex"),10),!isNaN(f)&&0!==f))return f;d=d.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++c)})},removeUniqueId:function(){return this.each(function(){d.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return e(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var c=a.attr(b,"tabindex"),d=isNaN(c);return(d||c>=0)&&e(b,!d)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===d?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return"number"!=typeof b?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.support.selectstart="onselectstart"in document.createElement("div"),a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c){var d,e=a.plugins[b];if(e&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(d=0;d<e.length;d++)a.options[e[d][0]]&&e[d][1].apply(a.element,c)}},hasScroll:function(b,c){if("hidden"===a(b).css("overflow"))return!1;var d=c&&"left"===c?"scrollLeft":"scrollTop",e=!1;return b[d]>0||(b[d]=1,e=b[d]>0,b[d]=0,e)}})}(jQuery),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var d,c=0;null!=(d=b[c]);c++)try{a(d).triggerHandler("remove")}catch(a){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var f,b=this._super,c=this._superApply;return this._super=a,this._superApply=e,f=d.apply(this,arguments),this._super=b,this._superApply=c,f}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){for(var h,i,e=d.call(arguments,1),f=0,g=e.length;f<g;f++)for(h in e[f])i=e[f][h],e[f].hasOwnProperty(h)&&i!==b&&(a.isPlainObject(i)?c[h]=a.isPlainObject(c[h])?a.widget.extend({},c[h],i):a.widget.extend({},i):c[h]=i);return c},a.widget.bridge=function(c,e){var f=e.prototype.widgetFullName||c;a.fn[c]=function(g){var h="string"==typeof g,i=d.call(arguments,1),j=this;return g=!h&&i.length?a.widget.extend.apply(null,[g].concat(i)):g,h?this.each(function(){var d,e=a.data(this,f);return e?a.isFunction(e[g])&&"_"!==g.charAt(0)?(d=e[g].apply(e,i),d!==e&&d!==b?(j=d&&d.jquery?j.pushStack(d.get()):d,!1):void 0):a.error("no such method '"+g+"' for "+c+" widget instance"):a.error("cannot call methods on "+c+" prior to initialization; attempted to call method '"+g+"'")}):this.each(function(){var b=a.data(this,f);b?b.option(g||{})._init():a.data(this,f,new e(g,this))}),j}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(c,d){var f,g,h,e=c;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof c)if(e={},f=c.split("."),c=f.shift(),f.length){for(g=e[c]=a.widget.extend({},this.options[c]),h=0;h<f.length-1;h++)g[f[h]]=g[f[h]]||{},g=g[f[h]];if(c=f.pop(),d===b)return g[c]===b?null:g[c];g[c]=d}else{if(d===b)return this.options[c]===b?null:this.options[c];e[c]=d}return this._setOptions(e),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){if(b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof g?f[g]:g).apply(f,arguments)}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^(\w+)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,a.unbind(b).undelegate(b)},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}})}(jQuery),function(a,b){var c=!1;a(document).mouseup(function(){c=!1}),a.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=1===b.which,f=!("string"!=typeof this.options.cancel||!b.target.nodeName)&&a(b.target).closest(this.options.cancel).length;return!(e&&!f&&this._mouseCapture(b))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(b)!==!1,!this._mouseStarted)?(b.preventDefault(),!0):(!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0))}},_mouseMove:function(b){return a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button?this._mouseUp(b):this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target===this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;return!(this.helper||c.disabled||a(b.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(b),!!this.handle&&(a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0))},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=this,d=!1;return a.ui.ddmanager&&!this.options.dropBehaviour&&(d=a.ui.ddmanager.drop(this,b)),this.dropped&&(d=this.dropped,this.dropped=!1),!("original"===this.options.helper&&!a.contains(this.element[0].ownerDocument,this.element[0]))&&("invalid"===this.options.revert&&!d||"valid"===this.options.revert&&d||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b)!==!1&&c._clear()}):this._trigger("stop",b)!==!1&&this._clear(),!1)},_mouseUp:function(b){return a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){return!this.options.handle||!!a(b.target).closest(this.element.find(this.options.handle)).length},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):"clone"===c.helper?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo("parent"===c.appendTo?this.element[0].parentNode:c.appendTo),d[0]===this.element[0]||/(fixed|absolute)/.test(d.css("position"))||d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options;return e.containment?"window"===e.containment?void(this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===e.containment?void(this.containment=[0,0,a(document).width()-this.helperProportions.width-this.margins.left,(a(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):e.containment.constructor===Array?void(this.containment=e.containment):("parent"===e.containment&&(e.containment=this.helper[0].parentNode),c=a(e.containment),d=c[0],void(d&&(b="hidden"!==c.css("overflow"),this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c))):void(this.containment=null)},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:e.scrollTop(),left:e.scrollLeft()}),{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*d}},_generatePosition:function(b){var c,d,e,f,g=this.options,h="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=b.pageX,j=b.pageY;return this.offset.scroll||(this.offset.scroll={top:h.scrollTop(),left:h.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(d=this.relative_container.offset(),c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]):c=this.containment,b.pageX-this.offset.click.left<c[0]&&(i=c[0]+this.offset.click.left),b.pageY-this.offset.click.top<c[1]&&(j=c[1]+this.offset.click.top),b.pageX-this.offset.click.left>c[2]&&(i=c[2]+this.offset.click.left),b.pageY-this.offset.click.top>c[3]&&(j=c[3]+this.offset.click.top)),g.grid&&(e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY,j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e,f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX,i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f)),{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),"drag"===b&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("ui-draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"ui-sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("ui-draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,"original"===d.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("ui-draggable"),e=this;a.each(d.sortables,function(){var f=!1,g=this;this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(f=!0,a.each(d.sortables,function(){return this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this!==g&&this.instance._intersectsWith(this.instance.containerCache)&&a.contains(g.instance.element[0],this.instance.element[0])&&(f=!1),f})),f?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),c=a(this).data("ui-draggable").options;b.css("cursor")&&(c._cursor=b.css("cursor")),b.css("cursor",c.cursor)},stop:function(){var b=a(this).data("ui-draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("ui-draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("ui-draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("ui-draggable");b.scrollParent[0]!==document&&"HTML"!==b.scrollParent[0].tagName&&(b.overflowOffset=b.scrollParent.offset())},drag:function(b){var c=a(this).data("ui-draggable"),d=c.options,e=!1;c.scrollParent[0]!==document&&"HTML"!==c.scrollParent[0].tagName?(d.axis&&"x"===d.axis||(c.overflowOffset.top+c.scrollParent[0].offsetHeight-b.pageY<d.scrollSensitivity?c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop+d.scrollSpeed:b.pageY-c.overflowOffset.top<d.scrollSensitivity&&(c.scrollParent[0].scrollTop=e=c.scrollParent[0].scrollTop-d.scrollSpeed)),d.axis&&"y"===d.axis||(c.overflowOffset.left+c.scrollParent[0].offsetWidth-b.pageX<d.scrollSensitivity?c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft+d.scrollSpeed:b.pageX-c.overflowOffset.left<d.scrollSensitivity&&(c.scrollParent[0].scrollLeft=e=c.scrollParent[0].scrollLeft-d.scrollSpeed))):(d.axis&&"x"===d.axis||(b.pageY-a(document).scrollTop()<d.scrollSensitivity?e=a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity&&(e=a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed))),d.axis&&"y"===d.axis||(b.pageX-a(document).scrollLeft()<d.scrollSensitivity?e=a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity&&(e=a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)))),e!==!1&&a.ui.ddmanager&&!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(c,b)}}),a.ui.plugin.add("draggable","snap",{start:function(){var b=a(this).data("ui-draggable"),c=b.options;b.snapElements=[],a(c.snap.constructor!==String?c.snap.items||":data(ui-draggable)":c.snap).each(function(){var c=a(this),d=c.offset();this!==b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})})},drag:function(b,c){var d,e,f,g,h,i,j,k,l,m,n=a(this).data("ui-draggable"),o=n.options,p=o.snapTolerance,q=c.offset.left,r=q+n.helperProportions.width,s=c.offset.top,t=s+n.helperProportions.height;for(l=n.snapElements.length-1;l>=0;l--)h=n.snapElements[l].left,i=h+n.snapElements[l].width,j=n.snapElements[l].top,k=j+n.snapElements[l].height,r<h-p||q>i+p||t<j-p||s>k+p||!a.contains(n.snapElements[l].item.ownerDocument,n.snapElements[l].item)?(n.snapElements[l].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,b,a.extend(n._uiHash(),{snapItem:n.snapElements[l].item})),n.snapElements[l].snapping=!1):("inner"!==o.snapMode&&(d=Math.abs(j-t)<=p,e=Math.abs(k-s)<=p,f=Math.abs(h-r)<=p,g=Math.abs(i-q)<=p,d&&(c.position.top=n._convertPositionTo("relative",{top:j-n.helperProportions.height,left:0}).top-n.margins.top),e&&(c.position.top=n._convertPositionTo("relative",{top:k,left:0}).top-n.margins.top),f&&(c.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left-n.margins.left),g&&(c.position.left=n._convertPositionTo("relative",{top:0,left:i}).left-n.margins.left)),m=d||e||f||g,"outer"!==o.snapMode&&(d=Math.abs(j-s)<=p,e=Math.abs(k-t)<=p,f=Math.abs(h-q)<=p,g=Math.abs(i-r)<=p,d&&(c.position.top=n._convertPositionTo("relative",{top:j,left:0}).top-n.margins.top),e&&(c.position.top=n._convertPositionTo("relative",{top:k-n.helperProportions.height,left:0}).top-n.margins.top),f&&(c.position.left=n._convertPositionTo("relative",{top:0,left:h}).left-n.margins.left),g&&(c.position.left=n._convertPositionTo("relative",{top:0,left:i-n.helperProportions.width}).left-n.margins.left)),!n.snapElements[l].snapping&&(d||e||f||g||m)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,b,a.extend(n._uiHash(),{snapItem:n.snapElements[l].item})),n.snapElements[l].snapping=d||e||f||g||m)}}),a.ui.plugin.add("draggable","stack",{start:function(){var b,c=this.data("ui-draggable").options,d=a.makeArray(a(c.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});d.length&&(b=parseInt(a(d[0]).css("zIndex"),10)||0,a(d).each(function(c){a(this).css("zIndex",b+c)}),this.css("zIndex",b+d.length))}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("ui-draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("ui-draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})}(jQuery),function(a,b){function c(a,b,c){return a>b&&a<b+c}a.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var b=this.options,c=b.accept;this.isover=!1,this.isout=!0,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var b=0,c=a.ui.ddmanager.droppables[this.options.scope];b<c.length;b++)c[b]===this&&c.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(b,c){"accept"===b&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;c&&(c.currentItem||c.element)[0]!==this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current,e=!1;return!(!d||(d.currentItem||d.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"ui-droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope===d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1}),!e&&(!!this.accept.call(this.element[0],d.currentItem||d.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element)))},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.ui.intersect=function(a,b,d){if(!b.offset)return!1;var e,f,g=(a.positionAbs||a.position.absolute).left,h=g+a.helperProportions.width,i=(a.positionAbs||a.position.absolute).top,j=i+a.helperProportions.height,k=b.offset.left,l=k+b.proportions.width,m=b.offset.top,n=m+b.proportions.height;switch(d){case"fit":return k<=g&&h<=l&&m<=i&&j<=n;case"intersect":return k<g+a.helperProportions.width/2&&h-a.helperProportions.width/2<l&&m<i+a.helperProportions.height/2&&j-a.helperProportions.height/2<n;case"pointer":return e=(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,f=(a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,c(f,m,b.proportions.height)&&c(e,k,b.proportions.width);case"touch":return(i>=m&&i<=n||j>=m&&j<=n||i<m&&j>n)&&(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l);default:return!1}},a.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(b,c){var d,e,f=a.ui.ddmanager.droppables[b.options.scope]||[],g=c?c.type:null,h=(b.currentItem||b.element).find(":data(ui-droppable)").addBack();a:for(d=0;d<f.length;d++)if(!(f[d].options.disabled||b&&!f[d].accept.call(f[d].element[0],b.currentItem||b.element))){for(e=0;e<h.length;e++)if(h[e]===f[d].element[0]){f[d].proportions.height=0;continue a}f[d].visible="none"!==f[d].element.css("display"),f[d].visible&&("mousedown"===g&&f[d]._activate.call(f[d],c),f[d].offset=f[d].element.offset(),f[d].proportions={width:f[d].element[0].offsetWidth,height:f[d].element[0].offsetHeight})}},drop:function(b,c){var d=!1;return a.each((a.ui.ddmanager.droppables[b.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,c)))}),d},dragStart:function(b,c){b.element.parentsUntil("body").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var d,e,f,g=a.ui.intersect(b,this,this.options.tolerance),h=!g&&this.isover?"isout":g&&!this.isover?"isover":null;h&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return a.data(this,"ui-droppable").options.scope===e}),f.length&&(d=a.data(f[0],"ui-droppable"),d.greedyChild="isover"===h)),d&&"isover"===h&&(d.isover=!1,d.isout=!0,d._out.call(d,c)),this[h]=!0,this["isout"===h?"isover":"isout"]=!1,this["isover"===h?"_over":"_out"].call(this,c),d&&"isout"===h&&(d.isout=!1,d.isover=!0,d._over.call(d,c)))}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}}(jQuery),function(a,b){function c(a){return parseInt(a,10)||0}function d(a){return!isNaN(parseInt(a,10))}a.widget("ui.resizable",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var b,c,d,e,f,g=this,h=this.options;if(this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=h.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),b=this.handles.split(","),this.handles={},c=0;c<b.length;c++)d=a.trim(b[c]),f="ui-resizable-"+d,e=a("<div class='ui-resizable-handle "+f+"'></div>"),e.css({zIndex:h.zIndex}),"se"===d&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[d]=".ui-resizable-"+d,this.element.append(e);this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles)this.handles[c].constructor===String&&(this.handles[c]=a(this.handles[c],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(d=a(this.handles[c],this.element),f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth(),e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join(""),b.css(e,f),this._proportionallyResize()),a(this.handles[c]).length},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){g.resizing||(this.className&&(e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),g.axis=e&&e[1]?e[1]:"se")}),h.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){h.disabled||(a(this).removeClass("ui-resizable-autohide"),g._handles.show())}).mouseleave(function(){h.disabled||g.resizing||(a(this).addClass("ui-resizable-autohide"),g._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),this},_mouseCapture:function(b){var c,d,e=!1;for(c in this.handles)d=a(this.handles[c])[0],(d===b.target||a.contains(d,b.target))&&(e=!0);return!this.options.disabled&&e},_mouseStart:function(b){var d,e,f,g=this.options,h=this.element.position(),i=this.element;return this.resizing=!0,/absolute/.test(i.css("position"))?i.css({position:"absolute",top:i.css("top"),left:i.css("left")}):i.is(".ui-draggable")&&i.css({position:"absolute",top:h.top,left:h.left}),this._renderProxy(),d=c(this.helper.css("left")),e=c(this.helper.css("top")),g.containment&&(d+=a(g.containment).scrollLeft()||0,e+=a(g.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:d,top:e},this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalPosition={left:d,top:e},this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof g.aspectRatio?g.aspectRatio:this.originalSize.width/this.originalSize.height||1,f=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===f?this.axis+"-resize":f),i.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,d=this.helper,e={},f=this.originalMousePosition,g=this.axis,h=this.position.top,i=this.position.left,j=this.size.width,k=this.size.height,l=b.pageX-f.left||0,m=b.pageY-f.top||0,n=this._change[g];return!!n&&(c=n.apply(this,[b,l,m]),this._updateVirtualBoundaries(b.shiftKey),(this._aspectRatio||b.shiftKey)&&(c=this._updateRatio(c,b)),c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),this.position.top!==h&&(e.top=this.position.top+"px"),this.position.left!==i&&(e.left=this.position.left+"px"),this.size.width!==j&&(e.width=this.size.width+"px"),this.size.height!==k&&(e.height=this.size.height+"px"),d.css(e),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(e)||this._trigger("resize",b,this.ui()),!1)},_mouseStop:function(b){this.resizing=!1;var c,d,e,f,g,h,i,j=this.options,k=this;return this._helper&&(c=this._proportionallyResizeElements,d=c.length&&/textarea/i.test(c[0].nodeName),e=d&&a.ui.hasScroll(c[0],"left")?0:k.sizeDiff.height,f=d?0:k.sizeDiff.width,g={width:k.helper.width()-f,height:k.helper.height()-e},h=parseInt(k.element.css("left"),10)+(k.position.left-k.originalPosition.left)||null,i=parseInt(k.element.css("top"),10)+(k.position.top-k.originalPosition.top)||null,j.animate||this.element.css(a.extend(g,{top:i,left:h})),k.helper.height(k.size.height),k.helper.width(k.size.width),this._helper&&!j.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b,c,e,f,g,h=this.options;g={minWidth:d(h.minWidth)?h.minWidth:0,maxWidth:d(h.maxWidth)?h.maxWidth:1/0,minHeight:d(h.minHeight)?h.minHeight:0,maxHeight:d(h.maxHeight)?h.maxHeight:1/0},(this._aspectRatio||a)&&(b=g.minHeight*this.aspectRatio,e=g.minWidth/this.aspectRatio,c=g.maxHeight*this.aspectRatio,f=g.maxWidth/this.aspectRatio,b>g.minWidth&&(g.minWidth=b),e>g.minHeight&&(g.minHeight=e),c<g.maxWidth&&(g.maxWidth=c),f<g.maxHeight&&(g.maxHeight=f)),this._vBoundaries=g},_updateCache:function(a){this.offset=this.helper.offset(),d(a.left)&&(this.position.left=a.left),d(a.top)&&(this.position.top=a.top),d(a.height)&&(this.size.height=a.height),d(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var b=this.position,c=this.size,e=this.axis;return d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===e&&(a.left=b.left+(c.width-a.width),a.top=null),"nw"===e&&(a.top=b.top+(c.height-a.height),a.left=b.left+(c.width-a.width)),a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,e=d(a.width)&&b.maxWidth&&b.maxWidth<a.width,f=d(a.height)&&b.maxHeight&&b.maxHeight<a.height,g=d(a.width)&&b.minWidth&&b.minWidth>a.width,h=d(a.height)&&b.minHeight&&b.minHeight>a.height,i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,k=/sw|nw|w/.test(c),l=/nw|ne|n/.test(c);return g&&(a.width=b.minWidth),h&&(a.height=b.minHeight),e&&(a.width=b.maxWidth),f&&(a.height=b.maxHeight),g&&k&&(a.left=i-b.minWidth),e&&k&&(a.left=i-b.maxWidth),h&&l&&(a.top=j-b.minHeight),f&&l&&(a.top=j-b.maxHeight),a.width||a.height||a.left||!a.top?a.width||a.height||a.top||!a.left||(a.left=null):a.top=null,a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var a,b,c,d,e,f=this.helper||this.element;for(a=0;a<this._proportionallyResizeElements.length;a++){if(e=this._proportionallyResizeElements[a],!this.borderDif)for(this.borderDif=[],c=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],d=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")],b=0;b<c.length;b++)this.borderDif[b]=(parseInt(c[b],10)||0)+(parseInt(d[b],10)||0);e.css({height:f.height()-this.borderDif[0]-this.borderDif[2]||0,width:f.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset(),this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).data("ui-resizable"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};e&&e.length&&a(e[0]).css({width:d.width,height:d.height}),c._updateCache(d),c._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(){var b,d,e,f,g,h,i,j=a(this).data("ui-resizable"),k=j.options,l=j.element,m=k.containment,n=m instanceof a?m.get(0):/parent/.test(m)?l.parent().get(0):m;n&&(j.containerElement=a(n),/document/.test(m)||m===document?(j.containerOffset={left:0,top:0},j.containerPosition={left:0,top:0},j.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(n),d=[],a(["Top","Right","Left","Bottom"]).each(function(a,e){d[a]=c(b.css("padding"+e))}),j.containerOffset=b.offset(),j.containerPosition=b.position(),j.containerSize={height:b.innerHeight()-d[3],width:b.innerWidth()-d[1]},e=j.containerOffset,f=j.containerSize.height,g=j.containerSize.width,h=a.ui.hasScroll(n,"left")?n.scrollWidth:g,i=a.ui.hasScroll(n)?n.scrollHeight:f,j.parentData={element:n,left:e.left,top:e.top,width:h,height:i}))},resize:function(b){var c,d,e,f,g=a(this).data("ui-resizable"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement;m[0]!==document&&/static/.test(m.css("position"))&&(l=i),j.left<(g._helper?i.left:0)&&(g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left),k&&(g.size.height=g.size.width/g.aspectRatio),g.position.left=h.helper?i.left:0),j.top<(g._helper?i.top:0)&&(g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top),k&&(g.size.width=g.size.height*g.aspectRatio),g.position.top=g._helper?i.top:0),g.offset.left=g.parentData.left+g.position.left,g.offset.top=g.parentData.top+g.position.top,c=Math.abs((g._helper?g.offset.left-l.left:g.offset.left-l.left)+g.sizeDiff.width),d=Math.abs((g._helper?g.offset.top-l.top:g.offset.top-i.top)+g.sizeDiff.height),e=g.containerElement.get(0)===g.element.parent().get(0),f=/relative|absolute/.test(g.containerElement.css("position")),e&&f&&(c-=g.parentData.left),c+g.size.width>=g.parentData.width&&(g.size.width=g.parentData.width-c,k&&(g.size.height=g.size.width/g.aspectRatio)),d+g.size.height>=g.parentData.height&&(g.size.height=g.parentData.height-d,k&&(g.size.width=g.size.height*g.aspectRatio))},stop:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j}),b._helper&&!c.animate&&/static/.test(f.css("position"))&&a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}),a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).data("ui-resizable"),c=b.options,d=function(b){a(b).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};"object"!=typeof c.alsoResize||c.alsoResize.parentNode?d(c.alsoResize):c.alsoResize.length?(c.alsoResize=c.alsoResize[0],d(c.alsoResize)):a.each(c.alsoResize,function(a){d(a)})},resize:function(b,c){var d=a(this).data("ui-resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("ui-resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};"object"!=typeof e.alsoResize||e.alsoResize.nodeType?i(e.alsoResize):a.each(e.alsoResize,function(a,b){i(a,b)})},stop:function(){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.size;b.ghost=b.originalElement.clone(),b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof c.ghost?c.ghost:""),b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).data("ui-resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).data("ui-resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(){var b=a(this).data("ui-resizable"),c=b.options,d=b.size,e=b.originalSize,f=b.originalPosition,g=b.axis,h="number"==typeof c.grid?[c.grid,c.grid]:c.grid,i=h[0]||1,j=h[1]||1,k=Math.round((d.width-e.width)/i)*i,l=Math.round((d.height-e.height)/j)*j,m=e.width+k,n=e.height+l,o=c.maxWidth&&c.maxWidth<m,p=c.maxHeight&&c.maxHeight<n,q=c.minWidth&&c.minWidth>m,r=c.minHeight&&c.minHeight>n;c.grid=h,q&&(m+=i),r&&(n+=j),o&&(m-=i),p&&(n-=j),/^(se|s|e)$/.test(g)?(b.size.width=m,b.size.height=n):/^(ne)$/.test(g)?(b.size.width=m,b.size.height=n,b.position.top=f.top-l):/^(sw)$/.test(g)?(b.size.width=m,b.size.height=n,b.position.left=f.left-k):(b.size.width=m,b.size.height=n,b.position.top=f.top-l,b.position.left=f.left-k)}})}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var b,c=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){b=a(c.options.filter,c.element[0]),b.addClass("ui-selectee"),b.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=b.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(b){var c=this,d=this.options;this.opos=[b.pageX,b.pageY],this.options.disabled||(this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.pageX,top:b.pageY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,b.metaKey||b.ctrlKey||(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().addBack().each(function(){var d,e=a.data(this,"selectable-item");if(e)return d=!b.metaKey&&!b.ctrlKey||!e.$element.hasClass("ui-selected"),e.$element.removeClass(d?"ui-unselecting":"ui-selected").addClass(d?"ui-selecting":"ui-unselecting"),e.unselecting=!d,e.selecting=d,e.selected=d,d?c._trigger("selecting",b,{selecting:e.element}):c._trigger("unselecting",b,{unselecting:e.element}),!1}))},_mouseDrag:function(b){if(this.dragged=!0,!this.options.disabled){var c,d=this,e=this.options,f=this.opos[0],g=this.opos[1],h=b.pageX,i=b.pageY;return f>h&&(c=h,h=f,f=c),g>i&&(c=i,i=g,g=c),this.helper.css({left:f,top:g,width:h-f,height:i-g}),this.selectees.each(function(){var c=a.data(this,"selectable-item"),j=!1;c&&c.element!==d.element[0]&&("touch"===e.tolerance?j=!(c.left>h||c.right<f||c.top>i||c.bottom<g):"fit"===e.tolerance&&(j=c.left>f&&c.right<h&&c.top>g&&c.bottom<i),j?(c.selected&&(c.$element.removeClass("ui-selected"),c.selected=!1),c.unselecting&&(c.$element.removeClass("ui-unselecting"),c.unselecting=!1),c.selecting||(c.$element.addClass("ui-selecting"),c.selecting=!0,d._trigger("selecting",b,{selecting:c.element}))):(c.selecting&&((b.metaKey||b.ctrlKey)&&c.startselected?(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.$element.addClass("ui-selected"),c.selected=!0):(c.$element.removeClass("ui-selecting"),c.selecting=!1,c.startselected&&(c.$element.addClass("ui-unselecting"),c.unselecting=!0),d._trigger("unselecting",b,{unselecting:c.element}))),c.selected&&(b.metaKey||b.ctrlKey||c.startselected||(c.$element.removeClass("ui-selected"),c.selected=!1,c.$element.addClass("ui-unselecting"),c.unselecting=!0,d._trigger("unselecting",b,{unselecting:c.element})))))}),!1}},_mouseStop:function(b){var c=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}})}(jQuery),function(a,b){function c(a,b,c){return a>b&&a<b+c}function d(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))}a.widget("ui.sortable",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===a.axis||d(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){"disabled"===b?(this.options[b]=c,this.widget().toggleClass("ui-sortable-disabled",!!c)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=null,e=!1,f=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(b),a(b.target).parents().each(function(){if(a.data(this,f.widgetName+"-item")===f)return d=a(this),!1}),a.data(b.target,f.widgetName+"-item")===f&&(d=a(b.target)),!!d&&(!(this.options.handle&&!c&&(a(this.options.handle,d).find("*").addBack().each(function(){this===b.target&&(e=!0)}),!e))&&(this.currentItem=d,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(b,c,d){var e,f,g=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),g.containment&&this._setContainment(),g.cursor&&"auto"!==g.cursor&&(f=this.document.find("body"),this.storedCursor=f.css("cursor"),f.css("cursor",g.cursor),this.storedStylesheet=a("<style>*{ cursor: "+g.cursor+" !important; }</style>").appendTo(f)),g.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",g.opacity)),g.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",g.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!d)for(e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("activate",b,this._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){var c,d,e,f,g=this.options,h=!1;for(this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<g.scrollSensitivity?this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop+g.scrollSpeed:b.pageY-this.overflowOffset.top<g.scrollSensitivity&&(this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop-g.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<g.scrollSensitivity?this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft+g.scrollSpeed:b.pageX-this.overflowOffset.left<g.scrollSensitivity&&(this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft-g.scrollSpeed)):(b.pageY-a(document).scrollTop()<g.scrollSensitivity?h=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<g.scrollSensitivity&&(h=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)),b.pageX-a(document).scrollLeft()<g.scrollSensitivity?h=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<g.scrollSensitivity&&(h=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed))),h!==!1&&a.ui.ddmanager&&!g.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),c=this.items.length-1;c>=0;c--)if(d=this.items[c],e=d.item[0],f=this._intersectsWithPointer(d),f&&d.instance===this.currentContainer&&!(e===this.currentItem[0]||this.placeholder[1===f?"next":"prev"]()[0]===e||a.contains(this.placeholder[0],e)||"semi-dynamic"===this.options.type&&a.contains(this.element[0],e))){if(this.direction=1===f?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(d))break;this._rearrange(b,d),this._trigger("change",b,this._uiHash());break}return this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(b){if(a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b),this.options.revert){var d=this,e=this.placeholder.offset(),f=this.options.axis,g={};f&&"x"!==f||(g.left=e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),f&&"y"!==f||(g.top=e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,a(this.helper).animate(g,parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--)this.containers[b]._trigger("deactivate",null,this._uiHash(this)),this.containers[b].containerCache.over&&(this.containers[b]._trigger("out",null,this._uiHash(this)),this.containers[b].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[\-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"="),d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l="x"===this.options.axis||d+j>h&&d+j<i,m="y"===this.options.axis||b+k>f&&b+k<g,n=l&&m;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?n:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(a){var b="x"===this.options.axis||c(this.positionAbs.top+this.offset.click.top,a.top,a.height),d="y"===this.options.axis||c(this.positionAbs.left+this.offset.click.left,a.left,a.width),e=b&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return!!e&&(this.floating?g&&"right"===g||"down"===f?2:1:f&&("down"===f?2:1))},_intersectsWithSides:function(a){var b=c(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),d=c(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?"right"===f&&d||"left"===f&&!d:e&&("down"===e&&b||"up"===e&&!b)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return 0!==a&&(a>0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c,d,e,f,g=[],h=[],i=this._connectWith();if(i&&b)for(c=i.length-1;c>=0;c--)for(e=a(i[c]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&h.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),f]);for(h.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),c=h.length-1;c>=0;c--)h[c][0].each(function(){g.push(this)});return a(g)},_removeCurrentsFromItems:function(){var b=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var c=0;c<b.length;c++)if(b[c]===a.item[0])return!1;return!0})},_refreshItems:function(b){this.items=[],this.containers=[this];var c,d,e,f,g,h,i,j,k=this.items,l=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],m=this._connectWith();if(m&&this.ready)for(c=m.length-1;c>=0;c--)for(e=a(m[c]),d=e.length-1;d>=0;d--)f=a.data(e[d],this.widgetFullName),f&&f!==this&&!f.options.disabled&&(l.push([a.isFunction(f.options.items)?f.options.items.call(f.element[0],b,{item:this.currentItem}):a(f.options.items,f.element),f]),this.containers.push(f));for(c=l.length-1;c>=0;c--)for(g=l[c][1],h=l[c][0],d=0,j=h.length;d<j;d++)i=a(h[d]),i.data(this.widgetName+"-item",g),k.push({item:i,instance:g,width:0,height:0,left:0,top:0})},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var c,d,e,f;for(c=this.items.length-1;c>=0;c--)d=this.items[c],d.instance!==this.currentContainer&&this.currentContainer&&d.item[0]!==this.currentItem[0]||(e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item,b||(d.width=e.outerWidth(),d.height=e.outerHeight()),f=e.offset(),d.left=f.left,d.top=f.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(c=this.containers.length-1;c>=0;c--)f=this.containers[c].element.offset(),this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight();return this},_createPlaceholder:function(b){b=b||this;var c,d=b.options;d.placeholder&&d.placeholder.constructor!==String||(c=d.placeholder,d.placeholder={element:function(){var d=b.currentItem[0].nodeName.toLowerCase(),e=a("<"+d+">",b.document[0]).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===d?b.currentItem.children().each(function(){a("<td>&#160;</td>",b.document[0]).attr("colspan",a(this).attr("colspan")||1).appendTo(e)}):"img"===d&&e.attr("src",b.currentItem.attr("src")),c||e.css("visibility","hidden"),e},update:function(a,e){c&&!d.forcePlaceholderSize||(e.height()||e.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10)),e.width()||e.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10)))}}),b.placeholder=a(d.placeholder.element.call(b.element,b.currentItem)),b.currentItem.after(b.placeholder),d.placeholder.update(b,b.placeholder)},_contactContainers:function(b){var e,f,g,h,i,j,k,l,m,n,o=null,p=null;for(e=this.containers.length-1;e>=0;e--)if(!a.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(o&&a.contains(this.containers[e].element[0],o.element[0]))continue;o=this.containers[e],p=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0);if(o)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",b,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(g=1e4,h=null,n=o.floating||d(this.currentItem),i=n?"left":"top",j=n?"width":"height",k=this.positionAbs[i]+this.offset.click[i],f=this.items.length-1;f>=0;f--)a.contains(this.containers[p].element[0],this.items[f].item[0])&&this.items[f].item[0]!==this.currentItem[0]&&(n&&!c(this.positionAbs.top+this.offset.click.top,this.items[f].top,this.items[f].height)||(l=this.items[f].item.offset()[i],m=!1,Math.abs(l-k)>Math.abs(l+this.items[f][j]-k)&&(m=!0,l+=this.items[f][j]),Math.abs(l-k)<g&&(g=Math.abs(l-k),h=this.items[f],this.direction=m?"up":"down")));if(!h&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return;h?this._rearrange(b,h,null,!0):this._rearrange(b,null,this.containers[p].element,!0),this._trigger("change",b,this._uiHash()),this.containers[p]._trigger("change",b,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",b,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):"clone"===c.helper?this.currentItem.clone():this.currentItem;return d.parents("body").length||a("parent"!==c.appendTo?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),d[0].style.width&&!c.forceHelperSize||d.width(this.currentItem.width()),d[0].style.height&&!c.forceHelperSize||d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){"string"==typeof b&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)&&(b={top:0,left:0}),{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options;"parent"===e.containment&&(e.containment=this.helper[0].parentNode),"document"!==e.containment&&"window"!==e.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a("document"===e.containment?document:window).width()-this.helperProportions.width-this.margins.left,(a("document"===e.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(e.containment)||(b=a(e.containment)[0],c=a(e.containment).offset(),d="hidden"!==a(b).css("overflow"),this.containment=[c.left+(parseInt(a(b).css("borderLeftWidth"),10)||0)+(parseInt(a(b).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(b).css("borderTopWidth"),10)||0)+(parseInt(a(b).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(a(b).css("borderLeftWidth"),10)||0)-(parseInt(a(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(a(b).css("borderTopWidth"),10)||0)-(parseInt(a(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(b,c){c||(c=this.position);var d="absolute"===b?1:-1,e="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d}},_generatePosition:function(b){var c,d,e=this.options,f=b.pageX,g=b.pageY,h="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(h[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top)),e.grid&&(c=this.originalPageY+Math.round((g-this.originalPageY)/e.grid[1])*e.grid[1],g=this.containment?c-this.offset.click.top>=this.containment[1]&&c-this.offset.click.top<=this.containment[3]?c:c-this.offset.click.top>=this.containment[1]?c-e.grid[1]:c+e.grid[1]:c,d=this.originalPageX+Math.round((f-this.originalPageX)/e.grid[0])*e.grid[0],f=this.containment?d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-e.grid[0]:d+e.grid[0]:d)),{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:h.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:h.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this.counter;this._delay(function(){e===this.counter&&this.refreshPositions(!d)})},_clear:function(a,b){this.reverting=!1;var c,d=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(c in this._storedCSS)"auto"!==this._storedCSS[c]&&"static"!==this._storedCSS[c]||(this._storedCSS[c]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!b&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||b||d.push(function(a){this._trigger("update",a,this._uiHash())}),this!==this.currentContainer&&(b||(d.push(function(a){this._trigger("remove",a,this._uiHash())}),d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer)),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer)))),c=this.containers.length-1;c>=0;c--)b||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[c])),this.containers[c].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[c])),this.containers[c].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!b){for(this._trigger("beforeStop",a,this._uiHash()),c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!1}if(b||this._trigger("beforeStop",a,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!b){for(c=0;c<d.length;c++)d[c].call(this,a);this._trigger("stop",a,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})}(jQuery),function(a,b){var c="ui-effects-";a.effects={effect:{}},function(a,b){function m(a,b,c){var d=h[b.type]||{};return null==a?c||!b.def?null:b.def:(a=d.floor?~~a:parseFloat(a),isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a)}function n(b){var c=f(),d=c._rgba=[];return b=b.toLowerCase(),l(e,function(a,e){var f,h=e.re.exec(b),i=h&&e.parse(h),j=e.space||"rgba";if(i)return f=c[j](i),c[g[j].cache]=f[g[j].cache],d=c._rgba=f._rgba,!1}),d.length?("0,0,0,0"===d.join()&&a.extend(d,k.transparent),c):k[b]}function o(a,b,c){return c=(c+1)%1,6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a}var k,c="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],f=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},g={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},h={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},i=f.support={},j=a("<p>")[0],l=a.each;j.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=j.style.backgroundColor.indexOf("rgba")>-1,l(g,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),f.fn=a.extend(f.prototype,{parse:function(c,d,e,h){if(c===b)return this._rgba=[null,null,null,null],this;(c.jquery||c.nodeType)&&(c=a(c).css(d),d=b);var i=this,j=a.type(c),o=this._rgba=[];return d!==b&&(c=[c,d,e,h],j="array"),"string"===j?this.parse(n(c)||k._default):"array"===j?(l(g.rgba.props,function(a,b){o[b.idx]=m(c[b.idx],b)}),this):"object"===j?(c instanceof f?l(g,function(a,b){c[b.cache]&&(i[b.cache]=c[b.cache].slice())}):l(g,function(b,d){var e=d.cache;l(d.props,function(a,b){if(!i[e]&&d.to){if("alpha"===a||null==c[a])return;i[e]=d.to(i._rgba)}i[e][b.idx]=m(c[a],b,!0)}),i[e]&&a.inArray(null,i[e].slice(0,3))<0&&(i[e][3]=1,d.from&&(i._rgba=d.from(i[e])))}),this):void 0},is:function(a){var b=f(a),c=!0,d=this;return l(g,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],l(e.props,function(a,b){if(null!=g[b.idx])return c=g[b.idx]===f[b.idx]})),c}),c},_space:function(){var a=[],b=this;return l(g,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var c=f(a),d=c._space(),e=g[d],i=0===this.alpha()?f("transparent"):this,j=i[e.cache]||e.to(i._rgba),k=j.slice();return c=c[e.cache],l(e.props,function(a,d){var e=d.idx,f=j[e],g=c[e],i=h[d.type]||{};null!==g&&(null===f?k[e]=g:(i.mod&&(g-f>i.mod/2?f+=i.mod:f-g>i.mod/2&&(f-=i.mod)),k[e]=m((g-f)*b+f,d)))}),this[d](k)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=f(b)._rgba;return f(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&b<3&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),f.fn.parse.prototype=f.fn,g.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var k,l,b=a[0]/255,c=a[1]/255,d=a[2]/255,e=a[3],f=Math.max(b,c,d),g=Math.min(b,c,d),h=f-g,i=f+g,j=.5*i;return k=g===f?0:b===f?60*(c-d)/h+360:c===f?60*(d-b)/h+120:60*(b-c)/h+240,l=0===h?0:j<=.5?h/i:h/(2-i),[Math.round(k)%360,l,j,null==e?1:e]},g.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],e=a[3],f=d<=.5?d*(1+c):d+c-d*c,g=2*d-f;return[Math.round(255*o(g,f,b+1/3)),Math.round(255*o(g,f,b)),Math.round(255*o(g,f,b-1/3)),e]},l(g,function(c,e){var g=e.props,h=e.cache,i=e.to,j=e.from;f.fn[c]=function(c){if(i&&!this[h]&&(this[h]=i(this._rgba)),c===b)return this[h].slice();var d,e=a.type(c),k="array"===e||"object"===e?c:arguments,n=this[h].slice();return l(g,function(a,b){var c=k["object"===e?a:b.idx];null==c&&(c=n[b.idx]),n[b.idx]=m(c,b)}),j?(d=f(j(n)),d[h]=n,d):f(n)},l(g,function(b,e){f.fn[b]||(f.fn[b]=function(f){var k,g=a.type(f),h="alpha"===b?this._hsla?"hsla":"rgba":c,i=this[h](),j=i[e.idx];return"undefined"===g?j:("function"===g&&(f=f.call(this,j),g=a.type(f)),null==f&&e.empty?this:("string"===g&&(k=d.exec(f),k&&(f=j+parseFloat(k[2])*("+"===k[1]?1:-1))),i[e.idx]=f,this[h](i)))})})}),f.hook=function(b){var c=b.split(" ");l(c,function(b,c){a.cssHooks[c]={set:function(b,d){var e,g,h="";if("transparent"!==d&&("string"!==a.type(d)||(e=n(d)))){if(d=f(e||d),!i.rgba&&1!==d._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(a){}d=d.blend(h&&"transparent"!==h?h:"_default")}d=d.toRgbaString()}try{b.style[c]=d}catch(a){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=f(b.elem,c),b.end=f(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},f.hook(c),a.cssHooks.borderColor={expand:function(a){var b={};return l(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},k=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function e(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function f(b,c){var f,g,e={};for(f in c)g=c[f],b[f]!==g&&(d[f]||!a.fx.step[f]&&isNaN(parseFloat(g))||(e[f]=g));return e}var c=["add","remove","toggle"],d={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,c){a.fx.step[c]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(jQuery.style(a.elem,c,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(b,d,g,h){var i=a.speed(d,g,h);return this.queue(function(){var h,d=a(this),g=d.attr("class")||"",j=i.children?d.find("*").addBack():d;j=j.map(function(){var b=a(this);return{el:b,start:e(this)}}),h=function(){a.each(c,function(a,c){b[c]&&d[c+"Class"](b[c])})},h(),j=j.map(function(){return this.end=e(this.el[0]),this.diff=f(this.start,this.end),this}),d.attr("class",g),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){h(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(d[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(c){return function(d,e,f,g,h){return"boolean"==typeof e||e===b?f?a.effects.animateClass.call(this,e?{add:d}:{remove:d},f,g,h):c.apply(this,arguments):a.effects.animateClass.call(this,{toggle:d},e,f,g)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function d(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function e(b){return!(b&&"number"!=typeof b&&!a.fx.speeds[b])||("string"==typeof b&&!a.effects.effect[b]||(!!a.isFunction(b)||"object"==typeof b&&!b.effect))}a.extend(a.effects,{version:"1.10.3",save:function(a,b){for(var d=0;d<b.length;d++)null!==b[d]&&a.data(c+b[d],a[0].style[b[d]])},restore:function(a,d){var e,f;for(f=0;f<d.length;f++)null!==d[f]&&(e=a.data(c+d[f]),e===b&&(e=""),a.css(d[f],e))},setMode:function(a,b){return"toggle"===b&&(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),float:b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(a){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function g(c){function h(){a.isFunction(e)&&e.call(d[0]),a.isFunction(c)&&c()}var d=a(this),e=b.complete,g=b.mode;(d.is(":hidden")?"hide"===g:"show"===g)?(d[g](),h()):f.call(d[0],b,h)}var b=d.apply(this,arguments),c=b.mode,e=b.queue,f=a.effects.effect[b.effect];return a.fx.off||!f?c?this[c](b.duration,b.complete):this.each(function(){b.complete&&b.complete.call(this)}):e===!1?this.each(g):this.queue(e||"fx",g)},show:function(a){return function(b){if(e(b))return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="show",this.effect.call(this,c)}}(a.fn.show),hide:function(a){return function(b){if(e(b))return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="hide",this.effect.call(this,c)}}(a.fn.hide),toggle:function(a){return function(b){if(e(b)||"boolean"==typeof b)return a.apply(this,arguments);var c=d.apply(this,arguments);return c.mode="toggle",this.effect.call(this,c)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return a<.5?c(2*a)/2:1-c(a*-2+2)/2}})}()}(jQuery),function(a,b){var c=0,d={},e={};d.height=d.paddingTop=d.paddingBottom=d.borderTopWidth=d.borderBottomWidth="hide",e.height=e.paddingTop=e.paddingBottom=e.borderTopWidth=e.borderBottomWidth="show",a.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var b=this.options;this.prevShow=this.prevHide=a(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),b.collapsible||b.active!==!1&&null!=b.active||(b.active=0),this._processPanels(),b.active<0&&(b.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():a(),content:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),a=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){return"active"===a?void this._activate(b):("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"!==a||b||this.options.active!==!1||this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),void("disabled"===a&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b)))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:f=this.headers[0];break;case c.END:f=this.headers[d-1]}f&&(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels(),b.active===!1&&b.collapsible===!0||!this.headers.length?(b.active=!1,this.active=a()):b.active===!1?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var b,d=this.options,e=d.heightStyle,f=this.element.parent(),g=this.accordionId="ui-accordion-"+(this.element.attr("id")||++c);this.active=this._findActive(d.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(b){var c=a(this),d=c.attr("id"),e=c.next(),f=e.attr("id");d||(d=g+"-header-"+b,c.attr("id",d)),f||(f=g+"-panel-"+b,e.attr("id",f)),c.attr("aria-controls",f),e.attr("aria-labelledby",d)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(d.event),"fill"===e?(b=f.height(),this.element.siblings(":visible").each(function(){var c=a(this),d=c.css("position");"absolute"!==d&&"fixed"!==d&&(b-=c.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===e&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){var c=this._findActive(b)[0];c!==this.active[0]&&(c=c||this.active[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,c),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e[0]===d[0],g=f&&c.collapsible,h=g?a():e.next(),i=d.next(),j={oldHeader:d,oldPanel:i,newHeader:g?a():e,newPanel:h};b.preventDefault(),f&&!c.collapsible||this._trigger("beforeActivate",b,j)===!1||(c.active=!g&&this.headers.index(e),this.active=f?a():e,this._toggle(j),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),f||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=c,this.prevHide=d,this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b)),d.attr({"aria-expanded":"false","aria-hidden":"true"}),d.prev().attr("aria-selected","false"),c.length&&d.length?d.prev().attr("tabIndex",-1):c.length&&this.headers.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),c.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(a,b,c){var f,g,h,i=this,j=0,k=a.length&&(!b.length||a.index()<b.index()),l=this.options.animate||{},m=k&&l.down||l,n=function(){i._toggleComplete(c)};return"number"==typeof m&&(h=m),"string"==typeof m&&(g=m),g=g||m.easing||l.easing,h=h||m.duration||l.duration,b.length?a.length?(f=a.show().outerHeight(),b.animate(d,{duration:h,easing:g,step:function(a,b){b.now=Math.round(a)}}),void a.hide().animate(e,{duration:h,easing:g,complete:n,step:function(a,c){c.now=Math.round(a),"height"!==c.prop?j+=c.now:"content"!==i.options.heightStyle&&(c.now=Math.round(f-b.outerHeight()-j),j=0)}})):b.animate(d,h,g,n):a.animate(e,h,g,n)},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),b.length&&(b.parent()[0].className=b.parent()[0].className),this._trigger("activate",null,a)}})}(jQuery),function(a,b){var c=0;a.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var b,c,d,e=this.element[0].nodeName.toLowerCase(),f="textarea"===e,g="input"===e;this.isMultiLine=!!f||!g&&this.element.prop("isContentEditable"),this.valueMethod=this.element[f||g?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))return b=!0,d=!0,void(c=!0);b=!1,d=!1,c=!1;var f=a.ui.keyCode;switch(e.keyCode){case f.PAGE_UP:b=!0,this._move("previousPage",e);break;case f.PAGE_DOWN:b=!0,this._move("nextPage",e);break;case f.UP:b=!0,this._keyEvent("previous",e);break;case f.DOWN:b=!0,this._keyEvent("next",e);break;case f.ENTER:case f.NUMPAD_ENTER:this.menu.active&&(b=!0,e.preventDefault(),this.menu.select(e));break;case f.TAB:this.menu.active&&this.menu.select(e);break;case f.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(e),e.preventDefault());break;default:c=!0,this._searchTimeout(e)}},keypress:function(d){if(b)return b=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||d.preventDefault());if(!c){var e=a.ui.keyCode;switch(d.keyCode){case e.PAGE_UP:this._move("previousPage",d);break;case e.PAGE_DOWN:this._move("nextPage",d);break;case e.UP:this._keyEvent("previous",d);break;case e.DOWN:this._keyEvent("next",d)}}},input:function(a){return d?(d=!1,void a.preventDefault()):void this._searchTimeout(a)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),void this._change(a))}}),this._initSource(),this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(b){b.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var c=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(d){d.target===b.element[0]||d.target===c||a.contains(c,d.target)||b.close()})})},menufocus:function(b,c){if(this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)});var d=c.item.data("ui-autocomplete-item");!1!==this._trigger("focus",b,{item:d})?b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(d.value):this.liveRegion.text(d.value)},menuselect:function(a,b){var c=b.item.data("ui-autocomplete-item"),d=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=d,this._delay(function(){this.previous=d,this.selectedItem=c})),!1!==this._trigger("select",a,{item:c})&&this._value(c.value),this.term=this._value(),this.close(a),this.selectedItem=c}}),this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(a,b){this._super(a,b),"source"===a&&this._initSource(),"appendTo"===a&&this.menu.element.appendTo(this._appendTo()),"disabled"===a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var b=this.options.appendTo;return b&&(b=b.jquery||b.nodeType?a(b):this.document.find(b).eq(0)),b||(b=this.element.closest(".ui-front")),b.length||(b=this.document[0].body),b},_initSource:function(){var b,c,d=this;a.isArray(this.options.source)?(b=this.options.source,this.source=function(c,d){d(a.ui.autocomplete.filter(b,c.term))}):"string"==typeof this.options.source?(c=this.options.source,this.source=function(b,e){d.xhr&&d.xhr.abort(),d.xhr=a.ajax({url:c,data:b,dataType:"json",success:function(a){e(a)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,b){return a=null!=a?a:this._value(),this.term=this._value(),a.length<this.options.minLength?this.close(b):this._trigger("search",b)!==!1?this._search(a):void 0},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&&a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){a&&(a=this._normalize(a)),this._trigger("response",null,{content:a}),!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):this._close()},close:function(a){this.cancelSearch=!0,this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&&b[0].label&&b[0].value?b:a.map(b,function(b){return"string"==typeof b?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty();this._renderMenu(c,b),this.isNewMenu=!0,this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItemData(b,c)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(b,c){return a("<li>").append(a("<a>").text(c.label)).appendTo(b)},_move:function(a,b){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a)?(this._value(this.term),void this.menu.blur()):void this.menu[a](b):void this.search(null,b)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(a,b),b.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(a>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(a){var b;this._superApply(arguments),this.options.disabled||this.cancelSearch||(b=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults,this.liveRegion.text(b))}})}(jQuery),function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this);setTimeout(function(){b.find(":ui-button").button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&&(c=c.replace(/'/g,"\\'"),e=d?a(d).find("[name='"+c+"']"):a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,j),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i="checkbox"===this.type||"radio"===this.type,l=i?"":"ui-state-active",m="ui-state-focus";null===h.label&&(h.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){h.disabled||this===c&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){h.disabled||a(this).removeClass(l)}).bind("click"+this.eventNamespace,function(a){h.disabled&&(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){b.buttonElement.addClass(m)}).bind("blur"+this.eventNamespace,function(){b.buttonElement.removeClass(m)}),i&&(this.element.bind("change"+this.eventNamespace,function(){f||b.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(a){h.disabled||(f=!1,d=a.pageX,e=a.pageY)}).bind("mouseup"+this.eventNamespace,function(a){h.disabled||d===a.pageX&&e===a.pageY||(f=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(h.disabled||f)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!h.disabled&&(a(this).addClass("ui-state-active"),c=this,void b.document.one("mouseup",function(){c=null}))}).bind("mouseup"+this.eventNamespace,function(){return!h.disabled&&void a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(b){return!h.disabled&&void(b.keyCode!==a.ui.keyCode.SPACE&&b.keyCode!==a.ui.keyCode.ENTER||a(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&&a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){var a,b,c;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button","checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),b="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible"),c=this.element.is(":checked"),c&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",c)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,b){return this._super(a,b),"disabled"===a?void(b?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b),"radio"===this.type?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var b=this.buttonElement.removeClass(i),c=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];d.primary||d.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&&b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>"),d.secondary&&b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",a.trim(c)))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,b){"disabled"===a&&this.buttons.button("option",a,b),this._super(a,b)},refresh:function(){var b="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(jQuery),function(a,b){function e(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},a.extend(this._defaults,this.regional[""]),this.dpDiv=f(a("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function f(b){var c="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return b.delegate(c,"mouseout",function(){a(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).removeClass("ui-datepicker-next-hover")}).delegate(c,"mouseover",function(){a.datepicker._isDisabledDatepicker(d.inline?b.parent()[0]:d.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&a(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&a(this).addClass("ui-datepicker-next-hover"))})}function g(b,c){a.extend(b,c);for(var d in c)null==c[d]&&(b[d]=c[d]);return b}a.extend(a.ui,{datepicker:{version:"1.10.3"}});var d,c="datepicker";a.extend(e.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return g(this._defaults,a||{}),this},_attachDatepicker:function(b,c){var d,e,f;d=b.nodeName.toLowerCase(),e="div"===d||"span"===d,b.id||(this.uuid+=1,b.id="dp"+this.uuid),f=this._newInst(a(b),e),f.settings=a.extend({},c||{}),"input"===d?this._connectDatepicker(b,f):e&&this._inlineDatepicker(b,f)},_newInst:function(b,c){var d=b[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:d,input:b,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:c,dpDiv:c?f(a("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(b,d){var e=a(b);d.append=a([]),d.trigger=a([]),e.hasClass(this.markerClassName)||(this._attachments(e,d),e.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(d),a.data(b,c,d),d.settings.disabled&&this._disableDatepicker(b))},_attachments:function(b,c){var d,e,f,g=this._get(c,"appendText"),h=this._get(c,"isRTL");c.append&&c.append.remove(),g&&(c.append=a("<span class='"+this._appendClass+"'>"+g+"</span>"),b[h?"before":"after"](c.append)),b.unbind("focus",this._showDatepicker),c.trigger&&c.trigger.remove(),d=this._get(c,"showOn"),"focus"!==d&&"both"!==d||b.focus(this._showDatepicker),"button"!==d&&"both"!==d||(e=this._get(c,"buttonText"),f=this._get(c,"buttonImage"),c.trigger=a(this._get(c,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:f,alt:e,title:e}):a("<button type='button'></button>").addClass(this._triggerClass).html(f?a("<img/>").attr({src:f,alt:e,title:e}):e)),b[h?"before":"after"](c.trigger),c.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===b[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==b[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(b[0])):a.datepicker._showDatepicker(b[0]),!1}))},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,d,e,f=new Date(2009,11,20),g=this._get(a,"dateFormat");g.match(/[DM]/)&&(b=function(a){for(c=0,d=0,e=0;e<a.length;e++)a[e].length>c&&(c=a[e].length,d=e);return d},f.setMonth(b(this._get(a,g.match(/MM/)?"monthNames":"monthNamesShort"))),f.setDate(b(this._get(a,g.match(/DD/)?"dayNames":"dayNamesShort"))+20-f.getDay())),a.input.attr("size",this._formatDate(a,f).length)}},_inlineDatepicker:function(b,d){var e=a(b);e.hasClass(this.markerClassName)||(e.addClass(this.markerClassName).append(d.dpDiv),a.data(b,c,d),this._setDate(d,this._getDefaultDate(d),!0),this._updateDatepicker(d),this._updateAlternate(d),d.settings.disabled&&this._disableDatepicker(b),d.dpDiv.css("display","block"))},_dialogDatepicker:function(b,d,e,f,h){var i,j,k,l,m,n=this._dialogInst;return n||(this.uuid+=1,i="dp"+this.uuid,this._dialogInput=a("<input type='text' id='"+i+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),n=this._dialogInst=this._newInst(this._dialogInput,!1),n.settings={},a.data(this._dialogInput[0],c,n)),g(n.settings,f||{}),d=d&&d.constructor===Date?this._formatDate(n,d):d,this._dialogInput.val(d),this._pos=h?h.length?h:[h.pageX,h.pageY]:null,this._pos||(j=document.documentElement.clientWidth,k=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,m=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[j/2-100+l,k/2-150+m]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),n.settings.onSelect=e,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],c,n),this},_destroyDatepicker:function(b){var d,e=a(b),f=a.data(b,c);e.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),a.removeData(b,c),"input"===d?(f.append.remove(),f.trigger.remove(),e.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==d&&"span"!==d||e.removeClass(this.markerClassName).empty())},_enableDatepicker:function(b){var d,e,f=a(b),g=a.data(b,c);f.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),"input"===d?(b.disabled=!1,g.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==d&&"span"!==d||(e=f.children("."+this._inlineClass),e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}))},_disableDatepicker:function(b){var d,e,f=a(b),g=a.data(b,c);f.hasClass(this.markerClassName)&&(d=b.nodeName.toLowerCase(),"input"===d?(b.disabled=!0,g.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==d&&"span"!==d||(e=f.children("."+this._inlineClass),e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=a.map(this._disabledInputs,function(a){return a===b?null:a}),this._disabledInputs[this._disabledInputs.length]=b)},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===a)return!0;return!1},_getInst:function(b){try{return a.data(b,c)}catch(a){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(c,d,e){var f,h,i,j,k=this._getInst(c);return 2===arguments.length&&"string"==typeof d?"defaults"===d?a.extend({},a.datepicker._defaults):k?"all"===d?a.extend({},k.settings):this._get(k,d):null:(f=d||{},"string"==typeof d&&(f={},f[d]=e),void(k&&(this._curInst===k&&this._hideDatepicker(),h=this._getDateDatepicker(c,!0),i=this._getMinMaxDate(k,"min"),j=this._getMinMaxDate(k,"max"),g(k.settings,f),null!==i&&f.dateFormat!==b&&f.minDate===b&&(k.settings.minDate=this._formatDate(k,i)),null!==j&&f.dateFormat!==b&&f.maxDate===b&&(k.settings.maxDate=this._formatDate(k,j)),"disabled"in f&&(f.disabled?this._disableDatepicker(c):this._enableDatepicker(c)),this._attachments(a(c),k),this._autoSize(k),this._setDate(k,h),this._updateAlternate(k),this._updateDatepicker(k))))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&&this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(b){var c,d,e,f=a.datepicker._getInst(b.target),g=!0,h=f.dpDiv.is(".ui-datepicker-rtl");if(f._keyEvent=!0,a.datepicker._datepickerShowing)switch(b.keyCode){case 9:a.datepicker._hideDatepicker(),g=!1;break;case 13:return e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv),e[0]&&a.datepicker._selectDay(b.target,f.selectedMonth,f.selectedYear,e[0]),c=a.datepicker._get(f,"onSelect"),c?(d=a.datepicker._formatDate(f),c.apply(f.input?f.input[0]:null,[d,f])):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:(b.ctrlKey||b.metaKey)&&a.datepicker._clearDate(b.target),g=b.ctrlKey||b.metaKey;break;case 36:(b.ctrlKey||b.metaKey)&&a.datepicker._gotoToday(b.target),g=b.ctrlKey||b.metaKey;break;case 37:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?1:-1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,-7,"D"),g=b.ctrlKey||b.metaKey;break;case 39:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,h?-1:1,"D"),g=b.ctrlKey||b.metaKey,b.originalEvent.altKey&&a.datepicker._adjustDate(b.target,b.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 40:(b.ctrlKey||b.metaKey)&&a.datepicker._adjustDate(b.target,7,"D"),g=b.ctrlKey||b.metaKey;break;default:g=!1}else 36===b.keyCode&&b.ctrlKey?a.datepicker._showDatepicker(this):g=!1;g&&(b.preventDefault(),b.stopPropagation())},_doKeyPress:function(b){var c,d,e=a.datepicker._getInst(b.target);if(a.datepicker._get(e,"constrainInput"))return c=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat")),d=String.fromCharCode(null==b.charCode?b.keyCode:b.charCode),b.ctrlKey||b.metaKey||d<" "||!c||c.indexOf(d)>-1},_doKeyUp:function(b){var c,d=a.datepicker._getInst(b.target);if(d.input.val()!==d.lastVal)try{c=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)),c&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),a.datepicker._updateDatepicker(d))}catch(a){}return!0},_showDatepicker:function(b){if(b=b.target||b,"input"!==b.nodeName.toLowerCase()&&(b=a("input",b.parentNode)[0]),!a.datepicker._isDisabledDatepicker(b)&&a.datepicker._lastInput!==b){var c,d,e,f,h,i,j;c=a.datepicker._getInst(b),a.datepicker._curInst&&a.datepicker._curInst!==c&&(a.datepicker._curInst.dpDiv.stop(!0,!0),c&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0])),d=a.datepicker._get(c,"beforeShow"),e=d?d.apply(b,[b,c]):{},e!==!1&&(g(c.settings,e),c.lastVal=null,a.datepicker._lastInput=b,a.datepicker._setDateFromField(c),a.datepicker._inDialog&&(b.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(b),a.datepicker._pos[1]+=b.offsetHeight),f=!1,a(b).parents().each(function(){return f|="fixed"===a(this).css("position"),!f}),h={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,c.dpDiv.empty(),c.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),a.datepicker._updateDatepicker(c),h=a.datepicker._checkOffset(c,h,f),c.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":f?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),c.inline||(i=a.datepicker._get(c,"showAnim"),j=a.datepicker._get(c,"duration"),c.dpDiv.zIndex(a(b).zIndex()+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[i]?c.dpDiv.show(i,a.datepicker._get(c,"showOptions"),j):c.dpDiv[i||"show"](i?j:null),a.datepicker._shouldFocusInput(c)&&c.input.focus(),a.datepicker._curInst=c))}},_updateDatepicker:function(b){this.maxRows=4,d=b,b.dpDiv.empty().append(this._generateHTML(b)),this._attachHandlers(b),b.dpDiv.find("."+this._dayOverClass+" a").mouseover();var c,e=this._getNumberOfMonths(b),f=e[1],g=17;b.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f>1&&b.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),b.dpDiv[(1!==e[0]||1!==e[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),b.dpDiv[(this._get(b,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),b===a.datepicker._curInst&&a.datepicker._datepickerShowing&&a.datepicker._shouldFocusInput(b)&&b.input.focus(),b.yearshtml&&(c=b.yearshtml,setTimeout(function(){c===b.yearshtml&&b.yearshtml&&b.dpDiv.find("select.ui-datepicker-year:first").replaceWith(b.yearshtml),c=b.yearshtml=null},0))},_shouldFocusInput:function(a){return a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&!a.input.is(":focus")},_checkOffset:function(b,c,d){var e=b.dpDiv.outerWidth(),f=b.dpDiv.outerHeight(),g=b.input?b.input.outerWidth():0,h=b.input?b.input.outerHeight():0,i=document.documentElement.clientWidth+(d?0:a(document).scrollLeft()),j=document.documentElement.clientHeight+(d?0:a(document).scrollTop());return c.left-=this._get(b,"isRTL")?e-g:0,c.left-=d&&c.left===b.input.offset().left?a(document).scrollLeft():0,c.top-=d&&c.top===b.input.offset().top+h?a(document).scrollTop():0,c.left-=Math.min(c.left,c.left+e>i&&i>e?Math.abs(c.left+e-i):0),c.top-=Math.min(c.top,c.top+f>j&&j>f?Math.abs(f+h):0),c},_findPos:function(b){for(var c,d=this._getInst(b),e=this._get(d,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var d,e,f,g,h=this._curInst;!h||b&&h!==a.data(b,c)||this._datepickerShowing&&(d=this._get(h,"showAnim"),e=this._get(h,"duration"),f=function(){a.datepicker._tidyDialog(h)},a.effects&&(a.effects.effect[d]||a.effects[d])?h.dpDiv.hide(d,a.datepicker._get(h,"showOptions"),e,f):h.dpDiv["slideDown"===d?"slideUp":"fadeIn"===d?"fadeOut":"hide"](d?e:null,f),d||f(),this._datepickerShowing=!1,g=this._get(h,"onClose"),g&&g.apply(h.input?h.input[0]:null,[h.input?h.input.val():"",h]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){var c=a(b.target),d=a.datepicker._getInst(c[0]);(c[0].id===a.datepicker._mainDivId||0!==c.parents("#"+a.datepicker._mainDivId).length||c.hasClass(a.datepicker.markerClassName)||c.closest("."+a.datepicker._triggerClass).length||!a.datepicker._datepickerShowing||a.datepicker._inDialog&&a.blockUI)&&(!c.hasClass(a.datepicker.markerClassName)||a.datepicker._curInst===d)||a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,d){var e=a(b),f=this._getInst(e[0]);this._isDisabledDatepicker(e[0])||(this._adjustInstDate(f,c+("M"===d?this._get(f,"showCurrentAtPos"):0),d),this._updateDatepicker(f))},_gotoToday:function(b){var c,d=a(b),e=this._getInst(d[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear()),this._notifyChange(e),this._adjustDate(d)},_selectMonthYear:function(b,c,d){var e=a(b),f=this._getInst(e[0]);f["selected"+("M"===d?"Month":"Year")]=f["draw"+("M"===d?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10),this._notifyChange(f),this._adjustDate(e)},_selectDay:function(b,c,d,e){var f,g=a(b);a(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(g[0])||(f=this._getInst(g[0]),f.selectedDay=f.currentDay=a("a",e).html(),f.selectedMonth=f.currentMonth=c,f.selectedYear=f.currentYear=d,this._selectDate(b,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(b){var c=a(b);this._selectDate(c,"")},_selectDate:function(b,c){var d,e=a(b),f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f),f.input&&f.input.val(c),this._updateAlternate(f),d=this._get(f,"onSelect"),d?d.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change"),f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,d,e,f=this._get(b,"altField");f&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),d=this._getDate(b),e=this.formatDate(c,d,this._getFormatConfig(b)),a(f).each(function(){a(this).val(e)}))},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b,c=new Date(a.getTime());return c.setDate(c.getDate()+4-(c.getDay()||7)),b=c.getTime(),c.setMonth(0),c.setDate(1),Math.floor(Math.round((b-c)/864e5)/7)+1},parseDate:function(b,c,d){if(null==b||null==c)throw"Invalid arguments";if(c="object"==typeof c?c.toString():c+"",""===c)return null;var e,f,g,t,h=0,i=(d?d.shortYearCutoff:null)||this._defaults.shortYearCutoff,j="string"!=typeof i?i:(new Date).getFullYear()%100+parseInt(i,10),k=(d?d.dayNamesShort:null)||this._defaults.dayNamesShort,l=(d?d.dayNames:null)||this._defaults.dayNames,m=(d?d.monthNamesShort:null)||this._defaults.monthNamesShort,n=(d?d.monthNames:null)||this._defaults.monthNames,o=-1,p=-1,q=-1,r=-1,s=!1,u=function(a){var c=e+1<b.length&&b.charAt(e+1)===a;return c&&e++,c},v=function(a){var b=u(a),d="@"===a?14:"!"===a?20:"y"===a&&b?4:"o"===a?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=c.substring(h).match(e);if(!f)throw"Missing number at position "+h;return h+=f[0].length,parseInt(f[0],10)},w=function(b,d,e){var f=-1,g=a.map(u(b)?e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});if(a.each(g,function(a,b){var d=b[1];if(c.substr(h,d.length).toLowerCase()===d.toLowerCase())return f=b[0],h+=d.length,!1}),f!==-1)return f+1;throw"Unknown name at position "+h},x=function(){if(c.charAt(h)!==b.charAt(e))throw"Unexpected literal at position "+h;h++};for(e=0;e<b.length;e++)if(s)"'"!==b.charAt(e)||u("'")?x():s=!1;else switch(b.charAt(e)){case"d":q=v("d");break;case"D":w("D",k,l);break;case"o":r=v("o");break;case"m":p=v("m");break;case"M":p=w("M",m,n);break;case"y":o=v("y");break;case"@":t=new Date(v("@")),o=t.getFullYear(),p=t.getMonth()+1,q=t.getDate();break;case"!":t=new Date((v("!")-this._ticksTo1970)/1e4),o=t.getFullYear(),p=t.getMonth()+1,q=t.getDate();break;case"'":u("'")?x():s=!0;break;default:x()}if(h<c.length&&(g=c.substr(h),!/^\s+/.test(g)))throw"Extra/unparsed characters found in date: "+g;if(o===-1?o=(new Date).getFullYear():o<100&&(o+=(new Date).getFullYear()-(new Date).getFullYear()%100+(o<=j?0:-100)),r>-1)for(p=1,q=r;;){if(f=this._getDaysInMonth(o,p-1),q<=f)break;p++,q-=f}if(t=this._daylightSavingAdjust(new Date(o,p-1,q)),t.getFullYear()!==o||t.getMonth()+1!==p||t.getDate()!==q)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=function(b){var c=d+1<a.length&&a.charAt(d+1)===b;return c&&d++,c},j=function(a,b,c){var d=""+b;if(i(a))for(;d.length<c;)d="0"+d;return d},k=function(a,b,c,d){return i(a)?d[b]:c[b]},l="",m=!1;if(b)for(d=0;d<a.length;d++)if(m)"'"!==a.charAt(d)||i("'")?l+=a.charAt(d):m=!1;else switch(a.charAt(d)){case"d":l+=j("d",b.getDate(),2);break;case"D":l+=k("D",b.getDay(),e,f);break;case"o":l+=j("o",Math.round((new Date(b.getFullYear(),b.getMonth(),b.getDate()).getTime()-new Date(b.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=j("m",b.getMonth()+1,2);break;case"M":l+=k("M",b.getMonth(),g,h);break;case"y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":l+=b.getTime();break;case"!":l+=1e4*b.getTime()+this._ticksTo1970;break;case"'":i("'")?l+="'":m=!0;break;default:l+=a.charAt(d)}return l},_possibleChars:function(a){var b,c="",d=!1,e=function(c){var d=b+1<a.length&&a.charAt(b+1)===c;return d&&b++,d};for(b=0;b<a.length;b++)if(d)"'"!==a.charAt(b)||e("'")?c+=a.charAt(b):d=!1;else switch(a.charAt(b)){case"d":case"m":case"y":case"@":c+="0123456789";break;case"D":case"M":return null;case"'":e("'")?c+="'":d=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,c){return a.settings[c]!==b?a.settings[c]:this._defaults[c]},_setDateFromField:function(a,b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e=this._getDefaultDate(a),f=e,g=this._getFormatConfig(a);try{f=this.parseDate(c,d,g)||e}catch(a){d=b?"":d}a.selectedDay=f.getDate(),a.drawMonth=a.selectedMonth=f.getMonth(),a.drawYear=a.selectedYear=f.getFullYear(),a.currentDay=d?f.getDate():0,a.currentMonth=d?f.getMonth():0,a.currentYear=d?f.getFullYear():0,this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,d){var e=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},f=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(a){}for(var d=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(c);i;){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=7*parseInt(i[1],10);break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,a.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,a.datepicker._getDaysInMonth(e,f))}i=h.exec(c)}return new Date(e,f,g)},g=null==c||""===c?d:"string"==typeof c?f(c):"number"==typeof c?isNaN(c)?d:e(c):new Date(c.getTime());return g=g&&"Invalid Date"===g.toString()?d:g,g&&(g.setHours(0),g.setMinutes(0),g.setSeconds(0),g.setMilliseconds(0)),this._daylightSavingAdjust(g)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()>12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),e===a.selectedMonth&&f===a.selectedYear||c||this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),d="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){var b={prev:function(){a.datepicker._adjustDate(d,-c,"M")},next:function(){a.datepicker._adjustDate(d,+c,"M")},hide:function(){a.datepicker._hideDatepicker()},today:function(){a.datepicker._gotoToday(d)},selectDay:function(){return a.datepicker._selectDay(d,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return a.datepicker._selectMonthYear(d,this,"M"),!1},selectYear:function(){return a.datepicker._selectMonthYear(d,this,"Y"),!1}};a(this).bind(this.getAttribute("data-event"),b[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O=new Date,P=this._daylightSavingAdjust(new Date(O.getFullYear(),O.getMonth(),O.getDate())),Q=this._get(a,"isRTL"),R=this._get(a,"showButtonPanel"),S=this._get(a,"hideIfNoPrevNext"),T=this._get(a,"navigationAsDateFormat"),U=this._getNumberOfMonths(a),V=this._get(a,"showCurrentAtPos"),W=this._get(a,"stepMonths"),X=1!==U[0]||1!==U[1],Y=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),Z=this._getMinMaxDate(a,"min"),$=this._getMinMaxDate(a,"max"),_=a.drawMonth-V,aa=a.drawYear;if(_<0&&(_+=12,aa--),$)for(b=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),b=Z&&b<Z?Z:b;this._daylightSavingAdjust(new Date(aa,_,1))>b;)_--,_<0&&(_=11,aa--);for(a.drawMonth=_,a.drawYear=aa,c=this._get(a,"prevText"),c=T?this.formatDate(c,this._daylightSavingAdjust(new Date(aa,_-W,1)),this._getFormatConfig(a)):c,d=this._canAdjustMonth(a,-1,aa,_)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>":S?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"e":"w")+"'>"+c+"</span></a>",e=this._get(a,"nextText"),e=T?this.formatDate(e,this._daylightSavingAdjust(new Date(aa,_+W,1)),this._getFormatConfig(a)):e,f=this._canAdjustMonth(a,1,aa,_)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>":S?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+e+"'><span class='ui-icon ui-icon-circle-triangle-"+(Q?"w":"e")+"'>"+e+"</span></a>",g=this._get(a,"currentText"),h=this._get(a,"gotoCurrent")&&a.currentDay?Y:P,g=T?this.formatDate(g,h,this._getFormatConfig(a)):g,i=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+"</button>",j=R?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Q?i:"")+(this._isInRange(a,h)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+g+"</button>":"")+(Q?"":i)+"</div>":"",k=parseInt(this._get(a,"firstDay"),10),k=isNaN(k)?0:k,l=this._get(a,"showWeek"),m=this._get(a,"dayNames"),n=this._get(a,"dayNamesMin"),o=this._get(a,"monthNames"),p=this._get(a,"monthNamesShort"),q=this._get(a,"beforeShowDay"),r=this._get(a,"showOtherMonths"),s=this._get(a,"selectOtherMonths"),t=this._getDefaultDate(a),u="",w=0;w<U[0];w++){for(x="",this.maxRows=4,y=0;y<U[1];y++){if(z=this._daylightSavingAdjust(new Date(aa,_,a.selectedDay)),A=" ui-corner-all",B="",X){if(B+="<div class='ui-datepicker-group",U[1]>1)switch(y){case 0:B+=" ui-datepicker-group-first",A=" ui-corner-"+(Q?"right":"left");break;case U[1]-1:B+=" ui-datepicker-group-last",A=" ui-corner-"+(Q?"left":"right");break;default:B+=" ui-datepicker-group-middle",A=""}B+="'>"}for(B+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+A+"'>"+(/all|left/.test(A)&&0===w?Q?f:d:"")+(/all|right/.test(A)&&0===w?Q?d:f:"")+this._generateMonthYearHeader(a,_,aa,Z,$,w>0||y>0,o,p)+"</div><table class='ui-datepicker-calendar'><thead><tr>",C=l?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"",v=0;v<7;v++)D=(v+k)%7,C+="<th"+((v+k+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+m[D]+"'>"+n[D]+"</span></th>";for(B+=C+"</tr></thead><tbody>",E=this._getDaysInMonth(aa,_),aa===a.selectedYear&&_===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E)),F=(this._getFirstDayOfMonth(aa,_)-k+7)%7,G=Math.ceil((F+E)/7),H=X&&this.maxRows>G?this.maxRows:G,this.maxRows=H,I=this._daylightSavingAdjust(new Date(aa,_,1-F)),J=0;J<H;J++){for(B+="<tr>",K=l?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(I)+"</td>":"",v=0;v<7;v++)L=q?q.apply(a.input?a.input[0]:null,[I]):[!0,""],M=I.getMonth()!==_,N=M&&!s||!L[0]||Z&&I<Z||$&&I>$,K+="<td class='"+((v+k+6)%7>=5?" ui-datepicker-week-end":"")+(M?" ui-datepicker-other-month":"")+(I.getTime()===z.getTime()&&_===a.selectedMonth&&a._keyEvent||t.getTime()===I.getTime()&&t.getTime()===z.getTime()?" "+this._dayOverClass:"")+(N?" "+this._unselectableClass+" ui-state-disabled":"")+(M&&!r?"":" "+L[1]+(I.getTime()===Y.getTime()?" "+this._currentClass:"")+(I.getTime()===P.getTime()?" ui-datepicker-today":""))+"'"+(M&&!r||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(N?"":" data-handler='selectDay' data-event='click' data-month='"+I.getMonth()+"' data-year='"+I.getFullYear()+"'")+">"+(M&&!r?"&#xa0;":N?"<span class='ui-state-default'>"+I.getDate()+"</span>":"<a class='ui-state-default"+(I.getTime()===P.getTime()?" ui-state-highlight":"")+(I.getTime()===Y.getTime()?" ui-state-active":"")+(M?" ui-priority-secondary":"")+"' href='#'>"+I.getDate()+"</a>")+"</td>",I.setDate(I.getDate()+1),I=this._daylightSavingAdjust(I);B+=K+"</tr>"}_++,_>11&&(_=0,aa++),B+="</tbody></table>"+(X?"</div>"+(U[0]>0&&y===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=B}u+=x}return u+=j,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i,j,k,l,m,n,o,p,q=this._get(a,"changeMonth"),r=this._get(a,"changeYear"),s=this._get(a,"showMonthAfterYear"),t="<div class='ui-datepicker-title'>",u="";if(f||!q)u+="<span class='ui-datepicker-month'>"+g[b]+"</span>";else{for(i=d&&d.getFullYear()===c,j=e&&e.getFullYear()===c,u+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",k=0;k<12;k++)(!i||k>=d.getMonth())&&(!j||k<=e.getMonth())&&(u+="<option value='"+k+"'"+(k===b?" selected='selected'":"")+">"+h[k]+"</option>");u+="</select>"}if(s||(t+=u+(!f&&q&&r?"":"&#xa0;")),!a.yearshtml)if(a.yearshtml="",f||!r)t+="<span class='ui-datepicker-year'>"+c+"</span>";else{for(l=this._get(a,"yearRange").split(":"),m=(new Date).getFullYear(),n=function(a){var b=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?m+parseInt(a,10):parseInt(a,10);return isNaN(b)?m:b},o=n(l[0]),p=Math.max(o,n(l[1]||"")),o=d?Math.max(o,d.getFullYear()):o,p=e?Math.min(p,e.getFullYear()):p,a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";o<=p;o++)a.yearshtml+="<option value='"+o+"'"+(o===c?" selected='selected'":"")+">"+o+"</option>";a.yearshtml+="</select>",t+=a.yearshtml,a.yearshtml=null}return t+=this._get(a,"yearSuffix"),s&&(t+=(!f&&q&&r?"":"&#xa0;")+u),t+="</div>"},_adjustInstDate:function(a,b,c){var d=a.drawYear+("Y"===c?b:0),e=a.drawMonth+("M"===c?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+("D"===c?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),"M"!==c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&&b<c?c:b;return d&&e>d?d:e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return null==b?[1,1]:"number"==typeof b?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return new Date(a,b,1).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));return b<0&&f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c,d,e=this._getMinMaxDate(a,"min"),f=this._getMinMaxDate(a,"max"),g=null,h=null,i=this._get(a,"yearRange");return i&&(c=i.split(":"),d=(new Date).getFullYear(),g=parseInt(c[0],10),h=parseInt(c[1],10),c[0].match(/[+\-].*/)&&(g+=d),c[1].match(/[+\-].*/)&&(h+=d)),(!e||b.getTime()>=e.getTime())&&(!f||b.getTime()<=f.getTime())&&(!g||b.getFullYear()>=g)&&(!h||b.getFullYear()<=h)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0),0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))},a.datepicker=new e,a.datepicker.initialized=!1,a.datepicker.uuid=(new Date).getTime(),a.datepicker.version="1.10.3"}(jQuery),function(a,b){var c={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},d={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c<0&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&a.fn.draggable&&this._makeDraggable(),this.options.resizable&&a.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,b=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),a=b.parent.children().eq(b.index),a.length&&a[0]!==this.element[0]?a.before(this.element):b.parent.append(this.element)},widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c=this;this._isOpen&&this._trigger("beforeClose",b)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||a(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,b){var c=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return c&&!b&&this._trigger("focus",a),c},open:function(){var b=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=a(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){b._focusTabbable(),b._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var a=this.element.find("[autofocus]");a.length||(a=this.element.find(":tabbable")),a.length||(a=this.uiDialogButtonPane.find(":tabbable")),a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable")),a.length||(a=this.uiDialog),a.eq(0).focus()},_keepFocus:function(b){function c(){var b=this.document[0].activeElement,c=this.uiDialog[0]===b||a.contains(this.uiDialog[0],b);c||this._focusTabbable()}b.preventDefault(),c.call(this),this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)return b.preventDefault(),void this.close(b);if(b.keyCode===a.ui.keyCode.TAB){var c=this.uiDialog.find(":tabbable"),d=c.filter(":first"),e=c.filter(":last");b.target!==e[0]&&b.target!==this.uiDialog[0]||b.shiftKey?b.target!==d[0]&&b.target!==this.uiDialog[0]||!b.shiftKey||(e.focus(1),b.preventDefault()):(d.focus(1),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=a("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault(),this.close(a)}}),b=a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(b),this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title||a.html("&#160;"),a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),a.isEmptyObject(c)||a.isArray(c)&&!c.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d,d=a.extend({type:"button"},d),e=d.click,d.click=function(){e.apply(b.element[0],arguments)},f={icons:d.icons,text:d.showText},delete d.icons,delete d.showText,a("<button></button>",d).button(f).appendTo(b.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function d(a){return{position:a.position,offset:a.offset}}var b=this,c=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(c,e){a(this).addClass("ui-dialog-dragging"),b._blockFrames(),b._trigger("dragStart",c,d(e))},drag:function(a,c){b._trigger("drag",a,d(c))},stop:function(e,f){c.position=[f.position.left-b.document.scrollLeft(),f.position.top-b.document.scrollTop()],a(this).removeClass("ui-dialog-dragging"),b._unblockFrames(),b._trigger("dragStop",e,d(f))}})},_makeResizable:function(){function g(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var b=this,c=this.options,d=c.resizable,e=this.uiDialog.css("position"),f="string"==typeof d?d:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:c.maxWidth,maxHeight:c.maxHeight,minWidth:c.minWidth,minHeight:this._minHeight(),handles:f,start:function(c,d){a(this).addClass("ui-dialog-resizing"),b._blockFrames(),b._trigger("resizeStart",c,g(d))},resize:function(a,c){b._trigger("resize",a,g(c))},stop:function(d,e){c.height=a(this).height(),c.width=a(this).width(),a(this).removeClass("ui-dialog-resizing"),b._unblockFrames(),b._trigger("resizeStop",d,g(e))}}).css("position",e)},_minHeight:function(){var a=this.options;return"auto"===a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show(),this.uiDialog.position(this.options.position),a||this.uiDialog.hide()},_setOptions:function(b){var e=this,f=!1,g={};a.each(b,function(a,b){e._setOption(a,b),a in c&&(f=!0),a in d&&(g[a]=b)}),f&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",g)},_setOption:function(a,b){var c,d,e=this.uiDialog;"dialogClass"===a&&e.removeClass(this.options.dialogClass).addClass(b),"disabled"!==a&&(this._super(a,b),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+b}),"draggable"===a&&(c=e.is(":data(ui-draggable)"),c&&!b&&e.draggable("destroy"),!c&&b&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&(d=e.is(":data(ui-resizable)"),d&&!b&&e.resizable("destroy"),d&&"string"==typeof b&&e.resizable("option","handles",b),d||b===!1||this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,b,c,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),d.minWidth>d.width&&(d.width=d.minWidth),a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight(),b=Math.max(0,d.minHeight-a),c="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none","auto"===d.height?this.element.css({minHeight:b,maxHeight:c,height:"auto"}):this.element.height(Math.max(0,d.height-a)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var b=a(this);return a("<div>").css({position:"absolute",width:b.outerWidth(),height:b.outerHeight()}).appendTo(b.parent()).offset(b.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(b){return!!a(b.target).closest(".ui-dialog").length||!!a(b.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var b=this,c=this.widgetFullName;a.ui.dialog.overlayInstances||this._delay(function(){a.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(d){b._allowInteraction(d)||(d.preventDefault(),a(".ui-dialog:visible:last .ui-dialog-content").data(c)._focusTabbable())})}),this.overlay=a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),a.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(a.ui.dialog.overlayInstances--,a.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),a.ui.dialog.overlayInstances=0,a.uiBackCompat!==!1&&a.widget("ui.dialog",a.ui.dialog,{_position:function(){var e,b=this.options.position,c=[],d=[0,0];b?(("string"==typeof b||"object"==typeof b&&"0"in b)&&(c=b.split?b.split(" "):[b[0],b[1]],1===c.length&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(d[a]=c[a],c[a]=b)}),b={my:c[0]+(d[0]<0?d[0]:"+"+d[0])+" "+c[1]+(d[1]<0?d[1]:"+"+d[1]),at:c.join(" ")}),b=a.extend({},a.ui.dialog.prototype.options.position,b)):b=a.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(b),e||this.uiDialog.hide()}})}(jQuery),function(a,b){var c=/up|down|vertical/,d=/up|left|vertical|horizontal/;a.effects.effect.blind=function(b,e){var p,q,r,f=a(this),g=["position","top","bottom","left","right","height","width"],h=a.effects.setMode(f,b.mode||"hide"),i=b.direction||"up",j=c.test(i),k=j?"height":"width",l=j?"top":"left",m=d.test(i),n={},o="show"===h;f.parent().is(".ui-effects-wrapper")?a.effects.save(f.parent(),g):a.effects.save(f,g),f.show(),p=a.effects.createWrapper(f).css({overflow:"hidden"}),q=p[k](),r=parseFloat(p.css(l))||0,n[k]=o?q:0,m||(f.css(j?"bottom":"right",0).css(j?"top":"left","auto").css({position:"absolute"}),n[l]=o?r:q+r),o&&(p.css(k,0),m||p.css(l,r+q)),p.animate(n,{duration:b.duration,easing:b.easing,queue:!1,complete:function(){"hide"===h&&f.hide(),a.effects.restore(f,g),a.effects.removeWrapper(f),e()}})}}(jQuery),function(a,b){a.effects.effect.bounce=function(b,c){var q,r,s,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"effect"),g="hide"===f,h="show"===f,i=b.direction||"up",j=b.distance,k=b.times||5,l=2*k+(h||g?1:0),m=b.duration/l,n=b.easing,o="up"===i||"down"===i?"top":"left",p="up"===i||"left"===i,t=d.queue(),u=t.length;for((h||g)&&e.push("opacity"),a.effects.save(d,e),d.show(),a.effects.createWrapper(d),j||(j=d["top"===o?"outerHeight":"outerWidth"]()/3),h&&(s={opacity:1},s[o]=0,d.css("opacity",0).css(o,p?2*-j:2*j).animate(s,m,n)),g&&(j/=Math.pow(2,k-1)),s={},s[o]=0,q=0;q<k;q++)r={},r[o]=(p?"-=":"+=")+j,d.animate(r,m,n).animate(s,m,n),j=g?2*j:j/2;g&&(r={opacity:0},r[o]=(p?"-=":"+=")+j,d.animate(r,m,n)),d.queue(function(){g&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}),u>1&&t.splice.apply(t,[1,0].concat(t.splice(u,l+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.clip=function(b,c){var m,n,o,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h=b.direction||"vertical",i="vertical"===h,j=i?"height":"width",k=i?"top":"left",l={};a.effects.save(d,e),d.show(),m=a.effects.createWrapper(d).css({overflow:"hidden"}),n="IMG"===d[0].tagName?m:d,o=n[j](),g&&(n.css(j,0),n.css(k,o/2)),l[j]=g?o:0,l[k]=g?0:o/2,n.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){g||d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.drop=function(b,c){var l,d=a(this),e=["position","top","bottom","left","right","opacity","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h=b.direction||"left",i="up"===h||"down"===h?"top":"left",j="up"===h||"left"===h?"pos":"neg",k={opacity:g?1:0};a.effects.save(d,e),d.show(),a.effects.createWrapper(d),l=b.distance||d["top"===i?"outerHeight":"outerWidth"](!0)/2,g&&d.css("opacity",0).css(i,"pos"===j?-l:l),k[i]=(g?"pos"===j?"+=":"-=":"pos"===j?"-=":"+=")+l,d.animate(k,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.explode=function(b,c){function s(){l.push(this),l.length===d*e&&t()}function t(){f.css({visibility:"visible"}),a(l).remove(),h||f.hide(),c()}var m,n,o,p,q,r,d=b.pieces?Math.round(Math.sqrt(b.pieces)):3,e=d,f=a(this),g=a.effects.setMode(f,b.mode||"hide"),h="show"===g,i=f.show().css("visibility","hidden").offset(),j=Math.ceil(f.outerWidth()/e),k=Math.ceil(f.outerHeight()/d),l=[];for(m=0;m<d;m++)for(p=i.top+m*k,r=m-(d-1)/2,n=0;n<e;n++)o=i.left+n*j,q=n-(e-1)/2,f.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-n*j,top:-m*k}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:j,height:k,left:o+(h?q*j:0),top:p+(h?r*k:0),opacity:h?0:1}).animate({left:o+(h?0:q*j),top:p+(h?0:r*k),opacity:h?1:0},b.duration||500,b.easing,s)}}(jQuery),function(a,b){a.effects.effect.fade=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"toggle");d.animate({opacity:e},{queue:!1,duration:b.duration,easing:b.easing,complete:c})}}(jQuery),function(a,b){a.effects.effect.fold=function(b,c){var o,p,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"hide"),g="show"===f,h="hide"===f,i=b.size||15,j=/([0-9]+)%/.exec(i),k=!!b.horizFirst,l=g!==k,m=l?["width","height"]:["height","width"],n=b.duration/2,q={},r={};a.effects.save(d,e),d.show(),o=a.effects.createWrapper(d).css({overflow:"hidden"}),p=l?[o.width(),o.height()]:[o.height(),o.width()],j&&(i=parseInt(j[1],10)/100*p[h?0:1]),g&&o.css(k?{height:0,width:i}:{height:i,width:0}),q[m[0]]=g?p[0]:i,r[m[1]]=g?p[1]:0,o.animate(q,n,b.easing).animate(r,n,b.easing,function(){h&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()})}}(jQuery),function(a,b){a.effects.effect.highlight=function(b,c){var d=a(this),e=["backgroundImage","backgroundColor","opacity"],f=a.effects.setMode(d,b.mode||"show"),g={backgroundColor:d.css("backgroundColor")};"hide"===f&&(g.opacity=0),a.effects.save(d,e),d.show().css({backgroundImage:"none",backgroundColor:b.color||"#ffff99"}).animate(g,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),c()}})}}(jQuery),function(a,b){a.effects.effect.pulsate=function(b,c){var n,d=a(this),e=a.effects.setMode(d,b.mode||"show"),f="show"===e,g="hide"===e,h=f||"hide"===e,i=2*(b.times||5)+(h?1:0),j=b.duration/i,k=0,l=d.queue(),m=l.length;for(!f&&d.is(":visible")||(d.css("opacity",0).show(),k=1),n=1;n<i;n++)d.animate({opacity:k},j,b.easing),k=1-k;d.animate({opacity:k},j,b.easing),d.queue(function(){g&&d.hide(),c()}),m>1&&l.splice.apply(l,[1,0].concat(l.splice(m,i+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.puff=function(b,c){var d=a(this),e=a.effects.setMode(d,b.mode||"hide"),f="hide"===e,g=parseInt(b.percent,10)||150,h=g/100,i={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()};a.extend(b,{effect:"scale",queue:!1,fade:!0,mode:e,complete:c,percent:f?g:100,from:f?i:{height:i.height*h,width:i.width*h,outerHeight:i.outerHeight*h,outerWidth:i.outerWidth*h}}),d.effect(b)},a.effects.effect.scale=function(b,c){var d=a(this),e=a.extend(!0,{},b),f=a.effects.setMode(d,b.mode||"effect"),g=parseInt(b.percent,10)||(0===parseInt(b.percent,10)?0:"hide"===f?0:100),h=b.direction||"both",i=b.origin,j={height:d.height(),width:d.width(),outerHeight:d.outerHeight(),outerWidth:d.outerWidth()},k={y:"horizontal"!==h?g/100:1,x:"vertical"!==h?g/100:1};e.effect="size",e.queue=!1,e.complete=c,"effect"!==f&&(e.origin=i||["middle","center"],e.restore=!0),e.from=b.from||("show"===f?{height:0,width:0,outerHeight:0,outerWidth:0}:j),e.to={height:j.height*k.y,width:j.width*k.x,outerHeight:j.outerHeight*k.y,outerWidth:j.outerWidth*k.x},e.fade&&("show"===f&&(e.from.opacity=0,e.to.opacity=1),"hide"===f&&(e.from.opacity=1,e.to.opacity=0)),d.effect(e)},a.effects.effect.size=function(b,c){var d,e,f,g=a(this),h=["position","top","bottom","left","right","width","height","overflow","opacity"],i=["position","top","bottom","left","right","overflow","opacity"],j=["width","height","overflow"],k=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],m=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],n=a.effects.setMode(g,b.mode||"effect"),o=b.restore||"effect"!==n,p=b.scale||"both",q=b.origin||["middle","center"],r=g.css("position"),s=o?h:i,t={height:0,width:0,outerHeight:0,outerWidth:0};"show"===n&&g.show(),d={height:g.height(),width:g.width(),outerHeight:g.outerHeight(),outerWidth:g.outerWidth()},"toggle"===b.mode&&"show"===n?(g.from=b.to||t,g.to=b.from||d):(g.from=b.from||("show"===n?t:d),g.to=b.to||("hide"===n?t:d)),f={from:{y:g.from.height/d.height,x:g.from.width/d.width},to:{y:g.to.height/d.height,x:g.to.width/d.width}},"box"!==p&&"both"!==p||(f.from.y!==f.to.y&&(s=s.concat(l),g.from=a.effects.setTransition(g,l,f.from.y,g.from),g.to=a.effects.setTransition(g,l,f.to.y,g.to)),f.from.x!==f.to.x&&(s=s.concat(m),g.from=a.effects.setTransition(g,m,f.from.x,g.from),g.to=a.effects.setTransition(g,m,f.to.x,g.to))),"content"!==p&&"both"!==p||f.from.y!==f.to.y&&(s=s.concat(k).concat(j),g.from=a.effects.setTransition(g,k,f.from.y,g.from),g.to=a.effects.setTransition(g,k,f.to.y,g.to)),a.effects.save(g,s),g.show(),a.effects.createWrapper(g),g.css("overflow","hidden").css(g.from),q&&(e=a.effects.getBaseline(q,d),g.from.top=(d.outerHeight-g.outerHeight())*e.y,g.from.left=(d.outerWidth-g.outerWidth())*e.x,g.to.top=(d.outerHeight-g.to.outerHeight)*e.y,g.to.left=(d.outerWidth-g.to.outerWidth)*e.x),g.css(g.from),"content"!==p&&"both"!==p||(l=l.concat(["marginTop","marginBottom"]).concat(k),m=m.concat(["marginLeft","marginRight"]),j=h.concat(l).concat(m),g.find("*[width]").each(function(){var c=a(this),d={height:c.height(),width:c.width(),outerHeight:c.outerHeight(),outerWidth:c.outerWidth()};o&&a.effects.save(c,j),c.from={height:d.height*f.from.y,width:d.width*f.from.x,outerHeight:d.outerHeight*f.from.y,outerWidth:d.outerWidth*f.from.x},c.to={height:d.height*f.to.y,width:d.width*f.to.x,outerHeight:d.height*f.to.y,outerWidth:d.width*f.to.x},f.from.y!==f.to.y&&(c.from=a.effects.setTransition(c,l,f.from.y,c.from),c.to=a.effects.setTransition(c,l,f.to.y,c.to)),f.from.x!==f.to.x&&(c.from=a.effects.setTransition(c,m,f.from.x,c.from),c.to=a.effects.setTransition(c,m,f.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.easing,function(){o&&a.effects.restore(c,j)})})),g.animate(g.to,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){0===g.to.opacity&&g.css("opacity",g.from.opacity),"hide"===n&&g.hide(),a.effects.restore(g,s),o||("static"===r?g.css({position:"relative",top:g.to.top,left:g.to.left}):a.each(["top","left"],function(a,b){g.css(b,function(b,c){var d=parseInt(c,10),e=a?g.to.left:g.to.top;return"auto"===c?e+"px":d+e+"px"})})),a.effects.removeWrapper(g),c()}})}}(jQuery),function(a,b){a.effects.effect.shake=function(b,c){var q,d=a(this),e=["position","top","bottom","left","right","height","width"],f=a.effects.setMode(d,b.mode||"effect"),g=b.direction||"left",h=b.distance||20,i=b.times||3,j=2*i+1,k=Math.round(b.duration/j),l="up"===g||"down"===g?"top":"left",m="up"===g||"left"===g,n={},o={},p={},r=d.queue(),s=r.length;for(a.effects.save(d,e),d.show(),a.effects.createWrapper(d),n[l]=(m?"-=":"+=")+h,o[l]=(m?"+=":"-=")+2*h,p[l]=(m?"-=":"+=")+2*h,d.animate(n,k,b.easing),q=1;q<i;q++)d.animate(o,k,b.easing).animate(p,k,b.easing);d.animate(o,k,b.easing).animate(n,k/2,b.easing).queue(function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}),s>1&&r.splice.apply(r,[1,0].concat(r.splice(s,j+1))),d.dequeue()}}(jQuery),function(a,b){a.effects.effect.slide=function(b,c){var k,d=a(this),e=["position","top","bottom","left","right","width","height"],f=a.effects.setMode(d,b.mode||"show"),g="show"===f,h=b.direction||"left",i="up"===h||"down"===h?"top":"left",j="up"===h||"left"===h,l={};a.effects.save(d,e),d.show(),k=b.distance||d["top"===i?"outerHeight":"outerWidth"](!0),a.effects.createWrapper(d).css({overflow:"hidden"}),g&&d.css(i,j?isNaN(k)?"-"+k:-k:k),l[i]=(g?j?"+=":"-=":j?"-=":"+=")+k,d.animate(l,{queue:!1,duration:b.duration,easing:b.easing,complete:function(){"hide"===f&&d.hide(),a.effects.restore(d,e),a.effects.removeWrapper(d),c()}})}}(jQuery),function(a,b){a.effects.effect.transfer=function(b,c){var d=a(this),e=a(b.to),f="fixed"===e.css("position"),g=a("body"),h=f?g.scrollTop():0,i=f?g.scrollLeft():0,j=e.offset(),k={top:j.top-h,left:j.left-i,height:e.innerHeight(),width:e.innerWidth()},l=d.offset(),m=a("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(b.className).css({top:l.top-h,left:l.left-i,height:d.innerHeight(),width:d.innerWidth(),position:f?"fixed":"absolute"}).animate(k,b.duration,b.easing,function(){m.remove(),c()})}}(jQuery),function(a,b){a.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,a.proxy(function(a){this.options.disabled&&a.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(b){var c=a(b.target).closest(".ui-menu-item");!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(b),c.has(".ui-menu").length?this.expand(b):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(b){var c=a(b.currentTarget);c.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(b,c)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,b){var c=this.active||this.element.children(".ui-menu-item").eq(0);b||this.focus(a,c)},blur:function(b){this._delay(function(){a.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(b)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(b){a(b.target).closest(".ui-menu").length||this.collapseAll(b),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var b=a(this);b.data("ui-menu-submenu-carat")&&b.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(b){function i(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var c,d,e,f,g,h=!0;switch(b.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(b);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(b);break;case a.ui.keyCode.HOME:this._move("first","first",b);break;case a.ui.keyCode.END:this._move("last","last",b);break;case a.ui.keyCode.UP:this.previous(b);break;case a.ui.keyCode.DOWN:this.next(b);break;case a.ui.keyCode.LEFT:this.collapse(b);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(b);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(b);break;case a.ui.keyCode.ESCAPE:this.collapse(b);break;default:h=!1,d=this.previousFilter||"",e=String.fromCharCode(b.keyCode),f=!1,clearTimeout(this.filterTimer),e===d?f=!0:e=d+e,g=new RegExp("^"+i(e),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return g.test(a(this).children("a").text())}),c=f&&c.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):c,c.length||(e=String.fromCharCode(b.keyCode),g=new RegExp("^"+i(e),"i"),c=this.activeMenu.children(".ui-menu-item").filter(function(){return g.test(a(this).children("a").text())})),c.length?(this.focus(b,c),c.length>1?(this.previousFilter=e,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&b.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var b,c=this.options.icons.submenu,d=this.element.find(this.options.menus);d.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var b=a(this),d=b.prev("a"),e=a("<span>").addClass("ui-menu-icon ui-icon "+c).data("ui-menu-submenu-carat",!0);d.attr("aria-haspopup","true").prepend(e),b.attr("aria-labelledby",d.attr("id"))}),b=d.add(this.element),b.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),b.children(":not(.ui-menu-item)").each(function(){var b=a(this);/[^\-\u2014\u2013\s]/.test(b.text())||b.addClass("ui-widget-content ui-menu-divider")}),b.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,b){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(b.submenu),this._super(a,b)},focus:function(a,b){var c,d;this.blur(a,a&&"focus"===a.type),this._scrollIntoView(b),this.active=b.first(),d=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",d.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),c=b.children(".ui-menu"),c.length&&/^mouse/.test(a.type)&&this._startOpening(c),this.activeMenu=b.parent(),this._trigger("focus",a,{item:b})},_scrollIntoView:function(b){var c,d,e,f,g,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,e=b.offset().top-this.activeMenu.offset().top-c-d,f=this.activeMenu.scrollTop(),g=this.activeMenu.height(),h=b.height(),e<0?this.activeMenu.scrollTop(f+e):e+h>g&&this.activeMenu.scrollTop(f+e-g+h))},blur:function(a,b){b||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer),"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(a)},this.delay))},_open:function(b){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(b.parents(".ui-menu")).hide().attr("aria-hidden","true"),b.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(b,c){clearTimeout(this.timer),this.timer=this._delay(function(){var d=c?this.element:a(b&&b.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element),this._close(d),this.blur(b),this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element),a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var b=this.active&&this.active.parent().closest(".ui-menu-item",this.element);b&&b.length&&(this._close(),this.focus(a,b))},expand:function(a){var b=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();b&&b.length&&(this._open(b.parent()),this._delay(function(){this.focus(a,b)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(a,b,c){var d;this.active&&(d="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0)),d&&d.length&&this.active||(d=this.activeMenu.children(".ui-menu-item")[b]()),this.focus(c,d)},nextPage:function(b){var c,d,e;return this.active?void(this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d-e<0}),this.focus(b,c)):this.focus(b,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(b)},previousPage:function(b){var c,d,e;return this.active?void(this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,e=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return c=a(this),c.offset().top-d+e>0}),this.focus(b,c)):this.focus(b,this.activeMenu.children(".ui-menu-item").first()))):void this.next(b)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(b){this.active=this.active||a(b.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(b,!0),this._trigger("select",b,c)}})}(jQuery),function(a,b){function m(a,b,c){return[parseFloat(a[0])*(k.test(a[0])?b/100:1),parseFloat(a[1])*(k.test(a[1])?c/100:1)]}function n(b,c){return parseInt(a.css(b,c),10)||0}function o(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}a.ui=a.ui||{};var c,d=Math.max,e=Math.abs,f=Math.round,g=/left|center|right/,h=/top|center|bottom/,i=/[\+\-]\d+(\.[\d]+)?%?/,j=/^\w+/,k=/%$/,l=a.fn.position;a.position={scrollbarWidth:function(){if(c!==b)return c;var d,e,f=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),g=f.children()[0];return a("body").append(f),d=g.offsetWidth,f.css("overflow","scroll"),e=g.offsetWidth,d===e&&(e=f[0].clientWidth),f.remove(),c=d-e},getScrollInfo:function(b){var c=b.isWindow?"":b.element.css("overflow-x"),d=b.isWindow?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth,f="scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight;return{width:f?a.position.scrollbarWidth():0,height:e?a.position.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]);return{element:c,isWindow:d,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d?c.width():c.outerWidth(),height:d?c.height():c.outerHeight()}}},a.fn.position=function(b){if(!b||!b.of)return l.apply(this,arguments);b=a.extend({},b);var c,k,p,q,r,s,t=a(b.of),u=a.position.getWithinInfo(b.within),v=a.position.getScrollInfo(u),w=(b.collision||"flip").split(" "),x={};return s=o(t),t[0].preventDefault&&(b.at="left top"),k=s.width,p=s.height,q=s.offset,r=a.extend({},q),a.each(["my","at"],function(){var c,d,a=(b[this]||"").split(" ");1===a.length&&(a=g.test(a[0])?a.concat(["center"]):h.test(a[0])?["center"].concat(a):["center","center"]),a[0]=g.test(a[0])?a[0]:"center",a[1]=h.test(a[1])?a[1]:"center",c=i.exec(a[0]),d=i.exec(a[1]),x[this]=[c?c[0]:0,d?d[0]:0],b[this]=[j.exec(a[0])[0],j.exec(a[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===b.at[0]?r.left+=k:"center"===b.at[0]&&(r.left+=k/2),"bottom"===b.at[1]?r.top+=p:"center"===b.at[1]&&(r.top+=p/2),c=m(x.at,k,p),r.left+=c[0],r.top+=c[1],this.each(function(){var g,h,i=a(this),j=i.outerWidth(),l=i.outerHeight(),o=n(this,"marginLeft"),s=n(this,"marginTop"),y=j+o+n(this,"marginRight")+v.width,z=l+s+n(this,"marginBottom")+v.height,A=a.extend({},r),B=m(x.my,i.outerWidth(),i.outerHeight());"right"===b.my[0]?A.left-=j:"center"===b.my[0]&&(A.left-=j/2),"bottom"===b.my[1]?A.top-=l:"center"===b.my[1]&&(A.top-=l/2),A.left+=B[0],A.top+=B[1],a.support.offsetFractions||(A.left=f(A.left),A.top=f(A.top)),g={marginLeft:o,marginTop:s},a.each(["left","top"],function(d,e){a.ui.position[w[d]]&&a.ui.position[w[d]][e](A,{targetWidth:k,targetHeight:p,elemWidth:j,elemHeight:l,collisionPosition:g,collisionWidth:y,collisionHeight:z,offset:[c[0]+B[0],c[1]+B[1]],my:b.my,at:b.at,within:u,elem:i})}),b.using&&(h=function(a){var c=q.left-A.left,f=c+k-j,g=q.top-A.top,h=g+p-l,m={target:{element:t,left:q.left,top:q.top,width:k,height:p},element:{element:i,left:A.left,top:A.top,width:j,height:l},horizontal:f<0?"left":c>0?"right":"center",vertical:h<0?"top":g>0?"bottom":"middle"};k<j&&e(c+f)<k&&(m.horizontal="center"),p<l&&e(g+h)<p&&(m.vertical="middle"),d(e(c),e(f))>d(e(g),e(h))?m.important="horizontal":m.important="vertical",b.using.call(this,a,m)}),i.offset(a.extend(A,{using:h}))})},a.ui.position={fit:{left:function(a,b){var j,c=b.within,e=c.isWindow?c.scrollLeft:c.offset.left,f=c.width,g=a.left-b.collisionPosition.marginLeft,h=e-g,i=g+b.collisionWidth-f-e;b.collisionWidth>f?h>0&&i<=0?(j=a.left+h+b.collisionWidth-f-e,a.left+=h-j):i>0&&h<=0?a.left=e:h>i?a.left=e+f-b.collisionWidth:a.left=e:h>0?a.left+=h:i>0?a.left-=i:a.left=d(a.left-g,a.left)},top:function(a,b){var j,c=b.within,e=c.isWindow?c.scrollTop:c.offset.top,f=b.within.height,g=a.top-b.collisionPosition.marginTop,h=e-g,i=g+b.collisionHeight-f-e;b.collisionHeight>f?h>0&&i<=0?(j=a.top+h+b.collisionHeight-f-e,a.top+=h-j):i>0&&h<=0?a.top=e:h>i?a.top=e+f-b.collisionHeight:a.top=e:h>0?a.top+=h:i>0?a.top-=i:a.top=d(a.top-g,a.top)}},flip:{left:function(a,b){var n,o,c=b.within,d=c.offset.left+c.scrollLeft,f=c.width,g=c.isWindow?c.scrollLeft:c.offset.left,h=a.left-b.collisionPosition.marginLeft,i=h-g,j=h+b.collisionWidth-f-g,k="left"===b.my[0]?-b.elemWidth:"right"===b.my[0]?b.elemWidth:0,l="left"===b.at[0]?b.targetWidth:"right"===b.at[0]?-b.targetWidth:0,m=-2*b.offset[0];i<0?(n=a.left+k+l+m+b.collisionWidth-f-d,(n<0||n<e(i))&&(a.left+=k+l+m)):j>0&&(o=a.left-b.collisionPosition.marginLeft+k+l+m-g,(o>0||e(o)<j)&&(a.left+=k+l+m))},top:function(a,b){var o,p,c=b.within,d=c.offset.top+c.scrollTop,f=c.height,g=c.isWindow?c.scrollTop:c.offset.top,h=a.top-b.collisionPosition.marginTop,i=h-g,j=h+b.collisionHeight-f-g,k="top"===b.my[1],l=k?-b.elemHeight:"bottom"===b.my[1]?b.elemHeight:0,m="top"===b.at[1]?b.targetHeight:"bottom"===b.at[1]?-b.targetHeight:0,n=-2*b.offset[1];i<0?(p=a.top+l+m+n+b.collisionHeight-f-d,a.top+l+m+n>i&&(p<0||p<e(i))&&(a.top+=l+m+n)):j>0&&(o=a.top-b.collisionPosition.marginTop+l+m+n-g,a.top+l+m+n>j&&(o>0||e(o)<j)&&(a.top+=l+m+n))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments),a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments),a.ui.position.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,f,g=document.getElementsByTagName("body")[0],h=document.createElement("div");b=document.createElement(g?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},g&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in d)b.style[f]=d[f];b.appendChild(h),c=g||document.documentElement,c.insertBefore(b,c.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",e=a(h).offset().left,a.support.offsetFractions=e>10&&e<11,b.innerHTML="",c.removeChild(b)}()}(jQuery),function(a,b){a.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(a){return a===b?this.options.value:(this.options.value=this._constrainedValue(a),void this._refreshValue())},_constrainedValue:function(a){return a===b&&(a=this.options.value),this.indeterminate=a===!1,"number"!=typeof a&&(a=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value,this._super(a),this.options.value=this._constrainedValue(b),this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b)),this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var b=this.options.value,c=this._percentage();this.valueDiv.toggle(this.indeterminate||b>this.min).toggleClass("ui-corner-right",b===this.options.max).width(c.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=a("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":b}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==b&&(this.oldValue=b,this._trigger("change")),b===this.options.max&&this._trigger("complete")}})}(jQuery),function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var b,c,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=[];for(c=d.values&&d.values.length||1,e.length>c&&(e.slice(c).remove(),e=e.slice(0,c)),b=e.length;b<c;b++)g.push(f);this.handles=e.add(a(g.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)})},_createRange:function(){var b=this.options,c="";b.range?(b.range===!0&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=a("<div></div>").appendTo(this.element),c="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(c+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:""))):this.range=a([])},_setupEvents:function(){var a=this.handles.add(this.range).filter("a");this._off(a),this._on(a,this._handleEvents),this._hoverable(a),this._focusable(a)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(b){var c,d,e,f,g,h,i,j,k=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),c={x:b.pageX,y:b.pageY},d=this._normValueFromMouse(c),e=this._valueMax()-this._valueMin()+1,this.handles.each(function(b){var c=Math.abs(d-k.values(b));(e>c||e===c&&(b===k._lastChangedValue||k.values(b)===l.min))&&(e=c,f=a(this),g=b)}),h=this._start(b,g),h!==!1&&(this._mouseSliding=!0,this._handleIndex=g,f.addClass("ui-state-active").focus(),i=f.offset(),j=!a(b.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=j?{left:0,top:0}:{left:b.pageX-i.left-f.width()/2,top:b.pageY-i.top-f.height()/2-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,g,d),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return"horizontal"===this.orientation?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d>1&&(d=1),d<0&&(d=0),"vertical"===this.orientation&&(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&&this.options.values.length?(d=this.values(b?0:1),2===this.options.values.length&&this.options.range===!0&&(0===b&&c>d||1===b&&c<d)&&(c=d),c!==this.values(b)&&(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&&this.values(b,c,!0))):c!==this.value()&&(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&&this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&&this.options.values.length&&(c.value=this.values(b),c.values=this.values()),this._lastChangedValue=b,this._trigger("change",a,c)}},value:function(a){return arguments.length?(this.options.value=this._trimAlignValue(a),this._refreshValue(),void this._change(null,0)):this._value()},values:function(b,c){var d,e,f;if(arguments.length>1)return this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),void this._change(null,b);if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(b):this.value();for(d=this.options.values,e=arguments[0],f=0;f<d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;switch("range"===b&&this.options.range===!0&&("min"===c?(this.options.value=this._values(0),this.options.values=null):"max"===c&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),a.isArray(this.options.values)&&(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments),b){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),d=0;d<e;d+=1)this._change(null,d);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b);if(this.options.values&&this.options.values.length){for(c=this.options.values.slice(),d=0;d<c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c}return[]},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return 2*Math.abs(c)>=b&&(d+=c>0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b,c,d,e,f,g=this.options.range,h=this.options,i=this,j=!this._animateOff&&h.animate,k={};this.options.values&&this.options.values.length?this.handles.each(function(d){c=(i.values(d)-i._valueMin())/(i._valueMax()-i._valueMin())*100,k["horizontal"===i.orientation?"left":"bottom"]=c+"%",a(this).stop(1,1)[j?"animate":"css"](k,h.animate),i.options.range===!0&&("horizontal"===i.orientation?(0===d&&i.range.stop(1,1)[j?"animate":"css"]({left:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({width:c-b+"%"},{queue:!1,duration:h.animate})):(0===d&&i.range.stop(1,1)[j?"animate":"css"]({bottom:c+"%"},h.animate),1===d&&i.range[j?"animate":"css"]({height:c-b+"%"},{queue:!1,duration:h.animate}))),b=c}):(d=this.value(),e=this._valueMin(),f=this._valueMax(),c=f!==e?(d-e)/(f-e)*100:0,k["horizontal"===this.orientation?"left":"bottom"]=c+"%",this.handle.stop(1,1)[j?"animate":"css"](k,h.animate),"min"===g&&"horizontal"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({width:c+"%"},h.animate),"max"===g&&"horizontal"===this.orientation&&this.range[j?"animate":"css"]({width:100-c+"%"},{queue:!1,duration:h.animate}),"min"===g&&"vertical"===this.orientation&&this.range.stop(1,1)[j?"animate":"css"]({height:c+"%"},h.animate),"max"===g&&"vertical"===this.orientation&&this.range[j?"animate":"css"]({height:100-c+"%"},{queue:!1,duration:h.animate}))},_handleEvents:{keydown:function(b){var d,e,f,g,h=a(b.target).data("ui-slider-handle-index");switch(b.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(b.target).addClass("ui-state-active"),d=this._start(b,h),d===!1))return}switch(g=this.options.step,e=f=this.options.values&&this.options.values.length?this.values(h):this.value(),b.keyCode){case a.ui.keyCode.HOME:f=this._valueMin();break;case a.ui.keyCode.END:f=this._valueMax();break;case a.ui.keyCode.PAGE_UP:f=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:f=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(e===this._valueMax())return;f=this._trimAlignValue(e+g);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(e===this._valueMin())return;f=this._trimAlignValue(e-g)}this._slide(b,h,f)},click:function(a){a.preventDefault()},keyup:function(b){var c=a(b.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(b,c),this._change(b,c),a(b.target).removeClass("ui-state-active"))}}})}(jQuery),function(a){function b(a){return function(){var b=this.element.val();a.apply(this,arguments),this._refresh(),b!==this.element.val()&&this._trigger("change")}}a.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var b={},c=this.element;return a.each(["min","max","step"],function(a,d){var e=c.attr(d);void 0!==e&&e.length&&(b[d]=e)}),b},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(a){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",a)))},mousewheel:function(a,b){if(b){if(!this.spinning&&!this._start(a))return!1;this._spin((b>0?1:-1)*this.options.step,a),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100),a.preventDefault()}},"mousedown .ui-spinner-button":function(b){function d(){var a=this.element[0]===this.document[0].activeElement;a||(this.element.focus(),this.previous=c,this._delay(function(){this.previous=c}))}var c;c=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),b.preventDefault(),d.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,d.call(this)}),this._start(b)!==!1&&this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(b){if(a(b.currentTarget).hasClass("ui-state-active"))return this._start(b)!==!1&&void this._repeat(null,a(b.currentTarget).hasClass("ui-spinner-up")?1:-1,b)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*a.height())&&a.height()>0&&a.height(a.height()),this.options.disabled&&this.disable()},_keydown:function(b){var c=this.options,d=a.ui.keyCode;switch(b.keyCode){case d.UP:return this._repeat(null,1,b),!0;case d.DOWN:return this._repeat(null,-1,b),!0;case d.PAGE_UP:return this._repeat(null,c.page,b),!0;case d.PAGE_DOWN:return this._repeat(null,-c.page,b),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return!(!this.spinning&&this._trigger("start",a)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(a,b,c){a=a||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,b,c)},a),this._spin(b*this.options.step,c)},_spin:function(a,b){var c=this.value()||0;this.counter||(this.counter=1),c=this._adjustValue(c+a*this._increment(this.counter)),this.spinning&&this._trigger("spin",b,{value:c})===!1||(this._value(c),this.counter++)},_increment:function(b){var c=this.options.incremental;return c?a.isFunction(c)?c(b):Math.floor(b*b*b/5e4-b*b/500+17*b/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){var b=a.toString(),c=b.indexOf(".");return c===-1?0:b.length-c-1},_adjustValue:function(a){var b,c,d=this.options;return b=null!==d.min?d.min:0,c=a-b,c=Math.round(c/d.step)*d.step,a=b+c,a=parseFloat(a.toFixed(this._precision())),null!==d.max&&a>d.max?d.max:null!==d.min&&a<d.min?d.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,b){if("culture"===a||"numberFormat"===a){var c=this._parse(this.element.val());return this.options[a]=b,void this.element.val(this._format(c))}"max"!==a&&"min"!==a&&"step"!==a||"string"==typeof b&&(b=this._parse(b)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(b.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(b.down)),this._super(a,b),"disabled"===a&&(b?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:b(function(a){this._super(a),this._value(this.element.val())}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(a,b){var c;""!==a&&(c=this._parse(a),null!==c&&(b||(c=this._adjustValue(c)),a=this._format(c))),this.element.val(a),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:b(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),this._stop())},stepDown:b(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:b(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:b(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){return arguments.length?void b(this._value).call(this,a):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(a,b){function e(){return++c}function f(a){return a.hash.length>1&&decodeURIComponent(a.href.replace(d,""))===decodeURIComponent(location.href.replace(d,""))}var c=0,d=/#.*$/;a.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var b=this,c=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",c.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),c.active=this._initialActive(),a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(c.active):this.active=a(),this._refresh(),this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);return null===b&&(d&&this.tabs.each(function(c,e){if(a(e).attr("aria-controls")===d)return b=c,!1}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==b&&b!==-1||(b=!!this.tabs.length&&0)),b!==!1&&(b=this.tabs.index(this.tabs.eq(b)),b===-1&&(b=!c&&0)),!c&&b===!1&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1,d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=0;break;case a.ui.keyCode.SPACE:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d);case a.ui.keyCode.ENTER:return b.preventDefault(),clearTimeout(this.activating),void this._activate(d!==this.options.active&&d);default:return}b.preventDefault(),clearTimeout(this.activating),d=this._focusNextTab(d,e),b.ctrlKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){return b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(b,c){function e(){return b>d&&(b=0),b<0&&(b=d),b}for(var d=this.tabs.length-1;a.inArray(e(),this.options.disabled)!==-1;)b=c?b+1:b-1;return b},_focusNextTab:function(a,b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){return"active"===a?void this._activate(b):"disabled"===a?void this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),b||this.options.active!==!1||this._activate(0)),"event"===a&&this._setupEvents(b),void("heightStyle"===a&&this._setupHeightStyle(b)))},_tabId:function(a){return a.attr("aria-controls")||"ui-tabs-"+e()},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)}),this._processTabs(),b.active!==!1&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=a(),this.anchors.each(function(c,d){var e,g,h,i=a(d).uniqueId().attr("id"),j=a(d).closest("li"),k=j.attr("aria-controls");f(d)?(e=d.hash,g=b.element.find(b._sanitizeSelector(e))):(h=b._tabId(j),e="#"+h,g=b.element.find(e),g.length||(g=b._createPanel(h),g.insertAfter(b.panels[c-1]||b.tablist)),g.attr("aria-live","polite")),g.length&&(b.panels=b.panels.add(g)),k&&j.data("ui-tabs-aria-controls",k),j.attr({"aria-controls":e.substring(1),"aria-labelledby":i}),g.attr("aria-labelledby",i)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var d,c=0;d=this.tabs[c];c++)b===!0||a.inArray(c,b)!==-1?a(d).addClass("ui-state-disabled").attr("aria-disabled","true"):a(d).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=b},_setupEvents:function(b){var c={click:function(a){a.preventDefault()}};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,c),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),f=e.closest("li"),g=f[0]===d[0],h=g&&c.collapsible,i=h?a():this._getPanelForTab(f),j=d.length?this._getPanelForTab(d):a(),k={oldTab:d,oldPanel:j,newTab:h?a():f,newPanel:i};b.preventDefault(),f.hasClass("ui-state-disabled")||f.hasClass("ui-tabs-loading")||this.running||g&&!c.collapsible||this._trigger("beforeActivate",b,k)===!1||(c.active=!h&&this.tabs.index(f),this.active=g?a():f,this.xhr&&this.xhr.abort(),j.length||i.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),i.length&&this.load(this.tabs.index(f),b),this._toggle(b,k))},_toggle:function(b,c){function g(){d.running=!1,d._trigger("activate",b,c)}function h(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),e.length&&d.options.show?d._show(e,d.options.show,g):(e.show(),g())}var d=this,e=c.newPanel,f=c.oldPanel;this.running=!0,f.length&&this.options.hide?this._hide(f,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),h()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),f.hide(),h()),f.attr({"aria-expanded":"false","aria-hidden":"true"}),c.oldTab.attr("aria-selected","false"),e.length&&f.length?c.oldTab.attr("tabIndex",-1):e.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1),e.attr({"aria-expanded":"true","aria-hidden":"false"}),c.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(b){var c,d=this._findActive(b);d[0]!==this.active[0]&&(d.length||(d=this.active),c=d.find(".ui-tabs-anchor")[0],this._eventHandler({target:c,currentTarget:c,preventDefault:a.noop}))},_findActive:function(b){return b===!1?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(c){var d=this.options.disabled;d!==!1&&(c===b?d=!1:(c=this._getIndex(c),d=a.isArray(d)?a.map(d,function(a){return a!==c?a:null}):a.map(this.tabs,function(a,b){return b!==c?b:null})),this._setupDisabled(d))},disable:function(c){var d=this.options.disabled;if(d!==!0){if(c===b)d=!0;else{if(c=this._getIndex(c),a.inArray(c,d)!==-1)return;d=a.isArray(d)?a.merge([c],d).sort():[c]}this._setupDisabled(d)}},load:function(b,c){b=this._getIndex(b);var d=this,e=this.tabs.eq(b),g=e.find(".ui-tabs-anchor"),h=this._getPanelForTab(e),i={tab:e,panel:h};f(g[0])||(this.xhr=a.ajax(this._ajaxSettings(g,c,i)),this.xhr&&"canceled"!==this.xhr.statusText&&(e.addClass("ui-tabs-loading"),h.attr("aria-busy","true"),this.xhr.success(function(a){setTimeout(function(){h.html(a),d._trigger("load",c,i)},1)}).complete(function(a,b){setTimeout(function(){"abort"===b&&d.panels.stop(!1,!0),e.removeClass("ui-tabs-loading"),h.removeAttr("aria-busy"),a===d.xhr&&delete d.xhr},1)})))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){var c=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+c))}})}(jQuery),function(a){function c(b,c){var d=(b.attr("aria-describedby")||"").split(/\s+/);d.push(c),b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(d.join(" ")))}function d(b){var c=b.data("ui-tooltip-id"),d=(b.attr("aria-describedby")||"").split(/\s+/),e=a.inArray(c,d);e!==-1&&d.splice(e,1),b.removeData("ui-tooltip-id"),d=a.trim(d.join(" ")),d?b.attr("aria-describedby",d):b.removeAttr("aria-describedby")}var b=0;a.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var b=a(this).attr("title")||"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(b,c){var d=this;return"disabled"===b?(this[c?"_disable":"_enable"](),void(this.options[b]=c)):(this._super(b,c),void("content"===b&&a.each(this.tooltips,function(a,b){d._updateContent(b)})))},_disable:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d[0],b.close(e,!0)}),this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=this,d=a(b?b.target:this.element).closest(this.options.items);d.length&&!d.data("ui-tooltip-id")&&(d.attr("title")&&d.data("ui-tooltip-title",d.attr("title")),d.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&d.parents().each(function(){var d,b=a(this);b.data("ui-tooltip-open")&&(d=a.Event("blur"),d.target=d.currentTarget=this,c.close(d,!0)),b.attr("title")&&(b.uniqueId(),c.parents[this.id]={element:this,title:b.attr("title")},b.attr("title",""))}),this._updateContent(d,b))},_updateContent:function(a,b){var c,d=this.options.content,e=this,f=b?b.type:null;return"string"==typeof d?this._open(b,a,d):(c=d.call(a[0],function(c){a.data("ui-tooltip-open")&&e._delay(function(){b&&(b.type=f),this._open(b,a,c)})}),void(c&&this._open(b,a,c)))},_open:function(b,d,e){function j(a){i.of=a,f.is(":hidden")||f.position(i)}var f,g,h,i=a.extend({},this.options.position);if(e){if(f=this._find(d),f.length)return void f.find(".ui-tooltip-content").html(e);d.is("[title]")&&(b&&"mouseover"===b.type?d.attr("title",""):d.removeAttr("title")),f=this._tooltip(d),c(d,f.attr("id")),f.find(".ui-tooltip-content").html(e),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:j}),j(b)):f.position(a.extend({of:d},this.options.position)),f.hide(),this._show(f,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){f.is(":visible")&&(j(i.of),clearInterval(h))},a.fx.interval)),this._trigger("open",b,{tooltip:f}),g={keyup:function(b){if(b.keyCode===a.ui.keyCode.ESCAPE){var c=a.Event(b);c.currentTarget=d[0],this.close(c,!0)}},remove:function(){this._removeTooltip(f)}},b&&"mouseover"!==b.type||(g.mouseleave="close"),b&&"focusin"!==b.type||(g.focusout="close"),this._on(!0,d,g)}},close:function(b){var c=this,e=a(b?b.currentTarget:this.element),f=this._find(e);this.closing||(clearInterval(this.delayedShow),e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title")),d(e),f.stop(!0),this._hide(f,this.options.hide,function(){c._removeTooltip(a(this))}),e.removeData("ui-tooltip-open"),this._off(e,"mouseleave focusout keyup"),e[0]!==this.element[0]&&this._off(e,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,d){a(d.element).attr("title",d.title),delete c.parents[b]}),this.closing=!0,this._trigger("close",b,{tooltip:f}),this.closing=!1)},_tooltip:function(c){var d="ui-tooltip-"+b++,e=a("<div>").attr({id:d,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return a("<div>").addClass("ui-tooltip-content").appendTo(e),e.appendTo(this.document[0].body),this.tooltips[d]=c,e},_find:function(b){var c=b.data("ui-tooltip-id");return c?a("#"+c):a()},_removeTooltip:function(a){a.remove(),delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,d){var e=a.Event("blur");e.target=e.currentTarget=d[0],b.close(e,!0),a("#"+c).remove(),d.data("ui-tooltip-title")&&(d.attr("title",d.data("ui-tooltip-title")),d.removeData("ui-tooltip-title"))})}})}(jQuery);/*! For license information please see theme.js.LICENSE.txt */
(()=>{var e={411:()=>{!function(e){var t=0,i=function(t,i){this.options=i,this.$elementFilestyle=[],this.$element=e(t)};i.prototype={clear:function(){this.$element.val(""),this.$elementFilestyle.find(":text").val(""),this.$elementFilestyle.find(".badge").remove()},destroy:function(){this.$element.removeAttr("style").removeData("filestyle"),this.$elementFilestyle.remove()},disabled:function(e){if(!0===e)this.options.disabled||(this.$element.attr("disabled","true"),this.$elementFilestyle.find("label").attr("disabled","true"),this.options.disabled=!0);else{if(!1!==e)return this.options.disabled;this.options.disabled&&(this.$element.removeAttr("disabled"),this.$elementFilestyle.find("label").removeAttr("disabled"),this.options.disabled=!1)}},buttonBefore:function(e){if(!0===e)this.options.buttonBefore||(this.options.buttonBefore=!0,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()));else{if(!1!==e)return this.options.buttonBefore;this.options.buttonBefore&&(this.options.buttonBefore=!1,this.options.input&&(this.$elementFilestyle.remove(),this.constructor(),this.pushNameFiles()))}},icon:function(e){if(!0===e)this.options.icon||(this.options.icon=!0,this.$elementFilestyle.find("label").prepend(this.htmlIcon()));else{if(!1!==e)return this.options.icon;this.options.icon&&(this.options.icon=!1,this.$elementFilestyle.find(".icon-span-filestyle").remove())}},input:function(e){if(!0===e)this.options.input||(this.options.input=!0,this.options.buttonBefore?this.$elementFilestyle.append(this.htmlInput()):this.$elementFilestyle.prepend(this.htmlInput()),this.$elementFilestyle.find(".badge").remove(),this.pushNameFiles(),this.$elementFilestyle.find(".group-span-filestyle").addClass("input-group-btn"));else{if(!1!==e)return this.options.input;if(this.options.input){this.options.input=!1,this.$elementFilestyle.find(":text").remove();var t=this.pushNameFiles();t.length>0&&this.options.badge&&this.$elementFilestyle.find("label").append(' <span class="badge">'+t.length+"</span>"),this.$elementFilestyle.find(".group-span-filestyle").removeClass("input-group-btn")}}},size:function(e){if(void 0===e)return this.options.size;var t=this.$elementFilestyle.find("label"),i=this.$elementFilestyle.find("input");t.removeClass("btn-lg btn-sm"),i.removeClass("input-lg input-sm"),"nr"!=e&&(t.addClass("btn-"+e),i.addClass("input-"+e))},placeholder:function(e){if(void 0===e)return this.options.placeholder;this.options.placeholder=e,this.$elementFilestyle.find("input").attr("placeholder",e)},buttonText:function(e){if(void 0===e)return this.options.buttonText;this.options.buttonText=e,this.$elementFilestyle.find("label .buttonText").html(this.options.buttonText)},buttonName:function(e){if(void 0===e)return this.options.buttonName;this.options.buttonName=e,this.$elementFilestyle.find("label").attr({class:"btn "+this.options.buttonName})},iconName:function(e){if(void 0===e)return this.options.iconName;this.$elementFilestyle.find(".icon-span-filestyle").attr({class:"icon-span-filestyle "+this.options.iconName})},htmlIcon:function(){return this.options.icon?'<span class="icon-span-filestyle '+this.options.iconName+'"></span> ':""},htmlInput:function(){return this.options.input?'<input type="text" class="form-control '+("nr"==this.options.size?"":"input-"+this.options.size)+'" placeholder="'+this.options.placeholder+'" disabled> ':""},pushNameFiles:function(){var e="",t=[];void 0===this.$element[0].files?t[0]={name:this.$element[0]&&this.$element[0].value}:t=this.$element[0].files;for(var i=0;i<t.length;i++)e+=t[i].name.split("\\").pop()+", ";return""!==e?this.$elementFilestyle.find(":text").val(e.replace(/\, $/g,"")):this.$elementFilestyle.find(":text").val(""),t},constructor:function(){var i,n,r=this,a=r.$element.attr("id");""!==a&&a||(a="filestyle-"+t,r.$element.attr({id:a}),t++),n='<span class="group-span-filestyle '+(r.options.input?"input-group-btn":"")+'"><label for="'+a+'" class="btn '+r.options.buttonName+" "+("nr"==r.options.size?"":"btn-"+r.options.size)+'" '+(r.options.disabled?'disabled="true"':"")+">"+r.htmlIcon()+'<span class="buttonText">'+r.options.buttonText+"</span></label></span>",i=r.options.buttonBefore?n+r.htmlInput():r.htmlInput()+n,r.$elementFilestyle=e('<div class="bootstrap-filestyle input-group">'+i+"</div>"),r.$elementFilestyle.find(".group-span-filestyle").attr("tabindex","0").keypress((function(e){if(13===e.keyCode||32===e.charCode)return r.$elementFilestyle.find("label").click(),!1})),r.$element.css({position:"absolute",clip:"rect(0px 0px 0px 0px)"}).attr("tabindex","-1").after(r.$elementFilestyle),r.options.disabled&&r.$element.attr("disabled","true"),r.$element.change((function(){var e=r.pushNameFiles();0==r.options.input&&r.options.badge?0==r.$elementFilestyle.find(".badge").length?r.$elementFilestyle.find("label").append(' <span class="badge">'+e.length+"</span>"):0==e.length?r.$elementFilestyle.find(".badge").remove():r.$elementFilestyle.find(".badge").html(e.length):r.$elementFilestyle.find(".badge").remove()})),window.navigator.userAgent.search(/firefox/i)>-1&&r.$elementFilestyle.find("label").click((function(){return r.$element.click(),!1}))}};var n=e.fn.filestyle;e.fn.filestyle=function(t,n){var r="",a=this.each((function(){if("file"===e(this).attr("type")){var a=e(this),s=a.data("filestyle"),o=e.extend({},e.fn.filestyle.defaults,t,"object"==typeof t&&t);s||(a.data("filestyle",s=new i(this,o)),s.constructor()),"string"==typeof t&&(r=s[t](n))}}));return void 0!==typeof r?r:a},e.fn.filestyle.defaults={buttonText:"Choose file",iconName:"glyphicon glyphicon-folder-open",buttonName:"btn-default",size:"nr",input:!0,badge:!0,icon:!0,buttonBefore:!1,disabled:!1,placeholder:""},e.fn.filestyle.noConflict=function(){return e.fn.filestyle=n,this},e((function(){e(".filestyle").each((function(){var t=e(this),i={input:"false"!==t.attr("data-input"),icon:"false"!==t.attr("data-icon"),buttonBefore:"true"===t.attr("data-buttonBefore"),disabled:"true"===t.attr("data-disabled"),size:t.attr("data-size"),buttonText:t.attr("data-buttonText"),buttonName:t.attr("data-buttonName"),iconName:t.attr("data-iconName"),badge:"false"!==t.attr("data-badge"),placeholder:t.attr("data-placeholder")};t.filestyle(i)}))}))}(window.jQuery)},497:()=>{!function(){"use strict";var e=window.jQuery,t=window.Waypoint;function i(n){"scrollRestoration"in history&&e("body#category").length&&(history.scrollRestoration="manual"),this.options=e.extend({},i.defaults,n),this.container=this.options.element,"auto"!==this.options.container&&(this.container=this.options.container),this.$container=e(this.container),this.$more=e(this.options.more),this.start=this.$more.data("start"),prestashop.on("updateProductList",(t=>{if(void 0!==t.pagination)this.start=t.pagination.items_shown_from;else if(void 0!==t.rendered_products_bottom){var i=e(t.rendered_products).find(".product_count_infinite span").html();i&&(this.start=i)}})),this.$more.length&&(this.setupHandler(),this.waypoint=new t(this.options))}i.prototype.setupHandler=function(){this.options.handler=e.proxy((function(){this.options.onBeforePageLoad(),this.destroy(),this.$container.parent().addClass(this.options.loadingClass),e.get(e(this.options.more).attr("href"),{from_infi:""},e.proxy((function(i){var n=e(e.parseHTML(i)),r=n.find(this.options.more),a=n.find(this.options.items);a.length||(a=n.filter(this.options.items)),this.$container.append(a);var s=n.find(this.options.paginaton_sample);s.length||(s=n.filter(this.options.paginaton_sample)),e(this.options.paginaton_sample).replaceWith(s);var o=n.find(this.options.product_count_infinite);o.length||(o=n.filter(this.options.product_count_infinite)),o.find("span").html(this.start),e(this.options.product_count_infinite).replaceWith(o),this.$container.parent().removeClass(this.options.loadingClass),r.length||(r=n.filter(this.options.more)),r.length?(this.$more.replaceWith(r),this.$more=r,this.waypoint=new t(this.options)):this.$more.remove(),window.history.pushState({},void 0,o.data("current_url")),this.options.onAfterPageLoad(a)}),this))}),this)},i.prototype.destroy=function(){this.waypoint&&this.waypoint.destroy()},i.defaults={container:"auto",items:".infinite-item",paginaton_sample:".paginaton_sample",product_count_infinite:".product_count_infinite",more:".infinite-more-link",offset:"bottom-in-view",loadingClass:"infinite-loading",onBeforePageLoad:e.noop,onAfterPageLoad:e.noop},t.Infinite=i}()},73:()=>{!function(e){"use strict";e.fn.fitVids=function(t){var i={customSelector:null,ignore:null};return t&&e.extend(i,t),this.each((function(){var t=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&t.push(i.customSelector);var n=".fitvidsignore";i.ignore&&(n=n+", "+i.ignore);var r=e(this).find(t.join(","));(r=(r=r.not("object object")).not(n)).each((function(){var t=e(this);if(!(t.parents(n).length>0||"embed"===this.tagName.toLowerCase()&&t.parent("object").length||t.parent(".fluid-width-video-wrapper").length)){t.css("height")||t.css("width")||!isNaN(t.attr("height"))&&!isNaN(t.attr("width"))||(t.attr("height",9),t.attr("width",16));var i=("object"===this.tagName.toLowerCase()||t.attr("height")&&!isNaN(parseInt(t.attr("height"),10))?parseInt(t.attr("height"),10):t.height())/(isNaN(parseInt(t.attr("width"),10))?t.width():parseInt(t.attr("width"),10));if(!t.attr("name")){var r="fitvid"+e.fn.fitVids._count;t.attr("name",r),e.fn.fitVids._count++}t.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*i+"%"),t.removeAttr("height").removeAttr("width")}}))}))},e.fn.fitVids._count=0}(window.jQuery||window.Zepto)},783:function(e,t){var i,n,r;!function(a,s){"use strict";if("object"==typeof e.exports){if(!a.document)throw new Error("HC-Sticky requires a browser to run.");e.exports=s(a)}else n=[],i=s(a),void 0===(r="function"==typeof i?i.apply(t,n):i)||(e.exports=r)}("undefined"!=typeof window?window:this,(function(e){"use strict";var t={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,queries:null,queryFlow:"down",onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1},i=e.document,n=function(r,a){if("string"==typeof r&&(r=i.querySelector(r)),!r)return!1;var s={},o=n.Helpers,l=r.parentNode;"static"===o.getStyle(l,"position")&&(l.style.position="relative");var d=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};o.isEmptyObject(e)&&!o.isEmptyObject(s)||(s=Object.assign({},t,s,e))},c=function(){return s.disable},u=function(){if(s.queries){var i=e.innerWidth,n=s.queryFlow,r=s.queries;if(g=a,s=Object.assign({},t,g||{}),"up"===n)for(var l in r)l<=i&&!o.isEmptyObject(r[l])&&d(r[l]);else{var c=[];for(var u in s.queries){var p={};p[u]=r[u],c.push(p)}for(var h=c.length-1;0<=h;h--){var f=c[h],m=Object.keys(f)[0];i<=m&&!o.isEmptyObject(f[m])&&d(f[m])}}}var g},p={css:{},position:null,stick:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};o.hasClass(r,s.stickyClass)||(!1===h.isAttached&&h.attach(),p.position="fixed",r.style.position="fixed",r.style.left=h.offsetLeft+"px",r.style.width=h.width,void 0===e.bottom?r.style.bottom="auto":r.style.bottom=e.bottom+"px",void 0===e.top?r.style.top="auto":r.style.top=e.top+"px",r.classList?r.classList.add(s.stickyClass):r.className+=" "+s.stickyClass,s.onStart&&s.onStart.call(r,s))},release:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(e.stop=e.stop||!1,!0===e.stop||"fixed"===p.position||null===p.position||!(void 0===e.top&&void 0===e.bottom||void 0!==e.top&&(parseInt(o.getStyle(r,"top"))||0)===e.top||void 0!==e.bottom&&(parseInt(o.getStyle(r,"bottom"))||0)===e.bottom)){!0===e.stop?!0===h.isAttached&&h.detach():!1===h.isAttached&&h.attach();var t=e.position||p.css.position;p.position=t,r.style.position=t,r.style.left=!0===e.stop?p.css.left:h.positionLeft+"px",r.style.width="absolute"!==t?p.css.width:h.width,void 0===e.bottom?r.style.bottom=!0===e.stop?"":"auto":r.style.bottom=e.bottom+"px",void 0===e.top?r.style.top=!0===e.stop?"":"auto":r.style.top=e.top+"px",r.classList?r.classList.remove(s.stickyClass):r.className=r.className.replace(new RegExp("(^|\\b)"+s.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),s.onStop&&s.onStop.call(r,s)}}},h={el:i.createElement("div"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){for(var e in p.css)h.el.style[e]=p.css[e];h.el.style["z-index"]="-1";var t=o.getStyle(r);h.offsetLeft=o.offset(r).left-(parseInt(t.marginLeft)||0),h.positionLeft=o.position(r).left,h.width=o.getStyle(r,"width")},attach:function(){l.insertBefore(h.el,r),h.isAttached=!0},detach:function(){h.el=l.removeChild(h.el),h.isAttached=!1}},f=void 0,m=void 0,g=void 0,v=void 0,y=void 0,b=void 0,w=void 0,_=void 0,x=void 0,C=void 0,E=void 0,S=void 0,T=void 0,k=void 0,P=void 0,I=void 0,$=void 0,A=void 0,M=e.pageYOffset||i.documentElement.scrollTop,z=0,O=void 0,L=function(){P=A(),v=$(),T=y+v-_-E,k=w<P;var t=e.pageYOffset||i.documentElement.scrollTop,n=Math.round(o.offset(r).top),a=n-t,d=void 0;O=t<M?"up":"down",z=t-M,S<(M=t)?T+_+(k?x:0)-(s.followScroll&&k?0:_)<=t+P-C-(w-(S-C)<P-C&&s.followScroll&&0<(d=P-w-C)?d:0)?p.release({position:"absolute",bottom:b+l.offsetHeight-T-_}):k&&s.followScroll?"down"===O?Math.floor(a+P+x)<=w?p.stick({bottom:x}):"fixed"===p.position&&p.release({position:"absolute",top:n-_-S-z+C}):Math.ceil(a+C)<0&&"fixed"===p.position?p.release({position:"absolute",top:n-_-S+C-z}):t+_-C<=n&&p.stick({top:_-C}):p.stick({top:_-C}):p.release({stop:!0})},N=!1,D=!1,j=function(){N&&(o.event.unbind(e,"scroll",L),N=!1)},H=function(){var t,n,a,d;null!==r.offsetParent&&"none"!==o.getStyle(r,"display")?(p.css=(t=r,n=o.getCascadedStyle(t),a=o.getStyle(t),d={height:t.offsetHeight+"px",left:n.left,right:n.right,top:n.top,bottom:n.bottom,position:a.position,display:a.display,verticalAlign:a.verticalAlign,boxSizing:a.boxSizing,marginLeft:n.marginLeft,marginRight:n.marginRight,marginTop:n.marginTop,marginBottom:n.marginBottom,paddingLeft:n.paddingLeft,paddingRight:n.paddingRight},n.float&&(d.float=n.float||"none"),n.cssFloat&&(d.cssFloat=n.cssFloat||"none"),a.MozBoxSizing&&(d.MozBoxSizing=a.MozBoxSizing),d.width="auto"!==n.width?n.width:"border-box"===d.boxSizing||"border-box"===d.MozBoxSizing?t.offsetWidth+"px":a.width,d),h.init(),f=!(!s.stickTo||!("document"===s.stickTo||s.stickTo.nodeType&&9===s.stickTo.nodeType||"object"==typeof s.stickTo&&s.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),m=s.stickTo?f?i:"string"==typeof s.stickTo?i.querySelector(s.stickTo):s.stickTo:l,P=(A=function(){var e=r.offsetHeight+(parseInt(p.css.marginTop)||0)+(parseInt(p.css.marginBottom)||0),t=(P||0)-e;return-1<=t&&t<=1?P:e})(),v=($=function(){return f?Math.max(i.documentElement.clientHeight,i.body.scrollHeight,i.documentElement.scrollHeight,i.body.offsetHeight,i.documentElement.offsetHeight):m.offsetHeight})(),y=f?0:o.offset(m).top,b=s.stickTo?f?0:o.offset(l).top:y,w=e.innerHeight,I=r.offsetTop-(parseInt(p.css.marginTop)||0),g=s.innerSticker?"string"==typeof s.innerSticker?i.querySelector(s.innerSticker):s.innerSticker:null,_=isNaN(s.top)&&-1<s.top.indexOf("%")?parseFloat(s.top)/100*w:s.top,x=isNaN(s.bottom)&&-1<s.bottom.indexOf("%")?parseFloat(s.bottom)/100*w:s.bottom,C=g?g.offsetTop:s.innerTop?s.innerTop:0,E=isNaN(s.bottomEnd)&&-1<s.bottomEnd.indexOf("%")?parseFloat(s.bottomEnd)/100*w:s.bottomEnd,S=y-_+C+I,v<=P?j():(L(),N||(o.event.bind(e,"scroll",L),N=!0))):j()},F=function(){r.style.position="",r.style.left="",r.style.top="",r.style.bottom="",r.style.width="",r.classList?r.classList.remove(s.stickyClass):r.className=r.className.replace(new RegExp("(^|\\b)"+s.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),p.css={},!(p.position=null)===h.isAttached&&h.detach()},B=function(){F(),u(),c()?j():H()},q=function(){s.onBeforeResize&&s.onBeforeResize.call(r,s),B(),s.onResize&&s.onResize.call(r,s)},V=s.resizeDebounce?o.debounce(q,s.resizeDebounce):q,W=function(){D&&(o.event.unbind(e,"resize",V),D=!1),j()},R=function(){D||(o.event.bind(e,"resize",V),D=!0),u(),c()?j():H()};this.options=function(e){return e?s.option||null:Object.assign({},s)},this.reinit=B,this.update=function(e){d(e),a=Object.assign({},a,e||{}),B()},this.attach=R,this.detach=W,this.destroy=function(){W(),F()},d(a),R(),o.event.bind(e,"load",B)};if(void 0!==e.jQuery){var r=e.jQuery;r.fn.extend({hcSticky:function(e){return this.length?this.each((function(){var t="hcSticky",i=r.data(this,t);i?i.update(e):(i=new n(this,e),r.data(this,t,i))})):this}})}return e.hcSticky=e.hcSticky||n,n})),function(e){"use strict";var t=e.hcSticky,i=e.document;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a])}return i},writable:!0,configurable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(e){var t,i;if(null==this)throw new TypeError("this is null or not defined");var n=Object(this),r=n.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),i=0;i<r;){var a;i in n&&(a=n[i],e.call(t,a,i,n)),i++}});var n=function(){var t=i.documentElement,n=function(){};function r(t){var i=e.event;return i.target=i.target||i.srcElement||t,i}t.addEventListener?n=function(e,t,i){e.addEventListener(t,i,!1)}:t.attachEvent&&(n=function(e,t,i){e[t+i]=i.handleEvent?function(){var t=r(e);i.handleEvent.call(i,t)}:function(){var t=r(e);i.call(e,t)},e.attachEvent("on"+t,e[t+i])});var a=function(){};return t.removeEventListener?a=function(e,t,i){e.removeEventListener(t,i,!1)}:t.detachEvent&&(a=function(e,t,i){e.detachEvent("on"+t,e[t+i]);try{delete e[t+i]}catch(n){e[t+i]=void 0}}),{bind:n,unbind:a}}(),r=function(t,n){return e.getComputedStyle?n?i.defaultView.getComputedStyle(t,null).getPropertyValue(n):i.defaultView.getComputedStyle(t,null):t.currentStyle?n?t.currentStyle[n.replace(/-\w/g,(function(e){return e.toUpperCase().replace("-","")}))]:t.currentStyle:void 0},a=function(t){var n=t.getBoundingClientRect(),r=e.pageYOffset||i.documentElement.scrollTop,a=e.pageXOffset||i.documentElement.scrollLeft;return{top:n.top+r,left:n.left+a}};t.Helpers={isEmptyObject:function(e){for(var t in e)return!1;return!0},debounce:function(e,t,i){var n=void 0;return function(){var r=this,a=arguments,s=i&&!n;clearTimeout(n),n=setTimeout((function(){n=null,i||e.apply(r,a)}),t),s&&e.apply(r,a)}},hasClass:function(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)},offset:a,position:function(e){var t=e.offsetParent,i=a(t),n=a(e),s=r(t),o=r(e);return i.top+=parseInt(s.borderTopWidth)||0,i.left+=parseInt(s.borderLeftWidth)||0,{top:n.top-i.top-(parseInt(o.marginTop)||0),left:n.left-i.left-(parseInt(o.marginLeft)||0)}},getStyle:r,getCascadedStyle:function(t){var n=t.cloneNode(!0);n.style.display="none",Array.prototype.slice.call(n.querySelectorAll('input[type="radio"]')).forEach((function(e){e.removeAttribute("name")})),t.parentNode.insertBefore(n,t.nextSibling);var r=void 0;n.currentStyle?r=n.currentStyle:e.getComputedStyle&&(r=i.defaultView.getComputedStyle(n,null));var a={};for(var s in r)!isNaN(s)||"string"!=typeof r[s]&&"number"!=typeof r[s]||(a[s]=r[s]);if(Object.keys(a).length<3)for(var o in a={},r)isNaN(o)||(a[r[o].replace(/-\w/g,(function(e){return e.toUpperCase().replace("-","")}))]=r.getPropertyValue(r[o]));if(a.margin||"auto"!==a.marginLeft?a.margin||a.marginLeft!==a.marginRight||a.marginLeft!==a.marginTop||a.marginLeft!==a.marginBottom||(a.margin=a.marginLeft):a.margin="auto",!a.margin&&"0px"===a.marginLeft&&"0px"===a.marginRight){var l=t.offsetLeft-t.parentNode.offsetLeft,d=l-(parseInt(a.left)||0)-(parseInt(a.right)||0),c=t.parentNode.offsetWidth-t.offsetWidth-l-(parseInt(a.right)||0)+(parseInt(a.left)||0)-d;0!==c&&1!==c||(a.margin="auto")}return n.parentNode.removeChild(n),n=null,a},event:n}}(window)},714:()=>{jQuery.fn.extend({staccordion:function(){return this.each((function(){var e=$(this),t="accordiated",i="active",n="slideToggle",r=".mo_sub_ul, .stmobilemenu_column",a="fast",s="li";if(e.data(t))return!1;$.each(e.find(".mo_sub_ul, .stmobilemenu_column"),(function(){$(this).data(t,!0),$(this).hide()})),$.each(e.find("span.opener"),(function(){$(this).click((function(t){!function(t,o){$(t).parent(s).siblings().removeClass(i).children(r).slideUp(a);var l=$(t).parent(s).children(r);$(".st_menu_lazy",l).each((function(){$(this).attr("src",$(this).data("src")).removeClass("st_menu_lazy")})),$(t).siblings(r)[o||n](!1,(function(){$(t).siblings(r).is(":visible")?$(t).parents(s).not(e.parents()).addClass(i):$(t).parent(s).removeClass(i),$(t).parents().show()}))}($(this).parent(),n)}))}))}))}})},661:()=>{!function(e){"use strict";var t=0;function i(t,i){return e.map(t,(function(e){return function(e,t){return e+".touchspin_"+t}(e,i)}))}e.fn.TouchSpin=function(n){if("destroy"!==n){var r={min:0,max:100,initval:"",replacementval:"",step:1,decimals:0,stepinterval:100,forcestepdivisibility:"round",stepintervaldelay:500,verticalbuttons:!1,verticalupclass:"glyphicon glyphicon-chevron-up",verticaldownclass:"glyphicon glyphicon-chevron-down",prefix:"",postfix:"",prefix_extraclass:"",postfix_extraclass:"",booster:!0,boostat:10,maxboostedstep:!1,mousewheel:!0,buttondown_class:"btn btn-default",buttonup_class:"btn btn-default",buttondown_txt:"-",buttonup_txt:"+"},a={min:"min",max:"max",initval:"init-val",replacementval:"replacement-val",step:"step",decimals:"decimals",stepinterval:"step-interval",verticalbuttons:"vertical-buttons",verticalupclass:"vertical-up-class",verticaldownclass:"vertical-down-class",forcestepdivisibility:"force-step-divisibility",stepintervaldelay:"step-interval-delay",prefix:"prefix",postfix:"postfix",prefix_extraclass:"prefix-extra-class",postfix_extraclass:"postfix-extra-class",booster:"booster",boostat:"boostat",maxboostedstep:"max-boosted-step",mousewheel:"mouse-wheel",buttondown_class:"button-down-class",buttonup_class:"button-up-class",buttondown_txt:"button-down-txt",buttonup_txt:"button-up-txt"};return this.each((function(){var s,o,l,d,c,u,p,h,f,m,g,v,y=e(this),b=y.data(),w=0,_=!1;function x(){var e,t,i;""!==(e=y.val())?s.decimals>0&&"."===e||(t=parseFloat(e),isNaN(t)&&(t=""!==s.replacementval?s.replacementval:0),i=t,t.toString()!==e&&(i=t),t<s.min&&(i=s.min),t>s.max&&(i=s.max),i=function(e){switch(s.forcestepdivisibility){case"round":return(Math.round(e/s.step)*s.step).toFixed(s.decimals);case"floor":return(Math.floor(e/s.step)*s.step).toFixed(s.decimals);case"ceil":return(Math.ceil(e/s.step)*s.step).toFixed(s.decimals);default:return e}}(i),Number(e).toString()!==i.toString()&&(y.val(i),y.trigger("change"))):""!==s.replacementval&&(y.val(s.replacementval),y.trigger("change"))}function C(){if(s.booster){var e=Math.pow(2,Math.floor(w/s.boostat))*s.step;return s.maxboostedstep&&e>s.maxboostedstep&&(e=s.maxboostedstep,d=Math.round(d/e)*e),Math.max(s.step,e)}return s.step}function E(){x(),d=parseFloat(l.input.val()),isNaN(d)&&(d=0);var e=d,t=C();(d+=t)>s.max&&(d=s.max,y.trigger("touchspin.on.max"),P()),l.input.val(Number(d).toFixed(s.decimals)),e!==d&&y.trigger("change")}function S(){x(),d=parseFloat(l.input.val()),isNaN(d)&&(d=0);var e=d,t=C();(d-=t)<s.min&&(d=s.min,y.trigger("touchspin.on.min"),P()),l.input.val(d.toFixed(s.decimals)),e!==d&&y.trigger("change")}function T(){P(),w=0,_="down",y.trigger("touchspin.on.startspin"),y.trigger("touchspin.on.startdownspin"),p=setTimeout((function(){c=setInterval((function(){w++,S()}),s.stepinterval)}),s.stepintervaldelay)}function k(){P(),w=0,_="up",y.trigger("touchspin.on.startspin"),y.trigger("touchspin.on.startupspin"),h=setTimeout((function(){u=setInterval((function(){w++,E()}),s.stepinterval)}),s.stepintervaldelay)}function P(){switch(clearTimeout(p),clearTimeout(h),clearInterval(c),clearInterval(u),_){case"up":y.trigger("touchspin.on.stopupspin"),y.trigger("touchspin.on.stopspin");break;case"down":y.trigger("touchspin.on.stopdownspin"),y.trigger("touchspin.on.stopspin")}w=0,_=!1}y.data("alreadyinitialized")||(y.data("alreadyinitialized",!0),t+=1,y.data("spinnerid",t),y.is("input")?(""!==(s=e.extend({},r,b,(v={},e.each(a,(function(e,t){var i="bts-"+t;y.is("[data-"+i+"]")&&(v[e]=y.data(i))})),v),n)).initval&&""===y.val()&&y.val(s.initval),x(),m=y.val(),g=y.parent(),""!==m&&(m=Number(m).toFixed(s.decimals)),y.data("initvalue",m).val(m),y.addClass("form-control"),g.hasClass("input-group")?function(t){t.addClass("bootstrap-touchspin");var i,n,r=y.prev(),a=y.next(),l='<span class="input-group-addon bootstrap-touchspin-prefix">'+s.prefix+"</span>",d='<span class="input-group-addon bootstrap-touchspin-postfix">'+s.postfix+"</span>";r.hasClass("input-group-btn")?(i='<button class="'+s.buttondown_class+' bootstrap-touchspin-down" type="button">'+s.buttondown_txt+"</button>",r.append(i)):(i='<span class="input-group-btn"><button class="'+s.buttondown_class+' bootstrap-touchspin-down" type="button">'+s.buttondown_txt+"</button></span>",e(i).insertBefore(y)),a.hasClass("input-group-btn")?(n='<button class="'+s.buttonup_class+' bootstrap-touchspin-up" type="button">'+s.buttonup_txt+"</button>",a.prepend(n)):(n='<span class="input-group-btn"><button class="'+s.buttonup_class+' bootstrap-touchspin-up" type="button">'+s.buttonup_txt+"</button></span>",e(n).insertAfter(y)),e(l).insertBefore(y),e(d).insertAfter(y),o=t}(g):(f=s.verticalbuttons?'<div class="input-group bootstrap-touchspin"><span class="input-group-addon bootstrap-touchspin-prefix">'+s.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+s.postfix+'</span><span class="input-group-btn-vertical"><button class="'+s.buttondown_class+' bootstrap-touchspin-up" type="button"><i class="'+s.verticalupclass+'"></i></button><button class="'+s.buttonup_class+' bootstrap-touchspin-down" type="button"><i class="'+s.verticaldownclass+'"></i></button></span></div>':'<div class="input-group bootstrap-touchspin"><span class="input-group-btn"><button class="'+s.buttondown_class+' bootstrap-touchspin-down" type="button">'+s.buttondown_txt+'</button></span><span class="input-group-addon bootstrap-touchspin-prefix">'+s.prefix+'</span><span class="input-group-addon bootstrap-touchspin-postfix">'+s.postfix+'</span><span class="input-group-btn"><button class="'+s.buttonup_class+' bootstrap-touchspin-up" type="button">'+s.buttonup_txt+"</button></span></div>",o=e(f).insertBefore(y),e(".bootstrap-touchspin-prefix",o).after(y),y.hasClass("input-sm")?o.addClass("input-group-sm"):y.hasClass("input-lg")&&o.addClass("input-group-lg")),l={down:e(".bootstrap-touchspin-down",o),up:e(".bootstrap-touchspin-up",o),input:e("input",o),prefix:e(".bootstrap-touchspin-prefix",o).addClass(s.prefix_extraclass),postfix:e(".bootstrap-touchspin-postfix",o).addClass(s.postfix_extraclass)},""===s.prefix&&l.prefix.hide(),""===s.postfix&&l.postfix.hide(),y.on("keydown",(function(e){var t=e.keyCode||e.which;38===t?("up"!==_&&(E(),k()),e.preventDefault()):40===t&&("down"!==_&&(S(),T()),e.preventDefault())})),y.on("keyup",(function(e){var t=e.keyCode||e.which;(38===t||40===t)&&P()})),y.on("blur",(function(){x()})),l.down.on("keydown",(function(e){var t=e.keyCode||e.which;32!==t&&13!==t||("down"!==_&&(S(),T()),e.preventDefault())})),l.down.on("keyup",(function(e){var t=e.keyCode||e.which;32!==t&&13!==t||P()})),l.up.on("keydown",(function(e){var t=e.keyCode||e.which;32!==t&&13!==t||("up"!==_&&(E(),k()),e.preventDefault())})),l.up.on("keyup",(function(e){var t=e.keyCode||e.which;32!==t&&13!==t||P()})),l.down.on("mousedown.touchspin",(function(e){l.down.off("touchstart.touchspin"),y.is(":disabled")||(S(),T(),e.preventDefault(),e.stopPropagation())})),l.down.on("touchstart.touchspin",(function(e){l.down.off("mousedown.touchspin"),y.is(":disabled")||(S(),T(),e.preventDefault(),e.stopPropagation())})),l.up.on("mousedown.touchspin",(function(e){l.up.off("touchstart.touchspin"),y.is(":disabled")||(E(),k(),e.preventDefault(),e.stopPropagation())})),l.up.on("touchstart.touchspin",(function(e){l.up.off("mousedown.touchspin"),y.is(":disabled")||(E(),k(),e.preventDefault(),e.stopPropagation())})),l.up.on("mouseout touchleave touchend touchcancel",(function(e){_&&(e.stopPropagation(),P())})),l.down.on("mouseout touchleave touchend touchcancel",(function(e){_&&(e.stopPropagation(),P())})),l.down.on("mousemove touchmove",(function(e){_&&(e.stopPropagation(),e.preventDefault())})),l.up.on("mousemove touchmove",(function(e){_&&(e.stopPropagation(),e.preventDefault())})),e(document).on(i(["mouseup","touchend","touchcancel"],t).join(" "),(function(e){_&&(e.preventDefault(),P())})),e(document).on(i(["mousemove","touchmove","scroll","scrollstart"],t).join(" "),(function(e){_&&(e.preventDefault(),P())})),y.on("mousewheel DOMMouseScroll",(function(e){if(s.mousewheel&&y.is(":focus")){var t=e.originalEvent.wheelDelta||-e.originalEvent.deltaY||-e.originalEvent.detail;e.stopPropagation(),e.preventDefault(),t<0?S():E()}})),y.on("touchspin.uponce",(function(){P(),E()})),y.on("touchspin.downonce",(function(){P(),S()})),y.on("touchspin.startupspin",(function(){k()})),y.on("touchspin.startdownspin",(function(){T()})),y.on("touchspin.stopspin",(function(){P()})),y.on("touchspin.updatesettings",(function(t,i){!function(t){(function(t){s=e.extend({},s,t)})(t),x();var i=l.input.val();""!==i&&(i=Number(l.input.val()),l.input.val(i.toFixed(s.decimals)))}(i)})),l.input.css("display","block")):console.log("Must be an input."))}))}this.each((function(){var t=e(this).data();e(document).off(i(["mouseup","touchend","touchcancel","mousemove","touchmove","scroll","scrollstart"],t.spinnerid).join(" "))}))}}(jQuery)},615:()=>{if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");!function(e){var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(),function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var t,i,n,r,a,s,o,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),c=function(e){function t(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function i(e){return(e[0]||e).nodeType}var n=!1,r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},a={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");return t||(t=e.getAttribute("href")||"",t=/^#[a-z]/i.test(t)?t:null),t},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger(n.end)},supportsTransitionEnd:function(){return Boolean(n)},typeCheckConfig:function(e,n,r){for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],o=n[a],l=o&&i(o)?"element":t(o);if(!new RegExp(s).test(l))throw new Error(e.toUpperCase()+': Option "'+a+'" provided type "'+l+'" but expected type "'+s+'".')}}};return n=function(){if(window.QUnit)return!1;var e=document.createElement("bootstrap");for(var t in r)if(void 0!==e.style[t])return{end:r[t]};return!1}(),e.fn.emulateTransitionEnd=function(t){var i=this,n=!1;return e(this).one(a.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||a.triggerTransitionEnd(i)}),t),this},a.supportsTransitionEnd()&&(e.event.special[a.TRANSITION_END]={bindType:n.end,delegateType:n.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}),a}(jQuery),u=(t=jQuery,i="alert",r="."+(n="bs.alert"),a=t.fn[i],s={CLOSE:"close"+r,CLOSED:"closed"+r,CLICK_DATA_API:"click"+r+".data-api"},"alert","fade","show",o=function(){function i(t){e(this,i),this._element=t}return i.prototype.close=function(e){e=e||this._element;var t=this._getRootElement(e);this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},i.prototype.dispose=function(){t.removeData(this._element,n),this._element=null},i.prototype._getRootElement=function(e){var i=c.getSelectorFromElement(e),n=!1;return i&&(n=t(i)[0]),n||(n=t(e).closest(".alert")[0]),n},i.prototype._triggerCloseEvent=function(e){var i=t.Event(s.CLOSE);return t(e).trigger(i),i},i.prototype._removeElement=function(e){var i=this;return t(e).removeClass("show"),c.supportsTransitionEnd()&&t(e).hasClass("fade")?void t(e).one(c.TRANSITION_END,(function(t){return i._destroyElement(e,t)})).emulateTransitionEnd(150):void this._destroyElement(e)},i.prototype._destroyElement=function(e){t(e).detach().trigger(s.CLOSED).remove()},i._jQueryInterface=function(e){return this.each((function(){var r=t(this),a=r.data(n);a||(a=new i(this),r.data(n,a)),"close"===e&&a[e](this)}))},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},d(i,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),i}(),t(document).on(s.CLICK_DATA_API,'[data-dismiss="alert"]',o._handleDismiss(new o)),t.fn[i]=o._jQueryInterface,t.fn[i].Constructor=o,t.fn[i].noConflict=function(){return t.fn[i]=a,o._jQueryInterface},function(t){var i="button",n="bs.button",r="."+n,a=".data-api",s=t.fn[i],o="active",l='[data-toggle^="button"]',c=".btn",u={CLICK_DATA_API:"click"+r+a,FOCUS_BLUR_DATA_API:"focus"+r+a+" blur"+r+a},p=function(){function i(t){e(this,i),this._element=t}return i.prototype.toggle=function(){var e=!0,i=t(this._element).closest('[data-toggle="buttons"]')[0];if(i){var n=t(this._element).find("input")[0];if(n){if("radio"===n.type)if(n.checked&&t(this._element).hasClass(o))e=!1;else{var r=t(i).find(".active")[0];r&&t(r).removeClass(o)}e&&(n.checked=!t(this._element).hasClass(o),t(n).trigger("change")),n.focus()}}this._element.setAttribute("aria-pressed",!t(this._element).hasClass(o)),e&&t(this._element).toggleClass(o)},i.prototype.dispose=function(){t.removeData(this._element,n),this._element=null},i._jQueryInterface=function(e){return this.each((function(){var r=t(this).data(n);r||(r=new i(this),t(this).data(n,r)),"toggle"===e&&r[e]()}))},d(i,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),i}();t(document).on(u.CLICK_DATA_API,l,(function(e){e.preventDefault();var i=e.target;t(i).hasClass("btn")||(i=t(i).closest(c)),p._jQueryInterface.call(t(i),"toggle")})).on(u.FOCUS_BLUR_DATA_API,l,(function(e){var i=t(e.target).closest(c)[0];t(i).toggleClass("focus",/^focus(in)?$/.test(e.type))})),t.fn[i]=p._jQueryInterface,t.fn[i].Constructor=p,t.fn[i].noConflict=function(){return t.fn[i]=s,p._jQueryInterface}}(jQuery),function(t){var i="carousel",n="bs.carousel",r="."+n,a=".data-api",s=t.fn[i],o={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},u={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},p={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},h={SLIDE:"slide"+r,SLID:"slid"+r,KEYDOWN:"keydown"+r,MOUSEENTER:"mouseenter"+r,MOUSELEAVE:"mouseleave"+r,LOAD_DATA_API:"load"+r+a,CLICK_DATA_API:"click"+r+a},f="active",m=".active.carousel-item",g=function(){function a(i,n){e(this,a),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=this._getConfig(n),this._element=t(i)[0],this._indicatorsElement=t(this._element).find(".carousel-indicators")[0],this._addEventListeners()}return a.prototype.next=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(p.NEXT)},a.prototype.nextWhenVisible=function(){document.hidden||this.next()},a.prototype.prev=function(){if(this._isSliding)throw new Error("Carousel is sliding");this._slide(p.PREVIOUS)},a.prototype.pause=function(e){e||(this._isPaused=!0),t(this._element).find(".carousel-item-next, .carousel-item-prev")[0]&&c.supportsTransitionEnd()&&(c.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},a.prototype.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},a.prototype.to=function(e){var i=this;this._activeElement=t(this._element).find(m)[0];var n=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0)){if(this._isSliding)return void t(this._element).one(h.SLID,(function(){return i.to(e)}));if(n===e)return this.pause(),void this.cycle();var r=e>n?p.NEXT:p.PREVIOUS;this._slide(r,this._items[e])}},a.prototype.dispose=function(){t(this._element).off(r),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},a.prototype._getConfig=function(e){return e=t.extend({},o,e),c.typeCheckConfig(i,e,u),e},a.prototype._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(h.KEYDOWN,(function(t){return e._keydown(t)})),"hover"!==this._config.pause||"ontouchstart"in document.documentElement||t(this._element).on(h.MOUSEENTER,(function(t){return e.pause(t)})).on(h.MOUSELEAVE,(function(t){return e.cycle(t)}))},a.prototype._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next();break;default:return}},a.prototype._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(".carousel-item")),this._items.indexOf(e)},a.prototype._getItemByDirection=function(e,t){var i=e===p.NEXT,n=e===p.PREVIOUS,r=this._getItemIndex(t),a=this._items.length-1;if((n&&0===r||i&&r===a)&&!this._config.wrap)return t;var s=(r+(e===p.PREVIOUS?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},a.prototype._triggerSlideEvent=function(e,i){var n=t.Event(h.SLIDE,{relatedTarget:e,direction:i});return t(this._element).trigger(n),n},a.prototype._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(".active").removeClass(f);var i=this._indicatorsElement.children[this._getItemIndex(e)];i&&t(i).addClass(f)}},a.prototype._slide=function(e,i){var n=this,r=t(this._element).find(m)[0],a=i||r&&this._getItemByDirection(e,r),s=Boolean(this._interval),o=void 0,l=void 0,d=void 0;if(e===p.NEXT?(o="carousel-item-left",l="carousel-item-next",d=p.LEFT):(o="carousel-item-right",l="carousel-item-prev",d=p.RIGHT),a&&t(a).hasClass(f))this._isSliding=!1;else if(!this._triggerSlideEvent(a,d).isDefaultPrevented()&&r&&a){this._isSliding=!0,s&&this.pause(),this._setActiveIndicatorElement(a);var u=t.Event(h.SLID,{relatedTarget:a,direction:d});c.supportsTransitionEnd()&&t(this._element).hasClass("slide")?(t(a).addClass(l),c.reflow(a),t(r).addClass(o),t(a).addClass(o),t(r).one(c.TRANSITION_END,(function(){t(a).removeClass(o+" "+l).addClass(f),t(r).removeClass(f+" "+l+" "+o),n._isSliding=!1,setTimeout((function(){return t(n._element).trigger(u)}),0)})).emulateTransitionEnd(600)):(t(r).removeClass(f),t(a).addClass(f),this._isSliding=!1,t(this._element).trigger(u)),s&&this.cycle()}},a._jQueryInterface=function(e){return this.each((function(){var i=t(this).data(n),r=t.extend({},o,t(this).data());"object"===(void 0===e?"undefined":l(e))&&t.extend(r,e);var s="string"==typeof e?e:r.slide;if(i||(i=new a(this,r),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof s){if(void 0===i[s])throw new Error('No method named "'+s+'"');i[s]()}else r.interval&&(i.pause(),i.cycle())}))},a._dataApiClickHandler=function(e){var i=c.getSelectorFromElement(this);if(i){var r=t(i)[0];if(r&&t(r).hasClass("carousel")){var s=t.extend({},t(r).data(),t(this).data()),o=this.getAttribute("data-slide-to");o&&(s.interval=!1),a._jQueryInterface.call(t(r),s),o&&t(r).data(n).to(o),e.preventDefault()}}},d(a,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return o}}]),a}();t(document).on(h.CLICK_DATA_API,"[data-slide], [data-slide-to]",g._dataApiClickHandler),t(window).on(h.LOAD_DATA_API,(function(){t('[data-ride="carousel"]').each((function(){var e=t(this);g._jQueryInterface.call(e,e.data())}))})),t.fn[i]=g._jQueryInterface,t.fn[i].Constructor=g,t.fn[i].noConflict=function(){return t.fn[i]=s,g._jQueryInterface}}(jQuery),function(t){var i="collapse",n="bs.collapse",r="."+n,a=t.fn[i],s={toggle:!0,parent:""},o={toggle:"boolean",parent:"string"},u={SHOW:"show"+r,SHOWN:"shown"+r,HIDE:"hide"+r,HIDDEN:"hidden"+r,CLICK_DATA_API:"click"+r+".data-api"},p="show",h="collapse",f="collapsing",m="collapsed",g="width",v=function(){function r(i,n){e(this,r),this._isTransitioning=!1,this._element=i,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]')),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return r.prototype.toggle=function(){t(this._element).hasClass(p)?this.hide():this.show()},r.prototype.show=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(!t(this._element).hasClass(p)){var i=void 0,a=void 0;if(this._parent&&((i=t.makeArray(t(this._parent).find(".card > .show, .card > .collapsing"))).length||(i=null)),!(i&&(a=t(i).data(n),a&&a._isTransitioning))){var s=t.Event(u.SHOW);if(t(this._element).trigger(s),!s.isDefaultPrevented()){i&&(r._jQueryInterface.call(t(i),"hide"),a||t(i).data(n,null));var o=this._getDimension();t(this._element).removeClass(h).addClass(f),this._element.style[o]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&t(this._triggerArray).removeClass(m).attr("aria-expanded",!0),this.setTransitioning(!0);var l=function(){t(e._element).removeClass(f).addClass(h).addClass(p),e._element.style[o]="",e.setTransitioning(!1),t(e._element).trigger(u.SHOWN)};if(!c.supportsTransitionEnd())return void l();var d="scroll"+(o[0].toUpperCase()+o.slice(1));t(this._element).one(c.TRANSITION_END,l).emulateTransitionEnd(600),this._element.style[o]=this._element[d]+"px"}}}},r.prototype.hide=function(){var e=this;if(this._isTransitioning)throw new Error("Collapse is transitioning");if(t(this._element).hasClass(p)){var i=t.Event(u.HIDE);if(t(this._element).trigger(i),!i.isDefaultPrevented()){var n=this._getDimension(),r=n===g?"offsetWidth":"offsetHeight";this._element.style[n]=this._element[r]+"px",c.reflow(this._element),t(this._element).addClass(f).removeClass(h).removeClass(p),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&t(this._triggerArray).addClass(m).attr("aria-expanded",!1),this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(f).addClass(h).trigger(u.HIDDEN)};return this._element.style[n]="",c.supportsTransitionEnd()?void t(this._element).one(c.TRANSITION_END,a).emulateTransitionEnd(600):void a()}}},r.prototype.setTransitioning=function(e){this._isTransitioning=e},r.prototype.dispose=function(){t.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},r.prototype._getConfig=function(e){return(e=t.extend({},s,e)).toggle=Boolean(e.toggle),c.typeCheckConfig(i,e,o),e},r.prototype._getDimension=function(){return t(this._element).hasClass(g)?g:"height"},r.prototype._getParent=function(){var e=this,i=t(this._config.parent)[0],n='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(i).find(n).each((function(t,i){e._addAriaAndCollapsedClass(r._getTargetFromElement(i),[i])})),i},r.prototype._addAriaAndCollapsedClass=function(e,i){if(e){var n=t(e).hasClass(p);e.setAttribute("aria-expanded",n),i.length&&t(i).toggleClass(m,!n).attr("aria-expanded",n)}},r._getTargetFromElement=function(e){var i=c.getSelectorFromElement(e);return i?t(i)[0]:null},r._jQueryInterface=function(e){return this.each((function(){var i=t(this),a=i.data(n),o=t.extend({},s,i.data(),"object"===(void 0===e?"undefined":l(e))&&e);if(!a&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),a||(a=new r(this,o),i.data(n,a)),"string"==typeof e){if(void 0===a[e])throw new Error('No method named "'+e+'"');a[e]()}}))},d(r,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return s}}]),r}();t(document).on(u.CLICK_DATA_API,'[data-toggle="collapse"]',(function(e){e.preventDefault();var i=v._getTargetFromElement(this),r=t(i).data(n)?"toggle":t(this).data();v._jQueryInterface.call(t(i),r)})),t.fn[i]=v._jQueryInterface,t.fn[i].Constructor=v,t.fn[i].noConflict=function(){return t.fn[i]=a,v._jQueryInterface}}(jQuery),function(t){var i="dropdown",n="bs.dropdown",r="."+n,a=".data-api",s=t.fn[i],o={HIDE:"hide"+r,HIDDEN:"hidden"+r,SHOW:"show"+r,SHOWN:"shown"+r,CLICK:"click"+r,CLICK_DATA_API:"click"+r+a,FOCUSIN_DATA_API:"focusin"+r+a,KEYDOWN_DATA_API:"keydown"+r+a},l="disabled",u="show",p='[data-toggle="dropdown"]',h=function(){function i(t){e(this,i),this._element=t,this._addEventListeners()}return i.prototype.toggle=function(){if(this.disabled||t(this).hasClass(l))return!1;var e=i._getParentFromElement(this),n=t(e).hasClass(u);if(i._clearMenus(),n)return!1;if("ontouchstart"in document.documentElement&&!t(e).closest(".navbar-nav").length){var r=document.createElement("div");r.className="dropdown-backdrop",t(r).insertBefore(this),t(r).on("click",i._clearMenus)}var a={relatedTarget:this},s=t.Event(o.SHOW,a);return t(e).trigger(s),!s.isDefaultPrevented()&&(this.focus(),this.setAttribute("aria-expanded",!0),t(e).toggleClass(u),t(e).trigger(t.Event(o.SHOWN,a)),!1)},i.prototype.dispose=function(){t.removeData(this._element,n),t(this._element).off(r),this._element=null},i.prototype._addEventListeners=function(){t(this._element).on(o.CLICK,this.toggle)},i._jQueryInterface=function(e){return this.each((function(){var r=t(this).data(n);if(r||(r=new i(this),t(this).data(n,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e].call(this)}}))},i._clearMenus=function(e){if(!e||3!==e.which){var n=t(".dropdown-backdrop")[0];n&&n.parentNode.removeChild(n);for(var r=t.makeArray(t(p)),a=0;a<r.length;a++){var s=i._getParentFromElement(r[a]),l={relatedTarget:r[a]};if(t(s).hasClass(u)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"focusin"===e.type)&&t.contains(s,e.target))){var d=t.Event(o.HIDE,l);t(s).trigger(d),d.isDefaultPrevented()||(r[a].setAttribute("aria-expanded","false"),t(s).removeClass(u).trigger(t.Event(o.HIDDEN,l)))}}}},i._getParentFromElement=function(e){var i=void 0,n=c.getSelectorFromElement(e);return n&&(i=t(n)[0]),i||e.parentNode},i._dataApiKeydownHandler=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!t(this).hasClass(l))){var n=i._getParentFromElement(this),r=t(n).hasClass(u);if(!r&&27!==e.which||r&&27===e.which){if(27===e.which){var a=t(n).find(p)[0];t(a).trigger("focus")}return void t(this).trigger("click")}var s=t(n).find('[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a').get();if(s.length){var o=s.indexOf(e.target);38===e.which&&o>0&&o--,40===e.which&&o<s.length-1&&o++,o<0&&(o=0),s[o].focus()}}},d(i,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),i}();t(document).on(o.KEYDOWN_DATA_API,p,h._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,'[role="menu"]',h._dataApiKeydownHandler).on(o.KEYDOWN_DATA_API,'[role="listbox"]',h._dataApiKeydownHandler).on(o.CLICK_DATA_API+" "+o.FOCUSIN_DATA_API,h._clearMenus).on(o.CLICK_DATA_API,p,h.prototype.toggle).on(o.CLICK_DATA_API,".dropdown form",(function(e){e.stopPropagation()})),t.fn[i]=h._jQueryInterface,t.fn[i].Constructor=h,t.fn[i].noConflict=function(){return t.fn[i]=s,h._jQueryInterface}}(jQuery),function(t){var i="modal",n="bs.modal",r="."+n,a=t.fn[i],s={backdrop:!0,keyboard:!0,focus:!0,show:!0},o={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},u={HIDE:"hide"+r,HIDDEN:"hidden"+r,SHOW:"show"+r,SHOWN:"shown"+r,FOCUSIN:"focusin"+r,RESIZE:"resize"+r,CLICK_DISMISS:"click.dismiss"+r,KEYDOWN_DISMISS:"keydown.dismiss"+r,MOUSEUP_DISMISS:"mouseup.dismiss"+r,MOUSEDOWN_DISMISS:"mousedown.dismiss"+r,CLICK_DATA_API:"click"+r+".data-api"},p="modal-open",h="fade",f="show",m=function(){function a(i,n){e(this,a),this._config=this._getConfig(n),this._element=i,this._dialog=t(i).find(".modal-dialog")[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return a.prototype.toggle=function(e){return this._isShown?this.hide():this.show(e)},a.prototype.show=function(e){var i=this;if(this._isTransitioning)throw new Error("Modal is transitioning");c.supportsTransitionEnd()&&t(this._element).hasClass(h)&&(this._isTransitioning=!0);var n=t.Event(u.SHOW,{relatedTarget:e});t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),t(document.body).addClass(p),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(u.CLICK_DISMISS,'[data-dismiss="modal"]',(function(e){return i.hide(e)})),t(this._dialog).on(u.MOUSEDOWN_DISMISS,(function(){t(i._element).one(u.MOUSEUP_DISMISS,(function(e){t(e.target).is(i._element)&&(i._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return i._showElement(e)})))},a.prototype.hide=function(e){var i=this;if(e&&e.preventDefault(),this._isTransitioning)throw new Error("Modal is transitioning");var n=c.supportsTransitionEnd()&&t(this._element).hasClass(h);n&&(this._isTransitioning=!0);var r=t.Event(u.HIDE);t(this._element).trigger(r),this._isShown&&!r.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),t(document).off(u.FOCUSIN),t(this._element).removeClass(f),t(this._element).off(u.CLICK_DISMISS),t(this._dialog).off(u.MOUSEDOWN_DISMISS),n?t(this._element).one(c.TRANSITION_END,(function(e){return i._hideModal(e)})).emulateTransitionEnd(300):this._hideModal())},a.prototype.dispose=function(){t.removeData(this._element,n),t(window,document,this._element,this._backdrop).off(r),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._originalBodyPadding=null,this._scrollbarWidth=null},a.prototype._getConfig=function(e){return e=t.extend({},s,e),c.typeCheckConfig(i,e,o),e},a.prototype._showElement=function(e){var i=this,n=c.supportsTransitionEnd()&&t(this._element).hasClass(h);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&c.reflow(this._element),t(this._element).addClass(f),this._config.focus&&this._enforceFocus();var r=t.Event(u.SHOWN,{relatedTarget:e}),a=function(){i._config.focus&&i._element.focus(),i._isTransitioning=!1,t(i._element).trigger(r)};n?t(this._dialog).one(c.TRANSITION_END,a).emulateTransitionEnd(300):a()},a.prototype._enforceFocus=function(){var e=this;t(document).off(u.FOCUSIN).on(u.FOCUSIN,(function(i){document===i.target||e._element===i.target||t(e._element).has(i.target).length||e._element.focus()}))},a.prototype._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(u.KEYDOWN_DISMISS,(function(t){27===t.which&&e.hide()})):this._isShown||t(this._element).off(u.KEYDOWN_DISMISS)},a.prototype._setResizeEvent=function(){var e=this;this._isShown?t(window).on(u.RESIZE,(function(t){return e._handleUpdate(t)})):t(window).off(u.RESIZE)},a.prototype._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden","true"),this._isTransitioning=!1,this._showBackdrop((function(){t(document.body).removeClass(p),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(u.HIDDEN)}))},a.prototype._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},a.prototype._showBackdrop=function(e){var i=this,n=t(this._element).hasClass(h)?h:"";if(this._isShown&&this._config.backdrop){var r=c.supportsTransitionEnd()&&n;if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&t(this._backdrop).addClass(n),t(this._backdrop).appendTo(document.body),t(this._element).on(u.CLICK_DISMISS,(function(e){return i._ignoreBackdropClick?void(i._ignoreBackdropClick=!1):void(e.target===e.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide()))})),r&&c.reflow(this._backdrop),t(this._backdrop).addClass(f),!e)return;if(!r)return void e();t(this._backdrop).one(c.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(f);var a=function(){i._removeBackdrop(),e&&e()};c.supportsTransitionEnd()&&t(this._element).hasClass(h)?t(this._backdrop).one(c.TRANSITION_END,a).emulateTransitionEnd(150):a()}else e&&e()},a.prototype._handleUpdate=function(){this._adjustDialog()},a.prototype._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},a.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},a.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},a.prototype._setScrollbar=function(){var e=parseInt(t(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top").css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=e+this._scrollbarWidth+"px")},a.prototype._resetScrollbar=function(){document.body.style.paddingRight=this._originalBodyPadding},a.prototype._getScrollbarWidth=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t},a._jQueryInterface=function(e,i){return this.each((function(){var r=t(this).data(n),s=t.extend({},a.Default,t(this).data(),"object"===(void 0===e?"undefined":l(e))&&e);if(r||(r=new a(this,s),t(this).data(n,r)),"string"==typeof e){if(void 0===r[e])throw new Error('No method named "'+e+'"');r[e](i)}else s.show&&r.show(i)}))},d(a,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return s}}]),a}();t(document).on(u.CLICK_DATA_API,'[data-toggle="modal"]',(function(e){var i=this,r=void 0,a=c.getSelectorFromElement(this);a&&(r=t(a)[0]);var s=t(r).data(n)?"toggle":t.extend({},t(r).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var o=t(r).one(u.SHOW,(function(e){e.isDefaultPrevented()||o.one(u.HIDDEN,(function(){t(i).is(":visible")&&i.focus()}))}));m._jQueryInterface.call(t(r),s,this)})),t.fn[i]=m._jQueryInterface,t.fn[i].Constructor=m,t.fn[i].noConflict=function(){return t.fn[i]=a,m._jQueryInterface}}(jQuery),function(t){var i="scrollspy",n="bs.scrollspy",r="."+n,a=t.fn[i],s={offset:10,method:"auto",target:""},o={offset:"number",method:"string",target:"(string|element)"},u={ACTIVATE:"activate"+r,SCROLL:"scroll"+r,LOAD_DATA_API:"load"+r+".data-api"},p="active",h=".nav-link",f="position",m=function(){function a(i,n){var r=this;e(this,a),this._element=i,this._scrollElement="BODY"===i.tagName?window:i,this._config=this._getConfig(n),this._selector=this._config.target+" "+h+","+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(u.SCROLL,(function(e){return r._process(e)})),this.refresh(),this._process()}return a.prototype.refresh=function(){var e=this,i=this._scrollElement!==this._scrollElement.window?f:"offset",n="auto"===this._config.method?i:this._config.method,r=n===f?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map((function(e){var i=void 0,a=c.getSelectorFromElement(e);return a&&(i=t(a)[0]),i&&(i.offsetWidth||i.offsetHeight)?[t(i)[n]().top+r,a]:null})).filter((function(e){return e})).sort((function(e,t){return e[0]-t[0]})).forEach((function(t){e._offsets.push(t[0]),e._targets.push(t[1])}))},a.prototype.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(r),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},a.prototype._getConfig=function(e){if("string"!=typeof(e=t.extend({},s,e)).target){var n=t(e.target).attr("id");n||(n=c.getUID(i),t(e.target).attr("id",n)),e.target="#"+n}return c.typeCheckConfig(i,e,o),e},a.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},a.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},a.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.offsetHeight},a.prototype._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),i=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=i){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;)this._activeTarget!==this._targets[r]&&e>=this._offsets[r]&&(void 0===this._offsets[r+1]||e<this._offsets[r+1])&&this._activate(this._targets[r])}},a.prototype._activate=function(e){this._activeTarget=e,this._clear();var i=this._selector.split(",");i=i.map((function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'}));var n=t(i.join(","));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass(p),n.addClass(p)):n.parents("li").find("> "+h).addClass(p),t(this._scrollElement).trigger(u.ACTIVATE,{relatedTarget:e})},a.prototype._clear=function(){t(this._selector).filter(".active").removeClass(p)},a._jQueryInterface=function(e){return this.each((function(){var i=t(this).data(n),r="object"===(void 0===e?"undefined":l(e))&&e;if(i||(i=new a(this,r),t(this).data(n,i)),"string"==typeof e){if(void 0===i[e])throw new Error('No method named "'+e+'"');i[e]()}}))},d(a,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return s}}]),a}();t(window).on(u.LOAD_DATA_API,(function(){for(var e=t.makeArray(t('[data-spy="scroll"]')),i=e.length;i--;){var n=t(e[i]);m._jQueryInterface.call(n,n.data())}})),t.fn[i]=m._jQueryInterface,t.fn[i].Constructor=m,t.fn[i].noConflict=function(){return t.fn[i]=a,m._jQueryInterface}}(jQuery),function(t){var i="tab",n="bs.tab",r="."+n,a=t.fn[i],s={HIDE:"hide"+r,HIDDEN:"hidden"+r,SHOW:"show"+r,SHOWN:"shown"+r,CLICK_DATA_API:"click"+r+".data-api"},o="active",l="fade",u="show",p=function(){function i(t){e(this,i),this._element=t}return i.prototype.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(o)||t(this._element).hasClass("disabled"))){var i=void 0,n=void 0,r=t(this._element).closest("ul:not(.dropdown-menu), ol:not(.dropdown-menu), nav:not(.dropdown-menu)")[0],a=c.getSelectorFromElement(this._element);r&&(n=(n=t.makeArray(t(r).find(".active")))[n.length-1]);var l=t.Event(s.HIDE,{relatedTarget:this._element}),d=t.Event(s.SHOW,{relatedTarget:n});if(n&&t(n).trigger(l),t(this._element).trigger(d),!d.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(i=t(a)[0]),this._activate(this._element,r);var u=function(){var i=t.Event(s.HIDDEN,{relatedTarget:e._element}),r=t.Event(s.SHOWN,{relatedTarget:n});t(n).trigger(i),t(e._element).trigger(r)};i?this._activate(i,i.parentNode,u):u()}}},i.prototype.dispose=function(){t.removeClass(this._element,n),this._element=null},i.prototype._activate=function(e,i,n){var r=this,a=t(i).find("> .nav-item > .active, > .active")[0],s=n&&c.supportsTransitionEnd()&&(a&&t(a).hasClass(l)||Boolean(t(i).find("> .nav-item .fade, > .fade")[0])),o=function(){return r._transitionComplete(e,a,s,n)};a&&s?t(a).one(c.TRANSITION_END,o).emulateTransitionEnd(150):o(),a&&t(a).removeClass(u)},i.prototype._transitionComplete=function(e,i,n,r){if(i){t(i).removeClass(o);var a=t(i.parentNode).find("> .dropdown-menu .active")[0];a&&t(a).removeClass(o),i.setAttribute("aria-expanded",!1)}if(t(e).addClass(o),e.setAttribute("aria-expanded",!0),n?(c.reflow(e),t(e).addClass(u)):t(e).removeClass(l),e.parentNode&&t(e.parentNode).hasClass("dropdown-menu")){var s=t(e).closest(".dropdown")[0];s&&t(s).find(".dropdown-toggle").addClass(o),e.setAttribute("aria-expanded",!0)}r&&r()},i._jQueryInterface=function(e){return this.each((function(){var r=t(this),a=r.data(n);if(a||(a=new i(this),r.data(n,a)),"string"==typeof e){if(void 0===a[e])throw new Error('No method named "'+e+'"');a[e]()}}))},d(i,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}}]),i}();t(document).on(s.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"]',(function(e){e.preventDefault(),p._jQueryInterface.call(t(this),"show")})),t.fn[i]=p._jQueryInterface,t.fn[i].Constructor=p,t.fn[i].noConflict=function(){return t.fn[i]=a,p._jQueryInterface}}(jQuery),function(t){if("undefined"==typeof Tether)throw new Error("Bootstrap tooltips require Tether (http://tether.io/)");var i="tooltip",n="bs.tooltip",r="."+n,a=t.fn[i],s={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:[],container:!1},o={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"string",constraints:"array",container:"(string|element|boolean)"},u={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},p="show",h="out",f={HIDE:"hide"+r,HIDDEN:"hidden"+r,SHOW:"show"+r,SHOWN:"shown"+r,INSERTED:"inserted"+r,CLICK:"click"+r,FOCUSIN:"focusin"+r,FOCUSOUT:"focusout"+r,MOUSEENTER:"mouseenter"+r,MOUSELEAVE:"mouseleave"+r},m="fade",g="show",v={element:!1,enabled:!1},y="hover",b="focus",w=function(){function a(t,i){e(this,a),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._isTransitioning=!1,this._tether=null,this.element=t,this.config=this._getConfig(i),this.tip=null,this._setListeners()}return a.prototype.enable=function(){this._isEnabled=!0},a.prototype.disable=function(){this._isEnabled=!1},a.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},a.prototype.toggle=function(e){if(e){var i=this.constructor.DATA_KEY,n=t(e.currentTarget).data(i);n||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(t(this.getTipElement()).hasClass(g))return void this._leave(null,this);this._enter(null,this)}},a.prototype.dispose=function(){clearTimeout(this._timeout),this.cleanupTether(),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._tether=null,this.element=null,this.config=null,this.tip=null},a.prototype.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){if(this._isTransitioning)throw new Error("Tooltip is transitioning");t(this.element).trigger(i);var n=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!n)return;var r=this.getTipElement(),s=c.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&t(r).addClass(m);var o="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,l=this._getAttachment(o),d=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this).appendTo(d),t(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({attachment:l,element:r,target:this.element,classes:v,classPrefix:"bs-tether",offset:this.config.offset,constraints:this.config.constraints,addTargetClasses:!1}),c.reflow(r),this._tether.position(),t(r).addClass(g);var u=function(){var i=e._hoverState;e._hoverState=null,e._isTransitioning=!1,t(e.element).trigger(e.constructor.Event.SHOWN),i===h&&e._leave(null,e)};if(c.supportsTransitionEnd()&&t(this.tip).hasClass(m))return this._isTransitioning=!0,void t(this.tip).one(c.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION);u()}},a.prototype.hide=function(e){var i=this,n=this.getTipElement(),r=t.Event(this.constructor.Event.HIDE);if(this._isTransitioning)throw new Error("Tooltip is transitioning");var a=function(){i._hoverState!==p&&n.parentNode&&n.parentNode.removeChild(n),i.element.removeAttribute("aria-describedby"),t(i.element).trigger(i.constructor.Event.HIDDEN),i._isTransitioning=!1,i.cleanupTether(),e&&e()};t(this.element).trigger(r),r.isDefaultPrevented()||(t(n).removeClass(g),this._activeTrigger.click=!1,this._activeTrigger[b]=!1,this._activeTrigger[y]=!1,c.supportsTransitionEnd()&&t(this.tip).hasClass(m)?(this._isTransitioning=!0,t(n).one(c.TRANSITION_END,a).emulateTransitionEnd(150)):a(),this._hoverState="")},a.prototype.isWithContent=function(){return Boolean(this.getTitle())},a.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},a.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(".tooltip-inner"),this.getTitle()),e.removeClass(m+" "+g),this.cleanupTether()},a.prototype.setElementContent=function(e,i){var n=this.config.html;"object"===(void 0===i?"undefined":l(i))&&(i.nodeType||i.jquery)?n?t(i).parent().is(e)||e.empty().append(i):e.text(t(i).text()):e[n?"html":"text"](i)},a.prototype.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},a.prototype.cleanupTether=function(){this._tether&&this._tether.destroy()},a.prototype._getAttachment=function(e){return u[e.toUpperCase()]},a.prototype._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach((function(i){if("click"===i)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,(function(t){return e.toggle(t)}));else if("manual"!==i){var n=i===y?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,r=i===y?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(n,e.config.selector,(function(t){return e._enter(t)})).on(r,e.config.selector,(function(t){return e._leave(t)}))}t(e.element).closest(".modal").on("hide.bs.modal",(function(){return e.hide()}))})),this.config.selector?this.config=t.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},a.prototype._fixTitle=function(){var e=l(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},a.prototype._enter=function(e,i){var n=this.constructor.DATA_KEY;return(i=i||t(e.currentTarget).data(n))||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),e&&(i._activeTrigger["focusin"===e.type?b:y]=!0),t(i.getTipElement()).hasClass(g)||i._hoverState===p?void(i._hoverState=p):(clearTimeout(i._timeout),i._hoverState=p,i.config.delay&&i.config.delay.show?void(i._timeout=setTimeout((function(){i._hoverState===p&&i.show()}),i.config.delay.show)):void i.show())},a.prototype._leave=function(e,i){var n=this.constructor.DATA_KEY;if((i=i||t(e.currentTarget).data(n))||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),e&&(i._activeTrigger["focusout"===e.type?b:y]=!1),!i._isWithActiveTrigger())return clearTimeout(i._timeout),i._hoverState=h,i.config.delay&&i.config.delay.hide?void(i._timeout=setTimeout((function(){i._hoverState===h&&i.hide()}),i.config.delay.hide)):void i.hide()},a.prototype._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},a.prototype._getConfig=function(e){return(e=t.extend({},this.constructor.Default,t(this.element).data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),c.typeCheckConfig(i,e,this.constructor.DefaultType),e},a.prototype._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},a._jQueryInterface=function(e){return this.each((function(){var i=t(this).data(n),r="object"===(void 0===e?"undefined":l(e))&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new a(this,r),t(this).data(n,i)),"string"==typeof e)){if(void 0===i[e])throw new Error('No method named "'+e+'"');i[e]()}}))},d(a,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return s}},{key:"NAME",get:function(){return i}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return f}},{key:"EVENT_KEY",get:function(){return r}},{key:"DefaultType",get:function(){return o}}]),a}();return t.fn[i]=w._jQueryInterface,t.fn[i].Constructor=w,t.fn[i].noConflict=function(){return t.fn[i]=a,w._jQueryInterface},w}(jQuery));!function(t){var i="popover",n="bs.popover",r="."+n,a=t.fn[i],s=t.extend({},u.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),o=t.extend({},u.DefaultType,{content:"(string|element|function)"}),c={HIDE:"hide"+r,HIDDEN:"hidden"+r,SHOW:"show"+r,SHOWN:"shown"+r,INSERTED:"inserted"+r,CLICK:"click"+r,FOCUSIN:"focusin"+r,FOCUSOUT:"focusout"+r,MOUSEENTER:"mouseenter"+r,MOUSELEAVE:"mouseleave"+r},p=function(a){function u(){return e(this,u),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,a.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(u,a),u.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},u.prototype.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0]},u.prototype.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(".popover-title"),this.getTitle()),this.setElementContent(e.find(".popover-content"),this._getContent()),e.removeClass("fade show"),this.cleanupTether()},u.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},u._jQueryInterface=function(e){return this.each((function(){var i=t(this).data(n),r="object"===(void 0===e?"undefined":l(e))?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new u(this,r),t(this).data(n,i)),"string"==typeof e)){if(void 0===i[e])throw new Error('No method named "'+e+'"');i[e]()}}))},d(u,null,[{key:"VERSION",get:function(){return"4.0.0-alpha.6"}},{key:"Default",get:function(){return s}},{key:"NAME",get:function(){return i}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return c}},{key:"EVENT_KEY",get:function(){return r}},{key:"DefaultType",get:function(){return o}}]),u}(u);t.fn[i]=p._jQueryInterface,t.fn[i].Constructor=p,t.fn[i].noConflict=function(){return t.fn[i]=a,p._jQueryInterface}}(jQuery)}()},151:e=>{"use strict";var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,a),n(i)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,r)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function d(e,t,i,n){var r,a,s,d;if(o(i),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),a=e._events),s=a[t]),void 0===s)s=a[t]=i,++e._eventsCount;else if("function"==typeof s?s=a[t]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=l(e))>0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,d=c,console&&console.warn&&console.warn(d)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=c.bind(n);return r.listener=i,n.wrapFn=r,r}function p(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):f(r,r.length)}function h(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function f(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function m(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(a){n.once&&e.removeEventListener(t,r),i(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,a=this._events;if(void 0!==a)r=r&&void 0===a.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else{var d=l.length,c=f(l,d);for(i=0;i<d;++i)n(c[i],this,t)}return!0},a.prototype.addListener=function(e,t){return d(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return d(this,e,t,!0)},a.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},a.prototype.removeListener=function(e,t){var i,n,r,a,s;if(o(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,a=i.length-1;a>=0;a--)if(i[a]===t||i[a].listener===t){s=i[a].listener,r=a;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,a=Object.keys(i);for(n=0;n<a.length;++n)"removeListener"!==(r=a[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},5:(e,t,i)=>{"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==i.g)return i.g}return e}()},181:function(e,t,i){var n,r;void 0===(r="function"==typeof(n=function(){return function(e){var t=function(e,t,n){var r,a,s,o,l={interval:100,sensitivity:6,timeout:0};l="object"==typeof e?i.extend(l,e):i.isFunction(t)?i.extend(l,{over:e,out:t,selector:n}):i.extend(l,{over:e,out:e,selector:t});var d=function(e){r=e.pageX,a=e.pageY},c=function(e,t){if(t.hoverIntent_t=clearTimeout(t.hoverIntent_t),Math.sqrt((s-r)*(s-r)+(o-a)*(o-a))<l.sensitivity)return i(t).off("mousemove.hoverIntent",d),t.hoverIntent_s=!0,l.over.apply(t,[e]);s=r,o=a,t.hoverIntent_t=setTimeout((function(){c(e,t)}),l.interval)},u=function(e){var t=i.extend({},e),n=this;n.hoverIntent_t&&(n.hoverIntent_t=clearTimeout(n.hoverIntent_t)),"mouseenter"===e.type?(s=t.pageX,o=t.pageY,i(n).on("mousemove.hoverIntent",d),n.hoverIntent_s||(n.hoverIntent_t=setTimeout((function(){c(t,n)}),l.interval))):(i(n).off("mousemove.hoverIntent",d),n.hoverIntent_s&&(n.hoverIntent_t=setTimeout((function(){!function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=!1,l.out.apply(t,[e])}(t,n)}),l.timeout)))};return this.on({"mouseenter.hoverIntent":u,"mouseleave.hoverIntent":u},l.selector)};if(e&&e.fn&&e.fn.jquery){var i=e;e.fn.hoverIntent=t}else{if(!(e&&e.jQuery&&e.jQuery.fn))throw new Error("Invalid Argument: Hoverintent expects either the window global with jquery, or an instance of jquery as a context");i=e.jQuery,e.jQuery.fn.hoverIntent=t}}})?n.call(t,i,t,e):n)||(e.exports=r)},96:(e,t,i)=>{var n,r,a;void 0===(r="function"==typeof(n=a=function(){function e(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function i(n){function r(){}function a(t,i,a){if("undefined"!=typeof document){"number"==typeof(a=e({path:"/"},r.defaults,a)).expires&&(a.expires=new Date(1*new Date+864e5*a.expires)),a.expires=a.expires?a.expires.toUTCString():"";try{var s=JSON.stringify(i);/^[\{\[]/.test(s)&&(i=s)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var o="";for(var l in a)a[l]&&(o+="; "+l,!0!==a[l]&&(o+="="+a[l].split(";")[0]));return document.cookie=t+"="+i+o}}function s(e,i){if("undefined"!=typeof document){for(var r={},a=document.cookie?document.cookie.split("; "):[],s=0;s<a.length;s++){var o=a[s].split("="),l=o.slice(1).join("=");i||'"'!==l.charAt(0)||(l=l.slice(1,-1));try{var d=t(o[0]);if(l=(n.read||n)(l,d)||t(l),i)try{l=JSON.parse(l)}catch(e){}if(r[d]=l,e===d)break}catch(e){}}return e?r[e]:r}}return r.set=a,r.get=function(e){return s(e,!1)},r.getJSON=function(e){return s(e,!0)},r.remove=function(t,i){a(t,"",e(i,{expires:-1}))},r.defaults={},r.withConverter=i,r}((function(){}))})?n.call(t,i,t,e):n)||(e.exports=r),e.exports=a()},920:(e,t,i)=>{var n,r,a;r=[i(311)],n=function(e){var t,i,n,r,a,s,o="Close",l="BeforeClose",d="MarkupParse",c="Open",u="Change",p="mfp",h="."+p,f="mfp-ready",m="mfp-removing",g="mfp-prevent-close",v=function(){},y=!!window.jQuery,b=e(window),w=function(e,i){t.ev.on(p+e+h,i)},_=function(t,i,n,r){var a=document.createElement("div");return a.className="mfp-"+t,n&&(a.innerHTML=n),r?i&&i.appendChild(a):(a=e(a),i&&a.appendTo(i)),a},x=function(i,n){t.ev.triggerHandler(p+i,n),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(n)?n:[n]))},C=function(i){return i===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=i),t.currTemplate.closeBtn},E=function(){e.magnificPopup.instance||((t=new v).init(),e.magnificPopup.instance=t)};v.prototype={constructor:v,init:function(){var i=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=e(document),t.popupsCache={}},open:function(i){var r;if(!1===i.isObj){t.items=i.items.toArray(),t.index=0;var s,o=i.items;for(r=0;r<o.length;r++)if((s=o[r]).parsed&&(s=s.el[0]),s===i.el[0]){t.index=r;break}}else t.items=e.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(!t.isOpen){t.types=[],a="",i.mainEl&&i.mainEl.length?t.ev=i.mainEl.eq(0):t.ev=n,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=_("bg").on("click"+h,(function(){t.close()})),t.wrap=_("wrap").attr("tabindex",-1).on("click"+h,(function(e){t._checkIfClose(e.target)&&t.close()})),t.container=_("container",t.wrap)),t.contentContainer=_("content"),t.st.preloader&&(t.preloader=_("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(r=0;r<l.length;r++){var u=l[r];u=u.charAt(0).toUpperCase()+u.slice(1),t["init"+u].call(t)}x("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(w(d,(function(e,t,i,n){i.close_replaceWith=C(n.type)})),a+=" mfp-close-btn-in"):t.wrap.append(C())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:b.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:n.height(),position:"absolute"}),t.st.enableEscapeKey&&n.on("keyup"+h,(function(e){27===e.keyCode&&t.close()})),b.on("resize"+h,(function(){t.updateSize()})),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var p=t.wH=b.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(p)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var v=t.st.mainClass;return t.isIE7&&(v+=" mfp-ie7"),v&&t._addClassToMFP(v),t.updateItemHTML(),x("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout((function(){t.content?(t._addClassToMFP(f),t._setFocus()):t.bgOverlay.addClass(f),n.on("focusin"+h,t._onFocusIn)}),16),t.isOpen=!0,t.updateSize(p),x(c),i}t.updateItemHTML()},close:function(){t.isOpen&&(x(l),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(m),setTimeout((function(){t._close()}),t.st.removalDelay)):t._close())},_close:function(){x(o);var i=m+" "+f+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var r={marginRight:""};t.isIE7?e("body, html").css("overflow",""):r.overflow="",e("html").css(r)}n.off("keyup.mfp focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&!0!==t.currTemplate[t.currItem.type]||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,x("AfterClose")},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*i;t.wrap.css("height",n),t.wH=n}else t.wH=e||b.height();t.fixedContentPos||t.wrap.css("height",t.wH),x("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var n=i.type;if(x("BeforeChange",[t.currItem?t.currItem.type:"",n]),t.currItem=i,!t.currTemplate[n]){var a=!!t.st[n]&&t.st[n].markup;x("FirstMarkupParse",a),t.currTemplate[n]=!a||e(a)}r&&r!==i.type&&t.container.removeClass("mfp-"+r+"-holder");var s=t["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,t.currTemplate[n]);t.appendContent(s,n),i.preloaded=!0,x(u,i),r=i.type,t.container.prepend(t.contentContainer),x("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&!0===t.currTemplate[i]?t.content.find(".mfp-close").length||t.content.append(C()):t.content=e:t.content="",x("BeforeAppend"),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var n,r=t.items[i];if(r.tagName?r={el:e(r)}:(n=r.type,r={data:r,src:r.src}),r.el){for(var a=t.types,s=0;s<a.length;s++)if(r.el.hasClass("mfp-"+a[s])){n=a[s];break}r.src=r.el.attr("data-mfp-src"),r.src||(r.src=r.el.attr("href"))}return r.type=n||t.st.type||"inline",r.index=i,r.parsed=!0,t.items[i]=r,x("ElementParse",r),t.items[i]},addGroup:function(e,i){var n=function(n){n.mfpEl=this,t._openClick(n,e,i)};i||(i={});var r="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(r).on(r,n)):(i.isObj=!1,i.delegate?e.off(r).on(r,i.delegate,n):(i.items=e,e.off(r).on(r,n)))},_openClick:function(i,n,r){if((void 0!==r.midClick?r.midClick:e.magnificPopup.defaults.midClick)||!(2===i.which||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){var a=void 0!==r.disableOn?r.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(b.width()<a)return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),r.el=e(i.mfpEl),r.delegate&&(r.items=n.find(r.delegate)),t.open(r)}},updateStatus:function(e,n){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),n||"loading"!==e||(n=t.st.tLoading);var r={status:e,text:n};x("UpdateStatus",r),e=r.status,n=r.text,t.preloader.html(n),t.preloader.find("a").on("click",(function(e){e.stopImmediatePropagation()})),t.container.addClass("mfp-s-"+e),i=e}},_checkIfClose:function(i){if(!e(i).hasClass(g)){var n=t.st.closeOnContentClick,r=t.st.closeOnBgClick;if(n&&r)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(n)return!0}else if(r&&e.contains(document,i))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?n.height():document.body.scrollHeight)>(e||b.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){if(i.target!==t.wrap[0]&&!e.contains(t.wrap[0],i.target))return t._setFocus(),!1},_parseMarkup:function(t,i,n){var r;n.data&&(i=e.extend(n.data,i)),x(d,[t,i,n]),e.each(i,(function(i,n){if(void 0===n||!1===n)return!0;if((r=i.split("_")).length>1){var a=t.find(h+"-"+r[0]);if(a.length>0){var s=r[1];"replaceWith"===s?a[0]!==n[0]&&a.replaceWith(n):"img"===s?a.is("img")?a.attr("src",n):a.replaceWith(e("<img>").attr("src",n).attr("class",a.attr("class"))):a.attr(r[1],n)}}else t.find(h+"-"+i).html(n)}))},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:v.prototype,modules:[],open:function(t,i){return E(),(t=t?e.extend(!0,{},t):{}).isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(i){E();var n=e(this);if("string"==typeof i)if("open"===i){var r,a=y?n.data("magnificPopup"):n[0].magnificPopup,s=parseInt(arguments[1],10)||0;a.items?r=a.items[s]:(r=n,a.delegate&&(r=r.find(a.delegate)),r=r.eq(s)),t._openClick({mfpEl:r},n,a)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),y?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var S,T,k,P="inline",I=function(){k&&(T.after(k.addClass(S)).detach(),k=null)};e.magnificPopup.registerModule(P,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(P),w(o+"."+P,(function(){I()}))},getInline:function(i,n){if(I(),i.src){var r=t.st.inline,a=e(i.src);if(a.length){var s=a[0].parentNode;s&&s.tagName&&(T||(S=r.hiddenClass,T=_(S),S="mfp-"+S),k=a.after(T).detach().removeClass(S)),t.updateStatus("ready")}else t.updateStatus("error",r.tNotFound),a=e("<div>");return i.inlineElement=a,a}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var $,A="ajax",M=function(){$&&e(document.body).removeClass($)},z=function(){M(),t.req&&t.req.abort()};e.magnificPopup.registerModule(A,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(A),$=t.st.ajax.cursor,w(o+"."+A,z),w("BeforeChange."+A,z)},getAjax:function(i){$&&e(document.body).addClass($),t.updateStatus("loading");var n=e.extend({url:i.src,success:function(n,r,a){var s={data:n,xhr:a};x("ParseAjax",s),t.appendContent(e(s.data),A),i.finished=!0,M(),t._setFocus(),setTimeout((function(){t.wrap.addClass(f)}),16),t.updateStatus("ready"),x("AjaxContentAdded")},error:function(){M(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(n),""}}});var O,L=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var i=t.st.image,n=".image";t.types.push("image"),w(c+n,(function(){"image"===t.currItem.type&&i.cursor&&e(document.body).addClass(i.cursor)})),w(o+n,(function(){i.cursor&&e(document.body).removeClass(i.cursor),b.off("resize"+h)})),w("Resize"+n,t.resizeImage),t.isLowIE&&w("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,O&&clearInterval(O),e.isCheckingImgSize=!1,x("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],r=function(a){O&&clearInterval(O),O=setInterval((function(){n.naturalWidth>0?t._onImageHasSize(e):(i>200&&clearInterval(O),3==++i?r(10):40===i?r(50):100===i&&r(500))}),a)};r(1)},getImage:function(i,n){var r=0,a=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,x("ImageLoadComplete")):++r<200?setTimeout(a,100):s())},s=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",o.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},o=t.st.image,l=n.find(".mfp-img");if(l.length){var d=document.createElement("img");d.className="mfp-img",i.el&&i.el.find("img").length&&(d.alt=i.el.find("img").attr("alt")),i.img=e(d).on("load.mfploader",a).on("error.mfploader",s),d.src=i.src,l.is("img")&&(i.img=i.img.clone()),(d=i.img[0]).naturalWidth>0?i.hasSize=!0:d.width||(i.hasSize=!1)}return t._parseMarkup(n,{title:L(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(O&&clearInterval(O),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",o.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var N;e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,i=t.st.zoom,n=".zoom";if(i.enabled&&t.supportsTransition){var r,a,s=i.duration,d=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+i.duration/1e3+"s "+i.easing,r={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return r["-webkit-"+a]=r["-moz-"+a]=r["-o-"+a]=r[a]=n,t.css(r),t},c=function(){t.content.css("visibility","visible")};w("BuildControls"+n,(function(){if(t._allowZoom()){if(clearTimeout(r),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void c();(a=d(e)).css(t._getOffset()),t.wrap.append(a),r=setTimeout((function(){a.css(t._getOffset(!0)),r=setTimeout((function(){c(),setTimeout((function(){a.remove(),e=a=null,x("ZoomAnimationEnded")}),16)}),s)}),16)}})),w(l+n,(function(){if(t._allowZoom()){if(clearTimeout(r),t.st.removalDelay=s,!e){if(!(e=t._getItemToZoom()))return;a=d(e)}a.css(t._getOffset(!0)),t.wrap.append(a),t.content.css("visibility","hidden"),setTimeout((function(){a.css(t._getOffset())}),16)}})),w(o+n,(function(){t._allowZoom()&&(c(),a&&a.remove(),e=null)}))}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(i){var n,r=(n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem)).offset(),a=parseInt(n.css("padding-top"),10),s=parseInt(n.css("padding-bottom"),10);r.top-=e(window).scrollTop()-a;var o={width:n.width(),height:(y?n.innerHeight():n[0].offsetHeight)-s-a};return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N?o["-moz-transform"]=o.transform="translate("+r.left+"px,"+r.top+"px)":(o.left=r.left,o.top=r.top),o}}});var D="iframe",j=function(e){if(t.currTemplate[D]){var i=t.currTemplate[D].find("iframe");i.length&&(e||(i[0].src="//about:blank"),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(D,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(D),w("BeforeChange",(function(e,t,i){t!==i&&(t===D?j():i===D&&j(!0))})),w(o+"."+D,(function(){j()}))},getIframe:function(i,n){var r=i.src,a=t.st.iframe;e.each(a.patterns,(function(){if(r.indexOf(this.index)>-1)return this.id&&(r="string"==typeof this.id?r.substr(r.lastIndexOf(this.id)+this.id.length,r.length):this.id.call(this,r)),r=this.src.replace("%id%",r),!1}));var s={};return a.srcAction&&(s[a.srcAction]=r),t._parseMarkup(n,s,i),t.updateStatus("ready"),n}}});var H=function(e){var i=t.items.length;return e>i-1?e-i:e<0?i+e:e},F=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,r=".mfp-gallery";if(t.direction=!0,!i||!i.enabled)return!1;a+=" mfp-gallery",w(c+r,(function(){i.navigateByImgClick&&t.wrap.on("click"+r,".mfp-img",(function(){if(t.items.length>1)return t.next(),!1})),n.on("keydown"+r,(function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()}))})),w("UpdateStatus"+r,(function(e,i){i.text&&(i.text=F(i.text,t.currItem.index,t.items.length))})),w(d+r,(function(e,n,r,a){var s=t.items.length;r.counter=s>1?F(i.tCounter,a.index,s):""})),w("BuildControls"+r,(function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,r=t.arrowLeft=e(n.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(g),a=t.arrowRight=e(n.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(g);r.click((function(){t.prev()})),a.click((function(){t.next()})),t.container.append(r.add(a))}})),w(u+r,(function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout((function(){t.preloadNearbyImages(),t._preloadTimeout=null}),16)})),w(o+r,(function(){n.off(r),t.wrap.off("click"+r),t.arrowRight=t.arrowLeft=null}))},next:function(){t.direction=!0,t.index=H(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=H(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),r=Math.min(i[1],t.items.length);for(e=1;e<=(t.direction?r:n);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?n:r);e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=H(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),x("LazyLoad",n),"image"===n.type&&(n.img=e('<img class="mfp-img" />').on("load.mfploader",(function(){n.hasSize=!0})).on("error.mfploader",(function(){n.hasSize=!0,n.loadError=!0,x("LazyLoadError",n)})).attr("src",n.src)),n.preloaded=!0}}}});var B="retina";e.magnificPopup.registerModule(B,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,(function(e){return"@2x"+e}))},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;(i=isNaN(i)?i():i)>1&&(w("ImageHasSize."+B,(function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})})),w("ElementParse."+B,(function(t,n){n.src=e.replaceSrc(n,i)})))}}}}),E()},void 0===(a=n.apply(t,r))||(e.exports=a)},895:(e,t,i)=>{var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(e){return function(e,t){var i,n,s,o,l,d,c,u,p,h=1,f=e.length,m="";for(n=0;n<f;n++)if("string"==typeof e[n])m+=e[n];else if("object"==typeof e[n]){if((o=e[n]).keys)for(i=t[h],s=0;s<o.keys.length;s++){if(null==i)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',o.keys[s],o.keys[s-1]));i=i[o.keys[s]]}else i=o.param_no?t[o.param_no]:t[h++];if(r.not_type.test(o.type)&&r.not_primitive.test(o.type)&&i instanceof Function&&(i=i()),r.numeric_arg.test(o.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(a("[sprintf] expecting number but found %T",i));switch(r.number.test(o.type)&&(u=i>=0),o.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case"e":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case"f":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case"g":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(o.type)?m+=i:(!r.number.test(o.type)||u&&!o.sign?p="":(p=u?"+":"-",i=i.toString().replace(r.sign,"")),d=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",c=o.width-(p+i).length,l=o.width&&c>0?d.repeat(c):"",m+=o.align?p+i+l:"0"===d?p+l+i:l+p+i)}return m}(function(e){if(o[e])return o[e];for(var t,i=e,n=[],a=0;i;){if(null!==(t=r.text.exec(i)))n.push(t[0]);else if(null!==(t=r.modulo.exec(i)))n.push("%");else{if(null===(t=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){a|=1;var s=[],l=t[2],d=[];if(null===(d=r.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(d[1]);""!==(l=l.substring(d[0].length));)if(null!==(d=r.key_access.exec(l)))s.push(d[1]);else{if(null===(d=r.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(d[1])}t[2]=s}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}i=i.substring(t[0].length)}return o[e]=n}(e),arguments)}function s(e,t){return a.apply(null,[e].concat(t||[]))}var o=Object.create(null);t.sprintf=a,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=s,void 0===(n=function(){return{sprintf:a,vsprintf:s}}.call(t,i,t,e))||(e.exports=n))}()},440:function(e){e.exports=function(){"use strict";function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(){return t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},t.apply(this,arguments)}function i(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function n(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((function(r){void 0===e[r]?e[r]=t[r]:i(t[r])&&i(e[r])&&Object.keys(t[r]).length>0&&n(e[r],t[r])}))}var r={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){var e="undefined"!=typeof document?document:{};return n(e,r),e}var s={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function o(){var e="undefined"!=typeof window?window:{};return n(e,s),e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t,i){return(c=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(e){return!1}}()?Reflect.construct:function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&d(r,i.prototype),r}).apply(null,arguments)}function u(e){var t="function"==typeof Map?new Map:void 0;return u=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)},u(e)}var p=function(e){function t(t){var i,n,r;return n=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i=e.call.apply(e,[this].concat(t))||this),r=n.__proto__,Object.defineProperty(n,"__proto__",{get:function(){return r},set:function(e){r.__proto__=e}}),i}return n=e,(i=t).prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n,t;var i,n}(u(Array));function h(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,h(e)):t.push(e)})),t}function f(e,t){return Array.prototype.filter.call(e,t)}function m(e,t){var i=o(),n=a(),r=[];if(!t&&e instanceof p)return e;if(!e)return new p(r);if("string"==typeof e){var s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var l="div";0===s.indexOf("<li")&&(l="ul"),0===s.indexOf("<tr")&&(l="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(l="tr"),0===s.indexOf("<tbody")&&(l="table"),0===s.indexOf("<option")&&(l="select");var d=n.createElement(l);d.innerHTML=s;for(var c=0;c<d.childNodes.length;c+=1)r.push(d.childNodes[c])}else r=function(e,t){if("string"!=typeof e)return[e];for(var i=[],n=t.querySelectorAll(e),r=0;r<n.length;r+=1)i.push(n[r]);return i}(e.trim(),t||n)}else if(e.nodeType||e===i||e===n)r.push(e);else if(Array.isArray(e)){if(e instanceof p)return e;r=e}return new p(function(e){for(var t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}(r))}m.fn=p.prototype;var g,v,y,b={addClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=h(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).add.apply(t,n)})),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=h(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).remove.apply(t,n)})),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=h(t.map((function(e){return e.split(" ")})));return f(this,(function(e){return n.filter((function(t){return e.classList.contains(t)})).length>0})).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=h(t.map((function(e){return e.split(" ")})));this.forEach((function(e){n.forEach((function(t){e.classList.toggle(t)}))}))},attr:function(e,t){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===arguments.length)this[i].setAttribute(e,t);else for(var n in e)this[i][n]=e[n],this[i].setAttribute(n,e[n]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transition="string"!=typeof e?e+"ms":e;return this},on:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=t[1],a=t[2],s=t[3];function o(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),m(t).is(r))a.apply(t,i);else for(var n=m(t).parents(),s=0;s<n.length;s+=1)m(n[s]).is(r)&&a.apply(n[s],i)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),a.apply(this,t)}"function"==typeof t[1]&&(n=t[0],a=t[1],s=t[2],r=void 0),s||(s=!1);for(var d,c=n.split(" "),u=0;u<this.length;u+=1){var p=this[u];if(r)for(d=0;d<c.length;d+=1){var h=c[d];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[h]||(p.dom7LiveListeners[h]=[]),p.dom7LiveListeners[h].push({listener:a,proxyListener:o}),p.addEventListener(h,o,s)}else for(d=0;d<c.length;d+=1){var f=c[d];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[f]||(p.dom7Listeners[f]=[]),p.dom7Listeners[f].push({listener:a,proxyListener:l}),p.addEventListener(f,l,s)}}return this},off:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=t[0],r=t[1],a=t[2],s=t[3];"function"==typeof t[1]&&(n=t[0],a=t[1],s=t[2],r=void 0),s||(s=!1);for(var o=n.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],c=0;c<this.length;c+=1){var u=this[c],p=void 0;if(!r&&u.dom7Listeners?p=u.dom7Listeners[d]:r&&u.dom7LiveListeners&&(p=u.dom7LiveListeners[d]),p&&p.length)for(var h=p.length-1;h>=0;h-=1){var f=p[h];a&&f.listener===a||a&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===a?(u.removeEventListener(d,f.proxyListener,s),p.splice(h,1)):a||(u.removeEventListener(d,f.proxyListener,s),p.splice(h,1))}}return this},trigger:function(){for(var e=o(),t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];for(var r=i[0].split(" "),a=i[1],s=0;s<r.length;s+=1)for(var l=r[s],d=0;d<this.length;d+=1){var c=this[d];if(e.CustomEvent){var u=new e.CustomEvent(l,{detail:a,bubbles:!0,cancelable:!0});c.dom7EventData=i.filter((function(e,t){return t>0})),c.dispatchEvent(u),c.dom7EventData=[],delete c.dom7EventData}}return this},transitionEnd:function(e){var t=this;return e&&t.on("transitionend",(function i(n){n.target===this&&(e.call(this,n),t.off("transitionend",i))})),this},outerWidth:function(e){if(this.length>0){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(this.length>0){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},styles:function(){var e=o();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var e=o(),t=a(),i=this[0],n=i.getBoundingClientRect(),r=t.body,s=i.clientTop||r.clientTop||0,l=i.clientLeft||r.clientLeft||0,d=i===e?e.scrollY:i.scrollTop,c=i===e?e.scrollX:i.scrollLeft;return{top:n.top+d-s,left:n.left+c-l}}return null},css:function(e,t){var i,n=o();if(1===arguments.length){if("string"!=typeof e){for(i=0;i<this.length;i+=1)for(var r in e)this[i].style[r]=e[r];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this},each:function(e){return e?(this.forEach((function(t,i){e.apply(t,[t,i])})),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;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,i,n=o(),r=a(),s=this[0];if(!s||void 0===e)return!1;if("string"==typeof e){if(s.matches)return s.matches(e);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(e);if(s.msMatchesSelector)return s.msMatchesSelector(e);for(t=m(e),i=0;i<t.length;i+=1)if(t[i]===s)return!0;return!1}if(e===r)return s===r;if(e===n)return s===n;if(e.nodeType||e instanceof p){for(t=e.nodeType?[e]:e,i=0;i<t.length;i+=1)if(t[i]===s)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=this.length;if(e>t-1)return m([]);if(e<0){var i=t+e;return m(i<0?[]:[this[i]])}return m([this[e]])},append:function(){for(var e,t=a(),i=0;i<arguments.length;i+=1){e=i<0||arguments.length<=i?void 0:arguments[i];for(var n=0;n<this.length;n+=1)if("string"==typeof e){var r=t.createElement("div");for(r.innerHTML=e;r.firstChild;)this[n].appendChild(r.firstChild)}else if(e instanceof p)for(var s=0;s<e.length;s+=1)this[n].appendChild(e[s]);else this[n].appendChild(e)}return this},prepend:function(e){var t,i,n=a();for(t=0;t<this.length;t+=1)if("string"==typeof e){var r=n.createElement("div");for(r.innerHTML=e,i=r.childNodes.length-1;i>=0;i-=1)this[t].insertBefore(r.childNodes[i],this[t].childNodes[0])}else if(e instanceof p)for(i=0;i<e.length;i+=1)this[t].insertBefore(e[i],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&m(this[0].nextElementSibling).is(e)?m([this[0].nextElementSibling]):m([]):this[0].nextElementSibling?m([this[0].nextElementSibling]):m([]):m([])},nextAll:function(e){var t=[],i=this[0];if(!i)return m([]);for(;i.nextElementSibling;){var n=i.nextElementSibling;e?m(n).is(e)&&t.push(n):t.push(n),i=n}return m(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&m(t.previousElementSibling).is(e)?m([t.previousElementSibling]):m([]):t.previousElementSibling?m([t.previousElementSibling]):m([])}return m([])},prevAll:function(e){var t=[],i=this[0];if(!i)return m([]);for(;i.previousElementSibling;){var n=i.previousElementSibling;e?m(n).is(e)&&t.push(n):t.push(n),i=n}return m(t)},parent:function(e){for(var t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?m(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return m(t)},parents:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var n=this[i].parentNode;n;)e?m(n).is(e)&&t.push(n):t.push(n),n=n.parentNode;return m(t)},closest:function(e){var t=this;return void 0===e?m([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var n=this[i].querySelectorAll(e),r=0;r<n.length;r+=1)t.push(n[r]);return m(t)},children:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var n=this[i].children,r=0;r<n.length;r+=1)e&&!m(n[r]).is(e)||t.push(n[r]);return m(t)},filter:function(e){return m(f(this,e))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function w(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function _(){return Date.now()}function x(e,t){void 0===t&&(t="x");var i,n,r,a=o(),s=a.getComputedStyle(e,null);return a.WebKitCSSMatrix?((n=s.transform||s.webkitTransform).split(",").length>6&&(n=n.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),r=new a.WebKitCSSMatrix("none"===n?"":n)):i=(r=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(n=a.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(n=a.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),n||0}function C(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object}function E(){for(var e=Object(arguments.length<=0?void 0:arguments[0]),t=1;t<arguments.length;t+=1){var i=t<0||arguments.length<=t?void 0:arguments[t];if(null!=i)for(var n=Object.keys(Object(i)),r=0,a=n.length;r<a;r+=1){var s=n[r],o=Object.getOwnPropertyDescriptor(i,s);void 0!==o&&o.enumerable&&(C(e[s])&&C(i[s])?E(e[s],i[s]):!C(e[s])&&C(i[s])?(e[s]={},E(e[s],i[s])):e[s]=i[s])}}return e}function S(e,t){Object.keys(t).forEach((function(i){C(t[i])&&Object.keys(t[i]).forEach((function(n){"function"==typeof t[i][n]&&(t[i][n]=t[i][n].bind(e))})),e[i]=t[i]}))}function T(){return g||(e=o(),t=a(),g={touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),pointerEvents:!!e.PointerEvent&&"maxTouchPoints"in e.navigator&&e.navigator.maxTouchPoints>=0,observer:"MutationObserver"in e||"WebkitMutationObserver"in e,passiveListener:function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,i)}catch(e){}return t}(),gestures:"ongesturestart"in e}),g;var e,t}function k(e){return void 0===e&&(e={}),v||(i=(void 0===(t=e)?{}:t).userAgent,n=T(),r=o(),a=r.navigator.platform,s=i||r.navigator.userAgent,l={ios:!1,android:!1},d=r.screen.width,c=r.screen.height,u=s.match(/(Android);?[\s\/]+([\d.]+)?/),p=s.match(/(iPad).*OS\s([\d_]+)/),h=s.match(/(iPod)(.*OS\s([\d_]+))?/),f=!p&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),m="Win32"===a,g="MacIntel"===a,!p&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768"].indexOf(d+"x"+c)>=0&&((p=s.match(/(Version)\/([\d.]+)/))||(p=[0,1,"13_0_0"]),g=!1),u&&!m&&(l.os="android",l.android=!0),(p||f||h)&&(l.os="ios",l.ios=!0),v=l),v;var t,i,n,r,a,s,l,d,c,u,p,h,f,m,g}function P(){return y||(t=o(),y={isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}),y;var e,t}Object.keys(b).forEach((function(e){m.fn[e]=b[e]}));var I={name:"resize",create:function(){var e=this;E(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(e){var t=o();t.addEventListener("resize",e.resize.resizeHandler),t.addEventListener("orientationchange",e.resize.orientationChangeHandler)},destroy:function(e){var t=o();t.removeEventListener("resize",e.resize.resizeHandler),t.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},$={attach:function(e,t){void 0===t&&(t={});var i=o(),n=this,r=new(i.MutationObserver||i.WebkitMutationObserver)((function(e){if(1!==e.length){var t=function(){n.emit("observerUpdate",e[0])};i.requestAnimationFrame?i.requestAnimationFrame(t):i.setTimeout(t,0)}else n.emit("observerUpdate",e[0])}));r.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),n.observer.observers.push(r)},init:function(){var e=this;if(e.support.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),i=0;i<t.length;i+=1)e.observer.attach(t[i]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach((function(e){e.disconnect()})),this.observer.observers=[]}},A={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){S(this,{observer:t(t({},$),{},{observers:[]})})},on:{init:function(e){e.observer.init()},destroy:function(e){e.observer.destroy()}}},M={on:function(e,t,i){var n=this;if("function"!=typeof t)return n;var r=i?"unshift":"push";return e.split(" ").forEach((function(e){n.eventsListeners[e]||(n.eventsListeners[e]=[]),n.eventsListeners[e][r](t)})),n},once:function(e,t,i){var n=this;if("function"!=typeof t)return n;function r(){n.off(e,r),r.__emitterProxy&&delete r.__emitterProxy;for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];t.apply(n,a)}return r.__emitterProxy=t,n.on(e,r,i)},onAny:function(e,t){var i=this;if("function"!=typeof e)return i;var n=t?"unshift":"push";return i.eventsAnyListeners.indexOf(e)<0&&i.eventsAnyListeners[n](e),i},offAny:function(e){var t=this;if(!t.eventsAnyListeners)return t;var i=t.eventsAnyListeners.indexOf(e);return i>=0&&t.eventsAnyListeners.splice(i,1),t},off:function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].forEach((function(n,r){(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&i.eventsListeners[e].splice(r,1)}))})),i):i},emit:function(){var e,t,i,n=this;if(!n.eventsListeners)return n;for(var r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];return"string"==typeof a[0]||Array.isArray(a[0])?(e=a[0],t=a.slice(1,a.length),i=n):(e=a[0].events,t=a[0].data,i=a[0].context||n),t.unshift(i),(Array.isArray(e)?e:e.split(" ")).forEach((function(e){if(n.eventsAnyListeners&&n.eventsAnyListeners.length&&n.eventsAnyListeners.forEach((function(n){n.apply(i,[e].concat(t))})),n.eventsListeners&&n.eventsListeners[e]){var r=[];n.eventsListeners[e].forEach((function(e){r.push(e)})),r.forEach((function(e){e.apply(i,t)}))}})),n}};function z(e){var t=this,i=a(),n=o(),r=t.touchEventsData,s=t.params,l=t.touches;if(!t.animating||!s.preventInteractionOnTransition){var d=e;d.originalEvent&&(d=d.originalEvent);var c=m(d.target);if(("wrapper"!==s.touchEventsTarget||c.closest(t.wrapperEl).length)&&(r.isTouchEvent="touchstart"===d.type,(r.isTouchEvent||!("which"in d)||3!==d.which)&&!(!r.isTouchEvent&&"button"in d&&d.button>0||r.isTouched&&r.isMoved)))if(s.noSwiping&&c.closest(s.noSwipingSelector?s.noSwipingSelector:"."+s.noSwipingClass)[0])t.allowClick=!0;else if(!s.swipeHandler||c.closest(s.swipeHandler)[0]){l.currentX="touchstart"===d.type?d.targetTouches[0].pageX:d.pageX,l.currentY="touchstart"===d.type?d.targetTouches[0].pageY:d.pageY;var u=l.currentX,p=l.currentY,h=s.edgeSwipeDetection||s.iOSEdgeSwipeDetection,f=s.edgeSwipeThreshold||s.iOSEdgeSwipeThreshold;if(!h||!(u<=f||u>=n.screen.width-f)){if(E(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=u,l.startY=p,r.touchStartTime=_(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,s.threshold>0&&(r.allowThresholdMove=!1),"touchstart"!==d.type){var g=!0;c.is(r.formElements)&&(g=!1),i.activeElement&&m(i.activeElement).is(r.formElements)&&i.activeElement!==c[0]&&i.activeElement.blur();var v=g&&t.allowTouchMove&&s.touchStartPreventDefault;(s.touchStartForcePreventDefault||v)&&d.preventDefault()}t.emit("touchStart",d)}}}}function O(e){var t=a(),i=this,n=i.touchEventsData,r=i.params,s=i.touches,o=i.rtlTranslate,l=e;if(l.originalEvent&&(l=l.originalEvent),n.isTouched){if(!n.isTouchEvent||"touchmove"===l.type){var d="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),c="touchmove"===l.type?d.pageX:l.pageX,u="touchmove"===l.type?d.pageY:l.pageY;if(l.preventedByNestedSwiper)return s.startX=c,void(s.startY=u);if(!i.allowTouchMove)return i.allowClick=!1,void(n.isTouched&&(E(s,{startX:c,startY:u,currentX:c,currentY:u}),n.touchStartTime=_()));if(n.isTouchEvent&&r.touchReleaseOnEdges&&!r.loop)if(i.isVertical()){if(u<s.startY&&i.translate<=i.maxTranslate()||u>s.startY&&i.translate>=i.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else if(c<s.startX&&i.translate<=i.maxTranslate()||c>s.startX&&i.translate>=i.minTranslate())return;if(n.isTouchEvent&&t.activeElement&&l.target===t.activeElement&&m(l.target).is(n.formElements))return n.isMoved=!0,void(i.allowClick=!1);if(n.allowTouchCallbacks&&i.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){s.currentX=c,s.currentY=u;var p,h=s.currentX-s.startX,f=s.currentY-s.startY;if(!(i.params.threshold&&Math.sqrt(Math.pow(h,2)+Math.pow(f,2))<i.params.threshold))if(void 0===n.isScrolling&&(i.isHorizontal()&&s.currentY===s.startY||i.isVertical()&&s.currentX===s.startX?n.isScrolling=!1:h*h+f*f>=25&&(p=180*Math.atan2(Math.abs(f),Math.abs(h))/Math.PI,n.isScrolling=i.isHorizontal()?p>r.touchAngle:90-p>r.touchAngle)),n.isScrolling&&i.emit("touchMoveOpposite",l),void 0===n.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(n.startMoving=!0)),n.isScrolling)n.isTouched=!1;else if(n.startMoving){i.allowClick=!1,!r.cssMode&&l.cancelable&&l.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&l.stopPropagation(),n.isMoved||(r.loop&&i.loopFix(),n.startTranslate=i.getTranslate(),i.setTransition(0),i.animating&&i.$wrapperEl.trigger("webkitTransitionEnd transitionend"),n.allowMomentumBounce=!1,!r.grabCursor||!0!==i.allowSlideNext&&!0!==i.allowSlidePrev||i.setGrabCursor(!0),i.emit("sliderFirstMove",l)),i.emit("sliderMove",l),n.isMoved=!0;var g=i.isHorizontal()?h:f;s.diff=g,g*=r.touchRatio,o&&(g=-g),i.swipeDirection=g>0?"prev":"next",n.currentTranslate=g+n.startTranslate;var v=!0,y=r.resistanceRatio;if(r.touchReleaseOnEdges&&(y=0),g>0&&n.currentTranslate>i.minTranslate()?(v=!1,r.resistance&&(n.currentTranslate=i.minTranslate()-1+Math.pow(-i.minTranslate()+n.startTranslate+g,y))):g<0&&n.currentTranslate<i.maxTranslate()&&(v=!1,r.resistance&&(n.currentTranslate=i.maxTranslate()+1-Math.pow(i.maxTranslate()-n.startTranslate-g,y))),v&&(l.preventedByNestedSwiper=!0),!i.allowSlideNext&&"next"===i.swipeDirection&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!i.allowSlidePrev&&"prev"===i.swipeDirection&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),r.threshold>0){if(!(Math.abs(g)>r.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,n.currentTranslate=n.startTranslate,void(s.diff=i.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}r.followFinger&&!r.cssMode&&((r.freeMode||r.watchSlidesProgress||r.watchSlidesVisibility)&&(i.updateActiveIndex(),i.updateSlidesClasses()),r.freeMode&&(0===n.velocities.length&&n.velocities.push({position:s[i.isHorizontal()?"startX":"startY"],time:n.touchStartTime}),n.velocities.push({position:s[i.isHorizontal()?"currentX":"currentY"],time:_()})),i.updateProgress(n.currentTranslate),i.setTranslate(n.currentTranslate))}}}}else n.startMoving&&n.isScrolling&&i.emit("touchMoveOpposite",l)}function L(e){var t=this,i=t.touchEventsData,n=t.params,r=t.touches,a=t.rtlTranslate,s=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",d),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&n.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);n.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var c,u=_(),p=u-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap click",d),p<300&&u-i.lastClickTime<300&&t.emit("doubleTap doubleClick",d)),i.lastClickTime=_(),w((function(){t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===r.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,c=n.followFinger?a?t.translate:-t.translate:-i.currentTranslate,!n.cssMode)if(n.freeMode){if(c<-t.minTranslate())return void t.slideTo(t.activeIndex);if(c>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(n.freeModeMomentum){if(i.velocities.length>1){var h=i.velocities.pop(),f=i.velocities.pop(),m=h.position-f.position,g=h.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)<n.freeModeMinimumVelocity&&(t.velocity=0),(g>150||_()-h.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=n.freeModeMomentumVelocityRatio,i.velocities.length=0;var v=1e3*n.freeModeMomentumRatio,y=t.velocity*v,b=t.translate+y;a&&(b=-b);var x,C,E=!1,S=20*Math.abs(t.velocity)*n.freeModeMomentumBounceRatio;if(b<t.maxTranslate())n.freeModeMomentumBounce?(b+t.maxTranslate()<-S&&(b=t.maxTranslate()-S),x=t.maxTranslate(),E=!0,i.allowMomentumBounce=!0):b=t.maxTranslate(),n.loop&&n.centeredSlides&&(C=!0);else if(b>t.minTranslate())n.freeModeMomentumBounce?(b-t.minTranslate()>S&&(b=t.minTranslate()+S),x=t.minTranslate(),E=!0,i.allowMomentumBounce=!0):b=t.minTranslate(),n.loop&&n.centeredSlides&&(C=!0);else if(n.freeModeSticky){for(var T,k=0;k<l.length;k+=1)if(l[k]>-b){T=k;break}b=-(b=Math.abs(l[T]-b)<Math.abs(l[T-1]-b)||"next"===t.swipeDirection?l[T]:l[T-1])}if(C&&t.once("transitionEnd",(function(){t.loopFix()})),0!==t.velocity){if(v=a?Math.abs((-b-t.translate)/t.velocity):Math.abs((b-t.translate)/t.velocity),n.freeModeSticky){var P=Math.abs((a?-b:b)-t.translate),I=t.slidesSizesGrid[t.activeIndex];v=P<I?n.speed:P<2*I?1.5*n.speed:2.5*n.speed}}else if(n.freeModeSticky)return void t.slideToClosest();n.freeModeMomentumBounce&&E?(t.updateProgress(x),t.setTransition(v),t.setTranslate(b),t.transitionStart(!0,t.swipeDirection),t.animating=!0,s.transitionEnd((function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(n.speed),setTimeout((function(){t.setTranslate(x),s.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(t.updateProgress(b),t.setTransition(v),t.setTranslate(b),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,s.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(b),t.updateActiveIndex(),t.updateSlidesClasses()}else if(n.freeModeSticky)return void t.slideToClosest();(!n.freeModeMomentum||p>=n.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var $=0,A=t.slidesSizesGrid[0],M=0;M<o.length;M+=M<n.slidesPerGroupSkip?1:n.slidesPerGroup){var z=M<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;void 0!==o[M+z]?c>=o[M]&&c<o[M+z]&&($=M,A=o[M+z]-o[M]):c>=o[M]&&($=M,A=o[o.length-1]-o[o.length-2])}var O=(c-o[$])/A,L=$<n.slidesPerGroupSkip-1?1:n.slidesPerGroup;if(p>n.longSwipesMs){if(!n.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(O>=n.longSwipesRatio?t.slideTo($+L):t.slideTo($)),"prev"===t.swipeDirection&&(O>1-n.longSwipesRatio?t.slideTo($+L):t.slideTo($))}else{if(!n.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||d.target!==t.navigation.nextEl&&d.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo($+L),"prev"===t.swipeDirection&&t.slideTo($)):d.target===t.navigation.nextEl?t.slideTo($+L):t.slideTo($)}}}function N(){var e=this,t=e.params,i=e.el;if(!i||0!==i.offsetWidth){t.breakpoints&&e.setBreakpoint();var n=e.allowSlideNext,r=e.allowSlidePrev,a=e.snapGrid;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=r,e.allowSlideNext=n,e.params.watchOverflow&&a!==e.snapGrid&&e.checkOverflow()}}function D(e){var t=this;t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function j(){var e=this,t=e.wrapperEl,i=e.rtlTranslate;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=i?t.scrollWidth-t.offsetWidth-t.scrollLeft:-t.scrollLeft:e.translate=-t.scrollTop,-0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var n=e.maxTranslate()-e.minTranslate();(0===n?0:(e.translate-e.minTranslate())/n)!==e.progress&&e.updateProgress(i?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}var H=!1;function F(){}var B={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,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,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!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:!1,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,loopPreventsSlide:!0,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,_emitClasses:!1},q={modular:{useParams:function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var n=t.modules[i];n.params&&E(e,n.params)}))},useModules:function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var n=t.modules[i],r=e[i]||{};n.on&&t.on&&Object.keys(n.on).forEach((function(e){t.on(e,n.on[e])})),n.create&&n.create.bind(t)(r)}))}},eventsEmitter:M,update:{updateSize:function(){var e,t,i=this,n=i.$el;e=void 0!==i.params.width&&null!==i.params.width?i.params.width:n[0].clientWidth,t=void 0!==i.params.height&&null!==i.params.width?i.params.height:n[0].clientHeight,0===e&&i.isHorizontal()||0===t&&i.isVertical()||(e=e-parseInt(n.css("padding-left")||0,10)-parseInt(n.css("padding-right")||0,10),t=t-parseInt(n.css("padding-top")||0,10)-parseInt(n.css("padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),E(i,{width:e,height:t,size:i.isHorizontal()?e:t}))},updateSlides:function(){var e=this,t=o(),i=e.params,n=e.$wrapperEl,r=e.size,a=e.rtlTranslate,s=e.wrongRTL,l=e.virtual&&i.virtual.enabled,d=l?e.virtual.slides.length:e.slides.length,c=n.children("."+e.params.slideClass),u=l?e.virtual.slides.length:c.length,p=[],h=[],f=[];function m(e,t){return!i.cssMode||t!==c.length-1}var g=i.slidesOffsetBefore;"function"==typeof g&&(g=i.slidesOffsetBefore.call(e));var v=i.slidesOffsetAfter;"function"==typeof v&&(v=i.slidesOffsetAfter.call(e));var y=e.snapGrid.length,b=e.snapGrid.length,w=i.spaceBetween,_=-g,x=0,C=0;if(void 0!==r){var S,T;"string"==typeof w&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*r),e.virtualSize=-w,a?c.css({marginLeft:"",marginTop:""}):c.css({marginRight:"",marginBottom:""}),i.slidesPerColumn>1&&(S=Math.floor(u/i.slidesPerColumn)===u/e.params.slidesPerColumn?u:Math.ceil(u/i.slidesPerColumn)*i.slidesPerColumn,"auto"!==i.slidesPerView&&"row"===i.slidesPerColumnFill&&(S=Math.max(S,i.slidesPerView*i.slidesPerColumn)));for(var k,P=i.slidesPerColumn,I=S/P,$=Math.floor(u/i.slidesPerColumn),A=0;A<u;A+=1){T=0;var M=c.eq(A);if(i.slidesPerColumn>1){var z=void 0,O=void 0,L=void 0;if("row"===i.slidesPerColumnFill&&i.slidesPerGroup>1){var N=Math.floor(A/(i.slidesPerGroup*i.slidesPerColumn)),D=A-i.slidesPerColumn*i.slidesPerGroup*N,j=0===N?i.slidesPerGroup:Math.min(Math.ceil((u-N*P*i.slidesPerGroup)/P),i.slidesPerGroup);z=(O=D-(L=Math.floor(D/j))*j+N*i.slidesPerGroup)+L*S/P,M.css({"-webkit-box-ordinal-group":z,"-moz-box-ordinal-group":z,"-ms-flex-order":z,"-webkit-order":z,order:z})}else"column"===i.slidesPerColumnFill?(L=A-(O=Math.floor(A/P))*P,(O>$||O===$&&L===P-1)&&(L+=1)>=P&&(L=0,O+=1)):O=A-(L=Math.floor(A/I))*I;M.css("margin-"+(e.isHorizontal()?"top":"left"),0!==L&&i.spaceBetween&&i.spaceBetween+"px")}if("none"!==M.css("display")){if("auto"===i.slidesPerView){var H=t.getComputedStyle(M[0],null),F=M[0].style.transform,B=M[0].style.webkitTransform;if(F&&(M[0].style.transform="none"),B&&(M[0].style.webkitTransform="none"),i.roundLengths)T=e.isHorizontal()?M.outerWidth(!0):M.outerHeight(!0);else if(e.isHorizontal()){var q=parseFloat(H.getPropertyValue("width")||0),V=parseFloat(H.getPropertyValue("padding-left")||0),W=parseFloat(H.getPropertyValue("padding-right")||0),R=parseFloat(H.getPropertyValue("margin-left")||0),Y=parseFloat(H.getPropertyValue("margin-right")||0),G=H.getPropertyValue("box-sizing");T=G&&"border-box"===G?q+R+Y:q+V+W+R+Y}else{var X=parseFloat(H.getPropertyValue("height")||0),U=parseFloat(H.getPropertyValue("padding-top")||0),Q=parseFloat(H.getPropertyValue("padding-bottom")||0),K=parseFloat(H.getPropertyValue("margin-top")||0),Z=parseFloat(H.getPropertyValue("margin-bottom")||0),J=H.getPropertyValue("box-sizing");T=J&&"border-box"===J?X+K+Z:X+U+Q+K+Z}F&&(M[0].style.transform=F),B&&(M[0].style.webkitTransform=B),i.roundLengths&&(T=Math.floor(T))}else T=(r-(i.slidesPerView-1)*w)/i.slidesPerView,i.roundLengths&&(T=Math.floor(T)),c[A]&&(e.isHorizontal()?c[A].style.width=T+"px":c[A].style.height=T+"px");c[A]&&(c[A].swiperSlideSize=T),f.push(T),i.centeredSlides?(_=_+T/2+x/2+w,0===x&&0!==A&&(_=_-r/2-w),0===A&&(_=_-r/2-w),Math.abs(_)<.001&&(_=0),i.roundLengths&&(_=Math.floor(_)),C%i.slidesPerGroup==0&&p.push(_),h.push(_)):(i.roundLengths&&(_=Math.floor(_)),(C-Math.min(e.params.slidesPerGroupSkip,C))%e.params.slidesPerGroup==0&&p.push(_),h.push(_),_=_+T+w),e.virtualSize+=T+w,x=T,C+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+v,a&&s&&("slide"===i.effect||"coverflow"===i.effect)&&n.css({width:e.virtualSize+i.spaceBetween+"px"}),i.setWrapperSize&&(e.isHorizontal()?n.css({width:e.virtualSize+i.spaceBetween+"px"}):n.css({height:e.virtualSize+i.spaceBetween+"px"})),i.slidesPerColumn>1&&(e.virtualSize=(T+i.spaceBetween)*S,e.virtualSize=Math.ceil(e.virtualSize/i.slidesPerColumn)-i.spaceBetween,e.isHorizontal()?n.css({width:e.virtualSize+i.spaceBetween+"px"}):n.css({height:e.virtualSize+i.spaceBetween+"px"}),i.centeredSlides)){k=[];for(var ee=0;ee<p.length;ee+=1){var te=p[ee];i.roundLengths&&(te=Math.floor(te)),p[ee]<e.virtualSize+p[0]&&k.push(te)}p=k}if(!i.centeredSlides){k=[];for(var ie=0;ie<p.length;ie+=1){var ne=p[ie];i.roundLengths&&(ne=Math.floor(ne)),p[ie]<=e.virtualSize-r&&k.push(ne)}p=k,Math.floor(e.virtualSize-r)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-r)}if(0===p.length&&(p=[0]),0!==i.spaceBetween&&(e.isHorizontal()?a?c.filter(m).css({marginLeft:w+"px"}):c.filter(m).css({marginRight:w+"px"}):c.filter(m).css({marginBottom:w+"px"})),i.centeredSlides&&i.centeredSlidesBounds){var re=0;f.forEach((function(e){re+=e+(i.spaceBetween?i.spaceBetween:0)}));var ae=(re-=i.spaceBetween)-r;p=p.map((function(e){return e<0?-g:e>ae?ae+v:e}))}if(i.centerInsufficientSlides){var se=0;if(f.forEach((function(e){se+=e+(i.spaceBetween?i.spaceBetween:0)})),(se-=i.spaceBetween)<r){var oe=(r-se)/2;p.forEach((function(e,t){p[t]=e-oe})),h.forEach((function(e,t){h[t]=e+oe}))}}E(e,{slides:c,snapGrid:p,slidesGrid:h,slidesSizesGrid:f}),u!==d&&e.emit("slidesLengthChange"),p.length!==y&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),(i.watchSlidesProgress||i.watchSlidesVisibility)&&e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,i=this,n=[],r=0;if("number"==typeof e?i.setTransition(e):!0===e&&i.setTransition(i.params.speed),"auto"!==i.params.slidesPerView&&i.params.slidesPerView>1)if(i.params.centeredSlides)i.visibleSlides.each((function(e){n.push(e)}));else for(t=0;t<Math.ceil(i.params.slidesPerView);t+=1){var a=i.activeIndex+t;if(a>i.slides.length)break;n.push(i.slides.eq(a)[0])}else n.push(i.slides.eq(i.activeIndex)[0]);for(t=0;t<n.length;t+=1)if(void 0!==n[t]){var s=n[t].offsetHeight;r=s>r?s:r}r&&i.$wrapperEl.css("height",r+"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,i=t.params,n=t.slides,r=t.rtlTranslate;if(0!==n.length){void 0===n[0].swiperSlideOffset&&t.updateSlidesOffset();var a=-e;r&&(a=e),n.removeClass(i.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var s=0;s<n.length;s+=1){var o=n[s],l=(a+(i.centeredSlides?t.minTranslate():0)-o.swiperSlideOffset)/(o.swiperSlideSize+i.spaceBetween);if(i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight){var d=-(a-o.swiperSlideOffset),c=d+t.slidesSizesGrid[s];(d>=0&&d<t.size-1||c>1&&c<=t.size||d<=0&&c>=t.size)&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(s),n.eq(s).addClass(i.slideVisibleClass))}o.progress=r?-l:l}t.visibleSlides=m(t.visibleSlides)}},updateProgress:function(e){var t=this;if(void 0===e){var i=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*i||0}var n=t.params,r=t.maxTranslate()-t.minTranslate(),a=t.progress,s=t.isBeginning,o=t.isEnd,l=s,d=o;0===r?(a=0,s=!0,o=!0):(s=(a=(e-t.minTranslate())/r)<=0,o=a>=1),E(t,{progress:a,isBeginning:s,isEnd:o}),(n.watchSlidesProgress||n.watchSlidesVisibility||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),s&&!l&&t.emit("reachBeginning toEdge"),o&&!d&&t.emit("reachEnd toEdge"),(l&&!s||d&&!o)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){var e,t=this,i=t.slides,n=t.params,r=t.$wrapperEl,a=t.activeIndex,s=t.realIndex,o=t.virtual&&n.virtual.enabled;i.removeClass(n.slideActiveClass+" "+n.slideNextClass+" "+n.slidePrevClass+" "+n.slideDuplicateActiveClass+" "+n.slideDuplicateNextClass+" "+n.slideDuplicatePrevClass),(e=o?t.$wrapperEl.find("."+n.slideClass+'[data-swiper-slide-index="'+a+'"]'):i.eq(a)).addClass(n.slideActiveClass),n.loop&&(e.hasClass(n.slideDuplicateClass)?r.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+s+'"]').addClass(n.slideDuplicateActiveClass):r.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+s+'"]').addClass(n.slideDuplicateActiveClass));var l=e.nextAll("."+n.slideClass).eq(0).addClass(n.slideNextClass);n.loop&&0===l.length&&(l=i.eq(0)).addClass(n.slideNextClass);var d=e.prevAll("."+n.slideClass).eq(0).addClass(n.slidePrevClass);n.loop&&0===d.length&&(d=i.eq(-1)).addClass(n.slidePrevClass),n.loop&&(l.hasClass(n.slideDuplicateClass)?r.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicateNextClass):r.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicateNextClass),d.hasClass(n.slideDuplicateClass)?r.children("."+n.slideClass+":not(."+n.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicatePrevClass):r.children("."+n.slideClass+"."+n.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(n.slideDuplicatePrevClass)),t.emitSlidesClasses()},updateActiveIndex:function(e){var t,i=this,n=i.rtlTranslate?i.translate:-i.translate,r=i.slidesGrid,a=i.snapGrid,s=i.params,o=i.activeIndex,l=i.realIndex,d=i.snapIndex,c=e;if(void 0===c){for(var u=0;u<r.length;u+=1)void 0!==r[u+1]?n>=r[u]&&n<r[u+1]-(r[u+1]-r[u])/2?c=u:n>=r[u]&&n<r[u+1]&&(c=u+1):n>=r[u]&&(c=u);s.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(a.indexOf(n)>=0)t=a.indexOf(n);else{var p=Math.min(s.slidesPerGroupSkip,c);t=p+Math.floor((c-p)/s.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),c!==o){var h=parseInt(i.slides.eq(c).attr("data-swiper-slide-index")||c,10);E(i,{snapIndex:t,realIndex:h,previousIndex:o,activeIndex:c}),i.emit("activeIndexChange"),i.emit("snapIndexChange"),l!==h&&i.emit("realIndexChange"),(i.initialized||i.params.runCallbacksOnInit)&&i.emit("slideChange")}else t!==d&&(i.snapIndex=t,i.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,i=t.params,n=m(e.target).closest("."+i.slideClass)[0],r=!1;if(n)for(var a=0;a<t.slides.length;a+=1)t.slides[a]===n&&(r=!0);if(!n||!r)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=n,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(m(n).attr("data-swiper-slide-index"),10):t.clickedIndex=m(n).index(),i.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}},translate:{getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this,i=t.params,n=t.rtlTranslate,r=t.translate,a=t.$wrapperEl;if(i.virtualTranslate)return n?-r:r;if(i.cssMode)return r;var s=x(a[0],e);return n&&(s=-s),s||0},setTranslate:function(e,t){var i=this,n=i.rtlTranslate,r=i.params,a=i.$wrapperEl,s=i.wrapperEl,o=i.progress,l=0,d=0;i.isHorizontal()?l=n?-e:e:d=e,r.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),r.cssMode?s[i.isHorizontal()?"scrollLeft":"scrollTop"]=i.isHorizontal()?-l:-d:r.virtualTranslate||a.transform("translate3d("+l+"px, "+d+"px, 0px)"),i.previousTranslate=i.translate,i.translate=i.isHorizontal()?l:d;var c=i.maxTranslate()-i.minTranslate();(0===c?0:(e-i.minTranslate())/c)!==o&&i.updateProgress(e),i.emit("setTranslate",i.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,i,n,r){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),void 0===n&&(n=!0);var a=this,s=a.params,o=a.wrapperEl;if(a.animating&&s.preventInteractionOnTransition)return!1;var l,d=a.minTranslate(),c=a.maxTranslate();if(l=n&&e>d?d:n&&e<c?c:e,a.updateProgress(l),s.cssMode){var u,p=a.isHorizontal();return 0===t?o[p?"scrollLeft":"scrollTop"]=-l:o.scrollTo?o.scrollTo(((u={})[p?"left":"top"]=-l,u.behavior="smooth",u)):o[p?"scrollLeft":"scrollTop"]=-l,!0}return 0===t?(a.setTransition(0),a.setTranslate(l),i&&(a.emit("beforeTransitionStart",t,r),a.emit("transitionEnd"))):(a.setTransition(t),a.setTranslate(l),i&&(a.emit("beforeTransitionStart",t,r),a.emit("transitionStart")),a.animating||(a.animating=!0,a.onTranslateToWrapperTransitionEnd||(a.onTranslateToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd),a.onTranslateToWrapperTransitionEnd=null,delete a.onTranslateToWrapperTransitionEnd,i&&a.emit("transitionEnd"))}),a.$wrapperEl[0].addEventListener("transitionend",a.onTranslateToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){var i=this;i.params.cssMode||i.$wrapperEl.transition(e),i.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var i=this,n=i.activeIndex,r=i.params,a=i.previousIndex;if(!r.cssMode){r.autoHeight&&i.updateAutoHeight();var s=t;if(s||(s=n>a?"next":n<a?"prev":"reset"),i.emit("transitionStart"),e&&n!==a){if("reset"===s)return void i.emit("slideResetTransitionStart");i.emit("slideChangeTransitionStart"),"next"===s?i.emit("slideNextTransitionStart"):i.emit("slidePrevTransitionStart")}}},transitionEnd:function(e,t){void 0===e&&(e=!0);var i=this,n=i.activeIndex,r=i.previousIndex,a=i.params;if(i.animating=!1,!a.cssMode){i.setTransition(0);var s=t;if(s||(s=n>r?"next":n<r?"prev":"reset"),i.emit("transitionEnd"),e&&n!==r){if("reset"===s)return void i.emit("slideResetTransitionEnd");i.emit("slideChangeTransitionEnd"),"next"===s?i.emit("slideNextTransitionEnd"):i.emit("slidePrevTransitionEnd")}}}},slide:{slideTo:function(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var r=this,a=e;a<0&&(a=0);var s=r.params,o=r.snapGrid,l=r.slidesGrid,d=r.previousIndex,c=r.activeIndex,u=r.rtlTranslate,p=r.wrapperEl;if(r.animating&&s.preventInteractionOnTransition)return!1;var h=Math.min(r.params.slidesPerGroupSkip,a),f=h+Math.floor((a-h)/r.params.slidesPerGroup);f>=o.length&&(f=o.length-1),(c||s.initialSlide||0)===(d||0)&&i&&r.emit("beforeSlideChangeStart");var m,g=-o[f];if(r.updateProgress(g),s.normalizeSlideIndex)for(var v=0;v<l.length;v+=1)-Math.floor(100*g)>=Math.floor(100*l[v])&&(a=v);if(r.initialized&&a!==c){if(!r.allowSlideNext&&g<r.translate&&g<r.minTranslate())return!1;if(!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(c||0)!==a)return!1}if(m=a>c?"next":a<c?"prev":"reset",u&&-g===r.translate||!u&&g===r.translate)return r.updateActiveIndex(a),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==s.effect&&r.setTranslate(g),"reset"!==m&&(r.transitionStart(i,m),r.transitionEnd(i,m)),!1;if(s.cssMode){var y,b=r.isHorizontal(),w=-g;return u&&(w=p.scrollWidth-p.offsetWidth-w),0===t?p[b?"scrollLeft":"scrollTop"]=w:p.scrollTo?p.scrollTo(((y={})[b?"left":"top"]=w,y.behavior="smooth",y)):p[b?"scrollLeft":"scrollTop"]=w,!0}return 0===t?(r.setTransition(0),r.setTranslate(g),r.updateActiveIndex(a),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,n),r.transitionStart(i,m),r.transitionEnd(i,m)):(r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(a),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,n),r.transitionStart(i,m),r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(i,m))}),r.$wrapperEl[0].addEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var r=this,a=e;return r.params.loop&&(a+=r.loopedSlides),r.slideTo(a,t,i,n)},slideNext:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var n=this,r=n.params,a=n.animating,s=n.activeIndex<r.slidesPerGroupSkip?1:r.slidesPerGroup;if(r.loop){if(a&&r.loopPreventsSlide)return!1;n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft}return n.slideTo(n.activeIndex+s,e,t,i)},slidePrev:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var n=this,r=n.params,a=n.animating,s=n.snapGrid,o=n.slidesGrid,l=n.rtlTranslate;if(r.loop){if(a&&r.loopPreventsSlide)return!1;n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var c,u=d(l?n.translate:-n.translate),p=s.map((function(e){return d(e)})),h=(s[p.indexOf(u)],s[p.indexOf(u)-1]);return void 0===h&&r.cssMode&&s.forEach((function(e){!h&&u>=e&&(h=e)})),void 0!==h&&(c=o.indexOf(h))<0&&(c=n.activeIndex-1),n.slideTo(c,e,t,i)},slideReset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===n&&(n=.5);var r=this,a=r.activeIndex,s=Math.min(r.params.slidesPerGroupSkip,a),o=s+Math.floor((a-s)/r.params.slidesPerGroup),l=r.rtlTranslate?r.translate:-r.translate;if(l>=r.snapGrid[o]){var d=r.snapGrid[o];l-d>(r.snapGrid[o+1]-d)*n&&(a+=r.params.slidesPerGroup)}else{var c=r.snapGrid[o-1];l-c<=(r.snapGrid[o]-c)*n&&(a-=r.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,r.slidesGrid.length-1),r.slideTo(a,e,t,i)},slideToClickedSlide:function(){var e,t=this,i=t.params,n=t.$wrapperEl,r="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,a=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(m(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?a<t.loopedSlides-r/2||a>t.slides.length-t.loopedSlides+r/2?(t.loopFix(),a=n.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),w((function(){t.slideTo(a)}))):t.slideTo(a):a>t.slides.length-r?(t.loopFix(),a=n.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),w((function(){t.slideTo(a)}))):t.slideTo(a)}else t.slideTo(a)}},loop:{loopCreate:function(){var e=this,t=a(),i=e.params,n=e.$wrapperEl;n.children("."+i.slideClass+"."+i.slideDuplicateClass).remove();var r=n.children("."+i.slideClass);if(i.loopFillGroupWithBlank){var s=i.slidesPerGroup-r.length%i.slidesPerGroup;if(s!==i.slidesPerGroup){for(var o=0;o<s;o+=1){var l=m(t.createElement("div")).addClass(i.slideClass+" "+i.slideBlankClass);n.append(l)}r=n.children("."+i.slideClass)}}"auto"!==i.slidesPerView||i.loopedSlides||(i.loopedSlides=r.length),e.loopedSlides=Math.ceil(parseFloat(i.loopedSlides||i.slidesPerView,10)),e.loopedSlides+=i.loopAdditionalSlides,e.loopedSlides>r.length&&(e.loopedSlides=r.length);var d=[],c=[];r.each((function(t,i){var n=m(t);i<e.loopedSlides&&c.push(t),i<r.length&&i>=r.length-e.loopedSlides&&d.push(t),n.attr("data-swiper-slide-index",i)}));for(var u=0;u<c.length;u+=1)n.append(m(c[u].cloneNode(!0)).addClass(i.slideDuplicateClass));for(var p=d.length-1;p>=0;p-=1)n.prepend(m(d[p].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){var e=this;e.emit("beforeLoopFix");var t,i=e.activeIndex,n=e.slides,r=e.loopedSlides,a=e.allowSlidePrev,s=e.allowSlideNext,o=e.snapGrid,l=e.rtlTranslate;e.allowSlidePrev=!0,e.allowSlideNext=!0;var d=-o[i]-e.getTranslate();i<r?(t=n.length-3*r+i,t+=r,e.slideTo(t,0,!1,!0)&&0!==d&&e.setTranslate((l?-e.translate:e.translate)-d)):i>=n.length-r&&(t=-n.length+i+r,t+=r,e.slideTo(t,0,!1,!0)&&0!==d&&e.setTranslate((l?-e.translate:e.translate)-d)),e.allowSlidePrev=a,e.allowSlideNext=s,e.emit("loopFix")},loopDestroy:function(){var e=this,t=e.$wrapperEl,i=e.params,n=e.slides;t.children("."+i.slideClass+"."+i.slideDuplicateClass+",."+i.slideClass+"."+i.slideBlankClass).remove(),n.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){var t=this;if(!(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var i=t.el;i.style.cursor="move",i.style.cursor=e?"-webkit-grabbing":"-webkit-grab",i.style.cursor=e?"-moz-grabbin":"-moz-grab",i.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){var e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.el.style.cursor="")}},manipulation:{appendSlide:function(e){var t=this,i=t.$wrapperEl,n=t.params;if(n.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var r=0;r<e.length;r+=1)e[r]&&i.append(e[r]);else i.append(e);n.loop&&t.loopCreate(),n.observer&&t.support.observer||t.update()},prependSlide:function(e){var t=this,i=t.params,n=t.$wrapperEl,r=t.activeIndex;i.loop&&t.loopDestroy();var a=r+1;if("object"==typeof e&&"length"in e){for(var s=0;s<e.length;s+=1)e[s]&&n.prepend(e[s]);a=r+e.length}else n.prepend(e);i.loop&&t.loopCreate(),i.observer&&t.support.observer||t.update(),t.slideTo(a,0,!1)},addSlide:function(e,t){var i=this,n=i.$wrapperEl,r=i.params,a=i.activeIndex;r.loop&&(a-=i.loopedSlides,i.loopDestroy(),i.slides=n.children("."+r.slideClass));var s=i.slides.length;if(e<=0)i.prependSlide(t);else if(e>=s)i.appendSlide(t);else{for(var o=a>e?a+1:a,l=[],d=s-1;d>=e;d-=1){var c=i.slides.eq(d);c.remove(),l.unshift(c)}if("object"==typeof t&&"length"in t){for(var u=0;u<t.length;u+=1)t[u]&&n.append(t[u]);o=a>e?a+t.length:a}else n.append(t);for(var p=0;p<l.length;p+=1)n.append(l[p]);r.loop&&i.loopCreate(),r.observer&&i.support.observer||i.update(),r.loop?i.slideTo(o+i.loopedSlides,0,!1):i.slideTo(o,0,!1)}},removeSlide:function(e){var t=this,i=t.params,n=t.$wrapperEl,r=t.activeIndex;i.loop&&(r-=t.loopedSlides,t.loopDestroy(),t.slides=n.children("."+i.slideClass));var a,s=r;if("object"==typeof e&&"length"in e){for(var o=0;o<e.length;o+=1)a=e[o],t.slides[a]&&t.slides.eq(a).remove(),a<s&&(s-=1);s=Math.max(s,0)}else a=e,t.slides[a]&&t.slides.eq(a).remove(),a<s&&(s-=1),s=Math.max(s,0);i.loop&&t.loopCreate(),i.observer&&t.support.observer||t.update(),i.loop?t.slideTo(s+t.loopedSlides,0,!1):t.slideTo(s,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},events:{attachEvents:function(){var e=this,t=a(),i=e.params,n=e.touchEvents,r=e.el,s=e.wrapperEl,o=e.device,l=e.support;e.onTouchStart=z.bind(e),e.onTouchMove=O.bind(e),e.onTouchEnd=L.bind(e),i.cssMode&&(e.onScroll=j.bind(e)),e.onClick=D.bind(e);var d=!!i.nested;if(!l.touch&&l.pointerEvents)r.addEventListener(n.start,e.onTouchStart,!1),t.addEventListener(n.move,e.onTouchMove,d),t.addEventListener(n.end,e.onTouchEnd,!1);else{if(l.touch){var c=!("touchstart"!==n.start||!l.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};r.addEventListener(n.start,e.onTouchStart,c),r.addEventListener(n.move,e.onTouchMove,l.passiveListener?{passive:!1,capture:d}:d),r.addEventListener(n.end,e.onTouchEnd,c),n.cancel&&r.addEventListener(n.cancel,e.onTouchEnd,c),H||(t.addEventListener("touchstart",F),H=!0)}(i.simulateTouch&&!o.ios&&!o.android||i.simulateTouch&&!l.touch&&o.ios)&&(r.addEventListener("mousedown",e.onTouchStart,!1),t.addEventListener("mousemove",e.onTouchMove,d),t.addEventListener("mouseup",e.onTouchEnd,!1))}(i.preventClicks||i.preventClicksPropagation)&&r.addEventListener("click",e.onClick,!0),i.cssMode&&s.addEventListener("scroll",e.onScroll),i.updateOnWindowResize?e.on(o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",N,!0):e.on("observerUpdate",N,!0)},detachEvents:function(){var e=this,t=a(),i=e.params,n=e.touchEvents,r=e.el,s=e.wrapperEl,o=e.device,l=e.support,d=!!i.nested;if(!l.touch&&l.pointerEvents)r.removeEventListener(n.start,e.onTouchStart,!1),t.removeEventListener(n.move,e.onTouchMove,d),t.removeEventListener(n.end,e.onTouchEnd,!1);else{if(l.touch){var c=!("onTouchStart"!==n.start||!l.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};r.removeEventListener(n.start,e.onTouchStart,c),r.removeEventListener(n.move,e.onTouchMove,d),r.removeEventListener(n.end,e.onTouchEnd,c),n.cancel&&r.removeEventListener(n.cancel,e.onTouchEnd,c)}(i.simulateTouch&&!o.ios&&!o.android||i.simulateTouch&&!l.touch&&o.ios)&&(r.removeEventListener("mousedown",e.onTouchStart,!1),t.removeEventListener("mousemove",e.onTouchMove,d),t.removeEventListener("mouseup",e.onTouchEnd,!1))}(i.preventClicks||i.preventClicksPropagation)&&r.removeEventListener("click",e.onClick,!0),i.cssMode&&s.removeEventListener("scroll",e.onScroll),e.off(o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",N)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,i=e.initialized,n=e.loopedSlides,r=void 0===n?0:n,a=e.params,s=e.$el,o=a.breakpoints;if(o&&(!o||0!==Object.keys(o).length)){var l=e.getBreakpoint(o);if(l&&e.currentBreakpoint!==l){var d=l in o?o[l]:void 0;d&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=d[e];void 0!==t&&(d[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var c=d||e.originalParams,u=a.slidesPerColumn>1,p=c.slidesPerColumn>1;u&&!p?(s.removeClass(a.containerModifierClass+"multirow "+a.containerModifierClass+"multirow-column"),e.emitContainerClasses()):!u&&p&&(s.addClass(a.containerModifierClass+"multirow"),"column"===c.slidesPerColumnFill&&s.addClass(a.containerModifierClass+"multirow-column"),e.emitContainerClasses());var h=c.direction&&c.direction!==a.direction,f=a.loop&&(c.slidesPerView!==a.slidesPerView||h);h&&i&&e.changeDirection(),E(e.params,c),E(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",c),f&&i&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-r+e.loopedSlides,0,!1)),e.emit("breakpoint",c)}}},getBreakpoint:function(e){var t=o();if(e){var i=!1,n=Object.keys(e).map((function(e){if("string"==typeof e&&0===e.indexOf("@")){var i=parseFloat(e.substr(1));return{value:t.innerHeight*i,point:e}}return{value:e,point:e}}));n.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var r=0;r<n.length;r+=1){var a=n[r],s=a.point;a.value<=t.innerWidth&&(i=s)}return i||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.params,i=e.isLocked,n=e.slides.length>0&&t.slidesOffsetBefore+t.spaceBetween*(e.slides.length-1)+e.slides[0].offsetWidth*e.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&n?e.isLocked=n<=e.size:e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,i!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),i&&i!==e.isLocked&&(e.isEnd=!1,e.navigation&&e.navigation.update())}},classes:{addClasses:function(){var e=this,t=e.classNames,i=e.params,n=e.rtl,r=e.$el,a=e.device,s=[];s.push("initialized"),s.push(i.direction),i.freeMode&&s.push("free-mode"),i.autoHeight&&s.push("autoheight"),n&&s.push("rtl"),i.slidesPerColumn>1&&(s.push("multirow"),"column"===i.slidesPerColumnFill&&s.push("multirow-column")),a.android&&s.push("android"),a.ios&&s.push("ios"),i.cssMode&&s.push("css-mode"),s.forEach((function(e){t.push(i.containerModifierClass+e)})),r.addClass(t.join(" ")),e.emitContainerClasses()},removeClasses:function(){var e=this,t=e.$el,i=e.classNames;t.removeClass(i.join(" ")),e.emitContainerClasses()}},images:{loadImage:function(e,t,i,n,r,a){var s,l=o();function d(){a&&a()}m(e).parent("picture")[0]||e.complete&&r?d():t?((s=new l.Image).onload=d,s.onerror=d,n&&(s.sizes=n),i&&(s.srcset=i),t&&(s.src=t)):d()},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 i=0;i<e.imagesToLoad.length;i+=1){var n=e.imagesToLoad[i];e.loadImage(n,n.currentSrc||n.getAttribute("src"),n.srcset||n.getAttribute("srcset"),n.sizes||n.getAttribute("sizes"),!0,t)}}}},V={},W=function(){function t(){for(var e,i,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];1===r.length&&r[0].constructor&&r[0].constructor===Object?i=r[0]:(e=r[0],i=r[1]),i||(i={}),i=E({},i),e&&!i.el&&(i.el=e);var s=this;s.support=T(),s.device=k({userAgent:i.userAgent}),s.browser=P(),s.eventsListeners={},s.eventsAnyListeners=[],void 0===s.modules&&(s.modules={}),Object.keys(s.modules).forEach((function(e){var t=s.modules[e];if(t.params){var n=Object.keys(t.params)[0],r=t.params[n];if("object"!=typeof r||null===r)return;if(!(n in i)||!("enabled"in r))return;!0===i[n]&&(i[n]={enabled:!0}),"object"!=typeof i[n]||"enabled"in i[n]||(i[n].enabled=!0),i[n]||(i[n]={enabled:!1})}}));var o=E({},B);s.useParams(o),s.params=E({},o,V,i),s.originalParams=E({},s.params),s.passedParams=E({},i),s.params&&s.params.on&&Object.keys(s.params.on).forEach((function(e){s.on(e,s.params.on[e])})),s.params&&s.params.onAny&&s.onAny(s.params.onAny),s.$=m;var l=m(s.params.el);if(e=l[0]){if(l.length>1){var d=[];return l.each((function(e){var n=E({},i,{el:e});d.push(new t(n))})),d}var c,u,p;return e.swiper=s,e&&e.shadowRoot&&e.shadowRoot.querySelector?(c=m(e.shadowRoot.querySelector("."+s.params.wrapperClass))).children=function(e){return l.children(e)}:c=l.children("."+s.params.wrapperClass),E(s,{$el:l,el:e,$wrapperEl:c,wrapperEl:c[0],classNames:[],slides:m(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===s.params.direction},isVertical:function(){return"vertical"===s.params.direction},rtl:"rtl"===e.dir.toLowerCase()||"rtl"===l.css("direction"),rtlTranslate:"horizontal"===s.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===l.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:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEvents:(u=["touchstart","touchmove","touchend","touchcancel"],p=["mousedown","mousemove","mouseup"],s.support.pointerEvents&&(p=["pointerdown","pointermove","pointerup"]),s.touchEventsTouch={start:u[0],move:u[1],end:u[2],cancel:u[3]},s.touchEventsDesktop={start:p[0],move:p[1],end:p[2]},s.support.touch||!s.params.simulateTouch?s.touchEventsTouch:s.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, label",lastClickTime:_(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.useModules(),s.emit("_swiper"),s.params.init&&s.init(),s}}var i,n,r,a=t.prototype;return a.emitContainerClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-container")||0===t.indexOf(e.params.containerModifierClass)}));e.emit("_containerClasses",t.join(" "))}},a.emitSlidesClasses=function(){var e=this;e.params._emitClasses&&e.el&&e.slides.each((function(t){var i=t.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-slide")||0===t.indexOf(e.params.slideClass)}));e.emit("_slideClass",t,i.join(" "))}))},a.slidesPerViewDynamic=function(){var e=this,t=e.params,i=e.slides,n=e.slidesGrid,r=e.size,a=e.activeIndex,s=1;if(t.centeredSlides){for(var o,l=i[a].swiperSlideSize,d=a+1;d<i.length;d+=1)i[d]&&!o&&(s+=1,(l+=i[d].swiperSlideSize)>r&&(o=!0));for(var c=a-1;c>=0;c-=1)i[c]&&!o&&(s+=1,(l+=i[c].swiperSlideSize)>r&&(o=!0))}else for(var u=a+1;u<i.length;u+=1)n[u]-n[a]<r&&(s+=1);return s},a.update=function(){var e=this;if(e&&!e.destroyed){var t=e.snapGrid,i=e.params;i.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(n(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||n(),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function n(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},a.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this,n=i.params.direction;return e||(e="horizontal"===n?"vertical":"horizontal"),e===n||"horizontal"!==e&&"vertical"!==e||(i.$el.removeClass(""+i.params.containerModifierClass+n).addClass(""+i.params.containerModifierClass+e),i.emitContainerClasses(),i.params.direction=e,i.slides.each((function(t){"vertical"===e?t.style.width="":t.style.height=""})),i.emit("changeDirection"),t&&i.update()),i},a.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"))},a.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i,n=this,r=n.params,a=n.$el,s=n.$wrapperEl,o=n.slides;return void 0===n.params||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),a.removeAttr("style"),s.removeAttr("style"),o&&o.length&&o.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),n.emit("destroy"),Object.keys(n.eventsListeners).forEach((function(e){n.off(e)})),!1!==e&&(n.$el[0].swiper=null,i=n,Object.keys(i).forEach((function(e){try{i[e]=null}catch(e){}try{delete i[e]}catch(e){}}))),n.destroyed=!0),null},t.extendDefaults=function(e){E(V,e)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var i=e.name||Object.keys(t.prototype.modules).length+"_"+_();t.prototype.modules[i]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},i=t,r=[{key:"extendedDefaults",get:function(){return V}},{key:"defaults",get:function(){return B}}],(n=null)&&e(i.prototype,n),r&&e(i,r),t}();Object.keys(q).forEach((function(e){Object.keys(q[e]).forEach((function(t){W.prototype[t]=q[e][t]}))})),W.use([I,A]);var R={update:function(e){var t=this,i=t.params,n=i.slidesPerView,r=i.slidesPerGroup,a=i.centeredSlides,s=t.params.virtual,o=s.addSlidesBefore,l=s.addSlidesAfter,d=t.virtual,c=d.from,u=d.to,p=d.slides,h=d.slidesGrid,f=d.renderSlide,m=d.offset;t.updateActiveIndex();var g,v,y,b=t.activeIndex||0;g=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",a?(v=Math.floor(n/2)+r+l,y=Math.floor(n/2)+r+o):(v=n+(r-1)+l,y=r+o);var w=Math.max((b||0)-y,0),_=Math.min((b||0)+v,p.length-1),x=(t.slidesGrid[w]||0)-(t.slidesGrid[0]||0);function C(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(E(t.virtual,{from:w,to:_,offset:x,slidesGrid:t.slidesGrid}),c===w&&u===_&&!e)return t.slidesGrid!==h&&x!==m&&t.slides.css(g,x+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:x,from:w,to:_,slides:function(){for(var e=[],t=w;t<=_;t+=1)e.push(p[t]);return e}()}),void(t.params.virtual.renderExternalUpdate&&C());var S=[],T=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var k=c;k<=u;k+=1)(k<w||k>_)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+k+'"]').remove();for(var P=0;P<p.length;P+=1)P>=w&&P<=_&&(void 0===u||e?T.push(P):(P>u&&T.push(P),P<c&&S.push(P)));T.forEach((function(e){t.$wrapperEl.append(f(p[e],e))})),S.sort((function(e,t){return t-e})).forEach((function(e){t.$wrapperEl.prepend(f(p[e],e))})),t.$wrapperEl.children(".swiper-slide").css(g,x+"px"),C()},renderSlide:function(e,t){var i=this,n=i.params.virtual;if(n.cache&&i.virtual.cache[t])return i.virtual.cache[t];var r=n.renderSlide?m(n.renderSlide.call(i,e,t)):m('<div class="'+i.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return r.attr("data-swiper-slide-index")||r.attr("data-swiper-slide-index",t),n.cache&&(i.virtual.cache[t]=r),r},appendSlide:function(e){var t=this;if("object"==typeof e&&"length"in e)for(var i=0;i<e.length;i+=1)e[i]&&t.virtual.slides.push(e[i]);else t.virtual.slides.push(e);t.virtual.update(!0)},prependSlide:function(e){var t=this,i=t.activeIndex,n=i+1,r=1;if(Array.isArray(e)){for(var a=0;a<e.length;a+=1)e[a]&&t.virtual.slides.unshift(e[a]);n=i+e.length,r=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){var s=t.virtual.cache,o={};Object.keys(s).forEach((function(e){var t=s[e],i=t.attr("data-swiper-slide-index");i&&t.attr("data-swiper-slide-index",parseInt(i,10)+1),o[parseInt(e,10)+r]=t})),t.virtual.cache=o}t.virtual.update(!0),t.slideTo(n,0)},removeSlide:function(e){var t=this;if(null!=e){var i=t.activeIndex;if(Array.isArray(e))for(var n=e.length-1;n>=0;n-=1)t.virtual.slides.splice(e[n],1),t.params.virtual.cache&&delete t.virtual.cache[e[n]],e[n]<i&&(i-=1),i=Math.max(i,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<i&&(i-=1),i=Math.max(i,0);t.virtual.update(!0),t.slideTo(i,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},Y={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}},create:function(){S(this,{virtual:t(t({},R),{},{slides:this.params.virtual.slides,cache:{}})})},on:{beforeInit:function(e){if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};E(e.params,t),E(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(e){e.params.virtual.enabled&&e.virtual.update()}}},G={handle:function(e){var t=this,i=o(),n=a(),r=t.rtlTranslate,s=e;s.originalEvent&&(s=s.originalEvent);var l=s.keyCode||s.charCode,d=t.params.keyboard.pageUpDown,c=d&&33===l,u=d&&34===l,p=37===l,h=39===l,f=38===l,m=40===l;if(!t.allowSlideNext&&(t.isHorizontal()&&h||t.isVertical()&&m||u))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&p||t.isVertical()&&f||c))return!1;if(!(s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||n.activeElement&&n.activeElement.nodeName&&("input"===n.activeElement.nodeName.toLowerCase()||"textarea"===n.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(c||u||p||h||f||m)){var g=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var v=i.innerWidth,y=i.innerHeight,b=t.$el.offset();r&&(b.left-=t.$el[0].scrollLeft);for(var w=[[b.left,b.top],[b.left+t.width,b.top],[b.left,b.top+t.height],[b.left+t.width,b.top+t.height]],_=0;_<w.length;_+=1){var x=w[_];x[0]>=0&&x[0]<=v&&x[1]>=0&&x[1]<=y&&(g=!0)}if(!g)return}t.isHorizontal()?((c||u||p||h)&&(s.preventDefault?s.preventDefault():s.returnValue=!1),((u||h)&&!r||(c||p)&&r)&&t.slideNext(),((c||p)&&!r||(u||h)&&r)&&t.slidePrev()):((c||u||f||m)&&(s.preventDefault?s.preventDefault():s.returnValue=!1),(u||m)&&t.slideNext(),(c||f)&&t.slidePrev()),t.emit("keyPress",l)}},enable:function(){var e=this,t=a();e.keyboard.enabled||(m(t).on("keydown",e.keyboard.handle),e.keyboard.enabled=!0)},disable:function(){var e=this,t=a();e.keyboard.enabled&&(m(t).off("keydown",e.keyboard.handle),e.keyboard.enabled=!1)}},X={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){S(this,{keyboard:t({enabled:!1},G)})},on:{init:function(e){e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(e){e.keyboard.enabled&&e.keyboard.disable()}}};var U={lastScrollTime:_(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return o().navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e=a(),t="onwheel",i=t in e;if(!i){var n=e.createElement("div");n.setAttribute(t,"return;"),i="function"==typeof n[t]}return!i&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(i=e.implementation.hasFeature("Events.wheel","3.0")),i}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,n=0,r=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),n=10*t,r=10*i,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(n=e.deltaX),e.shiftKey&&!n&&(n=r,r=0),(n||r)&&e.deltaMode&&(1===e.deltaMode?(n*=40,r*=40):(n*=800,r*=800)),n&&!t&&(t=n<1?-1:1),r&&!i&&(i=r<1?-1:1),{spinX:t,spinY:i,pixelX:n,pixelY:r}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,i=this,n=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var r=i.$el;if("container"!==i.params.mousewheel.eventsTarget&&(r=m(i.params.mousewheel.eventsTarget)),!i.mouseEntered&&!r[0].contains(t.target)&&!n.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var a=0,s=i.rtlTranslate?-1:1,o=U.normalize(t);if(n.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(o.pixelX)>Math.abs(o.pixelY)))return!0;a=-o.pixelX*s}else{if(!(Math.abs(o.pixelY)>Math.abs(o.pixelX)))return!0;a=-o.pixelY}else a=Math.abs(o.pixelX)>Math.abs(o.pixelY)?-o.pixelX*s:-o.pixelY;if(0===a)return!0;if(n.invert&&(a=-a),i.params.freeMode){var l={time:_(),delta:Math.abs(a),direction:Math.sign(a)},d=i.mousewheel.lastEventBeforeSnap,c=d&&l.time<d.time+500&&l.delta<=d.delta&&l.direction===d.direction;if(!c){i.mousewheel.lastEventBeforeSnap=void 0,i.params.loop&&i.loopFix();var u=i.getTranslate()+a*n.sensitivity,p=i.isBeginning,h=i.isEnd;if(u>=i.minTranslate()&&(u=i.minTranslate()),u<=i.maxTranslate()&&(u=i.maxTranslate()),i.setTransition(0),i.setTranslate(u),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!p&&i.isBeginning||!h&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var f=i.mousewheel.recentWheelEvents;f.length>=15&&f.shift();var g=f.length?f[f.length-1]:void 0,v=f[0];if(f.push(l),g&&(l.delta>g.delta||l.direction!==g.direction))f.splice(0);else if(f.length>=15&&l.time-v.time<500&&v.delta-l.delta>=1&&l.delta<=6){var y=a>0?.8:.2;i.mousewheel.lastEventBeforeSnap=l,f.splice(0),i.mousewheel.timeout=w((function(){i.slideToClosest(i.params.speed,!0,void 0,y)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=w((function(){i.mousewheel.lastEventBeforeSnap=l,f.splice(0),i.slideToClosest(i.params.speed,!0,void 0,.5)}),500))}if(c||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),u===i.minTranslate()||u===i.maxTranslate())return!0}}else{var b={time:_(),delta:Math.abs(a),direction:Math.sign(a),raw:e},x=i.mousewheel.recentWheelEvents;x.length>=2&&x.shift();var C=x.length?x[x.length-1]:void 0;if(x.push(b),C?(b.direction!==C.direction||b.delta>C.delta||b.time>C.time+150)&&i.mousewheel.animateSlider(b):i.mousewheel.animateSlider(b),i.mousewheel.releaseScroll(b))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){var t=this,i=o();return!(this.params.mousewheel.thresholdDelta&&e.delta<this.params.mousewheel.thresholdDelta||this.params.mousewheel.thresholdTime&&_()-t.mousewheel.lastScrollTime<this.params.mousewheel.thresholdTime||!(e.delta>=6&&_()-t.mousewheel.lastScrollTime<60)&&(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),t.emit("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),t.emit("scroll",e.raw)),t.mousewheel.lastScrollTime=(new i.Date).getTime(),1))},releaseScroll:function(e){var t=this,i=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&i.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&i.releaseOnEdges)return!0;return!1},enable:function(){var e=this,t=U.event();if(e.params.cssMode)return e.wrapperEl.removeEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(i=m(e.params.mousewheel.eventsTarget)),i.on("mouseenter",e.mousewheel.handleMouseEnter),i.on("mouseleave",e.mousewheel.handleMouseLeave),i.on(t,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable:function(){var e=this,t=U.event();if(e.params.cssMode)return e.wrapperEl.addEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(!e.mousewheel.enabled)return!1;var i=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(i=m(e.params.mousewheel.eventsTarget)),i.off(t,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}},Q={update:function(){var e=this,t=e.params.navigation;if(!e.params.loop){var i=e.navigation,n=i.$nextEl,r=i.$prevEl;r&&r.length>0&&(e.isBeginning?r.addClass(t.disabledClass):r.removeClass(t.disabledClass),r[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),n&&n.length>0&&(e.isEnd?n.addClass(t.disabledClass):n.removeClass(t.disabledClass),n[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){var t=this;e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()},onNextClick:function(e){var t=this;e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()},init:function(){var e,t,i=this,n=i.params.navigation;(n.nextEl||n.prevEl)&&(n.nextEl&&(e=m(n.nextEl),i.params.uniqueNavElements&&"string"==typeof n.nextEl&&e.length>1&&1===i.$el.find(n.nextEl).length&&(e=i.$el.find(n.nextEl))),n.prevEl&&(t=m(n.prevEl),i.params.uniqueNavElements&&"string"==typeof n.prevEl&&t.length>1&&1===i.$el.find(n.prevEl).length&&(t=i.$el.find(n.prevEl))),e&&e.length>0&&e.on("click",i.navigation.onNextClick),t&&t.length>0&&t.on("click",i.navigation.onPrevClick),E(i.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this,t=e.navigation,i=t.$nextEl,n=t.$prevEl;i&&i.length&&(i.off("click",e.navigation.onNextClick),i.removeClass(e.params.navigation.disabledClass)),n&&n.length&&(n.off("click",e.navigation.onPrevClick),n.removeClass(e.params.navigation.disabledClass))}},K={update:function(){var e=this,t=e.rtl,i=e.params.pagination;if(i.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var n,r=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,a=e.pagination.$el,s=e.params.loop?Math.ceil((r-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((n=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>r-1-2*e.loopedSlides&&(n-=r-2*e.loopedSlides),n>s-1&&(n-=s),n<0&&"bullets"!==e.params.paginationType&&(n=s+n)):n=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===i.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var o,l,d,c=e.pagination.bullets;if(i.dynamicBullets&&(e.pagination.bulletSize=c.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(i.dynamicMainBullets+4)+"px"),i.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=n-e.previousIndex,e.pagination.dynamicBulletIndex>i.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=i.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),o=n-e.pagination.dynamicBulletIndex,d=((l=o+(Math.min(c.length,i.dynamicMainBullets)-1))+o)/2),c.removeClass(i.bulletActiveClass+" "+i.bulletActiveClass+"-next "+i.bulletActiveClass+"-next-next "+i.bulletActiveClass+"-prev "+i.bulletActiveClass+"-prev-prev "+i.bulletActiveClass+"-main"),a.length>1)c.each((function(e){var t=m(e),r=t.index();r===n&&t.addClass(i.bulletActiveClass),i.dynamicBullets&&(r>=o&&r<=l&&t.addClass(i.bulletActiveClass+"-main"),r===o&&t.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),r===l&&t.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next"))}));else{var u=c.eq(n),p=u.index();if(u.addClass(i.bulletActiveClass),i.dynamicBullets){for(var h=c.eq(o),f=c.eq(l),g=o;g<=l;g+=1)c.eq(g).addClass(i.bulletActiveClass+"-main");if(e.params.loop)if(p>=c.length-i.dynamicMainBullets){for(var v=i.dynamicMainBullets;v>=0;v-=1)c.eq(c.length-v).addClass(i.bulletActiveClass+"-main");c.eq(c.length-i.dynamicMainBullets-1).addClass(i.bulletActiveClass+"-prev")}else h.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),f.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next");else h.prev().addClass(i.bulletActiveClass+"-prev").prev().addClass(i.bulletActiveClass+"-prev-prev"),f.next().addClass(i.bulletActiveClass+"-next").next().addClass(i.bulletActiveClass+"-next-next")}}if(i.dynamicBullets){var y=Math.min(c.length,i.dynamicMainBullets+4),b=(e.pagination.bulletSize*y-e.pagination.bulletSize)/2-d*e.pagination.bulletSize,w=t?"right":"left";c.css(e.isHorizontal()?w:"top",b+"px")}}if("fraction"===i.type&&(a.find("."+i.currentClass).text(i.formatFractionCurrent(n+1)),a.find("."+i.totalClass).text(i.formatFractionTotal(s))),"progressbar"===i.type){var _;_=i.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var x=(n+1)/s,C=1,E=1;"horizontal"===_?C=x:E=x,a.find("."+i.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+C+") scaleY("+E+")").transition(e.params.speed)}"custom"===i.type&&i.renderCustom?(a.html(i.renderCustom(e,n+1,s)),e.emit("paginationRender",a[0])):e.emit("paginationUpdate",a[0]),a[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](i.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 i=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,n=e.pagination.$el,r="";if("bullets"===t.type){for(var a=e.params.loop?Math.ceil((i-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length,s=0;s<a;s+=1)t.renderBullet?r+=t.renderBullet.call(e,s,t.bulletClass):r+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";n.html(r),e.pagination.bullets=n.find("."+t.bulletClass)}"fraction"===t.type&&(r=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',n.html(r)),"progressbar"===t.type&&(r=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',n.html(r)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=m(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,(function(t){t.preventDefault();var i=m(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),E(e.pagination,{$el:i,el:i[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 i=e.pagination.$el;i.removeClass(t.hiddenClass),i.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&i.off("click","."+t.bulletClass)}}},Z={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=e.rtlTranslate,n=e.progress,r=t.dragSize,a=t.trackSize,s=t.$dragEl,o=t.$el,l=e.params.scrollbar,d=r,c=(a-r)*n;i?(c=-c)>0?(d=r-c,c=0):-c+r>a&&(d=a+c):c<0?(d=r+c,c=0):c+r>a&&(d=a-c),e.isHorizontal()?(s.transform("translate3d("+c+"px, 0, 0)"),s[0].style.width=d+"px"):(s.transform("translate3d(0px, "+c+"px, 0)"),s[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){var t=this;t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,i=t.$dragEl,n=t.$el;i[0].style.width="",i[0].style.height="";var r,a=e.isHorizontal()?n[0].offsetWidth:n[0].offsetHeight,s=e.size/e.virtualSize,o=s*(a/e.size);r="auto"===e.params.scrollbar.dragSize?a*s:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?i[0].style.width=r+"px":i[0].style.height=r+"px",n[0].style.display=s>=1?"none":"",e.params.scrollbar.hide&&(n[0].style.opacity=0),E(t,{trackSize:a,divider:s,moveDivider:o,dragSize:r}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this,n=i.scrollbar,r=i.rtlTranslate,a=n.$el,s=n.dragSize,o=n.trackSize,l=n.dragStartPos;t=(n.getPointerPosition(e)-a.offset()[i.isHorizontal()?"left":"top"]-(null!==l?l:s/2))/(o-s),t=Math.max(Math.min(t,1),0),r&&(t=1-t);var d=i.minTranslate()+(i.maxTranslate()-i.minTranslate())*t;i.updateProgress(d),i.setTranslate(d),i.updateActiveIndex(),i.updateSlidesClasses()},onDragStart:function(e){var t=this,i=t.params.scrollbar,n=t.scrollbar,r=t.$wrapperEl,a=n.$el,s=n.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===s[0]||e.target===s?n.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),r.transition(100),s.transition(100),n.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),a.transition(0),i.hide&&a.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this,i=t.scrollbar,n=t.$wrapperEl,r=i.$el,a=i.$dragEl;t.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,i.setDragPosition(e),n.transition(0),r.transition(0),a.transition(0),t.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,i=t.params.scrollbar,n=t.scrollbar,r=t.$wrapperEl,a=n.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),r.transition("")),i.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=w((function(){a.css("opacity",0),a.transition(400)}),1e3)),t.emit("scrollbarDragEnd",e),i.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=a(),i=e.scrollbar,n=e.touchEventsTouch,r=e.touchEventsDesktop,s=e.params,o=e.support,l=i.$el[0],d=!(!o.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},c=!(!o.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};o.touch?(l.addEventListener(n.start,e.scrollbar.onDragStart,d),l.addEventListener(n.move,e.scrollbar.onDragMove,d),l.addEventListener(n.end,e.scrollbar.onDragEnd,c)):(l.addEventListener(r.start,e.scrollbar.onDragStart,d),t.addEventListener(r.move,e.scrollbar.onDragMove,d),t.addEventListener(r.end,e.scrollbar.onDragEnd,c))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=a(),i=e.scrollbar,n=e.touchEventsTouch,r=e.touchEventsDesktop,s=e.params,o=e.support,l=i.$el[0],d=!(!o.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},c=!(!o.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};o.touch?(l.removeEventListener(n.start,e.scrollbar.onDragStart,d),l.removeEventListener(n.move,e.scrollbar.onDragMove,d),l.removeEventListener(n.end,e.scrollbar.onDragEnd,c)):(l.removeEventListener(r.start,e.scrollbar.onDragStart,d),t.removeEventListener(r.move,e.scrollbar.onDragMove,d),t.removeEventListener(r.end,e.scrollbar.onDragEnd,c))}},init:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,i=e.$el,n=e.params.scrollbar,r=m(n.el);e.params.uniqueNavElements&&"string"==typeof n.el&&r.length>1&&1===i.find(n.el).length&&(r=i.find(n.el));var a=r.find("."+e.params.scrollbar.dragClass);0===a.length&&(a=m('<div class="'+e.params.scrollbar.dragClass+'"></div>'),r.append(a)),E(t,{$el:r,el:r[0],$dragEl:a,dragEl:a[0]}),n.draggable&&t.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},J={setTransform:function(e,t){var i=this.rtl,n=m(e),r=i?-1:1,a=n.attr("data-swiper-parallax")||"0",s=n.attr("data-swiper-parallax-x"),o=n.attr("data-swiper-parallax-y"),l=n.attr("data-swiper-parallax-scale"),d=n.attr("data-swiper-parallax-opacity");if(s||o?(s=s||"0",o=o||"0"):this.isHorizontal()?(s=a,o="0"):(o=a,s="0"),s=s.indexOf("%")>=0?parseInt(s,10)*t*r+"%":s*t*r+"px",o=o.indexOf("%")>=0?parseInt(o,10)*t+"%":o*t+"px",null!=d){var c=d-(d-1)*(1-Math.abs(t));n[0].style.opacity=c}if(null==l)n.transform("translate3d("+s+", "+o+", 0px)");else{var u=l-(l-1)*(1-Math.abs(t));n.transform("translate3d("+s+", "+o+", 0px) scale("+u+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,n=e.progress,r=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,n)})),i.each((function(t,i){var a=t.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(a+=Math.ceil(i/2)-n*(r.length-1)),a=Math.min(Math.max(a,-1),1),m(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,a)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed),this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){var i=m(t),n=parseInt(i.attr("data-swiper-parallax-duration"),10)||e;0===e&&(n=0),i.transition(n)}))}},ee={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,n=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(n-t,2)+Math.pow(r-i,2))},onGestureStart:function(e){var t=this,i=t.support,n=t.params.zoom,r=t.zoom,a=r.gesture;if(r.fakeGestureTouched=!1,r.fakeGestureMoved=!1,!i.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;r.fakeGestureTouched=!0,a.scaleStart=ee.getDistanceBetweenTouches(e)}a.$slideEl&&a.$slideEl.length||(a.$slideEl=m(e.target).closest("."+t.params.slideClass),0===a.$slideEl.length&&(a.$slideEl=t.slides.eq(t.activeIndex)),a.$imageEl=a.$slideEl.find("img, svg, canvas, .swiper-zoom-target").eq(0),a.$imageWrapEl=a.$imageEl.parent("."+n.containerClass),a.maxRatio=a.$imageWrapEl.attr("data-swiper-zoom")||n.maxRatio,0!==a.$imageWrapEl.length)?(a.$imageEl&&a.$imageEl.transition(0),t.zoom.isScaling=!0):a.$imageEl=void 0},onGestureChange:function(e){var t=this,i=t.support,n=t.params.zoom,r=t.zoom,a=r.gesture;if(!i.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;r.fakeGestureMoved=!0,a.scaleMove=ee.getDistanceBetweenTouches(e)}a.$imageEl&&0!==a.$imageEl.length?(i.gestures?r.scale=e.scale*r.currentScale:r.scale=a.scaleMove/a.scaleStart*r.currentScale,r.scale>a.maxRatio&&(r.scale=a.maxRatio-1+Math.pow(r.scale-a.maxRatio+1,.5)),r.scale<n.minRatio&&(r.scale=n.minRatio+1-Math.pow(n.minRatio-r.scale+1,.5)),a.$imageEl.transform("translate3d(0,0,0) scale("+r.scale+")")):"gesturechange"===e.type&&r.onGestureStart(e)},onGestureEnd:function(e){var t=this,i=t.device,n=t.support,r=t.params.zoom,a=t.zoom,s=a.gesture;if(!n.gestures){if(!a.fakeGestureTouched||!a.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!i.android)return;a.fakeGestureTouched=!1,a.fakeGestureMoved=!1}s.$imageEl&&0!==s.$imageEl.length&&(a.scale=Math.max(Math.min(a.scale,s.maxRatio),r.minRatio),s.$imageEl.transition(t.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(s.$slideEl=void 0))},onTouchStart:function(e){var t=this.device,i=this.zoom,n=i.gesture,r=i.image;n.$imageEl&&0!==n.$imageEl.length&&(r.isTouched||(t.android&&e.cancelable&&e.preventDefault(),r.isTouched=!0,r.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,r.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,i=t.zoom,n=i.gesture,r=i.image,a=i.velocity;if(n.$imageEl&&0!==n.$imageEl.length&&(t.allowClick=!1,r.isTouched&&n.$slideEl)){r.isMoved||(r.width=n.$imageEl[0].offsetWidth,r.height=n.$imageEl[0].offsetHeight,r.startX=x(n.$imageWrapEl[0],"x")||0,r.startY=x(n.$imageWrapEl[0],"y")||0,n.slideWidth=n.$slideEl[0].offsetWidth,n.slideHeight=n.$slideEl[0].offsetHeight,n.$imageWrapEl.transition(0),t.rtl&&(r.startX=-r.startX,r.startY=-r.startY));var s=r.width*i.scale,o=r.height*i.scale;if(!(s<n.slideWidth&&o<n.slideHeight)){if(r.minX=Math.min(n.slideWidth/2-s/2,0),r.maxX=-r.minX,r.minY=Math.min(n.slideHeight/2-o/2,0),r.maxY=-r.minY,r.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,r.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!r.isMoved&&!i.isScaling){if(t.isHorizontal()&&(Math.floor(r.minX)===Math.floor(r.startX)&&r.touchesCurrent.x<r.touchesStart.x||Math.floor(r.maxX)===Math.floor(r.startX)&&r.touchesCurrent.x>r.touchesStart.x))return void(r.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(r.minY)===Math.floor(r.startY)&&r.touchesCurrent.y<r.touchesStart.y||Math.floor(r.maxY)===Math.floor(r.startY)&&r.touchesCurrent.y>r.touchesStart.y))return void(r.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),r.isMoved=!0,r.currentX=r.touchesCurrent.x-r.touchesStart.x+r.startX,r.currentY=r.touchesCurrent.y-r.touchesStart.y+r.startY,r.currentX<r.minX&&(r.currentX=r.minX+1-Math.pow(r.minX-r.currentX+1,.8)),r.currentX>r.maxX&&(r.currentX=r.maxX-1+Math.pow(r.currentX-r.maxX+1,.8)),r.currentY<r.minY&&(r.currentY=r.minY+1-Math.pow(r.minY-r.currentY+1,.8)),r.currentY>r.maxY&&(r.currentY=r.maxY-1+Math.pow(r.currentY-r.maxY+1,.8)),a.prevPositionX||(a.prevPositionX=r.touchesCurrent.x),a.prevPositionY||(a.prevPositionY=r.touchesCurrent.y),a.prevTime||(a.prevTime=Date.now()),a.x=(r.touchesCurrent.x-a.prevPositionX)/(Date.now()-a.prevTime)/2,a.y=(r.touchesCurrent.y-a.prevPositionY)/(Date.now()-a.prevTime)/2,Math.abs(r.touchesCurrent.x-a.prevPositionX)<2&&(a.x=0),Math.abs(r.touchesCurrent.y-a.prevPositionY)<2&&(a.y=0),a.prevPositionX=r.touchesCurrent.x,a.prevPositionY=r.touchesCurrent.y,a.prevTime=Date.now(),n.$imageWrapEl.transform("translate3d("+r.currentX+"px, "+r.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,i=e.image,n=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!i.isTouched||!i.isMoved)return i.isTouched=!1,void(i.isMoved=!1);i.isTouched=!1,i.isMoved=!1;var r=300,a=300,s=n.x*r,o=i.currentX+s,l=n.y*a,d=i.currentY+l;0!==n.x&&(r=Math.abs((o-i.currentX)/n.x)),0!==n.y&&(a=Math.abs((d-i.currentY)/n.y));var c=Math.max(r,a);i.currentX=o,i.currentY=d;var u=i.width*e.scale,p=i.height*e.scale;i.minX=Math.min(t.slideWidth/2-u/2,0),i.maxX=-i.minX,i.minY=Math.min(t.slideHeight/2-p/2,0),i.maxY=-i.minY,i.currentX=Math.max(Math.min(i.currentX,i.maxX),i.minX),i.currentY=Math.max(Math.min(i.currentY,i.maxY),i.minY),t.$imageWrapEl.transition(c).transform("translate3d("+i.currentX+"px, "+i.currentY+"px,0)")}},onTransitionEnd:function(){var e=this,t=e.zoom,i=t.gesture;i.$slideEl&&e.previousIndex!==e.activeIndex&&(i.$imageEl&&i.$imageEl.transform("translate3d(0,0,0) scale(1)"),i.$imageWrapEl&&i.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,t.currentScale=1,i.$slideEl=void 0,i.$imageEl=void 0,i.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,n,r,a,s,o,l,d,c,u,p,h,f,m,g,v=this,y=v.zoom,b=v.params.zoom,w=y.gesture,_=y.image;w.$slideEl||(v.params.virtual&&v.params.virtual.enabled&&v.virtual?w.$slideEl=v.$wrapperEl.children("."+v.params.slideActiveClass):w.$slideEl=v.slides.eq(v.activeIndex),w.$imageEl=w.$slideEl.find("img, svg, canvas, .swiper-zoom-target").eq(0),w.$imageWrapEl=w.$imageEl.parent("."+b.containerClass)),w.$imageEl&&0!==w.$imageEl.length&&(w.$slideEl.addClass(""+b.zoomedSlideClass),void 0===_.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=_.touchesStart.x,i=_.touchesStart.y),y.scale=w.$imageWrapEl.attr("data-swiper-zoom")||b.maxRatio,y.currentScale=w.$imageWrapEl.attr("data-swiper-zoom")||b.maxRatio,e?(m=w.$slideEl[0].offsetWidth,g=w.$slideEl[0].offsetHeight,n=w.$slideEl.offset().left+m/2-t,r=w.$slideEl.offset().top+g/2-i,o=w.$imageEl[0].offsetWidth,l=w.$imageEl[0].offsetHeight,d=o*y.scale,c=l*y.scale,h=-(u=Math.min(m/2-d/2,0)),f=-(p=Math.min(g/2-c/2,0)),(a=n*y.scale)<u&&(a=u),a>h&&(a=h),(s=r*y.scale)<p&&(s=p),s>f&&(s=f)):(a=0,s=0),w.$imageWrapEl.transition(300).transform("translate3d("+a+"px, "+s+"px,0)"),w.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+y.scale+")"))},out:function(){var e=this,t=e.zoom,i=e.params.zoom,n=t.gesture;n.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?n.$slideEl=e.$wrapperEl.children("."+e.params.slideActiveClass):n.$slideEl=e.slides.eq(e.activeIndex),n.$imageEl=n.$slideEl.find("img, svg, canvas, .swiper-zoom-target").eq(0),n.$imageWrapEl=n.$imageEl.parent("."+i.containerClass)),n.$imageEl&&0!==n.$imageEl.length&&(t.scale=1,t.currentScale=1,n.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),n.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),n.$slideEl.removeClass(""+i.zoomedSlideClass),n.$slideEl=void 0)},toggleGestures:function(e){var t=this,i=t.zoom,n=i.slideSelector,r=i.passiveListener;t.$wrapperEl[e]("gesturestart",n,i.onGestureStart,r),t.$wrapperEl[e]("gesturechange",n,i.onGestureChange,r),t.$wrapperEl[e]("gestureend",n,i.onGestureEnd,r)},enableGestures:function(){this.zoom.gesturesEnabled||(this.zoom.gesturesEnabled=!0,this.zoom.toggleGestures("on"))},disableGestures:function(){this.zoom.gesturesEnabled&&(this.zoom.gesturesEnabled=!1,this.zoom.toggleGestures("off"))},enable:function(){var e=this,t=e.support,i=e.zoom;if(!i.enabled){i.enabled=!0;var n=!("touchstart"!==e.touchEvents.start||!t.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!t.passiveListener||{passive:!1,capture:!0},a="."+e.params.slideClass;e.zoom.passiveListener=n,e.zoom.slideSelector=a,t.gestures?(e.$wrapperEl.on(e.touchEvents.start,e.zoom.enableGestures,n),e.$wrapperEl.on(e.touchEvents.end,e.zoom.disableGestures,n)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,a,i.onGestureStart,n),e.$wrapperEl.on(e.touchEvents.move,a,i.onGestureChange,r),e.$wrapperEl.on(e.touchEvents.end,a,i.onGestureEnd,n),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,a,i.onGestureEnd,n)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,i.onTouchMove,r)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){var i=e.support;e.zoom.enabled=!1;var n=!("touchstart"!==e.touchEvents.start||!i.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},r=!i.passiveListener||{passive:!1,capture:!0},a="."+e.params.slideClass;i.gestures?(e.$wrapperEl.off(e.touchEvents.start,e.zoom.enableGestures,n),e.$wrapperEl.off(e.touchEvents.end,e.zoom.disableGestures,n)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,a,t.onGestureStart,n),e.$wrapperEl.off(e.touchEvents.move,a,t.onGestureChange,r),e.$wrapperEl.off(e.touchEvents.end,a,t.onGestureEnd,n),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,a,t.onGestureEnd,n)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,r)}}},te={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,n=i.params.lazy;if(void 0!==e&&0!==i.slides.length){var r=i.virtual&&i.params.virtual.enabled?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),a=r.find("."+n.elementClass+":not(."+n.loadedClass+"):not(."+n.loadingClass+")");!r.hasClass(n.elementClass)||r.hasClass(n.loadedClass)||r.hasClass(n.loadingClass)||a.push(r[0]),0!==a.length&&a.each((function(e){var a=m(e);a.addClass(n.loadingClass);var s=a.attr("data-background"),o=a.attr("data-src"),l=a.attr("data-srcset"),d=a.attr("data-sizes"),c=a.parent("picture");i.loadImage(a[0],o||s,l,d,!1,(function(){if(null!=i&&i&&(!i||i.params)&&!i.destroyed){if(s?(a.css("background-image",'url("'+s+'")'),a.removeAttr("data-background")):(l&&(a.attr("srcset",l),a.removeAttr("data-srcset")),d&&(a.attr("sizes",d),a.removeAttr("data-sizes")),c.length&&c.children("source").each((function(e){var t=m(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))})),o&&(a.attr("src",o),a.removeAttr("data-src"))),a.addClass(n.loadedClass).removeClass(n.loadingClass),r.find("."+n.preloaderClass).remove(),i.params.loop&&t){var e=r.attr("data-swiper-slide-index");if(r.hasClass(i.params.slideDuplicateClass)){var u=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(u.index(),!1)}else{var p=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(p.index(),!1)}}i.emit("lazyImageReady",r[0],a[0]),i.params.autoHeight&&i.updateAutoHeight()}})),i.emit("lazyImageLoad",r[0],a[0])}))}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,n=e.slides,r=e.activeIndex,a=e.virtual&&i.virtual.enabled,s=i.lazy,o=i.slidesPerView;function l(e){if(a){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(n[e])return!0;return!1}function d(e){return a?m(e).attr("data-swiper-slide-index"):m(e).index()}if("auto"===o&&(o=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each((function(t){var i=a?m(t).attr("data-swiper-slide-index"):m(t).index();e.lazy.loadInSlide(i)}));else if(o>1)for(var c=r;c<r+o;c+=1)l(c)&&e.lazy.loadInSlide(c);else e.lazy.loadInSlide(r);if(s.loadPrevNext)if(o>1||s.loadPrevNextAmount&&s.loadPrevNextAmount>1){for(var u=s.loadPrevNextAmount,p=o,h=Math.min(r+p+Math.max(u,p),n.length),f=Math.max(r-Math.max(p,u),0),g=r+o;g<h;g+=1)l(g)&&e.lazy.loadInSlide(g);for(var v=f;v<r;v+=1)l(v)&&e.lazy.loadInSlide(v)}else{var y=t.children("."+i.slideNextClass);y.length>0&&e.lazy.loadInSlide(d(y));var b=t.children("."+i.slidePrevClass);b.length>0&&e.lazy.loadInSlide(d(b))}}},ie={LinearSpline:function(e,t){var i,n,r,a,s;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(s=function(e,t){for(n=-1,i=e.length;i-n>1;)e[r=i+n>>1]<=t?n=r:i=r;return i}(this.x,e),a=s-1,(e-this.x[a])*(this.y[s]-this.y[a])/(this.x[s]-this.x[a])+this.y[a]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new ie.LinearSpline(t.slidesGrid,e.slidesGrid):new ie.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,n,r=this,a=r.controller.control,s=r.constructor;function o(e){var t=r.rtlTranslate?-r.translate:r.translate;"slide"===r.params.controller.by&&(r.controller.getInterpolateFunction(e),n=-r.controller.spline.interpolate(-t)),n&&"container"!==r.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(r.maxTranslate()-r.minTranslate()),n=(t-r.minTranslate())*i+e.minTranslate()),r.params.controller.inverse&&(n=e.maxTranslate()-n),e.updateProgress(n),e.setTranslate(n,r),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(a))for(var l=0;l<a.length;l+=1)a[l]!==t&&a[l]instanceof s&&o(a[l]);else a instanceof s&&t!==a&&o(a)},setTransition:function(e,t){var i,n=this,r=n.constructor,a=n.controller.control;function s(t){t.setTransition(e,n),0!==e&&(t.transitionStart(),t.params.autoHeight&&w((function(){t.updateAutoHeight()})),t.$wrapperEl.transitionEnd((function(){a&&(t.params.loop&&"slide"===n.params.controller.by&&t.loopFix(),t.transitionEnd())})))}if(Array.isArray(a))for(i=0;i<a.length;i+=1)a[i]!==t&&a[i]instanceof r&&s(a[i]);else a instanceof r&&t!==a&&s(a)}},ne={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),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,i=t.params.a11y;if(13===e.keyCode){var n=m(e.target);t.navigation&&t.navigation.$nextEl&&n.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(i.lastSlideMessage):t.a11y.notify(i.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&n.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(i.firstSlideMessage):t.a11y.notify(i.prevSlideMessage)),t.pagination&&n.is("."+t.params.pagination.bulletClass)&&n[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&&e.navigation){var t=e.navigation,i=t.$nextEl,n=t.$prevEl;n&&n.length>0&&(e.isBeginning?(e.a11y.disableEl(n),e.a11y.makeElNotFocusable(n)):(e.a11y.enableEl(n),e.a11y.makeElFocusable(n))),i&&i.length>0&&(e.isEnd?(e.a11y.disableEl(i),e.a11y.makeElNotFocusable(i)):(e.a11y.enableEl(i),e.a11y.makeElFocusable(i)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i){var n=m(i);e.a11y.makeElFocusable(n),e.params.pagination.renderBullet||(e.a11y.addElRole(n,"button"),e.a11y.addElLabel(n,t.paginationBulletMessage.replace(/\{\{index\}\}/,n.index()+1)))}))},init:function(){var e=this;e.$el.append(e.a11y.liveRegion);var t,i,n=e.params.a11y;e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(i=e.navigation.$prevEl),t&&(e.a11y.makeElFocusable(t),e.a11y.addElRole(t,"button"),e.a11y.addElLabel(t,n.nextSlideMessage),t.on("keydown",e.a11y.onEnterKey)),i&&(e.a11y.makeElFocusable(i),e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,n.prevSlideMessage),i.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,i=this;i.a11y.liveRegion&&i.a11y.liveRegion.length>0&&i.a11y.liveRegion.remove(),i.navigation&&i.navigation.$nextEl&&(e=i.navigation.$nextEl),i.navigation&&i.navigation.$prevEl&&(t=i.navigation.$prevEl),e&&e.off("keydown",i.a11y.onEnterKey),t&&t.off("keydown",i.a11y.onEnterKey),i.pagination&&i.params.pagination.clickable&&i.pagination.bullets&&i.pagination.bullets.length&&i.pagination.$el.off("keydown","."+i.params.pagination.bulletClass,i.a11y.onEnterKey)}},re={init:function(){var e=this,t=o();if(e.params.history){if(!t.history||!t.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var i=e.history;i.initialized=!0,i.paths=re.getPathValues(e.params.url),(i.paths.key||i.paths.value)&&(i.scrollToSlide(0,i.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){var e=o();this.params.history.replaceState||e.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){var e=this;e.history.paths=re.getPathValues(e.params.url),e.history.scrollToSlide(e.params.speed,e.history.paths.value,!1)},getPathValues:function(e){var t=o(),i=(e?new URL(e):t.location).pathname.slice(1).split("/").filter((function(e){return""!==e})),n=i.length;return{key:i[n-2],value:i[n-1]}},setHistory:function(e,t){var i=this,n=o();if(i.history.initialized&&i.params.history.enabled){var r;r=i.params.url?new URL(i.params.url):n.location;var a=i.slides.eq(t),s=re.slugify(a.attr("data-history"));r.pathname.includes(e)||(s=e+"/"+s);var l=n.history.state;l&&l.value===s||(i.params.history.replaceState?n.history.replaceState({value:s},null,s):n.history.pushState({value:s},null,s))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){var n=this;if(t)for(var r=0,a=n.slides.length;r<a;r+=1){var s=n.slides.eq(r);if(re.slugify(s.attr("data-history"))===t&&!s.hasClass(n.params.slideDuplicateClass)){var o=s.index();n.slideTo(o,e,i)}}else n.slideTo(0,e,i)}},ae={onHashCange:function(){var e=this,t=a();e.emit("hashChange");var i=t.location.hash.replace("#","");if(i!==e.slides.eq(e.activeIndex).attr("data-hash")){var n=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+i+'"]').index();if(void 0===n)return;e.slideTo(n)}},setHash:function(){var e=this,t=o(),i=a();if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&t.history&&t.history.replaceState)t.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||0),e.emit("hashSet");else{var n=e.slides.eq(e.activeIndex),r=n.attr("data-hash")||n.attr("data-history");i.location.hash=r||"",e.emit("hashSet")}},init:function(){var e=this,t=a(),i=o();if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var n=t.location.hash.replace("#","");if(n)for(var r=0,s=e.slides.length;r<s;r+=1){var l=e.slides.eq(r);if((l.attr("data-hash")||l.attr("data-history"))===n&&!l.hasClass(e.params.slideDuplicateClass)){var d=l.index();e.slideTo(d,0,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&m(i).on("hashchange",e.hashNavigation.onHashCange)}},destroy:function(){var e=o();this.params.hashNavigation.watchState&&m(e).off("hashchange",this.hashNavigation.onHashCange)}},se={run:function(){var e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=w((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")),e.params.cssMode&&e.autoplay.running&&e.autoplay.run()}),i)},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?["transitionend","webkitTransitionEnd"].forEach((function(e){t.$wrapperEl[0].addEventListener(e,t.autoplay.onTransitionEnd)})):(t.autoplay.paused=!1,t.autoplay.run())))},onVisibilityChange:function(){var e=this,t=a();"hidden"===t.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===t.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(e){var t=this;t&&!t.destroyed&&t.$wrapperEl&&e.target===t.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach((function(e){t.$wrapperEl[0].removeEventListener(e,t.autoplay.onTransitionEnd)})),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())},onMouseEnter:function(){var e=this;e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause(),["transitionend","webkitTransitionEnd"].forEach((function(t){e.$wrapperEl[0].removeEventListener(t,e.autoplay.onTransitionEnd)}))},onMouseLeave:function(){var e=this;e.params.autoplay.disableOnInteraction||(e.autoplay.paused=!1,e.autoplay.run())},attachMouseEvents:function(){var e=this;e.params.autoplay.pauseOnMouseEnter&&(e.$el.on("mouseenter",e.autoplay.onMouseEnter),e.$el.on("mouseleave",e.autoplay.onMouseLeave))},detachMouseEvents:function(){var e=this;e.$el.off("mouseenter",e.autoplay.onMouseEnter),e.$el.off("mouseleave",e.autoplay.onMouseLeave)}},oe={setTranslate:function(){for(var e=this,t=e.slides,i=0;i<t.length;i+=1){var n=e.slides.eq(i),r=-n[0].swiperSlideOffset;e.params.virtualTranslate||(r-=e.translate);var a=0;e.isHorizontal()||(a=r,r=0);var s=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(n[0].progress),0):1+Math.min(Math.max(n[0].progress,-1),0);n.css({opacity:s}).transform("translate3d("+r+"px, "+a+"px, 0px)")}},setTransition:function(e){var t=this,i=t.slides,n=t.$wrapperEl;if(i.transition(e),t.params.virtualTranslate&&0!==e){var r=!1;i.transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)n.trigger(e[i])}}))}}},le={setTranslate:function(){var e,t=this,i=t.$el,n=t.$wrapperEl,r=t.slides,a=t.width,s=t.height,o=t.rtlTranslate,l=t.size,d=t.browser,c=t.params.cubeEffect,u=t.isHorizontal(),p=t.virtual&&t.params.virtual.enabled,h=0;c.shadow&&(u?(0===(e=n.find(".swiper-cube-shadow")).length&&(e=m('<div class="swiper-cube-shadow"></div>'),n.append(e)),e.css({height:a+"px"})):0===(e=i.find(".swiper-cube-shadow")).length&&(e=m('<div class="swiper-cube-shadow"></div>'),i.append(e)));for(var f=0;f<r.length;f+=1){var g=r.eq(f),v=f;p&&(v=parseInt(g.attr("data-swiper-slide-index"),10));var y=90*v,b=Math.floor(y/360);o&&(y=-y,b=Math.floor(-y/360));var w=Math.max(Math.min(g[0].progress,1),-1),_=0,x=0,C=0;v%4==0?(_=4*-b*l,C=0):(v-1)%4==0?(_=0,C=4*-b*l):(v-2)%4==0?(_=l+4*b*l,C=l):(v-3)%4==0&&(_=-l,C=3*l+4*l*b),o&&(_=-_),u||(x=_,_=0);var E="rotateX("+(u?0:-y)+"deg) rotateY("+(u?y:0)+"deg) translate3d("+_+"px, "+x+"px, "+C+"px)";if(w<=1&&w>-1&&(h=90*v+90*w,o&&(h=90*-v-90*w)),g.transform(E),c.slideShadows){var S=u?g.find(".swiper-slide-shadow-left"):g.find(".swiper-slide-shadow-top"),T=u?g.find(".swiper-slide-shadow-right"):g.find(".swiper-slide-shadow-bottom");0===S.length&&(S=m('<div class="swiper-slide-shadow-'+(u?"left":"top")+'"></div>'),g.append(S)),0===T.length&&(T=m('<div class="swiper-slide-shadow-'+(u?"right":"bottom")+'"></div>'),g.append(T)),S.length&&(S[0].style.opacity=Math.max(-w,0)),T.length&&(T[0].style.opacity=Math.max(w,0))}}if(n.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"}),c.shadow)if(u)e.transform("translate3d(0px, "+(a/2+c.shadowOffset)+"px, "+-a/2+"px) rotateX(90deg) rotateZ(0deg) scale("+c.shadowScale+")");else{var k=Math.abs(h)-90*Math.floor(Math.abs(h)/90),P=1.5-(Math.sin(2*k*Math.PI/360)/2+Math.cos(2*k*Math.PI/360)/2),I=c.shadowScale,$=c.shadowScale/P,A=c.shadowOffset;e.transform("scale3d("+I+", 1, "+$+") translate3d(0px, "+(s/2+A)+"px, "+-s/2/$+"px) rotateX(-90deg)")}var M=d.isSafari||d.isWebView?-l/2:0;n.transform("translate3d(0px,0,"+M+"px) rotateX("+(t.isHorizontal()?0:h)+"deg) rotateY("+(t.isHorizontal()?-h:0)+"deg)")},setTransition:function(e){var t=this,i=t.$el;t.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&i.find(".swiper-cube-shadow").transition(e)}},de={setTranslate:function(){for(var e=this,t=e.slides,i=e.rtlTranslate,n=0;n<t.length;n+=1){var r=t.eq(n),a=r[0].progress;e.params.flipEffect.limitRotation&&(a=Math.max(Math.min(r[0].progress,1),-1));var s=-180*a,o=0,l=-r[0].swiperSlideOffset,d=0;if(e.isHorizontal()?i&&(s=-s):(d=l,l=0,o=-s,s=0),r[0].style.zIndex=-Math.abs(Math.round(a))+t.length,e.params.flipEffect.slideShadows){var c=e.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),u=e.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===c.length&&(c=m('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),r.append(c)),0===u.length&&(u=m('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),r.append(u)),c.length&&(c[0].style.opacity=Math.max(-a,0)),u.length&&(u[0].style.opacity=Math.max(a,0))}r.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+s+"deg)")}},setTransition:function(e){var t=this,i=t.slides,n=t.activeIndex,r=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var a=!1;i.eq(n).transitionEnd((function(){if(!a&&t&&!t.destroyed){a=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)r.trigger(e[i])}}))}}},ce={setTranslate:function(){for(var e=this,t=e.width,i=e.height,n=e.slides,r=e.slidesSizesGrid,a=e.params.coverflowEffect,s=e.isHorizontal(),o=e.translate,l=s?t/2-o:i/2-o,d=s?a.rotate:-a.rotate,c=a.depth,u=0,p=n.length;u<p;u+=1){var h=n.eq(u),f=r[u],g=(l-h[0].swiperSlideOffset-f/2)/f*a.modifier,v=s?d*g:0,y=s?0:d*g,b=-c*Math.abs(g),w=a.stretch;"string"==typeof w&&-1!==w.indexOf("%")&&(w=parseFloat(a.stretch)/100*f);var _=s?0:w*g,x=s?w*g:0,C=1-(1-a.scale)*Math.abs(g);Math.abs(x)<.001&&(x=0),Math.abs(_)<.001&&(_=0),Math.abs(b)<.001&&(b=0),Math.abs(v)<.001&&(v=0),Math.abs(y)<.001&&(y=0),Math.abs(C)<.001&&(C=0);var E="translate3d("+x+"px,"+_+"px,"+b+"px)  rotateX("+y+"deg) rotateY("+v+"deg) scale("+C+")";if(h.transform(E),h[0].style.zIndex=1-Math.abs(Math.round(g)),a.slideShadows){var S=s?h.find(".swiper-slide-shadow-left"):h.find(".swiper-slide-shadow-top"),T=s?h.find(".swiper-slide-shadow-right"):h.find(".swiper-slide-shadow-bottom");0===S.length&&(S=m('<div class="swiper-slide-shadow-'+(s?"left":"top")+'"></div>'),h.append(S)),0===T.length&&(T=m('<div class="swiper-slide-shadow-'+(s?"right":"bottom")+'"></div>'),h.append(T)),S.length&&(S[0].style.opacity=g>0?g:0),T.length&&(T[0].style.opacity=-g>0?-g:0)}}},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)}},ue={init:function(){var e=this,t=e.params.thumbs;if(e.thumbs.initialized)return!1;e.thumbs.initialized=!0;var i=e.constructor;return t.swiper instanceof i?(e.thumbs.swiper=t.swiper,E(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),E(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):C(t.swiper)&&(e.thumbs.swiper=new i(E({},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),!0},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var i=t.clickedIndex,n=t.clickedSlide;if(!(n&&m(n).hasClass(e.params.thumbs.slideThumbActiveClass)||null==i)){var r;if(r=t.params.loop?parseInt(m(t.clickedSlide).attr("data-swiper-slide-index"),10):i,e.params.loop){var a=e.activeIndex;e.slides.eq(a).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,a=e.activeIndex);var s=e.slides.eq(a).prevAll('[data-swiper-slide-index="'+r+'"]').eq(0).index(),o=e.slides.eq(a).nextAll('[data-swiper-slide-index="'+r+'"]').eq(0).index();r=void 0===s?o:void 0===o?s:o-a<a-s?o:s}e.slideTo(r)}}},update:function(e){var t=this,i=t.thumbs.swiper;if(i){var n="auto"===i.params.slidesPerView?i.slidesPerViewDynamic():i.params.slidesPerView,r=t.params.thumbs.autoScrollOffset,a=r&&!i.params.loop;if(t.realIndex!==i.realIndex||a){var s,o,l=i.activeIndex;if(i.params.loop){i.slides.eq(l).hasClass(i.params.slideDuplicateClass)&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,l=i.activeIndex);var d=i.slides.eq(l).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),c=i.slides.eq(l).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();s=void 0===d?c:void 0===c?d:c-l==l-d?l:c-l<l-d?c:d,o=t.activeIndex>t.previousIndex?"next":"prev"}else o=(s=t.realIndex)>t.previousIndex?"next":"prev";a&&(s+="next"===o?r:-1*r),i.visibleSlidesIndexes&&i.visibleSlidesIndexes.indexOf(s)<0&&(i.params.centeredSlides?s=s>l?s-Math.floor(n/2)+1:s+Math.floor(n/2)-1:s>l&&(s=s-n+1),i.slideTo(s,e?0:void 0))}var u=1,p=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(u=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(u=1),u=Math.floor(u),i.slides.removeClass(p),i.params.loop||i.params.virtual&&i.params.virtual.enabled)for(var h=0;h<u;h+=1)i.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+h)+'"]').addClass(p);else for(var f=0;f<u;f+=1)i.slides.eq(t.realIndex+f).addClass(p)}}},pe=[Y,X,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}},create:function(){S(this,{mousewheel:{enabled:!1,lastScrollTime:_(),lastEventBeforeSnap:void 0,recentWheelEvents:[],enable:U.enable,disable:U.disable,handle:U.handle,handleMouseEnter:U.handleMouseEnter,handleMouseLeave:U.handleMouseLeave,animateSlider:U.animateSlider,releaseScroll:U.releaseScroll}})},on:{init:function(e){!e.params.mousewheel.enabled&&e.params.cssMode&&e.mousewheel.disable(),e.params.mousewheel.enabled&&e.mousewheel.enable()},destroy:function(e){e.params.cssMode&&e.mousewheel.enable(),e.mousewheel.enabled&&e.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(){S(this,{navigation:t({},Q)})},on:{init:function(e){e.navigation.init(),e.navigation.update()},toEdge:function(e){e.navigation.update()},fromEdge:function(e){e.navigation.update()},destroy:function(e){e.navigation.destroy()},click:function(e,t){var i,n=e.navigation,r=n.$nextEl,a=n.$prevEl;!e.params.navigation.hideOnClick||m(t.target).is(a)||m(t.target).is(r)||(r?i=r.hasClass(e.params.navigation.hiddenClass):a&&(i=a.hasClass(e.params.navigation.hiddenClass)),!0===i?e.emit("navigationShow"):e.emit("navigationHide"),r&&r.toggleClass(e.params.navigation.hiddenClass),a&&a.toggleClass(e.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(){S(this,{pagination:t({dynamicBulletIndex:0},K)})},on:{init:function(e){e.pagination.init(),e.pagination.render(),e.pagination.update()},activeIndexChange:function(e){(e.params.loop||void 0===e.snapIndex)&&e.pagination.update()},snapIndexChange:function(e){e.params.loop||e.pagination.update()},slidesLengthChange:function(e){e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange:function(e){e.params.loop||(e.pagination.render(),e.pagination.update())},destroy:function(e){e.pagination.destroy()},click:function(e,t){e.params.pagination.el&&e.params.pagination.hideOnClick&&e.pagination.$el.length>0&&!m(t.target).hasClass(e.params.pagination.bulletClass)&&(!0===e.pagination.$el.hasClass(e.params.pagination.hiddenClass)?e.emit("paginationShow"):e.emit("paginationHide"),e.pagination.$el.toggleClass(e.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(){S(this,{scrollbar:t({isTouched:!1,timeout:null,dragTimeout:null},Z)})},on:{init:function(e){e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(e){e.scrollbar.updateSize()},resize:function(e){e.scrollbar.updateSize()},observerUpdate:function(e){e.scrollbar.updateSize()},setTranslate:function(e){e.scrollbar.setTranslate()},setTransition:function(e,t){e.scrollbar.setTransition(t)},destroy:function(e){e.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){S(this,{parallax:t({},J)})},on:{beforeInit:function(e){e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e,t){e.params.parallax.enabled&&e.parallax.setTransition(t)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this;S(e,{zoom:t({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}},ee)});var i=1;Object.defineProperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var n=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,r=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,n,r)}i=t}})},on:{init:function(e){e.params.zoom.enabled&&e.zoom.enable()},destroy:function(e){e.zoom.disable()},touchStart:function(e,t){e.zoom.enabled&&e.zoom.onTouchStart(t)},touchEnd:function(e,t){e.zoom.enabled&&e.zoom.onTouchEnd(t)},doubleTap:function(e,t){e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&e.zoom.toggle(t)},transitionEnd:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.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(){S(this,{lazy:t({initialImageLoaded:!1},te)})},on:{beforeInit:function(e){e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(e){e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&e.lazy.load()},scroll:function(e){e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},resize:function(e){e.params.lazy.enabled&&e.lazy.load()},scrollbarDragMove:function(e){e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(e){e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(e){e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(e){e.params.lazy.enabled&&e.params.cssMode&&e.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){S(this,{controller:t({control:this.params.controller.control},ie)})},on:{update:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t,i){e.controller.control&&e.controller.setTranslate(t,i)},setTransition:function(e,t,i){e.controller.control&&e.controller.setTransition(t,i)}}},{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(){S(this,{a11y:t(t({},ne),{},{liveRegion:m('<span class="'+this.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')})})},on:{init:function(e){e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(e){e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(e){e.params.a11y.enabled&&e.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){S(this,{history:t({},re)})},on:{init:function(e){e.params.history.enabled&&e.history.init()},destroy:function(e){e.params.history.enabled&&e.history.destroy()},transitionEnd:function(e){e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(e){e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){S(this,{hashNavigation:t({initialized:!1},ae)})},on:{init:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},transitionEnd:function(e){e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(e){e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}},create:function(){S(this,{autoplay:t(t({},se),{},{running:!1,paused:!1})})},on:{init:function(e){e.params.autoplay.enabled&&(e.autoplay.start(),a().addEventListener("visibilitychange",e.autoplay.onVisibilityChange),e.autoplay.attachMouseEvents())},beforeTransitionStart:function(e,t,i){e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(t):e.autoplay.stop())},sliderFirstMove:function(e){e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(e){e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(e){e.autoplay.detachMouseEvents(),e.autoplay.running&&e.autoplay.stop(),a().removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){S(this,{fadeEffect:t({},oe)})},on:{beforeInit:function(e){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};E(e.params,t),E(e.originalParams,t)}},setTranslate:function(e){"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e,t){"fade"===e.params.effect&&e.fadeEffect.setTransition(t)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){S(this,{cubeEffect:t({},le)})},on:{beforeInit:function(e){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};E(e.params,t),E(e.originalParams,t)}},setTranslate:function(e){"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e,t){"cube"===e.params.effect&&e.cubeEffect.setTransition(t)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){S(this,{flipEffect:t({},de)})},on:{beforeInit:function(e){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};E(e.params,t),E(e.originalParams,t)}},setTranslate:function(e){"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e,t){"flip"===e.params.effect&&e.flipEffect.setTransition(t)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){S(this,{coverflowEffect:t({},ce)})},on:{beforeInit:function(e){"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(e){"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e,t){"coverflow"===e.params.effect&&e.coverflowEffect.setTransition(t)}}},{name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){S(this,{thumbs:t({swiper:null,initialized:!1},ue)})},on:{beforeInit:function(e){var t=e.params.thumbs;t&&t.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(e){e.thumbs.swiper&&e.thumbs.update()},update:function(e){e.thumbs.swiper&&e.thumbs.update()},resize:function(e){e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(e){e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e,t){var i=e.thumbs.swiper;i&&i.setTransition(t)},beforeDestroy:function(e){var t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}}];return W.use(pe),W}()},992:function(e,t){var i,n;i=function(){"use strict";var e=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=void 0;void 0===i&&(i={modules:[]});var n=null;function r(e){var t=e.getBoundingClientRect(),i={};for(var n in t)i[n]=t[n];try{if(e.ownerDocument!==document){var a=e.ownerDocument.defaultView.frameElement;if(a){var s=r(a);i.top+=s.top,i.bottom+=s.top,i.left+=s.left,i.right+=s.left}}}catch(e){}return i}function a(e){var t=(getComputedStyle(e)||{}).position,i=[];if("fixed"===t)return[e];for(var n=e;(n=n.parentNode)&&n&&1===n.nodeType;){var r=void 0;try{r=getComputedStyle(n)}catch(e){}if(null==r)return i.push(n),i;var a=r,s=a.overflow,o=a.overflowX,l=a.overflowY;/(auto|scroll|overlay)/.test(s+l+o)&&("absolute"!==t||["relative","absolute","fixed"].indexOf(r.position)>=0)&&i.push(n)}return i.push(e.ownerDocument.body),e.ownerDocument!==document&&i.push(e.ownerDocument.defaultView),i}var s,o=(s=0,function(){return++s}),l={},d=function(){var e=n;e&&document.body.contains(e)||((e=document.createElement("div")).setAttribute("data-tether-id",o()),m(e.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(e),n=e);var t=e.getAttribute("data-tether-id");return void 0===l[t]&&(l[t]=r(e),C((function(){delete l[t]}))),l[t]};function c(){n&&document.body.removeChild(n),n=null}function u(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var i=t.documentElement,n=r(e),a=d();return n.top-=a.top,n.left-=a.left,void 0===n.width&&(n.width=document.body.scrollWidth-n.left-n.right),void 0===n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-i.clientTop,n.left=n.left-i.clientLeft,n.right=t.body.clientWidth-n.width-n.left,n.bottom=t.body.clientHeight-n.height-n.top,n}function p(e){return e.offsetParent||document.documentElement}var h=null;function f(){if(h)return h;var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");m(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);var i=e.offsetWidth;t.style.overflow="scroll";var n=e.offsetWidth;i===n&&(n=t.clientWidth),document.body.removeChild(t);var r=i-n;return h={width:r,height:r}}function m(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach((function(t){if(t)for(var i in t)({}).hasOwnProperty.call(t,i)&&(e[i]=t[i])})),e}function g(e,t){if(void 0!==e.classList)t.split(" ").forEach((function(t){t.trim()&&e.classList.remove(t)}));else{var i=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),n=b(e).replace(i," ");w(e,n)}}function v(e,t){if(void 0!==e.classList)t.split(" ").forEach((function(t){t.trim()&&e.classList.add(t)}));else{g(e,t);var i=b(e)+" "+t;w(e,i)}}function y(e,t){if(void 0!==e.classList)return e.classList.contains(t);var i=b(e);return new RegExp("(^| )"+t+"( |$)","gi").test(i)}function b(e){return e.className instanceof e.ownerDocument.defaultView.SVGAnimatedString?e.className.baseVal:e.className}function w(e,t){e.setAttribute("class",t)}function _(e,t,i){i.forEach((function(i){-1===t.indexOf(i)&&y(e,i)&&g(e,i)})),t.forEach((function(t){y(e,t)||v(e,t)}))}var x=[],C=function(e){x.push(e)},E=function(){for(var e=void 0;e=x.pop();)e()},S=function(){function i(){t(this,i)}return e(i,[{key:"on",value:function(e,t,i){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:i,once:n})}},{key:"once",value:function(e,t,i){this.on(e,t,i,!0)}},{key:"off",value:function(e,t){if(void 0!==this.bindings&&void 0!==this.bindings[e])if(void 0===t)delete this.bindings[e];else for(var i=0;i<this.bindings[e].length;)this.bindings[e][i].handler===t?this.bindings[e].splice(i,1):++i}},{key:"trigger",value:function(e){if(void 0!==this.bindings&&this.bindings[e]){for(var t=0,i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];for(;t<this.bindings[e].length;){var a=this.bindings[e][t],s=a.handler,o=a.ctx,l=a.once,d=o;void 0===d&&(d=this),s.apply(d,n),l?this.bindings[e].splice(t,1):++t}}}}]),i}();i.Utils={getActualBoundingClientRect:r,getScrollParents:a,getBounds:u,getOffsetParent:p,extend:m,addClass:v,removeClass:g,hasClass:y,updateClasses:_,defer:C,flush:E,uniqueId:o,Evented:S,getScrollBarSize:f,removeUtilElements:c};var T=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){r=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},k=(e=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),function(e,t,i){for(var n=!0;n;){var r=e,a=t,s=i;n=!1,null===r&&(r=Function.prototype);var o=Object.getOwnPropertyDescriptor(r,a);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(s)}var d=Object.getPrototypeOf(r);if(null===d)return;e=d,t=a,i=s,n=!0,o=d=void 0}});function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}if(void 0===i)throw new Error("You must include the utils.js file before tether.js");var a=(X=i.Utils).getScrollParents,p=(u=X.getBounds,X.getOffsetParent),v=(m=X.extend,X.addClass),g=X.removeClass,f=(_=X.updateClasses,C=X.defer,E=X.flush,X.getScrollBarSize),c=X.removeUtilElements;function P(e,t){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+i>=t&&t>=e-i}var I,$,A,M,z=function(){if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],i=0;i<t.length;++i){var n=t[i];if(void 0!==e.style[n])return n}}(),O=[],L=function(){O.forEach((function(e){e.position(!1)})),E()};function N(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}I=null,$=null,A=null,M=function e(){if(void 0!==$&&$>16)return $=Math.min($-16,250),void(A=setTimeout(e,250));void 0!==I&&N()-I<10||(null!=A&&(clearTimeout(A),A=null),I=N(),L(),$=N()-I)},"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach((function(e){window.addEventListener(e,M)}));var D={center:"center",left:"right",right:"left"},j={middle:"middle",top:"bottom",bottom:"top"},H={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},F=function(e){var t=e.left,i=e.top;return void 0!==H[e.left]&&(t=H[e.left]),void 0!==H[e.top]&&(i=H[e.top]),{left:t,top:i}};function B(){for(var e={top:0,left:0},t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach((function(t){var i=t.top,n=t.left;"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof n&&(n=parseFloat(n,10)),e.top+=i,e.left+=n})),e}function q(e,t){return"string"==typeof e.left&&-1!==e.left.indexOf("%")&&(e.left=parseFloat(e.left,10)/100*t.width),"string"==typeof e.top&&-1!==e.top.indexOf("%")&&(e.top=parseFloat(e.top,10)/100*t.height),e}var V=function(e){var t=e.split(" "),i=T(t,2);return{top:i[0],left:i[1]}},W=V,R=function(n){function r(e){var n=this;t(this,r),k(Object.getPrototypeOf(r.prototype),"constructor",this).call(this),this.position=this.position.bind(this),O.push(this),this.history=[],this.setOptions(e,!1),i.modules.forEach((function(e){void 0!==e.initialize&&e.initialize.call(n)})),this.position()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:"getClass",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return void 0!==t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1];this.options=m({offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},e);var n=this.options,r=n.element,s=n.target,o=n.targetModifier;if(this.element=r,this.target=s,this.targetModifier=o,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach((function(e){if(void 0===t[e])throw new Error("Tether Error: Both element and target must be defined");void 0!==t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))})),v(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&v(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=W(this.options.targetAttachment),this.attachment=W(this.options.attachment),this.offset=V(this.options.offset),this.targetOffset=V(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=a(this.target),!1!==this.options.enabled&&this.enable(i)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return u(this.target);if("visible"===this.targetModifier)return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:((a={height:(e=u(this.target)).height,width:e.width,top:e.top,left:e.left}).height=Math.min(a.height,e.height-(pageYOffset-e.top)),a.height=Math.min(a.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),a.height=Math.min(innerHeight,a.height),a.height-=2,a.width=Math.min(a.width,e.width-(pageXOffset-e.left)),a.width=Math.min(a.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),a.width=Math.min(innerWidth,a.width),a.width-=2,a.top<pageYOffset&&(a.top=pageYOffset),a.left<pageXOffset&&(a.left=pageXOffset),a);if("scroll-handle"===this.targetModifier){var e=void 0,t=this.target;t===document.body?(t=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=u(t);var i=getComputedStyle(t),n=0;(t.scrollWidth>t.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body)&&(n=15);var r=e.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-n,a={width:15,height:.975*r*(r/t.scrollHeight),left:e.left+e.width-parseFloat(i.borderLeftWidth)-15},s=0;r<408&&this.target===document.body&&(s=-11e-5*Math.pow(r,2)-.00727*r+22.58),this.target!==document.body&&(a.height=Math.max(a.height,24));var o=this.target.scrollTop/(t.scrollHeight-r);return a.top=o*(r-a.height-s)+e.top+parseFloat(i.borderTopWidth),this.target===document.body&&(a.height=Math.max(a.height,24)),a}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return void 0===this._cache&&(this._cache={}),void 0===this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&v(this.target,this.getClass("enabled")),v(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach((function(t){t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)})),t&&this.position()}},{key:"disable",value:function(){var e=this;g(this.target,this.getClass("enabled")),g(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.position)}))}},{key:"destroy",value:function(){var e=this;this.disable(),O.forEach((function(t,i){t===e&&O.splice(i,1)})),0===O.length&&c()}},{key:"updateAttachClasses",value:function(e,t){var i=this;e=e||this.attachment,t=t||this.targetAttachment;void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;e.top&&n.push(this.getClass("element-attached")+"-"+e.top),e.left&&n.push(this.getClass("element-attached")+"-"+e.left),t.top&&n.push(this.getClass("target-attached")+"-"+t.top),t.left&&n.push(this.getClass("target-attached")+"-"+t.left);var r=[];["left","top","bottom","right","middle","center"].forEach((function(e){r.push(i.getClass("element-attached")+"-"+e),r.push(i.getClass("target-attached")+"-"+e)})),C((function(){void 0!==i._addAttachClasses&&(_(i.element,i._addAttachClasses,r),!1!==i.options.addTargetClasses&&_(i.target,i._addAttachClasses,r),delete i._addAttachClasses)}))}},{key:"position",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var n=function(e,t){var i=e.left,n=e.top;return"auto"===i&&(i=D[t.left]),"auto"===n&&(n=j[t.top]),{left:i,top:n}}(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,n);var r=this.cache("element-bounds",(function(){return u(e.element)})),a=r.width,s=r.height;if(0===a&&0===s&&void 0!==this.lastSize){var o=this.lastSize;a=o.width,s=o.height}else this.lastSize={width:a,height:s};var l=this.cache("target-bounds",(function(){return e.getTargetBounds()})),d=l,c=q(F(this.attachment),{width:a,height:s}),h=q(F(n),d),m=q(this.offset,{width:a,height:s}),g=q(this.targetOffset,d);c=B(c,m),h=B(h,g);for(var v=l.left+h.left-c.left,y=l.top+h.top-c.top,b=0;b<i.modules.length;++b){var w=i.modules[b].position.call(this,{left:v,top:y,targetAttachment:n,targetPos:l,elementPos:r,offset:c,targetOffset:h,manualOffset:m,manualTargetOffset:g,scrollbarSize:S,attachment:this.attachment});if(!1===w)return!1;void 0!==w&&"object"==typeof w&&(y=w.top,v=w.left)}var _={page:{top:y,left:v},viewport:{top:y-pageYOffset,bottom:pageYOffset-y-s+innerHeight,left:v-pageXOffset,right:pageXOffset-v-a+innerWidth}},x=this.target.ownerDocument,C=x.defaultView,S=void 0;return C.innerHeight>x.documentElement.clientHeight&&(S=this.cache("scrollbar-size",f),_.viewport.bottom-=S.height),C.innerWidth>x.documentElement.clientWidth&&(S=this.cache("scrollbar-size",f),_.viewport.right-=S.width),-1!==["","static"].indexOf(x.body.style.position)&&-1!==["","static"].indexOf(x.body.parentElement.style.position)||(_.page.bottom=x.body.scrollHeight-y-s,_.page.right=x.body.scrollWidth-v-a),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var t=e.cache("target-offsetparent",(function(){return p(e.target)})),i=e.cache("target-offsetparent-bounds",(function(){return u(t)})),n=getComputedStyle(t),r=i,a={};if(["Top","Left","Bottom","Right"].forEach((function(e){a[e.toLowerCase()]=parseFloat(n["border"+e+"Width"])})),i.right=x.body.scrollWidth-i.left-r.width+a.right,i.bottom=x.body.scrollHeight-i.top-r.height+a.bottom,_.page.top>=i.top+a.top&&_.page.bottom>=i.bottom&&_.page.left>=i.left+a.left&&_.page.right>=i.right){var s=t.scrollTop,o=t.scrollLeft;_.offset={top:_.page.top-i.top+s-a.top,left:_.page.left-i.left+o-a.left}}}(),this.move(_),this.history.unshift(_),this.history.length>3&&this.history.pop(),t&&E(),!0}}},{key:"move",value:function(e){var t,i,n=this;if(void 0!==this.element.parentNode){var r={};for(var a in e)for(var s in r[a]={},e[a]){for(var o=!1,l=0;l<this.history.length;++l){var d=this.history[l];if(void 0!==d[a]&&!P(d[a][s],e[a][s])){o=!0;break}}o||(r[a][s]=!0)}var c={top:"",left:"",right:"",bottom:""},u=function(e,t){if(!1!==(void 0!==n.options.optimizations?n.options.optimizations.gpu:null)){var i=void 0,r=void 0;e.top?(c.top=0,i=t.top):(c.bottom=0,i=-t.bottom),e.left?(c.left=0,r=t.left):(c.right=0,r=-t.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1==0&&(r=Math.round(r*devicePixelRatio)/devicePixelRatio,i=Math.round(i*devicePixelRatio)/devicePixelRatio),c[z]="translateX("+r+"px) translateY("+i+"px)","msTransform"!==z&&(c[z]+=" translateZ(0)")}else e.top?c.top=t.top+"px":c.bottom=t.bottom+"px",e.left?c.left=t.left+"px":c.right=t.right+"px"},h=!1;if((r.page.top||r.page.bottom)&&(r.page.left||r.page.right)?(c.position="absolute",u(r.page,e.page)):(r.viewport.top||r.viewport.bottom)&&(r.viewport.left||r.viewport.right)?(c.position="fixed",u(r.viewport,e.viewport)):void 0!==r.offset&&r.offset.top&&r.offset.left?function(){c.position="absolute";var t=n.cache("target-offsetparent",(function(){return p(n.target)}));p(n.element)!==t&&C((function(){n.element.parentNode.removeChild(n.element),t.appendChild(n.element)})),u(r.offset,e.offset),h=!0}():(c.position="absolute",u({top:!0,left:!0},e.page)),!h)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var f=!0,g=this.element.parentNode;g&&1===g.nodeType&&"BODY"!==g.tagName&&(i=void 0,((i=(t=g).ownerDocument).fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement)!==t);){if("static"!==getComputedStyle(g).position){f=!1;break}g=g.parentNode}f||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var v={},y=!1;for(var s in c){var b=c[s];this.element.style[s]!==b&&(y=!0,v[s]=b)}y&&C((function(){m(n.element.style,v),n.trigger("repositioned")}))}}}]),r}(S);R.modules=[],i.position=L;var Y=m(R,i);T=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){r=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},u=(X=i.Utils).getBounds;var m=X.extend,G=(_=X.updateClasses,C=X.defer,["left","top","right","bottom"]);i.modules.push({position:function(e){var t=this,i=e.top,n=e.left,r=e.targetAttachment;if(!this.options.constraints)return!0;var a=this.cache("element-bounds",(function(){return u(t.element)})),s=a.height,o=a.width;if(0===o&&0===s&&void 0!==this.lastSize){var l=this.lastSize;o=l.width,s=l.height}var d=this.cache("target-bounds",(function(){return t.getTargetBounds()})),c=d.height,p=d.width,h=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach((function(e){var t=e.outOfBoundsClass,i=e.pinnedClass;t&&h.push(t),i&&h.push(i)})),h.forEach((function(e){["left","top","right","bottom"].forEach((function(t){h.push(e+"-"+t)}))}));var f=[],g=m({},r),v=m({},this.attachment);return this.options.constraints.forEach((function(e){var a=e.to,l=e.attachment,d=e.pin;void 0===l&&(l="");var h=void 0,m=void 0;if(l.indexOf(" ")>=0){var y=l.split(" "),b=T(y,2);m=b[0],h=b[1]}else h=m=l;var w=function(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),void 0!==t.nodeType&&function(){var e=t,i=u(t),n=i,r=getComputedStyle(t);if(t=[n.left,n.top,i.width+n.left,i.height+n.top],e.ownerDocument!==document){var a=e.ownerDocument.defaultView;t[0]+=a.pageXOffset,t[1]+=a.pageYOffset,t[2]+=a.pageXOffset,t[3]+=a.pageYOffset}G.forEach((function(e,i){"Top"===(e=e[0].toUpperCase()+e.substr(1))||"Left"===e?t[i]+=parseFloat(r["border"+e+"Width"]):t[i]-=parseFloat(r["border"+e+"Width"])}))}(),t}(t,a);"target"!==m&&"both"!==m||(i<w[1]&&"top"===g.top&&(i+=c,g.top="bottom"),i+s>w[3]&&"bottom"===g.top&&(i-=c,g.top="top")),"together"===m&&("top"===g.top&&("bottom"===v.top&&i<w[1]?(i+=c,g.top="bottom",i+=s,v.top="top"):"top"===v.top&&i+s>w[3]&&i-(s-c)>=w[1]&&(i-=s-c,g.top="bottom",v.top="bottom")),"bottom"===g.top&&("top"===v.top&&i+s>w[3]?(i-=c,g.top="top",i-=s,v.top="bottom"):"bottom"===v.top&&i<w[1]&&i+(2*s-c)<=w[3]&&(i+=s-c,g.top="top",v.top="top")),"middle"===g.top&&(i+s>w[3]&&"top"===v.top?(i-=s,v.top="bottom"):i<w[1]&&"bottom"===v.top&&(i+=s,v.top="top"))),"target"!==h&&"both"!==h||(n<w[0]&&"left"===g.left&&(n+=p,g.left="right"),n+o>w[2]&&"right"===g.left&&(n-=p,g.left="left")),"together"===h&&(n<w[0]&&"left"===g.left?"right"===v.left?(n+=p,g.left="right",n+=o,v.left="left"):"left"===v.left&&(n+=p,g.left="right",n-=o,v.left="right"):n+o>w[2]&&"right"===g.left?"left"===v.left?(n-=p,g.left="left",n-=o,v.left="right"):"right"===v.left&&(n-=p,g.left="left",n+=o,v.left="left"):"center"===g.left&&(n+o>w[2]&&"left"===v.left?(n-=o,v.left="right"):n<w[0]&&"right"===v.left&&(n+=o,v.left="left"))),"element"!==m&&"both"!==m||(i<w[1]&&"bottom"===v.top&&(i+=s,v.top="top"),i+s>w[3]&&"top"===v.top&&(i-=s,v.top="bottom")),"element"!==h&&"both"!==h||(n<w[0]&&("right"===v.left?(n+=o,v.left="left"):"center"===v.left&&(n+=o/2,v.left="left")),n+o>w[2]&&("left"===v.left?(n-=o,v.left="right"):"center"===v.left&&(n-=o/2,v.left="right"))),"string"==typeof d?d=d.split(",").map((function(e){return e.trim()})):!0===d&&(d=["top","left","right","bottom"]),d=d||[];var _,x,C=[],E=[];i<w[1]&&(d.indexOf("top")>=0?(i=w[1],C.push("top")):E.push("top")),i+s>w[3]&&(d.indexOf("bottom")>=0?(i=w[3]-s,C.push("bottom")):E.push("bottom")),n<w[0]&&(d.indexOf("left")>=0?(n=w[0],C.push("left")):E.push("left")),n+o>w[2]&&(d.indexOf("right")>=0?(n=w[2]-o,C.push("right")):E.push("right")),C.length&&(void 0,_=void 0!==t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),f.push(_),C.forEach((function(e){f.push(_+"-"+e)}))),E.length&&(void 0,x=void 0!==t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),f.push(x),E.forEach((function(e){f.push(x+"-"+e)}))),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(v.left=g.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(v.top=g.top=!1),g.top===r.top&&g.left===r.left&&v.top===t.attachment.top&&v.left===t.attachment.left||(t.updateAttachClasses(v,g),t.trigger("update",{attachment:v,targetAttachment:g}))})),C((function(){!1!==t.options.addTargetClasses&&_(t.target,f,h),_(t.element,f,h)})),{top:i,left:n}}});var X,u=(X=i.Utils).getBounds,_=X.updateClasses;return C=X.defer,i.modules.push({position:function(e){var t=this,i=e.top,n=e.left,r=this.cache("element-bounds",(function(){return u(t.element)})),a=r.height,s=r.width,o=this.getTargetBounds(),l=i+a,d=n+s,c=[];i<=o.bottom&&l>=o.top&&["left","right"].forEach((function(e){var t=o[e];t!==n&&t!==d||c.push(e)})),n<=o.right&&d>=o.left&&["top","bottom"].forEach((function(e){var t=o[e];t!==i&&t!==l||c.push(e)}));var p=[],h=[];return p.push(this.getClass("abutted")),["left","top","right","bottom"].forEach((function(e){p.push(t.getClass("abutted")+"-"+e)})),c.length&&h.push(this.getClass("abutted")),c.forEach((function(e){h.push(t.getClass("abutted")+"-"+e)})),C((function(){!1!==t.options.addTargetClasses&&_(t.target,h,p),_(t.element,h,p)})),!0}}),T=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,r=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){r=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i.modules.push({position:function(e){var t=e.top,i=e.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:t,left:i}));var r=void 0,a=void 0;if("string"==typeof n){(n=n.split(" "))[1]=n[1]||n[0];var s=T(n,2);r=s[0],a=s[1],r=parseFloat(r,10),a=parseFloat(a,10)}else r=n.top,a=n.left;return{top:t+=r,left:i+=a}}}}),Y},void 0===(n=i.apply(t,[]))||(e.exports=n)},593:(e,t,i)=>{var n,r;!function(e){"use strict";if(!e.jQuery){var t=function(e,i){return new t.fn.init(e,i)};t.isWindow=function(e){return e&&e===e.window},t.type=function(e){return e?"object"==typeof e||"function"==typeof e?n[a.call(e)]||"object":typeof e:e+""},t.isArray=Array.isArray||function(e){return"array"===t.type(e)},t.isPlainObject=function(e){var i;if(!e||"object"!==t.type(e)||e.nodeType||t.isWindow(e))return!1;try{if(e.constructor&&!r.call(e,"constructor")&&!r.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(i in e);return void 0===i||r.call(e,i)},t.each=function(e,t,i){var n=0,r=e.length,a=l(e);if(i){if(a)for(;n<r&&!1!==t.apply(e[n],i);n++);else for(n in e)if(e.hasOwnProperty(n)&&!1===t.apply(e[n],i))break}else if(a)for(;n<r&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(e.hasOwnProperty(n)&&!1===t.call(e[n],n,e[n]))break;return e},t.data=function(e,n,r){if(void 0===r){var a=e[t.expando],s=a&&i[a];if(void 0===n)return s;if(s&&n in s)return s[n]}else if(void 0!==n){var o=e[t.expando]||(e[t.expando]=++t.uuid);return i[o]=i[o]||{},i[o][n]=r,r}},t.removeData=function(e,n){var r=e[t.expando],a=r&&i[r];a&&(n?t.each(n,(function(e,t){delete a[t]})):delete i[r])},t.extend=function(){var e,i,n,r,a,s,o=arguments[0]||{},l=1,d=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[l]||{},l++),"object"!=typeof o&&"function"!==t.type(o)&&(o={}),l===d&&(o=this,l--);l<d;l++)if(a=arguments[l])for(r in a)a.hasOwnProperty(r)&&(e=o[r],o!==(n=a[r])&&(c&&n&&(t.isPlainObject(n)||(i=t.isArray(n)))?(i?(i=!1,s=e&&t.isArray(e)?e:[]):s=e&&t.isPlainObject(e)?e:{},o[r]=t.extend(c,s,n)):void 0!==n&&(o[r]=n)));return o},t.queue=function(e,i,n){if(e){i=(i||"fx")+"queue";var r,a,s=t.data(e,i);return n?(!s||t.isArray(n)?s=t.data(e,i,(a=[],(r=n)&&(l(Object(r))?function(e,t){for(var i=+t.length,n=0,r=e.length;n<i;)e[r++]=t[n++];if(i!=i)for(;void 0!==t[n];)e[r++]=t[n++];e.length=r}(a,"string"==typeof r?[r]:r):[].push.call(a,r)),a)):s.push(n),s):s||[]}},t.dequeue=function(e,i){t.each(e.nodeType?[e]:e,(function(e,n){i=i||"fx";var r=t.queue(n,i),a=r.shift();"inprogress"===a&&(a=r.shift()),a&&("fx"===i&&r.unshift("inprogress"),a.call(n,(function(){t.dequeue(n,i)})))}))},t.fn=t.prototype={init:function(e){if(e.nodeType)return this[0]=e,this;throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){var e=this[0],i=function(e){for(var t=e.offsetParent;t&&"html"!==t.nodeName.toLowerCase()&&t.style&&"static"===t.style.position.toLowerCase();)t=t.offsetParent;return t||document}(e),n=this.offset(),r=/^(?:body|html)$/i.test(i.nodeName)?{top:0,left:0}:t(i).offset();return n.top-=parseFloat(e.style.marginTop)||0,n.left-=parseFloat(e.style.marginLeft)||0,i.style&&(r.top+=parseFloat(i.style.borderTopWidth)||0,r.left+=parseFloat(i.style.borderLeftWidth)||0),{top:n.top-r.top,left:n.left-r.left}}};var i={};t.expando="velocity"+(new Date).getTime(),t.uuid=0;for(var n={},r=n.hasOwnProperty,a=n.toString,s="Boolean Number String Function Array Date RegExp Object Error".split(" "),o=0;o<s.length;o++)n["[object "+s[o]+"]"]=s[o].toLowerCase();t.fn.init.prototype=t.fn,e.Velocity={Utilities:t}}function l(e){var i=e.length,n=t.type(e);return"function"!==n&&!t.isWindow(e)&&(!(1!==e.nodeType||!i)||"array"===n||0===i||"number"==typeof i&&i>0&&i-1 in e)}}(window),function(a){"use strict";"object"==typeof e.exports?e.exports=a():void 0===(r="function"==typeof(n=a)?n.call(t,i,t,e):n)||(e.exports=r)}((function(){"use strict";return function(e,t,i,n){var r,a=function(){if(i.documentMode)return i.documentMode;for(var e=7;e>4;e--){var t=i.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]><span></span><![endif]--\x3e",t.getElementsByTagName("span").length)return t=null,e}return n}(),s=(r=0,t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(e){var t,i=(new Date).getTime();return t=Math.max(0,16-(i-r)),r=i+t,setTimeout((function(){e(i+t)}),t)}),o=function(){var e=t.performance||{};if("function"!=typeof e.now){var i=e.timing&&e.timing.navigationStart?e.timing.navigationStart:(new Date).getTime();e.now=function(){return(new Date).getTime()-i}}return e}(),l=function(){var e=Array.prototype.slice;try{return e.call(i.documentElement),e}catch(t){return function(t,i){var n=this.length;if("number"!=typeof t&&(t=0),"number"!=typeof i&&(i=n),this.slice)return e.call(this,t,i);var r,a=[],s=t>=0?t:Math.max(0,n+t),o=(i<0?n+i:Math.min(i,n))-s;if(o>0)if(a=new Array(o),this.charAt)for(r=0;r<o;r++)a[r]=this.charAt(s+r);else for(r=0;r<o;r++)a[r]=this[s+r];return a}}}(),d=function(){return Array.prototype.includes?function(e,t){return e.includes(t)}:Array.prototype.indexOf?function(e,t){return e.indexOf(t)>=0}:function(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return!0;return!1}};function c(e){return p.isWrapped(e)?e=l.call(e):p.isNode(e)&&(e=[e]),e}var u,p={isNumber:function(e){return"number"==typeof e},isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isWrapped:function(e){return e&&e!==t&&p.isNumber(e.length)&&!p.isString(e)&&!p.isFunction(e)&&!p.isNode(e)&&(0===e.length||p.isNode(e[0]))},isSVG:function(e){return t.SVGElement&&e instanceof t.SVGElement},isEmptyObject:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}},h=!1;if(e.fn&&e.fn.jquery?(u=e,h=!0):u=t.Velocity.Utilities,a<=8&&!h)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(!(a<=7)){var f="swing",m={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t.navigator.userAgent),isAndroid:/Android/i.test(t.navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(t.navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(t.navigator.userAgent),prefixElement:i.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[],delayedElements:{count:0}},CSS:{},Utilities:u,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:400,easing:f,begin:n,complete:n,progress:n,display:n,visibility:n,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0,promiseRejectEmpty:!0},init:function(e){u.data(e,"velocity",{isSVG:p.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:5,patch:2},debug:!1,timestamp:!0,pauseAll:function(e){var t=(new Date).getTime();u.each(m.State.calls,(function(t,i){if(i){if(e!==n&&(i[2].queue!==e||!1===i[2].queue))return!0;i[5]={resume:!1}}})),u.each(m.State.delayedElements,(function(e,i){i&&x(i,t)}))},resumeAll:function(e){(new Date).getTime();u.each(m.State.calls,(function(t,i){if(i){if(e!==n&&(i[2].queue!==e||!1===i[2].queue))return!0;i[5]&&(i[5].resume=!0)}})),u.each(m.State.delayedElements,(function(e,t){t&&C(t)}))}};t.pageYOffset!==n?(m.State.scrollAnchor=t,m.State.scrollPropertyLeft="pageXOffset",m.State.scrollPropertyTop="pageYOffset"):(m.State.scrollAnchor=i.documentElement||i.body.parentNode||i.body,m.State.scrollPropertyLeft="scrollLeft",m.State.scrollPropertyTop="scrollTop");var g=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,i,n){var r={x:t.x+n.dx*i,v:t.v+n.dv*i,tension:t.tension,friction:t.friction};return{dx:r.v,dv:e(r)}}function i(i,n){var r={dx:i.v,dv:e(i)},a=t(i,.5*n,r),s=t(i,.5*n,a),o=t(i,n,s),l=1/6*(r.dx+2*(a.dx+s.dx)+o.dx),d=1/6*(r.dv+2*(a.dv+s.dv)+o.dv);return i.x=i.x+l*n,i.v=i.v+d*n,i}return function e(t,n,r){var a,s,o,l={x:-1,v:0,tension:null,friction:null},d=[0],c=0,u=1e-4;for(t=parseFloat(t)||500,n=parseFloat(n)||20,r=r||null,l.tension=t,l.friction=n,s=(a=null!==r)?(c=e(t,n))/r*.016:.016;o=i(o||l,s),d.push(1+o.x),c+=16,Math.abs(o.x)>u&&Math.abs(o.v)>u;);return a?function(e){return d[e*(d.length-1)|0]}:c}}();m.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}},u.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],(function(e,t){m.Easings[t[0]]=S.apply(null,t[1])}));var v=m.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<v.Lists.colors.length;e++){var t="color"===v.Lists.colors[e]?"0 0 0 1":"255 255 255 1";v.Hooks.templates[v.Lists.colors[e]]=["Red Green Blue Alpha",t]}var i,n,r;if(a)for(i in v.Hooks.templates)if(v.Hooks.templates.hasOwnProperty(i)){r=(n=v.Hooks.templates[i])[0].split(" ");var s=n[1].match(v.RegEx.valueSplit);"Color"===r[0]&&(r.push(r.shift()),s.push(s.shift()),v.Hooks.templates[i]=[r.join(" "),s.join(" ")])}for(i in v.Hooks.templates)if(v.Hooks.templates.hasOwnProperty(i))for(var o in r=(n=v.Hooks.templates[i])[0].split(" "))if(r.hasOwnProperty(o)){var l=i+r[o],d=o;v.Hooks.registered[l]=[i,d]}},getRoot:function(e){var t=v.Hooks.registered[e];return t?t[0]:e},getUnit:function(e,t){var i=(e.substr(t||0,5).match(/^[a-z%]+/)||[])[0]||"";return i&&d(v.Lists.units)?i:""},fixColors:function(e){return e.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g,(function(e,t,i){return v.Lists.colorNames.hasOwnProperty(i)?(t||"rgba(")+v.Lists.colorNames[i]+(t?"":",1)"):t+i}))},cleanRootPropertyValue:function(e,t){return v.RegEx.valueUnwrap.test(t)&&(t=t.match(v.RegEx.valueUnwrap)[1]),v.Values.isCSSNullValue(t)&&(t=v.Hooks.templates[e][1]),t},extractValue:function(e,t){var i=v.Hooks.registered[e];if(i){var n=i[0],r=i[1];return(t=v.Hooks.cleanRootPropertyValue(n,t)).toString().match(v.RegEx.valueSplit)[r]}return t},injectValue:function(e,t,i){var n=v.Hooks.registered[e];if(n){var r,a=n[0],s=n[1];return(r=(i=v.Hooks.cleanRootPropertyValue(a,i)).toString().match(v.RegEx.valueSplit))[s]=t,r.join(" ")}return i}},Normalizations:{registered:{clip:function(e,t,i){switch(e){case"name":return"clip";case"extract":var n;return v.RegEx.wrappedValueAlreadyExtracted.test(i)?i:(n=i.toString().match(v.RegEx.valueUnwrap))?n[1].replace(/,(\s+)?/g," "):i;case"inject":return"rect("+i+")"}},blur:function(e,t,i){switch(e){case"name":return m.State.isFirefox?"filter":"-webkit-filter";case"extract":var n=parseFloat(i);if(!n&&0!==n){var r=i.toString().match(/blur\(([0-9]+[A-z]+)\)/i);n=r?r[1]:0}return n;case"inject":return parseFloat(i)?"blur("+i+")":"none"}},opacity:function(e,t,i){if(a<=8)switch(e){case"name":return"filter";case"extract":var n=i.toString().match(/alpha\(opacity=(.*)\)/i);return n?n[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(i)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(i),10)+")"}else switch(e){case"name":return"opacity";case"extract":case"inject":return i}}},register:function(){a&&!(a>9)||m.State.isGingerbread||(v.Lists.transformsBase=v.Lists.transformsBase.concat(v.Lists.transforms3D));for(var e=0;e<v.Lists.transformsBase.length;e++)!function(){var t=v.Lists.transformsBase[e];v.Normalizations.registered[t]=function(e,i,r){switch(e){case"name":return"transform";case"extract":return _(i)===n||_(i).transformCache[t]===n?/^scale/i.test(t)?1:0:_(i).transformCache[t].replace(/[()]/g,"");case"inject":var a=!1;switch(t.substr(0,t.length-1)){case"translate":a=!/(%|px|em|rem|vw|vh|\d)$/i.test(r);break;case"scal":case"scale":m.State.isAndroid&&_(i).transformCache[t]===n&&r<1&&(r=1),a=!/(\d)$/i.test(r);break;case"skew":case"rotate":a=!/(deg|\d)$/i.test(r)}return a||(_(i).transformCache[t]="("+r+")"),_(i).transformCache[t]}}}();for(var t=0;t<v.Lists.colors.length;t++)!function(){var e=v.Lists.colors[t];v.Normalizations.registered[e]=function(t,i,r){switch(t){case"name":return e;case"extract":var s;if(v.RegEx.wrappedValueAlreadyExtracted.test(r))s=r;else{var o,l={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(r)?o=l[r]!==n?l[r]:l.black:v.RegEx.isHex.test(r)?o="rgb("+v.Values.hexToRgb(r).join(" ")+")":/^rgba?\(/i.test(r)||(o=l.black),s=(o||r).toString().match(v.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return(!a||a>8)&&3===s.split(" ").length&&(s+=" 1"),s;case"inject":return/^rgb/.test(r)?r:(a<=8?4===r.split(" ").length&&(r=r.split(/\s+/).slice(0,3).join(" ")):3===r.split(" ").length&&(r+=" 1"),(a<=8?"rgb":"rgba")+"("+r.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();function i(e,t,i){if("border-box"===v.getPropertyValue(t,"boxSizing").toString().toLowerCase()===(i||!1)){var n,r,a=0,s="width"===e?["Left","Right"]:["Top","Bottom"],o=["padding"+s[0],"padding"+s[1],"border"+s[0]+"Width","border"+s[1]+"Width"];for(n=0;n<o.length;n++)r=parseFloat(v.getPropertyValue(t,o[n])),isNaN(r)||(a+=r);return i?-a:a}return 0}function r(e,t){return function(n,r,a){switch(n){case"name":return e;case"extract":return parseFloat(a)+i(e,r,t);case"inject":return parseFloat(a)-i(e,r,t)+"px"}}}v.Normalizations.registered.innerWidth=r("width",!0),v.Normalizations.registered.innerHeight=r("height",!0),v.Normalizations.registered.outerWidth=r("width"),v.Normalizations.registered.outerHeight=r("height")}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(a||m.State.isAndroid&&!m.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(m.State.prefixMatches[e])return[m.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],i=0,n=t.length;i<n;i++){var r;if(r=0===i?e:t[i]+e.replace(/^\w/,(function(e){return e.toUpperCase()})),p.isString(m.State.prefixElement.style[r]))return m.State.prefixMatches[e]=r,[r,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t;return e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,n){return t+t+i+i+n+n})),(t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e))?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(e){return!e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){if(e)if(e.classList)e.classList.add(t);else if(p.isString(e.className))e.className+=(e.className.length?" ":"")+t;else{var i=e.getAttribute(a<=7?"className":"class")||"";e.setAttribute("class",i+(i?" ":"")+t)}},removeClass:function(e,t){if(e)if(e.classList)e.classList.remove(t);else if(p.isString(e.className))e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ");else{var i=e.getAttribute(a<=7?"className":"class")||"";e.setAttribute("class",i.replace(new RegExp("(^|s)"+t.split(" ").join("|")+"(s|$)","gi")," "))}}},getPropertyValue:function(e,i,r,s){function o(e,i){var r=0;if(a<=8)r=u.css(e,i);else{var l=!1;/^(width|height)$/.test(i)&&0===v.getPropertyValue(e,"display")&&(l=!0,v.setPropertyValue(e,"display",v.Values.getDisplayType(e)));var d,c=function(){l&&v.setPropertyValue(e,"display","none")};if(!s){if("height"===i&&"border-box"!==v.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var p=e.offsetHeight-(parseFloat(v.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(v.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(v.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(v.getPropertyValue(e,"paddingBottom"))||0);return c(),p}if("width"===i&&"border-box"!==v.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var h=e.offsetWidth-(parseFloat(v.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(v.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(v.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(v.getPropertyValue(e,"paddingRight"))||0);return c(),h}}d=_(e)===n?t.getComputedStyle(e,null):_(e).computedStyle?_(e).computedStyle:_(e).computedStyle=t.getComputedStyle(e,null),"borderColor"===i&&(i="borderTopColor"),""!==(r=9===a&&"filter"===i?d.getPropertyValue(i):d[i])&&null!==r||(r=e.style[i]),c()}if("auto"===r&&/^(top|right|bottom|left)$/i.test(i)){var f=o(e,"position");("fixed"===f||"absolute"===f&&/top|left/i.test(i))&&(r=u(e).position()[i]+"px")}return r}var l;if(v.Hooks.registered[i]){var d=i,c=v.Hooks.getRoot(d);r===n&&(r=v.getPropertyValue(e,v.Names.prefixCheck(c)[0])),v.Normalizations.registered[c]&&(r=v.Normalizations.registered[c]("extract",e,r)),l=v.Hooks.extractValue(d,r)}else if(v.Normalizations.registered[i]){var p,h;"transform"!==(p=v.Normalizations.registered[i]("name",e))&&(h=o(e,v.Names.prefixCheck(p)[0]),v.Values.isCSSNullValue(h)&&v.Hooks.templates[i]&&(h=v.Hooks.templates[i][1])),l=v.Normalizations.registered[i]("extract",e,h)}if(!/^[\d-]/.test(l)){var f=_(e);if(f&&f.isSVG&&v.Names.SVGAttribute(i))if(/^(height|width)$/i.test(i))try{l=e.getBBox()[i]}catch(e){l=0}else l=e.getAttribute(i);else l=o(e,v.Names.prefixCheck(i)[0])}return v.Values.isCSSNullValue(l)&&(l=0),m.debug>=2&&console.log("Get "+i+": "+l),l},setPropertyValue:function(e,i,n,r,s){var o=i;if("scroll"===i)s.container?s.container["scroll"+s.direction]=n:"Left"===s.direction?t.scrollTo(n,s.alternateValue):t.scrollTo(s.alternateValue,n);else if(v.Normalizations.registered[i]&&"transform"===v.Normalizations.registered[i]("name",e))v.Normalizations.registered[i]("inject",e,n),o="transform",n=_(e).transformCache[i];else{if(v.Hooks.registered[i]){var l=i,d=v.Hooks.getRoot(i);r=r||v.getPropertyValue(e,d),n=v.Hooks.injectValue(l,n,r),i=d}if(v.Normalizations.registered[i]&&(n=v.Normalizations.registered[i]("inject",e,n),i=v.Normalizations.registered[i]("name",e)),o=v.Names.prefixCheck(i)[0],a<=8)try{e.style[o]=n}catch(e){m.debug&&console.log("Browser does not support ["+n+"] for ["+o+"]")}else{var c=_(e);c&&c.isSVG&&v.Names.SVGAttribute(i)?e.setAttribute(i,n):e.style[o]=n}m.debug>=2&&console.log("Set "+i+" ("+o+"): "+n)}return[o,n]},flushTransformCache:function(e){var t="",i=_(e);if((a||m.State.isAndroid&&!m.State.isChrome)&&i&&i.isSVG){var n=function(t){return parseFloat(v.getPropertyValue(e,t))},r={translate:[n("translateX"),n("translateY")],skewX:[n("skewX")],skewY:[n("skewY")],scale:1!==n("scale")?[n("scale"),n("scale")]:[n("scaleX"),n("scaleY")],rotate:[n("rotateZ"),0,0]};u.each(_(e).transformCache,(function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),r[e]&&(t+=e+"("+r[e].join(" ")+") ",delete r[e])}))}else{var s,o;u.each(_(e).transformCache,(function(i){if(s=_(e).transformCache[i],"transformPerspective"===i)return o=s,!0;9===a&&"rotateZ"===i&&(i="rotate"),t+=i+s+" "})),o&&(t="perspective"+o+" "+t)}v.setPropertyValue(e,"transform",t)}};v.Hooks.register(),v.Normalizations.register(),m.hook=function(e,t,i){var r;return e=c(e),u.each(e,(function(e,a){if(_(a)===n&&m.init(a),i===n)r===n&&(r=v.getPropertyValue(a,t));else{var s=v.setPropertyValue(a,t,i);"transform"===s[0]&&m.CSS.flushTransformCache(a),r=s}})),r};var y=function(){var e;function r(){return a?b.promise||null:s}var a,s,o,l,h,f,g=arguments[0]&&(arguments[0].p||u.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||p.isString(arguments[0].properties));p.isWrapped(this)?(a=!1,o=0,l=this,s=this):(a=!0,o=1,l=g?arguments[0].elements||arguments[0].e:arguments[0]);var b={promise:null,resolver:null,rejecter:null};if(a&&m.Promise&&(b.promise=new m.Promise((function(e,t){b.resolver=e,b.rejecter=t}))),g?(h=arguments[0].properties||arguments[0].p,f=arguments[0].options||arguments[0].o):(h=arguments[o],f=arguments[o+1]),l=c(l)){var w,E=l.length,S=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(h)&&!u.isPlainObject(f)){f={};for(var I=o+1;I<arguments.length;I++)p.isArray(arguments[I])||!/^(fast|normal|slow)$/i.test(arguments[I])&&!/^\d/.test(arguments[I])?p.isString(arguments[I])||p.isArray(arguments[I])?f.easing=arguments[I]:p.isFunction(arguments[I])&&(f.complete=arguments[I]):f.duration=arguments[I]}switch(h){case"scroll":w="scroll";break;case"reverse":w="reverse";break;case"pause":var $=(new Date).getTime();return u.each(l,(function(e,t){x(t,$)})),u.each(m.State.calls,(function(e,t){var i=!1;t&&u.each(t[1],(function(e,r){var a=f===n?"":f;return!0!==a&&t[2].queue!==a&&(f!==n||!1!==t[2].queue)||(u.each(l,(function(e,n){if(n===r)return t[5]={resume:!1},i=!0,!1})),!i&&void 0)}))})),r();case"resume":return u.each(l,(function(e,t){C(t)})),u.each(m.State.calls,(function(e,t){var i=!1;t&&u.each(t[1],(function(e,r){var a=f===n?"":f;return!0!==a&&t[2].queue!==a&&(f!==n||!1!==t[2].queue)||!t[5]||(u.each(l,(function(e,n){if(n===r)return t[5].resume=!0,i=!0,!1})),!i&&void 0)}))})),r();case"finish":case"finishAll":case"stop":u.each(l,(function(e,t){_(t)&&_(t).delayTimer&&(clearTimeout(_(t).delayTimer.setTimeout),_(t).delayTimer.next&&_(t).delayTimer.next(),delete _(t).delayTimer),"finishAll"!==h||!0!==f&&!p.isString(f)||(u.each(u.queue(t,p.isString(f)?f:""),(function(e,t){p.isFunction(t)&&t()})),u.queue(t,p.isString(f)?f:"",[]))}));var A=[];return u.each(m.State.calls,(function(e,t){t&&u.each(t[1],(function(i,r){var a=f===n?"":f;if(!0!==a&&t[2].queue!==a&&(f!==n||!1!==t[2].queue))return!0;u.each(l,(function(i,n){if(n===r)if((!0===f||p.isString(f))&&(u.each(u.queue(n,p.isString(f)?f:""),(function(e,t){p.isFunction(t)&&t(null,!0)})),u.queue(n,p.isString(f)?f:"",[])),"stop"===h){var s=_(n);s&&s.tweensContainer&&(!0===a||""===a)&&u.each(s.tweensContainer,(function(e,t){t.endValue=t.currentValue})),A.push(e)}else"finish"!==h&&"finishAll"!==h||(t[2].duration=1)}))}))})),"stop"===h&&(u.each(A,(function(e,t){P(t,!0)})),b.promise&&b.resolver(l)),r();default:if(!u.isPlainObject(h)||p.isEmptyObject(h)){if(p.isString(h)&&m.Redirects[h]){var M=(e=u.extend({},f)).duration,z=e.delay||0;return!0===e.backwards&&(l=u.extend(!0,[],l).reverse()),u.each(l,(function(t,i){parseFloat(e.stagger)?e.delay=z+parseFloat(e.stagger)*t:p.isFunction(e.stagger)&&(e.delay=z+e.stagger.call(i,t,E)),e.drag&&(e.duration=parseFloat(M)||(/^(callout|transition)/.test(h)?1e3:400),e.duration=Math.max(e.duration*(e.backwards?1-t/E:(t+1)/E),.75*e.duration,200)),m.Redirects[h].call(i,i,e||{},t,E,l,b.promise?b:n)})),r()}var O="Velocity: First argument ("+h+") was not a property map, a known action, or a registered redirect. Aborting.";return b.promise?b.rejecter(new Error(O)):t.console&&console.log(O),r()}w="start"}var L={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},N=[];u.each(l,(function(e,r){p.isNode(r)&&function(e,r){var a,s,o=u.extend({},m.defaults,f),c={};switch(_(e)===n&&m.init(e),parseFloat(o.delay)&&!1!==o.queue&&u.queue(e,o.queue,(function(t,i){if(!0===i)return!0;m.velocityQueueEntryFlag=!0;var n=m.State.delayedElements.count++;m.State.delayedElements[n]=e;var r,a=(r=n,function(){m.State.delayedElements[r]=!1,t()});_(e).delayBegin=(new Date).getTime(),_(e).delay=parseFloat(o.delay),_(e).delayTimer={setTimeout:setTimeout(t,parseFloat(o.delay)),next:a}})),o.duration.toString().toLowerCase()){case"fast":o.duration=200;break;case"normal":o.duration=400;break;case"slow":o.duration=600;break;default:o.duration=parseFloat(o.duration)||1}function g(s){var g,y,x,C,P,I;if(o.begin&&0===S)try{o.begin.call(l,l)}catch(e){setTimeout((function(){throw e}),1)}if("scroll"===w){var $,A,M,z=/^x$/i.test(o.axis)?"Left":"Top",O=parseFloat(o.offset)||0;o.container?p.isWrapped(o.container)||p.isNode(o.container)?(o.container=o.container[0]||o.container,M=($=o.container["scroll"+z])+u(e).position()[z.toLowerCase()]+O):o.container=null:($=m.State.scrollAnchor[m.State["scrollProperty"+z]],A=m.State.scrollAnchor[m.State["scrollProperty"+("Left"===z?"Top":"Left")]],M=u(e).offset()[z.toLowerCase()]+O),c={scroll:{rootPropertyValue:!1,startValue:$,currentValue:$,endValue:M,unitType:"",easing:o.easing,scrollData:{container:o.container,direction:z,alternateValue:A}},element:e},m.debug&&console.log("tweensContainer (scroll): ",c.scroll,e)}else if("reverse"===w){if(!(g=_(e)))return;if(!g.tweensContainer)return void u.dequeue(e,o.queue);for(var D in"none"===g.opts.display&&(g.opts.display="auto"),"hidden"===g.opts.visibility&&(g.opts.visibility="visible"),g.opts.loop=!1,g.opts.begin=null,g.opts.complete=null,f.easing||delete o.easing,f.duration||delete o.duration,o=u.extend({},g.opts,o),y=u.extend(!0,{},g?g.tweensContainer:null))if(y.hasOwnProperty(D)&&"element"!==D){var j=y[D].startValue;y[D].startValue=y[D].currentValue=y[D].endValue,y[D].endValue=j,p.isEmptyObject(f)||(y[D].easing=o.easing),m.debug&&console.log("reverse tweensContainer ("+D+"): "+JSON.stringify(y[D]),e)}c=y}else if("start"===w){(g=_(e))&&g.tweensContainer&&!0===g.isAnimating&&(y=g.tweensContainer);var H=function(r,s){var l,d=v.Hooks.getRoot(r),h=!1,f=s[0],b=s[1],w=s[2];if(g&&g.isSVG||"tween"===d||!1!==v.Names.prefixCheck(d)[1]||v.Normalizations.registered[d]!==n){(o.display!==n&&null!==o.display&&"none"!==o.display||o.visibility!==n&&"hidden"!==o.visibility)&&/opacity|filter/.test(r)&&!w&&0!==f&&(w=0),o._cacheValues&&y&&y[r]?(w===n&&(w=y[r].endValue+y[r].unitType),h=g.rootPropertyValueCache[d]):v.Hooks.registered[r]?w===n?(h=v.getPropertyValue(e,d),w=v.getPropertyValue(e,r,h)):h=v.Hooks.templates[d][1]:w===n&&(w=v.getPropertyValue(e,r));var _,x,C,E=!1,S=function(e,t){var i,n;return n=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,(function(e){return i=e,""})),i||(i=v.Values.getUnitType(e)),[n,i]};if(w!==f&&p.isString(w)&&p.isString(f)){l="";var T=0,k=0,P=[],I=[],$=0,A=0,M=0;for(w=v.Hooks.fixColors(w),f=v.Hooks.fixColors(f);T<w.length&&k<f.length;){var z=w[T],O=f[k];if(/[\d\.-]/.test(z)&&/[\d\.-]/.test(O)){for(var N=z,D=O,j=".",H=".";++T<w.length;){if((z=w[T])===j)j="..";else if(!/\d/.test(z))break;N+=z}for(;++k<f.length;){if((O=f[k])===H)H="..";else if(!/\d/.test(O))break;D+=O}var F=v.Hooks.getUnit(w,T),B=v.Hooks.getUnit(f,k);if(T+=F.length,k+=B.length,F===B)N===D?l+=N+F:(l+="{"+P.length+(A?"!":"")+"}"+F,P.push(parseFloat(N)),I.push(parseFloat(D)));else{var q=parseFloat(N),V=parseFloat(D);l+=($<5?"calc":"")+"("+(q?"{"+P.length+(A?"!":"")+"}":"0")+F+" + "+(V?"{"+(P.length+(q?1:0))+(A?"!":"")+"}":"0")+B+")",q&&(P.push(q),I.push(0)),V&&(P.push(0),I.push(V))}}else{if(z!==O){$=0;break}l+=z,T++,k++,0===$&&"c"===z||1===$&&"a"===z||2===$&&"l"===z||3===$&&"c"===z||$>=4&&"("===z?$++:($&&$<5||$>=4&&")"===z&&--$<5)&&($=0),0===A&&"r"===z||1===A&&"g"===z||2===A&&"b"===z||3===A&&"a"===z||A>=3&&"("===z?(3===A&&"a"===z&&(M=1),A++):M&&","===z?++M>3&&(A=M=0):(M&&A<(M?5:4)||A>=(M?4:3)&&")"===z&&--A<(M?5:4))&&(A=M=0)}}T===w.length&&k===f.length||(m.debug&&console.error('Trying to pattern match mis-matched strings ["'+f+'", "'+w+'"]'),l=n),l&&(P.length?(m.debug&&console.log('Pattern found "'+l+'" -> ',P,I,"["+w+","+f+"]"),w=P,f=I,x=C=""):l=n)}if(l||(w=(_=S(r,w))[0],C=_[1],f=(_=S(r,f))[0].replace(/^([+-\/*])=/,(function(e,t){return E=t,""})),x=_[1],w=parseFloat(w)||0,f=parseFloat(f)||0,"%"===x&&(/^(fontSize|lineHeight)$/.test(r)?(f/=100,x="em"):/^scale/.test(r)?(f/=100,x=""):/(Red|Green|Blue)$/i.test(r)&&(f=f/100*255,x=""))),/[\/*]/.test(E))x=C;else if(C!==x&&0!==w)if(0===f)x=C;else{a=a||function(){var n={myParent:e.parentNode||i.body,position:v.getPropertyValue(e,"position"),fontSize:v.getPropertyValue(e,"fontSize")},r=n.position===L.lastPosition&&n.myParent===L.lastParent,a=n.fontSize===L.lastFontSize;L.lastParent=n.myParent,L.lastPosition=n.position,L.lastFontSize=n.fontSize;var s=100,o={};if(a&&r)o.emToPx=L.lastEmToPx,o.percentToPxWidth=L.lastPercentToPxWidth,o.percentToPxHeight=L.lastPercentToPxHeight;else{var l=g&&g.isSVG?i.createElementNS("http://www.w3.org/2000/svg","rect"):i.createElement("div");m.init(l),n.myParent.appendChild(l),u.each(["overflow","overflowX","overflowY"],(function(e,t){m.CSS.setPropertyValue(l,t,"hidden")})),m.CSS.setPropertyValue(l,"position",n.position),m.CSS.setPropertyValue(l,"fontSize",n.fontSize),m.CSS.setPropertyValue(l,"boxSizing","content-box"),u.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],(function(e,t){m.CSS.setPropertyValue(l,t,s+"%")})),m.CSS.setPropertyValue(l,"paddingLeft",s+"em"),o.percentToPxWidth=L.lastPercentToPxWidth=(parseFloat(v.getPropertyValue(l,"width",null,!0))||1)/s,o.percentToPxHeight=L.lastPercentToPxHeight=(parseFloat(v.getPropertyValue(l,"height",null,!0))||1)/s,o.emToPx=L.lastEmToPx=(parseFloat(v.getPropertyValue(l,"paddingLeft"))||1)/s,n.myParent.removeChild(l)}return null===L.remToPx&&(L.remToPx=parseFloat(v.getPropertyValue(i.body,"fontSize"))||16),null===L.vwToPx&&(L.vwToPx=parseFloat(t.innerWidth)/100,L.vhToPx=parseFloat(t.innerHeight)/100),o.remToPx=L.remToPx,o.vwToPx=L.vwToPx,o.vhToPx=L.vhToPx,m.debug>=1&&console.log("Unit ratios: "+JSON.stringify(o),e),o}();var W=/margin|padding|left|right|width|text|word|letter/i.test(r)||/X$/.test(r)||"x"===r?"x":"y";switch(C){case"%":w*="x"===W?a.percentToPxWidth:a.percentToPxHeight;break;case"px":break;default:w*=a[C+"ToPx"]}switch(x){case"%":w*=1/("x"===W?a.percentToPxWidth:a.percentToPxHeight);break;case"px":break;default:w*=1/a[x+"ToPx"]}}switch(E){case"+":f=w+f;break;case"-":f=w-f;break;case"*":f*=w;break;case"/":f=w/f}c[r]={rootPropertyValue:h,startValue:w,currentValue:w,endValue:f,unitType:x,easing:b},l&&(c[r].pattern=l),m.debug&&console.log("tweensContainer ("+r+"): "+JSON.stringify(c[r]),e)}else m.debug&&console.log("Skipping ["+d+"] due to a lack of browser support.")};for(var F in h)if(h.hasOwnProperty(F)){var B=v.Names.camelCase(F),q=(x=h[F],void 0,C=void 0,P=void 0,I=void 0,p.isFunction(x)&&(x=x.call(e,r,E)),p.isArray(x)?(C=x[0],!p.isArray(x[1])&&/^[\d-]/.test(x[1])||p.isFunction(x[1])||v.RegEx.isHex.test(x[1])?I=x[1]:p.isString(x[1])&&!v.RegEx.isHex.test(x[1])&&m.Easings[x[1]]||p.isArray(x[1])?(P=T(x[1],o.duration),I=x[2]):I=x[1]||x[2]):C=x,P=P||o.easing,p.isFunction(C)&&(C=C.call(e,r,E)),p.isFunction(I)&&(I=I.call(e,r,E)),[C||0,P,I]);if(d(v.Lists.colors)){var V=q[0],W=q[1],R=q[2];if(v.RegEx.isHex.test(V)){for(var Y=["Red","Green","Blue"],G=v.Values.hexToRgb(V),X=R?v.Values.hexToRgb(R):n,U=0;U<Y.length;U++){var Q=[G[U]];W&&Q.push(W),X!==n&&Q.push(X[U]),H(B+Y[U],Q)}continue}}H(B,q)}c.element=e}c.element&&(v.Values.addClass(e,"velocity-animating"),N.push(c),(g=_(e))&&(""===o.queue&&(g.tweensContainer=c,g.opts=o),g.isAnimating=!0),S===E-1?(m.State.calls.push([N,l,o,null,b.resolver,null,0]),!1===m.State.isTicking&&(m.State.isTicking=!0,k())):S++)}if(!1!==m.mock&&(!0===m.mock?o.duration=o.delay=1:(o.duration*=parseFloat(m.mock)||1,o.delay*=parseFloat(m.mock)||1)),o.easing=T(o.easing,o.duration),o.begin&&!p.isFunction(o.begin)&&(o.begin=null),o.progress&&!p.isFunction(o.progress)&&(o.progress=null),o.complete&&!p.isFunction(o.complete)&&(o.complete=null),o.display!==n&&null!==o.display&&(o.display=o.display.toString().toLowerCase(),"auto"===o.display&&(o.display=m.CSS.Values.getDisplayType(e))),o.visibility!==n&&null!==o.visibility&&(o.visibility=o.visibility.toString().toLowerCase()),o.mobileHA=o.mobileHA&&m.State.isMobile&&!m.State.isGingerbread,!1===o.queue)if(o.delay){var y=m.State.delayedElements.count++;m.State.delayedElements[y]=e;var x=(s=y,function(){m.State.delayedElements[s]=!1,g()});_(e).delayBegin=(new Date).getTime(),_(e).delay=parseFloat(o.delay),_(e).delayTimer={setTimeout:setTimeout(g,parseFloat(o.delay)),next:x}}else g();else u.queue(e,o.queue,(function(e,t){if(!0===t)return b.promise&&b.resolver(l),!0;m.velocityQueueEntryFlag=!0,g()}));""!==o.queue&&"fx"!==o.queue||"inprogress"===u.queue(e)[0]||u.dequeue(e)}(r,e)})),(e=u.extend({},m.defaults,f)).loop=parseInt(e.loop,10);var D=2*e.loop-1;if(e.loop)for(var j=0;j<D;j++){var H={delay:e.delay,progress:e.progress};j===D-1&&(H.display=e.display,H.visibility=e.visibility,H.complete=e.complete),y(l,"reverse",H)}return r()}b.promise&&(h&&f&&!1===f.promiseRejectEmpty?b.resolver():b.rejecter())};(m=u.extend(y,m)).animate=y;var b=t.requestAnimationFrame||s;if(!m.State.isMobile&&i.hidden!==n){var w=function(){i.hidden?(b=function(e){return setTimeout((function(){e(!0)}),16)},k()):b=t.requestAnimationFrame||s};w(),i.addEventListener("visibilitychange",w)}return e.Velocity=m,e!==t&&(e.fn.velocity=y,e.fn.velocity.defaults=m.defaults),u.each(["Down","Up"],(function(e,t){m.Redirects["slide"+t]=function(e,i,r,a,s,o){var l=u.extend({},i),d=l.begin,c=l.complete,p={},h={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};l.display===n&&(l.display="Down"===t?"inline"===m.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),l.begin=function(){for(var i in 0===r&&d&&d.call(s,s),h)if(h.hasOwnProperty(i)){p[i]=e.style[i];var n=v.getPropertyValue(e,i);h[i]="Down"===t?[n,0]:[0,n]}p.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in p)p.hasOwnProperty(t)&&(e.style[t]=p[t]);r===a-1&&(c&&c.call(s,s),o&&o.resolver(s))},m(e,h,l)}})),u.each(["In","Out"],(function(e,t){m.Redirects["fade"+t]=function(e,i,r,a,s,o){var l=u.extend({},i),d=l.complete,c={opacity:"In"===t?1:0};0!==r&&(l.begin=null),l.complete=r!==a-1?null:function(){d&&d.call(s,s),o&&o.resolver(s)},l.display===n&&(l.display="In"===t?"auto":"none"),m(this,c,l)}})),m}function _(e){var t=u.data(e,"velocity");return null===t?n:t}function x(e,t){var i=_(e);i&&i.delayTimer&&!i.delayPaused&&(i.delayRemaining=i.delay-t+i.delayBegin,i.delayPaused=!0,clearTimeout(i.delayTimer.setTimeout))}function C(e,t){var i=_(e);i&&i.delayTimer&&i.delayPaused&&(i.delayPaused=!1,i.delayTimer.setTimeout=setTimeout(i.delayTimer.next,i.delayRemaining))}function E(e){return function(t){return Math.round(t*e)*(1/e)}}function S(e,i,n,r){var a=.1,s="Float32Array"in t;if(4!==arguments.length)return!1;for(var o=0;o<4;++o)if("number"!=typeof arguments[o]||isNaN(arguments[o])||!isFinite(arguments[o]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var l=s?new Float32Array(11):new Array(11);function d(e,t){return 1-3*t+3*e}function c(e,t){return 3*t-6*e}function u(e){return 3*e}function p(e,t,i){return((d(t,i)*e+c(t,i))*e+u(t))*e}function h(e,t,i){return 3*d(t,i)*e*e+2*c(t,i)*e+u(t)}var f=!1;var m=function(t){return f||(f=!0,e===i&&n===r||function(){for(var t=0;t<11;++t)l[t]=p(t*a,e,n)}()),e===i&&n===r?t:0===t?0:1===t?1:p(function(t){for(var i=0,r=1;10!==r&&l[r]<=t;++r)i+=a;--r;var s=i+(t-l[r])/(l[r+1]-l[r])*a,o=h(s,e,n);return o>=.001?function(t,i){for(var r=0;r<4;++r){var a=h(i,e,n);if(0===a)return i;i-=(p(i,e,n)-t)/a}return i}(t,s):0===o?s:function(t,i,r){var a,s,o=0;do{(a=p(s=i+(r-i)/2,e,n)-t)>0?r=s:i=s}while(Math.abs(a)>1e-7&&++o<10);return s}(t,i,i+a)}(t),i,r)};m.getControlPoints=function(){return[{x:e,y:i},{x:n,y:r}]};var g="generateBezier("+[e,i,n,r]+")";return m.toString=function(){return g},m}function T(e,t){var i=e;return p.isString(e)?m.Easings[e]||(i=!1):i=p.isArray(e)&&1===e.length?E.apply(null,e):p.isArray(e)&&2===e.length?g.apply(null,e.concat([t])):!(!p.isArray(e)||4!==e.length)&&S.apply(null,e),!1===i&&(i=m.Easings[m.defaults.easing]?m.defaults.easing:f),i}function k(e){if(e){var t=m.timestamp&&!0!==e?e:o.now(),i=m.State.calls.length;i>1e4&&(m.State.calls=function(e){for(var t=-1,i=e?e.length:0,n=[];++t<i;){var r=e[t];r&&n.push(r)}return n}(m.State.calls),i=m.State.calls.length);for(var r=0;r<i;r++)if(m.State.calls[r]){var s=m.State.calls[r],l=s[0],d=s[2],c=s[3],h=!c,f=null,g=s[5],y=s[6];if(c||(c=m.State.calls[r][3]=t-16),g){if(!0!==g.resume)continue;c=s[3]=Math.round(t-y-16),s[5]=null}y=s[6]=t-c;for(var w=Math.min(y/d.duration,1),x=0,C=l.length;x<C;x++){var E=l[x],S=E.element;if(_(S)){var T=!1;for(var I in d.display!==n&&null!==d.display&&"none"!==d.display&&("flex"===d.display&&u.each(["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"],(function(e,t){v.setPropertyValue(S,"display",t)})),v.setPropertyValue(S,"display",d.display)),d.visibility!==n&&"hidden"!==d.visibility&&v.setPropertyValue(S,"visibility",d.visibility),E)if(E.hasOwnProperty(I)&&"element"!==I){var $,A=E[I],M=p.isString(A.easing)?m.Easings[A.easing]:A.easing;if(p.isString(A.pattern)){var z=1===w?function(e,t,i){var n=A.endValue[t];return i?Math.round(n):n}:function(e,t,i){var n=A.startValue[t],r=A.endValue[t]-n,a=n+r*M(w,d,r);return i?Math.round(a):a};$=A.pattern.replace(/{(\d+)(!)?}/g,z)}else if(1===w)$=A.endValue;else{var O=A.endValue-A.startValue;$=A.startValue+O*M(w,d,O)}if(!h&&$===A.currentValue)continue;if(A.currentValue=$,"tween"===I)f=$;else{var L;if(v.Hooks.registered[I]){L=v.Hooks.getRoot(I);var N=_(S).rootPropertyValueCache[L];N&&(A.rootPropertyValue=N)}var D=v.setPropertyValue(S,I,A.currentValue+(a<9&&0===parseFloat($)?"":A.unitType),A.rootPropertyValue,A.scrollData);v.Hooks.registered[I]&&(v.Normalizations.registered[L]?_(S).rootPropertyValueCache[L]=v.Normalizations.registered[L]("extract",null,D[1]):_(S).rootPropertyValueCache[L]=D[1]),"transform"===D[0]&&(T=!0)}}d.mobileHA&&_(S).transformCache.translate3d===n&&(_(S).transformCache.translate3d="(0px, 0px, 0px)",T=!0),T&&v.flushTransformCache(S)}}d.display!==n&&"none"!==d.display&&(m.State.calls[r][2].display=!1),d.visibility!==n&&"hidden"!==d.visibility&&(m.State.calls[r][2].visibility=!1),d.progress&&d.progress.call(s[1],s[1],w,Math.max(0,c+d.duration-t),c,f),1===w&&P(r)}}m.State.isTicking&&b(k)}function P(e,t){if(!m.State.calls[e])return!1;for(var i=m.State.calls[e][0],r=m.State.calls[e][1],a=m.State.calls[e][2],s=m.State.calls[e][4],o=!1,l=0,d=i.length;l<d;l++){var c=i[l].element;t||a.loop||("none"===a.display&&v.setPropertyValue(c,"display",a.display),"hidden"===a.visibility&&v.setPropertyValue(c,"visibility",a.visibility));var p=_(c);if(!0!==a.loop&&(u.queue(c)[1]===n||!/\.velocityQueueEntryFlag/i.test(u.queue(c)[1]))&&p){p.isAnimating=!1,p.rootPropertyValueCache={};var h=!1;u.each(v.Lists.transforms3D,(function(e,t){var i=/^scale/.test(t)?1:0,r=p.transformCache[t];p.transformCache[t]!==n&&new RegExp("^\\("+i+"[^.]").test(r)&&(h=!0,delete p.transformCache[t])})),a.mobileHA&&(h=!0,delete p.transformCache.translate3d),h&&v.flushTransformCache(c),v.Values.removeClass(c,"velocity-animating")}if(!t&&a.complete&&!a.loop&&l===d-1)try{a.complete.call(r,r)}catch(e){setTimeout((function(){throw e}),1)}s&&!0!==a.loop&&s(r),p&&!0===a.loop&&!t&&(u.each(p.tweensContainer,(function(e,t){if(/^rotate/.test(e)&&(parseFloat(t.startValue)-parseFloat(t.endValue))%360==0){var i=t.startValue;t.startValue=t.endValue,t.endValue=i}/^backgroundPosition/.test(e)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)})),m(c,"reverse",{loop:!0,delay:a.delay})),!1!==a.queue&&u.dequeue(c,a.queue)}m.State.calls[e]=!1;for(var f=0,g=m.State.calls.length;f<g;f++)if(!1!==m.State.calls[f]){o=!0;break}!1===o&&(m.State.isTicking=!1,delete m.State.calls,m.State.calls=[])}jQuery.fn.velocity=jQuery.fn.animate}(window.jQuery||window.Zepto||window,window,window?window.document:void 0)}))},21:()=>{!function(){"use strict";var e=0,t={};function i(n){if(!n)throw new Error("No options passed to Waypoint constructor");if(!n.element)throw new Error("No element option passed to Waypoint constructor");if(!n.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=i.Adapter.extend({},i.defaults,n),this.element=this.options.element,this.adapter=new i.Adapter(this.element),this.callback=n.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=i.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=i.Context.findOrCreateByElement(this.options.context),i.offsetAliases[this.options.offset]&&(this.options.offset=i.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),t[this.key]=this,e+=1}i.prototype.queueTrigger=function(e){this.group.queueTrigger(this,e)},i.prototype.trigger=function(e){this.enabled&&this.callback&&this.callback.apply(this,e)},i.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete t[this.key]},i.prototype.disable=function(){return this.enabled=!1,this},i.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},i.prototype.next=function(){return this.group.next(this)},i.prototype.previous=function(){return this.group.previous(this)},i.invokeAll=function(e){var i=[];for(var n in t)i.push(t[n]);for(var r=0,a=i.length;r<a;r++)i[r][e]()},i.destroyAll=function(){i.invokeAll("destroy")},i.disableAll=function(){i.invokeAll("disable")},i.enableAll=function(){for(var e in i.Context.refreshAll(),t)t[e].enabled=!0;return this},i.refreshAll=function(){i.Context.refreshAll()},i.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},i.viewportWidth=function(){return document.documentElement.clientWidth},i.adapters=[],i.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},i.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=i}(),function(){"use strict";function e(e){window.setTimeout(e,1e3/60)}var t=0,i={},n=window.Waypoint,r=window.onload;function a(e){this.element=e,this.Adapter=n.Adapter,this.adapter=new this.Adapter(e),this.key="waypoint-context-"+t,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},e.waypointContextKey=this.key,i[e.waypointContextKey]=this,t+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new a(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}a.prototype.add=function(e){var t=e.options.horizontal?"horizontal":"vertical";this.waypoints[t][e.key]=e,this.refresh()},a.prototype.checkEmpty=function(){var e=this.Adapter.isEmptyObject(this.waypoints.horizontal),t=this.Adapter.isEmptyObject(this.waypoints.vertical),n=this.element==this.element.window;e&&t&&!n&&(this.adapter.off(".waypoints"),delete i[this.key])},a.prototype.createThrottledResizeHandler=function(){var e=this;function t(){e.handleResize(),e.didResize=!1}this.adapter.on("resize.waypoints",(function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))}))},a.prototype.createThrottledScrollHandler=function(){var e=this;function t(){e.handleScroll(),e.didScroll=!1}this.adapter.on("scroll.waypoints",(function(){e.didScroll&&!n.isTouch||(e.didScroll=!0,n.requestAnimationFrame(t))}))},a.prototype.handleResize=function(){n.Context.refreshAll()},a.prototype.handleScroll=function(){var e={},t={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in t){var n=t[i],r=n.newScroll>n.oldScroll?n.forward:n.backward;for(var a in this.waypoints[i]){var s=this.waypoints[i][a];if(null!==s.triggerPoint){var o=n.oldScroll<s.triggerPoint,l=n.newScroll>=s.triggerPoint;(o&&l||!o&&!l)&&(s.queueTrigger(r),e[s.group.id]=s.group)}}}for(var d in e)e[d].flushTriggers();this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}},a.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},a.prototype.remove=function(e){delete this.waypoints[e.axis][e.key],this.checkEmpty()},a.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},a.prototype.destroy=function(){var e=[];for(var t in this.waypoints)for(var i in this.waypoints[t])e.push(this.waypoints[t][i]);for(var n=0,r=e.length;n<r;n++)e[n].destroy()},a.prototype.refresh=function(){var e,t=this.element==this.element.window,i=t?void 0:this.adapter.offset(),r={};for(var a in this.handleScroll(),e={horizontal:{contextOffset:t?0:i.left,contextScroll:t?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:t?0:i.top,contextScroll:t?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var s=e[a];for(var o in this.waypoints[a]){var l,d,c,u,p=this.waypoints[a][o],h=p.options.offset,f=p.triggerPoint,m=0,g=null==f;p.element!==p.element.window&&(m=p.adapter.offset()[s.offsetProp]),"function"==typeof h?h=h.apply(p):"string"==typeof h&&(h=parseFloat(h),p.options.offset.indexOf("%")>-1&&(h=Math.ceil(s.contextDimension*h/100))),l=s.contextScroll-s.contextOffset,p.triggerPoint=Math.floor(m+l-h),d=f<s.oldScroll,c=p.triggerPoint>=s.oldScroll,u=!d&&!c,!g&&d&&c?(p.queueTrigger(s.backward),r[p.group.id]=p.group):(!g&&u||g&&s.oldScroll>=p.triggerPoint)&&(p.queueTrigger(s.forward),r[p.group.id]=p.group)}}return n.requestAnimationFrame((function(){for(var e in r)r[e].flushTriggers()})),this},a.findOrCreateByElement=function(e){return a.findByElement(e)||new a(e)},a.refreshAll=function(){for(var e in i)i[e].refresh()},a.findByElement=function(e){return i[e.waypointContextKey]},window.onload=function(){r&&r(),a.refreshAll()},n.requestAnimationFrame=function(t){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||e).call(window,t)},n.Context=a}(),function(){"use strict";function e(e,t){return e.triggerPoint-t.triggerPoint}function t(e,t){return t.triggerPoint-e.triggerPoint}var i={vertical:{},horizontal:{}},n=window.Waypoint;function r(e){this.name=e.name,this.axis=e.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),i[this.axis][this.name]=this}r.prototype.add=function(e){this.waypoints.push(e)},r.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},r.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var n=this.triggerQueues[i],r="up"===i||"left"===i;n.sort(r?t:e);for(var a=0,s=n.length;a<s;a+=1){var o=n[a];(o.options.continuous||a===n.length-1)&&o.trigger([i])}}this.clearTriggerQueues()},r.prototype.next=function(t){this.waypoints.sort(e);var i=n.Adapter.inArray(t,this.waypoints);return i===this.waypoints.length-1?null:this.waypoints[i+1]},r.prototype.previous=function(t){this.waypoints.sort(e);var i=n.Adapter.inArray(t,this.waypoints);return i?this.waypoints[i-1]:null},r.prototype.queueTrigger=function(e,t){this.triggerQueues[t].push(e)},r.prototype.remove=function(e){var t=n.Adapter.inArray(e,this.waypoints);t>-1&&this.waypoints.splice(t,1)},r.prototype.first=function(){return this.waypoints[0]},r.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},r.findOrCreate=function(e){return i[e.axis][e.name]||new r(e)},n.Group=r}(),function(){"use strict";var e=window.jQuery,t=window.Waypoint;function i(t){this.$element=e(t)}e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],(function(e,t){i.prototype[t]=function(){var e=Array.prototype.slice.call(arguments);return this.$element[t].apply(this.$element,e)}})),e.each(["extend","inArray","isEmptyObject"],(function(t,n){i[n]=e[n]})),t.adapters.push({name:"jquery",Adapter:i}),t.Adapter=i}(),function(){"use strict";var e=window.Waypoint;function t(t){return function(){var i=[],n=arguments[0];return t.isFunction(arguments[0])&&((n=t.extend({},arguments[1])).handler=arguments[0]),this.each((function(){var r=t.extend({},n,{element:this});"string"==typeof r.context&&(r.context=t(this).closest(r.context)[0]),i.push(new e(r))})),i}}window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}()},237:()=>{!function(){"use strict";var e=window.jQuery,t=window.Waypoint;function i(n){this.options=e.extend({},t.defaults,i.defaults,n),this.element=this.options.element,this.$element=e(this.element),this.createWrapper(),this.createWaypoint()}i.prototype.createWaypoint=function(){var i=this.options.handler;this.waypoint=new t(e.extend({},this.options,{element:this.wrapper,handler:e.proxy((function(e){var t=this.options.direction.indexOf(e)>-1,n=t?this.$element.outerHeight(!0):"";this.$wrapper.height(n),this.$element.toggleClass(this.options.stuckClass,t),i&&i.call(this,e)}),this)}))},i.prototype.createWrapper=function(){this.options.wrapper&&this.$element.wrap(this.options.wrapper),this.$wrapper=this.$element.parent(),this.wrapper=this.$wrapper[0]},i.prototype.destroy=function(){this.$element.parent()[0]===this.wrapper&&(this.waypoint.destroy(),this.$element.removeClass(this.options.stuckClass),this.options.wrapper&&this.$element.unwrap())},i.defaults={wrapper:'<div class="sticky-wrapper" />',stuckClass:"stuck",direction:"down right"},t.Sticky=i}()},948:(e,t,i)=>{var n=i(992),r=i(5);void 0===r.Tether&&(r.Tether=n),e.exports=n},311:e=>{"use strict";e.exports=jQuery}},t={};function i(n){var r=t[n];if(void 0!==r)return r.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";i.d({},{B:()=>Z,f:()=>F}),i(948),i(615),i(661);const e=prestashop;var t=i.n(e),n=i(311),r=i.n(n);t().themeSelectors={product:{tabs:".tabs .nav-link",activeNavClass:"js-product-nav-active",activeTabClass:"js-product-tab-active",activeTabs:".tabs .nav-link.active, .js-product-nav-active",imagesModal:".js-product-images-modal",thumb:".js-thumb",thumbContainer:".thumb-container, .js-thumb-container",arrows:".js-arrows",selected:".selected, .js-thumb-selected",modalProductCover:".js-modal-product-cover",cover:".js-qv-product-cover",customizationModal:".js-customization-modal"},listing:{searchFilterToggler:"#search_filter_toggler, .js-search-toggler",searchFiltersWrapper:"#search_filters_wrapper",searchFilterControls:"#search_filter_controls",searchFilters:"#search_filters",activeSearchFilters:"#js-active-search-filters",listTop:"#js-product-list-top",product:".js-product",list:"#js-product-list",listBottom:"#js-product-list-bottom",listHeader:"#js-product-list-header",searchFiltersClearAll:".js-search-filters-clear-all",searchLink:".js-search-link"},order:{returnForm:"#order-return-form, .js-order-return-form"},arrowDown:".arrow-down, .js-arrow-down",arrowUp:".arrow-up, .js-arrow-up",clear:".clear",fileInput:".js-file-input",contentWrapper:"#content-wrapper, .js-content-wrapper",footer:"#footer, .js-footer",modalContent:".js-modal-content",modal:"#modal, .js-checkout-modal",touchspin:".js-touchspin",checkout:{termsLink:".js-terms a",giftCheckbox:".js-gift-checkbox",imagesLink:".card-block .cart-summary-products p a, .js-show-details",carrierExtraContent:".carrier-extra-content, .js-carrier-extra-content",btn:".checkout a"},cart:{productLineQty:".js-cart-line-product-quantity",quickview:".quickview",touchspin:".bootstrap-touchspin",promoCode:"#promo-code",displayPromo:".display-promo",promoCodeButton:".promo-code-button",discountCode:".js-discount .code",discountName:"[name=discount_name]",actions:'[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]'},notifications:{dangerAlert:"#notifications article.alert-danger",container:"#notifications .notifications-container"},passwordPolicy:{template:"#password-feedback",hint:".js-hint-password",container:".password-strength-feedback",strengthText:".password-strength-text",requirementScore:".password-requirements-score",requirementLength:".password-requirements-length",requirementScoreIcon:".password-requirements-score i",requirementLengthIcon:".password-requirements-length i",progressBar:".progress-bar",inputColumn:".js-input-column"}},r()(document).ready((()=>{t().emit("themeSelectorsInit")}));var a=i(181),s=i.n(a),o=i(440),l=i.n(o);function d(e,t){var i=t.children().detach();t.empty().append(e.children().detach()),e.append(i)}function c(){t().responsive.mobile?r()("*[id^='_desktop_']").each((function(e,t){var i=r()("#"+t.id.replace("_desktop_","_mobile_"));i.length&&d(r()(t),i)})):r()("*[id^='_mobile_']").each((function(e,t){var i=r()("#"+t.id.replace("_mobile_","_desktop_"));i.length&&d(r()(t),i)})),t().emit("responsive update",{mobile:t().responsive.mobile})}i(920),i(21),i(237),i(497),i(73),i(783),t().responsive=t().responsive||{},t().responsive.current_width=window.innerWidth,t().responsive.min_width=992,t().responsive.mobile=t().responsive.current_width<t().responsive.min_width,r()(window).on("resize",(function(){var e=t().responsive.current_width,i=t().responsive.min_width,n=window.innerWidth,r=e>=i&&n<i||e<i&&n>=i;t().responsive.current_width=n,t().responsive.mobile=t().responsive.current_width<t().responsive.min_width,r&&c()})),r()(document).ready((function(){t().responsive.mobile&&c()})),r()(document).ready((()=>{1===r()("body#checkout").length&&(0!==r()(".js-cancel-address").length&&r()(".checkout-step:not(.js-current-step) .step-title").addClass("not-allowed"),r()(".js-terms a").on("click",(e=>{e.preventDefault();var i=r()(e.target).attr("href");i&&(-1!=i.indexOf("?")?i+="&content_only=1":i+="?content_only=1",r().get(i,(e=>{var t=r()(e).find(".page-cms").html(),i=r()(e).find("#body_wrapper .easycontent_container");i.length&&i.each((function(){if(r()(this).closest("#displayBanner").length)return!0;t+=r()(this).wrap("<div/>").parent().html()})),r()("#modal").find(".js-modal-content").html(t)})).fail((e=>{t().emit("handleError",{eventType:"clickTerms",resp:e})}))),r()("#modal").modal({backdrop:!1}).modal("show")})),r()(".js-gift-checkbox").on("click",(e=>{r()("#gift").collapse("toggle")}))),t().on("updatedDeliveryForm",(e=>{void 0!==e.deliveryOption&&0!==e.deliveryOption.length&&(r()(".carrier-extra-content").hide(),e.deliveryOption.next(".carrier-extra-content").slideDown())}))})),r()(document).ready((function(){r()("body#order-detail")&&r()("#order-return-form table thead input[type=checkbox]").on("click",(function(){var e=r()(this).prop("checked");r()("#order-return-form table tbody input[type=checkbox]").each((function(t,i){r()(i).prop("checked",e)}))}))})),i(593);class u{init(){let e=this;r()(document).on("click",".rightbar_tri,.mobile_bar_tri",(function(t){return t.preventDefault(),r()(this).hasClass("active")?(e.resetSlidebar(!1),!1):(e.openSidebar(r()(this).data("name"),r()(this).data("direction")),r()(this).addClass("active"),!1)})),t().on("stOpenSidebar",(function(t){e.openSidebar(t.name,t.direction)})),r()(document).on("click","#st-pusher-after,.close_right_side,.side_continue,#st-content-inner-after",(function(){return e.resetSlidebar(!1),!1}))}openSidebar(e,i){var n=r()(".st-container");n.hasClass(i)?n.addClass("bar_opened"):n.removeClass("open_bar_right open_bar_left open_column").addClass(i),r()("body").addClass("stsidebar_opened"),this.resetSlidebar(!0),r()("#"+e).addClass("sidebar_opened"),t().emit("sideBarOpened",{name:e}),"side_qrcode"==e&&this.load_qrcode(),r()(".st_sticky_buy_container").length&&r()(".st_sticky_buy_container").removeClass("da_kai_attr"),r()("#"+e).find(".search_widget_text").focus()}resetSlidebar(e){e||(r()(".st-container").removeClass("open_bar_right open_bar_left open_column bar_opened"),r()("body").removeClass("stsidebar_opened")),r()(".rightbar_tri,.mobile_bar_tri").removeClass("active"),r()(".sidebar_opened").removeClass("sidebar_opened"),r()(".add_to_wishlist.active").removeClass("active"),t().emit("sideBarClosed")}load_qrcode(){var e=r()("#qrcode_box .qrcode_link");!e.find("img").length&&e.find("i").length&&r()("<img/>",{src:e.attr("href")}).load((function(){e.find("i").replaceWith(r()(this))}))}}var p=i(96),h=i.n(p);function f(e,t){var i=r().trim(e.val());if(Math.abs,i!=parseInt(i)||i<0||isNaN(i))return e.val(isNaN(i)?0:Math.abs(parseInt(i))),!1;if(!(i=parseInt(i))||i>parseInt(t.data("count")))return!1;var n=t.data("url");return-1!=n.indexOf("?page=")||-1!=n.indexOf("&page=")?n.replace(/([?|&]page=)(\d+)/g,"$1"+i):n+"?page="+i}function m(e){if(r()(".images-container-7,.images-container-8").length){var t=0;r()("#st_header.stuck").length&&(t+=r()("#st_header.stuck").outerHeight()),r()("#st_header .st_mega_menu_container.stuck").length&&(t+=r()("#st_header .st_mega_menu_container.stuck").outerHeight()),r()("#st_header .steasym_main.stuck").length&&(t+=r()("#st_header .steasym_main.stuck").outerHeight()),e&&r()(window).scrollTop()+t>r()(".product_page_container").offset().top&&r()(window).scrollTop(r()(".product_page_container").offset().top-t),r()(".product_middle_column_inner").hcSticky({stickTo:r()(".product_page_container")[0],top:Z(),queries:{992:{disable:!0}}})}prestashop.easyzoom.init(r()(".images-container-7 .easyzoom,.images-container-8 .easyzoom"))}r()(document).ready((()=>{var e=!1;t().on("clickQuickView",(function(n){if(e||r()("body").hasClass("product"))return!1;e=!0,r()(".quick_view_"+n.dataset.idProduct).addClass("active");let a={action:"quickview",id_product:n.dataset.idProduct,id_product_attribute:n.dataset.idProductAttribute};r().post(t().urls.pages.product,a,null,"json").then((function(a){let s=`#quickview-modal-${a.product.id}-${a.product.id_product_attribute}`;r()(s).remove(),r()("body").append(a.quickview_html);let o=r()(s);o.modal("show"),i(o),o.on("hidden.bs.modal",(function(){o.remove()})),o.on("shown.bs.modal",(function(i){t().emit("quickViewLoaded",{quickview_id:s}),e=!1,r()(".quick_view_"+n.dataset.idProduct).removeClass("active")}))})).fail((i=>{t().emit("handleError",{eventType:"clickQuickView",resp:i}),e=!1,r()(".quick_view_"+n.dataset.idProduct).removeClass("active")}))}));var i=e=>{var t=e.find("#quantity_wanted");t.TouchSpin({verticalupclass:"fto-plus-2",verticaldownclass:"fto-minus",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:parseInt(t.attr("min"),10),max:parseInt(t.data("quantity"),10)>0?parseInt(t.data("quantity"),10):1e6})};let n=new u;r()("#search_filter_controls .ok").on("click",(function(){n.resetSlidebar()}));const a=function(e){if(void 0!==e.target.dataset.searchUrl)return e.target.dataset.searchUrl;if(void 0===r()(e.target).parent()[0].dataset.searchUrl)throw new Error("Can not parse search URL");return r()(e.target).parent()[0].dataset.searchUrl};var s=!1;function o(){return s||(s=!0,!1)}r()("body").on("change","#search_filters input[data-search-url]",(function(e){if(o())return r()(this).prop("checked",!1),!1;r()(e.target).closest(".facet-label").addClass("loading"),t().emit("updateFacets",a(e))})),r()("body").on("click",".js-search-filters-clear-all",(function(e){if(e.preventDefault(),o())return!1;t().emit("updateFacets",a(e))})),r()("body").on("click",".js-search-link",(function(e){if(e.preventDefault(),o())return!1;t().emit("updateFacets",r()(e.target).closest(".facet-label").addClass("loading").end().closest("a").attr("href"))})),r()("body").on("click",".st_pjump_button",(function(e){e.preventDefault();var i=f(r()(this).closest(".st_pjump_box").find('input[name="st_pjump"]'),r()(this).closest(".st_pjump_box"));if(i){if(o())return!1;t().emit("updateFacets",i)}return!1})),r()("body").on("keyup",'input[name="st_pjump"]',(function(e){if(13==e.keyCode){var i=f(r()(this),r()(this).closest(".st_pjump_box"));if(i){if(o())return!1;t().emit("updateFacets",i)}}})),r()("body").on("change","#search_filters select",(function(e){if(o())return!1;const i=r()(e.target).closest("form");t().emit("updateFacets","?"+i.serialize())})),t().on("updateProductList",(e=>{s=!1;var i=r()(".products.product_list").offset().top;i<r()(window).scrollTop()&&window.scrollTo(0,i-100),function(e){r()("#search_filters").replaceWith(e.rendered_facets),r()("#js-active-search-filters").replaceWith(e.rendered_active_filters),r()("#js-product-list-top").replaceWith(e.rendered_products_top),r()("#js-product-list").replaceWith(r()(e.rendered_products).find(".swiper_inited").removeClass("swiper_inited").end()),r()("#js-product-list-bottom").replaceWith(e.rendered_products_bottom),void 0!==e.rendered_products_header&&e.rendered_products_header&&r()("#js-product-list-header").length&&r()("#js-product-list-header").replaceWith(e.rendered_products_header),t().emit("updatedProductListDOM")}(e)})),r()(window).on("popstate",(function(e){var i=e.originalEvent.state;if(i&&void 0!==i.st_infinite&&i.st_infinite){var n=t().st_storage.getItem("st_infinite",i.st_infinite);n&&(n.rendered_facets=r()(n.rendered_facets).find(".facet-label").removeClass("loading").end().prop("outerHTML"),t().emit("updateProductList",n))}})),r()("body").on("click",".list_grid_switcher div",(function(e){e.preventDefault(),r()(this).addClass("selected").siblings().removeClass("selected"),function(e){if(h().set("st_list_grid",e,{domain:sttheme.cookie_domain,path:sttheme.cookie_path}),"list"==e){var t=r()(".products.product_list").removeClass("grid row").addClass("list").data("classnames");r()(".product_list .product_list_item").removeClass(t).addClass("clearfix")}else t=r()(".products.product_list").removeClass("list").addClass("grid row").data("classnames"),r()(".product_list .product_list_item").removeClass("clearfix").addClass(t);F()}(r()(this).hasClass("grid")?"grid":"list");var t=r()("#js-product-list .tm_gallery");t.length&&r().each(t,(function(){void 0!==this.swiper&&(this.swiper.update(!0),r()(this.swiper.slides).length==r()(this.swiper.slides).filter(".swiper-slide-visible").length?(r()(this.swiper.params.navigation.nextEl).hide(),r()(this.swiper.params.navigation.prevEl).hide()):(r()(this.swiper.params.navigation.nextEl).show(),r()(this.swiper.params.navigation.prevEl).show()))}))}))})),r()(document).ready((function(){function e(){r()(".js-file-input").on("change",(e=>{let t,i;(t=r()(e.currentTarget)[0])&&(i=t.files[0])&&r()(t).prev().text(i.name)}))}function t(){const e=r()("#quantity_wanted");e.TouchSpin({verticalupclass:"fto-plus-2",verticaldownclass:"fto-minus",buttondown_class:"btn btn-touchspin js-touchspin",buttonup_class:"btn btn-touchspin js-touchspin",min:e.attr("min")?parseInt(e.attr("min"),10):1,max:0==e.data("allow-oosp")&&parseInt(e.data("quantity"),10)>0?parseInt(e.data("quantity"),10):1e6}),e.focusout((()=>{(""===e.val()||parseInt(e.val(),10)<parseInt(e.attr("min"),10))&&(e.val(parseInt(e.attr("min"),10)),e.trigger("change"))})),r()(document).on("change keyup","#quantity_wanted",(function(t){""!==e.val()&&(r()(t.currentTarget).trigger("touchspin.stopspin"),prestashop.emit("updateProduct",{eventType:"updatedProductQuantity",event:t}))}))}t(),e(),r()("body").on("change",".product-variants [data-product-attribute]",(function(){r()(".product-variants-item .input-container").removeClass("st-input-clicked"),r()(this).parent().addClass("st-input-clicked")})),prestashop.on("updatedProduct",(function(t){function i(e){let t=e.$addToCartSnippet.find(e.targetSelector);r()(e.$targetParent.find(e.targetSelector)).length>0&&(t.length>0?r()(e.$targetParent.find(e.targetSelector)).replaceWith(t[0].outerHTML):r()(e.$targetParent.find(e.targetSelector)).html(""))}var n={},a=r()(t.product_add_to_cart);if(a.hasClass("product-add-to-cart")){i({$addToCartSnippet:a,$targetParent:r()(".product-add-to-cart"),targetSelector:"#product-availability"}),i({$addToCartSnippet:a,$targetParent:r()(".product-add-to-cart"),targetSelector:".product-availability-date"}),i({$addToCartSnippet:a,$targetParent:r()(".product-add-to-cart"),targetSelector:".add_buy_now"});var s=a.find("#quantity_wanted");if(s&&s.length){var o=parseInt(s.data("quantity"),10),l=parseInt(s.data("allow-oosp"),10);a.find(".hide_main_cart_button").length&&(o>=s.val()||!o)?r()(".product-add-to-cart .product-quantity").addClass("hide_main_cart_button"):r()(".product-add-to-cart .product-quantity").removeClass("hide_main_cart_button"),!l&&o&&o>=s.val()?(r()("#quantity_wanted"),n=r().extend(n,{max:o})):l&&(n=r().extend(n,{max:1e6}))}}var d=r()(".product-information .product-reference .pro_extra_info_content"),c=r()(t.product_details).find(".product-reference span");if(d.length&&c.length&&d.html(c.html()),e(),t&&t.product_minimal_quantity){const e=parseInt(t.product_minimal_quantity,10),i="#quantity_wanted";r()(i),n=r().extend(n,{min:e})}r().isEmptyObject(n)||r()("#quantity_wanted").trigger("touchspin.updatesettings",n),r()(".product_info_tabs .tab-pane").removeClass("active"),r()(r()(".product_info_tabs .nav-link.active").attr("href")).addClass("active"),r()(".product-variants [data-product-attribute]").prop("disabled",!1)})),r()(".pro_grid_thumbs .swiper-slide").click((function(e){return e.preventDefault(),r()(this).addClass("clicked_thumb").siblings().removeClass("clicked_thumb"),r()(".pro_gallery_top").length&&void 0!==r()(".pro_gallery_top")[0].swiper&&r()(".pro_gallery_top")[0].swiper.slideTo(r()(this).index()),!1})),r()("body").on("click",".pro_gallery_show_all",(function(e){if(void 0!==sttheme.pro_images&&sttheme.pro_images){var t=r()(this).closest(".quickview").length,i=r()(this).closest(".images-container");if(!i.length)return!1;var n="",a="",s="",o="",l="";r()(".pro_gallery_top",i).length&&void 0!==r()(".pro_gallery_top",i)[0].swiper&&(n=r()(".pro_gallery_top",i)[0].swiper),r()(".pro_gallery_thumbs",i).length&&(void 0!==r()(".pro_gallery_thumbs",i)[0].swiper?a=r()(".pro_gallery_thumbs",i)[0].swiper:l=r()(".pro_gallery_thumbs .swiper-wrapper",i)),r()(".images-container-7,.images-container-8").length&&(s=r()(".st_image_scrolling_wrap .row")),r()(".pro_gallery_kk",i).length&&void 0!==r()(".pro_gallery_kk",i)[0].swiper&&(o=r()(".pro_gallery_kk",i)[0].swiper);var d=new Array;r().each(r()(".pro_gallery_item",i),(function(){d.push(r()(this).data("id_image"))}));var c=d.length,u=r()(".pro_popup_trigger_box",i);r().each(sttheme.pro_images,(function(e,i){if(r().inArray(parseInt(i.id_image,10),d)<0){c++;var p='<div class="swiper-slide"><div class="easyzoom--overlay '+(sttheme.enable_zoom?" easyzoom ":"")+(2==sttheme.enable_zoom?" disable_easyzoom_on_mobile ":"")+'"> <a href="'+(1==sttheme.enable_zoom||2==sttheme.enable_zoom&&!sttheme.is_mobile_device||sttheme.enable_thickbox&&!t?i.bySize.superlarge_default.url:"javascript:;")+'" class="'+(sttheme.enable_thickbox&&!t?1!=sttheme.enable_thickbox&&(3!=sttheme.enable_thickbox||sttheme.is_mobile_device)||sttheme.enable_zoom&&(2!=sttheme.enable_zoom||!sttheme.is_mobile_device)?2==sttheme.enable_thickbox||3==sttheme.enable_thickbox&&sttheme.is_mobile_device?" kk_triger ":"":" st_popup_image st_pro_popup_image ":"")+' replace-2x" '+(sttheme.enable_thickbox&&!sttheme.enable_zoom?' data-group="pro_gallery_popup" ':"")+' title="'+i.legend+'"><picture>'+("undefined"!=typeof stwebp&&void 0!==stwebp[sttheme.gallery_image_type]&&stwebp[sttheme.gallery_image_type]?'\x3c!--[if IE 9]><video style="display: none;"><![endif]--\x3e<source srcset="'+i.bySize[sttheme.gallery_image_type].url.replace(/\.jpg$/,".webp")+(sttheme.retina&&void 0!==i.bySize[sttheme.gallery_image_type+"_2x"]?","+i.bySize[sttheme.gallery_image_type+"_2x"].url.replace(/\.jpg$/,".webp")+" 2x":"")+'" title="'+i.legend+'" type="image/webp" data-id_image="'+i.id_image+'">\x3c!--[if IE 9]></video><![endif]--\x3e':"")+'<img class="pro_gallery_item" src="'+i.bySize[sttheme.gallery_image_type].url+'" '+(sttheme.retina&&void 0!==i.bySize[sttheme.gallery_image_type+"_2x"]?'srcset="'+i.bySize[sttheme.gallery_image_type+"_2x"].url+' 2x"':"")+' alt="'+i.legend+'" title="'+i.legend+'" width="'+i.bySize[sttheme.gallery_image_type].width+'" height="'+i.bySize[sttheme.gallery_image_type].height+'" data-id_image="'+i.id_image+'" /></picture></a></div></div>';n&&n.appendSlide(p);var h='<div class="swiper-slide"><div class="pro_gallery_thumb_box general_border"><picture>'+("undefined"!=typeof stwebp&&void 0!==stwebp[sttheme.thumb_image_type]&&stwebp[sttheme.thumb_image_type]?'\x3c!--[if IE 9]><video style="display: none;"><![endif]--\x3e<source srcset="'+i.bySize[sttheme.thumb_image_type].url.replace(/\.jpg$/,".webp")+(sttheme.retina&&void 0!==i.bySize[sttheme.thumb_image_type+"_2x"]?","+i.bySize[sttheme.thumb_image_type+"_2x"].url.replace(/\.jpg$/,".webp")+" 2x":"")+'" type="image/webp">\x3c!--[if IE 9]></video><![endif]--\x3e':"")+'<img class="pro_gallery_thumb" src="'+i.bySize[sttheme.thumb_image_type].url+'" '+(sttheme.retina&&void 0!==i.bySize[sttheme.thumb_image_type+"_2x"]?'srcset="'+i.bySize[sttheme.thumb_image_type+"_2x"].url+' 2x"':"")+' alt="" width="'+i.bySize[sttheme.thumb_image_type].width+'" height="'+i.bySize[sttheme.thumb_image_type].height+'" /></picture></div></div>';if(a?a.appendSlide(h):l.length&&l.append(h),u.length&&u.append('<a href="'+("undefined"!=typeof stwebp&&void 0!==stwebp.superlarge_default&&stwebp.superlarge_default?i.bySize.superlarge_default.url.replace(/\.jpg$/,".webp"):i.bySize.superlarge_default.url)+'" class="pro_popup_trigger '+(1==sttheme.enable_thickbox||3==sttheme.enable_thickbox&&!sttheme.is_mobile_device?" st_popup_image st_pro_popup_image ":2==sttheme.enable_thickbox||3==sttheme.enable_thickbox&&sttheme.is_mobile_device?" kk_triger ":"")+' replace-2x layer_icon_wrap" data-group="pro_gallery_popup_trigger" title="'+i.legend+'"><i class="fto-resize-full"></i></a>'),s.length){var f=sttheme.pro_thumnbs_per_fw;if(sttheme.pro_thumnbs_per_odd_fw){if(sttheme.pro_thumnbs_per_fw+sttheme.pro_thumnbs_per_odd_fw<c)(m=c%(sttheme.pro_thumnbs_per_fw+sttheme.pro_thumnbs_per_odd_fw))||(m=sttheme.pro_thumnbs_per_fw+sttheme.pro_thumnbs_per_odd_fw);else var m=c;m>f&&(f=sttheme.pro_thumnbs_per_odd_fw)}var g=sttheme.pro_thumnbs_per_xxl;if(sttheme.pro_thumnbs_per_odd_xxl){if(sttheme.pro_thumnbs_per_xxl+sttheme.pro_thumnbs_per_odd_xxl<c)(v=c%(sttheme.pro_thumnbs_per_xxl+sttheme.pro_thumnbs_per_odd_xxl))||(v=sttheme.pro_thumnbs_per_xxl+sttheme.pro_thumnbs_per_odd_xxl);else var v=c;v>g&&(g=sttheme.pro_thumnbs_per_odd_xxl)}var y=sttheme.pro_thumnbs_per_xl;if(sttheme.pro_thumnbs_per_odd_xl){if(sttheme.pro_thumnbs_per_xl+sttheme.pro_thumnbs_per_odd_xl<c)(b=c%(sttheme.pro_thumnbs_per_xl+sttheme.pro_thumnbs_per_odd_xl))||(b=sttheme.pro_thumnbs_per_xl+sttheme.pro_thumnbs_per_odd_xl);else var b=c;b>y&&(y=sttheme.pro_thumnbs_per_odd_xl)}var w=sttheme.pro_thumnbs_per_lg;if(sttheme.pro_thumnbs_per_odd_lg){if(sttheme.pro_thumnbs_per_lg+sttheme.pro_thumnbs_per_odd_lg<c)(_=c%(sttheme.pro_thumnbs_per_lg+sttheme.pro_thumnbs_per_odd_lg))||(_=sttheme.pro_thumnbs_per_lg+sttheme.pro_thumnbs_per_odd_lg);else var _=c;_>w&&(w=sttheme.pro_thumnbs_per_odd_lg)}var x=sttheme.pro_thumnbs_per_md;if(sttheme.pro_thumnbs_per_odd_md){if(sttheme.pro_thumnbs_per_md+sttheme.pro_thumnbs_per_odd_md<c)(C=c%(sttheme.pro_thumnbs_per_md+sttheme.pro_thumnbs_per_odd_md))||(C=sttheme.pro_thumnbs_per_md+sttheme.pro_thumnbs_per_odd_md);else var C=c;C>x&&(x=sttheme.pro_thumnbs_per_odd_md)}var E=sttheme.pro_thumnbs_per_sm;if(sttheme.pro_thumnbs_per_odd_sm){if(sttheme.pro_thumnbs_per_sm+sttheme.pro_thumnbs_per_odd_sm<c)(S=c%(sttheme.pro_thumnbs_per_sm+sttheme.pro_thumnbs_per_odd_sm))||(S=sttheme.pro_thumnbs_per_sm+sttheme.pro_thumnbs_per_odd_sm);else var S=c;S>E&&(E=sttheme.pro_thumnbs_per_odd_sm)}var T=sttheme.pro_thumnbs_per_xs;if(sttheme.pro_thumnbs_per_odd_xs){if(sttheme.pro_thumnbs_per_xs+sttheme.pro_thumnbs_per_odd_xs<c)(k=c%(sttheme.pro_thumnbs_per_xs+sttheme.pro_thumnbs_per_odd_xs))||(k=sttheme.pro_thumnbs_per_xs+sttheme.pro_thumnbs_per_odd_xs);else var k=c;k>T&&(T=sttheme.pro_thumnbs_per_odd_xs)}s.append('<div class="st_image_scrolling_item '+(f?" col-fw-"+(12/f+"").replace(".","-"):"")+(g?" col-xxl-"+(12/g+"").replace(".","-"):"")+(y?" col-xl-"+(12/y+"").replace(".","-"):"")+" col-lg-"+(12/w+"").replace(".","-")+" col-md-"+(12/x+"").replace(".","-")+" col-sm-"+(12/E+"").replace(".","-")+" col-"+(12/T+"").replace(".","-")+'">'+p+"</div>")}var P='<div class="swiper-slide"><div class="swiper-zoom-container"><picture>'+("undefined"!=typeof stwebp&&void 0!==stwebp.superlarge_default&&stwebp.superlarge_default?'\x3c!--[if IE 9]><video style="display: none;"><![endif]--\x3e<source srcset="'+i.bySize.superlarge_default.url.replace(/\.jpg$/,".webp")+(sttheme.retina&&void 0!==i.bySize.superlarge_default_2x?","+i.bySize.superlarge_default_2x.url.replace(/\.jpg$/,".webp")+" 2x":"")+'" title="'+i.legend+'" type="image/webp" data-id_image="'+i.id_image+'">\x3c!--[if IE 9]></video><![endif]--\x3e':"")+'<img class="pro_gallery_kk_item" src="'+i.bySize.superlarge_default.url+'" '+(sttheme.retina&&void 0!==i.bySize.superlarge_default_2x?'srcset="'+i.bySize.superlarge_default_2x.url+' 2x"':"")+' alt="'+i.legend+'" title="'+i.legend+'" width="'+i.bySize.superlarge_default.width+'" height="'+i.bySize.superlarge_default.height+'" data-id_image="'+i.id_image+'" /></picture></div></div>';o&&o.appendSlide(P)}})),n&&(r()(".images-container").removeClass("pro_number_0 pro_number_1 pro_number_2 pro_number_3 pro_number_4 pro_number_5 pro_number_6").addClass("pro_number_"+sttheme.pro_images.length),n.update(!0),r()(n.slides).length>r()(n.slides).filter(".swiper-slide-visible").length&&(r()(n.params.nextButton).show(),r()(n.params.prevButton).show())),a&&(a.update(!0),r()(a.slides).length>r()(a.slides).filter(".swiper-slide-visible").length&&(r()(a.params.nextButton).show(),r()(a.params.prevButton).show()));var p={};r()(".st_pro_popup_image").each((function(){var e=r()(this).data("group")?r()(this).data("group"):"others";p[e]||(p[e]=[]),p[e].push(this)})),r().each(p,(function(){r()(this).magnificPopup({type:"image",tLoading:"",image:{verticalFit:!!sttheme.popup_vertical_fit,titleSrc:function(e){return e.el.data("title")}},removalDelay:500,callbacks:{beforeOpen:function(){var e=this.st.el.hasClass("st_pro_popup_image");this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),this.st.mainClass="mfp-zoom-in"+(e?" st_pro_mfp ":"")},elementParse:function(e){var t=new RegExp("\\/(\\d+)\\-(\\w+)\\_default([\\.\\/])","i").exec(e.src);t&&void 0!==window.stwebp&&window.stwebp[t[2]+"_default"]&&void 0!==window.stwebp_supported&&window.stwebp_supported?e.src=e.src.replace(/\.jpg$/,".webp"):e.src=e.src.replace(/\.webp$/,".jpg")},afterClose:function(){}},gallery:{enabled:!0}})})),prestashop.emit("updatedProductImages"),r()(".images-container-7,.images-container-8").length&&r()(".product_middle_column_inner").hcSticky("refresh"),r()(".images-container-7 .pro_gallery_thumbs").length&&r()(".images-container-7 .pro_gallery_thumbs").hcSticky("refresh")}r()(this).hide()})),m(!1),prestashop.on("thumbsContainerInit",(function(e){r()(".images-container-7 .pro_gallery_thumbs").hcSticky({stickTo:r()(".images-container-7")[0],top:Z(),queries:{992:{disable:!0}}})})),prestashop.on("ebBuyFormInit",(function(e){t()}))})),t().cart=t().cart||{},t().cart.active_inputs=null;let g=!1,v=!1,y="";var b;r()(document).ready((()=>{let e=".cart_quantity",i=[];t().on("updateCart",(()=>{r()(".quickview").modal("hide")}));let n=r()("body");function a(e){let t,i,n=e.split("-"),r="";for(t=0;t<n.length;t++)i=n[t],0!==t&&(i=i.substring(0,1).toUpperCase()+i.substring(1)),r+=i;return r}let s=()=>{for(;i.length>0;)i.pop().abort()};var o=n=>{n.preventDefault();let o=r()(n.currentTarget),l=n.currentTarget.dataset,d=function(t,i){if(!function(e){return"on.startupspin"===e||"on.startdownspin"===e||"on.stopspin"===e}(i))return{url:t.attr("href").replace(/^https?:/,""),type:a(t.data("link-action"))};let n=function(t){var i=t.parents(".bootstrap-touchspin").find(e);return i.is(":focus")?null:i}(t);if(!n)return;let s=n[0].getAttribute("value"),o=n.val();if(o!=parseInt(o)||o<0||isNaN(o))return void n.val(s);let l=o-s,d=l>0;var c=r()(".cart_quantity_"+n.data("product-id")+(n.data("id-product-attribute")?'[data-id-product-attribute="'+n.data("id-product-attribute")+'"]':"")+(n.data("id-customization")?'[data-id-customization="'+n.data("id-customization")+'"]':""));if(!n.data("allow-oosp")){if(n.val()>=n.data("quantity")&&d&&n.hasClass("hits_the_max_limit"))return;n.val()==n.data("quantity")?c.addClass("hits_the_max_limit"):c.removeClass("hits_the_max_limit")}if(n.val()<=n.data("minimal-quantity")&&!d&&n.hasClass("hits_the_min_limit"))return;n.val()==n.data("minimal-quantity")?c.addClass("hits_the_min_limit"):c.removeClass("hits_the_min_limit");let u={qty:Math.abs(l)};return u=d?r().extend(u,{url:n.data("up-url").replace(/^https?:/,""),type:"increaseProductQuantity"}):r().extend(u,{url:n.data("down-url").replace(/^https?:/,""),type:"decreaseProductQuantity"}),u}(o,n.namespace),c={ajax:"1",action:"update"};if(void 0!==d){if(void 0!==d.qty){if(!d.qty)return;c=r().extend(c,{qty:d.qty})}o.closest(".bootstrap-touchspin").addClass("bs_ts_active"),s(),r().ajax({url:d.url,method:"POST",data:c,dataType:"json",beforeSend:function(e){i.push(e)}}).then((function(e){w.checkUpdateOpertation(e),r()(".cart_quantity_"+e.id_product+'[data-id-product-attribute="'+e.id_product_attribute+'"]').val(e.quantity?e.quantity:0),t().emit("updateCart",{reason:l,resp:e})})).fail((e=>{t().emit("handleError",{eventType:"updateProductInCart",resp:e,cartAction:d.type})}))}};function l(e){if(!e.length)return!1;r().each(e,(function(e,t){r()(t).TouchSpin({verticalupclass:"fto-plus-2",verticaldownclass:"fto-minus",buttondown_class:"btn btn-touchspin js-touchspin js-increase-product-quantity",buttonup_class:"btn btn-touchspin js-touchspin js-decrease-product-quantity",min:r()(t).data("minimal-quantity")?parseInt(r()(t).data("minimal-quantity"),10):1,max:0==r()(t).data("allow-oosp")&&parseInt(r()(t).data("quantity"),10)>0?parseInt(r()(t).data("quantity"),10):1e6})})),w.switchErrorStat()}function d(e){let n=r()(e.currentTarget),a=n.data("update-url"),o=n[0].getAttribute("value"),l=n.val();if(l!=parseInt(l)||l<0||isNaN(l))return void n.val(o);let d=l-o;var c,u,p=r()(".cart_quantity_"+n.data("product-id")+(n.data("id-product-attribute")?'[data-id-product-attribute="'+n.data("id-product-attribute")+'"]':"")+(n.data("id-customization")?'[data-id-customization="'+n.data("id-customization")+'"]':""));n.data("allow-oosp")||(l>n.data("quantity")?(p.addClass("hits_the_max_limit").val(n.data("quantity")),d=n.data("quantity")-o):p.removeClass("hits_the_max_limit")),l<n.data("minimal-quantity")?(p.addClass("hits_the_min_limit").val(n.data("minimal-quantity")),d=n.data("minimal-quantity")-o):p.removeClass("hits_the_min_limit"),0!=d&&function(e,n,a){s(),r().ajax({url:e,method:"POST",data:n,dataType:"json",beforeSend:function(e){i.push(e)}}).then((function(e){var i;w.checkUpdateOpertation(e),i=a&&a.dataset?a.dataset:e,r()(".cart_quantity_"+e.id_product).val(e.quantity?e.quantity:0),t().emit("updateCart",{reason:r().extend(i),resp:e})})).fail((e=>{t().emit("handleError",{eventType:"updateProductQuantityInCart",resp:e})}))}(a,(c=d,{ajax:"1",qty:Math.abs(c),action:"update",op:(u=c,u>0?"up":"down")}),n)}n.on("click",'[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]',o),l(r()(".cart_quantity")),t().on("updatedCart",(()=>{l(r()(".cart_quantity"))})),t().on("stUpdatedCart",(()=>{l(r()(".cart_quantity"))})),n.on("touchspin.on.stopspin",".cart_quantity",(function(e){clearTimeout(b),b=setTimeout((function(){o(e)}),600)})),n.on("focusout",e,(e=>{r()(e.currentTarget).hasClass("st_enter_pressed")||d(e)})),n.on("keyup",e,(e=>{13==e.keyCode&&(r()(e.currentTarget).addClass("st_enter_pressed"),d(e))})),n.on("click",".js-discount .code",(e=>{e.stopPropagation();var t=r()(e.currentTarget);return r()("[name=discount_name]").val(t.text()),!1}))}));const w={switchErrorStat:()=>{let e=r()(".checkout a");if((r()("#notifications article.alert-danger").length||""!==y&&!g)&&e.addClass("disabled"),""!==y){let t=' <article class="alert alert-danger" role="alert" data-alert="danger"><ul><li>'+y+"</li></ul></article>";r()("#notifications .container").html(t),y="",v=!1,g&&e.removeClass("disabled")}else!g&&v&&(g=!1,v=!1,r()("#notifications .container").html(""),e.removeClass("disabled"))},checkUpdateOpertation:e=>{g=e.hasOwnProperty("hasError");let t=e.errors||"";y=t instanceof Array?t.join(" "):t,v=!0}};r()(document).ready((()=>{var e;function t(){if(void 0!==sttheme.submemus_action&&1==sttheme.submemus_action&&(r()(".stmenu_sub").stop().hide(),r()(".ml_level_0").removeClass("current")),r()(this).addClass("current"),r()(this).find(".stmenu_sub").children().size()){var t=r()(this).find(".stmenu_sub");r()(".st_menu_lazy",t).each((function(){r()(this).attr("src",r()(this).data("src")).removeClass("st_menu_lazy")})),t.stop(),e=setTimeout((function(){void 0!==sttheme.submemus_animation&&sttheme.submemus_animation?2==sttheme.submemus_animation?t.show().css("overflow","visible"):t.slideDown("fast",(function(){t.css("overflow","visible")})):t.fadeIn("fast",(function(){t.css("overflow","visible")}))}),100)}}function i(){clearTimeout(e),r()(this).removeClass("current"),r()(this).find(".stmenu_sub").stop().hide()}void 0!==sttheme.submemus_action&&1==sttheme.submemus_action?(r()(document).on("click",".ma_level_0",(function(){return!r()(this).parent().find(".stmenu_sub").children().size()||(t.apply(r()(this).parent().get(0)),!1)})),r()(document).on("click","html,body",(function(e){0==r()(e.target).parents("#st_mega_menu_wrap").first().length&&(r()(".stmenu_sub").stop().hide(),r()(".ml_level_0").removeClass("current"))}))):r()(".ml_level_0").hoverIntent({sensitivity:7,interval:0,timeout:0,over:t,out:i}),("ontouchstart"in document.documentElement||window.navigator.msMaxTouchPoints)&&(r()(".ma_level_0").click((function(e){var t=r()(this).parent();if(t.find(".stmenu_sub").children().size()){if(!t.hasClass("ma_touched"))return r()(".ml_level_0").removeClass("ma_touched"),t.addClass("ma_touched"),!1;t.removeClass("ma_touched")}})),r()(".stmenu_sub .has_children").click((function(e){if(!r()(this).hasClass("item_touched"))return r()(".stmenu_sub .menu_touched").removeClass("item_touched"),r()(this).addClass("item_touched"),!1;r()(this).removeClass("item_touched")}))),prestashop.on("stSwitchMenuEvent",(e=>{r()(".ml_level_0").off(),r()(document).off("click",".ma_level_0"),"1"==e.value?(r()(document).on("click",".ma_level_0",(function(){return t.apply(r()(this).parent().get(0)),!1})),r()(document).on("click","html,body",(function(e){0==r()(e.target).parents("#st_mega_menu_wrap").first().length&&(r()(".stmenu_sub").stop().hide(),r()(".ml_level_0").removeClass("current"))}))):r()(".ml_level_0").hoverIntent({sensitivity:7,interval:0,timeout:0,over:t,out:i})}))})),r()(document).ready((()=>{r()(".product_link_nav.with_preview a").hoverIntent({sensitivity:3,interval:0,timeout:0}).hoverIntent((function(){r()(this).find(".product_link_nav_preview").show()}),(function(){r()(this).find(".product_link_nav_preview").hide()}))})),r()(document).ready((()=>{r()(".st_news_letter_popup_wrap").each((function(){let e=r()(this);if("1"==e.data("showonclick"))return r()(document).on("click",'a[href="#'+e.attr("id")+'"]',(function(){r()(r()(this).attr("href")).modal("show")})),!0;e.data("hide_on_mobile")&&e.on("show.bs.modal",(function(e){if(sttheme.responsive&&r()(window).width()<992)return!1})),e.data("delay_popup")?setTimeout((function(){e.modal("show")}),1e3*e.data("delay_popup")):e.modal("show");let t=e.data("id_st"),i=e.data("show_popup"),n=e.data("cookies_time");r()(".st_news_letter_do_not_show").change((function(){r()(this).is(":checked")?h().set("st_popup_do_not_show_"+t,i,{expires:n||30,domain:sttheme.cookie_domain,path:sttheme.cookie_path}):h().set("st_popup_do_not_show_"+t,i,{expires:-1,domain:sttheme.cookie_domain,path:sttheme.cookie_path})})),2==i&&h().set("st_popup_do_not_show_"+t,i,{expires:n||30,domain:sttheme.cookie_domain,path:sttheme.cookie_path})})),r()("form.st_news_letter_form").submit((function(){var e=r()(this);return/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/.test(r()(this).find(".st_news_letter_input").val())?(r()(this).hasClass("is_newsletter_form")&&(void 0===r()(this).data("chas")||r()(this).find('input[name="email"]').hasClass("st_needs_reset"))||r().ajax({type:"POST",url:e.attr("action"),data:e.serialize(),dataType:"json",cache:!1,success:function(t){if(e.closest(".st_news_letter_box").find(".alert-danger, .alert-success").addClass("hidden"),t.hasError)e.closest(".st_news_letter_box").find(".alert-danger").html(t.hasError).removeClass("hidden");else{e.closest(".st_news_letter_box").find(".alert-success").html(t.message).removeClass("hidden");let i=e.closest(".st_news_letter_popup_wrap");i.length&&h().set("st_popup_do_not_show_"+i.data("id_st"),i.data("show_popup"),{domain:sttheme.cookie_domain,path:sttheme.cookie_path})}}}),!1):(e.closest(".st_news_letter_box").find(".alert-danger").html(wrongemailaddress_stnewsletter).removeClass("hidden"),!1)}))})),r()(document).ready((()=>{r()(".st_notification_wrap").each((function(){let e=r()(this);e.data("delay")?setTimeout((function(){e.show()}),1e3*e.data("delay")):e.show();let t=e.data("id_st"),i=e.data("show_box");e.find(".notification_accept, .st_notification_close").click((function(){e.hide(),i?1==i&&h().set("st_notification_"+t,i,{expires:-1,domain:sttheme.cookie_domain,path:sttheme.cookie_path}):h().set("st_notification_"+t,i,{expires:30,domain:sttheme.cookie_domain,path:sttheme.cookie_path})})),2==i&&h().set("st_notification_"+t,i,{expires:30,domain:sttheme.cookie_domain,path:sttheme.cookie_path})}))}));class _{init(){this.parentFocus(),this.buttonActive(),this.submitActive(),this.togglePasswordVisibility()}parentFocus(){r()(".js-child-focus").focus((function(){r()(this).closest(".js-parent-focus").addClass("focus")})),r()(".js-child-focus").focusout((function(){r()(this).closest(".js-parent-focus").removeClass("focus")}))}buttonActive(){r()("body").on("click",".js-btn-active",(function(e){r()(this).addClass("active")}))}submitActive(){r()(".js-submit-active").each((function(){let e=r()(this);e.closest("form").submit((function(){e.addClass("disabled active")}))}))}togglePasswordVisibility(){r()('button[data-action="show-password"]').on("click",(function(){var e=r()(this).closest(".input-group").children("input.js-visible-password");"password"===e.attr("type")?(e.attr("type","text"),r()(this).find("i").removeClass("fto-eye-off fto-eye").addClass("fto-eye")):(e.attr("type","password"),r()(this).find("i").removeClass("fto-eye-off fto-eye").addClass("fto-eye-off"))}))}}var x=i(895),C={};void 0!==prestashop.themeSelectors&&void 0!==prestashop.themeSelectors.passwordPolicy&&(C=prestashop.themeSelectors.passwordPolicy);const E=e=>{const t=document.querySelector(e),i=null==t?void 0:t.querySelector(C.inputColumn),n=null==t?void 0:t.querySelector("input"),r=document.createElement("div"),a=document.querySelector(C.template);let s;if(a&&t&&i&&n&&(r.innerHTML=a.innerHTML,i.append(r),s=t.querySelector(C.container),s)){const e=document.querySelector(C.hint);if(e){const t=JSON.parse(e.innerHTML),i=s.querySelector(C.requirementLength),r=s.querySelector(C.requirementScore),a=null==i?void 0:i.querySelector("span"),o=null==r?void 0:r.querySelector("span");a&&i&&i.dataset.translation&&(a.innerText=(0,x.sprintf)(i.dataset.translation,n.dataset.minlength,n.dataset.maxlength)),o&&r&&r.dataset.translation&&(o.innerText=(0,x.sprintf)(r.dataset.translation,t[n.dataset.minscore])),n.addEventListener("keyup",(()=>((e,t,i)=>{return n=function*(){const{prestashop:n}=window,r=e.value,a=t.querySelector(C.requirementScoreIcon),s=yield n.checkPasswordScore(r),o=(e=>{switch(e){case 0:case 1:return{color:"bg-danger"};case 2:return{color:"bg-warning"};case 3:case 4:return{color:"bg-success"};default:throw new Error("Invalid password strength indicator.")}})(s.score),l=r.length,d=[];$(e).popover("dispose"),t.style.display=""===r?"none":"block",""!==s.feedback.warning&&s.feedback.warning in i&&d.push(i[s.feedback.warning]),s.feedback.suggestions.forEach((e=>{e in i&&d.push(i[e])})),$(e).popover({html:!0,placement:"top",content:d.join("<br/>")}).popover("show");const c=l>=parseInt(e.dataset.minlength,10)&&l<=parseInt(e.dataset.maxlength,10),u=parseInt(e.dataset.minscore,10)<=s.score;t.querySelector(C.requirementLengthIcon).classList.toggle("text-success",c),a.classList.toggle("text-success",u),e.classList.remove("border-success","border-danger"),e.classList.add(u&&c?"border-success":"border-danger"),e.classList.add("form-control","border");const p=20*s.score+20,h=t.querySelector(C.progressBar);h&&(h.style.width=`${p}%`,h.classList.remove("bg-success","bg-danger","bg-warning"),h.classList.add(o.color))},new Promise(((e,t)=>{var i=e=>{try{a(n.next(e))}catch(e){t(e)}},r=e=>{try{a(n.throw(e))}catch(e){t(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,r);a((n=n.apply(void 0,null)).next())}));var n})(n,s,t))),n.addEventListener("blur",(()=>{$(n).popover("dispose")}))}}return t?{element:t}:{error:new Error("The password policy elements are undefined.")}};class S{init(){let e=r()(".js-modal-arrows"),t=r()(".js-modal-product-images"),i=r()(".on-sale");r()("body").on("click",".js-modal-thumb",(e=>{r()(".js-modal-thumb").hasClass("selected")&&r()(".js-modal-thumb").removeClass("selected"),r()(e.currentTarget).addClass("selected"),r()(".js-modal-product-cover").attr("src",r()(e.target).data("image-large-src")),r()(".js-modal-product-cover").attr("title",r()(e.target).attr("title")),r()(".js-modal-product-cover").attr("alt",r()(e.target).attr("alt"))})).on("click","aside#thumbnails",(e=>{"thumbnails"==e.target.id&&r()("#product-modal").modal("hide")})),i.length&&r()("#product").length&&r()(".new").css("top",i.height()+10),r()(".js-modal-product-images li").length<=5?e.css("opacity",".2"):e.on("click",(e=>{r()(e.target).hasClass("arrow-up")&&t.position().top<0?(this.move("up"),r()(".js-modal-arrow-down").css("opacity","1")):r()(e.target).hasClass("arrow-down")&&t.position().top+t.height()>r()(".js-modal-mask").height()&&(this.move("down"),r()(".js-modal-arrow-up").css("opacity","1"))}))}move(e){var t=r()(".js-modal-product-images"),i=r()(".js-modal-product-images li img").height()+10,n=t.position().top;t.velocity({translateY:"up"===e?n+i:n-i},(function(){t.position().top>=0?r()(".js-modal-arrow-up").css("opacity",".2"):t.position().top+t.height()<=r()(".js-modal-mask").height()&&r()(".js-modal-arrow-down").css("opacity",".2")}))}}class T{init(){if(void 0!==sttheme.drop_down&&sttheme.drop_down){let e=(sttheme.is_mobile_device,"click");r()(document).on(e,"html,body",(function(e){0==r()(e.target).parents(".dropdown_wrap.open").first().length&&r()(".dropdown_wrap.open").removeClass("open stdontremoveopen")})),r()(document).on(e,".dropdown_tri",(function(e){if(e.stopPropagation(),!r()(this).siblings(".dropdown_list").length)return!0;e.preventDefault();var t=r()(this).parents(".dropdown_wrap");!t.hasClass("open")&&r()(".dropdown_wrap.open").length>0&&r()(".dropdown_wrap.open").removeClass("open stdontremoveopen"),t.toggleClass("open").trigger(r().Event("st.dropdown.shown",t[0])),t.find(".search_widget_text").focus()}))}else sttheme.is_mobile_device?r()("body").on("click",".dropdown_tri",(function(e){var t=r()(this).closest(".dropdown_wrap");return t.hasClass("open")?(t.removeClass("open"),!1):(e.preventDefault(),t.addClass("open").trigger(r().Event("st.dropdown.shown",t[0])),!1)})):(r()(document).on("click","html,body",(function(e){0==r()(e.target).parents(".dropdown_wrap.open").first().length&&r()(".dropdown_wrap.open").removeClass("open")})),r()("body").on({mouseenter:function(){r()(this).addClass("open").trigger(r().Event("st.dropdown.shown",this)),r()(this).find(".search_widget_text").focus()},mouseleave:function(){r()(this).hasClass("stdontremoveopen")||r()(this).removeClass("open")}},".dropdown_wrap"))}}class k{init(e){"scrollRestoration"in history&&r()("body#category").length&&(history.scrollRestoration="manual");let t=this;this.defaults={items:".product_list_item",paginaton_sample:".paginaton_sample",product_count_infinite:".product_count_infinite",more:".infinite-more-link",element:".products.product_list",offset:"bottom-in-view",loadingClass:"infinite-loading",onAfterPageLoad:r().noop},this.options=r().extend({},this.defaults,e),this.$more=r()(this.options.more),this.$container=r()(this.options.element),this.start=this.$more.data("start"),prestashop.on("updateProductList",(e=>{if(void 0!==e.pagination)this.start=e.pagination.items_shown_from;else if(void 0!==e.rendered_products_bottom){var t=r()(e.rendered_products).find(".product_count_infinite span").html();t&&(this.start=t)}})),this.$container.length&&r()("body").on("click",this.options.more,(function(e){return e.preventDefault(),t.load(),!1}))}load(){this.$container=r()(this.options.element),this.$more.addClass("hidden"),this.$container.parent().addClass(this.options.loadingClass),r().get(r()(this.options.more).attr("href"),{from_infi:""},r().proxy((function(e){var t=r()(r().parseHTML(e)),i=t.find(this.options.more),n=t.find(this.options.items);n.length||(n=t.filter(this.options.items)),this.$container.append(n);var a=t.find(this.options.paginaton_sample);a.length||(a=t.filter(this.options.paginaton_sample)),r()(this.options.paginaton_sample).replaceWith(a);var s=t.find(this.options.product_count_infinite);s.length||(s=t.filter(this.options.product_count_infinite)),s.find("span").html(this.start),r()(this.options.product_count_infinite).replaceWith(s),this.$container.parent().removeClass(this.options.loadingClass),i.length||(i=t.filter(this.options.more)),i.length?(r()(this.options.more).parent().empty().append(i),this.$more=r()(this.options.more)):r()(this.options.more).remove(),this.options.onAfterPageLoad(n)}),this))}}class P{init(){r()(".pro_first_box").hover((function(){r()(".back-image",this).length&&r()(this).addClass("showhoverimage")}),(function(){r()(this).removeClass("showhoverimage")}))}}var I=i(151),A=i.n(I);for(var M in i(411),t().blockcart=t().blockcart||{},t().blockcart.showModal=(e,i)=>{function n(){return r()("#blockcart-modal")}let a=n();a.length&&(a.remove(),r()(".modal-backdrop").remove()),r()("body").append(e),a=n(),a.on("shown.bs.modal",(e=>{r()(".modal_products_container .swiper-container").length&&new Swiper(".modal_products_container .swiper-container",{navigation:{nextEl:".modal_products_container .swiper-button-next",prevEl:".modal_products_container .swiper-button-prev"},spaceBetween:6,slidesPerView:"auto"})})).modal("show").on("hidden.bs.modal",(e=>{i&&t().emit("updateProduct",{reason:e.currentTarget.dataset,eventType:"updatedProductCombination",event:null})}))},t().proquantity=t().proquantity||{},t().proquantity=()=>{var e=r()("input.pro_quantity");if(!e.length)return!1;r().each(e,(function(e,t){r()(t).TouchSpin({verticalupclass:"fto-plus-2",verticaldownclass:"fto-minus",buttondown_class:"btn btn-touchspin js-touchspin js-increase-product-quantity",buttonup_class:"btn btn-touchspin js-touchspin js-decrease-product-quantity",min:r()(t).data("minimal-quantity")?parseInt(r()(t).data("minimal-quantity"),10):1,max:0==r()(t).data("allow-oosp")&&parseInt(r()(t).data("quantity"),10)>0?parseInt(r()(t).data("quantity"),10):1e6})}))},t().prolazy=t().prolazy||{},t().prolazy=()=>{r()(".cate_pro_lazy").each((function(){r()(this).waypoint((function(){var e=r()(this.element);if(this.destroy(),"PICTURE"===e.parent()[0].tagName&&e.parent().find("source").length){var i=e.parent().find("source");i.length&&i.each((function(){r()(this).attr("srcset",r()(this).data("srcset")).removeAttr("data-srcset")})),e.data("src")&&e.attr("src",e.data("src")),e.data("srcset")&&e.attr("srcset",e.data("srcset")),e.hasClass("front-image")&&e.closest(".is_lazy").removeClass("is_lazy"),e.removeClass("cate_pro_lazy"),e.hasClass("pro_gallery_item")&&e.closest(".easyzoom--overlay").hasClass("easyzoom")&&t().easyzoom.init(e.closest(".easyzoom--overlay"))}else e.on("load",(function(){r()(this).hasClass("front-image")&&r()(this).closest(".is_lazy").removeClass("is_lazy"),r()(this).removeClass("cate_pro_lazy"),e.hasClass("pro_gallery_item")&&e.closest(".easyzoom--overlay").hasClass("easyzoom")&&t().easyzoom.init(e.closest(".easyzoom--overlay")),Waypoint.refreshAll()})),e.data("src")&&e.attr("src",e.data("src")),e.data("srcset")&&e.attr("srcset",e.data("srcset"))}),{offset:"120%"})}))},t().easyzoom=t().easyzoom||{},t().easyzoom.init=e=>{e&&e.length&&r().each(e,(function(){r()(this).hasClass("disable_easyzoom_on_mobile")&&r()("body").hasClass("mobile_device")||r()(this).data("easyZoom")||r()(this).easyZoom()}))},t().listinghistory=t().listinghistory||{},t().listinghistory=e=>{history.state;var i={rendered_facets:r()("#search_filters").prop("outerHTML"),rendered_active_filters:r()("#js-active-search-filters").prop("outerHTML"),rendered_products_top:r()("#js-product-list-top").prop("outerHTML"),rendered_products:r()("#js-product-list").prop("outerHTML"),rendered_products_bottom:r()("#js-product-list-bottom").prop("outerHTML")};let n=r()(".product_count_infinite");if(e)n.length&&(a=n.data("current_url"),window.history.pushState({st_infinite:a},void 0,a));else{var a=n.length?n.data("current_url"):t().urls.current_url;history.replaceState({st_infinite:a},void 0,a)}t().st_storage.setItem("st_infinite",a,i)},t().st_storage=t().st_storage||{},t().st_storage.setItem=(e,t,i)=>{if(window.sessionStorage){let a=localStorage.getItem(e);a=a?JSON.parse(a):{},a.hasOwnProperty(t)&&delete a[t],a[t]=i;var n=Object.keys(a);n.length>10&&(n=n.slice(0,n.length-10),r().each(n,(function(e,t){delete a[t]}))),localStorage.setItem(e,JSON.stringify(a))}},t().st_storage.getItem=(e,t)=>{if(window.sessionStorage){let i=localStorage.getItem(e);if(i&&(i=JSON.parse(i),void 0!==i[t]))return i[t]}return!1},t().st_storage.remove=e=>{window.sessionStorage&&localStorage.removeItem(e)},t().bannerlazy=t().bannerlazy||{},t().bannerlazy=()=>{r()(".banner_lazy_loading:visible .st_banner_lazy_image").each((function(){r()(this).waypoint((function(){var e=r()(this.element);this.destroy();var t=e.parent().find("source");t.length?(t.each((function(){r()(this).attr("srcset",r()(this).data("srcset")).removeAttr("data-srcset")})),e.removeClass("st_banner_lazy_image")):e.on("load",(function(){r()(this).removeClass("st_banner_lazy_image"),Waypoint.refreshAll()})),e.attr("src",e.data("src"))}),{offset:"120%"})})),r()(".banner_lazy_loading:visible .st_banner_image").each((function(){if(!r()(this).data("background"))return!0;r()(this).waypoint((function(){var e=r()(this.element);this.destroy(),e.css("background-image","url("+e.data("background")+")")}),{offset:"120%"})}))},i(714),s()($),window.Swiper=l(),A().prototype)t()[M]=A().prototype[M];var z,O,L,N,D,j={loop:!0,initialSlide:0,preloadImages:!1,paginationClickable:!0};$(document).ready((()=>{te(),(new T).init();let e=new P;e.init();let n=new S,r=new u;var a,s;(new _).init(),n.init(),r.init(),$(".to_top_btn").click((function(){return $("body,html").animate({scrollTop:0},"fast"),!1})),ee($(window).scrollTop()>300),sticky_menu(),sticky_mobile_header(),$("#st_mobile_menu .mo_mu_level_0,#st_mega_menu_column_mobile .mo_mu_level_0,.mobile_nav_box .mo_mu_level_0, .st_accordion .mo_mu_level_0").staccordion(),"undefined"!=typeof stproduct_sliders_array&&stproduct_sliders_array.length&&$.each(stproduct_sliders_array,(function(e,t){$(t.id_st).owlCarousel(t)})),$("#footer .opener, #footer div.title_block_name").click((function(e){return e.preventDefault(),$(this).closest(".block").toggleClass("st_open"),!1})),$("body").on("click",".mobile_tab_title",(function(e){return e.preventDefault(),$(this).closest(".tab-pane").toggleClass("st_open"),$(this).hasClass("p_c_slider")&&q($(this).data("id")),$(this).closest(".product_info_tabs").length&&q($(this).closest(".tab-pane").attr("id")),$(".images-container-7,.images-container-8").length&&$(".product_middle_column_inner").hcSticky("refresh"),$(".images-container-7 .pro_gallery_thumbs").length&&$(".images-container-7 .pro_gallery_thumbs").hcSticky("refresh"),!1})),G(),X(),U($(".st_popup_image")),Q($(".st_popup_video")),K($(".inline_popup_tri")),R(".pro_gallery_thumbs_grid .swiper-slide"),t().on("updatedProduct",(function(e){m(!0),t().prolazy(),G(),U($(".st_pro_popup_image")),Q($(".st_popup_video")),K($(".inline_popup_tri")),R(".pro_gallery_thumbs_grid .swiper-slide"),W()})),t().on("quickViewLoaded",(function(e){G(),U($(".st_pro_popup_image",e.quickview_id)),Q($(".st_popup_video",e.quickview_id)),K($(".inline_popup_tri",e.quickview_id)),R(e.quickview_id+" .pro_gallery_thumbs_grid .swiper-slide"),W()})),t().on("updatedProductListDOM",(i=>{X(),t().proquantity(),t().prolazy(),Waypoint.refreshAll(),W(),e.init(),F(),1==sttheme.infinite_scroll&&B()})),t().on("updateStSlider",(e=>{e&&void 0!==e.id&&"undefined"!=typeof swiper_options&&swiper_options.length&&$.each(swiper_options,(function(t,i){i.id_st==e.id&&(swiper_options[t].st_inited=void 0)})),G(),X(),F(),t().proquantity()})),t().on("refreshStSliderShow",(e=>{e&&void 0!==e.ids&&$.each(e.ids,(function(e,t){q("#"+t)}))})),t().on("refreshStSliderHide",(e=>{e&&void 0!==e.ids&&$.each(e.ids,(function(e,t){V("#"+t)}))})),t().on("updateFacets",(()=>{1==sttheme.infinite_scroll&&L&&L.destroy()})),t().proquantity(),t().on("updatedPComments",(e=>{U($(".st_popup_image"))})),t().on("stRunFunction",(e=>{e.name in i.g&&"function"==typeof i.g[e.name]&&i.g[e.name]()})),1==sttheme.infinite_scroll?B():2==sttheme.infinite_scroll&&(new k).init({onAfterPageLoad:function(i){X(),t().proquantity(),t().prolazy(),Waypoint.refreshAll(),W(),e.init(),F(),t().emit("infiniteAfterload",{})}}),t().prolazy(),$('.pc_slider_block_container a[data-toggle="tab"], .product_info_tabs > .nav-tabs a[data-toggle="tab"]').on("shown.bs.tab",(function(e){return q($(this).attr("href")),!0})).on("hide.bs.tab",(function(e){return V($(this).attr("href")),!0})),sticky_column_master(),function(){if(3!=sttheme.filter_position||sttheme.is_mobile_device)return!1;var e=$(".desktop_device #horizontal_filters");if(!e.length||e.parent().hasClass("sticky-wrapper"))return!1;new Waypoint.Sticky({element:e[0],handler:function(e){if("down"==e){$(this.element).width($(this.element).closest("#center_column").width());var t=0;$("#st_header.stuck").length&&(t+=$("#st_header.stuck").outerHeight()),$("#st_header .st_mega_menu_container.stuck").length&&(t+=$("#st_header .st_mega_menu_container.stuck").outerHeight()),$("#st_header .steasym_main.stuck").length&&(t+=$("#st_header .steasym_main.stuck").outerHeight()),$("#mobile_bar.stuck").length&&(t+=$("#mobile_bar.stuck").outerHeight()),$(this.element).css("top",t),O=setTimeout((()=>{var e=0;$("#st_header.stuck").length&&(e+=$("#st_header.stuck").outerHeight()),$("#st_header .st_mega_menu_container.stuck").length&&(e+=$("#st_header .st_mega_menu_container.stuck").outerHeight()),$("#st_header .steasym_main.stuck").length&&(e+=$("#st_header .steasym_main.stuck").outerHeight()),$("#mobile_bar.stuck").length&&(e+=$("#mobile_bar.stuck").outerHeight()),$(this.element).css("top",e)}),200)}else"up"==e&&(clearTimeout(O),$(this.element).width("auto").css("top",""))},offset:function(){var e=$(this.element).outerHeight();return $("#st_header.stuck").length&&(e+=$("#st_header.stuck").outerHeight()),$("#st_header .st_mega_menu_container.stuck").length&&(e+=$("#st_header .st_mega_menu_container.stuck").outerHeight()),$("#st_header .steasym_main.stuck").length&&(e+=$("#st_header .steasym_main.stuck").outerHeight()),$("#mobile_bar.stuck").length&&(e+=$("#mobile_bar.stuck").outerHeight()),e}})}(),$(".video_wraper").fitVids(),W(),t().on("updatedProductImages",(function(e){te()})),$('.st_vc_tab a[data-toggle="tab"]').on("shown.bs.tab",(function(e){return q($(this).attr("href")),!0})),$('.st_vc_tab a[data-toggle="tab"]').on("hide.bs.tab",(function(e){return V($(this).attr("href")),!0})),$(".st_vc_tab .nav-item:first-child a").tab("show"),$(".category-top-menu .collapse").on("hidden.bs.collapse shown.bs.collapse",(function(){J()})),t().bannerlazy(),void 0!==window.stwebp_supported&&null==window.stwebp_supported&&(a=function(e){window.stwebp_supported=e},(s=new Image).onload=s.onerror=function(){a(2==s.height)},s.src="data:image/webp;base64,UklGRi4AAABXRUJQVlA4TCEAAAAvAUAAEB8wAiMwAgSSNtse/cXjxyCCmrYNWPwmHRH9jwMA"),F(),t().on("sideBarOpened",(e=>{"open_column"==e.name&&t().bannerlazy()})),$(document).on("click",".quick_login.dropdown_wrap input",(function(){$(".quick_login.dropdown_wrap").addClass("stdontremoveopen")})),$(document).on("click",".st_read_more",(function(){$(this).closest(".truncate_block").toggleClass("de_truncated")})),$(document).on("click",".popsearch_tri",(function(){$(".popsearch").toggleClass("search_kai").find(".search_widget_text").focus()})),$(document).on("click","html,body",(function(e){0!=$(e.target).parents(".popsearch_tri").first().length||$(e.target).hasClass("popsearch")||0!=$(e.target).parents(".popsearch").first().length||$(".popsearch").removeClass("search_kai")})),t().on("easyZoomClicked",(function(e){H(e.jdom)})),$(document).on("click",".kk_triger",(function(e){return e.preventDefault(),H($(this)),!1})),$(document).on("keyup.kk",(function(e){27===e.keyCode&&$("body").removeClass("kk_open")})),$(document).on("click",".kk_close",(function(e){return e.preventDefault(),$("body").removeClass("kk_open"),!1})),void 0!==t().themeSelectors&&void 0!==t().themeSelectors.passwordPolicy&&E(".field-password-policy")}));var H=function(e){if($(".pro_gallery_kk").length&&void 0!==$(".pro_gallery_kk")[0].swiper){$("body").addClass("kk_open");var t=0;$(".pro_gallery_kk").find('img[src="'+e.attr("href")+'"]').length&&(t=$(".pro_gallery_kk").find('img[src="'+e.attr("href")+'"]').closest(".swiper-slide").index()),$(".pro_gallery_kk").find('img[data-src="'+e.attr("href")+'"]').length&&(t=$(".pro_gallery_kk").find('img[data-src="'+e.attr("href")+'"]').closest(".swiper-slide").index()),$(".pro_gallery_kk")[0].swiper.slideTo(t,0)}};function F(){$(".lazy_swiper .products_sldier_swiper:not(.swiper_slider_inview), .lazy_swiper.swiper_images_slider .swiper-container:not(.swiper_slider_inview), .lazy_swiper.tm_gallery:not(.swiper_slider_inview)").each((function(){$(this).waypoint((function(){var e=$(this.element);this.destroy(),e.addClass("swiper_slider_inview"),e.hasClass("tm_gallery")?X():G()}),{offset:"150%"})}))}var B=function(){L=new Waypoint.Infinite({element:$(".products.product_list")[0],items:".product_list_item",onAfterPageLoad:function(e){X(),t().proquantity(),t().prolazy(),Waypoint.refreshAll(),W(),(new P).init(),F(),t().emit("infiniteAfterload",{})}})},q=function(e){if(!$(e+" .products_sldier_swiper").length)return!1;var t=$(e+" .products_sldier_swiper")[0];if(void 0!==t&&void 0!==t.swiper){t.swiper.update(!0),void 0!==t.swiper.params.autoplay&&t.swiper.params.autoplay&&t.swiper.autoplay.start();var i=$(e+" .tm_gallery");i.length&&$.each(i,(function(){void 0!==this.swiper&&this.swiper.update(!0)})),Y()}},V=function(e){if(!$(e+" .products_sldier_swiper").length)return!1;var t=$(e+" .products_sldier_swiper")[0];void 0!==t&&void 0!==t.swiper&&void 0!==t.swiper.params.autoplay&&t.swiper.params.autoplay&&t.swiper.autoplay.stop()},W=function(){if("undefined"==typeof s_countdown_all)return!1;$(".s_countdown_block .s_countdown_timer, .c_countdown_timer").each((function(){var e=$(this),t=($(this).data("countdown"),$(this).data("gmdate")),i=e.data("id-product"),n=$(this).hasClass("countdown_pro"),r=new Date,a=new Date(r.getTime()+6e4*r.getTimezoneOffset());(s_countdown_all||$.inArray(i,s_countdown_id_products)>-1)&&new Date(t)>a&&(e.countdown(new Date(new Date(t).getTime()-6e4*r.getTimezoneOffset())).on("update.countdown",(function(t){if(s_countdown_style){var i='<div><i class="icon-clock"></i>%D '+(1==t.offset.totalDays?s_countdown_lang.day:s_countdown_lang.days)+' <span class="for_c_time_style">%H : %M : %S</span></div>';n&&(i="%D "+(1==t.offset.totalDays?s_countdown_lang.day:s_countdown_lang.days)+' <span class="for_c_time_style">%H : %M : %S</span>')}else i='<div><span class="countdown_number">%D</span><span class="countdown_text">'+(1==t.offset.totalDays?s_countdown_lang.day:s_countdown_lang.days)+'</span></div><div><span class="countdown_number">%H</span><span class="countdown_text">'+s_countdown_lang.hrs+'</span></div><div><span class="countdown_number">%M</span><span class="countdown_text">'+s_countdown_lang.min+'</span></div><div><span class="countdown_number">%S</span><span class="countdown_text">'+s_countdown_lang.sec+"</span></div>",n&&(i="%D "+(1==t.offset.totalDays?s_countdown_lang.day:s_countdown_lang.days)+" %H "+s_countdown_lang.hrs+" %M "+s_countdown_lang.min+" %S "+s_countdown_lang.sec);e.html(t.strftime(i))})).on("finish.countdown",(function(e){window.location.reload(!0)})),n?e.closest(".countdown_outer_box").addClass("counting"):e.closest(".countdown_wrap").addClass("counting"))})),$(".s_countdown_block .s_countdown_perm, .c_countdown_perm, .countdown_pro_perm").each((function(){(s_countdown_all||$.inArray($(this).data("id-product"),s_countdown_id_products)>-1)&&$(this).addClass("counting")}))};function R(e){$(document).on("click",e,(function(t){t.preventDefault();let i=$(e).index(this);return void 0!==$(".pro_gallery_top")[0].swiper&&$(".pro_gallery_top")[0].swiper.slideTo(i),$(e).removeClass("clicked_thumb").eq(i).addClass("clicked_thumb"),!1}))}function Y(){var e;"undefined"!=typeof swiper_options&&swiper_options.length&&$.each(swiper_options,(function(e,t){if(void 0!==t.st_inited&&t.st_inited){let e=$(t.id_st);1==e.length&&void 0!==e[0].swiper&&($(e[0].swiper.slides).length==$(e[0].swiper.slides).filter(".swiper-slide-visible").length?($(e[0].swiper.params.navigation.nextEl).hide(),$(e[0].swiper.params.navigation.prevEl).hide()):($(e[0].swiper.params.navigation.nextEl).show(),$(e[0].swiper.params.navigation.prevEl).show()))}})),(e=$(".tm_gallery")).length&&$.each(e,(function(){void 0!==this.swiper&&($(this.swiper.slides).length==$(this.swiper.slides).filter(".swiper-slide-visible").length?($(this.swiper.params.navigation.nextEl).hide(),$(this.swiper.params.navigation.prevEl).hide()):($(this.swiper.params.navigation.nextEl).show(),$(this.swiper.params.navigation.prevEl).show()))}))}function G(){var e=[],t=[],i=[],n=[],r=[];function a(e){clearTimeout(n[e]),r[e]=!0,$(swiper_options[e].id_st+" .swiper_custom_bar").hide()}function s(a){if(clearTimeout(n[a]),r[a])return!1;t[a]=0,i[a]=!1,n[a]=setInterval((function(){!1===i[a]?(t[a]+=1e3/swiper_options[a].bar_time,$(swiper_options[a].id_st+" .swiper_custom_bar").css({width:t[a]+"%"}),t[a]>=100&&(clearTimeout(n[a]),void 0!==swiper_options[a].autoplay&&swiper_options[a].autoplay||e[a].slideNext())):(t[a]=0,(void 0===swiper_options[a].autoplayDisableOnInteraction||swiper_options[a].autoplayDisableOnInteraction)&&clearTimeout(n[a]))}),10)}"undefined"!=typeof swiper_options&&swiper_options.length&&$.each(swiper_options,(function(t,n){if(void 0===n.st_inited&&(void 0===n.inviewwatcher||void 0!==n.inviewwatcher&&$(n.id_st).hasClass("swiper_slider_inview")||void 0!==n.inviewwatcher&&!$(n.id_st).closest(".lazy_swiper").length)){var r=$.extend({},j,n);void 0!==r.st_full_screen&&r.st_full_screen&&$(window).height()>r.st_height&&$(n.id_st).height($(window).height()),$(n.id_st).closest(".elementor-widget-wrap").addClass("e-swiper-container"),$(n.id_st).closest(".elementor-widget").addClass("e-widget-swiper"),e[t]=new(l())(n.id_st,r),swiper_options[t].st_inited=!0,void 0!==r.custom_progress_bar&&(s(t),e[t].on("slideChangeTransitionStart",(function(e){s(t)})),e[t].on("touchStart",(function(e){i[t]=!0,function(e){(void 0===swiper_options[e].autoplayDisableOnInteraction||swiper_options[e].autoplayDisableOnInteraction)&&a(e)}(t)})),e[t].on("touchEnd",(function(e){i[t]=!1})),e[t].on("autoplayStop",(function(e){a(t)}))),void 0!==r.autoplay&&r.autoplay&&void 0!==r.autoplayStop&&r.autoplayStop&&e[t].autoplay.stop(),W(),setTimeout((function(){X()}),300)}}))}function X(){var e=$(".tm_gallery_top:not(.swiper_inited)");e.length&&$.each(e,(function(){var e=$(this),t=e.parents(".lazy_swiper");if((!t.length||t.find(".products_sldier_swiper").hasClass("swiper_slider_inview"))&&(!e.hasClass("lazy_swiper")||e.hasClass("swiper_slider_inview"))){var i=e.find(".swiper-slide").index(e.find(".tm_cover")),n=$.extend({},j,{navigation:{nextEl:$(".swiper-button-next",this)[0],prevEl:$(".swiper-button-prev",this)[0]},slidesPerView:1,on:{init:function(e){$(e.el).addClass("swiper_inited"),$(e.slides).length==$(e.slides).filter(".swiper-slide-visible").length?$(e.el).find(".swiper-button").hide():$(e.el).find(".swiper-button").show()},slideChangeTransitionEnd:function(e){var t=$(e.el).closest(".ajax_block_product").find(".tm_gallery_thumbs");t.length&&void 0!==t[0].swiper&&t[0].swiper.slides.removeClass("clicked_thumb").eq(e.activeIndex).addClass("clicked_thumb")}},initialSlide:i>0?i:0,nested:e.closest(".ajax_block_product").hasClass("swiper-slide"),lazy:1==e.data("lazyload"),spaceBetween:0,watchSlidesProgress:!0,watchSlidesVisibility:!0,loop:!1}),r=e.closest(".ajax_block_product").find(".tm_gallery_thumbs");r.length&&(n=$.extend(n,{thumbs:{swiper:{el:r[0],navigation:{nextEl:$(".swiper-button-next",r)[0],prevEl:$(".swiper-button-prev",r)[0]},slidesPerView:"auto",on:{init:function(e){$(e.el).addClass("swiper_inited"),$(e.slides).length==$(e.slides).filter(".swiper-slide-visible").length?$(e.el).find(".swiper-button").hide():$(e.el).find(".swiper-button").show()},click:function(e){$(e.slides).removeClass("clicked_thumb").eq(e.clickedIndex).addClass("clicked_thumb")}},initialSlide:i>0?i:0,nested:e.closest(".ajax_block_product").hasClass("swiper-slide"),lazy:1==e.data("lazyload")&&!i,spaceBetween:3,watchSlidesProgress:!0,watchSlidesVisibility:!0,loop:!1}}})),new(l())(this,n)}}))}function U(e){var t={};$(e).each((function(){var e=$(this).data("group")?$(this).data("group"):"others";t[e]||(t[e]=[]),t[e].push(this)})),$.each(t,(function(){$(this).magnificPopup({type:"image",tLoading:"",image:{verticalFit:1==sttheme.popup_vertical_fit,titleSrc:"title"},removalDelay:500,callbacks:{beforeOpen:function(){var e=this.st.el.hasClass("st_pro_popup_image");this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim"),this.st.mainClass="mfp-zoom-in"+(e?" st_pro_mfp ":"")},elementParse:function(e){var t=new RegExp("\\/(\\d+)\\-(\\w+)\\_default([\\.\\/])","i").exec(e.src);t&&void 0!==window.stwebp&&window.stwebp[t[2]+"_default"]&&void 0!==window.stwebp_supported&&window.stwebp_supported?e.src=e.src.replace(/\.jpg$/,".webp"):e.src=e.src.replace(/\.webp$/,".jpg")},afterClose:function(){}},gallery:{enabled:!0,tPrev:sttheme.magnificpopup_tprev,tNext:sttheme.magnificpopup_tnext,tCounter:sttheme.magnificpopup_tcounter}})}))}function Q(e){$.each(e,(function(){$(this).magnificPopup({type:"iframe",preloader:!1,fixedContentPos:!1})}))}function K(e){$.each(e,(function(){$(this).magnificPopup({type:"inline",removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass="mfp-zoom-in"}},preloader:!1,fixedContentPos:!1})}))}function Z(){var e=0;if(sttheme.is_mobile_device&&1==sttheme.use_mobile_header)e=$("#mobile_bar").outerHeight();else if(sttheme.sticky_option){var t=$(2==sttheme.sticky_option||4==sttheme.sticky_option?"#st_header":"#st_header .st_mega_menu_container");t.length&&(e=t.outerHeight())}return e}function J(e){if(!sttheme.sticky_column)return!1;$("body#category "+(1==sttheme.sticky_column?"#left_column":"#right_column")+" .main_column_box").hcSticky({top:Z()})}function ee(e){e?$("#to_top_wrap .icon_wrap").removeClass("disabled"):$("#to_top_wrap .icon_wrap").addClass("disabled")}function te(){if(void 0!==sttheme.retina&&1==parseInt(sttheme.retina,10)&&ie()){new Array;for(var e=$("a.replace-2x").get(),t=0;t<e.length;t++){var i=e[t].href,n=i.replace(/\/(\d+)\-(\w+)\_default([\.\/])/i,"/$1-$2_default_2x$3");n!=i&&(e[t].href=n)}}}$(window).scroll((function(){ee($(this).scrollTop()>300)})),i.g.sticky_menu=function(){if(N&&($("#st_header").length&&N.$element.is($("#st_header"))||$("#st_header .st_mega_menu_container").length&&N.$element.is($("#st_header .st_mega_menu_container"))||$("#st_header .steasym_main").length&&N.$element.is($("#st_header .steasym_main")))&&N.destroy(),0==sttheme.sticky_option||sttheme.is_mobile_device&&1!=sttheme.use_mobile_header||$(window).width()<992)return!1;var e=$(2==sttheme.sticky_option||4==sttheme.sticky_option?"#st_header":$("#st_header .steasym_main").length?"#st_header .steasym_main":"#st_header .st_mega_menu_container");if(!e.length||e.parent().hasClass("sticky-wrapper"))return!1;N=new Waypoint.Sticky({element:e[0],handler:function(e){"down"==e?(3!=sttheme.sticky_option&&4!=sttheme.sticky_option||$(this.element).addClass("fadeInDownLarge"),$(this.element).css("top",0),J()):"up"==e&&($(this.element).removeClass("fadeInDownLarge").css("top",""),J())},offset:function(){return 3==sttheme.sticky_option||4==sttheme.sticky_option?-$(this.element).outerHeight():-1}})},i.g.sticky_mobile_header=function(){var e=$("#mobile_bar");return sttheme.sticky_mobile_header<2?(D&&e.length&&D.destroy(),!1):!(!e.length||e.parent().hasClass("sticky-wrapper"))&&void(D=new Waypoint.Sticky({element:e[0],wrapper:'<div class="sticky-wrapper mobile_header_wrapper" />',handler:function(e){},offset:function(){return-1}}))},$(window).resize((function(){clearTimeout(z),z=setTimeout((function(){Y(),t().bannerlazy()}),200)})),i.g.sticky_column_master=function(){if(!sttheme.sticky_column||$(window).width()<992)return!1;$("body#category "+(1==sttheme.sticky_column?"#left_column":"#right_column")+" .main_column_box").hcSticky({stickTo:$("#center_column")[0],top:Z(),queries:{992:{disable:!0}}})};var ie=function(){var e="undefined"==typeof exports?window:exports;return e.devicePixelRatio>1||!(!e.matchMedia||!e.matchMedia("(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)").matches)}})()})();$(document).ready(function(){var promises=[];var abortPreviousRequests=function(){var promise;while(promises.length>0){promise=promises.pop();promise.abort()}};$('body').on('click','.ajax_add_to_cart_button',function(event){event.preventDefault();if(!$(this).data('id-product')||$(this).prop('disabled')=='disabled')
return!1;var caller_element=this;if($(this).hasClass('st_maximum_already')){alert(st_maximum_already_message);return!1}
var query='id_product='+$(this).data('id-product')+'&add=1&action=update&token='+prestashop.static_token+'&rand='+new Date().getTime();var actionURL=prestashop.urls.pages.cart;$(this).prop('disabled','disabled').addClass('active');if($(this).data('id-product-attribute'))
query+='&ipa='+$(this).data('id-product-attribute');var qty=$(this).data('minimal-quantity')?$(this).data('minimal-quantity'):1;var quantity_wanted=$(this).closest('.ajax_block_product').find('input[name=pro_quantity]').val();if(!quantity_wanted)
quantity_wanted=1;query+='&qty='+(quantity_wanted>qty?quantity_wanted:qty);$.post(actionURL,query,null,'json').then(function(resp){prestashop.emit('stUpdateCart',{reason:{idProduct:resp.id_product,idProductAttribute:resp.id_product_attribute,linkAction:'add-to-cart',updateornot:!1,caller_element:caller_element},resp:resp})}).fail(function(resp){$(caller_element).removeProp('disabled').removeClass('active');prestashop.emit('handleError',{eventType:'addProductToCart',resp:resp})});return!1});$('body').on('click','[data-button-action="add-to-cart"]',function(event){event.preventDefault();var _target=$(event.target);if(!_target.hasClass('btn'))
_target=_target.closest('.btn');_target.prop('disabled','disabled').addClass('active')});prestashop.on('stUpdateCart',st_update_cart);prestashop.on('updateCart',st_update_cart);$('body').on('click','.ajax_remove_button',function(event){event.preventDefault();var cartAction={url:$(this).attr('href').replace(/^https?:/,''),type:'deleteFromCart'};var requestData={ajax:'1',action:'update'};abortPreviousRequests();$.ajax({url:cartAction.url,method:'POST',data:requestData,dataType:'json',beforeSend:function(jqXHR){promises.push(jqXHR)}}).then(function(resp){prestashop.emit('stUpdateCart',{reason:{idProduct:resp.id_product,idProductAttribute:resp.id_product_attribute,linkAction:'delete-from-cart',updateornot:!1},resp:resp});if($('body.product-id-'+resp.id_product).length)
prestashop.emit('updateProduct',{reason:{},eventType:'updatedProductCombination',event:null});if(typeof(prestashop.page.page_name)!=='undefined'&&(prestashop.page.page_name=='cart'||prestashop.page.page_name=='module-steasycheckout-default'))
prestashop.emit('updateCart',{reason:{idProduct:resp.id_product,idProductAttribute:resp.id_product_attribute},resp:resp})}).fail(function(resp){prestashop.emit('handleError',{eventType:'updateProductInCart',resp:resp,cartAction:cartAction.type})})})});var st_update_cart=function(event){var refreshURL='';if($('.blockcart').length)
refreshURL=$('.blockcart').data('refresh-url');if(typeof(st_refresh_url)!='undefined'&&st_refresh_url)
refreshURL=st_refresh_url;if(!refreshURL)
return!1;var requestData={};var updateornot=!0;var caller_element=null;if(event&&event.reason){requestData={id_product_attribute:event.reason.idProductAttribute,id_product:event.reason.idProduct,action:event.reason.linkAction};if(typeof(event.reason.updateornot)!=='undefined')
updateornot=event.reason.updateornot;if(typeof(event.reason.caller_element)!=='undefined')
caller_element=event.reason.caller_element}
if(typeof(event.resp)!='undefined'&&typeof(event.resp.hasError)!='undefined'&&event.resp.hasError&&typeof(event.resp.errors)!='undefined'&&event.resp.errors){alert(event.resp.errors.join('<br/>'));if(caller_element)
$(caller_element).removeClass('active');return!1}
if(typeof(go_to_shopping_cart)!='undefined'&&go_to_shopping_cart){if(!event||typeof(event.reason)=='undefined'||typeof(event.reason.linkAction)=='undefined'||event.reason.linkAction!='add-voucher'){window.location.href=st_cart_page_url;return!1}}
if(typeof(sttheme.buy_now)!='undefined'&&sttheme.buy_now&&$('button[data-button-action="add-to-cart"].benabled.active').length){window.location.href=st_cart_page_url;return!1}
if(caller_element){$.extend(requestData,{'minimal-quantity':$(caller_element).data('minimal-quantity')})}
$.post(refreshURL,requestData).then(function(resp){$('.shoppingcart-list').replaceWith(resp.preview);prestashop.emit('stUpdatedCart',{reason:{},resp:resp});if(resp.products_count){if(resp.products_count>9)
$('.ajax_cart_quantity').addClass('dozens');else $('.ajax_cart_quantity').removeClass('dozens');$('.ajax_cart_quantity').removeClass('lingge').text(resp.products_count);$('.cart_body').removeClass('no_show_empty')}else{$('.ajax_cart_quantity').removeClass('dozens').addClass('lingge').text(0);hover_display_cp==1&&$('.cart_body').addClass('no_show_empty')}
if(resp.total_value){$('.ajax_cart_total').text(resp.total_value)}
if(resp.maximum_already&&caller_element){$(caller_element).addClass('st_maximum_already')}
if(typeof(requestData.action)!=='undefined'&&requestData.action=='add-to-cart'){if(addtocart_animation>=1&&addtocart_animation<=3&&resp.flying_image){var flyed=showFlyimgImage(addtocart_animation,resp.flying_image,caller_element);if(flyed&&updateornot)
prestashop.emit('updateProduct',{reason:{},eventType:'updatedProductCombination',event:null});if(!flyed&&resp.modal&&typeof(prestashop.blockcart)!=='undefined'){prestashop.blockcart.showModal(resp.modal,updateornot)}}else if(addtocart_animation==4&&$('#st_header .blockcart').length){$('#st_header .blockcart').addClass('open')}else if(addtocart_animation==5){if($('.rightbar_cart').length)
$('.rightbar_cart .rightbar_tri').trigger('click');else prestashop.emit('stOpenSidebar',{name:'side_products_cart',direction:'open_bar_right'})}else if(resp.modal&&typeof(prestashop.blockcart)!=='undefined'){prestashop.blockcart.showModal(resp.modal,updateornot)}
if(caller_element)
$(caller_element).removeProp('disabled').removeClass('active');}
if($('button[data-button-action="add-to-cart"]').hasClass('active'))
$('button[data-button-action="add-to-cart"]').prop('disabled',!1).removeClass('active');}).fail(function(resp){prestashop.emit('handleError',{eventType:'updateShoppingCart',resp:resp})})};var showFlyimgImage=function(addtocart_animation,flying_image,caller_element){var element=cartBlock=null;if(!caller_element){if($('.images-container-7,.images-container-8').length){var pro_gallery_top_dom=$('.st_image_scrolling_wrap','.quickview');if(!pro_gallery_top_dom.length)
pro_gallery_top_dom=$('.st_image_scrolling_wrap');if(pro_gallery_top_dom.length){var items=pro_gallery_top_dom.find('.pro_gallery_item');$.each(items,function(){var rect=this.getBoundingClientRect();if(rect.top>=0){element=$(this);return!1}})}}else{var pro_gallery_top_dom=$('.pro_gallery_top','.quickview');if(!pro_gallery_top_dom.length)
pro_gallery_top_dom=$('.pro_gallery_top');if(pro_gallery_top_dom.length&&typeof(pro_gallery_top_dom[0].swiper)!=='undefined')
element=$(pro_gallery_top_dom[0].swiper.slides).eq(pro_gallery_top_dom[0].swiper.activeIndex).find('.pro_gallery_item');}
if(!element&&$('.product_gallery_no_picture').length)
element=$('.product_gallery_no_picture');}else{element=$(caller_element).closest('.ajax_block_product').find('.front-image');if(!element.length)
element=$(caller_element).closest('.ajax_block_product').find('.tm_gallery_top .swiper-slide-active .tm_gallery_item');if(!element.length)
element=$('.stcompare_td_'+$(caller_element).data('id-product')+' .product_image img');}
if(!element||!element.length)
return!1;var pictureOffsetOriginal=element.hasClass('front-image')?element.parent().offset():element.offset();if(!pictureOffsetOriginal)
return!1;pictureOffsetOriginal.right=$(window).innerWidth()-pictureOffsetOriginal.left-element.width();var flying_image_width=element.width();var flying_image_height=element.height();if(addtocart_animation==3){cartBlock=$('.rightbar_cart:visible');if(!cartBlock.length)
cartBlock=$('.cart_mobile_bar_tri:visible')}
if(addtocart_animation!=3||!cartBlock||!cartBlock.length){cartBlock=$('.st_shopping_cart:visible');if(!cartBlock.length)
cartBlock=$('.cart_mobile_bar_tri:visible')
if(!cartBlock.length)
cartBlock=$('.rightbar_cart:visible');}
if(!cartBlock||!cartBlock.length)
return!1;var cartBlockOffset=cartBlock.offset();if(!cartBlockOffset)
return!1;cartBlockOffset.right=$(window).innerWidth()-cartBlockOffset.left-Math.floor(cartBlock.width()/2);$('.flying_image').remove();element.clone().addClass('flying_image').on('load',function(){$(this).show().animate({width:'50px',height:'50px',opacity:0.5,top:cartBlockOffset.top,right:cartBlockOffset.right-25},((pictureOffsetOriginal.top-cartBlockOffset.top)<1000?1000:pictureOffsetOriginal.top-cartBlockOffset.top)).fadeOut(100,function(){$(this).remove()});if(addtocart_animation==2){$('body,html').animate({scrollTop:cartBlockOffset.top},((pictureOffsetOriginal.top-cartBlockOffset.top)<1000?1000:pictureOffsetOriginal.top-cartBlockOffset.top))}}).css({top:pictureOffsetOriginal.top,right:pictureOffsetOriginal.right,width:flying_image_width,height:flying_image_height,display:'none'}).appendTo($('.st-container'));return!0};/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    ST-themes <hellolee@gmail.com>
*  @copyright 2007-2017 ST-themes
*  @license   Use, by you or one client for one Prestashop instance.
*/
jQuery(function($){if($('.st_map_block').length&&typeof(st_google_api_key)!=='undefined')
$.getScript('https://maps.googleapis.com/maps/api/js?key='+st_google_api_key+'&callback=init_global_maps');});var init_global_maps=function(){$.each($('.st_map_block'),function(){window['initMap_'+$(this).data('id_map')]()})};/*!
 * The Final Countdown for jQuery v2.1.0 (http://hilios.github.io/jQuery.countdown/)
 * Copyright (c) 2015 Edson Hilios
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;g>f;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&10>m&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),1===Math.abs(b)?d:c}var f=[],g=[],h={precision:100,elapse:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",w:"weeks",d:"daysToWeek",D:"totalDays",H:"hours",M:"minutes",S:"seconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&0>b?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),totalDays:Math.floor(this.totalSecsLeft/60/60/24),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear())},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});/**
 * Social Login
 *
 * @author    businesstech.fr <modules@businesstech.fr> - https://www.businesstech.fr/
 * @copyright Business Tech  - https://www.businesstech.fr/
 * @license   see file: LICENSE.txt
 *
 *           ____    _______
 *          |  _ \  |__   __|
 *          | |_) |    | |
 *          |  _ <     | |
 *          | |_) |    | |
 *          |____/     |_|
 */
var FpcModule=function(sName){this.name=sName;this.oldVersion=!1;this.msgs={};this.aError=[];this.sImgUrl="";this.sWebService="";this.sShortCodeUrl="";this.response=null;var oThis=this;this.show=function(sId,sHtml){$("#"+sId).html(sHtml).css("style","none");$("#"+sId).show("fast")};this.hide=function(sId){$("#"+sId).hide("fast",function(){$("#"+sId).html("")})};this.form=function(sForm,sURI,sRequestParam,sToDisplay,sToHide,bSubmit,bFancyBox,sCallback,sErrorType,sLoadBar){if(sLoadBar){$("#"+sLoadBar).show()}
var aError=[];var fields=$("#"+sForm).serializeArray();var iCounter=0;var bIsError=!1;toastr.options={closeButton:!0,debug:!1,newestOnTop:!1,progressBar:!0,positionClass:"toast-top-right",preventDuplicates:!1,onclick:null,showDuration:"5000",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut",};jQuery.each(fields,function(i,field){bIsError=!1;switch(field.name){case "id":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.id;toastr.error(oThis.msgs.id);bIsError=!0}
break;case "secret":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.secret;toastr.error(oThis.msgs.secret);bIsError=!0}
break;case "callback":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.callback;toastr.error(oThis.msgs.callback);bIsError=!0}
break;case "scope":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.scope;toastr.error(oThis.msgs.scope);bIsError=!0}
break;case "developerKey":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.developerKey;toastr.error(oThis.msgs.developerKey);bIsError=!0}
break;case "socialEmail":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.socialEmail;toastr.error(oThis.msgs.socialEmail);bIsError=!0}
break;case "fbpscDefaultConnectText":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.defaultText;toastr.error(oThis.msgs.defaultText);bIsError=!0}
break;case "fbpscPrefixCode":if(field.value==""&&$('input:radio[name="fbpscEnableVoucher"]').val()=="true"){oThis.aError[iCounter]=oThis.msgs.prefixCode;toastr.error(oThis.msgs.prefixCode);bIsError=!0}
break;case "fbpscApiRequestType":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.apiType;toastr.error(oThis.msgs.apiType);bIsError=!0}
break;case "fbpscHtmlElement":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.htmlElement;toastr.error(oThis.msgs.htmlElement);bIsError=!0}
break;case "fbpscPositionName":if(field.value==""){oThis.aError[iCounter]=oThis.msgs.positionName;toastr.error(oThis.msgs.positionName);bIsError=!0}
break;case "sCssPaddingTop":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.padding;toastr.error(oThis.msgs.padding);bIsError=!0}
break;case "sCssPaddingRight":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.padding;toastr.error(oThis.msgs.padding);bIsError=!0}
break;case "sCssPaddingBottom":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.padding;toastr.error(oThis.msgs.padding);bIsError=!0}
break;case "sCssPaddingLeft":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.padding;toastr.error(oThis.msgs.padding);bIsError=!0}
break;case "sCssMarginTop":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.margin;toastr.error(oThis.msgs.margin);bIsError=!0}
break;case "sCssMarginRight":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.margin;toastr.error(oThis.msgs.margin);bIsError=!0}
break;case "sCssMarginBottom":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.margin;toastr.error(oThis.msgs.margin);bIsError=!0}
break;case "sCssMarginLeft":if(field.value==""||$.isNumeric(field.value)==!1){oThis.aError[iCounter]=oThis.msgs.margin;toastr.error(oThis.msgs.margin);bIsError=!0}
break;default:break}
if(($('input[name="'+field.name+'"]')!=undefined||$('textarea[name="'+field.name+'"]')!=undefined||$('select[name="'+field.name+'"]').length!=undefined)&&bIsError==!0){if($('input[name="'+field.name+'"]').length!=0){$('input[name="'+field.name+'"]').parent().addClass("has-error has-feedback");$('input[name="'+field.name+'"]').append('<span class="icon-remove-sign"></span>')}
if($('textarea[name="'+field.name+'"]').length!=0){$('textarea[name="'+field.name+'"]').parent().addClass("has-error has-feedback");$('textarea[name="'+field.name+'"]').append('<span class="icon-remove-sign"></span>')}
if($('select[name="'+field.name+'"]').length!=0){$('select[name="'+field.name+'"]').parent().addClass("has-error has-feedback");$('select[name="'+field.name+'"]').append('<span class="icon-remove-sign"></span>')}
++iCounter}});if(oThis.aError.length==0&&!bIsError){if(bSubmit==undefined||bSubmit==null||!bSubmit){if(sLoadBar&&sToHide!=null){oThis.hide(sToHide,!0)}
var sFormParams=$.param(fields);if(sRequestParam!=null&&sRequestParam!=""){sFormParams=sRequestParam+"&"+sFormParams}
this.ajax(sURI,sFormParams,sToDisplay,sToHide,bFancyBox,null,sLoadBar);return!0}else{if(sLoadBar){$("#"+sLoadBar).hide()}
document.forms[sForm].submit();return!0}}else{$("#"+sLoadBar).hide()}
this.displayError(sErrorType);return!1};this.ajax=function(sURI,sParams,sToShow,sToHide,bFancyBox,bFancyBoxActivity,sLoadBar){if(bFancyBox&&bFancyBoxActivity!=!1){}
sParams="sMode=xhr"+(sParams==null||sParams==undefined?"":"&"+sParams);$.ajax({type:"POST",url:sURI,data:sParams,dataType:"html",success:function(data){if(sLoadBar){$("#"+sLoadBar).hide()}
if(bFancyBox){$.fancybox(data);$.fancybox.close();if(sToShow==oThis.name+"ConnectorList"){oThis.ajax(""+sURI,"sAction=display&sType=connectors",""+sToShow+"",""+sToHide+"")}else if(sToShow==oThis.name+"HookList"){sToShow=sToHide=oThis.name+"ConnectorList";oThis.ajax(""+sURI+"connectors","sAction=display&sType=connectors",""+sToShow+"",""+sToHide+"");sToShow=sToHide=oThis.name+"HookList";oThis.ajax(""+sURI+"hooks","sAction=display&sType=hooks",""+sToShow+"",""+sToHide+"")}else if(sToShow==oThis.name+"HookAdvanced"){oThis.ajax(""+sURI,"sAction=display&sType=hookAdvanced",""+sToShow+"",""+sToHide+"")}else if(sToShow==oThis.name+"ShortCode"){oThis.ajax(""+sURI,"sAction=display&sType=shortCode",""+sToShow+"",""+sToHide+"")}}else if(sToShow!=null&&sToHide!=null){if(sToShow==sToHide){oThis.hide("fast");$("#"+sToHide).hide("fast");$("#"+sToHide).empty();setTimeout("",1000);oThis.show(sToShow,data)}else{oThis.hide(sToHide);setTimeout("",1000);oThis.show(sToShow,data)}}else if(sToShow!=null){oThis.show(sToShow,data)}else if(sToHide!=null){oThis.hide(sToHide)}else{oThis.response=data}
setTimeout(function(){$('#fbpscConfirm').slideUp()},2000)},error:function(xhr,ajaxOptions,thrownError){$("#"+oThis.name+"FormError").addClass("alert error");oThis.show("#"+oThis.name+"FormError","<h3>internal error</h3>")},})};this.displayError=function(sType){if(oThis.aError.length!=0){var sError='<div class="alert alert-danger"><button type="button" class="close" data-dismiss="alert">×</button><ul class="list-unstyled">';for(var i=0;i<oThis.aError.length;++i){sError+="<li>"+oThis.aError[i]+"</li>"}
sError+="</ul></div>";$("#"+oThis.name+sType+"Error").html(sError);$("#"+oThis.name+sType+"Error").slideDown();oThis.aError=[];return!1}};this.changeSelect=function(sId,mDestId,sDestId2,sDestIdToHide,bForce,mVal){if(bForce){if(typeof mDestId=="string"){mDestId=[mDestId]}
for(var i=0;i<mDestId.length;++i){if(mVal){$("#"+mDestId[i]).fadeIn("fast",function(){$("#"+mDestId[i]).css("display","block")})}else{$("#"+mDestId[i]).fadeOut("fast")}}}else{$("#"+sId).bind("change",function(event){$("#"+sId+" input:checked").each(function(){switch($(this).val()){case "true":$("#"+sDestId).fadeIn("fast",function(){$("#"+sDestId).css("display","block")});break;default:$("#"+sDestId).fadeOut("fast");if(sDestId2&&sDestIdToHide){$("#"+sDestId2+" input").each(function(){switch($(this).val()){case "false":$(this).attr("checked","checked");$("#"+sDestIdToHide).fadeOut("fast");break;default:$(this).attr("checked","");break}})}
break}})})}};this.selectAll=function(sCible,sType){if(sType=="check"){$(sCible).attr("checked",!0)}else{$(sCible).attr("checked",!1)}};this.updateHook=function(sURI,sHookList,sToShow,sToHide,bFancyBox){var sList="";if($("#"+sHookList+" li").length!=0){var aConnectorId=[];$("#"+sHookList+" li").each(function(i,elt){aConnectorId[i]=elt.id});sList=aConnectorId.toString()}
this.ajax(sURI,"sConnectorList="+sList,sToShow,sToHide,bFancyBox)};this.draggableConnector=function(){$("#"+oThis.name+"DraggableConnector li").draggable({revert:"invalid",});$("#"+oThis.name+"DroppableConnector ul").droppable({drop:function(event,ui){$("#"+oThis.name+"DroppableConnector ul").append(ui.draggable);$(ui.draggable).css({position:"relative",top:"0px",left:"0px",display:"block"}).draggable("disable").css({opacity:1}).addClass("fbpscsortli","ui-state-default","pull-left","col-xs-8");var bFound=$(ui.draggable).find("span."+oThis.name+"Garbage");if(bFound.length==0){var oCurrentDragableA=$(ui.draggable).html();console.log(oCurrentDragableA);var oGarbage='<span class="pull-left btn btn-default btn-mini '+oThis.name+'Garbage"> <i class="fa fa-trash"/></span>';$(ui.draggable).html();$(ui.draggable).html('<div class="row" id="fbpsc" ><div class="col-xs-10">'+oCurrentDragableA+'</div><div class="col-xs-2">'+oGarbage+" </div></div>");$(ui.draggable).bind("click",function(){oThis.deleteConnector(this)})}},})};this.sortableConnector=function(){$("#"+oThis.name+"Sortable").sortable();$("#"+oThis.name+"Sortable").disableSelection()};this.deleteConnector=function(oElt){$(oElt).find("button."+oThis.name+"Garbage").remove();$("#"+oThis.name+"DraggableConnector ul").append($(oElt).removeClass("fbpscsortli").draggable("enable").draggable("option","revert","invalid").addClass("fbpscdragli"))};this.getCharts=function(sElem,aData,aLabel,aColor,sTitle){aDataSet={datasets:[{data:aData,backgroundColor:aColor,},],labels:aLabel,};new Chart(ctx,{type:"pie",data:aDataSet,options:{legend:{position:"bottom",},title:{display:!0,position:"top",text:sTitle,fontSize:14,},},})};this.hide=function(sId){$("#"+sId).hide("fast",function(){$("#"+sId).html("")})};this.getBulkCheckBox=function(sFieldName){var iElemId=[];$('input:checked[name="'+sFieldName+'"]').each(function(){iElemId.push($(this).val())});if(iElemId!=null)return iElemId;else return(iElemId=1)};this.getContentFromSwitch=function(sIdElemOn,sElem){if($("#"+sIdElemOn).is(":checked")==!0){$("#"+sElem).show()}else{$("#"+sElem).hide()}};this.getConnectors=function(sSelector,sShortCodeName){this.ajax(this.sShortCodeUrl,"sAction=display&sType=shortCode&sShortCodeName="+sShortCodeName,"sl_connector_"+sSelector,null,null,null,null)};this.activateLinkedOption=function(sElement,sAction){if(sAction=='click'){$('#'+sElement).trigger('click')}}};/**
 * Social Login
 *
 * @author    businesstech.fr <modules@businesstech.fr> - https://www.businesstech.fr/
 * @copyright Business Tech  - https://www.businesstech.fr/
 * @license   see file: LICENSE.txt
 *
 *           ____    _______
 *          |  _ \  |__   __|
 *          | |_) |    | |
 *          |  _ <     | |
 *          | |_) |    | |
 *          |____/     |_|
 */
$(document).ready(function(){$.ajax({type:"POST",url:btSl.ajaxUrl,dataType:"json",async:!0,data:{ajax:1,action:"getButtons",token:btSl.token,current_page:prestashop.page.page_name,},success:function(jsonData,textStatus,jqXHR){$.each(jsonData.btSocialLogin,function(i,item){html_content='<div id="fbpsc" class="'+item.hook+'">';if(item.use_custom_text==!0){html_content+='<p class="text-uppercase h6 mb-1">'+item.custom_text+'</p>'}
$.each(item.connectors,function(j,connector){console.log(connector);if(connector.social!='google'){html_content+='<p "'+connector.url+' class="'+item.size+' '+item.rounded+' '+item.shadow+' btn-connect btn-block-connect btn-social btn-'+connector.social+'">';html_content+='<span class="fa fa-bt-'+connector.social+'"></span>&nbsp'
if(item.size_type=='large'){html_content+='<span class="btn-title-connect">'+connector.label+'</span>'}
html_content+='</p>'}else if(connector.social=='google'){if(connector.social_style==!1){html_content+='<p "'+connector.url+' class="'+item.size+' '+item.rounded+' '+item.shadow+' btn-connect btn-block-connect btn-social btn-'+connector.social+'">';html_content+='<span class="fa fa-bt-'+connector.social+'"></span>&nbsp'
if(item.size_type=='large'){html_content+='<span class="btn-title-connect">'+connector.label+'</span>'}
html_content+='</p>'}else if(connector.social_style==!0){html_content+='<p "'+connector.url+' class="'+item.size+' '+item.rounded+' '+item.shadow+' btn-connect btn-block-connect btn-social btn-'+connector.social+'-default">';html_content+='<span class="btn-google-default-icon"></span>&nbsp'
if(item.size_type=='large'){html_content+='<span class="btn-title-connect">'+connector.label+'</span>'}
html_content+='</p>'}}});html_content+='</div>';if(item.position=="prepend"){$(item.element).prepend(html_content)}else{$(item.element).append(html_content)}})},})});window.bsfmodernizr=function(e,t,n){function r(e){m.cssText=e}function i(e,t){return r(prefixes.join(e+";")+(t||""))}function s(e,t){return typeof e===t}function o(e,t){return!!~(""+e).indexOf(t)}function u(e,t){for(var r in e){var i=e[r];if(!o(i,"-")&&m[i]!==n)return t=="pfx"?i:!0}return!1}function a(e,t,r){for(var i in e){var o=t[e[i]];if(o!==n)return r===!1?e[i]:s(o,"function")?o.bind(r||t):o}return!1}function f(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+w.join(r+" ")+r).split(" ");return s(t,"string")||s(t,"undefined")?u(i,t):(i=(e+" "+E.join(r+" ")+r).split(" "),a(i,t,n))}var l="2.7.1",c={},h=!0,p=t.documentElement,d="bsfmodernizr",v=t.createElement(d),m=v.style,g,y={}.toString,b="Webkit Moz O ms",w=b.split(" "),E=b.toLowerCase().split(" "),S={},x={},T={},N=[],C=N.slice,k,L={}.hasOwnProperty,A;!s(L,"undefined")&&!s(L.call,"undefined")?A=function(e,t){return L.call(e,t)}:A=function(e,t){return t in e&&s(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError;var n=C.call(arguments,1),r=function(){if(this instanceof r){var i=function(){};i.prototype=t.prototype;var s=new i,o=t.apply(s,n.concat(C.call(arguments)));return Object(o)===o?o:s}return t.apply(e,n.concat(C.call(arguments)))};return r}),S.csstransitions=function(){return f("transition")};for(var O in S)A(S,O)&&(k=O.toLowerCase(),c[k]=S[O](),N.push((c[k]?"":"no-")+k));return c.addTest=function(e,t){if(typeof e=="object")for(var r in e)A(e,r)&&c.addTest(r,e[r]);else{e=e.toLowerCase();if(c[e]!==n)return c;t=typeof t=="function"?t():t,typeof h!="undefined"&&h&&(p.className+=" "+(t?"":"no-")+e),c[e]=t}return c},r(""),v=g=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=y.elements;return typeof e=="string"?e.split(" "):e}function i(e){var t=m[e[d]];return t||(t={},v++,e[d]=v,m[v]=t),t}function s(e,n,r){n||(n=t);if(g)return n.createElement(e);r||(r=i(n));var s;return r.cache[e]?s=r.cache[e].cloneNode():h.test(e)?s=(r.cache[e]=r.createElem(e)).cloneNode():s=r.createElem(e),s.canHaveChildren&&!c.test(e)&&!s.tagUrn?r.frag.appendChild(s):s}function o(e,n){e||(e=t);if(g)return e.createDocumentFragment();n=n||i(e);var s=n.frag.cloneNode(),o=0,u=r(),a=u.length;for(;o<a;o++)s.createElement(u[o]);return s}function u(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?s(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function a(e){e||(e=t);var r=i(e);return y.shivCSS&&!p&&!r.hasCSS&&(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),g||u(e,r),e}var f="3.7.0",l=e.html5||{},c=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,p,d="_html5shiv",v=0,m={},g;(function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",p="hidden"in e,g=e.childNodes.length==1||function(){t.createElement("a");var e=t.createDocumentFragment();return typeof e.cloneNode=="undefined"||typeof e.createDocumentFragment=="undefined"||typeof e.createElement=="undefined"}()}catch(n){p=!0,g=!0}})();var y={elements:l.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:f,shivCSS:l.shivCSS!==!1,supportsUnknownElements:g,shivMethods:l.shivMethods!==!1,type:"default",shivDocument:a,createElement:s,createDocumentFragment:o};e.html5=y,a(t)}(this,t),c._version=l,c._domPrefixes=E,c._cssomPrefixes=w,c.testProp=function(e){return u([e])},c.testAllProps=f,c.prefixed=function(e,t,n){return t?f(e,t,n):f(e,"pfx")},p.className=p.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(h?" js "+N.join(" "):""),c}(this,this.document),function(e,t,n){function r(e){return"[object Function]"==d.call(e)}function i(e){return"string"==typeof e}function s(){}function o(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function u(){var e=v.shift();m=1,e?e.t?h(function(){("c"==e.t?k.injectCss:k.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),u()):m=0}function a(e,n,r,i,s,a,f){function l(t){if(!d&&o(c.readyState)&&(w.r=d=1,!m&&u(),c.onload=c.onreadystatechange=null,t)){"img"!=e&&h(function(){b.removeChild(c)},50);for(var r in T[n])T[n].hasOwnProperty(r)&&T[n][r].onload()}}var f=f||k.errorTimeout,c=t.createElement(e),d=0,g=0,w={t:r,s:n,e:s,a:a,x:f};1===T[n]&&(g=1,T[n]=[]),"object"==e?c.data=n:(c.src=n,c.type=e),c.width=c.height="0",c.onerror=c.onload=c.onreadystatechange=function(){l.call(this,g)},v.splice(i,0,w),"img"!=e&&(g||2===T[n]?(b.insertBefore(c,y?null:p),h(l,f)):T[n].push(c))}function f(e,t,n,r,s){return m=0,t=t||"j",i(e)?a("c"==t?E:w,e,t,this.i++,n,r,s):(v.splice(this.i++,0,e),1==v.length&&u()),this}function l(){var e=k;return e.loader={load:f,i:0},e}var c=t.documentElement,h=e.setTimeout,p=t.getElementsByTagName("script")[0],d={}.toString,v=[],m=0,g="MozAppearance"in c.style,y=g&&!!t.createRange().compareNode,b=y?c:p.parentNode,c=e.opera&&"[object Opera]"==d.call(e.opera),c=!!t.attachEvent&&!c,w=g?"object":c?"script":"img",E=c?"script":w,S=Array.isArray||function(e){return"[object Array]"==d.call(e)},x=[],T={},N={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}},C,k;k=function(e){function t(e){var e=e.split("!"),t=x.length,n=e.pop(),r=e.length,n={url:n,origUrl:n,prefixes:e},i,s,o;for(s=0;s<r;s++)o=e[s].split("="),(i=N[o.shift()])&&(n=i(n,o));for(s=0;s<t;s++)n=x[s](n);return n}function o(e,i,s,o,u){var a=t(e),f=a.autoCallback;a.url.split(".").pop().split("?").shift(),a.bypass||(i&&(i=r(i)?i:i[e]||i[o]||i[e.split("/").pop().split("?")[0]]),a.instead?a.instead(e,i,s,o,u):(T[a.url]?a.noexec=!0:T[a.url]=1,s.load(a.url,a.forceCSS||!a.forceJS&&"css"==a.url.split(".").pop().split("?").shift()?"c":n,a.noexec,a.attrs,a.timeout),(r(i)||r(f))&&s.load(function(){l(),i&&i(a.origUrl,u,o),f&&f(a.origUrl,u,o),T[a.url]=2})))}function u(e,t){function n(e,n){if(e){if(i(e))n||(f=function(){var e=[].slice.call(arguments);l.apply(this,e),c()}),o(e,f,t,0,u);else if(Object(e)===e)for(p in h=function(){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t}(),e)e.hasOwnProperty(p)&&(!n&&!--h&&(r(f)?f=function(){var e=[].slice.call(arguments);l.apply(this,e),c()}:f[p]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),c()}}(l[p])),o(e[p],f,t,p,u))}else!n&&c()}var u=!!e.test,a=e.load||e.both,f=e.callback||s,l=f,c=e.complete||s,h,p;n(u?e.yep:e.nope,!!a),a&&n(a)}var a,f,c=this.yepnope.loader;if(i(e))o(e,0,c,0);else if(S(e))for(a=0;a<e.length;a++)f=e[a],i(f)?o(f,0,c,0):S(f)?k(f):Object(f)===f&&u(f,c);else Object(e)===e&&u(e,c)},k.addPrefix=function(e,t){N[e]=t},k.addFilter=function(e){x.push(e)},k.errorTimeout=1e4,null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",C=function(){t.removeEventListener("DOMContentLoaded",C,0),t.readyState="complete"},0)),e.yepnope=l(),e.yepnope.executeStack=u,e.yepnope.injectJs=function(e,n,r,i,a,f){var l=t.createElement("script"),c,d,i=i||k.errorTimeout;l.src=e;for(d in r)l.setAttribute(d,r[d]);n=f?u:n||s,l.onreadystatechange=l.onload=function(){!c&&o(l.readyState)&&(c=1,n(),l.onload=l.onreadystatechange=null)},h(function(){c||(c=1,n(1))},i),a?l.onload():p.parentNode.insertBefore(l,p)},e.yepnope.injectCss=function(e,n,r,i,o,a){var i=t.createElement("link"),f,n=a?u:n||s;i.href=e,i.rel="stylesheet",i.type="text/css";for(f in r)i.setAttribute(f,r[f]);o||(p.parentNode.insertBefore(i,p),h(n,0))}}(this,document),bsfmodernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};(function(e){e.fn.bsf_appear=function(t,n){var r=e.extend({data:undefined,one:!0,accX:0,accY:0},n);return this.each(function(){var n=e(this);n.bsf_appeared=!1;if(!t){n.trigger("bsf_appear",r.data);return}var i=e(window);var s=function(){if(!n.is(":visible")){n.bsf_appeared=!1;return}var e=i.scrollLeft();var t=i.scrollTop();var s=n.offset();var o=s.left;var u=s.top;var a=r.accX;var f=r.accY;var l=n.height();var c=i.height();var h=n.width();var p=i.width();if(u+l+f>=t&&u<=t+c+f&&o+h+a>=e&&o<=e+p+a){if(!n.bsf_appeared)n.trigger("bsf_appear",r.data)}else{n.bsf_appeared=!1}};var o=function(){n.bsf_appeared=!0;if(r.one){i.unbind("scroll",s);var o=e.inArray(s,e.fn.bsf_appear.checks);if(o>=0)e.fn.bsf_appear.checks.splice(o,1)}t.apply(this,arguments)};if(r.one)n.one("bsf_appear",r.data,o);else n.bind("bsf_appear",r.data,o);i.scroll(s);e.fn.bsf_appear.checks.push(s);s()})};e.extend(e.fn.bsf_appear,{checks:[],timeout:null,checkAll:function(){var t=e.fn.bsf_appear.checks.length;if(t>0)while(t--)e.fn.bsf_appear.checks[t]()},run:function(){if(e.fn.bsf_appear.timeout)clearTimeout(e.fn.bsf_appear.timeout);e.fn.bsf_appear.timeout=setTimeout(e.fn.bsf_appear.checkAll,20)}});e.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(t,n){var r=e.fn[n];if(r){e.fn[n]=function(){var t=r.apply(this,arguments);e.fn.bsf_appear.run();return t}}})})(jQuery);function countUp(e,t,n,r,i,s){this.options=s||{useEasing:!0,useGrouping:!0,separator:",",decimal:"."};var o=0;var u=["webkit","moz","ms"];for(var a=0;a<u.length&&!window.requestAnimationFrame;++a){window.requestAnimationFrame=window[u[a]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[u[a]+"CancelAnimationFrame"]||window[u[a]+"CancelRequestAnimationFrame"]}if(!window.requestAnimationFrame){window.requestAnimationFrame=function(e,t){var n=(new Date).getTime();var r=Math.max(0,16-(n-o));var i=window.setTimeout(function(){e(n+r)},r);o=n+r;return i}}if(!window.cancelAnimationFrame){window.cancelAnimationFrame=function(e){clearTimeout(e)}}var f=this;this.d=typeof e==="string"?document.getElementById(e):e;this.startVal=Number(t);this.endVal=Number(n);this.countDown=this.startVal>this.endVal?true:!1;this.startTime=null;this.timestamp=null;this.remaining=null;this.frameVal=this.startVal;this.rAF=null;this.decimals=Math.max(0,r||0);this.dec=Math.pow(10,this.decimals);this.duration=i*1e3||2e3;this.easeOutExpo=function(e,t,n,r){return n*(-Math.pow(2,-10*e/r)+1)*1024/1023+t};this.count=function(e){if(f.startTime===null)f.startTime=e;f.timestamp=e;var t=e-f.startTime;f.remaining=f.duration-t;if(f.options.useEasing){if(f.countDown){var n=f.easeOutExpo(t,0,f.startVal-f.endVal,f.duration);f.frameVal=f.startVal-n}else{f.frameVal=f.easeOutExpo(t,f.startVal,f.endVal-f.startVal,f.duration)}}else{if(f.countDown){var n=(f.startVal-f.endVal)*(t/f.duration);f.frameVal=f.startVal-n}else{f.frameVal=f.startVal+(f.endVal-f.startVal)*(t/f.duration)}}f.frameVal=Math.round(f.frameVal*f.dec)/f.dec;if(f.countDown){f.frameVal=f.frameVal<f.endVal?f.endVal:f.frameVal}else{f.frameVal=f.frameVal>f.endVal?f.endVal:f.frameVal}f.d.innerHTML=f.formatNumber(f.frameVal.toFixed(f.decimals));if(t<f.duration){f.rAF=requestAnimationFrame(f.count)}else{if(f.callback!=null)f.callback()}};this.start=function(e){f.callback=e;if(!isNaN(f.endVal)&&!isNaN(f.startVal)){f.rAF=requestAnimationFrame(f.count)}else{console.log("countUp error: startVal or endVal is not a number");f.d.innerHTML="--"}return!1};this.stop=function(){cancelAnimationFrame(f.rAF)};this.reset=function(){f.startTime=null;cancelAnimationFrame(f.rAF);f.d.innerHTML=f.formatNumber(f.startVal.toFixed(f.decimals))};this.resume=function(){f.startTime=null;f.duration=f.remaining;f.startVal=f.frameVal;requestAnimationFrame(f.count)};this.formatNumber=function(e){e+="";var t,n,r,i;t=e.split(".");n=t[0];r=t.length>1?f.options.decimal+t[1]:"";i=/(\d+)(\d{3})/;if(f.options.useGrouping){while(i.test(n)){n=n.replace(i,"$1"+f.options.separator+"$2")}}return n+r};f.d.innerHTML=f.formatNumber(f.startVal.toFixed(f.decimals))};jQuery(window).load(function(){jQuery(".ult_countdown-dateAndTime").each(function(){var e=new Date(jQuery(this).html());var t=jQuery(this).data("time-zone")*60;var n=jQuery(this).data("countformat");var r=jQuery(this).data("labels");var i=r.split(",");var s=jQuery(this).data("labels2");var o=s.split(",");var u=function(){return new Date(jQuery(this).data("time-now"))};var a=function(e){jQuery(this).find(".ult_countdown-amount").css({color:jQuery(this).data("tick-col"),"font-size":jQuery(this).data("tick-size")});jQuery(this).find(".ult_countdown-period").css({"font-size":jQuery(this).data("tick-p-size"),color:jQuery(this).data("tick-p-col")});jQuery(this).find(".ult_countdown-amount").css({"border-color":jQuery(this).data("br-color"),"border-width":jQuery(this).data("br-size"),"border-style":jQuery(this).data("br-style"),"border-radius":jQuery(this).data("br-radius"),background:jQuery(this).data("bg-color"),padding:jQuery(this).data("padd")});if(jQuery(this).data("tick-style")=="bold"){jQuery(this).find(".ult_countdown-amount").css("font-weight","bold")}else if(jQuery(this).data("tick-style")=="italic"){jQuery(this).find(".ult_countdown-amount").css("font-style","italic")}else if(jQuery(this).data("tick-style")=="boldnitalic"){jQuery(this).find(".ult_countdown-amount").css("font-weight","bold");jQuery(this).find(".ult_countdown-amount").css("font-style","italic")}if(jQuery(this).data("tick-p-style")=="bold"){jQuery(this).find(".ult_countdown-period").css("font-weight","bold")}else if(jQuery(this).data("tick-p-style")=="italic"){jQuery(this).find(".ult_countdown-period").css("font-style","italic")}else if(jQuery(this).data("tick-p-style")=="boldnitalic"){jQuery(this).find(".ult_countdown-period").css("font-weight","bold");jQuery(this).find(".ult_countdown-period").css("font-style","italic")}};if(jQuery(this).hasClass("ult-usrtz")){jQuery(this).ult_countdown({labels:i,labels1:o,until:e,format:n,padZeroes:!0,onTick:a})}else{jQuery(this).ult_countdown({labels:i,labels1:o,until:e,format:n,padZeroes:!0,onTick:a,serverSync:u})}})});document.documentElement.className+=' js_active ';document.documentElement.className+='ontouchstart' in document.documentElement?' vc_mobile ':' vc_desktop ';(function(){var prefix=['-webkit-','-o-','-moz-','-ms-',""];for(var i in prefix){if(prefix[i]+'transform' in document.documentElement.style)document.documentElement.className+=" vc_transform "}})();jQuery(window).load(function(){});var vc_js=function(){vc_twitterBehaviour();vc_toggleBehaviour();vc_tabsBehaviour();vc_accordionBehaviour();vc_teaserGrid();vc_slidersBehaviour();vc_prettyPhoto();vc_googleplus();vc_pinterest();vc_progress_bar();vc_plugin_flexslider();vc_google_fonts();vc_rowBehaviour();window.setTimeout(vc_waypoints,1500)};jQuery(document).ready(function($){window.vc_js();$('body').addClass('vc_frontoffice')});if(typeof window.vc_plugin_flexslider!=='function'){function vc_plugin_flexslider($parent){var $slider=$parent?$parent.find('.wpb_flexslider'):jQuery('.wpb_flexslider');$slider.each(function(){var this_element=jQuery(this);var sliderSpeed=800,sliderTimeout=parseInt(this_element.attr('data-interval'))*1000,sliderFx=this_element.attr('data-flex_fx'),slideshow=!0;if(sliderTimeout==0)slideshow=!1;if(!jQuery.isFunction(this_element.flexslider)){var link=document.createElement("link");link.href=prestashop.urls.base_url+"modules/jscomposer/assets/lib/flexslider/flexslider.css";link.type="text/css";link.rel="stylesheet";link.media="screen,print";$('head').append(link);var script=document.createElement("script");script.type="text/javascript";script.src=prestashop.urls.base_url+'modules/jscomposer/assets/lib/flexslider/jquery.flexslider-min.js';$('head').append(script)}
this_element.is(':visible')&&this_element.flexslider({animation:sliderFx,slideshow:slideshow,slideshowSpeed:sliderTimeout,sliderSpeed:sliderSpeed,smoothHeight:!0})})}}
window.vcParallaxSkroll=!1;if('function'!==typeof(window.vc_rowBehaviour)){window.vc_rowBehaviour=function(){var $=window.jQuery;var localFunction=function(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);var $el_full=$el.next('.vc_row-full-width');var el_margin_left=parseInt($el.css('margin-left'),10);var el_margin_right=parseInt($el.css('margin-right'),10);var offset=0-$el_full.offset().left-el_margin_left;var width=$(window).width();$el.css({'position':'relative','left':offset,'box-sizing':'border-box','width':$(window).width()});if(!$el.data('vcStretchContent')){var padding=(-1*offset);if(padding<0){padding=0}
var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;if(paddingRight<0){paddingRight=0}
$el.css({'padding-left':padding+'px','padding-right':paddingRight+'px'})}
$el.attr("data-vc-full-width-init","true")})};function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");$el_full.length||($el_full=$el.parent().next(".vc_row-full-width"));var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}
$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden")})}
function parallaxRow(){var vcSkrollrOptions,callSkrollInit=!1;return window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("<div />").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):"undefined"!=typeof parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),callSkrollInit&&window.skrollr?(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll):!1}
function fullHeightRow(){$(".vc_row-o-full-height:first").each(function(){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$(this).offset().top,windowHeight>offsetTop&&(fullHeight=100-offsetTop/(windowHeight/100),$(this).css("min-height",fullHeight+"vh"))})}
function fixIeFlexbox(){var ua=window.navigator.userAgent,msie=ua.indexOf("MSIE ");(msie>0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')})}
$(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",fullWidthRow).on("resize.vcRowBehaviour",fullHeightRow),fullWidthRow(),fullHeightRow(),fixIeFlexbox(),vc_initVideoBackgrounds(),parallaxRow()}}
function vc_initVideoBackgrounds(){jQuery(".vc_row").each(function(){var youtubeUrl,youtubeId,$row=jQuery(this);$row.data("vcVideoBg")?(youtubeUrl=$row.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($row.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($row,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$row.has($grid).length&&vcResizeVideoBackground($row)})):$row.find(".vc_video-bg").remove()})}
function vcExtractYoutubeId(url){if('undefined'===typeof(url)){return!1}
var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);if(null!==id){return id[1]}
return!1}
function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight(),ratio1=16,ratio2=9;if((containerW/containerH)<(ratio1/ratio2)){iframeW=containerH*(ratio1/ratio2);iframeH=containerH;marginLeft=-Math.round((iframeW-containerW)/2)+'px';marginTop=-Math.round((iframeH-containerH)/2)+'px';iframeW+='px';iframeH+='px'}else{iframeW=containerW;iframeH=containerW*(ratio2/ratio1);marginTop=-Math.round((iframeH-containerH)/2)+'px';marginLeft=-Math.round((iframeW-containerW)/2)+'px';iframeW+='px';iframeH+='px'}
$element.find('.vc_video-bg iframe').css({maxWidth:'1000%',marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}
function insertYoutubeVideoAsBackground($element,youtubeId,counter){if('undefined'===typeof(YT.Player)){counter='undefined'===typeof(counter)?0:counter;if(100<counter){console.warn('Too many attempts to load YouTube api');return}
setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter ++)},100);return}
var $container=$element.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find('.inner');new YT.Player($container[0],{width:'100%',height:'100%',videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1},events:{onReady:function(event){event.target.mute().setLoop(!0)}}});vcResizeVideoBackground($element);jQuery(window).bind('resize',function(){vcResizeVideoBackground($element)})}
if(typeof window.vc_twitterBehaviour!=='function'){function vc_twitterBehaviour(){jQuery('.wpb_twitter_widget .tweets').each(function(index){var this_element=jQuery(this),tw_name=this_element.attr('data-tw_name');tw_count=this_element.attr('data-tw_count');this_element.tweet({username:tw_name,join_text:"auto",avatar_size:0,count:tw_count,template:"{avatar}{join}{text}{time}",auto_join_text_default:"",auto_join_text_ed:"",auto_join_text_ing:"",auto_join_text_reply:"",auto_join_text_url:"",loading_text:'<span class="loading_tweets">loading tweets...</span>'})})}}
if(typeof window.vc_googleplus!=='function'){function vc_googleplus(){if(jQuery('.wpb_googleplus').length>0){(function(){var po=document.createElement('script');po.type='text/javascript';po.async=!0;po.src='https://apis.google.com/js/plusone.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s)})()}}}
if(typeof window.vc_pinterest!=='function'){function vc_pinterest(){if(jQuery('.wpb_pinterest').length>0){(function(){var po=document.createElement('script');po.type='text/javascript';po.async=!0;po.src='http://assets.pinterest.com/js/pinit.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(po,s)})()}}}
if(typeof window.vc_progress_bar!=='function'){function vc_progress_bar(){if(typeof jQuery.fn.waypoint!=='undefined'){jQuery('.vc_progress_bar').waypoint(function(){jQuery(this).find('.vc_single_bar').each(function(index){var $this=jQuery(this),bar=$this.find('.vc_bar'),val=bar.data('percentage-value');setTimeout(function(){bar.css({"width":val+'%'})},index*200)})},{offset:'85%'})}}}
if(typeof window.vc_waypoints!=='function'){function vc_waypoints(){if(typeof jQuery.fn.waypoint!=='undefined'){jQuery('.wpb_animate_when_almost_visible:not(.wpb_start_animation)').waypoint(function(){jQuery(this).addClass('wpb_start_animation')},{offset:'85%'})}}}
if(typeof window.vc_toggleBehaviour!=='function'){function vc_toggleBehaviour(){jQuery(".wpb_toggle").unbind('click').click(function(e){if(jQuery(this).next().is(':animated')){return!1}
if(jQuery(this).hasClass('wpb_toggle_title_active')){jQuery(this).removeClass('wpb_toggle_title_active').next().slideUp(500)}else{jQuery(this).addClass('wpb_toggle_title_active').next().slideDown(500)}});jQuery('.wpb_toggle_content').each(function(index){if(jQuery(this).next().is('h4.wpb_toggle')==!1){jQuery('<div class="last_toggle_el_margin"></div>').insertAfter(this)}})}}
if(typeof window.vc_tabsBehaviour!=='function'){function vc_tabsBehaviour($tab){jQuery(function($){$(document.body).off('click.preview','a')});var $call=$tab||jQuery('.wpb_tabs, .wpb_tour'),ver=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split('.'):'1.10',old_version=parseInt(ver[0])==1&&parseInt(ver[1])<9;$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];$tabs=jQuery(this).find('.wpb_tour_tabs_wrapper').tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){ui.newPanel.index()!==1&&ui.newPanel.find('.vc_pie_chart:not(.vc_ready)')},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}).tabs();jQuery(this).find('.wpb_tab').each(function(){tabs_array.push(this.id)});jQuery(this).find('.wpb_tabs_nav a').click(function(e){e.preventDefault();if(jQuery.inArray(jQuery(this).attr('href'),tabs_array)){if(old_version){$tabs.tabs("select",jQuery(this).attr('href'))}else{$tabs.tabs("option","active",jQuery(jQuery(this).attr('href')).index()-1)}
return!1}});jQuery(this).find('.wpb_prev_slide a, .wpb_next_slide a').click(function(e){e.preventDefault();if(old_version){var index=$tabs.tabs('option','selected');if(jQuery(this).parent().hasClass('wpb_next_slide')){index++}else{index--}
if(index<0){index=$tabs.tabs("length")-1}else if(index>=$tabs.tabs("length")){index=0}
$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find('.wpb_tab').length;if(jQuery(this).parent().hasClass('wpb_next_slide')){index=(index+1)>=length?0:index+1}else{index=index-1<0?length-1:index-1}
$tabs.tabs("option","active",index)}})})}}
if(typeof window.vc_accordionBehaviour!=='function'){function vc_accordionBehaviour(){jQuery('.wpb_accordion').each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),active_tab=!isNaN(jQuery(this).data('active-tab'))&&parseInt(jQuery(this).data('active-tab'))>0?parseInt(jQuery(this).data('active-tab'))-1:!1,collapsible=active_tab===!1||jQuery(this).data('collapsible')==='yes';$tabs=jQuery(this).find('.wpb_accordion_wrapper').accordion({header:"> div > .wpb_accordion_header",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){if(jQuery.fn.isotope!=undefined){ui.newContent.find('.isotope').isotope("layout")}
vc_carouselBehaviour(ui.newPanel)}})})}}
if(typeof window.vc_teaserGrid!=='function'){function vc_teaserGrid(){if(!jQuery.isFunction(jQuery.fn.isotope))return;var layout_modes={fitrows:'fitRows',masonry:'masonry'};jQuery('.wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)').each(function(){var $container=jQuery(this);var $thumbs=$container.find('.wpb_thumbnails');var layout_mode=$thumbs.attr('data-layout-mode');$thumbs.isotope({itemSelector:'.isotope-item',layoutMode:(layout_modes[layout_mode]==undefined?'fitRows':layout_modes[layout_mode])});$container.find('.categories_filter a').data('isotope',$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data('isotope');jQuery(this).parent().parent().find('.active').removeClass('active');jQuery(this).parent().addClass('active');$thumbs.isotope({filter:jQuery(this).attr('data-filter')})});jQuery(window).bind('load resize',function(){$thumbs.isotope("layout")})})}}
if(typeof window.vc_carouselBehaviour!=='function'){function vc_carouselBehaviour($parent){if(!jQuery.isFunction(jQuery().vccarousel)){}
var $carousel=$parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel");$carousel.each(function(){var $this=jQuery(this);if($this.data('carousel_enabled')!==!0&&$this.is(':visible')){$this.data('carousel_enabled',!0);var carousel_width=jQuery(this).width(),visible_count=getColumnsCount(jQuery(this)),carousel_speed=500;if(jQuery(this).hasClass('columns_count_1')){carousel_speed=900}
var carousele_li=jQuery(this).find('.wpb_thumbnails-fluid li');carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});jQuery(this).find('.wpb_wrapper:eq(0)').jCarouselLite({btnNext:jQuery(this).find('.next'),btnPrev:jQuery(this).find('.prev'),visible:visible_count,speed:carousel_speed}).width('100%');var fluid_ul=jQuery(this).find('ul.wpb_thumbnails-fluid');fluid_ul.width(fluid_ul.width()+300);jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName();if(before_resize!=screen_size){window.setTimeout('location.reload()',20)}})}});if(window.Swiper!==undefined){jQuery('.swiper-container').each(function(){if(typeof jQuery(this).data('settings')!=='undefined'){var $this=jQuery(this),my_swiper,max_slide_size=0,options=jQuery(this).data('settings');if(options.mode==='vertical'){$this.find('.swiper-slide').each(function(){var height=jQuery(this).outerHeight(!0);if(height>max_slide_size)max_slide_size=height});$this.height(max_slide_size);$this.css('overflow','hidden')}
jQuery(window).resize(function(){$this.find('.swiper-slide').each(function(){var height=jQuery(this).outerHeight(!0);if(height>max_slide_size)max_slide_size=height});$this.height(max_slide_size)});my_swiper=jQuery(this).swiper(jQuery.extend(options,{onFirstInit:function(swiper){if(swiper.slides.length<2){$this.find('.vc_arrow-left,.vc_arrow-right').hide()}else if(swiper.activeIndex===0&&swiper.params.loop!==!0){$this.find('.vc_arrow-left').hide()}else{$this.find('.vc_arrow-left').show()}},onSlideChangeStart:function(swiper){if(swiper.slides.length>1&&swiper.params.loop!==!0){if(swiper.activeIndex===0){$this.find('.vc_arrow-left').hide()}else{$this.find('.vc_arrow-left').show()}
if(swiper.slides.length-1===swiper.activeIndex){$this.find('.vc_arrow-right').hide()}else{$this.find('.vc_arrow-right').show()}}}}));$this.find('.vc_arrow-left').click(function(e){e.preventDefault();my_swiper.swipePrev()});$this.find('.vc_arrow-right').click(function(e){e.preventDefault();my_swiper.swipeNext()});my_swiper.reInit()}})}}}
if(typeof window.vc_slidersBehaviour!=='function'){function vc_slidersBehaviour(){jQuery('.wpb_gallery_slides').each(function(index){var this_element=jQuery(this);var ss_count=0;if(this_element.hasClass('wpb_slider_nivo')){var sliderSpeed=800,sliderTimeout=this_element.attr('data-interval')*1000;if(sliderTimeout==0)sliderTimeout=9999999999;if(!jQuery.isFunction(jQuery().nivoSlider)){var script=document.createElement("script");script.type="text/javascript";script.src=prestashop.urls.base_url+'modules/jscomposer/assets/lib/nivoslider/jquery.nivo.slider.pack.js';$('head').append(script);var link=document.createElement("link");link.href=prestashop.urls.base_url+"modules/jscomposer/assets/lib/nivoslider/nivo-slider.css";link.type="text/css";link.rel="stylesheet";link.media="screen,print";$('head').append(link);var link=document.createElement("link");link.href=prestashop.urls.base_url+"modules/jscomposer/assets/lib/nivoslider/themes/default/default.css";link.type="text/css";link.rel="stylesheet";link.media="screen,print";$('head').append(link)}
this_element.find('.nivoSlider').nivoSlider({effect:'boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse',slices:15,boxCols:8,boxRows:4,animSpeed:sliderSpeed,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:'Prev',nextText:'Next'})}else if(this_element.hasClass('wpb_flexslider')&&1==2){}else if(this_element.hasClass('wpb_image_grid')){var isotope=this_element.find('.wpb_image_grid_ul');if(!jQuery.isFunction(isotope.isotope)){var script=document.createElement("script");script.type="text/javascript";script.src=prestashop.urls.base_url+'modules/jscomposer/assets/lib/isotope/dist/isotope.pkgd.min.js';$('head').append(script)}
isotope.isotope({itemSelector:'.isotope-item',layoutMode:'fitRows'});jQuery(window).load(function(){isotope.isotope("layout")})}})}}
if(typeof window.vc_prettyPhoto!=='function'){function vc_prettyPhoto(){try{if(!jQuery.isFunction(jQuery().prettyPhoto)){var link=document.createElement("link");link.href=prestashop.urls.base_url+"modules/jscomposer/assets/lib/prettyphoto/css/prettyPhoto.css";link.type="text/css";link.rel="stylesheet";link.media="screen,print";$('head').append(link);var script=document.createElement("script");script.type="text/javascript";script.src=prestashop.urls.base_url+'modules/jscomposer/assets/lib/prettyphoto/js/jquery.prettyPhoto.js';$('head').append(script)}
jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:'normal',padding:15,opacity:0.7,showTitle:!0,allowresize:!0,counter_separator_label:'/',hideflash:!1,deeplinking:!1,modal:!1,callback:function(){var url=location.href;var hashtag=(url.indexOf('#!prettyPhoto'))?!0:!1;if(hashtag)location.hash="!"},social_tools:''})}catch(err){}}}
if(typeof window.vc_google_fonts!=='function'){function vc_google_fonts(){return}}
function getColumnsCount(el){var find=!1,i=1;while(find==!1){if(el.hasClass('columns_count_'+i)){find=!0;return i}
i++}}
var screen_size=getSizeName();function getSizeName(){var screen_size='',screen_w=jQuery(window).width();if(screen_w>1170){screen_size="desktop_wide"}else if(screen_w>960&&screen_w<1169){screen_size="desktop"}else if(screen_w>768&&screen_w<959){screen_size="tablet"}else if(screen_w>300&&screen_w<767){screen_size="mobile"}else if(screen_w<300){screen_size="mobile_portrait"}
return screen_size}
function loadScript(url,$obj,callback){var script=document.createElement("script")
script.type="text/javascript";if(script.readyState){script.onreadystatechange=function(){if(script.readyState=="loaded"||script.readyState=="complete"){script.onreadystatechange=null;callback()}}}else{}
script.src=url;$obj.get(0).appendChild(script)}
function wpb_prepare_tab_content(event,ui){var panel=ui.panel||ui.newPanel,$pie_charts=panel.find('.vc_pie_chart:not(.vc_ready)'),$carousel=panel.find('[data-ride="vc_carousel"]'),$ui_panel,$google_maps;vc_carouselBehaviour();vc_plugin_flexslider(panel);$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat();$carousel.length&&jQuery.fn.carousel&&$carousel.carousel('resizeAction');$ui_panel=panel.find('.isotope');$google_maps=panel.find('.wpb_gmaps_widget');if($ui_panel.length>0){$ui_panel.isotope("layout")}
if($google_maps.length&&!$google_maps.is('.map_ready')){var $frame=$google_maps.find('iframe');$frame.attr('src',$frame.attr('src'));$google_maps.addClass('map_ready')}
if(panel.parents('.isotope').length){panel.parents('.isotope').each(function(){jQuery(this).isotope("layout")})}}
var vc_accordionActivate=function(event,ui){var $pie_charts=ui.newPanel.find('.vc_pie_chart:not(.vc_ready)'),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');if(jQuery.fn.isotope!=undefined){ui.newPanel.find('.isotope').isotope("layout")}
vc_carouselBehaviour(ui.newPanel);vc_plugin_flexslider(ui.newPanel);$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat();$carousel.length&&jQuery.fn.carousel&&$carousel.carousel('resizeAction');if(ui.newPanel.parents('.isotope').length){ui.newPanel.parents('.isotope').each(function(){jQuery(this).isotope("layout")})}};if(typeof Object.create!=="function"){Object.create=function(obj){function F(){}
F.prototype=obj;return new F()}}(function($,window,document){var Carousel={init:function(options,el){var base=this;base.$elem=$(el);base.options=$.extend({},$.fn.owlCarousel.options,base.$elem.data(),options);base.userOptions=options;base.loadContent()},loadContent:function(){var base=this,url;function getData(data){var i,content="";if(typeof base.options.jsonSuccess==="function"){base.options.jsonSuccess.apply(this,[data])}else{for(i in data.owl){if(data.owl.hasOwnProperty(i)){content+=data.owl[i].item}}
base.$elem.html(content)}
base.logIn()}
if(typeof base.options.beforeInit==="function"){base.options.beforeInit.apply(this,[base.$elem])}
if(typeof base.options.jsonPath==="string"){url=base.options.jsonPath;$.getJSON(url,getData)}else{base.logIn()}},logIn:function(){var base=this;base.$elem.data("owl-originalStyles",base.$elem.attr("style"));base.$elem.data("owl-originalClasses",base.$elem.attr("class"));base.$elem.css({opacity:0});base.orignalItems=base.options.items;base.checkBrowser();base.wrapperWidth=0;base.checkVisible=null;base.setVars()},setVars:function(){var base=this;if(base.$elem.children().length===0){return!1}
base.baseClass();base.eventTypes();base.$userItems=base.$elem.children();base.itemsAmount=base.$userItems.length;base.wrapItems();base.$owlItems=base.$elem.find(".owl-item");base.$owlWrapper=base.$elem.find(".owl-wrapper");base.playDirection="next";base.prevItem=0;base.prevArr=[0];base.currentItem=0;base.customEvents();base.onStartup()},onStartup:function(){var base=this;base.updateItems();base.calculateAll();base.buildControls();base.updateControls();base.response();base.moveEvents();base.stopOnHover();base.owlStatus();if(base.options.transitionStyle!==!1){base.transitionTypes(base.options.transitionStyle)}
if(base.options.autoPlay===!0){base.options.autoPlay=5000}
base.play();base.$elem.find(".owl-wrapper").css("display","block");if(!base.$elem.is(":visible")){base.watchVisibility()}else{base.$elem.css("opacity",1)}
base.onstartup=!1;base.eachMoveUpdate();if(typeof base.options.afterInit==="function"){base.options.afterInit.apply(this,[base.$elem])}},eachMoveUpdate:function(){var base=this;if(base.options.lazyLoad===!0){base.lazyLoad()}
if(base.options.autoHeight===!0){base.autoHeight()}
base.onVisibleItems();if(typeof base.options.afterAction==="function"){base.options.afterAction.apply(this,[base.$elem])}},updateVars:function(){var base=this;if(typeof base.options.beforeUpdate==="function"){base.options.beforeUpdate.apply(this,[base.$elem])}
base.watchVisibility();base.updateItems();base.calculateAll();base.updatePosition();base.updateControls();base.eachMoveUpdate();if(typeof base.options.afterUpdate==="function"){base.options.afterUpdate.apply(this,[base.$elem])}},reload:function(){var base=this;window.setTimeout(function(){base.updateVars()},0)},watchVisibility:function(){var base=this;if(base.$elem.is(":visible")===!1){base.$elem.css({opacity:0});window.clearInterval(base.autoPlayInterval);window.clearInterval(base.checkVisible)}else{return!1}
base.checkVisible=window.setInterval(function(){if(base.$elem.is(":visible")){base.reload();base.$elem.animate({opacity:1},200);window.clearInterval(base.checkVisible)}},500)},wrapItems:function(){var base=this;base.$userItems.wrapAll("<div class=\"owl-wrapper\">").wrap("<div class=\"owl-item\"></div>");base.$elem.find(".owl-wrapper").wrap("<div class=\"owl-wrapper-outer\">");base.wrapperOuter=base.$elem.find(".owl-wrapper-outer");base.$elem.css("display","block")},baseClass:function(){var base=this,hasBaseClass=base.$elem.hasClass(base.options.baseClass),hasThemeClass=base.$elem.hasClass(base.options.theme);if(!hasBaseClass){base.$elem.addClass(base.options.baseClass)}
if(!hasThemeClass){base.$elem.addClass(base.options.theme)}},updateItems:function(){var base=this,width,i;if(base.options.responsive===!1){return!1}
if(base.options.singleItem===!0){base.options.items=base.orignalItems=1;base.options.itemsCustom=!1;base.options.itemsDesktop=!1;base.options.itemsDesktopSmall=!1;base.options.itemsTablet=!1;base.options.itemsTabletSmall=!1;base.options.itemsMobile=!1;return!1}
width=$(base.options.responsiveBaseWidth).width();if(width>(base.options.itemsDesktop[0]||base.orignalItems)){base.options.items=base.orignalItems}
if(base.options.itemsCustom!==!1){base.options.itemsCustom.sort(function(a,b){return a[0]-b[0]});for(i=0;i<base.options.itemsCustom.length;i+=1){if(base.options.itemsCustom[i][0]<=width){base.options.items=base.options.itemsCustom[i][1]}}}else{if(width<=base.options.itemsDesktop[0]&&base.options.itemsDesktop!==!1){base.options.items=base.options.itemsDesktop[1]}
if(width<=base.options.itemsDesktopSmall[0]&&base.options.itemsDesktopSmall!==!1){base.options.items=base.options.itemsDesktopSmall[1]}
if(width<=base.options.itemsTablet[0]&&base.options.itemsTablet!==!1){base.options.items=base.options.itemsTablet[1]}
if(width<=base.options.itemsTabletSmall[0]&&base.options.itemsTabletSmall!==!1){base.options.items=base.options.itemsTabletSmall[1]}
if(width<=base.options.itemsMobile[0]&&base.options.itemsMobile!==!1){base.options.items=base.options.itemsMobile[1]}}
if(base.options.items>base.itemsAmount&&base.options.itemsScaleUp===!0){base.options.items=base.itemsAmount}},response:function(){var base=this,smallDelay,lastWindowWidth;if(base.options.responsive!==!0){return!1}
lastWindowWidth=$(window).width();base.resizer=function(){if($(window).width()!==lastWindowWidth){if(base.options.autoPlay!==!1){window.clearInterval(base.autoPlayInterval)}
window.clearTimeout(smallDelay);smallDelay=window.setTimeout(function(){lastWindowWidth=$(window).width();base.updateVars()},base.options.responsiveRefreshRate)}};$(window).resize(base.resizer)},updatePosition:function(){var base=this;base.jumpTo(base.currentItem);if(base.options.autoPlay!==!1){base.checkAp()}},appendItemsSizes:function(){var base=this,roundPages=0,lastItem=base.itemsAmount-base.options.items;base.$owlItems.each(function(index){var $this=$(this);$this.css({"width":base.itemWidth}).data("owl-item",Number(index));if(index%base.options.items===0||index===lastItem){if(!(index>lastItem)){roundPages+=1}}
$this.data("owl-roundPages",roundPages)})},appendWrapperSizes:function(){var base=this,width=base.$owlItems.length*base.itemWidth;base.$owlWrapper.css({"width":width*2,"left":0});base.appendItemsSizes()},calculateAll:function(){var base=this;base.calculateWidth();base.appendWrapperSizes();base.loops();base.max()},calculateWidth:function(){var base=this;base.itemWidth=Math.round(base.$elem.width()/base.options.items)},max:function(){var base=this,maximum=((base.itemsAmount*base.itemWidth)-base.options.items*base.itemWidth)*-1;if(base.options.items>base.itemsAmount){base.maximumItem=0;maximum=0;base.maximumPixels=0}else{base.maximumItem=base.itemsAmount-base.options.items;base.maximumPixels=maximum}
return maximum},min:function(){return 0},loops:function(){var base=this,prev=0,elWidth=0,i,item,roundPageNum;base.positionsInArray=[0];base.pagesInArray=[];for(i=0;i<base.itemsAmount;i+=1){elWidth+=base.itemWidth;base.positionsInArray.push(-elWidth);if(base.options.scrollPerPage===!0){item=$(base.$owlItems[i]);roundPageNum=item.data("owl-roundPages");if(roundPageNum!==prev){base.pagesInArray[prev]=base.positionsInArray[i];prev=roundPageNum}}}},buildControls:function(){var base=this;if(base.options.navigation===!0||base.options.pagination===!0){base.owlControls=$("<div class=\"owl-controls\"/>").toggleClass("clickable",!base.browser.isTouch).appendTo(base.$elem)}
if(base.options.pagination===!0){base.buildPagination()}
if(base.options.navigation===!0){base.buildButtons()}},buildButtons:function(){var base=this,buttonsWrapper=$("<div class=\"owl-buttons\"/>");base.owlControls.append(buttonsWrapper);base.buttonPrev=$("<div/>",{"class":"owl-prev","html":base.options.navigationText[0]||""});base.buttonNext=$("<div/>",{"class":"owl-next","html":base.options.navigationText[1]||""});buttonsWrapper.append(base.buttonPrev).append(base.buttonNext);buttonsWrapper.on("touchstart.owlControls mousedown.owlControls","div[class^=\"owl\"]",function(event){event.preventDefault()});buttonsWrapper.on("touchend.owlControls mouseup.owlControls","div[class^=\"owl\"]",function(event){event.preventDefault();if($(this).hasClass("owl-next")){base.next()}else{base.prev()}})},buildPagination:function(){var base=this;base.paginationWrapper=$("<div class=\"owl-pagination\"/>");base.owlControls.append(base.paginationWrapper);base.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(event){event.preventDefault();if(Number($(this).data("owl-page"))!==base.currentItem){base.goTo(Number($(this).data("owl-page")),!0)}})},updatePagination:function(){var base=this,counter,lastPage,lastItem,i,paginationButton,paginationButtonInner;if(base.options.pagination===!1){return!1}
base.paginationWrapper.html("");counter=0;lastPage=base.itemsAmount-base.itemsAmount%base.options.items;for(i=0;i<base.itemsAmount;i+=1){if(i%base.options.items===0){counter+=1;if(lastPage===i){lastItem=base.itemsAmount-base.options.items}
paginationButton=$("<div/>",{"class":"owl-page"});paginationButtonInner=$("<span></span>",{"text":base.options.paginationNumbers===!0?counter:"","class":base.options.paginationNumbers===!0?"owl-numbers":""});paginationButton.append(paginationButtonInner);paginationButton.data("owl-page",lastPage===i?lastItem:i);paginationButton.data("owl-roundPages",counter);base.paginationWrapper.append(paginationButton)}}
base.checkPagination()},checkPagination:function(){var base=this;if(base.options.pagination===!1){return!1}
base.paginationWrapper.find(".owl-page").each(function(){if($(this).data("owl-roundPages")===$(base.$owlItems[base.currentItem]).data("owl-roundPages")){base.paginationWrapper.find(".owl-page").removeClass("active");$(this).addClass("active")}})},checkNavigation:function(){var base=this;if(base.options.navigation===!1){return!1}
if(base.options.rewindNav===!1){if(base.currentItem===0&&base.maximumItem===0){base.buttonPrev.addClass("disabled");base.buttonNext.addClass("disabled")}else if(base.currentItem===0&&base.maximumItem!==0){base.buttonPrev.addClass("disabled");base.buttonNext.removeClass("disabled")}else if(base.currentItem===base.maximumItem){base.buttonPrev.removeClass("disabled");base.buttonNext.addClass("disabled")}else if(base.currentItem!==0&&base.currentItem!==base.maximumItem){base.buttonPrev.removeClass("disabled");base.buttonNext.removeClass("disabled")}}},updateControls:function(){var base=this;base.updatePagination();base.checkNavigation();if(base.owlControls){if(base.options.items>=base.itemsAmount){base.owlControls.hide()}else{base.owlControls.show()}}},destroyControls:function(){var base=this;if(base.owlControls){base.owlControls.remove()}},next:function(speed){var base=this;if(base.isTransition){return!1}
base.currentItem+=base.options.scrollPerPage===!0?base.options.items:1;if(base.currentItem>base.maximumItem+(base.options.scrollPerPage===!0?(base.options.items-1):0)){if(base.options.rewindNav===!0){base.currentItem=0;speed="rewind"}else{base.currentItem=base.maximumItem;return!1}}
base.goTo(base.currentItem,speed)},prev:function(speed){var base=this;if(base.isTransition){return!1}
if(base.options.scrollPerPage===!0&&base.currentItem>0&&base.currentItem<base.options.items){base.currentItem=0}else{base.currentItem-=base.options.scrollPerPage===!0?base.options.items:1}
if(base.currentItem<0){if(base.options.rewindNav===!0){base.currentItem=base.maximumItem;speed="rewind"}else{base.currentItem=0;return!1}}
base.goTo(base.currentItem,speed)},goTo:function(position,speed,drag){var base=this,goToPixel;if(base.isTransition){return!1}
if(typeof base.options.beforeMove==="function"){base.options.beforeMove.apply(this,[base.$elem])}
if(position>=base.maximumItem){position=base.maximumItem}else if(position<=0){position=0}
base.currentItem=base.owl.currentItem=position;if(base.options.transitionStyle!==!1&&drag!=="drag"&&base.options.items===1&&base.browser.support3d===!0){base.swapSpeed(0);if(base.browser.support3d===!0){base.transition3d(base.positionsInArray[position])}else{base.css2slide(base.positionsInArray[position],1)}
base.afterGo();base.singleItemTransition();return!1}
goToPixel=base.positionsInArray[position];if(base.browser.support3d===!0){base.isCss3Finish=!1;if(speed===!0){base.swapSpeed("paginationSpeed");window.setTimeout(function(){base.isCss3Finish=!0},base.options.paginationSpeed)}else if(speed==="rewind"){base.swapSpeed(base.options.rewindSpeed);window.setTimeout(function(){base.isCss3Finish=!0},base.options.rewindSpeed)}else{base.swapSpeed("slideSpeed");window.setTimeout(function(){base.isCss3Finish=!0},base.options.slideSpeed)}
base.transition3d(goToPixel)}else{if(speed===!0){base.css2slide(goToPixel,base.options.paginationSpeed)}else if(speed==="rewind"){base.css2slide(goToPixel,base.options.rewindSpeed)}else{base.css2slide(goToPixel,base.options.slideSpeed)}}
base.afterGo()},jumpTo:function(position){var base=this;if(typeof base.options.beforeMove==="function"){base.options.beforeMove.apply(this,[base.$elem])}
if(position>=base.maximumItem||position===-1){position=base.maximumItem}else if(position<=0){position=0}
base.swapSpeed(0);if(base.browser.support3d===!0){base.transition3d(base.positionsInArray[position])}else{base.css2slide(base.positionsInArray[position],1)}
base.currentItem=base.owl.currentItem=position;base.afterGo()},afterGo:function(){var base=this;base.prevArr.push(base.currentItem);base.prevItem=base.owl.prevItem=base.prevArr[base.prevArr.length-2];base.prevArr.shift(0);if(base.prevItem!==base.currentItem){base.checkPagination();base.checkNavigation();base.eachMoveUpdate();if(base.options.autoPlay!==!1){base.checkAp()}}
if(typeof base.options.afterMove==="function"&&base.prevItem!==base.currentItem){base.options.afterMove.apply(this,[base.$elem])}},stop:function(){var base=this;base.apStatus="stop";window.clearInterval(base.autoPlayInterval)},checkAp:function(){var base=this;if(base.apStatus!=="stop"){base.play()}},play:function(){var base=this;base.apStatus="play";if(base.options.autoPlay===!1){return!1}
window.clearInterval(base.autoPlayInterval);base.autoPlayInterval=window.setInterval(function(){base.next(!0)},base.options.autoPlay)},swapSpeed:function(action){var base=this;if(action==="slideSpeed"){base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed))}else if(action==="paginationSpeed"){base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed))}else if(typeof action!=="string"){base.$owlWrapper.css(base.addCssSpeed(action))}},addCssSpeed:function(speed){return{"-webkit-transition":"all "+speed+"ms ease","-moz-transition":"all "+speed+"ms ease","-o-transition":"all "+speed+"ms ease","transition":"all "+speed+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"","transition":""}},doTranslate:function(pixels){return{"-webkit-transform":"translate3d("+pixels+"px, 0px, 0px)","-moz-transform":"translate3d("+pixels+"px, 0px, 0px)","-o-transform":"translate3d("+pixels+"px, 0px, 0px)","-ms-transform":"translate3d("+pixels+"px, 0px, 0px)","transform":"translate3d("+pixels+"px, 0px,0px)"}},transition3d:function(value){var base=this;base.$owlWrapper.css(base.doTranslate(value))},css2move:function(value){var base=this;base.$owlWrapper.css({"left":value})},css2slide:function(value,speed){var base=this;base.isCssFinish=!1;base.$owlWrapper.stop(!0,!0).animate({"left":value},{duration:speed||base.options.slideSpeed,complete:function(){base.isCssFinish=!0}})},checkBrowser:function(){var base=this,translate3D="translate3d(0px, 0px, 0px)",tempElem=document.createElement("div"),regex,asSupport,support3d,isTouch;tempElem.style.cssText="  -moz-transform:"+translate3D+"; -ms-transform:"+translate3D+"; -o-transform:"+translate3D+"; -webkit-transform:"+translate3D+"; transform:"+translate3D;regex=/translate3d\(0px, 0px, 0px\)/g;asSupport=tempElem.style.cssText.match(regex);support3d=(asSupport!==null&&asSupport.length>=1&&asSupport.length<=2);isTouch="ontouchstart" in window||window.navigator.msMaxTouchPoints;base.browser={"support3d":support3d,"isTouch":isTouch}},moveEvents:function(){var base=this;if(base.options.mouseDrag!==!1||base.options.touchDrag!==!1){base.gestures();base.disabledEvents()}},eventTypes:function(){var base=this,types=["s","e","x"];base.ev_types={};if(base.options.mouseDrag===!0&&base.options.touchDrag===!0){types=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]}else if(base.options.mouseDrag===!1&&base.options.touchDrag===!0){types=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]}else if(base.options.mouseDrag===!0&&base.options.touchDrag===!1){types=["mousedown.owl","mousemove.owl","mouseup.owl"]}
base.ev_types.start=types[0];base.ev_types.move=types[1];base.ev_types.end=types[2]},disabledEvents:function(){var base=this;base.$elem.on("dragstart.owl",function(event){event.preventDefault()});base.$elem.on("mousedown.disableTextSelect",function(e){return $(e.target).is('input, textarea, select, option')})},gestures:function(){var base=this,locals={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};base.isCssFinish=!0;function getTouches(event){if(event.touches!==undefined){return{x:event.touches[0].pageX,y:event.touches[0].pageY}}
if(event.touches===undefined){if(event.pageX!==undefined){return{x:event.pageX,y:event.pageY}}
if(event.pageX===undefined){return{x:event.clientX,y:event.clientY}}}}
function swapEvents(type){if(type==="on"){$(document).on(base.ev_types.move,dragMove);$(document).on(base.ev_types.end,dragEnd)}else if(type==="off"){$(document).off(base.ev_types.move);$(document).off(base.ev_types.end)}}
function dragStart(event){var ev=event.originalEvent||event||window.event,position;if(ev.which===3){return!1}
if(base.itemsAmount<=base.options.items){return}
if(base.isCssFinish===!1&&!base.options.dragBeforeAnimFinish){return!1}
if(base.isCss3Finish===!1&&!base.options.dragBeforeAnimFinish){return!1}
if(base.options.autoPlay!==!1){window.clearInterval(base.autoPlayInterval)}
if(base.browser.isTouch!==!0&&!base.$owlWrapper.hasClass("grabbing")){base.$owlWrapper.addClass("grabbing")}
base.newPosX=0;base.newRelativeX=0;$(this).css(base.removeTransition());position=$(this).position();locals.relativePos=position.left;locals.offsetX=getTouches(ev).x-position.left;locals.offsetY=getTouches(ev).y-position.top;swapEvents("on");locals.sliding=!1;locals.targetElement=ev.target||ev.srcElement}
function dragMove(event){var ev=event.originalEvent||event||window.event,minSwipe,maxSwipe;base.newPosX=getTouches(ev).x-locals.offsetX;base.newPosY=getTouches(ev).y-locals.offsetY;base.newRelativeX=base.newPosX-locals.relativePos;if(typeof base.options.startDragging==="function"&&locals.dragging!==!0&&base.newRelativeX!==0){locals.dragging=!0;base.options.startDragging.apply(base,[base.$elem])}
if((base.newRelativeX>8||base.newRelativeX<-8)&&(base.browser.isTouch===!0)){if(ev.preventDefault!==undefined){ev.preventDefault()}else{ev.returnValue=!1}
locals.sliding=!0}
if((base.newPosY>10||base.newPosY<-10)&&locals.sliding===!1){$(document).off("touchmove.owl")}
minSwipe=function(){return base.newRelativeX/5};maxSwipe=function(){return base.maximumPixels+base.newRelativeX/5};base.newPosX=Math.max(Math.min(base.newPosX,minSwipe()),maxSwipe());if(base.browser.support3d===!0){base.transition3d(base.newPosX)}else{base.css2move(base.newPosX)}}
function dragEnd(event){var ev=event.originalEvent||event||window.event,newPosition,handlers,owlStopEvent;ev.target=ev.target||ev.srcElement;locals.dragging=!1;if(base.browser.isTouch!==!0){base.$owlWrapper.removeClass("grabbing")}
if(base.newRelativeX<0){base.dragDirection=base.owl.dragDirection="left"}else{base.dragDirection=base.owl.dragDirection="right"}
if(base.newRelativeX!==0){newPosition=base.getNewPosition();base.goTo(newPosition,!1,"drag");if(locals.targetElement===ev.target&&base.browser.isTouch!==!0){$(ev.target).on("click.disable",function(ev){ev.stopImmediatePropagation();ev.stopPropagation();ev.preventDefault();$(ev.target).off("click.disable")});handlers=$._data(ev.target,"events").click;owlStopEvent=handlers.pop();handlers.splice(0,0,owlStopEvent)}}
swapEvents("off")}
base.$elem.on(base.ev_types.start,".owl-wrapper",dragStart)},getNewPosition:function(){var base=this,newPosition=base.closestItem();if(newPosition>base.maximumItem){base.currentItem=base.maximumItem;newPosition=base.maximumItem}else if(base.newPosX>=0){newPosition=0;base.currentItem=0}
return newPosition},closestItem:function(){var base=this,array=base.options.scrollPerPage===!0?base.pagesInArray:base.positionsInArray,goal=base.newPosX,closest=null;$.each(array,function(i,v){if(goal-(base.itemWidth/20)>array[i+1]&&goal-(base.itemWidth/20)<v&&base.moveDirection()==="left"){closest=v;if(base.options.scrollPerPage===!0){base.currentItem=$.inArray(closest,base.positionsInArray)}else{base.currentItem=i}}else if(goal+(base.itemWidth/20)<v&&goal+(base.itemWidth/20)>(array[i+1]||array[i]-base.itemWidth)&&base.moveDirection()==="right"){if(base.options.scrollPerPage===!0){closest=array[i+1]||array[array.length-1];base.currentItem=$.inArray(closest,base.positionsInArray)}else{closest=array[i+1];base.currentItem=i+1}}});return base.currentItem},moveDirection:function(){var base=this,direction;if(base.newRelativeX<0){direction="right";base.playDirection="next"}else{direction="left";base.playDirection="prev"}
return direction},customEvents:function(){var base=this;base.$elem.on("owl.next",function(){base.next()});base.$elem.on("owl.prev",function(){base.prev()});base.$elem.on("owl.play",function(event,speed){base.options.autoPlay=speed;base.play();base.hoverStatus="play"});base.$elem.on("owl.stop",function(){base.stop();base.hoverStatus="stop"});base.$elem.on("owl.goTo",function(event,item){base.goTo(item)});base.$elem.on("owl.jumpTo",function(event,item){base.jumpTo(item)})},stopOnHover:function(){var base=this;if(base.options.stopOnHover===!0&&base.browser.isTouch!==!0&&base.options.autoPlay!==!1){base.$elem.on("mouseover",function(){base.stop()});base.$elem.on("mouseout",function(){if(base.hoverStatus!=="stop"){base.play()}})}},lazyLoad:function(){var base=this,i,$item,itemNumber,$lazyImg,follow;if(base.options.lazyLoad===!1){return!1}
for(i=0;i<base.itemsAmount;i+=1){$item=$(base.$owlItems[i]);if($item.data("owl-loaded")==="loaded"){continue}
itemNumber=$item.data("owl-item");$lazyImg=$item.find(".lazyOwl");if(typeof $lazyImg.data("src")!=="string"){$item.data("owl-loaded","loaded");continue}
if($item.data("owl-loaded")===undefined){$lazyImg.hide();$item.addClass("loading").data("owl-loaded","checked")}
if(base.options.lazyFollow===!0){follow=itemNumber>=base.currentItem}else{follow=!0}
if(follow&&itemNumber<base.currentItem+base.options.items&&$lazyImg.length){base.lazyPreload($item,$lazyImg)}}},lazyPreload:function($item,$lazyImg){var base=this,iterations=0,isBackgroundImg;if($lazyImg.prop("tagName")==="DIV"){$lazyImg.css("background-image","url("+$lazyImg.data("src")+")");isBackgroundImg=!0}else{if($lazyImg.hasClass('replace-2x')&&typeof st_retina!=='undefined'&&st_retina&&isRetina()){var src=$lazyImg.data("src");if($lazyImg.data('2x'))
src_2x=$lazyImg.data('2x');else src_2x=src.replace(/\/(\d+)\-(\w+)\_default([\.\/])/i,"/$1-$2_default_2x$3");if(src_2x!=src){var retina_image=new Image();retina_image.setAttribute('rel',src_2x);retina_image.onload=(function(){if(this.height!=0)
$lazyImg[0].src=this.getAttribute('rel');});retina_image.src=src_2x}}
if(!$lazyImg[0].src)
$lazyImg[0].src=$lazyImg.data("src");}
function showImage(){$item.data("owl-loaded","loaded").removeClass("loading");$lazyImg.removeAttr("data-src");if(base.options.lazyEffect==="fade"){$lazyImg.fadeIn(400)}else{$lazyImg.show()}
if(typeof base.options.afterLazyLoad==="function"){base.options.afterLazyLoad.apply(this,[base.$elem])}}
function checkLazyImage(){iterations+=1;if(base.completeImg($lazyImg.get(0))||isBackgroundImg===!0){showImage()}else if(iterations<=100){window.setTimeout(checkLazyImage,100)}else{showImage()}}
checkLazyImage()},autoHeight:function(){var base=this,$currentimg=$(base.$owlItems[base.currentItem]).find("img"),iterations;function addHeight(){var $currentItem=$(base.$owlItems[base.currentItem]).height();base.wrapperOuter.css("height",$currentItem+"px");if(!base.wrapperOuter.hasClass("autoHeight")){window.setTimeout(function(){base.wrapperOuter.addClass("autoHeight")},0)}}
function checkImage(){iterations+=1;if(base.completeImg($currentimg.get(0))){addHeight()}else if(iterations<=100){window.setTimeout(checkImage,100)}else{base.wrapperOuter.css("height","")}}
if($currentimg.get(0)!==undefined){iterations=0;checkImage()}else{addHeight()}},completeImg:function(img){var naturalWidthType;if(!img.complete){return!1}
naturalWidthType=typeof img.naturalWidth;if(naturalWidthType!=="undefined"&&img.naturalWidth===0){return!1}
return!0},onVisibleItems:function(){var base=this,i;if(base.options.addClassActive===!0){base.$owlItems.removeClass("active")}
base.visibleItems=[];for(i=base.currentItem;i<base.currentItem+base.options.items;i+=1){base.visibleItems.push(i);if(base.options.addClassActive===!0){$(base.$owlItems[i]).addClass("active")}}
base.owl.visibleItems=base.visibleItems},transitionTypes:function(className){var base=this;base.outClass="owl-"+className+"-out";base.inClass="owl-"+className+"-in"},singleItemTransition:function(){var base=this,outClass=base.outClass,inClass=base.inClass,$currentItem=base.$owlItems.eq(base.currentItem),$prevItem=base.$owlItems.eq(base.prevItem),prevPos=Math.abs(base.positionsInArray[base.currentItem])+base.positionsInArray[base.prevItem],origin=Math.abs(base.positionsInArray[base.currentItem])+base.itemWidth/2,animEnd='webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend';base.isTransition=!0;base.$owlWrapper.addClass('owl-origin').css({"-webkit-transform-origin":origin+"px","-moz-perspective-origin":origin+"px","perspective-origin":origin+"px"});function transStyles(prevPos){return{"position":"relative","left":prevPos+"px"}}
$prevItem.css(transStyles(prevPos,10)).addClass(outClass).on(animEnd,function(){base.endPrev=!0;$prevItem.off(animEnd);base.clearTransStyle($prevItem,outClass)});$currentItem.addClass(inClass).on(animEnd,function(){base.endCurrent=!0;$currentItem.off(animEnd);base.clearTransStyle($currentItem,inClass)})},clearTransStyle:function(item,classToRemove){var base=this;item.css({"position":"","left":""}).removeClass(classToRemove);if(base.endPrev&&base.endCurrent){base.$owlWrapper.removeClass('owl-origin');base.endPrev=!1;base.endCurrent=!1;base.isTransition=!1}},owlStatus:function(){var base=this;base.owl={"userOptions":base.userOptions,"baseElement":base.$elem,"userItems":base.$userItems,"owlItems":base.$owlItems,"currentItem":base.currentItem,"prevItem":base.prevItem,"visibleItems":base.visibleItems,"isTouch":base.browser.isTouch,"browser":base.browser,"dragDirection":base.dragDirection}},clearEvents:function(){var base=this;base.$elem.off(".owl owl mousedown.disableTextSelect");$(document).off(".owl owl");$(window).off("resize",base.resizer)},unWrap:function(){var base=this;if(base.$elem.children().length!==0){base.$owlWrapper.unwrap();base.$userItems.unwrap().unwrap();if(base.owlControls){base.owlControls.remove()}}
base.clearEvents();base.$elem.attr("style",base.$elem.data("owl-originalStyles")||"").attr("class",base.$elem.data("owl-originalClasses"))},destroy:function(){var base=this;base.stop();window.clearInterval(base.checkVisible);base.unWrap();base.$elem.removeData()},reinit:function(newOptions){var base=this,options=$.extend({},base.userOptions,newOptions);base.unWrap();base.init(options,base.$elem)},addItem:function(htmlString,targetPosition){var base=this,position;if(!htmlString){return!1}
if(base.$elem.children().length===0){base.$elem.append(htmlString);base.setVars();return!1}
base.unWrap();if(targetPosition===undefined||targetPosition===-1){position=-1}else{position=targetPosition}
if(position>=base.$userItems.length||position===-1){base.$userItems.eq(-1).after(htmlString)}else{base.$userItems.eq(position).before(htmlString)}
base.setVars()},removeItem:function(targetPosition){var base=this,position;if(base.$elem.children().length===0){return!1}
if(targetPosition===undefined||targetPosition===-1){position=-1}else{position=targetPosition}
base.unWrap();base.$userItems.eq(position).remove();base.setVars()}};$.fn.owlCarousel=function(options){return this.each(function(){if($(this).data("owl-init")===!0){return!1}
$(this).data("owl-init",!0);var carousel=Object.create(Carousel);carousel.init(options,this);$.data(this,"owlCarousel",carousel)})};$.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[748,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1000,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["<i class='fto-left-open-3'></i>","<i class='fto-right-open-3'></i>"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:window,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document));(function($){'use strict';var dw,dh,rw,rh,lx,ly;var defaults={loadingNotice:'',errorNotice:'The image could not be loaded',errorDuration:2500,linkAttribute:'href',preventClicks:!0,beforeShow:$.noop,beforeHide:$.noop,onShow:$.noop,onHide:$.noop,onMove:$.noop};function EasyZoom(target,options){this.$target=$(target);this.opts=$.extend({},defaults,options,this.$target.data());this.isOpen===undefined&&this._init()}
EasyZoom.prototype._init=function(){this.$link=this.$target.find('a');this.$image=this.$target.find('img');this.$flyout=$('<div class="easyzoom-flyout" />');this.$notice=$('<div class="easyzoom-notice" />');this.$target.on({'mousemove.easyzoom touchmove.easyzoom':$.proxy(this._onMove,this),'mouseleave.easyzoom touchend.easyzoom':$.proxy(this._onLeave,this),'mouseenter.easyzoom touchstart.easyzoom':$.proxy(this._onEnter,this)});this.opts.preventClicks&&this.$target.on('click.easyzoom',function(e){prestashop.emit('easyZoomClicked',{jdom:$(this).find('.kk_triger')});e.preventDefault()})};EasyZoom.prototype.show=function(e,testMouseOver){var w1,h1,w2,h2;var self=this;if(this.opts.beforeShow.call(this)===!1)return;if(!this.isReady){return this._loadImage(this.$link.attr(this.opts.linkAttribute),function(){if(self.isMouseOver||!testMouseOver){self.show(e)}})}
this.$target.append(this.$flyout);w1=this.$target.width();h1=this.$target.height();w2=this.$flyout.width();h2=this.$flyout.height();dw=this.$zoom.width()-w2;dh=this.$zoom.height()-h2;if(dw<0)dw=0;if(dh<0)dh=0;rw=dw/w1;rh=dh/h1;this.isOpen=!0;this.opts.onShow.call(this);e&&this._move(e)};EasyZoom.prototype._onEnter=function(e){var touches=e.originalEvent.touches;this.isMouseOver=!0;if(!touches||touches.length==1){e.preventDefault();this.show(e,!0)}};EasyZoom.prototype._onMove=function(e){if(!this.isOpen)return;e.preventDefault();this._move(e)};EasyZoom.prototype._onLeave=function(){this.isMouseOver=!1;this.isOpen&&this.hide()};EasyZoom.prototype._onLoad=function(e){if(!e.currentTarget.width)return;this.isReady=!0;this.$notice.detach();this.$flyout.html(this.$zoom);this.$target.removeClass('is-loading').addClass('is-ready');e.data.call&&e.data()};EasyZoom.prototype._onError=function(){var self=this;this.$notice.text(this.opts.errorNotice);this.$target.removeClass('is-loading').addClass('is-error');this.detachNotice=setTimeout(function(){self.$notice.detach();self.detachNotice=null},this.opts.errorDuration)};EasyZoom.prototype._loadImage=function(href,callback){var zoom=new Image;this.$target.addClass('is-loading').append(this.$notice.text(this.opts.loadingNotice));this.$zoom=$(zoom).on('error',$.proxy(this._onError,this)).on('load',callback,$.proxy(this._onLoad,this));zoom.style.position='absolute';var reg=new RegExp("\\/(\\d+)\\-(\\w+)\\_default([\\.\\/])","i");var res=reg.exec(href);if(res&&typeof(window.stwebp)!='undefined'&&window.stwebp[res[2]+'_default']&&typeof(window.stwebp_supported)!='undefined'&&window.stwebp_supported)
zoom.src=href.replace(/\.jpg$/,'.webp');else zoom.src=href};EasyZoom.prototype._move=function(e){if(e.type.indexOf('touch')===0){var touchlist=e.touches||e.originalEvent.touches;lx=touchlist[0].pageX;ly=touchlist[0].pageY}else{lx=e.pageX||lx;ly=e.pageY||ly}
var offset=this.$target.offset();var pt=ly-offset.top;var pl=lx-offset.left;var xt=Math.ceil(pt*rh);var xl=Math.ceil(pl*rw);if(xl<0||xt<0||xl>dw||xt>dh){this.hide()}else{var top=xt*-1;var left=xl*-1;this.$zoom.css({top:top,left:left});this.opts.onMove.call(this,top,left)}};EasyZoom.prototype.hide=function(){if(!this.isOpen)return;if(this.opts.beforeHide.call(this)===!1)return;this.$flyout.detach();this.isOpen=!1;this.opts.onHide.call(this)};EasyZoom.prototype.swap=function(standardSrc,zoomHref,srcset){this.hide();this.isReady=!1;this.detachNotice&&clearTimeout(this.detachNotice);this.$notice.parent().length&&this.$notice.detach();this.$target.removeClass('is-loading is-ready is-error');this.$image.attr({src:standardSrc,srcset:$.isArray(srcset)?srcset.join():srcset});this.$link.attr(this.opts.linkAttribute,zoomHref)};EasyZoom.prototype.teardown=function(){this.hide();this.$target.off('.easyzoom').removeClass('is-loading is-ready is-error');this.detachNotice&&clearTimeout(this.detachNotice);delete this.$link;delete this.$zoom;delete this.$image;delete this.$notice;delete this.$flyout;delete this.isOpen;delete this.isReady};$.fn.easyZoom=function(options){return this.each(function(){var api=$.data(this,'easyZoom');if(!api){$.data(this,'easyZoom',new EasyZoom(this,options))}else if(api.isOpen===undefined){api._init()}})};if(typeof define==='function'&&define.amd){define(function(){return EasyZoom})}else if(typeof module!=='undefined'&&module.exports){module.exports=EasyZoom}})(jQuery);/*!
 * Jarallax v2.0.2 (https://github.com/nk-o/jarallax)
 * Copyright 2022 nK <https://nkdev.info>
 * Licensed under MIT (https://github.com/nk-o/jarallax/blob/master/LICENSE)
 */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.jarallax=factory())})(this,(function(){'use strict';function ready(callback){if('complete'===document.readyState||'interactive'===document.readyState){callback()}else{document.addEventListener('DOMContentLoaded',callback,{capture:!0,once:!0,passive:!0})}}
let win;if('undefined'!==typeof window){win=window}else if('undefined'!==typeof global){win=global}else if('undefined'!==typeof self){win=self}else{win={}}
var global$1=win;const{navigator}=global$1;const isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);let $deviceHelper;function getDeviceHeight(){if(!$deviceHelper&&document.body){$deviceHelper=document.createElement('div');$deviceHelper.style.cssText='position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;';document.body.appendChild($deviceHelper)}
return($deviceHelper?$deviceHelper.clientHeight:0)||global$1.innerHeight||document.documentElement.clientHeight}
let wndH;function updateWndVars(){if(isMobile){wndH=getDeviceHeight()}else{wndH=global$1.innerHeight||document.documentElement.clientHeight}}
updateWndVars();global$1.addEventListener('resize',updateWndVars);global$1.addEventListener('orientationchange',updateWndVars);global$1.addEventListener('load',updateWndVars);ready(()=>{updateWndVars()});const jarallaxList=[];function getParents(elem){const parents=[];while(null!==elem.parentElement){elem=elem.parentElement;if(1===elem.nodeType){parents.push(elem)}}
return parents}
function updateParallax(){if(!jarallaxList.length){return}
jarallaxList.forEach((data,k)=>{const{instance,oldData}=data;const clientRect=instance.$item.getBoundingClientRect();const newData={width:clientRect.width,height:clientRect.height,top:clientRect.top,bottom:clientRect.bottom,wndW:global$1.innerWidth,wndH};const isResized=!oldData||oldData.wndW!==newData.wndW||oldData.wndH!==newData.wndH||oldData.width!==newData.width||oldData.height!==newData.height;const isScrolled=isResized||!oldData||oldData.top!==newData.top||oldData.bottom!==newData.bottom;jarallaxList[k].oldData=newData;if(isResized){window.setTimeout(function(){instance.onResize()},500)}
if(isScrolled){instance.onScroll()}});global$1.requestAnimationFrame(updateParallax)}
let instanceID=0;class Jarallax{constructor(item,userOptions){const self=this;self.instanceID=instanceID;instanceID+=1;self.$item=item;self.defaults={type:'scroll',speed:0.5,imgSrc:null,imgElement:'.jarallax-img',imgSize:'cover',imgPosition:'50% 50%',imgRepeat:'no-repeat',keepImg:!1,elementInViewport:null,zIndex:-100,disableParallax:!1,disableVideo:!1,videoSrc:null,videoStartTime:0,videoEndTime:0,videoVolume:0,videoLoop:!0,videoPlayOnlyVisible:!0,videoLazyLoading:!0,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null};const dataOptions=self.$item.dataset||{};const pureDataOptions={};Object.keys(dataOptions).forEach(key=>{const loweCaseOption=key.substr(0,1).toLowerCase()+key.substr(1);if(loweCaseOption&&'undefined'!==typeof self.defaults[loweCaseOption]){pureDataOptions[loweCaseOption]=dataOptions[key]}});self.options=self.extend({},self.defaults,pureDataOptions,userOptions);self.pureOptions=self.extend({},self.options);Object.keys(self.options).forEach(key=>{if('true'===self.options[key]){self.options[key]=!0}else if('false'===self.options[key]){self.options[key]=!1}});self.options.speed=Math.min(2,Math.max(-1,parseFloat(self.options.speed)));if('string'===typeof self.options.disableParallax){self.options.disableParallax=new RegExp(self.options.disableParallax)}
if(self.options.disableParallax instanceof RegExp){const disableParallaxRegexp=self.options.disableParallax;self.options.disableParallax=()=>disableParallaxRegexp.test(navigator.userAgent)}
if('function'!==typeof self.options.disableParallax){self.options.disableParallax=()=>!1}
if('string'===typeof self.options.disableVideo){self.options.disableVideo=new RegExp(self.options.disableVideo)}
if(self.options.disableVideo instanceof RegExp){const disableVideoRegexp=self.options.disableVideo;self.options.disableVideo=()=>disableVideoRegexp.test(navigator.userAgent)}
if('function'!==typeof self.options.disableVideo){self.options.disableVideo=()=>!1}
let elementInVP=self.options.elementInViewport;if(elementInVP&&'object'===typeof elementInVP&&'undefined'!==typeof elementInVP.length){[elementInVP]=elementInVP}
if(!(elementInVP instanceof Element)){elementInVP=null}
self.options.elementInViewport=elementInVP;self.image={src:self.options.imgSrc||null,$container:null,useImgTag:!1,position:'fixed'};if(self.initImg()&&self.canInitParallax()){self.init()}}
css(el,styles){if('string'===typeof styles){return global$1.getComputedStyle(el).getPropertyValue(styles)}
Object.keys(styles).forEach(key=>{el.style[key]=styles[key]});return el}
extend(out,...args){out=out||{};Object.keys(args).forEach(i=>{if(!args[i]){return}
Object.keys(args[i]).forEach(key=>{out[key]=args[i][key]})});return out}
getWindowData(){return{width:global$1.innerWidth||document.documentElement.clientWidth,height:wndH,y:document.documentElement.scrollTop}}
initImg(){const self=this;let $imgElement=self.options.imgElement;if($imgElement&&'string'===typeof $imgElement){$imgElement=self.$item.querySelector($imgElement)}
if(!($imgElement instanceof Element)){if(self.options.imgSrc){$imgElement=new Image();$imgElement.src=self.options.imgSrc}else{$imgElement=null}}
if($imgElement){if(self.options.keepImg){self.image.$item=$imgElement.cloneNode(!0)}else{self.image.$item=$imgElement;self.image.$itemParent=$imgElement.parentNode}
self.image.useImgTag=!0}
if(self.image.$item){return!0}
if(null===self.image.src){self.image.src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';self.image.bgImage=self.css(self.$item,'background-image')}
return!(!self.image.bgImage||'none'===self.image.bgImage)}
canInitParallax(){return!this.options.disableParallax()}
init(){const self=this;const containerStyles={position:'absolute',top:0,left:0,width:'100%',height:'100%',overflow:'hidden'};let imageStyles={pointerEvents:'none',transformStyle:'preserve-3d',backfaceVisibility:'hidden',willChange:'transform,opacity'};if(!self.options.keepImg){const curStyle=self.$item.getAttribute('style');if(curStyle){self.$item.setAttribute('data-jarallax-original-styles',curStyle)}
if(self.image.useImgTag){const curImgStyle=self.image.$item.getAttribute('style');if(curImgStyle){self.image.$item.setAttribute('data-jarallax-original-styles',curImgStyle)}}}
if('static'===self.css(self.$item,'position')){self.css(self.$item,{position:'relative'})}
if('auto'===self.css(self.$item,'z-index')){self.css(self.$item,{zIndex:0})}
self.image.$container=document.createElement('div');self.css(self.image.$container,containerStyles);self.css(self.image.$container,{'z-index':self.options.zIndex});if('fixed'===this.image.position){self.css(self.image.$container,{'-webkit-clip-path':'polygon(0 0, 100% 0, 100% 100%, 0 100%)','clip-path':'polygon(0 0, 100% 0, 100% 100%, 0 100%)'})}
self.image.$container.setAttribute('id',`jarallax-container-${self.instanceID}`);self.$item.appendChild(self.image.$container);if(self.image.useImgTag){imageStyles=self.extend({'object-fit':self.options.imgSize,'object-position':self.options.imgPosition,'max-width':'none'},containerStyles,imageStyles)}else{self.image.$item=document.createElement('div');if(self.image.src){imageStyles=self.extend({'background-position':self.options.imgPosition,'background-size':self.options.imgSize,'background-repeat':self.options.imgRepeat,'background-image':self.image.bgImage||`url("${self.image.src}")`},containerStyles,imageStyles)}}
if('opacity'===self.options.type||'scale'===self.options.type||'scale-opacity'===self.options.type||1===self.options.speed){self.image.position='absolute'}
if('fixed'===self.image.position){const $parents=getParents(self.$item).filter(el=>{const styles=global$1.getComputedStyle(el);const parentTransform=styles['-webkit-transform']||styles['-moz-transform']||styles.transform;const overflowRegex=/(auto|scroll)/;return parentTransform&&'none'!==parentTransform||overflowRegex.test(styles.overflow+styles['overflow-y']+styles['overflow-x'])});self.image.position=$parents.length?'absolute':'fixed'}
imageStyles.position=self.image.position;self.css(self.image.$item,imageStyles);self.image.$container.appendChild(self.image.$item);self.onResize();self.onScroll(!0);if(self.options.onInit){self.options.onInit.call(self)}
if('none'!==self.css(self.$item,'background-image')){self.css(self.$item,{'background-image':'none'})}
self.addToParallaxList()}
addToParallaxList(){jarallaxList.push({instance:this});if(1===jarallaxList.length){global$1.requestAnimationFrame(updateParallax)}}
removeFromParallaxList(){const self=this;jarallaxList.forEach((data,key)=>{if(data.instance.instanceID===self.instanceID){jarallaxList.splice(key,1)}})}
destroy(){const self=this;self.removeFromParallaxList();const originalStylesTag=self.$item.getAttribute('data-jarallax-original-styles');self.$item.removeAttribute('data-jarallax-original-styles');if(!originalStylesTag){self.$item.removeAttribute('style')}else{self.$item.setAttribute('style',originalStylesTag)}
if(self.image.useImgTag){const originalStylesImgTag=self.image.$item.getAttribute('data-jarallax-original-styles');self.image.$item.removeAttribute('data-jarallax-original-styles');if(!originalStylesImgTag){self.image.$item.removeAttribute('style')}else{self.image.$item.setAttribute('style',originalStylesTag)}
if(self.image.$itemParent){self.image.$itemParent.appendChild(self.image.$item)}}
if(self.image.$container){self.image.$container.parentNode.removeChild(self.image.$container)}
if(self.options.onDestroy){self.options.onDestroy.call(self)}
delete self.$item.jarallax}
clipContainer(){}
coverImage(){const self=this;const rect=self.image.$container.getBoundingClientRect();const contH=rect.height;const{speed}=self.options;const isScroll='scroll'===self.options.type||'scroll-opacity'===self.options.type;let scrollDist=0;let resultH=contH;let resultMT=0;if(isScroll){if(0>speed){scrollDist=speed*Math.max(contH,wndH);if(wndH<contH){scrollDist-=speed*(contH-wndH)}}else{scrollDist=speed*(contH+wndH)}
if(1<speed){resultH=Math.abs(scrollDist-wndH)}else if(0>speed){resultH=scrollDist/speed+Math.abs(scrollDist)}else{resultH+=(wndH-contH)*(1-speed)}
scrollDist/=2}
self.parallaxScrollDistance=scrollDist;if(isScroll){resultMT=(wndH-resultH)/2}else{resultMT=(contH-resultH)/2}
self.css(self.image.$item,{height:`${resultH}px`,marginTop:`${resultMT}px`,left:'fixed'===self.image.position?`${rect.left}px`:'0',width:`${rect.width}px`});if(self.options.onCoverImage){self.options.onCoverImage.call(self)}
return{image:{height:resultH,marginTop:resultMT},container:rect}}
isVisible(){return this.isElementInViewport||!1}
onScroll(force){const self=this;const rect=self.$item.getBoundingClientRect();const contT=rect.top;const contH=rect.height;const styles={};let viewportRect=rect;if(self.options.elementInViewport){viewportRect=self.options.elementInViewport.getBoundingClientRect()}
self.isElementInViewport=0<=viewportRect.bottom&&0<=viewportRect.right&&viewportRect.top<=wndH&&viewportRect.left<=global$1.innerWidth;if(force?!1:!self.isElementInViewport){return}
const beforeTop=Math.max(0,contT);const beforeTopEnd=Math.max(0,contH+contT);const afterTop=Math.max(0,-contT);const beforeBottom=Math.max(0,contT+contH-wndH);const beforeBottomEnd=Math.max(0,contH-(contT+contH-wndH));const afterBottom=Math.max(0,-contT+wndH-contH);const fromViewportCenter=1-2*((wndH-contT)/(wndH+contH));let visiblePercent=1;if(contH<wndH){visiblePercent=1-(afterTop||beforeBottom)/contH}else if(beforeTopEnd<=wndH){visiblePercent=beforeTopEnd/wndH}else if(beforeBottomEnd<=wndH){visiblePercent=beforeBottomEnd/wndH}
if('opacity'===self.options.type||'scale-opacity'===self.options.type||'scroll-opacity'===self.options.type){styles.transform='translate3d(0,0,0)';styles.opacity=visiblePercent}
if('scale'===self.options.type||'scale-opacity'===self.options.type){let scale=1;if(0>self.options.speed){scale-=self.options.speed*visiblePercent}else{scale+=self.options.speed*(1-visiblePercent)}
styles.transform=`scale(${scale}) translate3d(0,0,0)`}
if('scroll'===self.options.type||'scroll-opacity'===self.options.type){let positionY=self.parallaxScrollDistance*fromViewportCenter;if('absolute'===self.image.position){positionY-=contT}
styles.transform=`translate3d(0,${positionY}px,0)`}
self.css(self.image.$item,styles);if(self.options.onScroll){self.options.onScroll.call(self,{section:rect,beforeTop,beforeTopEnd,afterTop,beforeBottom,beforeBottomEnd,afterBottom,visiblePercent,fromViewportCenter})}}
onResize(){this.coverImage()}}
const jarallax=function(items,options,...args){if('object'===typeof HTMLElement?items instanceof HTMLElement:items&&'object'===typeof items&&null!==items&&1===items.nodeType&&'string'===typeof items.nodeName){items=[items]}
const len=items.length;let k=0;let ret;for(k;k<len;k+=1){if('object'===typeof options||'undefined'===typeof options){if(!items[k].jarallax){items[k].jarallax=new Jarallax(items[k],options)}}else if(items[k].jarallax){ret=items[k].jarallax[options].apply(items[k].jarallax,args)}
if('undefined'!==typeof ret){return ret}}
return items};jarallax.constructor=Jarallax;const $=global$1.jQuery;if('undefined'!==typeof $){const $Plugin=function(...args){Array.prototype.unshift.call(args,this);const res=jarallax.apply(global$1,args);return'object'!==typeof res?res:this};$Plugin.constructor=jarallax.constructor;const old$Plugin=$.fn.jarallax;$.fn.jarallax=$Plugin;$.fn.jarallax.noConflict=function(){$.fn.jarallax=old$Plugin;return this}}
ready(()=>{jarallax(document.querySelectorAll('[data-jarallax]'))});return jarallax}));/*!
 * Video Extension for Jarallax v2.0.2 (https://github.com/nk-o/jarallax)
 * Copyright 2022 nK <https://nkdev.info>
 * Licensed under MIT (https://github.com/nk-o/jarallax/blob/master/LICENSE)
 */
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.jarallaxVideo=factory())})(this,(function(){'use strict';/*!
   * Name    : Video Worker
   * Version : 2.0.0
   * Author  : nK <https://nkdev.info>
   * GitHub  : https://github.com/nk-o/video-worker
   */
let win$1;if(typeof window!=='undefined'){win$1=window}else if(typeof global!=='undefined'){win$1=global}else if(typeof self!=='undefined'){win$1=self}else{win$1={}}
var global$1$1=win$1;function Deferred(){this.doneCallbacks=[];this.failCallbacks=[]}
Deferred.prototype={execute(list,args){let i=list.length;args=Array.prototype.slice.call(args);while(i){i-=1;list[i].apply(null,args)}},resolve(...args){this.execute(this.doneCallbacks,args)},reject(...args){this.execute(this.failCallbacks,args)},done(callback){this.doneCallbacks.push(callback)},fail(callback){this.failCallbacks.push(callback)}};let ID=0;let YoutubeAPIadded=0;let VimeoAPIadded=0;let loadingYoutubePlayer=0;let loadingVimeoPlayer=0;const loadingYoutubeDefer=new Deferred();const loadingVimeoDefer=new Deferred();class VideoWorker{constructor(url,options){const self=this;self.url=url;self.options_default={autoplay:!1,loop:!1,mute:!1,volume:100,showControls:!0,accessibilityHidden:!1,startTime:0,endTime:0};self.options=self.extend({},self.options_default,options);if(typeof self.options.showContols!=='undefined'){self.options.showControls=self.options.showContols;delete self.options.showContols}
self.videoID=self.parseURL(url);if(self.videoID){self.ID=ID;ID+=1;self.loadAPI();self.init()}}
extend(...args){const out=args[0]||{};Object.keys(args).forEach(i=>{if(!args[i]){return}
Object.keys(args[i]).forEach(key=>{out[key]=args[i][key]})});return out}
parseURL(url){function getYoutubeID(ytUrl){const regExp=/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/;const match=ytUrl.match(regExp);return match&&match[1].length===11?match[1]:!1}
function getVimeoID(vmUrl){const regExp=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/;const match=vmUrl.match(regExp);return match&&match[3]?match[3]:!1}
function getLocalVideos(locUrl){const videoFormats=locUrl.split(/,(?=mp4\:|webm\:|ogv\:|ogg\:)/);const result={};let ready=0;videoFormats.forEach(val=>{const match=val.match(/^(mp4|webm|ogv|ogg)\:(.*)/);if(match&&match[1]&&match[2]){result[match[1]==='ogv'?'ogg':match[1]]=match[2];ready=1}});return ready?result:!1}
const Youtube=getYoutubeID(url);const Vimeo=getVimeoID(url);const Local=getLocalVideos(url);if(Youtube){this.type='youtube';return Youtube}
if(Vimeo){this.type='vimeo';return Vimeo}
if(Local){this.type='local';return Local}
return!1}
isValid(){return!!this.videoID}
on(name,callback){this.userEventsList=this.userEventsList||[];(this.userEventsList[name]||(this.userEventsList[name]=[])).push(callback)}
off(name,callback){if(!this.userEventsList||!this.userEventsList[name]){return}
if(!callback){delete this.userEventsList[name]}else{this.userEventsList[name].forEach((val,key)=>{if(val===callback){this.userEventsList[name][key]=!1}})}}
fire(name,...args){if(this.userEventsList&&typeof this.userEventsList[name]!=='undefined'){this.userEventsList[name].forEach(val=>{if(val){val.apply(this,args)}})}}
play(start){const self=this;if(!self.player){return}
if(self.type==='youtube'&&self.player.playVideo){if(typeof start!=='undefined'){self.player.seekTo(start||0)}
if(global$1$1.YT.PlayerState.PLAYING!==self.player.getPlayerState()){self.player.playVideo()}}
if(self.type==='vimeo'){if(typeof start!=='undefined'){self.player.setCurrentTime(start)}
self.player.getPaused().then(paused=>{if(paused){self.player.play()}})}
if(self.type==='local'){if(typeof start!=='undefined'){self.player.currentTime=start}
if(self.player.paused){self.player.play()}}}
pause(){const self=this;if(!self.player){return}
if(self.type==='youtube'&&self.player.pauseVideo){if(global$1$1.YT.PlayerState.PLAYING===self.player.getPlayerState()){self.player.pauseVideo()}}
if(self.type==='vimeo'){self.player.getPaused().then(paused=>{if(!paused){self.player.pause()}})}
if(self.type==='local'){if(!self.player.paused){self.player.pause()}}}
mute(){const self=this;if(!self.player){return}
if(self.type==='youtube'&&self.player.mute){self.player.mute()}
if(self.type==='vimeo'&&self.player.setVolume){self.player.setVolume(0)}
if(self.type==='local'){self.$video.muted=!0}}
unmute(){const self=this;if(!self.player){return}
if(self.type==='youtube'&&self.player.mute){self.player.unMute()}
if(self.type==='vimeo'&&self.player.setVolume){self.player.setVolume(self.options.volume)}
if(self.type==='local'){self.$video.muted=!1}}
setVolume(volume=!1){const self=this;if(!self.player||!volume){return}
if(self.type==='youtube'&&self.player.setVolume){self.player.setVolume(volume)}
if(self.type==='vimeo'&&self.player.setVolume){self.player.setVolume(volume)}
if(self.type==='local'){self.$video.volume=volume/100}}
getVolume(callback){const self=this;if(!self.player){callback(!1);return}
if(self.type==='youtube'&&self.player.getVolume){callback(self.player.getVolume())}
if(self.type==='vimeo'&&self.player.getVolume){self.player.getVolume().then(volume=>{callback(volume)})}
if(self.type==='local'){callback(self.$video.volume*100)}}
getMuted(callback){const self=this;if(!self.player){callback(null);return}
if(self.type==='youtube'&&self.player.isMuted){callback(self.player.isMuted())}
if(self.type==='vimeo'&&self.player.getVolume){self.player.getVolume().then(volume=>{callback(!!volume)})}
if(self.type==='local'){callback(self.$video.muted)}}
getImageURL(callback){const self=this;if(self.videoImage){callback(self.videoImage);return}
if(self.type==='youtube'){const availableSizes=['maxresdefault','sddefault','hqdefault','0'];let step=0;const tempImg=new Image();tempImg.onload=function(){if((this.naturalWidth||this.width)!==120||step===availableSizes.length-1){self.videoImage=`https://img.youtube.com/vi/${self.videoID}/${availableSizes[step]}.jpg`;callback(self.videoImage)}else{step+=1;this.src=`https://img.youtube.com/vi/${self.videoID}/${availableSizes[step]}.jpg`}};tempImg.src=`https://img.youtube.com/vi/${self.videoID}/${availableSizes[step]}.jpg`}
if(self.type==='vimeo'){let request=new XMLHttpRequest();request.open('GET',`https://vimeo.com/api/oembed.json?url=${self.url}`,!0);request.onreadystatechange=function(){if(this.readyState===4){if(this.status>=200&&this.status<400){const response=JSON.parse(this.responseText);if(response.thumbnail_url){self.videoImage=response.thumbnail_url;callback(self.videoImage)}}}};request.send();request=null}}
getIframe(callback){this.getVideo(callback)}
getVideo(callback){const self=this;if(self.$video){callback(self.$video);return}
self.onAPIready(()=>{let hiddenDiv;if(!self.$video){hiddenDiv=document.createElement('div');hiddenDiv.style.display='none'}
if(self.type==='youtube'){self.playerOptions={host:'https://www.youtube-nocookie.com',videoId:self.videoID,playerVars:{autohide:1,rel:0,autoplay:0,playsinline:1}};if(!self.options.showControls){self.playerOptions.playerVars.iv_load_policy=3;self.playerOptions.playerVars.modestbranding=1;self.playerOptions.playerVars.controls=0;self.playerOptions.playerVars.showinfo=0;self.playerOptions.playerVars.disablekb=1}
let ytStarted;let ytProgressInterval;self.playerOptions.events={onReady(e){if(self.options.mute){e.target.mute()}else if(self.options.volume){e.target.setVolume(self.options.volume)}
if(self.options.autoplay){self.play(self.options.startTime)}
self.fire('ready',e);if(self.options.loop&&!self.options.endTime){const secondsOffset=0.1;self.options.endTime=self.player.getDuration()-secondsOffset}
setInterval(()=>{self.getVolume(volume=>{if(self.options.volume!==volume){self.options.volume=volume;self.fire('volumechange',e)}})},150)},onStateChange(e){if(self.options.loop&&e.data===global$1$1.YT.PlayerState.ENDED){self.play(self.options.startTime)}
if(!ytStarted&&e.data===global$1$1.YT.PlayerState.PLAYING){ytStarted=1;self.fire('started',e)}
if(e.data===global$1$1.YT.PlayerState.PLAYING){self.fire('play',e)}
if(e.data===global$1$1.YT.PlayerState.PAUSED){self.fire('pause',e)}
if(e.data===global$1$1.YT.PlayerState.ENDED){self.fire('ended',e)}
if(e.data===global$1$1.YT.PlayerState.PLAYING){ytProgressInterval=setInterval(()=>{self.fire('timeupdate',e);if(self.options.endTime&&self.player.getCurrentTime()>=self.options.endTime){if(self.options.loop){self.play(self.options.startTime)}else{self.pause()}}},150)}else{clearInterval(ytProgressInterval)}},onError(e){self.fire('error',e)}};const firstInit=!self.$video;if(firstInit){const div=document.createElement('div');div.setAttribute('id',self.playerID);hiddenDiv.appendChild(div);document.body.appendChild(hiddenDiv)}
self.player=self.player||new global$1$1.YT.Player(self.playerID,self.playerOptions);if(firstInit){self.$video=document.getElementById(self.playerID);if(self.options.accessibilityHidden){self.$video.setAttribute('tabindex','-1');self.$video.setAttribute('aria-hidden','true')}
self.videoWidth=parseInt(self.$video.getAttribute('width'),10)||1280;self.videoHeight=parseInt(self.$video.getAttribute('height'),10)||720}}
if(self.type==='vimeo'){self.playerOptions={dnt:1,id:self.videoID,autopause:0,transparent:0,autoplay:self.options.autoplay?1:0,loop:self.options.loop?1:0,muted:self.options.mute?1:0};if(self.options.volume){self.playerOptions.volume=self.options.volume}
if(!self.options.showControls){self.playerOptions.badge=0;self.playerOptions.byline=0;self.playerOptions.portrait=0;self.playerOptions.title=0;self.playerOptions.background=1}
if(!self.$video){let playerOptionsString='';Object.keys(self.playerOptions).forEach(key=>{if(playerOptionsString!==''){playerOptionsString+='&'}
playerOptionsString+=`${key}=${encodeURIComponent(self.playerOptions[key])}`});self.$video=document.createElement('iframe');self.$video.setAttribute('id',self.playerID);self.$video.setAttribute('src',`https://player.vimeo.com/video/${self.videoID}?${playerOptionsString}`);self.$video.setAttribute('frameborder','0');self.$video.setAttribute('mozallowfullscreen','');self.$video.setAttribute('allowfullscreen','');self.$video.setAttribute('title','Vimeo video player');if(self.options.accessibilityHidden){self.$video.setAttribute('tabindex','-1');self.$video.setAttribute('aria-hidden','true')}
hiddenDiv.appendChild(self.$video);document.body.appendChild(hiddenDiv)}
self.player=self.player||new global$1$1.Vimeo.Player(self.$video,self.playerOptions);if(self.options.startTime&&self.options.autoplay){self.player.setCurrentTime(self.options.startTime)}
self.player.getVideoWidth().then(width=>{self.videoWidth=width||1280});self.player.getVideoHeight().then(height=>{self.videoHeight=height||720});let vmStarted;self.player.on('timeupdate',e=>{if(!vmStarted){self.fire('started',e);vmStarted=1}
self.fire('timeupdate',e);if(self.options.endTime){if(self.options.endTime&&e.seconds>=self.options.endTime){if(self.options.loop){self.play(self.options.startTime)}else{self.pause()}}}});self.player.on('play',e=>{self.fire('play',e);if(self.options.startTime&&e.seconds===0){self.play(self.options.startTime)}});self.player.on('pause',e=>{self.fire('pause',e)});self.player.on('ended',e=>{self.fire('ended',e)});self.player.on('loaded',e=>{self.fire('ready',e)});self.player.on('volumechange',e=>{self.fire('volumechange',e)});self.player.on('error',e=>{self.fire('error',e)})}
function addSourceToLocal(element,src,type){const source=document.createElement('source');source.src=src;source.type=type;element.appendChild(source)}
if(self.type==='local'){if(!self.$video){self.$video=document.createElement('video');if(self.options.showControls){self.$video.controls=!0}
if(self.options.mute){self.$video.muted=!0}else if(self.$video.volume){self.$video.volume=self.options.volume/100}
if(self.options.loop){self.$video.loop=!0}
self.$video.setAttribute('playsinline','');self.$video.setAttribute('webkit-playsinline','');if(self.options.accessibilityHidden){self.$video.setAttribute('tabindex','-1');self.$video.setAttribute('aria-hidden','true')}
self.$video.setAttribute('id',self.playerID);hiddenDiv.appendChild(self.$video);document.body.appendChild(hiddenDiv);Object.keys(self.videoID).forEach(key=>{addSourceToLocal(self.$video,self.videoID[key],`video/${key}`)})}
self.player=self.player||self.$video;let locStarted;self.player.addEventListener('playing',e=>{if(!locStarted){self.fire('started',e)}
locStarted=1});self.player.addEventListener('timeupdate',function(e){self.fire('timeupdate',e);if(self.options.endTime){if(self.options.endTime&&this.currentTime>=self.options.endTime){if(self.options.loop){self.play(self.options.startTime)}else{self.pause()}}}});self.player.addEventListener('play',e=>{self.fire('play',e)});self.player.addEventListener('pause',e=>{self.fire('pause',e)});self.player.addEventListener('ended',e=>{self.fire('ended',e)});self.player.addEventListener('loadedmetadata',function(){self.videoWidth=this.videoWidth||1280;self.videoHeight=this.videoHeight||720;self.fire('ready');if(self.options.autoplay){self.play(self.options.startTime)}});self.player.addEventListener('volumechange',e=>{self.getVolume(volume=>{self.options.volume=volume});self.fire('volumechange',e)});self.player.addEventListener('error',e=>{self.fire('error',e)})}
callback(self.$video)})}
init(){const self=this;self.playerID=`VideoWorker-${self.ID}`}
loadAPI(){const self=this;if(YoutubeAPIadded&&VimeoAPIadded){return}
let src='';if(self.type==='youtube'&&!YoutubeAPIadded){YoutubeAPIadded=1;src='https://www.youtube.com/iframe_api'}
if(self.type==='vimeo'&&!VimeoAPIadded){VimeoAPIadded=1;if(typeof global$1$1.Vimeo!=='undefined'){return}
src='https://player.vimeo.com/api/player.js'}
if(!src){return}
let tag=document.createElement('script');let head=document.getElementsByTagName('head')[0];tag.src=src;head.appendChild(tag);head=null;tag=null}
onAPIready(callback){const self=this;if(self.type==='youtube'){if((typeof global$1$1.YT==='undefined'||global$1$1.YT.loaded===0)&&!loadingYoutubePlayer){loadingYoutubePlayer=1;global$1$1.onYouTubeIframeAPIReady=function(){global$1$1.onYouTubeIframeAPIReady=null;loadingYoutubeDefer.resolve('done');callback()}}else if(typeof global$1$1.YT==='object'&&global$1$1.YT.loaded===1){callback()}else{loadingYoutubeDefer.done(()=>{callback()})}}
if(self.type==='vimeo'){if(typeof global$1$1.Vimeo==='undefined'&&!loadingVimeoPlayer){loadingVimeoPlayer=1;const vimeoInterval=setInterval(()=>{if(typeof global$1$1.Vimeo!=='undefined'){clearInterval(vimeoInterval);loadingVimeoDefer.resolve('done');callback()}},20)}else if(typeof global$1$1.Vimeo!=='undefined'){callback()}else{loadingVimeoDefer.done(()=>{callback()})}}
if(self.type==='local'){callback()}}}
function ready(callback){if('complete'===document.readyState||'interactive'===document.readyState){callback()}else{document.addEventListener('DOMContentLoaded',callback,{capture:!0,once:!0,passive:!0})}}
let win;if('undefined'!==typeof window){win=window}else if('undefined'!==typeof global){win=global}else if('undefined'!==typeof self){win=self}else{win={}}
var global$1=win;function jarallaxVideo(jarallax=global$1.jarallax){if('undefined'===typeof jarallax){return}
const Jarallax=jarallax.constructor;const defOnScroll=Jarallax.prototype.onScroll;Jarallax.prototype.onScroll=function(){const self=this;defOnScroll.apply(self);const isReady=!self.isVideoInserted&&self.video&&(!self.options.videoLazyLoading||self.isElementInViewport)&&!self.options.disableVideo();if(isReady){self.isVideoInserted=!0;self.video.getVideo(video=>{const $parent=video.parentNode;self.css(video,{position:self.image.position,top:'0px',left:'0px',right:'0px',bottom:'0px',width:'100%',height:'100%',maxWidth:'none',maxHeight:'none',pointerEvents:'none',transformStyle:'preserve-3d',backfaceVisibility:'hidden',willChange:'transform,opacity',margin:0,zIndex:-1});self.$video=video;if('local'===self.video.type){if(self.image.src){self.$video.setAttribute('poster',self.image.src)}else if(self.image.$item&&'IMG'===self.image.$item.tagName&&self.image.$item.src){self.$video.setAttribute('poster',self.image.$item.src)}}
self.image.$container.appendChild(video);$parent.parentNode.removeChild($parent);if(self.options.onVideoInsert){self.options.onVideoInsert.call(self)}})}};const defCoverImage=Jarallax.prototype.coverImage;Jarallax.prototype.coverImage=function(){const self=this;const imageData=defCoverImage.apply(self);const node=self.image.$item?self.image.$item.nodeName:!1;if(imageData&&self.video&&node&&('IFRAME'===node||'VIDEO'===node)){let h=imageData.image.height;let w=h*self.image.width/self.image.height;let ml=(imageData.container.width-w)/2;let mt=imageData.image.marginTop;if(imageData.container.width>w){w=imageData.container.width;h=w*self.image.height/self.image.width;ml=0;mt+=(imageData.image.height-h)/2}
if('IFRAME'===node){h+=400;mt-=200}
self.css(self.$video,{width:`${w}px`,marginLeft:`${ml}px`,height:`${h}px`,marginTop:`${mt}px`})}
return imageData};const defInitImg=Jarallax.prototype.initImg;Jarallax.prototype.initImg=function(){const self=this;const defaultResult=defInitImg.apply(self);if(!self.options.videoSrc){self.options.videoSrc=self.$item.getAttribute('data-jarallax-video')||null}
if(self.options.videoSrc){self.defaultInitImgResult=defaultResult;return!0}
return defaultResult};const defCanInitParallax=Jarallax.prototype.canInitParallax;Jarallax.prototype.canInitParallax=function(){const self=this;let defaultResult=defCanInitParallax.apply(self);if(!self.options.videoSrc){return defaultResult}
const video=new VideoWorker(self.options.videoSrc,{autoplay:!0,loop:self.options.videoLoop,showControls:!1,accessibilityHidden:!0,startTime:self.options.videoStartTime||0,endTime:self.options.videoEndTime||0,mute:self.options.videoVolume?0:1,volume:self.options.videoVolume||0});if(self.options.onVideoWorkerInit){self.options.onVideoWorkerInit.call(self,video)}
function resetDefaultImage(){if(self.image.$default_item){self.image.$item=self.image.$default_item;self.image.$item.style.display='block';self.coverImage();self.onScroll()}}
if(video.isValid()){if(this.options.disableParallax()){defaultResult=!0;self.image.position='absolute';self.options.type='scroll';self.options.speed=1}
if(!defaultResult){if(!self.defaultInitImgResult){video.getImageURL(url=>{const curStyle=self.$item.getAttribute('style');if(curStyle){self.$item.setAttribute('data-jarallax-original-styles',curStyle)}
self.css(self.$item,{'background-image':`url("${url}")`,'background-position':'center','background-size':'cover'})})}}else{video.on('ready',()=>{if(self.options.videoPlayOnlyVisible){const oldOnScroll=self.onScroll;self.onScroll=function(){oldOnScroll.apply(self);if(!self.videoError&&(self.options.videoLoop||!self.options.videoLoop&&!self.videoEnded)){if(self.isVisible()){video.play()}else{video.pause()}}}}else{video.play()}});video.on('started',()=>{self.image.$default_item=self.image.$item;self.image.$item=self.$video;self.image.width=self.video.videoWidth||1280;self.image.height=self.video.videoHeight||720;self.coverImage();self.onScroll();if(self.image.$default_item){self.image.$default_item.style.display='none'}});video.on('ended',()=>{self.videoEnded=!0;if(!self.options.videoLoop){resetDefaultImage()}});video.on('error',()=>{self.videoError=!0;resetDefaultImage()});self.video=video;if(!self.defaultInitImgResult){self.image.src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';if('local'!==video.type){video.getImageURL(url=>{self.image.bgImage=`url("${url}")`;self.init()});return!1}}}}
return defaultResult};const defDestroy=Jarallax.prototype.destroy;Jarallax.prototype.destroy=function(){const self=this;if(self.image.$default_item){self.image.$item=self.image.$default_item;delete self.image.$default_item}
defDestroy.apply(self)}}
jarallaxVideo();ready(()=>{if('undefined'!==typeof global$1.jarallax){global$1.jarallax(document.querySelectorAll('[data-jarallax-video]'))}});if(!global$1.VideoWorker){global$1.VideoWorker=VideoWorker}
return jarallaxVideo}));/**
 * Timeago is a jQuery plugin that makes it easy to support automatically
 * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
 *
 * @name timeago
 * @version 1.5.3
 * @requires jQuery v1.2.3+
 * @author Ryan McGeary
 * @license MIT License - http://www.opensource.org/licenses/mit-license.php
 *
 * For usage and examples, visit:
 * http://timeago.yarp.com/
 *
 * Copyright (c) 2008-2016, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
 */
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof module==='object'&&typeof module.exports==='object'){factory(require('jquery'))}else{factory(jQuery)}}(function($){$.timeago=function(timestamp){if(timestamp instanceof Date){return inWords(timestamp)}else if(typeof timestamp==="string"){return inWords($.timeago.parse(timestamp))}else if(typeof timestamp==="number"){return inWords(new Date(timestamp))}else{return inWords($.timeago.datetime(timestamp))}};var $t=$.timeago;$.extend($.timeago,{settings:{refreshMillis:60000,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,autoDispose:!0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:typeof(st_timeago_suffixAgo)!=='undefined'?st_timeago_suffixAgo:"ago",suffixFromNow:typeof(st_timeago_suffixFromNow)!=='undefined'?st_timeago_suffixFromNow:"from now",inPast:typeof(st_timeago_inPast)!=='undefined'?st_timeago_inPast:"any moment now",seconds:typeof(st_timeago_seconds)!=='undefined'?st_timeago_seconds:"less than a minute",minute:typeof(st_timeago_minute)!=='undefined'?st_timeago_minute:"about a minute",minutes:typeof(st_timeago_minutes)!=='undefined'?st_timeago_minutes:"#d minutes",hour:typeof(st_timeago_hour)!=='undefined'?st_timeago_hour:"about an hour",hours:typeof(st_timeago_hours)!=='undefined'?st_timeago_hours:"about #d hours",day:typeof(st_timeago_day)!=='undefined'?st_timeago_day:"a day",days:typeof(st_timeago_days)!=='undefined'?st_timeago_days:"#d days",month:typeof(st_timeago_month)!=='undefined'?st_timeago_month:"about a month",months:typeof(st_timeago_months)!=='undefined'?st_timeago_months:"#d months",year:typeof(st_timeago_year)!=='undefined'?st_timeago_year:"about a year",years:typeof(st_timeago_years)!=='undefined'?st_timeago_years:"#d years",wordSeparator:" ",numbers:[]}},inWords:function(distanceMillis){if(!this.settings.allowPast&&!this.settings.allowFuture){throw 'timeago allowPast and allowFuture settings can not both be set to false.'}
var $l=this.settings.strings;var prefix=$l.prefixAgo;var suffix=$l.suffixAgo;if(this.settings.allowFuture){if(distanceMillis<0){prefix=$l.prefixFromNow;suffix=$l.suffixFromNow}}
if(!this.settings.allowPast&&distanceMillis>=0){return this.settings.strings.inPast}
var seconds=Math.abs(distanceMillis)/1000;var minutes=seconds/60;var hours=minutes/60;var days=hours/24;var years=days/365;function substitute(stringOrFunction,number){var string=$.isFunction(stringOrFunction)?stringOrFunction(number,distanceMillis):stringOrFunction;var value=($l.numbers&&$l.numbers[number])||number;return string.replace(/#d/i,value)}
var words=seconds<45&&substitute($l.seconds,Math.round(seconds))||seconds<90&&substitute($l.minute,1)||minutes<45&&substitute($l.minutes,Math.round(minutes))||minutes<90&&substitute($l.hour,1)||hours<24&&substitute($l.hours,Math.round(hours))||hours<42&&substitute($l.day,1)||days<30&&substitute($l.days,Math.round(days))||days<45&&substitute($l.month,1)||days<365&&substitute($l.months,Math.round(days/30))||years<1.5&&substitute($l.year,1)||substitute($l.years,Math.round(years));var separator=$l.wordSeparator||"";if($l.wordSeparator===undefined){separator=" "}
return $.trim([prefix,words,suffix].join(separator))},parse:function(iso8601){var s=$.trim(iso8601);s=s.replace(/\.\d+/,"");s=s.replace(/-/,"/").replace(/-/,"/");s=s.replace(/T/," ").replace(/Z/," UTC");s=s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2");s=s.replace(/([\+\-]\d\d)$/," $100");return new Date(s)},datetime:function(elem){var iso8601=$t.isTime(elem)?$(elem).attr("datetime"):$(elem).attr("title");return $t.parse(iso8601)},isTime:function(elem){return $(elem).get(0).tagName.toLowerCase()==="time"}});var functions={init:function(){var refresh_el=$.proxy(refresh,this);refresh_el();var $s=$t.settings;if($s.refreshMillis>0){this._timeagoInterval=setInterval(refresh_el,$s.refreshMillis)}},update:function(timestamp){var date=(timestamp instanceof Date)?timestamp:$t.parse(timestamp);$(this).data('timeago',{datetime:date});if($t.settings.localeTitle){$(this).attr("title",date.toLocaleString())}
refresh.apply(this)},updateFromDOM:function(){$(this).data('timeago',{datetime:$t.parse($t.isTime(this)?$(this).attr("datetime"):$(this).attr("title"))});refresh.apply(this)},dispose:function(){if(this._timeagoInterval){window.clearInterval(this._timeagoInterval);this._timeagoInterval=null}}};$.fn.timeago=function(action,options){var fn=action?functions[action]:functions.init;if(!fn){throw new Error("Unknown function name '"+action+"' for timeago")}
this.each(function(){fn.call(this,options)});return this};function refresh(){var $s=$t.settings;if($s.autoDispose&&!$.contains(document.documentElement,this)){$(this).timeago("dispose");return this}
var data=prepareData(this);if(!isNaN(data.datetime)){if($s.cutoff===0||Math.abs(distance(data.datetime))<$s.cutoff){$(this).text(inWords(data.datetime))}else{if($(this).attr('title').length>0){$(this).text($(this).attr('title'))}}}
return this}
function prepareData(element){element=$(element);if(!element.data("timeago")){element.data("timeago",{datetime:$t.datetime(element)});var text=$.trim(element.text());if($t.settings.localeTitle){element.attr("title",element.data('timeago').datetime.toLocaleString())}else if(text.length>0&&!($t.isTime(element)&&element.attr("title"))){element.attr("title",text)}}
return element.data("timeago")}
function inWords(date){return $t.inWords(distance(date))}
function distance(date){return(new Date().getTime()-date.getTime())}
document.createElement("abbr");document.createElement("time")}));/**
 * @fileoverview dragscroll - scroll area by dragging
 * @version 0.0.8
 * 
 * @license MIT, see http://github.com/asvd/dragscroll
 * @copyright 2015 asvd <heliosframework@gmail.com> 
 */
(function(root,factory){if(typeof define==='function'&&define.amd){define(['exports'],factory)}else if(typeof exports!=='undefined'){factory(exports)}else{factory((root.dragscroll={}))}}(this,function(exports){var _window=window;var _document=document;var mousemove='mousemove';var mouseup='mouseup';var mousedown='mousedown';var EventListener='EventListener';var addEventListener='add'+EventListener;var removeEventListener='remove'+EventListener;var newScrollX,newScrollY;var dragged=[];var reset=function(i,el){for(i=0;i<dragged.length;){el=dragged[i++];el=el.container||el;el[removeEventListener](mousedown,el.md,0);_window[removeEventListener](mouseup,el.mu,0);_window[removeEventListener](mousemove,el.mm,0)}
dragged=[].slice.call(_document.getElementsByClassName('dragscroll'));for(i=0;i<dragged.length;){(function(el,lastClientX,lastClientY,pushed,scroller,cont){(cont=el.container||el)[addEventListener](mousedown,cont.md=function(e){if(!el.hasAttribute('nochilddrag')||_document.elementFromPoint(e.pageX,e.pageY)==cont){pushed=1;lastClientX=e.clientX;lastClientY=e.clientY;e.preventDefault()}},0);_window[addEventListener](mouseup,cont.mu=function(){pushed=0},0);_window[addEventListener](mousemove,cont.mm=function(e){if(pushed){(scroller=el.scroller||el).scrollLeft-=newScrollX=(-lastClientX+(lastClientX=e.clientX));if(!scroller.classList.contains('st_scroll_horizontal'))
scroller.scrollTop-=newScrollY=(-lastClientY+(lastClientY=e.clientY));if(el==_document.body){(scroller=_document.documentElement).scrollLeft-=newScrollX;scroller.scrollTop-=newScrollY}}},0)})(dragged[i++])}}
if(_document.readyState=='complete'){reset()}else{_window[addEventListener]('load',reset,0)}
exports.reset=reset}));(function(factory){"use strict";if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof exports==='object'&&typeof require==='function'){factory(require('jquery'))}else{factory(jQuery)}}(function($){'use strict';var utils=(function(){return{escapeRegExChars:function(value){return value.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},createNode:function(containerClass){var div=document.createElement('div');div.className=containerClass;div.style.display='none';return div}}}()),keys={ESC:27,TAB:9,RETURN:13,LEFT:37,UP:38,RIGHT:39,DOWN:40};function Autocomplete(el,options){var noop=$.noop,that=this,defaults={ajaxSettings:{},autoSelectFirst:!1,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:'auto',minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:Autocomplete.formatResult,delimiter:null,zIndex:9999,type:'GET',noCache:!1,onSearchStart:noop,onSearchComplete:noop,onSearchError:noop,preserveInput:!1,containerClass:'autocomplete-suggestions',tabDisabled:!1,dataType:'text',currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(suggestion,originalQuery,queryLowerCase){return suggestion.value.toLowerCase().indexOf(queryLowerCase)!==-1},paramName:'query',transformResult:function(response){return typeof response==='string'?$.parseJSON(response):response},showNoSuggestionNotice:!1,noSuggestionNotice:'No results',orientation:'bottom',forceFixPosition:!1};that.element=el;that.el=$(el);that.suggestions=[];that.badQueries=[];that.selectedIndex=-1;that.currentValue=that.element.value;that.intervalId=0;that.cachedResponse={};that.onChangeInterval=null;that.onChange=null;that.isLocal=!1;that.suggestionsContainer=null;that.noSuggestionsContainer=null;that.options=$.extend({},defaults,options);that.classes={selected:'autocomplete-selected',suggestion:'autocomplete-suggestion'};that.hint=null;that.hintValue='';that.selection=null;that.initialize();that.setOptions(options)}
Autocomplete.utils=utils;$.Autocomplete=Autocomplete;Autocomplete.formatResult=function(suggestion,currentValue){return suggestion.value};Autocomplete.prototype={killerFn:null,initialize:function(){var that=this,suggestionSelector='.'+that.classes.suggestion,selected=that.classes.selected,options=that.options,container;that.element.setAttribute('autocomplete','off');that.killerFn=function(e){if(!$(e.target).closest('.'+that.options.containerClass).length){that.killSuggestions();that.disableKillerFn()}};that.noSuggestionsContainer=$('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0);that.suggestionsContainer=Autocomplete.utils.createNode(options.containerClass);container=$(that.suggestionsContainer);container.appendTo(options.appendTo);if(options.width!=='auto'){container.css('width',options.width)}
container.on('mouseover.autocomplete',suggestionSelector,function(){that.activate($(this).data('index'))});container.on('mouseout.autocomplete',function(){that.selectedIndex=-1;container.children('.'+selected).removeClass(selected)});that.fixPositionCapture=function(){if(that.visible){that.fixPosition()}};$(window).on('resize.autocomplete',that.fixPositionCapture);that.el.on('keydown.autocomplete',function(e){that.onKeyPress(e)});that.el.on('keyup.autocomplete',function(e){that.onKeyUp(e)});that.el.on('blur.autocomplete',function(){that.onBlur()});that.el.on('focus.autocomplete',function(){that.onFocus()});that.el.on('change.autocomplete',function(e){that.onKeyUp(e)});that.el.on('input.autocomplete',function(e){that.onKeyUp(e)})},onFocus:function(){var that=this;that.fixPosition();if(that.el.val().length>=that.options.minChars){that.onValueChange()}},onBlur:function(){this.enableKillerFn()},abortAjax:function(){var that=this;if(that.currentRequest){that.currentRequest.abort();that.currentRequest=null}},setOptions:function(suppliedOptions){var that=this,options=that.options;$.extend(options,suppliedOptions);that.isLocal=$.isArray(options.lookup);if(that.isLocal){options.lookup=that.verifySuggestionsFormat(options.lookup)}
options.orientation=that.validateOrientation(options.orientation,'bottom')},clearCache:function(){this.cachedResponse={};this.badQueries=[]},clear:function(){this.clearCache();this.currentValue='';this.suggestions=[]},disable:function(){var that=this;that.disabled=!0;clearInterval(that.onChangeInterval);that.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var that=this,$container=$(that.suggestionsContainer),containerParent=$container.parent().get(0);if(containerParent!==document.body&&!that.options.forceFixPosition){return}
var orientation=that.options.orientation,containerHeight=$container.outerHeight(),height=that.el.outerHeight(),offset=that.el.offset(),styles={'top':offset.top,'left':offset.left};if(orientation==='auto'){var viewPortHeight=$(window).height(),scrollTop=$(window).scrollTop(),topOverflow=-scrollTop+offset.top-containerHeight,bottomOverflow=scrollTop+viewPortHeight-(offset.top+height+containerHeight);orientation=(Math.max(topOverflow,bottomOverflow)===topOverflow)?'top':'bottom'}
if(orientation==='top'){styles.top+=-containerHeight}else{styles.top+=height}
if(containerParent!==document.body){var opacity=$container.css('opacity'),parentOffsetDiff;if(!that.visible){$container.css('opacity',0).show()}
parentOffsetDiff=$container.offsetParent().offset();styles.top-=parentOffsetDiff.top;styles.left-=parentOffsetDiff.left;if(!that.visible){$container.css('opacity',opacity).hide()}}
if(that.options.width==='auto'){styles.width=that.el.outerWidth()+'px'}
$container.css(styles)},enableKillerFn:function(){var that=this;$(document).on('click.autocomplete',that.killerFn)},disableKillerFn:function(){var that=this;$(document).off('click.autocomplete',that.killerFn)},killSuggestions:function(){var that=this;that.stopKillSuggestions();that.intervalId=window.setInterval(function(){if(that.visible){if(!that.options.preserveInput){that.el.val(that.currentValue)}
that.hide()}
that.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var that=this,valLength=that.el.val().length,selectionStart=that.element.selectionStart,range;if(typeof selectionStart==='number'){return selectionStart===valLength}
if(document.selection){range=document.selection.createRange();range.moveStart('character',-valLength);return valLength===range.text.length}
return!0},onKeyPress:function(e){var that=this;if(!that.disabled&&!that.visible&&e.which===keys.DOWN&&that.currentValue){that.suggest();return}
if(that.disabled||!that.visible){return}
switch(e.which){case keys.ESC:that.el.val(that.currentValue);that.hide();break;case keys.RIGHT:if(that.hint&&that.options.onHint&&that.isCursorAtEnd()){that.selectHint();break}
return;case keys.TAB:if(that.hint&&that.options.onHint){that.selectHint();return}
if(that.selectedIndex===-1){that.hide();return}
that.select(that.selectedIndex);if(that.options.tabDisabled===!1){return}
break;case keys.RETURN:if(that.selectedIndex===-1){that.hide();return}
that.select(that.selectedIndex);break;case keys.UP:that.moveUp();break;case keys.DOWN:that.moveDown();break;default:return}
e.stopImmediatePropagation();e.preventDefault()},onKeyUp:function(e){var that=this;if(that.disabled){return}
switch(e.which){case keys.UP:case keys.DOWN:return}
clearInterval(that.onChangeInterval);if(that.currentValue!==that.el.val()){that.findBestHint();if(that.options.deferRequestBy>0){that.onChangeInterval=setInterval(function(){that.onValueChange()},that.options.deferRequestBy)}else{that.onValueChange()}}},onValueChange:function(){var that=this,options=that.options,value=that.el.val(),query=that.getQuery(value);if(that.selection&&that.currentValue!==query){that.selection=null;(options.onInvalidateSelection||$.noop).call(that.element)}
clearInterval(that.onChangeInterval);that.currentValue=value;that.selectedIndex=-1;if(options.triggerSelectOnValidInput&&that.isExactMatch(query)){that.select(0);return}
if(query.length<options.minChars){that.hide()}else{that.getSuggestions(query)}},isExactMatch:function(query){var suggestions=this.suggestions;return(suggestions.length===1&&suggestions[0].value.toLowerCase()===query.toLowerCase())},getQuery:function(value){var delimiter=this.options.delimiter,parts;if(!delimiter){return value}
parts=value.split(delimiter);return $.trim(parts[parts.length-1])},getSuggestionsLocal:function(query){var that=this,options=that.options,queryLowerCase=query.toLowerCase(),filter=options.lookupFilter,limit=parseInt(options.lookupLimit,10),data;data={suggestions:$.grep(options.lookup,function(suggestion){return filter(suggestion,query,queryLowerCase)})};if(limit&&data.suggestions.length>limit){data.suggestions=data.suggestions.slice(0,limit)}
return data},getSuggestions:function(q){var response,that=this,options=that.options,serviceUrl=options.serviceUrl,params,cacheKey,ajaxSettings;options.params[options.paramName]=q;params=options.ignoreParams?null:options.params;if(options.onSearchStart.call(that.element,options.params)===!1){return}
if($.isFunction(options.lookup)){options.lookup(q,function(data){that.suggestions=data.suggestions;that.suggest();options.onSearchComplete.call(that.element,q,data.suggestions)});return}
if(that.isLocal){response=that.getSuggestionsLocal(q)}else{if($.isFunction(serviceUrl)){serviceUrl=serviceUrl.call(that.element,q)}
cacheKey=serviceUrl+'?'+$.param(params||{});response=that.cachedResponse[cacheKey]}
if(response&&$.isArray(response.suggestions)){that.suggestions=response.suggestions;that.suggest();options.onSearchComplete.call(that.element,q,response.suggestions)}else if(!that.isBadQuery(q)){that.abortAjax();ajaxSettings={url:serviceUrl,data:params,type:options.type,dataType:options.dataType};$.extend(ajaxSettings,options.ajaxSettings);that.currentRequest=$.ajax(ajaxSettings).done(function(data){var result;that.currentRequest=null;result=options.transformResult(data,q);that.processResponse(result,q,cacheKey);options.onSearchComplete.call(that.element,q,result.suggestions)}).fail(function(jqXHR,textStatus,errorThrown){options.onSearchError.call(that.element,q,jqXHR,textStatus,errorThrown)})}else{options.onSearchComplete.call(that.element,q,[])}},isBadQuery:function(q){if(!this.options.preventBadQueries){return!1}
var badQueries=this.badQueries,i=badQueries.length;while(i--){if(q.indexOf(badQueries[i])===0){return!0}}
return!1},hide:function(){var that=this,container=$(that.suggestionsContainer);if($.isFunction(that.options.onHide)&&that.visible){that.options.onHide.call(that.element,container)}
that.visible=!1;that.selectedIndex=-1;clearInterval(that.onChangeInterval);$(that.suggestionsContainer).hide();that.signalHint(null)},suggest:function(){if(!this.suggestions.length){if(this.options.showNoSuggestionNotice){this.noSuggestions()}else{this.hide()}
return}
var that=this,options=that.options,groupBy=options.groupBy,formatResult=options.formatResult,value=that.getQuery(that.currentValue),className=that.classes.suggestion,classSelected=that.classes.selected,container=$(that.suggestionsContainer),noSuggestionsContainer=$(that.noSuggestionsContainer),beforeRender=options.beforeRender,html='',category,formatGroup=function(suggestion,index){var currentCategory=suggestion.data[groupBy];if(category===currentCategory){return''}
category=currentCategory;return'<div class="autocomplete-group"><strong>'+category+'</strong></div>'};if(options.triggerSelectOnValidInput&&that.isExactMatch(value)){that.select(0);return}
$.each(that.suggestions,function(i,suggestion){if(groupBy){html+=formatGroup(suggestion,value,i)}
html+='<div class="'+className+'" data-index="'+i+'">'+formatResult(suggestion,value,i)+'</div>'});this.adjustContainerWidth();noSuggestionsContainer.detach();container.html(html);if($.isFunction(beforeRender)){beforeRender.call(that.element,container,that.suggestions)}
that.fixPosition();container.show();if(options.autoSelectFirst){that.selectedIndex=0;container.scrollTop(0);container.children('.'+className).first().addClass(classSelected)}
that.visible=!0;that.findBestHint()},noSuggestions:function(){var that=this,container=$(that.suggestionsContainer),noSuggestionsContainer=$(that.noSuggestionsContainer);this.adjustContainerWidth();noSuggestionsContainer.detach();container.empty();container.append(noSuggestionsContainer);that.fixPosition();container.show();that.visible=!0},adjustContainerWidth:function(){return!1},findBestHint:function(){var that=this,value=that.el.val().toLowerCase(),bestMatch=null;if(!value){return}
$.each(that.suggestions,function(i,suggestion){var foundMatch=suggestion.value.toLowerCase().indexOf(value)===0;if(foundMatch){bestMatch=suggestion}
return!foundMatch});that.signalHint(bestMatch)},signalHint:function(suggestion){var hintValue='',that=this;if(suggestion){hintValue=that.currentValue+suggestion.value.substr(that.currentValue.length)}
if(that.hintValue!==hintValue){that.hintValue=hintValue;that.hint=suggestion;(this.options.onHint||$.noop)(hintValue)}},verifySuggestionsFormat:function(suggestions){if(suggestions.length&&typeof suggestions[0]==='string'){return $.map(suggestions,function(value){return{value:value,data:null}})}
return suggestions},validateOrientation:function(orientation,fallback){orientation=$.trim(orientation||'').toLowerCase();if($.inArray(orientation,['auto','bottom','top'])===-1){orientation=fallback}
return orientation},processResponse:function(result,originalQuery,cacheKey){var that=this,options=that.options;result.suggestions=that.verifySuggestionsFormat(result.suggestions);if(!options.noCache){that.cachedResponse[cacheKey]=result;if(options.preventBadQueries&&!result.suggestions.length){that.badQueries.push(originalQuery)}}
if(originalQuery!==that.getQuery(that.currentValue)){return}
that.suggestions=result.suggestions;that.suggest()},activate:function(index){var that=this,activeItem,selected=that.classes.selected,container=$(that.suggestionsContainer),children=container.find('.'+that.classes.suggestion);container.find('.'+selected).removeClass(selected);that.selectedIndex=index;if(that.selectedIndex!==-1&&children.length>that.selectedIndex){activeItem=children.get(that.selectedIndex);$(activeItem).addClass(selected);return activeItem}
return null},selectHint:function(){var that=this,i=$.inArray(that.hint,that.suggestions);that.select(i)},select:function(i){var that=this;that.hide();that.onSelect(i)},moveUp:function(){var that=this;if(that.selectedIndex===-1){return}
if(that.selectedIndex===0){$(that.suggestionsContainer).children().first().removeClass(that.classes.selected);that.selectedIndex=-1;that.el.val(that.currentValue);that.findBestHint();return}
that.adjustScroll(that.selectedIndex-1)},moveDown:function(){var that=this;if(that.selectedIndex===(that.suggestions.length-1)){return}
that.adjustScroll(that.selectedIndex+1)},adjustScroll:function(index){var that=this,activeItem=that.activate(index);if(!activeItem){return}
var offsetTop,upperBound,lowerBound,heightDelta=$(activeItem).outerHeight();offsetTop=activeItem.offsetTop;upperBound=$(that.suggestionsContainer).scrollTop();lowerBound=upperBound+that.options.maxHeight-heightDelta;if(offsetTop<upperBound){$(that.suggestionsContainer).scrollTop(offsetTop)}else if(offsetTop>lowerBound){$(that.suggestionsContainer).scrollTop(offsetTop-that.options.maxHeight+heightDelta)}
if(!that.options.preserveInput){that.el.val(that.getValue(that.suggestions[index].value))}
that.signalHint(null)},onSelect:function(index){var that=this,onSelectCallback=that.options.onSelect,suggestion=that.suggestions[index];that.currentValue=that.getValue(suggestion.value);if(that.currentValue!==that.el.val()&&!that.options.preserveInput){that.el.val(that.currentValue)}
that.signalHint(null);that.suggestions=[];that.selection=suggestion;if($.isFunction(onSelectCallback)){onSelectCallback.call(that.element,suggestion)}},getValue:function(value){var that=this,delimiter=that.options.delimiter,currentValue,parts;if(!delimiter){return value}
currentValue=that.currentValue;parts=currentValue.split(delimiter);if(parts.length===1){return value}
return currentValue.substr(0,currentValue.length-parts[parts.length-1].length)+value},dispose:function(){var that=this;that.el.off('.autocomplete').removeData('autocomplete');that.disableKillerFn();$(window).off('resize.autocomplete',that.fixPositionCapture);$(that.suggestionsContainer).remove()}};$.fn.autocomplete=$.fn.devbridgeAutocomplete=function(options,args){var dataKey='autocomplete';if(!arguments.length){return this.first().data(dataKey)}
return this.each(function(){var inputElement=$(this),instance=inputElement.data(dataKey);if(typeof options==='string'){if(instance&&typeof instance[options]==='function'){instance[options](args)}}else{if(instance&&instance.dispose){instance.dispose()}
instance=new Autocomplete(this,options);inputElement.data(dataKey,instance)}})}}));/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    ST-themes <hellolee@gmail.com>
*  @copyright 2007-2017 ST-themes
*  @license   Use, by you or one client for one Prestashop instance.
*/
if(typeof(quick_search_as_size)==='undefined')
var quick_search_as_size=6;if(typeof(quick_search_as_min)==='undefined')
var quick_search_as_min=3;if(typeof(quick_search_as)==='undefined')
var quick_search_as=!0;$(document).ready(function(){quick_search_as_init();$(document).on('click','.search_more_products',function(e){$(this).closest('.search_widget').find('form').submit()})});var quick_search_as_init=function(){if(quick_search_as)
$('.search_widget').each(function(){var search_url=$(this).data('search-controller-url');var search_results=$(this).find('.search_results');var search_more_products=$(this).find('.search_more_products');var search_btn=$(this).find('.search_widget_btn');$(this).find('.search_widget_text').devbridgeAutocomplete({noCache:!0,paramName:'s',params:{resultsPerPage:quick_search_as_size,is_ajax_search:1},dataType:'json',minChars:quick_search_as_min,appendTo:search_results,triggerSelectOnValidInput:!1,showNoSuggestionNotice:!0,noSuggestionNotice:$('.search_no_products').html(),serviceUrl:search_url,onSearchStart:function(){search_btn.addClass('active')},onSearchComplete:function(){search_btn.removeClass('active')},transformResult:function(response){var suggestions=$.map(response.products,function(dataItem){return{value:dataItem.name,data:dataItem}});return{suggestions:suggestions}},beforeRender:function(container,suggestions){if(suggestions.length==quick_search_as_size)
$(container).append(search_more_products.clone());},formatResult:function(suggestion,currentValue){var result='<a href="'+suggestion.data.link+'" title="'+suggestion.data.name+'" rel="nofollow" class="search_product_row flex_container">';if(typeof(suggestion.data.cover)!='undefined'&&suggestion.data.cover&&typeof(suggestion.data.cover.bySize)!='undefined'&&typeof(suggestion.data.cover.bySize.small_default)!='undefined'&&suggestion.data.cover.bySize.small_default&&typeof(suggestion.data.cover.bySize.small_default.url)!='undefined')
result+='<picture>'+(typeof(stwebp)!='undefined'&&typeof(stwebp.small_default)!='undefined'&&stwebp.small_default?'<!--[if IE 9]><video style="display: none;"><![endif]--><source srcset="'+suggestion.data.cover.bySize.small_default.url.replace(/\.jpg$/,'.webp')+'" type="image/webp"><!--[if IE 9]></video><![endif]-->':'')+'<img class="search_product_img search_result_item" alt="'+suggestion.data.name+'" src="'+suggestion.data.cover.bySize.small_default.url+'" width="'+suggestion.data.cover.bySize.small_default.width+'" height="'+suggestion.data.cover.bySize.small_default.height+'"/></picture>';result+='<div class="search_product_name flex_child search_result_item">'+suggestion.data.name+'</div>';result+='<div class="search_product_price search_result_item price">'+(suggestion.data.has_discount?suggestion.data.price:suggestion.data.regular_price)+'</div>';result+='</a>';return result}})})};/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    ST-themes <hellolee@gmail.com>
*  @copyright 2007-2017 ST-themes
*  @license   Use, by you or one client for one Prestashop instance.
*/
var st_owl_progressBar=[],st_owl_bar=[],st_owl_elem=[],st_owl_isPause=[],st_owl_tick=[],st_owl_percentTime=[];function st_owl_progressBar_init(elem){var id_st=elem.attr('id').replace(/\D*/g,'');id_st=parseInt(id_st);st_owl_elem[id_st]=elem;st_owl_buildProgressBar(id_st);st_owl_start(id_st)};function st_owl_buildProgressBar(id_st){st_owl_progressBar[id_st]=$("<div>",{class:"owl_progressBar"});st_owl_bar[id_st]=$("<div>",{class:"owl_bar"});if(stowlcarousel_array[id_st].progress_bar==1)
st_owl_progressBar[id_st].append(st_owl_bar[id_st]).prependTo(st_owl_elem[id_st]);else st_owl_progressBar[id_st].append(st_owl_bar[id_st]).appendTo(st_owl_elem[id_st])};function st_owl_start(id_st){st_owl_percentTime[id_st]=0;st_owl_isPause[id_st]=!1;st_owl_tick[id_st]=setInterval(function(){if(st_owl_isPause[id_st]===!1){st_owl_percentTime[id_st]+=1000/stowlcarousel_array[id_st].bar_time;st_owl_bar[id_st].css({width:st_owl_percentTime[id_st]+"%"});if(st_owl_percentTime[id_st]>=100){st_owl_elem[id_st].trigger('owl.next')}}},10)};function st_owl_pauseOnDragging(elem){var id_st=elem.attr('id').replace(/\D*/g,'');st_owl_isPause[id_st]=!0};function st_owl_moved(elem){var id_st=elem.attr('id').replace(/\D*/g,'');clearTimeout(st_owl_tick[id_st]);st_owl_start(id_st)};jQuery(function($){if(typeof(stowlcarousel_array)!='undefined'){$.each(stowlcarousel_array,function(key,value){if(value){if(typeof(value.progress_bar)!=='undefined'&&value.progress_bar){value.afterInit=st_owl_progressBar_init;value.afterMove=st_owl_moved;value.startDragging=st_owl_pauseOnDragging}
$("#st_owl_carousel-"+key).owlCarousel(value)}})}});jQuery(function($){$('form[name=st_blog_comment_form]').submit(function(e){e.preventDefault();var is_success=!1;var sub_btn=$('#st_blog_comment_submit');if(sub_btn.hasClass('disabled'))
return!1;else sub_btn.addClass('disabled');$.ajax({url:$('form[name=st_blog_comment_form]').attr('action'),type:'POST',headers:{"cache-control":"no-cache"},dataType:'json',data:$('form[name=st_blog_comment_form]').serialize(),cache:!1,success:function(json){if(json.r){is_success=!0;$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'},close:function(){if(is_success)
window.location.reload(!0);}},items:{src:'<div class="inline_popup_content small_popup mfp-with-anim text-center">'+json.thank+(stblogcomments_moderate?'<br/>'+json.moderation:'')+'</div>',type:'inline'}})}else{$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'}},items:{src:'<div class="inline_popup_content small_popup mfp-with-anim text-center">'+json.m+'</div>',type:'inline'}})}}});return!1});$('.comment_reply_link').click(function(){var id_st_blog_comment=$(this).attr('data-id-st-blog-comment');if(id_st_blog_comment)
stblogcomments.move_to(id_st_blog_comment);});$('#cancel_comment_reply_link').click(function(){stblogcomments.move_back()})});var stblogcomments={'move_to':function(id_st_blog_comment){$('#comment-'+id_st_blog_comment+' > .comment_node').after($('#st_blog_comment_reply_block').get(0));$('#blog_comment_parent_id').val(id_st_blog_comment);$('#cancel_comment_reply_link').show()},'move_back':function(){$('#comments').after($('#st_blog_comment_reply_block').get(0));$('#cancel_comment_reply_link').hide();$('#blog_comment_parent_id').val(0)}};/*! ========================================================================== 
 * pongstagr.am v3.0.4 jQuery Plugin | http://pongstr.github.io/pongstagr.am/ 
 * =========================================================================== 
 * Copyright (c) 2014 Pongstr Ordillo. Licensed under MIT License. 
 * =========================================================================== */
+function($){var Pongstgrm=function(element,options){this.element=element;this.options=options;return this}
Pongstgrm.defaults={accessId:null,accessToken:null,ins_user_name:null,ins_user_id:null,ins_hash_tag:null,count:8,likes:!0,comments:!0,username:!1,timestamp:!1,time_format:0,caption:!1,effects:0,show:"recent",click_action:0,show_media_type:1,id_st_ins:'',grid:0,image_size:0,ins_items_fw:8,ins_items_xxl:7,ins_items_xl:6,ins_items_lg:5,ins_items_md:4,ins_items_sm:3,ins_items_xs:2,isfooter:0,show_counts:1,ins_follow:1,ins_show_bio:1,ins_show_website:1,ins_self_liked:0,ins_show_avatar:1,preload:'spinner',button:'btn btn-success pull-right',buttontext:'Load more',column:'col-12 col-sm-3 col-md-3 col-lg-3',likeicon:'<i class="fto-heart-empty"></i> ',muteicon:'glyphicon glyphicon-volume-off',videoicon:'<i class="fto-play-circled2"></i> ',imageicon:'<i class="fto-picture-2"></i> ',carouselicon:'<i class="fto-popup"></i> ',commenticon:'<i class="fto-comment-empty"></i> ',externalicon:'icon-external-link ',viewlargericon:'<i class="fto-resize-full"></i> ',picture_size:64,profile_bg_img:null,profile_bg_color:'#d9534f'};Pongstgrm.prototype.template={profile:function(options){var _profile='<div class="ins_profile_img">';_profile+='     <div class="ins_profile_img_left"><a href="https://instagram.com/'+options.username+'/" rel="nofollow" title="'+(options.full_name?options.username:options.username)+'" class="profile_picture"><img src="'+options.profile_picture+'" width="'+options.dflt.picture_size+'"  height="'+options.dflt.picture_size+'" alt="'+(options.full_name?options.username:options.username)+'"></a></div>';_profile+='     <div class="ins_profile_img_right clearfix">';options.dflt.ins_follow?_profile+='     <a href="https://instagram.com/'+options.username+'/" rel="nofollow" class="ins_follow_btn ins_btn fr" title="'+(options.full_name?options.username:options.username)+'">'+ins_follow+'</a>':'';_profile+='     <a href="https://instagram.com/'+options.username+'/" rel="nofollow" class="ins_profile_name" title="'+(options.full_name?options.username:options.username)+'">'+(options.full_name?options.full_name:options.username)+'</a>';options.dflt.ins_show_bio&&options.bio?_profile+='     <div class="ins_bio">'+Pongstgrm.prototype.parseIns(options.bio)+'</div>':'';options.dflt.ins_show_website&&options.website?_profile+='     <div class="ins_website"><a href="'+options.website+'" title="'+options.website+'" rel="nofollow">'+options.website+'</a></div>':'';_profile+='     </div>';_profile+=' </div>';if(options.dflt.show_counts){_profile+=' <div class="ins_profile_counts">';_profile+='     <div class="ins_pro_c"><span class="ins_pro_c_v">'+options.media+'</span><span class="ins_pro_c_k">'+ins_posts+'</span></div>';_profile+='     <div class="ins_pro_c"><span class="ins_pro_c_v">'+options.followed_by+'</span><span class="ins_pro_c_k">'+ins_followers+'</span></div>';_profile+='     <div class="ins_pro_c"><span class="ins_pro_c_v">'+options.follows+'</span><span class="ins_pro_c_k">'+ins_following+'</span></span>';_profile+=' </div>'}
$(options.target).append(_profile);return},thumb:function(options,iteration){var _thumbnail=string_likes=string_comments=string_username=string_timestamp=string_caption=image_url='';_thumbnail+=options.dflt.grid?'<li class="ins_image_wrap col-xxl-'+(''+(12/options.dflt.ins_items_xxl)).replace('.','-')+' col-xl-'+(''+(12/options.dflt.ins_items_xl)).replace('.','-')+' col-lg-'+(''+(12/options.dflt.ins_items_lg)).replace('.','-')+' col-md-'+(''+(12/options.dflt.ins_items_md)).replace('.','-')+' col-sm-'+(''+(12/options.dflt.ins_items_sm)).replace('.','-')+' col-'+(''+(12/options.dflt.ins_items_xs)).replace('.','-')+(iteration%options.dflt.ins_items_lg==1?' first-item-of-line ':'')+(iteration%options.dflt.ins_items_md==1?' first-item-of-tablet-line ':'')+(iteration%options.dflt.ins_items_sm==1?' first-item-of-mobile-line ':'')+(iteration%options.dflt.ins_items_xs==1?' first-item-of-portrait-line ':'')+(iteration%options.dflt.ins_items_xxl==1?' first-item-of-large-line ':'')+(iteration%options.dflt.ins_items_xl==1?' first-item-of-desktop-line ':'')+'"><div class="ins_image_wrap_inner">':'<div class="ins_image_wrap swiper-slide"><div class="ins_image_wrap_inner">';_thumbnail+='<div class="ins_image_box '+(options.dflt.grid?' ins_grid_outer ':' ins_slider_outer ')+'">';_thumbnail+='<a href="'+(options.dflt.click_action?options.data.image:options.data.link)+'" '+(options.dflt.click_action?' data-fancybox-group="ins_fancybox_view_'+options.dflt.id_st_ins+'" ':'')+' class="'+(options.dflt.click_action?' ins_fancybox ':'')+(options.dflt.effects==1?' scaling ':'')+(options.dflt.effects==2?' scaling_down ':'')+' ins_image_link " title="'+(typeof(stinstagram_view_in_ins)!=='undefined'&&!options.dflt.click_action?stinstagram_view_in_ins:'')+(typeof(stinstagram_view_larger)!=='undefined'&&options.dflt.click_action?stinstagram_view_larger:'')+'" ';if(options.dflt.click_action)
_thumbnail+=' data-ins_link="'+options.data.link+'" data-ins_caption="'+options.data.caption+'" data-ins_username="'+options.dflt.ins_user_name+'" data-ins_full_name="'+(options.data.full_name?options.data.full_name:options.dflt.ins_user_name)+'" data-ins_profile_picture="'+(options.data.profile_picture?options.data.profile_picture:'')+'" data-ins_created_time="'+(options.dflt.time_format?Pongstgrm.prototype.template.parse(options.data.timestamp).toDateString():$.timeago(options.data.timestamp))+'" data-ins_video="'+options.data.video+'" data-ins_video_width="720" data-ins_video_height="720" data-id_st_ins="'+options.dflt.id_st_ins+'" ';_thumbnail+=' rel="nofollow">';options.dflt.click_action?_thumbnail+='<span class="ins_view_larger">'+options.dflt.viewlargericon+'</span>':'';options.data.type==='VIDEO'&&options.dflt.show_media_type?_thumbnail+='     <span class="ins_imagetype ins_videoicon">'+options.dflt.videoicon+'</span>':'';options.data.type==='IMAGE'&&options.dflt.show_media_type==2?_thumbnail+='     <span class="ins_imagetype">'+options.dflt.imageicon+'</span>':'';options.data.type==='CAROUSEL_ALBUM'&&options.dflt.show_media_type==2?_thumbnail+='     <span class="ins_imagetype">'+options.dflt.carouselicon+'</span>':'';options.dflt.likes!=!1?string_likes+='       <span class="ins_image_info_item ins_image_info_likes '+(options.dflt.likes==2?' show_default ':'')+' ">'+options.dflt.likeicon+'&nbsp;'+options.data.likes_count+'</span>':'';options.dflt.comments!=!1?string_comments+='       <span class="ins_image_info_item ins_image_info_comments '+(options.dflt.comments==2?' show_default ':'')+' ">'+options.dflt.commenticon+'&nbsp;'+options.data.comments_count+'</span>':'';options.dflt.username!=!1?string_username+='     <div class="ins_image_info_item ins_image_info_username'+(options.dflt.username==2?' show_default ':'')+'">'+(options.data.full_name?options.data.full_name:options.data.username)+'</div>':'';options.dflt.timestamp!=!1?string_timestamp+='     <div class="ins_image_info_item ins_image_info_timestamp'+(options.dflt.timestamp==2?' show_default ':'')+'">'+(options.dflt.time_format?Pongstgrm.prototype.template.parse(options.data.timestamp).toDateString():$.timeago(options.data.timestamp))+'</div>':'';if(options.dflt.caption!=!1&&options.data.caption){string_caption+='     <div class="ins_image_info_item ins_image_info_desc '+(options.dflt.caption==2||options.dflt.caption==5?' show_default ':'')+''+(options.dflt.caption==4||options.dflt.caption==5?'hidden-xs':'')+'">';var t_cp=options.data.caption;if(options.dflt.ins_lenght_of_caption&&t_cp&&t_cp.length>200){var t_cp_fh=t_cp.substr(0,200).match(/#(\w+)$/);var t_cp_sh=t_cp.substr(200).match(/^(?!#)(\w+?)\b/);t_cp=t_cp.substr(0,(t_cp_fh&&t_cp_sh?t_cp_fh.index:200))+'...'}
string_caption+=options.dflt.caption==3?Pongstgrm.prototype.parseIns(t_cp):t_cp;string_caption+='</div>'}
_thumbnail+='   <div class="ins_image_info st_image_layered_description flex_middle flex_center"><div class="st_image_layered_description_inner clearfix">';options.dflt.likes==1||options.dflt.likes==2||options.dflt.comments==1||options.dflt.comments==2?_thumbnail+='     <div class="ins_image_info_basic">':'';options.dflt.likes==1||options.dflt.likes==2?_thumbnail+=string_likes:'';options.dflt.comments==1||options.dflt.comments==2?_thumbnail+=string_comments:'';options.dflt.likes==1||options.dflt.likes==2||options.dflt.comments==1||options.dflt.comments==2?_thumbnail+='     </div>':'';options.dflt.username==1||options.dflt.username==2?_thumbnail+=string_username:'';options.dflt.timestamp==1||options.dflt.timestamp==2?_thumbnail+=string_timestamp:'';options.dflt.caption==1||options.dflt.caption==2||options.dflt.caption==4||options.dflt.caption==5?_thumbnail+=string_caption:'';_thumbnail+='   </div></div>'
image_url=options.data.image;_thumbnail+='   <div class="ins_image_layer '+(options.dflt.force_square&&!options.dflt.grid&&0?' swiper-lazy ':'')+(options.dflt.force_square?' ins_force_square ':'')+'" '+(options.dflt.force_square&&!options.dflt.grid&&0?' data-background="'+image_url+'" ':'')+(options.dflt.force_square?' style="background-image:url('+image_url+');" ':'')+'>';_thumbnail+='        <img id="'+options.dflt.show+'-'+options.data.id+'-thmb" class="ins_image '+(!options.dflt.force_square&&!options.dflt.grid&&0?' swiper-lazy ':'')+'"  '+(!options.dflt.force_square&&!options.dflt.grid&&0?'data-':'')+'src="'+(options.dflt.force_square?prestashop.urls.base_url+'modules/stinstagram/views/img/resolution_'+options.dflt.image_size+'.png':image_url)+'">';_thumbnail+='   </div>';_thumbnail+='</a></div>';(options.dflt.username==3&&string_username)||(options.dflt.caption==3&&string_caption)||(options.dflt.likes==3&&string_likes)||(options.dflt.comments==3&&string_comments)||(options.dflt.string_timestamp==3&&string_timestamp)?_thumbnail+='<div class="ins_image_info_block">':'';options.dflt.username==3?_thumbnail+=string_username:'';options.dflt.caption==3?_thumbnail+=string_caption:'';options.dflt.likes==3||options.dflt.comments==3||options.dflt.string_timestamp==3?_thumbnail+='     <div class="ins_image_info_basic">':'';options.dflt.timestamp==3?_thumbnail+=string_timestamp:'';options.dflt.likes==3?_thumbnail+=string_likes:'';options.dflt.comments==3?_thumbnail+=string_comments:'';options.dflt.likes==3||options.dflt.comments==3||options.dflt.string_timestamp==3?_thumbnail+='     </div>':'';(options.dflt.username==3&&string_username)||(options.dflt.caption==3&&string_caption)||(options.dflt.likes==3&&string_likes)||(options.dflt.comments==3&&string_comments)||(options.dflt.string_timestamp==3&&string_timestamp)?_thumbnail+='</div>':'';options.dflt.grid?_thumbnail+='</div></li>':'</div></div>';$(options.target).append(_thumbnail);return},simple:function(options){var _thumbnail='';_thumbnail+='<li><a href="'+(options.dflt.click_action?options.data.image:options.data.link)+'" '+(options.dflt.click_action?' data-fancybox-group="ins_fancybox_view_'+options.dflt.id_st_ins+'" ':'')+' class="'+(options.dflt.click_action?' ins_fancybox ':'')+(options.dflt.effects==1?' scaling ':'')+(options.dflt.effects==2?' scaling_down ':'')+' ins_image_link " title="'+(typeof(stinstagram_view_in_ins)!=='undefined'&&!options.dflt.click_action?stinstagram_view_in_ins:'')+(typeof(stinstagram_view_larger)!=='undefined'&&options.dflt.click_action?stinstagram_view_larger:'')+'" ';if(options.dflt.click_action)
_thumbnail+=' data-ins_link="'+options.data.link+'" data-ins_caption="'+options.data.caption+'" data-ins_username="'+options.dflt.ins_user_name+'" data-ins_full_name="'+(options.data.full_name?options.data.full_name:options.dflt.ins_user_name)+'" data-ins_profile_picture="'+options.data.profile_picture+'" data-ins_created_time="'+(options.dflt.time_format?Pongstgrm.prototype.template.parse(options.data.timestamp).toDateString():$.timeago(options.data.timestamp))+'" data-ins_video="'+options.data.video+'" data-ins_video_width="720" data-ins_video_height="720" data-id_st_ins="'+options.dflt.id_st_ins+'" ';_thumbnail+=' rel="nofollow">';_thumbnail+='<img src="'+options.data.image+'" class="ins_image" alt="'+options.data.caption.replace(/"/g,'&quot;')+'">';_thumbnail+='</a></li>';$(options.target).append(_thumbnail);return},bsmodal:function(options){return}};Pongstgrm.prototype.preloadMedia=function(option){var $image=$(option.imgid),start=0;$image.one('load',function(){++start===$image.length&&$(option.loadr).fadeOut()
$(this).addClass('fade')}).each(function(){this.complete&&$(this).load()})
return};Pongstgrm.prototype.videoBtn=function(option,callback){$(option.trigger).on('click',function(e){e.preventDefault();callback();$(option.child,this).toggleClass(option.classes)});return};Pongstgrm.prototype.parseIns=function(string){var patterns={link:/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,user:/(^|\s)@(\w+)/g,hash:/(^|\s)#(\w+)/g};return string.replace(patterns.link,'<a href="$1" rel="nofollow" title="$1">$1</a>').replace(patterns.user,'$1<a href="https://www.instagram.com/$2" rel="nofollow" title="$2">@$2</a>').replace(patterns.hash,'$1<a href="https://www.instagram.com/explore/tags/$2" rel="nofollow" title="$2">#$2</a>')};Pongstgrm.prototype.stream=function(){var element=this.element,options=this.options,apiurl='https://api.instagram.com/v1/users/',rcount='?count='+options.count+'&access_token='+options.accessToken;function paginate(option){return};function media(data,option){var iteration=parseInt($(element).data('iteration'));$(element).data('iteration',iteration+data.length);$(element).append(data.html);$('.ins_fancybox').fancybox({'hideOnContentClick':!0,'openEffect':'fade','nextEffect':'fade','prevEffect':'fade','closeEffect':'fade',helpers:{title:{type:'inside'},overlay:{locked:!1}},tpl:{next:'<a title="'+(typeof(ins_next)!=='undefined'?ins_next:'Next')+'" class="ins_fancy_next ins_fancy_nav" href="javascript:;"><i class="fto-right-open-3"></i></a>',prev:'<a title="'+(typeof(ins_previous)!=='undefined'?ins_previous:'Previous')+'" class="ins_fancy_prev ins_fancy_nav" href="javascript:;"><i class="fto-left-open-3"></i></a>'},beforeLoad:function(){this.type="image";this.autoSize=!0;this.autoResize=!0;var element=$(this.element),ins_image=$(this.element).attr('href'),ins_link=element.data('ins_link'),ins_caption=element.data('ins_caption'),ins_username=element.data('ins_username'),ins_full_name=element.data('ins_full_name'),ins_profile_picture=element.data('ins_profile_picture'),ins_created_time=element.data('ins_created_time'),ins_video=element.data('ins_video');ins_video_width=720;ins_video_height=720;id_st_ins=element.data('id_st_ins');var fancy_title='<div class="ins_fancy_box ins_fancy_box_'+id_st_ins+'"><div class="ins_fancy_profile_img '+(options.ins_show_avatar?' ins_show_avatar ':'')+(options.ins_show_avatar==2?' ins_round_avatar ':'')+'">';if(ins_profile_picture)
fancy_title+='<div class="ins_fancy_profile_img_left"><a href="https://instagram.com/'+ins_username+'/" rel="nofollow" title="'+ins_full_name+'" class="profile_picture"><img src="'+ins_profile_picture+'" width="'+options.picture_size+'"  height="'+options.picture_size+'" alt="'+ins_full_name+'"></a></div>';fancy_title+='<div class="ins_fancy_profile_img_right"><a href="https://instagram.com/'+ins_username+'/" rel="nofollow" tiele="'+ins_full_name+'">'+ins_full_name+'</a></div>';fancy_title+='<div class="ins_fancy_info"><span class="ins_fancy_info_item">'+(this.index+1)+' / '+this.group.length+'</span><span class="ins_fancy_info_item">'+ins_created_time+'</span><a href="'+ins_link+'" title="'+(typeof(stinstagram_view_in_ins)!=='undefined'?stinstagram_view_in_ins:'')+'" rel="nofollow" class="ins_fancy_info_item">'+(typeof(stinstagram_view_in_ins)!=='undefined'?stinstagram_view_in_ins:'')+'</a></div>';fancy_title+='</div>';ins_caption!=''?fancy_title+='<div class="ins_fancy_caption">'+Pongstgrm.prototype.parseIns(ins_caption)+'</div>':'';fancy_title+='</div>';this.title=fancy_title;if(ins_video&&!!document.createElement('video').canPlayType){this.type="html";this.autoSize=!1;this.autoResize=!1;this.content="<video id='ins_video_player' src='"+ins_video+"'  poster='"+ins_image+"' width='"+ins_video_width+"' height='"+ins_video_height+"'  controls='controls' preload='none' ></video>";var window_width=$(window).width();this.width=parseInt(ins_video_width>window_width?window_width:ins_video_width);this.height=parseInt(ins_video_width>window_width?parseInt(ins_video_width/ins_video_height*window_width):ins_video_height)}},afterShow:function(){var video=$("#ins_video_player");if(video.length){video[0].load();video[0].play()}},beforeClose:function(){var video=$("#ins_video_player");if(video.length){video[0].pause()}}})};function profile(data,option){Pongstgrm.prototype.template.profile({target:element,bio:data.bio,media:data.counts.media,website:data.website,follows:data.counts.follows,username:data.username,full_name:data.full_name,followed_by:data.counts.followed_by,profile_picture:data.profile_picture,dflt:option});return};function load_more(data){var _s=data.np;if(options.ins_load_more){var ins_parent=$(element).parent();if(_s==-1){ins_parent.find('.ins_load_more').removeClass('ins_has_more')}else{ins_parent.find('.ins_load_more').addClass('ins_has_more').on('click',function(e){e.preventDefault();$(this).addClass('ins_loading');ajaxdata({np:_s,opt:options});$(this).unbind(e)})}}};function ajaxdata(option){var _np=1;if(typeof(option.np)!="undefined"){_np=option.np}
if(_np==1){var ins_parent=$(element).parent();ins_parent.removeClass('ins_connecting');ins_parent.find('.ins_load_more').removeClass('ins_loading').addClass('ins_has_more');load_more({'np':2});media({'html':''},option.opt);return}
var _param={limit:options.count,page:_np,id_ins:options.id_st_ins,pro_per_xxl:options.ins_items_xxl,pro_per_xl:options.ins_items_xl,pro_per_lg:options.ins_items_lg,pro_per_md:options.ins_items_md,pro_per_sm:options.ins_items_sm,pro_per_xs:options.ins_items_xs,footer_op:options.footer_op,grid:options.grid,click_action:options.click_action,time_format:options.time_format,hover_effect:options.effects,show_username:options.username,show_timestamp:options.timestamp,show_caption:options.caption,force_square:options.force_square,lenght_of_caption:options.ins_lenght_of_caption,};$.get(st_ins_getimgurl,_param,function(res){if(res.status==1){var _i=0;var _g=function(){var ins_parent=$(element).parent();ins_parent.removeClass('ins_connecting');ins_parent.find('.ins_load_more').removeClass('ins_loading');if(option.opt.show!=='profile'){if(res.info.length==0)
ins_parent.find('.ins_no_data').removeClass('hidden-xs-up');else{load_more(res)
media(res,option.opt)}}else profile(res,option.opt)};_g()}else{$(element).parent().removeClass('ins_connecting').addClass('ins_ajax_error')}
return!0},"json");return};switch(options.show){case 'liked':ajaxdata({url:apiurl+'self/media/liked'+rcount,opt:options});break
case 'feed':ajaxdata({url:apiurl+'self/feed'+rcount,opt:options});break
case 'profile':ajaxdata({url:'https://graph.instagram.com/'+options.ins_user_id+'?fields='+options.count+'&access_token='+options.accessToken,opt:options});break
case 'recent':ajaxdata({url:'https://graph.instagram.com/'+options.ins_user_id+'/media?limit='+options.count+'&access_token='+options.accessToken,opt:options});break
default:ajaxdata({url:'https://api.instagram.com/v1/tags/'+options.show+'/media/recent'+rcount,opt:options})}
return};Pongstgrm.prototype.create=function(){var element=this.element,options=this.options;if(typeof(this.options.ins_hash_tag)!=='undefined'&&this.options.ins_hash_tag)
this.options.show=this.options.ins_hash_tag;$(element).attr('data-type',options.show).addClass('pongstagrm');this.stream();return};Pongstgrm.prototype.start=function(){var option=this.options;if(option.list_num>0){this.create();return}else{$(this.element).parent().removeClass('ins_connecting').addClass('ins_ajax_error')}};$.fn.pongstgrm=function(option){var options=$.extend({},Pongstgrm.defaults,option);return this.each(function(){var media=new Pongstgrm($(this)[0],options);media.start()})};$.fn.pongstgrm.defaults=Pongstgrm.options}(window.jQuery);jQuery(function($){if(typeof(instagram_block_array)!=='undefined'){if(instagram_block_array.profile.length){$.each(instagram_block_array.profile,function(key,value){$("#instagram_block_"+value.id_st_ins+" .instagram_profile").pongstgrm(value)})}
if(instagram_block_array.feed.length){$.each(instagram_block_array.feed,function(key,value){$("#instagram_block_"+value.id_st_ins+" .instagram_con "+(value.grid?"":" .swiper-wrapper ")).pongstgrm(value)})}}});/*
* 2007-2015 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2015 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
function stWishlistUpdateProduct(id_st_wishlist,id_product,id_product_attribute,quantity){if(typeof stmywishlist_url=='undefined')
return(!1);$.ajax({type:'GET',url:stmywishlist_url,headers:{"cache-control":"no-cache"},async:!0,cache:!1,dataType:"json",data:{id_product:id_product,id_product_attribute:id_product_attribute,quantity:quantity,id_st_wishlist:id_st_wishlist,ajax:1,action:'updateProduct'},success:function(resp){if(resp.success==1)
$('.wishlist_update_quantity.active').removeClass('active').find('.hidden').removeClass('hidden');else if(!resp.success){$('.wishlist_update_quantity.active').removeClass('active');stWishlistPopup(resp.message)}else if(resp.success==2)
stWishlistGoLogin();},error:function(XMLHttpRequest,textStatus,errorThrown){$('.wishlist_update_quantity.active').removeClass('active')}})}
function stWishlistAddProduct(id_st_wishlist,id_product,id_product_attribute,quantity){if(typeof stmywishlist_url=='undefined')
return(!1);$.ajax({type:'GET',url:stmywishlist_url,headers:{"cache-control":"no-cache"},async:!0,cache:!1,dataType:"json",data:{id_product:id_product,id_product_attribute:id_product_attribute,quantity:quantity,id_st_wishlist:id_st_wishlist,ajax:1,action:'addProduct'},success:function(resp){$count_dom=$('.add_to_wishlist.active').find('.wishlist_product_count');if($count_dom.length)
$count_dom.html(resp.product_total);if($('.wishlist_customer_count').length)
$('.wishlist_customer_count').html(resp.customer_total);$('.add_to_wishlist.active').removeClass('active');$('.stwish_'+id_product+'_'+id_product_attribute).addClass('st_added');$('a.stwish_'+id_product).addClass('st_added');$('#select_wishlist a[data-id-wishlist="'+id_st_wishlist+'"]').removeClass('active').addClass(typeof(resp.success)!=='undefined'&&resp.success==1?'st_done':'').find('span').html(resp.current_total);if(!resp.success)
stWishlistPopup(resp.message);else if(resp.success==2)
stWishlistGoLogin();},error:function(XMLHttpRequest,textStatus,errorThrown){$('#select_wishlist a[data-id-wishlist="'+id_st_wishlist+'"]').removeClass('active')}})}
function stWishlistProductRemove(id_st_wishlist,id_product,id_product_attribute){if(typeof stmywishlist_url=='undefined')
return(!1);$.ajax({type:'GET',url:stmywishlist_url,headers:{"cache-control":"no-cache"},async:!0,cache:!1,dataType:"json",data:{id_product:id_product,id_product_attribute:id_product_attribute,id_st_wishlist:id_st_wishlist,ajax:1,action:'deleteProduct'},success:function(resp){if($('.wishlist_customer_count').length)
$('.wishlist_customer_count').html(resp.customer_total);$('.wishlist_remove_product.active').removeClass('active');if(resp.success==1){$('.wishlist_product_item[data-id_wishlist='+id_st_wishlist+'][data-id_product='+id_product+']'+(id_product_attribute?'[data-id_product_attribute='+id_product_attribute+']':'')).empty()}else if(!resp.success){stWishlistPopup(resp.message)}else if(resp.success==2)
stWishlistGoLogin();},error:function(XMLHttpRequest,textStatus,errorThrown){}})}
function stWishlistSendEmail(id_st_wishlist){if(typeof stmywishlist_url=='undefined')
return!1;var email=$('#email_'+id_st_wishlist).val();if(!email){return!1}
$.ajax({type:'GET',url:stmywishlist_url,headers:{"cache-control":"no-cache"},async:!0,cache:!1,dataType:"json",data:{email:email,id_st_wishlist:id_st_wishlist,ajax:1,action:'sendEmail'},success:function(resp){if(resp.success==1){$('.wishlist_share_email.active').removeClass('active').addClass('st_done')}else{$('.wishlist_share_email').removeClass('active');stWishlistPopup(resp.message)}}})}
function stWishlistPopup(msg){$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'}},items:{src:'<div class="inline_popup_content small_popup mfp-with-anim text-center">'+msg+'</div>',type:'inline'}})}
function stWishlistGoLogin(){$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'}},items:{src:'#wishlist_go_login',type:'inline'}})}
function stWishUpdateInCache(){var selector='';if(typeof(stwish_pros)!='undefined'&&stwish_pros.length){selector+='.stwish_'+stwish_pros.join(',.stwish_')}
if(selector)
$(selector).addClass('st_added');}
$(document).ready(function(){$('body').on('click','.copy_wishlist_link',function(event){event.preventDefault();$(this).siblings('.form-control').select();document.execCommand("copy");return!1});$('body').on('click','.wishlist_update_quantity',function(event){event.preventDefault();var that=$(this).closest('.wishlist_product_item');var quantity=that.find('.pro_quantity').val();if(!$.isNumeric(quantity))
return!1;var dataset=that.data();if(dataset.id_product&&dataset.id_wishlist){$(this).addClass('active');stWishlistUpdateProduct(dataset.id_wishlist,dataset.id_product,dataset.id_product_attribute,quantity)}});$('body').on('click','.wishlist_remove_product',function(event){event.preventDefault();var dataset=$(this).closest('.wishlist_product_item').data();if(dataset.id_product&&dataset.id_wishlist){$(this).addClass('active');stWishlistProductRemove(dataset.id_wishlist,dataset.id_product,dataset.id_product_attribute)}});$('body').on('click','.wishlist_share_email',function(event){event.preventDefault();var that=$(this).addClass('active');var id_wishlist=that.data('id-wishlist');if(id_wishlist)
stWishlistSendEmail(id_wishlist);});$('body').on('click','.add_to_wishlist',function(event){if(typeof(prestashop)==='undefined'||!prestashop.customer.is_logged){stWishlistGoLogin();return!1}
$('.add_to_wishlist').removeClass('active');$(this).addClass('active');$('#select_wishlist a.saved').removeClass('saved');$('#select_wishlist a').removeClass('st_done');$('.st-container').addClass('open_bar_right');$('#side_wishlist').addClass('sidebar_opened')});$('body').on('click','#select_wishlist a',function(event){event.preventDefault();if($('#select_wishlist a.active').length)
return!1;var wishlist_btn=$('.add_to_wishlist.active');var id_product=wishlist_btn.data('id-product');var id_product_attribute=wishlist_btn.data('id-product-attribute');var id_wishlist=$(this).addClass('active').data('id-wishlist');stWishlistAddProduct(id_wishlist,id_product,id_product_attribute);return!1});$('#side_wishlist_submit').click(function(event){event.preventDefault();var name=$(this).closest('.form-group').find('.form-control').val();if(!name){return!1}
$(this).addClass('active');$.ajax({type:'GET',url:stmywishlist_url,headers:{"cache-control":"no-cache"},async:!0,cache:!1,dataType:"json",data:{name:name,ajax:1,action:'createWishlist'},success:function(resp){$('#side_wishlist_submit').removeClass('active');if(resp.success==2)
stWishlistGoLogin()
else if(resp.success==1){$('#select_wishlist').append(resp.data)}},error:function(XMLHttpRequest,textStatus,errorThrown){$('#side_wishlist_submit').removeClass('active')}});return!1});prestashop.on('updatedProduct',function(event){$('.wishlist_product').data('id-product-attribute',event.id_product_attribute)});stWishUpdateInCache()});$(document).ready(function(){st_pro_videos.init();if(!stprovideos.st_is_16){prestashop.on('updatedProduct',function(event){st_pro_videos.run({yi:0})})}});var st_pro_videos={options:{'autoplay':1,'muted':0,'controls_youtube':0,'controls':1,'loop':1},init:function(){if(typeof(stprovideos)=='undefined')
return!1;if(!stprovideos.st_is_16&&stprovideos.quick_view&&typeof(stprovidequickview)!='undefined'){stprovideos.videos=stprovidequickview?stprovidequickview.videos:undefined}
this.options=$.extend(this.options,{'autoplay':stprovideos.autoplay,'muted':stprovideos.muted,'controls_youtube':stprovideos.controls_youtube,'controls':stprovideos.controls,'loop':stprovideos.loop});if(typeof(sttheme)!='undefined'&&typeof(sttheme.product_thumbnails)!='undefined'&&sttheme.product_thumbnails==3)
stprovideos.thumb_slider=0;$(document).on('click','.st_pro_video_play',function(e){e.preventDefault();st_pro_videos.st_pro_manually_play($(this).data('video-id'));return!1});$(document).on('click','.st_pro_video_stop',function(e){e.preventDefault();st_pro_videos.st_pro_videos_remove(0);return!1});st_pro_videos.run({yi:1})},run:function(params){if(typeof(stprovideos.videos)=='undefined')
return!1;if(stprovideos.how_to_display==0){this.append_player();this.append_static_paly(0);this.handle_click_on_thumb(0)}else if(stprovideos.how_to_display==2){this.append_player();this.append_static_paly(1);this.append_paly_on_first_thumb();this.handle_click_on_thumb(1)}else if(stprovideos.how_to_display==7||stprovideos.how_to_display==8){if(params.yi==1)
this.append_desc_player();}else{this.init_classic_pro_video(params)}
this.init_st_pro_videos(params)},append_player:function(){var $pc_container=$(stprovideos.video_container);if($pc_container.length)
$pc_container.append('<button class="st_pro_video_stop st_pro_video_btn st_pro_videos_invisible" type="button" aria-disabled="false"><span aria-hidden="true" class="vjs-icon-placeholder"></span></button>'+this.bulid_video_html(stprovideos.videos[0],!1));},append_desc_player:function(){var $pc_container=$(stprovideos.desc_container);if($pc_container.length){var x='<div class="st_pro_video_miaoshu">'+this.bulid_video_html(stprovideos.videos[0],!1)+'</div>';if(stprovideos.how_to_display==8)
$pc_container.append(x);else $pc_container.prepend(x)}},bulid_video_html:function(video,lazy){return'<div id="st_pro_video_'+video.id_st_pro_video+'" data-video-id="'+video.id_st_pro_video+'" class="st_pro_videos_box '+(stprovideos.slider?'st_pro_videos_box_static':'st_pro_videos_invisible')+' st_pro_video_flex"><video class="st_pro_videos video-js vjs-big-play-centered" data-autoplay="'+video.autoplay+'" data-muted="'+video.muted+'" data-loop="'+video.loop+'"><source '+(lazy?'data-':'')+'src="'+video.url+'" type="video/'+(/youtu(\.be|be\.com)/.test(video.url)?'youtube':'mp4')+'"></video></div>'},append_static_paly:function(type){var $container=$(stprovideos.video_container);if($container.length)
$container.append('<button class="st_pro_video_play '+(type?'st_pro_video_play_on_first_gallery':'st_pro_video_play_static')+' st_pro_video_btn '+(stprovideos.how_to_display==2?' st_pro_videos_invisible ':'')+'" type="button" aria-disabled="false" data-video-id="'+stprovideos.videos[0].id_st_pro_video+'"><span aria-hidden="true" class="vjs-icon-placeholder"></span>'+(stprovideos.play_video_text?'<span class="st_play_video_text">'+stprovideos.play_video_text+'</span>':'')+'</button>');},append_paly_on_first_thumb:function(){var $container=$(stprovideos.thumbnail_selector).first();if(!$container.length)
return!1;if(typeof(stprovideos.videos)!=='undefined')
$container.addClass('st_pro_video_relative').append('<button class="st_pro_video_play_on_first_thumb st_pro_video_btn st_pro_video_play_icon" type="button" aria-disabled="false"><span aria-hidden="true" class="vjs-icon-placeholder"></span></button>');},handle_click_on_thumb:function(type){if(stprovideos.how_to_display!=0&&stprovideos.how_to_display!=2)
return!1;var classname=type?'.st_pro_video_play_on_first_gallery':'.st_pro_video_play_static';switch(stprovideos.slider){case 0:break;case 1:if(stprovideos.how_to_display==2&&$(stprovideos.gallery_container).length&&typeof($(stprovideos.gallery_container)[0].swiper)!='undefined'){$(classname).toggleClass('st_pro_videos_invisible',!$(stprovideos.gallery_container)[0].swiper.isBeginning);$(stprovideos.gallery_container)[0].swiper.on('onSlideChangeEnd',function(swiper){$(classname).toggleClass('st_pro_videos_invisible',!swiper.isBeginning)})}
if(stprovideos.how_to_display==0){$(classname).addClass('st_pro_videos_invisible')}
break;case 2:break;case 3:if(typeof($(stprovideos.gallery_container).slick)!='undefined'){$(classname).toggleClass('st_pro_videos_invisible',$(stprovideos.gallery_container).slick('slickCurrentSlide')!=0);$(stprovideos.gallery_container).on('afterChange',function(event,slick,currentSlide,nextSlide){if($(stprovideos.gallery_container).slick('slickCurrentSlide')==0)
$(classname).removeClass('st_pro_videos_invisible');else{$(classname).addClass('st_pro_videos_invisible');st_pro_videos.st_pro_videos_remove(2)}})}
break;case 4:if(stprovideos.how_to_display==2&&$(stprovideos.gallery_container).length&&typeof($(stprovideos.gallery_container).data("owlCarousel"))!='undefined'){$(classname).toggleClass('st_pro_videos_invisible',$(stprovideos.gallery_container).data("owlCarousel").owl.currentItem!=0);$(document).on('main_gallery_after_action',function(){$(classname).toggleClass('st_pro_videos_invisible',$(stprovideos.gallery_container).data("owlCarousel").owl.currentItem!=0)})}
if(stprovideos.how_to_display==0){$(classname).addClass('st_pro_videos_invisible')}
break}
switch(stprovideos.thumb_slider){case 0:$(stprovideos.thumbnail_selector).on('click',function(){if(stprovideos.how_to_display==2){if($(this).find('.st_pro_video_play_on_first_thumb').length){if($(classname).siblings('.st_pro_videos_box').hasClass('st_pro_videos_invisible'))
$(classname).removeClass('st_pro_videos_invisible');}else{$(classname).addClass('st_pro_videos_invisible');st_pro_videos.st_pro_videos_remove(2)}}
if(stprovideos.how_to_display==0){st_pro_videos.st_pro_videos_remove(0)}});break;case 1:if($(stprovideos.thumbnail_container).length&&typeof($(stprovideos.thumbnail_container)[0].swiper)!='undefined'){$(stprovideos.thumbnail_container)[0].swiper.on('onClick',function(swiper){if(stprovideos.how_to_display==2){if($(swiper.slides).eq(swiper.clickedIndex).find('.st_pro_video_play_on_first_thumb').length==1){if($(classname).siblings('.st_pro_videos_box').hasClass('st_pro_videos_invisible')){$(classname).removeClass('st_pro_videos_invisible')}}else{$(classname).addClass('st_pro_videos_invisible');st_pro_videos.st_pro_videos_remove(2)}}
if(stprovideos.how_to_display==0){st_pro_videos.st_pro_videos_remove(0)}})}
break;case 2:break;case 3:break;case 4:if($(stprovideos.thumbnail_container).length&&typeof($(stprovideos.thumbnail_container).data("owlCarousel"))!='undefined'){$(stprovideos.thumbnail_container).on("click",".owl-item",function(e){e.preventDefault();if(stprovideos.how_to_display==2){if($(this).find('.st_pro_video_play_on_first_thumb').length==1){if($(classname).siblings('.st_pro_videos_box').hasClass('st_pro_videos_invisible')){$(classname).removeClass('st_pro_videos_invisible')}}else{$(classname).addClass('st_pro_videos_invisible');st_pro_videos.st_pro_videos_remove(2)}}})}
break;case 5:$(document).on('hover',stprovideos.thumbnail_selector,function(){if(stprovideos.how_to_display==2){if($(this).find('.st_pro_video_play_on_first_thumb').length){if($(classname).siblings('.st_pro_videos_box').hasClass('st_pro_videos_invisible'))
$(classname).removeClass('st_pro_videos_invisible');}else{$(classname).addClass('st_pro_videos_invisible');st_pro_videos.st_pro_videos_remove(2)}}
if(stprovideos.how_to_display==0){st_pro_videos.st_pro_videos_remove(0)}});break}},st_pro_manually_play:function(id){var video=$('#st_pro_video_'+id+' .st_pro_videos');if(!video.length)
return!1;st_pro_videos.st_pro_videos_toggle_btns(1,id);var player=videojs.getPlayer(video[0]);if(player&&!player.paused())
player.pause();else if(player&&(video.data('autoplay')==1||(this.options.autoplay==1&&video.data('autoplay')==4))||stprovideos.how_to_display==0||stprovideos.how_to_display==2){player.ready(function(){setTimeout(function(){if(!$('#st_pro_video_'+id).hasClass('.st_pro_videos_invisible')){player.play()}},100)});if(stprovideos.how_to_display!=0&&stprovideos.how_to_display!=2){switch(stprovideos.thumb_slider){case 0:if($(stprovideos.thumbnail_selector).filter('[data-video-id="'+id+'"]').length){$(stprovideos.thumbnail_selector).find('.selected').removeClass('selected');$(stprovideos.thumbnail_selector).filter('[data-video-id="'+id+'"]').find('.thumb').addClass('selected')}
break}}}},init_st_pro_videos:function(params){$('.st_pro_videos').each(function(k,v){var is_youtube=$(this).find('source').attr('type').indexOf('youtube')!==-1;var options=st_pro_videos.options;if($(this).data('autoplay')!=4)
options=$.extend(options,{'autoplay':$(this).data('autoplay')});if($(this).data('muted')!=4)
options=$.extend(options,{'muted':$(this).data('muted')});if($(this).data('loop')!=4)
options=$.extend(options,{'loop':$(this).data('loop')});var myPlayer=videojs(this,{controls:is_youtube&&options.controls_youtube?!1:options.controls,fluid:!0,autoplay:!1,loop:options.loop===1,muted:options.muted,techOrder:is_youtube?['youtube']:['html5'],"youtube":is_youtube&&options.controls_youtube?{"ytControls":2}:{},"playsinline":"playsinline",preload:(stprovideos.how_to_display==0||stprovideos.how_to_display==2?'none':'metadata')}).on("ended",function(){if(typeof(stprovideos.auto_close_at_end)!='undefined'&&stprovideos.auto_close_at_end)
st_pro_videos.st_pro_videos_remove(0);})});if(stprovideos.how_to_display==0||stprovideos.how_to_display==2){var video=$('#st_pro_video_'+stprovideos.videos[0].id_st_pro_video+' .st_pro_videos');if(params.yi==1&&(video.data('autoplay')==1||(st_pro_videos.options.autoplay==1&&video.data('autoplay')==4)))
st_pro_videos.st_pro_manually_play(stprovideos.videos[0].id_st_pro_video);else st_pro_videos.st_pro_videos_remove(0)}else{switch(stprovideos.slider){case 0:if(params.yi==1&&(stprovideos.how_to_display==1||stprovideos.how_to_display==4)){var key=stprovideos.videos.length-1;st_pro_videos.st_pro_manually_play(stprovideos.videos[key].id_st_pro_video)}else st_pro_videos.st_pro_videos_remove(0);break;case 1:if($(stprovideos.gallery_container).length&&typeof($(stprovideos.gallery_container)[0].swiper)!='undefined'){if(stprovideos.videos.length==$(stprovideos.gallery_container)[0].swiper.slides.length)
st_pro_videos.swiper_video($(stprovideos.gallery_container)[0].swiper);else if((stprovideos.how_to_display==1||stprovideos.how_to_display==4)){$(stprovideos.gallery_container)[0].swiper.slideTo(0)}
st_pro_videos.swiper_sticker($(stprovideos.gallery_container)[0].swiper)}
break;case 3:if(typeof($(stprovideos.gallery_container).slick)!='undefined'){st_pro_videos.slick_video($(stprovideos.gallery_container).slick('getSlick').$slides,$(stprovideos.gallery_container).slick('getSlick').$slides[0]);st_pro_videos.slick_sticker($(stprovideos.gallery_container).slick('getSlick').$slides[0])}
break;case 4:if($(stprovideos.gallery_container).length&&typeof($(stprovideos.gallery_container).data("owlCarousel"))!='undefined'){if((stprovideos.how_to_display==1||stprovideos.how_to_display==4)){$(stprovideos.gallery_container).trigger("main_gallery_after_action",[$(stprovideos.gallery_container).data("owlCarousel")])}
st_pro_videos.owl1_sticker($(stprovideos.gallery_container).data("owlCarousel"))}
break}
switch(stprovideos.thumb_slider){case 0:break;case 1:if((stprovideos.how_to_display==1||stprovideos.how_to_display==4)&&$(stprovideos.thumbnail_container).length&&typeof($(stprovideos.thumbnail_container)[0].swiper)!='undefined')
$(stprovideos.thumbnail_container)[0].swiper.slideTo(0);break;case 3:break;case 4:break}}},append_item:function(type,slider,html){var pre=(stprovideos.how_to_display==1||stprovideos.how_to_display==4);switch(type){case 0:case 5:pre?slider.prepend(html):slider.append(html);break;case 1:if(typeof(slider[0].swiper)!='undefined'){pre?slider[0].swiper.prependSlide(html):slider[0].swiper.appendSlide(html)}
break;case 2:pre?slider.trigger('add.owl.carousel',[html,0]):slider.trigger('add.owl.carousel',[html]);break;case 3:pre?slider.slick('slickAdd',html,0,!0):slider.slick('slickAdd',html);break;case 4:pre?slider.data("owlCarousel").addItem(html,0):slider.data("owlCarousel").addItem(html,-1);break}},slider_reinit:function(type,slider){switch(type){case 0:if($('#main .js-qv-product-images li').length>2){$('#main .js-qv-mask').addClass('scroll');$('.scroll-box-arrows').addClass('scroll');$('#main .js-qv-mask').scrollbox({direction:'h',distance:113,autoPlay:!1});$('.scroll-box-arrows .left').click(function(){$('#main .js-qv-mask').trigger('backward')});$('.scroll-box-arrows .right').click(function(){$('#main .js-qv-mask').trigger('forward')})}else{$('#main .js-qv-mask').removeClass('scroll');$('.scroll-box-arrows').removeClass('scroll')}
break;case 1:if(typeof(slider[0].swiper)!='undefined'){slider[0].swiper.update(!0);if(stprovideos._st_themes_17){if($(slider[0].swiper.slides).length==$(slider[0].swiper.slides).filter('.swiper-slide-visible').length){$(slider[0].swiper.params.nextButton).hide();$(slider[0].swiper.params.prevButton).hide()}else{$(slider[0].swiper.params.nextButton).show();$(slider[0].swiper.params.prevButton).show()}}}
break;case 2:slider.trigger('refresh.owl.carousel');break;case 3:break;case 4:slider.data("owlCarousel").isTransition=!1;break;case 5:$('#thumbs_list_frame').width(parseInt($('#thumbs_list_frame >li').outerWidth(!0)*$('#thumbs_list_frame >li').length)+'px');$('#thumbs_list').trigger('goto',0);serialScrollFixLock('','','','',0);if(stprovideos.how_to_display==1||stprovideos.how_to_display==4)
$('#views_block .shown').removeClass('shown');break}},slider_init:function(type,slider,gt){var pre=(stprovideos.how_to_display==1||stprovideos.how_to_display==4);switch(type){case 0:st_pro_videos.chu_shi_hua[gt](slider);break;case 1:if(typeof(slider[0].swiper)!='undefined'){st_pro_videos.chu_shi_hua[gt](slider)}
break;case 2:st_pro_videos.chu_shi_hua[gt](slider);break;case 3:st_pro_videos.chu_shi_hua[gt](slider);break;case 4:if(typeof(slider.data("owlCarousel"))!='undefined')
st_pro_videos.chu_shi_hua[gt](slider);break;case 5:st_pro_videos.chu_shi_hua[gt](slider);break}},init_classic_pro_video:function(params){var gallery_container=$(stprovideos.gallery_container);var thumb_container=$(stprovideos.thumbnail_container);if(gallery_container.length)
this.slider_init(stprovideos.slider,gallery_container,'slider');if(thumb_container.length)
this.slider_init(stprovideos.thumb_slider,thumb_container,'thumb');},swiper_sticker:function(swiper){if(!stprovideos._st_themes_17)
return!1;var active_video=$(swiper.slides).eq(swiper.activeIndex).find('.st_pro_videos');$(stprovideos.video_container+' .st_sticker_block').toggle(!active_video.length)},swiper_video:function(swiper){$(swiper.wrapper).find('.st_pro_videos').each(function(){var player=videojs.getPlayer(this);if(player){player.pause()}});var active_video=$(swiper.slides).eq(swiper.activeIndex).find('.st_pro_videos');if(active_video.length){if(active_video.data('autoplay')==1||(active_video.data('autoplay')==4&&stprovideos.autoplay==1)){var player=videojs.getPlayer(active_video[0]);if(player){player.ready(function(){setTimeout(function(){if(active_video.closest('.swiper-slide').hasClass('swiper-slide-active')){player.play()}},100)})}}}},slick_video:function(slides,nextSlide){$(slides).each(function(){var player=videojs.getPlayer($(this).find('.st_pro_videos')[0]);if(player){player.pause()}});var active_video=$(nextSlide).find('.st_pro_videos');if(active_video.length&&(active_video.data('autoplay')==1||(active_video.data('autoplay')==4&&stprovideos.autoplay==1))){var player=videojs.getPlayer(active_video[0]);if(player){player.ready(function(){setTimeout(function(){if(active_video.closest('.slick-slide').hasClass('slick-current'))
player.play();},100)})}}},slick_sticker:function(nextSlide){var active_video=$(nextSlide).find('.st_pro_videos');$('.product-cover .expander, .product-cover .product-flags').toggle(!active_video.length)},owl1_video:function(owl1){owl1.$elem.find('.st_pro_videos').each(function(){var player=videojs.getPlayer(this);if(player){player.pause()}});var active_video=owl1.$owlItems.eq(owl1.currentItem).find('.st_pro_videos');if(active_video.length){if(active_video.data('autoplay')==1||(active_video.data('autoplay')==4&&stprovideos.autoplay==1)){var player=videojs.getPlayer(active_video[0]);if(player){player.ready(function(){setTimeout(function(){if(active_video.closest('.owl-item').hasClass('active')){player.play()}},100)})}}}},owl1_sticker:function(owl1){if(!stprovideos._st_themes_16)
return!1;var active_video=owl1.$owlItems.eq(owl1.currentItem).find('.st_pro_videos');$(stprovideos.video_container+' .new, '+stprovideos.video_container+' #reduction_percent').toggle(!active_video.length)},chu_shi_hua:{slider:function(gallery_container){if(!stprovideos.slider)
gallery_container.append('<button class="st_pro_video_stop st_pro_video_btn st_pro_videos_invisible" type="button" aria-disabled="false"><span aria-hidden="true" class="vjs-icon-placeholder"></span></button>');$.each(stprovideos.videos,function(){var html=st_pro_videos.bulid_video_html(this,!1);switch(stprovideos.slider){case 1:html='<div class="swiper-slide"><img src="'+stprovideos.gallery_image_url+'">'+html+'</div>';break;case 2:break;case 3:html='<div><img src="'+stprovideos.gallery_image_url+'" class="img-fluid">'+html+'</div>';break;case 4:html='<div class="item"><img src="'+stprovideos.gallery_image_url+'" class="img-responsive">'+html+'</div>';break}
st_pro_videos.append_item(stprovideos.slider,gallery_container,html);if(stprovideos._st_themes_17){var pre=(stprovideos.how_to_display==1||stprovideos.how_to_display==4);var invisible_trigger='<a href="javascript:;" class="st_pro_videos_invisible"></a>';pre?$('.pro_popup_trigger_box').prepend(invisible_trigger):$('.pro_popup_trigger_box').append(invisible_trigger)}});st_pro_videos.slider_reinit(stprovideos.slider,gallery_container);if(stprovideos.slider){switch(stprovideos.slider){case 1:if(typeof(gallery_container[0].swiper)!='undefined'){gallery_container[0].swiper.on('onSlideChangeStart',function(swiper){st_pro_videos.swiper_video(swiper);st_pro_videos.swiper_sticker(swiper)})}
break;case 2:gallery_container.on('changed.owl.carousel',function(event){$(gallery_container).find('.st_pro_videos').each(function(){var player=videojs.getPlayer(this);if(player)
player.pause();});var active_video=event.item.find('.st_pro_videos');if(active_video.length&&(active_video.data('autoplay')==1||(active_video.data('autoplay')==4&&stprovideos.autoplay==1))){var player=videojs.getPlayer(active_video[0]);if(player){player.ready(function(){setTimeout(function(){if(active_video.closest('.owl-item').hasClass('active'))
player.play();},100)})}}});break;case 3:gallery_container.on('beforeChange',function(event,slick,currentSlide,nextSlide){st_pro_videos.slick_video(slick.$slides,slick.$slides[nextSlide]);st_pro_videos.slick_sticker(slick.$slides[nextSlide])});break;case 4:$(document).on('main_gallery_after_action',function(event,owl1){st_pro_videos.owl1_video(owl1);st_pro_videos.owl1_sticker(owl1)});break}}},thumb:function(thumb_container){$.each(stprovideos.videos,function(){st_pro_videos.append_item(stprovideos.thumb_slider,thumb_container,this.thumbnail_html)});st_pro_videos.slider_reinit(stprovideos.thumb_slider,thumb_container);if(stprovideos.slider){}else{$(stprovideos.thumbnail_selector).on((((stprovideos.st_is_16&&stprovideos.thumbnail_event==0)||stprovideos.thumbnail_event==2)?'mouseenter':'click'),function(e){var id=$(this).data('video-id');if(id){st_pro_videos.st_pro_videos_remove(0,id);st_pro_videos.st_pro_manually_play(id);if(stprovideos.st_is_16)
$('#views_block .shown').removeClass('shown');}else st_pro_videos.st_pro_videos_remove(0,id)})}},},st_pro_videos_toggle_btns:function(status,id){if(status===1){$('.st_pro_video_stop, #st_pro_video_'+id).removeClass('st_pro_videos_invisible');$('.st_pro_video_play').addClass('st_pro_videos_invisible')}else{if(status!==2)
$('.st_pro_video_play').removeClass('st_pro_videos_invisible');$('.st_pro_video_stop').addClass('st_pro_videos_invisible');if(!stprovideos.slider||stprovideos.how_to_display==0||stprovideos.how_to_display==2)
$('.st_pro_videos_box').addClass('st_pro_videos_invisible');}},st_pro_videos_remove:function(status,id){if(typeof(id)=='undefined')
id=0;$.each($('.st_pro_videos'),function(){if($(this).parent().data('video-id')==id)
return!0;var player=videojs.getPlayer(this);if(player)
player.pause();});st_pro_videos.st_pro_videos_toggle_btns(status,id)}};/**
 * @license
 * Video.js 7.1.0 <http://videojs.com/>
 * Copyright Brightcove, Inc. <https://www.brightcove.com/>
 * Available under Apache License Version 2.0
 * <https://github.com/videojs/video.js/blob/master/LICENSE>
 *
 * Includes vtt.js <https://github.com/mozilla/vtt.js>
 * Available under Apache License Version 2.0
 * <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
 * st modified n=r[1]/r[0];n=(n>100)?100:n;
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.videojs=t()}(this,function(){var d="7.1.0",e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var i,g="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{},r={},n=Object.freeze({default:r}),a=n&&r||n,s="undefined"!=typeof e?e:"undefined"!=typeof window?window:{};"undefined"!=typeof document?i=document:(i=s["__GLOBAL_DOCUMENT_CACHE@4"])||(i=s["__GLOBAL_DOCUMENT_CACHE@4"]=a);var p=i,o=void 0,u="info",l=[],c=function(e,t){var i=o.levels[u],r=new RegExp("^("+i+")$");if("log"!==e&&t.unshift(e.toUpperCase()+":"),l&&l.push([].concat(t)),t.unshift("VIDEOJS:"),g.console){var n=g.console[e];n||"debug"!==e||(n=g.console.info||g.console.log),n&&i&&r.test(e)&&n[Array.isArray(t)?"apply":"call"](g.console,t)}};(o=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];c("log",t)}).levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:u},o.level=function(e){if("string"==typeof e){if(!o.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');u=e}return u},o.history=function(){return l?[].concat(l):[]},o.history.clear=function(){l&&(l.length=0)},o.history.disable=function(){null!==l&&(l.length=0,l=null)},o.history.enable=function(){null===l&&(l=[])},o.error=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return c("error",t)},o.warn=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return c("warn",t)},o.debug=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return c("debug",t)};var f=o;var m=function(e){for(var t="",i=0;i<arguments.length;i++)t+=e[i].replace(/\n\r?\s*/g,"")+(arguments[i+1]||"");return t},v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},_=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},b=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},h=function(e,t){return e.raw=t,e},T=Object.prototype.toString,S=function(e){return E(e)?Object.keys(e):[]};function k(t,i){S(t).forEach(function(e){return i(t[e],e)})}function C(i){for(var e=arguments.length,t=Array(1<e?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[i].concat(t)):(t.forEach(function(e){e&&k(e,function(e,t){i[t]=e})}),i)}function E(e){return!!e&&"object"===("undefined"==typeof e?"undefined":v(e))}function w(e){return E(e)&&"[object Object]"===T.call(e)&&e.constructor===Object}function A(e,t){if(!e||!t)return"";if("function"==typeof g.getComputedStyle){var i=g.getComputedStyle(e);return i?i[t]:""}return""}var L=h(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]);function P(e){return"string"==typeof e&&/\S/.test(e)}function O(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function I(){return p===g.document}function x(e){return E(e)&&1===e.nodeType}function D(){try{return g.parent!==g.self}catch(e){return!0}}function R(r){return function(e,t){if(!P(e))return p[r](null);P(t)&&(t=p.querySelector(t));var i=x(t)?t:p;return i[r]&&i[r](e)}}function M(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],n=p.createElement(e);return Object.getOwnPropertyNames(i).forEach(function(e){var t=i[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(f.warn(m(L,e,t)),n.setAttribute(e,t)):"textContent"===e?U(n,t):n[e]=t}),Object.getOwnPropertyNames(t).forEach(function(e){n.setAttribute(e,t[e])}),r&&te(n,r),n}function U(e,t){return"undefined"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function N(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function B(e,t){return O(t),e.classList?e.classList.contains(t):(i=t,new RegExp("(^|\\s)"+i+"($|\\s)")).test(e.className);var i}function j(e,t){return e.classList?e.classList.add(t):B(e,t)||(e.className=(e.className+" "+t).trim()),e}function F(e,t){return e.classList?e.classList.remove(t):(O(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function H(e,t,i){var r=B(e,t);if("function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=!r),i!==r)return i?j(e,t):F(e,t),e}function V(i,r){Object.getOwnPropertyNames(r).forEach(function(e){var t=r[e];null===t||"undefined"==typeof t||!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})}function q(e){var t={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&0<e.attributes.length)for(var r=e.attributes,n=r.length-1;0<=n;n--){var a=r[n].name,s=r[n].value;"boolean"!=typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function W(e,t){return e.getAttribute(t)}function z(e,t,i){e.setAttribute(t,i)}function G(e,t){e.removeAttribute(t)}function X(){p.body.focus(),p.onselectstart=function(){return!1}}function Y(){p.onselectstart=function(){return!0}}function $(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(A(e,"height"))),i.width||(i.width=parseFloat(A(e,"width"))),i}}function K(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=p.documentElement,r=p.body,n=i.clientLeft||r.clientLeft||0,a=g.pageXOffset||r.scrollLeft,s=t.left+a-n,o=i.clientTop||r.clientTop||0,u=g.pageYOffset||r.scrollTop,l=t.top+u-o;return{left:Math.round(s),top:Math.round(l)}}function Q(e,t){var i={},r=K(e),n=e.offsetWidth,a=e.offsetHeight,s=r.top,o=r.left,u=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-u+a)/a)),i.x=Math.max(0,Math.min(1,(l-o)/n)),i}function J(e){return E(e)&&3===e.nodeType}function Z(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function ee(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),x(e)||J(e)?e:"string"==typeof e&&/\S/.test(e)?p.createTextNode(e):void 0}).filter(function(e){return e})}function te(t,e){return ee(e).forEach(function(e){return t.appendChild(e)}),t}function ie(e,t){return te(Z(e),t)}function re(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||0===e.button&&1===e.buttons)}var ne=R("querySelector"),ae=R("querySelectorAll"),se=Object.freeze({isReal:I,isEl:x,isInFrame:D,createEl:M,textContent:U,prependTo:N,hasClass:B,addClass:j,removeClass:F,toggleClass:H,setAttributes:V,getAttributes:q,getAttribute:W,setAttribute:z,removeAttribute:G,blockTextSelection:X,unblockTextSelection:Y,getBoundingClientRect:$,findPosition:K,getPointerPosition:Q,isTextNode:J,emptyEl:Z,normalizeContent:ee,appendContent:te,insertContent:ie,isSingleLeftClick:re,$:ne,$$:ae}),oe=1;function ue(){return oe++}var le={},ce="vdata"+(new Date).getTime();function he(e){var t=e[ce];return t||(t=e[ce]=ue()),le[t]||(le[t]={}),le[t]}function de(e){var t=e[ce];return!!t&&!!Object.getOwnPropertyNames(le[t]).length}function pe(t){var e=t[ce];if(e){delete le[e];try{delete t[ce]}catch(e){t.removeAttribute?t.removeAttribute(ce):t[ce]=null}}}function fe(e,t){var i=he(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&pe(e)}function me(t,i,e,r){e.forEach(function(e){t(i,e,r)})}function ge(e){function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var r=e||g.event;for(var n in e={},r)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&("returnValue"===n&&r.preventDefault||(e[n]=r[n]));if(e.target||(e.target=e.srcElement||p),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var a=p.documentElement,s=p.body;e.pageX=e.clientX+(a&&a.scrollLeft||s&&s.scrollLeft||0)-(a&&a.clientLeft||s&&s.clientLeft||0),e.pageY=e.clientY+(a&&a.scrollTop||s&&s.scrollTop||0)-(a&&a.clientTop||s&&s.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e}var ye=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){ye=!0}});g.addEventListener("test",null,e),g.removeEventListener("test",null,e)}catch(e){}}();var ve=["touchstart","touchmove"];function _e(s,e,t){if(Array.isArray(e))return me(_e,s,e,t);var o=he(s);if(o.handlers||(o.handlers={}),o.handlers[e]||(o.handlers[e]=[]),t.guid||(t.guid=ue()),o.handlers[e].push(t),o.dispatcher||(o.disabled=!1,o.dispatcher=function(e,t){if(!o.disabled){e=ge(e);var i=o.handlers[e.type];if(i)for(var r=i.slice(0),n=0,a=r.length;n<a&&!e.isImmediatePropagationStopped();n++)try{r[n].call(s,e,t)}catch(e){f.error(e)}}}),1===o.handlers[e].length)if(s.addEventListener){var i=!1;ye&&-1<ve.indexOf(e)&&(i={passive:!0}),s.addEventListener(e,o.dispatcher,i)}else s.attachEvent&&s.attachEvent("on"+e,o.dispatcher)}function be(e,t,i){if(de(e)){var r=he(e);if(r.handlers){if(Array.isArray(t))return me(be,e,t,i);var n=function(e,t){r.handlers[t]=[],fe(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s<a.length;s++)a[s].guid===i.guid&&a.splice(s--,1);fe(e,t)}else n(e,t)}else for(var o in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},o)&&n(e,o)}}}function Te(e,t,i){var r=de(e)?he(e):{},n=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=ge(t),r.dispatcher&&r.dispatcher.call(e,t,i),n&&!t.isPropagationStopped()&&!0===t.bubbles)Te.call(null,n,t,i);else if(!n&&!t.defaultPrevented){var a=he(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function Se(t,i,r){if(Array.isArray(i))return me(Se,t,i,r);var e=function e(){be(t,i,e),r.apply(this,arguments)};e.guid=r.guid=r.guid||ue(),_e(t,i,e)}var ke=Object.freeze({fixEvent:ge,on:_e,off:be,trigger:Te,one:Se}),Ce=!1,Ee=void 0,we=function(){if(I()&&!1!==Ee.options.autoSetup){var e=Array.prototype.slice.call(p.getElementsByTagName("video")),t=Array.prototype.slice.call(p.getElementsByTagName("audio")),i=Array.prototype.slice.call(p.getElementsByTagName("video-js")),r=e.concat(t,i);if(r&&0<r.length)for(var n=0,a=r.length;n<a;n++){var s=r[n];if(!s||!s.getAttribute){Ae(1);break}void 0===s.player&&null!==s.getAttribute("data-setup")&&Ee(s)}else Ce||Ae(1)}};function Ae(e,t){t&&(Ee=t),g.setTimeout(we,e)}I()&&"complete"===p.readyState?Ce=!0:Se(g,"load",function(){Ce=!0});var Le=function(e){var t=p.createElement("style");return t.className=e,t},Pe=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},Oe=function(e,t,i){t.guid||(t.guid=ue());var r=function(){return t.apply(e,arguments)};return r.guid=i?i+"_"+t.guid:t.guid,r},Ie=function(t,i){var r=Date.now();return function(){var e=Date.now();i<=e-r&&(t.apply(void 0,arguments),r=e)}},xe=function(r,n,a){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:g,o=void 0;return function(){var e=this,t=arguments,i=function(){i=o=null,a||r.apply(e,t)};!o&&a&&r.apply(e,t),s.clearTimeout(o),o=s.setTimeout(i,n)}},De=function(){};De.prototype.allowedEvents_={},De.prototype.addEventListener=De.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},_e(this,e,t),this.addEventListener=i},De.prototype.removeEventListener=De.prototype.off=function(e,t){be(this,e,t)},De.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},Se(this,e,t),this.addEventListener=i},De.prototype.dispatchEvent=De.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=ge(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Te(this,e)};var Re=function(t){return t instanceof De||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]})},Me=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Ue=function(e){if(!e.nodeName&&!Re(e))throw new Error("Invalid target; must be a DOM node or evented object.")},Ne=function(e){if(!Me(e))throw new Error("Invalid event type; must be a non-empty string or array.")},Be=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},je=function(e,t){var i=t.length<3||t[0]===e||t[0]===e.eventBusEl_,r=void 0,n=void 0,a=void 0;return i?(r=e.eventBusEl_,3<=t.length&&t.shift(),n=t[0],a=t[1]):(r=t[0],n=t[1],a=t[2]),Ue(r),Ne(n),Be(a),{isTargetingSelf:i,target:r,type:n,listener:a=Oe(e,a)}},Fe=function(e,t,i,r){Ue(e),e.nodeName?ke[t](e,i,r):e[t](i,r)},He={on:function(){for(var e=this,t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];var n=je(this,i),a=n.isTargetingSelf,s=n.target,o=n.type,u=n.listener;if(Fe(s,"on",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,Fe(this,"on","dispose",l),Fe(s,"on","dispose",c)}},one:function(){for(var n=this,e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var r=je(this,t),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)Fe(s,"one",o,u);else{var l=function e(){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];n.off(s,o,e),u.apply(null,i)};l.guid=u.guid,Fe(s,"one",o,l)}},off:function(e,t,i){if(!e||Me(e))be(this.eventBusEl_,e,t);else{var r=e,n=t;Ue(r),Ne(n),Be(i),i=Oe(this,i),this.off("dispose",i),r.nodeName?(be(r,n,i),be(r,"dispose",i)):Re(r)&&(r.off(n,i),r.off("dispose",i))}},trigger:function(e,t){return Te(this.eventBusEl_,e,t)}};function Ve(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).eventBusKey;if(t){if(!e[t].nodeName)throw new Error('The eventBusKey "'+t+'" does not refer to an element.');e.eventBusEl_=e[t]}else e.eventBusEl_=M("span",{className:"vjs-event-bus"});return C(e,He),e.on("dispose",function(){e.off(),g.setTimeout(function(){e.eventBusEl_=null},0)}),e}var qe={state:{},setState:function(e){var i=this;"function"==typeof e&&(e=e());var r=void 0;return k(e,function(e,t){i.state[t]!==e&&((r=r||{})[t]={from:i.state[t],to:e}),i.state[t]=e}),r&&Re(this)&&this.trigger({changes:r,type:"statechanged"}),r}};function We(e,t){return C(e,qe),e.state=C({},e.state,t),"function"==typeof e.handleStateChanged&&Re(e)&&e.on("statechanged",e.handleStateChanged),e}function ze(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}function Ge(){for(var i={},e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.forEach(function(e){e&&k(e,function(e,t){w(e)?(w(i[t])||(i[t]={}),i[t]=Ge(i[t],e)):i[t]=e})}),i}var Xe=function(){function l(e,t,i){if(y(this,l),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=Ge({},this.options_),t=this.options_=Ge(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+ue()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&Ve(this,{eventBusKey:this.el_?"el_":null}),We(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},!(this.childNameIndex_={})!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}return l.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),pe(this.el_),this.el_=null),this.player_=null},l.prototype.player=function(){return this.player_},l.prototype.options=function(e){return f.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e&&(this.options_=Ge(this.options_,e)),this.options_},l.prototype.el=function(){return this.el_},l.prototype.createEl=function(e,t,i){return M(e,t,i)},l.prototype.localize=function(e,n){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e,i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[i],s=i&&i.split("-")[0],o=r&&r[s],u=t;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),n&&(u=u.replace(/\{(\d+)\}/g,function(e,t){var i=n[t-1],r=i;return"undefined"==typeof i&&(r=e),r})),u},l.prototype.contentEl=function(){return this.contentEl_||this.el_},l.prototype.id=function(){return this.id_},l.prototype.name=function(){return this.name_},l.prototype.children=function(){return this.children_},l.prototype.getChildById=function(e){return this.childIndex_[e]},l.prototype.getChild=function(e){if(e)return e=ze(e),this.childNameIndex_[e]},l.prototype.addChild=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.children_.length,r=void 0,n=void 0;if("string"==typeof e){n=ze(e);var a=t.componentClass||n;t.name=n;var s=l.getComponent(a);if(!s)throw new Error("Component "+a+" does not exist");if("function"!=typeof s)return null;r=new s(this.player_||this,t)}else r=e;if(this.children_.splice(i,0,r),"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(n=n||r.name&&ze(r.name()))&&(this.childNameIndex_[n]=r),"function"==typeof r.el&&r.el()){var o=this.contentEl().children[i]||null;this.contentEl().insertBefore(r.el(),o)}return r},l.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;0<=i;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},l.prototype.initChildren=function(){var n=this,r=this.options_.children;if(r){var a=this.options_,e=void 0,i=l.getComponent("Tech");(e=Array.isArray(r)?r:Object.keys(r)).concat(Object.keys(this.options_).filter(function(t){return!e.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(e){var t=void 0,i=void 0;return"string"==typeof e?i=r[t=e]||n.options_[t]||{}:(t=e.name,i=e),{name:t,opts:i}}).filter(function(e){var t=l.getComponent(e.opts.componentClass||ze(e.name));return t&&!i.isTech(t)}).forEach(function(e){var t=e.name,i=e.opts;if(void 0!==a[t]&&(i=a[t]),!1!==i){!0===i&&(i={}),i.playerOptions=n.options_.playerOptions;var r=n.addChild(t,i);r&&(n[t]=r)}})}},l.prototype.buildCSSClass=function(){return""},l.prototype.ready=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},l.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0<e.length&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},l.prototype.$=function(e,t){return ne(e,t||this.contentEl())},l.prototype.$$=function(e,t){return ae(e,t||this.contentEl())},l.prototype.hasClass=function(e){return B(this.el_,e)},l.prototype.addClass=function(e){j(this.el_,e)},l.prototype.removeClass=function(e){F(this.el_,e)},l.prototype.toggleClass=function(e,t){H(this.el_,e,t)},l.prototype.show=function(){this.removeClass("vjs-hidden")},l.prototype.hide=function(){this.addClass("vjs-hidden")},l.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},l.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},l.prototype.getAttribute=function(e){return W(this.el_,e)},l.prototype.setAttribute=function(e,t){z(this.el_,e,t)},l.prototype.removeAttribute=function(e){G(this.el_,e)},l.prototype.width=function(e,t){return this.dimension("width",e,t)},l.prototype.height=function(e,t){return this.dimension("height",e,t)},l.prototype.dimensions=function(e,t){this.width(e,!0),this.height(t)},l.prototype.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],n=r.indexOf("px");return-1!==n?parseInt(r.slice(0,n),10):parseInt(this.el_["offset"+ze(e)],10)},l.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof g.getComputedStyle){var i=g.getComputedStyle(this.el_);t=i.getPropertyValue(e)||i[e]}if(0===(t=parseFloat(t))){var r="offset"+ze(e);t=this.el_[r]}return t},l.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},l.prototype.currentWidth=function(){return this.currentDimension("width")},l.prototype.currentHeight=function(){return this.currentDimension("height")},l.prototype.focus=function(){this.el_.focus()},l.prototype.blur=function(){this.el_.blur()},l.prototype.emitTapEvents=function(){var t=0,r=null,n=void 0;this.on("touchstart",function(e){1===e.touches.length&&(r={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},t=(new Date).getTime(),n=!0)}),this.on("touchmove",function(e){if(1<e.touches.length)n=!1;else if(r){var t=e.touches[0].pageX-r.pageX,i=e.touches[0].pageY-r.pageY;10<Math.sqrt(t*t+i*i)&&(n=!1)}});var e=function(){n=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",function(e){!(r=null)===n&&((new Date).getTime()-t<200&&(e.preventDefault(),this.trigger("tap")))})},l.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=Oe(this.player(),this.player().reportUserActivity),i=void 0;this.on("touchstart",function(){t(),this.clearInterval(i),i=this.setInterval(t,250)});var e=function(e){t(),this.clearInterval(i)};this.on("touchmove",t),this.on("touchend",e),this.on("touchcancel",e)}},l.prototype.setTimeout=function(e,t){var i,r,n=this;return e=Oe(this,e),i=g.setTimeout(function(){n.off("dispose",r),e()},t),(r=function(){return n.clearTimeout(i)}).guid="vjs-timeout-"+i,this.on("dispose",r),i},l.prototype.clearTimeout=function(e){g.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},l.prototype.setInterval=function(e,t){var i=this;e=Oe(this,e);var r=g.setInterval(e,t),n=function(){return i.clearInterval(r)};return n.guid="vjs-interval-"+r,this.on("dispose",n),r},l.prototype.clearInterval=function(e){g.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},l.prototype.requestAnimationFrame=function(e){var t,i,r=this;return this.supportsRaf_?(e=Oe(this,e),t=g.requestAnimationFrame(function(){r.off("dispose",i),e()}),(i=function(){return r.cancelAnimationFrame(t)}).guid="vjs-raf-"+t,this.on("dispose",i),t):this.setTimeout(e,1e3/60)},l.prototype.cancelAnimationFrame=function(e){if(this.supportsRaf_){g.cancelAnimationFrame(e);var t=function(){};return t.guid="vjs-raf-"+e,this.off("dispose",t),e}return this.clearTimeout(e)},l.registerComponent=function(e,t){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var i=l.getComponent("Tech"),r=i&&i.isTech(t),n=l===t||l.prototype.isPrototypeOf(t.prototype);if(r||!n){var a=void 0;throw a=r?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+a+".")}e=ze(e),l.components_||(l.components_={});var s=l.getComponent("Player");if("Player"===e&&s&&s.players){var o=s.players,u=Object.keys(o);if(o&&0<u.length&&u.map(function(e){return o[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return l.components_[e]=t},l.getComponent=function(e){if(e)return e=ze(e),l.components_&&l.components_[e]?l.components_[e]:void 0},l}();Xe.prototype.supportsRaf_="function"==typeof g.requestAnimationFrame&&"function"==typeof g.cancelAnimationFrame,Xe.registerComponent("Component",Xe);var Ye,$e,Ke,Qe,Je=g.navigator&&g.navigator.userAgent||"",Ze=/AppleWebKit\/([\d.]+)/i.exec(Je),et=Ze?parseFloat(Ze.pop()):null,tt=/iPad/i.test(Je),it=/iPhone/i.test(Je)&&!tt,rt=/iPod/i.test(Je),nt=it||tt||rt,at=(Ye=Je.match(/OS (\d+)_/i))&&Ye[1]?Ye[1]:null,st=/Android/i.test(Je),ot=function(){var e=Je.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),ut=st&&ot<5&&et<537,lt=/Firefox/i.test(Je),ct=/Edge/i.test(Je),ht=!ct&&(/Chrome/i.test(Je)||/CriOS/i.test(Je)),dt=($e=Je.match(/(Chrome|CriOS)\/(\d+)/))&&$e[2]?parseFloat($e[2]):null,pt=(Ke=/MSIE\s(\d+)\.\d/.exec(Je),!(Qe=Ke&&parseFloat(Ke[1]))&&/Trident\/7.0/i.test(Je)&&/rv:11.0/.test(Je)&&(Qe=11),Qe),ft=/Safari/i.test(Je)&&!ht&&!st&&!ct,mt=(ft||nt)&&!ht,gt=I()&&("ontouchstart"in g||g.navigator.maxTouchPoints||g.DocumentTouch&&g.document instanceof g.DocumentTouch),yt=Object.freeze({IS_IPAD:tt,IS_IPHONE:it,IS_IPOD:rt,IS_IOS:nt,IOS_VERSION:at,IS_ANDROID:st,ANDROID_VERSION:ot,IS_NATIVE_ANDROID:ut,IS_FIREFOX:lt,IS_EDGE:ct,IS_CHROME:ht,CHROME_VERSION:dt,IE_VERSION:pt,IS_SAFARI:ft,IS_ANY_SAFARI:mt,TOUCH_ENABLED:gt});function vt(e,t,i,r){return function(e,t,i){if("number"!=typeof t||t<0||i<t)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}(e,r,i.length-1),i[r][t]}function _t(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:vt.bind(null,"start",0,e),end:vt.bind(null,"end",1,e)}}function bt(e,t){return Array.isArray(e)?_t(e):void 0===e||void 0===t?_t():_t([[e,t]])}function Tt(e,t){var i=0,r=void 0,n=void 0;if(!t)return 0;e&&e.length||(e=bt(0,0));for(var a=0;a<e.length;a++)r=e.start(a),t<(n=e.end(a))&&(n=t),i+=n-r;return i/t}for(var St={},kt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Ct=kt[0],Et=void 0,wt=0;wt<kt.length;wt++)if(kt[wt][1]in p){Et=kt[wt];break}if(Et)for(var At=0;At<Et.length;At++)St[Ct[At]]=Et[At];function Lt(e){if(e instanceof Lt)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:E(e)&&("number"==typeof e.code&&(this.code=e.code),C(this,e)),this.message||(this.message=Lt.defaultMessages[this.code]||"")}Lt.prototype.code=0,Lt.prototype.message="",Lt.prototype.status=null,Lt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Lt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Pt=0;Pt<Lt.errorTypes.length;Pt++)Lt[Lt.errorTypes[Pt]]=Pt,Lt.prototype[Lt.errorTypes[Pt]]=Pt;var Ot=function(e,t){var i,r=null;try{i=JSON.parse(e,t)}catch(e){r=e}return[r,i]};function It(e){return null!=e&&"function"==typeof e.then}function xt(e){It(e)&&e.then(null,function(e){})}var Dt=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,t,i){return r[t]&&(e[t]=r[t]),e},{cues:r.cues&&Array.prototype.map.call(r.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})},Rt=function(e){var t=e.$$("track"),i=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=Dt(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===i.indexOf(e)}).map(Dt))},Mt=function(e,i){return e.forEach(function(e){var t=i.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return t.addCue(e)})}),i.textTracks()},Ut="vjs-modal-dialog",Nt=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=M("div",{className:Ut+"-content"},{role:"document"}),i.descEl_=M("p",{className:Ut+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),U(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return _(n,r),n.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.prototype.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,r.prototype.dispose.call(this)},n.prototype.buildCSSClass=function(){return Ut+" vjs-hidden "+r.prototype.buildCSSClass.call(this)},n.prototype.handleKeyPress=function(e){27===e.which&&this.closeable()&&this.close()},n.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},n.prototype.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.prototype.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",Oe(this,this.handleKeyPress)),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.prototype.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",Oe(this,this.handleKeyPress)),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.prototype.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var r=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(i,"close",this.close)}!t&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},n.prototype.fill=function(){this.fillWith(this.content())},n.prototype.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,r=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),ie(t,e),this.trigger("modalfill"),r?i.insertBefore(t,r):i.appendChild(t);var n=this.getChild("closeButton");n&&i.appendChild(n.el_)},n.prototype.empty=function(){this.trigger("beforemodalempty"),Z(this.contentEl()),this.trigger("modalempty")},n.prototype.content=function(e){return"undefined"!=typeof e&&(this.content_=e),this.content_},n.prototype.conditionalFocus_=function(){var e=p.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus(),this.on(p,"keydown",this.handleKeyDown))},n.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(p,"keydown",this.handleKeyDown)},n.prototype.handleKeyDown=function(e){if(9===e.which){for(var t=this.focusableEls_(),i=this.el_.querySelector(":focus"),r=void 0,n=0;n<t.length;n++)if(i===t[n]){r=n;break}p.activeElement===this.el_&&(r=0),e.shiftKey&&0===r?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||r!==t.length-1||(t[0].focus(),e.preventDefault())}},n.prototype.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof g.HTMLAnchorElement||e instanceof g.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof g.HTMLInputElement||e instanceof g.HTMLSelectElement||e instanceof g.HTMLTextAreaElement||e instanceof g.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof g.HTMLIFrameElement||e instanceof g.HTMLObjectElement||e instanceof g.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},n}(Xe);Nt.prototype.options_={pauseOnOpen:!0,temporary:!0},Xe.registerComponent("ModalDialog",Nt);var Bt=function(r){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];y(this,n);var t=b(this,r.call(this));t.tracks_=[],Object.defineProperty(t,"length",{get:function(){return this.tracks_.length}});for(var i=0;i<e.length;i++)t.addTrack(e[i]);return t}return _(n,r),n.prototype.addTrack=function(e){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack"}))},n.prototype.removeTrack=function(e){for(var t=void 0,i=0,r=this.length;i<r;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack"})},n.prototype.getTrackById=function(e){for(var t=null,i=0,r=this.length;i<r;i++){var n=this[i];if(n.id===e){t=n;break}}return t},n}(De);for(var jt in Bt.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Bt.prototype.allowedEvents_)Bt.prototype["on"+jt]=null;var Ft=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)},Ht=function(r){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];y(this,n);for(var t=e.length-1;0<=t;t--)if(e[t].enabled){Ft(e,e[t]);break}var i=b(this,r.call(this,e));return i.changing_=!1,i}return _(n,r),n.prototype.addTrack=function(e){var t=this;e.enabled&&Ft(this,e),r.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){t.changing_||(t.changing_=!0,Ft(t,e),t.changing_=!1,t.trigger("change"))})},n}(Bt),Vt=function(e,t){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)},qt=function(r){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];y(this,n);for(var t=e.length-1;0<=t;t--)if(e[t].selected){Vt(e,e[t]);break}var i=b(this,r.call(this,e));return i.changing_=!1,Object.defineProperty(i,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),i}return _(n,r),n.prototype.addTrack=function(e){var t=this;e.selected&&Vt(this,e),r.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",function(){t.changing_||(t.changing_=!0,Vt(t,e),t.changing_=!1,t.trigger("change"))})},n}(Bt),Wt=function(t){function e(){return y(this,e),b(this,t.apply(this,arguments))}return _(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",Oe(this,function(){this.trigger("change")}));-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",Oe(this,function(){this.trigger("selectedlanguagechange")}))},e}(Bt),zt=function(){function r(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];y(this,r),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}return r.prototype.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},r.prototype.getTrackElementByTrack_=function(e){for(var t=void 0,i=0,r=this.trackElements_.length;i<r;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},r.prototype.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},r}(),Gt=function(){function t(e){y(this,t),t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}return t.prototype.setCues_=function(e){var t=this.length||0,i=0,r=e.length;this.cues_=e,this.length_=e.length;var n=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<r)for(i=t;i<r;i++)n.call(this,i)},t.prototype.getCueById=function(e){for(var t=null,i=0,r=this.length;i<r;i++){var n=this[i];if(n.id===e){t=n;break}}return t},t}(),Xt={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Yt={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},$t={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Kt={disabled:"disabled",hidden:"hidden",showing:"showing"},Qt=function(a){function s(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};y(this,s);var t=b(this,a.call(this)),i={id:e.id||"vjs_track_"+ue(),kind:e.kind||"",label:e.label||"",language:e.language||""},r=function(e){Object.defineProperty(t,e,{get:function(){return i[e]},set:function(){}})};for(var n in i)r(n);return t}return _(s,a),s}(De),Jt=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=p.createElement("a");i.href=e;var r=""===i.host&&"file:"!==i.protocol,n=void 0;r&&((n=p.createElement("div")).innerHTML='<a href="'+e+'"></a>',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),p.body.appendChild(n));for(var a={},s=0;s<t.length;s++)a[t[s]]=i[t[s]];return"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,"")),"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,"")),a.protocol||(a.protocol=g.location.protocol),r&&p.body.removeChild(n),a},Zt=function(e){if(!e.match(/^https?:\/\//)){var t=p.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},ei=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},ti=function(e){var t=g.location,i=Jt(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host},ii=Object.freeze({parseUrl:Jt,getAbsoluteURL:Zt,getFileExtension:ei,isCrossOrigin:ti}),ri=function(e){var t=ni.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},ni=Object.prototype.toString;var ai=Object.freeze({default:ri,__moduleExports:ri}),si=t(function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}}),oi=si.left,ui=si.right,li=Object.freeze({default:si,__moduleExports:si,left:oi,right:ui}),ci=ai&&ri||ai,hi=function(e,t,i){if(!ci(t))throw new TypeError("iterator must be a function");arguments.length<3&&(i=this);"[object Array]"===di.call(e)?function(e,t,i){for(var r=0,n=e.length;r<n;r++)pi.call(e,r)&&t.call(i,e[r],r,e)}(e,t,i):"string"==typeof e?function(e,t,i){for(var r=0,n=e.length;r<n;r++)t.call(i,e.charAt(r),r,e)}(e,t,i):function(e,t,i){for(var r in e)pi.call(e,r)&&t.call(i,e[r],r,e)}(e,t,i)},di=Object.prototype.toString,pi=Object.prototype.hasOwnProperty;var fi=Object.freeze({default:hi,__moduleExports:hi}),mi=li&&si||li,gi=fi&&hi||fi,yi=function(e){if(!e)return{};var a={};return gi(mi(e).split("\n"),function(e){var t,i=e.indexOf(":"),r=mi(e.slice(0,i)).toLowerCase(),n=mi(e.slice(i+1));"undefined"==typeof a[r]?a[r]=n:(t=a[r],"[object Array]"===Object.prototype.toString.call(t)?a[r].push(n):a[r]=[a[r],n])}),a},vi=Object.freeze({default:yi,__moduleExports:yi}),_i=function(){for(var e={},t=0;t<arguments.length;t++){var i=arguments[t];for(var r in i)bi.call(i,r)&&(e[r]=i[r])}return e},bi=Object.prototype.hasOwnProperty;var Ti=Object.freeze({default:_i,__moduleExports:_i}),Si=vi&&yi||vi,ki=Ti&&_i||Ti,Ci=wi;function Ei(e,t,i){var r=e;return ci(t)?(i=t,"string"==typeof e&&(r={uri:e})):r=ki(t,{uri:e}),r.callback=i,r}function wi(e,t,i){return Ai(t=Ei(e,t,i))}function Ai(r){if("undefined"==typeof r.callback)throw new Error("callback argument missing");var n=!1,a=function(e,t,i){n||(n=!0,r.callback(e,t,i))};function t(e){return clearTimeout(u),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,a(e,m)}function e(){if(!s){var e;clearTimeout(u),e=r.useXDR&&void 0===o.status?200:1223===o.status?204:o.status;var t=m,i=null;return 0!==e?(t={body:function(){var e=void 0;if(e=o.response?o.response:o.responseText||function(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}(o),f)try{e=JSON.parse(e)}catch(e){}return e}(),statusCode:e,method:c,headers:{},url:l,rawRequest:o},o.getAllResponseHeaders&&(t.headers=Si(o.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),a(i,t,t.body)}}var i,s,o=r.xhr||null;o||(o=r.cors||r.useXDR?new wi.XDomainRequest:new wi.XMLHttpRequest);var u,l=o.url=r.uri||r.url,c=o.method=r.method||"GET",h=r.body||r.data,d=o.headers=r.headers||{},p=!!r.sync,f=!1,m={body:void 0,headers:{},statusCode:0,method:c,url:l,rawRequest:o};if("json"in r&&!1!==r.json&&(f=!0,d.accept||d.Accept||(d.Accept="application/json"),"GET"!==c&&"HEAD"!==c&&(d["content-type"]||d["Content-Type"]||(d["Content-Type"]="application/json"),h=JSON.stringify(!0===r.json?h:r.json))),o.onreadystatechange=function(){4===o.readyState&&setTimeout(e,0)},o.onload=e,o.onerror=t,o.onprogress=function(){},o.onabort=function(){s=!0},o.ontimeout=t,o.open(c,l,!p,r.username,r.password),p||(o.withCredentials=!!r.withCredentials),!p&&0<r.timeout&&(u=setTimeout(function(){if(!s){s=!0,o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",t(e)}},r.timeout)),o.setRequestHeader)for(i in d)d.hasOwnProperty(i)&&o.setRequestHeader(i,d[i]);else if(r.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(r.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in r&&(o.responseType=r.responseType),"beforeSend"in r&&"function"==typeof r.beforeSend&&r.beforeSend(o),o.send(h||null),o}wi.XMLHttpRequest=g.XMLHttpRequest||function(){},wi.XDomainRequest="withCredentials"in new wi.XMLHttpRequest?wi.XMLHttpRequest:g.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],function(r){wi["delete"===r?"del":r]=function(e,t,i){return(t=Ei(e,t,i)).method=r.toUpperCase(),Ai(t)}});var Li=function(e,t){var i=new g.WebVTT.Parser(g,g.vttjs,g.WebVTT.StringDecoder()),r=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){r.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),0<r.length&&(g.console&&g.console.groupCollapsed&&g.console.groupCollapsed("Text Track parsing errors for "+t.src),r.forEach(function(e){return f.error(e)}),g.console&&g.console.groupEnd&&g.console.groupEnd()),i.flush()},Pi=function(e,n){var t={uri:e},i=ti(e);i&&(t.cors=i),Ci(t,Oe(this,function(e,t,i){if(e)return f.error(e,t);if(n.loaded_=!0,"function"!=typeof g.WebVTT){if(n.tech_){var r=function(){return Li(i,n)};n.tech_.on("vttjsloaded",r),n.tech_.on("vttjserror",function(){f.error("vttjs failed to load, stopping trying to process "+n.src),n.tech_.off("vttjsloaded",r)})}}else Li(i,n)}))},Oi=function(l){function c(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(y(this,c),!e.tech)throw new Error("A tech was not provided.");var t=Ge(e,{kind:$t[e.kind]||"subtitles",language:e.language||e.srclang||""}),i=Kt[t.mode]||"disabled",r=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden");var n=b(this,l.call(this,t));n.tech_=t.tech,n.cues_=[],n.activeCues_=[];var a=new Gt(n.cues_),s=new Gt(n.activeCues_),o=!1,u=Oe(n,function(){this.activeCues,o&&(this.trigger("cuechange"),o=!1)});return"disabled"!==i&&n.tech_.ready(function(){n.tech_.on("timeupdate",u)},!0),Object.defineProperties(n,{default:{get:function(){return r},set:function(){}},mode:{get:function(){return i},set:function(e){var t=this;Kt[e]&&("showing"===(i=e)&&this.tech_.ready(function(){t.tech_.on("timeupdate",u)},!0),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return s;for(var e=this.tech_.currentTime(),t=[],i=0,r=this.cues.length;i<r;i++){var n=this.cues[i];n.startTime<=e&&n.endTime>=e?t.push(n):n.startTime===n.endTime&&n.startTime<=e&&n.startTime+.5>=e&&t.push(n)}if(o=!1,t.length!==this.activeCues_.length)o=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(o=!0);return this.activeCues_=t,s.setCues_(this.activeCues_),s},set:function(){}}}),t.src?(n.src=t.src,Pi(t.src,n)):n.loaded_=!0,n}return _(c,l),c.prototype.addCue=function(e){var t=e;if(g.vttjs&&!(e instanceof g.vttjs.VTTCue)){for(var i in t=new g.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),n=0;n<r.length;n++)r[n]!==this&&r[n].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},c.prototype.removeCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},c}(Qt);Oi.prototype.allowedEvents_={cuechange:"cuechange"};var Ii=function(n){function a(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};y(this,a);var t=Ge(e,{kind:Yt[e.kind]||""}),i=b(this,n.call(this,t)),r=!1;return Object.defineProperty(i,"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),t.enabled&&(i.enabled=t.enabled),i.loaded_=!0,i}return _(a,n),a}(Qt),xi=function(n){function a(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};y(this,a);var t=Ge(e,{kind:Xt[e.kind]||""}),i=b(this,n.call(this,t)),r=!1;return Object.defineProperty(i,"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),t.selected&&(i.selected=t.selected),i}return _(a,n),a}(Qt),Di=0,Ri=2,Mi=function(n){function a(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};y(this,a);var t=b(this,n.call(this)),i=void 0,r=new Oi(e);return t.kind=r.kind,t.src=r.src,t.srclang=r.language,t.label=r.label,t.default=r.default,Object.defineProperties(t,{readyState:{get:function(){return i}},track:{get:function(){return r}}}),i=Di,r.addEventListener("loadeddata",function(){i=Ri,t.trigger({type:"load",target:t})}),t}return _(a,n),a}(De);Mi.prototype.allowedEvents_={load:"load"},Mi.NONE=Di,Mi.LOADING=1,Mi.LOADED=Ri,Mi.ERROR=3;var Ui={audio:{ListClass:Ht,TrackClass:Ii,capitalName:"Audio"},video:{ListClass:qt,TrackClass:xi,capitalName:"Video"},text:{ListClass:Wt,TrackClass:Oi,capitalName:"Text"}};Object.keys(Ui).forEach(function(e){Ui[e].getterName=e+"Tracks",Ui[e].privateName=e+"Tracks_"});var Ni={remoteText:{ListClass:Wt,TrackClass:Oi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:zt,TrackClass:Mi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Bi=Ge(Ui,Ni);Ni.names=Object.keys(Ni),Ui.names=Object.keys(Ui),Bi.names=[].concat(Ni.names).concat(Ui.names);var ji=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function Fi(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Hi(e){function t(e,t,i,r){return 3600*(0|e)+60*(0|t)+(0|i)+(0|r)/1e3}var i=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):59<i[1]?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function Vi(){this.values=ji(null)}function qi(e,t,i,r){var n=r?e.split(r):[e];for(var a in n)if("string"==typeof n[a]){var s=n[a].split(i);if(2===s.length)t(s[0],s[1])}}function Wi(t,e,a){var i,r,s,n=t;function o(){var e=Hi(t);if(null===e)throw new Fi(Fi.Errors.BadTimeStamp,"Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function u(){t=t.replace(/^\s+/,"")}if(u(),e.startTime=o(),u(),"--\x3e"!==t.substr(0,3))throw new Fi(Fi.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);t=t.substr(3),u(),e.endTime=o(),u(),i=t,r=e,s=new Vi,qi(i,function(e,t){switch(e){case"region":for(var i=a.length-1;0<=i;i--)if(a[i].id===t){s.set(e,a[i].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":var r=t.split(","),n=r[0];s.integer(e,n),s.percent(e,n)&&s.set("snapToLines",!1),s.alt(e,n,["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start","middle","end"]);break;case"position":r=t.split(","),s.percent(e,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start","middle","end"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),r.region=s.get("region",null),r.vertical=s.get("vertical",""),r.line=s.get("line","auto"),r.lineAlign=s.get("lineAlign","start"),r.snapToLines=s.get("snapToLines",!0),r.size=s.get("size",100),r.align=s.get("align","middle"),r.position=s.get("position",{start:0,left:0,middle:50,end:100,right:100},r.align),r.positionAlign=s.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},r.align)}((Fi.prototype=ji(Error.prototype)).constructor=Fi).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Vi.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var r=0;r<i.length;++r)if(t===i[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(t=parseFloat(t))&&t<=100)&&(this.set(e,t),!0)}};var zi={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},Gi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Xi={v:"title",lang:"lang"},Yi={rt:"ruby"};function $i(a,i){function e(){if(!i)return null;var e,t=i.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],i=i.substr(e.length),e}function t(e){return zi[e]}function r(e){for(;f=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(f[0],t);return e}function n(e,t){var i=Gi[e];if(!i)return null;var r=a.document.createElement(i);r.localName=i;var n=Xi[e];return n&&t&&(r[n]=t.trim()),r}for(var s,o,u,l=a.document.createElement("div"),c=l,h=[];null!==(s=e());)if("<"!==s[0])c.appendChild(a.document.createTextNode(r(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),c=c.parentNode);continue}var d,p=Hi(s.substr(1,s.length-2));if(p){d=a.document.createProcessingInstruction("timestamp",p),c.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=n(f[1],f[3])))continue;if(o=c,Yi[(u=d).localName]&&Yi[u.localName]!==o.localName)continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),h.push(f[1]),c.appendChild(d),c=d}return l}var Ki=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Qi(e){for(var t=0;t<Ki.length;t++){var i=Ki[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function Ji(){}function Zi(e,t,i){Ji.call(this),this.cue=t,this.cueDiv=$i(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:function(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);return r?r[e.length=0]:i}return"ruby"===t.tagName?a(e):t.childNodes?(n(e,t),a(e)):void 0}for(n(t,e);i=a(t);)for(var r=0;r<i.length;r++)if(Qi(i.charCodeAt(r)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var n=0;switch(t.positionAlign){case"start":n=t.position;break;case"middle":n=t.position-t.size/2;break;case"end":n=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(n,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(n,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function er(e){var t,i,r,n;if(e.div){i=e.div.offsetHeight,r=e.div.offsetWidth,n=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||n,this.height=e.height||i,this.bottom=e.bottom||n+(e.height||i),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function tr(e,t,o,u){var i=new er(t),r=t.cue,n=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,r=0,n=0;n<i.length&&i[n]!==t;n++)"showing"===i[n].mode&&r++;return-1*++r}(r),a=[];if(r.snapToLines){var s;switch(r.vertical){case"":a=["+y","-y"],s="height";break;case"rl":a=["+x","-x"],s="width";break;case"lr":a=["-x","+x"],s="width"}var l=i.lineHeight,c=l*Math.round(n),h=o[s]+l,d=a[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/l)*l),n<0&&(c+=""===r.vertical?o.height:o.width,a=a.reverse()),i.move(d,c)}else{var p=i.lineHeight/o.height*100;switch(r.lineAlign){case"middle":n-=p/2;break;case"end":n-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(n,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(n,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(n,"%")})}a=["+y","-x","+x","-y"],i=new er(t)}var f=function(e,t){for(var i,r=new er(e),n=1,a=0;a<t.length;a++){for(;e.overlapsOppositeAxis(o,t[a])||e.within(o)&&e.overlapsAny(u);)e.move(t[a]);if(e.within(o))return e;var s=e.intersectPercentage(o);s<n&&(i=new er(e),n=s),e=new er(r)}return i||r}(i,a);t.move(f.toCSSCompatValues(o))}function ir(){}Ji.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},Ji.prototype.formatStyle=function(e,t){return 0===e?0:e+t},(Zi.prototype=ji(Ji.prototype)).constructor=Zi,er.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},er.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},er.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},er.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},er.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},er.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},er.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},er.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||i}},ir.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},ir.convertCueToDOMTree=function(e,t){return e&&t?$i(e,t):null};ir.processCues=function(r,n,e){if(!r||!n||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var a=r.document.createElement("div");if(a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin="1.5%",e.appendChild(a),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(n)){var s=[],o=er.getSimpleBoxPosition(a),u={font:Math.round(.05*o.height*100)/100+"px sans-serif"};!function(){for(var e,t,i=0;i<n.length;i++)t=n[i],e=new Zi(r,t,u),a.appendChild(e.div),tr(0,e,o,s),t.displayState=e.div,s.push(er.getSimpleBoxPosition(e))}()}else for(var t=0;t<n.length;t++)a.appendChild(n[t].displayState)},(ir.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(e){if(!(e instanceof Fi))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var a=this;function t(){for(var e=a.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var i=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,a.buffer=e.substr(t),i}function i(e){e.match(/X-TIMESTAMP-MAP/)?qi(e,function(e,t){switch(e){case"X-TIMESTAMP-MAP":i=t,r=new Vi,qi(i,function(e,t){switch(e){case"MPEGT":r.integer(e+"S",t);break;case"LOCA":r.set(e+"L",Hi(t))}},/[^\d]:/,/,/),a.ontimestampmap&&a.ontimestampmap({MPEGTS:r.get("MPEGTS"),LOCAL:r.get("LOCAL")})}var i,r},/=/):qi(e,function(e,t){switch(e){case"Region":!function(e){var n=new Vi;if(qi(e,function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var r=new Vi;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}},/=/,/\s/),n.has("id")){var t=new(a.vttjs.VTTRegion||a.window.VTTRegion);t.width=n.get("width",100),t.lines=n.get("lines",3),t.regionAnchorX=n.get("regionanchorX",0),t.regionAnchorY=n.get("regionanchorY",100),t.viewportAnchorX=n.get("viewportanchorX",0),t.viewportAnchorY=n.get("viewportanchorY",100),t.scroll=n.get("scroll",""),a.onregion&&a.onregion(t),a.regionList.push({id:n.get("id"),region:t})}}(t)}},/:/)}e&&(a.buffer+=a.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===a.state){if(!/\r\n|\n/.test(a.buffer))return this;var n=(r=t()).match(/^WEBVTT([ \t].*)?$/);if(!n||!n[0])throw new Fi(Fi.Errors.BadSignature);a.state="HEADER"}for(var s=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;switch(s?s=!1:r=t(),a.state){case"HEADER":/:/.test(r)?i(r):r||(a.state="ID");continue;case"NOTE":r||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){a.state="NOTE";break}if(!r)continue;if(a.cue=new(a.vttjs.VTTCue||a.window.VTTCue)(0,0,""),a.state="CUE",-1===r.indexOf("--\x3e")){a.cue.id=r;continue}case"CUE":try{Wi(r,a.cue,a.regionList)}catch(e){a.reportOrThrowError(e),a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(s=!0)){a.oncue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}a.cue.text&&(a.cue.text+="\n"),a.cue.text+=r;continue;case"BADCUE":r||(a.state="ID");continue}}}catch(e){a.reportOrThrowError(e),"CUETEXT"===a.state&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state="INITIAL"===a.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Fi(Fi.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var rr=ir,nr=Object.freeze({default:rr,__moduleExports:rr}),ar="auto",sr={"":1,lr:1,rl:1},or={start:1,middle:1,end:1,left:1,right:1};function ur(e){return"string"==typeof e&&(!!or[e.toLowerCase()]&&e.toLowerCase())}function lr(e,t,i){this.hasBeenReset=!1;var r="",n=!1,a=e,s=t,o=i,u=null,l="",c=!0,h="auto",d="start",p=50,f="middle",m=50,g="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return n},set:function(e){n=!!e}},startTime:{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");a=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");s=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return o},set:function(e){o=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){var t,i="string"==typeof(t=e)&&!!sr[t.toLowerCase()]&&t.toLowerCase();if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");l=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e&&e!==ar)throw new SyntaxError("An invalid number or illegal string was specified.");h=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return d},set:function(e){var t=ur(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");d=t,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||100<e)throw new Error("Position must be between 0 and 100.");p=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=ur(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");f=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||100<e)throw new Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=ur(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}lr.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var cr=lr,hr=Object.freeze({default:cr,__moduleExports:cr}),dr={"":!0,up:!0};function pr(e){return"number"==typeof e&&0<=e&&e<=100}var fr=function(){var t=100,i=3,r=0,n=100,a=0,s=100,o="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!pr(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");i=e}},regionAnchorY:{enumerable:!0,get:function(){return n},set:function(e){if(!pr(e))throw new Error("RegionAnchorX must be between 0 and 100.");n=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!pr(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!pr(e))throw new Error("ViewportAnchorY must be between 0 and 100.");s=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!pr(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return o},set:function(e){var t,i="string"==typeof(t=e)&&!!dr[t.toLowerCase()]&&t.toLowerCase();if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");o=i}}})},mr=Object.freeze({default:fr,__moduleExports:fr}),gr=nr&&rr||nr,yr=hr&&cr||hr,vr=mr&&fr||mr,_r=t(function(e){var t=e.exports={WebVTT:gr,VTTCue:yr,VTTRegion:vr};g.vttjs=t,g.WebVTT=t.WebVTT;var i=t.VTTCue,r=t.VTTRegion,n=g.VTTCue,a=g.VTTRegion;t.shim=function(){g.VTTCue=i,g.VTTRegion=r},t.restore=function(){g.VTTCue=n,g.VTTRegion=a},g.VTTCue||t.shim()});_r.WebVTT,_r.VTTCue,_r.VTTRegion;var br=function(t){function n(){var i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){};y(this,n),i.reportTouchActivity=!1;var r=b(this,t.call(this,null,i,e));return r.hasStarted_=!1,r.on("playing",function(){this.hasStarted_=!0}),r.on("loadstart",function(){this.hasStarted_=!1}),Bi.names.forEach(function(e){var t=Bi[e];i&&i[t.getterName]&&(r[t.privateName]=i[t.getterName])}),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===i["native"+e+"Tracks"]&&(r["featuresNative"+e+"Tracks"]=!1)}),!1===i.nativeCaptions||!1===i.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==i.nativeCaptions&&!0!==i.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new Bi.text.ListClass,r.initTrackListeners(),i.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}return _(n,t),n.prototype.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},n.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},n.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},n.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Oe(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)},n.prototype.onDurationChange=function(e){this.duration_=this.duration()},n.prototype.buffered=function(){return bt(0,0)},n.prototype.bufferedPercent=function(){return Tt(this.buffered(),this.duration_)},n.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},n.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},n.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},n.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.prototype.dispose=function(){this.clearTracks(Ui.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},n.prototype.clearTracks=function(e){var n=this;(e=[].concat(e)).forEach(function(e){for(var t=n[e+"Tracks"]()||[],i=t.length;i--;){var r=t[i];"text"===e&&n.removeRemoteTextTrack(r),t.removeTrack(r)}})},n.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},n.prototype.reset=function(){},n.prototype.error=function(e){return void 0!==e&&(this.error_=new Lt(e),this.trigger("error")),this.error_},n.prototype.played=function(){return this.hasStarted_?bt(0,0):bt()},n.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.prototype.initTrackListeners=function(){var n=this;Ui.names.forEach(function(e){var t=Ui[e],i=function(){n.trigger(e+"trackchange")},r=n[t.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),n.on("dispose",function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})},n.prototype.addWebVttScript_=function(){var e=this;if(!g.WebVTT)if(p.body.contains(this.el())){if(!this.options_["vtt.js"]&&w(_r)&&0<Object.keys(_r).length)return void this.trigger("vttjsloaded");var t=p.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){t.onload=null,t.onerror=null}),g.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.prototype.emulateTextTracks=function(){var e=this,i=this.textTracks(),t=this.remoteTextTracks(),r=function(e){return i.addTrack(e.track)},n=function(e){return i.removeTrack(e.track)};t.on("addtrack",r),t.on("removetrack",n),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<i.length;e++){var t=i[e];t.removeEventListener("cuechange",a),"showing"===t.mode&&t.addEventListener("cuechange",a)}};s(),i.addEventListener("change",s),i.addEventListener("addtrack",s),i.addEventListener("removetrack",s),this.on("dispose",function(){t.off("addtrack",r),t.off("removetrack",n),i.removeEventListener("change",s),i.removeEventListener("addtrack",s),i.removeEventListener("removetrack",s);for(var e=0;e<i.length;e++){i[e].removeEventListener("cuechange",a)}})},n.prototype.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,r){var n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},a=e.textTracks();n.kind=t,i&&(n.label=i),r&&(n.language=r),n.tech=e;var s=new Bi.text.TrackClass(n);return a.addTrack(s),s}(this,e,t,i)},n.prototype.createRemoteTextTrack=function(e){var t=Ge(e,{tech:this});return new Ni.remoteTextEl.TrackClass(t)},n.prototype.addRemoteTextTrack=function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],r=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(f.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==i&&this.ready(function(){return e.autoRemoteTextTracks_.addTrack(r.track)}),r},n.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.prototype.getVideoPlaybackQuality=function(){return{}},n.prototype.setPoster=function(){},n.prototype.playsinline=function(){},n.prototype.setPlaysinline=function(){},n.prototype.overrideNativeAudioTracks=function(){},n.prototype.overrideNativeVideoTracks=function(){},n.prototype.canPlayType=function(){return""},n.canPlayType=function(){return""},n.canPlaySource=function(e,t){return n.canPlayType(e.type)},n.isTech=function(e){return e.prototype instanceof n||e instanceof n||e===n},n.registerTech=function(e,t){if(n.techs_||(n.techs_={}),!n.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!n.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!n.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=ze(e),n.techs_[e]=t,"Tech"!==e&&n.defaultTechOrder_.push(e),t},n.getTech=function(e){if(e)return e=ze(e),n.techs_&&n.techs_[e]?n.techs_[e]:g&&g.videojs&&g.videojs[e]?(f.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),g.videojs[e]):void 0},n}(Xe);Bi.names.forEach(function(e){var t=Bi[e];br.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),br.prototype.featuresVolumeControl=!0,br.prototype.featuresMuteControl=!0,br.prototype.featuresFullscreenResize=!1,br.prototype.featuresPlaybackRate=!1,br.prototype.featuresProgressEvents=!1,br.prototype.featuresSourceset=!1,br.prototype.featuresTimeupdateEvents=!1,br.prototype.featuresNativeTextTracks=!1,br.withSourceHandlers=function(n){n.registerSourceHandler=function(e,t){var i=n.sourceHandlers;i||(i=n.sourceHandlers=[]),void 0===t&&(t=i.length),i.splice(t,0,e)},n.canPlayType=function(e){for(var t=n.sourceHandlers||[],i=void 0,r=0;r<t.length;r++)if(i=t[r].canPlayType(e))return i;return""},n.selectSourceHandler=function(e,t){for(var i=n.sourceHandlers||[],r=0;r<i.length;r++)if(i[r].canHandleSource(e,t))return i[r];return null},n.canPlaySource=function(e,t){var i=n.selectSourceHandler(e,t);return i?i.canHandleSource(e,t):""};["seekable","seeking","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},n.prototype),n.prototype.setSource=function(e){var t=n.selectSourceHandler(e,this.options_);t||(n.nativeSourceHandler?t=n.nativeSourceHandler:f.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),t!==n.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=t.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},n.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Xe.registerComponent("Tech",br),br.registerTech("Tech",br),br.defaultTechOrder_=[];var Tr={},Sr={},kr={};function Cr(e,t,i){e.setTimeout(function(){return function i(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];var n=arguments[2];var a=arguments[3];var s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[];var o=5<arguments.length&&void 0!==arguments[5]&&arguments[5];var t=e[0],u=e.slice(1);if("string"==typeof t)i(r,Tr[t],n,a,s,o);else if(t){var l=function(e,t){var i=Sr[e.id()],r=null;if(null==i)return r=t(e),Sr[e.id()]=[[t,r]],r;for(var n=0;n<i.length;n++){var a=i[n],s=a[0],o=a[1];s===t&&(r=o)}null===r&&(r=t(e),i.push([t,r]));return r}(a,t);if(!l.setSource)return s.push(l),i(r,u,n,a,s,o);l.setSource(C({},r),function(e,t){if(e)return i(r,u,n,a,s,o);s.push(l),i(t,r.type===t.type?u:Tr[t.type],n,a,s,o)})}else u.length?i(r,u,n,a,s,o):o?n(r,s):i(r,Tr["*"],n,a,s,!0)}(t,Tr[t.type],i,e)},1)}function Er(e,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,n="call"+ze(i),a=e.reduce(Pr(n),r),s=a===kr,o=s?null:t[i](a);return function(e,t,i,r){for(var n=e.length-1;0<=n;n--){var a=e[n];a[t]&&a[t](r,i)}}(e,i,o,s),o}var wr={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Ar={setCurrentTime:1},Lr={play:1,pause:1};function Pr(i){return function(e,t){return e===kr?kr:t[i]?t[i](e):e}}var Or={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Ir=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=ei(e);return Or[t.toLowerCase()]||""};function xr(e){var t=Ir(e.src);return!e.type&&t&&(e.type=t),e}var Dr=function(l){function c(e,t,i){y(this,c);var r=Ge({createEl:!1},t),n=b(this,l.call(this,e,r,i));if(t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(var a=0,s=t.playerOptions.techOrder;a<s.length;a++){var o=ze(s[a]),u=br.getTech(o);if(o||(u=Xe.getComponent(o)),u&&u.isSupported()){e.loadTech_(o);break}}return n}return _(c,l),c}(Xe);Xe.registerComponent("MediaLoader",Dr);var Rr=function(n){function r(e,t){y(this,r);var i=b(this,n.call(this,e,t));return i.emitTapEvents(),i.enable(),i}return _(r,n),r.prototype.createEl=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};t=C({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&f.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),i=C({role:"button"},i),this.tabIndex_=t.tabIndex;var r=n.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(r),r},r.prototype.dispose=function(){this.controlTextEl_=null,n.prototype.dispose.call(this)},r.prototype.createControlTextEl=function(e){return this.controlTextEl_=M("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},r.prototype.controlText=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);this.controlText_=e,U(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},r.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+n.prototype.buildCSSClass.call(this)},r.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},r.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},r.prototype.handleClick=function(e){},r.prototype.handleFocus=function(e){_e(p,"keydown",Oe(this,this.handleKeyPress))},r.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):n.prototype.handleKeyPress&&n.prototype.handleKeyPress.call(this,e)},r.prototype.handleBlur=function(e){be(p,"keydown",Oe(this,this.handleKeyPress))},r}(Xe);Xe.registerComponent("ClickableComponent",Rr);var Mr=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.update(),e.on("posterchange",Oe(i,i.update)),i}return _(n,r),n.prototype.dispose=function(){this.player().off("posterchange",this.update),r.prototype.dispose.call(this)},n.prototype.createEl=function(){return M("div",{className:"vjs-poster",tabIndex:-1})},n.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.prototype.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?xt(this.player_.play()):this.player_.pause())},n}(Rr);Xe.registerComponent("PosterImage",Mr);var Ur="#222",Nr={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Br(e,t){var i=void 0;if(4===e.length)i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function jr(e,t,i){try{e.style[t]=i}catch(e){return}}var Fr=function(n){function a(i,e,t){y(this,a);var r=b(this,n.call(this,i,e,t));return i.on("loadstart",Oe(r,r.toggleDisplay)),i.on("texttrackchange",Oe(r,r.updateDisplay)),i.on("loadstart",Oe(r,r.preselectTrack)),i.ready(Oe(r,function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",Oe(this,this.updateDisplay));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);this.preselectTrack()}})),r}return _(a,n),a.prototype.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage,r=void 0,n=void 0,a=void 0,s=0;s<t.length;s++){var o=t[s];i&&i.enabled&&i.language===o.language?o.kind===i.kind?a=o:a||(a=o):i&&!i.enabled?n=r=a=null:o.default&&("descriptions"!==o.kind||r?o.kind in e&&!n&&(n=o):r=o)}a?a.mode="showing":n?n.mode="showing":r&&(r.mode="showing")},a.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},a.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},a.prototype.clearDisplay=function(){"function"==typeof g.WebVTT&&g.WebVTT.processCues(g,[],this.el_)},a.prototype.updateDisplay=function(){var e=this.player_.textTracks();this.clearDisplay();for(var t=null,i=null,r=e.length;r--;){var n=e[r];"showing"===n.mode&&("descriptions"===n.kind?t=n:i=n)}i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))},a.prototype.updateForTrack=function(e){if("function"==typeof g.WebVTT&&e.activeCues){for(var t=[],i=0;i<e.activeCues.length;i++)t.push(e.activeCues[i]);if(g.WebVTT.processCues(g,t,this.el_),this.player_.textTrackSettings)for(var r=this.player_.textTrackSettings.getValues(),n=t.length;n--;){var a=t[n];if(a){var s=a.displayState;if(r.color&&(s.firstChild.style.color=r.color),r.textOpacity&&jr(s.firstChild,"color",Br(r.color||"#fff",r.textOpacity)),r.backgroundColor&&(s.firstChild.style.backgroundColor=r.backgroundColor),r.backgroundOpacity&&jr(s.firstChild,"backgroundColor",Br(r.backgroundColor||"#000",r.backgroundOpacity)),r.windowColor&&(r.windowOpacity?jr(s,"backgroundColor",Br(r.windowColor,r.windowOpacity)):s.style.backgroundColor=r.windowColor),r.edgeStyle&&("dropshadow"===r.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Ur:"raised"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Ur:"depressed"===r.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Ur:"uniform"===r.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Ur)),r.fontPercent&&1!==r.fontPercent){var o=g.parseFloat(s.style.fontSize);s.style.fontSize=o*r.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}r.fontFamily&&"default"!==r.fontFamily&&("small-caps"===r.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Nr[r.fontFamily])}}}},a}(Xe);Xe.registerComponent("TextTrackDisplay",Fr);var Hr=function(n){function e(){return y(this,e),b(this,n.apply(this,arguments))}return _(e,n),e.prototype.createEl=function(){var e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=M("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[t])}),r=n.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r},e}(Xe);Xe.registerComponent("LoadingSpinner",Hr);var Vr=function(t){function e(){return y(this,e),b(this,t.apply(this,arguments))}return _(e,t),e.prototype.createEl=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};t=C({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),i=C({type:"button"},i);var r=Xe.prototype.createEl.call(this,"button",t,i);return this.createControlTextEl(r),r},e.prototype.addChild=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=this.constructor.name;return f.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),Xe.prototype.addChild.call(this,e,t)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Rr);Xe.registerComponent("Button",Vr);var qr=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-big-play-button"},n.prototype.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)xt(t);else{var i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(r){var n=function(){return r.focus()};It(t)?t.then(n,function(){}):this.setTimeout(n,1)}else this.player_.focus()}},n.prototype.handleKeyPress=function(e){this.mouseused_=!1,r.prototype.handleKeyPress.call(this,e)},n.prototype.handleMouseDown=function(e){this.mouseused_=!0},n}(Vr);qr.prototype.controlText_="Play Video",Xe.registerComponent("BigPlayButton",qr);var Wr=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.controlText(t&&t.controlText||i.localize("Close")),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-close-button "+r.prototype.buildCSSClass.call(this)},n.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n}(Vr);Xe.registerComponent("CloseButton",Wr);var zr=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.on(e,"play",i.handlePlay),i.on(e,"pause",i.handlePause),i.on(e,"ended",i.handleEnded),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-play-control "+r.prototype.buildCSSClass.call(this)},n.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.prototype.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.prototype.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.prototype.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},n}(Vr);zr.prototype.controlText_="Play",Xe.registerComponent("PlayToggle",zr);var Gr=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),r=Math.floor(e/60%60),n=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(n=r=i="-"),(n=0<n||0<s?n+":":"")+(r=((n||10<=a)&&r<10?"0"+r:r)+":")+(i=i<10?"0"+i:i)},Xr=Gr;function Yr(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e;return Xr(e,t)}var $r=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.throttledUpdateContent=Ie(Oe(i,i.updateContent),25),i.on(e,"timeupdate",i.throttledUpdateContent),i}return _(n,r),n.prototype.createEl=function(e){var t=this.buildCSSClass(),i=r.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=M("span",{className:t+"-display"},{"aria-live":"off"}),this.updateTextNode_(),i.appendChild(this.contentEl_),i},n.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,r.prototype.dispose.call(this)},n.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=p.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},n.prototype.formatTime_=function(e){return Yr(e)},n.prototype.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},n.prototype.updateContent=function(e){},n}(Xe);$r.prototype.labelText_="Time",$r.prototype.controlText_="Time",Xe.registerComponent("TimeDisplay",$r);var Kr=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.on(e,"ended",i.handleEnded),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-current-time"},n.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},n.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},n}($r);Kr.prototype.labelText_="Current Time",Kr.prototype.controlText_="Current Time",Xe.registerComponent("CurrentTimeDisplay",Kr);var Qr=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.on(e,"durationchange",i.updateContent),i.on(e,"loadedmetadata",i.throttledUpdateContent),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-duration"},n.prototype.updateContent=function(e){var t=this.player_.duration();t&&this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},n}($r);Qr.prototype.labelText_="Duration",Qr.prototype.controlText_="Duration",Xe.registerComponent("DurationDisplay",Qr);var Jr=function(e){function t(){return y(this,t),b(this,e.apply(this,arguments))}return _(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(Xe);Xe.registerComponent("TimeDivider",Jr);var Zr=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.on(e,"durationchange",i.throttledUpdateContent),i.on(e,"ended",i.handleEnded),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-remaining-time"},n.prototype.formatTime_=function(e){return"-"+r.prototype.formatTime_.call(this,e)},n.prototype.updateContent=function(e){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},n.prototype.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},n}($r);Zr.prototype.labelText_="Remaining Time",Zr.prototype.controlText_="Remaining Time",Xe.registerComponent("RemainingTimeDisplay",Zr);var en=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return _(n,r),n.prototype.createEl=function(){var e=r.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=M("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},n.prototype.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},n.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},n}(Xe);Xe.registerComponent("LiveDisplay",en);var tn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return _(n,r),n.prototype.enabled=function(){return this.enabled_},n.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.prototype.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.prototype.createEl=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return t.className=t.className+" vjs-slider",t=C({tabIndex:0},t),i=C({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),r.prototype.createEl.call(this,e,t,i)},n.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||ht||e.preventDefault(),X(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},n.prototype.handleMouseMove=function(e){},n.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;Y(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},n.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var i=(100*e).toFixed(2)+"%",r=t.el().style;return this.vertical()?r.height=i:r.width=i,e}}},n.prototype.calculateDistance=function(e){var t=Q(this.el_,e);return this.vertical()?t.y:t.x},n.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},n.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},n.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},n.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},n.prototype.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},n}(Xe);Xe.registerComponent("Slider",tn);var rn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.partEls_=[],i.on(e,"progress",i.update),i}return _(n,r),n.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},n.prototype.dispose=function(){this.partEls_=null,r.prototype.dispose.call(this)},n.prototype.update=function(e){var t=this.player_.buffered(),i=this.player_.duration(),r=this.player_.bufferedEnd(),n=this.partEls_,a=function(e,t){var i=e/t||0;return 100*(1<=i?1:i)+"%"};this.el_.style.width=a(r,i);for(var s=0;s<t.length;s++){var o=t.start(s),u=t.end(s),l=n[s];l||(l=this.el_.appendChild(M()),n[s]=l),l.style.left=a(o,r),l.style.width=a(u-o,r)}for(var c=n.length;c>t.length;c--)this.el_.removeChild(n[c-1]);n.length=t.length},n}(Xe);Xe.registerComponent("LoadProgressBar",rn);var nn=function(e){function t(){return y(this,t),b(this,e.apply(this,arguments))}return _(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},t.prototype.update=function(e,t,i){var r=$(this.el_),n=$(this.player_.el()),a=e.width*t;if(n&&r){var s=e.left-n.left+a,o=e.width-a+(n.right-e.right),u=r.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>r.width&&(u=r.width),this.el_.style.right="-"+u+"px",U(this.el_,i)}},t}(Xe);Xe.registerComponent("TimeTooltip",nn);var an=function(e){function t(){return y(this,t),b(this,e.apply(this,arguments))}return _(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.update=function(i,r){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var e=Yr(n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),n.player_.duration()),t=n.getChild("timeTooltip");t&&t.update(i,r,e)})},t}(Xe);an.prototype.options_={children:[]},nt||st||an.prototype.options_.children.push("timeTooltip"),Xe.registerComponent("PlayProgressBar",an);var sn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.update=Ie(Oe(i,i.update),25),i}return _(n,r),n.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.prototype.update=function(i,r){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var e=n.player_.duration(),t=Yr(r*e,e);n.el_.style.left=i.width*r+"px",n.getChild("timeTooltip").update(i,r,t)})},n}(Xe);sn.prototype.options_={children:["timeTooltip"]},Xe.registerComponent("MouseTimeDisplay",sn);var on=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.setEventHandlers_(),i}return _(n,r),n.prototype.setEventHandlers_=function(){var e=this;this.update=Ie(Oe(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],function(){e.clearInterval(e.updateInterval),e.updateInterval=e.setInterval(function(){e.requestAnimationFrame(function(){e.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(){e.clearInterval(e.updateInterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},n.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.prototype.update_=function(e,t){var i=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Yr(e,i),Yr(i,i)],"{1} of {2}")),this.bar.update($(this.el_),t)},n.prototype.update=function(e){var t=r.prototype.update.call(this);return this.update_(this.getCurrentTime_(),t),t},n.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.prototype.handleEnded=function(e){this.update_(this.player_.duration(),1)},n.prototype.getPercent=function(){var e=this.getCurrentTime_()/this.player_.duration();return 1<=e?1:e||0},n.prototype.handleMouseDown=function(e){re(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),r.prototype.handleMouseDown.call(this,e))},n.prototype.handleMouseMove=function(e){if(re(e)){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)}},n.prototype.enable=function(){r.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},n.prototype.disable=function(){r.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},n.prototype.handleMouseUp=function(e){r.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&xt(this.player_.play())},n.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},n.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},n.prototype.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):r.prototype.handleKeyPress&&r.prototype.handleKeyPress.call(this,e)},n}(tn);on.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},nt||st||on.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),on.prototype.playerEvent="timeupdate",Xe.registerComponent("SeekBar",on);var un=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.handleMouseMove=Ie(Oe(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=Ie(Oe(i,i.handleMouseSeek),25),i.enable(),i}return _(n,r),n.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.prototype.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("mouseTimeDisplay"),r=t.el(),n=$(r),a=Q(r,e).x;1<a?a=1:a<0&&(a=0),i&&i.update(n,a)}},n.prototype.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.prototype.enabled=function(){return this.enabled_},n.prototype.disable=function(){this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},n.prototype.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n}(Xe);un.prototype.options_={children:["seekBar"]},Xe.registerComponent("ProgressControl",un);var ln=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.on(e,"fullscreenchange",i.handleFullscreenChange),!1===p[St.fullscreenEnabled]&&i.disable(),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+r.prototype.buildCSSClass.call(this)},n.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},n}(Vr);ln.prototype.controlText_="Fullscreen",Xe.registerComponent("FullscreenToggle",ln);var cn=function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})},hn=function(e){function t(){return y(this,t),b(this,e.apply(this,arguments))}return _(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(Xe);Xe.registerComponent("VolumeLevel",hn);var dn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.on("slideractive",i.updateLastVolume_),i.on(e,"volumechange",i.updateARIAAttributes),e.ready(function(){return i.updateARIAAttributes()}),i}return _(n,r),n.prototype.createEl=function(){return r.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.prototype.handleMouseDown=function(e){re(e)&&r.prototype.handleMouseDown.call(this,e)},n.prototype.handleMouseMove=function(e){re(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.prototype.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.prototype.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},n}(tn);dn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},dn.prototype.playerEvent="volumechange",Xe.registerComponent("VolumeBar",dn);var pn=function(r){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};y(this,n),t.vertical=t.vertical||!1,("undefined"==typeof t.volumeBar||w(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical);var i=b(this,r.call(this,e,t));return cn(i,e),i.throttledHandleMouseMove=Ie(Oe(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}return _(n,r),n.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},n.prototype.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},n.prototype.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n.prototype.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},n}(Xe);pn.prototype.options_={children:["volumeBar"]},Xe.registerComponent("VolumeControl",pn);var fn=function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})},mn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return fn(i,e),i.on(e,["loadstart","volumechange"],i.update),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-mute-control "+r.prototype.buildCSSClass.call(this)},n.prototype.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){var r=i<.1?.1:i;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.prototype.update=function(e){this.updateIcon_(),this.updateControlText_()},n.prototype.updateIcon_=function(){var e=this.player_.volume(),t=3;nt&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var i=0;i<4;i++)F(this.el_,"vjs-vol-"+i);j(this.el_,"vjs-vol-"+t)},n.prototype.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},n}(Vr);mn.prototype.controlText_="Mute",Xe.registerComponent("MuteToggle",mn);var gn=function(r){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};y(this,n),"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"==typeof t.volumeControl||w(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline);var i=b(this,r.call(this,e,t));return i.on(e,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return _(n,r),n.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},n.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),r.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},n}(Xe);gn.prototype.options_={children:["muteToggle","volumeControl"]},Xe.registerComponent("VolumePanel",gn);var yn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return t&&(i.menuButton_=t.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return _(n,r),n.prototype.addItem=function(t){this.addChild(t),t.on("click",Oe(this,function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())}))},n.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=M(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var t=r.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),_e(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},n.prototype.dispose=function(){this.contentEl_=null,r.prototype.dispose.call(this)},n.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},n.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.prototype.focus=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),0<t.length&&(e<0?e=0:e>=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},n}(Xe);Xe.registerComponent("Menu",yn);var vn=function(n){function a(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};y(this,a);var i=b(this,n.call(this,e,t));i.menuButton_=new Vr(e,t),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Vr.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+r,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return _(a,n),a.prototype.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},a.prototype.createMenu=function(){var e=new yn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=M("li",{className:"vjs-menu-title",innerHTML:ze(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),N(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e},a.prototype.createItems=function(){},a.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},a.prototype.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+Vr.prototype.buildCSSClass()+" "+n.prototype.buildCSSClass.call(this)},a.prototype.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+n.prototype.buildCSSClass.call(this)},a.prototype.controlText=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(e,t)},a.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",Oe(this,function(e){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},a.prototype.focus=function(){this.menuButton_.focus()},a.prototype.blur=function(){this.menuButton_.blur()},a.prototype.handleFocus=function(){_e(p,"keydown",Oe(this,this.handleKeyPress))},a.prototype.handleBlur=function(){be(p,"keydown",Oe(this,this.handleKeyPress))},a.prototype.handleKeyPress=function(e){27===e.which||9===e.which?(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus())):38!==e.which&&40!==e.which||this.buttonPressed_||(this.pressButton(),e.preventDefault())},a.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&(e.preventDefault(),this.menuButton_.el_.focus()))},a.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),nt&&D())return;this.menu.focus()}},a.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},a.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},a.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},a}(Xe);Xe.registerComponent("MenuButton",vn);var _n=function(a){function s(e,t){y(this,s);var i=t.tracks,r=b(this,a.call(this,e,t));if(r.items.length<=1&&r.hide(),!i)return b(r);var n=Oe(r,r.update);return i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),r.player_.on("ready",n),r.player_.on("dispose",function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n)}),r}return _(s,a),s}(vn);Xe.registerComponent("TrackButton",_n);var bn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.selectable=t.selectable,i.isSelected_=t.selected||!1,i.multiSelectable=t.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}return _(n,r),n.prototype.createEl=function(e,t,i){return this.nonIconControl=!0,r.prototype.createEl.call(this,"li",C({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},t),i)},n.prototype.handleClick=function(e){this.selected(!0)},n.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},n}(Rr);Xe.registerComponent("MenuItem",bn);var Tn=function(u){function l(e,t){y(this,l);var i=t.track,r=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode;var n=b(this,u.call(this,e,t));n.track=i;var a=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(n,t)},s=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleSelectedLanguageChange.apply(n,t)};if(e.on(["loadstart","texttrackchange"],a),r.addEventListener("change",a),r.addEventListener("selectedlanguagechange",s),n.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),r.removeEventListener("change",a),r.removeEventListener("selectedlanguagechange",s)}),void 0===r.onchange){var o=void 0;n.on(["tap","click"],function(){if("object"!==v(g.Event))try{o=new g.Event("change")}catch(e){}o||(o=p.createEvent("Event")).initEvent("change",!0,!0),r.dispatchEvent(o)})}return n.handleTracksChange(),n}return _(l,u),l.prototype.handleClick=function(e){var t=this.track.kind,i=this.track.kinds,r=this.player_.textTracks();if(i||(i=[t]),u.prototype.handleClick.call(this,e),r)for(var n=0;n<r.length;n++){var a=r[n];a===this.track&&-1<i.indexOf(a.kind)?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled")}},l.prototype.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},l.prototype.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},l.prototype.dispose=function(){this.track=null,u.prototype.dispose.call(this)},l}(bn);Xe.registerComponent("TextTrackMenuItem",Tn);var Sn=function(i){function r(e,t){return y(this,r),t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,b(this,i.call(this,e,t))}return _(r,i),r.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,r=0,n=t.length;r<n;r++){var a=t[r];if(-1<this.options_.kinds.indexOf(a.kind)&&"showing"===a.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},r.prototype.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,r=0,n=t.length;r<n;r++){var a=t[r];if(-1<["captions","descriptions","subtitles"].indexOf(a.kind)&&"showing"===a.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},r}(Tn);Xe.registerComponent("OffTextTrackMenuItem",Sn);var kn=function(i){function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return y(this,r),t.tracks=e.textTracks(),b(this,i.call(this,e,t))}return _(r,i),r.prototype.createItems=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Tn,i=void 0;this.label_&&(i=this.label_+" off"),e.push(new Sn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var n=0;n<r.length;n++){var a=r[n];if(-1<this.kinds_.indexOf(a.kind)){var s=new t(this.player_,{track:a,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},r}(_n);Xe.registerComponent("TextTrackButton",kn);var Cn=function(s){function o(e,t){y(this,o);var i=t.track,r=t.cue,n=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=r.text,t.selected=r.startTime<=n&&n<r.endTime;var a=b(this,s.call(this,e,t));return a.track=i,a.cue=r,i.addEventListener("cuechange",Oe(a,a.update)),a}return _(o,s),o.prototype.handleClick=function(e){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},o.prototype.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},o}(bn);Xe.registerComponent("ChaptersTrackMenuItem",Cn);var En=function(r){function n(e,t,i){return y(this,n),b(this,r.call(this,e,t,i))}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildCSSClass.call(this)},n.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+r.prototype.buildWrapperCSSClass.call(this)},n.prototype.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),r.prototype.update.call(this)},n.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},n.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;0<=t;t--){var i=e[t];if(i.kind===this.kind_)return i}},n.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ze(this.kind_))},n.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),r.prototype.createMenu.call(this)},n.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,r=t.length;i<r;i++){var n=t[i],a=new Cn(this.player_,{track:this.track_,cue:n});e.push(a)}return e},n}(kn);En.prototype.kind_="chapters",En.prototype.controlText_="Chapters",Xe.registerComponent("ChaptersButton",En);var wn=function(s){function o(e,t,i){y(this,o);var r=b(this,s.call(this,e,t,i)),n=e.textTracks(),a=Oe(r,r.handleTracksChange);return n.addEventListener("change",a),r.on("dispose",function(){n.removeEventListener("change",a)}),r}return _(o,s),o.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,r=0,n=t.length;r<n;r++){var a=t[r];if(a.kind!==this.kind_&&"showing"===a.mode){i=!0;break}}i?this.disable():this.enable()},o.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildCSSClass.call(this)},o.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildWrapperCSSClass.call(this)},o}(kn);wn.prototype.kind_="descriptions",wn.prototype.controlText_="Descriptions",Xe.registerComponent("DescriptionsButton",wn);var An=function(r){function n(e,t,i){return y(this,n),b(this,r.call(this,e,t,i))}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildCSSClass.call(this)},n.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+r.prototype.buildWrapperCSSClass.call(this)},n}(kn);An.prototype.kind_="subtitles",An.prototype.controlText_="Subtitles",Xe.registerComponent("SubtitlesButton",An);var Ln=function(r){function n(e,t){y(this,n),t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem";var i=b(this,r.call(this,e,t));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+t.kind+" settings dialog"),i}return _(n,r),n.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},n}(Tn);Xe.registerComponent("CaptionSettingsMenuItem",Ln);var Pn=function(r){function n(e,t,i){return y(this,n),b(this,r.call(this,e,t,i))}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-captions-button "+r.prototype.buildCSSClass.call(this)},n.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+r.prototype.buildWrapperCSSClass.call(this)},n.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Ln(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),r.prototype.createItems.call(this,e)},n}(kn);Pn.prototype.kind_="captions",Pn.prototype.controlText_="Captions",Xe.registerComponent("CaptionsButton",Pn);var On=function(n){function e(){return y(this,e),b(this,n.apply(this,arguments))}return _(e,n),e.prototype.createEl=function(e,t,i){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(r+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "),r+="</span>",n.prototype.createEl.call(this,e,C({innerHTML:r},t),i)},e}(Tn);Xe.registerComponent("SubsCapsMenuItem",On);var In=function(r){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};y(this,n);var i=b(this,r.call(this,e,t));return i.label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)&&(i.label_="captions"),i.menuButton_.controlText(ze(i.label_)),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildCSSClass.call(this)},n.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+r.prototype.buildWrapperCSSClass.call(this)},n.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Ln(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=r.prototype.createItems.call(this,e,On)},n}(kn);In.prototype.kinds_=["captions","subtitles"],In.prototype.controlText_="Subtitles",Xe.registerComponent("SubsCapsButton",In);var xn=function(s){function o(e,t){y(this,o);var i=t.track,r=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled;var n=b(this,s.call(this,e,t));n.track=i,n.addClass("vjs-"+i.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];n.handleTracksChange.apply(n,t)};return r.addEventListener("change",a),n.on("dispose",function(){r.removeEventListener("change",a)}),n}return _(o,s),o.prototype.createEl=function(e,t,i){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(r+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n      "),r+="</span>",s.prototype.createEl.call(this,e,C({innerHTML:r},t),i)},o.prototype.handleClick=function(e){var t=this.player_.audioTracks();s.prototype.handleClick.call(this,e);for(var i=0;i<t.length;i++){var r=t[i];r.enabled=r===this.track}},o.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},o}(bn);Xe.registerComponent("AudioTrackMenuItem",xn);var Dn=function(i){function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return y(this,r),t.tracks=e.audioTracks(),b(this,i.call(this,e,t))}return _(r,i),r.prototype.buildCSSClass=function(){return"vjs-audio-button "+i.prototype.buildCSSClass.call(this)},r.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+i.prototype.buildWrapperCSSClass.call(this)},r.prototype.createItems=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var r=t[i];e.push(new xn(this.player_,{track:r,selectable:!0,multiSelectable:!1}))}return e},r}(_n);Dn.prototype.controlText_="Audio Track",Xe.registerComponent("AudioTrackButton",Dn);var Rn=function(a){function s(e,t){y(this,s);var i=t.rate,r=parseFloat(i,10);t.label=i,t.selected=1===r,t.selectable=!0,t.multiSelectable=!1;var n=b(this,a.call(this,e,t));return n.label=i,n.rate=r,n.on(e,"ratechange",n.update),n}return _(s,a),s.prototype.handleClick=function(e){a.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},s}(bn);Rn.prototype.contentElType="button",Xe.registerComponent("PlaybackRateMenuItem",Rn);var Mn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.updateVisibility(),i.updateLabel(),i.on(e,"loadstart",i.updateVisibility),i.on(e,"ratechange",i.updateLabel),i}return _(n,r),n.prototype.createEl=function(){var e=r.prototype.createEl.call(this);return this.labelEl_=M("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},n.prototype.dispose=function(){this.labelEl_=null,r.prototype.dispose.call(this)},n.prototype.buildCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildCSSClass.call(this)},n.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+r.prototype.buildWrapperCSSClass.call(this)},n.prototype.createMenu=function(){var e=new yn(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;0<=i;i--)e.addChild(new Rn(this.player(),{rate:t[i]+"x"}));return e},n.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),i=this.playbackRates(),r=i[0],n=0;n<i.length;n++)if(i[n]>t){r=i[n];break}this.player().playbackRate(r)},n.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},n.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},n.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},n}(vn);Mn.prototype.controlText_="Playback Rate",Xe.registerComponent("PlaybackRateMenuButton",Mn);var Un=function(e){function t(){return y(this,t),b(this,e.apply(this,arguments))}return _(t,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(Xe);Xe.registerComponent("Spacer",Un);var Nn=function(t){function e(){return y(this,e),b(this,t.apply(this,arguments))}return _(e,t),e.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(Un);Xe.registerComponent("CustomControlSpacer",Nn);var Bn=function(e){function t(){return y(this,t),b(this,e.apply(this,arguments))}return _(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Xe);Bn.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},Xe.registerComponent("ControlBar",Bn);var jn=function(r){function n(e,t){y(this,n);var i=b(this,r.call(this,e,t));return i.on(e,"error",i.open),i}return _(n,r),n.prototype.buildCSSClass=function(){return"vjs-error-display "+r.prototype.buildCSSClass.call(this)},n.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},n}(Nt);jn.prototype.options_=Ge(Nt.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Xe.registerComponent("ErrorDisplay",jn);var Fn="vjs-text-track-settings",Hn=["#000","Black"],Vn=["#00F","Blue"],qn=["#0FF","Cyan"],Wn=["#0F0","Green"],zn=["#F0F","Magenta"],Gn=["#F00","Red"],Xn=["#FFF","White"],Yn=["#FF0","Yellow"],$n=["1","Opaque"],Kn=["0.5","Semi-Transparent"],Qn=["0","Transparent"],Jn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Hn,Xn,Gn,Wn,Vn,Yn,zn,qn]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[$n,Kn,Qn]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Xn,Hn,Gn,Wn,Vn,Yn,zn,qn]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[$n,Kn]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Qn,Kn,$n]}};function Zn(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}Jn.windowColor.options=Jn.backgroundColor.options;var ea=function(r){function n(e,t){y(this,n),t.temporary=!1;var i=b(this,r.call(this,e,t));return i.updateDisplay=Oe(i,i.updateDisplay),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=M("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===t.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),k(Jn,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}return _(n,r),n.prototype.dispose=function(){this.endDialog=null,r.prototype.dispose.call(this)},n.prototype.createElSelect_=function(e){var i=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"label",n=Jn[e],a=n.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+r+' id="'+a+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(n.label),"</"+r+">",'<select aria-labelledby="'+s+'">'].concat(n.options.map(function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',i.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},n.prototype.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.prototype.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.prototype.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.prototype.createElColors_=function(){return M("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.prototype.createElFont_=function(){return M("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.prototype.createElControls_=function(){var e=this.localize("restore all settings to the default values");return M("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.prototype.label=function(){return this.localize("Caption Settings Dialog")},n.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.prototype.buildCSSClass=function(){return r.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.prototype.getValues=function(){var s=this;return function(i,r){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return S(i).reduce(function(e,t){return r(e,i[t],t)},e)}(Jn,function(e,t,i){var r,n,a=(r=s.$(t.selector),n=t.parser,Zn(r.options[r.options.selectedIndex].value,n));return void 0!==a&&(e[i]=a),e},{})},n.prototype.setValues=function(i){var r=this;k(Jn,function(e,t){!function(e,t,i){if(t)for(var r=0;r<e.options.length;r++)if(Zn(e.options[r].value,i)===t){e.selectedIndex=r;break}}(r.$(e.selector),i[t],e.parser)})},n.prototype.setDefaults=function(){var i=this;k(Jn,function(e){var t=e.hasOwnProperty("default")?e.default:0;i.$(e.selector).selectedIndex=t})},n.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(g.localStorage.getItem(Fn))}catch(e){f.warn(e)}e&&this.setValues(e)},n.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?g.localStorage.setItem(Fn,JSON.stringify(e)):g.localStorage.removeItem(Fn)}catch(e){f.warn(e)}}},n.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(p,"keydown",this.handleKeyDown);var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton;t?t.focus():i&&i.focus()},n}(Nt);Xe.registerComponent("TextTrackSettings",ea);var ta=function(a){function s(e,t){y(this,s);var i=t.ResizeObserver||g.ResizeObserver;null===t.ResizeObserver&&(i=!1);var r=Ge({createEl:!i},t),n=b(this,a.call(this,e,r));return n.ResizeObserver=t.ResizeObserver||g.ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=xe(function(){n.resizeHandler()},100,!1,e),i?(n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(e.el())):(n.loadListener_=function(){n.el_.contentWindow&&_e(n.el_.contentWindow,"resize",n.debouncedHandler_),n.off("load",n.loadListener_)},n.on("load",n.loadListener_)),n}return _(s,a),s.prototype.createEl=function(){return a.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})},s.prototype.resizeHandler=function(){this.player_.trigger("playerresize")},s.prototype.dispose=function(){this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.el_&&this.el_.contentWindow&&be(this.el_.contentWindow,"resize",this.debouncedHandler_),this.loadListener_&&this.off("load",this.loadListener_),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null},s}(Xe);Xe.registerComponent("ResizeManager",ta);var ia=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var i=e.$$("source"),r=[],n="";if(!i.length)return!1;for(var a=0;a<i.length;a++){var s=i[a].src;s&&-1===r.indexOf(s)&&r.push(s)}return!!r.length&&(1===r.length&&(n=r[0]),e.triggerSourceset(n),!0)},ra=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=p.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var i=p.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",g.Element.prototype.appendChild.call(this,i),this.innerHTML}}),na=function(e,t){for(var i={},r=0;r<e.length&&!((i=Object.getOwnPropertyDescriptor(e[r],t))&&i.set&&i.get);r++);return i.enumerable=!0,i.configurable=!0,i},aa=function(a){var s=a.el();if(!s.resetSourceWatch_){var t={},e=na([a.el(),g.HTMLMediaElement.prototype,g.Element.prototype,ra],"innerHTML"),i=function(n){return function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var r=n.apply(s,t);return ia(a),r}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){s[e]&&(t[e]=s[e],s[e]=i(t[e]))}),Object.defineProperty(s,"innerHTML",Ge(e,{set:i(e.set)})),s.resetSourceWatch_=function(){s.resetSourceWatch_=null,Object.keys(t).forEach(function(e){s[e]=t[e]}),Object.defineProperty(s,"innerHTML",e)},a.one("sourceset",s.resetSourceWatch_)}},sa=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Zt(g.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return g.Element.prototype.setAttribute.call(this,"src",e),e}}),oa=function(r){if(r.featuresSourceset){var n=r.el();if(!n.resetSourceset_){var i=na([r.el(),g.HTMLMediaElement.prototype,sa],"src"),a=n.setAttribute,t=n.load;Object.defineProperty(n,"src",Ge(i,{set:function(e){var t=i.set.call(n,e);return r.triggerSourceset(n.src),t}})),n.setAttribute=function(e,t){var i=a.call(n,e,t);return/src/i.test(e)&&r.triggerSourceset(n.src),i},n.load=function(){var e=t.call(n);return ia(r)||(r.triggerSourceset(""),aa(r)),e},n.currentSrc?r.triggerSourceset(n.currentSrc):ia(r)||aa(r),n.resetSourceset_=function(){n.resetSourceset_=null,n.load=t,n.setAttribute=a,Object.defineProperty(n,"src",i),n.resetSourceWatch_&&n.resetSourceWatch_()}}}},ua=h(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]),la=function(c){function h(e,t){y(this,h);var i=b(this,c.call(this,e,t)),r=e.source,n=!1;if(r&&(i.el_.currentSrc!==r.src||e.tag&&3===e.tag.initNetworkState_)?i.setSource(r):i.handleLateInit_(i.el_),e.enableSourceset&&i.setupSourcesetHandling_(),i.el_.hasChildNodes()){for(var a=i.el_.childNodes,s=a.length,o=[];s--;){var u=a[s];"track"===u.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(u),i.remoteTextTracks().addTrack(u.track),i.textTracks().addTrack(u.track),n||i.el_.hasAttribute("crossorigin")||!ti(u.src)||(n=!0)):o.push(u))}for(var l=0;l<o.length;l++)i.el_.removeChild(o[l])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&n&&f.warn(m(ua)),i.restoreMetadataTracksInIOSNativePlayer_(),(gt||it||ut)&&!0===e.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}return _(h,c),h.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),h.disposeMediaElement(this.el_),this.options_=null,c.prototype.dispose.call(this)},h.prototype.setupSourcesetHandling_=function(){oa(this)},h.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var r=this.textTracks(),n=void 0,e=function(){n=[];for(var e=0;e<r.length;e++){var t=r[e];"metadata"===t.kind&&n.push({track:t,storedMode:t.mode})}};e(),r.addEventListener("change",e),this.on("dispose",function(){return r.removeEventListener("change",e)});var t=function e(){for(var t=0;t<n.length;t++){var i=n[t];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}r.removeEventListener("change",e)};this.on("webkitbeginfullscreen",function(){r.removeEventListener("change",e),r.removeEventListener("change",t),r.addEventListener("change",t)}),this.on("webkitendfullscreen",function(){r.removeEventListener("change",e),r.addEventListener("change",e),r.removeEventListener("change",t)})},h.prototype.overrideNative_=function(e,t){var i=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach(function(e){i.el()[r+"Tracks"].removeEventListener(e,i[r+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},h.prototype.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},h.prototype.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},h.prototype.proxyNativeTracksForType_=function(e){var r=this,t=Ui[e],n=this.el()[t.getterName],a=this[t.getterName]();if(this["featuresNative"+t.capitalName+"Tracks"]&&n&&n.addEventListener){var s={change:function(e){a.trigger({type:"change",target:a,currentTarget:a,srcElement:a})},addtrack:function(e){a.addTrack(e.track)},removetrack:function(e){a.removeTrack(e.track)}},i=function(){for(var e=[],t=0;t<a.length;t++){for(var i=!1,r=0;r<n.length;r++)if(n[r]===a[t]){i=!0;break}i||e.push(a[t])}for(;e.length;)a.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=s,Object.keys(s).forEach(function(t){var i=s[t];n.addEventListener(t,i),r.on("dispose",function(e){return n.removeEventListener(t,i)})}),this.on("loadstart",i),this.on("dispose",function(e){return r.off("loadstart",i)})}},h.prototype.proxyNativeTracks_=function(){var t=this;Ui.names.forEach(function(e){t.proxyNativeTracksForType_(e)})},h.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),h.disposeMediaElement(e),e=t}else{e=p.createElement("video");var i=Ge({},this.options_.tag&&q(this.options_.tag));gt&&!0===this.options_.nativeControlsForTouch||delete i.controls,V(e,C(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}"undefined"!=typeof this.options_.preload&&z(e,"preload",this.options_.preload);for(var r=["loop","muted","playsinline","autoplay"],n=0;n<r.length;n++){var a=r[n],s=this.options_[a];"undefined"!=typeof s&&(s?z(e,a,a):G(e,a),e[a]=s)}return e},h.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",i),this.off("loadedmetadata",r),t||this.trigger("loadstart")})}var n=["loadstart"];n.push("loadedmetadata"),2<=e.readyState&&n.push("loadeddata"),3<=e.readyState&&n.push("canplay"),4<=e.readyState&&n.push("canplaythrough"),this.ready(function(){n.forEach(function(e){this.trigger(e)},this)})}},h.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){f(e,"Video is not ready. (Video.js)")}},h.prototype.duration=function(){var t=this;if(this.el_.duration===1/0&&st&&ht&&0===this.el_.currentTime){return this.on("timeupdate",function e(){0<t.el_.currentTime&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))}),NaN}return this.el_.duration||NaN},h.prototype.width=function(){return this.el_.offsetWidth},h.prototype.height=function(){return this.el_.offsetHeight},h.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)})}},h.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=g.navigator&&g.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},h.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){e.pause(),e.webkitEnterFullScreen()},0)):e.webkitEnterFullScreen()},h.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},h.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},h.prototype.reset=function(){h.resetMediaElement(this.el_)},h.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},h.prototype.setControls=function(e){this.el_.controls=!!e},h.prototype.addTextTrack=function(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):c.prototype.addTextTrack.call(this,e,t,i)},h.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return c.prototype.createRemoteTextTrack.call(this,e);var t=p.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t},h.prototype.addRemoteTextTrack=function(e,t){var i=c.prototype.addRemoteTextTrack.call(this,e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},h.prototype.removeRemoteTextTrack=function(e){if(c.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var t=this.$$("track"),i=t.length;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])},h.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),g.performance&&"function"==typeof g.performance.now?e.creationTime=g.performance.now():g.performance&&g.performance.timing&&"number"==typeof g.performance.timing.navigationStart&&(e.creationTime=g.Date.now()-g.performance.timing.navigationStart),e},h}(br);if(I()){la.TEST_VID=p.createElement("video");var ca=p.createElement("track");ca.kind="captions",ca.srclang="en",ca.label="English",la.TEST_VID.appendChild(ca)}la.isSupported=function(){try{la.TEST_VID.volume=.5}catch(e){return!1}return!(!la.TEST_VID||!la.TEST_VID.canPlayType)},la.canPlayType=function(e){return la.TEST_VID.canPlayType(e)},la.canPlaySource=function(e,t){return la.canPlayType(e.type)},la.canControlVolume=function(){try{var e=la.TEST_VID.volume;return la.TEST_VID.volume=e/2+.1,e!==la.TEST_VID.volume}catch(e){return!1}},la.canMuteVolume=function(){try{var e=la.TEST_VID.muted;return la.TEST_VID.muted=!e,la.TEST_VID.muted?z(la.TEST_VID,"muted","muted"):G(la.TEST_VID,"muted"),e!==la.TEST_VID.muted}catch(e){return!1}},la.canControlPlaybackRate=function(){if(st&&ht&&dt<58)return!1;try{var e=la.TEST_VID.playbackRate;return la.TEST_VID.playbackRate=e/2+.1,e!==la.TEST_VID.playbackRate}catch(e){return!1}},la.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(p.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(p.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(p.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(p.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},la.supportsNativeTextTracks=function(){return mt||nt&&ht},la.supportsNativeVideoTracks=function(){return!(!la.TEST_VID||!la.TEST_VID.videoTracks)},la.supportsNativeAudioTracks=function(){return!(!la.TEST_VID||!la.TEST_VID.audioTracks)},la.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],la.prototype.featuresVolumeControl=la.canControlVolume(),la.prototype.featuresMuteControl=la.canMuteVolume(),la.prototype.featuresPlaybackRate=la.canControlPlaybackRate(),la.prototype.featuresSourceset=la.canOverrideAttributes(),la.prototype.movingMediaElementInDOM=!nt,la.prototype.featuresFullscreenResize=!0,la.prototype.featuresProgressEvents=!0,la.prototype.featuresTimeupdateEvents=!0,la.prototype.featuresNativeTextTracks=la.supportsNativeTextTracks(),la.prototype.featuresNativeVideoTracks=la.supportsNativeVideoTracks(),la.prototype.featuresNativeAudioTracks=la.supportsNativeAudioTracks();var ha=la.TEST_VID&&la.TEST_VID.constructor.prototype.canPlayType,da=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;la.patchCanPlayType=function(){4<=ot&&!lt&&!ht&&(la.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&da.test(e)?"maybe":ha.call(this,e)})},la.unpatchCanPlayType=function(){var e=la.TEST_VID.constructor.prototype.canPlayType;return la.TEST_VID.constructor.prototype.canPlayType=ha,e},la.patchCanPlayType(),la.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},la.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){la.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){la.prototype["set"+ze(t)]=function(e){(this.el_[t]=e)?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(e){la.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(t){la.prototype["set"+ze(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(e){la.prototype[e]=function(){return this.el_[e]()}}),br.withSourceHandlers(la),la.nativeSourceHandler={},la.nativeSourceHandler.canPlayType=function(e){try{return la.TEST_VID.canPlayType(e)}catch(e){return""}},la.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return la.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=ei(e.src);return la.nativeSourceHandler.canPlayType("video/"+i)}return""},la.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},la.nativeSourceHandler.dispose=function(){},la.registerSourceHandler(la.nativeSourceHandler),br.registerTech("Html5",la);var pa=h(["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "],["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "]),fa=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ma={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ga=function(c){function h(e,t,i){if(y(this,h),e.id=e.id||t.id||"vjs_video_"+ue(),(t=C(h.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language)if("function"==typeof e.closest){var r=e.closest("[lang]");r&&r.getAttribute&&(t.language=r.getAttribute("lang"))}else for(var n=e;n&&1===n.nodeType;){if(q(n).hasOwnProperty("lang")){t.language=n.getAttribute("lang");break}n=n.parentNode}var a=b(this,c.call(this,null,t,i));if(a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=e,a.tagAttributes=e&&q(e),a.language(a.options_.language),t.languages){var s={};Object.getOwnPropertyNames(t.languages).forEach(function(e){s[e.toLowerCase()]=t.languages[e]}),a.languages_=s}else a.languages_=h.prototype.options_.languages;a.cache_={},a.poster_=t.poster||"",a.controls_=!!t.controls,a.cache_.lastVolume=1,e.controls=!1,e.removeAttribute("controls"),e.hasAttribute("autoplay")?a.options_.autoplay=!0:a.autoplay(a.options_.autoplay),a.scrubbing_=!1,a.el_=a.createEl(),a.cache_.lastPlaybackRate=a.defaultPlaybackRate(),Ve(a,{eventBusKey:"el_"});var o=Ge(a.options_);if(t.plugins){var u=t.plugins;Object.keys(u).forEach(function(e){if("function"!=typeof this[e])throw new Error('plugin "'+e+'" does not exist');this[e](u[e])},a)}a.options_.playerOptions=o,a.middleware_=[],a.initChildren(),a.isAudio("audio"===e.nodeName.toLowerCase()),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),nt||a.addClass("vjs-workinghover"),h.players[a.id_]=a;var l=d.split(".")[0];return a.addClass("vjs-v"+l),a.userActive(!0),a.reportUserActivity(),a.one("play",a.listenForUserActivity_),a.on("fullscreenchange",a.handleFullscreenChange_),a.on("stageclick",a.handleStageClick_),a.changingSrc_=!1,a.playWaitingForReady_=!1,a.playOnLoadstart_=null,a}return _(h,c),h.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),h.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Sr[this.id()]=null,c.prototype.dispose.call(this)},h.prototype.createEl=function(){var t=this.tag,i=void 0,e=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();e?i=this.el_=t.parentNode:r||(i=this.el_=c.prototype.createEl.call(this,"div"));var n=q(t);if(r){for(i=this.el_=t,t=this.tag=p.createElement("video");i.children.length;)t.appendChild(i.firstChild);B(i,"video-js")||j(i,"video-js"),i.appendChild(t),e=this.playerElIngest_=i,Object.keys(i).forEach(function(e){t[e]=i[e]})}if(t.setAttribute("tabindex","-1"),pt&&t.setAttribute("role","application"),t.removeAttribute("width"),t.removeAttribute("height"),Object.getOwnPropertyNames(n).forEach(function(e){r&&"class"===e||i.setAttribute(e,n[e]),r&&t.setAttribute(e,n[e])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=i.player=this,this.addClass("vjs-paused"),!0!==g.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Le("vjs-styles-dimensions");var a=ne(".vjs-styles-defaults"),s=ne("head");s.insertBefore(this.styleEl_,a?a.nextSibling:s.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var o=t.getElementsByTagName("a"),u=0;u<o.length;u++){var l=o.item(u);j(l,"vjs-hidden"),l.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!e&&t.parentNode.insertBefore(i,t),N(t,i),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_=i},h.prototype.width=function(e){return this.dimension("width",e)},h.prototype.height=function(e){return this.dimension("height",e)},h.prototype.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t)return this[i]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?f.error('Improper value "'+t+'" supplied for for '+e):(this[i]=r,this.updateStyleEl_())},h.prototype.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,e?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},h.prototype.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},h.prototype.updateStyleEl_=function(){if(!0!==g.VIDEOJS_NO_DYNAMIC_STYLE){var e=void 0,t=void 0,i=void 0,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=r[1]/r[0];if(stprovideos.gallery_image_size)n=(n>(stprovideos.gallery_image_size.height/stprovideos.gallery_image_size.width))?1:n;e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/n:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*n,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),Pe(this.styleEl_,"\n      ."+i+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+i+".vjs-fluid {\n        padding-top: "+100*n+"%;\n      }\n    ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,s="number"==typeof this.height_?this.height_:this.options_.height,o=this.tech_&&this.tech_.el();o&&(0<=a&&(o.width=a),0<=s&&(o.height=s))}},h.prototype.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_();var r=ze(e),n=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==r&&this.tag&&(br.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=r,this.isReady_=!1;var a={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Bi.names.forEach(function(e){var t=Bi[e];a[t.getterName]=i[t.privateName]}),C(a,this.options_[r]),C(a,this.options_[n]),C(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&0<this.cache_.currentTime&&(a.startTime=this.cache_.currentTime);var s=br.getTech(e);if(!s)throw new Error("No Tech named '"+r+"' exists! '"+r+"' should be registered using videojs.registerTech()'");this.tech_=new s(a),this.tech_.ready(Oe(this,this.handleTechReady_),!0),Mt(this.textTracksJson_||[],this.tech_),fa.forEach(function(e){i.on(i.tech_,e,i["handleTech"+ze(e)+"_"])}),Object.keys(ma).forEach(function(t){i.on(i.tech_,t,function(e){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+ma[t]+"_"].bind(i),event:e}):i["handleTech"+ma[t]+"_"](e)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===r&&this.tag||N(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},h.prototype.unloadTech_=function(){var i=this;Bi.names.forEach(function(e){var t=Bi[e];i[t.privateName]=i[t.getterName]()}),this.textTracksJson_=Rt(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},h.prototype.tech=function(e){return void 0===e&&f.warn(m(pa)),this.tech_},h.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},h.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},h.prototype.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},h.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},h.prototype.manualAutoplay_=function(t){var i=this;if(this.tech_&&"string"==typeof t){var e=function(){var t=i.muted();i.muted(!0);var e=i.play();if(e&&e.then&&e.catch)return e.catch(function(e){i.muted(t)})},r=void 0;if("any"===t?(r=this.play())&&r.then&&r.catch&&r.catch(function(){return e()}):r="muted"===t?e():this.play(),r&&r.then&&r.catch)return r.then(function(){i.trigger({type:"autoplay-success",autoplay:t})}).catch(function(e){i.trigger({type:"autoplay-failure",autoplay:t})})}},h.prototype.updateSourceCaches_=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var i=e.cache_.sources.filter(function(e){return e.src===t});if(i.length)return i[0].type;for(var r=e.$$("source"),n=0;n<r.length;n++){var a=r[n];if(a.type&&a.src&&a.src===t)return a.type}return Ir(t)}(this,t)),this.cache_.source=Ge({},e,{src:t,type:i});for(var r=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),n=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var u=q(a[o]);n.push(u),u.src&&u.src===t&&s.push(u.src)}s.length&&!r.length?this.cache_.sources=n:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},h.prototype.handleTechSourceset_=function(e){var i=this;if(!this.changingSrc_&&(this.updateSourceCaches_(e.src),!e.src)){this.tech_.one(["sourceset","loadstart"],function e(t){"sourceset"!==t.type&&i.updateSourceCaches_(i.techGet_("currentSrc")),i.tech_.off(["sourceset","loadstart"],e)})}this.trigger({src:e.src,type:"sourceset"})},h.prototype.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},h.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},h.prototype.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},h.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return e.removeClass("vjs-waiting")})},h.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},h.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},h.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},h.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},h.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},h.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(f.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},h.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},h.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},h.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},h.prototype.handleTechClick_=function(e){re(e)&&this.controls_&&(this.paused()?xt(this.play()):this.pause())},h.prototype.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(e){return e.contains(t.target)})||(this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},h.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},h.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},h.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},h.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},h.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},h.prototype.handleStageClick_=function(){this.reportUserActivity()},h.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},h.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},h.prototype.handleTechTextData_=function(){var e=null;1<arguments.length&&(e=arguments[1]),this.trigger("textdata",e)},h.prototype.getCache=function(){return this.cache_},h.prototype.techCall_=function(n,a){this.ready(function(){if(n in Ar)return e=this.middleware_,t=this.tech_,r=a,t[i=n](e.reduce(Pr(i),r));if(n in Lr)return Er(this.middleware_,this.tech_,n,a);var e,t,i,r;try{this.tech_&&this.tech_[n](a)}catch(e){throw f(e),e}},!0)},h.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in wr)return e=this.middleware_,i=this.tech_,r=t,e.reduceRight(Pr(r),i[r]());if(t in Lr)return Er(this.middleware_,this.tech_,t);var e,i,r;try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw f("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw f("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw f(e),e}}},h.prototype.play=function(){var e=this;if(this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_),this.isReady_){if(!this.changingSrc_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.playOnLoadstart_=function(){e.playOnLoadstart_=null,xt(e.play())},this.one("loadstart",this.playOnLoadstart_)}else{if(this.playWaitingForReady_)return;this.playWaitingForReady_=!0,this.ready(function(){e.playWaitingForReady_=!1,xt(e.play())})}},h.prototype.pause=function(){this.techCall_("pause")},h.prototype.paused=function(){return!1!==this.techGet_("paused")},h.prototype.played=function(){return this.techGet_("played")||bt(0,0)},h.prototype.scrubbing=function(e){if("undefined"==typeof e)return this.scrubbing_;this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},h.prototype.currentTime=function(e){return"undefined"!=typeof e?(e<0&&(e=0),void this.techCall_("setCurrentTime",e)):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},h.prototype.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&((this.cache_.duration=e)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},h.prototype.remainingTime=function(){return this.duration()-this.currentTime()},h.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},h.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=bt(0,0)),e},h.prototype.bufferedPercent=function(){return Tt(this.buffered(),this.duration())},h.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return t<i&&(i=t),i},h.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(0<t&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},h.prototype.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},h.prototype.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},h.prototype.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},h.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},h.prototype.isFullscreen=function(e){if(void 0===e)return!!this.isFullscreen_;this.isFullscreen_=!!e},h.prototype.requestFullscreen=function(){var i=St;this.isFullscreen(!0),i.requestFullscreen?(_e(p,i.fullscreenchange,Oe(this,function e(t){this.isFullscreen(p[i.fullscreenElement]),!1===this.isFullscreen()&&be(p,i.fullscreenchange,e),this.trigger("fullscreenchange")})),this.el_[i.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},h.prototype.exitFullscreen=function(){var e=St;this.isFullscreen(!1),e.requestFullscreen?p[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},h.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=p.documentElement.style.overflow,_e(p,"keydown",Oe(this,this.fullWindowOnEscKey)),p.documentElement.style.overflow="hidden",j(p.body,"vjs-full-window"),this.trigger("enterFullWindow")},h.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},h.prototype.exitFullWindow=function(){this.isFullWindow=!1,be(p,"keydown",this.fullWindowOnEscKey),p.documentElement.style.overflow=this.docOrigOverflow,F(p.body,"vjs-full-window"),this.trigger("exitFullWindow")},h.prototype.canPlayType=function(e){for(var t=void 0,i=0,r=this.options_.techOrder;i<r.length;i++){var n=r[i],a=br.getTech(n);if(a||(a=Xe.getComponent(n)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else f.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},h.prototype.selectSource=function(e){var i,r=this,t=this.options_.techOrder.map(function(e){return[e,br.getTech(e)]}).filter(function(e){var t=e[0],i=e[1];return i?i.isSupported():(f.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),n=function(e,i,r){var n=void 0;return e.some(function(t){return i.some(function(e){if(n=r(t,e))return!0})}),n},a=function(e,t){var i=e[0];if(e[1].canPlaySource(t,r.options_[i.toLowerCase()]))return{source:t,tech:i}};return(this.options_.sourceOrder?n(e,t,(i=a,function(e,t){return i(t,e)})):n(t,e,a))||!1},h.prototype.src=function(e){var n=this;if("undefined"==typeof e)return this.cache_.src||"";var a=function t(e){if(Array.isArray(e)){var i=[];e.forEach(function(e){e=t(e),Array.isArray(e)?i=i.concat(e):E(e)&&i.push(e)}),e=i}else e="string"==typeof e&&e.trim()?[xr({src:e})]:E(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[xr(e)]:[];return e}(e);a.length?(this.changingSrc_=!0,this.cache_.sources=a,this.updateSourceCaches_(a[0]),Cr(this,a[0],function(e,t){var i,r;if(n.middleware_=t,n.cache_.sources=a,n.updateSourceCaches_(e),n.src_(e))return 1<a.length?n.src(a.slice(1)):(n.changingSrc_=!1,n.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void n.triggerReady());i=t,r=n.tech_,i.forEach(function(e){return e.setTech&&e.setTech(r)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},h.prototype.src_=function(e){var t,i,r=this,n=this.selectSource([e]);return!n||(t=n.tech,i=this.techName_,ze(t)!==ze(i)?(this.changingSrc_=!0,this.loadTech_(n.tech,n.source),this.tech_.ready(function(){r.changingSrc_=!1})):this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1)},h.prototype.load=function(){this.techCall_("load")},h.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},h.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},h.prototype.currentSource=function(){return this.cache_.source||{}},h.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},h.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},h.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},h.prototype.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t=void 0;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t=t||this.options_.autoplay,this.tech_&&this.techCall_("setAutoplay",t)},h.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},h.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},h.prototype.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},h.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},h.prototype.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},h.prototype.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},h.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new Lt(e),this.addClass("vjs-error"),f.error("(CODE:"+this.error_.code+" "+Lt.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},h.prototype.reportUserActivity=function(e){this.userActivity_=!0},h.prototype.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},h.prototype.listenForUserActivity_=function(){var t=void 0,i=void 0,r=void 0,n=Oe(this,this.reportUserActivity);this.on("mousedown",function(){n(),this.clearInterval(t),t=this.setInterval(n,250)}),this.on("mousemove",function(e){e.screenX===i&&e.screenY===r||(i=e.screenX,r=e.screenY,n())}),this.on("mouseup",function(e){n(),this.clearInterval(t)}),this.on("keydown",n),this.on("keyup",n);var a=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},h.prototype.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},h.prototype.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},h.prototype.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},h.prototype.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},h.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},h.prototype.removeRemoteTextTrack=function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).track,t=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(t)},h.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},h.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},h.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},h.prototype.language=function(e){if(void 0===e)return this.language_;this.language_=String(e).toLowerCase()},h.prototype.languages=function(){return Ge(h.prototype.options_.languages,this.languages_)},h.prototype.toJSON=function(){var e=Ge(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var r=t[i];(r=Ge(r)).player=void 0,e.tracks[i]=r}return e},h.prototype.createModal=function(e,t){var i=this;(t=t||{}).content=e||"";var r=new Nt(this,t);return this.addChild(r),r.on("dispose",function(){i.removeChild(r)}),r.open(),r},h.getTagSettings=function(e){var t={sources:[],tracks:[]},i=q(e),r=i["data-setup"];if(B(e,"vjs-fluid")&&(i.fluid=!0),null!==r){var n=Ot(r||"{}"),a=n[0],s=n[1];a&&f.error(a),C(i,s)}if(C(t,i),e.hasChildNodes())for(var o=e.childNodes,u=0,l=o.length;u<l;u++){var c=o[u],h=c.nodeName.toLowerCase();"source"===h?t.sources.push(q(c)):"track"===h&&t.tracks.push(q(c))}return t},h.prototype.flexNotSupported_=function(){var e=p.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},h}(Xe);Bi.names.forEach(function(e){var t=Bi[e];ga.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),ga.players={};var ya=g.navigator;ga.prototype.options_={techOrder:br.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:ya&&(ya.languages&&ya.languages[0]||ya.userLanguage||ya.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){ga.prototype[e]=function(){return this.techGet_(e)}}),fa.forEach(function(e){ga.prototype["handleTech"+ze(e)+"_"]=function(){return this.trigger(e)}}),Xe.registerComponent("Player",ga);var va="plugin",_a="activePlugins_",ba={},Ta=function(e){return ba.hasOwnProperty(e)},Sa=function(e){return Ta(e)?ba[e]:void 0},ka=function(e,t){e[_a]=e[_a]||{},e[_a][t]=!0},Ca=function(e,t,i){var r=(i?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},Ea=function(n,a){return a.prototype.name=n,function(){Ca(this,{name:n,plugin:a,instance:null},!0);for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];var r=new(Function.prototype.bind.apply(a,[null].concat([this].concat(t))));return this[n]=function(){return r},Ca(this,r.getEventHash()),r}},wa=function(){function a(e){if(y(this,a),this.constructor===a)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,Ve(this),delete this.trigger,We(this,this.constructor.defaultState),ka(e,this.name),this.dispose=Oe(this,this.dispose),e.on("dispose",this.dispose)}return a.prototype.version=function(){return this.constructor.VERSION},a.prototype.getEventHash=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.name=this.name,e.plugin=this.constructor,e.instance=this,e},a.prototype.trigger=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Te(this.eventBusEl_,e,this.getEventHash(t))},a.prototype.handleStateChanged=function(e){},a.prototype.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[_a][e]=!1,this.player=this.state=null,t[e]=Ea(e,ba[e])},a.isBasic=function(e){var t="string"==typeof e?Sa(e):e;return"function"==typeof t&&!a.prototype.isPrototypeOf(t.prototype)},a.registerPlugin=function(e,t){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+("undefined"==typeof e?"undefined":v(e))+".");if(Ta(e))f.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(ga.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof t)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+("undefined"==typeof t?"undefined":v(t))+".");var i,r,n;return ba[e]=t,e!==va&&(a.isBasic(t)?ga.prototype[e]=(i=e,r=t,n=function(){Ca(this,{name:i,plugin:r,instance:null},!0);var e=r.apply(this,arguments);return ka(this,i),Ca(this,{name:i,plugin:r,instance:e}),e},Object.keys(r).forEach(function(e){n[e]=r[e]}),n):ga.prototype[e]=Ea(e,t)),t},a.deregisterPlugin=function(e){if(e===va)throw new Error("Cannot de-register base plugin.");Ta(e)&&(delete ba[e],delete ga.prototype[e])},a.getPlugins=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Object.keys(ba),i=void 0;return e.forEach(function(e){var t=Sa(e);t&&((i=i||{})[e]=t)}),i},a.getPluginVersion=function(e){var t=Sa(e);return t&&t.VERSION||""},a}();wa.getPlugin=Sa,wa.BASE_PLUGIN_NAME=va,wa.registerPlugin(va,wa),ga.prototype.usingPlugin=function(e){return!!this[_a]&&!0===this[_a][e]},ga.prototype.hasPlugin=function(e){return!!Ta(e)};var Aa=function(e){return 0===e.indexOf("#")?e.slice(1):e};function La(e,i,t){var r=La.getPlayer(e);if(r)return i&&f.warn('Player "'+e+'" is already initialised. Options will not be applied.'),t&&r.ready(t),r;var n="string"==typeof e?ne("#"+Aa(e)):e;if(!x(n))throw new TypeError("The element or ID supplied is not valid. (videojs)");p.body.contains(n)||f.warn("The element supplied is not included in the DOM"),i=i||{},La.hooks("beforesetup").forEach(function(e){var t=e(n,Ge(i));E(t)&&!Array.isArray(t)?i=Ge(i,t):f.error("please return an object in beforesetup hooks")});var a=Xe.getComponent("Player");return r=new a(n,i,t),La.hooks("setup").forEach(function(e){return e(r)}),r}if(La.hooks_={},La.hooks=function(e,t){return La.hooks_[e]=La.hooks_[e]||[],t&&(La.hooks_[e]=La.hooks_[e].concat(t)),La.hooks_[e]},La.hook=function(e,t){La.hooks(e,t)},La.hookOnce=function(i,e){La.hooks(i,[].concat(e).map(function(t){return function e(){return La.removeHook(i,e),t.apply(void 0,arguments)}}))},La.removeHook=function(e,t){var i=La.hooks(e).indexOf(t);return!(i<=-1)&&(La.hooks_[e]=La.hooks_[e].slice(),La.hooks_[e].splice(i,1),!0)},!0!==g.VIDEOJS_NO_DYNAMIC_STYLE&&I()){var Pa=ne(".vjs-styles-defaults");if(!Pa){Pa=Le("vjs-styles-defaults");var Oa=ne("head");Oa&&Oa.insertBefore(Pa,Oa.firstChild),Pe(Pa,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}Ae(1,La),La.VERSION=d,La.options=ga.prototype.options_,La.getPlayers=function(){return ga.players},La.getPlayer=function(e){var t=ga.players,i=void 0;if("string"==typeof e){var r=Aa(e),n=t[r];if(n)return n;i=ne("#"+r)}else i=e;if(x(i)){var a=i,s=a.player,o=a.playerId;if(s||t[o])return s||t[o]}},La.getAllPlayers=function(){return Object.keys(ga.players).map(function(e){return ga.players[e]}).filter(Boolean)},La.players=ga.players,La.getComponent=Xe.getComponent,La.registerComponent=function(e,t){br.isTech(t)&&f.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Xe.registerComponent.call(Xe,e,t)},La.getTech=br.getTech,La.registerTech=br.registerTech,La.use=function(e,t){Tr[e]=Tr[e]||[],Tr[e].push(t)},Object.defineProperty(La,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(La.middleware,"TERMINATOR",{value:kr,writeable:!1,enumerable:!0}),La.browser=yt,La.TOUCH_ENABLED=gt,La.extend=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=function(){e.apply(this,arguments)},r={};for(var n in"object"===("undefined"==typeof t?"undefined":v(t))?(t.constructor!==Object.prototype.constructor&&(i=t.constructor),r=t):"function"==typeof t&&(i=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":v(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.super_=t)}(i,e),r)r.hasOwnProperty(n)&&(i.prototype[n]=r[n]);return i},La.mergeOptions=Ge,La.bind=Oe,La.registerPlugin=wa.registerPlugin,La.plugin=function(e,t){return f.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),wa.registerPlugin(e,t)},La.getPlugins=wa.getPlugins,La.getPlugin=wa.getPlugin,La.getPluginVersion=wa.getPluginVersion,La.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),La.options.languages=Ge(La.options.languages,((i={})[e]=t,i)),La.options.languages[e]},La.log=f,La.createTimeRange=La.createTimeRanges=bt,La.formatTime=Yr,La.setFormatTime=function(e){Xr=e},La.resetFormatTime=function(){Xr=Gr},La.parseUrl=Jt,La.isCrossOrigin=ti,La.EventTarget=De,La.on=_e,La.one=Se,La.off=be,La.trigger=Te,La.xhr=Ci,La.TextTrack=Oi,La.AudioTrack=Ii,La.VideoTrack=xi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){La[e]=function(){return f.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),se[e].apply(null,arguments)}}),La.computedStyle=A,La.dom=se,La.url=ii;var Ia=t(function(e,t){var i,c,r,n,h;i=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,c=/^([^\/;?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,h={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=h.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=h.normalizePath(r.path),h.buildURLFromParts(r)}var n=h.parseURL(t);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return i.alwaysNormalize?(n.path=h.normalizePath(n.path),h.buildURLFromParts(n)):t;var a=h.parseURL(e);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var s=c.exec(a.path);a.netLoc=s[1],a.path=s[2]}a.netLoc&&!a.path&&(a.path="/");var o={scheme:a.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(o.netLoc=a.netLoc,"/"!==n.path[0]))if(n.path){var u=a.path,l=u.substring(0,u.lastIndexOf("/")+1)+n.path;o.path=h.normalizePath(l)}else o.path=a.path,n.params||(o.params=a.params,n.query||(o.query=a.query));return null===o.path&&(o.path=i.alwaysNormalize?h.normalizePath(n.path):n.path),h.buildURLFromParts(o)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(n,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=h}),xa=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Da=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},Ra=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":v(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Ma=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":v(t))&&"function"!=typeof t?e:t},Ua=function(){function e(){xa(this,e),this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),-1<i},e.prototype.trigger=function(e){var t=this.listeners[e],i=void 0,r=void 0,n=void 0;if(t)if(2===arguments.length)for(r=t.length,i=0;i<r;++i)t[i].call(this,arguments[1]);else for(n=Array.prototype.slice.call(arguments,1),r=t.length,i=0;i<r;++i)t[i].apply(this,n)},e.prototype.dispose=function(){this.listeners={}},e.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},e}(),Na=function(t){function i(){xa(this,i);var e=Ma(this,t.call(this));return e.buffer="",e}return Ra(i,t),i.prototype.push=function(e){var t=void 0;for(this.buffer+=e,t=this.buffer.indexOf("\n");-1<t;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},i}(Ua),Ba=function(e){for(var t=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},r=t.length,n=void 0;r--;)""!==t[r]&&((n=/([^=]*)=(.*)/.exec(t[r]).slice(1))[0]=n[0].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^\s+|\s+$/g,""),n[1]=n[1].replace(/^['"](.*)['"]$/g,"$1"),i[n[0]]=n[1]);return i},ja=function(t){function i(){xa(this,i);var e=Ma(this,t.call(this));return e.customParsers=[],e}return Ra(i,t),i.prototype.push=function(e){var t=void 0,i=void 0;if(0!==(e=e.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"")).length)if("#"===e[0]){for(var r=0;r<this.customParsers.length;r++)if(this.customParsers[r].call(this,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))this.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return i={type:"tag",tagType:"inf"},t[1]&&(i.duration=parseFloat(t[1])),t[2]&&(i.title=t[2]),void this.trigger("data",i);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"targetduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"totalduration"},t[1]&&(i.duration=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"version"},t[1]&&(i.version=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"media-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return i={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(i.number=parseInt(t[1],10)),void this.trigger("data",i);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return i={type:"tag",tagType:"playlist-type"},t[1]&&(i.playlistType=t[1]),void this.trigger("data",i);if(t=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return i={type:"tag",tagType:"byterange"},t[1]&&(i.length=parseInt(t[1],10)),t[2]&&(i.offset=parseInt(t[2],10)),void this.trigger("data",i);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return i={type:"tag",tagType:"allow-cache"},t[1]&&(i.allowed=!/NO/.test(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"map"},t[1]){var n=Ba(t[1]);if(n.URI&&(i.uri=n.URI),n.BYTERANGE){var a=n.BYTERANGE.split("@"),s=a[0],o=a[1];i.byterange={},s&&(i.byterange.length=parseInt(s,10)),o&&(i.byterange.offset=parseInt(o,10))}}this.trigger("data",i)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(i={type:"tag",tagType:"stream-inf"},t[1]){if(i.attributes=Ba(t[1]),i.attributes.RESOLUTION){var u=i.attributes.RESOLUTION.split("x"),l={};u[0]&&(l.width=parseInt(u[0],10)),u[1]&&(l.height=parseInt(u[1],10)),i.attributes.RESOLUTION=l}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}this.trigger("data",i)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return i={type:"tag",tagType:"media"},t[1]&&(i.attributes=Ba(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-ENDLIST/.exec(e))this.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))this.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return i={type:"tag",tagType:"program-date-time"},t[1]&&(i.dateTimeString=t[1],i.dateTimeObject=new Date(t[1])),void this.trigger("data",i);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return i={type:"tag",tagType:"key"},t[1]&&(i.attributes=Ba(t[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void this.trigger("data",i);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return i={type:"tag",tagType:"start"},t[1]&&(i.attributes=Ba(t[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out-cont"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-out"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return i={type:"tag",tagType:"cue-in"},t[1]?i.data=t[1]:i.data="",void this.trigger("data",i);this.trigger("data",{type:"tag",data:e.slice(4)})}}}else this.trigger("data",{type:"comment",text:e.slice(1)})}else this.trigger("data",{type:"uri",uri:e})},i.prototype.addParser=function(e){var t=this,i=e.expression,r=e.customType,n=e.dataParser,a=e.segment;"function"!=typeof n&&(n=function(e){return e}),this.customParsers.push(function(e){if(i.exec(e))return t.trigger("data",{type:"custom",data:n(e),customType:r,segment:a}),!0})},i}(Ua),Fa=function(t){function i(){xa(this,i);var e=Ma(this,t.call(this));e.lineStream=new Na,e.parseStream=new ja,e.lineStream.pipe(e.parseStream);var n=e,a=[],s={},o=void 0,u=void 0,l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;return e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},e.parseStream.on("data",function(t){var i=void 0,r=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&((s.byterange=e).length=t.length,"offset"in t||(this.trigger("info",{message:"defaulting offset to zero"}),t.offset=0)),"offset"in t&&((s.byterange=e).offset=t.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),0<t.duration&&(s.duration=t.duration),0===t.duration&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},key:function(){t.attributes?"NONE"!==t.attributes.METHOD?t.attributes.URI?(t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),u={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},"undefined"!=typeof t.attributes.IV&&(u.iv=t.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):u=null:this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,c=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){o={},t.uri&&(o.uri=t.uri),t.byterange&&(o.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||l,t.attributes?(s.attributes||(s.attributes={}),Da(s.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME){var e=this.manifest.mediaGroups[t.attributes.TYPE];e[t.attributes["GROUP-ID"]]=e[t.attributes["GROUP-ID"]]||{},i=e[t.attributes["GROUP-ID"]],(r={default:/yes/i.test(t.attributes.DEFAULT)}).default?r.autoselect=!0:r.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(r.language=t.attributes.LANGUAGE),t.attributes.URI&&(r.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(r.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(r.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(r.forced=/yes/i.test(t.attributes.FORCED)),i[t.attributes.NAME]=r}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){"undefined"==typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),s.dateTimeString=t.dateTimeString,s.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){s.cueOut=t.data},"cue-out-cont":function(){s.cueOutCont=t.data},"cue-in":function(){s.cueIn=t.data}}[t.tagType]||function(){}).call(n)},uri:function(){s.uri=t.uri,a.push(s),!this.manifest.targetDuration||"duration"in s||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),u&&(s.key=u),s.timeline=c,o&&(s.map=o),s={}},comment:function(){},custom:function(){t.segment?(s.custom=s.custom||{},s.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(n)}),e}return Ra(i,t),i.prototype.push=function(e){this.lineStream.push(e)},i.prototype.end=function(){this.lineStream.push("\n")},i.prototype.addParser=function(e){this.parseStream.addParser(e)},i}(Ua),Ha=function(e){var t,i=e.attributes,r=e.segments,n={attributes:(t={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:r,mediaSequence:r.length?r[0].number:1};return i.contentProtection&&(n.contentProtection=i.contentProtection),n},Va="function"==typeof Symbol&&"symbol"===v(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":v(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"==typeof e?"undefined":v(e)},qa=function(e){return!!e&&"object"===("undefined"==typeof e?"undefined":Va(e))},Wa=function r(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce(function(t,i){return Object.keys(i).forEach(function(e){Array.isArray(t[e])&&Array.isArray(i[e])?t[e]=t[e].concat(i[e]):qa(t[e])&&qa(i[e])?t[e]=r(t[e],i[e]):t[e]=i[e]}),t},{})},za=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=Ia.buildAbsoluteURL(g.location.href,e)),Ia.buildAbsoluteURL(e,t))},Ga=function(e){var t=e.baseUrl,i=void 0===t?"":t,r=e.source,n=void 0===r?"":r,a=e.range,s=void 0===a?"":a,o={uri:n,resolvedUri:za(i||"",n)};if(s){var u=s.split("-"),l=parseInt(u[0],10),c=parseInt(u[1],10);o.byterange={length:c-l,offset:l}}return o},Xa=function(e,t){for(var i,r,n,a,s,o,u,l,c,h,d,p,f=e.type,m=void 0===f?"static":f,g=e.minimumUpdatePeriod,y=void 0===g?0:g,v=e.media,_=void 0===v?"":v,b=e.sourceDuration,T=e.timescale,S=void 0===T?1:T,k=e.startNumber,C=void 0===k?1:k,E=e.periodIndex,w=[],A=-1,L=0;L<t.length;L++){var P=t[L],O=P.d,I=P.r||0,x=P.t||0;A<0&&(A=x),x&&A<x&&(A=x);var D=void 0;if(I<0){var R=L+1;R===t.length?"dynamic"===m&&0<y&&0<_.indexOf("$Number$")?(r=A,n=O,void 0,a=(i=e).NOW,s=i.clientOffset,o=i.availabilityStartTime,u=i.timescale,l=void 0===u?1:u,c=i.start,h=void 0===c?0:c,d=i.minimumUpdatePeriod,p=(a+s)/1e3+(void 0===d?0:d)-(o+h),D=Math.ceil((p*l-r)/n)):D=(b*S-A)/O:D=(t[R].t-A)/O}else D=I+1;for(var M=C+w.length+D,U=C+w.length;U<M;)w.push({number:U,duration:O/S,time:A,timeline:E}),A+=O,U++}return w},Ya=function(e){return e.reduce(function(e,t){return e.concat(t)},[])},$a=function(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},Ka={static:function(e){var t=e.duration,i=e.timescale,r=void 0===i?1:i,n=e.sourceDuration;return{start:0,end:Math.ceil(n/(t/r))}},dynamic:function(e){var t=e.NOW,i=e.clientOffset,r=e.availabilityStartTime,n=e.timescale,a=void 0===n?1:n,s=e.duration,o=e.start,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,h=e.timeShiftBufferDepth,d=void 0===h?1/0:h,p=(t+i)/1e3,f=r+u,m=p+c-f,g=Math.ceil(m*a/s),y=Math.floor((p-f-d)*a/s),v=Math.floor((p-f)*a/s);return{start:Math.max(0,y),end:Math.min(g,v)}}},Qa=function(e){var o,t=e.type,i=void 0===t?"static":t,r=e.duration,n=e.timescale,a=void 0===n?1:n,s=e.sourceDuration,u=Ka[i](e),l=function(e,t){for(var i=[],r=e;r<t;r++)i.push(r);return i}(u.start,u.end).map((o=e,function(e,t){var i=o.duration,r=o.timescale,n=void 0===r?1:r,a=o.periodIndex,s=o.startNumber;return{number:(void 0===s?1:s)+e,duration:i/n,timeline:a,time:t*i}}));if("static"===i){var c=l.length-1;l[c].duration=s-r/a*c}return l},Ja=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Za=function(e,t){return e.replace(Ja,(a=t,function(e,t,i,r){if("$$"===e)return"$";if("undefined"==typeof a[t])return e;var n=""+a[t];return"RepresentationID"===t?n:(r=i?parseInt(r,10):1)<=n.length?n:""+new Array(r-n.length+1).join("0")+n}));var a},es=function(i,e){var t,r,n={RepresentationID:i.id,Bandwidth:i.bandwidth||0},a=i.initialization,s=void 0===a?{sourceURL:"",range:""}:a,o=Ga({baseUrl:i.baseUrl,source:Za(s.sourceURL,n),range:s.range});return(r=e,(t=i).duration||r?t.duration?Qa(t):Xa(t,r):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]).map(function(e){n.Number=e.number,n.Time=e.time;var t=Za(i.media||"",n);return{uri:t,timeline:e.timeline,duration:e.duration,resolvedUri:za(i.baseUrl||"",t),map:o,number:e.number}})},ts="INVALID_NUMBER_OF_PERIOD",is="DASH_EMPTY_MANIFEST",rs="DASH_INVALID_XML",ns="NO_BASE_URL",as="SEGMENT_TIME_UNSPECIFIED",ss="UNSUPPORTED_UTC_TIMING_SCHEME",os=function(u,e){var t=u.duration,i=u.segmentUrls,r=void 0===i?[]:i;if(!t&&!e||t&&e)throw new Error(as);var n=r.map(function(e){return i=e,r=(t=u).baseUrl,n=t.initialization,s=Ga({baseUrl:r,source:(a=void 0===n?{}:n).sourceURL,range:a.range}),(o=Ga({baseUrl:r,source:i.media,range:i.mediaRange})).map=s,o;var t,i,r,n,a,s,o}),a=void 0;return t&&(a=Qa(u)),e&&(a=Xa(u,e)),a.map(function(e,t){if(n[t]){var i=n[t];return i.timeline=e.timeline,i.duration=e.duration,i.number=e.number,i}}).filter(function(e){return e})},us=function(e){var t=e.baseUrl,i=e.initialization,r=void 0===i?{}:i,n=e.sourceDuration,a=e.timescale,s=void 0===a?1:a,o=e.indexRange,u=void 0===o?"":o,l=e.duration;if(!t)throw new Error(ns);var c=Ga({baseUrl:t,source:r.sourceURL,range:r.range}),h=Ga({baseUrl:t,source:t,range:u});if(h.map=c,l){var d=Qa(e);d.length&&(h.duration=d[0].duration,h.timeline=d[0].timeline)}else n&&(h.duration=n/s,h.timeline=0);return h.number=0,[h]},ls=function(e){var t=e.attributes,i=e.segmentInfo,r=void 0,n=void 0;if(i.template?(n=es,r=Wa(t,i.template)):i.base?(n=us,r=Wa(t,i.base)):i.list&&(n=os,r=Wa(t,i.list)),!n)return{attributes:t};var a=n(r,i.timeline);if(r.duration){var s=r,o=s.duration,u=s.timescale,l=void 0===u?1:u;r.duration=o/l}else a.length?r.duration=a.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):r.duration=0;return{attributes:r,segments:a}},cs=function(e,t){return $a(e.childNodes).filter(function(e){return e.tagName===t})},hs=function(e){return e.textContent.trim()},ds=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var i=t.slice(1),r=i[0],n=i[1],a=i[2],s=i[3],o=i[4],u=i[5];return 31536e3*parseFloat(r||0)+2592e3*parseFloat(n||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},ps={mediaPresentationDuration:function(e){return ds(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return ds(e)},timeShiftBufferDepth:function(e){return ds(e)},start:function(e){return ds(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?ds(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},fs=function(e){return e&&e.attributes?$a(e.attributes).reduce(function(e,t){var i=ps[t.name]||ps.DEFAULT;return e[t.name]=i(t.value),e},{}):{}};var ms,gs,ys={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},vs=function(e,i){return i.length?Ya(e.map(function(t){return i.map(function(e){return za(t,hs(e))})})):e},_s=function(e){var t=cs(e,"SegmentTemplate")[0],i=cs(e,"SegmentList")[0],r=i&&cs(i,"SegmentURL").map(function(e){return Wa({tag:"SegmentURL"},fs(e))}),n=cs(e,"SegmentBase")[0],a=i||t,s=a&&cs(a,"SegmentTimeline")[0],o=i||n||t,u=o&&cs(o,"Initialization")[0],l=t&&fs(t);l&&u?l.initialization=u&&fs(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,timeline:s&&cs(s,"S").map(function(e){return fs(e)}),list:i&&Wa(fs(i),{segmentUrls:r,initialization:fs(u)}),base:n&&Wa(fs(n),{initialization:fs(u)})};return Object.keys(c).forEach(function(e){c[e]||delete c[e]}),c},bs=function(e){return e.reduce(function(e,t){var i=fs(t),r=ys[i.schemeIdUri];if(r){e[r]={attributes:i};var n=cs(t,"cenc:pssh")[0];if(n){var a=hs(n),s=a&&function(e){for(var t=g.atob(e),i=new Uint8Array(t.length),r=0;r<t.length;r++)i[r]=t.charCodeAt(r);return i}(a);e[r].pssh=s}}return e},{})},Ts=function(p,f,m){return function(e){var t=fs(e),i=vs(f,cs(e,"BaseURL")),r=cs(e,"Role")[0],n={role:fs(r)},a=Wa(p,t,n),s=bs(cs(e,"ContentProtection"));Object.keys(s).length&&(a=Wa(a,{contentProtection:s}));var o,u,l,c=_s(e),h=cs(e,"Representation"),d=Wa(m,c);return Ya(h.map((o=a,u=i,l=d,function(e){var t=cs(e,"BaseURL"),i=vs(u,t),r=Wa(o,fs(e)),n=_s(e);return i.map(function(e){return{segmentInfo:Wa(l,n),attributes:Wa(r,{baseUrl:e})}})})))}},Ss=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=t.manifestUri,r=void 0===i?"":i,n=t.NOW,a=void 0===n?Date.now():n,s=t.clientOffset,o=void 0===s?0:s,u=cs(e,"Period");if(1!==u.length)throw new Error(ts);var l,c,h=fs(e),d=vs([r],cs(e,"BaseURL"));return h.sourceDuration=h.mediaPresentationDuration||0,h.NOW=a,h.clientOffset=o,Ya(u.map((l=h,c=d,function(e,t){var i=vs(c,cs(e,"BaseURL")),r=fs(e),n=Wa(l,r,{periodIndex:t}),a=cs(e,"AdaptationSet"),s=_s(e);return Ya(a.map(Ts(n,i,s)))})))},ks=function(e){if(""===e)throw new Error(is);var t=(new g.DOMParser).parseFromString(e,"application/xml"),i=t&&"MPD"===t.documentElement.tagName?t.documentElement:null;if(!i||i&&0<i.getElementsByTagName("parsererror").length)throw new Error(rs);return i},Cs=function(e,t){return function(e){var t;if(!e.length)return{};var i=e[0].attributes,r=i.sourceDuration,n=i.minimumUpdatePeriod,a=void 0===n?0:n,s=e.filter(function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video"===t.contentType}).map(Ha),o=e.filter(function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio"===t.contentType}),u=e.filter(function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType}),l={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:r,playlists:s,minimumUpdatePeriod:1e3*a};return o.length&&(l.mediaGroups.AUDIO.audio=o.reduce(function(e,t){var i,r,n,a,s,o=t.attributes.role&&t.attributes.role.value||"main",u=t.attributes.lang||"",l="main";return u&&(l=t.attributes.lang+" ("+o+")"),e[l]&&e[l].playlists[0].attributes.BANDWIDTH>t.attributes.bandwidth||(e[l]={language:u,autoselect:!0,default:"main"===o,playlists:[(i=t,n=i.attributes,a=i.segments,s={attributes:(r={NAME:n.id,BANDWIDTH:n.bandwidth,CODECS:n.codecs},r["PROGRAM-ID"]=1,r),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:"",targetDuration:n.duration,segments:a,mediaSequence:a.length?a[0].number:1},n.contentProtection&&(s.contentProtection=n.contentProtection),s)],uri:""}),e},{})),u.length&&(l.mediaGroups.SUBTITLES.subs=u.reduce(function(e,t){var i,r,n,a,s=t.attributes.lang||"text";return e[s]||(e[s]={language:s,default:!1,autoselect:!1,playlists:[(i=t,n=i.attributes,a=i.segments,"undefined"==typeof a&&(a=[{uri:n.baseUrl,timeline:n.periodIndex,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration),{attributes:(r={NAME:n.id,BANDWIDTH:n.bandwidth},r["PROGRAM-ID"]=1,r),uri:"",endList:"static"===(n.type||"static"),timeline:n.periodIndex,resolvedUri:n.baseUrl||"",targetDuration:n.duration,segments:a,mediaSequence:a.length?a[0].number:1})],uri:""}),e},{})),l}(Ss(ks(e),t).map(ls))},Es=function(e){return function(e){var t=cs(e,"UTCTiming")[0];if(!t)return null;var i=fs(t);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ss)}return i}(ks(e))},ws={toUnsigned:function(e){return e>>>0}},As=ws.toUnsigned,Ls=Object.freeze({default:ws,__moduleExports:ws,toUnsigned:As}),Ps=(Ls&&ws||Ls).toUnsigned;ms=function(e,t){var i,r,n,a,s,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)r=Ps(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),n=gs(e.subarray(i+4,i+8)),a=1<r?i+r:e.byteLength,n===t[0]&&(1===t.length?o.push(e.subarray(i+8,a)):(s=ms(e.subarray(i+8,a),t.slice(1))).length&&(o=o.concat(s))),i=a;return o};gs=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])};var Os=function(e){return ms(e,["moov","trak"]).reduce(function(e,t){var i,r,n,a,s;return(i=ms(t,["tkhd"])[0])?(r=i[0],a=Ps(i[n=0===r?12:20]<<24|i[n+1]<<16|i[n+2]<<8|i[n+3]),(s=ms(t,["mdia","mdhd"])[0])?(n=0===(r=s[0])?12:20,e[a]=Ps(s[n]<<24|s[n+1]<<16|s[n+2]<<8|s[n+3]),e):null):null},{})},Is=function(n,e){var t,i,r;return t=ms(e,["moof","traf"]),i=[].concat.apply([],t.map(function(r){return ms(r,["tfhd"]).map(function(e){var t,i;return t=Ps(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),i=n[t]||9e4,(ms(r,["tfdt"]).map(function(e){var t,i;return t=e[0],i=Ps(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(i*=Math.pow(2,32),i+=Ps(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),i})[0]||1/0)/i})})),r=Math.min.apply(null,i),isFinite(r)?r:0},xs={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ds=xs.H264_STREAM_TYPE,Rs=xs.ADTS_STREAM_TYPE,Ms=xs.METADATA_STREAM_TYPE,Us=Object.freeze({default:xs,__moduleExports:xs,H264_STREAM_TYPE:Ds,ADTS_STREAM_TYPE:Rs,METADATA_STREAM_TYPE:Ms}),Ns=function(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){var i;return!!a[e]&&(i=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(i,1),-1<i)},this.trigger=function(e){var t,i,r,n;if(t=a[e])if(2===arguments.length)for(r=t.length,i=0;i<r;++i)t[i].call(this,arguments[1]);else{for(n=[],i=arguments.length,i=1;i<arguments.length;++i)n.push(arguments[i]);for(r=t.length,i=0;i<r;++i)t[i].apply(this,n)}},this.dispose=function(){a={}}}};Ns.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),t},Ns.prototype.push=function(e){this.trigger("data",e)},Ns.prototype.flush=function(e){this.trigger("done",e)};var Bs=Ns,js=Object.freeze({default:Bs,__moduleExports:Bs}),Fs=function(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e},Hs=function e(t){var i,r;e.prototype.init.call(this),this.type_=t,this.push=function(e){e.type===this.type_&&(void 0===r&&(r=e.dts),e.dts=Fs(e.dts,r),e.pts=Fs(e.pts,r),i=e.dts,this.trigger("data",e))},this.flush=function(){r=i,this.trigger("done")},this.discontinuity=function(){i=r=void 0}};Hs.prototype=new(js&&Bs||js);var Vs={TimestampRolloverStream:Hs,handleRollover:Fs},qs=Vs.TimestampRolloverStream,Ws=Vs.handleRollover,zs=Object.freeze({default:Vs,__moduleExports:Vs,TimestampRolloverStream:qs,handleRollover:Ws}),Gs=Us&&xs||Us,Xs=function(e){var t=31&e[1];return t<<=8,t|=e[2]},Ys=function(e){return!!(64&e[1])},$s=function(e){var t=0;return 1<(48&e[3])>>>4&&(t+=e[4]+1),t},Ks=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Qs={parseType:function(e,t){var i=Xs(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=Ys(e),i=4+$s(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=Ys(e),r=4+$s(e);if(i&&(r+=e[r]+1),1&e[r+5]){var n;n=3+((15&e[r+1])<<8|e[r+2])-4;for(var a=12+((15&e[r+10])<<8|e[r+11]);a<n;){var s=r+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:Ys,parsePesType:function(e,t){switch(t[Xs(e)]){case Gs.H264_STREAM_TYPE:return"video";case Gs.ADTS_STREAM_TYPE:return"audio";case Gs.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!Ys(e))return null;var t=4+$s(e);if(t>=e.byteLength)return null;var i,r=null;return 192&(i=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&i&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+$s(e),i=e.subarray(t),r=0,n=0,a=!1;n<i.byteLength-3;n++)if(1===i[n+2]){r=n+5;break}for(;r<i.byteLength;)switch(i[r]){case 0:if(0!==i[r-1]){r+=2;break}if(0!==i[r-2]){r++;break}for(n+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===Ks(31&i[n+3])&&(a=!0);1!==i[++r]&&r<i.length;);n=r-2,r+=3;break;case 1:if(0!==i[r-1]||0!==i[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===Ks(31&i[n+3])&&(a=!0),n=r-2,r+=3;break;default:r+=3}return i=i.subarray(n),r-=n,n=0,i&&3<i.byteLength&&"slice_layer_without_partitioning_rbsp_idr"===Ks(31&i[n+3])&&(a=!0),a}},Js=Qs.parseType,Zs=Qs.parsePat,eo=Qs.parsePmt,to=Qs.parsePayloadUnitStartIndicator,io=Qs.parsePesType,ro=Qs.parsePesTime,no=Qs.videoPacketContainsKeyFrame,ao=Object.freeze({default:Qs,__moduleExports:Qs,parseType:Js,parsePat:Zs,parsePmt:eo,parsePayloadUnitStartIndicator:to,parsePesType:io,parsePesTime:ro,videoPacketContainsKeyFrame:no}),so=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],oo=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},uo={parseId3TagSize:function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?i+20:i+10},parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|i},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return so[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,r;t=10,64&e[5]&&(t+=4,t+=oo(e.subarray(10,14)));do{if((i=oo(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+i+10);for(var n=0;n<r.byteLength;n++)if(0===r[n]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,i){var r,n="";for(r=t;r<i;r++)n+="%"+("00"+e[r].toString(16)).slice(-2);return n}(r,0,n))){var a=r.subarray(n+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}break}}t+=10,t+=i}while(t<e.byteLength);return null}},lo=uo.parseId3TagSize,co=uo.parseAdtsSize,ho=uo.parseType,po=uo.parseSampleRate,fo=uo.parseAacTimestamp,mo=Object.freeze({default:uo,__moduleExports:uo,parseId3TagSize:lo,parseAdtsSize:co,parseType:ho,parseSampleRate:po,parseAacTimestamp:fo}),go=ao&&Qs||ao,yo=mo&&uo||mo,vo=(zs&&Vs||zs).handleRollover,_o={};_o.ts=go,_o.aac=yo;var bo=188,To=function(e,t,i){for(var r,n,a,s,o=0,u=bo,l=!1;u<e.byteLength;)if(71!==e[o]||71!==e[u])o++,u++;else{switch(r=e.subarray(o,u),_o.ts.parseType(r,t.pid)){case"pes":n=_o.ts.parsePesType(r,t.table),a=_o.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(s=_o.ts.parsePesTime(r))&&(s.type="audio",i.audio.push(s),l=!0)}if(l)break;o+=bo,u+=bo}for(o=(u=e.byteLength)-bo,l=!1;0<=o;)if(71!==e[o]||71!==e[u])o--,u--;else{switch(r=e.subarray(o,u),_o.ts.parseType(r,t.pid)){case"pes":n=_o.ts.parsePesType(r,t.table),a=_o.ts.parsePayloadUnitStartIndicator(r),"audio"===n&&a&&(s=_o.ts.parsePesTime(r))&&(s.type="audio",i.audio.push(s),l=!0)}if(l)break;o-=bo,u-=bo}},So=function(e,t,i){for(var r,n,a,s,o,u,l,c=0,h=bo,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[c]||71!==e[h])c++,h++;else{switch(r=e.subarray(c,h),_o.ts.parseType(r,t.pid)){case"pes":if(n=_o.ts.parsePesType(r,t.table),a=_o.ts.parsePayloadUnitStartIndicator(r),"video"===n&&(a&&!d&&(s=_o.ts.parsePesTime(r))&&(s.type="video",i.video.push(s),d=!0),!i.firstKeyFrame)){if(a&&0!==p.size){for(o=new Uint8Array(p.size),u=0;p.data.length;)l=p.data.shift(),o.set(l,u),u+=l.byteLength;_o.ts.videoPacketContainsKeyFrame(o)&&(i.firstKeyFrame=_o.ts.parsePesTime(o),i.firstKeyFrame.type="video"),p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&i.firstKeyFrame)break;c+=bo,h+=bo}for(c=(h=e.byteLength)-bo,d=!1;0<=c;)if(71!==e[c]||71!==e[h])c--,h--;else{switch(r=e.subarray(c,h),_o.ts.parseType(r,t.pid)){case"pes":n=_o.ts.parsePesType(r,t.table),a=_o.ts.parsePayloadUnitStartIndicator(r),"video"===n&&a&&(s=_o.ts.parsePesTime(r))&&(s.type="video",i.video.push(s),d=!0)}if(d)break;c-=bo,h-=bo}},ko=function(e){var t={pid:null,table:null},i={};for(var r in function(e,t){for(var i,r=0,n=bo;n<e.byteLength;)if(71!==e[r]||71!==e[n])r++,n++;else{switch(i=e.subarray(r,n),_o.ts.parseType(i,t.pid)){case"pat":t.pid||(t.pid=_o.ts.parsePat(i));break;case"pmt":t.table||(t.table=_o.ts.parsePmt(i))}if(t.pid&&t.table)return;r+=bo,n+=bo}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case Gs.H264_STREAM_TYPE:i.video=[],So(e,t,i),0===i.video.length&&delete i.video;break;case Gs.ADTS_STREAM_TYPE:i.audio=[],To(e,t,i),0===i.audio.length&&delete i.audio}}return i},Co=function(e,t){var i,r;return(r=(i=e)[0]==="I".charCodeAt(0)&&i[1]==="D".charCodeAt(0)&&i[2]==="3".charCodeAt(0)?function(e){for(var t,i=!1,r=0,n=null,a=null,s=0,o=0;3<=e.length-o;){switch(_o.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((s=_o.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===a&&(t=e.subarray(o,o+s),a=_o.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){i=!0;break}if((s=_o.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===n&&(t=e.subarray(o,o+s),n=_o.aac.parseSampleRate(t)),r++,o+=s;break;default:o++}if(i)return null}if(null===n||null===a)return null;var u=9e4/n;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*r*u,pts:a+1024*r*u}]}}(e):ko(e))&&(r.audio||r.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;"undefined"==typeof i&&(i=e.audio[0].dts),e.audio.forEach(function(e){e.dts=vo(e.dts,i),e.pts=vo(e.pts,i),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})}if(e.video&&e.video.length){var r=t;if("undefined"==typeof r&&(r=e.video[0].dts),e.video.forEach(function(e){e.dts=vo(e.dts,r),e.pts=vo(e.pts,r),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}),e.firstKeyFrame){var n=e.firstKeyFrame;n.dts=vo(n.dts,r),n.pts=vo(n.pts,r),n.dtsTime=n.dts/9e4,n.ptsTime=n.dts/9e4}}}(r,t),r):null};var Eo=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},wo=function(){function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}}(),Ao=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":v(t))&&"function"!=typeof t?e:t},Lo=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],r=t[4],n=i[4],a=void 0,s=void 0,o=void 0,u=[],l=[],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)l[(u[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!r[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[n[r[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e},Po=null,Oo=function(){function c(e){Eo(this,c),Po||(Po=Lo()),this._tables=[[Po[0][0].slice(),Po[0][1].slice(),Po[0][2].slice(),Po[0][3].slice(),Po[0][4].slice()],[Po[1][0].slice(),Po[1][1].slice(),Po[1][2].slice(),Po[1][3].slice(),Po[1][4].slice()]];var t=void 0,i=void 0,r=void 0,n=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],u=e.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(n=e.slice(0),a=[],this._key=[n,a],t=u;t<4*u+28;t++)r=n[t-1],(t%u==0||8===u&&t%u==4)&&(r=s[r>>>24]<<24^s[r>>16&255]<<16^s[r>>8&255]<<8^s[255&r],t%u==0&&(r=r<<8^r>>>24^l<<24,l=l<<1^283*(l>>7))),n[t]=n[t-u]^r;for(i=0;t;i++,t--)r=n[3&i?t:t-4],a[i]=t<=4||i<4?r:o[0][s[r>>>24]]^o[1][s[r>>16&255]]^o[2][s[r>>8&255]]^o[3][s[255&r]]}return c.prototype.decrypt=function(e,t,i,r,n,a){var s=this._key[1],o=e^s[0],u=r^s[1],l=i^s[2],c=t^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)h=v[o>>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)n[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},c}(),Io=function(){function e(){Eo(this,e),this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),-1<i},e.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,n)},e.prototype.dispose=function(){this.listeners={}},e.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},e}(),xo=function(t){function i(){Eo(this,i);var e=Ao(this,t.call(this,Io));return e.jobs=[],e.delay=1,e.timeout_=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":v(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,t),i.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},i}(Io),Do=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},Ro=function(e,t,i){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),n=new Oo(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;m<r.length;m+=4)h=Do(r[m]),d=Do(r[m+1]),p=Do(r[m+2]),f=Do(r[m+3]),n.decrypt(h,d,p,f,s,m),s[m]=Do(s[m]^o),s[m+1]=Do(s[m+1]^u),s[m+2]=Do(s[m+2]^l),s[m+3]=Do(s[m+3]^c),o=h,u=d,l=p,c=f;return a},Mo=function(){function u(e,t,i,r){Eo(this,u);var n=u.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new xo,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+n),t,i,s)),o=n;o<a.length;o+=n)i=new Uint32Array([Do(a[o-4]),Do(a[o-3]),Do(a[o-2]),Do(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+n),t,i,s));this.asyncStream_.push(function(){var e;r(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))})}return u.prototype.decryptChunk_=function(t,i,r,n){return function(){var e=Ro(t,i,r);n.set(e,t.byteOffset)}},wo(u,null,[{key:"STEP",get:function(){return 32e3}}]),u}(),Uo=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=Ia.buildAbsoluteURL(g.location.href,e)),Ia.buildAbsoluteURL(e,t))},No=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Bo=function(){function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}}(),jo=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":v(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},Fo=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":v(t))&&"function"!=typeof t?e:t},Ho=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],r=!0,n=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(i.push(s.value),!t||i.length!==t);r=!0);}catch(e){n=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw a}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Vo=La.mergeOptions,qo=La.EventTarget,Wo=La.log,zo=function(n,a){["AUDIO","SUBTITLES"].forEach(function(e){for(var t in n.mediaGroups[e])for(var i in n.mediaGroups[e][t]){var r=n.mediaGroups[e][t][i];a(r,e,t,i)}})},Go=function(e,t){var i=Vo(e,{}),r=i.playlists[t.uri];if(!r)return null;if(r.segments&&t.segments&&r.segments.length===t.segments.length&&r.mediaSequence===t.mediaSequence)return null;var n=Vo(r,t);r.segments&&(n.segments=function(e,t,i){var r=t.slice();i=i||0;for(var n=Math.min(e.length,t.length+i),a=i;a<n;a++)r[a-i]=Vo(e[a],r[a-i]);return r}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)),n.segments.forEach(function(e){var t,i;t=e,i=n.resolvedUri,t.resolvedUri||(t.resolvedUri=Uo(i,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=Uo(i,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=Uo(i,t.map.uri))});for(var a=0;a<i.playlists.length;a++)i.playlists[a].uri===t.uri&&(i.playlists[a]=n);return i.playlists[t.uri]=n,i},Xo=function(e){for(var t=e.playlists.length;t--;){var i=e.playlists[t];(e.playlists[i.uri]=i).resolvedUri=Uo(e.uri,i.uri),i.id=t,i.attributes||(i.attributes={},Wo.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}},Yo=function(t){zo(t,function(e){e.uri&&(e.resolvedUri=Uo(t.uri,e.uri))})},$o=function(e,t){var i=e.segments[e.segments.length-1];return t&&i&&i.duration?1e3*i.duration:500*(e.targetDuration||10)},Ko=function(e){function n(e,t,i){No(this,n);var r=Fo(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));if(r.srcUrl=e,r.hls_=t,r.withCredentials=i,!r.srcUrl)throw new Error("A non-empty playlist URL is required");return r.state="HAVE_NOTHING",r.on("mediaupdatetimeout",function(){"HAVE_METADATA"===r.state&&(r.state="HAVE_CURRENT_METADATA",r.request=r.hls_.xhr({uri:Uo(r.master.uri,r.media().uri),withCredentials:r.withCredentials},function(e,t){if(r.request)return e?r.playlistRequestError(r.request,r.media().uri,"HAVE_METADATA"):void r.haveMetadata(r.request,r.media().uri)}))}),r}return jo(n,qo),Bo(n,[{key:"playlistRequestError",value:function(e,t,i){this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[t],status:e.status,message:"HLS playlist request error at URL: "+t,responseText:e.responseText,code:500<=e.status?4:2},this.trigger("error")}},{key:"haveMetadata",value:function(e,t){var i=this;this.request=null,this.state="HAVE_METADATA";var r=new Fa;r.push(e.responseText),r.end(),r.manifest.uri=t,r.manifest.attributes=r.manifest.attributes||{};var n=Go(this.master,r.manifest);this.targetDuration=r.manifest.targetDuration,n?(this.master=n,this.media_=this.master.playlists[r.manifest.uri]):this.trigger("playlistunchanged"),this.media().endList||(g.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=g.setTimeout(function(){i.trigger("mediaupdatetimeout")},$o(this.media(),!!n))),this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest(),g.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(i){var r=this;if(!i)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof i){if(!this.master.playlists[i])throw new Error("Unknown playlist URI: "+i);i=this.master.playlists[i]}var e=!this.media_||i.uri!==this.media_.uri;if(this.master.playlists[i.uri].endList)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=i,void(e&&(this.trigger("mediachanging"),this.trigger("mediachange")));if(e){if(this.state="SWITCHING_MEDIA",this.request){if(Uo(this.master.uri,i.uri)===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.hls_.xhr({uri:Uo(this.master.uri,i.uri),withCredentials:this.withCredentials},function(e,t){if(r.request){if(e)return r.playlistRequestError(r.request,i.uri,n);r.haveMetadata(t,i.uri),"HAVE_MASTER"===n?r.trigger("loadedmetadata"):r.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest(),g.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var t=this;g.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(e){var r=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=g.setTimeout(function(){return t.load()},r)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var r=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,t){if(r.request){if(r.request=null,e)return r.error={status:t.status,message:"HLS playlist request error at URL: "+r.srcUrl,responseText:t.responseText,code:2},"HAVE_NOTHING"===r.state&&(r.started=!1),r.trigger("error");var i=new Fa;return i.push(t.responseText),i.end(),r.state="HAVE_MASTER",i.manifest.uri=r.srcUrl,i.manifest.playlists?(r.master=i.manifest,Xo(r.master),Yo(r.master),r.trigger("loadedplaylist"),void(r.request||r.media(i.manifest.playlists[0]))):(r.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:g.location.href,playlists:[{uri:r.srcUrl,id:0}]},r.master.playlists[r.srcUrl]=r.master.playlists[0],r.master.playlists[0].resolvedUri=r.srcUrl,r.master.playlists[0].attributes=r.master.playlists[0].attributes||{},r.haveMetadata(t,r.srcUrl),r.trigger("loadedmetadata"))}})}}]),n}(),Qo=La.createTimeRange,Jo=function(e,t,i){var r,n;return"undefined"==typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence?0:(r=function(e,t){var i=0,r=t-e.mediaSequence,n=e.segments[r];if(n){if("undefined"!=typeof n.start)return{result:n.start,precise:!0};if("undefined"!=typeof n.end)return{result:n.end-n.duration,precise:!0}}for(;r--;){if("undefined"!=typeof(n=e.segments[r]).end)return{result:i+n.end,precise:!0};if(i+=n.duration,"undefined"!=typeof n.start)return{result:i+n.start,precise:!0}}return{result:i,precise:!1}}(e,t)).precise?r.result:(n=function(e,t){for(var i=0,r=void 0,n=t-e.mediaSequence;n<e.segments.length;n++){if("undefined"!=typeof(r=e.segments[n]).start)return{result:r.start-i,precise:!0};if(i+=r.duration,"undefined"!=typeof r.end)return{result:r.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t)).precise?n.result:r.result+i},Zo=function(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),"undefined"==typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return g.Infinity}return Jo(e,t,i)},eu=function(e,t,i){var r=0;if(i<t){var n=[i,t];t=n[0],i=n[1]}if(t<0){for(var a=t;a<Math.min(0,i);a++)r+=e.targetDuration;t=0}for(var s=t;s<i;s++)r+=e.segments[s].duration;return r},tu=function(e){if(!e.segments.length)return 0;for(var t=e.segments.length-1,i=e.segments[t].duration||e.targetDuration,r=i+2*e.targetDuration;t--&&!(r<=(i+=e.segments[t].duration)););return Math.max(0,t)},iu=function(e,t,i){if(!e||!e.segments)return null;if(e.endList)return Zo(e);if(null===t)return null;t=t||0;var r=i?tu(e):e.segments.length;return Jo(e,e.mediaSequence+r,t)},ru=function(e){return e-Math.floor(e)==0},nu=function(e,t){if(ru(t))return t+.1*e;for(var i=t.toString().split(".")[1].length,r=1;r<=i;r++){var n=Math.pow(10,r),a=t*n;if(ru(a)||r===i)return(a+e)/n}},au=nu.bind(null,1),su=nu.bind(null,-1),ou=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},uu=function(e){return e.excludeUntil&&e.excludeUntil===1/0},lu=function(e){var t=ou(e);return!e.disabled&&!t},cu=function(e,t){return t.attributes&&t.attributes[e]},hu=function(e,t){if(1===e.playlists.length)return!0;var i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!lu(e)&&(e.attributes.BANDWIDTH||0)<i}).length},du={duration:Zo,seekable:function(e,t){var i=t||0,r=iu(e,t,!0);return null===r?Qo():Qo(i,r)},safeLiveIndex:tu,getMediaInfoForTime:function(e,t,i,r){var n=void 0,a=void 0,s=e.segments.length,o=t-r;if(o<0){if(0<i)for(n=i-1;0<=n;n--)if(a=e.segments[n],0<(o+=su(a.duration)))return{mediaIndex:n,startTime:r-eu(e,i,n)};return{mediaIndex:0,startTime:t}}if(i<0){for(n=i;n<0;n++)if((o-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};i=0}for(n=i;n<s;n++)if(a=e.segments[n],(o-=au(a.duration))<0)return{mediaIndex:n,startTime:r+eu(e,i,n)};return{mediaIndex:s-1,startTime:t}},isEnabled:lu,isDisabled:function(e){return e.disabled},isBlacklisted:ou,isIncompatible:uu,playlistEnd:iu,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},isFmp4:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].map)return!0;return!1},hasAttribute:cu,estimateSegmentRequestTime:function(e,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;return cu("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:hu},pu=La.xhr,fu=La.mergeOptions,mu=function(){return function e(t,r){t=fu({timeout:45e3},t);var i=e.beforeRequest||La.Hls.xhr.beforeRequest;if(i&&"function"==typeof i){var n=i(t);n&&(t=n)}var a=pu(t,function(e,t){var i=a.response;!e&&i&&(a.responseTime=Date.now(),a.roundTripTime=a.responseTime-a.requestTime,a.bytesReceived=i.byteLength||i.length,a.bandwidth||(a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8*1e3))),t.headers&&(a.responseHeaders=t.headers),e&&"ETIMEDOUT"===e.code&&(a.timedout=!0),e||a.aborted||200===t.statusCode||206===t.statusCode||0===t.statusCode||(e=new Error("XHR Failed with a response of: "+(a&&(i||a.responseText)))),r(e,a)}),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a}},gu=function(e,t){var i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},yu=function(e){return 32<=e&&e<126?String.fromCharCode(e):"."},vu=function(i){var r={};return Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?r[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:r[e]=t}),r},_u=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},bu=function(e){for(var t=Array.prototype.slice.call(e),i="",r=0;r<t.length/16;r++)i+=t.slice(16*r,16*r+16).map(gu).join("")+" "+t.slice(16*r,16*r+16).map(yu).join("")+"\n";return i},Tu=Object.freeze({createTransferableMessage:vu,initSegmentId:_u,hexDump:bu,tagDump:function(e){var t=e.bytes;return bu(t)},textRanges:function(e){var t,i,r="",n=void 0;for(n=0;n<e.length;n++)r+=(i=n,(t=e).start(i)+"-"+t.end(i)+" ");return r}}),Su=1/30,ku=function(e,t){var i=[],r=void 0;if(e&&e.length)for(r=0;r<e.length;r++)t(e.start(r),e.end(r))&&i.push([e.start(r),e.end(r)]);return La.createTimeRanges(i)},Cu=function(e,i){return ku(e,function(e,t){return e-Su<=i&&i<=t+Su})},Eu=function(e,t){return ku(e,function(e){return t<=e-Su})},wu=function(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},Au=function(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},Lu=function(e,t,i){var r=void 0,n=void 0;if(i&&i.cues)for(r=i.cues.length;r--;)(n=i.cues[r]).startTime<=t&&n.endTime>=e&&i.removeCue(n)},Pu=function(e){return isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e},Ou=function(e,t,i){var n=g.WebKitDataCue||g.VTTCue;if(t&&t.forEach(function(e){var t=e.stream;this.inbandTextTracks_[t].addCue(new n(e.startTime+this.timestampOffset,e.endTime+this.timestampOffset,e.text))},e),i){var a=Pu(e.mediaSource_.duration);if(i.forEach(function(e){var r=e.cueTime+this.timestampOffset;e.frames.forEach(function(e){var t,i=new n(r,r,e.value||e.url||e.data||"");i.frame=e,i.value=e,t=i,Object.defineProperties(t.frame,{id:{get:function(){return La.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return La.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return La.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}}),this.metadataTrack_.addCue(i)},this)},e),e.metadataTrack_&&e.metadataTrack_.cues&&e.metadataTrack_.cues.length){for(var r=e.metadataTrack_.cues,s=[],o=0;o<r.length;o++)r[o]&&s.push(r[o]);var u=s.reduce(function(e,t){var i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e},{}),l=Object.keys(u).sort(function(e,t){return Number(e)-Number(t)});l.forEach(function(e,t){var i=u[e],r=Number(l[t+1])||a;i.forEach(function(e){e.endTime=r})})}}},Iu="undefined"!=typeof window?window:{},xu="undefined"==typeof Symbol?"__target":Symbol(),Du="application/javascript",Ru=Iu.BlobBuilder||Iu.WebKitBlobBuilder||Iu.MozBlobBuilder||Iu.MSBlobBuilder,Mu=Iu.URL||Iu.webkitURL||Mu&&Mu.msURL,Uu=Iu.Worker;function Nu(n,a){return function(e){var t=this;if(!a)return new Uu(n);if(Uu&&!e){var i=Hu(a.toString().replace(/^function.+?{/,"").slice(0,-1));return this[xu]=new Uu(i),function(e,t){if(!e||!t)return;var i=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&Mu.revokeObjectURL(e.objURL),i.call(e)}}(this[xu],i),this[xu]}var r={postMessage:function(e){t.onmessage&&setTimeout(function(){t.onmessage({data:e,target:r})})}};a.call(r),this.postMessage=function(e){setTimeout(function(){r.onmessage({data:e,target:t})})},this.isThisThread=!0}}if(Uu){var Bu,ju=Hu("self.onmessage = function () {}"),Fu=new Uint8Array(1);try{(Bu=new Uu(ju)).postMessage(Fu,[Fu.buffer])}catch(e){Uu=null}finally{Mu.revokeObjectURL(ju),Bu&&Bu.terminate()}}function Hu(t){try{return Mu.createObjectURL(new Blob([t],{type:Du}))}catch(e){var i=new Ru;return i.append(t),Mu.createObjectURL(i.getBlob(type))}}var Vu=new Nu("./transmuxer-worker.worker.js",function(it,e){var rt=this;!function(){var o,t,i,n,a,r,e,s,u,l,c,h,d,p,f,m,g,y,v,_,b,T,S,k,C,E,w,A,L,P,O,I,x,D,R,M,U,N,B,j,F="undefined"!=typeof it?it:"undefined"!=typeof global?global:"undefined"!=typeof rt?rt:{},H="undefined"!=typeof it?it:"undefined"!=typeof F?F:"undefined"!=typeof rt?rt:{},V=Math.pow(2,32)-1;!function(){var e;if(T={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(e in T)T.hasOwnProperty(e)&&(T[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);S=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),E=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),w=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),A={video:E,audio:w},O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),P=new Uint8Array([0,0,0,0,0,0,0,0]),I=new Uint8Array([0,0,0,0,0,0,0,0]),x=I,D=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),R=I,L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),o=function(e){var t,i,r=[],n=0;for(t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)n+=r[t].byteLength;for(i=new Uint8Array(n+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,n=8;t<r.length;t++)i.set(r[t],n),n+=r[t].byteLength;return i},t=function(){return o(T.dinf,o(T.dref,O))},i=function(e){return o(T.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},f=function(e){return o(T.hdlr,A[e])},p=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),o(T.mdhd,t)},d=function(e){return o(T.mdia,p(e),f(e.type),r(e))},a=function(e){return o(T.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},r=function(e){return o(T.minf,"video"===e.type?o(T.vmhd,L):o(T.smhd,P),t(),g(e))},e=function(e,t){for(var i=[],r=t.length;r--;)i[r]=v(t[r]);return o.apply(null,[T.moof,a(e)].concat(i))},s=function(e){for(var t=e.length,i=[];t--;)i[t]=c(e[t]);return o.apply(null,[T.moov,l(4294967295)].concat(i).concat(u(e)))},u=function(e){for(var t=e.length,i=[];t--;)i[t]=_(e[t]);return o.apply(null,[T.mvex].concat(i))},l=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return o(T.mvhd,t)},m=function(e){var t,i,r=e.samples||[],n=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)t=r[i].flags,n[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return o(T.sdtp,n)},g=function(e){return o(T.stbl,y(e),o(T.stts,R),o(T.stsc,x),o(T.stsz,D),o(T.stco,I))},y=function(e){return o(T.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?M(e):U(e))},M=function(e){var t,i=e.sps||[],r=e.pps||[],n=[],a=[];for(t=0;t<i.length;t++)n.push((65280&i[t].byteLength)>>>8),n.push(255&i[t].byteLength),n=n.concat(Array.prototype.slice.call(i[t]));for(t=0;t<r.length;t++)a.push((65280&r[t].byteLength)>>>8),a.push(255&r[t].byteLength),a=a.concat(Array.prototype.slice.call(r[t]));return o(T.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o(T.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([i.length]).concat(n).concat([r.length]).concat(a))),o(T.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},U=function(e){return o(T.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),i(e))},h=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return o(T.tkhd,t)},v=function(e){var t,i,r,n,a,s;return t=o(T.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/(V+1)),s=Math.floor(e.baseMediaDecodeTime%(V+1)),i=o(T.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===e.type?(r=b(e,92),o(T.traf,t,i,r)):(n=m(e),r=b(e,n.length+92),o(T.traf,t,i,r,n))},c=function(e){return e.duration=e.duration||4294967295,o(T.trak,h(e),d(e))},_=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),o(T.trex,t)},j=function(e,t){var i=0,r=0,n=0,a=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(n=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,i|r|n|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},B=function(e,t){var i,r,n,a;for(t+=20+16*(r=e.samples||[]).length,i=j(r,t),a=0;a<r.length;a++)n=r[a],i=i.concat([(4278190080&n.duration)>>>24,(16711680&n.duration)>>>16,(65280&n.duration)>>>8,255&n.duration,(4278190080&n.size)>>>24,(16711680&n.size)>>>16,(65280&n.size)>>>8,255&n.size,n.flags.isLeading<<2|n.flags.dependsOn,n.flags.isDependedOn<<6|n.flags.hasRedundancy<<4|n.flags.paddingValue<<1|n.flags.isNonSyncSample,61440&n.flags.degradationPriority,15&n.flags.degradationPriority,(4278190080&n.compositionTimeOffset)>>>24,(16711680&n.compositionTimeOffset)>>>16,(65280&n.compositionTimeOffset)>>>8,255&n.compositionTimeOffset]);return o(T.trun,new Uint8Array(i))},N=function(e,t){var i,r,n,a;for(t+=20+8*(r=e.samples||[]).length,i=j(r,t),a=0;a<r.length;a++)n=r[a],i=i.concat([(4278190080&n.duration)>>>24,(16711680&n.duration)>>>16,(65280&n.duration)>>>8,255&n.duration,(4278190080&n.size)>>>24,(16711680&n.size)>>>16,(65280&n.size)>>>8,255&n.size]);return o(T.trun,new Uint8Array(i))},b=function(e,t){return"audio"===e.type?N(e,t):B(e,t)};var q={ftyp:n=function(){return o(T.ftyp,S,k,S,C)},mdat:function(e){return o(T.mdat,e)},moof:e,moov:s,initSegment:function(e){var t,i=n(),r=s(e);return(t=new Uint8Array(i.byteLength+r.byteLength)).set(i),t.set(r,i.byteLength),t}},W=function(){this.init=function(){var a={};this.on=function(e,t){a[e]||(a[e]=[]),a[e]=a[e].concat(t)},this.off=function(e,t){var i;return!!a[e]&&(i=a[e].indexOf(t),a[e]=a[e].slice(),a[e].splice(i,1),-1<i)},this.trigger=function(e){var t,i,r,n;if(t=a[e])if(2===arguments.length)for(r=t.length,i=0;i<r;++i)t[i].call(this,arguments[1]);else{for(n=[],i=arguments.length,i=1;i<arguments.length;++i)n.push(arguments[i]);for(r=t.length,i=0;i<r;++i)t[i].apply(this,n)}},this.dispose=function(){a={}}}};W.prototype.pipe=function(t){return this.on("data",function(e){t.push(e)}),this.on("done",function(e){t.flush(e)}),t},W.prototype.push=function(e){this.trigger("data",e)},W.prototype.flush=function(e){this.trigger("done",e)};var z=W,G=function e(){e.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new Q(0,0),new Q(0,1),new Q(1,0),new Q(1,1)],this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("done",this.trigger.bind(this,"done"))},this)};(G.prototype=new z).push=function(e){var t,i,r;if("sei_rbsp"===e.nalUnitType&&(4===(t=function(e){for(var t=0,i={payloadType:-1,payloadSize:0},r=0,n=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)r+=255,t++;for(r+=e[t++];255===e[t];)n+=255,t++;if(n+=e[t++],!i.payload&&4===r){i.payloadType=r,i.payloadSize=n,i.payload=e.subarray(t,t+n);break}t+=n,n=r=0}return i}(e.escapedRBSP)).payloadType&&(i=181!==(r=t).payload[0]?null:49!=(r.payload[1]<<8|r.payload[2])?null:"GA94"!==String.fromCharCode(r.payload[3],r.payload[4],r.payload[5],r.payload[6])?null:3!==r.payload[7]?null:r.payload.subarray(8,r.payload.length-1))))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));this.captionPackets_=this.captionPackets_.concat(function(e,t){var i,r,n,a,s=[];if(!(64&t[0]))return s;for(r=31&t[0],i=0;i<r;i++)a={type:3&t[2+(n=3*i)],pts:e},4&t[n+2]&&(a.ccData=t[n+3]<<8|t[n+4],s.push(a));return s}(e.pts,i)),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},G.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2&&this.dispatchCea608Packet(e)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(e){e.flush()},this)):this.ccStreams_.forEach(function(e){e.flush()},this)},G.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},G.prototype.dispatchCea608Packet=function(e){this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},G.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},G.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)};var X={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Y=function(e){return null===e?"":(e=X[e]||e,String.fromCharCode(e))},$=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],K=function(){for(var e=[],t=15;t--;)e.push("");return e},Q=function e(t,i){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,r,n,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),r=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.topRow_=13,this.mode_="rollUp";else if(t===this.ROLL_UP_3_ROWS_)this.topRow_=12,this.mode_="rollUp";else if(t===this.ROLL_UP_4_ROWS_)this.topRow_=11,this.mode_="rollUp";else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[14]=this.nonDisplayed_[14].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=K();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=K();else if(t===this.RESUME_DIRECT_CAPTIONING_)this.mode_="paintOn";else if(this.isSpecialCharacter(r,n))a=Y((r=(3&r)<<8)|n),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(r,n))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1),a=Y((r=(3&r)<<8)|n),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(r,n))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&n)&&this.addFormatting(e.pts,["i"]),1==(1&n)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(r,n))this.column_+=3&n;else if(this.isPAC(r,n)){var s=$.indexOf(7968&t);s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&n&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(n)&&14==(14&n)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(r)&&(0===n&&(n=null),a=Y(r),a+=Y(n),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};Q.prototype=new z,Q.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){return e.trim()}).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},Q.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=K(),this.nonDisplayed_=K(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.formatting_=[]},Q.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},Q.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},Q.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},Q.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},Q.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},Q.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&64<=t&&t<=127},Q.prototype.isColorPAC=function(e){return 64<=e&&e<=79||96<=e&&e<=127},Q.prototype.isNormalChar=function(e){return 32<=e&&e<=127},Q.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,i)},Q.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},Q.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_];i+=t,this.nonDisplayed_[this.row_]=i},Q.prototype.rollUp=function(e,t){var i=this.displayed_[14];i+=t,this.displayed_[14]=i},Q.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.topRow_;e<14;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[14]=""},Q.prototype.paintOn=function(){};var J={CaptionStream:G,Cea608Stream:Q},Z={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},ee=function(e,t){var i=1;for(t<e&&(i=-1);4294967296<Math.abs(t-e);)e+=8589934592*i;return e},te=function e(t){var i,r;e.prototype.init.call(this),this.type_=t,this.push=function(e){e.type===this.type_&&(void 0===r&&(r=e.dts),e.dts=ee(e.dts,r),e.pts=ee(e.pts,r),i=e.dts,this.trigger("data",e))},this.flush=function(){r=i,this.trigger("done")},this.discontinuity=function(){i=r=void 0}};te.prototype=new z;var ie,re=te,ne=function(e,t,i){var r,n="";for(r=t;r<i;r++)n+="%"+("00"+e[r].toString(16)).slice(-2);return n},ae=function(e,t,i){return decodeURIComponent(ne(e,t,i))},se=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},oe={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=ae(e.data,1,t),e.value=ae(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=ae(e.data,1,t),e.url=ae(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,i;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(i=e.data,unescape(ne(i,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};(ie=function(e){var t,u={debug:!(!e||!e.debug),descriptor:e&&e.descriptor},l=0,c=[],h=0;if(ie.prototype.init.call(this),this.dispatchType=Z.METADATA_STREAM_TYPE.toString(16),u.descriptor)for(t=0;t<u.descriptor.length;t++)this.dispatchType+=("00"+u.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,r,n,a;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(h=0,c.length=0),0===c.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))u.debug;else if(c.push(e),h+=e.data.byteLength,1===c.length&&(l=se(e.data.subarray(6,10)),l+=10),!(h<l)){for(t={data:new Uint8Array(l),frames:[],pts:c[0].pts,dts:c[0].dts},a=0;a<l;)t.data.set(c[0].data.subarray(0,l-a),a),a+=c[0].data.byteLength,h-=c[0].data.byteLength,c.shift();i=10,64&t.data[5]&&(i+=4,i+=se(t.data.subarray(10,14)),l-=se(t.data.subarray(16,20)));do{if((r=se(t.data.subarray(i+4,i+8)))<1)return;if((n={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+r+10)}).key=n.id,oe[n.id]&&(oe[n.id](n),"com.apple.streaming.transportStreamTimestamp"===n.owner)){var s=n.data,o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;o*=4,o+=3&s[7],n.timeStamp=o,void 0===t.pts&&void 0===t.dts&&(t.pts=n.timeStamp,t.dts=n.timeStamp),this.trigger("timestamp",n)}t.frames.push(n),i+=10,i+=r}while(i<l);this.trigger("data",t)}}}).prototype=new z;var ue,le,ce,he=ie,de=re;(ue=function(){var n=new Uint8Array(188),a=0;ue.prototype.init.call(this),this.push=function(e){var t,i=0,r=188;for(a?((t=new Uint8Array(e.byteLength+a)).set(n.subarray(0,a)),t.set(e,a),a=0):t=e;r<t.byteLength;)71!==t[i]||71!==t[r]?(i++,r++):(this.trigger("data",t.subarray(i,r)),i+=188,r+=188);i<t.byteLength&&(n.set(t.subarray(i),0),a=t.byteLength-i)},this.flush=function(){188===a&&71===n[0]&&(this.trigger("data",n),a=0),this.trigger("done")}}).prototype=new z,(le=function(){var r,n,a,s;le.prototype.init.call(this),(s=this).packetsWaitingForPmt=[],this.programMapTable=void 0,r=function(e,t){var i=0;t.payloadUnitStartIndicator&&(i+=e[i]+1),"pat"===t.type?n(e.subarray(i),t):a(e.subarray(i),t)},n=function(e,t){t.section_number=e[7],t.last_section_number=e[8],s.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=s.pmtPid},a=function(e,t){var i,r;if(1&e[5]){for(s.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<i;){var n=e[r],a=(31&e[r+1])<<8|e[r+2];n===Z.H264_STREAM_TYPE&&null===s.programMapTable.video?s.programMapTable.video=a:n===Z.ADTS_STREAM_TYPE&&null===s.programMapTable.audio?s.programMapTable.audio=a:n===Z.METADATA_STREAM_TYPE&&(s.programMapTable["timed-metadata"][a]=n),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=s.programMapTable}},this.push=function(e){var t={},i=4;if(t.payloadUnitStartIndicator=!!(64&e[1]),t.pid=31&e[1],t.pid<<=8,t.pid|=e[2],1<(48&e[3])>>>4&&(i+=e[i]+1),0===t.pid)t.type="pat",r(e.subarray(i),t),this.trigger("data",t);else if(t.pid===this.pmtPid)for(t.type="pmt",r(e.subarray(i),t),this.trigger("data",t);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,i,t]):this.processPes_(e,i,t)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Z.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Z.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new z,le.STREAM_TYPES={h264:27,adts:15},(ce=function(){var d=this,r={data:[],size:0},n={data:[],size:0},a={data:[],size:0},s=function(e,t,i){var r,n,a=new Uint8Array(e.size),s={type:t},o=0,u=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,o=0;o<e.data.length;o++)n=e.data[o],a.set(n.data,u),u+=n.data.byteLength;var l,c,h;l=a,(c=s).packetLength=6+(l[4]<<8|l[5]),c.dataAlignmentIndicator=0!=(4&l[6]),192&(h=l[7])&&(c.pts=(14&l[9])<<27|(255&l[10])<<20|(254&l[11])<<12|(255&l[12])<<5|(254&l[13])>>>3,c.pts*=4,c.pts+=(6&l[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,c.dts*=4,c.dts+=(6&l[18])>>>1)),c.data=l.subarray(9+l[8]),r="video"===t||s.packetLength<=e.size,(i||r)&&(e.size=0,e.data.length=0),r&&d.trigger("data",s)}};ce.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var e,t;switch(i.streamType){case Z.H264_STREAM_TYPE:case Z.H264_STREAM_TYPE:e=r,t="video";break;case Z.ADTS_STREAM_TYPE:e=n,t="audio";break;case Z.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&s(e,t,!0),e.data.push(i),e.size+=i.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]},t=i.programMapTable;null!==t.video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),d.trigger("data",e)}})[i.type]()},this.flush=function(){s(r,"video"),s(n,"audio"),s(a,"timed-metadata"),this.trigger("done")}}).prototype=new z;var pe={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:ue,TransportParseStream:le,ElementaryStream:ce,TimestampRolloverStream:de,CaptionStream:J.CaptionStream,Cea608Stream:J.Cea608Stream,MetadataStream:he};for(var fe in Z)Z.hasOwnProperty(fe)&&(pe[fe]=Z[fe]);var me,ge=pe,ye=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(me=function(){var l;me.prototype.init.call(this),this.push=function(e){var t,i,r,n,a,s,o=0,u=0;if("audio"===e.type)for(l?(n=l,(l=new Uint8Array(n.byteLength+e.data.byteLength)).set(n),l.set(e.data,n.byteLength)):l=e.data;o+5<l.length;)if(255===l[o]&&240==(246&l[o+1])){if(i=2*(1&~l[o+1]),t=(3&l[o+3])<<11|l[o+4]<<3|(224&l[o+5])>>5,s=9e4*(a=1024*(1+(3&l[o+6])))/ye[(60&l[o+2])>>>2],r=o+t,l.byteLength<r)return;if(this.trigger("data",{pts:e.pts+u*s,dts:e.dts+u*s,sampleCount:a,audioobjecttype:1+(l[o+2]>>>6&3),channelcount:(1&l[o+2])<<2|(192&l[o+3])>>>6,samplerate:ye[(60&l[o+2])>>>2],samplingfrequencyindex:(60&l[o+2])>>>2,samplesize:16,data:l.subarray(o+7+i,r)}),l.byteLength===r)return void(l=void 0);u++,l=l.subarray(r)}else o++},this.flush=function(){this.trigger("done")}}).prototype=new z;var ve,_e,be,Te=me,Se=function(r){var n=r.byteLength,a=0,s=0;this.length=function(){return 8*n},this.bitsAvailable=function(){return 8*n+s},this.loadWord=function(){var e=r.byteLength-n,t=new Uint8Array(4),i=Math.min(4,n);if(0===i)throw new Error("no bytes available");t.set(r.subarray(e,e+i)),a=new DataView(t.buffer).getUint32(0),s=8*i,n-=i},this.skipBits=function(e){var t;e<s||(e-=s,e-=8*(t=Math.floor(e/8)),n-=t,this.loadWord()),a<<=e,s-=e},this.readBits=function(e){var t=Math.min(s,e),i=a>>>32-t;return 0<(s-=t)?a<<=t:0<n&&this.loadWord(),0<(t=e-t)?i<<t|this.readBits(t):i},this.skipLeadingZeros=function(){var e;for(e=0;e<s;++e)if(0!=(a&2147483648>>>e))return a<<=e,s-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(_e=function(){var i,r,n=0;_e.prototype.init.call(this),this.push=function(e){var t;for(r?((t=new Uint8Array(r.byteLength+e.data.byteLength)).set(r),t.set(e.data,r.byteLength),r=t):r=e.data;n<r.byteLength-3;n++)if(1===r[n+2]){i=n+5;break}for(;i<r.byteLength;)switch(r[i]){case 0:if(0!==r[i-1]){i+=2;break}if(0!==r[i-2]){i++;break}for(n+3!==i-2&&this.trigger("data",r.subarray(n+3,i-2));1!==r[++i]&&i<r.length;);n=i-2,i+=3;break;case 1:if(0!==r[i-1]||0!==r[i-2]){i+=3;break}this.trigger("data",r.subarray(n+3,i-2)),n=i-2,i+=3;break;default:i+=3}r=r.subarray(n),i-=n,n=0},this.flush=function(){r&&3<r.byteLength&&this.trigger("data",r.subarray(n+3)),r=null,n=0,this.trigger("done")}}).prototype=new z,be={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(ve=function(){var i,r,n,a,s,o,_,t=new _e;ve.prototype.init.call(this),(i=this).push=function(e){"video"===e.type&&(r=e.trackId,n=e.pts,a=e.dts,t.push(e))},t.on("data",function(e){var t={trackId:r,pts:n,dts:a,data:e};switch(31&e[0]){case 5:t.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:t.nalUnitType="sei_rbsp",t.escapedRBSP=s(e.subarray(1));break;case 7:t.nalUnitType="seq_parameter_set_rbsp",t.escapedRBSP=s(e.subarray(1)),t.config=o(t.escapedRBSP);break;case 8:t.nalUnitType="pic_parameter_set_rbsp";break;case 9:t.nalUnitType="access_unit_delimiter_rbsp"}i.trigger("data",t)}),t.on("done",function(){i.trigger("done")}),this.flush=function(){t.flush()},_=function(e,t){var i,r=8,n=8;for(i=0;i<e;i++)0!==n&&(n=(r+t.readExpGolomb()+256)%256),r=0===n?r:n},s=function(e){for(var t,i,r=e.byteLength,n=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(n.push(a+2),a+=2):a++;if(0===n.length)return e;t=r-n.length,i=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===n[0]&&(s++,n.shift()),i[a]=e[s];return i},o=function(e){var t,i,r,n,a,s,o,u,l,c,h,d,p,f=0,m=0,g=0,y=0,v=1;if(i=(t=new Se(e)).readUnsignedByte(),n=t.readUnsignedByte(),r=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),be[i]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)t.readBoolean()&&_(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(s=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===s)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),o=t.readUnsignedExpGolomb(),p=0;p<o;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),l=t.readUnsignedExpGolomb(),0===(c=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:d=[1,1];break;case 2:d=[12,11];break;case 3:d=[10,11];break;case 4:d=[16,11];break;case 5:d=[40,33];break;case 6:d=[24,11];break;case 7:d=[20,11];break;case 8:d=[32,11];break;case 9:d=[80,33];break;case 10:d=[18,11];break;case 11:d=[15,11];break;case 12:d=[64,33];break;case 13:d=[160,99];break;case 14:d=[4,3];break;case 15:d=[3,2];break;case 16:d=[2,1];break;case 255:d=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}d&&(v=d[0]/d[1])}return{profileIdc:i,levelIdc:r,profileCompatibility:n,width:Math.ceil((16*(u+1)-2*f-2*m)*v),height:(2-c)*(l+1)*16-2*g-2*y}}}).prototype=new z;var ke,Ce={H264Stream:ve,NalByteStream:_e};(ke=function(){var o=new Uint8Array,u=0;ke.prototype.init.call(this),this.setTimestamp=function(e){u=e},this.parseId3TagSize=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?i+20:i+10},this.parseAdtsSize=function(e,t){var i=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|i},this.push=function(e){var t,i,r,n,a=0,s=0;for(o.length?(n=o.length,(o=new Uint8Array(e.byteLength+n)).set(o.subarray(0,n)),o.set(e,n)):o=e;3<=o.length-s;)if(o[s]!=="I".charCodeAt(0)||o[s+1]!=="D".charCodeAt(0)||o[s+2]!=="3".charCodeAt(0))if(!0&o[s]&&240==(240&o[s+1])){if(o.length-s<7)break;if((a=this.parseAdtsSize(o,s))>o.length)break;r={type:"audio",data:o.subarray(s,s+a),pts:u,dts:u},this.trigger("data",r),s+=a}else s++;else{if(o.length-s<10)break;if((a=this.parseId3TagSize(o,s))>o.length)break;i={type:"timed-metadata",data:o.subarray(s,s+a)},this.trigger("data",i),s+=a}t=o.length-s,o=0<t?o.subarray(s):new Uint8Array}}).prototype=new z;var Ee,we,Ae,Le,Pe,Oe,Ie,xe,De,Re,Me,Ue,Ne,Be,je,Fe=ke,He=[33,16,5,32,164,27],Ve=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],qe=function(e){for(var t=[];e--;)t.push(0);return t},We={96000:[He,[227,64],qe(154),[56]],88200:[He,[231],qe(170),[56]],64000:[He,[248,192],qe(240),[56]],48000:[He,[255,192],qe(268),[55,148,128],qe(54),[112]],44100:[He,[255,192],qe(268),[55,163,128],qe(84),[112]],32000:[He,[255,192],qe(268),[55,234],qe(226),[112]],24000:[He,[255,192],qe(268),[55,255,128],qe(268),[111,112],qe(126),[224]],16000:[He,[255,192],qe(268),[55,255,128],qe(268),[111,255],qe(269),[223,108],qe(195),[1,192]],12000:[Ve,qe(268),[3,127,248],qe(268),[6,255,240],qe(268),[13,255,224],qe(268),[27,253,128],qe(259),[56]],11025:[Ve,qe(268),[3,127,248],qe(268),[6,255,240],qe(268),[13,255,224],qe(268),[27,255,192],qe(268),[55,175,128],qe(108),[112]],8000:[Ve,qe(268),[3,121,16],qe(47),[7]]},ze=(Ee=We,Object.keys(Ee).reduce(function(e,t){return e[t]=new Uint8Array(Ee[t].reduce(function(e,t){return e.concat(t)},[])),e},{})),Ge=(we=function(e){return 9e4*e},Ae=function(e,t){return e*t},Le=function(e){return e/9e4},Pe=function(e,t){return e/t},function(e,t){return we(Pe(e,t))}),Xe=function(e,t){return Ae(Le(e),t)},Ye=Ce.H264Stream,$e=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Ke=["width","height","profileIdc","levelIdc","profileCompatibility"];Re=function(e){return e[0]==="I".charCodeAt(0)&&e[1]==="D".charCodeAt(0)&&e[2]==="3".charCodeAt(0)},Be=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},je=function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i},(Ie=function(n,a){var s=[],o=0,t=0,l=0,c=1/0;a=a||{},Ie.prototype.init.call(this),this.push=function(t){Me(n,t),n&&$e.forEach(function(e){n[e]=t[e]}),s.push(t)},this.setEarliestDts=function(e){t=e-n.timelineStartInfo.baseMediaDecodeTime},this.setVideoBaseMediaDecodeTime=function(e){c=e},this.setAudioAppendStart=function(e){l=e},this.flush=function(){var e,t,i,r;0!==s.length&&(e=this.trimAdtsFramesByEarliestDts_(s),n.baseMediaDecodeTime=Ne(n,a.keepOriginalTimestamps),this.prefixWithSilence_(n,e),n.samples=this.generateSampleTable_(e),i=q.mdat(this.concatenateFrameData_(e)),s=[],t=q.moof(o,[n]),r=new Uint8Array(t.byteLength+i.byteLength),o++,r.set(t),r.set(i,t.byteLength),Ue(n),this.trigger("data",{track:n,boxes:r})),this.trigger("done","AudioSegmentStream")},this.prefixWithSilence_=function(e,t){var i,r,n,a,s=0,o=0,u=0;if(t.length&&(i=Ge(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(9e4/(e.samplerate/1024)),l&&c&&(s=i-Math.max(l,c),u=(o=Math.floor(s/r))*r),!(o<1||45e3<u))){for((n=ze[e.samplerate])||(n=t[0].data),a=0;a<o;a++)t.splice(a,0,{data:n});e.baseMediaDecodeTime-=Math.floor(Xe(u,e.samplerate))}},this.trimAdtsFramesByEarliestDts_=function(e){return n.minSegmentDts>=t?e:(n.minSegmentDts=1/0,e.filter(function(e){return e.dts>=t&&(n.minSegmentDts=Math.min(n.minSegmentDts,e.dts),n.minSegmentPts=n.minSegmentDts,!0)}))},this.generateSampleTable_=function(e){var t,i,r=[];for(t=0;t<e.length;t++)i=e[t],r.push({size:i.data.byteLength,duration:1024});return r},this.concatenateFrameData_=function(e){var t,i,r=0,n=new Uint8Array(je(e));for(t=0;t<e.length;t++)i=e[t],n.set(i.data,r),r+=i.data.byteLength;return n}}).prototype=new z,(Oe=function(o,u){var t,i,l=0,c=[],h=[];u=u||{},Oe.prototype.init.call(this),delete o.minPTS,this.gopCache_=[],this.push=function(e){Me(o,e),"seq_parameter_set_rbsp"!==e.nalUnitType||t||(t=e.config,o.sps=[e.data],Ke.forEach(function(e){o[e]=t[e]},this)),"pic_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.data,o.pps=[e.data]),c.push(e)},this.flush=function(){for(var e,t,i,r,n,a;c.length&&"access_unit_delimiter_rbsp"!==c[0].nalUnitType;)c.shift();if(0===c.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(e=this.groupNalsIntoFrames_(c),(i=this.groupFramesIntoGops_(e))[0][0].keyFrame||((t=this.getGopForFusion_(c[0],o))?(i.unshift(t),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.pts=t.pts,i.dts=t.dts,i.duration+=t.duration):i=this.extendFirstKeyFrame_(i)),h.length){var s;if(!(s=u.alignGopsAtEnd?this.alignGopsAtEnd_(i):this.alignGopsAtStart_(i)))return this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),c=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ue(o),i=s}Me(o,i),o.samples=this.generateSampleTable_(i),n=q.mdat(this.concatenateNalData_(i)),o.baseMediaDecodeTime=Ne(o,u.keepOriginalTimestamps),this.trigger("processedGopsInfo",i.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),this.gopCache_.unshift({gop:i.pop(),pps:o.pps,sps:o.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),c=[],this.trigger("baseMediaDecodeTime",o.baseMediaDecodeTime),this.trigger("timelineStartInfo",o.timelineStartInfo),r=q.moof(l,[o]),a=new Uint8Array(r.byteLength+n.byteLength),l++,a.set(r),a.set(n,r.byteLength),this.trigger("data",{track:o,boxes:a}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.resetStream_=function(){Ue(o),i=t=void 0},this.getGopForFusion_=function(e){var t,i,r,n,a,s=1/0;for(a=0;a<this.gopCache_.length;a++)r=(n=this.gopCache_[a]).gop,o.pps&&Be(o.pps[0],n.pps[0])&&o.sps&&Be(o.sps[0],n.sps[0])&&(r.dts<o.timelineStartInfo.dts||-1e4<=(t=e.dts-r.dts-r.duration)&&t<=45e3&&(!i||t<s)&&(i=n,s=t));return i?i.gop:null},this.extendFirstKeyFrame_=function(e){var t;return!e[0][0].keyFrame&&1<e.length&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},this.groupNalsIntoFrames_=function(e){var t,i,r=[],n=[];for(t=r.byteLength=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(r.length&&(r.duration=i.dts-r.dts,n.push(r)),(r=[i]).byteLength=i.data.byteLength,r.pts=i.pts,r.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(r.keyFrame=!0),r.duration=i.dts-r.dts,r.byteLength+=i.data.byteLength,r.push(i));return n.length&&(!r.duration||r.duration<=0)&&(r.duration=n[n.length-1].duration),n.push(r),n},this.groupFramesIntoGops_=function(e){var t,i,r=[],n=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(r.length&&(n.push(r),n.byteLength+=r.byteLength,n.nalCount+=r.nalCount,n.duration+=r.duration),(r=[i]).nalCount=i.length,r.byteLength=i.byteLength,r.pts=i.pts,r.dts=i.dts,r.duration=i.duration):(r.duration+=i.duration,r.nalCount+=i.length,r.byteLength+=i.byteLength,r.push(i));return n.length&&r.duration<=0&&(r.duration=n[n.length-1].duration),n.byteLength+=r.byteLength,n.nalCount+=r.nalCount,n.duration+=r.duration,n.push(r),n},this.generateSampleTable_=function(e,t){var i,r,n,a,s,o=t||0,u=[];for(i=0;i<e.length;i++)for(a=e[i],r=0;r<a.length;r++)s=a[r],(n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}).dataOffset=o,n.compositionTimeOffset=s.pts-s.dts,n.duration=s.duration,n.size=4*s.length,n.size+=s.byteLength,s.keyFrame&&(n.flags.dependsOn=2),o+=n.size,u.push(n);return u},this.concatenateNalData_=function(e){var t,i,r,n,a,s,o=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),h=new DataView(c.buffer);for(t=0;t<e.length;t++)for(n=e[t],i=0;i<n.length;i++)for(a=n[i],r=0;r<a.length;r++)s=a[r],h.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c},this.alignGopsAtStart_=function(e){var t,i,r,n,a,s,o,u;for(a=e.byteLength,s=e.nalCount,o=e.duration,t=i=0;t<h.length&&i<e.length&&(r=h[t],n=e[i],r.pts!==n.pts);)n.pts>r.pts?t++:(i++,a-=n.byteLength,s-=n.nalCount,o-=n.duration);return 0===i?e:i===e.length?null:((u=e.slice(i)).byteLength=a,u.duration=o,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,i,r,n,a,s,o;for(t=h.length-1,i=e.length-1,a=null,s=!1;0<=t&&0<=i;){if(r=h[t],n=e[i],r.pts===n.pts){s=!0;break}r.pts>n.pts?t--:(t===h.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(0===(o=s?i:a))return e;var u=e.slice(o),l=u.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return u.byteLength=l.byteLength,u.duration=l.duration,u.nalCount=l.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){h=e}}).prototype=new z,Me=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Ue=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Ne=function(e,t){var i,r=e.minSegmentDts;return t||(r-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=r,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/9e4,i=Math.floor(i)),i},(De=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!=typeof e.remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,De.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBoxes.push(e.boxes),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track),void("audio"===e.track.type&&(this.audioTrack=e.track)))}}).prototype=new z,De.prototype.flush=function(e){var t,i,r,n,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ke.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,$e.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,r=q.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(r.byteLength),s.initSegment.set(r),s.data=new Uint8Array(this.pendingBytes),n=0;n<this.pendingBoxes.length;n++)s.data.set(this.pendingBoxes[n],a),a+=this.pendingBoxes[n].byteLength;for(n=0;n<this.pendingCaptions.length;n++)(t=this.pendingCaptions[n]).startTime=t.startPts-o,t.startTime/=9e4,t.endTime=t.endPts-o,t.endTime/=9e4,s.captionStreams[t.stream]=!0,s.captions.push(t);for(n=0;n<this.pendingMetadata.length;n++)(i=this.pendingMetadata[n]).cueTime=i.pts-o,i.cueTime/=9e4,s.metadata.push(i);s.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",s),this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(xe=function(r){var n,a,s=this,i=!0;xe.prototype.init.call(this),r=r||{},this.baseMediaDecodeTime=r.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var t={};(this.transmuxPipeline_=t).type="aac",t.metadataStream=new ge.MetadataStream,t.aacStream=new Fe,t.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),t.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),t.adtsStream=new Te,t.coalesceStream=new De(r,t.metadataStream),t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioTimestampRolloverStream).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataTimestampRolloverStream).pipe(t.metadataStream).pipe(t.coalesceStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(e){"timed-metadata"!==e.type||t.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},t.coalesceStream.numberOfTracks++,t.audioSegmentStream=new Ie(a,r),t.adtsStream.pipe(t.audioSegmentStream).pipe(t.coalesceStream))}),t.coalesceStream.on("data",this.trigger.bind(this,"data")),t.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new ge.MetadataStream,i.packetStream=new ge.TransportPacketStream,i.parseStream=new ge.TransportParseStream,i.elementaryStream=new ge.ElementaryStream,i.videoTimestampRolloverStream=new ge.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new ge.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new ge.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Te,i.h264Stream=new Ye,i.captionStream=new ge.CaptionStream,i.coalesceStream=new De(r,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(e){var t;if("metadata"===e.type){for(t=e.tracks.length;t--;)n||"video"!==e.tracks[t].type?a||"audio"!==e.tracks[t].type||((a=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(n=e.tracks[t]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;n&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new Oe(n,r),i.videoSegmentStream.on("timelineStartInfo",function(e){a&&(a.timelineStartInfo=e,i.audioSegmentStream.setEarliestDts(e.dts))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(e){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new Ie(a,r),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(e){var t=this.transmuxPipeline_;this.baseMediaDecodeTime=e,a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,Ue(a),a.timelineStartInfo.baseMediaDecodeTime=e,t.audioTimestampRolloverStream&&t.audioTimestampRolloverStream.discontinuity()),n&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[],t.videoTimestampRolloverStream.discontinuity()),n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Ue(n),t.captionStream.reset(),n.timelineStartInfo.baseMediaDecodeTime=e),t.timedMetadataTimestampRolloverStream&&t.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(e){n&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(i){var t=Re(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new z;var Qe={Transmuxer:xe,VideoSegmentStream:Oe,AudioSegmentStream:Ie,AUDIO_PROPERTIES:$e,VIDEO_PROPERTIES:Ke},Je={generator:q,Transmuxer:Qe.Transmuxer,AudioSegmentStream:Qe.AudioSegmentStream,VideoSegmentStream:Qe.VideoSegmentStream},Ze=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},et=function(){function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}}(),tt=function(){function t(e){Ze(this,t),this.options=e||{},this.init()}return et(t,[{key:"init",value:function(){var e;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Je.Transmuxer(this.options),(e=this.transmuxer).on("data",function(e){var t=e.initSegment;e.initSegment={data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength};var i=e.data;e.data=i.buffer,H.postMessage({action:"data",segment:e,byteOffset:i.byteOffset,byteLength:i.byteLength},[e.data])}),e.captionStream&&e.captionStream.on("data",function(e){H.postMessage({action:"caption",data:e})}),e.on("done",function(e){H.postMessage({action:"done"})}),e.on("gopInfo",function(e){H.postMessage({action:"gopInfo",gopInfo:e})})}},{key:"push",value:function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(9e4*t))}},{key:"setAudioAppendStart",value:function(e){this.transmuxer.setAudioAppendStart(Math.ceil(9e4*e.appendStart))}},{key:"flush",value:function(e){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}]),t}();new function(e){e.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new tt(e.data.options):(this.messageHandlers||(this.messageHandlers=new tt),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}(rt)}()}),qu=function(e){return/mp4a\.\d+.\d+/i.test(e)},Wu=function(e){return/avc1\.[\da-f]+/i.test(e)},zu=function(e){return e.map(function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,i){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})})},Gu=function(e){function n(e,t){No(this,n);var i=Fo(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,La.EventTarget));i.timestampOffset_=0,i.pendingBuffers_=[],i.bufferUpdating_=!1,i.mediaSource_=e,i.codecs_=t,i.audioCodec_=null,i.videoCodec_=null,i.audioDisabled_=!1,i.appendAudioInitSegment_=!0,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=11<=La.browser.IE_VERSION;var r={remux:!1,alignGopsAtEnd:i.safeAppend_};return i.codecs_.forEach(function(e){qu(e)?i.audioCodec_=e:Wu(e)&&(i.videoCodec_=e)}),i.transmuxer_=new Vu,i.transmuxer_.postMessage({action:"init",options:r}),i.transmuxer_.onmessage=function(e){return"data"===e.data.action?i.data_(e):"done"===e.data.action?i.done_(e):"gopInfo"===e.data.action?i.appendGopInfo_(e):void 0},Object.defineProperty(i,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(e){"number"==typeof e&&0<=e&&(this.timestampOffset_=e,this.appendAudioInitSegment_=!0,this.gopBuffer_.length=0,this.timeMapping_=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e}))}}),Object.defineProperty(i,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(e){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=e),this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=e)}}),Object.defineProperty(i,"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}}),Object.defineProperty(i,"buffered",{get:function(){var e=null,t=null,i=0,r=[],n=[];if(!this.videoBuffer_&&!this.audioBuffer_)return La.createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_)return this.videoBuffer_.buffered;if(this.audioDisabled_)return this.videoBuffer_.buffered;if(0===this.videoBuffer_.buffered.length&&0===this.audioBuffer_.buffered.length)return La.createTimeRange();for(var a=this.videoBuffer_.buffered,s=this.audioBuffer_.buffered,o=a.length;o--;)r.push({time:a.start(o),type:"start"}),r.push({time:a.end(o),type:"end"});for(o=s.length;o--;)r.push({time:s.start(o),type:"start"}),r.push({time:s.end(o),type:"end"});for(r.sort(function(e,t){return e.time-t.time}),o=0;o<r.length;o++)"start"===r[o].type?2===++i&&(e=r[o].time):"end"===r[o].type&&1===--i&&(t=r[o].time),null!==e&&null!==t&&(n.push([e,t]),t=e=null);return La.createTimeRanges(n)}}),i}return jo(n,La.EventTarget),Bo(n,[{key:"data_",value:function(e){var t=e.data.segment;t.data=new Uint8Array(t.data,e.data.byteOffset,e.data.byteLength),t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength),function(e,t,i){var r=t.player_;if(i.captions&&i.captions.length)for(var n in e.inbandTextTracks_||(e.inbandTextTracks_={}),i.captionStreams)if(!e.inbandTextTracks_[n]){r.tech_.trigger({type:"usage",name:"hls-608"});var a=r.textTracks().getTrackById(n);e.inbandTextTracks_[n]=a||r.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}i.metadata&&i.metadata.length&&!e.metadataTrack_&&(e.metadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)}(this,this.mediaSource_,t),this.pendingBuffers_.push(t)}},{key:"done_",value:function(e){"closed"!==this.mediaSource_.readyState?this.processPendingSegments_():this.pendingBuffers_.length=0}},{key:"createRealSourceBuffers_",value:function(){var r=this,n=["audio","video"];n.forEach(function(t){if(r[t+"Codec_"]&&!r[t+"Buffer_"]){var i=null;if(r.mediaSource_[t+"Buffer_"])(i=r.mediaSource_[t+"Buffer_"]).updating=!1;else{var e=t+'/mp4;codecs="'+r[t+"Codec_"]+'"';i=function(e,t){var i=e.addSourceBuffer(t),r=Object.create(null);r.updating=!1,r.realBuffer_=i;var n=function(t){"function"==typeof i[t]?r[t]=function(){return i[t].apply(i,arguments)}:"undefined"==typeof r[t]&&Object.defineProperty(r,t,{get:function(){return i[t]},set:function(e){return i[t]=e}})};for(var a in i)n(a);return r}(r.mediaSource_.nativeMediaSource_,e),r.mediaSource_[t+"Buffer_"]=i}r[t+"Buffer_"]=i,["update","updatestart","updateend"].forEach(function(e){i.addEventListener(e,function(){if("audio"!==t||!r.audioDisabled_)return"updateend"===e&&(r[t+"Buffer_"].updating=!1),n.every(function(e){return!("audio"!==e||!r.audioDisabled_)||(t===e||!r[e+"Buffer_"]||!r[e+"Buffer_"].updating)})?r.trigger(e):void 0})})}})}},{key:"appendBuffer",value:function(e){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:function(e,t,i){if(!t||!e.length)return[];var r=Math.ceil(9e4*(t.currentTime()-i+3)),n=void 0;for(n=0;n<e.length&&!(e[n].pts>r);n++);return e.slice(n)}(this.gopBuffer_,this.mediaSource_.player_,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength},[e.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(e){this.gopBuffer_=function(e,t,i){if(!t.length)return e;if(i)return t.slice();for(var r=t[0].pts,n=0;n<e.length&&!(e[n].pts>=r);n++);return e.slice(0,n).concat(t)}(this.gopBuffer_,e.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(e,t){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(e,t),this.gopBuffer_=function(e,t,i,r){for(var n=Math.ceil(9e4*(t-r)),a=Math.ceil(9e4*(i-r)),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=n););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(e,t)),Lu(e,t,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)Lu(e,t,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var e={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};e=this.pendingBuffers_.reduce(function(e,t){var i=t.type,r=t.data,n=t.initSegment;return e[i].segments.push(r),e[i].bytes+=r.byteLength,e[i].initSegment=n,t.captions&&(e.captions=e.captions.concat(t.captions)),t.info&&(e[i].info=t.info),t.metadata&&(e.metadata=e.metadata.concat(t.metadata)),e},e),this.videoBuffer_||this.audioBuffer_||(0===e.video.bytes&&(this.videoCodec_=null),0===e.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),e.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:e.audio.info}),e.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:e.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(e.audio.segments.unshift(e.audio.initSegment),e.audio.bytes+=e.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var t=!1;this.videoBuffer_&&e.video.bytes?(e.video.segments.unshift(e.video.initSegment),e.video.bytes+=e.video.initSegment.byteLength,this.concatAndAppendSegments_(e.video,this.videoBuffer_),Ou(this,e.captions,e.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(t=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(e.audio,this.audioBuffer_),this.pendingBuffers_.length=0,t&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(e,t){var i=0,r=void 0;if(e.bytes){r=new Uint8Array(e.bytes),e.segments.forEach(function(e){r.set(e,i),i+=e.byteLength});try{t.updating=!0,t.appendBuffer(r)}catch(e){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}}]),n}(),Xu=function(e){function t(){No(this,t);var a=Fo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),e=void 0;for(e in a.nativeMediaSource_=new g.MediaSource,a.nativeMediaSource_)e in t.prototype||"function"!=typeof a.nativeMediaSource_[e]||(a[e]=a.nativeMediaSource_[e].bind(a.nativeMediaSource_));return a.duration_=NaN,Object.defineProperty(a,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(e){(this.duration_=e)===1/0||(this.nativeMediaSource_.duration=e)}}),Object.defineProperty(a,"seekable",{get:function(){return this.duration_===1/0?La.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(a,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(a,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),a.sourceBuffers=[],a.activeSourceBuffers_=[],a.updateActiveSourceBuffers_=function(){if(a.activeSourceBuffers_.length=0,1===a.sourceBuffers.length){var e=a.sourceBuffers[0];return e.appendAudioInitSegment_=!0,e.audioDisabled_=!e.audioCodec_,void a.activeSourceBuffers_.push(e)}for(var i=!1,r=!0,t=0;t<a.player_.audioTracks().length;t++){var n=a.player_.audioTracks()[t];if(n.enabled&&"main"!==n.kind){r=!(i=!0);break}}a.sourceBuffers.forEach(function(e,t){if(e.appendAudioInitSegment_=!0,e.videoCodec_&&e.audioCodec_)e.audioDisabled_=i;else if(e.videoCodec_&&!e.audioCodec_)e.audioDisabled_=!0,r=!1;else if(!e.videoCodec_&&e.audioCodec_&&(e.audioDisabled_=t?r:!r,e.audioDisabled_))return;a.activeSourceBuffers_.push(e)})},a.onPlayerMediachange_=function(){a.sourceBuffers.forEach(function(e){e.appendAudioInitSegment_=!0})},a.onHlsReset_=function(){a.sourceBuffers.forEach(function(e){e.transmuxer_&&e.transmuxer_.postMessage({action:"resetCaptions"})})},a.onHlsSegmentTimeMapping_=function(t){a.sourceBuffers.forEach(function(e){return e.timeMapping_=t.mapping})},["sourceopen","sourceclose","sourceended"].forEach(function(e){this.nativeMediaSource_.addEventListener(e,this.trigger.bind(this))},a),a.on("sourceopen",function(e){var t=p.querySelector('[src="'+a.url_+'"]');t&&(a.player_=La(t.parentNode),a.player_.tech_.on("hls-reset",a.onHlsReset_),a.player_.tech_.on("hls-segment-time-mapping",a.onHlsSegmentTimeMapping_),a.player_.audioTracks&&a.player_.audioTracks()&&(a.player_.audioTracks().on("change",a.updateActiveSourceBuffers_),a.player_.audioTracks().on("addtrack",a.updateActiveSourceBuffers_),a.player_.audioTracks().on("removetrack",a.updateActiveSourceBuffers_)),a.player_.on("mediachange",a.onPlayerMediachange_))}),a.on("sourceended",function(e){for(var t=Pu(a.duration),i=0;i<a.sourceBuffers.length;i++){var r=a.sourceBuffers[i],n=r.metadataTrack_&&r.metadataTrack_.cues;n&&n.length&&(n[n.length-1].endTime=t)}}),a.on("sourceclose",function(e){this.sourceBuffers.forEach(function(e){e.transmuxer_&&e.transmuxer_.terminate()}),this.sourceBuffers.length=0,this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&(this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",this.onHlsSegmentTimeMapping_)))}),a}return jo(t,La.EventTarget),Bo(t,[{key:"addSeekableRange_",value:function(e,t){var i=void 0;if(this.duration!==1/0)throw(i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity")).name="InvalidStateError",i.code=11,i;(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(e){var n,t,i=void 0,r=(n={type:"",parameters:{}},t=e.trim().split(";"),n.type=t.shift().trim(),t.forEach(function(e){var t=e.trim().split("=");if(1<t.length){var i=t[0].replace(/"/g,"").trim(),r=t[1].replace(/"/g,"").trim();n.parameters[i]=r}}),n);if(/^(video|audio)\/mp2t$/i.test(r.type)){var a=[];r.parameters&&r.parameters.codecs&&(a=r.parameters.codecs.split(","),a=(a=zu(a)).filter(function(e){return qu(e)||Wu(e)})),0===a.length&&(a=["avc1.4d400d","mp4a.40.2"]),i=new Gu(this,a),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),i.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)}else i=this.nativeMediaSource_.addSourceBuffer(e);return this.sourceBuffers.push(i),i}}]),t}(),Yu=0;La.mediaSources={};var $u=function(e,t){var i=La.mediaSources[e];if(!i)throw new Error("Media Source not found (Video.js)");i.trigger({type:"sourceopen",swfId:t})},Ku=function(){return!!g.MediaSource&&!!g.MediaSource.isTypeSupported&&g.MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},Qu=function(){if(this.MediaSource={open:$u,supportsNativeMediaSources:Ku},Ku())return new Xu;throw new Error("Cannot use create a virtual MediaSource for this video")};Qu.open=$u,Qu.supportsNativeMediaSources=Ku;var Ju={createObjectURL:function(e){var t=void 0;return e instanceof Xu?(t=g.URL.createObjectURL(e.nativeMediaSource_),e.url_=t):e instanceof Xu?(t="blob:vjs-media-source/"+Yu,Yu++,La.mediaSources[t]=e,t):(t=g.URL.createObjectURL(e),e.url_=t)}};La.MediaSource=Qu,La.URL=Ju;var Zu=La.EventTarget,el=La.mergeOptions,tl=function(e,t){for(var s=el(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),i=0;i<t.playlists.length;i++){var r=Go(s,t.playlists[i]);r&&(s=r)}return zo(t,function(e,t,i,r){if(e.playlists&&e.playlists.length){var n=e.playlists[0].uri,a=Go(s,e.playlists[0]);a&&((s=a).mediaGroups[t][i][r].playlists[0]=s.playlists[n])}}),s},il=function(e){function a(e,t,i,r){No(this,a);var n=Fo(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));if(n.hls_=t,n.withCredentials=i,!e)throw new Error("A non-empty playlist URL or playlist is required");return n.on("minimumUpdatePeriod",function(){n.refreshXml_()}),n.on("mediaupdatetimeout",function(){n.refreshMedia_()}),"string"==typeof e?(n.srcUrl=e,n.state="HAVE_NOTHING",Fo(n)):(n.masterPlaylistLoader_=r,n.state="HAVE_METADATA",n.started=!0,n.media(e),g.setTimeout(function(){n.trigger("loadedmetadata")},0),n)}return jo(a,Zu),Bo(a,[{key:"dispose",value:function(){this.stopRequest(),g.clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}},{key:"media",value:function(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var t=this.state;if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var i=!this.media_||e.uri!==this.media_.uri;this.state="HAVE_METADATA",i&&(this.media_&&this.trigger("mediachanging"),this.media_=e,this.refreshMedia_(),"HAVE_MASTER"!==t&&this.trigger("mediachange"))}},{key:"pause",value:function(){this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1)}},{key:"load",value:function(){this.started?this.trigger("loadedplaylist"):this.start()}},{key:"parseMasterXml",value:function(){var a=Cs(this.masterXml_,{manifestUri:this.srcUrl,clientOffset:this.clientOffset_});a.uri=this.srcUrl;for(var e=0;e<a.playlists.length;e++){var t="placeholder-uri-"+e;a.playlists[e].uri=t,a.playlists[t]=a.playlists[e]}return zo(a,function(e,t,i,r){if(e.playlists&&e.playlists.length){var n="placeholder-uri-"+t+"-"+i+"-"+r;e.playlists[0].uri=n,a.playlists[n]=e.playlists[0]}}),Xo(a),Yo(a),a}},{key:"start",value:function(){var i=this;this.started=!0,this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,t){if(i.request){if(i.request=null,e)return i.error={status:t.status,message:"DASH playlist request error at URL: "+i.srcUrl,responseText:t.responseText,code:2},"HAVE_NOTHING"===i.state&&(i.started=!1),i.trigger("error");i.masterXml_=t.responseText,t.responseHeaders&&t.responseHeaders.date?i.masterLoaded_=Date.parse(t.responseHeaders.date):i.masterLoaded_=Date.now(),i.syncClientServerClock_(i.onClientServerClockSync_.bind(i))}})}},{key:"syncClientServerClock_",value:function(r){var n=this,a=Es(this.masterXml_);return null===a?(this.clientOffset_=this.masterLoaded_-Date.now(),r()):"DIRECT"===a.method?(this.clientOffset_=a.value-Date.now(),r()):void(this.request=this.hls_.xhr({uri:Uo(this.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(e,t){if(n.request){if(e)return n.clientOffset_=n.masterLoaded_-Date.now(),r();var i=void 0;i="HEAD"===a.method?t.responseHeaders&&t.responseHeaders.date?Date.parse(t.responseHeaders.date):n.masterLoaded_:Date.parse(t.responseText),n.clientOffset_=i-Date.now(),r()}}))}},{key:"onClientServerClockSync_",value:function(){var e=this;this.master=this.parseMasterXml(),this.state="HAVE_MASTER",this.trigger("loadedplaylist"),this.media_||this.media(this.master.playlists[0]),g.setTimeout(function(){e.trigger("loadedmetadata")},0),this.master.minimumUpdatePeriod&&g.setTimeout(function(){e.trigger("minimumUpdatePeriod")},this.master.minimumUpdatePeriod)}},{key:"refreshXml_",value:function(){var r=this;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(e,t){if(r.request){if(r.request=null,e)return r.error={status:t.status,message:"DASH playlist request error at URL: "+r.srcUrl,responseText:t.responseText,code:2},"HAVE_NOTHING"===r.state&&(r.started=!1),r.trigger("error");r.masterXml_=t.responseText;var i=r.parseMasterXml();r.master=tl(r.master,i),g.setTimeout(function(){r.trigger("minimumUpdatePeriod")},r.master.minimumUpdatePeriod)}})}},{key:"refreshMedia_",value:function(){var e=this,t=void 0,i=void 0;this.masterPlaylistLoader_?(t=this.masterPlaylistLoader_.master,i=this.masterPlaylistLoader_.parseMasterXml()):(t=this.master,i=this.parseMasterXml());var r=tl(t,i);r?(this.masterPlaylistLoader_?this.masterPlaylistLoader_.master=r:this.master=r,this.media_=r.playlists[this.media_.uri]):this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=g.setTimeout(function(){e.trigger("mediaupdatetimeout")},$o(this.media(),!!r))),this.trigger("loadedplaylist")}}]),a}(),rl=function(e){return La.log.debug?La.log.debug.bind(La,"VHS:",e+" >"):function(){}};function nl(){}var al=function(){function n(e,t,i,r){No(this,n),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=e,this.processedAppend_=!1,this.type_=i,this.mimeType_=t,this.logger_=rl("SourceUpdater["+i+"]["+t+"]"),"closed"===e.readyState?e.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,t,r)):this.createSourceBuffer_(t,r)}return Bo(n,[{key:"createSourceBuffer_",value:function(e,t){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(e),this.logger_("created SourceBuffer"),t&&(t.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?t.on("sourcebufferadded",function(){i.start_()}):this.start_()}},{key:"start_",value:function(){var t=this;this.started_=!0,this.onUpdateendCallback_=function(){var e=t.pendingCallback_;t.pendingCallback_=null,t.logger_("buffered ["+wu(t.buffered())+"]"),e&&e(),t.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(e){var t=this;this.processedAppend_&&this.queueCallback_(function(){t.sourceBuffer_.abort()},e)}},{key:"appendBuffer",value:function(e,t){var i=this;this.processedAppend_=!0,this.queueCallback_(function(){i.sourceBuffer_.appendBuffer(e)},t)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:La.createTimeRanges()}},{key:"remove",value:function(e,t){var i=this;this.processedAppend_&&this.queueCallback_(function(){i.logger_("remove ["+e+" => "+t+"]"),i.sourceBuffer_.remove(e,t)},nl)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(e){var t=this;return"undefined"!=typeof e&&(this.queueCallback_(function(){t.sourceBuffer_.timestampOffset=e}),this.timestampOffset_=e),this.timestampOffset_}},{key:"queueCallback_",value:function(e,t){this.callbacks_.push([e.bind(this),t]),this.runCallback_()}},{key:"runCallback_",value:function(){var e=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(e=this.callbacks_.shift(),this.pendingCallback_=e[1],e[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),n}(),sl={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},ol=2,ul=-101,ll=-102,cl=function(e){var t,i,r={};return e.byterange&&(r.Range=(t=e.byterange,i=t.offset+t.length-1,"bytes="+t.offset+"-"+i)),r},hl=function(e){e.forEach(function(e){e.abort()})},dl=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:ul,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:ll,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:ol,xhr:t}:null},pl=function(s,o,u){var l=[],c=0;return function(e,t){if(e&&(hl(s),l.push(e)),(c+=1)===s.length){if(t.endOfAllRequests=Date.now(),0<l.length){var i=l.reduce(function(e,t){return t.code>e.code?t:e});return u(i,t)}return t.encryptedBytes?(n=t,a=u,(r=o).addEventListener("message",function e(t){if(t.data.source===n.requestId){r.removeEventListener("message",e);var i=t.data.decrypted;return n.bytes=new Uint8Array(i.bytes,i.byteOffset,i.byteLength),a(null,n)}}),void r.postMessage(vu({source:n.requestId,encrypted:n.encryptedBytes,key:n.key.bytes,iv:n.key.iv}),[n.encryptedBytes.buffer,n.key.bytes.buffer])):u(null,t)}var r,n,a}},fl=function(n,a){return function(e){var t,i,r;return n.stats=La.mergeOptions(n.stats,(i=(t=e).target,(r={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=t.loaded,r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3),r)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),a(e,n)}},ml=function(e,t,i,r,n,a){var s,o,u,l,c=[],h=pl(c,i,a);if(r.key){var d=e(La.mergeOptions(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),(s=r,o=h,function(e,t){var i=t.response,r=dl(e,t);if(r)return o(r,s);if(16!==i.byteLength)return o({status:t.status,message:"Invalid HLS key at URL: "+t.uri,code:ol,xhr:t},s);var n=new DataView(i);return s.key.bytes=new Uint32Array([n.getUint32(0),n.getUint32(4),n.getUint32(8),n.getUint32(12)]),o(null,s)}));c.push(d)}if(r.map&&!r.map.bytes){var p=e(La.mergeOptions(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:cl(r.map)}),(u=r,l=h,function(e,t){var i=t.response,r=dl(e,t);return r?l(r,u):0===i.byteLength?l({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:ol,xhr:t},u):(u.map.bytes=new Uint8Array(t.response),l(null,u))}));c.push(p)}var f,m,g=e(La.mergeOptions(t,{uri:r.resolvedUri,responseType:"arraybuffer",headers:cl(r)}),(f=r,m=h,function(e,t){var i,r=t.response,n=dl(e,t);return n?m(n,f):0===r.byteLength?m({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:ol,xhr:t},f):(f.stats={bandwidth:(i=t).bandwidth,bytesReceived:i.bytesReceived||0,roundTripTime:i.roundTripTime||0},f.key?f.encryptedBytes=new Uint8Array(t.response):f.bytes=new Uint8Array(t.response),m(null,f))}));return g.addEventListener("progress",fl(r,n)),c.push(g),function(){return hl(c)}},gl={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},yl=function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",i={codecCount:0};return i.codecCount=t.split(",").length,i.codecCount=i.codecCount||2,(e=/(^|\s|,)+(avc[13])([^ ,]*)/i.exec(t))&&(i.videoCodec=e[2],i.videoObjectTypeIndicator=e[3]),i.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(t),i.audioProfile=i.audioProfile&&i.audioProfile[2],i},vl=function(e,t,i){return e+"/"+t+'; codecs="'+i.filter(function(e){return!!e}).join(", ")+'"'},_l=function(e,t){var i,r,n=(i=t).segments&&i.segments.length&&i.segments[0].map?"mp4":"mp2t",a=(r=t.attributes||{}).CODECS?yl(r.CODECS):gl,s=t.attributes||{},o=!0,u=!1;if(!t)return[];if(e.mediaGroups.AUDIO&&s.AUDIO){var l=e.mediaGroups.AUDIO[s.AUDIO];if(l)for(var c in o=!(u=!0),l)if(!l[c].uri&&!l[c].playlists){o=!0;break}}u&&!a.audioProfile&&(o||(a.audioProfile=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var i=e.mediaGroups.AUDIO[t];if(!i)return null;for(var r in i){var n=i[r];if(n.default&&n.playlists)return yl(n.playlists[0].attributes.CODECS).audioProfile}return null}(e,s.AUDIO)),a.audioProfile||(La.log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),a.audioProfile=gl.audioProfile));var h={};a.videoCodec&&(h.video=""+a.videoCodec+a.videoObjectTypeIndicator),a.audioProfile&&(h.audio="mp4a.40."+a.audioProfile);var d=vl("audio",n,[h.audio]),p=vl("video",n,[h.video]),f=vl("video",n,[h.video,h.audio]);return u?!o&&h.video?[p,d]:o||h.video?[f,d]:[d,d]:h.video?[f]:[d]},bl=function(e,t){var i;return e&&(i=g.getComputedStyle(e))?i[t]:""},Tl=function(e,r){var n=e.slice();e.sort(function(e,t){var i=r(e,t);return 0===i?n.indexOf(e)-n.indexOf(t):i})},Sl=function(e,t){var i=void 0,r=void 0;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||g.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),i-(r=r||g.Number.MAX_VALUE)},kl=function(e,t,i){if(!e||!t)return!1;var r=i===e.segments.length;return e.endList&&"open"===t.readyState&&r},Cl=function(e){return"number"==typeof e&&isFinite(e)},El=function(e){function i(e){No(this,i);var t=Fo(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));if(!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return t.bandwidth=e.bandwidth,t.throughput={rate:0,count:0},t.roundTrip=NaN,t.resetStats_(),t.mediaIndex=null,t.hasPlayed_=e.hasPlayed,t.currentTime_=e.currentTime,t.seekable_=e.seekable,t.seeking_=e.seeking,t.duration_=e.duration,t.mediaSource_=e.mediaSource,t.hls_=e.hls,t.loaderType_=e.loaderType,t.startingMedia_=void 0,t.segmentMetadataTrack_=e.segmentMetadataTrack,t.goalBufferLength_=e.goalBufferLength,t.sourceType_=e.sourceType,t.state_="INIT",t.checkBufferTimeout_=null,t.error_=void 0,t.currentTimeline_=-1,t.pendingSegment_=null,t.mimeType_=null,t.sourceUpdater_=null,t.xhrOptions_=null,t.activeInitSegmentId_=null,t.initSegments_={},t.decrypter_=e.decrypter,t.syncController_=e.syncController,t.syncPoint_={segmentIndex:0,time:0},t.syncController_.on("syncinfoupdate",function(){return t.trigger("syncinfoupdate")}),t.mediaSource_.addEventListener("sourceopen",function(){return t.ended_=!1}),t.fetchAtBuffer_=!1,t.logger_=rl("SegmentLoader["+t.loaderType_+"]"),Object.defineProperty(t,"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e)}}),t}return jo(i,La.EventTarget),Bo(i,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(e){return"undefined"!=typeof e&&(this.error_=e),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():La.createTimeRanges()}},{key:"initSegment",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var i=_u(e),r=this.initSegments_[i];return t&&!r&&e.bytes&&(this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes}),r||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new al(this.mediaSource_,this.mimeType_,this.loaderType_,this.sourceBufferEmitter_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(e){var i=this.playlist_,r=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,time:0});var n=i?i.id:null;if(this.logger_("playlist update ["+n+" => "+e.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(i&&i.uri===e.uri){var a=e.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),r&&(r.mediaIndex-=a,0<=r.mediaIndex&&(r.segment=e.segments[r.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,e)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(g.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e,t){this.mimeType_||(this.mimeType_=e,this.sourceBufferEmitter_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_()),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(e,t){this.sourceUpdater_&&this.sourceUpdater_.remove(e,t),Lu(e,t,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&g.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=g.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&g.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=g.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e)kl(this.playlist_,this.mediaSource_,e.mediaIndex)?this.endOfStream():(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),e.timestampOffset=e.startOfSegment),this.loadSegment_(e))}}},{key:"checkBuffer_",value:function(e,t,i,r,n,a){var s=0,o=void 0;e.length&&(s=e.end(e.length-1));var u=Math.max(0,s-n);if(!t.segments.length)return null;if(u>=this.goalBufferLength_())return null;if(!r&&1<=u)return null;if(null===a)return i=this.getSyncSegmentCandidate_(t),this.generateSegmentInfo_(t,i,null,!0);if(null!==i){var l=t.segments[i];return o=l&&l.end?l.end:s,this.generateSegmentInfo_(t,i+1,o,!1)}if(this.fetchAtBuffer_){var c=du.getMediaInfoForTime(t,s,a.segmentIndex,a.time);i=c.mediaIndex,o=c.startTime}else{var h=du.getMediaInfoForTime(t,n,a.segmentIndex,a.time);i=h.mediaIndex,o=h.startTime}return this.generateSegmentInfo_(t,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var t=this;if(-1===this.currentTimeline_)return 0;var i=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===t.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(e,t,i,r){if(t<0||t>=e.segments.length)return null;var n=e.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:n.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:i,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:n.timeline,duration:n.duration,segment:n}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return!1;var t=this.currentTime_(),i=e.bandwidth,r=this.pendingSegment_.duration,n=du.estimateSegmentRequestTime(r,i,this.playlist_,e.bytesReceived),a=function(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.hls_.tech_.playbackRate())-1;if(n<=a)return!1;var s=function(e){var t=e.master,i=e.currentTime,r=e.bandwidth,n=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,u=e.syncController,l=t.playlists.filter(function(e){return!du.isIncompatible(e)}),c=l.filter(du.isEnabled);c.length||(c=l.filter(function(e){return!du.isDisabled(e)}));var h=c.filter(du.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=u.getSyncPoint(e,n,o,i)?1:2;return{playlist:e,rebufferingImpact:du.estimateSegmentRequestTime(a,r,e)*t-s}}),d=h.filter(function(e){return e.rebufferingImpact<=0});return Tl(d,function(e,t){return Sl(t.playlist,e.playlist)}),d.length?d[0]:(Tl(h,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),h[0]||null)}({master:this.hls_.playlists.master,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=n-a-s.rebufferingImpact,u=.5;return a<=Su&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u?!1:(this.bandwidth=s.playlist.attributes.BANDWIDTH*sl.BANDWIDTH_VARIANCE+1,this.abort(),this.trigger("earlyabort"),!0)}}},{key:"handleProgress_",value:function(e,t){this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(t.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),e.abortRequests=ml(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(e){var t,i,r,n,a=(t=this.seekable_(),i=this.currentTime_(),r=this.playlist_.targetDuration||10,n=void 0,n=t.length&&0<t.start(0)&&t.start(0)<i?t.start(0):i-30,Math.min(n,i-r));0<a&&this.remove(0,a)}},{key:"createSimplifiedSegmentObj_",value:function(e){var t=e.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId};if(t.key){var r=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key={resolvedUri:t.key.resolvedUri,iv:r}}return t.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(e,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),this.pendingSegment_){if(t.requestId===this.pendingSegment_.requestId){if(e)return this.pendingSegment_=null,this.state="READY",e.code===ll?void(this.mediaRequestsAborted+=1):(this.pause(),e.code===ul?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,void this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error")));this.bandwidth=t.stats.bandwidth,this.roundTrip=t.stats.roundTripTime,t.map&&(t.map=this.initSegment(t.map,!0)),this.processSegmentResponse_(t)}}else this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var t=this.pendingSegment_;t.bytes=e.bytes,e.map&&(t.segment.map.bytes=e.map.bytes),t.endOfAllRequests=e.endOfAllRequests,this.handleSegment_()}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_){var t=this.pendingSegment_,i=t.segment,r=this.syncController_.probeSegmentInfo(t);"undefined"==typeof this.startingMedia_&&r&&(r.containsAudio||r.containsVideo)&&(this.startingMedia_={containsAudio:r.containsAudio,containsVideo:r.containsVideo});var n,a,s,o=(n=this.loaderType_,a=this.startingMedia_,s=r,"main"===n&&a&&s?s.containsAudio||s.containsVideo?a.containsVideo&&!s.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!a.containsVideo&&s.containsVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null);if(o)return this.error({message:o,blacklistDuration:1/0}),void this.trigger("error");if(t.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");null!==t.timestampOffset&&t.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(t.timestampOffset),this.trigger("timestampoffset"));var u,l,c,h,d,p,f,m,g,y,v,_=this.syncController_.mappingForTimeline(t.timeline);if(null!==_&&this.trigger({type:"segmenttimemapping",mapping:_}),this.state="APPENDING",i.map){var b=_u(i.map);if(!this.activeInitSegmentId_||this.activeInitSegmentId_!==b){var T=this.initSegment(i.map);this.sourceUpdater_.appendBuffer(T.bytes,function(){e.activeInitSegmentId_=b})}}t.byteLength=t.bytes.byteLength,"number"==typeof i.start&&"number"==typeof i.end?this.mediaSecondsLoaded+=i.end-i.start:this.mediaSecondsLoaded+=i.duration,this.logger_((l=(u=t).segment,c=l.start,h=l.end,d=u.playlist,p=d.mediaSequence,f=d.id,m=d.segments,g=void 0===m?[]:m,y=u.mediaIndex,v=u.timeline,["appending ["+y+"] of ["+p+", "+(p+g.length)+"] from playlist ["+f+"]","["+c+" => "+h+"] in timeline ["+v+"]"].join(" "))),this.sourceUpdater_.appendBuffer(t.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_,t=e.segment,i=null!==this.mediaIndex;(this.pendingSegment_=null,this.recordThroughput_(e),this.addSegmentMetadataCue_(e),this.state="READY",this.mediaIndex=e.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>3*e.playlist.targetDuration)?this.resetEverything():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),kl(e.playlist,this.mediaSource_,e.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(e){var t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var t=e.segment,i=t.start,r=t.end;if(Cl(i)&&Cl(r)){Lu(i,r,this.segmentMetadataTrack_);var n=g.WebKitDataCue||g.VTTCue,a={bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.uri,start:i,end:r},s=new n(i,r,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}}}]),i}(),wl=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)})),Al=function(e){return String.fromCharCode.apply(null,e)},Ll=function(e){function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};No(this,r);var i=Fo(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return i.mediaSource_=null,i.subtitlesTrack_=null,i}return jo(r,El),Bo(r,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return La.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,i=e[e.length-1].startTime;return La.createTimeRanges([[t,i]])}},{key:"initSegment",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!e)return null;var i=_u(e),r=this.initSegments_[i];if(t&&!r&&e.bytes){var n=wl.byteLength+e.bytes.byteLength,a=new Uint8Array(n);a.set(e.bytes),a.set(wl,e.bytes.byteLength),this.initSegments_[i]=r={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return r||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(e){return"undefined"==typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}},{key:"remove",value:function(e,t){Lu(e,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t=this.skipEmptySegments_(t)){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",function(){e.state="READY",e.paused()||e.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var t=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var e=this.pendingSegment_,i=e.segment;if("function"!=typeof g.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var r=function(){t.handleSegment_()};return this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",function(){t.subtitlesTrack_.tech_.off("vttjsloaded",r),t.error({message:"Error loading vtt.js"}),t.state="READY",t.pause(),t.trigger("error")})}i.requested=!0;try{this.parseVTTCues_(e)}catch(e){return this.error({message:e.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(e,this.syncController_.timelines[e.timeline],this.playlist_),e.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");e.byteLength=e.bytes.byteLength,this.mediaSecondsLoaded+=i.duration,e.cues.length&&this.remove(e.cues[0].endTime,e.cues[e.cues.length-1].endTime),e.cues.forEach(function(e){t.subtitlesTrack_.addCue(e)}),this.handleUpdateEnd_()}else this.state="READY"}},{key:"parseVTTCues_",value:function(t){var e=void 0,i=!1;"function"==typeof g.TextDecoder?e=new g.TextDecoder("utf8"):(e=g.WebVTT.StringDecoder(),i=!0);var r=new g.WebVTT.Parser(g,g.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=t.cues.push.bind(t.cues),r.ontimestampmap=function(e){return t.timestampmap=e},r.onparsingerror=function(e){La.log.warn("Error encountered when parsing cues: "+e.message)},t.segment.map){var n=t.segment.map.bytes;i&&(n=Al(n)),r.parse(n)}var a=t.bytes;i&&(a=Al(a)),r.parse(a),r.flush()}},{key:"updateTimeMapping_",value:function(e,t,i){var r=e.segment;if(t)if(e.cues.length){var n=e.timestampmap,a=n.MPEGTS/9e4-n.LOCAL+t.mapping;if(e.cues.forEach(function(e){e.startTime+=a,e.endTime+=a}),!i.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(s,o-r.duration)}}}else r.empty=!0}}]),r}(),Pl=function(e,t){for(var i=e.cues,r=0;r<i.length;r++){var n=i[r];if(t>=n.adStartTime&&t<=n.adEndTime)return n}return null},Ol=Co,Il=[{name:"VOD",run:function(e,t,i,r,n){if(i!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(e,t,i,r,n){if(!e.datetimeToDisplayTime)return null;var a=t.segments||[],s=null,o=null;n=n||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.dateTimeObject){var c=l.dateTimeObject.getTime()/1e3+e.datetimeToDisplayTime,h=Math.abs(n-c);if(null!==o&&o<h)break;o=h,s={time:c,segmentIndex:u}}}return s}},{name:"Segment",run:function(e,t,i,r,n){var a=t.segments||[],s=null,o=null;n=n||0;for(var u=0;u<a.length;u++){var l=a[u];if(l.timeline===r&&"undefined"!=typeof l.start){var c=Math.abs(n-l.start);if(null!==o&&o<c)break;(!s||null===o||c<=o)&&(o=c,s={time:l.start,segmentIndex:u})}}return s}},{name:"Discontinuity",run:function(e,t,i,r,n){var a=null;if(n=n||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){var h=Math.abs(n-c.time);if(null!==s&&s<h)break;(!a||null===s||h<=s)&&(s=h,a={time:c.time,segmentIndex:u})}}return a}},{name:"Playlist",run:function(e,t,i,r,n){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],xl=function(e){function t(){No(this,t);var e=Fo(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.inspectCache_=void 0,e.timelines=[],e.discontinuities=[],e.datetimeToDisplayTime=null,e.logger_=rl("SyncController"),e}return jo(t,La.EventTarget),Bo(t,[{key:"getSyncPoint",value:function(e,t,i,r){var n=this.runStrategies_(e,t,i,r);return n.length?this.selectSyncPoint_(n,{key:"time",value:r}):null}},{key:"getExpiredTime",value:function(e,t){if(!e||!e.segments)return null;var i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;var r=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return 0<r.segmentIndex&&(r.time*=-1),Math.abs(r.time+eu(e,r.segmentIndex,0))}},{key:"runStrategies_",value:function(e,t,i,r){for(var n=[],a=0;a<Il.length;a++){var s=Il[a],o=s.run(this,e,t,i,r);o&&(o.strategy=s.name,n.push({strategy:s.name,syncPoint:o}))}return n}},{key:"selectSyncPoint_",value:function(e,t){for(var i=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),n=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<r&&(r=s,i=e[a].syncPoint,n=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+n+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i}},{key:"saveExpiredSegmentInfo",value:function(e,t){for(var i=t.mediaSequence-e.mediaSequence-1;0<=i;i--){var r=e.segments[i];if(r&&"undefined"!=typeof r.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(e){if(!this.datetimeToDisplayTime&&e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(e){var t=e.segment,i=e.playlist,r=void 0;return(r=t.map?this.probeMp4Segment_(e):this.probeTsSegment_(e))&&this.calculateSegmentTimeMapping_(e,r)&&(this.saveDiscontinuitySyncInfo_(e),i.syncInfo||(i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:t.start})),r}},{key:"probeMp4Segment_",value:function(e){var t=e.segment,i=Os(t.map.bytes),r=Is(i,e.bytes);return null!==e.timestampOffset&&(e.timestampOffset-=r),{start:r,end:r+t.duration}}},{key:"probeTsSegment_",value:function(e){var t=Ol(e.bytes,this.inspectCache_),i=void 0,r=void 0;return t?(t.video&&2===t.video.length?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,r=t.video[1].dtsTime):t.audio&&2===t.audio.length&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,r=t.audio[1].dtsTime),{start:i,end:r,containsVideo:t.video&&2===t.video.length,containsAudio:t.audio&&2===t.audio.length}):null}},{key:"timestampOffsetForTimeline",value:function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].time}},{key:"mappingForTimeline",value:function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].mapping}},{key:"calculateSegmentTimeMapping_",value:function(e,t){var i=e.segment,r=this.timelines[e.timeline];if(null!==e.timestampOffset)r={time:e.startOfSegment,mapping:e.startOfSegment-t.start},this.timelines[e.timeline]=r,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+r.time+"] [mapping: "+r.mapping+"]"),i.start=e.startOfSegment,i.end=t.end+r.mapping;else{if(!r)return!1;i.start=t.start+r.mapping,i.end=t.end+r.mapping}return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(e){var t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var r=0;r<t.discontinuityStarts.length;r++){var n=t.discontinuityStarts[r],a=t.discontinuitySequence+r+1,s=n-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u=void 0;u=s<0?i.start-eu(t,e.mediaIndex,n):i.end+eu(t,e.mediaIndex+1,n),this.discontinuities[a]={time:u,accuracy:o}}}}}]),t}(),Dl=new Nu("./decrypter-worker.worker.js",function(e,t){var i,a,h,r,n,d,p,g,s,l,y,o,u=this;i="undefined"!=typeof e?e:"undefined"!=typeof global?global:"undefined"!=typeof u?u:{},a="undefined"!=typeof e?e:"undefined"!=typeof i?i:"undefined"!=typeof u?u:{},h=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}}(),n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":v(t))&&"function"!=typeof t?e:t},d=function(){var e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],r=t[4],n=i[4],a=void 0,s=void 0,o=void 0,u=[],l=[],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0;for(a=0;a<256;a++)l[(u[a]=a<<1^283*(a>>7))^a]=a;for(s=o=0;!r[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[n[r[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)t[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)t[a]=t[a].slice(0),i[a]=i[a].slice(0);return e},p=null,g=function(){function c(e){h(this,c),p||(p=d()),this._tables=[[p[0][0].slice(),p[0][1].slice(),p[0][2].slice(),p[0][3].slice(),p[0][4].slice()],[p[1][0].slice(),p[1][1].slice(),p[1][2].slice(),p[1][3].slice(),p[1][4].slice()]];var t=void 0,i=void 0,r=void 0,n=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],u=e.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(n=e.slice(0),a=[],this._key=[n,a],t=u;t<4*u+28;t++)r=n[t-1],(t%u==0||8===u&&t%u==4)&&(r=s[r>>>24]<<24^s[r>>16&255]<<16^s[r>>8&255]<<8^s[255&r],t%u==0&&(r=r<<8^r>>>24^l<<24,l=l<<1^283*(l>>7))),n[t]=n[t-u]^r;for(i=0;t;i++,t--)r=n[3&i?t:t-4],a[i]=t<=4||i<4?r:o[0][s[r>>>24]]^o[1][s[r>>16&255]]^o[2][s[r>>8&255]]^o[3][s[255&r]]}return c.prototype.decrypt=function(e,t,i,r,n,a){var s=this._key[1],o=e^s[0],u=r^s[1],l=i^s[2],c=t^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m<f;m++)h=v[o>>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)n[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},c}(),s=function(){function e(){h(this,e),this.listeners={}}return e.prototype.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e].splice(i,1),-1<i},e.prototype.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,r=0;r<i;++r)t[r].call(this,arguments[1]);else for(var n=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,n)},e.prototype.dispose=function(){this.listeners={}},e.prototype.pipe=function(t){this.on("data",function(e){t.push(e)})},e}(),l=function(t){function i(){h(this,i);var e=n(this,t.call(this,s));return e.jobs=[],e.delay=1,e.timeout_=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":v(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,t),i.prototype.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.prototype.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},i}(s),y=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},o=function(){function u(e,t,i,r){h(this,u);var n=u.STEP,a=new Int32Array(e.buffer),s=new Uint8Array(e.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+n),t,i,s)),o=n;o<a.length;o+=n)i=new Uint32Array([y(a[o-4]),y(a[o-3]),y(a[o-2]),y(a[o-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+n),t,i,s));this.asyncStream_.push(function(){var e;r(null,(e=s).subarray(0,e.byteLength-e[e.byteLength-1]))})}return u.prototype.decryptChunk_=function(t,i,r,n){return function(){var e=function(e,t,i){var r=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),n=new g(Array.prototype.slice.call(t)),a=new Uint8Array(e.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;m<r.length;m+=4)h=y(r[m]),d=y(r[m+1]),p=y(r[m+2]),f=y(r[m+3]),n.decrypt(h,d,p,f,s,m),s[m]=y(s[m]^o),s[m+1]=y(s[m+1]^u),s[m+2]=y(s[m+2]^l),s[m+3]=y(s[m+3]^c),o=h,u=d,l=p,c=f;return a}(t,i,r);n.set(e,t.byteOffset)}},r(u,null,[{key:"STEP",get:function(){return 32e3}}]),u}(),new function(e){e.onmessage=function(e){var n=e.data,t=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),r=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new o(t,i,r,function(e,t){var i,r;a.postMessage((i={source:n.source,decrypted:t},r={},Object.keys(i).forEach(function(e){var t=i[e];ArrayBuffer.isView(t)?r[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:r[e]=t}),r),[t.buffer])})}}(u)}),Rl=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Ml=function(e,t){(t.activePlaylistLoader=e).load()},Ul={AUDIO:function(u,l){return function(){var e=l.segmentLoaders[u],t=l.mediaTypes[u],i=l.blacklistCurrentPlaylist;Rl(e,t);var r=t.activeTrack(),n=t.activeGroup(),a=(n.filter(function(e){return e.default})[0]||n[0]).id,s=t.tracks[a];if(r!==s){for(var o in La.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),t.tracks)t.tracks[o].enabled=t.tracks[o]===s;t.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(r,n){return function(){var e=n.segmentLoaders[r],t=n.mediaTypes[r];La.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Rl(e,t);var i=t.activeTrack();i&&(i.mode="disabled"),t.onTrackChanged()}}},Nl={AUDIO:function(e,t,i){if(t){var r=i.tech,n=i.requestOptions,a=i.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,n),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),n),r.paused()||a.load()}),t.on("error",Ul[e](e,i))}},SUBTITLES:function(e,t,i){var r=i.tech,n=i.requestOptions,a=i.segmentLoaders[e],s=i.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,n),a.track(s.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),n),r.paused()||a.load()}),t.on("error",Ul[e](e,i))}},Bl=function(t,i){return function(e){return e.attributes[t]===i}},jl=function(t){return function(e){return e.resolvedUri===t}},Fl={AUDIO:function(e,t){var i,r,n=t.hls,a=t.sourceType,s=t.segmentLoaders[e],o=t.requestOptions.withCredentials,u=t.master,l=u.mediaGroups,c=u.playlists,h=t.mediaTypes[e],d=h.groups,p=h.tracks,f=t.masterPlaylistLoader;for(var m in l[e]&&0!==Object.keys(l[e]).length||(l[e]={main:{default:{default:!0}}}),l[e]){d[m]||(d[m]=[]);var g=c.filter(Bl(e,m));for(var y in l[e][m]){var v=l[e][m][y];g.filter(jl(v.resolvedUri)).length&&delete v.resolvedUri;var _=void 0;if(_=v.resolvedUri?new Ko(v.resolvedUri,n,o):v.playlists&&"dash"===a?new il(v.playlists[0],n,o,f):null,v=La.mergeOptions({id:y,playlistLoader:_},v),Nl[e](e,v.playlistLoader,t),d[m].push(v),"undefined"==typeof p[y]){var b=new La.AudioTrack({id:y,kind:(i=v,r=void 0,r=i.default?"main":"alternative",i.characteristics&&0<=i.characteristics.indexOf("public.accessibility.describes-video")&&(r="main-desc"),r),enabled:!1,language:v.language,default:v.default,label:y});p[y]=b}}}s.on("error",Ul[e](e,t))},SUBTITLES:function(e,t){var i=t.tech,r=t.hls,n=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions.withCredentials,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,h=t.masterPlaylistLoader;for(var d in o[e])for(var p in l[d]||(l[d]=[]),o[e][d])if(!o[e][d][p].forced){var f=o[e][d][p],m=void 0;if("hls"===n?m=new Ko(f.resolvedUri,r,s):"dash"===n&&(m=new il(f.playlists[0],r,s,h)),f=La.mergeOptions({id:p,playlistLoader:m},f),Nl[e](e,f.playlistLoader,t),l[d].push(f),"undefined"==typeof c[p]){var g=i.addRemoteTextTrack({id:p,kind:"subtitles",enabled:!1,language:f.language,label:p},!1).track;c[p]=g}}a.on("error",Ul[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var i=t.tech,r=t.master.mediaGroups,n=t.mediaTypes[e],a=n.groups,s=n.tracks;for(var o in r[e])for(var u in a[o]||(a[o]=[]),r[e][o]){var l=r[e][o][u];if(l.instreamId.match(/CC\d/)&&(a[o].push(La.mergeOptions({id:u},l)),"undefined"==typeof s[u])){var c=i.addRemoteTextTrack({id:l.instreamId,kind:"captions",enabled:!1,language:l.language,label:u},!1).track;s[u]=c}}}},Hl={AUDIO:function(i,r){return function(){var e=r.mediaTypes[i].tracks;for(var t in e)if(e[t].enabled)return e[t];return null}},SUBTITLES:function(i,r){return function(){var e=r.mediaTypes[i].tracks;for(var t in e)if("showing"===e[t].mode)return e[t];return null}}},Vl=function(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){Fl[e](e,t)});var i=t.mediaTypes,e=t.masterPlaylistLoader,r=t.tech,n=t.hls;["AUDIO","SUBTITLES"].forEach(function(e){var a,s,o,u,l,c;i[e].activeGroup=(a=e,s=t,function(t){var e=s.masterPlaylistLoader,i=s.mediaTypes[a].groups,r=e.media();if(!r)return null;var n=null;return r.attributes[a]&&(n=i[r.attributes[a]]),n=n||i.main,"undefined"==typeof t?n:null===t?null:n.filter(function(e){return e.id===t.id})[0]||null}),i[e].activeTrack=Hl[e](e,t),i[e].onGroupChanged=(o=e,u=t,function(){var e=u.segmentLoaders,t=e[o],i=e.main,r=u.mediaTypes[o],n=r.activeTrack(),a=r.activeGroup(n),s=r.activePlaylistLoader;Rl(t,r),a&&(a.playlistLoader?(t.resyncLoader(),Ml(a.playlistLoader,r)):s&&i.resetEverything())}),i[e].onTrackChanged=(l=e,c=t,function(){var e=c.segmentLoaders,t=e[l],i=e.main,r=c.mediaTypes[l],n=r.activeTrack(),a=r.activeGroup(n),s=r.activePlaylistLoader;Rl(t,r),a&&(a.playlistLoader?(s!==a.playlistLoader&&(t.track&&t.track(n),t.resetEverything()),Ml(a.playlistLoader,r)):i.resetEverything())})});var a=i.AUDIO.activeGroup(),s=(a.filter(function(e){return e.default})[0]||a[0]).id;i.AUDIO.tracks[s].enabled=!0,i.AUDIO.onTrackChanged(),e.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return i[e].onGroupChanged()})});var o=function(){i.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"hls-audio-change"})};for(var u in r.audioTracks().addEventListener("change",o),r.remoteTextTracks().addEventListener("change",i.SUBTITLES.onTrackChanged),n.on("dispose",function(){r.audioTracks().removeEventListener("change",o),r.remoteTextTracks().removeEventListener("change",i.SUBTITLES.onTrackChanged)}),r.clearTracks("audio"),i.AUDIO.tracks)r.audioTracks().addTrack(i.AUDIO.tracks[u])},ql=function(){var t={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){t[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:nl,activeTrack:nl,onGroupChanged:nl,onTrackChanged:nl}}),t},Wl=void 0,zl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Gl=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},Xl=function(e){function d(e){No(this,d);var t=Fo(this,(d.__proto__||Object.getPrototypeOf(d)).call(this)),i=e.url,r=e.withCredentials,n=e.tech,a=e.bandwidth,s=e.externHls,o=e.useCueTags,u=e.blacklistDuration,l=e.enableLowInitialPlaylist,c=e.sourceType;if(!i)throw new Error("A non-empty playlist URL is required");Wl=s,t.withCredentials=r,t.tech_=n,t.hls_=n.hls,t.sourceType_=c,t.useCueTags_=o,t.blacklistDuration=u,t.enableLowInitialPlaylist=l,t.useCueTags_&&(t.cueTagsTrack_=t.tech_.addTextTrack("metadata","ad-cues"),t.cueTagsTrack_.inBandMetadataTrackDispatchType=""),t.requestOptions_={withCredentials:t.withCredentials,timeout:null},t.mediaTypes_=ql(),t.mediaSource=new La.MediaSource,t.mediaSource.addEventListener("sourceopen",t.handleSourceOpen_.bind(t)),t.seekable_=La.createTimeRanges(),t.hasPlayed_=function(){return!1},t.syncController_=new xl(e),t.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,t.decrypter_=new Dl;var h={hls:t.hls_,mediaSource:t.mediaSource,currentTime:t.tech_.currentTime.bind(t.tech_),seekable:function(){return t.seekable()},seeking:function(){return t.tech_.seeking()},duration:function(){return t.mediaSource.duration},hasPlayed:function(){return t.hasPlayed_()},goalBufferLength:function(){return t.goalBufferLength()},bandwidth:a,syncController:t.syncController_,decrypter:t.decrypter_,sourceType:t.sourceType_};return t.masterPlaylistLoader_="dash"===t.sourceType_?new il(i,t.hls_,t.withCredentials):new Ko(i,t.hls_,t.withCredentials),t.setupMasterPlaylistLoaderListeners_(),t.mainSegmentLoader_=new El(La.mergeOptions(h,{segmentMetadataTrack:t.segmentMetadataTrack_,loaderType:"main"}),e),t.audioSegmentLoader_=new El(La.mergeOptions(h,{loaderType:"audio"}),e),t.subtitleSegmentLoader_=new Ll(La.mergeOptions(h,{loaderType:"vtt"}),e),t.setupSegmentLoaderListeners_(),zl.forEach(function(e){t[e+"_"]=Gl.bind(t,e)}),t.logger_=rl("MPC"),t.masterPlaylistLoader_.load(),t}return jo(d,La.EventTarget),Bo(d,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var r=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var e=r.masterPlaylistLoader_.media(),t=1.5*r.masterPlaylistLoader_.targetDuration*1e3;hu(r.masterPlaylistLoader_.master,r.masterPlaylistLoader_.media())?r.requestOptions_.timeout=0:r.requestOptions_.timeout=t,e.endList&&"none"!==r.tech_.preload()&&(r.mainSegmentLoader_.playlist(e,r.requestOptions_),r.mainSegmentLoader_.load()),Vl({sourceType:r.sourceType_,segmentLoaders:{AUDIO:r.audioSegmentLoader_,SUBTITLES:r.subtitleSegmentLoader_,main:r.mainSegmentLoader_},tech:r.tech_,requestOptions:r.requestOptions_,masterPlaylistLoader:r.masterPlaylistLoader_,hls:r.hls_,master:r.master(),mediaTypes:r.mediaTypes_,blacklistCurrentPlaylist:r.blacklistCurrentPlaylist.bind(r)}),r.triggerPresenceUsage_(r.master(),e);try{r.setupSourceBuffers_()}catch(e){return La.log.warn("Failed to create SourceBuffers",e),r.mediaSource.endOfStream("decode")}r.setupFirstPlay(),r.trigger("selectedinitialmedia")}),this.masterPlaylistLoader_.on("loadedplaylist",function(){var e=r.masterPlaylistLoader_.media();if(!e){r.excludeUnsupportedVariants_();var t=void 0;return r.enableLowInitialPlaylist&&(t=r.selectInitialPlaylist()),t||(t=r.selectPlaylist()),r.initialMedia_=t,void r.masterPlaylistLoader_.media(r.initialMedia_)}if(r.useCueTags_&&r.updateAdCues_(e),r.mainSegmentLoader_.playlist(e,r.requestOptions_),r.updateDuration(),r.tech_.paused()||r.mainSegmentLoader_.load(),!e.endList){var i=function(){var e=r.seekable();0!==e.length&&r.mediaSource.addSeekableRange_(e.start(0),e.end(0))};if(r.duration()!==1/0){r.tech_.one("durationchange",function e(){r.duration()===1/0?i():r.tech_.one("durationchange",e)})}else i()}}),this.masterPlaylistLoader_.on("error",function(){r.blacklistCurrentPlaylist(r.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){r.mainSegmentLoader_.abort(),r.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var e=r.masterPlaylistLoader_.media(),t=1.5*r.masterPlaylistLoader_.targetDuration*1e3;hu(r.masterPlaylistLoader_.master,r.masterPlaylistLoader_.media())?r.requestOptions_.timeout=0:r.requestOptions_.timeout=t,r.mainSegmentLoader_.playlist(e,r.requestOptions_),r.mainSegmentLoader_.load(),r.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var e=r.masterPlaylistLoader_.media();r.stuckAtPlaylistEnd_(e)&&(r.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),r.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){r.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){r.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function(e,t){var i=e.mediaGroups||{},r=!0,n=Object.keys(i.AUDIO);for(var a in i.AUDIO)for(var s in i.AUDIO[a]){i.AUDIO[a][s].uri||(r=!1)}r&&this.tech_.trigger({type:"usage",name:"hls-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"}),Wl.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"hls-aes"}),Wl.Playlist.isFmp4(t)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"}),n.length&&1<Object.keys(i.AUDIO[n[0]]).length&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var a=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){var e=a.selectPlaylist(),t=a.masterPlaylistLoader_.media(),i=a.tech_.buffered(),r=i.length?i.end(i.length-1)-a.tech_.currentTime():0,n=a.bufferLowWaterLine();(!t.endList||a.duration()<sl.MAX_BUFFER_LOW_WATER_LINE||e.attributes.BANDWIDTH<t.attributes.BANDWIDTH||n<=r)&&a.masterPlaylistLoader_.media(e),a.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){a.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){a.blacklistCurrentPlaylist(a.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("syncinfoupdate",function(){a.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){a.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){a.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("ended",function(){a.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){a.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120)}),this.mainSegmentLoader_.on("reseteverything",function(){a.tech_.trigger("hls-reset")}),this.mainSegmentLoader_.on("segmenttimemapping",function(e){a.tech_.trigger({type:"hls-segment-time-mapping",mapping:e.mapping})}),this.audioSegmentLoader_.on("ended",function(){a.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"fastQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_()&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}}},{key:"setupFirstPlay",value:function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_())return!1;if(!t.endList){var i=this.seekable();if(!i.length)return!1;if(La.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.tech_.setCurrentTime(i.end(0)),e.hasPlayed_=function(){return!0}}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=function(){return!0},this.load(),!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(e){return La.log.warn("Failed to create Source Buffers",e),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var e=this.tech_.play();"undefined"!=typeof e&&"function"==typeof e.then&&e.then(null,function(e){})}this.trigger("sourceopen")}},{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.startingMedia_||this.mainSegmentLoader_.startingMedia_.containsVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===t)return!1;var i=Wl.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),n=this.tech_.buffered();if(!n.length)return i-r<=.1;var a=n.end(n.length-1);return a-r<=.1&&i-a<=.1}},{key:"blacklistCurrentPlaylist",value:function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},i=arguments[1],r=void 0;if(r=t.playlist||this.masterPlaylistLoader_.media(),i=i||t.blacklistDuration||this.blacklistDuration,!r){this.error=t;try{return this.mediaSource.endOfStream("network")}catch(e){return this.trigger("error")}}var n=1===this.masterPlaylistLoader_.master.playlists.filter(lu).length;return n?(La.log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(n)):(r.excludeUntil=Date.now()+1e3*i,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),e=this.selectPlaylist(),La.log.warn("Problem encountered with the current HLS playlist."+(t.message?" "+t.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(e))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(e){var t=Cu(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:Wl.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0,t=void 0;if(this.masterPlaylistLoader_){var i=this.masterPlaylistLoader_.media();if(i){var r=this.syncController_.getExpiredTime(i,this.mediaSource.duration);if(null!==r&&0!==(e=Wl.Playlist.seekable(i,r)).length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(i=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(r=this.syncController_.getExpiredTime(i,this.mediaSource.duration)))return;if(0===(t=Wl.Playlist.seekable(i,r)).length)return}t?t.start(0)>e.end(0)||e.start(0)>t.end(0)?this.seekable_=e:this.seekable_=La.createTimeRanges([[t.start(0)>e.start(0)?t.start(0):e.start(0),t.end(0)<e.end(0)?t.end(0):e.end(0)]]):this.seekable_=e,this.logger_("seekable updated ["+wu(this.seekable_)+"]"),this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){var t=this,e=this.mediaSource.duration,i=Wl.Playlist.duration(this.masterPlaylistLoader_.media()),r=this.tech_.buffered(),n=function e(){t.mediaSource.duration=i,t.tech_.trigger("durationchange"),t.mediaSource.removeEventListener("sourceopen",e)};0<r.length&&(i=Math.max(i,r.end(r.length-1))),e!==i&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",n):n())}},{key:"dispose",value:function(){var r=this;this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach(function(e){var t=r.mediaTypes_[e].groups;for(var i in t)t[i].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose()}},{key:"master",value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e,t=this.masterPlaylistLoader_.media();if(t&&"open"===this.mediaSource.readyState){if((e=_l(this.masterPlaylistLoader_.master,t)).length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri,this.mediaSource.endOfStream("decode");this.configureLoaderMimeTypes_(e),this.excludeIncompatibleVariants_(t)}}},{key:"configureLoaderMimeTypes_",value:function(e){var t=1<e.length&&-1===e[0].indexOf(",")&&e[0]!==e[1]?new La.EventTarget:null;this.mainSegmentLoader_.mimeType(e[0],t),e[1]&&this.audioSegmentLoader_.mimeType(e[1],t)}},{key:"excludeUnsupportedVariants_",value:function(){this.master().playlists.forEach(function(e){e.attributes.CODECS&&g.MediaSource&&g.MediaSource.isTypeSupported&&!g.MediaSource.isTypeSupported('video/mp4; codecs="'+e.attributes.CODECS.replace(/avc1\.(\d+)\.(\d+)/i,function(e){return zu([e])[0]})+'"')&&(e.excludeUntil=1/0)})}},{key:"excludeIncompatibleVariants_",value:function(e){var i=2,r=null,t=void 0;e.attributes.CODECS&&(t=yl(e.attributes.CODECS),r=t.videoCodec,i=t.codecCount),this.master().playlists.forEach(function(e){var t={codecCount:2,videoCodec:null};e.attributes.CODECS&&(t=yl(e.attributes.CODECS)),t.codecCount!==i&&(e.excludeUntil=1/0),t.videoCodec!==r&&(e.excludeUntil=1/0)})}},{key:"updateAdCues_",value:function(e){var t=0,i=this.seekable();i.length&&(t=i.start(0)),function(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;if(e.segments)for(var r=i,n=void 0,a=0;a<e.segments.length;a++){var s=e.segments[a];if(n||(n=Pl(t,r+s.duration/2)),n){if("cueIn"in s){n.endTime=r,n.adEndTime=r,r+=s.duration,n=null;continue}if(r<n.endTime){r+=s.duration;continue}n.endTime+=s.duration}else if("cueOut"in s&&((n=new g.VTTCue(r,r+s.duration,s.cueOut)).adStartTime=r,n.adEndTime=r+parseFloat(s.cueOut),t.addCue(n)),"cueOutCont"in s){var o,u,l=s.cueOutCont.split("/").map(parseFloat),c=Ho(l,2);o=c[0],u=c[1],(n=new g.VTTCue(r,r+s.duration,"")).adStartTime=r-o,n.adEndTime=n.adStartTime+u,t.addCue(n)}r+=s.duration}}(e,this.cueTagsTrack_,t)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),t=sl.GOAL_BUFFER_LENGTH,i=sl.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,sl.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,r)}},{key:"bufferLowWaterLine",value:function(){var e=this.tech_.currentTime(),t=sl.BUFFER_LOW_WATER_LINE,i=sl.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,sl.MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,r)}}]),d}(),Yl=function e(t,i,r){No(this,e);var n,a,s,o=t.masterPlaylistController_.fastQualityChange_.bind(t.masterPlaylistController_);if(i.attributes.RESOLUTION){var u=i.attributes.RESOLUTION;this.width=u.width,this.height=u.height}this.bandwidth=i.attributes.BANDWIDTH,this.id=r,this.enabled=(n=t.playlists,a=i.uri,s=o,function(e){var t=n.master.playlists[a],i=uu(t),r=lu(t);return"undefined"==typeof e?r:(e?delete t.disabled:t.disabled=!0,e===r||i||(s(),e?n.trigger("renditionenabled"):n.trigger("renditiondisabled")),e)})},$l=["seeking","seeked","pause","playing","error"],Kl=function(){function s(e){var t=this;No(this,s),this.tech_=e.tech,this.seekable=e.seekable,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=rl("PlaybackWatcher"),this.logger_("initialize");var i=function(){return t.monitorCurrentTime_()},r=function(){return t.techWaiting_()},n=function(){return t.cancelTimer_()},a=function(){return t.fixesBadSeeks_()};this.tech_.on("seekablechanged",a),this.tech_.on("waiting",r),this.tech_.on($l,n),this.tech_.on("canplay",i),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",a),t.tech_.off("waiting",r),t.tech_.off($l,n),t.tech_.off("canplay",i),t.checkCurrentTimeTimeout_&&g.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}return Bo(s,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&g.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=g.setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var e=this.tech_.seeking(),t=this.seekable(),i=this.tech_.currentTime(),r=void 0;e&&this.afterSeekableWindow_(t,i)&&(r=t.end(t.length-1));e&&this.beforeSeekableWindow_(t,i)&&(r=t.start(0)+.1);return"undefined"!=typeof r&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+wu(t)+". Seeking to "+r+"."),this.tech_.setCurrentTime(r),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Cu(t,e);return i.length&&e+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var i=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.buffered(),n=Eu(r,t);if(this.videoUnderflow_(n,r,t))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(0<n.length){var a=n.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+n.start(0)),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1}},{key:"afterSeekableWindow_",value:function(e,t){return!!e.length&&t>e.end(e.length-1)+.1}},{key:"beforeSeekableWindow_",value:function(e,t){return!!(e.length&&0<e.start(0)&&t<e.start(0)-.1)}},{key:"videoUnderflow_",value:function(e,t,i){if(0===e.length){var r=this.gapFromVideoUnderflow_(t,i);if(r)return this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+i),!0}return!1}},{key:"skipTheGap_",value:function(e){var t=this.tech_.buffered(),i=this.tech_.currentTime(),r=Eu(t,i);this.cancelTimer_(),0!==r.length&&i===e&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+Su),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(e,t){for(var i=function(e){if(e.length<2)return La.createTimeRanges();for(var t=[],i=1;i<e.length;i++){var r=e.end(i-1),n=e.start(i);t.push([r,n])}return La.createTimeRanges(t)}(e),r=0;r<i.length;r++){var n=i.start(r),a=i.end(r);if(t-n<4&&2<t-n)return{start:n,end:a}}return null}}]),s}(),Ql={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_)}},Jl=function(e){!function t(i,e){var r=0,n=0,a=La.mergeOptions(Ql,e);i.ready(function(){i.trigger({type:"usage",name:"hls-error-reload-initialized"})});var s=function(){n&&i.currentTime(n)},o=function(e){null!=e&&(n=i.duration()!==1/0&&i.currentTime()||0,i.one("loadedmetadata",s),i.src(e),i.trigger({type:"usage",name:"hls-error-reload"}),i.play())},u=function(){if(Date.now()-r<1e3*a.errorInterval)i.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(a.getSource&&"function"==typeof a.getSource)return r=Date.now(),a.getSource.call(i,o);La.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function e(){i.off("loadedmetadata",s),i.off("error",u),i.off("dispose",e)};i.on("error",u),i.on("dispose",l),i.reloadSourceOnError=function(e){l(),t(i,e)}}(this,e)},Zl={PlaylistLoader:Ko,Playlist:du,Decrypter:Mo,AsyncStream:xo,decrypt:Ro,utils:Tu,STANDARD_PLAYLIST_SELECTOR:function(){return function(e,t,i,r){var n=e.playlists.map(function(e){var t,i;return t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,{bandwidth:e.attributes.BANDWIDTH||g.Number.MAX_VALUE,width:t,height:i,playlist:e}});Tl(n,function(e,t){return e.bandwidth-t.bandwidth});var a=(n=n.filter(function(e){return!du.isIncompatible(e.playlist)})).filter(function(e){return du.isEnabled(e.playlist)});a.length||(a=n.filter(function(e){return!du.isDisabled(e.playlist)}));var s=a.filter(function(e){return e.bandwidth*sl.BANDWIDTH_VARIANCE<t}),o=s[s.length-1],u=s.filter(function(e){return e.bandwidth===o.bandwidth})[0],l=s.filter(function(e){return e.width&&e.height});Tl(l,function(e,t){return e.width-t.width});var c=l.filter(function(e){return e.width===i&&e.height===r});o=c[c.length-1];var h=c.filter(function(e){return e.bandwidth===o.bandwidth})[0],d=void 0,p=void 0,f=void 0;h||(p=(d=l.filter(function(e){return e.width>i||e.height>r})).filter(function(e){return e.width===d[0].width&&e.height===d[0].height}),o=p[p.length-1],f=p.filter(function(e){return e.bandwidth===o.bandwidth})[0]);var m=f||h||u||a[0]||n[0];return m?m.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(bl(this.tech_.el(),"width"),10),parseInt(bl(this.tech_.el(),"height"),10))},INITIAL_PLAYLIST_SELECTOR:function(){var e=this.playlists.master.playlists.filter(du.isEnabled);return Tl(e,function(e,t){return Sl(e,t)}),e.filter(function(e){return yl(e.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:Sl,comparePlaylistResolution:function(e,t){var i=void 0,r=void 0;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||g.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),i===(r=r||g.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-r},xhr:mu()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(t){Object.defineProperty(Zl,t,{get:function(){return La.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),sl[t]},set:function(e){La.log.warn("using Hls."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof e||e<0?La.log.warn("value of Hls."+t+" must be greater than or equal to 0"):sl[t]=e}})});var ec=function(e){if(/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(e))return"hls";return/^application\/dash\+xml/i.test(e)?"dash":null},tc=function(e,t){for(var i=t.media(),r=-1,n=0;n<e.length;n++)if(e[n].id===i.uri){r=n;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Zl.canPlaySource=function(){return La.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var ic=function(e){if("dash"===e.options_.sourceType){var t=La.players[e.tech_.options_.playerId];if(t.eme){var i=function(e,t,i){if(!e)return e;var r={};for(var n in e)r[n]={audioContentType:'audio/mp4; codecs="'+i.attributes.CODECS+'"',videoContentType:'video/mp4; codecs="'+t.attributes.CODECS+'"'},t.contentProtection&&t.contentProtection[n]&&t.contentProtection[n].pssh&&(r[n].pssh=t.contentProtection[n].pssh),"string"==typeof e[n]&&(r[n].url=e[n]);return La.mergeOptions(e,r)}(e.source_.keySystems,e.playlists.media(),e.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader.media());i&&(t.currentSource().keySystems=i)}}};Zl.supportsNativeHls=function(){var t=p.createElement("video");if(!La.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),Zl.supportsNativeDash=!!La.getTech("Html5").isSupported()&&/maybe|probably/i.test(p.createElement("video").canPlayType("application/dash+xml")),Zl.supportsTypeNatively=function(e){return"hls"===e?Zl.supportsNativeHls:"dash"===e&&Zl.supportsNativeDash},Zl.isSupported=function(){return La.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var rc=La.getComponent("Component"),nc=function(e){function a(e,t,i){No(this,a);var r=Fo(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,t,i.hls));if(t.options_&&t.options_.playerId){var n=La(t.options_.playerId);n.hasOwnProperty("hls")||Object.defineProperty(n,"hls",{get:function(){return La.log.warn("player.hls is deprecated. Use player.tech_.hls instead."),t.trigger({type:"usage",name:"hls-player-access"}),r}}),n.vhs=r,n.dash=r}if(r.tech_=t,r.source_=e,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(p,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=p.fullscreenElement||p.webkitFullscreenElement||p.mozFullScreenElement||p.msFullscreenElement;t&&t.contains(r.tech_.el())&&r.masterPlaylistController_.fastQualityChange_()}),r.on(r.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),r.on(r.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),r.on(r.tech_,"play",r.play),r}return jo(a,rc),Bo(a,[{key:"setOptions_",value:function(){var t=this;this.options_.withCredentials=this.options_.withCredentials||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=4194304),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&4194304===this.options_.bandwidth,["withCredentials","bandwidth"].forEach(function(e){"undefined"!=typeof t.source_[e]&&(t.options_[e]=t.source_[e])}),this.bandwidth=this.options_.bandwidth}},{key:"src",value:function(e,t){var r=this;e&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=this.tech_,this.options_.externHls=Zl,this.options_.sourceType=ec(t),this.masterPlaylistController_=new Xl(this.options_),this.playbackWatcher_=new Kl(La.mergeOptions(this.options_,{seekable:function(){return r.seekable()}})),this.masterPlaylistController_.on("error",function(){La.players[r.tech_.options_.playerId].error(r.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):Zl.STANDARD_PLAYLIST_SELECTOR.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Zl.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e=1/(this.bandwidth||1),t=void 0;return t=0<this.throughput?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){La.log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return r.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return r.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return r.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return r.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return r.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return r.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return r.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return r.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return Au(r.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return r.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return r.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return r.tech_.name_},enumerable:!0},duration:{get:function(){return r.tech_.duration()},enumerable:!0},master:{get:function(){return r.playlists.master},enumerable:!0},playerDimensions:{get:function(){return r.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return Au(r.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return r.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",function(){var i,e;e=(i=r).playlists,i.representations=function(){return e.master.playlists.filter(function(e){return!uu(e)}).map(function(e,t){return new Yl(i,e,e.uri)})},ic(r)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.tech_.ready(function(){return r.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(La.URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},{key:"setupQualityLevels_",value:function(){var i=this,e=La.players[this.tech_.options_.playerId];e&&e.qualityLevels&&(this.qualityLevels_=e.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){var t,e;t=i.qualityLevels_,(e=i).representations().forEach(function(e){t.addQualityLevel(e)}),tc(t,e.playlists)}),this.playlists.on("mediachange",function(){tc(i.qualityLevels_,i.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(e){this.masterPlaylistController_.setCurrentTime(e)}},{key:"duration",value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),function e(t,i,r){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,i);if(void 0===n){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,i,r)}if("value"in n)return n.value;var s=n.get;return void 0!==s?s.call(r):void 0}(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"dispose",this).call(this)}}]),a}(),ac={name:"videojs-http-streaming",VERSION:"1.1.0",canHandleSource:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=La.mergeOptions(La.options,t);return ac.canPlayType(e.type,i)},handleSource:function(e,t){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=La.mergeOptions(La.options,i);return t.hls=new nc(e,t,r),t.hls.xhr=mu(),t.hls.src(e.src,e.type),t.hls},canPlayType:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=La.mergeOptions(La.options,t).hls.overrideNative,r=ec(e);return r&&(!Zl.supportsTypeNatively(r)||i)?"maybe":""}};return"undefined"!=typeof La.MediaSource&&"undefined"!=typeof La.URL||(La.MediaSource=Qu,La.URL=Ju),Qu.supportsNativeMediaSources()&&La.getTech("Html5").registerSourceHandler(ac,0),La.HlsHandler=nc,La.HlsSourceHandler=ac,La.Hls=Zl,La.use||La.registerComponent("Hls",Zl),La.options.hls=La.options.hls||{},La.registerPlugin?La.registerPlugin("reloadSourceOnError",Jl):La.plugin("reloadSourceOnError",Jl),La});!function(){!function(a){var b=a&&a.videojs;b&&(b.CDN_VERSION="7.1.0")}(window)}();(function(root,factory){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=factory(require("video.js"))}else if(typeof define==="function"&&define.amd){define(["videojs"],function(videojs){return root.Youtube=factory(videojs)})}else{root.Youtube=factory(root.videojs)}})(this,function(videojs){"use strict";var _isOnMobile=videojs.browser.IS_IOS||videojs.browser.IS_NATIVE_ANDROID;var Tech=videojs.getTech("Tech");var Youtube=videojs.extend(Tech,{constructor:function(options,ready){Tech.call(this,options,ready);this.setPoster(options.poster);this.setSrc(this.options_.source,!0);this.setTimeout(function(){if(this.el_){this.el_.parentNode.className+=" vjs-youtube";if(_isOnMobile){this.el_.parentNode.className+=" vjs-youtube-mobile"}if(Youtube.isApiReady){this.initYTPlayer()}else{Youtube.apiReadyQueue.push(this)}}}.bind(this))},dispose:function(){if(this.ytPlayer){if(this.ytPlayer.stopVideo){this.ytPlayer.stopVideo()}if(this.ytPlayer.destroy){this.ytPlayer.destroy()}}else{var index=Youtube.apiReadyQueue.indexOf(this);if(index!==-1){Youtube.apiReadyQueue.splice(index,1)}}this.ytPlayer=null;this.el_.parentNode.className=this.el_.parentNode.className.replace(" vjs-youtube","").replace(" vjs-youtube-mobile","");this.el_.parentNode.removeChild(this.el_);Tech.prototype.dispose.call(this)},createEl:function(){var div=document.createElement("div");div.setAttribute("id",this.options_.techId);div.setAttribute("style","width:100%;height:100%;top:0;left:0;position:absolute");div.setAttribute("class","vjs-tech");var divWrapper=document.createElement("div");divWrapper.appendChild(div);if(!_isOnMobile&&!this.options_.ytControls){var divBlocker=document.createElement("div");divBlocker.setAttribute("class","vjs-iframe-blocker");divBlocker.setAttribute("style","position:absolute;top:0;left:0;width:100%;height:100%");divBlocker.onclick=function(){this.pause()}.bind(this);divWrapper.appendChild(divBlocker)}return divWrapper},initYTPlayer:function(){var playerVars={controls:0,modestbranding:1,rel:0,showinfo:0,loop:this.options_.loop?1:0};if(typeof this.options_.autohide!=="undefined"){playerVars.autohide=this.options_.autohide}if(typeof this.options_.cc_load_policy!=="undefined"){playerVars.cc_load_policy=this.options_.cc_load_policy}if(typeof this.options_.ytControls!=="undefined"){playerVars.controls=this.options_.ytControls}if(typeof this.options_.disablekb!=="undefined"){playerVars.disablekb=this.options_.disablekb}if(typeof this.options_.end!=="undefined"){playerVars.end=this.options_.end}if(typeof this.options_.color!=="undefined"){playerVars.color=this.options_.color}if(!playerVars.controls){playerVars.fs=0}else if(typeof this.options_.fs!=="undefined"){playerVars.fs=this.options_.fs}if(typeof this.options_.end!=="undefined"){playerVars.end=this.options_.end}if(typeof this.options_.hl!=="undefined"){playerVars.hl=this.options_.hl}else if(typeof this.options_.language!=="undefined"){playerVars.hl=this.options_.language.substr(0,2)}if(typeof this.options_.iv_load_policy!=="undefined"){playerVars.iv_load_policy=this.options_.iv_load_policy}if(typeof this.options_.list!=="undefined"){playerVars.list=this.options_.list}else if(this.url&&typeof this.url.listId!=="undefined"){playerVars.list=this.url.listId}if(typeof this.options_.listType!=="undefined"){playerVars.listType=this.options_.listType}if(typeof this.options_.modestbranding!=="undefined"){playerVars.modestbranding=this.options_.modestbranding}if(typeof this.options_.playlist!=="undefined"){playerVars.playlist=this.options_.playlist}if(typeof this.options_.playsinline!=="undefined"){playerVars.playsinline=this.options_.playsinline}if(typeof this.options_.rel!=="undefined"){playerVars.rel=this.options_.rel}if(typeof this.options_.showinfo!=="undefined"){playerVars.showinfo=this.options_.showinfo}if(typeof this.options_.start!=="undefined"){playerVars.start=this.options_.start}if(typeof this.options_.theme!=="undefined"){playerVars.theme=this.options_.theme}if(typeof this.options_.customVars!=="undefined"){var customVars=this.options_.customVars;Object.keys(customVars).forEach(function(key){playerVars[key]=customVars[key]})}this.activeVideoId=this.url?this.url.videoId:null;this.activeList=playerVars.list;var playerConfig={videoId:this.activeVideoId,playerVars:playerVars,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onVolumeChange:this.onPlayerVolumeChange.bind(this),onError:this.onPlayerError.bind(this)}};if(typeof this.options_.enablePrivacyEnhancedMode!=="undefined"&&this.options_.enablePrivacyEnhancedMode){playerConfig.host="https://www.youtube-nocookie.com"}this.ytPlayer=new YT.Player(this.options_.techId,playerConfig)},onPlayerReady:function(){if(this.options_.muted){this.ytPlayer.mute()}var playbackRates=this.ytPlayer.getAvailablePlaybackRates();if(playbackRates.length>1){this.featuresPlaybackRate=!0}this.playerReady_=!0;this.triggerReady();if(this.playOnReady){this.play()}else if(this.cueOnReady){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger("ratechange")},onPlayerStateChange:function(e){var state=e.data;if(state===this.lastState||this.errorNumber){return}this.lastState=state;switch(state){case-1:this.trigger("loadstart");this.trigger("loadedmetadata");this.trigger("durationchange");this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate");this.trigger("durationchange");this.trigger("playing");this.trigger("play");if(this.isSeeking){this.onSeeked()}break;case YT.PlayerState.PAUSED:this.trigger("canplay");if(this.isSeeking){this.onSeeked()}else{this.trigger("pause")}break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate");this.player_.trigger("waiting");break}},onPlayerVolumeChange:function(){this.trigger("volumechange")},onPlayerError:function(e){this.errorNumber=e.data;this.trigger("pause");this.trigger("error")},error:function(){var code=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:code,message:"Error while trying to play the video"};case 2:case 100:return{code:code,message:"Unable to find the video"};case 101:case 150:return{code:code,message:"Playback on other Websites has been disabled by the video owner."}}return{code:code,message:"YouTube unknown error ("+this.errorNumber+")"}},loadVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endEnd=this.options_.end}this.ytPlayer.loadVideoById(options)},cueVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endEnd=this.options_.end}this.ytPlayer.cueVideoById(options)},src:function(src){if(src){this.setSrc({src:src})}return this.source},poster:function(){if(_isOnMobile){return null}return this.poster_},setPoster:function(poster){this.poster_=poster},setSrc:function(source){if(!source||!source.src){return}delete this.errorNumber;this.source=source;this.url=Youtube.parseUrl(source.src);if(!this.options_.poster){if(this.url.videoId){this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg";this.trigger("posterchange")}}if(this.options_.autoplay&&!_isOnMobile){if(this.isReady_){this.play()}else{this.playOnReady=!0}}else if(this.activeVideoId!==this.url.videoId){if(this.isReady_){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}else{this.cueOnReady=!0}}},autoplay:function(){return this.options_.autoplay},setAutoplay:function(val){this.options_.autoplay=val},loop:function(){return this.options_.loop},setLoop:function(val){this.options_.loop=val},play:function(){if(!this.url||!this.url.videoId){return}this.wasPausedBeforeSeek=!1;if(this.isReady_){if(this.url.listId){if(this.activeList===this.url.listId){this.ytPlayer.playVideo()}else{this.ytPlayer.loadPlaylist(this.url.listId);this.activeList=this.url.listId}}if(this.activeVideoId===this.url.videoId){this.ytPlayer.playVideo()}else{this.loadVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}}else{this.trigger("waiting");this.playOnReady=!0}},pause:function(){if(this.ytPlayer){this.ytPlayer.pauseVideo()}},paused:function(){return this.ytPlayer?this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING:!0},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(seconds){if(this.lastState===YT.PlayerState.PAUSED){this.timeBeforeSeek=this.currentTime()}if(!this.isSeeking){this.wasPausedBeforeSeek=this.paused()}this.ytPlayer.seekTo(seconds,!0);this.trigger("timeupdate");this.trigger("seeking");this.isSeeking=!0;if(this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==seconds){clearInterval(this.checkSeekedInPauseInterval);this.checkSeekedInPauseInterval=setInterval(function(){if(this.lastState!==YT.PlayerState.PAUSED||!this.isSeeking){clearInterval(this.checkSeekedInPauseInterval)}else if(this.currentTime()!==this.timeBeforeSeek){this.trigger("timeupdate");this.onSeeked()}}.bind(this),250)}},seeking:function(){return this.isSeeking},seekable:function(){if(!this.ytPlayer){return videojs.createTimeRange()}return videojs.createTimeRange(0,this.ytPlayer.getDuration())},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval);this.isSeeking=!1;if(this.wasPausedBeforeSeek){this.pause()}this.trigger("seeked")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(suggestedRate){if(!this.ytPlayer){return}this.ytPlayer.setPlaybackRate(suggestedRate)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return this.ytPlayer?this.lastState===YT.PlayerState.ENDED:!1},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(percentAsDecimal){if(!this.ytPlayer){return}this.ytPlayer.setVolume(percentAsDecimal*100)},muted:function(){return this.ytPlayer?this.ytPlayer.isMuted():!1},setMuted:function(mute){if(!this.ytPlayer){return}else{this.muted(!0)}if(mute){this.ytPlayer.mute()}else{this.ytPlayer.unMute()}this.setTimeout(function(){this.trigger("volumechange")},50)},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction){return videojs.createTimeRange()}var bufferedEnd=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return videojs.createTimeRange(0,bufferedEnd)},preload:function(){},load:function(){},reset:function(){},networkState:function(){if(!this.ytPlayer){return 0}switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 3:return 2;default:return 1}},readyState:function(){if(!this.ytPlayer){return 0}switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 5:return 1;case 3:return 2;default:return 4}},supportsFullScreen:function(){return!0},checkHighResPoster:function(){var uri="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var image=new Image;image.onload=function(){if("naturalHeight"in image){if(image.naturalHeight<=90||image.naturalWidth<=120){return}}else if(image.height<=90||image.width<=120){return}this.poster_=uri;this.trigger("posterchange")}.bind(this);image.onerror=function(){};image.src=uri}catch(e){}}});Youtube.isSupported=function(){return!0};Youtube.canPlaySource=function(e){return Youtube.canPlayType(e.type)};Youtube.canPlayType=function(e){return e==="video/youtube"};Youtube.parseUrl=function(url){var result={videoId:null};var regex=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;var match=url.match(regex);if(match&&match[2].length===11){result.videoId=match[2]}var regPlaylist=/[?&]list=([^#\&\?]+)/;match=url.match(regPlaylist);if(match&&match[1]){result.listId=match[1]}return result};function apiLoaded(){YT.ready(function(){Youtube.isApiReady=!0;for(var i=0;i<Youtube.apiReadyQueue.length;++i){Youtube.apiReadyQueue[i].initYTPlayer()}})}function loadScript(src,callback){var loaded=!1;var tag=document.createElement("script");var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);tag.onload=function(){if(!loaded){loaded=!0;callback()}};tag.onreadystatechange=function(){if(!loaded&&(this.readyState==="complete"||this.readyState==="loaded")){loaded=!0;callback()}};tag.src=src}function injectCss(){var css=".vjs-youtube .vjs-iframe-blocker { display: none; }"+".vjs-youtube.vjs-user-inactive .vjs-iframe-blocker { display: block; }"+".vjs-youtube .vjs-poster { background-size: cover; }"+".vjs-youtube-mobile .vjs-big-play-button { display: none; }";var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}head.appendChild(style)}Youtube.apiReadyQueue=[];if(typeof document!=="undefined"){loadScript("https://www.youtube.com/iframe_api",apiLoaded);injectCss()}if(typeof videojs.registerTech!=="undefined"){videojs.registerTech("Youtube",Youtube)}else{videojs.registerComponent("Youtube",Youtube)}});/*
* 2018 Areama
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@areama.net so we can send you a copy immediately.
*
*
*  @author Areama <contact@areama.net>
*  @copyright  2018 Areama

*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of Areama
*/
var arlsf={ajaxUrl:null,token:null,delayFirstMin:0,delayFirstMax:0,delayMin:0,delayMax:0,displayTime:0,displayTimes:0,currentOrder:0,closeLifeTime:0,inAnimation:!1,outAnimation:!1,i:null,t:null,t2:null,ordersDisplayed:[],lastCartItem:null,closed:!1,sound:!1,soundTimes:0,currentSoundTimes:0,orderCurrentProduct:0,orderCurrentProductLimit:0,orderCurrentProductTimes:0,cartCurrentProduct:0,cartCurrentProductLimit:0,cartCurrentProductTimes:0,cookieName:'arlsf_close',sessionKeyName:'arlsf_key',sessionKey:null,visitorPopupDisplayed:0,init:function(){if(arlsf.sound){$('body').append('<audio id="arlsf-sound" src="'+arlsf.sound+'"></audio>')}
if(arlsf.getCookie(arlsf.sessionKeyName)==0){arlsf.createCookie(arlsf.sessionKeyName,arlsf.sessionKey,1)}else{arlsf.sessionKey=arlsf.getCookie(arlsf.sessionKeyName)}
if(arlsf.getCookie(arlsf.cookieName)!=1){setTimeout(function(){arlsf.loadOrder()},arlsf.getDelay(arlsf.delayFirstMin,arlsf.delayFirstMax))}else{arlsf.closed=!0}
$('body').on('mouseenter','#arlsf-notification',function(){clearTimeout(arlsf.t);clearTimeout(arlsf.t2);clearInterval(arlsf.i)});$('body').on('click','#arlsf-notification .arlsf-close-button',function(){arlsf.createCookie(arlsf.cookieName,1,arlsf.closeLifeTime);clearTimeout(arlsf.t);clearTimeout(arlsf.t2);clearInterval(arlsf.i);arlsf.closed=!0;$('#arlsf-notification').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',function(){$('#arlsf-notification').removeClass('active')});$('#arlsf-notification').removeClass(arlsf.inAnimation).addClass(arlsf.outAnimation)});$('body').on('mouseleave','#arlsf-notification',function(){arlsf.t=setTimeout(function(){if(!arlsf.closed){$('#arlsf-notification').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',function(){$('#arlsf-notification').removeClass('active')});$('#arlsf-notification').removeClass(arlsf.inAnimation).addClass(arlsf.outAnimation);arlsf.t2=setTimeout(function(){arlsf.loadOrder()},arlsf.getDelay(arlsf.delayMin,arlsf.delayMax))}},arlsf.displayTime)})},getCookie:function(cookieName){if(document.cookie.length>0){c_start=document.cookie.indexOf(cookieName+"=");if(c_start!=-1){c_start=c_start+cookieName.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}
return unescape(document.cookie.substring(c_start,c_end))}}
return 0},createCookie:function(name,value,days){var expires;if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString()}else{expires=""}
document.cookie=name+"="+value+expires+"; path=/"},loadOrder:function(){if(arlsf.displayTimes>0&&arlsf.displayTimes<=parseInt(arlsf.getCookie('arlsf_c'))){return!1}
$.post(arlsf.ajaxUrl,{id:arlsf.currentOrder,token:arlsf.token,displayed:arlsf.ordersDisplayed,action:'getOrder',lastCart:arlsf.lastCartItem,orderCurrentProduct:arlsf.orderCurrentProduct,orderCurrentProductCounter:arlsf.orderCurrentProductTimes,cartCurrentProduct:arlsf.cartCurrentProduct,cartCurrentProductCounter:arlsf.cartCurrentProductTimes,sessionKey:arlsf.sessionKey,ajax:!0,visitorPopupDisplayed:arlsf.visitorPopupDisplayed},function(data){if(data&&data.type&&data.type=='visitor'){arlsf.visitorPopupDisplayed=1}
if(data&&data.content){if(data.error){return!1}
$('#arlsf-notification').remove();$('body').append(data.content);setTimeout(function(){if(arlsf.displayTimes>0){var arlsfC=parseInt(arlsf.getCookie('arlsf_c'))+1;arlsf.createCookie('arlsf_c',arlsfC)}
$('#arlsf-notification').addClass('active').addClass('arlsfAnimated').addClass(arlsf.inAnimation);if(data.id_product==arlsf.orderCurrentProduct&&data.type=='order'){arlsf.orderCurrentProductTimes ++}
if(data.id_product==arlsf.cartCurrentProduct&&data.type=='cart'){arlsf.cartCurrentProductTimes ++}
if(arlsf.sound){if(arlsf.getCookie('arlsf_s')!=1){document.getElementById('arlsf-sound').play();arlsf.currentSoundTimes ++}
if(arlsf.soundTimes&&arlsf.currentSoundTimes==arlsf.soundTimes){arlsf.createCookie('arlsf_s',1)}}},200);arlsf.t=setTimeout(function(){if(!arlsf.closed){arlsf.t2=setTimeout(function(){arlsf.loadOrder()},arlsf.getDelay(arlsf.delayMin,arlsf.delayMax));$('#arlsf-notification').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',function(){$('#arlsf-notification').removeClass('active')});$('#arlsf-notification').removeClass(arlsf.inAnimation).addClass(arlsf.outAnimation)}},arlsf.displayTime)}else{if(!arlsf.closed){arlsf.t2=setTimeout(function(){arlsf.loadOrder()},arlsf.getDelay(arlsf.delayMin,arlsf.delayMax))}}
if(data&&data.type&&data.type=='order'&&data.order){if(data.reset&&data.loop){arlsf.currentOrder=null;arlsf.ordersDisplayed=[]}
arlsf.currentOrder=data.order;if(arlsf.ordersDisplayed.indexOf(arlsf.currentOrder)==-1){arlsf.ordersDisplayed.push(arlsf.currentOrder)}}else if(data&&data.type&&data.type=='cart'){arlsf.lastCartItem=data.lastCart}},'json')},getDelay:function(min,max){return Math.random()*(max-min)+min}};/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);(function(k){'use strict';k(['jquery'],function($){var j=$.scrollTo=function(a,b,c){return $(window).scrollTo(a,b,c)};j.defaults={axis:'xy',duration:0,limit:!0};j.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(f,g,h){if(typeof g=='object'){h=g;g=0}if(typeof h=='function')h={onAfter:h};if(f=='max')f=9e9;h=$.extend({},j.defaults,h);g=g||h.duration;h.queue=h.queue&&h.axis.length>1;if(h.queue)g/=2;h.offset=both(h.offset);h.over=both(h.over);return this._scrollable().each(function(){if(f==null)return;var d=this,$elem=$(d),targ=f,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=win?$(targ):$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}var e=$.isFunction(h.offset)&&h.offset(d,targ)||h.offset;$.each(h.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=j.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(h.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=e[pos]||0;if(h.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*h.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(h.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&h.queue){if(old!=attr[key])animate(h.onAfterFirst);delete attr[key]}});animate(h.onAfter);function animate(a){$elem.animate(attr,g,h.easing,a&&function(){a.call(this,targ,h)})}}).end()};j.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}return j})}(typeof define==='function'&&define.amd?define:function(a,b){if(typeof module!=='undefined'&&module.exports){module.exports=b(require('jquery'))}else{b(jQuery)}}));eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';4(w)(3($){$.Y.T=3(c){c=$.15({m:\'X U\',E:\'\',B:z,8:z},c||{});o d={};o e={t:3(n,a,b){2.6(n);$(a).D(\'.j\').A().l(b||\'x\')},6:3(n){$(d[n].7).O(\'.j\').u(\'9\').u(\'x\')},h:3(n){4(!$(d[n].5).Z(\'.m\')){$(d[n].5).D(\'.j\').A().l(\'9\')}},g:3(n,a){d[n].5=a;o b=$(a).L(\'a\').K();$(d[n].7).J(b);e.6(n);e.h(n);4(c.I)c.I.W(d[n].7,[b,a])}};2.V(3(i){o n=2.G;4(!d[n])d[n]={r:0};i=d[n].r;d[n].r++;4(i==0){c.8=$(2).S(\'p\')||c.8;d[n].7=$(\'<R Q="P" G="\'+n+\'" q=""\'+(c.8?\' p="p"\':\'\')+\'>\');$(2).C(d[n].7);4(c.8||c.B){}F{$(2).C($(\'<k y="m"><a s="\'+c.m+\'">\'+c.E+\'</a></k>\').H(3(){e.6(n);$(2).l(\'9\')}).v(3(){e.h(n);$(2).u(\'9\')}).g(3(){e.g(n,2)}))}};f=$(\'<k y="j"><a s="\'+(2.s||2.q)+\'">\'+2.q+\'</a></k>\');$(2).N(f);4(c.8){$(f).l(\'M\')}F{$(f).H(3(){e.6(n);e.t(n,2)}).v(3(){e.6(n);e.h(n)}).g(3(){e.g(n,2)})};4(2.14)d[n].5=f;$(2).13();4(i+1==2.12)e.h(n)});11(n 10 d)4(d[n].5){e.t(n,d[n].5,\'9\');$(d[n].7).J($(d[n].5).L(\'a\').K())}16 2}})(w);',62,69,'||this|function|if|currentElem|drain|valueElem|readOnly|star_on||||||eStar|click|reset||star|div|addClass|cancel||var|disabled|value|count|title|fill|removeClass|mouseout|jQuery|star_hover|class|false|andSelf|required|before|prevAll|cancelValue|else|name|mouseover|callback|val|text|children|star_readonly|after|siblings|hidden|type|input|attr|rating|Rating|each|apply|Cancel|fn|is|in|for|length|remove|checked|extend|return'.split('|'),0,{}));(function($){"use strict";var defaults={prefilled:null,CapitalizeFirstLetter:!1,preventSubmitOnEnter:!0,isClearInputOnEsc:!0,externalTagId:!1,prefillIdFieldName:'Id',prefillValueFieldName:'Value',AjaxPush:null,AjaxPushAllTags:null,AjaxPushParameters:null,delimiters:[9,13,44],backspace:[8],maxTags:0,hiddenTagListName:null,hiddenTagListId:null,replace:!0,output:null,deleteTagsOnBackspace:!0,tagsContainer:null,tagCloseIcon:'x',tagClass:'',validator:null,onlyTagList:!1,tagList:null,fillInputOnTagRemove:!1,AjaxPushDataType:'json'},publicMethods={pushTag:function(tag,ignoreEvents,externalTagId){var $self=$(this),opts=$self.data('opts'),alreadyInList,tlisLowerCase,max,tagId,tlis=$self.data("tlis"),tlid=$self.data("tlid"),idx,newTagId,newTagRemoveId,escaped,html,$el,lastTagId,lastTagObj;tag=privateMethods.trimTag(tag,opts.delimiterChars);if(!tag||tag.length<=0){return}
if(opts.onlyTagList&&undefined!==opts.tagList){if(opts.tagList){var $tagList=opts.tagList;$.each($tagList,function(index,item){$tagList[index]=item.toLowerCase()});var suggestion=$.inArray(tag.toLowerCase(),$tagList);if(-1===suggestion){return}}}
if(opts.CapitalizeFirstLetter&&tag.length>1){tag=tag.charAt(0).toUpperCase()+tag.slice(1).toLowerCase()}
if(opts.validator&&!opts.validator(tag)){$self.trigger('tm:invalid',tag)
return}
if(opts.maxTags>0&&tlis.length>=opts.maxTags){return}
alreadyInList=!1;tlisLowerCase=jQuery.map(tlis,function(elem){return elem.toLowerCase()});idx=$.inArray(tag.toLowerCase(),tlisLowerCase);if(-1!==idx){alreadyInList=!0}
if(alreadyInList){$self.trigger('tm:duplicated',tag);if(opts.blinkClass){for(var i=0;i<6;++i){$("#"+$self.data("tm_rndid")+"_"+tlid[idx]).queue(function(next){$(this).toggleClass(opts.blinkClass);next()}).delay(100)}}else{$("#"+$self.data("tm_rndid")+"_"+tlid[idx]).stop().animate({backgroundColor:opts.blinkBGColor_1},100).animate({backgroundColor:opts.blinkBGColor_2},100).animate({backgroundColor:opts.blinkBGColor_1},100).animate({backgroundColor:opts.blinkBGColor_2},100).animate({backgroundColor:opts.blinkBGColor_1},100).animate({backgroundColor:opts.blinkBGColor_2},100)}}else{if(opts.externalTagId===!0){if(externalTagId===undefined){$.error('externalTagId is not passed for tag -'+tag)}
tagId=externalTagId}else{max=Math.max.apply(null,tlid);max=max===-Infinity?0:max;tagId=++max}
if(!ignoreEvents){$self.trigger('tm:pushing',[tag,tagId])}
tlis.push(tag);tlid.push(tagId);if(!ignoreEvents)
if(opts.AjaxPush!==null&&opts.AjaxPushAllTags==null){if($.inArray(tag,opts.prefilled)===-1){$.post(opts.AjaxPush,$.extend({tag:tag},opts.AjaxPushParameters),null,opts.AjaxPushDataType)}}
newTagId=$self.data("tm_rndid")+'_'+tagId;newTagRemoveId=$self.data("tm_rndid")+'_Remover_'+tagId;escaped=$("<span/>").text(tag).html();html='<span class="'+privateMethods.tagClasses.call($self)+'" id="'+newTagId+'">';html+='<span>'+escaped+'</span>';html+='<a href="#" class="tm-tag-remove" id="'+newTagRemoveId+'" TagIdToRemove="'+tagId+'">';html+=opts.tagCloseIcon+'</a></span> ';$el=$(html);var typeAheadMess=$self.parents('.twitter-typeahead')[0]!==undefined;if(opts.tagsContainer!==null){$(opts.tagsContainer).append($el)}else{if(tlid.length>1){if(typeAheadMess){var lastTagId=$self.data("tm_rndid")+'_'+ --tagId;jQuery('#'+lastTagId).after($el)}else{lastTagObj=$self.siblings("#"+$self.data("tm_rndid")+"_"+tlid[tlid.length-2]);lastTagObj.after($el)}}else{if(typeAheadMess){$self.parents('.twitter-typeahead').before($el)}else{$self.before($el)}}}
$el.find("#"+newTagRemoveId).on("click",$self,function(e){e.preventDefault();var TagIdToRemove=parseInt($(this).attr("TagIdToRemove"));privateMethods.spliceTag.call($self,TagIdToRemove,e.data)});privateMethods.refreshHiddenTagList.call($self);if(!ignoreEvents){$self.trigger('tm:pushed',[tag,tagId])}
privateMethods.showOrHide.call($self)}
$self.val("")},popTag:function(){var $self=$(this),tagId,tagBeingRemoved,tlis=$self.data("tlis"),tlid=$self.data("tlid");if(tlid.length>0){tagId=tlid.pop();tagBeingRemoved=tlis[tlis.length-1];$self.trigger('tm:popping',[tagBeingRemoved,tagId]);tlis.pop();$("#"+$self.data("tm_rndid")+"_"+tagId).remove();privateMethods.refreshHiddenTagList.call($self);$self.trigger('tm:popped',[tagBeingRemoved,tagId]);privateMethods.showOrHide.call($self)}},empty:function(){var $self=$(this),tlis=$self.data("tlis"),tlid=$self.data("tlid"),tagId;while(tlid.length>0){tagId=tlid.pop();tlis.pop();$("#"+$self.data("tm_rndid")+"_"+tagId).remove();privateMethods.refreshHiddenTagList.call($self)}
$self.trigger('tm:emptied',null);privateMethods.showOrHide.call($self)},tags:function(){var $self=this,tlis=$self.data("tlis");return tlis}},privateMethods={showOrHide:function(){var $self=this,opts=$self.data('opts'),tlis=$self.data("tlis");if(opts.maxTags>0&&tlis.length<opts.maxTags){$self.show();$self.trigger('tm:show')}
if(opts.maxTags>0&&tlis.length>=opts.maxTags){$self.hide();$self.trigger('tm:hide')}},tagClasses:function(){var $self=$(this),opts=$self.data('opts'),tagBaseClass=opts.tagBaseClass,inputBaseClass=opts.inputBaseClass,cl;cl=tagBaseClass;if($self.attr('class')){$.each($self.attr('class').split(' '),function(index,value){if(value.indexOf(inputBaseClass+'-')!==-1){cl+=' '+tagBaseClass+value.substring(inputBaseClass.length)}})}
cl+=(opts.tagClass?' '+opts.tagClass:'');return cl},trimTag:function(tag,delimiterChars){var i;tag=$.trim(tag);i=0;for(i;i<tag.length;i++){if($.inArray(tag.charCodeAt(i),delimiterChars)!==-1){break}}
return tag.substring(0,i)},refreshHiddenTagList:function(){var $self=$(this),tlis=$self.data("tlis"),lhiddenTagList=$self.data("lhiddenTagList");if(lhiddenTagList){$(lhiddenTagList).val(tlis.join($self.data('opts').baseDelimiter)).change()}
$self.trigger('tm:refresh',tlis.join($self.data('opts').baseDelimiter))},killEvent:function(e){e.cancelBubble=!0;e.returnValue=!1;e.stopPropagation();e.preventDefault()},keyInArray:function(e,ary){return $.inArray(e.which,ary)!==-1},applyDelimiter:function(e){var $self=$(this);publicMethods.pushTag.call($self,$(this).val());e.preventDefault()},prefill:function(pta){var $self=$(this);var opts=$self.data('opts')
$.each(pta,function(key,val){if(opts.externalTagId===!0){publicMethods.pushTag.call($self,val[opts.prefillValueFieldName],!0,val[opts.prefillIdFieldName])}else{publicMethods.pushTag.call($self,val,!0)}})},pushAllTags:function(e,tag){var $self=$(this),opts=$self.data('opts'),tlis=$self.data("tlis");if(opts.AjaxPushAllTags){if(e.type!=='tm:pushed'||$.inArray(tag,opts.prefilled)===-1){$.post(opts.AjaxPush,$.extend({tags:tlis.join(opts.baseDelimiter)},opts.AjaxPushParameters))}}},spliceTag:function(tagId){var $self=this,tlis=$self.data("tlis"),tlid=$self.data("tlid"),idx=$.inArray(tagId,tlid),tagBeingRemoved;if(-1!==idx){tagBeingRemoved=tlis[idx];$self.trigger('tm:splicing',[tagBeingRemoved,tagId]);$("#"+$self.data("tm_rndid")+"_"+tagId).remove();tlis.splice(idx,1);tlid.splice(idx,1);privateMethods.refreshHiddenTagList.call($self);$self.trigger('tm:spliced',[tagBeingRemoved,tagId])}
privateMethods.showOrHide.call($self)},init:function(options){var opts=$.extend({},defaults,options),delimiters,keyNums;opts.hiddenTagListName=(opts.hiddenTagListName===null)?'hidden-'+this.attr('name'):opts.hiddenTagListName;delimiters=opts.delimeters||opts.delimiters;keyNums=[9,13,17,18,19,37,38,39,40];opts.delimiterChars=[];opts.delimiterKeys=[];$.each(delimiters,function(i,v){if($.inArray(v,keyNums)!==-1){opts.delimiterKeys.push(v)}else{opts.delimiterChars.push(v)}});opts.baseDelimiter=String.fromCharCode(opts.delimiterChars[0]||44);opts.tagBaseClass='tm-tag';opts.inputBaseClass='tm-input';if(!$.isFunction(opts.validator)){opts.validator=null}
this.each(function(){var $self=$(this),hiddenObj='',rndid='',albet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";if($self.data('tagManager')){return!1}
$self.data('tagManager',!0);for(var i=0;i<5;i++){rndid+=albet.charAt(Math.floor(Math.random()*albet.length))}
$self.data("tm_rndid",rndid);$self.data('opts',opts).data('tlis',[]).data('tlid',[]);if(opts.output===null){hiddenObj=$('<input/>',{type:'hidden',name:opts.hiddenTagListName});$self.after(hiddenObj);$self.data("lhiddenTagList",hiddenObj)}else{$self.data("lhiddenTagList",$(opts.output))}
if(opts.AjaxPushAllTags){$self.on('tm:spliced',privateMethods.pushAllTags);$self.on('tm:popped',privateMethods.pushAllTags);$self.on('tm:pushed',privateMethods.pushAllTags)}
$self.on('focus keypress',function(e){if($(this).popover){$(this).popover('hide')}});if(opts.isClearInputOnEsc){$self.on('keyup',function(e){if(e.which===27){$(this).val('');privateMethods.killEvent(e)}})}
$self.on('keypress',function(e){if(privateMethods.keyInArray(e,opts.delimiterChars)){privateMethods.applyDelimiter.call($self,e)}});$self.on('keydown',function(e){if(e.which===13){if(opts.preventSubmitOnEnter){privateMethods.killEvent(e)}}
if(privateMethods.keyInArray(e,opts.delimiterKeys)){privateMethods.applyDelimiter.call($self,e)}});if(opts.deleteTagsOnBackspace){$self.on('keydown',function(e){if(privateMethods.keyInArray(e,opts.backspace)){if($(this).val().length<=0){publicMethods.popTag.call($self);privateMethods.killEvent(e)}}})}
if(opts.fillInputOnTagRemove){$self.on('tm:popped',function(e,tag){$(this).val(tag)})}
$self.change(function(e){if(!/webkit/.test(navigator.userAgent.toLowerCase())){$self.focus()}
privateMethods.killEvent(e)});if(opts.prefilled!==null){if(typeof(opts.prefilled)==="object"){privateMethods.prefill.call($self,opts.prefilled)}else if(typeof(opts.prefilled)==="string"){privateMethods.prefill.call($self,opts.prefilled.split(opts.baseDelimiter))}else if(typeof(opts.prefilled)==="function"){privateMethods.prefill.call($self,opts.prefilled())}}else if(opts.output!==null){if($(opts.output)&&$(opts.output).val()){var existing_tags=$(opts.output)}
privateMethods.prefill.call($self,$(opts.output).val().split(opts.baseDelimiter))}});return this}};$.fn.tagsManager=function(method){var $self=$(this);if(!(0 in this)){return this}
if(publicMethods[method]){return publicMethods[method].apply($self,Array.prototype.slice.call(arguments,1))}else if(typeof method==='object'||!method){return privateMethods.init.apply(this,arguments)}else{$.error('Method '+method+' does not exist.');return!1}}}(jQuery));(function($){$.fn.textareaCount=function(options,fn){var defaults={maxCharacterSize:-1,originalStyle:'originalTextareaInfo',warningStyle:'warningTextareaInfo',warningNumber:20,displayFormat:'#input characters | #words words'};var options=$.extend(defaults,options);var container=$(this);$("<div class='charleft'>&nbsp;</div>").insertAfter(container);var charLeftCss={'width':container.width()};var charLeftInfo=getNextCharLeftInformation(container);charLeftInfo.addClass(options.originalStyle);charLeftInfo.css(charLeftCss);var numInput=0;var maxCharacters=options.maxCharacterSize;var numLeft=0;var numWords=0;container.bind('keyup',function(event){limitTextAreaByCharacterCount()}).bind('mouseover',function(event){setTimeout(function(){limitTextAreaByCharacterCount()},10)}).bind('paste',function(event){setTimeout(function(){limitTextAreaByCharacterCount()},10)});function limitTextAreaByCharacterCount(){charLeftInfo.html(countByCharacters());if(typeof fn!='undefined'){fn.call(this,getInfo())}
return!0}
function countByCharacters(){var content=container.val();var contentLength=content.length;if(options.maxCharacterSize>0){if(contentLength>=options.maxCharacterSize){content=content.substring(0,options.maxCharacterSize)}
var newlineCount=getNewlineCount(content);var systemmaxCharacterSize=options.maxCharacterSize-newlineCount;if(!isWin()){systemmaxCharacterSize=options.maxCharacterSize}
if(contentLength>systemmaxCharacterSize){var originalScrollTopPosition=this.scrollTop;container.val(content.substring(0,systemmaxCharacterSize));this.scrollTop=originalScrollTopPosition}
charLeftInfo.removeClass(options.warningStyle);if(systemmaxCharacterSize-contentLength<=options.warningNumber){charLeftInfo.addClass(options.warningStyle)}
numInput=container.val().length+newlineCount;if(!isWin()){numInput=container.val().length}
numWords=countWord(getCleanedWordString(container.val()));numLeft=maxCharacters-numInput}else{var newlineCount=getNewlineCount(content);numInput=container.val().length+newlineCount;if(!isWin()){numInput=container.val().length}
numWords=countWord(getCleanedWordString(container.val()))}
return formatDisplayInfo()}
function formatDisplayInfo(){var format=options.displayFormat;format=format.replace('#input',numInput);format=format.replace('#words',numWords);if(maxCharacters>0){format=format.replace('#max',maxCharacters);format=format.replace('#left',numLeft)}
return format}
function getInfo(){var info={input:numInput,max:maxCharacters,left:numLeft,words:numWords};return info}
function getNextCharLeftInformation(container){return container.next('.charleft')}
function isWin(){var strOS=navigator.appVersion;if(strOS.toLowerCase().indexOf('win')!=-1){return!0}
return!1}
function getNewlineCount(content){var newlineCount=0;for(var i=0;i<content.length;i++){if(content.charAt(i)=='\n'){newlineCount++}}
return newlineCount}
function getCleanedWordString(content){var fullStr=content+" ";var initial_whitespace_rExp=/^[^A-Za-z0-9]+/gi;var left_trimmedStr=fullStr.replace(initial_whitespace_rExp,"");var non_alphanumerics_rExp=rExp=/[^A-Za-z0-9]+/gi;var cleanedStr=left_trimmedStr.replace(non_alphanumerics_rExp," ");var splitString=cleanedStr.split(" ");return splitString}
function countWord(cleanedWordString){var word_count=cleanedWordString.length-1;return word_count}}})(jQuery);jQuery(function($){var st_dropzone_files=[];var promises=[];var abortPreviousRequests=function(){var promise;while(promises.length>0){promise=promises.pop();promise.abort()}};if($('input.star').length)
$('input.star').rating();if($('.tm-input').length){$('.tm-input').tagsManager({prefilled:st_product_comment_tag_prefilled.split(','),hiddenTagListName:'st_prodcut_comment_tags',});$('.tm-tag .tm-tag-remove').remove();$(".tm-input").on('tm:pushed',function(e,tag,tagid){$('span.tm-tag:last').addClass('tm-checked').on('click',function(){if($(this).hasClass('tm-checked')){$(this).removeClass('tm-checked')}else{$(this).addClass('tm-checked')}})});$('.tm-tag').click(function(){if($(this).hasClass('tm-checked')){$(this).removeClass('tm-checked')}else{$(this).addClass('tm-checked')}})}
if($('#comment_content').length){$('#comment_content').textareaCount({maxCharacterSize:st_pc_max,originalStyle:'originalTextareaInfo',displayFormat:st_pc_display_format})}
if($('#st_product_comment_uploader').length){$('#st_product_comment_uploader').dropzone({url:stproductcomments_controller_url+'&action=upload_image',maxFiles:typeof(st_pc_max_images)!=='undefined'?parseInt(st_pc_max_images):6,acceptedFiles:'image/*',dictRemoveFile:dictRemoveFile,addRemoveLinks:!0,parallelUploads:2,thumbnailHeight:120,thumbnailWidth:120,maxFilesize:3,filesizeBase:1000,init:function(){this.on('maxfilesexceeded',function(file){this.removeFile(file)}),this.on('error',function(file){this.removeFile(file)}),this.on('removedfile',function(file){st_dropzone_files.splice($.inArray(file.st_name,st_dropzone_files),1);$('input[name="image"]').val(st_dropzone_files.join(','))}),this.on('success',function(file,json){json=$.parseJSON(json);if(!json.error){file.st_name=json.image;st_dropzone_files.push(json.image);$('input[name="image"]').val(st_dropzone_files.join(','))}else{showMessage(json.error)}})}})}
$('form[name=st_product_comment_form]').submit(function(e){var is_success=!1;$('input[name="st_prodcut_comment_tags"]').val('');var tags=[];$('.tm-tag.tm-checked').each(function(){if($(this).find('span').html()){tags.push($(this).find('span').html())}});$('input[name="st_prodcut_comment_tags"]').val(tags.join(','));return!0});$('form[name=st_product_comment_form_guest]').submit(function(e){e.preventDefault();var _this=$(this);var sub_btn=$('.st_product_comment_form_guest',_this);$('#st_product_comment_submit').attr('disabled',!0);if(!$(this).find('textarea').val()){$('#st_product_comment_submit').attr('disabled',!1);sub_btn.removeClass('disabled active');return!1}
var is_success=!1;$('input[name="st_prodcut_comment_tags"]').val('');var tags=[];$('.tm-tag.tm-checked').each(function(){if($(this).find('span').html()){tags.push($(this).find('span').html())}});$('input[name="st_prodcut_comment_tags"]').val(tags.join(','));$.ajax({url:stproductcomments_controller_url+'&action=add_comment',type:'POST',headers:{"cache-control":"no-cache"},dataType:'json',data:$(this).serialize(),cache:!1,success:function(json){if(json.r){is_success=!0;$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'},close:function(){if(is_success)
window.location.reload(!0);}},items:{src:'<div class="inline_popup_content small_popup mfp-with-anim text-center">'+json.thank+json.moderation+'</div>',type:'inline'}})}else{$('#st_product_comment_submit').attr('disabled',!1);sub_btn.removeClass('disabled active');CommnetShowMessage(json.m)}}});return!1});$('form[name=st_product_comment_reply_form]').submit(function(e){e.preventDefault();var _this=$(this);var sub_btn=$('.st_product_comment_reply_submit',_this);if(!$(this).find('textarea').val()){sub_btn.removeClass('disabled active');return!1}
var is_success=!1;$.ajax({url:stproductcomments_controller_url+'&action=add_reply',type:'POST',headers:{"cache-control":"no-cache"},dataType:'json',data:_this.serialize(),cache:!1,success:function(json){if(json.r){is_success=!0;$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'},close:function(){if(is_success)
window.location.reload(!0);}},items:{src:'<div class="inline_popup_content small_popup mfp-with-anim text-center">'+json.thank+json.moderation+'</div>',type:'inline'}})}else{sub_btn.removeClass('disabled active');CommnetShowMessage(json.m)}}});return!1});$(document).on('click','.usefulness_btn',function(event){event.preventDefault();var that=$(this);var id_st_product_comment=that.data('id-st-product-comment');var is_usefull=that.data('is-usefull');$.ajax({url:stproductcomments_controller_url+'&rand='+new Date().getTime(),data:{id_st_product_comment:id_st_product_comment,action:'comment_is_usefull',value:is_usefull},type:'POST',headers:{"cache-control":"no-cache"}}).then(function(resp){that.removeClass('active');if(parseInt(resp)>0)
that.find('span').html(resp)
else if((parseInt(resp)==-1))
CommnetGoLogin();}).fail(function(resp){that.removeClass('active')});return!1});$(document).on('click','.report_btn',function(event){event.preventDefault();var that=$(this);if(confirm(confirm_report_message)){var idProductComment=$(this).data('id-st-product-comment');$.ajax({url:stproductcomments_controller_url+'&rand='+new Date().getTime(),data:{id_st_product_comment:idProductComment,action:'report_abuse'},type:'POST',headers:{"cache-control":"no-cache"}}).then(function(resp){that.removeClass('active');if(parseInt(resp)>0)
$('#pcomment-'+idProductComment+' .report_btn').remove();else if((parseInt(resp)==-1))
CommnetGoLogin();}).fail(function(resp){that.removeClass('active')})}
return!1});prestashop.on('updatePComments',function(param){abortPreviousRequests();$.ajax({url:param.url,method:'POST',dataType:'json',beforeSend:function(jqXHR){promises.push(jqXHR)}}).then(function(resp){if(typeof(resp.pcomments_list)!=='undefined'&&resp.pcomments_list)
$('#js_pcomments_list').replaceWith(resp.pcomments_list);if(typeof(resp.pcomments_filter)!=='undefined'&&resp.pcomments_filter)
$('#js_pcomments_filter').replaceWith(resp.pcomments_filter);prestashop.emit('updatedPComments')}).fail(function(resp){})});$(document).on('click','#js_pcomments_list .pc-search-link',function(event){event.preventDefault();prestashop.emit('updatePComments',{url:$(this).attr('href')});return!1});var dom_pc_list=$('#js_pcomments_list');if(dom_pc_list.data('url'))
prestashop.emit('updatePComments',{url:dom_pc_list.data('url')});var move_to=function(id){$('#pcomment-'+id+' > .pcomment-for-reply').after($('#product_comment_reply_box').get(0));$('#product_comment_parent_id').val(id)};$(document).on('click','.btn_product_comment_reply',function(event){event.preventDefault();var id=$(this).data('id');if(id)
move_to(id);return!1});$(document).on('click','.view_all_reviews',function(event){event.preventDefault();var tab=$('.pcomments_block');var istab=!1;if(!tab.length){tab=$('.product_info_tabs .nav-link[data-module="stproductcomments"]');istab=!0}
if(tab.length){if(istab){if(!tab.is(':visible'))
tab=$(tab.attr('href')).addClass('st_open');else tab.tab('show')}
$('body,html').animate({scrollTop:tab.offset().top})}
return!1})});function CommnetGoLogin(){$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'}},items:{src:'#popup_go_login',type:'inline'}})}
function CommnetShowMessage(message){$.magnificPopup.open({removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass='mfp-zoom-in'}},items:{src:'<div class="inline_popup_content small_popup mfp-with-anim text-center">'+message+'</div>',type:'inline'}})};(function(){var Dropzone,Emitter,camelize,contentLoaded,detectVerticalSquash,drawImageIOSFix,noop,without,__slice=[].slice,__hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key]}function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor();child.__super__=parent.prototype;return child};noop=function(){};Emitter=(function(){function Emitter(){}
Emitter.prototype.addEventListener=Emitter.prototype.on;Emitter.prototype.on=function(event,fn){this._callbacks=this._callbacks||{};if(!this._callbacks[event]){this._callbacks[event]=[]}
this._callbacks[event].push(fn);return this};Emitter.prototype.emit=function(){var args,callback,callbacks,event,_i,_len;event=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];this._callbacks=this._callbacks||{};callbacks=this._callbacks[event];if(callbacks){for(_i=0,_len=callbacks.length;_i<_len;_i++){callback=callbacks[_i];callback.apply(this,args)}}
return this};Emitter.prototype.removeListener=Emitter.prototype.off;Emitter.prototype.removeAllListeners=Emitter.prototype.off;Emitter.prototype.removeEventListener=Emitter.prototype.off;Emitter.prototype.off=function(event,fn){var callback,callbacks,i,_i,_len;if(!this._callbacks||arguments.length===0){this._callbacks={};return this}
callbacks=this._callbacks[event];if(!callbacks){return this}
if(arguments.length===1){delete this._callbacks[event];return this}
for(i=_i=0,_len=callbacks.length;_i<_len;i=++_i){callback=callbacks[i];if(callback===fn){callbacks.splice(i,1);break}}
return this};return Emitter})();Dropzone=(function(_super){var extend,resolveOption;__extends(Dropzone,_super);Dropzone.prototype.Emitter=Emitter;Dropzone.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"];Dropzone.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,parallelUploads:2,uploadMultiple:!1,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,filesizeBase:1000,maxFiles:null,params:{},clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,capture:null,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",accept:function(file,done){return done()},init:function(){return noop},forceFallback:!1,fallback:function(){var child,messageElement,span,_i,_len,_ref;this.element.className=""+this.element.className+" dz-browser-not-supported";_ref=this.element.getElementsByTagName("div");for(_i=0,_len=_ref.length;_i<_len;_i++){child=_ref[_i];if(/(^| )dz-message($| )/.test(child.className)){messageElement=child;child.className="dz-message";continue}}
if(!messageElement){messageElement=Dropzone.createElement("<div class=\"dz-message\"><span></span></div>");this.element.appendChild(messageElement)}
span=messageElement.getElementsByTagName("span")[0];if(span){if(span.textContent!=null){span.textContent=this.options.dictFallbackMessage}else if(span.innerText!=null){span.innerText=this.options.dictFallbackMessage}}
return this.element.appendChild(this.getFallbackForm())},resize:function(file){var info,srcRatio,trgRatio;info={srcX:0,srcY:0,srcWidth:file.width,srcHeight:file.height};srcRatio=file.width/file.height;info.optWidth=this.options.thumbnailWidth;info.optHeight=this.options.thumbnailHeight;if((info.optWidth==null)&&(info.optHeight==null)){info.optWidth=info.srcWidth;info.optHeight=info.srcHeight}else if(info.optWidth==null){info.optWidth=srcRatio*info.optHeight}else if(info.optHeight==null){info.optHeight=(1/srcRatio)*info.optWidth}
trgRatio=info.optWidth/info.optHeight;if(file.height<info.optHeight||file.width<info.optWidth){info.trgHeight=info.srcHeight;info.trgWidth=info.srcWidth}else{if(srcRatio>trgRatio){info.srcHeight=file.height;info.srcWidth=info.srcHeight*trgRatio}else{info.srcWidth=file.width;info.srcHeight=info.srcWidth/trgRatio}}
info.srcX=(file.width-info.srcWidth)/2;info.srcY=(file.height-info.srcHeight)/2;return info},drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:noop,dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:noop,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(file){var node,removeFileEvent,removeLink,_i,_j,_k,_len,_len1,_len2,_ref,_ref1,_ref2,_results;if(this.element===this.previewsContainer){this.element.classList.add("dz-started")}
if(this.previewsContainer){file.previewElement=Dropzone.createElement(this.options.previewTemplate.trim());file.previewTemplate=file.previewElement;this.previewsContainer.appendChild(file.previewElement);_ref=file.previewElement.querySelectorAll("[data-dz-name]");for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];node.textContent=file.name}
_ref1=file.previewElement.querySelectorAll("[data-dz-size]");for(_j=0,_len1=_ref1.length;_j<_len1;_j++){node=_ref1[_j];node.innerHTML=this.filesize(file.size)}
if(this.options.addRemoveLinks){file._removeLink=Dropzone.createElement("<a class=\"dz-remove\" href=\"javascript:undefined;\" data-dz-remove>"+this.options.dictRemoveFile+"</a>");file.previewElement.appendChild(file._removeLink)}
removeFileEvent=(function(_this){return function(e){e.preventDefault();e.stopPropagation();if(file.status===Dropzone.UPLOADING){return Dropzone.confirm(_this.options.dictCancelUploadConfirmation,function(){return _this.removeFile(file)})}else{if(_this.options.dictRemoveFileConfirmation){return Dropzone.confirm(_this.options.dictRemoveFileConfirmation,function(){return _this.removeFile(file)})}else{return _this.removeFile(file)}}}})(this);_ref2=file.previewElement.querySelectorAll("[data-dz-remove]");_results=[];for(_k=0,_len2=_ref2.length;_k<_len2;_k++){removeLink=_ref2[_k];_results.push(removeLink.addEventListener("click",removeFileEvent))}
return _results}},removedfile:function(file){var _ref;if(file.previewElement){if((_ref=file.previewElement)!=null){_ref.parentNode.removeChild(file.previewElement)}}
return this._updateMaxFilesReachedClass()},thumbnail:function(file,dataUrl){var thumbnailElement,_i,_len,_ref;if(file.previewElement){file.previewElement.classList.remove("dz-file-preview");_ref=file.previewElement.querySelectorAll("[data-dz-thumbnail]");for(_i=0,_len=_ref.length;_i<_len;_i++){thumbnailElement=_ref[_i];thumbnailElement.alt=file.name;thumbnailElement.src=dataUrl}
return setTimeout(((function(_this){return function(){return file.previewElement.classList.add("dz-image-preview")}})(this)),1)}},error:function(file,message){var node,_i,_len,_ref,_results;if(file.previewElement){file.previewElement.classList.add("dz-error");if(typeof message!=="String"&&message.error){message=message.error}
_ref=file.previewElement.querySelectorAll("[data-dz-errormessage]");_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];_results.push(node.textContent=message)}
return _results}},errormultiple:noop,processing:function(file){if(file.previewElement){file.previewElement.classList.add("dz-processing");if(file._removeLink){return file._removeLink.textContent=this.options.dictCancelUpload}}},processingmultiple:noop,uploadprogress:function(file,progress,bytesSent){var node,_i,_len,_ref,_results;if(file.previewElement){_ref=file.previewElement.querySelectorAll("[data-dz-uploadprogress]");_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){node=_ref[_i];if(node.nodeName==='PROGRESS'){_results.push(node.value=progress)}else{_results.push(node.style.width=""+progress+"%")}}
return _results}},totaluploadprogress:noop,sending:noop,sendingmultiple:noop,success:function(file){if(file.previewElement){return file.previewElement.classList.add("dz-success")}},successmultiple:noop,canceled:function(file){return this.emit("error",file,"Upload canceled.")},canceledmultiple:noop,complete:function(file){if(file._removeLink){file._removeLink.textContent=this.options.dictRemoveFile}
if(file.previewElement){return file.previewElement.classList.add("dz-complete")}},completemultiple:noop,maxfilesexceeded:noop,maxfilesreached:noop,queuecomplete:noop,addedfiles:noop,previewTemplate:"<div class=\"dz-preview dz-file-preview\">\n  <div class=\"dz-image\"><img data-dz-thumbnail /></div>\n  <div class=\"dz-details\">\n    <div class=\"dz-size\"><span data-dz-size></span></div>\n    <div class=\"dz-filename\"><span data-dz-name></span></div>\n  </div>\n  <div class=\"dz-progress\"><span class=\"dz-upload\" data-dz-uploadprogress></span></div>\n  <div class=\"dz-error-message\"><span data-dz-errormessage></span></div>\n  <div class=\"dz-success-mark\">\n    <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n      <title>Check</title>\n      <defs></defs>\n      <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n        <path d=\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" stroke-opacity=\"0.198794158\" stroke=\"#747474\" fill-opacity=\"0.816519475\" fill=\"#FFFFFF\" sketch:type=\"MSShapeGroup\"></path>\n      </g>\n    </svg>\n  </div>\n  <div class=\"dz-error-mark\">\n    <svg width=\"54px\" height=\"54px\" viewBox=\"0 0 54 54\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:sketch=\"http://www.bohemiancoding.com/sketch/ns\">\n      <title>Error</title>\n      <defs></defs>\n      <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\" sketch:type=\"MSPage\">\n        <g id=\"Check-+-Oval-2\" sketch:type=\"MSLayerGroup\" stroke=\"#747474\" stroke-opacity=\"0.198794158\" fill=\"#FFFFFF\" fill-opacity=\"0.816519475\">\n          <path d=\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\" id=\"Oval-2\" sketch:type=\"MSShapeGroup\"></path>\n        </g>\n      </g>\n    </svg>\n  </div>\n</div>"};extend=function(){var key,object,objects,target,val,_i,_len;target=arguments[0],objects=2<=arguments.length?__slice.call(arguments,1):[];for(_i=0,_len=objects.length;_i<_len;_i++){object=objects[_i];for(key in object){val=object[key];target[key]=val}}
return target};function Dropzone(element,options){var elementOptions,fallback,_ref;this.element=element;this.version=Dropzone.version;this.defaultOptions.previewTemplate=this.defaultOptions.previewTemplate.replace(/\n*/g,"");this.clickableElements=[];this.listeners=[];this.files=[];if(typeof this.element==="string"){this.element=document.querySelector(this.element)}
if(!(this.element&&(this.element.nodeType!=null))){throw new Error("Invalid dropzone element.")}
if(this.element.dropzone){throw new Error("Dropzone already attached.")}
Dropzone.instances.push(this);this.element.dropzone=this;elementOptions=(_ref=Dropzone.optionsForElement(this.element))!=null?_ref:{};this.options=extend({},this.defaultOptions,elementOptions,options!=null?options:{});if(this.options.forceFallback||!Dropzone.isBrowserSupported()){return this.options.fallback.call(this)}
if(this.options.url==null){this.options.url=this.element.getAttribute("action")}
if(!this.options.url){throw new Error("No URL provided.")}
if(this.options.acceptedFiles&&this.options.acceptedMimeTypes){throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.")}
if(this.options.acceptedMimeTypes){this.options.acceptedFiles=this.options.acceptedMimeTypes;delete this.options.acceptedMimeTypes}
this.options.method=this.options.method.toUpperCase();if((fallback=this.getExistingFallback())&&fallback.parentNode){fallback.parentNode.removeChild(fallback)}
if(this.options.previewsContainer!==!1){if(this.options.previewsContainer){this.previewsContainer=Dropzone.getElement(this.options.previewsContainer,"previewsContainer")}else{this.previewsContainer=this.element}}
if(this.options.clickable){if(this.options.clickable===!0){this.clickableElements=[this.element]}else{this.clickableElements=Dropzone.getElements(this.options.clickable,"clickable")}}
this.init()}
Dropzone.prototype.getAcceptedFiles=function(){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.accepted){_results.push(file)}}
return _results};Dropzone.prototype.getRejectedFiles=function(){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(!file.accepted){_results.push(file)}}
return _results};Dropzone.prototype.getFilesWithStatus=function(status){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.status===status){_results.push(file)}}
return _results};Dropzone.prototype.getQueuedFiles=function(){return this.getFilesWithStatus(Dropzone.QUEUED)};Dropzone.prototype.getUploadingFiles=function(){return this.getFilesWithStatus(Dropzone.UPLOADING)};Dropzone.prototype.getAddedFiles=function(){return this.getFilesWithStatus(Dropzone.ADDED)};Dropzone.prototype.getActiveFiles=function(){var file,_i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.status===Dropzone.UPLOADING||file.status===Dropzone.QUEUED){_results.push(file)}}
return _results};Dropzone.prototype.init=function(){var eventName,noPropagation,setupHiddenFileInput,_i,_len,_ref,_ref1;if(this.element.tagName==="form"){this.element.setAttribute("enctype","multipart/form-data")}
if(this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")){this.element.appendChild(Dropzone.createElement("<div class=\"dz-default dz-message\"><span>"+this.options.dictDefaultMessage+"</span></div>"))}
if(this.clickableElements.length){setupHiddenFileInput=(function(_this){return function(){if(_this.hiddenFileInput){document.body.removeChild(_this.hiddenFileInput)}
_this.hiddenFileInput=document.createElement("input");_this.hiddenFileInput.setAttribute("type","file");if((_this.options.maxFiles==null)||_this.options.maxFiles>1){_this.hiddenFileInput.setAttribute("multiple","multiple")}
_this.hiddenFileInput.className="dz-hidden-input";if(_this.options.acceptedFiles!=null){_this.hiddenFileInput.setAttribute("accept",_this.options.acceptedFiles)}
if(_this.options.capture!=null){_this.hiddenFileInput.setAttribute("capture",_this.options.capture)}
_this.hiddenFileInput.style.visibility="hidden";_this.hiddenFileInput.style.position="absolute";_this.hiddenFileInput.style.top="0";_this.hiddenFileInput.style.left="0";_this.hiddenFileInput.style.height="0";_this.hiddenFileInput.style.width="0";document.body.appendChild(_this.hiddenFileInput);return _this.hiddenFileInput.addEventListener("change",function(){var file,files,_i,_len;files=_this.hiddenFileInput.files;if(files.length){for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];_this.addFile(file)}}
_this.emit("addedfiles",files);return setupHiddenFileInput()})}})(this);setupHiddenFileInput()}
this.URL=(_ref=window.URL)!=null?_ref:window.webkitURL;_ref1=this.events;for(_i=0,_len=_ref1.length;_i<_len;_i++){eventName=_ref1[_i];this.on(eventName,this.options[eventName])}
this.on("uploadprogress",(function(_this){return function(){return _this.updateTotalUploadProgress()}})(this));this.on("removedfile",(function(_this){return function(){return _this.updateTotalUploadProgress()}})(this));this.on("canceled",(function(_this){return function(file){return _this.emit("complete",file)}})(this));this.on("complete",(function(_this){return function(file){if(_this.getAddedFiles().length===0&&_this.getUploadingFiles().length===0&&_this.getQueuedFiles().length===0){return setTimeout((function(){return _this.emit("queuecomplete")}),0)}}})(this));noPropagation=function(e){e.stopPropagation();if(e.preventDefault){return e.preventDefault()}else{return e.returnValue=!1}};this.listeners=[{element:this.element,events:{"dragstart":(function(_this){return function(e){return _this.emit("dragstart",e)}})(this),"dragenter":(function(_this){return function(e){noPropagation(e);return _this.emit("dragenter",e)}})(this),"dragover":(function(_this){return function(e){var efct;try{efct=e.dataTransfer.effectAllowed}catch(_error){}
e.dataTransfer.dropEffect='move'===efct||'linkMove'===efct?'move':'copy';noPropagation(e);return _this.emit("dragover",e)}})(this),"dragleave":(function(_this){return function(e){return _this.emit("dragleave",e)}})(this),"drop":(function(_this){return function(e){noPropagation(e);return _this.drop(e)}})(this),"dragend":(function(_this){return function(e){return _this.emit("dragend",e)}})(this)}}];this.clickableElements.forEach((function(_this){return function(clickableElement){return _this.listeners.push({element:clickableElement,events:{"click":function(evt){if((clickableElement!==_this.element)||(evt.target===_this.element||Dropzone.elementInside(evt.target,_this.element.querySelector(".dz-message")))){_this.hiddenFileInput.click()}
return!0}}})}})(this));this.enable();return this.options.init.call(this)};Dropzone.prototype.destroy=function(){var _ref;this.disable();this.removeAllFiles(!0);if((_ref=this.hiddenFileInput)!=null?_ref.parentNode:void 0){this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);this.hiddenFileInput=null}
delete this.element.dropzone;return Dropzone.instances.splice(Dropzone.instances.indexOf(this),1)};Dropzone.prototype.updateTotalUploadProgress=function(){var activeFiles,file,totalBytes,totalBytesSent,totalUploadProgress,_i,_len,_ref;totalBytesSent=0;totalBytes=0;activeFiles=this.getActiveFiles();if(activeFiles.length){_ref=this.getActiveFiles();for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];totalBytesSent+=file.upload.bytesSent;totalBytes+=file.upload.total}
totalUploadProgress=100*totalBytesSent/totalBytes}else{totalUploadProgress=100}
return this.emit("totaluploadprogress",totalUploadProgress,totalBytes,totalBytesSent)};Dropzone.prototype._getParamName=function(n){if(typeof this.options.paramName==="function"){return this.options.paramName(n)}else{return""+this.options.paramName+(this.options.uploadMultiple?"["+n+"]":"")}};Dropzone.prototype.getFallbackForm=function(){var existingFallback,fields,fieldsString,form;if(existingFallback=this.getExistingFallback()){return existingFallback}
fieldsString="<div class=\"dz-fallback\">";if(this.options.dictFallbackText){fieldsString+="<p>"+this.options.dictFallbackText+"</p>"}
fieldsString+="<input type=\"file\" name=\""+(this._getParamName(0))+"\" "+(this.options.uploadMultiple?'multiple="multiple"':void 0)+" /><input type=\"submit\" value=\"Upload!\"></div>";fields=Dropzone.createElement(fieldsString);if(this.element.tagName!=="FORM"){form=Dropzone.createElement("<form action=\""+this.options.url+"\" enctype=\"multipart/form-data\" method=\""+this.options.method+"\"></form>");form.appendChild(fields)}else{this.element.setAttribute("enctype","multipart/form-data");this.element.setAttribute("method",this.options.method)}
return form!=null?form:fields};Dropzone.prototype.getExistingFallback=function(){var fallback,getFallback,tagName,_i,_len,_ref;getFallback=function(elements){var el,_i,_len;for(_i=0,_len=elements.length;_i<_len;_i++){el=elements[_i];if(/(^| )fallback($| )/.test(el.className)){return el}}};_ref=["div","form"];for(_i=0,_len=_ref.length;_i<_len;_i++){tagName=_ref[_i];if(fallback=getFallback(this.element.getElementsByTagName(tagName))){return fallback}}};Dropzone.prototype.setupEventListeners=function(){var elementListeners,event,listener,_i,_len,_ref,_results;_ref=this.listeners;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){elementListeners=_ref[_i];_results.push((function(){var _ref1,_results1;_ref1=elementListeners.events;_results1=[];for(event in _ref1){listener=_ref1[event];_results1.push(elementListeners.element.addEventListener(event,listener,!1))}
return _results1})())}
return _results};Dropzone.prototype.removeEventListeners=function(){var elementListeners,event,listener,_i,_len,_ref,_results;_ref=this.listeners;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){elementListeners=_ref[_i];_results.push((function(){var _ref1,_results1;_ref1=elementListeners.events;_results1=[];for(event in _ref1){listener=_ref1[event];_results1.push(elementListeners.element.removeEventListener(event,listener,!1))}
return _results1})())}
return _results};Dropzone.prototype.disable=function(){var file,_i,_len,_ref,_results;this.clickableElements.forEach(function(element){return element.classList.remove("dz-clickable")});this.removeEventListeners();_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];_results.push(this.cancelUpload(file))}
return _results};Dropzone.prototype.enable=function(){this.clickableElements.forEach(function(element){return element.classList.add("dz-clickable")});return this.setupEventListeners()};Dropzone.prototype.filesize=function(size){var cutoff,i,selectedSize,selectedUnit,unit,units,_i,_len;selectedSize=0;selectedUnit="b";if(size>0){units=['TB','GB','MB','KB','b'];for(i=_i=0,_len=units.length;_i<_len;i=++_i){unit=units[i];cutoff=Math.pow(this.options.filesizeBase,4-i)/10;if(size>=cutoff){selectedSize=size/Math.pow(this.options.filesizeBase,4-i);selectedUnit=unit;break}}
selectedSize=Math.round(10*selectedSize)/10}
return"<strong>"+selectedSize+"</strong> "+selectedUnit};Dropzone.prototype._updateMaxFilesReachedClass=function(){if((this.options.maxFiles!=null)&&this.getAcceptedFiles().length>=this.options.maxFiles){if(this.getAcceptedFiles().length===this.options.maxFiles){this.emit('maxfilesreached',this.files)}
return this.element.classList.add("dz-max-files-reached")}else{return this.element.classList.remove("dz-max-files-reached")}};Dropzone.prototype.drop=function(e){var files,items;if(!e.dataTransfer){return}
this.emit("drop",e);files=e.dataTransfer.files;this.emit("addedfiles",files);if(files.length){items=e.dataTransfer.items;if(items&&items.length&&(items[0].webkitGetAsEntry!=null)){this._addFilesFromItems(items)}else{this.handleFiles(files)}}};Dropzone.prototype.paste=function(e){var items,_ref;if((e!=null?(_ref=e.clipboardData)!=null?_ref.items:void 0:void 0)==null){return}
this.emit("paste",e);items=e.clipboardData.items;if(items.length){return this._addFilesFromItems(items)}};Dropzone.prototype.handleFiles=function(files){var file,_i,_len,_results;_results=[];for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];_results.push(this.addFile(file))}
return _results};Dropzone.prototype._addFilesFromItems=function(items){var entry,item,_i,_len,_results;_results=[];for(_i=0,_len=items.length;_i<_len;_i++){item=items[_i];if((item.webkitGetAsEntry!=null)&&(entry=item.webkitGetAsEntry())){if(entry.isFile){_results.push(this.addFile(item.getAsFile()))}else if(entry.isDirectory){_results.push(this._addFilesFromDirectory(entry,entry.name))}else{_results.push(void 0)}}else if(item.getAsFile!=null){if((item.kind==null)||item.kind==="file"){_results.push(this.addFile(item.getAsFile()))}else{_results.push(void 0)}}else{_results.push(void 0)}}
return _results};Dropzone.prototype._addFilesFromDirectory=function(directory,path){var dirReader,entriesReader;dirReader=directory.createReader();entriesReader=(function(_this){return function(entries){var entry,_i,_len;for(_i=0,_len=entries.length;_i<_len;_i++){entry=entries[_i];if(entry.isFile){entry.file(function(file){if(_this.options.ignoreHiddenFiles&&file.name.substring(0,1)==='.'){return}
file.fullPath=""+path+"/"+file.name;return _this.addFile(file)})}else if(entry.isDirectory){_this._addFilesFromDirectory(entry,""+path+"/"+entry.name)}}}})(this);return dirReader.readEntries(entriesReader,function(error){return typeof console!=="undefined"&&console!==null?typeof console.log==="function"?console.log(error):void 0:void 0})};Dropzone.prototype.accept=function(file,done){if(file.size>this.options.maxFilesize*1024*1024){return done(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(file.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize))}else if(!Dropzone.isValidFile(file,this.options.acceptedFiles)){return done(this.options.dictInvalidFileType)}else if((this.options.maxFiles!=null)&&this.getAcceptedFiles().length>=this.options.maxFiles){done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles));return this.emit("maxfilesexceeded",file)}else{return this.options.accept.call(this,file,done)}};Dropzone.prototype.addFile=function(file){file.upload={progress:0,total:file.size,bytesSent:0};this.files.push(file);file.status=Dropzone.ADDED;this.emit("addedfile",file);this._enqueueThumbnail(file);return this.accept(file,(function(_this){return function(error){if(error){file.accepted=!1;_this._errorProcessing([file],error)}else{file.accepted=!0;if(_this.options.autoQueue){_this.enqueueFile(file)}}
return _this._updateMaxFilesReachedClass()}})(this))};Dropzone.prototype.enqueueFiles=function(files){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];this.enqueueFile(file)}
return null};Dropzone.prototype.enqueueFile=function(file){if(file.status===Dropzone.ADDED&&file.accepted===!0){file.status=Dropzone.QUEUED;if(this.options.autoProcessQueue){return setTimeout(((function(_this){return function(){return _this.processQueue()}})(this)),0)}}else{throw new Error("This file can't be queued because it has already been processed or was rejected.")}};Dropzone.prototype._thumbnailQueue=[];Dropzone.prototype._processingThumbnail=!1;Dropzone.prototype._enqueueThumbnail=function(file){if(this.options.createImageThumbnails&&file.type.match(/image.*/)&&file.size<=this.options.maxThumbnailFilesize*1024*1024){this._thumbnailQueue.push(file);return setTimeout(((function(_this){return function(){return _this._processThumbnailQueue()}})(this)),0)}};Dropzone.prototype._processThumbnailQueue=function(){if(this._processingThumbnail||this._thumbnailQueue.length===0){return}
this._processingThumbnail=!0;return this.createThumbnail(this._thumbnailQueue.shift(),(function(_this){return function(){_this._processingThumbnail=!1;return _this._processThumbnailQueue()}})(this))};Dropzone.prototype.removeFile=function(file){if(file.status===Dropzone.UPLOADING){this.cancelUpload(file)}
this.files=without(this.files,file);this.emit("removedfile",file);if(this.files.length===0){return this.emit("reset")}};Dropzone.prototype.removeAllFiles=function(cancelIfNecessary){var file,_i,_len,_ref;if(cancelIfNecessary==null){cancelIfNecessary=!1}
_ref=this.files.slice();for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.status!==Dropzone.UPLOADING||cancelIfNecessary){this.removeFile(file)}}
return null};Dropzone.prototype.createThumbnail=function(file,callback){var fileReader;fileReader=new FileReader;fileReader.onload=(function(_this){return function(){if(file.type==="image/svg+xml"){_this.emit("thumbnail",file,fileReader.result);if(callback!=null){callback()}
return}
return _this.createThumbnailFromUrl(file,fileReader.result,callback)}})(this);return fileReader.readAsDataURL(file)};Dropzone.prototype.createThumbnailFromUrl=function(file,imageUrl,callback){var img;img=document.createElement("img");img.onload=(function(_this){return function(){var canvas,ctx,resizeInfo,thumbnail,_ref,_ref1,_ref2,_ref3;file.width=img.width;file.height=img.height;resizeInfo=_this.options.resize.call(_this,file);if(resizeInfo.trgWidth==null){resizeInfo.trgWidth=resizeInfo.optWidth}
if(resizeInfo.trgHeight==null){resizeInfo.trgHeight=resizeInfo.optHeight}
canvas=document.createElement("canvas");ctx=canvas.getContext("2d");canvas.width=resizeInfo.trgWidth;canvas.height=resizeInfo.trgHeight;drawImageIOSFix(ctx,img,(_ref=resizeInfo.srcX)!=null?_ref:0,(_ref1=resizeInfo.srcY)!=null?_ref1:0,resizeInfo.srcWidth,resizeInfo.srcHeight,(_ref2=resizeInfo.trgX)!=null?_ref2:0,(_ref3=resizeInfo.trgY)!=null?_ref3:0,resizeInfo.trgWidth,resizeInfo.trgHeight);thumbnail=canvas.toDataURL("image/png");_this.emit("thumbnail",file,thumbnail);if(callback!=null){return callback()}}})(this);if(callback!=null){img.onerror=callback}
return img.src=imageUrl};Dropzone.prototype.processQueue=function(){var i,parallelUploads,processingLength,queuedFiles;parallelUploads=this.options.parallelUploads;processingLength=this.getUploadingFiles().length;i=processingLength;if(processingLength>=parallelUploads){return}
queuedFiles=this.getQueuedFiles();if(!(queuedFiles.length>0)){return}
if(this.options.uploadMultiple){return this.processFiles(queuedFiles.slice(0,parallelUploads-processingLength))}else{while(i<parallelUploads){if(!queuedFiles.length){return}
this.processFile(queuedFiles.shift());i++}}};Dropzone.prototype.processFile=function(file){return this.processFiles([file])};Dropzone.prototype.processFiles=function(files){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.processing=!0;file.status=Dropzone.UPLOADING;this.emit("processing",file)}
if(this.options.uploadMultiple){this.emit("processingmultiple",files)}
return this.uploadFiles(files)};Dropzone.prototype._getFilesWithXhr=function(xhr){var file,files;return files=(function(){var _i,_len,_ref,_results;_ref=this.files;_results=[];for(_i=0,_len=_ref.length;_i<_len;_i++){file=_ref[_i];if(file.xhr===xhr){_results.push(file)}}
return _results}).call(this)};Dropzone.prototype.cancelUpload=function(file){var groupedFile,groupedFiles,_i,_j,_len,_len1,_ref;if(file.status===Dropzone.UPLOADING){groupedFiles=this._getFilesWithXhr(file.xhr);for(_i=0,_len=groupedFiles.length;_i<_len;_i++){groupedFile=groupedFiles[_i];groupedFile.status=Dropzone.CANCELED}
file.xhr.abort();for(_j=0,_len1=groupedFiles.length;_j<_len1;_j++){groupedFile=groupedFiles[_j];this.emit("canceled",groupedFile)}
if(this.options.uploadMultiple){this.emit("canceledmultiple",groupedFiles)}}else if((_ref=file.status)===Dropzone.ADDED||_ref===Dropzone.QUEUED){file.status=Dropzone.CANCELED;this.emit("canceled",file);if(this.options.uploadMultiple){this.emit("canceledmultiple",[file])}}
if(this.options.autoProcessQueue){return this.processQueue()}};resolveOption=function(){var args,option;option=arguments[0],args=2<=arguments.length?__slice.call(arguments,1):[];if(typeof option==='function'){return option.apply(this,args)}
return option};Dropzone.prototype.uploadFile=function(file){return this.uploadFiles([file])};Dropzone.prototype.uploadFiles=function(files){var file,formData,handleError,headerName,headerValue,headers,i,input,inputName,inputType,key,method,option,progressObj,response,updateProgress,url,value,xhr,_i,_j,_k,_l,_len,_len1,_len2,_len3,_m,_ref,_ref1,_ref2,_ref3,_ref4,_ref5;xhr=new XMLHttpRequest();for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.xhr=xhr}
method=resolveOption(this.options.method,files);url=resolveOption(this.options.url,files);xhr.open(method,url,!0);xhr.withCredentials=!!this.options.withCredentials;response=null;handleError=(function(_this){return function(){var _j,_len1,_results;_results=[];for(_j=0,_len1=files.length;_j<_len1;_j++){file=files[_j];_results.push(_this._errorProcessing(files,response||_this.options.dictResponseError.replace("{{statusCode}}",xhr.status),xhr))}
return _results}})(this);updateProgress=(function(_this){return function(e){var allFilesFinished,progress,_j,_k,_l,_len1,_len2,_len3,_results;if(e!=null){progress=100*e.loaded/e.total;for(_j=0,_len1=files.length;_j<_len1;_j++){file=files[_j];file.upload={progress:progress,total:e.total,bytesSent:e.loaded}}}else{allFilesFinished=!0;progress=100;for(_k=0,_len2=files.length;_k<_len2;_k++){file=files[_k];if(!(file.upload.progress===100&&file.upload.bytesSent===file.upload.total)){allFilesFinished=!1}
file.upload.progress=progress;file.upload.bytesSent=file.upload.total}
if(allFilesFinished){return}}
_results=[];for(_l=0,_len3=files.length;_l<_len3;_l++){file=files[_l];_results.push(_this.emit("uploadprogress",file,progress,file.upload.bytesSent))}
return _results}})(this);xhr.onload=(function(_this){return function(e){var _ref;if(files[0].status===Dropzone.CANCELED){return}
if(xhr.readyState!==4){return}
response=xhr.responseText;if(xhr.getResponseHeader("content-type")&&~xhr.getResponseHeader("content-type").indexOf("application/json")){try{response=JSON.parse(response)}catch(_error){e=_error;response="Invalid JSON response from server."}}
updateProgress();if(!((200<=(_ref=xhr.status)&&_ref<300))){return handleError()}else{return _this._finished(files,response,e)}}})(this);xhr.onerror=(function(_this){return function(){if(files[0].status===Dropzone.CANCELED){return}
return handleError()}})(this);progressObj=(_ref=xhr.upload)!=null?_ref:xhr;progressObj.onprogress=updateProgress;headers={"Accept":"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};if(this.options.headers){extend(headers,this.options.headers)}
for(headerName in headers){headerValue=headers[headerName];if(headerValue){xhr.setRequestHeader(headerName,headerValue)}}
formData=new FormData();if(this.options.params){_ref1=this.options.params;for(key in _ref1){value=_ref1[key];formData.append(key,value)}}
for(_j=0,_len1=files.length;_j<_len1;_j++){file=files[_j];this.emit("sending",file,xhr,formData)}
if(this.options.uploadMultiple){this.emit("sendingmultiple",files,xhr,formData)}
if(this.element.tagName==="FORM"){_ref2=this.element.querySelectorAll("input, textarea, select, button");for(_k=0,_len2=_ref2.length;_k<_len2;_k++){input=_ref2[_k];inputName=input.getAttribute("name");inputType=input.getAttribute("type");if(input.tagName==="SELECT"&&input.hasAttribute("multiple")){_ref3=input.options;for(_l=0,_len3=_ref3.length;_l<_len3;_l++){option=_ref3[_l];if(option.selected){formData.append(inputName,option.value)}}}else if(!inputType||((_ref4=inputType.toLowerCase())!=="checkbox"&&_ref4!=="radio")||input.checked){formData.append(inputName,input.value)}}}
for(i=_m=0,_ref5=files.length-1;0<=_ref5?_m<=_ref5:_m>=_ref5;i=0<=_ref5?++_m:--_m){formData.append(this._getParamName(i),files[i],files[i].name)}
return this.submitRequest(xhr,formData,files)};Dropzone.prototype.submitRequest=function(xhr,formData,files){return xhr.send(formData)};Dropzone.prototype._finished=function(files,responseText,e){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.status=Dropzone.SUCCESS;this.emit("success",file,responseText,e);this.emit("complete",file)}
if(this.options.uploadMultiple){this.emit("successmultiple",files,responseText,e);this.emit("completemultiple",files)}
if(this.options.autoProcessQueue){return this.processQueue()}};Dropzone.prototype._errorProcessing=function(files,message,xhr){var file,_i,_len;for(_i=0,_len=files.length;_i<_len;_i++){file=files[_i];file.status=Dropzone.ERROR;this.emit("error",file,message,xhr);this.emit("complete",file)}
if(this.options.uploadMultiple){this.emit("errormultiple",files,message,xhr);this.emit("completemultiple",files)}
if(this.options.autoProcessQueue){return this.processQueue()}};return Dropzone})(Emitter);Dropzone.version="4.1.0";Dropzone.options={};Dropzone.optionsForElement=function(element){if(element.getAttribute("id")){return Dropzone.options[camelize(element.getAttribute("id"))]}else{return void 0}};Dropzone.instances=[];Dropzone.forElement=function(element){if(typeof element==="string"){element=document.querySelector(element)}
if((element!=null?element.dropzone:void 0)==null){throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.")}
return element.dropzone};Dropzone.autoDiscover=!0;Dropzone.discover=function(){var checkElements,dropzone,dropzones,_i,_len,_results;if(document.querySelectorAll){dropzones=document.querySelectorAll(".dropzone")}else{dropzones=[];checkElements=function(elements){var el,_i,_len,_results;_results=[];for(_i=0,_len=elements.length;_i<_len;_i++){el=elements[_i];if(/(^| )dropzone($| )/.test(el.className)){_results.push(dropzones.push(el))}else{_results.push(void 0)}}
return _results};checkElements(document.getElementsByTagName("div"));checkElements(document.getElementsByTagName("form"))}
_results=[];for(_i=0,_len=dropzones.length;_i<_len;_i++){dropzone=dropzones[_i];if(Dropzone.optionsForElement(dropzone)!==!1){_results.push(new Dropzone(dropzone))}else{_results.push(void 0)}}
return _results};Dropzone.blacklistedBrowsers=[/opera.*Macintosh.*version\/12/i];Dropzone.isBrowserSupported=function(){var capableBrowser,regex,_i,_len,_ref;capableBrowser=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector){if(!("classList" in document.createElement("a"))){capableBrowser=!1}else{_ref=Dropzone.blacklistedBrowsers;for(_i=0,_len=_ref.length;_i<_len;_i++){regex=_ref[_i];if(regex.test(navigator.userAgent)){capableBrowser=!1;continue}}}}else{capableBrowser=!1}
return capableBrowser};without=function(list,rejectedItem){var item,_i,_len,_results;_results=[];for(_i=0,_len=list.length;_i<_len;_i++){item=list[_i];if(item!==rejectedItem){_results.push(item)}}
return _results};camelize=function(str){return str.replace(/[\-_](\w)/g,function(match){return match.charAt(1).toUpperCase()})};Dropzone.createElement=function(string){var div;div=document.createElement("div");div.innerHTML=string;return div.childNodes[0]};Dropzone.elementInside=function(element,container){if(element===container){return!0}
while(element=element.parentNode){if(element===container){return!0}}
return!1};Dropzone.getElement=function(el,name){var element;if(typeof el==="string"){element=document.querySelector(el)}else if(el.nodeType!=null){element=el}
if(element==null){throw new Error("Invalid `"+name+"` option provided. Please provide a CSS selector or a plain HTML element.")}
return element};Dropzone.getElements=function(els,name){var e,el,elements,_i,_j,_len,_len1,_ref;if(els instanceof Array){elements=[];try{for(_i=0,_len=els.length;_i<_len;_i++){el=els[_i];elements.push(this.getElement(el,name))}}catch(_error){e=_error;elements=null}}else if(typeof els==="string"){elements=[];_ref=document.querySelectorAll(els);for(_j=0,_len1=_ref.length;_j<_len1;_j++){el=_ref[_j];elements.push(el)}}else if(els.nodeType!=null){elements=[els]}
if(!((elements!=null)&&elements.length)){throw new Error("Invalid `"+name+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.")}
return elements};Dropzone.confirm=function(question,accepted,rejected){if(window.confirm(question)){return accepted()}else if(rejected!=null){return rejected()}};Dropzone.isValidFile=function(file,acceptedFiles){var baseMimeType,mimeType,validType,_i,_len;if(!acceptedFiles){return!0}
acceptedFiles=acceptedFiles.split(",");mimeType=file.type;baseMimeType=mimeType.replace(/\/.*$/,"");for(_i=0,_len=acceptedFiles.length;_i<_len;_i++){validType=acceptedFiles[_i];validType=validType.trim();if(validType.charAt(0)==="."){if(file.name.toLowerCase().indexOf(validType.toLowerCase(),file.name.length-validType.length)!==-1){return!0}}else if(/\/\*$/.test(validType)){if(baseMimeType===validType.replace(/\/.*$/,"")){return!0}}else{if(mimeType===validType){return!0}}}
return!1};if(typeof jQuery!=="undefined"&&jQuery!==null){jQuery.fn.dropzone=function(options){return this.each(function(){return new Dropzone(this,options)})}}
if(typeof module!=="undefined"&&module!==null){module.exports=Dropzone}else{window.Dropzone=Dropzone}
Dropzone.ADDED="added";Dropzone.QUEUED="queued";Dropzone.ACCEPTED=Dropzone.QUEUED;Dropzone.UPLOADING="uploading";Dropzone.PROCESSING=Dropzone.UPLOADING;Dropzone.CANCELED="canceled";Dropzone.ERROR="error";Dropzone.SUCCESS="success";detectVerticalSquash=function(img){var alpha,canvas,ctx,data,ey,ih,iw,py,ratio,sy;iw=img.naturalWidth;ih=img.naturalHeight;canvas=document.createElement("canvas");canvas.width=1;canvas.height=ih;ctx=canvas.getContext("2d");ctx.drawImage(img,0,0);data=ctx.getImageData(0,0,1,ih).data;sy=0;ey=ih;py=ih;while(py>sy){alpha=data[(py-1)*4+3];if(alpha===0){ey=py}else{sy=py}
py=(ey+sy)>>1}
ratio=py/ih;if(ratio===0){return 1}else{return ratio}};drawImageIOSFix=function(ctx,img,sx,sy,sw,sh,dx,dy,dw,dh){var vertSquashRatio;vertSquashRatio=detectVerticalSquash(img);return ctx.drawImage(img,sx,sy,sw,sh,dx,dy,dw,dh/vertSquashRatio)};contentLoaded=function(win,fn){var add,doc,done,init,poll,pre,rem,root,top;done=!1;top=!0;doc=win.document;root=doc.documentElement;add=(doc.addEventListener?"addEventListener":"attachEvent");rem=(doc.addEventListener?"removeEventListener":"detachEvent");pre=(doc.addEventListener?"":"on");init=function(e){if(e.type==="readystatechange"&&doc.readyState!=="complete"){return}(e.type==="load"?win:doc)[rem](pre+e.type,init,!1);if(!done&&(done=!0)){return fn.call(win,e.type||e)}};poll=function(){var e;try{root.doScroll("left")}catch(_error){e=_error;setTimeout(poll,50);return}
return init("poll")};if(doc.readyState!=="complete"){if(doc.createEventObject&&root.doScroll){try{top=!win.frameElement}catch(_error){}
if(top){poll()}}
doc[add](pre+"DOMContentLoaded",init,!1);doc[add](pre+"readystatechange",init,!1);return win[add](pre+"load",init,!1)}};Dropzone._autoDiscoverFunction=function(){if(Dropzone.autoDiscover){return Dropzone.discover()}};contentLoaded(window,Dropzone._autoDiscoverFunction)}).call(this);setTimeout(function(){$('body').append('<script src="//code.tidio.co/e7dn9gjk32xjvlgkqr1asyhztbm5ge9m.js" async></script>');(function(){function onTidioChatApiReady(){var checkoutSteps=["https://www.experimenteaza.ro/cos?action=show","https://www.experimenteaza.ro/comanda"];var checkoutFinished=["https://www.experimenteaza.ro/confirmare-comanda"];function executeTidioChatApiTrack(){tidioChatApi.track("Abandoned Cart")}
function checkUrl(e){var t="tidioStartUrlVisited",i=getCookie(t),o=e.replace(/\/$/,"");if(-1<checkoutSteps.indexOf(e)||-1<checkoutSteps.indexOf(o))
return setCookie(t,"1","10"),!0;i&&1==+i&&-1===checkoutFinished.indexOf(e)&&-1===checkoutFinished.indexOf(o)&&executeTidioChatApiTrack(),setCookie(t,"",-1)}
function setCookie(e,t,i){var o=new Date();o.setTime(o.getTime()+24*i*60*60*1e3);var n="expires="+o.toUTCString();document.cookie=e+"="+t+";"+n+";path=/"}
function getCookie(e){for(var t=e+"=",i=decodeURIComponent(document.cookie).split(";"),o=0;o<i.length;o+=1){for(var n=i[o];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return n.substring(t.length,n.length);}
return""}
var i,o;checkUrl(document.location.href),(i=window.history),(o=i.pushState),(i.pushState=function(e){"function"==typeof i.onpushstate&&i.onpushstate({state:e});var t=o.apply(i,arguments);return checkUrl(document.location.href),t})}
if(window.tidioChatApi){window.tidioChatApi.on("ready",onTidioChatApiReady)}else{document.addEventListener("tidioChat-ready",onTidioChatApiReady)}})()},5000)