1/* Minification failed. Returning unminified contents. 2(1341,11-12): run-time error JS1010: Expected identifier: . 3(1341,11-12): run-time error JS1195: Expected expression: . 4 */ 5/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */�
vendor: 87,444 bytes, lines 5-6
5 6!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(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.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:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.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||v(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&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+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]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(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},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},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(c(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:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=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))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(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&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(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&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(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 U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);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&&C){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=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,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(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===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]||I.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]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(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(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(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=I.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(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(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:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?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=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!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 q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(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]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[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?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(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 Z(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 ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(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=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.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=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(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&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.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(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.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 ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.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&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.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){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.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},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.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 ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(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,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.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=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(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},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(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[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(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(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.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&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.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=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.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=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.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 ne={};function re(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]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={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 Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(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"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.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<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(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)Le(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=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.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),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.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,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.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=ce.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=((ce.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<ce(i,this).index(l):ce.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(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(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[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,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&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.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},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(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=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(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=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.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 $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(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&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=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},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.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 Ye(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%",J.appendChild(u).appendChild(l);var e=ie.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),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{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=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[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+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!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,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.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=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.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=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.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):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.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=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),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:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.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=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.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=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(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),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.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&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._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--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.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||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.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=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.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||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.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})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.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=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(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(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.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=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.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)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(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 v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(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=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.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||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.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]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(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)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.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 Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,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":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),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,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.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&&(v.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),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.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&&ie.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]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.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}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.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(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(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 v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!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(Yt[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&&ie.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()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.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 ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<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)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.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),v(t)&&(t=t.call(e,n,ce.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)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.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"===ce.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"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(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)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(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?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.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.on("mouseenter",e).on("mouseleave",t||e)}}),ce.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){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});
6 7; 8jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*(--t*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return t==0?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return t==d?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;
8if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*2*Math.PI/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*.3*1.5;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*2*Math.PI/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*t*t*(((s*=1.525)+1)*t-s)+b;return c/2*((t-=2)*t*(((s*=1.525)+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<1/2.75){return c*7.5625*t*t+b}else if(t<2/2.75){return c*(7.5625*(t-=1.5/2.75)*t+.75)+b}else if(t<2.5/2.75){return c*(7.5625*(t-=2.25/2.75)*t+.9375)+b}else{return c*(7.5625*(t-=2.625/2.75)*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});; 9/*! 10 * jQuery Cookie Plugin v1.3.1 11 * https://github.com/carhartl/jquery-cookie 12 * 13 * Copyright 2013 Klaus Hartl 14 * Released under the MIT license 15 */ 16(function(e,f,b){var d=/\+/g;function g(j){return j}function h(j){return c(decodeURIComponent(j.replace(d," ")))}function c(j){if(j.indexOf('"')===0){j=j.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}return j}function i(j){return a.json?JSON.parse(j):j}var a=e.cookie=function(r,q,w){if(q!==b){w=e.extend({},a.defaults,w);if(q===null){w.expires=-1}if(typeof w.expires==="number"){var s=w.expires,v=w.expires=new Date();v.setDate(v.getDate()+s)}q=a.json?JSON.stringify(q):String(q);return(f.cookie=[encodeURIComponent(r),"=",a.raw?q:encodeURIComponent(q),w.expires?"; expires="+w.expires.toUTCString():"",w.path?"; path="+w.path:"",w.domain?"; domain="+w.domain:"",w.secure?"; secure":""].join(""))}var j=a.raw?g:h;var u=f.cookie.split("; ");var x=r?null:{};for(var p=0,n=u.length;p<n;p++){var o=u[p].split("=");var k=j(o.shift());var m=j(o.join("="));if(r&&r===k){x=i(m);break}if(!r){x[k]=i(m)}}return x};a.defaults={};e.removeCookie=function(k,j){if(e.cookie(k)!==null){e.cookie(k,null,j);return true}return false}})(jQuery,document);; 17/*! Lazy Load 1.9.7 - MIT license - Copyright 2010-2015 Mika Tuupola */ 18!function(a,b,c,d){var e=a(b);a.fn.lazyload=function(f){function g(){var b=0;i.each(function(){var c=a(this);if(!j.skip_invisible||c.is(":visible"))if(a.abovethetop(this,j)||a.leftofbegin(this,j));else if(a.belowthefold(this,j)||a.rightoffold(this,j)){if(++b>j.failure_limit)return!1}else c.trigger("appear"),b=0})}var h,i=this,j={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:b,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(d!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),d!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),a.extend(j,f)),h=j.container===d||j.container===b?e:a(j.container),0===j.event.indexOf("scroll")&&h.bind(j.event,function(){return g()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,(c.attr("src")===d||c.attr("src")===!1)&&c.is("img")&&c.attr("src",j.placeholder),c.one("appear",function(){if(!this.loaded){if(j.appear){var d=i.length;j.appear.call(b,d,j)}a("<img />").bind("load",function(){var d=c.attr("data-"+j.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[j.effect](j.effect_speed),b.loaded=!0;var e=a.grep(i,function(a){return!a.loaded});if(i=a(e),j.load){var f=i.length;j.load.call(b,f,j)}}).attr("src",c.attr("data-"+j.data_attribute))}}),0!==j.event.indexOf("scroll")&&c.bind(j.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){g()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&i.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){g()}),this},a.belowthefold=function(c,f){var g;
18return g=f.container===d||f.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(f.container).offset().top+a(f.container).height(),g<=a(c).offset().top-f.threshold},a.rightoffold=function(c,f){var g;return g=f.container===d||f.container===b?e.width()+e.scrollLeft():a(f.container).offset().left+a(f.container).width(),g<=a(c).offset().left-f.threshold},a.abovethetop=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollTop():a(f.container).offset().top,g>=a(c).offset().top+f.threshold+a(c).height()},a.leftofbegin=function(c,f){var g;return g=f.container===d||f.container===b?e.scrollLeft():a(f.container).offset().left,g>=a(c).offset().left+f.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);; 19/*! 20 * Bootstrap v3.4.1 (https://getbootstrap.com/) 21 * Copyright 2011-2019 Twitter, Inc. 22 * Licensed under the MIT license 23 */ 24if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";var e=jQuery.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one("bsTransitionEnd",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',a=function(t){s(t).on("click",e,this.close)};a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),i="#"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger("closed.bs.alert").remove()}t&&t.preventDefault(),o.length||(o=e.closest(".alert")),o.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(o.removeClass("in"),s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new a(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,a.prototype.close)}(jQuery),function(s){"use strict";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data("bs.button"),i="object"==typeof o&&o;e||t.data("bs.button",e=new n(this,i)),"toggle"==o?e.toggle():o&&e.setState(o)})}n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var e="disabled",i=this.$element,o=i.is("input")?"val":"html",n=i.data();t+="Text",null==n.resetText&&i.data("resetText",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var e=s(t.target).closest(".btn");i.call(e,"toggle"),s(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),e.is("input,button")?e.trigger("focus"):e.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){s(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){"use strict";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("key
24down.bs.carousel",p.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",p.proxy(this.pause,this)).on("mouseleave.bs.carousel",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data("bs.carousel"),i=p.extend({},c.DEFAULTS,t.data(),"object"==typeof n&&n),o="string"==typeof n?n:i.slide;e||t.data("bs.carousel",e=new c(this,i)),"number"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION="3.4.1",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if(("prev"==t&&0===i||"next"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),o=e||this.getItemForDirection(t,i),n=this.interval,s="next"==t?"left":"right",a=this;if(o.hasClass("active"))return this.sliding=!1;var r=o[0],l=p.Event("slide.bs.carousel",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var d=p.Event("slid.bs.carousel",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass("slide")?(o.addClass(t),"object"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr("href");i&&(i=i.replace(/.*(?=#[^\s]+$)/,""));var o=e.attr("data-target")||i,n=p(document).find(o);if(n.hasClass("carousel")){var s=p.extend({},n.data(),e.data()),a=e.attr("data-slide-to");a&&(s.interval=!1),r.call(n,s),a&&n.data("bs.carousel").to(a),t.preventDefault()}};p(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),p(window).on("load",function(){p('[data-ride="carousel"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){"use strict";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr("data-target")||(e=t.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data("bs.collapse"),i=a.extend({},r.DEFAULTS,t.data(),"object"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data("bs.collapse",e=new r(this,i)),"string"==typeof o&&e[o]()})}r.VERSION="3.4.1",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(t=e.data("bs.collapse"))&&t.transitioning)){var i=a.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,"hide"),t||e.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var n=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return n.call(this);
vendor: 4,207 bytes, line 24
24var s=a.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=a.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition)return i.call(this);this.$element[e](0).one("bsTransitionEnd",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var e=a(this);e.attr("data-target")||t.preventDefault();var i=n(e),o=i.data("bs.collapse")?"toggle":e.data();l.call(i,o)})}(jQuery),function(a){"use strict";var r='[data-toggle="dropdown"]',o=function(t){a(t).on("click.bs.dropdown",this.toggle)};function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(".dropdown-backdrop").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass("open")&&(o&&"click"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event("hide.bs.dropdown",i)),o.isDefaultPrevented()||(t.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",i)))))}))}o.VERSION="3.4.1",o.prototype.toggle=function(t){var e=a(this);if(!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(s(),!o){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",s);var n={relatedTarget:this};if(i.trigger(t=a.Event("show.bs.dropdown",n)),t.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(a.Event("shown.bs.dropdown",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),o=i.hasClass("open");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger("focus"),e.trigger("click");var n=i.find(".dropdown-menu li:not(.disabled):visible a");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger("focus")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new o(this)),"string"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on("click.bs.dropdown.data-api",s).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,o.prototype.toggle).on("keydown.bs.dropdown.data-api",r,o.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",o.prototype.keydown)}(jQuery),function(a){"use strict";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(".modal
24-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data("bs.modal"),i=a.extend({},s.DEFAULTS,t.data(),"object"==typeof o&&o);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION="3.4.1",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){o.$element.one("mouseup.dismiss.bs.modal",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass("fade");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass("in"),o.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:i});t?o.$dialog.one("bsTransitionEnd",function(){o.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger("focus").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},s.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+i).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;o?this.$backdrop.one("bsTransitionEnd",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css("padding-right");a(e).data("padding-right",i).css("padding-right",parseFloat(o)+n+"px")}))},s.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data("padding-right");a(e).removeData("padding-right"),e.style.paddingRight=i||""})},s.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=a(this),i=e.attr("href"),o=e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,""),n=a(document).find(o),s=n.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is("a")&&t.preventDefault(),n.one("show.bs.modal",function(t){t.isDefaultPrevented()||n.one("hidden.bs.modal",function(){e.is(":visible")&&e.trigger("focus")})}),r.call(n,s,this)})}(jQuery),function(g){"use strict";var o=["sanitize","whiteList","sanitizeFn"],a=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;
vendor: 16,510 bytes, line 24
24n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&"function"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument("sanitization");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find("*"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e["*"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};m.VERSION="3.4.1",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,g.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",r="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e)),t instanceof g.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr("id",n),this.$element.attr("aria-describedby",n),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+d>c.bottom?"top":"top"==s&&l.top-d<c.top?"bottom":"right"==s&&l.right+h>c.width?"left":"left"==s&&l.left-h<c.left?"right":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger("shown.bs."+i.type),i.hoverState=null,"out"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass("in");var r=i[0].offsetWidth,l=i[0].offsetHeight;"top"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?"offsetWidth":"offsetHeight";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(e)):t.find(".tooltip-inner").text(e),t.removeClass("fade in top bottom left right")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event("hide.bs."+this.type);function n(){"in"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass("in"),g.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i="BODY"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data("bs.tooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.tooltip",e=new m(this,i)),"string"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");s.VERSION="3.4.1",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===o&&(i=this.sanitizeHtml(i))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===o?"html":"append"](i)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(i);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data("bs.popover"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.popover",e=new s(this,i)),"string"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){"use strict";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof o&&o;e||t.data("bs.scrollspy",e=new n(this,i)),"string"==typeof o&&e[o]()})}n.VERSION="3.4.1",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(":visible")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load.bs.scrollspy.data-api",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){"use strict";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new a(this)),"string"==typeof i&&e[i]()})}a.VERSION="3.4.1",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var o=e.find(".active:last a"),n=r.Event("hide.bs.tab",{relatedTarget:t[0]}),s=r.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest("li"),e),this.activate(a,a.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:t[0]}),t.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find("> .active"),n=i&&r.support.transition&&(o.length&&o.hasClass("fade")||!!e.find("> .fade").length);function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),n?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}o.length&&n?o.one("bsTransitionEnd",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass("in")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),"show")};r(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(l){"use strict";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on("scroll.bs.affix.data-api",l.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data("bs.affix"),i="object"==typeof o&&o;
24e||t.data("bs.affix",e=new h(this,i)),"string"==typeof o&&e[o]()})}h.VERSION="3.4.1",h.RESET="affix affix-top affix-bottom",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return n<i&&"top";if("bottom"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&"bottom":!(n+a<=t-o)&&"bottom";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?"top":null!=o&&t-o<=l+(r?a:e)&&"bottom"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());"object"!=typeof e&&(o=i=e),"function"==typeof i&&(i=e.top(this.$element)),"function"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var a="affix"+(s?"-"+s:""),r=l.Event(a+".bs.affix");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on("load",function(){l('[data-spy="affix"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);; 25/** 26 * From http://tympanus.net/Development/FullscreenOverlayStyles/index3.html. 27 */ 28 29 30(function ($) { 31 $.fn.toggleOverlay = function() { 32 var el = this, 33 overlay = document.querySelector( 'div.overlay' ), 34 closeBttn = overlay.querySelector( 'button.overlay-close' ); 35 transEndEventNames = { 36 'WebkitTransition': 'webkitTransitionEnd', 37 'MozTransition': 'transitionend', 38 'OTransition': 'oTransitionEnd', 39 'msTransition': 'MSTransitionEnd', 40 'transition': 'transitionend' 41 }, 42 transEndEventName = transEndEventNames[ 'transition' ], 43 support = { transitions : true }; 44 45 46 if (el.hasClass("overlay") && el.hasClass("open")) { 47 el.removeClass("open"); 48 el.addClass("close"); 49 // $("body").css("overflow-y", "auto"); 50 51 var onEndTransitionFn = function (ev) { 52 if( support.transitions ) { 53 if( ev.originalEvent.propertyName !== 'visibility' ) return; 54 $(this).off(transEndEventName, onEndTransitionFn); 55 } 56 el.removeClass("close"); 57 }; 58 59 if (support.transitions) { 60 el.on(transEndEventName, onEndTransitionFn); 61 } 62 else { 63 onEndTransitionFn(); 64 } 65 66 } 67 else { 68 el.addClass("open"); 69 // $("body").css("overflow-y", "hidden"); 70 } 71 72 return this; 73 } 74}(jQuery)); 75; 76var Utility = { 77 splitParam: function (input) { 78 var nameValuePairs = {}; 79 var e, 80 a = /\+/g, // Regex for replacing addition symbol with a space 81 r = /([^&=]+)=?([^&]*)/g, 82 d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, 83 q = input; 84 85 while (e = r.exec(q)) 86 nameValuePairs[d(e[1])] = d(e[2]); 87 88 return nameValuePairs; 89 }, 90 91 GetAbsoluteURL: function () { 92 var currentUrl = location.href.toString(); 93 if (currentUrl.toLowerCase().indexOf(res.SECURESERVER.toLowerCase()) >= 0) { 94 return res.SECURESERVER; 95 } 96 else { 97 if (typeof (global) != 'undefined') { 98 return global.store.storeServer; 99 } 100 else { 101 return ""; 102 } 103 } 104 105 }, 106 107 RemoveUTM: function () { 108 if (loc.search.includes("utm")) { 109 if (window.history.replaceState) { 110 history.replaceState({}, '', loc.pathname); 111 } 112 else { 113 loc.hash = ''; 114 } 115 } 116 }, 117 118 CurrencyParser: { 119 // ===== Example ===== 120 //console.log(Utility.CurrencyParser.parse("1.799,98â¬")); // 1799.98 (de) 121 //console.log(Utility.CurrencyParser.parse("3 799,00zÅ")); // 3799 (pl) 122 //console.log(Utility.CurrencyParser.parse("â¬1,999.98")); // 1999.98 (en) 123 //console.log(Utility.CurrencyParser.parse("NT$4,190")); // 4190 (tw) 124 //console.log(Utility.CurrencyParser.getCountryInfo()); //{type: 'eu', group: '.', dec: ',', hasDecimal: true, â¦} 125 storeId: global.store.id, 126 formats: [ 127 { 128 type: "en", // US-style 129 group: ",", 130 dec: ".", 131 hasDecimal: true, 132 countries: [ 133 { id: 1, name: "Singapore" }, 134 { id: 3, name: "Hong Kong SAR, PRC" }, 135 { id: 4, name: "Australia" }, 136 { id: 7, name: "PanEuro" }, 137 { id: 12, name: "United Kingdom" }, 138 { id: 15, name: "United States" }, 139 { id: 38, name: "Malaysia" }, 140 { id: 42, name: "Canada" }, 141 ] 142 }, 143 { 144 type: "eu", // European-style 145 group: ".", 146 dec: ",", 147 hasDecimal: true, 148 countries: [ 149 { id: 9, name: "Germany" }, 150 { id: 10, name: "Italy" }, 151 { id: 11, name: "Spain" }, 152 ] 153 }, 154 { 155 type: "fr", // French/Polish-style 156 group: " ", 157 dec: ",", 158 hasDecimal: true, 159 countries: [ 160 { id: 8, name: "France" }, 161 { id: 37, name: "Poland" }, 162 ] 163 }, 164 { 165 type: "jp", // Japanese-style 166 group: ",", 167 dec: "", 168 hasDecimal: false, // no decimal 169 countries: [ 170 { id: 2, name: "Japan" }, 171 { id: 29, name: "Taiwan" }, 172 ] 173 } 174 ], 175 formatMap: {}, 176 init: function () { 177 var self = this;
178 self.formats.forEach(function (format) { 179 format.countries.forEach(function (country) { 180 self.formatMap[country.id] = Object.assign({}, format, country); 181 }); 182 }); 183 return self; 184 }, 185 parse: function (val) { 186 // 1. Get format config 187 const fmt = this.formatMap[this.storeId] || { group: ",", dec: ".", hasDecimal: true }; 188 189 // 2. Remove all symbols except digits, decimal/group separators, minus 190 let s = String(val).replace(/[^\d.,-]/g, '').replace(/-/g, ''); 191 192 // 3. Safety check: only if this locale supports decimal and value contains only one separator 193 if (fmt.hasDecimal) { 194 const separators = (s.match(/[.,]/g) || []); 195 if (separators.length === 1) { 196 const sep = separators[0]; 197 if (sep === fmt.dec) { 198 if (fmt.dec !== '.') s = s.replace(fmt.dec, '.'); 199 return parseFloat(s); 200 } 201 } 202 } 203 204 // 4. Remove thousand separators 205 if (fmt.group) s = s.split(fmt.group).join(''); 206 207 // 5. Replace locale decimal with '.' 208 if (fmt.dec && fmt.dec !== '.') s = s.replace(fmt.dec, '.'); 209 210 // 6. Parse to float 211 return parseFloat(s); 212 }, 213 214 getCountryInfo: function () { 215 return this.formatMap[this.storeId] || null; 216 } 217 } 218}; 219Utility.CurrencyParser.init(); 220 221var urlParams = {}; 222(function () { 223 var e, 224 a = /\+/g, // Regex for replacing addition symbol with a space 225 r = /([^&=]+)=?([^&]*)/g, 226 d = function (s) { return decodeURIComponent(s.replace(a, " ")); }, 227 q = window.location.search.substring(1); 228 229 while (e = r.exec(q)) { 230 urlParams[d(e[1]).toLowerCase()] = d(e[2]); 231 } 232})(); 233 234/** 235 * String.format for JavaScript 236 * www.masterdata.se/r/string_format_for_javascript/ 237 */ 238 239var msf = {}; (function () { function B(E) { return (E < 10 ? "0" : "") + E } function D(F) { F = F.toLowerCase(); var E = { name: "en-GB", d: "dd/MM/yyyy", D: "dd MMMM yyyy", t: "HH:mm", T: "HH:mm:ss", M: "d MMMM", Y: "MMMM yyyy", s: "yyyy-MM-ddTHH:mm:ss", _m: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
239November", "December"], _d: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], _r: ".", _t: ",", _c: "?,0.00", _ct: ",", _cr: "." }; if (F.substr(0, 2) == "sv") { E.name = "sv-SE"; E.d = "yyyy-MM-dd"; E.D = "den dd MMMM yyyy"; E._m = ["januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"]; E._d = ["sé°dag", "mé¸dag", "tisdag", "onsdag", "torsdag", "fredag", "lé°dag"]; E._r = ","; E._t = " "; E._ct = "."; E._cr = ","; E._c = "#,0.00 kr" } else { if (F != "en-gb") { E.name = "en-US"; E.t = "hh:mm tt"; E.T = "hh:mm:ss tt"; E.d = "MM/dd/yyyy"; E.D = "MMMM dd, yyyy"; E.Y = "MMMM, yyyy"; E._c = "$#,0.00" } } E.f = E.D + " " + E.t; E.F = E.D + " " + E.T; E.g = E.d + " " + E.t; E.G = E.d + " " + E.T; return E } function C(O, H) { var F = 0, I = -1, K = -1, S = 0, G = 0, J = -1, P = false, M = true, E = [], R, L; function N(U) { for (var T = 0; T < U.length; T++) { E.push(U.charAt(T)); if (S > 1 && S-- % 3 == 1) { E.push(H.t) } } } for (L = 0; L < H.f.length; L++) { R = H.f.charAt(L); if (R == "0" || R == "#") { G += P; if (R == "0") { if (P) { J = G } else { if (I < 0) { I = F } } } F += !P } P = P || R == "." } I = I < 0 ? 1 : F - I; if (O < 0) { E.push("-") } O = (Math.round(Math.abs(O) * Math.pow(10, G)) / Math.pow(10, G)).toString(); K = O.indexOf("."); K = K < 0 ? O.length : K; L = K - F; if (H.f.match(/^[^\.]*[0#],[0#]/)) { S = Math.max(K, I) } for (var Q = 0; Q < H.f.length; Q++) { R = H.f.charAt(Q); if (R == "#" || R == "0") { if (L < K) { if (L >= 0) { if (M) { N(O.substr(0, L)) } N(O.charAt(L)) } else { if (L >= K - I) { N("0") } } M = false } else { if (J-- > 0 || L < O.length) { N(L >= O.length ? "0" : O.charAt(L)) } } L++ } else { if (R == ".") { if (O.length > ++L || J > 0) { E.push(H.r) } } else { if (R !== ",") { E.push(R) } } } } return E.join("") } Number.prototype.__Format = function (F) { var J = Number(this); if (F == "X") { return Math.round(J).toString(16).toUpperCase() } else { if (F == "x") { return Math.round(J).toString(16) } else { var H = { t: msf.LC._t, r: msf.LC._r }; var E = "0.################", I = F ? F.toLowerCase() : null; if (I === null || I == "g") { F = E } else { if (I == "n") { F = "#," + E } else { if (I == "c") { F = msf.LC._c; H.r = msf.LC._cr; H.t = msf.LC._ct } else { if (I == "f") { F = "0.00" } } } } if (F.indexOf(",.") !== -1) { J /= 1000 } if (F.indexOf("%") !== -1) { J *= 100 } var G = F.split(";"); if (J < 0 && G.length > 1) { J *= -1; H.f = G[1] } else { H.f = G[!J && G.length > 2 ? 2 : 0] } return C(J, H) } } }; Date.prototype.__Format = function (F) { var G = this; var H = ""; var E; if (F.length == 1) { F = msf.LC[F] } return F.replace(/(d{1,4}|M{1,4}|yyyy|yy|HH|H|hh|h|mm|m|ss|s|tt)/g, function () { switch (arguments[0]) { case "dddd": return msf.LC._d[G.getDay()]; case "ddd": return msf.LC._d[G.getDay()].substr(0, 3); case "dd": return B(G.getDate()); case "d": return G.getDate(); case "MMMM": return msf.LC._m[G.getMonth()]; case "MMM": return msf.LC._m[G.getMonth()].substr(0, 3); case "MM": return B(G.getMonth() + 1); case "M": return G.getMonth() + 1; case "yyyy": return G.getFullYear(); case "yy": return G.getFullYear().toString().substr(2); case "HH": return B(G.getHours()); case "hh": return B((G.getHours() - 1) % 12 + 1); case "H": return G.getHours(); case "h": return (G.getHours() - 1) % 12 + 1; case "mm": return B(G.getMinutes()); case "m": return G.getMinutes(); case "ss": return B(G.getSeconds()); case "s": return G.getSeconds(); case "tt": return G.getHours() < 12 ? "AM" : "PM"; default: return "" } }) }; String.__Format = function (I, J, E, G) { var F = arguments, H; return I.replace(/(\{*)\{((\d+)(\,(-?\d*))?(\:([^\}]*))?)\}/g, function () { var O = arguments; if (O[1] && O[1].length % 2 == 1) { return O[0] } if ((H = F[parseInt(O[3], 10) + 1]) === undefined) { throw "Missing argument" } var K = H.__Format ? H.__Format(O[7]) : H.toString(); var N = parseInt(O[5], 10) || 0; var L = Math.abs(N) - K.length; if (L > 0) { var M = " "; while (M.length < L) { M += " " } K = N > 0 ? K + M : M + K } return O[1] + K }).replace(/\{\{/g, "{") }; msf.LC = null; msf.setCulture = function (E) { msf.LC = D(E) || D(E.substr(0, 2)) || D() }; msf.setCulture(navigator.systemLanguage || navigator.language || "en-US"); var A = Date.prototype; A.format = A.format || A.__Format; A = Number.prototype; A.format = A.format || A.__Format; String.format = String.format || String.__Format })(); 240 241String.prototype.format = function () { 242 var output = this; 243 var i = 0; 244 245 for (; i < arguments.length; i++) { 246 output = output.replace(new RegExp('\\{' + i + '\\}', "g"), arguments[i]); 247 } 248 return output; 249}; 250 251function GetAbsoluteURL() { 252 return Utility.GetAbsoluteURL(); 253} 254 255/* 256 * Title Caps 257 * 258 * Ported to JavaScript By John Resig - http://ejohn.org/ - 21 May 2008 259 * Original by John Gruber - http://daringfireball.net/ - 10 May 2008 260 * License: http://www.opensource.org/licenses/mit-license.php 261 */ 262(function () { 263 var small = "(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v[.]?|via|vs[.]?)"; 264 var punct = "([!\"#$%&'()*+,./:;<=>?@[\\\\\\]^_`{|}~-]*)"; 265 266 this.titleCaps = function (title) { 267 var parts = [], split = /[:.;?!] |(?: |^)["Ã]/g, index = 0; 268 269 while (true) { 270 var m = split.exec(title); 271 272 parts.push(title.substring(index, m ? m.index : title.length) 273 .replace(/\b([A-Za-z][a-z.'Ã]*)\b/g, function (all) { 274 return /[A-Za-z]\.[A-Za-z]/.test(all) ? all : upper(all); 275 }) 276 .replace(RegExp("\\b" + small + "\\b", "ig"), lower) 277 .replace(RegExp("^" + punct + small + "\\b", "ig"), function (all, punct, word) { 278 return punct + upper(word); 279 }) 280 .replace(RegExp("\\b" + small + punct + "$", "ig"), upper)); 281 282 index = split.lastIndex; 283 284 if (m) parts.push(m[0]); 285 else break; 286 } 287 288 return parts.join("").replace(/ V(s?)\. /ig, " v$1. ") 289 .replace(/(['Ã])S\b/ig, "$1s") 290 .replace(/\b(AT&T|Q&A)\b/ig, function (all) { 291 return all.toUpperCase(); 292 }); 293 }; 294 295 function lower(word) { 296 return word.toLowerCase(); 297 } 298 299 function upper(word) { 300 return word.substr(0, 1).toUpperCase() + word.substr(1); 301 } 302})(); 303 304function newWindow(img, width, height, left, top) { 305 306 if (img.toLowerCase().indexOf("youtube.com") >= 0 && img.toLowerCase().indexOf("embed") >= 0) { 307 $.fancybox.open({ 308 title: ' ', 309 href: img, 310 type: 'iframe', 311 maxWidth: 800, 312 maxHeight: 600, 313 fitToView: false, 314 width: '70%', 315 height: '70%', 316 autoSize: false, 317 closeClick: false, 318 openEffect: 'elastic', 319 closeEffect: 'elastic' 320 });
321 } 322 else { 323 324 if (img.toLowerCase().indexOf(res.IMAGESERVER.toLowerCase()) == -1) { 325 img = img.replace("/images/inline/products/", ""); 326 if (img.indexOf("img=") >= 0) { 327 if (img.indexOf(".jpg") >= 0) { 328 img = img.substring(img.indexOf("img=") + 4, img.indexOf(".jpg") + 4); 329 } 330 if (img.indexOf(".gif") >= 0) { 331 img = img.substring(img.indexOf("img=") + 4, img.indexOf(".gif") + 4); 332 } 333 if (img.indexOf(".png") >= 0) { 334 img = img.substring(img.indexOf("img=") + 4, img.indexOf(".png") + 4); 335 } 336 } 337 img = res.IMAGESERVER + '/images/inline/products/' + img; 338 } 339 340 if (img.toLowerCase().indexOf(".html") >= 0) { 341 $.fancybox.open({ href: img, type: 'iframe', title: ' ', openEffect: 'elastic', closeEffect: 'elastic', width: width, height: height }); 342 } 343 else { 344 if (height > 800) { 345 $.fancybox.open({ href: img, title: ' ', openEffect: 'elastic', closeEffect: 'elastic', fitToView: false }); 346 } else { 347 $.fancybox.open({ href: img, title: ' ', openEffect: 'elastic', closeEffect: 'elastic' }); 348 } 349 } 350 } 351} 352 353function containsAll(needles, haystack) { 354 for (var i = 0, len = needles.length; i < len; i++) { 355 if ($.inArray(needles[i], haystack) == -1) return false; 356 } 357 return true; 358} 359 360 361Array.prototype.clone = function () { 362 return $(this).slice(0); 363}; 364Array.prototype.unique = function () { 365 for (var a = {}, b = {}, i = 0, n = this.length; i < n; i++) { 366 if (typeof (b[this[i]]) != "undefined") continue; 367 if (typeof (a[this[i]]) == "undefined") a[this[i]] = 1; 368 //else { b[this[i]] = 1; delete a[this[i]] } 369 } 370 this.length = 0; 371 for (i in a) this[this.length] = i; return this; 372}; 373 374var notificationBar = { 375 show: function (message) { 376 var self = this; 377 if (arguments[1] !== undefined) { 378 var delay = arguments[1]; 379 380 window.setTimeout(function () { 381 self.hide(); 382 }, delay); 383 } 384 $("#notification-bar > div").html(message).parent().addClass("show"); 385 }, 386 387 hide: function () { 388 $("#notification-bar").removeClass("show"); 389 }, 390 391 init: function () { 392 var self = this; 393 $("#notification-bar .close").click(function (e) { 394 e.preventDefault(); 395 self.hide(); 396 }) 397 } 398}; 399; 400jQuery.fn.extend({ 401 pressEnter: function (callback) { 402 this.keypress(function (e) { 403 if (e.which == "13") callback(); 404 }); 405 return this; 406 }, 407 pressNavigationUp: function (callback) { 408 this.keyup(function (e) { 409 if (e.which == "38") callback(); 410 }); 411 return this; 412 }, 413 pressNavigationDown: function (callback) { 414 this.keyup(function (e) { 415 if (e.which == "40") callback(); 416 }); 417 return this; 418 }, 419 pressEscape: function (callback) { 420 this.keyup(function (e) { 421 if (e.which == "27") callback(); 422 }); 423 return this; 424 }, 425 pressKey: function (callback) { 426 this.keyup(function (e) { 427 if (e.which != "13" && e.which != "27" && e.which != "38" && e.which != "40") callback(); 428 }); 429 return this; 430 }, 431}); 432 433var SEARCHPRODUCTS, 434 eStoreSearch = 435 { 436 ProductData: null, 437 SearchProduct: new Array(), 438 CategoryKeywords: new Array(), 439 SearchResults: [], 440 DisplayCount: 0, 441 CurrentId: -1, 442 ProductUrl: '', 443 bAbove: false, 444 CountLimit: 14, 445 446 init: function () { 447 var self = this; 448 $('#searchform').submit(function () { return false }); 449 450 var injectHtml = res.txt_searchneedhelp.replace(/\{rooturl\}+/g, res.NORMALSTORESERVER); 451 injectHtml = injectHtml.replace('javascript:$zopim.livechat.window.show();', '#'); 452 $("#global-search .search-need-help").html(injectHtml); 453 454 if (global.store.livechatenabled == "0") { 455 $("#needHelpResult .help-livechat,#needHelpResult .help-faq").remove(); 456 } 457 this.EventClick(); 458 this.RegEvent(); 459 this.EventSearch(); 460 461 $.getJSON('/search', function (response) { 462 SEARCHPRODUCTS = response; 463 self.loadData(); 464 }); 465 }, 466 loadData: function () { 467 if (this.ProductData == null && typeof (SEARCHPRODUCTS) != 'undefined') { 468 var removeProduct = function (prodList) { 469 if (prodList.C != PIECEPART && !PRODUCTEXCLUDE.includes(prodList.M)) 470 return prodList 471 } 472 const PRODUCTEXCLUDE = [20271, 20272, 20370, 22501, 22390, 20396, 23860, 23861, 23862, 23904, 23905, 23906, 23907] // Old products ID to remove 473 const STOREEXCLUDE = [7, 8, 9, 10, 11, 12, 37, 39, 41] 474 const PIECEPART = 1214 475 const NEWPRODLIST = SEARCHPRODUCTS.Products.filter(removeProduct) 476 477 this.ProductData = STOREEXCLUDE.includes(global.store.id) ? NEWPRODLIST : SEARCHPRODUCTS.Products; 478 this.CategoryKeywords = SEARCHPRODUCTS.Keywords; 479 } 480 if (this.ProductData == null && typeof (SEARCHPRODUCTS) == 'undefined') { 481 this.ProductData = []; 482 this.CategoryKeywords = []; 483 } 484 }, 485 EventClick: function () { 486 var self = this; 487 $("#search-keywords").pressEnter(function () { 488 if (self.ProductUrl != 'undefined' && self.ProductUrl != '') { 489 window.location = self.ProductUrl; 490 } 491 return false; 492 }); 493 }, 494 EventSearch: function () { 495 var self = this; 496 497 $("#search-keywords") 498 .on('pressEscape', function () { 499 $('#global-search #btn-close-search').trigger('click'); 500 }) 501 .pressKey(function () { 502 var keyword = $("#search-keywords").val(); 503 if (keyword.length) { 504 $("#needHelpResult").hide(); 505 $("#searchResult").show(); 506 self.EnterSearch(keyword); 507 } 508 else { 509 $("#needHelpResult").show(); 510 $("#searchResult").hide(); 511 } 512 }) 513 .on('focus', function () { 514 var keyword = $("#search-keywords").val(); 515 if (!keyword.length) { 516 $("#searchResult").hide(); 517 $("#needHelpResult").show(); 518 } 519 }) 520 }, 521 KeyFilter: function (s) { 522 s = s.replace(/\(|\)/g, ""); 523 return s.replace(/[^a-zA-Z0-9\u4E00-\u9FA5]*$/, ''); 524 }, 525 KeyFilter4SpecialChars: function (s) { 526 return s.replace(/\s|[-+*&^%$#@!~<>\[\]{}()]/g, ""); 527 }, 528 CheckProduct: function (searchProduct, productId) { 529 for (var i = 0; i < searchProduct.length; i++) { 530 if (searchProduct[i] == productId) { 531 return true; 532 } 533 } 534 return false; 535 }, 536 LoadProduct: function (Item, ImgServer, Key, DisplayCount) { 537 var txt = Item.H2 == '' ? this.htmlDecode(Item.Te) : this.htmlDecode(Item.H2); 538 txt = txt.replace(new RegExp(Key, "gi"), "<span class='highlight'>" + Key + "</span>"); 539 var purl = res.NORMALSTORESERVER + "/go/p/" + Item.C + "/" + Item.I; 540 var pImgName = Item.M; 541 542 //if is sxfi air on tw, show black version 543 if (pImgName == 23271 && global.store.id == 29) { 544 pImgName = 23273; 545 } 546 547 // $("#searchResult #searchproductlist #plscroll").append( 548 this.SearchResults.push({ 549 'productId': Item.M, 550 'category': Item.C, 551 'html': '<div class="searchResultProductItem col-xs-6 col-sm-4 col-md-3 col-lg-3" id="searchProductItem_' + (DisplayCount + 1) + '">\ 552 <div class="pimg">' + 553 '<a data-productid="' + Item.M + '" data-productname="' + Item.N + '" data-pos="' + (DisplayCount + 1) + '" data-listname="Search Results" data-brand="Creative" href="' + purl + '" onclick="return TrackSearchResultClick(this)"><img src="' + ImgServer + '/images/products/large/pdt_' + pImgName + '.png?width=200&height=200" class="center-block img-responsive"></a>\ 554 </div>' + 555 '<div class="ptext">\ 556 <span class="title">\ 557 <a data-productid="' + Item.M + '" data-productname="' + Item.N + '" data-pos="' + (DisplayCount + 1) + '" data-listname="Search Results" data-brand="Creative" href="' + purl + '" onclick="return TrackSearchResultClick(this)">' + Item.N.replace(new RegExp(Key, "gi"), "<span class='highlight'>" + Key + "</span>") + '</a></span>' + 558 (Item.MN && Item.MN.length > 0 ? '<span class="model-number">' + Item.MN + '</span>' : '') + 559 '<span class="detail">\ 560 <a data-productid="' + Item.M + '" data-productname="' + Item.N + '" data-pos="' + (DisplayCount + 1) + '" data-listname="Search Results" data-brand="Creative" href="' + purl + '" onclick="return TrackSearchResultClick(this)">' + txt + '</a></span>\ 561 </div>\ 562 </div>' 563 }); 564 //); 565 }, 566 ShowSearchProducts: function () { 567 if (this.SearchResults && this.SearchResults.length > 0) { 568 var html = ''; 569 // show normal product first 570 for (var i = 0; i < this.SearchResults.length; i++) { 571 if (this.SearchResults[i].category != 1091) { 572 html += this.SearchResults[i].html; 573 } 574 } 575 // show archived product after normal product 576 for (var i = 0; i < this.SearchResults.length; i++) { 577 if (this.SearchResults[i].category == 1091) { 578 html += this.SearchResults[i].html; 579 } 580 } 581 $("#searchResult #searchproductlist #plscroll").append(html); 582 } 583 }, 584 SearchCategoryKey: function (keyword) { 585 if (this.DisplayCount <= this.CountLimit) { 586 var categoryID = 0; 587 var regKey = new RegExp(this.KeyFilter(this.KeyFilter4SpecialChars(keyword)), "gi"); 588 for (var i = 0; i < this.CategoryKeywords.length && this.DisplayCount <= this.CountLimit; i++) { 589 var ckeywords = this.CategoryKeywords[i].Keywords; 590 if (ckeywords != null && ckeywords != '') { 591 if (this.KeyFilter4SpecialChars(ckeywords).search(regKey) >= 0) { 592 categoryID = this.CategoryKeywords[i].CID; 593 break; 594 } 595 } 596 } 597 if (categoryID > 0) { 598 for (var i = 0; i < this.ProductData.length && this.DisplayCount <= this.CountLimit; i++) { 599 if (!this.CheckProduct(this.SearchProduct, this.ProductData[i].I) && 600 this.ProductData[i].C == categoryID) { 601 this.SearchProduct.push(this.ProductData[i].I); 602 this.LoadProduct(this.ProductData[i], res.IMAGESERVER, keyword, this.DisplayCount); 603 this.DisplayCount++; 604 } 605 } 606 } 607 } 608 }, 609 SearchKey: function (keyword, searchType) { 610 if (searchType == 2) { 611 keyword = this.KeyFilter4SpecialChars(keyword); 612 } 613 var regKey = new RegExp(this.KeyFilter(keyword), "gi"); 614 615 for (var i = 0; i < this.ProductData.length && this.DisplayCount <= this.CountLimit; i++) { 616 var pname = this.ProductData[i].N; 617 if (searchType == 2) { 618 pname = this.KeyFilter4SpecialChars(pname); 619 } 620 if (!this.CheckProduct(this.SearchProduct, this.ProductData[i].I) && 621 pname.search(regKey) >= 0) { 622 this.SearchProduct.push(this.ProductData[i].I); 623 this.LoadProduct(this.ProductData[i], res.IMAGESERVER, keyword, this.DisplayCount); 624 this.DisplayCount++; 625 } 626 } 627 628 for (var i = 0; i < this.ProductData.length && this.DisplayCount <= this.CountLimit; i++) { 629 var ptag = this.ProductData[i].Ta; 630 if (searchType == 2) { 631 ptag = this.KeyFilter4SpecialChars(ptag); 632 } 633 if (!this.CheckProduct(this.SearchProduct, this.ProductData[i].I) && 634 ptag.search(regKey) >= 0) { 635 this.SearchProduct.push(this.ProductData[i].I); 636 this.LoadProduct(this.ProductData[i], res.IMAGESERVER, keyword, this.DisplayCount); 637 this.DisplayCount++; 638 } 639 } 640 for (var i = 0; i < this.ProductData.length && this.DisplayCount <= this.CountLimit; i++) { 641 var ptext = this.ProductData[i].H2; 642 if (searchType == 2 && ptext != null && ptext.length > 0) { 643 ptext = this.KeyFilter4SpecialChars(ptext); 644 } 645 if (ptext != null && ptext.length > 0 && !this.CheckProduct(this.SearchProduct, this.ProductData[i].I) && 646 ptext.search(regKey) >= 0) { 647 this.SearchProduct.push(this.ProductData[i].I); 648 this.LoadProduct(this.ProductData[i], res.IMAGESERVER, keyword, this.DisplayCount); 649 this.DisplayCount++; 650 } 651 } 652 for (var i = 0; i < this.ProductData.length && this.DisplayCount <= this.CountLimit; i++) { 653 var ptext = this.ProductData[i].Te; 654 if (searchType == 2) { 655 ptext = this.KeyFilter4SpecialChars(ptext); 656 } 657 if (!this.CheckProduct(this.SearchProduct, this.ProductData[i].I) && 658 ptext.search(regKey) >= 0) { 659 this.SearchProduct.push(this.ProductData[i].I); 660 this.LoadProduct(this.ProductData[i], res.IMAGESERVER, keyword, this.DisplayCount); 661 this.DisplayCount++; 662 } 663 } 664 }, 665 SmartSearch: function (keyWords, stype) { 666 var keyWordArray = this.KeywordSplit(keyWords); 667 for (var i = 0; i < keyWordArray.length; i++) { 668 if (keyWordArray[i] != "") 669 this.SearchKey(keyWordArray[i], stype); 670 } 671 }, 672 ErrorSearch: function (key) { 673 res.SearchNoResults = res.SearchNoResults.replace(/\$root/g, res.NORMALSTORESERVER); 674 if (key.length > 18) { 675 key = key.substring(0, 16) + '...'; 676 }
677 var errorHtml = '<div class="searchResultError col-xs-12">' + 678 res.SearchNoResults + 679 '</div>'; 680 var closeHtml = '<table class="closetable"><tr><td>' + 681 '<h2>' + res.SearchResults + '</h2>' + 682 '<p>' + String.format(res.SearchNoResultsText.replace("F66c11", "0cbdef"), key) + '</p>' + 683 '<p>' + res.SearchNoResultsTip + '</p>' + 684 '</td></tr></table>'; 685 $("#searchclose").html(closeHtml); 686 $("#searchproductlist #plscroll").html(errorHtml); 687 }, 688 LoadingSearch: function (key) { 689 $("#searchclose").html(" "); 690 $("#searchproductlist #plscroll").html('<div class="loading"><div>' + res.SearchLoading + '</div><div>' + String.format(res.SearchingTip, key) + '</div></div>'); 691 }, 692 GetSearchResult: function (key) { 693 this.loadData(); 694 var reslut = new Array(); 695 if (this.ProductData != null && this.ProductData.length > 0) { 696 key = key.replace(/^\s|[*.<>]/g, ''); 697 698 this.DisplayCount = 0; 699 this.SearchProduct = new Array(); 700 701 this.SearchCategoryKey(key); 702 this.SearchKey(key, 1); 703 this.SmartSearch(key, 1); 704 this.SearchKey(key, 2); 705 this.SmartSearch(key, 2); 706 707 for (var i = 0; i < this.SearchProduct.length; i++) { 708 for (var p = 0; p < this.ProductData.length; p++) { 709 if (this.SearchProduct[i] == this.ProductData[p].I) { 710 reslut.push(this.ProductData[p]); 711 break; 712 } 713 } 714 } 715 } 716 return reslut; 717 }, 718 EnterSearch: function (key) { 719 if (this.ProductData != null && this.ProductData.length > 0) { 720 key = key.replace(/\*/ig, ""); 721 // key = key.replace(/\./ig, ""); 722 key = key.replace(/\</ig, ""); 723 key = key.replace(/\>/ig, ""); 724 key = key.replace(/^\s+|\s+$/g, ''); 725 this.LoadingSearch(key); 726 this.ProductUrl = ''; 727 this.CurrentId = -1; 728 $("#searchproductlist #plscroll").html(''); 729 this.DisplayCount = 0; 730 this.SearchProduct = new Array(); 731 this.SearchResults = []; 732 733 this.SearchCategoryKey(key); 734 this.SearchKey(key, 1); 735 736 this.SmartSearch(key, 1); 737 this.SearchKey(key, 2); 738 this.SmartSearch(key, 2); 739 this.ShowSearchProducts(); 740 if (key.length > 18) { 741 key = key.substring(0, 16) + '...'; 742 } 743 var closeHtml = '<table class="closetable"><tr><td>' + 744 '<h2>' + res.SearchResults + '</h2>' + 745 '<p>' + String.format(res.SearchDisplaying.replace("F66c11", "0cbdef"), this.DisplayCount, key) + '</p>' + 746 '</td><td width="90"><a class="cancel-search i-cross" href="javascript:eStoreSearch.CancelSearch();">' + res.SearchCancel + '</a></td></tr></table>'; 747 $("#searchclose").html(closeHtml); 748 749 this.RegEvent(); 750 751 if (this.DisplayCount <= 0) { 752 this.ErrorSearch(key); 753 } 754 } 755 else { 756 this.ErrorSearch(key); 757 } 758 if (this.ProductData == null) { 759 this.LoadingSearch(key); 760 } 761 }, 762 CancelSearch: function () { 763 $("#searchResult").hide(); 764 $('#search-keywords').val('').focus(); 765 }, 766 RegEvent: function () { 767 var self = this; 768 769 $("#searchproductlist .searchResultProductItem").hover(function () { 770 self.ProductUrl = ''; 771 $(".searchResultProductItem").removeClass("searchResultSelectProduct"); 772 $(this).addClass("searchResultSelectProduct"); 773 }, function () { 774 $(this).removeClass("searchResultSelectProduct"); 775 }); 776 }, 777 htmlEncode: function (value) { 778 return $('<div/>').text(value).html(); 779 }, 780 htmlDecode: function (value) { 781 return $('<div/>').html(value).text(); 782 }, 783 KeywordSplit: function (keyWords) { 784 var keyWordArray = null; 785 if (typeof keyWords == "string") 786 keyWordArray = keyWords.split(" "); 787 else if (jQuery.isArray(keyWords)) 788 keyWordArray = keyWords; 789 790 for (var i = 0; i < keyWordArray.length; i++) { 791 var kewWord = keyWordArray[i]; 792 for (var j = keyWordArray.length - 1; j > i; j--) { 793 if (kewWord == keyWordArray[j]) 794 keyWordArray.splice(j, 1); 795 } 796 } 797 return keyWordArray; 798 }, 799 }; 800 801 802function TrackSearchResultClick(e) { 803 var listName = $(e).data("listname"); 804 var productID = $(e).data("productid"); 805 var productName = $(e).data("productname"); 806 var pos = $(this).data("pos"); 807 808} 809; 810/* 811CryptoJS v3.1.2 812code.google.com/p/crypto-js
813(c) 2009-2013 by Jeff Mott. All rights reserved. 814code.google.com/p/crypto-js/wiki/License 815*/ 816var CryptoJS=CryptoJS||function(s,p){var m={},l=m.lib={},n=function(){},r=l.Base={extend:function(b){n.prototype=this;var h=new n;b&&h.mixIn(b);h.hasOwnProperty("init")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var h in b)b.hasOwnProperty(h)&&(this[h]=b[h]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}, 817q=l.WordArray=r.extend({init:function(b,h){b=this.words=b||[];this.sigBytes=h!=p?h:4*b.length},toString:function(b){return(b||t).stringify(this)},concat:function(b){var h=this.words,a=b.words,j=this.sigBytes;b=b.sigBytes;this.clamp();if(j%4)for(var g=0;g<b;g++)h[j+g>>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535<a.length)for(g=0;g<b;g+=4)h[j+g>>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<< 81832-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a<b;a+=4)h.push(4294967296*s.random()|0);return new q.init(h,b)}}),v=m.enc={},t=v.Hex={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j<b;j++){var k=a[j>>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j<a;j+=2)g[j>>>3]|=parseInt(b.substr(j, 8192),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j<b;j++)g.push(String.fromCharCode(a[j>>>2]>>>24-8*(j%4)&255));return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j<a;j++)g[j>>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, 820g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l<b;l+=k)this._doProcessBlock(g,l);l=g.splice(0,b);a.sigBytes-=j}return new q.init(l,j)},clone:function(){var b=r.clone.call(this); 821b._data=this._data.clone();return b},_minBufferSize:0});l.Hasher=g.extend({cfg:r.extend(),init:function(b){this.cfg=this.cfg.extend(b);this.reset()},reset:function(){g.reset.call(this);this._doReset()},update:function(b){this._append(b);this._process();return this},finalize:function(b){b&&this._append(b);return this._doFinalize()},blockSize:16,_createHelper:function(b){return function(a,g){return(new b.init(g)).finalize(a)}},_createHmacHelper:function(b){return function(a,g){return(new k.HMAC.init(b, 822g)).finalize(a)}}});var k=m.algo={};return m}(Math); 823(function(s){function p(a,k,b,h,l,j,m){a=a+(k&b|~k&h)+l+m;return(a<<j|a>>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<<j|a>>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<<j|a>>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<<j|a>>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, 824_doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]), 825c=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c, 826d,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d, 827C,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]
827),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/ 8284294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math); 829; 830/** 831 * [js-sha256]{@link https://github.com/emn178/js-sha256} 832 * 833 * @version 0.11.1 834 * @author Chen, Yi-Cyuan [[email protected]] 835 * @copyright Chen, Yi-Cyuan 2014-2025 836 * @license MIT 837 */ 838/*jslint bitwise: true */ 839(function () { 840 'use strict'; 841 842 var ERROR = 'input is invalid type'; 843 var WINDOW = typeof window === 'object'; 844 var root = WINDOW ? window : {}; 845 if (root.JS_SHA256_NO_WINDOW) { 846 WINDOW = false; 847 } 848 var WEB_WORKER = !WINDOW && typeof self === 'object'; 849 var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node && process.type != 'renderer'; 850 if (NODE_JS) { 851 root = global; 852 } else if (WEB_WORKER) { 853 root = self; 854 } 855 var COMMON_JS = !root.JS_SHA256_NO_COMMON_JS && typeof module === 'object' && module.exports; 856 var AMD = typeof define === 'function' && define.amd; 857 var ARRAY_BUFFER = !root.JS_SHA256_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined'; 858 var HEX_CHARS = '0123456789abcdef'.split(''); 859 var EXTRA = [-2147483648, 8388608, 32768, 128]; 860 var SHIFT = [24, 16, 8, 0]; 861 var K = [ 862 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 863 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 864 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 865 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 866 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 867 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 868 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 869 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 870 ]; 871 var OUTPUT_TYPES = ['hex', 'array', 'digest', 'arrayBuffer']; 872 873 var blocks = []; 874 875 if (root.JS_SHA256_NO_NODE_JS || !Array.isArray) { 876 Array.isArray = function (obj) { 877 return Object.prototype.toString.call(obj) === '[object Array]'; 878 }; 879 } 880 881 if (ARRAY_BUFFER && (root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) { 882 ArrayBuffer.isView = function (obj) { 883 return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer; 884 }; 885 } 886 887 var createOutputMethod = function (outputType, is224) { 888 return function (message) { 889 return new Sha256(is224, true).update(message)[outputType](); 890 }; 891 }; 892 893 var createMethod = function (is224) { 894 var method = createOutputMethod('hex', is224); 895 if (NODE_JS) { 896 method = nodeWrap(method, is224); 897 } 898 method.create = function () { 899 return new Sha256(is224); 900 }; 901 method.update = function (message) { 902 return method.create().update(message); 903 }; 904 for (var i = 0; i < OUTPUT_TYPES.length; ++i) { 905 var type = OUTPUT_TYPES[i]; 906 method[type] = createOutputMethod(type, is224); 907 } 908 return method; 909 }; 910 911 var nodeWrap = function (method, is224) { 912 var crypto = require('crypto') 913 var Buffer = require('buffer').Buffer; 914 var algorithm = is224 ? 'sha224' : 'sha256'; 915 var bufferFrom; 916 if (Buffer.from && !root.JS_SHA256_NO_BUFFER_FROM) { 917 bufferFrom = Buffer.from; 918 } else { 919 bufferFrom = function (message) { 920 return new Buffer(message); 921 }; 922 } 923 var nodeMethod = function (message) { 924 if (typeof message === 'string') { 925 return crypto.createHash(algorithm).update(message, 'utf8').digest('hex'); 926 } else { 927 if (message === null || message === undefined) { 928 throw new Error(ERROR); 929 } else if (message.constructor === ArrayBuffer) { 930 message = new Uint8Array(message); 931 } 932 } 933 if (Array.isArray(message) || ArrayBuffer.isView(message) || 934 message.constructor === Buffer) { 935 return crypto.createHash(algorithm).update(bufferFrom(message)).digest('hex'); 936 } else { 937 return method(message); 938 } 939 }; 940 return nodeMethod; 941 }; 942 943 var createHmacOutputMethod = function (outputType, is224) { 944 return function (key, message) { 945 return new HmacSha256(key, is224, true).update(message)[outputType](); 946 }; 947 }; 948 949 var createHmacMethod = function (is224) { 950 var method = createHmacOutputMethod('hex', is224); 951 method.create = function (key) { 952 return new HmacSha256(key, is224); 953 }; 954 method.update = function (key, message) { 955 return method.create(key).update(message); 956 }; 957 for (var i = 0; i < OUTPUT_TYPES.length; ++i) { 958 var type = OUTPUT_TYPES[i]; 959 method[type] = createHmacOutputMethod(type, is224); 960 } 961 return method; 962 }; 963 964 function Sha256(is224, sharedMemory) { 965 if (sharedMemory) { 966 blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3]
966= 967 blocks[4] = blocks[5] = blocks[6] = blocks[7] = 968 blocks[8] = blocks[9] = blocks[10] = blocks[11] = 969 blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; 970 this.blocks = blocks; 971 } else { 972 this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 973 } 974 975 if (is224) { 976 this.h0 = 0xc1059ed8; 977 this.h1 = 0x367cd507; 978 this.h2 = 0x3070dd17; 979 this.h3 = 0xf70e5939; 980 this.h4 = 0xffc00b31; 981 this.h5 = 0x68581511; 982 this.h6 = 0x64f98fa7; 983 this.h7 = 0xbefa4fa4; 984 } else { // 256 985 this.h0 = 0x6a09e667; 986 this.h1 = 0xbb67ae85; 987 this.h2 = 0x3c6ef372; 988 this.h3 = 0xa54ff53a; 989 this.h4 = 0x510e527f; 990 this.h5 = 0x9b05688c; 991 this.h6 = 0x1f83d9ab; 992 this.h7 = 0x5be0cd19; 993 } 994 995 this.block = this.start = this.bytes = this.hBytes = 0; 996 this.finalized = this.hashed = false; 997 this.first = true; 998 this.is224 = is224; 999 } 1000 1001 Sha256.prototype.update = function (message) { 1002 if (this.finalized) { 1003 return; 1004 } 1005 var notString, type = typeof message; 1006 if (type !== 'string') { 1007 if (type === 'object') { 1008 if (message === null) { 1009 throw new Error(ERROR); 1010 } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) { 1011 message = new Uint8Array(message); 1012 } else if (!Array.isArray(message)) { 1013 if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) { 1014 throw new Error(ERROR); 1015 } 1016 } 1017 } else { 1018 throw new Error(ERROR); 1019 } 1020 notString = true; 1021 } 1022 var code, index = 0, i, length = message.length, blocks = this.blocks; 1023 while (index < length) { 1024 if (this.hashed) { 1025 this.hashed = false; 1026 blocks[0] = this.block; 1027 this.block = blocks[16] = blocks[1] = blocks[2] = blocks[3] = 1028 blocks[4] = blocks[5] = blocks[6] = blocks[7] = 1029 blocks[8] = blocks[9] = blocks[10] = blocks[11] = 1030 blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; 1031 } 1032 1033 if (notString) { 1034 for (i = this.start; index < length && i < 64; ++index) { 1035 blocks[i >>> 2] |= message[index] << SHIFT[i++ & 3]; 1036 } 1037 } else { 1038 for (i = this.start; index < length && i < 64; ++index) { 1039 code = message.charCodeAt(index); 1040 if (code < 0x80) { 1041 blocks[i >>> 2] |= code << SHIFT[i++ & 3]; 1042 } else if (code < 0x800) { 1043 blocks[i >>> 2] |= (0xc0 | (code >>> 6)) << SHIFT[i++ & 3]; 1044 blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; 1045 } else if (code < 0xd800 || code >= 0xe000) { 1046 blocks[i >>> 2] |= (0xe0 | (code >>> 12)) << SHIFT[i++ & 3]; 1047 blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3]; 1048 blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; 1049 } else { 1050 code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff)); 1051 blocks[i >>> 2] |= (0xf0 | (code >>> 18)) << SHIFT[i++ & 3]; 1052 blocks[i >>> 2] |= (0x80 | ((code >>> 12) & 0x3f)) << SHIFT[i++ & 3]; 1053 blocks[i >>> 2] |= (0x80 | ((code >>> 6) & 0x3f)) << SHIFT[i++ & 3]; 1054 blocks[i >>> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3]; 1055 } 1056 } 1057 } 1058 1059 this.lastByteIndex = i; 1060 this.bytes += i - this.start; 1061 if (i >= 64) { 1062 this.block = blocks[16]; 1063 this.start = i - 64; 1064 this.hash(); 1065 this.hashed = true; 1066 } else { 1067 this.start = i; 1068 } 1069 } 1070 if (this.bytes > 4294967295) { 1071 this.hBytes += this.bytes / 4294967296 << 0; 1072 this.bytes = this.bytes % 4294967296; 1073 } 1074 return this; 1075 }; 1076 1077 Sha256.prototype.finalize = function () { 1078 if (this.finalized) { 1079 return; 1080 } 1081 this.finalized = true; 1082 var blocks = this.blocks, i = this.lastByteIndex; 1083 blocks[16] = this.block; 1084 blocks[i >>> 2] |= EXTRA[i & 3]; 1085 this.block = blocks[16]; 1086 if (i >= 56) { 1087 if (!this.hashed) { 1088 this.hash(); 1089 } 1090 blocks[0] = this.block;
vendor: 7,488 bytes, lines 1091-1270
1091 blocks[16] = blocks[1] = blocks[2] = blocks[3] = 1092 blocks[4] = blocks[5] = blocks[6] = blocks[7] = 1093 blocks[8] = blocks[9] = blocks[10] = blocks[11] = 1094 blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0; 1095 } 1096 blocks[14] = this.hBytes << 3 | this.bytes >>> 29; 1097 blocks[15] = this.bytes << 3; 1098 this.hash(); 1099 }; 1100 1101 Sha256.prototype.hash = function () { 1102 var a = this.h0, b = this.h1, c = this.h2, d = this.h3, e = this.h4, f = this.h5, g = this.h6, 1103 h = this.h7, blocks = this.blocks, j, s0, s1, maj, t1, t2, ch, ab, da, cd, bc; 1104 1105 for (j = 16; j < 64; ++j) { 1106 // rightrotate 1107 t1 = blocks[j - 15]; 1108 s0 = ((t1 >>> 7) | (t1 << 25)) ^ ((t1 >>> 18) | (t1 << 14)) ^ (t1 >>> 3); 1109 t1 = blocks[j - 2]; 1110 s1 = ((t1 >>> 17) | (t1 << 15)) ^ ((t1 >>> 19) | (t1 << 13)) ^ (t1 >>> 10); 1111 blocks[j] = blocks[j - 16] + s0 + blocks[j - 7] + s1 << 0; 1112 } 1113 1114 bc = b & c; 1115 for (j = 0; j < 64; j += 4) { 1116 if (this.first) { 1117 if (this.is224) { 1118 ab = 300032; 1119 t1 = blocks[0] - 1413257819; 1120 h = t1 - 150054599 << 0; 1121 d = t1 + 24177077 << 0; 1122 } else { 1123 ab = 704751109; 1124 t1 = blocks[0] - 210244248; 1125 h = t1 - 1521486534 << 0; 1126 d = t1 + 143694565 << 0; 1127 } 1128 this.first = false; 1129 } else { 1130 s0 = ((a >>> 2) | (a << 30)) ^ ((a >>> 13) | (a << 19)) ^ ((a >>> 22) | (a << 10)); 1131 s1 = ((e >>> 6) | (e << 26)) ^ ((e >>> 11) | (e << 21)) ^ ((e >>> 25) | (e << 7)); 1132 ab = a & b; 1133 maj = ab ^ (a & c) ^ bc; 1134 ch = (e & f) ^ (~e & g); 1135 t1 = h + s1 + ch + K[j] + blocks[j]; 1136 t2 = s0 + maj; 1137 h = d + t1 << 0; 1138 d = t1 + t2 << 0; 1139 } 1140 s0 = ((d >>> 2) | (d << 30)) ^ ((d >>> 13) | (d << 19)) ^ ((d >>> 22) | (d << 10)); 1141 s1 = ((h >>> 6) | (h << 26)) ^ ((h >>> 11) | (h << 21)) ^ ((h >>> 25) | (h << 7)); 1142 da = d & a; 1143 maj = da ^ (d & b) ^ ab; 1144 ch = (h & e) ^ (~h & f); 1145 t1 = g + s1 + ch + K[j + 1] + blocks[j + 1]; 1146 t2 = s0 + maj; 1147 g = c + t1 << 0; 1148 c = t1 + t2 << 0; 1149 s0 = ((c >>> 2) | (c << 30)) ^ ((c >>> 13) | (c << 19)) ^ ((c >>> 22) | (c << 10)); 1150 s1 = ((g >>> 6) | (g << 26)) ^ ((g >>> 11) | (g << 21)) ^ ((g >>> 25) | (g << 7)); 1151 cd = c & d; 1152 maj = cd ^ (c & a) ^ da; 1153 ch = (g & h) ^ (~g & e); 1154 t1 = f + s1 + ch + K[j + 2] + blocks[j + 2]; 1155 t2 = s0 + maj; 1156 f = b + t1 << 0; 1157 b = t1 + t2 << 0; 1158 s0 = ((b >>> 2) | (b << 30)) ^ ((b >>> 13) | (b << 19)) ^ ((b >>> 22) | (b << 10)); 1159 s1 = ((f >>> 6) | (f << 26)) ^ ((f >>> 11) | (f << 21)) ^ ((f >>> 25) | (f << 7)); 1160 bc = b & c; 1161 maj = bc ^ (b & d) ^ cd; 1162 ch = (f & g) ^ (~f & h); 1163 t1 = e + s1 + ch + K[j + 3] + blocks[j + 3]; 1164 t2 = s0 + maj; 1165 e = a + t1 << 0; 1166 a = t1 + t2 << 0; 1167 this.chromeBugWorkAround = true; 1168 } 1169 1170 this.h0 = this.h0 + a << 0; 1171 this.h1 = this.h1 + b << 0; 1172 this.h2 = this.h2 + c << 0; 1173 this.h3 = this.h3 + d << 0; 1174 this.h4 = this.h4 + e << 0; 1175 this.h5 = this.h5 + f << 0; 1176 this.h6 = this.h6 + g << 0; 1177 this.h7 = this.h7 + h << 0; 1178 }; 1179 1180 Sha256.prototype.hex = function () { 1181 this.finalize(); 1182 1183 var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, 1184 h6 = this.h6, h7 = this.h7; 1185 1186 var hex = HEX_CHARS[(h0 >>> 28) & 0x0F] + HEX_CHARS[(h0 >>> 24) & 0x0F] + 1187 HEX_CHARS[(h0 >>> 20) & 0x0F] + HEX_CHARS[(h0 >>> 16) & 0x0F] + 1188 HEX_CHARS[(h0 >>> 12) & 0x0F] + HEX_CHARS[(h0 >>> 8) & 0x0F] + 1189 HEX_CHARS[(h0 >>> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] + 1190 HEX_CHARS[(h1 >>> 28) & 0x0F] + HEX_CHARS[(h1 >>> 24) & 0x0F] + 1191 HEX_CHARS[(h1 >>> 20) & 0x0F] + HEX_CHARS[(h1 >>> 16) & 0x0F] + 1192 HEX_CHARS[(h1 >>> 12) & 0x0F] + HEX_CHARS[(h1 >>> 8) & 0x0F] + 1193 HEX_CHARS[(h1 >>> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] + 1194 HEX_CHARS[(h2 >>> 28) & 0x0F] + HEX_CHARS[(h2 >>> 24) & 0x0F] + 1195 HEX_CHARS[(h2 >>> 20) & 0x0F] + HEX_CHARS[(h2 >>> 16) & 0x0F] + 1196 HEX_CHARS[(h2 >>> 12) & 0x0F] + HEX_CHARS[(h2 >>> 8) & 0x0F] + 1197 HEX_CHARS[(h2 >>> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] + 1198 HEX_CHARS[(h3 >>> 28) & 0x0F] + HEX_CHARS[(h3 >>> 24) & 0x0F] + 1199 HEX_CHARS[(h3 >>> 20) & 0x0F] + HEX_CHARS[(h3 >>> 16) & 0x0F] + 1200 HEX_CHARS[(h3 >>> 12) & 0x0F] + HEX_CHARS[(h3 >>> 8) & 0x0F] + 1201 HEX_CHARS[(h3 >>> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] + 1202 HEX_CHARS[(h4 >>> 28) & 0x0F] + HEX_CHARS[(h4 >>> 24) & 0x0F] + 1203 HEX_CHARS[(h4 >>> 20) & 0x0F] + HEX_CHARS[(h4 >>> 16) & 0x0F] + 1204 HEX_CHARS[(h4 >>> 12) & 0x0F] + HEX_CHARS[(h4 >>> 8) & 0x0F] + 1205 HEX_CHARS[(h4 >>> 4) & 0x0F] + HEX_CHARS[h4 & 0x0F] + 1206 HEX_CHARS[(h5 >>> 28) & 0x0F] + HEX_CHARS[(h5 >>> 24) & 0x0F] + 1207 HEX_CHARS[(h5 >>> 20) & 0x0F] + HEX_CHARS[(h5 >>> 16) & 0x0F] + 1208 HEX_CHARS[(h5 >>> 12) & 0x0F] + HEX_CHARS[(h5 >>> 8) & 0x0F] + 1209 HEX_CHARS[(h5 >>> 4) & 0x0F] + HEX_CHARS[h5 & 0x0F] + 1210 HEX_CHARS[(h6 >>> 28) & 0x0F] + HEX_CHARS[(h6 >>> 24) & 0x0F] + 1211 HEX_CHARS[(h6 >>> 20) & 0x0F] + HEX_CHARS[(h6 >>> 16) & 0x0F] + 1212 HEX_CHARS[(h6 >>> 12) & 0x0F] + HEX_CHARS[(h6 >>> 8) & 0x0F] + 1213 HEX_CHARS[(h6 >>> 4) & 0x0F] + HEX_CHARS[h6 & 0x0F]; 1214 if (!this.is224) { 1215 hex += HEX_CHARS[(h7 >>> 28) & 0x0F] + HEX_CHARS[(h7 >>> 24) & 0x0F] + 1216 HEX_CHARS[(h7 >>> 20) & 0x0F] + HEX_CHARS[(h7 >>> 16) & 0x0F] + 1217 HEX_CHARS[(h7 >>> 12) & 0x0F] + HEX_CHARS[(h7 >>> 8) & 0x0F] + 1218 HEX_CHARS[(h7 >>> 4) & 0x0F] + HEX_CHARS[h7 & 0x0F]; 1219 } 1220 return hex; 1221 }; 1222 1223 Sha256.prototype.toString = Sha256.prototype.hex; 1224 1225 Sha256.prototype.digest = function () { 1226 this.finalize(); 1227 1228 var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3, h4 = this.h4, h5 = this.h5, 1229 h6 = this.h6, h7 = this.h7; 1230 1231 var arr = [ 1232 (h0 >>> 24) & 0xFF, (h0 >>> 16) & 0xFF, (h0 >>> 8) & 0xFF, h0 & 0xFF, 1233 (h1 >>> 24) & 0xFF, (h1 >>> 16) & 0xFF, (h1 >>> 8) & 0xFF, h1 & 0xFF, 1234 (h2 >>> 24) & 0xFF, (h2 >>> 16) & 0xFF, (h2 >>> 8) & 0xFF, h2 & 0xFF, 1235 (h3 >>> 24) & 0xFF, (h3 >>> 16) & 0xFF, (h3 >>> 8) & 0xFF, h3 & 0xFF, 1236 (h4 >>> 24) & 0xFF, (h4 >>> 16) & 0xFF, (h4 >>> 8) & 0xFF, h4 & 0xFF, 1237 (h5 >>> 24) & 0xFF, (h5 >>> 16) & 0xFF, (h5 >>> 8) & 0xFF, h5 & 0xFF, 1238 (h6 >>> 24) & 0xFF, (h6 >>> 16) & 0xFF, (h6 >>> 8) & 0xFF, h6 & 0xFF 1239 ]; 1240 if (!this.is224) { 1241 arr.push((h7 >>> 24) & 0xFF, (h7 >>> 16) & 0xFF, (h7 >>> 8) & 0xFF, h7 & 0xFF); 1242 } 1243 return arr; 1244 }; 1245 1246 Sha256.prototype.array = Sha256.prototype.digest; 1247 1248 Sha256.prototype.arrayBuffer = function () { 1249 this.finalize(); 1250 1251 var buffer = new ArrayBuffer(this.is224 ? 28 : 32); 1252 var dataView = new DataView(buffer); 1253 dataView.setUint32(0, this.h0); 1254 dataView.setUint32(4, this.h1); 1255 dataView.setUint32(8, this.h2); 1256 dataView.setUint32(12, this.h3); 1257 dataView.setUint32(16, this.h4); 1258 dataView.setUint32(20, this.h5); 1259 dataView.setUint32(24, this.h6); 1260 if (!this.is224) { 1261 dataView.setUint32(28, this.h7); 1262 } 1263 return buffer; 1264 }; 1265 1266 function HmacSha256(key, is224, sharedMemory) { 1267 var i, type = typeof key; 1268 if (type === 'string') { 1269 var bytes = [], length = key.length, index = 0, code; 1270 for (i = 0; i < length; ++i) {
1271 code = key.charCodeAt(i); 1272 if (code < 0x80) { 1273 bytes[index++] = code; 1274 } else if (code < 0x800) { 1275 bytes[index++] = (0xc0 | (code >>> 6)); 1276 bytes[index++] = (0x80 | (code & 0x3f)); 1277 } else if (code < 0xd800 || code >= 0xe000) { 1278 bytes[index++] = (0xe0 | (code >>> 12)); 1279 bytes[index++] = (0x80 | ((code >>> 6) & 0x3f)); 1280 bytes[index++] = (0x80 | (code & 0x3f)); 1281 } else { 1282 code = 0x10000 + (((code & 0x3ff) << 10) | (key.charCodeAt(++i) & 0x3ff)); 1283 bytes[index++] = (0xf0 | (code >>> 18)); 1284 bytes[index++] = (0x80 | ((code >>> 12) & 0x3f)); 1285 bytes[index++] = (0x80 | ((code >>> 6) & 0x3f)); 1286 bytes[index++] = (0x80 | (code & 0x3f)); 1287 } 1288 } 1289 key = bytes; 1290 } else { 1291 if (type === 'object') { 1292 if (key === null) { 1293 throw new Error(ERROR); 1294 } else if (ARRAY_BUFFER && key.constructor === ArrayBuffer) { 1295 key = new Uint8Array(key); 1296 } else if (!Array.isArray(key)) { 1297 if (!ARRAY_BUFFER || !ArrayBuffer.isView(key)) { 1298 throw new Error(ERROR); 1299 } 1300 } 1301 } else { 1302 throw new Error(ERROR); 1303 } 1304 } 1305 1306 if (key.length > 64) { 1307 key = (new Sha256(is224, true)).update(key).array(); 1308 } 1309 1310 var oKeyPad = [], iKeyPad = []; 1311 for (i = 0; i < 64; ++i) { 1312 var b = key[i] || 0; 1313 oKeyPad[i] = 0x5c ^ b; 1314 iKeyPad[i] = 0x36 ^ b; 1315 } 1316 1317 Sha256.call(this, is224, sharedMemory); 1318 1319 this.update(iKeyPad); 1320 this.oKeyPad = oKeyPad; 1321 this.inner = true; 1322 this.sharedMemory = sharedMemory; 1323 } 1324 HmacSha256.prototype = new Sha256(); 1325 1326 HmacSha256.prototype.finalize = function () { 1327 Sha256.prototype.finalize.call(this); 1328 if (this.inner) { 1329 this.inner = false; 1330 var innerHash = this.array(); 1331 Sha256.call(this, this.is224, this.sharedMemory); 1332 this.update(this.oKeyPad); 1333 this.update(innerHash); 1334 Sha256.prototype.finalize.call(this); 1335 } 1336 }; 1337 1338 var exports = createMethod(); 1339 exports.sha256 = exports; 1340 exports.sha224 = createMethod(true); 1341 exports.sha256.hmac = createHmacMethod(); 1342 exports.sha224.hmac = createHmacMethod(true); 1343 1344 if (COMMON_JS) { 1345 module.exports = exports; 1346 } else { 1347 root.sha256 = exports.sha256; 1348 root.sha224 = exports.sha224; 1349 if (AMD) { 1350 define(function () { 1351 return exports; 1352 }); 1353 } 1354 } 1355})();; 1356//================================ VARS ===================================// 1357var console = console || { log: function () { } },// Fix IE issues. 1358 1359 // Global vars - in order to avoid naming conflicts. 1360 // You can place your vars here if it is needed on every pages. 1361 // If your var is needed on a few pages only, then you can create another specific shared object container. 1362 g = { 1363 liveChatEnabled: window.hasOwnProperty('$zopim'), 1364 winWidth: $(window).width(), 1365 windowFormat: '', 1366 openMenu: null, 1367 eventTrack: function (category, action, label) { 1368 if (typeof dataLayer === 'object') { 1369 dataLayer.push({ 'event': 'click', 'eventCategory': category, 'eventAction': action, 'eventLabel': label }); 1370 // console.log(category + "," + action + "," + label); 1371 } 1372 } 1373 }; 1374const isLayout2024 = document.querySelector("html").classList.contains("layout-2024"); 1375//=========================================================================// 1376 1377 1378 1379//=========================================================================// 1380//=========================== DOCUMENT READY ==============================// 1381//!\ Shared behavior only! 1382// Everything you put here should be common to all the pages. 1383// If you want to add a function for a specific page, trigger your function from initPage(). 1384 1385$(document).ready(function () { 1386 g.windowFormat = g.winWidth > 1000 ? 'large' : (g.winWidth > 480 ? 'medium' : 'small');
1387 $('html').addClass(g.windowFormat + '-screen'); 1388 1389 initCart(); 1390 initAccount(); 1391 1392 // $.accountSignup.open(); 1393 1394 1395 // Don't load on _blank page (using _blank.cshtml template). 1396 if ($('#all').length) { 1397 initAuthentication(); 1398 notificationBar.init(); 1399 eStoreSearch.init(); 1400 if (window.location.host === 'en.stage2.creative.com' || 1401 window.location.host === 'gr.stage2.creative.com') { 1402 $.ajax({ 1403 url: "https://api.dev.creative.com/creative-ai/api/v1/test2", 1404 success: function (result) { 1405 eStoreTranslate.init(); 1406 }, 1407 error: function (result) { 1408 console.log("Failed to connect to Creative VPN") 1409 } 1410 }); 1411 } 1412 1413 if (g.liveChatEnabled) initLiveChat(); 1414 1415 initTracking(); 1416 1417 if (location.hash.length > 2) openMenuFromHash(); 1418 1419 // Lazyload img with a 'data-original' attribute. 1420 do_lazy(); 1421 1422 // Any shared event-triggered behavior. 1423 bindEvents(); 1424 1425 // You can trigger some specific page functions from there. 1426 initPage(); 1427 } 1428 1429 // if ('serviceWorker' in navigator) { 1430 // navigator.serviceWorker.register('/sw.js').then(function(reg) {main 1431 // console.log('ServiceWorker registration successful with scope: ', reg.scope); 1432 // }, function(err) { 1433 // console.log('ServiceWorker registration failed: ', err); 1434 // }) 1435 // } 1436 1437 $('#product-menu .work-solutions .menu-items a').click(function (e) { 1438 $('#product-menu a.close').click() 1439 }) 1440 1441 initCountrySelector(); 1442 1443}); 1444//=========================================================================// 1445//=========================================================================// 1446 1447//========================= /!\ WRONG-PLACE STUFF /!\ =====================// 1448if ($(".floating-sidebar").length) { 1449 var top = 0; 1450 1451 top = $('.floating-sidebar').offset().top - parseFloat($('.floating-sidebar').css('marginTop').replace(/auto/, 0)); 1452 1453 $(window).scroll(function (event) { 1454 var y = $(this).scrollTop(); 1455 var distanceToBottom = $("body").height() - ($(".floating-sidebar").position().top + $(".floating-sidebar").height()) - $("footer").height(); 1456 1457 if (y >= top && distanceToBottom >= 10) { 1458 $('.floating-sidebar').addClass('fixed'); 1459 } 1460 else { 1461 if (distanceToBottom < 10) { 1462 $('.floating-sidebar').css("margin-top", distanceToBottom + "px"); 1463 } 1464 else { 1465 $('.floating-sidebar').css("margin-top", "0px"); 1466 $('.floating-sidebar').removeClass('fixed'); 1467 } 1468 } 1469 }); 1470} 1471//==================== End of /!\ WRONG-PLACE STUFF /!\ ===================// 1472 1473 1474 1475 1476 1477 1478 1479//=========================================================================// 1480//=========================== GENERAL FUNCTIONS ===========================// 1481// Only place here the functions that are common (shared) to multiple pages. 1482 1483//Country Selector 1484const initCountrySelector = function() { 1485 let defaultCountry = "";
1486 let inputWidth = ""; 1487 1488 const obj_Product = function(id, value) { 1489 return { id: id, value: value }; 1490 }; 1491 1492 const countryArray = []; 1493 countryArray.push(obj_Product("93,1,2", "Afghanistan")); 1494 countryArray.push(obj_Product("355,1,3", "Albania")); 1495 countryArray.push(obj_Product("213,1,2", "Algeria")); 1496 countryArray.push(obj_Product("376,7,3", "Andorra")); 1497 countryArray.push(obj_Product("244,1,2", "Angola")); 1498 countryArray.push(obj_Product("101,1,1", "Anguilla")); 1499 countryArray.push(obj_Product("102,1,1", "Antigua")); 1500 countryArray.push(obj_Product("54,1,1", "Argentina")); 1501 countryArray.push(obj_Product("374,8,3", "Armenia")); 1502 countryArray.push(obj_Product("297,1,1", "Aruba")); 1503 countryArray.push(obj_Product("61,1,2", "Australia")); 1504 countryArray.push(obj_Product("43,2,3", "Austria")); 1505 countryArray.push(obj_Product("994,1,2", "Azerbaijan")); 1506 countryArray.push(obj_Product("103,1,1", "Bahamas")); 1507 countryArray.push(obj_Product("973,1,2", "Bahrain")); 1508 countryArray.push(obj_Product("880,1,2", "Bangladesh")); 1509 countryArray.push(obj_Product("104,1,1", "Barbados")); 1510 countryArray.push(obj_Product("375,8,3", "Belarus")); 1511 countryArray.push(obj_Product("32,1,3", "Belgium")); 1512 countryArray.push(obj_Product("501,1,1", "Belize")); 1513 countryArray.push(obj_Product("229,1,2", "Benin")); 1514 countryArray.push(obj_Product("105,1,1", "Bermuda")); 1515 countryArray.push(obj_Product("975,1,2", "Bhutan")); 1516 countryArray.push(obj_Product("591,1,1", "Bolivia")); 1517 countryArray.push(obj_Product("387,1,3", "Bosnia")); 1518 countryArray.push(obj_Product("267,1,2", "Botswana")); 1519 countryArray.push(obj_Product("55,1,1", "Brazil")); 1520 countryArray.push(obj_Product("106,1,1", "British Virgin Islands")); 1521 countryArray.push(obj_Product("673,1,2", "Brunei")); 1522 countryArray.push(obj_Product("359,1,3", "Bulgaria")); 1523 countryArray.push(obj_Product("226,1,2", "Burkina Faso")); 1524 countryArray.push(obj_Product("257,1,2", "Burundi")); 1525 countryArray.push(obj_Product("237,1,2", "Cameroon")); 1526 countryArray.push(obj_Product("107,1,1", "Canada")); 1527 countryArray.push(obj_Product("238,1,2", "Cape Verde Islands")); 1528 countryArray.push(obj_Product("236,1,2", "Central African Republic")); 1529 countryArray.push(obj_Product("235,1,2", "Chad")); 1530 countryArray.push(obj_Product("56,1,1", "Chile")); 1531 countryArray.push(obj_Product("86,23,2", "China")); 1532 countryArray.push(obj_Product("672,1,2", "Christmas Island")); 1533 countryArray.push(obj_Product("6101,1,2", "Cocos-Keeling Islands")); 1534 countryArray.push(obj_Product("57,1,1", "Colombia")); 1535 countryArray.push(obj_Product("2691,1,2", "Comoros")); 1536 countryArray.push(obj_Product("242,1,2", "Congo")); 1537 countryArray.push(obj_Product("243,1,2", "Congo, Democratic Republic of the")); 1538 countryArray.push(obj_Product("506,1,1", "Costa Rica")); 1539 countryArray.push(obj_Product("385,1,3", "Croatia")); 1540 countryArray.push(obj_Product("53,1,1", "Cuba")); 1541 countryArray.push(obj_Product("357,1,3", "Cyprus")); 1542 countryArray.push(obj_Product("420,10,3", "Czech Republic")); 1543 countryArray.push(obj_Product("45,11,3", "Denmark")); 1544 countryArray.push(obj_Product("253,1,2", "Djibouti")); 1545 countryArray.push(obj_Product("109,1,1", "Dominica")); 1546 countryArray.push(obj_Product("593,1,1", "Ecuador")); 1547 countryArray.push(obj_Product("20,1,2", "Egypt")); 1548 countryArray.push(obj_Product("503,1,1", "El Salvador")); 1549 countryArray.push(obj_Product("240,1,2", "Equatorial Guinea")); 1550 countryArray.push(obj_Product("291,1,2", "Eritrea")); 1551 countryArray.push(obj_Product("372,1,3", "Estonia")); 1552 countryArray.push(obj_Product("251,1,2", "Ethiopia")); 1553 countryArray.push(obj_Product("500,1,1", "Falkland Islands")); 1554 countryArray.push(obj_Product("298,1,3", "Faroe Islands")); 1555 countryArray.push(obj_Product("679,1,2", "Fiji Islands")); 1556 countryArray.push(obj_Product("358,13,3", "Finland")); 1557 countryArray.push(obj_Product("389,1,3", "Former Yugoslav Republic of Macedonia")); 1558 countryArray.push(obj_Product("33,4,3", "France")); 1559 countryArray.push(obj_Product("594,1,1", "French Guiana")); 1560 countryArray.push(obj_Product("689,1,2", "French Polynesia")); 1561 countryArray.push(obj_Product("241,1,2", "Gabon")); 1562 countryArray.push(obj_Product("220,1,2", "Gambia")); 1563 countryArray.push(obj_Product("995,1,3", "Georgia")); 1564 countryArray.push(obj_Product("49,2,3", "Germany")); 1565 countryArray.push(obj_Product("233,1,2", "Ghana")); 1566 countryArray.push(obj_Product("350,1,3", "Gibraltar")); 1567 countryArray.push(obj_Product("30,1,3", "Greece")); 1568 countryArray.push(obj_Product("299,1,3", "Greenland")); 1569 countryArray.push(obj_Product("111,1,1", "Grenada")); 1570 countryArray.push(obj_Product("590,1,1", "Guadeloupe")); 1571 countryArray.push(obj_Product("124,1,1", "Guam")); 1572 countryArray.push(obj_Product("502,1,1", "Guatemala")); 1573 countryArray.push(obj_Product("224,1,2", "Guinea")); 1574 countryArray.push(obj_Product("245,1,2", "Guinea-Bissau")); 1575 countryArray.push(obj_Product("592,1,1", "Guyana")); 1576 countryArray.push(obj_Product("509,1,1", "Haiti")); 1577 countryArray.push(obj_Product("7002,1,3", "Herzegovina")); 1578 countryArray.push(obj_Product("504,1,1", "Honduras")); 1579 countryArray.push(obj_Product("852,101,2", "Hong Kong SAR, PRC")); 1580 countryArray.push(obj_Product("36,1,3", "Hungary")); 1581 countryArray.push(obj_Product("354,1,3", "Iceland")); 1582 countryArray.push(obj_Product("91,1,2", "India")); 1583 countryArray.push(obj_Product("62,1,2", "Indonesia")); 1584 countryArray.push(obj_Product("98,1,2", "Iran")); 1585 countryArray.push(obj_Product("964,1,2", "Iraq")); 1586 countryArray.push(obj_Product("353,1,3", "Ireland")); 1587 countryArray.push(obj_Product("972,1,2", "Israel")); 1588 countryArray.push(obj_Product("39,5,3", "Italy")); 1589 countryArray.push(obj_Product("112,1,1", "Jamaica")); 1590 countryArray.push(obj_Product("81,24,2", "Japan")); 1591 countryArray.push(obj_Product("962,1,2", "Jordan")); 1592 countryArray.push(obj_Product("705,1,2", "Kazakhstan")); 1593 countryArray.push(obj_Product("254,1,2", "Kenya")); 1594 countryArray.push(obj_Product("686,1,2", "Kiribati Republic")); 1595 countryArray.push(obj_Product("850,1,2", "Korea (North)")); 1596 countryArray.push(obj_Product("82,1,2", "Korea (Republic of)")); 1597 countryArray.push(obj_Product("965,1,2", "Kuwait")); 1598 countryArray.push(obj_Product("706,1,2", "Kyrgyz Republic")); 1599 countryArray.push(obj_Product("856,1,2", "Laos"));
1600 countryArray.push(obj_Product("371,1,3", "Latvia")); 1601 countryArray.push(obj_Product("961,1,2", "Lebanon")); 1602 countryArray.push(obj_Product("266,1,2", "Lesotho")); 1603 countryArray.push(obj_Product("231,1,2", "Liberia")); 1604 countryArray.push(obj_Product("218,1,2", "Libya")); 1605 countryArray.push(obj_Product("4175,2,3", "Liechtenstein")); 1606 countryArray.push(obj_Product("370,1,3", "Lithuania")); 1607 countryArray.push(obj_Product("352,4,3", "Luxembourg")); 1608 countryArray.push(obj_Product("261,1,2", "Madagascar")); 1609 countryArray.push(obj_Product("265,1,2", "Malawi")); 1610 countryArray.push(obj_Product("60,1,2", "Malaysia")); 1611 countryArray.push(obj_Product("960,1,2", "Maldives")); 1612 countryArray.push(obj_Product("223,1,2", "Mali")); 1613 countryArray.push(obj_Product("356,1,3", "Malta")); 1614 countryArray.push(obj_Product("692,1,2", "Marshall Islands")); 1615 countryArray.push(obj_Product("596,1,1", "Martinique")); 1616 countryArray.push(obj_Product("222,1,2", "Mauritania")); 1617 countryArray.push(obj_Product("230,1,2", "Mauritius")); 1618 countryArray.push(obj_Product("269,1,2", "Mayotte Island")); 1619 countryArray.push(obj_Product("52,1,1", "Mexico")); 1620 countryArray.push(obj_Product("691,1,2", "Micronesia, Federated States of")); 1621 countryArray.push(obj_Product("373,1,3", "Moldova")); 1622 countryArray.push(obj_Product("377,4,3", "Monaco")); 1623 countryArray.push(obj_Product("976,1,2", "Mongolia")); 1624 countryArray.push(obj_Product("382,1,3", "Montenegro")); 1625 countryArray.push(obj_Product("113,1,1", "Montserrat")); 1626 countryArray.push(obj_Product("212,1,2", "Morocco")); 1627 countryArray.push(obj_Product("258,1,2", "Mozambique")); 1628 countryArray.push(obj_Product("95,1,2", "Myanmar")); 1629 countryArray.push(obj_Product("264,1,2", "Namibia")); 1630 countryArray.push(obj_Product("977,1,2", "Nepal")); 1631 countryArray.push(obj_Product("31,3,3", "Netherlands")); 1632 countryArray.push(obj_Product("599,1,1", "Netherlands Antilles")); 1633 countryArray.push(obj_Product("687,1,2", "New Caledonia")); 1634 countryArray.push(obj_Product("64,1,2", "New Zealand")); 1635 countryArray.push(obj_Product("505,1,1", "Nicaragua")); 1636 countryArray.push(obj_Product("227,1,2", "Niger")); 1637 countryArray.push(obj_Product("234,1,2", "Nigeria")); 1638 countryArray.push(obj_Product("683,1,2", "Niue")); 1639 countryArray.push(obj_Product("6722,1,2", "Norfolk Island")); 1640 countryArray.push(obj_Product("47,14,3", "Norway")); 1641 countryArray.push(obj_Product("968,1,2", "Oman")); 1642 countryArray.push(obj_Product("92,1,2", "Pakistan")); 1643 countryArray.push(obj_Product("680,1,2", "Palau")); 1644 countryArray.push(obj_Product("507,1,1", "Panama")); 1645 countryArray.push(obj_Product("675,1,2", "Papua New Guinea")); 1646 countryArray.push(obj_Product("595,1,1", "Paraguay")); 1647 countryArray.push(obj_Product("51,1,1", "Peru")); 1648 countryArray.push(obj_Product("63,1,2", "Philippines")); 1649 countryArray.push(obj_Product("48,6,3", "Poland")); 1650 countryArray.push(obj_Product("351,15,3", "Portugal")); 1651 countryArray.push(obj_Product("121,1,1", "Puerto Rico")); 1652 countryArray.push(obj_Product("974,1,2", "Qatar")); 1653 countryArray.push(obj_Product("262,1,2", "Reunion Island")); 1654 countryArray.push(obj_Product("40,1,3", "Romania")); 1655 countryArray.push(obj_Product("7,8,3", "Russia")); 1656 countryArray.push(obj_Product("250,1,2", "Rwanda")); 1657 countryArray.push(obj_Product("7001,4,3", "Saint Barthelemy")); 1658 countryArray.push(obj_Product("114,1,1", "Saint Kitts & Nevis Anguilla")); 1659 countryArray.push(obj_Product("122,1,1", "Saint Lucia")); 1660 countryArray.push(obj_Product("721,4,3", "Saint Martin")); 1661 countryArray.push(obj_Product("378,5,3", "San Marino")); 1662 countryArray.push(obj_Product("239,1,2", "Sao Tome and Principe")); 1663 countryArray.push(obj_Product("966,1,2", "Saudi Arabia")); 1664 countryArray.push(obj_Product("221,1,2", "Senegal Republic")); 1665 countryArray.push(obj_Product("381,1,3", "Serbia")); 1666 countryArray.push(obj_Product("248,1,2", "Seychelle Islands")); 1667 countryArray.push(obj_Product("232,1,2", "Sierra Leone")); 1668 countryArray.push(obj_Product("65,1,2", "Singapore")); 1669 countryArray.push(obj_Product("421,10,3", "Slovak Republic")); 1670 countryArray.push(obj_Product("386,1,3", "Slovenia")); 1671 countryArray.push(obj_Product("677,1,2", "Solomon Islands")); 1672 countryArray.push(obj_Product("252,1,2", "Somalia")); 1673 countryArray.push(obj_Product("27,1,2", "South Africa")); 1674 countryArray.push(obj_Product("34,7,3", "Spain")); 1675 countryArray.push(obj_Product("94,1,2", "Sri Lanka")); 1676 countryArray.push(obj_Product("508,1,1", "St. Pierre and Miquelon")); 1677 countryArray.push(obj_Product("116,1,1", "St. Vincent and the Grenadines")); 1678 countryArray.push(obj_Product("249,1,2", "Sudan")); 1679 countryArray.push(obj_Product("597,1,1", "Suriname"));
1680 countryArray.push(obj_Product("268,1,2", "Swaziland")); 1681 countryArray.push(obj_Product("46,12,3", "Sweden")); 1682 countryArray.push(obj_Product("41,1,3", "Switzerland")); 1683 countryArray.push(obj_Product("963,1,2", "Syria")); 1684 countryArray.push(obj_Product("886,21,2", "Taiwan")); 1685 countryArray.push(obj_Product("708,1,2", "Tajikistan")); 1686 countryArray.push(obj_Product("255,1,2", "Tanzania")); 1687 countryArray.push(obj_Product("66,104,2", "Thailand")); 1688 countryArray.push(obj_Product("228,1,2", "Togo")); 1689 countryArray.push(obj_Product("690,1,2", "Tokelau")); 1690 countryArray.push(obj_Product("676,1,2", "Tonga")); 1691 countryArray.push(obj_Product("117,1,1", "Trinidad and Tobago")); 1692 countryArray.push(obj_Product("90,99,2", "Turkey")); 1693 countryArray.push(obj_Product("118,1,1", "Turks and Caicos Islands")); 1694 countryArray.push(obj_Product("380,8,3", "Ukraine")); 1695 countryArray.push(obj_Product("971,1,2", "United Arab Emirates")); 1696 countryArray.push(obj_Product("44,1,3", "United Kingdom")); 1697 countryArray.push(obj_Product("1,1,1", "United States of America")); 1698 countryArray.push(obj_Product("123,1,1", "United States Virgin Islands")); 1699 countryArray.push(obj_Product("598,1,1", "Uruguay")); 1700 countryArray.push(obj_Product("711,1,2", "Uzbekistan")); 1701 countryArray.push(obj_Product("379,5,3", "Vatican City")); 1702 countryArray.push(obj_Product("58,1,1", "Venezuela")); 1703 countryArray.push(obj_Product("84,1,2", "Vietnam")); 1704 countryArray.push(obj_Product("967,1,2", "Yemen")); 1705 countryArray.push(obj_Product("260,1,2", "Zambia")); 1706 countryArray.push(obj_Product("263,1,2", "Zimbabwe")); 1707 1708 let str_country = ""; 1709 const classCountryItem = isLayout2024 ? "menu-item" : ""; 1710 for (let i = 0; i < countryArray.length; i++) { 1711 str_country += '<li class="' + classCountryItem + '" data-countryid="' + countryArray[i].id + '" value="' + countryArray[i].value + '">' + countryArray[i].value + '</li>'; 1712 } 1713 1714 if (document.querySelector("#side-menu") !== null) { 1715 const queryCountryList = isLayout2024 ? '#side-menu .menu-content .sub-menu[data-id="location-menu"] ul' : "#side-menu .countryselector ul"; 1716 document.querySelector(queryCountryList).innerHTML = str_country; 1717 } 1718 1719 if (document.querySelector("#global-footer") !== null) { 1720 document.querySelector("#global-footer .countryselector ul").innerHTML = str_country; 1721 } 1722 1723 // --- Shared helpers --- 1724 const qsa = function(selector) { 1725 return Array.prototype.slice.call(document.querySelectorAll(selector)); 1726 }; 1727 1728 const filterList = function(input, containerSelector) { 1729 const input_val = input.value.toUpperCase(); 1730 const lis = Array.prototype.slice.call(document.querySelectorAll(containerSelector + " ul li")); 1731 lis.forEach(function(li) { 1732 li.style.display = li.textContent.toUpperCase().indexOf(input_val) > -1 ? "block" : "none"; 1733 }); 1734 }; 1735 1736 const showAllLi = function(containerSelector) { 1737 const lis = Array.prototype.slice.call(document.querySelectorAll(containerSelector + " ul li")); 1738 lis.forEach(function(li) { li.style.display = "block"; }); 1739 }; 1740 1741 const scrollToDefault = function(containerSelector) { 1742 const list = document.querySelector(containerSelector + " ul"); 1743 const targetLi = document.querySelector(containerSelector + " ul li.defaultCountry"); 1744 if (list && targetLi) { 1745 list.scrollTop = targetLi.offsetTop - 150; 1746 } 1747 } 1748 1749 const getCountryId = function(containerSelector, value) { 1750 const el = document.querySelector(containerSelector + ' [value="' + value + '"]'); 1751 return el ? el.getAttribute("data-countryid") : undefined; 1752 } 1753 1754 const bindSelector = function(containerSelector, onSelectFn, withHtmlScroll) { 1755 const container = document.querySelector(containerSelector); 1756 if (!container) return; 1757 1758 const input = container.querySelector("input"); 1759 const ul = container.querySelector("ul"); 1760 1761 input.addEventListener("keyup", function() { 1762 filterList(input, containerSelector); 1763 }); 1764 1765 input.addEventListener("focus", function() { 1766 if (withHtmlScroll) document.querySelector("html").classList.add("no-scroll"); 1767 container.classList.add("focused"); 1768 ul.style.display = "block"; 1769 showAllLi(containerSelector); 1770 scrollToDefault(containerSelector); 1771 input.setAttribute("value", ""); 1772 }); 1773 1774 input.addEventListener("blur", function() { 1775 const _this = input; 1776 setTimeout(function() { 1777 if (withHtmlScroll) document.querySelector("html").classList.remove("no-scroll"); 1778 container.classList.remove("focused"); 1779 ul.scrollTop = 0; 1780 _this.setAttribute("value", defaultCountry); 1781 ul.style.display = "none"; 1782 }, 100); 1783 }); 1784 1785 document.addEventListener("mousedown", function(e) { 1786 const li = e.target.closest(containerSelector + " ul li"); 1787 if (!li) return; 1788 input.value = li.textContent; 1789 input.blur(); 1790 if (defaultCountry !== li.textContent) { 1791 onSelectFn(li.textContent); 1792 } 1793 }); 1794 1795 const lis = Array.prototype.slice.call(container.querySelectorAll("ul li")); 1796 lis.forEach(function(li) { 1797 li.addEventListener("mouseenter", function() { li.classList.add("selected"); }); 1798 li.addEventListener("mouseleave", function() { li.classList.remove("selected"); }); 1799 }); 1800 } 1801 1802 const insertData = function() { 1803 if (global.store.storeCountryID) { 1804 const selectorStr = isLayout2024 1805 ? "#countrylist2.countryselector ul li" 1806 : "#countrylist1.countryselector ul li,#countrylist2.countryselector ul li"; 1807 const inputStr = isLayout2024 1808 ? "#countrylist2.countryselector input" 1809 : "#countrylist1.countryselector input,#countrylist2.countryselector input"; 1810 1811 qsa(selectorStr).forEach(function(li) { 1812 if (li.getAttribute("data-countryid").indexOf(global.store.storeCountryID + ",") === 0) { 1813 li.classList.add("defaultCountry"); 1814 defaultCountry = li.textContent; 1815 } 1816 }); 1817 1818 qsa(inputStr).forEach(function(input) { 1819 input.setAttribute("value", defaultCountry); 1820 }); 1821
1822 inputWidth = defaultCountry.length + 2; 1823 const input2 = document.querySelector("#countrylist2.countryselector input"); 1824 if (input2) input2.setAttribute("size", inputWidth); 1825 } 1826 1827 const onSelect = function(val) { 1828 const selectedCountry = getCountryId("#countrylist1.countryselector", val); 1829 if (selectedCountry) { 1830 location.href = GetAbsoluteURL() + "/home/country?id=" + selectedCountry; 1831 } 1832 }; 1833 1834 const onSelect2 = function(val) { 1835 const selectedCountry = getCountryId("#countrylist2.countryselector", val); 1836 if (selectedCountry) { 1837 location.href = GetAbsoluteURL() + "/home/country?id=" + selectedCountry; 1838 } 1839 } 1840 1841 if (!isLayout2024) { 1842 bindSelector("#countrylist1.countryselector", onSelect, false); 1843 } 1844 bindSelector("#countrylist2.countryselector", onSelect2, true); 1845 }; 1846 1847 const locationMenu = isLayout2024 ? document.querySelector('#side-menu .sub-menu[data-id="location-menu"]') : null; 1848 const countryList1 = document.querySelector("#countrylist1"); 1849 const countryList2 = document.querySelector("#countrylist2"); 1850 1851 if ((isLayout2024 && locationMenu && countryList2) || (countryList1 && countryList2)) { 1852 insertData(); 1853 } 1854}; 1855 1856 1857var bindEvents = function () { 1858 1859 // Alertbox Events 1860 1861 if (typeof showAlert === 'function' && showAlert()) { 1862 $('#alert-box-toggle').removeClass("hide"); 1863 } 1864 1865 if (typeof enableAlertBouncing === 'function' && enableAlertBouncing()) { 1866 $('#alert-box-toggle').addClass('bounce'); 1867 } 1868 1869 $('#alert-box-toggle').click(function () { 1870 if (typeof onAlertBoxOpen === 'function' && !onAlertBoxOpen()) return false; 1871 if (typeof $(this).data('event-category') !== 'undefined') { 1872 g.eventTrack($(this).data('event-category'), $(this).data('event-action'), $(this).data('event-label')) 1873 } 1874 $('#alert-box-toggle').addClass('open'); 1875 }); 1876 1877 $('#alert-box .close').click(function () { 1878 if (typeof onAlertBoxClose === 'function' && !onAlertBoxClose()) return false; 1879 if (typeof $(this).data('event-category') !== 'undefined') { 1880 g.eventTrack($(this).data('event-category'), $(this).data('event-action'), $(this).data('event-label')) 1881 } 1882 $('#alert-box-toggle').removeClass('open bounce'); 1883 }); 1884 // End Alertbox Events 1885 1886 $(window) 1887 .on('load resize', function () { 1888 $(".screenres").html(window.innerWidth);// Bootstrap screen size. 1889 1890 // Update the screen width class on resize - can be used for convenience. 1891 g.windowFormat = window.innerWidth > 1000 ? 'large' : (window.innerWidth >= 480 ? 'medium' : 'small'); 1892 $('html').removeClass('small-screen medium-screen large-screen').addClass(g.windowFormat + '-screen'); 1893 1894 onResize(); 1895 }) 1896 .on('keyup', function (e) { 1897 switch (e.which) { 1898 case 13: $(this).trigger('keyupEnter'); break; 1899 case 27: $(this).trigger('keyupEscape'); break; 1900 case 38: $(this).trigger('keyupUp'); break; 1901 case 40: $(this).trigger('keyupDown'); break; 1902 default: $(this).trigger('keyupAny'); break; 1903 } 1904 }) 1905 .on('keyupEscape', function (e) { 1906 if (g.openMenu) $('#' + g.openMenu + ' .close').trigger('click'); 1907 else { 1908 // Put in this array all the containers that you want to be closable by pressing escape key. 1909 // Make sure this container contains a .close element to trigger a click on. 1910 var closableOpenBoxes = [ 1911 '.review-box:visible', 1912 '.open ~ #alert-box', 1913 '#modalwindow:visible', 1914 '#compare-products.open', 1915 '#compare-results.open', 1916 '#gallery-container:visible', 1917 '#view360.show' 1918 ]; 1919 $(closableOpenBoxes.join(' .close,') + ' .close').trigger('click'); 1920 } 1921 }) 1922 1923 $('html') 1924 // Toggle menus. 1925 .on('click', function (e) { 1926 // Close any open menu when clicking outside it - except a click on notification bar. 1927 if (g.openMenu === 'toc-menu' 1928 && !$('#' + g.openMenu + ' .toc-menu-inner').is(e.target) && !$('#' + g.openMenu + ' .toc-menu-inner').find(e.target).length)// If the clicked element is not contained in open menu. 1929 { 1930 $('#' + g.openMenu + ' > .close').trigger('click'); 1931 return false; 1932 } 1933 else if (g.openMenu === 'side-menu' 1934 && $('.md-select-menu-container').find(e.target).length)// If the clicked element is not contained in open menu. 1935 { 1936 1937 return false; 1938 } 1939 else if (g.openMenu// If there is an open menu. 1940 && !$('#' + g.openMenu).is(e.target) && !$('#' + g.openMenu).find(e.target).length// If the clicked element is not contained in open menu. 1941 && !$('#notification-bar').is(e.target) && !$('#notification-bar').find(e.target).length)// Exclude notification bar clicks. 1942 { 1943 $('#' + g.openMenu + ' > .close').trigger('click'); 1944 return false; 1945 } 1946 }) 1947 .on('click', '[data-target-id]', function (e) { 1948 e.stopPropagation(); 1949 e.preventDefault(); 1950 1951 var clickedTargetMenu = $(this).attr('data-target-id'), 1952 menuToOpen = g.openMenu === clickedTargetMenu ? null : clickedTargetMenu, 1953 menuToClose = g.openMenu === clickedTargetMenu ? clickedTargetMenu : g.openMenu; 1954 1955 1956 // First close any open menu. 1957 if (menuToClose) $('#' + menuToClose + ' > .close').trigger('click'); 1958 1959 // Then open target menu if any. 1960 if (menuToOpen) { 1961 $('#all').attr('class', 'blur open-' + menuToOpen); 1962 if ($(this).is('#main-nav *')) $('html').scrollTop(0); 1963 1964 if (menuToOpen === 'search-bar') { 1965 eStoreSearch.searchBarOpen = true; 1966 $("#search-keywords").focus(); 1967 } 1968 1969 // Update open menu global var. 1970 g.openMenu = menuToOpen; 1971 1972 // Reflect the open state on the trigger(s) so screen readers announce 1973 // "expanded" instead of a stuck "collapsed". 1974 $('[data-target-id="' + menuToOpen + '"][aria-expanded]').attr('aria-expanded', 'true'); 1975 } 1976 1977 // Toggle no-scroll class. 1978 if ($('html').hasClass('no-scroll') && !menuToOpen) $('html').removeClass('no-scroll'); 1979 else if ($('#' + menuToOpen).attr('data-prevent-scroll') !== undefined) $('html').addClass('no-scroll'); 1980 }) 1981 .on('click', '.close', function (e) { 1982 e.preventDefault(); 1983 1984 if ($('#notification-bar').find(this).length) return true;// Don't prevent extra events on that close btn. 1985 1986 // Close the open menu. 1987 if ($('#' + g.openMenu).children(this).length || $(this).parents('#gallery-container').length) { 1988 1989 if ($('#all').hasClass('small-logo')) { 1990 $('#all').attr('class', 'small-logo'); 1991 } 1992 else { 1993 $('#all').attr('class', ''); 1994 } 1995 1996 1997 if (g.openMenu === 'search-bar') { 1998 eStoreSearch.searchBarOpen = false; 1999 eStoreSearch.CancelSearch(); 2000 $("#search-keywords").trigger('blur'); 2001 } 2002 2003 if (location.hash == '#buy' && g.openMenu === 'buy-menu') location.hash = '#buy-menu'; 2004 2005 // Reset the trigger(s) so screen readers announce "collapsed" again. 2006 $('[data-target-id="' + g.openMenu + '"][aria-expanded]').attr('aria-expanded', 'false'); 2007 2008 // Update open menu global var. 2009 g.openMenu = null; 2010 $('html').removeClass('no-scroll'); 2011 } 2012 }); 2013 2014 $(document).on('click', '#signout-link', function(e) { 2015 e.preventDefault(); 2016 dataLayer.push({ 2017 'event': 'loggedOut', 2018 }); 2019 2020 location.replace(e.target.href); 2021 });
2022 2023 // Footer accordion menu on mobile. 2024 $(document) 2025 .on('click', '.small-screen #global-footer .title', function () { 2026 $(this) 2027 .next().stop(true, true).slideToggle(400) 2028 .parents('ul').toggleClass('open') 2029 .parents('.footer-section').siblings().find('ul ul').stop(true, true).slideUp(300) 2030 .parents('ul').removeClass('open'); 2031 }); 2032}; 2033 2034var touchHandler = function (event) { 2035 var touch = event.hasOwnProperty('changedTouches') ? event.changedTouches[0] : event.originalEvent.changedTouches[0]; 2036 2037 var simulatedEvent = document.createEvent("MouseEvent"); 2038 simulatedEvent.initMouseEvent({ 2039 touchstart: "mousedown", 2040 touchmove: "mousemove", 2041 touchend: "mouseup" 2042 }[event.type], true, true, window, 1, 2043 touch.screenX, touch.screenY, 2044 touch.clientX, touch.clientY, false, 2045 false, false, false, 0, null); 2046 2047 touch.target.dispatchEvent(simulatedEvent); 2048 2049 event.preventDefault(); 2050}; 2051 2052var openMenuFromHash = function () { 2053 var target = '', delay = 0; 2054 2055 switch (location.hash.replace('#', '')) { 2056 case 'signin': 2057 case '/signin': 2058 case 'register': 2059 case '/register': 2060 // First get an email from url like: [email protected]&whateverElse#signin. 2061 // Not doing just location.search.match(...)[1] || null cz if match fails it will throw an error. 2062 var email = (location.search.match(/(?:\?|&)e=(.*?)(?:$|&)/) || [null, null])[1], 2063 // Get a possible redirect URL to navigate to in case of success. 2064 redirectLink = (location.search.match(/(?:\?|&)r=(.*?)(?:$|&)/) || [null, null])[1], 2065 params = { 2066 source: 'top', 2067 success: function (cartMerged, data) { 2068 if (redirectLink) location.href = decodeURIComponent(redirectLink); 2069 else { 2070 if (data.message && data.message.length > 0) notificationBar.show(data.message, 1000 * 8); 2071 $.accountMenu.refresh(); 2072 } 2073 } 2074 }; 2075 2076 if (email) params.email = email; 2077 2078 // If email or redirect link is matched open the signup view. 2079 if (email || redirectLink) $.accountSignup.open(params); 2080 2081 break; 2082 } 2083 if (target) setTimeout(function () { $(target).trigger('click'); }, delay); 2084}; 2085 2086var initPage = function () { 2087 // Useful if-then-else alternative to check on conditions to fire off the code snipplets. 2088 switch (true) { 2089 // Products category / Newsletter page. 2090 case ($(".leftnav-container .filter-close").length > 0): 2091 initProductCategory(); 2092 break; 2093 2094 case ($(".widget li #print").length > 0): 2095 initOrderDetailPrint(); 2096 break; 2097 2098 // Another specific page. 2099 /*case (whatever your condition to target that page only): 2100 initThePageBehavior(); 2101 break;*/ 2102 } 2103}; 2104 2105var onResize = function () { 2106 switch (true) { 2107 // Products 3 pane category switching for /Contactus/Corporate Sales, Techincal Assistance page. 2108 case ($("#LBox1").length): 2109 resizeCorporate3Pane(); 2110 break; 2111 } 2112}; 2113 2114// Products 3 pane category switching for /Contactus/Corporate Sales, Techincal Assistance page. 2115var resizeCorporate3Pane = function () { 2116 if (window.innerWidth <= 960) { 2117 $("#LBox1").attr("size", 1); 2118 $("#LBox2").attr("size", 1); 2119 $("#LBox3").attr("size", 5); 2120 } 2121 else { 2122 $("#LBox1").attr("size", 10); 2123 $("#LBox2").attr("size", 10); 2124 $("#LBox3").attr("size", 10); 2125 } 2126} 2127 2128var initLiveChat = function () { 2129 $zopim(function () { 2130 $zopim.livechat.set({ 2131 language: global.store.language, 2132 onStatus: function (status) { 2133 if (status === undefined) status = ''; 2134 $(".livechat-status").html(": " + titleCaps(status)); 2135 global.livechatStatus = titleCaps(status); 2136 } 2137 }); 2138 });
2139 2140 $("html") 2141 .on("click", '.livechat-link, .help-livechat a', function (e) { 2142 e.preventDefault(); 2143 2144 if (g.openMenu) $('#' + g.openMenu + ' > .close').trigger('click'); 2145 $zopim.livechat.window.show(); 2146 }); 2147 2148 if (window.location.toString().indexOf('chat=1') > -1) $zopim.livechat.window.show(); 2149}; 2150 2151var initCart = function () { 2152 $.cartUtility = { 2153 productImg: function (id) { 2154 if (typeof StoreImageServer === 'string') { 2155 return StoreImageServer + "/images/products/large/pdt_" + id + ".png?width=120&height=120"; 2156 } 2157 else { 2158 return "https://img.creative.com/images/products/large/pdt_" + id + ".png?width=120&height=120"; 2159 } 2160 }, 2161 secureUrl: function (path) { 2162 return path; 2163 }, 2164 attribute: function (data, type) { 2165 2166 var result = data.ProductAttributes; 2167 2168 if (data == null || typeof result != 'object' || result == null) return; 2169 2170 var userStartSelect = false; 2171 2172 var productid; 2173 2174 // if (type != 'PWP' && type != 'FREE') { 2175 productid = data.ProductID; 2176 // } 2177 2178 for (var i = 0; i < result.length; i++) { 2179 if (result[i].KeyID === 1) { 2180 result[i].Style = 'COLOR'; 2181 } 2182 else { 2183 result[i].Style = 'SELECT'; 2184 } 2185 2186 for (var v = 0; v < result[i].Attributes.length; v++) { 2187 if (result[i].Attributes[v].UserSelected) { 2188 userStartSelect = true; 2189 } 2190 2191 if (type == 'PWP') { 2192 2193 var pids = []; 2194 2195 for (var p = 0; p < data.ChildProductIDs.length; p++) { 2196 var pid = data.ChildProductIDs[p]; 2197 2198 if (result[i].Attributes[v].ProductIDs.indexOf(pid) >= 0) { 2199 pids.push(pid); 2200 } 2201 } 2202 2203 result[i].Attributes[v].ProductIDs = pids; 2204 } 2205 2206 2207 if (type == 'FREE') { 2208 2209 var pids = []; 2210 2211 for (var p = 0; p < data.ChildProduct.length; p++) { 2212 var pid = data.ChildProduct[p]; 2213 2214 if (result[i].Attributes[v].ProductIDs.indexOf(pid) >= 0) { 2215 pids.push(pid); 2216 } 2217 } 2218 2219 result[i].Attributes[v].ProductIDs = pids; 2220 } 2221 2222 } 2223 2224 for (var v = 0; v < result[i].Attributes.length; v++) { 2225 var productIDs = result[i].Attributes[v].ProductIDs; 2226 result[i].Attributes[v].Selected = false; 2227 var newid = []; 2228 for (var p = 0; p < productIDs.length; p++) { 2229 var id = productIDs[p]; 2230 if (type == 'master') { 2231 2232 var child = this.getProduct(data, id); 2233 if (child != null) { 2234 newid.push(id); 2235 } 2236 2237 } else { 2238 var child = this.getChild(data, id); 2239 if (child != null && child.InStock && child.Price > 0) { 2240 newid.push(id); 2241 } 2242 } 2243 if (result[i].Attributes[v].UserSelected) { 2244 result[i].Attributes[v].Selected = true; 2245 } 2246 if (!userStartSelect && id === productid) { 2247 result[i].Attributes[v].Selected = true; 2248 } 2249 } 2250 result[i].Attributes[v].ProductIDs = newid; 2251 } 2252 } 2253 2254 if (userStartSelect && result.length > 1) { 2255 for (var i = 1; i < result.length; i++) { 2256 var selected = false; 2257 for (var v = 0; v < result[i].Attributes.length; v++) { 2258 if (result[i].Attributes[v].Selected) { 2259 selected = true; 2260 } 2261 } 2262 2263 if (!selected) { 2264 2265 var parent = []; 2266 for (var v = 0; v < result[i - 1].Attributes.length; v++) { 2267 if (result[i - 1].Attributes[v].Selected) { 2268 parent = result[i - 1].Attributes[v].ProductIDs; 2269 } 2270 } 2271 2272 for (var v = 0; v < result[i].Attributes.length; v++) { 2273 if (result[i].Attributes[v].ProductIDs.indexOf(productid) != -1 && 2274 parent.indexOf(productid) != -1 2275 ) { 2276 result[i].Attributes[v].Selected = true; 2277 } 2278 } 2279 } 2280 } 2281 2282 } 2283 2284 for (var i = 0; i < result.length; i++) { 2285 2286 var parentProductIDs = []; 2287 2288 if (i > 0) 2289 for (var v = 0; v < result[i - 1].Attributes.length; v++) { 2290 if (result[i - 1].Attributes[v].Selected) 2291 parentProductIDs = result[i - 1].Attributes[v].ProductIDs; 2292 } 2293 2294 for (var v = 0; v < result[i].Attributes.length; v++) { 2295 var pids = result[i].Attributes[v].ProductIDs; 2296 if (pids.length > 0 && 2297 (parentProductIDs.length == 0 || this.compareProduct(pids, parentProductIDs)) 2298 ) { 2299 result[i].Attributes[v].Show = true; 2300 } 2301 else { 2302 result[i].Attributes[v].Show = false; 2303 } 2304 } 2305 2306 } 2307 2308 return result; 2309 }, 2310 getChild: function (data, id) { 2311 2312 for (var i = 0; i < data.Child.length; i++) { 2313 if (data.Child[i].ProductID === id) { 2314 return data.Child[i]; 2315 } 2316 } 2317 2318 return null; 2319 }, 2320 getProduct: function (master, id) { 2321 for (var i = 0; i < master.Products.length; i++) { 2322 if (master.Products[i].ProductID === id) { 2323 return master.Products[i]; 2324 } 2325 } 2326 return null; 2327 }, 2328 productSelect: function (data, pid) { 2329 for (var i = 0; i < data.ProductAttributes.length; i++) { 2330 for (var v = 0; v < data.ProductAttributes[i].Attributes.length; v++) { 2331 if (data.ProductAttributes[i].Attributes[v].ProductIDs.indexOf(pid) >= 0) { 2332 data.ProductAttributes[i].Attributes[v].UserSelected = true; 2333 } 2334 } 2335 } 2336 }, 2337 clearSelect: function (data) { 2338 for (var i = 0; i < data.ProductAttributes.length; i++) { 2339 for (var v = 0; v < data.ProductAttributes[i].Attributes.length; v++) { 2340 data.ProductAttributes[i].Attributes[v].UserSelected = false; 2341 } 2342 } 2343 }, 2344 userSelect: function (item, key, value) { 2345 var nextclear = false; 2346 for (var i = 0; i < item.ProductAttributes.length; i++) { 2347 for (var v = 0; v < item.ProductAttributes[i].Attributes.length; v++) { 2348 if (nextclear) { 2349 item.ProductAttributes[i].Attributes[v].UserSelected = false; 2350 } 2351 else { 2352 var attr = item.ProductAttributes[i].Attributes[v]; 2353 if (attr.KeyID == key) { 2354 item.ProductAttributes[i].Attributes[v].UserSelected = false; 2355 if (attr.ID == value) { 2356 item.ProductAttributes[i].Attributes[v].UserSelected = true; 2357 nextclear = true; 2358 } 2359 } 2360 } 2361 } 2362 } 2363 2364 // console.log(item.ProductAttributes); 2365 }, 2366 userSelectGetProduct: function (item, key, value) { 2367 2368 var parentProduct = []; 2369 var selectlevel = item.ProductAttributes.length; 2370 for (var i = 0; i < item.ProductAttributes.length; i++) { 2371 for (var v = 0; v < item.ProductAttributes[i].Attributes.length; v++) { 2372 2373 2374 if ( 2375 value === item.ProductAttributes[i].Attributes[v].ID || 2376 (item.ProductAttributes[i].Attributes[v].Selected && item.ProductAttributes[i].Attributes[v].KeyID != key) 2377 ) { 2378 if (i == 0) { 2379 for (var p = 0; p < item.ProductAttributes[i].Attributes[v].ProductIDs.length; p++) 2380 parentProduct.push(item.ProductAttributes[i].Attributes[v].ProductIDs[p]); 2381 } 2382 else { 2383 2384 var newProduct = []; 2385 for (var p = 0; p < item.ProductAttributes[i].Attributes[v].ProductIDs.length; p++) { 2386 var pid = item.ProductAttributes[i].Attributes[v].ProductIDs[p]; 2387 if (parentProduct.indexOf(pid) != -1) 2388 newProduct.push(pid); 2389 } 2390 parentProduct = newProduct; 2391 } 2392 2393 selectlevel--; 2394 } 2395 } 2396 if (key === item.ProductAttributes[i].KeyID) { 2397 break; 2398 } 2399 } 2400 2401 if (selectlevel == 0 && parentProduct.length > 0) { 2402 return parentProduct[0]; 2403 } 2404 else { 2405 return 0; 2406 } 2407 }, 2408 compareProduct: function (item1, item2) { 2409 2410 for (var i = 0; i < item1.length; i++) { 2411 for (var p = 0; p < item2.length; p++) { 2412 if (item1[i] === item2[p]) return true; 2413 } 2414 } 2415 2416 return false; 2417 }, 2418 loadShipConfig: function (data, model) { 2419 if (data != null) { 2420 2421 var country = data.CountryID; 2422 2423 // console.log(country); 2424 2425 if (country && addressConfig && addressConfig.length > 0) { 2426 model.config = addressConfig[0];
2427 for (var i = 1; i < addressConfig.length; i++) { 2428 if (addressConfig[i].country == country) { 2429 model.config = $.extend({}, addressConfig[0], addressConfig[i]); 2430 break; 2431 } 2432 } 2433 } 2434 2435 if (data.IsBilling && 2436 model.config && 2437 model.config.billingStates && 2438 model.config.billingStates.length > 0) { 2439 data.stateList = model.config.billingStates; 2440 } 2441 else if (!data.IsBilling && 2442 model.config && 2443 model.config.shippingStates && 2444 model.config.shippingStates.length > 0) { 2445 data.stateList = model.config.shippingStates; 2446 } 2447 else { 2448 data.stateList = []; 2449 } 2450 2451 model.countryList = []; 2452 if (data.IsBilling && typeof billingCountryList === 'object') { 2453 model.countryList = billingCountryList; 2454 } 2455 else if (!data.IsBilling && typeof shippingCountryList === 'object') { 2456 model.countryList = shippingCountryList; 2457 } 2458 } 2459 } 2460 }; 2461} 2462 2463/** 2464 * @dependencies: initCart(). 2465 * @return void. 2466 */ 2467var initAccount = function () { 2468 $.loadCustomer = function (data) { 2469 $.updateCartCount(data.CartItemCount); 2470 2471 $.loadAccountMenu(data); 2472 }; 2473 2474 $.updateCartCount = function (i) { 2475 if (i > 0) { 2476 if (i > 99) { 2477 $("#header-cart-count").text('99+').css({ 'font-size': '8px' }); 2478 } else 2479 $("#header-cart-count").text(i).css({ 'font-size': '10px' }); 2480 } else { 2481 $("#header-cart-count").text(''); 2482 } 2483 // Keep the cart link's accessible name purpose-first and in sync with the count 2484 // (e.g. "Cart, 1") instead of announcing the bare badge number. The visual badge 2485 // is aria-hidden and the icon alt is empty, so aria-label is the whole name. 2486 var $cart = $("#nav-cart"); 2487 var baseLabel = $cart.attr('data-cart-label') || 'Cart'; 2488 $cart.attr('aria-label', i > 0 ? baseLabel + ', ' + (i > 99 ? '99+' : i) : baseLabel); 2489 }; 2490 2491 $.loadAccountMenu = function (data) { 2492 $.accountMenu.init(data); 2493 $("#nav-sign-in, #sidebar-sign-in").click(function (e) { 2494 e.preventDefault(); 2495 $.accountMenu.toggle(); 2496 }); 2497 }; 2498 2499 $.accountMenu = { 2500 init: function (data) { 2501 this.config = $.extend(this.config, data); 2502 2503 //no need to load html to account menu by default, because load menu will affect page performance 2504 //when user click 'sign in', the login form will to load automatic. 2505 //DC - 2016-10-02 2506 //$("#nav-account-menu .inner").html(this.menuContent()); 2507 2508 this.updateHeader(); 2509 this.message(); 2510 this.addClass(); 2511 }, 2512 updateHeader: function () { 2513 2514 $("#nav-sign-in .text").text(this.config.LoggedIn ? res.bcMyAccount : res.lb_SignIn).parent().show(); 2515 }, 2516 config: {}, 2517 open: false, 2518 loaded: false, 2519 toggle: function () { 2520 this[this.open ? 'turnOff' : 'turnOn'](); 2521 $('html').scrollTop(0); 2522 }, 2523 turnOn: function () { 2524 // console.log("---html---" + this.loaded); 2525 if (!this.loaded) { 2526 2527 var html = this.menuContent(); 2528 //using setTimeout to add delay, some time the jQuary .html() function not work right. 2529 setTimeout(function () { 2530 //console.log("---html---"); 2531 //console.log(html); 2532 //console.log("---html---"); 2533 $("#nav-account-menu .inner").html(html); 2534 }, 600); 2535 2536 this.loaded = true; 2537 2538 if (this.config.LoggedIn) { 2539 this.update(0); 2540 } 2541 } 2542 this.open = true; 2543 }, 2544 turnOff: function () { 2545 this.open = false; 2546 }, 2547 menuContent: function () { 2548 var accountContent; 2549 2550 if (this.config.LoggedIn) { 2551 if (!this.config.Icon || this.config.Icon.length == 0) { 2552 this.config.Icon = "/content2/images/account.jpg"; 2553 } 2554 2555 var news = ''; 2556 if (this.config.News) for (var i = 0; i < this.config.News.length; i++) { 2557 news += '<p class="news">' + this.config.News[i] + '</p>'; 2558 } 2559 2560 var orders = ''; 2561 if (this.config.Orders && this.config.Orders.length > 0) { 2562 orders = '<h2>' + res.hdRecentOrders + '</h2><ul>'; 2563 2564 for (var i = 0; i < this.config.Orders.length; i++) { 2565 orders += '<li><a href="' + $.cartUtility.secureUrl('/account/order/' + this.config.Orders[i][0]) + '">' + this.config.Orders[i][0] + '</a>: ' + this.config.Orders[i][1] + '</li>'; 2566 } 2567 orders += '</ul><p><a href="' + $.cartUtility.secureUrl('/account') + '" class="view-all raa">' + res.lbViewAllOrders + '</a></p>'; 2568 } 2569 2570 accountContent = 2571 '<div class="account-quick-links">\ 2572 <p>' + res.bcMyAccount + '</p>\ 2573 <ul>\ 2574 <li><i class="i-arr-r-lt"></i><a href="' + $.cartUtility.secureUrl('/account/') + '">' + res.menu_orders + '</a></li>\ 2575 <li ' + ((this.config.Staff || this.config.Re
2575seller || !this.config.MembershipEnable) ? 'style="display:none"' : '') + '><i class="i-arr-r-lt"></i><a href="' + $.cartUtility.secureUrl('/account/membership') + '">' + res.membership_program + '</a></li>\ 2576 <li><i class="i-arr-r-lt"></i><a href="' + $.cartUtility.secureUrl('/account/profile') + '">' + res.Mobile_AccountProfile + '</a></li>\ 2577 <li><i class="i-arr-r-lt"></i><a href="' + $.cartUtility.secureUrl('/account/contactus') + '">' + res.ttl_Contact + '</a></li>\ 2578 <li><i class="i-arr-r-lt"></i><a id="signout-link" href="' + $.cartUtility.secureUrl('/account/Signout') + '">' + res.Logout + '</a></li>\ 2579 </ul>\ 2580 </div>'; 2581 2582 //To show different content when order record is empty. 2583 if (orders.length > 0) { 2584 accountContent += '<div class="container summary">\ 2585 <div class="row">\ 2586 <div class="col-xs-3 col-xxs-12 col-sm-1">\ 2587 <img src="'+ this.config.Icon + '" class="user-avatar">\ 2588 </div>\ 2589 <div class="col-xxs-12 col-xs-9 col-sm-5">\ 2590 <h2>' + res.HeaderFooterMaster_Welcome.replace('{0}', this.config.FirstName) + '</h2>\ 2591 '+ news + '\ 2592 </div>\ 2593 <div class="col-xxs-12 col-sm-5 col-sm-offset-1">\ 2594 <div class="orders clearfix">'+ orders + '</div>\ 2595 </div>\ 2596 </div>\ 2597 </div>'; 2598 } 2599 else { 2600 accountContent += '<div class="container summary">\ 2601 <div class="row">\ 2602 <div class="col-xs-1 col-xxs-12">\ 2603 <img src="'+ this.config.Icon + '" class="user-avatar">\ 2604 </div>\ 2605 <div class="col-xs-9">\ 2606 <h2>' + res.HeaderFooterMaster_Welcome.replace('{0}', this.config.FirstName) + '</h2>\ 2607 '+ news + '\ 2608 </div>\ 2609 </div>\ 2610 </div>'; 2611 } 2612 } 2613 else { 2614 //DC 2016-08-26 2615 //Using iframe to do secure login from non-secure site 2616 accountContent = '<iframe src="' + '/account/signup?layout=no&source=topmenu" scrolling="no" width="100%" id="loginiframe" name="loginiframe" style="height:250px"></iframe>\ 2617 <div id="loginLoading" style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;text-align: center;padding-top: 100px;background-color: #f2f2f2;"><div class="loading medium"></div></div>'; 2618 } 2619 2620 return accountContent; 2621 }, 2622 update: function (h) { 2623 $("#nav-account-menu").css("height", h == 0 ? "auto" : h + "px"); 2624 $("#loginiframe").css("height", h + "px"); 2625 $("#loginLoading").hide(); 2626 }, 2627 message: function () { 2628 2629 window.addEventListener('message', function (e) { 2630 if (typeof e.data === 'string' && e.data != '' && e.data.indexOf('{') == 0) { 2631 var result = $.parseJSON(e.data); 2632 2633 if (result.source == 'topmenu') { 2634 if (result.action == 'update') { 2635 var height = parseInt(result.height); 2636 $.accountMenu.update(height); 2637 } 2638 else if (result.action == 'loginsuccess') { 2639 $.accountMenu.open = true; 2640 $.accountMenu.refresh(); 2641 2642 if (result.cartMerged && (new RegExp('/shoppingcart')).test(location.href.toLowerCase())) {
2643 notificationBar.show(res.cart_combined.replace('{0}', $.cartUtility.secureUrl("/shoppingcart/")), 1000 * 30); 2644 } 2645 2646 //DC 2016-08-26 2647 //when customer logged in, current page should be refresh to update promo price or other. 2648 if (typeof $.accountMenu.pageRefresh === 'function') 2649 $.accountMenu.pageRefresh.call(); 2650 else { 2651 //if page has not refresh function, the page will force a refresh 2652 $("#nav-account-menu > .i-cross.close,#nav-sign-in").on('click', function () { 2653 location.reload(); 2654 }); 2655 } 2656 } 2657 else if (result.action == 'close') { 2658 $.accountMenu.close(); 2659 } 2660 } 2661 2662 if (result.action === 'loginsuccess') { 2663 if (window.klaviyo && typeof window.klaviyo.identify === 'function' && result.optIn) { 2664 klaviyo.identify( 2665 { 2666 'email': result.email 2667 } 2668 ) 2669 } 2670 2671 dataLayer.push({ 2672 'event': 'loggedIn', 2673 }); 2674 } 2675 } 2676 }); 2677 2678 }, 2679 refresh: function () { 2680 $("#loginLoading").show(); 2681 //DC 2016-08-26, 2682 //using jsonp to update customer status, for cross domain 2683 //some pages will to request secure url from non-secure site 2684 $.ajax({
2685 url: '/customer/?r=' + Math.random(), 2686 dataType: 'jsonp', 2687 success: function (data) { 2688 $.accountMenu.updateData(data); 2689 } 2690 }); 2691 }, 2692 updateData: function (data) { 2693 this.config = $.extend(this.config, data); 2694 this.updateHeader(); 2695 this.addClass() 2696 this.loaded = false; 2697 if (this.open) { 2698 this.turnOn(); 2699 } 2700 $.updateCartCount(this.config.CartItemCount); 2701 }, 2702 close: function () { 2703 $.accountMenu.turnOff(); 2704 $.accountMenu.loaded = false; 2705 $("#nav-account-menu > .i-cross.close").click(); 2706 }, 2707 pageRefresh: null, 2708 addClass: function () { 2709 if ($.accountMenu && $.accountMenu.config && $.accountMenu.config.LoggedIn) { 2710 $('#alert-box-toggle').addClass('logged-in') 2711 } else { 2712 $('#alert-box-toggle').removeClass('logged-in') 2713 } 2714 } 2715 }; 2716};
2717 2718// Account authentification. 2719var initAuthentication = function () { 2720 var signup = 2721 { 2722 config: { 2723 type: '', 2724 success: function () { 2725 // On login/register success, redirect to the redirectLink if set (from URL). 2726 if ($.accountSignup.config.redirect) location = $.accountSignup.config.redirect; 2727 }, 2728 fail: function () { }, 2729 messageType: 0, 2730 email: '', 2731 redirect: '', 2732 firstName: '', 2733 lastName: '', 2734 month: '0', 2735 year: '0', 2736 facebook: true, 2737 source: 'popup', // popup, top 2738 validateCode: '' 2739 }, 2740 //update login status by ajax 2741 updateStatus: function () { 2742 //using jsonp to update customer status, for cross domain 2743 $.ajax({ 2744 url: '/customer/?r=' + Math.random(), 2745 dataType: 'jsonp', 2746 success: function (data) { 2747 $.loadCustomer(data); 2748 } 2749 }); 2750 }, 2751 open: function (option) { 2752 $.extend(this.config, option); 2753 2754 // If email address is set then pass it trough the URL. 2755 var emailUrl = this.config.email ? '&e=' + this.config.email : ''; 2756 if (this.config.validateCode && this.config.validateCode.length > 0) { 2757 emailUrl += '&v=' + this.config.validateCode; 2758 } 2759 var url = '/account/signup/?layout=no&id=' + this.config.type + '&source=' + this.config.source + emailUrl + '&fn=' + this.config.firstName + '&m=' + this.config.month + '&y=' + this.config.year + '&ln=' + this.config.lastName + '&messagetype=' + this.config.messageType + '&fb=' + this.config.facebook; 2760 if (this.config.source === 'popup') { 2761 url += '&theme=white'; 2762 $.modalW({ url: url, width: 'auto', height: 'auto', background: '#fff' }); 2763 } 2764 else { 2765 // url += '&theme=grey'; 2766 var html = '<iframe src="' + url + '" scrolling="no" width="100%" id="loginiframe" name="loginiframe" style="height:250px"></iframe>\ 2767 <div id="loginLoading" style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;text-align: center;padding-top: 100px;background-color: #f2f2f2;"><div class="loading medium"></div></div>'; 2768 $.accountMenu.loaded = true; 2769 $.accountMenu.open = true; 2770 $("#nav-account-menu .inner").html(html); 2771 setTimeout(function () { $("#nav-sign-in").click(); }, 400); 2772 } 2773 }, 2774 update: function (width, height) { 2775 $.modalWUpdate(width, height); 2776 }, 2777 message: function () { 2778 // The 'Message' event is triggered from secure site. 2779 window.addEventListener('message', function (e) { 2780 if (typeof e.data == 'string' && e.data != '' && e.data.indexOf('{') == 0) { 2781 var result = $.parseJSON(e.data); 2782 if (result.source == 'popup') { 2783 if (result.action == 'update') { 2784 var height = parseInt(result.height); 2785 var width = parseInt(result.width); 2786 $.accountSignup.update(width, height); 2787 } 2788 else if (result.action == 'loginsuccess') { 2789 $.accountSignup.config.success.call(this, result.cartMerged); 2790 } 2791 else if (result.action == 'fail') { 2792 $.accountSignup.config.fail.call(); 2793 } 2794 else if (result.action == 'close') { 2795 $.modalWClose(); 2796 } 2797 } 2798 else if (result.source == 'top') { 2799 if (result.action == 'update') { 2800 var height = parseInt(result.height); 2801 $.accountMenu.update(height); 2802 } 2803 else if (result.action == 'loginsuccess') { 2804 $.accountMenu.open = true; 2805 $.accountSignup.config.success.call(this, result.cartMerged, result); 2806 } 2807 else if (result.action == 'fail') { 2808 $.accountSignup.config.fail.call(); 2809 } 2810 else if (result.action == 'close') { 2811 $.accountMenu.turnOff(); 2812 $.accountMenu.loaded = false; 2813 $("#nav-account-menu > .i-cross.close").click(); 2814 } 2815 } 2816 2817 } 2818 }); 2819 }, 2820 close: function () { 2821 $.modalWClose(); 2822 } 2823 }; 2824 2825 if (global.store.hasStore == "1") { 2826 signup.updateStatus();
2827 } 2828 2829 $.accountSignup = signup; 2830 $.accountSignup.message(); 2831} 2832 2833var initTracking = function () { 2834 // Campaign Tracking. 2835 var campaign_id = urlParams.ctlcmp || urlParams.refid; 2836 if (campaign_id != '' && campaign_id != undefined) { 2837 campaign_id = validateCampaignID(campaign_id.substr(0, 36)); 2838 jQuery.cookie('ctlcmp', campaign_id, { expires: 7, path: '/', domain: '.creative.com' }); 2839 } 2840 2841 // Referral Tracking. 2842 var referral_id = urlParams.refid; 2843 if (referral_id != '' && referral_id != undefined) { 2844 referral_id = validateCampaignID(referral_id.substr(0, 36)); 2845 jQuery.cookie('referral_id', referral_id, { expires: 7, path: '/', domain: '.creative.com' }); 2846 } 2847 2848 // Associate Tracking. 2849 var associate_id = urlParams.assoc; 2850 if (associate_id != '' && associate_id != undefined) { 2851 jQuery.cookie('aid', associate_id, { path: '/', domain: '.creative.com' }); 2852 } 2853 2854 // Student Beans Tracking 2855 var aff_sub = urlParams.aff_sub; 2856 if (aff_sub != '' && aff_sub != undefined) { 2857 aff_sub = validateCampaignID(aff_sub); 2858 jQuery.cookie('aff_sub', aff_sub, { path: '/', domain: '.creative.com' }); 2859 } 2860 2861}; 2862 2863var validateCampaignID = function (str) { 2864 var regexS = "[A-Za-z0-9_-]{0,100}"; 2865 2866 var regex = new RegExp(regexS); 2867 var match = regex.exec(str); 2868 if (match == null) 2869 return ""; 2870 else 2871 return match[0]; 2872} 2873 2874/** 2875 * Lazy load images using the lazyload jquery plugin. 2876 * 2877 * @param string|jQuery object scope_images: an optional param to perform lazyload on a specific scope images. 2878 * @param Function callback: if given, the callback function will be executed once the image is loaded. 2879 * @return void. 2880 */ 2881var do_lazy = function (scope_images, callback, container) { 2882 var settings = { effect: "fadeIn" }; 2883 if (scope_images === undefined) scope_images = '.lazy, [data-original]'; 2884 if (container !== undefined) settings.container = container; 2885 2886 $(scope_images).each(function (i, curr) { 2887 // Ecxlude gif images and already resized images. 2888 if ($(curr).attr('data-original').indexOf('?') === -1 && !/^.*\.gif/.test($(curr).attr('data-original'))) { 2889 // First check if we can serve smaller size images. 2890 if (g.windowFormat === 'small') { 2891 $(curr).attr('data-original', $(curr).attr('data-small') ? $(curr).attr('data-small') 2892 : ($(curr).attr('data-original') + '?width=750')); 2893 } 2894 else if (g.windowFormat === 'medium') { 2895 $(curr).attr('data-original', $(curr).attr('data-medium') ? $(curr).attr('data-medium') 2896 : ($(curr).attr('data-original') + '?width=1500')); 2897 } 2898 2899 2900 // Trick to get the 'loaded' class on loaded background images too. 2901 if (typeof callback === 'function') $('<img>').on('load', function () { 2902 $(curr).addClass('ready'); 2903 if (callback) callback($(curr)); 2904 }).attr('src', $(curr).attr('data-original')); 2905 } 2906 }).lazyload(settings); 2907}; 2908 2909/** 2910 * Parallax class to animate an image background in a parallax effect. 2911 * This class can be called multiple times but on different elements. 2912 * 2913 * Example of use: 2914 * var imgSet = $('#state-of-the-art-section img:first, #MultipleAdvancedTech-section img:first'); 2915 * new parallax(imgSet, {amount: 40}); 2916 * 2917 * @param {jQuery collection} imgSet: the <img> tags to transform to parallax bg (preferably full width and tall images for best effect). 2918 * @param {object} options: settings to customize the parallax effect. 2919 * @return void. 2920 */ 2921var parallaxReady, parallax = function (imgSet, options) { 2922 var self = this; 2923 self.imgSet = imgSet; 2924 self.options = $.extend( 2925 { 2926 amount: 30,// Percentage of image. 2927 boxShadow: 'normal'// 'normal' or 'darker'. 2928 }, options); 2929 2930 var wh, 2931 bindEvents = function () { 2932 parallaxReady = true; 2933 $(document) 2934 .on('resize', function (e) { wh = $(window).height() }) 2935 .on('scroll', function (e) { 2936 var ps = $(window).scrollTop(); 2937 $('.parallax .bg').each(function () { 2938 var posInView = $(this).offset().top - ps, 2939 posInViewPercent = posInView * 100 / wh, 2940 scrollInViewPercent = wh / $(this).height(); 2941 2942 if (posInViewPercent > 0 && posInViewPercent < 100) 2943 $(this).css('top', - Math.min((posInViewPercent) * self.options.amount / 100, self.options.amount) + '%') 2944 }) 2945 }); 2946 }, 2947 init = function () { 2948 wh = $(window).height(); 2949 2950 if (!parallaxReady) bindEvents(); 2951 2952 imgSet.each(function () { 2953 var img = $(this); 2954 img.wrap('<div class="parallax shadow' + (self.options.boxShadow === 'darker' ? ' darker' : '') + '"/>') 2955 .after('<div class="wrapper" style="height:' + (100 - self.options.amount) + '%;">\ 2956 <div class="bg" style="background-image: url(' + img.fadeTo(0, 0).attr('src') + ');height:' + (100 * 100 / (100 - self.options.amount)) + '%;"></div>\ 2957 </div>'); 2958 }); 2959 }(); 2960}; 2961 2962const SideMenuHandler = { 2963 // Constants 2964 menuSelectors: { 2965 sideMenu: '#side-menu', 2966 contentMenu: '.menu-content', //child of #side-menu 2967 footerMenu: '.menu-footer', //child of #side-menu 2968 mainNav: '#main-nav', 2969 sideMenuHeader: '#side-menu-header', //child of #main-nav 2970 hamburgerBtn: '#nav-sitemap', //child of #main-nav 2971 footerTxtLogin: '.txt-login', 2972 footerTxtAccount: '.txt-account' 2973 }, 2974 2975 homeMenu: "home-menu", 2976 currentMenu: "home-menu", 2977 menu: null, 2978 contentMenu: null, 2979 footerMenu: null, 2980 mainNav: null, 2981 sideMenuHeader: null, 2982 hamburgerBtn: null, 2983 arrSiblingMenu: ["nav-account-menu"], 2984 2985 elemReady: true, 2986 2987 initElements: function() { 2988 try { 2989 this.menu = document.querySelector(this.menuSelectors.sideMenu); 2990 this.contentMenu = this.menu.querySelector(this.menuSelectors.contentMenu); 2991 this.footerMenu = this.menu.querySelector(this.menuSelectors.footerMenu); 2992 2993 this.mainNav = document.querySelector(this.menuSelectors.mainNav); 2994 this.sideMenuHeader = this.mainNav.querySelector(this.menuSelectors.sideMenuHeader); 2995 this.hamburgerBtn = this.mainNav.querySelector(this.menuSelectors.hamburgerBtn); 2996 2997 const missingElements = []; 2998 2999 if (!this.menu) missingElements.push('sideMenu'); 3000 if (!this.mainNav) missingElements.push('mainNav'); 3001 if (!this.sideMenuHeader) missingElements.push('sideMenuHeader'); 3002 if (!this.hamburgerBtn) missingElements.push('hamburgerBtn'); 3003 if (missingElements.length > 0) { 3004 throw new Error(`Required menu elements not found: ${missingElements.join(', ')}`); 3005 } 3006 3007 } catch (error) { 3008 console.error('Failed to initialize menu elements:', error); 3009 this.elemReady = false; 3010 } 3011 }, 3012 3013 //Move selected submenu to under their parent position 3014 initSubmenu: function() { 3015 const expandMenus = this.menu.querySelectorAll(`.sub-menu[open='expand']`); 3016
3017 expandMenus.forEach(submenu => { 3018 const menuId = submenu.dataset.id; 3019 const menuItem = this.menu.querySelector(`.menu-item[data-target="${menuId}"]`); 3020 if (menuItem && !menuItem.contains(submenu)) { 3021 menuItem.after(submenu); 3022 } 3023 }); 3024 }, 3025 3026 setFooterLoginText: function(){ 3027 if(global.store.hasStore != '0'){ 3028 const booHaveEmail = global.store.customer.email != ""; 3029 this.footerMenu.querySelector(this.menuSelectors.footerTxtLogin).classList.toggle("active", !booHaveEmail); 3030 this.footerMenu.querySelector(this.menuSelectors.footerTxtAccount).classList.toggle("active", booHaveEmail); 3031 } 3032 }, 3033 3034 getCountryName: function() { 3035 const currentCountryID = global.store.storeCountryID; 3036 if (!currentCountryID) return global.store.storeName; 3037 3038 const countryItem = [...this.menu.querySelectorAll('[data-countryid]')].find(item => 3039 Number(item.dataset.countryid.split(',')[0]) === currentCountryID 3040 ); 3041 3042 return countryItem ? countryItem.getAttribute("value") : global.store.storeName; 3043 }, 3044 3045 setFooterCountryName: function(){ 3046 const btnLocation = this.footerMenu.querySelector(".btn-location"); 3047 if(!btnLocation || btnLocation.querySelector("div")){ 3048 return; 3049 } 3050 3051 const newDiv = document.createElement("div"); 3052 newDiv.className = "i-globe txt-storename"; 3053 newDiv.innerHTML = this.getCountryName(); 3054 btnLocation.appendChild(newDiv); 3055 }, 3056 3057 hasMenuDataID: function(menuId) { 3058 return this.getMenuDataID(menuId) != null; 3059 }, 3060 3061 getMenuDataID: function(menuId) { 3062 return this.menu.querySelector(`[data-id="${menuId}"]`); 3063 }, 3064 3065 openMethod: function(menuId) { 3066 return (this.hasMenuDataID(menuId)) ? this.getMenuDataID(menuId).getAttribute("open") : ""; 3067 }, 3068 3069 setCurrentMenu: function(menuId) { 3070 this.contentMenu.dataset.current = menuId; 3071 }, 3072 3073 resetSideMenu: function(){ 3074 this.mainNav.classList.remove("open-side-menu-header"); 3075 this.setCurrentMenu(""); 3076 this.menu.querySelectorAll(".sub-menu.active, .sub-menu.open").forEach(submenu => { 3077 if(submenu.classList.contains("open")){ 3078 submenu.style.display = "none"; 3079 } 3080 submenu.classList.remove("active","open"); 3081 }); 3082 this.menu.querySelectorAll(".menu-item.i-minus").forEach(menuItem => { 3083 menuItem.classList.remove("i-minus"); 3084 menuItem.classList.add("i-plus"); 3085 }); 3086 this.menu.querySelectorAll("[data-countryid].selected").forEach(countryItem => { 3087 countryItem.classList.remove("selected"); 3088 }); 3089 }, 3090 3091 toggleSideMenuHeader: function(targetMenu) { 3092 //menu header 3093 const isHomeMenu = targetMenu === this.homeMenu; 3094 this.sideMenuHeader.querySelector(".back-btn").innerHTML = isHomeMenu ? "" : this.getMenuDataID(targetMenu).getAttribute("data-header"); 3095 this.mainNav.classList.toggle("open-side-menu-header", !isHomeMenu); 3096 }, 3097 3098 toggleMenu: function(targetMenu) { 3099 if (this.openMethod(targetMenu) === "expand") { 3100 this.getMenuDataID(targetMenu).classList.toggle("open"); 3101 if(this.getMenuDataID(targetMenu).classList.contains("open")){ 3102 $(`#side-menu li.sub-menu[data-id="${targetMenu}"]`).slideDown(300); 3103 }else{ 3104 $(`#side-menu li.sub-menu[data-id="${targetMenu}"]`).slideUp(300); 3105 } 3106 return; 3107 } 3108 3109 //if target menu is sibling menu (not side menu child), skip statement 3110 if(this.arrSiblingMenu.includes(targetMenu)){ 3111 switch(targetMenu){ 3112 case "nav-account-menu": 3113 document.querySelector(`[data-target-id="nav-account-menu"]`).click(); 3114 break; 3115 } 3116 return; 3117 } 3118 3119 //if not expand menu, update content data 3120 this.setCurrentMenu(targetMenu); 3121 3122 // show header and back button 3123 this.toggleSideMenuHeader(targetMenu); 3124 3125 // The "Home" menu always stays on the last layer of the side menu, 3126 // so no need to toggle its active state. 3127 // The target menu is always visible before sliding in from the right and exiting. 3128 // Before showing the target menu, remove "active" from all existing submenus. 3129 if(targetMenu != "home-menu"){ 3130 // Remove "active" from all sub-menus 3131 this.menu.querySelectorAll(".sub-menu.active").forEach(submenu => submenu.classList.remove("active"));
3132 // Update the current menu reference 3133 this.currentMenu = targetMenu; 3134 // Add "active" to the target menu 3135 this.getMenuDataID(this.currentMenu).classList.add("active"); 3136 } 3137 }, 3138 3139 toggleExpandIcon: function(element) { 3140 if (!element.classList.contains("i-plus") && !element.classList.contains("i-minus")) { 3141 return; 3142 } 3143 3144 const isPlus = element.classList.contains("i-plus"); 3145 element.classList.toggle("i-plus", !isPlus); 3146 element.classList.toggle("i-minus", isPlus); 3147 }, 3148 3149 observeExpandState: function(target) { 3150 let timeoutTouch=null, observer=null; 3151 if (!target.hasTouchObserver) { 3152 target.hasTouchObserver = true; 3153 3154 const disconnectObserver = function(){ 3155 target.classList.remove("touch"); 3156 if(observer) observer.disconnect(); 3157 if(timeoutTouch) clearTimeout(timeoutTouch); 3158 target.hasTouchObserver = false; 3159 }; 3160 3161 observer = new MutationObserver((mutations) => { 3162 if (mutations.some(mutation => mutation.attributeName === "class" && target.classList.contains("i-minus"))) { 3163 disconnectObserver(); 3164 } 3165 }); 3166 observer.observe(target, { attributes: true }); 3167 3168 timeoutTouch = setTimeout(() => { 3169 disconnectObserver(); 3170 }, 100); 3171 } 3172 }, 3173 3174 addEventListeners: function() { 3175 this.hamburgerBtn.addEventListener("click", (e) => { 3176 e.preventDefault(); 3177 3178 if(document.querySelector("#all.open-side-menu")==null){ 3179 //when open side menu 3180 3181 this.resetSideMenu(); 3182 3183 //update info 3184 this.setFooterLoginText(); 3185 this.setFooterCountryName(); 3186 3187 //show home menu 3188 this.toggleMenu(this.homeMenu); 3189 } 3190 }); 3191 3192 this.sideMenuHeader.addEventListener("click", (e) => { 3193 e.stopPropagation(); 3194 //get current menu from side menu data current, remove menu class active 3195 this.menu.querySelector(`.sub-menu[data-id="${this.contentMenu.dataset.current}"]`).classList.remove("active"); 3196 this.toggleMenu(this.homeMenu); 3197 }); 3198 3199 // Menu click handlers 3200 this.menu.addEventListener("click", (e) => { 3201 const item = e.target; 3202 const parentElement = item.parentElement; 3203 3204 //if have url 3205 if (item.dataset.href) { 3206 const hrefTarget = item.dataset.hrefTarget || "_self"; 3207 3208 if (hrefTarget === "_self") { 3209 try { 3210 location.href = new URL(item.dataset.href, location.origin).href; 3211 } catch (e) { 3212 console.log("Error: incorrect url"); 3213 return; //block xss 3214 } 3215 } else { 3216 try { 3217 //return when incorrect url 3218 const url = new URL(item.dataset.href.trim()); 3219 if (url.protocol !== "http:" && url.protocol !== "https:") return; 3220 3221 window.open(url.href, "_blank", "noopener,noreferrer"); 3222 } catch (e) { 3223 console.log("Error: incorrect url"); 3224 return; //block xss 3225 } 3226 } 3227 3228 return; 3229 } 3230 3231 //if is country selector 3232 if(item.dataset.countryid && parentElement && parentElement.parentElement.matches("#side-menu li[data-id='location-menu']")) { 3233 item.classList.add("selected"); 3234 location.href = GetAbsoluteURL() + "/home/country?id=" + item.dataset.countryid; 3235 return; 3236 } 3237 3238 const isFooterButton = ["btn-login", "btn-location"].some(className => parentElement.classList.contains(className)); 3239
3240 //if dun have menu target and not footer button 3241 if (!item.hasAttribute("data-target") && !isFooterButton) return; 3242 3243 e.stopPropagation(); 3244 3245 const targetMenu = isFooterButton ? parentElement.dataset.target : item.dataset.target; 3246 3247 this.toggleMenu(targetMenu); 3248 this.toggleExpandIcon(item); 3249 }); 3250 3251 // menu item touch handler 3252 // when touch start - add classname 'touch' on elem 3253 // when touch end or cancel - remove classname 'touch' on elem 3254 ['touchstart', 'touchcancel'].forEach(event => { 3255 this.menu.addEventListener(event, e => { 3256 if (e.target.classList.contains('menu-item')) { 3257 e.target.classList.toggle('touch', event === 'touchstart'); 3258 } 3259 }); 3260 }); 3261 3262 this.menu.addEventListener("touchend", (e) => { 3263 const target = e.target; 3264 3265 // if not menu item, return 3266 if (!target.classList.contains("menu-item")) return; 3267 3268 const targetSibling = target.nextElementSibling; 3269 3270 if (!target.getAttribute("data-target") || 3271 target.classList.contains("i-minus") || 3272 !targetSibling || 3273 targetSibling.getAttribute("open") !== "expand") { 3274 return target.classList.remove("touch"); 3275 } 3276 3277 //if expand item not open, observe expand state 3278 this.observeExpandState(target); 3279 }); 3280 }, 3281 3282 init: function() { 3283 this.initElements(); 3284 if(this.elemReady){ 3285 this.initSubmenu(); 3286 this.addEventListeners(); 3287 } 3288 } 3289 3290}; 3291 3292document.addEventListener("DOMContentLoaded", () => { 3293 if(document.querySelector("html").classList.contains("layout-2024")){ 3294 SideMenuHandler.init(); 3295 } 3296}); 3297 3298//======================== End of GENERAL FUNCTIONS =======================// 3299//=========================================================================// 3300 3301 3302//=========================================================================// 3303//======================== SPECIFIC PAGES FUNCTIONS =======================// 3304// Only place here the functions that are used on a specific page. 3305 3306// Products category page. 3307var initProductCategory = function () { 3308 $(".leftnav-container .filter-close") 3309 .click(function () { 3310 if ($(this).hasClass("closed")) { 3311 $(this).removeClass("closed"); 3312 var parentobj = $(this).parent().parent().parent(); 3313 var height = 25; 3314 parentobj.find(">li").each(function () { 3315 height += $(this).height(); 3316 }); 3317 parentobj.animate({ height: height }, 300); 3318 } 3319 else { 3320 $(this).addClass("closed"); 3321 $(this).parent().parent().parent().animate({ height: $(this).height() }, 300); 3322 } 3323 }) 3324 .each(function () { 3325 $(this).parent().parent().find("a:first").click(function () { 3326 $(this).next().find("a:first").click(); 3327 }); 3328 if ($(this).hasClass("closed")) { 3329 $(this).parent().parent().parent().css("height", ($(this).parent().parent().height() + 16) + "px"); 3330 } 3331 }); 3332} 3333 3334var initOrderDetailPrint = function () { 3335 // Do auto-print popup from "Account Order Summary" page when print option is clicked 3336 if (location.href.indexOf("print=1") > 0) { 3337 window.print(); 3338 } 3339 3340}; 3341//==================== End of SPECIFIC PAGES FUNCTIONS ====================// 3342//=========================================================================//; 3343// Setup default consent mode for Google Analytics/GTM 3344window.dataLayer = window.dataLayer || []; 3345function gtag() { dataLayer.push(arguments); } 3346 3347const COOKIE_STORE_IDS = [2, 7, 8, 9, 10, 11, 12, 13, 15, 21, 22, 23, 24, 25, 26, 27, 28, 31, 37, 39, 41]; 3348const GTAG_STORE_IDS = [2, 7, 8, 9, 10, 11, 12, 13, 15, 21, 22, 23, 24, 25, 26, 27, 28, 31, 37, 39, 41]; 3349 3350function buildConsentFlags(settings) { 3351 return { 3352 ad_user_data: settings.thirdParty ? 'granted' : 'denied', 3353 ad_personalization: settings.thirdParty ? 'granted' : 'denied', 3354 ad_storage: settings.thirdParty ? 'granted' : 'denied', 3355 analytics_storage: settings.analytics ? 'granted' : 'denied' 3356 }; 3357} 3358 3359function safeParseCookie() { 3360 try { return JSON.parse($.cookie('cookieSettings')); } 3361 catch (e) { return null; } 3362} 3363 3364if (GTAG_STORE_IDS.includes(global.store.id)) { 3365 const cookieSettings = safeParseCookie(); 3366 // console.log(cookieSettings); 3367 3368 if (cookieSettings) { 3369 const consent = buildConsentFlags(cookieSettings); 3370 consent['wait_for_update'] = 500; 3371 3372 gtag('consent', 'default', consent); 3373 dataLayer.push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' }); 3374 // console.log('Consent settings applied on gtag initialization:', consent); 3375 } 3376 else { 3377 if (global.store.id === 15) { 3378 // set default consent for US CCPA as granted 3379 const consent = buildConsentFlags( 3380 { 3381 thirdParty: 'granted', 3382 analytics: 'granted' 3383 } 3384 ) 3385 } 3386 } 3387} 3388 3389const ckNotiz = {
3390 cookieSettings: { dismissed: false, necessary: true, analytics: false, thirdParty: false, doNotSell: false }, 3391 3392 setCookie: function (cookieSettings) { 3393 $.cookie("cookieSettings", JSON.stringify(cookieSettings), { expires: 365, path: "/" }); 3394 }, 3395 3396 getCookie: function () { 3397 return safeParseCookie(); 3398 }, 3399 3400 init: function () { 3401 var _this = this; 3402 if (this.getCookie() !== null) _this.cookieSettings = this.getCookie(); 3403 3404 $('.cookie-action, .ck-notiz .close-btn, .ck-notiz .done-btn').on('click', function (e) { 3405 if (e.target.name === 'accept') { 3406 $('#cookies_analytics').prop('checked', true); 3407 $('#cookies_thirdParty').prop('checked', true); 3408 _this.cookieSettings = Object.assign({}, _this.cookieSettings, { analytics: true, thirdParty: true }); 3409 _this.setConsent(buildConsentFlags(_this.cookieSettings)); 3410 } 3411 else if (e.target.name === 'save-prefs') { 3412 // console.log('save-prefs'); 3413 _this.cookieSettings['doNotSell'] = $('#cookies_doNotSell').prop('checked'); 3414 _this.setCookie(_this.cookieSettings); 3415 // console.log(_this.cookieSettings); 3416 } 3417 else if (e.target.name === 'reject') { 3418 $('#cookies_analytics').prop('checked', false); 3419 $('#cookies_thirdParty').prop('checked', false); 3420 _this.cookieSettings = Object.assign({}, _this.cookieSettings, { analytics: false, thirdParty: false }); 3421 _this.setConsent(buildConsentFlags(_this.cookieSettings)); 3422 } 3423 else if (e.target.name === 'close') { 3424 // console.log('close'); 3425 // console.log(_this.cookieSettings); 3426 3427 _this.cookieSettings.analytics = $('#cookies_analytics').prop('checked'); 3428 _this.cookieSettings.thirdParty = $('#cookies_thirdParty').prop('checked'); 3429 _this.setConsent(buildConsentFlags(_this.cookieSettings)); 3430 _this.hide(); 3431 } 3432 3433 _this.cookieSettings.dismissed = true; 3434 _this.setCookie(_this.cookieSettings); 3435 _this.hide(); 3436 notificationBar.show(res.cookie_settings_saved, 10000); 3437 }); 3438 3439 $('.ck-notiz .learnmore-btn').on('click', function (e) { 3440 e.preventDefault(); 3441 if (global.store.id !== 15) { 3442 $('.learnmore').slideDown(); 3443 $('.ck-notiz .learnmore-btn').hide(); 3444 $('.ck-notiz .done-btn').show(); 3445 } 3446 else { 3447 $('.learnmore-btn').hide(); 3448 $('.doNotSell-info').slideDown(); 3449 } 3450 }); 3451 3452 $('.ck-notiz .cancel-btn').on('click', function () { 3453 _this.hide(); 3454 }) 3455 3456 $('.ck-notiz input[type=checkbox]').on('change', function (e) { 3457 _this.cookieSettings[e.target.id.replace('cookies_', '')] = $('#' + e.target.id).prop('checked'); 3458 _this.setCookie(_this.cookieSettings); 3459 3460 // console.log(_this.cookieSettings); 3461 3462 _this.setConsent(buildConsentFlags(_this.cookieSettings)); 3463 }) 3464 3465 // Pre-check the checkboxes according to what was previously set and saved in the cookie 3466 $('.ck-notiz input[type=checkbox]').each(function (i) { 3467 $(this).prop('checked', _this.cookieSettings[this.id.replace('cookies_', '')]); 3468 }) 3469 3470 if (this.cookieSettings.dismissed !== true && COOKIE_STORE_IDS.includes(global.store.id)) { 3471 _this.show(); 3472 } 3473 3474 }, 3475 3476 show: function () { 3477 $('.ck-notiz').addClass('open'); 3478 }, 3479 3480 hide: function () { 3481 notificationBar.hide(); 3482 $('.ck-notiz').removeClass('open'); 3483 }, 3484 3485 setConsent: function (consentFlags) { 3486 gtag('consent', 'update', consentFlags); 3487 }, 3488 3489 reset: function () { 3490 var settings = { dismissed: false, necessary: true, analytics: fal
3490se, thirdParty: false }; 3491 this.cookieSettings = settings; 3492 $.cookie("cookieSettings", JSON.stringify(settings), { expires: -9999, path: "/" }); 3493 } 3494 3495}; 3496 3497$(document).ready(function () { 3498 ckNotiz.init(); 3499}); 3500;
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.