PageSourceSearch

https://www.pays-salers.fr/sites/default/files/js/js_LXICV4gjnSnD3VqCYbqUmoA2qGdocQYgCvpZzExoJmE.js

js pays-salers.fr collected 2026-10-02 12:32:32 UTC 309,721 bytes, 4,629 lines download raw bytes

vendor: 89,947 bytes, lines 1-2
1/*! jQuery v3.6.3 | (c) OpenJS Foundation and other contributors | jquery.org/license */
2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},S=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||S).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.3",E=function(e,t){return new E.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}E.fn=E.prototype={jquery:f,constructor:E,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=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(n){return this.pushStack(E.map(this,function(e,t){return n.call(e,t,e)}))},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(E.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(E.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},E.extend=E.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,a[t]=E.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},E.extend({expando:"jQuery"+(f+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]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}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&&(p(Object(e))?E.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:v}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=t[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,S,y,s,c,v,E="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\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,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,S)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=E)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{if(d.cssSupportsSelector&&!CSS.supports("selector(:is("+c+"))"))throw new Error;return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===E&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[E]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=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)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,S=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&C.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+E+"'></a><select id='"+E+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.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)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&S&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!S):void 0;return void 0!==r?r:d.attributes||!S?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=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 while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,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 G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(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=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace($," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,y){var v="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===y?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=v!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(v){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[E]||(a[E]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[E]||(a[E]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[E]||(a[E]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=y)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[E]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[E]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=S?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!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!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.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:ye(function(){return[0]}),last:ye(function(e,t){return[t-1]}),eq:ye(function(e,t,n){return[n<0?n+t:n]}),even:ye(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ye(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ye(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ye(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[E]||(e[E]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,y,v,e){return y&&!y[E]&&(y=Ce(y)),v&&!v[E]&&(v=Ce(v,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?v||(e?d:l||y)?[]:t:f;if(g&&g(f,p,n,r),y){i=Te(p,u),y(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(v||d){if(v){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);v(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=v?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),v?v(null,t,p,r):H.apply(t,p)})}function Se(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[E]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Se(e.slice(s,n)),n<r&&Se(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,y,v,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Se(t[n]))[E]?i.push(a):o.push(a);(a=A(e,(y=o,m=0<(v=i).length,x=0<y.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!S);while(s=y[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=v[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+v.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&S&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ve(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!S,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},d.sortStable=E.split("").sort(j).join("")===E,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);E.find=d,E.expr=d.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=d.uniqueSort,E.text=d.getText,E.isXMLDoc=d.isXML,E.contains=d.contains,E.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=E.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1<i.call(n,e)!==r}):E.filter(n,e,r)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,function(e){return 1===e.nodeType}))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter(function(){for(t=0;t<r;t++)if(E.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)E.find(e,i[t],n);return 1<r?E.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?E(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.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 E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,D=E(S);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&E(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(E(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},function(r,i){E.fn[r]=function(e,t){var n=E.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=E.filter(t,n)),1<this.length&&(H[r]||E.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},E.each(e.match(P)||[],function(e,t){n[t]=!0}),n):E.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){E.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return E.each(arguments,function(e,t){var n;while(-1<(n=E.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<E.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},E.extend({Deferred:function(e){var o=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return E.Deferred(function(r){E.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(E.Deferred.getStackHook&&(t.stackTrace=E.Deferred.getStackHook()),C.setTimeout(t))}}return E.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?E.extend(e,a):a}},s={};return E.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=E.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){C.setTimeout(function(){throw e})};var F=E.Deferred();function $(){S.removeEventListener("DOMContentLoaded",$),C.removeEventListener("load",$),E.ready()}E.fn.ready=function(e){return F.then(e)["catch"](function(e){E.readyException(e)}),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0)!==e&&0<--E.readyWait||F.resolveWith(S,[E])}}),E.ready.then=F.then,"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?C.setTimeout(E.ready):(S.addEventListener("DOMContentLoaded",$),C.addEventListener("load",$));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(E(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=E.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(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(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||E.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&&!E.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),E.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){E.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:E.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),E.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?E.queue(this[0],t):void 0===n?this:this.each(function(){var e=E.queue(this,t,n);E._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&E.dequeue(this,t)})},dequeue:function(e){return this.each(function(){E.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=E.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=S.documentElement,ie=function(e){return E.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===E.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(e,t,"")},u=s(),l=n&&n[3]||(E.cssNumber[t]?"":"px"),c=e.nodeType&&(E.cssNumber[t]||"px"!==l&&+u)&&te.exec(E.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)E.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,E.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=E.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}E.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?E(this).show():E(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=S.createDocumentFragment().appendChild(S.createElement("div")),(fe=S.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",v.option=!!ce.lastChild;var ge={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 ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,v.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))E.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;E.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<E.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return S.activeElement}catch(e){}}()==("focus"===t)}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}function Ee(e,i,o){o?(Y.set(e,i,!1),E.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(E.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:E.event.trigger(E.extend(r[0],E.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&E.event.add(e,i,we)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(re,i),n.guid||(n.guid=E.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(e){return"undefined"!=typeof E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),E.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.hasData(e)&&Y.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=E.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||E.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)E.event.remove(e,d+t[l],n,r,!0);E.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=E.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<E(i,this).index(l):E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,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&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.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:!0},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},function(t,e){E.event.special[t]={setup:function(){return Ee(this,t,Ce),!1},trigger:function(){return Ee(this,t),!0},_default:function(e){return Y.get(e.target,t)},delegateType:e}}),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){E.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||E.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),E.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){E.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)E.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=E.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!v.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=E.map(ye(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=E.clone(u,!0,!0),s&&E.merge(a,ye(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,E.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&E.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?E._evalUrl&&!u.noModule&&E._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?E.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(ye(r)),r.parentNode&&(n&&ie(r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}E.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(a=ye(c),r=0,i=(o=ye(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ye(e),a=a||ye(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ye(c,"script")).length&&ve(a,!f&&ye(e,"script")),c},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return B(this,function(e){return void 0===e?E.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 He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(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&&(E.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return E.clone(this,e,t)})},html:function(e){return B(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&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(E.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;E.inArray(this,n)<0&&(E.cleanData(ye(this)),t&&t.replaceChild(e,this))},n)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){E.fn[e]=function(e){for(var t,n=[],r=E(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),E(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=/^--/,Me=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ie=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},We=new RegExp(ne.join("|"),"i"),Fe="[\\x20\\t\\r\\n\\f]",$e=new RegExp("^"+Fe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Fe+"+$","g");function Be(e,t,n){var r,i,o,a,s=Re.test(t),u=e.style;return(n=n||Me(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace($e,"$1")||void 0),""!==a||ie(e)||(a=E.style(e,t)),!v.pixelBoxStyles()&&Pe.test(a)&&We.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function _e(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%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=S.createElement("div"),l=S.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,E.extend(v,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=S.createElement("table"),t=S.createElement("tr"),n=S.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var ze=["Webkit","Moz","ms"],Ue=S.createElement("div").style,Xe={};function Ve(e){var t=E.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=ze.length;while(n--)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=E.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=E.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=E.css(e,"border"+ne[a]+"Width",!0,i))):(u+=E.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=E.css(e,"border"+ne[a]+"Width",!0,i):s+=E.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Me(e),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(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 i,o,a,s=X(t),u=Re.test(t),l=e.style;if(u||(t=Ve(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Re.test(t)||(t=Ve(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],function(e,u){E.cssHooks[u]={get:function(e,t,n){if(t)return!Ge.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):Ie(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Me(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===E.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=E.css(e,u)),Je(0,t,s)}}}),E.cssHooks.marginLeft=_e(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),E.each({margin:"",padding:"",border:"Width"},function(i,o){E.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(E.cssHooks[i+o].set=Je)}),E.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;a<i;a++)o[t[a]]=E.css(e,t[a],!1,r);return o}return void 0!==n?E.style(e,t,n):E.css(e,t)},e,t,1<arguments.length)}}),((E.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=E.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):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.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=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=et.prototype.init,E.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===S.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,E.fx.interval),E.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=E.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=E.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=E.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return E.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=Y.get(e,"fxshow");for(r in n.queue||(null==(a=E._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--,E.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||E.style(e,r)}if((u=!E.isEmptyObject(t))||!E.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=Y.get(e,"display")),"none"===(c=E.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=E.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),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]})),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=Y.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)E.style(e,r,d[r])})),u=ct(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),E.speed=function(e,t,n){var r=e&&"object"==typeof e?E.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return E.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=E.isEmptyObject(t),o=E.speed(e,n,r),a=function(){var e=ft(this,E.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=E.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||E.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=E.timers,o=n?n.length:0;for(t.finish=!0,E.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),E.each(["toggle","show","hide"],function(e,r){var i=E.fn[r];E.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),E.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){E.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),tt=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){nt||(nt=!0,st())},E.fx.stop=function(){nt=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(r,e){return r=E.fx&&E.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=S.createElement("input"),it=S.createElement("select").appendChild(S.createElement("option")),rt.type="checkbox",v.checkOn=""!==rt.value,v.optSelected=it.selected,(rt=S.createElement("input")).value="t",rt.type="radio",v.radioValue="t"===rt.value;var pt,dt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return B(this,E.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){E.removeAttr(this,e)})}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||E.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(P)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}E.fn.extend({prop:function(e,t){return B(this,E.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[E.propFix[e]||e]})}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),v.optSelected||(E.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)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){E.propFix[this.toLowerCase()]=this}),E.fn.extend({addClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){E(this).addClass(t.call(this,e,vt(this)))}):(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=yt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){E(this).removeClass(t.call(this,e,vt(this)))}):arguments.length?(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=yt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return m(t)?this.each(function(e){E(this).toggleClass(t.call(this,e,vt(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=mt(t),this.each(function(){if(s)for(o=E(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=vt(this))&&Y.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+yt(vt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;E.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,E(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=E.map(t,function(e){return null==e?"":e+""})),(r=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=E.valHooks[t.type]||E.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:yt(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=E(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=E.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<E.inArray(E.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<E.inArray(E(e).val(),t)}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||S],d=y.call(e,"type")?e.type:e,h=y.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||S,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+E.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[E.expando]?e:new E.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),c=E.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||S)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),E.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),E.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each(function(){E.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),v.focusin||E.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){E.event.simulate(r,e.target,E.event.fix(e))};E.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},St=/\?/;E.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Et=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function jt(n,e,r,i){var t;if(Array.isArray(e))E.each(e,function(e,t){r||Et.test(n)?i(n,t):jt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)jt(n+"["+t+"]",e[t],r,i)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Dt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=S.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function $t(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,E.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Bt(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Wt.href=Tt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,E.ajaxSettings),t):Bt(E.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,y=E.ajaxSetup({},t),v=y.context||y,m=y.context&&(v.nodeType||v.jquery)?E(v):E.event,x=E.Deferred(),b=E.Callbacks("once memory"),w=y.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(y.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),y.url=((e||y.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),y.type=t.method||t.type||y.method||y.type,y.dataTypes=(y.dataType||"*").toLowerCase().match(P)||[""],null==y.crossDomain){r=S.createElement("a");try{r.href=y.url,r.href=r.href,y.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){y.crossDomain=!0}}if(y.data&&y.processData&&"string"!=typeof y.data&&(y.data=E.param(y.data,y.traditional)),$t(Rt,y,t,T),h)return T;for(i in(g=E.event&&y.global)&&0==E.active++&&E.event.trigger("ajaxStart"),y.type=y.type.toUpperCase(),y.hasContent=!Ot.test(y.type),f=y.url.replace(qt,""),y.hasContent?y.data&&y.processData&&0===(y.contentType||"").indexOf("application/x-www-form-urlencoded")&&(y.data=y.data.replace(Dt,"+")):(o=y.url.slice(f.length),y.data&&(y.processData||"string"==typeof y.data)&&(f+=(St.test(f)?"&":"?")+y.data,delete y.data),!1===y.cache&&(f=f.replace(Lt,"$1"),o=(St.test(f)?"&":"?")+"_="+Ct.guid+++o),y.url=f+o),y.ifModified&&(E.lastModified[f]&&T.setRequestHeader("If-Modified-Since",E.lastModified[f]),E.etag[f]&&T.setRequestHeader("If-None-Match",E.etag[f])),(y.data&&y.hasContent&&!1!==y.contentType||t.contentType)&&T.setRequestHeader("Content-Type",y.contentType),T.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+("*"!==y.dataTypes[0]?", "+It+"; q=0.01":""):y.accepts["*"]),y.headers)T.setRequestHeader(i,y.headers[i]);if(y.beforeSend&&(!1===y.beforeSend.call(v,T,y)||h))return T.abort();if(u="abort",b.add(y.complete),T.done(y.success),T.fail(y.error),c=$t(Mt,y,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,y]),h)return T;y.async&&0<y.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},y.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(y,T,n)),!i&&-1<E.inArray("script",y.dataTypes)&&E.inArray("json",y.dataTypes)<0&&(y.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.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 "+u+" to "+o}}}return{state:"success",data:t}}(y,s,T,i),i?(y.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(E.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(E.etag[f]=u)),204===e||"HEAD"===y.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(v,[o,l,T]):x.rejectWith(v,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,y,i?o:a]),b.fireWith(v,[T,l]),g&&(m.trigger("ajaxComplete",[T,y]),--E.active||E.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],function(e,i){E[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),E.ajax(E.extend({url:e,type:i,dataType:r,data:t,success:n},E.isPlainObject(e)&&e))}}),E.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){E(this).wrapInner(n.call(this,e))}):this.each(function(){var e=E(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){E(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){E(this).replaceWith(this.childNodes)}),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=E.ajaxSettings.xhr();v.cors=!!zt&&"withCredentials"in zt,v.ajax=zt=!!zt,E.ajaxTransport(function(i){var o,a;if(v.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),E.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),E.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 E.globalEval(e),e}}}),E.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),E.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=E("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+Ct.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=S.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=yt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&E.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?E("<div>").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.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)}}),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(e,n){E.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;E.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||E.guid++,i},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=A,E.isFunction=m,E.isWindow=x,E.camelCase=X,E.type=w,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return E});var Yt=C.jQuery,Qt=C.$;return E.noConflict=function(e){return C.$===E&&(C.$=Qt),e&&C.jQuery===E&&(C.jQuery=Yt),E},"undefined"==typeof e&&(C.jQuery=C.$=E),E});
3;
4/**
5* DO NOT EDIT THIS FILE.
6* See the following change record for more information,
7* https://www.drupal.org/node/2815083
8* @preserve
9**/
10if (!Element.prototype.matches) {
11  Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
12};
13/**
14* DO NOT EDIT THIS FILE.
15* See the following change record for more information,
16* https://www.drupal.org/node/2815083
17* @preserve
18**/
19if (typeof Object.assign !== 'function') {
20  Object.defineProperty(Object, 'assign', {
21    value: function assign(target, varArgs) {
22      'use strict';
23
24      if (target === null || target === undefined) {
25        throw new TypeError('Cannot convert undefined or null to object');
26      }
27      var to = Object(target);
28      for (var index = 1; index < arguments.length; index++) {
29        var nextSource = arguments[index];
30        if (nextSource !== null && nextSource !== undefined) {
31          for (var nextKey in nextSource) {
32            if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
33              to[nextKey] = nextSource[nextKey];
34            }
35          }
36        }
37      }
38      return to;
39    },
40    writable: true,
41    configurable: true
42  });
43};
44/*! @drupal/once - v1.0.1 - 2021-06-12 */
45var once=function(){"use strict";var n=/[\11\12\14\15\40]+/,e="data-once",t=document;function r(n,t,r){return n[t+"Attribute"](e,r)}function o(e){if("string"!=typeof e)throw new TypeError("once ID must be a string");if(""===e||n.test(e))throw new RangeError("once ID must not be empty or contain spaces");return'[data-once~="'+e+'"]'}function u(n){if(!(n instanceof Element))throw new TypeError("The element must be an instance of Element");return!0}function i(n,e){void 0===e&&(e=t);var r=n;if(null===n)r=[];else{if(!n)throw new TypeError("Selector must not be empty");"string"!=typeof n||e!==t&&!u(e)?n instanceof Element&&(r=[n]):r=e.querySelectorAll(n)}return Array.prototype.slice.call(r)}function c(n,e,t){return e.filter((function(e){var r=u(e)&&e.matches(n);return r&&t&&t(e),r}))}function f(e,t){var o=t.add,u=t.remove,i=[];r(e,"has")&&r(e,"get").trim().split(n).forEach((function(n){i.indexOf(n)<0&&n!==u&&i.push(n)})),o&&i.push(o);var c=i.join(" ");r(e,""===c?"remove":"set",c)}function a(n,e,t){return c(":not("+o(n)+")",i(e,t),(function(e){return f(e,{add:n})}))}return a.remove=function(n,e,t){return c(o(n),i(e,t),(function(e){return f(e,{remove:n})}))},a.filter=function(n,e,t){return c(o(n),i(e,t))},a.find=function(n,e){return i(n?o(n):"[data-once]",e)},a}();
46
47;
48/*!
49 * jQuery Once v2.2.3 - http://github.com/robloach/jquery-once
50 * @license MIT, GPL-2.0
51 *   http://opensource.org/licenses/MIT
52 *   http://opensource.org/licenses/GPL-2.0
53 */
54(function(e){"use strict";if(typeof exports==="object"&&typeof exports.nodeName!=="string"){e(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(t){"use strict";var r=function(e){e=e||"once";if(typeof e!=="string"){throw new TypeError("The jQuery Once id parameter must be a string")}return e};t.fn.once=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)!==true}).data(n,true)};t.fn.removeOnce=function(e){return this.findOnce(e).removeData("jquery-once-"+r(e))};t.fn.findOnce=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)===true})}});
55
56window.drupalTranslations = {"strings":{"":{"Save":"Enregistrer","An AJAX HTTP error occurred.":"Une erreur HTTP AJAX s\u0027est produite.","HTTP Result Code: !status":"Code de statut HTTP : !status","An AJAX HTTP request terminated abnormally.":"Une requ\u00eate HTTP AJAX s\u0027est termin\u00e9e anormalement.","Debugging information follows.":"Informations de d\u00e9bogage ci-dessous.","Path: !uri":"Chemin : !uri","StatusText: !statusText":"StatusText: !statusText","ResponseText: !responseText":"ResponseText : !responseText","ReadyState: !readyState":"ReadyState : !readyState","CustomMessage: !customMessage":"Message personalis\u00e9 : !customMessage","Please wait...":"Veuillez patienter...","The response failed verification so will not be processed.":"La v\u00e9rification de la r\u00e9ponse a \u00e9chou\u00e9, elle ne sera pas trait\u00e9e.","The callback URL is not local and n
56ot trusted: !url":"L\u0027URL de retour n\u0027est pas locale et n\u0027est pas de confiance : !url","Changed":"Modifi\u00e9","Home":"Accueil","Title":"Titre","closed":"ferm\u00e9","Cancel":"Annuler","Disabled":"D\u00e9sactiv\u00e9","Enabled":"Activ\u00e9","Edit":"Modifier","Link":"Lien","Image":"Image","Open":"Ouvert","Add":"Ajouter","Continue":"Continuer","OK":"OK","Close":"Fermer","Show":"Afficher","Select all rows in this table":"S\u00e9lectionner toutes les lignes du tableau","Deselect all rows in this table":"D\u00e9s\u00e9lectionner toutes les lignes du tableau","Extend":"Extension","Not published":"Non publi\u00e9","Loading...":"En cours de chargement...","Hide":"Masquer","Unlink":"Supprimer le lien","Not promoted":"Non promu","Error message":"Message d\u0027erreur","Quick edit":"Modification rapide","Warning message":"Message d\u0027avertissement","Edit Link":"Lien de modification","Remove group":"Supprimer le groupe","By @name on @date":"Par @name le @date","By @name":"Par @name","Not in menu":"Pas dans le menu","Alias: @alias":"Alias : @alias","No alias":"Aucun alias","@label":"@label","New revision":"Nouvelle r\u00e9vision","Drag to re-order":"Cliquer-d\u00e9poser pour r\u00e9-organiser","Changes made in this table will not be saved until the form is submitted.":"Les changements effectu\u00e9s dans ce tableau ne seront pris en compte que lorsque la configuration aura \u00e9t\u00e9 enregistr\u00e9e.","Discard changes":"Annuler les changements","Show description":"Afficher la description","Lock":"Verrouiller","Saving":"Enregistrement","This permission is inherited from the authenticated user role.":"Ce droit est h\u00e9rit\u00e9e du r\u00f4le de l\u0027utilisateur authentifi\u00e9.","Alternative text":"Texte alternatif","No revision":"Aucune r\u00e9vision","Requires a title":"Titre obligatoire","Not restricted":"Non restreint","(active tab)":"(onglet actif)","Status message":"Message d\u0027\u00e9tat","Restricted to certain pages":"R\u00e9serv\u00e9 \u00e0 certaines pages","The block cannot be placed in this region.":"Le bloc ne peut pas \u00eatre plac\u00e9 dans cette r\u00e9gion.","Edit summary":"Modifier le r\u00e9sum\u00e9","Don\u0027t display post information":"Ne pas afficher les informations de la contribution","Unlock":"D\u00e9verrouiller","Collapse":"Replier","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Le fichier s\u00e9lectionn\u00e9 %filename ne peut pas \u00eatre transf\u00e9r\u00e9. Seulement les fichiers avec les extensions suivantes sont permis : %extensions.","Show row weights":"Afficher le poids des lignes","Hide row weights":"Cacher le poids des lignes","Apply (all displays)":"Appliquer (tous les affichages)","Apply (this display)":"Appliquer (cet affichage)","Revert to default":"R\u00e9tablir par d\u00e9faut","Hide description":"Masquer la description","You have unsaved changes":"Vous avez des changements non enregistr\u00e9s","Needs to be updated":"N\u00e9cessite une mise \u00e0 jour","Does not need to be updated":"Ne n\u00e9cessite aucune mise \u00e0 jour","Show all columns":"Montrer toutes les colonnes","Show table cells that were hidden to make the table fit within a small screen.":"Montrer les cellules de tableau qui ont \u00e9t\u00e9 cach\u00e9es pour que le tableau rentre dans un petit \u00e9cran.","List additional actions":"Lister les actions suppl\u00e9mentaires","Flag other translations as outdated":"Marquer les autres traductions comme p\u00e9rim\u00e9es","Do not flag other translations as outdated":"Ne pas marquer les autres traductions comme p\u00e9rim\u00e9es","opened":"ouvert","Horizontal orientation":"Orientation horizontale","Vertical orientation":"Orientation verticale","Tray orientation changed to @orientation.":"L\u0027orientation du sous-menu est maintenant @orientation.","You have unsaved changes.":"Vous avez des changements non enregistr\u00e9s.","@action @title configuration options":"options de configuration @action @title","Tabbing is no longer constrained by the Contextual module.":"La tabulation n\u0027est plus contrainte par le module Contextual.","Tabbing is constrained to a set of @contextualsCount and the edit mode toggle.":"La tabulation est c
56ontrainte par un ensemble de @contextualsCount et l\u0027activation\/d\u00e9saction du mode d\u0027\u00e9dition.","Press the esc key to exit.":"Pressez la touche Echap pour quitter.","@count contextual link\u0003@count contextual links":"@count lien contextuel\u0003@count liens contextuels","!tour_item of !total":"!tour_item sur !total","End tour":"Terminer la visite","Discard changes?":"Annuler les changements ?","The toolbar cannot be set to a horizontal orientation when it is locked.":"La barre d\u0027outils ne peut pas \u00eatre orient\u00e9e horizontalement quand elle est verrouill\u00e9e.","Could not load the form for \u003Cq\u003E@field-label\u003C\/q\u003E, either due to a website problem or a network connection problem.\u003Cbr\u003EPlease try again.":"Impossible de charger le formulaire de \u003Cq\u003E@field-label\u003C\/q\u003E, soit \u00e0 cause d\u0027un probl\u00e8me dans le site web, soit \u00e0 cause d\u0027un probl\u00e8me de connexion r\u00e9seau. \u003Cbr \/\u003EVeuillez r\u00e9essayer.","Changing the text format to %text_format will permanently remove content that is not allowed in that text format.\u003Cbr\u003E\u003Cbr\u003ESave your changes before switching the text format to avoid losing data.":"Basculer le format de texte en %text_format retirera d\u00e9finitivement le contenu qui n\u0027est pas autoris\u00e9 dans ce format de texte.\u003Cbr\u003E\u003Cbr\u003EPour \u00e9viter de perdre des donn\u00e9es, enregistrez vos changements avant de basculer le format de texte.","Change text format?":"Changer le format de texte ?","Rich Text Editor, !label field":"\u00c9diteur de texte riche, champ !label","Leave preview?":"Quitter l\u0027aper\u00e7u ?","Leave preview":"Quitter l\u0027aper\u00e7u","Leaving the preview will cause unsaved changes to be lost. Are you sure you want to leave the preview?":"Quitter la pr\u00e9-visualisation entra\u00eenera la perte des changements non-enregistr\u00e9s. \u00cates-vous s\u00fbr(e) de vouloir quitter la pr\u00e9-visualisation ?","CTRL+Left click will prevent this dialog from showing and proceed to the clicked link.":"CTRL + clic gauche emp\u00eachera cette fen\u00eatre de dialogue de s\u0027ouvrir et ouvrira le lien cliqu\u00e9.","Tray \u0022@tray\u0022 @action.":"Sous-menu \u0022@tray\u0022 @action.","Tray @action.":"Sous-menu @action.","Hide lower priority columns":"Cacher les colonnes de plus faible priorit\u00e9","!modules modules are available in the modified list.":"Les modules !modules sont disponibles dans la liste modifi\u00e9e.","Network problem!":"Probl\u00e8me de r\u00e9seau !","Authored on @date":"R\u00e9dig\u00e9 le @date","1 block is available in the modified list.\u0003@count blocks are available in the modified list.":"@count bloc est disponible dans la liste modifi\u00e9e.\u0003@count blocs sont disponibles dans la liste modifi\u00e9e.","Insert this token into your form":"Ins\u00e9rer ce jeton (\u003Cem\u003Etoken\u003C\/em\u003E) dans votre formulaire","First click a text field to insert your tokens into.":"Cliquez d\u0027abord sur un champ de texte pour ins\u00e9rer vos jetons (\u003Cem\u003Etokens\u003C\/em\u003E) dans celui -ci.","No results":"Aucun r\u00e9sultat","clear":"effacer","Collapse all":"Tout replier","Next":"Suivant","Automatic alias":"Alias automatique"}},"pluralFormula":{"0":0,"1":0,"default":1}};;
57/**
58* DO NOT EDIT THIS FILE.
59* See the following change record for more information,
60* https://www.drupal.org/node/2815083
61* @preserve
62**/
63(function () {
64  var settingsElement = document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]');
65  window.drupalSettings = {};
66  if (settingsElement !== null) {
67    window.drupalSettings = JSON.parse(settingsElement.textContent);
68  }
69})();;
70/**
71* DO NOT EDIT THIS FILE.
72* See the following change record for more information,
73* https://www.drupal.org/node/2815083
74* @preserve
75**/
76window.Drupal = {
77  behaviors: {},
78  locale: {}
79};
80(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) {
81  Drupal.throwError = function (error) {
82    setTimeout(function () {
83      throw error;
84    }, 0);
85  };
86  Drupal.attachBehaviors = function (context, settings) {
87    context = context || document;
88    settings = settings || drupalSettings;
89    var behaviors = Drupal.behaviors;
90    Object.keys(behaviors || {}).forEach(function (i) {
91      if (typeof behaviors[i].attach === 'function') {
92        try {
93          behaviors[i].attach(context, settings);
94        } catch (e) {
95          Drupal.throwError(e);
96        }
97      }
98    });
99  };
100  Drupal.detachBehaviors = function (context, settings, trigger) {
101    context = context || document;
102    settings = settings || drupalSettings;
103    trigger = trigger || 'unload';
104    var behaviors = Drupal.behaviors;
105    Object.keys(behaviors || {}).forEach(function (i) {
106      if (typeof behaviors[i].detach === 'function') {
107        try {
108          behaviors[i].detach(context, settings, trigger);
109        } catch (e) {
110          Drupal.throwError(e);
111        }
112      }
113    });
114  };
115  Drupal.checkPlain = function (str) {
116    str = str.toString().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
117    return str;
118  };
119  Drupal.formatString = function (str, args) {
120    var processedArgs = {};
121    Object.keys(args || {}).forEach(function (key) {
122      switch (key.charAt(0)) {
123        case '@':
124          processedArgs[key] = Drupal.checkPlain(args[key]);
125          break;
126        case '!':
127          processedArgs[key] = args[key];
128          break;
129        default:
130          processedArgs[key] = Drupal.theme('placeholder', args[key]);
131          break;
132      }
133    });
134    return Drupal.stringReplace(str, processedArgs, null);
135  };
136  Drupal.stringReplace = function (str, args, keys) {
137    if (str.length === 0) {
138      return str;
139    }
140    if (!Array.isArray(keys)) {
141      keys = Object.keys(args || {});
142      keys.sort(function (a, b) {
143        return a.length - b.length;
144      });
145    }
146    if (keys.length === 0) {
147      return str;
148    }
149    var key = keys.pop();
150    var fragments = str.split(key);
151    if (keys.length) {
152      for (var i = 0; i < fragments.length; i++) {
153        fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0));
154      }
155    }
156    return fragments.join(args[key]);
157  };
158  Drupal.t = function (str, args, options) {
159    options = options || {};
160    options.context = options.context || '';
161    if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) {
162      str = drupalTranslations.strings[options.context][str];
163    }
164    if (args) {
165      str = Drupal.formatString(str, args);
166    }
167    return str;
168  };
169  Drupal.url = function (path) {
170    return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path;
171  };
172  Drupal.url.toAbsolute = function (url) {
173    var urlParsingNode = document.createElement('a');
174    try {
175      url = decodeURIComponent(url);
176    } catch (e) {}
177    urlParsingNode.setAttribute('href', url);
178    return urlParsingNode.cloneNode(false).href;
179  };
180  Drupal.url.isLocal = function (url) {
181    var absoluteUrl = Drupal.url.toAbsolute(url);
182    var protocol = window.location.protocol;
183    if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) {
184      protocol = 'https:';
185    }
186    var baseUrl = "".concat(protocol, "//").concat(window.location.host).concat(drupalSettings.path.baseUrl.slice(0, -1));
187    try {
188      absoluteUrl = decodeURIComponent(absoluteUrl);
189    } catch (e) {}
190    try {
191      baseUrl = decodeURIComponent(baseUrl);
192    } catch (e) {}
193    return absoluteUrl === baseUrl || absoluteUrl.indexOf("".concat(baseUrl, "/")) === 0;
194  };
195  Drupal.formatPlural = function (count, singular, plural, args, options) {
196    args = args || {};
197    args['@count'] = count;
198    var pluralDelimiter = drupalSettings.pluralDelimiter;
199    var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter);
200    var index = 0;
201    if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) {
202      index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default;
203    } else if (args['@count'] !== 1) {
204      index = 1;
205    }
206    return translations[index];
207  };
208  Drupal.encodePath = function (item) {
209    return window.encodeURIComponent(item).replace(/%2F/g, '/');
210  };
211  Drupal.deprecationError = function (_ref) {
212    var message = _ref.message;
213    if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) {
214      console.warn("[Deprecation] ".concat(message));
215    }
216  };
217  Drupal.deprecatedProperty = function (_ref2) {
218    var target = _ref2.target,
219      deprecatedProperty = _ref2.deprecatedProperty,
220      message = _ref2.message;
221    if (!Proxy || !Reflect) {
222      return target;
223    }
224    return new Proxy(target, {
225      get: function get(target, key) {
226        if (key === deprecatedProperty) {
227          Drupal.deprecationError({
228            message: message
229          });
230        }
231        for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
232          rest[_key - 2] = arguments[_key];
233        }
234        return Reflect.get.apply(Reflect, [target, key].concat(rest));
235      }
236    });
237  };
238  Drupal.theme = function (func) {
239    if (func in Drupal.theme) {
240      var _Drupal$theme;
241      for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
242        args[_key2 - 1] = arguments[_key2];
243      }
244      return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args);
245    }
246  };
247  Drupal.theme.placeholder = function (str) {
248    return "<em class=\"placeholder\">".concat(Drupal.checkPlain(str), "</em>");
249  };
250})(Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect);;
251/**
252* DO NOT EDIT THIS FILE.
253* See the following change record for more information,
254* https://www.drupal.org/node/2815083
255* @preserve
256**/
257if (window.jQuery) {
258  jQuery.noConflict();
259}
260document.documentElement.className += ' js';
261(function (Drupal, drupalSettings) {
262  var domReady = function domReady(callback) {
263    var listener = function listener() {
264      callback();
265      document.removeEventListener('DOMContentLoaded', listener);
266    };
267    if (document.readyState !== 'loading') {
268      setTimeout(callback, 0);
269    } else {
270      document.addEventListener('DOMContentLoaded', listener);
271    }
272  };
273  domReady(function () {
274    Drupal.attachBehaviors(document, drupalSettings);
275  });
276})(Drupal, window.drupalSettings);;
277!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 277
277ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
277slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
277parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
277,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 277
277,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
277!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
277):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
277o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
277,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
278;
279/**
280* jQuery scroroller Plugin 1.0
281*
282* http://www.tinywall.net/
283* 
284* Developers: Arun David, Boobalan
285* Copyright (c) 2014 
286*/
287(function($){
288    $(window).on("load",function(){
289        $(document).scrollzipInit();
290        $(document).rollerInit();
291    });
292    $(window).on("load scroll resize", function(){
293        $('.numscroller').scrollzip({
294            showFunction    :   function() {
295                                    numberRoller($(this).attr('data-slno'));
296                                },
297            wholeVisible    :     false,
298        });
299    });
300    $.fn.scrollzipInit=function(){
301        $('body').prepend("<div style='position:fixed;top:0px;left:0px;width:0;height:0;' id='scrollzipPoint'></div>" );
302    };
303    $.fn.rollerInit=function(){
304        var i=0;
305        $('.numscroller').each(function() {
306            i++;
307           $(this).attr('data-slno',i); 
308           $(this).addClass("roller-title-number-"+i);
309        });        
310    };
311    $.fn.scrollzip = function(options){
312        var settings = $.extend({
313            showFunction    : null,
314            hideFunction    : null,
315            showShift       : 0,
316            wholeVisible    : false,
317            hideShift       : 0,
318        }, options);
319        return this.each(function(i,obj){
320            $(this).addClass('scrollzip');
321            if ( $.isFunction( settings.showFunction ) ){
322                if(
323                    !$(this).hasClass('isShown')&&
324                    ($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.showShift)>($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))&&
325                    ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))<($(this).outerHeight()+$(this).offset().top-settings.showShift)
326                ){
327                    $(this).addClass('isShown');
328                    settings.showFunction.call( this );
329                }
330            }
331            if ( $.isFunction( settings.hideFunction ) ){
332                if(
333                    $(this).hasClass('isShown')&&
334                    (($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.hideShift)<($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))||
335                    ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))>($(this).outerHeight()+$(this).offset().top-settings.hideShift))
336                ){
337                    $(this).removeClass('isShown');
338                    settings.hideFunction.call( this );
339                }
340            }
341            return this;
342        });
343    };
344    function numberRoller(slno){
345            var min=$('.roller-title-number-'+slno).attr('data-min');
346            var max=$('.roller-title-number-'+slno).attr('data-max');
347            var timediff=$('.roller-title-number-'+slno).attr('data-delay');
348            var increment=$('.roller-title-number-'+slno).attr('data-increment');
349            var numdiff=max-min;
350            var timeout=(timediff*1000)/numdiff;
351            //if(numinc<10){
352                //increment=Math.floor((timediff*1000)/10);
353            //}//alert(increment);
354            numberRoll(slno,min,max,increment,timeout);
355            
356    }
357    function numberRoll(slno,min,max,increment,timeout){//alert(slno+"="+min+"="+max+"="+increment+"="+timeout);
358        if(min<=max){
359            $('.roller-title-number-'+slno).html(min);
360            min=parseInt(min)+parseInt(increment);
361            setTimeout(function(){numberRoll(eval(slno),eval(min),eval(max),eval(increment),eval(timeout))},timeout);
362        }else{
363            $('.roller-title-number-'+slno).html(max);
364        }
365    }
366})(jQuery);;
367!function(o){({init:function(){this._menu(),this._blockVideo(),this._caroussel(),this._map(),this._clicksearch()},_clicksearch:function(){var e=o(".scrollTop");o(window).scroll(function(){100<o(this).scrollTop()?o(e).css("opacity","1"):o(e).css("opacity","0")}),o(e).click(function(){return o("html, body").animate({scrollTop:0},800),!1}),o(document).on({mouseenter:function(){o(this).closest("body").find("svg #girgols_2_ path,svg #girgols").css({fill:"#da6348"})},mouseleave:function(){o(this).closest("body").find("svg #girgols_2_ path,svg #girgols").css({fill:"#242c58"})}},"svg #girgols_2_ path,svg #girgols"),o(document).on({mouseenter:function(){o(this).closest("body").find("svg path#pleaux_1_,svg path#pleaux").css({fill:"#da6348"})},mouseleave:function(){o(this).closest("body").find("svg path#pleaux_1_,svg path#pleaux").css({fill:"#242c58"})}},"svg path#pleaux_1_,svg path#pleaux");o.each([{svg:"svg path#pleaux_1_,svg path#pleaux",lien:".link-pleaux a",class:".link-pleaux"}
367,{svg:"svg path#ally",lien:".region1 a",class:".region1"},{svg:"svg path#anglards-de-salers",lien:".region2 a",class:".region2"},{svg:"svg path#barriac-les-bosqets",lien:".region3 a",class:".region3"},{svg:"svg path#besse",lien:".region4 a",class:".region4"},{svg:"svg path#brageac",lien:".region5 a",class:".region5"},{svg:"svg path#chaussenac",lien:".region6 a",class:".region6"},{svg:"svg path#escorailles",lien:".region7 a",class:".region7"},{svg:"svg path#fontanges",lien:".region8 a",class:".region8"},{svg:"svg path#freix-anglards",lien:".region9 a",class:".region9"},{svg:"svg #girgols_2_ path",lien:".region10 a",class:".region10"},{svg:"svg path#le-falgoux",lien:".region11 a",class:".region11"},{svg:"svg path#le-fau",lien:".region12 a",class:".region12"},{svg:"svg path#le_vaulmier",lien:".region13 a",class:".region13"},{svg:"svg path#saint-bonnet-de-salers",lien:".region14 a",class:".region14"},{svg:"svg path#saint-cernin",lien:".region15 a",class:".region15"},{svg:"svg path#saint-chamant",lien:".region16 a",class:".regi
367on16"},{svg:"svg path#saint-cirgues-de-malbert",lien:".region17 a",class:".region17"},{svg:"svg path#saint-illide",lien:".region18 a",class:".region18"},{svg:"svg path#saint-martin-cantales",lien:".region19 a",class:".region19"},{svg:"svg path#saint-martin-valmeroux",lien:".region20 a",class:".region20"},{svg:"svg path#saint-paul-de-salers",lien:".region21 a",class:".region21"},{svg:"svg path#saint-projet-de-salers",lien:".region22 a",class:".region22"},{svg:"svg path#saint-vincent-de-salers",lien:".region23 a",class:".region23"},{svg:"svg path#sainte-eulalie",lien:".region24 a",class:".region24"},{svg:"svg path#salers",lien:".region25 a",class:".region25"},{svg:"svg path#tournemire",lien:".region26 a",class:".region26"}],function(e,s){var i,n,t,a;i=s.svg,n=s.lien,o(document).on({mouseenter:function(){o(document).find(n).css({color:"#da6348"}),o(this).css({cursor:"pointer"})},mouseleave:function(){o(document).find(n).css({color:"#242c58"})},click:function(){document.querySelector(n).click()}},i),t=s.class,a=s.svg,o(document).on({mouseenter:function(){o(document).find(a).css({fill:"#da6348"})},mouseleave:function(){o(document).find(a).css({fill:"#242c58"})}},t)}),o(".widget-fixed").mouseover(function(){}),o(".btn-search").click(function(){o("body").toggleClass("disable-scroll"),o(this).toggleClass("close-search"),o(".search-bloc").toggleClass("show-search")})},_caroussel:function(){o(window).width()<767&&o(".widget-fixed").length&&o(".widget-fixed ul").slick({dots:!1,arrows:!1,infinite:!1,speed:300,slidesToShow:3,centerMode:!1,variableWidth:!0}),o(".caroussel-image").length&&o(".caroussel-image").slick({adaptiveHeight:!0}),o(".caroussel-image-home").length&&o(".caroussel-image-home").slick({dots:!1,arrows:!1,infinite:!0,autoplay:!0,autoplaySpeed:5e3,slidesToShow:1,centerMode:!1,variableWidth:!1}),o(window).width()<992&&(o(".carousel-theme-light .col-lg-10 .row").length&&o(".carousel-theme-light .col-lg-10 .row").slick({dots:!1,arrows:!1,infinite:!1,speed:300,slidesToShow:2,centerMode:!1,variableWidth:!0}),o(".caroussel-events").length&&o(".caroussel-events").slick({dots:!1,arrows:!1,infinite:!1,speed:300,slidesToShow:1,centerMode:!1,variableWidth:!0})),o(window).width()<767&&(o(".carousel-theme-light .col-lg-10 .row").length&&o(".carousel-theme-light .col-lg-10 .row").not(".slick-initialized").slick({dots:!1,arrows:!1,infinite:!1,speed:300,slidesToShow:2,centerMode:!0,variableWidth:!0}),o(".caroussel-events").length&&o(".caroussel-events").not(".slick-initialized").slick({dots:!1,arrows:!1,infinite:!1,speed:300,slidesToShow:1,centerMode:!1,variableWidth:!0}))},_map:function(){},_blockVideo:function(){var e=".two-block .wrapper-video iframe",n=o(e).attr("src");function t(e,s){var i=o(s);if(i[0]){var n=i[0].getAttribute("src");n&&-1!=n.indexOf("youtube.com/embed")&&i[0].contentWindow.postMessage(JSON.stringify({event:"command",func:e,args:""}),"*")}}o(e).each(function(){var e,s,i;e=this,i=!(!(s=n.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/))||11!=s[7].length)&&s[7],o(e).attr("src","https://www.youtube.com/embed/"+i+"?rel=0&enablejsapi=1&version=3")});o('[id*="v-id-link"]').click(function(e){e.preventDefault();var s,i,n=o(this).parents(".wrapper-video");i=o(s=n).find("iframe"),o(s).addClass("play"),t("playVideo",i)})},_menu:function(){o(window).width()<767&&(o(".burger").click(function(){o("body").hasClass("menu-active")?o("body").removeClass("menu-active"):o("body").addClass("menu-active")}),o("header nav ul .sub-menu-link > a").click(function(e){e.preventDefault(),o(this).hasClass("active")?o(this).removeClass("active"):(o("header nav ul .sub-menu-link > a").removeClass("active"),o(this).addClass("active"))}),o("header .sub-menu-1 > .click-sub").click(function(e){e.preventDefault(),console.log("res"),o(this).parent(".sub-menu-1").hasClass("active")?o(this).parent(".sub-menu-1").removeClass("active"):(o("header .sub-menu-1").removeClass("active"),o(this).parent(".sub-menu-1").addClass("active"))}),o("header .header-bottom nav ul li .sub-menu li ul .current-menu-item a").parents(".sub-menu
367-1").addClass("current-menu-item"))}}).init(),o(window).on("load",function(){o(".widget-fixed").addClass("open")}),o(window).resize(function(){if(767<o(window).width()){var e=o(".portes-ouvertes .block-left .intro").height(),s=o(".portes-ouvertes .block-left .descList").height()-18;o(".portes-ouvertes .block-right .intro").height(e),o(".portes-ouvertes .block-right .tabs-block").height(s)}});var s=0;o(window).scroll(function(){if(setTimeout(function(){o(".widget-fixed").removeClass("open")},500),o(".circle-numbers").length){var e=o(".circle-numbers").offset().top-window.innerHeight;0==s&&o(window).scrollTop()>e&&(o(".number, .num").each(function(){var e=o(this),s=e.attr("data-count");o({countNum:e.text()}).animate({countNum:s},{duration:2e3,easing:"swing",step:function(){e.text(Math.floor(this.countNum))},complete:function(){e.text(this.countNum)}})}),s=1)}});s=0;o(window).scroll(function(){if(o(" .chiffres-cles").length){var e=o(".wrapper-chiffres-cles").offset().top-window.innerHeight;0==s&&o(window).scrollTop()>e&&(o(".number, .num").each(function(){var e=o(this),s=e.attr("data-count");o({countNum:e.text()}).animate({countNum:s},{duration:2e3,easing:"swing",step:function(){e.text(Math.floor(this.countNum))},complete:function(){e.text(this.countNum)}})}),s=1)}}),o(".chiffres-cles .title-accordion-section").click(function(e){(s=0)==s&&(o(".number, .num").each(function(){var e=o(this),s=e.attr("data-count");o({countNum:e.text()}).animate({countNum:s},{duration:2e3,easing:"swing",step:function(){e.text(Math.floor(this.countNum))},complete:function(){e.text(this.countNum)}})}),s=1)})}(jQuery);
368
369;
370/*! jQuery Validation Plugin - v1.15.0 - 2/24/2016
371 * http://jqueryvalidation.org/
372 * Copyright (c) 2016 Jörn Zaefferer; Licensed MIT */
373!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,b||(d=d.concat(c.errorList))}),c.errorList=d),b},rules:function(b,c){if(this.length){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){var c=a(b).val();return null!==c&&!!a.trim(""+c)},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:void 0===c?b:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)}
vendor: 4,443 bytes, line 373
373,a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b.name in this.invalid)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}."),step:a.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable]",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c,d,e=this.clean(b),f=this.validationTargetFor(e),g=this,h=!0;return void 0===f?delete this.invalid[e.name]:(this.prepareElement(f),this.currentElements=a(f),d=this.groups[f.name],d&&a.each(this.groups,function(a,b){b===d&&a!==f.name&&(e=g.validationTargetFor(g.clean(g.findByName(a))),e&&e.name in g.invalid&&(g.currentElements.push(e),h=h&&g.check(e)))}),c=this.check(f)!==!1,h=h&&c,c?this.invalid[f.name]=!1:this.invalid[f.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers
373)),this.showErrors(),a(b).attr("aria-invalid",!c)),h},showErrors:function(b){if(b){var c=this;a.extend(this.errorMap,b),this.errorList=a.map(this.errorMap,function(a,b){return{message:a,element:c.findByName(b)[0]}}),this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var b=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(b)},resetElements:function(a){var b;if(this.settings.unhighlight)for(b=0;a[b];b++)this.settings.unhighlight.call(this,a[b],this.settings.errorClass,""),this.findByName(a[b].name).removeClass(this.settings.validClass);else a.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)a[b]&&c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var d=this.name||a(this).attr("name");return!d&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=a(this).closest("form")[0]),d in c||!b.objectLength(a(this).rules())?!1:(c[d]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([])},reset:function(){this.resetInternals(),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d,e=a(b),f=b.type;return"radio"===f||"checkbox"===f?this.findByName(b.name).filter(":checked").val():"number"===f&&"undefined"!=typeof b.validity?b.validity.badInput?"NaN":e.val():(c=b.hasAttribute("contenteditable")?e.text():e.val(),"file"===f?"C:\\fakepath\\"===c.substr(0,12)?c.substr(12):(d=c.lastIndexOf("/"),d>=0?c.substr(d+1):(d=c.lastIndexOf("\\"),d>=0?c.substr(d+1):c)):"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);if("function"==typeof f.normalizer){if(i=f.normalizer.call(b,i),"string"!=typeof i)throw new TypeError("The normalizer should return a string value.");delete f.normalizer}for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=".  Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a]},defaultMessage:function(b,c){var d=this.findDefined(this.customMessage(b.name,c.method),this.customDataMessage(b,c.method),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c.method],"<strong>Warning: No message defined for "+b.name+"</strong>"),e=/\$?\{(\d+)\}/g;return"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),d}
vendor: 1,882 bytes, line 373
373,formatAndAdd:function(a,b){var c=this.defaultMessage(a,b);this.errorList.push({message:c,element:a,method:b.method}),this.errorMap[a.name]=c,this.submitted[a.name]=c},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g,h=this.errorsFor(b),i=this.idOrName(b),j=a(b).attr("aria-describedby");h.length?(h.removeClass(this.settings.validClass).addClass(this.settings.errorClass),h.html(c)):(h=a("<"+this.settings.errorElement+">").attr("id",i+"-error").addClass(this.settings.errorClass).html(c||""),d=h,this.settings.wrapper&&(d=h.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),h.is("label")?h.attr("for",i):0===h.parents("label[for='"+this.escapeCssMeta(i)+"']").length&&(f=h.attr("id"),j?j.match(new RegExp("\\b"+this.escapeCssMeta(f)+"\\b"))||(j+=" "+f):j=f,a(b).attr("aria-describedby",j),e=this.groups[b.n
373ame],e&&(g=this,a.each(g.groups,function(b,c){c===e&&a("[name='"+g.escapeCssMeta(b)+"']",g.currentForm).attr("aria-describedby",h.attr("id"))})))),!c&&this.settings.success&&(h.text(""),"string"==typeof this.settings.success?h.addClass(this.settings.success):this.settings.success(h,b)),this.toShow=this.toShow.add(h)},errorsFor:function(b){var c=this.escapeCssMeta(this.idOrName(b)),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+this.escapeCssMeta(d).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(a){return a.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+this.escapeCssMeta(b)+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);
vendor: 5,697 bytes, line 373
373return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(b){this.pending[b.name]||(this.pendingRequest++,a(b).addClass(this.settings.pendingClass),this.pending[b.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],a(b).removeClass(this.settings.pendingClass),c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b,c){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,{method:c})})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max|step/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:(a.data(c.form,"validator").resetElements(a(c)),delete b[d])}}),a.each(b,function(d,e){b[d]=a.isFunction(e)&&"normalizer"!==d?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},step:function(b,c,d){var e=a(c).attr("type"),f="Step attribute on input type "+e+" is not supported.",g=["text","number","range"],h=new RegExp("\\b"+e+"\\b"),i=e&&!h.test(g.join());if(i)throw new Error(f);return this.optional(c)||b%d===0},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.not(".validate-equalTo-blur").length&&e.addClass("val
373idate-equalTo-blur").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d,e){if(this.optional(c))return"dependency-mismatch";e="string"==typeof e&&e||"remote";var f,g,h,i=this.previousValue(c,e);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),i.originalMessage=i.originalMessage||this.settings.messages[c.name][e],this.settings.messages[c.name][e]=i.message,d="string"==typeof d&&{url:d}||d,h=a.param(a.extend({data:b},d.data)),i.old===h?i.valid:(i.old=h,f=this,this.startRequest(c),g={},g[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:g,context:f.currentForm,success:function(a){var d,g,h,j=a===!0||"true"===a;f.settings.messages[c.name][e]=i.originalMessage,j?(h=f.formSubmitted,f.resetInternals(),f.toHide=f.errorsFor(c),f.formSubmitted=h,f.successList.push(c),f.invalid[c.name]=!1,f.showErrors()):(d={},g=a||f.defaultMessage(c,{method:e,parameters:b}),d[c.name]=i.message=g,f.invalid[c.name]=!0,f.showErrors(d)),i.valid=j,f.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});;
374/**
375 * @file
376 * pays_salers behaviors.
377 */
378
379(function ($, Drupal) {
380
381  'use strict';
382
383  /**
384   * Behavior description.
385   */
386  Drupal.behaviors.paysSalers = {
387    attach: function (context, settings) {
388
389    if (drupalSettings.path.currentLanguage == 'fr') {
390        $ = jQuery;
391        $.extend($.validator.messages, {
392            required: "Ce champ est obligatoire.",
393            remote: "Veuillez corriger ce champ.",
394            email: "Veuillez fournir une adresse électronique valide.",
395            regex_email: "Veuillez fournir une adresse électronique valide.",
396            regex_phone: "Veuillez fournir un numéro de téléphone valide.",
397            url: "Veuillez fournir une adresse URL valide.",
398            date: "Veuillez fournir une date valide.",
399            dateISO: "Veuillez fournir une date valide (ISO).",
400            number: "Veuillez fournir un numéro valide.",
401            digits: "Veuillez fournir seulement des chiffres.",
402            creditcard: "Veuillez fournir un numéro de carte de crédit valide.",
403            equalTo: "Veuillez fournir encore la même valeur.",
404            notEqualTo: "Veuillez fournir une valeur différente, les valeurs ne doivent pas être identiques.",
405            extension: "Veuillez fournir une valeur avec une extension valide.",
406            maxlength: $.validator.format("Veuillez fournir au plus {0} caractères."),
407            minlength: $.validator.format("Veuillez saisir au moins {0} caractères s'il vous plaît."),
408            rangelength: $.validator.format("Veuillez fournir une valeur qui contient entre {0} et {1} caractères."),
409            range: $.validator.format("Veuillez fournir une valeur entre {0} et {1}."),
410            max: $.validator.format("Veuillez fournir une valeur inférieure ou égale à {0}."),
411            min: $.validator.format("Veuillez fournir une valeur supérieure ou égale à {0}."),
412            step: $.validator.format("Veuillez fournir une valeur multiple de {0}."),
413            maxWords: $.validator.format("Veuillez fournir au plus {0} mots."),
414            minWords: $.validator.format("Veuillez fournir au moins {0} mots."),
415            rangeWords: $.validator.format("Veuillez fournir entre {0} et {1} mots."),
416            letterswithbasicpunc: "Veuillez fournir seulement des lettres et des signes de ponctuation.",
417            alphanumeric: "Veuillez fournir seulement des lettres, nombres, espaces et soulignages.",
418            lettersonly: "Veuillez fournir seulement des lettres.",
419            nowhitespace: "Veuillez ne pas inscrire d'espaces blancs.",
420            ziprange: "Veuillez fournir un code postal entre 902xx-xxxx et 905-xx-xxxx.",
421            integer: "Veuillez fournir un nombre non décimal qui est positif ou négatif.",
422            vinUS: "Veuillez fournir un numéro d'identification du véhicule (VIN).",
423            dateITA: "Veuillez fournir une date valide.",
424            time: "Veuillez fournir une heure valide entre 00:00 et 23:59.",
425            phoneUS: "Veuillez fournir un numéro de téléphone valide.",
426            phoneUK: "Veuillez fournir un numéro de téléphone valide.",
427            mobileUK: "Veuillez fournir un numéro de téléphone mobile valide.",
428            strippedminlength: $.validator.format("Veuillez fournir au moins {0} caractères."),
429            email2: "Veuillez fournir une adresse électronique valide.",
430            url2: "Veuillez fournir une adresse URL valide.",
431            creditcardtypes: "Veuillez fournir un numéro de carte de crédit valide.",
432            ipv4: "Veuillez fournir une adresse IP v4 valide.",
433            ipv6: "Veuillez fournir une adresse IP v6 valide.",
434            require_from_group: $.validator.format("Veuillez fournir au moins {0} de ces champs."),
435            nifES: "Veuillez fournir un numéro NIF valide.",
436            nieES: "Veuillez fournir un numéro NIE valide.",
437            cifES: "Veuillez fournir un numéro CIF valide.",
438            postalCodeCA: "Veuillez fournir un code postal valide."
439        });
440    }
441
442    jQuery.validator.addMethod("regex_email", function(value, element, regexp) {
443        if (regexp.constructor != RegExp)
444            regexp = new RegExp(regexp);
445        else if (regexp.global)
446            regexp.lastIndex = 0;
447        return this.optional(element) || regexp.test(value);
448    });
449
450    jQuery.validator.addMethod("regex_phone", function(value, element, regexp) {
451        if (regexp.constructor != RegExp)
452            regexp = new RegExp(regexp);
453        else if (regexp.global)
454            regexp.lastIndex = 0;
455        return this.optional(element) || regexp.test(value);
456    });
457
458    //  console.log('It works!');
459    if ((jQuery('#webform-submission-contact-node-10-add-form').length > 0)) {
460
461        jQuery("#webform-submission-contact-node-10-add-form").validate({
462            rules: {
463                'name': {
464                    required: true,
465                },
466                'prenom': {
467                    required: true,
468                },
469                'message': {
470                    required: true,
471                },
472                'telephone': {
473                    required: true,
474                    regex_phone : /[0-9]{10}/ 
475                },
476                'email': {
477                    email: true,
478                    required: true,
479                    regex_email: /^[._A-Za-z0-9-]+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/,
480                },
481                'consentement_et_rgpd': {
482                    required: true,
483                }
484            },
485            onfocusout: function(element) {
486                this.element(element);
487            },
488            submitHandler: function(form) {
489                form.submit();
490            },
491        });
492    }
493
494    if ((jQuery('#webform-submission-depot-d-affaires-node-22-add-form').length > 0)) {
495
496        jQuery("#webform-submission-depot-d-affaires-node-22-add-form").validate({
497            rules: {
498                'titre': {
499                    required: true,
500                },
501                'commune': {
502                    required: true,
503                },
504                'type_de_bien': {
505                    required: true,
506                },
507                'type': {
508                    required: true,
509                },
510                'prix': {
511                    number: true,
512                },
513                'contact': {
514                    email: true,
515                    regex_email: /^[._A-Za-z0-9-]+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/,
516                },
517                'consentement_et_rgpd': {
518                    required: true,
519                }
520            },
521            submitHandler: function(form) {
522                form.submit();
523            },
524        });
525    }
526    
527
528    jQuery("#search-block-form").validate({
529            rules: {
530                'keys': {
531                    required: true,
532                    minlength: 3
533                }
534            },
535            submitHandler: function(form) {
536                form.submit();
537            },
538        });
539      if ((jQuery('#views-exposed-form-main-recherche-page-1').length > 0)) {
540
541            jQuery("#views-exposed-form-main-recherche-page-1").validate({
542                    rules: {
543                        'keys': {
544                            required: true,
545                            minlength: 3
546                        }
547                    },
548                    submitHandler: function(form) {
549                        form.submit();
550                    },
551                });
552            }
553        }
554    };
555
556    jQuery(".c-wysiwyg table").each(function (index) {
557        if (typeof $(this).attr('align') != 'undefined'){
558            $(this).addClass($(this).attr('align'));
559        }
560    });
561
562} (jQuery, Drupal));
563;
564/*! Magnific Popup - v1.1.0 - 2016-02-20
vendor: 37,682 bytes, lines 565-2256
565* http://dimsemenov.com/plugins/magnific-popup/
566* Copyright (c) 2016 Dmitry Semenov; */
567;(function (factory) { 
568if (typeof define === 'function' && define.amd) { 
569 // AMD. Register as an anonymous module. 
570 define(['jquery'], factory); 
571 } else if (typeof exports === 'object') { 
572 // Node/CommonJS 
573 factory(require('jquery')); 
574 } else { 
575 // Browser globals 
576 factory(window.jQuery || window.Zepto); 
577 } 
578 }(function($) { 
579
580/*>>core*/
581/**
582 * 
583 * Magnific Popup Core JS file
584 * 
585 */
586
587
588/**
589 * Private static constants
590 */
591var CLOSE_EVENT = 'Close',
592	BEFORE_CLOSE_EVENT = 'BeforeClose',
593	AFTER_CLOSE_EVENT = 'AfterClose',
594	BEFORE_APPEND_EVENT = 'BeforeAppend',
595	MARKUP_PARSE_EVENT = 'MarkupParse',
596	OPEN_EVENT = 'Open',
597	CHANGE_EVENT = 'Change',
598	NS = 'mfp',
599	EVENT_NS = '.' + NS,
600	READY_CLASS = 'mfp-ready',
601	REMOVING_CLASS = 'mfp-removing',
602	PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
603
604
605/**
606 * Private vars 
607 */
608/*jshint -W079 */
609var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
610	MagnificPopup = function(){},
611	_isJQ = !!(window.jQuery),
612	_prevStatus,
613	_window = $(window),
614	_document,
615	_prevContentType,
616	_wrapClasses,
617	_currPopupType;
618
619
620/**
621 * Private functions
622 */
623var _mfpOn = function(name, f) {
624		mfp.ev.on(NS + name + EVENT_NS, f);
625	},
626	_getEl = function(className, appendTo, html, raw) {
627		var el = document.createElement('div');
628		el.className = 'mfp-'+className;
629		if(html) {
630			el.innerHTML = html;
631		}
632		if(!raw) {
633			el = $(el);
634			if(appendTo) {
635				el.appendTo(appendTo);
636			}
637		} else if(appendTo) {
638			appendTo.appendChild(el);
639		}
640		return el;
641	},
642	_mfpTrigger = function(e, data) {
643		mfp.ev.triggerHandler(NS + e, data);
644
645		if(mfp.st.callbacks) {
646			// converts "mfpEventName" to "eventName" callback and triggers it if it's present
647			e = e.charAt(0).toLowerCase() + e.slice(1);
648			if(mfp.st.callbacks[e]) {
649				mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
650			}
651		}
652	},
653	_getCloseBtn = function(type) {
654		if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
655			mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
656			_currPopupType = type;
657		}
658		return mfp.currTemplate.closeBtn;
659	},
660	// Initialize Magnific Popup only when called at least once
661	_checkInstance = function() {
662		if(!$.magnificPopup.instance) {
663			/*jshint -W020 */
664			mfp = new MagnificPopup();
665			mfp.init();
666			$.magnificPopup.instance = mfp;
667		}
668	},
669	// CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
670	supportsTransitions = function() {
671		var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
672			v = ['ms','O','Moz','Webkit']; // 'v' for vendor
673
674		if( s['transition'] !== undefined ) {
675			return true; 
676		}
677			
678		while( v.length ) {
679			if( v.pop() + 'Transition' in s ) {
680				return true;
681			}
682		}
683				
684		return false;
685	};
686
687
688
689/**
690 * Public functions
691 */
692MagnificPopup.prototype = {
693
694	constructor: MagnificPopup,
695
696	/**
697	 * Initializes Magnific Popup plugin. 
698	 * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
699	 */
700	init: function() {
701		var appVersion = navigator.appVersion;
702		mfp.isLowIE = mfp.isIE8 = document.all && !document.addEventListener;
703		mfp.isAndroid = (/android/gi).test(appVersion);
704		mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
705		mfp.supportsTransition = supportsTransitions();
706
707		// We disable fixed positioned lightbox on devices that don't handle it nicely.
708		// If you know a better way of detecting this - let me know.
709		mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
710		_document = $(document);
711
712		mfp.popupsCache = {};
713	},
714
715	/**
716	 * Opens popup
717	 * @param  data [description]
718	 */
719	open: function(data) {
720
721		var i;
722
723		if(data.isObj === false) { 
724			// convert jQuery collection to array to avoid conflicts later
725			mfp.items = data.items.toArray();
726
727			mfp.index = 0;
728			var items = data.items,
729				item;
730			for(i = 0; i < items.length; i++) {
731				item = items[i];
732				if(item.parsed) {
733					item = item.el[0];
734				}
735				if(item === data.el[0]) {
736					mfp.index = i;
737					break;
738				}
739			}
740		} else {
741			mfp.items = $.isArray(data.items) ? data.items : [data.items];
742			mfp.index = data.index || 0;
743		}
744
745		// if popup is already opened - we just update the content
746		if(mfp.isOpen) {
747			mfp.updateItemHTML();
748			return;
749		}
750		
751		mfp.types = []; 
752		_wrapClasses = '';
753		if(data.mainEl && data.mainEl.length) {
754			mfp.ev = data.mainEl.eq(0);
755		} else {
756			mfp.ev = _document;
757		}
758
759		if(data.key) {
760			if(!mfp.popupsCache[data.key]) {
761				mfp.popupsCache[data.key] = {};
762			}
763			mfp.currTemplate = mfp.popupsCache[data.key];
764		} else {
765			mfp.currTemplate = {};
766		}
767
768
769
770		mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data ); 
771		mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
772
773		if(mfp.st.modal) {
774			mfp.st.closeOnContentClick = false;
775			mfp.st.closeOnBgClick = false;
776			mfp.st.showCloseBtn = false;
777			mfp.st.enableEscapeKey = false;
778		}
779		
780
781		// Building markup
782		// main containers are created only once
783		if(!mfp.bgOverlay) {
784
785			// Dark overlay
786			mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
787				mfp.close();
788			});
789
790			mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
791				if(mfp._checkIfClose(e.target)) {
792					mfp.close();
793				}
794			});
795
796			mfp.container = _getEl('container', mfp.wrap);
797		}
798
799		mfp.contentContainer = _getEl('content');
800		if(mfp.st.preloader) {
801			mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
802		}
803
804
805		// Initializing modules
806		var modules = $.magnificPopup.modules;
807		for(i = 0; i < modules.length; i++) {
808			var n = modules[i];
809			n = n.charAt(0).toUpperCase() + n.slice(1);
810			mfp['init'+n].call(mfp);
811		}
812		_mfpTrigger('BeforeOpen');
813
814
815		if(mfp.st.showCloseBtn) {
816			// Close button
817			if(!mfp.st.closeBtnInside) {
818				mfp.wrap.append( _getCloseBtn() );
819			} else {
820				_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
821					values.close_replaceWith = _getCloseBtn(item.type);
822				});
823				_wrapClasses += ' mfp-close-btn-in';
824			}
825		}
826
827		if(mfp.st.alignTop) {
828			_wrapClasses += ' mfp-align-top';
829		}
830
831	
832
833		if(mfp.fixedContentPos) {
834			mfp.wrap.css({
835				overflow: mfp.st.overflowY,
836				overflowX: 'hidden',
837				overflowY: mfp.st.overflowY
838			});
839		} else {
840			mfp.wrap.css({ 
841				top: _window.scrollTop(),
842				position: 'absolute'
843			});
844		}
845		if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
846			mfp.bgOverlay.css({
847				height: _document.height(),
848				position: 'absolute'
849			});
850		}
851
852		
853
854		if(mfp.st.enableEscapeKey) {
855			// Close on ESC key
856			_document.on('keyup' + EVENT_NS, function(e) {
857				if(e.keyCode === 27) {
858					mfp.close();
859				}
860			});
861		}
862
863		_window.on('resize' + EVENT_NS, function() {
864			mfp.updateSize();
865		});
866
867
868		if(!mfp.st.closeOnContentClick) {
869			_wrapClasses += ' mfp-auto-cursor';
870		}
871		
872		if(_wrapClasses)
873			mfp.wrap.addClass(_wrapClasses);
874
875
876		// this triggers recalculation of layout, so we get it once to not to trigger twice
877		var windowHeight = mfp.wH = _window.height();
878
879		
880		var windowStyles = {};
881
882		if( mfp.fixedContentPos ) {
883            if(mfp._hasScrollBar(windowHeight)){
884                var s = mfp._getScrollbarSize();
885                if(s) {
886                    windowStyles.marginRight = s;
887                }
888            }
889        }
890
891		if(mfp.fixedContentPos) {
892			if(!mfp.isIE7) {
893				windowStyles.overflow = 'hidden';
894			} else {
895				// ie7 double-scroll bug
896				$('body, html').css('overflow', 'hidden');
897			}
898		}
899
900		
901		
902		var classesToadd = mfp.st.mainClass;
903		if(mfp.isIE7) {
904			classesToadd += ' mfp-ie7';
905		}
906		if(classesToadd) {
907			mfp._addClassToMFP( classesToadd );
908		}
909
910		// add content
911		mfp.updateItemHTML();
912
913		_mfpTrigger('BuildControls');
914
915		// remove scrollbar, add margin e.t.c
916		$('html').css(windowStyles);
917		
918		// add everything to DOM
919		mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );
920
921		// Save last focused element
922		mfp._lastFocusedEl = document.activeElement;
923		
924		// Wait for next cycle to allow CSS transition
925		setTimeout(function() {
926			
927			if(mfp.content) {
928				mfp._addClassToMFP(READY_CLASS);
929				mfp._setFocus();
930			} else {
931				// if content is not defined (not loaded e.t.c) we add class only for BG
932				mfp.bgOverlay.addClass(READY_CLASS);
933			}
934			
935			// Trap the focus in popup
936			_document.on('focusin' + EVENT_NS, mfp._onFocusIn);
937
938		}, 16);
939
940		mfp.isOpen = true;
941		mfp.updateSize(windowHeight);
942		_mfpTrigger(OPEN_EVENT);
943
944		return data;
945	},
946
947	/**
948	 * Closes the popup
949	 */
950	close: function() {
951		if(!mfp.isOpen) return;
952		_mfpTrigger(BEFORE_CLOSE_EVENT);
953
954		mfp.isOpen = false;
955		// for CSS3 animation
956		if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition )  {
957			mfp._addClassToMFP(REMOVING_CLASS);
958			setTimeout(function() {
959				mfp._close();
960			}, mfp.st.removalDelay);
961		} else {
962			mfp._close();
963		}
964	},
965
966	/**
967	 * Helper for close() function
968	 */
969	_close: function() {
970		_mfpTrigger(CLOSE_EVENT);
971
972		var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
973
974		mfp.bgOverlay.detach();
975		mfp.wrap.detach();
976		mfp.container.empty();
977
978		if(mfp.st.mainClass) {
979			classesToRemove += mfp.st.mainClass + ' ';
980		}
981
982		mfp._removeClassFromMFP(classesToRemove);
983
984		if(mfp.fixedContentPos) {
985			var windowStyles = {marginRight: ''};
986			if(mfp.isIE7) {
987				$('body, html').css('overflow', '');
988			} else {
989				windowStyles.overflow = '';
990			}
991			$('html').css(windowStyles);
992		}
993		
994		_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
995		mfp.ev.off(EVENT_NS);
996
997		// clean up DOM elements that aren't removed
998		mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
999		mfp.bgOverlay.attr('class', 'mfp-bg');
1000		mfp.container.attr('class', 'mfp-container');
1001
1002		// remove close button from target element
1003		if(mfp.st.showCloseBtn &&
1004		(!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
1005			if(mfp.currTemplate.closeBtn)
1006				mfp.currTemplate.closeBtn.detach();
1007		}
1008
1009
1010		if(mfp.st.autoFocusLast && mfp._lastFocusedEl) {
1011			$(mfp._lastFocusedEl).focus(); // put tab focus back
1012		}
1013		mfp.currItem = null;	
1014		mfp.content = null;
1015		mfp.currTemplate = null;
1016		mfp.prevHeight = 0;
1017
1018		_mfpTrigger(AFTER_CLOSE_EVENT);
1019	},
1020	
1021	updateSize: function(winHeight) {
1022
1023		if(mfp.isIOS) {
1024			// fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
1025			var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
1026			var height = window.innerHeight * zoomLevel;
1027			mfp.wrap.css('height', height);
1028			mfp.wH = height;
1029		} else {
1030			mfp.wH = winHeight || _window.height();
1031		}
1032		// Fixes #84: popup incorrectly positioned with position:relative on body
1033		if(!mfp.fixedContentPos) {
1034			mfp.wrap.css('height', mfp.wH);
1035		}
1036
1037		_mfpTrigger('Resize');
1038
1039	},
1040
1041	/**
1042	 * Set content of popup based on current index
1043	 */
1044	updateItemHTML: function() {
1045		var item = mfp.items[mfp.index];
1046
1047		// Detach and perform modifications
1048		mfp.contentContainer.detach();
1049
1050		if(mfp.content)
1051			mfp.content.detach();
1052
1053		if(!item.parsed) {
1054			item = mfp.parseEl( mfp.index );
1055		}
1056
1057		var type = item.type;
1058
1059		_mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
1060		// BeforeChange event works like so:
1061		// _mfpOn('BeforeChange', function(e, prevType, newType) { });
1062
1063		mfp.currItem = item;
1064
1065		if(!mfp.currTemplate[type]) {
1066			var markup = mfp.st[type] ? mfp.st[type].markup : false;
1067
1068			// allows to modify markup
1069			_mfpTrigger('FirstMarkupParse', markup);
1070
1071			if(markup) {
1072				mfp.currTemplate[type] = $(markup);
1073			} else {
1074				// if there is no markup found we just define that template is parsed
1075				mfp.currTemplate[type] = true;
1076			}
1077		}
1078
1079		if(_prevContentType && _prevContentType !== item.type) {
1080			mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
1081		}
1082
1083		var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
1084		mfp.appendContent(newContent, type);
1085
1086		item.preloaded = true;
1087
1088		_mfpTrigger(CHANGE_EVENT, item);
1089		_prevContentType = item.type;
1090
1091		// Append container back after its content changed
1092		mfp.container.prepend(mfp.contentContainer);
1093
1094		_mfpTrigger('AfterChange');
1095	},
1096
1097
1098	/**
1099	 * Set HTML content of popup
1100	 */
1101	appendContent: function(newContent, type) {
1102		mfp.content = newContent;
1103
1104		if(newContent) {
1105			if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
1106				mfp.currTemplate[type] === true) {
1107				// if there is no markup, we just append close button element inside
1108				if(!mfp.content.find('.mfp-close').length) {
1109					mfp.content.append(_getCloseBtn());
1110				}
1111			} else {
1112				mfp.content = newContent;
1113			}
1114		} else {
1115			mfp.content = '';
1116		}
1117
1118		_mfpTrigger(BEFORE_APPEND_EVENT);
1119		mfp.container.addClass('mfp-'+type+'-holder');
1120
1121		mfp.contentContainer.append(mfp.content);
1122	},
1123
1124
1125	/**
1126	 * Creates Magnific Popup data object based on given data
1127	 * @param  {int} index Index of item to parse
1128	 */
1129	parseEl: function(index) {
1130		var item = mfp.items[index],
1131			type;
1132
1133		if(item.tagName) {
1134			item = { el: $(item) };
1135		} else {
1136			type = item.type;
1137			item = { data: item, src: item.src };
1138		}
1139
1140		if(item.el) {
1141			var types = mfp.types;
1142
1143			// check for 'mfp-TYPE' class
1144			for(var i = 0; i < types.length; i++) {
1145				if( item.el.hasClass('mfp-'+types[i]) ) {
1146					type = types[i];
1147					break;
1148				}
1149			}
1150
1151			item.src = item.el.attr('data-mfp-src');
1152			if(!item.src) {
1153				item.src = item.el.attr('href');
1154			}
1155		}
1156
1157		item.type = type || mfp.st.type || 'inline';
1158		item.index = index;
1159		item.parsed = true;
1160		mfp.items[index] = item;
1161		_mfpTrigger('ElementParse', item);
1162
1163		return mfp.items[index];
1164	},
1165
1166
1167	/**
1168	 * Initializes single popup or a group of popups
1169	 */
1170	addGroup: function(el, options) {
1171		var eHandler = function(e) {
1172			e.mfpEl = this;
1173			mfp._openClick(e, el, options);
1174		};
1175
1176		if(!options) {
1177			options = {};
1178		}
1179
1180		var eName = 'click.magnificPopup';
1181		options.mainEl = el;
1182
1183		if(options.items) {
1184			options.isObj = true;
1185			el.off(eName).on(eName, eHandler);
1186		} else {
1187			options.isObj = false;
1188			if(options.delegate) {
1189				el.off(eName).on(eName, options.delegate , eHandler);
1190			} else {
1191				options.items = el;
1192				el.off(eName).on(eName, eHandler);
1193			}
1194		}
1195	},
1196	_openClick: function(e, el, options) {
1197		var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
1198
1199
1200		if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey ) ) {
1201			return;
1202		}
1203
1204		var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
1205
1206		if(disableOn) {
1207			if($.isFunction(disableOn)) {
1208				if( !disableOn.call(mfp) ) {
1209					return true;
1210				}
1211			} else { // else it's number
1212				if( _window.width() < disableOn ) {
1213					return true;
1214				}
1215			}
1216		}
1217
1218		if(e.type) {
1219			e.preventDefault();
1220
1221			// This will prevent popup from closing if element is inside and popup is already opened
1222			if(mfp.isOpen) {
1223				e.stopPropagation();
1224			}
1225		}
1226
1227		options.el = $(e.mfpEl);
1228		if(options.delegate) {
1229			options.items = el.find(options.delegate);
1230		}
1231		mfp.open(options);
1232	},
1233
1234
1235	/**
1236	 * Updates text on preloader
1237	 */
1238	updateStatus: function(status, text) {
1239
1240		if(mfp.preloader) {
1241			if(_prevStatus !== status) {
1242				mfp.container.removeClass('mfp-s-'+_prevStatus);
1243			}
1244
1245			if(!text && status === 'loading') {
1246				text = mfp.st.tLoading;
1247			}
1248
1249			var data = {
1250				status: status,
1251				text: text
1252			};
1253			// allows to modify status
1254			_mfpTrigger('UpdateStatus', data);
1255
1256			status = data.status;
1257			text = data.text;
1258
1259			mfp.preloader.html(text);
1260
1261			mfp.preloader.find('a').on('click', function(e) {
1262				e.stopImmediatePropagation();
1263			});
1264
1265			mfp.container.addClass('mfp-s-'+status);
1266			_prevStatus = status;
1267		}
1268	},
1269
1270
1271	/*
1272		"Private" helpers that aren't private at all
1273	 */
1274	// Check to close popup or not
1275	// "target" is an element that was clicked
1276	_checkIfClose: function(target) {
1277
1278		if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
1279			return;
1280		}
1281
1282		var closeOnContent = mfp.st.closeOnContentClick;
1283		var closeOnBg = mfp.st.closeOnBgClick;
1284
1285		if(closeOnContent && closeOnBg) {
1286			return true;
1287		} else {
1288
1289			// We close the popup if click is on close button or on preloader. Or if there is no content.
1290			if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
1291				return true;
1292			}
1293
1294			// if click is outside the content
1295			if(  (target !== mfp.content[0] && !$.contains(mfp.content[0], target))  ) {
1296				if(closeOnBg) {
1297					// last check, if the clicked element is in DOM, (in case it's removed onclick)
1298					if( $.contains(document, target) ) {
1299						return true;
1300					}
1301				}
1302			} else if(closeOnContent) {
1303				return true;
1304			}
1305
1306		}
1307		return false;
1308	},
1309	_addClassToMFP: function(cName) {
1310		mfp.bgOverlay.addClass(cName);
1311		mfp.wrap.addClass(cName);
1312	},
1313	_removeClassFromMFP: function(cName) {
1314		this.bgOverlay.removeClass(cName);
1315		mfp.wrap.removeClass(cName);
1316	},
1317	_hasScrollBar: function(winHeight) {
1318		return (  (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
1319	},
1320	_setFocus: function() {
1321		(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
1322	},
1323	_onFocusIn: function(e) {
1324		if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
1325			mfp._setFocus();
1326			return false;
1327		}
1328	},
1329	_parseMarkup: function(template, values, item) {
1330		var arr;
1331		if(item.data) {
1332			values = $.extend(item.data, values);
1333		}
1334		_mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
1335
1336		$.each(values, function(key, value) {
1337			if(value === undefined || value === false) {
1338				return true;
1339			}
1340			arr = key.split('_');
1341			if(arr.length > 1) {
1342				var el = template.find(EVENT_NS + '-'+arr[0]);
1343
1344				if(el.length > 0) {
1345					var attr = arr[1];
1346					if(attr === 'replaceWith') {
1347						if(el[0] !== value[0]) {
1348							el.replaceWith(value);
1349						}
1350					} else if(attr === 'img') {
1351						if(el.is('img')) {
1352							el.attr('src', value);
1353						} else {
1354							el.replaceWith( $('<img>').attr('src', value).attr('class', el.attr('class')) );
1355						}
1356					} else {
1357						el.attr(arr[1], value);
1358					}
1359				}
1360
1361			} else {
1362				template.find(EVENT_NS + '-'+key).html(value);
1363			}
1364		});
1365	},
1366
1367	_getScrollbarSize: function() {
1368		// thx David
1369		if(mfp.scrollbarSize === undefined) {
1370			var scrollDiv = document.createElement("div");
1371			scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
1372			document.body.appendChild(scrollDiv);
1373			mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
1374			document.body.removeChild(scrollDiv);
1375		}
1376		return mfp.scrollbarSize;
1377	}
1378
1379}; /* MagnificPopup core prototype end */
1380
1381
1382
1383
1384/**
1385 * Public static functions
1386 */
1387$.magnificPopup = {
1388	instance: null,
1389	proto: MagnificPopup.prototype,
1390	modules: [],
1391
1392	open: function(options, index) {
1393		_checkInstance();
1394
1395		if(!options) {
1396			options = {};
1397		} else {
1398			options = $.extend(true, {}, options);
1399		}
1400
1401		options.isObj = true;
1402		options.index = index || 0;
1403		return this.instance.open(options);
1404	},
1405
1406	close: function() {
1407		return $.magnificPopup.instance && $.magnificPopup.instance.close();
1408	},
1409
1410	registerModule: function(name, module) {
1411		if(module.options) {
1412			$.magnificPopup.defaults[name] = module.options;
1413		}
1414		$.extend(this.proto, module.proto);
1415		this.modules.push(name);
1416	},
1417
1418	defaults: {
1419
1420		// Info about options is in docs:
1421		// http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
1422
1423		disableOn: 0,
1424
1425		key: null,
1426
1427		midClick: false,
1428
1429		mainClass: '',
1430
1431		preloader: true,
1432
1433		focus: '', // CSS selector of input to focus after popup is opened
1434
1435		closeOnContentClick: false,
1436
1437		closeOnBgClick: true,
1438
1439		closeBtnInside: true,
1440
1441		showCloseBtn: true,
1442
1443		enableEscapeKey: true,
1444
1445		modal: false,
1446
1447		alignTop: false,
1448
1449		removalDelay: 0,
1450
1451		prependTo: null,
1452
1453		fixedContentPos: 'auto',
1454
1455		fixedBgPos: 'auto',
1456
1457		overflowY: 'auto',
1458
1459		closeMarkup: '<button title="%title%" type="button" class="mfp-close">&#215;</button>',
1460
1461		tClose: 'Close (Esc)',
1462
1463		tLoading: 'Loading...',
1464
1465		autoFocusLast: true
1466
1467	}
1468};
1469
1470
1471
1472$.fn.magnificPopup = function(options) {
1473	_checkInstance();
1474
1475	var jqEl = $(this);
1476
1477	// We call some API method of first param is a string
1478	if (typeof options === "string" ) {
1479
1480		if(options === 'open') {
1481			var items,
1482				itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
1483				index = parseInt(arguments[1], 10) || 0;
1484
1485			if(itemOpts.items) {
1486				items = itemOpts.items[index];
1487			} else {
1488				items = jqEl;
1489				if(itemOpts.delegate) {
1490					items = items.find(itemOpts.delegate);
1491				}
1492				items = items.eq( index );
1493			}
1494			mfp._openClick({mfpEl:items}, jqEl, itemOpts);
1495		} else {
1496			if(mfp.isOpen)
1497				mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
1498		}
1499
1500	} else {
1501		// clone options obj
1502		options = $.extend(true, {}, options);
1503
1504		/*
1505		 * As Zepto doesn't support .data() method for objects
1506		 * and it works only in normal browsers
1507		 * we assign "options" object directly to the DOM element. FTW!
1508		 */
1509		if(_isJQ) {
1510			jqEl.data('magnificPopup', options);
1511		} else {
1512			jqEl[0].magnificPopup = options;
1513		}
1514
1515		mfp.addGroup(jqEl, options);
1516
1517	}
1518	return jqEl;
1519};
1520
1521/*>>core*/
1522
1523/*>>inline*/
1524
1525var INLINE_NS = 'inline',
1526	_hiddenClass,
1527	_inlinePlaceholder,
1528	_lastInlineElement,
1529	_putInlineElementsBack = function() {
1530		if(_lastInlineElement) {
1531			_inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
1532			_lastInlineElement = null;
1533		}
1534	};
1535
1536$.magnificPopup.registerModule(INLINE_NS, {
1537	options: {
1538		hiddenClass: 'hide', // will be appended with `mfp-` prefix
1539		markup: '',
1540		tNotFound: 'Content not found'
1541	},
1542	proto: {
1543
1544		initInline: function() {
1545			mfp.types.push(INLINE_NS);
1546
1547			_mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
1548				_putInlineElementsBack();
1549			});
1550		},
1551
1552		getInline: function(item, template) {
1553
1554			_putInlineElementsBack();
1555
1556			if(item.src) {
1557				var inlineSt = mfp.st.inline,
1558					el = $(item.src);
1559
1560				if(el.length) {
1561
1562					// If target element has parent - we replace it with placeholder and put it back after popup is closed
1563					var parent = el[0].parentNode;
1564					if(parent && parent.tagName) {
1565						if(!_inlinePlaceholder) {
1566							_hiddenClass = inlineSt.hiddenClass;
1567							_inlinePlaceholder = _getEl(_hiddenClass);
1568							_hiddenClass = 'mfp-'+_hiddenClass;
1569						}
1570						// replace target inline element with placeholder
1571						_lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
1572					}
1573
1574					mfp.updateStatus('ready');
1575				} else {
1576					mfp.updateStatus('error', inlineSt.tNotFound);
1577					el = $('<div>');
1578				}
1579
1580				item.inlineElement = el;
1581				return el;
1582			}
1583
1584			mfp.updateStatus('ready');
1585			mfp._parseMarkup(template, {}, item);
1586			return template;
1587		}
1588	}
1589});
1590
1591/*>>inline*/
1592
1593/*>>ajax*/
1594var AJAX_NS = 'ajax',
1595	_ajaxCur,
1596	_removeAjaxCursor = function() {
1597		if(_ajaxCur) {
1598			$(document.body).removeClass(_ajaxCur);
1599		}
1600	},
1601	_destroyAjaxRequest = function() {
1602		_removeAjaxCursor();
1603		if(mfp.req) {
1604			mfp.req.abort();
1605		}
1606	};
1607
1608$.magnificPopup.registerModule(AJAX_NS, {
1609
1610	options: {
1611		settings: null,
1612		cursor: 'mfp-ajax-cur',
1613		tError: '<a href="%url%">The content</a> could not be loaded.'
1614	},
1615
1616	proto: {
1617		initAjax: function() {
1618			mfp.types.push(AJAX_NS);
1619			_ajaxCur = mfp.st.ajax.cursor;
1620
1621			_mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
1622			_mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
1623		},
1624		getAjax: function(item) {
1625
1626			if(_ajaxCur) {
1627				$(document.body).addClass(_ajaxCur);
1628			}
1629
1630			mfp.updateStatus('loading');
1631
1632			var opts = $.extend({
1633				url: item.src,
1634				success: function(data, textStatus, jqXHR) {
1635					var temp = {
1636						data:data,
1637						xhr:jqXHR
1638					};
1639
1640					_mfpTrigger('ParseAjax', temp);
1641
1642					mfp.appendContent( $(temp.data), AJAX_NS );
1643
1644					item.finished = true;
1645
1646					_removeAjaxCursor();
1647
1648					mfp._setFocus();
1649
1650					setTimeout(function() {
1651						mfp.wrap.addClass(READY_CLASS);
1652					}, 16);
1653
1654					mfp.updateStatus('ready');
1655
1656					_mfpTrigger('AjaxContentAdded');
1657				},
1658				error: function() {
1659					_removeAjaxCursor();
1660					item.finished = item.loadError = true;
1661					mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
1662				}
1663			}, mfp.st.ajax.settings);
1664
1665			mfp.req = $.ajax(opts);
1666
1667			return '';
1668		}
1669	}
1670});
1671
1672/*>>ajax*/
1673
1674/*>>image*/
1675var _imgInterval,
1676	_getTitle = function(item) {
1677		if(item.data && item.data.title !== undefined)
1678			return item.data.title;
1679
1680		var src = mfp.st.image.titleSrc;
1681
1682		if(src) {
1683			if($.isFunction(src)) {
1684				return src.call(mfp, item);
1685			} else if(item.el) {
1686				return item.el.attr(src) || '';
1687			}
1688		}
1689		return '';
1690	};
1691
1692$.magnificPopup.registerModule('image', {
1693
1694	options: {
1695		markup: '<div class="mfp-figure">'+
1696					'<div class="mfp-close"></div>'+
1697					'<figure>'+
1698						'<div class="mfp-img"></div>'+
1699						'<figcaption>'+
1700							'<div class="mfp-bottom-bar">'+
1701								'<div class="mfp-title"></div>'+
1702								'<div class="mfp-counter"></div>'+
1703							'</div>'+
1704						'</figcaption>'+
1705					'</figure>'+
1706				'</div>',
1707		cursor: 'mfp-zoom-out-cur',
1708		titleSrc: 'title',
1709		verticalFit: true,
1710		tError: '<a href="%url%">The image</a> could not be loaded.'
1711	},
1712
1713	proto: {
1714		initImage: function() {
1715			var imgSt = mfp.st.image,
1716				ns = '.image';
1717
1718			mfp.types.push('image');
1719
1720			_mfpOn(OPEN_EVENT+ns, function() {
1721				if(mfp.currItem.type === 'image' && imgSt.cursor) {
1722					$(document.body).addClass(imgSt.cursor);
1723				}
1724			});
1725
1726			_mfpOn(CLOSE_EVENT+ns, function() {
1727				if(imgSt.cursor) {
1728					$(document.body).removeClass(imgSt.cursor);
1729				}
1730				_window.off('resize' + EVENT_NS);
1731			});
1732
1733			_mfpOn('Resize'+ns, mfp.resizeImage);
1734			if(mfp.isLowIE) {
1735				_mfpOn('AfterChange', mfp.resizeImage);
1736			}
1737		},
1738		resizeImage: function() {
1739			var item = mfp.currItem;
1740			if(!item || !item.img) return;
1741
1742			if(mfp.st.image.verticalFit) {
1743				var decr = 0;
1744				// fix box-sizing in ie7/8
1745				if(mfp.isLowIE) {
1746					decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
1747				}
1748				item.img.css('max-height', mfp.wH-decr);
1749			}
1750		},
1751		_onImageHasSize: function(item) {
1752			if(item.img) {
1753
1754				item.hasSize = true;
1755
1756				if(_imgInterval) {
1757					clearInterval(_imgInterval);
1758				}
1759
1760				item.isCheckingImgSize = false;
1761
1762				_mfpTrigger('ImageHasSize', item);
1763
1764				if(item.imgHidden) {
1765					if(mfp.content)
1766						mfp.content.removeClass('mfp-loading');
1767
1768					item.imgHidden = false;
1769				}
1770
1771			}
1772		},
1773
1774		/**
1775		 * Function that loops until the image has size to display elements that rely on it asap
1776		 */
1777		findImageSize: function(item) {
1778
1779			var counter = 0,
1780				img = item.img[0],
1781				mfpSetInterval = function(delay) {
1782
1783					if(_imgInterval) {
1784						clearInterval(_imgInterval);
1785					}
1786					// decelerating interval that checks for size of an image
1787					_imgInterval = setInterval(function() {
1788						if(img.naturalWidth > 0) {
1789							mfp._onImageHasSize(item);
1790							return;
1791						}
1792
1793						if(counter > 200) {
1794							clearInterval(_imgInterval);
1795						}
1796
1797						counter++;
1798						if(counter === 3) {
1799							mfpSetInterval(10);
1800						} else if(counter === 40) {
1801							mfpSetInterval(50);
1802						} else if(counter === 100) {
1803							mfpSetInterval(500);
1804						}
1805					}, delay);
1806				};
1807
1808			mfpSetInterval(1);
1809		},
1810
1811		getImage: function(item, template) {
1812
1813			var guard = 0,
1814
1815				// image load complete handler
1816				onLoadComplete = function() {
1817					if(item) {
1818						if (item.img[0].complete) {
1819							item.img.off('.mfploader');
1820
1821							if(item === mfp.currItem){
1822								mfp._onImageHasSize(item);
1823
1824								mfp.updateStatus('ready');
1825							}
1826
1827							item.hasSize = true;
1828							item.loaded = true;
1829
1830							_mfpTrigger('ImageLoadComplete');
1831
1832						}
1833						else {
1834							// if image complete check fails 200 times (20 sec), we assume that there was an error.
1835							guard++;
1836							if(guard < 200) {
1837								setTimeout(onLoadComplete,100);
1838							} else {
1839								onLoadError();
1840							}
1841						}
1842					}
1843				},
1844
1845				// image error handler
1846				onLoadError = function() {
1847					if(item) {
1848						item.img.off('.mfploader');
1849						if(item === mfp.currItem){
1850							mfp._onImageHasSize(item);
1851							mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1852						}
1853
1854						item.hasSize = true;
1855						item.loaded = true;
1856						item.loadError = true;
1857					}
1858				},
1859				imgSt = mfp.st.image;
1860
1861
1862			var el = template.find('.mfp-img');
1863			if(el.length) {
1864				var img = document.createElement('img');
1865				img.className = 'mfp-img';
1866				if(item.el && item.el.find('img').length) {
1867					img.alt = item.el.find('img').attr('alt');
1868				}
1869				item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
1870				img.src = item.src;
1871
1872				// without clone() "error" event is not firing when IMG is replaced by new IMG
1873				// TODO: find a way to avoid such cloning
1874				if(el.is('img')) {
1875					item.img = item.img.clone();
1876				}
1877
1878				img = item.img[0];
1879				if(img.naturalWidth > 0) {
1880					item.hasSize = true;
1881				} else if(!img.width) {
1882					item.hasSize = false;
1883				}
1884			}
1885
1886			mfp._parseMarkup(template, {
1887				title: _getTitle(item),
1888				img_replaceWith: item.img
1889			}, item);
1890
1891			mfp.resizeImage();
1892
1893			if(item.hasSize) {
1894				if(_imgInterval) clearInterval(_imgInterval);
1895
1896				if(item.loadError) {
1897					template.addClass('mfp-loading');
1898					mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
1899				} else {
1900					template.removeClass('mfp-loading');
1901					mfp.updateStatus('ready');
1902				}
1903				return template;
1904			}
1905
1906			mfp.updateStatus('loading');
1907			item.loading = true;
1908
1909			if(!item.hasSize) {
1910				item.imgHidden = true;
1911				template.addClass('mfp-loading');
1912				mfp.findImageSize(item);
1913			}
1914
1915			return template;
1916		}
1917	}
1918});
1919
1920/*>>image*/
1921
1922/*>>zoom*/
1923var hasMozTransform,
1924	getHasMozTransform = function() {
1925		if(hasMozTransform === undefined) {
1926			hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
1927		}
1928		return hasMozTransform;
1929	};
1930
1931$.magnificPopup.registerModule('zoom', {
1932
1933	options: {
1934		enabled: false,
1935		easing: 'ease-in-out',
1936		duration: 300,
1937		opener: function(element) {
1938			return element.is('img') ? element : element.find('img');
1939		}
1940	},
1941
1942	proto: {
1943
1944		initZoom: function() {
1945			var zoomSt = mfp.st.zoom,
1946				ns = '.zoom',
1947				image;
1948
1949			if(!zoomSt.enabled || !mfp.supportsTransition) {
1950				return;
1951			}
1952
1953			var duration = zoomSt.duration,
1954				getElToAnimate = function(image) {
1955					var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
1956						transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
1957						cssObj = {
1958							position: 'fixed',
1959							zIndex: 9999,
1960							left: 0,
1961							top: 0,
1962							'-webkit-backface-visibility': 'hidden'
1963						},
1964						t = 'transition';
1965
1966					cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
1967
1968					newImg.css(cssObj);
1969					return newImg;
1970				},
1971				showMainContent = function() {
1972					mfp.content.css('visibility', 'visible');
1973				},
1974				openTimeout,
1975				animatedImg;
1976
1977			_mfpOn('BuildControls'+ns, function() {
1978				if(mfp._allowZoom()) {
1979
1980					clearTimeout(openTimeout);
1981					mfp.content.css('visibility', 'hidden');
1982
1983					// Basically, all code below does is clones existing image, puts in on top of the current one and animated it
1984
1985					image = mfp._getItemToZoom();
1986
1987					if(!image) {
1988						showMainContent();
1989						return;
1990					}
1991
1992					animatedImg = getElToAnimate(image);
1993
1994					animatedImg.css( mfp._getOffset() );
1995
1996					mfp.wrap.append(animatedImg);
1997
1998					openTimeout = setTimeout(function() {
1999						animatedImg.css( mfp._getOffset( true ) );
2000						openTimeout = setTimeout(function() {
2001
2002							showMainContent();
2003
2004							setTimeout(function() {
2005								animatedImg.remove();
2006								image = animatedImg = null;
2007								_mfpTrigger('ZoomAnimationEnded');
2008							}, 16); // avoid blink when switching images
2009
2010						}, duration); // this timeout equals animation duration
2011
2012					}, 16); // by adding this timeout we avoid short glitch at the beginning of animation
2013
2014
2015					// Lots of timeouts...
2016				}
2017			});
2018			_mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
2019				if(mfp._allowZoom()) {
2020
2021					clearTimeout(openTimeout);
2022
2023					mfp.st.removalDelay = duration;
2024
2025					if(!image) {
2026						image = mfp._getItemToZoom();
2027						if(!image) {
2028							return;
2029						}
2030						animatedImg = getElToAnimate(image);
2031					}
2032
2033					animatedImg.css( mfp._getOffset(true) );
2034					mfp.wrap.append(animatedImg);
2035					mfp.content.css('visibility', 'hidden');
2036
2037					setTimeout(function() {
2038						animatedImg.css( mfp._getOffset() );
2039					}, 16);
2040				}
2041
2042			});
2043
2044			_mfpOn(CLOSE_EVENT+ns, function() {
2045				if(mfp._allowZoom()) {
2046					showMainContent();
2047					if(animatedImg) {
2048						animatedImg.remove();
2049					}
2050					image = null;
2051				}
2052			});
2053		},
2054
2055		_allowZoom: function() {
2056			return mfp.currItem.type === 'image';
2057		},
2058
2059		_getItemToZoom: function() {
2060			if(mfp.currItem.hasSize) {
2061				return mfp.currItem.img;
2062			} else {
2063				return false;
2064			}
2065		},
2066
2067		// Get element postion relative to viewport
2068		_getOffset: function(isLarge) {
2069			var el;
2070			if(isLarge) {
2071				el = mfp.currItem.img;
2072			} else {
2073				el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
2074			}
2075
2076			var offset = el.offset();
2077			var paddingTop = parseInt(el.css('padding-top'),10);
2078			var paddingBottom = parseInt(el.css('padding-bottom'),10);
2079			offset.top -= ( $(window).scrollTop() - paddingTop );
2080
2081
2082			/*
2083
2084			Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
2085
2086			 */
2087			var obj = {
2088				width: el.width(),
2089				// fix Zepto height+padding issue
2090				height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
2091			};
2092
2093			// I hate to do this, but there is no another option
2094			if( getHasMozTransform() ) {
2095				obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
2096			} else {
2097				obj.left = offset.left;
2098				obj.top = offset.top;
2099			}
2100			return obj;
2101		}
2102
2103	}
2104});
2105
2106
2107
2108/*>>zoom*/
2109
2110/*>>iframe*/
2111
2112var IFRAME_NS = 'iframe',
2113	_emptyPage = '//about:blank',
2114
2115	_fixIframeBugs = function(isShowing) {
2116		if(mfp.currTemplate[IFRAME_NS]) {
2117			var el = mfp.currTemplate[IFRAME_NS].find('iframe');
2118			if(el.length) {
2119				// reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
2120				if(!isShowing) {
2121					el[0].src = _emptyPage;
2122				}
2123
2124				// IE8 black screen bug fix
2125				if(mfp.isIE8) {
2126					el.css('display', isShowing ? 'block' : 'none');
2127				}
2128			}
2129		}
2130	};
2131
2132$.magnificPopup.registerModule(IFRAME_NS, {
2133
2134	options: {
2135		markup: '<div class="mfp-iframe-scaler">'+
2136					'<div class="mfp-close"></div>'+
2137					'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
2138				'</div>',
2139
2140		srcAction: 'iframe_src',
2141
2142		// we don't care and support only one default type of URL by default
2143		patterns: {
2144			youtube: {
2145				index: 'youtube.com',
2146				id: 'v=',
2147				src: '//www.youtube.com/embed/%id%?autoplay=1'
2148			},
2149			vimeo: {
2150				index: 'vimeo.com/',
2151				id: '/',
2152				src: '//player.vimeo.com/video/%id%?autoplay=1'
2153			},
2154			gmaps: {
2155				index: '//maps.google.',
2156				src: '%id%&output=embed'
2157			}
2158		}
2159	},
2160
2161	proto: {
2162		initIframe: function() {
2163			mfp.types.push(IFRAME_NS);
2164
2165			_mfpOn('BeforeChange', function(e, prevType, newType) {
2166				if(prevType !== newType) {
2167					if(prevType === IFRAME_NS) {
2168						_fixIframeBugs(); // iframe if removed
2169					} else if(newType === IFRAME_NS) {
2170						_fixIframeBugs(true); // iframe is showing
2171					}
2172				}// else {
2173					// iframe source is switched, don't do anything
2174				//}
2175			});
2176
2177			_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
2178				_fixIframeBugs();
2179			});
2180		},
2181
2182		getIframe: function(item, template) {
2183			var embedSrc = item.src;
2184			var iframeSt = mfp.st.iframe;
2185
2186			$.each(iframeSt.patterns, function() {
2187				if(embedSrc.indexOf( this.index ) > -1) {
2188					if(this.id) {
2189						if(typeof this.id === 'string') {
2190							embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
2191						} else {
2192							embedSrc = this.id.call( this, embedSrc );
2193						}
2194					}
2195					embedSrc = this.src.replace('%id%', embedSrc );
2196					return false; // break;
2197				}
2198			});
2199
2200			var dataObj = {};
2201			if(iframeSt.srcAction) {
2202				dataObj[iframeSt.srcAction] = embedSrc;
2203			}
2204			mfp._parseMarkup(template, dataObj, item);
2205
2206			mfp.updateStatus('ready');
2207
2208			return template;
2209		}
2210	}
2211});
2212
2213
2214
2215/*>>iframe*/
2216
2217/*>>gallery*/
2218/**
2219 * Get looped index depending on number of slides
2220 */
2221var _getLoopedId = function(index) {
2222		var numSlides = mfp.items.length;
2223		if(index > numSlides - 1) {
2224			return index - numSlides;
2225		} else  if(index < 0) {
2226			return numSlides + index;
2227		}
2228		return index;
2229	},
2230	_replaceCurrTotal = function(text, curr, total) {
2231		return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
2232	};
2233
2234$.magnificPopup.registerModule('gallery', {
2235
2236	options: {
2237		enabled: false,
2238		arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
2239		preload: [0,2],
2240		navigateByImgClick: true,
2241		arrows: true,
2242
2243		tPrev: 'Previous (Left arrow key)',
2244		tNext: 'Next (Right arrow key)',
2245		tCounter: '%curr% of %total%'
2246	},
2247
2248	proto: {
2249		initGallery: function() {
2250
2251			var gSt = mfp.st.gallery,
2252				ns = '.mfp-gallery';
2253
2254			mfp.direction = true; // true - next, false - prev
2255
2256			if(!gSt || !gSt.enabled ) return false;
2257
2258			_wrapClasses += ' mfp-gallery';
2259
2260			_mfpOn(OPEN_EVENT+ns, function() {
2261
2262				if(gSt.navigateByImgClick) {
2263					mfp.wrap.on('click'+ns, '.mfp-img', function() {
2264						if(mfp.items.length > 1) {
2265							mfp.next();
2266							return false;
2267						}
2268					});
2269				}
2270
2271				_document.on('keydown'+ns, function(e) {
2272					if (e.keyCode === 37) {
2273						mfp.prev();
2274					} else if (e.keyCode === 39) {
2275						mfp.next();
2276					}
2277				});
2278			});
2279
2280			_mfpOn('UpdateStatus'+ns, function(e, data) {
2281				if(data.text) {
2282					data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
2283				}
2284			});
2285
2286			_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
2287				var l = mfp.items.length;
2288				values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
2289			});
2290
2291			_mfpOn('BuildControls' + ns, function() {
2292				if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
2293					var markup = gSt.arrowMarkup,
2294						arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
2295						arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
2296
2297					arrowLeft.click(function() {
2298						mfp.prev();
2299					});
2300					arrowRight.click(function() {
2301						mfp.next();
2302					});
2303
2304					mfp.contentContainer.append(arrowLeft.add(arrowRight));
2305				}
2306			});
2307
2308			_mfpOn(CHANGE_EVENT+ns, function() {
2309				if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
2310
2311				mfp._preloadTimeout = setTimeout(function() {
2312					mfp.preloadNearbyImages();
2313					mfp._preloadTimeout = null;
2314				}, 16);
2315			});
2316
2317
2318			_mfpOn(CLOSE_EVENT+ns, function() {
2319				_document.off(ns);
2320				mfp.wrap.off('click'+ns);
2321				mfp.arrowRight = mfp.arrowLeft = null;
2322			});
2323
2324		},
2325		next: function() {
2326			mfp.direction = true;
2327			mfp.index = _getLoopedId(mfp.index + 1);
2328			mfp.updateItemHTML();
2329		},
2330		prev: function() {
2331			mfp.direction = false;
2332			mfp.index = _getLoopedId(mfp.index - 1);
2333			mfp.updateItemHTML();
2334		},
2335		goTo: function(newIndex) {
2336			mfp.direction = (newIndex >= mfp.index);
2337			mfp.index = newIndex;
2338			mfp.updateItemHTML();
2339		},
2340		preloadNearbyImages: function() {
2341			var p = mfp.st.gallery.preload,
2342				preloadBefore = Math.min(p[0], mfp.items.length),
2343				preloadAfter = Math.min(p[1], mfp.items.length),
2344				i;
2345
2346			for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
2347				mfp._preloadItem(mfp.index+i);
2348			}
2349			for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
2350				mfp._preloadItem(mfp.index-i);
2351			}
2352		},
2353		_preloadItem: function(index) {
2354			index = _getLoopedId(index);
2355
2356			if(mfp.items[index].preloaded) {
2357				return;
2358			}
2359
2360			var item = mfp.items[index];
2361			if(!item.parsed) {
2362				item = mfp.parseEl( index );
2363			}
2364
2365			_mfpTrigger('LazyLoad', item);
2366
2367			if(item.type === 'image') {
2368				item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
2369					item.hasSize = true;
2370				}).on('error.mfploader', function() {
2371					item.hasSize = true;
2372					item.loadError = true;
2373					_mfpTrigger('LazyLoadError', item);
2374				}).attr('src', item.src);
2375			}
2376
2377
2378			item.preloaded = true;
2379		}
2380	}
2381});
2382
2383/*>>gallery*/
2384
2385/*>>retina*/
2386
2387var RETINA_NS = 'retina';
2388
2389$.magnificPopup.registerModule(RETINA_NS, {
2390	options: {
2391		replaceSrc: function(item) {
2392			return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
2393		},
2394		ratio: 1 // Function or number.  Set to 1 to disable.
2395	},
2396	proto: {
2397		initRetina: function() {
2398			if(window.devicePixelRatio > 1) {
2399
2400				var st = mfp.st.retina,
2401					ratio = st.ratio;
2402
2403				ratio = !isNaN(ratio) ? ratio : ratio();
2404
2405				if(ratio > 1) {
2406					_mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
2407						item.img.css({
2408							'max-width': item.img[0].naturalWidth / ratio,
2409							'width': '100%'
2410						});
2411					});
2412					_mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
2413						item.src = st.replaceSrc(item, ratio);
2414					});
2415				}
2416			}
2417
2418		}
2419	}
2420});
2421
2422/*>>retina*/
2423 _checkInstance(); }));
2424
2425///////////////////////////////
2426///Magnific popup for slider///
2427///////////////////////////////
2428
2429(function ($, Drupal) {
2430	$('.magnific-popup-container').magnificPopup({
2431		delegate: 'img',
2432		type: 'image',
2433		gallery: {
2434			enabled: true
2435		},
2436		callbacks: {
2437			elementParse: function(qw) {
2438				qw.src = qw.el.attr('src');
2439			}
2440		},
2441		image: {
2442            markup: '<div class="mfp-figure">'+
2443                      '<div class="mfp-close"></div>'+
2444                      '<div class="mfp-img"></div>'+
2445                      '<div class="mfp-bottom-bar">'+
2446                        '<div class="mfp-counter"></div>'+
2447                      '</div>'+
2448                    '</div>', // Popup HTML markup. `.mfp-img` div will be replaced with img tag, `.mfp-close` by close button
2449          
2450            cursor: 'mfp-zoom-out-cur', // Class that adds zoom cursor, will be added to body. Set to null to disable zoom out cursor.
2451          
2452            titleSrc: 'src', // Attribute of the target element that contains caption for the slide.
2453            // Or the function that should return the title. For example:
2454            // titleSrc: function(item) {
2455            //   return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';
2456            // }
2457          
2458            verticalFit: true, // Fits image in area vertically
2459          
2460            tError: '<a href="%url%">The image</a> could not be loaded.' // Error message
2461          },
2462		
2463
2464	});
2465} (jQuery, Drupal));;
2466/**
2467* DO NOT EDIT THIS FILE.
2468* See the following change record for more information,
2469* https://www.drupal.org/node/2815083
2470* @preserve
2471**/
2472Drupal.debounce = function (func, wait, immediate) {
2473  var timeout;
2474  var result;
2475  return function () {
2476    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2477      args[_key] = arguments[_key];
2478    }
2479    var context = this;
2480    var later = function later() {
2481      timeout = null;
2482      if (!immediate) {
2483        result = func.apply(context, args);
2484      }
2485    };
2486    var callNow = immediate && !timeout;
2487    clearTimeout(timeout);
2488    timeout = setTimeout(later, wait);
2489    if (callNow) {
2490      result = func.apply(context, args);
2491    }
2492    return result;
2493  };
2494};;
2495/**
2496* DO NOT EDIT THIS FILE.
2497* See the following change record for more information,
2498* https://www.drupal.org/node/2815083
2499* @preserve
2500**/
2501(function ($, once) {
2502  var deprecatedMessageSuffix = "is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256";
2503  var originalJQOnce = $.fn.once;
2504  var originalJQRemoveOnce = $.fn.removeOnce;
2505  $.fn.once = function jQueryOnce(id) {
2506    Drupal.deprecationError({
2507      message: "jQuery.once() ".concat(deprecatedMessageSuffix)
2508    });
2509    return originalJQOnce.apply(this, [id]);
2510  };
2511  $.fn.removeOnce = function jQueryRemoveOnce(id) {
2512    Drupal.deprecationError({
2513      message: "jQuery.removeOnce() ".concat(deprecatedMessageSuffix)
2514    });
2515    return originalJQRemoveOnce.apply(this, [id]);
2516  };
2517  var drupalOnce = once;
2518  function augmentedOnce(id, selector, context) {
2519    originalJQOnce.apply($(selector, context), [id]);
2520    return drupalOnce(id, selector, context);
2521  }
2522  function remove(id, selector, context) {
2523    originalJQRemoveOnce.apply($(selector, context), [id]);
2524    return drupalOnce.remove(id, selector, context);
2525  }
2526  window.once = Object.assign(augmentedOnce, drupalOnce, {
2527    remove: remove
2528  });
2529})(jQuery, once);;
2530/**
2531* DO NOT EDIT THIS FILE.
2532* See the following change record for more information,
2533* https://www.drupal.org/node/2815083
2534* @preserve
2535**/
2536(function ($, Drupal, debounce) {
2537  $.fn.drupalGetSummary = function () {
2538    var callback = this.data('summaryCallback');
2539    return this[0] && callback ? callback(this[0]).trim() : '';
2540  };
2541  $.fn.drupalSetSummary = function (callback) {
2542    var self = this;
2543    if (typeof callback !== 'function') {
2544      var val = callback;
2545      callback = function callback() {
2546        return val;
2547      };
2548    }
2549    return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () {
2550      self.trigger('summaryUpdated');
2551    }).trigger('summaryUpdated');
2552  };
2553  Drupal.behaviors.formSingleSubmit = {
2554    attach: function attach() {
2555      function onFormSubmit(e) {
2556        var $form = $(e.currentTarget);
2557        var formValues = $form.serialize();
2558        var previousValues = $form.attr('data-drupal-form-submit-last');
2559        if (previousValues === formValues) {
2560          e.preventDefault();
2561        } else {
2562          $form.attr('data-drupal-form-submit-last', formValues);
2563        }
2564      }
2565      $(once('form-single-submit', 'body')).on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit);
2566    }
2567  };
2568  function triggerFormUpdated(element) {
2569    $(element).trigger('formUpdated');
2570  }
2571  function fieldsList(form) {
2572    return [].map.call(form.querySelectorAll('[name][id]'), function (el) {
2573      return el.id;
2574    });
2575  }
2576  Drupal.behaviors.formUpdated = {
2577    attach: function attach(context) {
2578      var $context = $(context);
2579      var contextIsForm = $context.is('form');
2580      var $forms = $(once('form-updated', contextIsForm ? $context : $context.find('form')));
2581      var formFields;
2582      if ($forms.length) {
2583        $.makeArray($forms).forEach(function (form) {
2584          var events = 'change.formUpdated input.formUpdated ';
2585          var eventHandler = debounce(function (event) {
2586            triggerFormUpdated(event.target);
2587          }, 300);
2588          formFields = fieldsList(form).join(',');
2589          form.setAttribute('data-drupal-form-fields', formFields);
2590          $(form).on(events, eventHandler);
2591        });
2592      }
2593      if (contextIsForm) {
2594        formFields = fieldsList(context).join(',');
2595        var currentFields = $(context).attr('data-drupal-form-fields');
2596        if (formFields !== currentFields) {
2597          triggerFormUpdated(context);
2598        }
2599      }
2600    },
2601    detach: function detach(context, settings, trigger) {
2602      var $context = $(context);
2603      var contextIsForm = $context.is('form');
2604      if (trigger === 'unload') {
2605        once.remove('form-updated', contextIsForm ? $context : $context.find('form')).forEach(function (form) {
2606          form.removeAttribute('data-drupal-form-fields');
2607          $(form).off('.formUpdated');
2608        });
2609      }
2610    }
2611  };
2612  Drupal.behaviors.fillUserInfoFromBrowser = {
2613    attach: function attach(context, settings) {
2614      var userInfo = ['name', 'mail', 'homepage'];
2615      var $forms = $(once('user-info-from-browser', '[data-user-info-from-browser]'));
2616      if ($forms.length) {
2617        userInfo.forEach(function (info) {
2618          var $element = $forms.find("[name=".concat(info, "]"));
2619          var browserData = localStorage.getItem("Drupal.visitor.".concat(info));
2620          if (!$element.length) {
2621            return;
2622          }
2623          var emptyValue = $element[0].value === '';
2624          var defaultValue = $element.attr('data-drupal-default-value') === $element[0].value;
2625          if (browserData && (emptyValue || defaultValue)) {
2626            $element.each(function (index, item) {
2627              item.value = browserData;
2628            });
2629          }
2630        });
2631      }
2632      $forms.on('submit', function () {
2633        userInfo.forEach(function (info) {
2634          var $element = $forms.find("[name=".concat(info, "]"));
2635          if ($element.length) {
2636            localStorage.setItem("Drupal.visitor.".concat(info), $element[0].value);
2637          }
2638        });
2639      });
2640    }
2641  };
2642  var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) {
2643    var url;
2644    if (e.type === 'click') {
2645      url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget;
2646    } else {
2647      url = window.location;
2648    }
2649    var hash = url.hash.substr(1);
2650    if (hash) {
2651      var $target = $("#".concat(hash));
2652      $('body').trigger('formFragmentLinkClickOrHashChange', [$target]);
2653      setTimeout(function () {
2654        return $target.trigger('focus');
2655      }, 300);
2656    }
2657  };
2658  var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true);
2659  $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange);
2660  $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange);
2661})(jQuery, Drupal, Drupal.debounce);;
2662/**
2663 * @file
2664 * Webform behaviors.
2665 */
2666
2667(function ($, Drupal) {
2668
2669  'use strict';
2670
2671  // Trigger Drupal's attaching of behaviors after the page is
2672  // completely loaded.
2673  // @see https://stackoverflow.com/questions/37838430/detect-if-page-is-load-from-back-button
2674  // @see https://stackoverflow.com/questions/20899274/how-to-refresh-page-on-back-button-click/20899422#20899422
2675  var isChrome = (/chrom(e|ium)/.test(window.navigator.userAgent.toLowerCase()));
2676  if (isChrome) {
2677    // Track back button in navigation.
2678    // @see https://stackoverflow.com/questions/37838430/detect-if-page-is-load-from-back-button
2679    var backButton = false;
2680    if (window.performance) {
2681      var navEntries = window.performance.getEntriesByType('navigation');
2682      if (navEntries.length > 0 && navEntries[0].type === 'back_forward') {
2683        backButton = true;
2684      }
2685      else if (window.performance.navigation
2686        && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) {
2687        backButton = true;
2688      }
2689    }
2690
2691    // If the back button is pressed, delay Drupal's attaching of behaviors.
2692    if (backButton) {
2693      var attachBehaviors = Drupal.attachBehaviors;
2694      Drupal.attachBehaviors = function (context, settings) {
2695        setTimeout(function (context, settings) {
2696          attachBehaviors(context, settings);
2697        }, 300);
2698      };
2699    }
2700  }
2701
2702})(jQuery, Drupal);
2703;
2704/**
2705* DO NOT EDIT THIS FILE.
2706* See the following change record for more information,
2707* https://www.drupal.org/node/2815083
2708* @preserve
2709**/
2710(function ($, Drupal) {
2711  var states = {
2712    postponed: []
2713  };
2714  Drupal.states = states;
2715  function invert(a, invertState) {
2716    return invertState && typeof a !== 'undefined' ? !a : a;
2717  }
2718  function _compare2(a, b) {
2719    if (a === b) {
2720      return typeof a === 'undefined' ? a : true;
2721    }
2722    return typeof a === 'undefined' || typeof b === 'undefined';
2723  }
2724  function ternary(a, b) {
2725    if (typeof a === 'undefined') {
2726      return b;
2727    }
2728    if (typeof b === 'undefined') {
2729      return a;
2730    }
2731    return a && b;
2732  }
2733  Drupal.behaviors.states = {
2734    attach: function attach(context, settings) {
2735      var $states = $(context).find('[data-drupal-states]');
2736      var il = $states.length;
2737      var _loop = function _loop(i) {
2738        var config = JSON.parse($states[i].getAttribute('data-drupal-states'));
2739        Object.keys(config || {}
2739).forEach(function (state) {
2740          new states.Dependent({
2741            element: $($states[i]),
2742            state: states.State.sanitize(state),
2743            constraints: config[state]
2744          });
2745        });
2746      };
2747      for (var i = 0; i < il; i++) {
2748        _loop(i);
2749      }
2750      while (states.postponed.length) {
2751        states.postponed.shift()();
2752      }
2753    }
2754  };
2755  states.Dependent = function (args) {
2756    var _this = this;
2757    $.extend(this, {
2758      values: {},
2759      oldValue: null
2760    }, args);
2761    this.dependees = this.getDependees();
2762    Object.keys(this.dependees || {}).forEach(function (selector) {
2763      _this.initializeDependee(selector, _this.dependees[selector]);
2764    });
2765  };
2766  states.Dependent.comparisons = {
2767    RegExp: function RegExp(reference, value) {
2768      return reference.test(value);
2769    },
2770    Function: function Function(reference, value) {
2771      return reference(value);
2772    },
2773    Number: function Number(reference, value) {
2774      return typeof value === 'string' ? _compare2(reference.toString(), value) : _compare2(reference, value);
2775    }
2776  };
2777  states.Dependent.prototype = {
2778    initializeDependee: function initializeDependee(selector, dependeeStates) {
2779      var _this2 = this;
2780      this.values[selector] = {};
2781      Object.keys(dependeeStates).forEach(function (i) {
2782        var state = dependeeStates[i];
2783        if ($.inArray(state, dependeeStates) === -1) {
2784          return;
2785        }
2786        state = states.State.sanitize(state);
2787        _this2.values[selector][state.name] = null;
2788        $(selector).on("state:".concat(state), {
2789          selector: selector,
2790          state: state
2791        }, function (e) {
2792          _this2.update(e.data.selector, e.data.state, e.value);
2793        });
2794        new states.Trigger({
2795          selector: selector,
2796          state: state
2797        });
2798      });
2799    },
2800    compare: function compare(reference, selector, state) {
2801      var value = this.values[selector][state.name];
2802      if (reference.constructor.name in states.Dependent.comparisons) {
2803        return states.Dependent.comparisons[reference.constructor.name](reference, value);
2804      }
2805      return _compare2(reference, value);
2806    },
2807    update: function update(selector, state, value) {
2808      if (value !== this.values[selector][state.name]) {
2809        this.values[selector][state.name] = value;
2810        this.reevaluate();
2811      }
2812    },
2813    reevaluate: function reevaluate() {
2814      var value = this.verifyConstraints(this.constraints);
2815      if (value !== this.oldValue) {
2816        this.oldValue = value;
2817        value = invert(value, this.state.invert);
2818        this.element.trigger({
2819          type: "state:".concat(this.state),
2820          value: value,
2821          trigger: true
2822        });
2823      }
2824    },
2825    verifyConstraints: function verifyConstraints(constraints, selector) {
2826      var result;
2827      if ($.isArray(constraints)) {
2828        var hasXor = $.inArray('xor', constraints) === -1;
2829        var len = constraints.length;
2830        for (var i = 0; i < len; i++) {
2831          if (constraints[i] !== 'xor') {
2832            var constraint = this.checkConstraints(constraints[i], selector, i);
2833            if (constraint && (hasXor || result)) {
2834              return hasXor;
2835            }
2836            result = result || constraint;
2837          }
2838        }
2839      } else if ($.isPlainObject(constraints)) {
2840        for (var n in constraints) {
2841          if (constraints.hasOwnProperty(n)) {
2842            result = ternary(result, this.checkConstraints(constraints[n], selector, n));
2843            if (result === false) {
2844              return false;
2845            }
2846          }
2847        }
2848      }
2849      return result;
2850    },
2851    checkConstraints: function checkConstraints(value, selector, state) {
2852      if (typeof state !== 'string' || /[0-9]/.test(state[0])) {
2853        state = null;
2854      } else if (typeof selector === 'undefined') {
2855        selector = state;
2856        state = null;
2857      }
2858      if (state !== null) {
2859        state = states.State.sanitize(state);
2860        return invert(this.compare(value, selector, state), state.invert);
2861      }
2862      return this.verifyConstraints(value, selector);
2863    },
2864    getDependees: function getDependees() {
2865      var cache = {};
2866      var _compare = this.compare;
2867      this.compare = function (reference, selector, state) {
2868        (cache[selector] || (cache[selector] = [])).push(state.name);
2869      };
2870      this.verifyConstraints(this.constraints);
2871      this.compare = _compare;
2872      return cache;
2873    }
2874  };
2875  states.Trigger = function (args) {
2876    $.extend(this, args);
2877    if (this.state in states.Trigger.states) {
2878      this.element = $(this.selector);
2879      if (!this.element.data("trigger:".concat(this.state))) {
2880        this.initialize();
2881      }
2882    }
2883  };
2884  states.Trigger.prototype = {
2885    initialize: function initialize() {
2886      var _this3 = this;
2887      var trigger = states.Trigger.states[this.state];
2888      if (typeof trigger === 'function') {
2889        trigger.call(window, this.element);
2890      } else {
2891        Object.keys(trigger || {}
2891).forEach(function (event) {
2892          _this3.defaultTrigger(event, trigger[event]);
2893        });
2894      }
2895      this.element.data("trigger:".concat(this.state), true);
2896    },
2897    defaultTrigger: function defaultTrigger(event, valueFn) {
2898      var oldValue = valueFn.call(this.element);
2899      this.element.on(event, $.proxy(function (e) {
2900        var value = valueFn.call(this.element, e);
2901        if (oldValue !== value) {
2902          this.element.trigger({
2903            type: "state:".concat(this.state),
2904            value: value,
2905            oldValue: oldValue
2906          });
2907          oldValue = value;
2908        }
2909      }, this));
2910      states.postponed.push($.proxy(function () {
2911        this.element.trigger({
2912          type: "state:".concat(this.state),
2913          value: oldValue,
2914          oldValue: null
2915        });
2916      }, this));
2917    }
2918  };
2919  states.Trigger.states = {
2920    empty: {
2921      keyup: function keyup() {
2922        return this.val() === '';
2923      },
2924      change: function change() {
2925        return this.val() === '';
2926      }
2927    },
2928    checked: {
2929      change: function change() {
2930        var checked = false;
2931        this.each(function () {
2932          checked = $(this).prop('checked');
2933          return !checked;
2934        });
2935        return checked;
2936      }
2937    },
2938    value: {
2939      keyup: function keyup() {
2940        if (this.length > 1) {
2941          return this.filter(':checked').val() || false;
2942        }
2943        return this.val();
2944      },
2945      change: function change() {
2946        if (this.length > 1) {
2947          return this.filter(':checked').val() || false;
2948        }
2949        return this.val();
2950      }
2951    },
2952    collapsed: {
2953      collapsed: function collapsed(e) {
2954        return typeof e !== 'undefined' && 'value' in e ? e.value : !this.is('[open]');
2955      }
2956    }
2957  };
2958  states.State = function (state) {
2959    this.pristine = state;
2960    this.name = state;
2961    var process = true;
2962    do {
2963      while (this.name.charAt(0) === '!') {
2964        this.name = this.name.substring(1);
2965        this.invert = !this.invert;
2966      }
2967      if (this.name in states.State.aliases) {
2968        this.name = states.State.aliases[this.name];
2969      } else {
2970        process = false;
2971      }
2972    } while (process);
2973  };
2974  states.State.sanitize = function (state) {
2975    if (state instanceof states.State) {
2976      return state;
2977    }
2978    return new states.State(state);
2979  };
2980  states.State.aliases = {
2981    enabled: '!disabled',
2982    invisible: '!visible',
2983    invalid: '!valid',
2984    untouched: '!touched',
2985    optional: '!required',
2986    filled: '!empty',
2987    unchecked: '!checked',
2988    irrelevant: '!relevant',
2989    expanded: '!collapsed',
2990    open: '!collapsed',
2991    closed: 'collapsed',
2992    readwrite: '!readonly'
2993  };
2994  states.State.prototype = {
2995    invert: false,
2996    toString: function toString() {
2997      return this.name;
2998    }
2999  };
3000  var $document = $(document);
3001  $document.on('state:disabled', function (e) {
3002    if (e.trigger) {
3003      $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value).find('select, input, textarea').prop('disabled', e.value);
3004    }
3005  });
3006  $document.on('state:required', function (e) {
3007    if (e.trigger) {
3008      if (e.value) {
3009        var label = "label".concat(e.target.id ? "[for=".concat(e.target.id, "]") : '');
3010        var $label = $(e.target).attr({
3011          required: 'required',
3012          'aria-required': 'true'
3013        }).closest('.js-form-item, .js-form-wrapper').find(label);
3014        if (!$label.hasClass('js-form-required').length) {
3015          $label.addClass('js-form-required form-required');
3016        }
3017      } else {
3018        $(e.target).removeAttr('required aria-required').closest('.js-form-item, .js-form-wrapper').find('label.js-form-required').removeClass('js-form-required form-required');
3019      }
3020    }
3021  });
3022  $document.on('state:visible', function (e) {
3023    if (e.trigger) {
3024      $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggle(e.value);
3025    }
3026  });
3027  $document.on('state:checked', function (e) {
3028    if (e.trigger) {
3029      $(e.target).closest('.js-form-item, .js-form-wrapper').find('input').prop('checked', e.value).trigger('change');
3030    }
3031  });
3032  $document.on('state:collapsed', function (e) {
3033    if (e.trigger) {
3034      if ($(e.target).is('[open]') === e.value) {
3035        $(e.target).find('> summary').trigger('click');
3036      }
3037    }
3038  });
3039})(jQuery, Drupal);;
3040/**
3041 * @file
3042 * JavaScript behaviors for custom webform #states.
3043 */
3044
3045(function ($, Drupal) {
3046
3047  'use strict';
3048
3049  Drupal.webform = Drupal.webform || {};
3050  Drupal.webform.states = Drupal.webform.states || {};
3051  Drupal.webform.states.slideDown = Drupal.webform.states.slideDown || {};
3052  Drupal.webform.states.slideDown.duration = 'slow';
3053  Drupal.webform.states.slideUp = Drupal.webform.states.slideUp || {};
3054  Drupal.webform.states.slideUp.duration = 'fast';
3055
3056  /* ************************************************************************ */
3057  // jQuery functions.
3058  /* ************************************************************************ */
3059
3060  /**
3061   * Check if an element has a specified data attribute.
3062   *
3063   * @param {string} data
3064   *   The data attribute name.
3065   *
3066   * @return {boolean}
3067   *   TRUE if an element has a specified data attribute.
3068   */
3069  $.fn.hasData = function (data) {
3070    return (typeof this.data(data) !== 'undefined');
3071  };
3072
3073  /**
3074   * Check if element is within the webform or not.
3075   *
3076   * @return {boolean}
3077   *   TRUE if element is within the webform.
3078   */
3079  $.fn.isWebform = function () {
3080    return $(this).closest('form.webform-submission-form, form[id^="webform"], form[data-is-webform]').length ? true : false;
3081  };
3082
3083  /**
3084   * Check if element is to be treated as a webform element.
3085   *
3086   * @return {boolean}
3087   *   TRUE if element is to be treated as a webform element.
3088   */
3089  $.fn.isWebformElement = function () {
3090    return ($(this).isWebform() || $(this).closest('[data-is-webform-element]').length) ? true : false;
3091  };
3092
3093  /* ************************************************************************ */
3094  // Trigger.
3095  /* ************************************************************************ */
3096
3097  // The change event is triggered by cut-n-paste and select menus.
3098  // Issue #2445271: #states element empty check not triggered on mouse
3099  // based paste.
3100  // @see https://www.drupal.org/node/2445271
3101  Drupal.states.Trigger.states.empty.change = function change() {
3102    return this.val() === '';
3103  };
3104
3105  /* ************************************************************************ */
3106  // Dependents.
3107  /* ************************************************************************ */
3108
3109  // Apply solution included in #1962800 patch.
3110  // Issue #1962800: Form #states not working with literal integers as
3111  // values in IE11.
3112  // @see https://www.drupal.org/project/drupal/issues/1962800
3113  // @see https://www.drupal.org/files/issues/core-states-not-working-with-integers-ie11_1962800_46.patch
3114  //
3115  // This issue causes pattern, less than, and greater than support to break.
3116  // @see https://www.drupal.org/project/webform/issues/2981724
3117  var states = Drupal.states;
3118  Drupal.states.Dependent.prototype.compare = function compare(reference, selector, state) {
3119    var value = this.values[selector][state.name];
3120
3121    var name = reference.constructor.name;
3122    if (!name) {
3123      name = $.type(reference);
3124
3125      name = name.charAt(0).toUpperCase() + name.slice(1);
3126    }
3127    if (name in states.Dependent.comparisons) {
3128      return states.Dependent.comparisons[name](reference, value);
3129    }
3130
3131    if (reference.constructor.name in states.Dependent.comparisons) {
3132      return states.Dependent.comparisons[reference.constructor.name](reference, value);
3133    }
3134
3135    return _compare2(reference, value);
3136  };
3137  function _compare2(a, b) {
3138    if (a === b) {
3139      return typeof a === 'undefined' ? a : true;
3140    }
3141
3142    return typeof a === 'undefined' || typeof b === 'undefined';
3143  }
3144
3145  // Adds pattern, less than, and greater than support to #state API.
3146  // @see http://drupalsun.com/julia-evans/2012/03/09/extending-form-api-states-regular-expressions
3147  Drupal.states.Dependent.comparisons.Object = function (reference, value) {
3148    if ('pattern' in reference) {
3149      return (new RegExp(reference['pattern'])).test(value);
3150    }
3151    else if ('!pattern' in reference) {
3152      return !((new RegExp(reference['!pattern'])).test(value));
3153    }
3154    else if ('less' in reference) {
3155      return (value !== '' && parseFloat(reference['less']) > parseFloat(value));
3156    }
3157    else if ('less_equal' in reference) {
3158      return (value !== '' && parseFloat(reference['less_equal']) >= parseFloat(value));
3159    }
3160    else if ('greater' in reference) {
3161      return (value !== '' && parseFloat(reference['greater']) < parseFloat(value));
3162    }
3163    else if ('greater_equal' in reference) {
3164      return (value !== '' && parseFloat(reference['greater_equal']) <= parseFloat(value));
3165    }
3166    else if ('between' in reference || '!between' in reference) {
3167      if (value === '') {
3168        return false;
3169      }
3170
3171      var between = reference['between'] || reference['!between'];
3172      var betweenParts = between.split(':');
3173      var greater = betweenParts[0];
3174      var less = (typeof betweenParts[1] !== 'undefined') ? betweenParts[1] : null;
3175      var isGreaterThan = (greater === null || greater === '' || parseFloat(value) >= parseFloat(greater));
3176      var isLessThan = (less === null || less === '' || parseFloat(value) <= parseFloat(less));
3177      var result = (isGreaterThan && isLessThan);
3178      return (reference['!between']) ? !result : result;
3179    }
3180    else {
3181      return reference.indexOf(value) !== false;
3182    }
3183  };
3184
3185  /* ************************************************************************ */
3186  // States events.
3187  /* ************************************************************************ */
3188
3189  var $document = $(document);
3190
3191  $document.on('state:required', function (e) {
3192    if (e.trigger && $(e.target).isWebformElement()) {
3193      var $target = $(e.target);
3194      // Fix #required file upload.
3195      // @see Issue #2860529: Conditional required File upload field don't work.
3196      toggleRequired($target.find('input[type="file"]'), e.value);
3197
3198      // Fix #required for radios and likert.
3199      // @see Issue #2856795: If radio buttons are required but not filled form is nevertheless submitted.
3200      if ($target.is('.js-form-type-radios, .js-form-type-webform-radios-other, .js-webform-type-radios, .js-webform-type-webform-radios-other, .js-webform-type-webform-entity-radios, .webform-likert-table')) {
3201        $target.toggleClass('required', e.value);
3202        toggleRequired($target.find('input[type="radio"]'), e.value);
3203      }
3204
3205      // Fix #required for checkboxes.
3206      // @see Issue #2938414: Checkboxes don't support #states required.
3207      // @see checkboxRequiredhandler
3208      if ($target.is('.js-form-type-checkboxes, .js-form-type-webform-checkboxes-other, .js-webform-type-checkboxes, .js-webform-type-webform-checkboxes-other')) {
3209        $target.toggleClass('required', e.value);
3210        var $checkboxes = $target.find('input[type="checkbox"]');
3211        if (e.value) {
3212          // Add event handler.
3213          $checkboxes.on('click', statesCheckboxesRequiredEventHandler);
3214          // Initialize and add required attribute.
3215          checkboxesRequired($target);
3216        }
3217        else {
3218          // Remove event handler.
3219          $checkboxes.off('click', statesCheckboxesRequiredEventHandler);
3220          // Remove required attribute.
3221          toggleRequired($checkboxes, false);
3222        }
3223      }
3224
3225      // Fix #required for tableselect.
3226      // @see Issue #3212581: Table select does not trigger client side validation
3227      if ($target.is('.js-webform-tableselect')) {
3228        $target.toggleClass('required', e.value);
3229        var isMultiple = $target.is('[multiple]');
3230        if (isMultiple) {
3231          // Checkboxes.
3232          var $tbody = $target.find('tbody');
3233          var $checkboxes = $tbody.find('input[type="checkbox"]');
3234          copyRequireMessage($target, $checkboxes);
3235          if (e.value) {
3236            $checkboxes.on('click change', statesCheckboxesRequiredEventHandler);
3237            checkboxesRequired($tbody);
3238          }
3239          else {
3240            $checkboxes.off('click change ', statesCheckboxesRequiredEventHandler);
3241            toggleRequired($tbody, false);
3242          }
3243        }
3244        else {
3245          // Radios.
3246          var $radios = $target.find('input[type="radio"]');
3247          copyRequireMessage($target, $radios);
3248          toggleRequired($radios, e.value);
3249        }
3250      }
3251
3252      // Fix required label for elements without the for attribute.
3253      // @see Issue #3145300: Conditional Visible Select Other not working.
3254      if ($target.is('.js-form-type-webform-select-other, .js-webform-type-webform-select-other')) {
3255        var $select = $target.find('select');
3256        toggleRequired($select, e.value);
3257        copyRequireMessage($target, $select);
3258      }
3259      if ($target.find('> label:not([for])').length) {
3260        $target.find('> label').toggleClass('js-form-required form-required', e.value);
3261      }
3262
3263      // Fix required label for checkboxes and radios.
3264      // @see Issue #2938414: Checkboxes don't support #states required
3265      // @see Issue #2731991: Setting required on radios marks all options required.
3266      // @see Issue #2856315: Conditional Logic - Requiring Radios in a Fieldset.
3267      // Fix #required for fieldsets.
3268      // @see Issue #2977569: Hidden fieldsets that become visible with conditional logic cannot be made required.
3269      if ($target.is('.js-webform-type-radios, .js-webform-type-checkboxes, fieldset')) {
3270        $target.find('legend span.fieldset-legend:not(.visually-hidden)').toggleClass('js-form-required form-required', e.value);
3271      }
3272
3273      // Issue #2986017: Fieldsets shouldn't have required attribute.
3274      if ($target.is('fieldset')) {
3275        $target.removeAttr('required aria-required');
3276      }
3277    }
3278  });
3279
3280  $document.on('state:checked', function (e) {
3281    if (e.trigger) {
3282      $(e.target).trigger('change');
3283    }
3284  });
3285
3286  $document.on('state:readonly', function (e) {
3287    if (e.trigger && $(e.target).isWebformElement()) {
3288      $(e.target).prop('readonly', e.value).closest('.js-form-item, .js-form-wrapper').toggleClass('webform-readonly', e.value).find('input, textarea').prop('readonly', e.value);
3289
3290      // Trigger webform:readonly.
3291      $(e.target).trigger('webform:readonly')
3292        .find('select, input, textarea, button').trigger('webform:readonly');
3293    }
3294  });
3295
3296  $document.on('state:visible state:visible-slide', function (e) {
3297    if (e.trigger && $(e.target).isWebformElement()) {
3298      if (e.value) {
3299        $(':input', e.target).addBack().each(function () {
3300          restoreValueAndRequired(this);
3301          triggerEventHandlers(this);
3302        });
3303      }
3304      else {
3305        // @see https://www.sitepoint.com/jquery-function-clear-form-data/
3306        $(':input', e.target).addBack().each(function () {
3307          backupValueAndRequired(this);
3308          clearValueAndRequired(this);
3309          triggerEventHandlers(this);
3310        });
3311      }
3312    }
3313  });
3314
3315  $document.on('state:visible-slide', function (e) {
3316    if (e.trigger && $(e.target).isWebformElement()) {
3317      var effect = e.value ? 'slideDown' : 'slideUp';
3318      var duration = Drupal.webform.states[effect].duration;
3319      $(e.target).closest('.js-form-item, .js-form-submit, .js-form-wrapper')[effect](duration);
3320    }
3321  });
3322  Drupal.states.State.aliases['invisible-slide'] = '!visible-slide';
3323
3324  $document.on('state:disabled', function (e) {
3325    if (e.trigger && $(e.target).isWebformElement()) {
3326      // Make sure disabled property is set before triggering webform:disabled.
3327      // Copied from: core/misc/states.js
3328      $(e.target)
3329        .prop('disabled', e.value)
3330        .closest('.js-form-item, .js-form-submit, .js-form-wrapper').toggleClass('form-disabled', e.value)
3331        .find('select, input, textarea, button').prop('disabled', e.value);
3332
3333      // Never disable hidden file[fids] because the existing values will
3334      // be completely lost when the webform is submitted.
3335      var fileElements = $(e.target)
3336        .find(':input[type="hidden"][name$="[fids]"]');
3337      if (fileElements.length) {
3338        // Remove 'disabled' attribute from fieldset which will block
3339        // all disabled elements from being submitted.
3340        if ($(e.target).is('fieldset')) {
3341          $(e.target).prop('disabled', false);
3342        }
3343        fileElements.removeAttr('disabled');
3344      }
3345
3346      // Trigger webform:disabled.
3347      $(e.target).trigger('webform:disabled')
3348        .find('select, input, textarea, button').trigger('webform:disabled');
3349    }
3350  });
3351
3352  /* ************************************************************************ */
3353  // Behaviors.
3354  /* ************************************************************************ */
3355
3356  /**
3357   * Adds HTML5 validation to required checkboxes.
3358   *
3359   * @type {Drupal~behavior}
3360   *
3361   * @see https://www.drupal.org/project/webform/issues/3068998
3362   */
3363  Drupal.behaviors.webformCheckboxesRequired = {
3364    attach: function (context) {
3365      $('.js-form-type-checkboxes.required, .js-form-type-webform-checkboxes-other.required, .js-webform-type-checkboxes.required, .js-webform-type-webform-checkboxes-other.required, .js-webform-type-webform-radios-other.checkboxes', context)
3366        .once('webform-checkboxes-required')
3367        .each(function () {
3368          var $element = $(this);
3369          $element.find('input[type="checkbox"]').on('click', statesCheckboxesRequiredEventHandler);
3370          setTimeout(function () {checkboxesRequired($element);});
3371        });
3372    }
3373  };
3374
3375  /**
3376   * Adds HTML5 validation to required radios.
3377   *
3378   * @type {Drupal~behavior}
3379   *
3380   * @see https://www.drupal.org/project/webform/issues/2856795
3381   */
3382  Drupal.behaviors.webformRadiosRequired = {
3383    attach: function (context) {
3384      $('.js-form-type-radios, .js-form-type-webform-radios-other, .js-webform-type-radios, .js-webform-type-webform-radios-other, .js-webform-type-webform-entity-radios, .js-webform-type-webform-scale', context)
3385        .once('webform-radios-required')
3386        .each(function () {
3387          var $element = $(this);
3388          setTimeout(function () {radiosRequired($element);});
3389        });
3390    }
3391  };
3392
3393 /**
3394   * Adds HTML5 validation to required table select.
3395   *
3396   * @type {Drupal~behavior}
3397   *
3398   * @see https://www.drupal.org/project/webform/issues/2856795
3399   */
3400  Drupal.behaviors.webformTableSelectRequired = {
3401    attach: function (context) {
3402      $('.js-webform-tableselect.required', context)
3403        .once('webform-tableselect-required')
3404        .each(function () {
3405          var $element = $(this);
3406          var $tbody = $element.find('tbody');
3407          var isMultiple = $element.is('[multiple]');
3408
3409          if (isMultiple) {
3410            // Check all checkbox triggers checkbox 'change' event on
3411            // select and deselect all.
3412            // @see Drupal.tableSelect
3413            $tbody.find('input[type="checkbox"]').on('click change', function () {
3414              checkboxesRequired($tbody);
3415            });
3416          }
3417
3418          setTimeout(function () {
3419            isMultiple ? checkboxesRequired($tbody) : radiosRequired($element);
3420          });
3421        });
3422    }
3423  };
3424
3425  /**
3426   * Add HTML5 multiple checkboxes required validation.
3427   *
3428   * @param {jQuery} $element
3429   *   An jQuery object containing HTML5 radios.
3430   *
3431   * @see https://stackoverflow.com/a/37825072/145846
3432   */
3433  function checkboxesRequired($element) {
3434    var $firstCheckbox = $element.find('input[type="checkbox"]').first();
3435    var isChecked = $element.find('input[type="checkbox"]').is(':checked');
3436    toggleRequired($firstCheckbox, !isChecked);
3437    copyRequireMessage($element, $firstCheckbox);
3438  }
3439
3440  /**
3441   * Add HTML5 radios required validation.
3442   *
3443   * @param {jQuery} $element
3444   *   An jQuery object containing HTML5 radios.
3445   *
3446   * @see https://www.drupal.org/project/webform/issues/2856795
3447   */
3448  function radiosRequired($element) {
3449    var $radios = $element.find('input[type="radio"]');
3450    var isRequired = $element.hasClass('required');
3451    toggleRequired($radios, isRequired);
3452    copyRequireMessage($element, $radios);
3453  }
3454
3455  /* ************************************************************************ */
3456  // Event handlers.
3457  /* ************************************************************************ */
3458
3459  /**
3460   * Trigger #states API HTML5 multiple checkboxes required validation.
3461   *
3462   * @see https://stackoverflow.com/a/37825072/145846
3463   */
3464  function statesCheckboxesRequiredEventHandler() {
3465    var $element = $(this).closest('.js-webform-type-checkboxes, .js-webform-type-webform-checkboxes-other');
3466    checkboxesRequired($element);
3467  }
3468
3469  /**
3470   * Trigger an input's event handlers.
3471   *
3472   * @param {element} input
3473   *   An input.
3474   */
3475  function triggerEventHandlers(input) {
3476    var $input = $(input);
3477    var type = input.type;
3478    var tag = input.tagName.toLowerCase();
3479    // Add 'webform.states' as extra parameter to event handlers.
3480    // @see Drupal.behaviors.webformUnsaved
3481    var extraParameters = ['webform.states'];
3482    if (type === 'checkbox' || type === 'radio') {
3483      $input
3484        .trigger('change', extraParameters)
3485        .trigger('blur', extraParameters);
3486    }
3487    else if (tag === 'select') {
3488      // Do not trigger the onchange event for Address element's country code
3489      // when it is initialized.
3490      // @see \Drupal\address\Element\Country
3491      if ($input.closest('.webform-type-address').length) {
3492        if (!$input.data('webform-states-address-initialized')
3493          && $input.attr('autocomplete') === 'country'
3494          && $input.val() === $input.find("option[selected]").attr('value')) {
3495          return;
3496        }
3497        $input.data('webform-states-address-initialized', true);
3498      }
3499
3500      $input
3501        .trigger('change', extraParameters)
3502        .trigger('blur', extraParameters);
3503    }
3504    else if (type !== 'submit' && type !== 'button' && type !== 'file') {
3505      // Make sure input mask is removed and then reset when value is restored.
3506      // @see https://www.drupal.org/project/webform/issues/3124155
3507      // @see https://www.drupal.org/project/webform/issues/3202795
3508      var hasInputMask = ($.fn.inputmask && $input.hasClass('js-webform-input-mask'));
3509      hasInputMask && $input.inputmask('remove');
3510
3511      $input
3512        .trigger('input', extraParameters)
3513        .trigger('change', extraParameters)
3514        .trigger('keydown', extraParameters)
3515        .trigger('keyup', extraParameters)
3516        .trigger('blur', extraParameters);
3517
3518      hasInputMask && $input.inputmask();
3519    }
3520  }
3521
3522  /* ************************************************************************ */
3523  // Backup and restore value functions.
3524  /* ************************************************************************ */
3525
3526  /**
3527   * Backup an input's current value and required attribute
3528   *
3529   * @param {element} input
3530   *   An input.
3531   */
3532  function backupValueAndRequired(input) {
3533    var $input = $(input);
3534    var type = input.type;
3535    var tag = input.tagName.toLowerCase(); // Normalize case.
3536
3537    // Backup required.
3538    if ($input.prop('required') && !$input.hasData('webform-required')) {
3539      $input.data('webform-required', true);
3540    }
3541
3542    // Backup value.
3543    if (!$input.hasData('webform-value')) {
3544      if (type === 'checkbox' || type === 'radio') {
3545        $input.data('webform-value', $input.prop('checked'));
3546      }
3547      else if (tag === 'select') {
3548        var values = [];
3549        $input.find('option:selected').each(function (i, option) {
3550          values[i] = option.value;
3551        });
3552        $input.data('webform-value', values);
3553      }
3554      else if (type !== 'submit' && type !== 'button') {
3555        $input.data('webform-value', input.value);
3556      }
3557    }
3558  }
3559
3560  /**
3561   * Restore an input's value and required attribute.
3562   *
3563   * @param {element} input
3564   *   An input.
3565   */
3566  function restoreValueAndRequired(input) {
3567    var $input = $(input);
3568
3569    // Restore value.
3570    var value = $input.data('webform-value');
3571    if (typeof value !== 'undefined') {
3572      var type = input.type;
3573      var tag = input.tagName.toLowerCase(); // Normalize case.
3574
3575      if (type === 'checkbox' || type === 'radio') {
3576        $input.prop('checked', value);
3577      }
3578      else if (tag === 'select') {
3579        $.each(value, function (i, option_value) {
3580          // Prevent "Syntax error, unrecognized expression" error by
3581          // escaping single quotes.
3582          // @see https://forum.jquery.com/topic/escape-characters-prior-to-using-selector
3583          option_value = option_value.replace(/'/g, "\\\'");
3584          $input.find("option[value='" + option_value + "']").prop('selected', true);
3585        });
3586      }
3587      else if (type !== 'submit' && type !== 'button') {
3588        input.value = value;
3589      }
3590      $input.removeData('webform-value');
3591    }
3592
3593    // Restore required.
3594    var required = $input.data('webform-required');
3595    if (typeof required !== 'undefined') {
3596      if (required) {
3597        $input.prop('required', true);
3598      }
3599      $input.removeData('webform-required');
3600    }
3601  }
3602
3603  /**
3604   * Clear an input's value and required attributes.
3605   *
3606   * @param {element} input
3607   *   An input.
3608   */
3609  function clearValueAndRequired(input) {
3610    var $input = $(input);
3611
3612    // Check for #states no clear attribute.
3613    // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
3614    if ($input.closest('[data-webform-states-no-clear]').length) {
3615      return;
3616    }
3617
3618    // Clear value.
3619    var type = input.type;
3620    var tag = input.tagName.toLowerCase(); // Normalize case.
3621    if (type === 'checkbox' || type === 'radio') {
3622      $input.prop('checked', false);
3623    }
3624    else if (tag === 'select') {
3625      if ($input.find('option[value=""]').length) {
3626        $input.val('');
3627      }
3628      else {
3629        input.selectedIndex = -1;
3630      }
3631    }
3632    else if (type !== 'submit' && type !== 'button') {
3633      input.value = (type === 'color') ? '#000000' : '';
3634    }
3635
3636    // Clear required.
3637    $input.prop('required', false);
3638  }
3639
3640  /* ************************************************************************ */
3641  // Helper functions.
3642  /* ************************************************************************ */
3643
3644  /**
3645   * Toggle an input's required attributes.
3646   *
3647   * @param {element} $input
3648   *   An input.
3649   * @param {boolean} required
3650   *   Is input required.
3651   */
3652  function toggleRequired($input, required) {
3653    var isCheckboxOrRadio = ($input.attr('type') === 'radio' || $input.attr('type') === 'checkbox');
3654    if (required) {
3655      if (isCheckboxOrRadio) {
3656        $input.attr({'required': 'required'});
3657      }
3658      else {
3659        $input.attr({'required': 'required', 'aria-required': 'true'});
3660      }
3661    }
3662    else {
3663      if (isCheckboxOrRadio) {
3664        $input.removeAttr('required');
3665      }
3666      else {
3667        $input.removeAttr('required aria-required');
3668      }
3669    }
3670  }
3671
3672  /**
3673   * Copy the clientside_validation.module's message.
3674   *
3675   * @param {jQuery} $source
3676   *   The source element.
3677   * @param {jQuery} $destination
3678   *   The destination element.
3679   */
3680  function copyRequireMessage($source, $destination) {
3681    if ($source.attr('data-msg-required')) {
3682      $destination.attr('data-msg-required', $source.attr('data-msg-required'));
3683    }
3684  }
3685
3686})(jQuery, Drupal);
3687;
3688/**
3689 * @file
3690 * JavaScript behaviors for webforms.
3691 */
3692
3693(function ($, Drupal) {
3694
3695  'use strict';
3696
3697  /**
3698   * Remove single submit event listener.
3699   *
3700   * @type {Drupal~behavior}
3701   *
3702   * @prop {Drupal~behaviorAttach} attach
3703   *   Attaches the behavior for removing single submit event listener.
3704   *
3705   * @see Drupal.behaviors.formSingleSubmit
3706   */
3707  Drupal.behaviors.webformRemoveFormSingleSubmit = {
3708    attach: function attach() {
3709      function onFormSubmit(e) {
3710        var $form = $(e.currentTarget);
3711        $form.removeAttr('data-drupal-form-submit-last');
3712      }
3713      $('body')
3714        .once('webform-single-submit')
3715        .on('submit.singleSubmit', 'form.webform-remove-single-submit', onFormSubmit);
3716    }
3717  };
3718
3719  /**
3720   * Prevent webform autosubmit on wizard pages.
3721   *
3722   * @type {Drupal~behavior}
3723   *
3724   * @prop {Drupal~behaviorAttach} attach
3725   *   Attaches the behavior for disabling webform autosubmit.
3726   *   Wizard pages need to be progressed with the Previous or Next buttons,
3727   *   not by pressing Enter.
3728   */
3729  Drupal.behaviors.webformDisableAutoSubmit = {
3730    attach: function (context) {
3731      // Not using context so that inputs loaded via Ajax will have autosubmit
3732      // disabled.
3733      // @see http://stackoverflow.com/questions/11235622/jquery-disable-form-submit-on-enter
3734      $('.js-webform-disable-autosubmit input')
3735        .not(':button, :submit, :reset, :image, :file')
3736        .once('webform-disable-autosubmit')
3737        .on('keyup keypress', function (e) {
3738          if (e.which === 13) {
3739            e.preventDefault();
3740            return false;
3741          }
3742        });
3743    }
3744  };
3745
3746  /**
3747   * Custom required and pattern validation error messages.
3748   *
3749   * @type {Drupal~behavior}
3750   *
3751   * @prop {Drupal~behaviorAttach} attach
3752   *   Attaches the behavior for the webform custom required and pattern
3753   *   validation error messages.
3754   *
3755   * @see http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message
3756   **/
3757  Drupal.behaviors.webformRequiredError = {
3758    attach: function (context) {
3759      $(context).find(':input[data-webform-required-error], :input[data-webform-pattern-error]').once('webform-required-error')
3760        .on('invalid', function () {
3761          this.setCustomValidity('');
3762          if (this.valid) {
3763            return;
3764          }
3765
3766          if (this.validity.patternMismatch && $(this).attr('data-webform-pattern-error')) {
3767            this.setCustomValidity($(this).attr('data-webform-pattern-error'));
3768          }
3769          else if (this.validity.valueMissing && $(this).attr('data-webform-required-error')) {
3770            this.setCustomValidity($(this).attr('data-webform-required-error'));
3771          }
3772        })
3773        .on('input change', function () {
3774          // Find all related elements by name and reset custom validity.
3775          // This specifically applies to required radios and checkboxes.
3776          var name = $(this).attr('name');
3777          $(this.form).find(':input[name="' + name + '"]').each(function () {
3778            this.setCustomValidity('');
3779          });
3780        });
3781    }
3782  };
3783
3784  // When #state:required is triggered we need to reset the target elements
3785  // custom validity.
3786  $(document).on('state:required', function (e) {
3787    $(e.target).filter('[data-webform-required-error]')
3788      .each(function () {this.setCustomValidity('');});
3789  });
3790
3791})(jQuery, Drupal);
3792;
3793/**
3794 * @file
3795 * JavaScript behaviors for details element.
3796 */
3797
3798(function ($, Drupal) {
3799
3800  'use strict';
3801
3802  // Determine if local storage exists and is enabled.
3803  // This approach is copied from Modernizr.
3804  // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
3805  var hasLocalStorage = (function () {
3806    try {
3807      localStorage.setItem('webform', 'webform');
3808      localStorage.removeItem('webform');
3809      return true;
3810    }
3811    catch (e) {
3812      return false;
3813    }
3814  }());
3815
3816  /**
3817   * Attach handler to save details open/close state.
3818   *
3819   * @type {Drupal~behavior}
3820   */
3821  Drupal.behaviors.webformDetailsSave = {
3822    attach: function (context) {
3823      if (!hasLocalStorage) {
3824        return;
3825      }
3826
3827      // Summary click event handler.
3828      $('details > summary', context).once('webform-details-summary-save').on('click', function () {
3829        var $details = $(this).parent();
3830
3831        // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
3832        if ($details[0].hasAttribute('data-webform-details-nosave')) {
3833          return;
3834        }
3835
3836        var name = Drupal.webformDetailsSaveGetName($details);
3837        if (!name) {
3838          return;
3839        }
3840
3841        var open = ($details.attr('open') !== 'open') ? '1' : '0';
3842        localStorage.setItem(name, open);
3843      });
3844
3845      // Initialize details open state via local storage.
3846      $('details', context).once('webform-details-save').each(function () {
3847        var $details = $(this);
3848
3849        var name = Drupal.webformDetailsSaveGetName($details);
3850        if (!name) {
3851          return;
3852        }
3853
3854        var open = localStorage.getItem(name);
3855        if (open === null) {
3856          return;
3857        }
3858
3859        if (open === '1') {
3860          $details.attr('open', 'open');
3861        }
3862        else {
3863          $details.removeAttr('open');
3864        }
3865      });
3866    }
3867
3868  };
3869
3870  /**
3871   * Get the name used to store the state of details element.
3872   *
3873   * @param {jQuery} $details
3874   *   A details element.
3875   *
3876   * @return {string}
3877   *   The name used to store the state of details element.
3878   */
3879  Drupal.webformDetailsSaveGetName = function ($details) {
3880    if (!hasLocalStorage) {
3881      return '';
3882    }
3883
3884    // Ignore details that are vertical tabs pane.
3885    if ($details.hasClass('vertical-tabs__pane')) {
3886      return '';
3887    }
3888
3889    // Any details element not included a webform must have define its own id.
3890    var webformId = $details.attr('data-webform-element-id');
3891    if (webformId) {
3892      return 'Drupal.webform.' + webformId.replace('--', '.');
3893    }
3894
3895    var detailsId = $details.attr('id');
3896    if (!detailsId) {
3897      return '';
3898    }
3899
3900    var $form = $details.parents('form');
3901    if (!$form.length || !$form.attr('id')) {
3902      return '';
3903    }
3904
3905    var formId = $form.attr('id');
3906    if (!formId) {
3907      return '';
3908    }
3909
3910    // ISSUE: When Drupal renders a webform in a modal dialog it appends a unique
3911    // identifier to webform ids and details ids. (i.e. my-form--FeSFISegTUI)
3912    // WORKAROUND: Remove the unique id that delimited using double dashes.
3913    formId = formId.replace(/--.+?$/, '').replace(/-/g, '_');
3914    detailsId = detailsId.replace(/--.+?$/, '').replace(/-/g, '_');
3915    return 'Drupal.webform.' + formId + '.' + detailsId;
3916  };
3917
3918})(jQuery, Drupal);
3919;
3920/**
3921* DO NOT EDIT THIS FILE.
3922* See the following change record for more information,
3923* https://www.drupal.org/node/2815083
3924* @preserve
3925**/
3926(function (Drupal, debounce) {
3927  var liveElement;
3928  var announcements = [];
3929  Drupal.behaviors.drupalAnnounce = {
3930    attach: function attach(context) {
3931      if (!liveElement) {
3932        liveElement = document.createElement('div');
3933        liveElement.id = 'drupal-live-announce';
3934        liveElement.className = 'visually-hidden';
3935        liveElement.setAttribute('aria-live', 'polite');
3936        liveElement.setAttribute('aria-busy', 'false');
3937        document.body.appendChild(liveElement);
3938      }
3939    }
3940  };
3941  function announce() {
3942    var text = [];
3943    var priority = 'polite';
3944    var announcement;
3945    var il = announcements.length;
3946    for (var i = 0; i < il; i++) {
3947      announcement = announcements.pop();
3948      text.unshift(announcement.text);
3949      if (announcement.priority === 'assertive') {
3950        priority = 'assertive';
3951      }
3952    }
3953    if (text.length) {
3954      liveElement.innerHTML = '';
3955      liveElement.setAttribute('aria-busy', 'true');
3956      liveElement.setAttribute('aria-live', priority);
3957      liveElement.innerHTML = text.join('\n');
3958      liveElement.setAttribute('aria-busy', 'false');
3959    }
3960  }
3961  Drupal.announce = function (text, priority) {
3962    announcements.push({
3963      text: text,
3964      priority: priority
3965    });
3966    return debounce(announce, 200)();
3967  };
3968})(Drupal, Drupal.debounce);;
3969/**
3970 * @file
3971 * JavaScript behaviors for details element.
3972 */
3973
3974(function ($, Drupal) {
3975
3976  'use strict';
3977
3978  Drupal.webform = Drupal.webform || {};
3979  Drupal.webform.detailsToggle = Drupal.webform.detailsToggle || {};
3980  Drupal.webform.detailsToggle.options = Drupal.webform.detailsToggle.options || {};
3981
3982  /**
3983   * Attach handler to toggle details open/close state.
3984   *
3985   * @type {Drupal~behavior}
3986   */
3987  Drupal.behaviors.webformDetailsToggle = {
3988    attach: function (context) {
3989      $('.js-webform-details-toggle', context).once('webform-details-toggle').each(function () {
3990        var $form = $(this);
3991        var $tabs = $form.find('.webform-tabs');
3992
3993        // Get only the main details elements and ignore all nested details.
3994        var selector = ($tabs.length) ? '.webform-tab' : '.js-webform-details-toggle, .webform-elements';
3995        var $details = $form.find('details').filter(function () {
3996          var $parents = $(this).parentsUntil(selector);
3997          return ($parents.find('details').length === 0);
3998        });
3999
4000        // Toggle is only useful when there are two or more details elements.
4001        if ($details.length < 2) {
4002          return;
4003        }
4004
4005        var options = $.extend({
4006          button: '<button type="button" class="webform-details-toggle-state"></button>'
4007        }, Drupal.webform.detailsToggle.options);
4008
4009        // Create toggle buttons.
4010        var $toggle = $(options.button)
4011          .attr('title', Drupal.t('Toggle details widget state.'))
4012          .on('click', function (e) {
4013            // Get details that are not vertical tabs pane.
4014            var $details = $form.find('details:not(.vertical-tabs__pane)');
4015            var open;
4016            if (Drupal.webform.detailsToggle.isFormDetailsOpen($form)) {
4017              $details.removeAttr('open');
4018              open = 0;
4019            }
4020            else {
4021              $details.attr('open', 'open');
4022              open = 1;
4023            }
4024            Drupal.webform.detailsToggle.setDetailsToggleLabel($form);
4025
4026            // Set the saved states for all the details elements.
4027            // @see webform.element.details.save.js
4028            if (Drupal.webformDetailsSaveGetName) {
4029              $details.each(function () {
4030                // Note: Drupal.webformDetailsSaveGetName checks if localStorage
4031                // exists and is enabled.
4032                // @see webform.element.details.save.js
4033                var name = Drupal.webformDetailsSaveGetName($(this));
4034                if (name) {
4035                  localStorage.setItem(name, open);
4036                }
4037              });
4038            }
4039          })
4040          .wrap('<div class="webform-details-toggle-state-wrapper"></div>')
4041          .parent();
4042
4043        if ($tabs.length) {
4044          // Add toggle state before the tabs.
4045          $tabs.find('.item-list:first-child').eq(0).before($toggle);
4046        }
4047        else {
4048          // Add toggle state link to first details element.
4049          $details.eq(0).before($toggle);
4050        }
4051
4052        Drupal.webform.detailsToggle.setDetailsToggleLabel($form);
4053      });
4054    }
4055  };
4056
4057  /**
4058   * Determine if a webform's details are all opened.
4059   *
4060   * @param {jQuery} $form
4061   *   A webform.
4062   *
4063   * @return {boolean}
4064   *   TRUE if a webform's details are all opened.
4065   */
4066  Drupal.webform.detailsToggle.isFormDetailsOpen = function ($form) {
4067    return ($form.find('details[open]').length === $form.find('details').length);
4068  };
4069
4070  /**
4071   * Set a webform's details toggle state widget label.
4072   *
4073   * @param {jQuery} $form
4074   *   A webform.
4075   */
4076  Drupal.webform.detailsToggle.setDetailsToggleLabel = function ($form) {
4077    var isOpen = Drupal.webform.detailsToggle.isFormDetailsOpen($form);
4078
4079    var label = (isOpen) ? Drupal.t('Collapse all') : Drupal.t('Expand all');
4080    $form.find('.webform-details-toggle-state').html(label);
4081
4082    var text = (isOpen) ? Drupal.t('All details have been expanded.') : Drupal.t('All details have been collapsed.');
4083    Drupal.announce(text);
4084  };
4085
4086})(jQuery, Drupal);
4087;
4088/**
4089 * @file
4090 * JavaScript behaviors for message element integration.
4091 */
4092
4093(function ($, Drupal) {
4094
4095  'use strict';
4096
4097  // Determine if local storage exists and is enabled.
4098  // This approach is copied from Modernizr.
4099  // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
4100  var hasLocalStorage = (function () {
4101    try {
4102      localStorage.setItem('webform', 'webform');
4103      localStorage.removeItem('webform');
4104      return true;
4105    }
4106    catch (e) {
4107      return false;
4108    }
4109  }());
4110
4111  // Determine if session storage exists and is enabled.
4112  // This approach is copied from Modernizr.
4113  // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
4114  var hasSessionStorage = (function () {
4115    try {
4116      sessionStorage.setItem('webform', 'webform');
4117      sessionStorage.removeItem('webform');
4118      return true;
4119    }
4120    catch (e) {
4121      return false;
4122    }
4123  }());
4124
4125  /**
4126   * Behavior for handler message close.
4127   *
4128   * @type {Drupal~behavior}
4129   */
4130  Drupal.behaviors.webformMessageClose = {
4131    attach: function (context) {
4132      $(context).find('.js-webform-message--close').once('webform-message--close').each(function () {
4133        var $element = $(this);
4134
4135        var id = $element.attr('data-message-id');
4136        var storage = $element.attr('data-message-storage');
4137        var effect = $element.attr('data-message-close-effect') || 'hide';
4138        switch (effect) {
4139          case 'slide': effect = 'slideUp'; break;
4140
4141          case 'fade': effect = 'fadeOut'; break;
4142        }
4143
4144        // Check storage status.
4145        if (isClosed($element, storage, id)) {
4146          return;
4147        }
4148
4149        // Only show element if it's style is not set to 'display: none'
4150        // and it is not hidden via .js-webform-states-hidden.
4151        if ($element.attr('style') !== 'display: none;' && !$element.hasClass('js-webform-states-hidden')) {
4152          $element.show();
4153        }
4154
4155        $element.find('.js-webform-message__link').on('click', function (event) {
4156          $element[effect]();
4157          setClosed($element, storage, id);
4158          $element.trigger('close');
4159          event.preventDefault();
4160        });
4161      });
4162    }
4163  };
4164
4165  function isClosed($element, storage, id) {
4166    if (!id || !storage) {
4167      return false;
4168    }
4169
4170    switch (storage) {
4171      case 'local':
4172        if (hasLocalStorage) {
4173          return localStorage.getItem('Drupal.webform.message.' + id) || false;
4174        }
4175        return false;
4176
4177      case 'session':
4178        if (hasSessionStorage) {
4179          return sessionStorage.getItem('Drupal.webform.message.' + id) || false;
4180        }
4181        return false;
4182
4183      default:
4184        return false;
4185    }
4186  }
4187
4188  function setClosed($element, storage, id) {
4189    if (!id || !storage) {
4190      return;
4191    }
4192
4193    switch (storage) {
4194      case 'local':
4195        if (hasLocalStorage) {
4196          localStorage.setItem('Drupal.webform.message.' + id, true);
4197        }
4198        break;
4199
4200      case 'session':
4201        if (hasSessionStorage) {
4202          sessionStorage.setItem('Drupal.webform.message.' + id, true);
4203        }
4204        break;
4205
4206      case 'user':
4207      case 'state':
4208      case 'custom':
4209        $.get($element.find('.js-webform-message__link').attr('href'));
4210        return true;
4211    }
4212  }
4213
4214})(jQuery, Drupal);
4215;
4216/**
4217 * @file
4218 * JavaScript behaviors for select menu.
4219 */
4220
4221(function ($, Drupal) {
4222
4223  'use strict';
4224
4225  /**
4226   * Disable select menu options using JavaScript.
4227   *
4228   * @type {Drupal~behavior}
4229   */
4230  Drupal.behaviors.webformSelectOptionsDisabled = {
4231    attach: function (context) {
4232      $('select[data-webform-select-options-disabled]', context).once('webform-select-options-disabled').each(function () {
4233        var $select = $(this);
4234        var disabled = $select.attr('data-webform-select-options-disabled').split(/\s*,\s*/);
4235        $select.find('option').filter(function isDisabled() {
4236          return ($.inArray(this.value, disabled) !== -1);
4237        }).attr('disabled', 'disabled');
4238      });
4239    }
4240  };
4241
4242})(jQuery, Drupal);
4243;
4244// Polyfill for object entries for IE
4245if (!Object.entries) {
4246    Object.entries = function( obj ){
4247        var ownProps = Object.keys( obj ),
4248            i = ownProps.length,
4249            resArray = new Array(i); // preallocate the Array
4250        while (i--)
4251            resArray[i] = [ownProps[i], obj[ownProps[i]]];
4252
4253        return resArray;
4254    };
4255}
4256
4257class CookiesServices {
4258    cookies_duration = 34128000;
4259    youtube_legacy_event = 'tacyoutube';
4260    youtube_new_event = 'ytv.setup';
4261
4262    /* Load google analytics ga script */
4263    load_analytics( ua ) {
4264
4265        var self = this;
4266
4267        if( !ua ) return;
4268
4269        window.GoogleAnalyticsObject = 'ga';
4270        window.ga = window.ga || function () {
4271            window.ga.q = window.ga.q || [];
4272            window.ga.q.push(arguments);
4273        };
4274        window.ga.l = new Date();
4275
4276        this.add_script( '//www.google-analytics.com/analytics.js', 'services-analytics', function () {
4277            ga( 'create', ua, { 'cookieExpires': self.cookies_duration } );
4278            ga( 'send', 'pageview' );
4279        });
4280    }
4281
4282    /* Add handle for youtube API players */
4283    load_youtube_api() {
4284        // Add IE support for Event
4285        if( typeof( Event ) === 'function' ) {
4286            var tacyoutube = new Event( this.youtube_legacy_event );
4287            var allowYouTube = new Event( this.youtube_new_event );
4288        } else {
4289            var tacyoutube = document.createEvent( 'Event' );
4290            tacyoutube.initEvent( this.youtube_legacy_event , true, true );
4291            var allowYouTube = document.createEvent( 'Event' );
4292            allowYouTube.initEvent( this.youtube_new_event, true, true );
4293        }
4294
4295        window.addEventListener( "load", function () {
4296            window.dispatchEvent( tacyoutube );
4297            window.dispatchEvent( allowYouTube );
4298        } );
4299
4300        window.dispatchEvent( tacyoutube );
4301        window.dispatchEvent( allowYouTube );
4302    }
4303
4304    /* Add handle for youtube API players */
4305    init_iframes() {
4306        document.querySelectorAll( '[data-requires-vendor-consent]' ).forEach( function( el ) {
4307
4308            var vendor = el.getAttribute( 'data-requires-vendor-consent' ),
4309                url = el.getAttribute( 'data-src' ),
4310                button_classes = el.getAttribute( 'data-button-classes' ) || window.cookies_button_callback_classes,
4311                button_label = el.getAttribute( 'data-button-label' ) || window.cookies_button_callback_text;
4312
4313            if( !vendor ) return;
4314
4315            var button = document.createElement( 'button' );
4316
4317            // We add the button to accept the vendor service
4318            if( url ) {
4319                button.type = 'button';
4320                button.setAttribute( 'class', button_classes );
4321                button.setAttribute( 'data-vendor', vendor );
4322                button.innerHTML = button_label;
4323                el.appendChild( button );
4324
4325                // The listen to click to the cta to request the acceptation.
4326                button.addEventListener( 'click', function( e ) {
4327                    e.preventDefault();
4328                    axeptioSDK.requestConsent(vendor);
4329                })
4330            }
4331        } );
4332    }
4333
4334    load_iframes( choices ) {
4335        document.querySelectorAll( '[data-requires-vendor-consent]' ).forEach( function( el ) {
4336            // if the vendor is accepted  we build
4337            var vendor = el.getAttribute( 'data-requires-vendor-consent' ),
4338                url = el.getAttribute( 'data-src' ),
4339                iframe = document.createElement( 'iframe' ),
4340                width = el.getAttribute( 'width' ),
4341                height = el.getAttribute('height');
4342
4343            el.setAttribute('style', 'width:100%;height:100%;');
4344
4345            // We add the iframe if we found the url and the service is accepted
4346            if( vendor && url && choices[ vendor ] ) {
4347                // Remove the cta
4348                var button = el.querySelector( 'button' );
4349                if( button ) button.remove();
4350
4351                // Add the iframe
4352                iframe.type = 'text/html';
4353                iframe.setAttribute( 'src', url );
4354                iframe.setAttribute( 'frameborder', '0' );
4355                iframe.setAttribute( 'allowfullscreen', 'true' );
4356                iframe.setAttribute( 'width', width );
4357                iframe.setAttribute( 'height', height );
4358                el.appendChild( iframe );
4359            }
4360
4361        })
4362    }
4363
4364    /* Add script in page*/
4365    add_script( url, id, callback ) {
4366        var script,
4367        done = false;
4368        script = document.createElement('script');
4369        script.type = 'text/javascript';
4370        script.id = (id !== undefined) ? id : '';
4371        script.defer = true;
4372        script.async = false;
4373        script.src = url;
4374
4375        if (typeof callback === 'function') {
4376            script.onreadystatechange = script.onload = function () {
4377                var state = script.readyState;
4378                if (!done && (!state || /loaded|complete/.test(state))) {
4379                    done = true;
4380                    callback();
4381                }
4382            };
4383        }
4384
4385        document.getElementsByTagName('head')[0].appendChild(script);
4386    }
4387
4388    /* Check if a service is refused */
4389    at_least_one_is_refused( choices ) {
4390        var is_refused = false;
4391
4392        if( choices ) {
4393            Object.entries( choices ).forEach( function( choice ) {
4394                if( choice.length > 0 && !choice[ 1 ] ) {
4395                    is_refused = true;
4396                    return;
4397                }
4398            } );
4399        }
4400
4401        return is_refused;
4402    }
4403
4404    /* Get vendors list */
4405    getAllVendorNames(axeptio) {
4406        let vendors = [];
4407        if(axeptio.config.cookies[0].steps[1].vendors) {
4408            axeptio.config.cookies[0].steps[1].vendors.forEach(vendor => {
4409                vendors.push( vendor.name );
4410            })
4411        }
4412        return vendors;
4413    }
4414
4415    /* Has new vendor ? */
4416    hasNewVendor(axeptio, choices) {
4417        const vendors = this.getAllVendorNames(axeptio);
4418        let hasNewVendor = false;
4419        vendors.forEach(vendor => {
4420            if( choices[vendor] === undefined ) {
4421                hasNewVendor = vendor;
4422                return;
4423            }
4424        });
4425        return hasNewVendor;
4426    }
4427};
4428
4429document.addEventListener( "DOMContentLoaded", function() {
4430    // Add the services
4431    window.CookiesServices = new CookiesServices;
4432    window.CookiesServices.init_iframes();
4433    // Store the information the user haven't already choose in the current page
4434    window.userHaveChosenOnce = false;
4435
4436    // Init cookies manager handler
4437    void 0 === window._axcb && ( window._axcb = [] );
4438    window._axcb.push( function( axeptio ) {
4439
4440        axeptio.on("cookies:complete", function( choices ) {
4441
4442            if( window.CookiesServices.hasNewVendor(axeptio, choices) !== false ) {
4443                openAxeptioCookies();
4444            }
4445
4446            if( choices.google_analytics ) {
4447                window.CookiesServices.load_analytics( window.google_analytics_ua );
4448            }
4449
4450            if( choices.youtube_api ) {
4451                window.CookiesServices.load_youtube_api();
4452            }
4453
4454            window.CookiesServices.load_iframes( choices );
4455
4456            // Reload page if its a new choice
4457            // to unload the scripts if a user accepted then refused the cookies
4458            if( window.userHaveChosenOnce && window.CookiesServices.at_least_one_is_refused( choices ) )
4459                window.location.reload();
4460
4461            window.userHaveChosenOnce = true;
4462        } );
4463    } );
4464
4465} );
4466;
4467class CheckboxAxeptio {
4468
4469    settings = {};
4470    clientId = null;
4471    userToken = null;
4472    consentCheckboxID = null;
4473    triggerElement = null;
4474    checkboxElement = null;
4475    urlGet = null;
4476    urlPost = null;
4477
4478    constructor(settings) {
4479        // console.log('Constructor', settings.checkboxElement, settings.triggerElement, settings.consentCheckboxID);
4480        if (!settings.checkboxElement || !settings.triggerElement || !settings.consentCheckboxID) {
4481            console.error('Missing settings to instanciate axeptio');
4482            return false;
4483        }
4484        this.settings = settings;
4485        this.init = this.init.bind(this);
4486        void 0 === window._axcb && (window._axcb = []);
4487        window._axcb.push(this.init);
4488    }
4489
4490    init(axeptio) {
4491        this.checkboxElement = this.settings.checkboxElement;
4492        this.triggerElement = this.settings.triggerElement;
4493        this.consentCheckboxID = this.settings.consentCheckboxID;
4494        this.clientId = axeptio.settings.clientId;
4495        this.userToken = axeptio.settings.tokenInstance.value;
4496        this.urlPost = "https://api.axept.io/v1/app/consents/" + this.clientId + "/consentCheckbox/" + this.consentCheckboxID;
4497        this.urlGet = "https://api.axept.io/v1/app/consent/" + this.clientId + "/fr/consentCheckbox/" + this.consentCheckboxID + "?token=" + this.userToken;
4498
4499        this.setEvents();
4500    }
4501
4502    setEvents() {
4503        this.getConsent();
4504        this.postConsent = this.postConsent.bind(this);
4505        this.triggerElement.addEventListener('submit', this.postConsent);
4506    }
4507
4508    postConsent() {
4509        const data = '{"accept":' + this.checkboxElement.checked + ',"preferences":{"vendors":{}},"token":"' + this.userToken + '"}';
4510        const xhr = new XMLHttpRequest();
4511        xhr.open("POST", this.urlPost);
4512        xhr.setRequestHeader("Accept", "application/json");
4513        xhr.setRequestHeader("Content-Type", "application/json");
4514        xhr.onreadystatechange = e => {
4515            if (xhr.readyState === 4) {
4516                // console.log("urlPost, xhr.status", xhr.status);
4517                // console.log("urlPost, xhr.responseText", JSON.parse(xhr.responseText));
4518                const response = JSON.parse(xhr.responseText);
4519                this.isConsentSaved(response);
4520            }
4521        };
4522        xhr.send(data);
4523    }
4524
4525    getConsent() {
4526        // console.log('getConsent');
4527        const xhr = new XMLHttpRequest();
4528        xhr.open("GET", this.urlGet);
4529        xhr.setRequestHeader("Accept", "application/json");
4530        xhr.onreadystatechange = () => {
4531            if (xhr.readyState === 4) {
4532                // console.log("urlGet, xhr.status", xhr.status);
4533                // console.log("urlGet, xhr.responseText", JSON.parse(xhr.responseText));
4534                const response = JSON.parse(xhr.responseText);
4535                this.checkboxElement.checked = response.accept;
4536            }
4537        };
4538        xhr.send();
4539    }
4540
4541    isConsentSaved(axeptioResponse) {
4542        if (axeptioResponse.accept) {
4543            this.element.dispatchEvent(new Event('axeptio.consent.accepted'));
4544        } else {
4545            this.element.dispatchEvent(new Event('axeptio.consent.rejected'));
4546        }
4547
4548        if (!axeptioResponse.accept) { // Legacy support
4549            this.element.dispatchEvent(new Event('axeptio.on.consent'));
4550        }
4551    }
4552}
4553;
4554var contactCheckbox = [];
4555
4556(function (Drupal, drupalSettings) {
4557
4558    'use strict';
4559
4560    Drupal.behaviors.axeptio = {
4561        attach: function (context, settings) {
4562
4563            if (context === document) {
4564                if (drupalSettings.axeptio !== undefined && drupalSettings.axeptio.clientId !== null) {
4565
4566                    if (drupalSettings.path.currentPathIsAdmin === true && drupalSettings.axeptio.admin_rendering == null) {
4567                        return;
4568                    }
4569
4570                    window.axeptioSettings = {
4571                        clientId: drupalSettings.axeptio.clientId,
4572                        cookiesVersion: drupalSettings.axeptio.cookiesVersion + '-' + drupalSettings.axeptio.language,
4573                        userCookiesDuration: drupalSettings.axeptio.cookiesDuration,
4574                    };
4575
4576                    if (drupalSettings.axeptio.consentModeV2 === false){
4577                        (function(d, s) {
4578                            var t = d.getElementsByTagName(s)[0], e = d.createElement(s);
4579                            e.async = true; e.src = "//static.axept.io/sdk.js";
4580                            t.parentNode.insertBefore(e, t);
4581                        })(document, "script");
4582                    }
4583
4584                    // Et ici on va créer la checkbox
4585                    if (drupalSettings.axeptio.checkboxes !== undefined) {
4586
4587                        var checkboxes = JSON.parse(drupalSettings.axeptio.checkboxes);
4588
4589                        checkboxes.forEach((item) => {
4590
4591                            if (item.identifier != '') {
4592
4593                                const checkbox = document.querySelector(item.id + ' input[type="checkbox"]');
4594
4595                                if (checkbox != null) {
4596                                    const form = checkbox.form;
4597
4598                                    contactCheckbox[item.identifier] = new CheckboxAxeptio({
4599                                        checkboxElement: checkbox,
4600                                        triggerElement: form,
4601                                        consentCheckboxID: item.identifier,
4602                                    });
4603                                }
4604                            }
4605                        })
4606                    }
4607
4608                    //obtention du token  utilisateur
4609                    var button = document.querySelector('.cookies_get_token');
4610                    console.log(button);
4611                    if (button) {
4612                        button.addEventListener('click', function (e) {
4613                            // Block default click
4614                            e.preventDefault();
4615
4616                            if (typeof axeptioSDK !== typeof undefined) {
4617                                // wordk too : axeptioSDK.userPreferencesManager.settings.token
4618                                window.alert('Token : ' + axeptioSDK.settings.token);
4619                            }
4620
4621                        }, false);
4622                    }
4623                }
4624            }
4625        }
4626    }
4627
4628}(Drupal, drupalSettings));
4629;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.