vendor: 4,669 bytes, lines 1-4
1 2; /* Start:"a:4:{s:4:"full";s:79:"/bitrix/templates/gvozdevsoft_event_s1/lib/jquery-1.11.0.min.js?177808411096381";s:6:"source";s:63:"/bitrix/templates/gvozdevsoft_event_s1/lib/jquery-1.11.0.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ 4!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return+new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n
vendor: 6,587 bytes, line 4
4.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}
vendor: 10,444 bytes, line 4
4),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=jb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=kb(b);function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[
vendor: 10,705 bytes, line 4
41].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body)return setTimeout(n.ready);n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===z.readyState)setTimeout(n.ready);else if(z.addEventListener)z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1);else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}return I.promise(b)};var L="undefined",M;for(M in n(l))break;l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}
vendor: 4,335 bytes, lines 4-5
4:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f 5}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");
vendor: 22,119 bytes, line 5
5for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return!0}function cb(){return!1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--)f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--)if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped())b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=cb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g)d[g]&&Cb(e,d[g]);if(b)if(c)for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++)Bb(e,d[g]);else Bb(a,f);return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++)if(f=a[q],f||0===f)if("object"===n.type(f))n.merge(p,f.nodeType?[f]:f);else if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--)h=h.lastChild;if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++])if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++])pb.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++)if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0;if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++)d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++)d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")));i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a)return;f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c)return c;var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f)return e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a>
vendor: 9,513 bytes, lines 5-6
5<input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b)return;c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--)if(b=Ub[e]+c,b in a)return b;return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]="",i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b) 6},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=U[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}if(!n.isEmptyObject(o)){r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function kc(a,b){var c,d,e,f,g;
vendor: 28,247 bytes, line 6
6for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++)if(d=ec[f].call(j,a,k,j.opts))return d;return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&dc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(F)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t)return v;h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Wc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Wc(c,a[c],b,e);return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc)Yc[a](void 0,!0)}),l.cors=!!Zc&&"withCredentials"in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd)return cd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
vendor: 11,686 bytes, lines 6-27
6 7 8/* End */ 9; 10; /* Start:"a:4:{s:4:"full";s:84:"/bitrix/templates/gvozdevsoft_event_s1/lib/slider-slick/slick.min.js?177808411041953";s:6:"source";s:68:"/bitrix/templates/gvozdevsoft_event_s1/lib/slider-slick/slick.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 11/* 12 _ _ _ _ 13 ___| (_) ___| | __ (_)___ 14/ __| | |/ __| |/ / | / __| 15\__ \ | | (__| < _ | \__ \ 16|___/_|_|\___|_|\_(_)/ |___/ 17 |__/ 18 19 Version: 1.6.0 20 Author: Ken Wheeler 21 Website: http://kenwheeler.github.io 22 Docs: http://kenwheeler.github.io/slick 23 Repo: http://github.com/kenwheeler/slick 24 Issues: http://github.com/kenwheeler/slick/issues 25 26 */ 27!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('<button type="button" data-role="none" role="button" tabindex="0" />').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("<ul />").addClass(b.options.dotsClass),c=0;c<=b.getDotCount();c+=1)d.append(a("<li />").append(b.options.customPaging.call(this,b,c)));b.$dots=d.appendTo(b.options.appendDots),b.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}},b.prototype.buildOut=function(){var b=this;b.$slides=b.$slider.children(b.options.slide+":not(.slick-cloned)").addClass("slick-slide"),b.slideCount=b.$slides.length,b.$slides.each(function(b,c){a(c).attr("data-slick-index",b).data("originalStyling",a(c).attr("style")||"")}),b.$slider.addClass("slick-slider"),b.$slideTrack=0===b.slideCount?a('<div class="slick-track"/>').appendTo(b.$slider):b.$slides.wrapAll('<div class="slick-track"/>').parent(),b.$list=b.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent(),b.$slideTrack.css("opacity",0),(b.options.centerMode===!0||b.options.swipeToSlide===!0)&&(b.options.slidesToScroll=1),a("img[data-lazy]",b.$slider).not("[src]").addClass("slick-loading"),b.setupInfinite(),b.buildArrows(),b.buildDots(),b.updateDots(),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.options.draggable===!0&&b.$list.addClass("draggable")},b.prototype.buildRows=function(){var b,c,d,e,f,g,h,a=this;if(e=document.createDocumentFragment(),g=a.$slider.children(),a.options.rows>1){for(h=a.options.slidesPerRow*a.options.rows,f=Math.ceil(g.length/h),b=0;f>b;b++){var i=document.createElement("div");for(c=0;c<a.options.rows;c++){var j=document.createElement("div");for(d=0;d<a.options.slidesPerRow;d++){var k=b*h+(c*a.options.slidesPerRow+d);g.get(k)&&j.appendChild(g.get(k))}i.appendChild(j)}e.appendChild(i)}a.$slider.empty().append(e),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},b.prototype.checkResponsive=function(b,c){var e,f,g,d=this,h=!1,i=d.$slider.width(),j=window.innerWidth||a(window).width();if("window"===d.respondTo?g=j:"slider"===d.respondTo?g=i:"min"===d.respondTo&&(g=Math.min(j,i)),d.options.responsive&&d.options.responsive.length&&null!==d.options.responsive){f=null;for(e in d.breakpoints)d.breakpoints.hasOwnProperty(e)&&(d.originalSettings.mobileFirst===!1?g<d.breakpoints[e]&&(f=d.breakpoints[e]):g>d.breakpoints[e]&&(f=d.breakpoints[e]));null!==f?null!==d.activeBreakpoint?(f!==d.activeBreakpoint||c)&&(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):(d.activeBreakpoint=f,"unslick"===d.breakpointSettings[f]?d.unslick(f):(d.options=a.extend({},d.originalSettings,d.breakpointSettings[f]),b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b)),h=f):null!==d.activeBreakpoint&&(d.activeBreakpoint=null,d.options=d.originalSettings,b===!0&&(d.currentSlide=d.options.initialSlide),d.refresh(b),h=f),b||h===!1||d.$slider.trigger("breakpoint",[d,h])}},b.prototype.changeSlide=function(b,c){var f,g,h,d=this,e=a(b.currentTarget);switch(e.is("a")&&b.preventDefault(),e.is("li")||(e=e.closest("li")),h=d.slideCount%d.options.slidesToScroll!==0,f=h?0:(d.slideCount-d.currentSlide)%d.options.slidesToScroll,b.data.message){case"previous":g=0===f?d.options.slidesToScroll:d.options.slidesToShow-f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide-g,!1,c);break;case"next":g=0===f?d.options.slidesToScroll:f,d.slideCount>d.options.slidesToShow&&d.slideHandler(d.currentSlide+g,!1,c);break;case"index":var i=0===b.data.index?0:b.data.index||e.index()*d.options.slidesToScroll;d.slideHandler(d.checkNavigable(i),!1,c),e.children().trigger("focus");break;default:return}},b.prototype.checkNavigable=function(a){var c,d,b=this;if(c=b.getNavigableIndexes(),d=0,a>c[c.length-1])a=c[c.length-1];else for(var e in c){if(a<c[e]){a=d;break}d=c[e]}return a},b.prototype.cleanUpEvents=function(){var b=this;b.options.dots&&null!==b.$dots&&a("li",b.$dots).off("click.slick",b.changeSlide).off("mouseenter.slick",a.proxy(b.interrupt,b,!0)).off("mouseleave.
27slick",a.proxy(b.interrupt,b,!1)),b.$slider.off("focus.slick blur.slick"),b.options.arrows===!0&&b.slideCount>b.options.slidesToShow&&(b.$prevArrow&&b.$prevArrow.off("click.slick",b.changeSlide),b.$nextArrow&&b.$nextArrow.off("click.slick",b.changeSlide)),b.$list.off("touchstart.slick mousedown.slick",b.swipeHandler),b.$list.off("touchmove.slick mousemove.slick",b.swipeHandler),b.$list.off("touchend.slick mouseup.slick",b.swipeHandler),b.$list.off("touchcancel.slick mouseleave.slick",b.swipeHandler),b.$list.off("click.slick",b.clickHandler),a(document).off(b.visibilityChange,b.visibility),b.cleanUpSlideEvents(),b.options.accessibility===!0&&b.$list.off("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().off("click.slick",b.selectHandler),a(window).off("orientationchange.slick.slick-"+b.instanceUid,b.orientationChange),a(window).off("resize.slick.slick-"+b.instanceUid,b.resize),a("[draggable!=true]",b.$slideTrack).off("dragstart",b.preventDefault),a(window).off("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).off("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.cleanUpSlideEvents=function(){var b=this;b.$list.off("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.off("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.cleanUpRows=function(){var b,a=this;a.options.rows>1&&(b=a.$slides.children().children(),b.removeAttr("style"),a.$slider.empty().append(b))},b.prototype.clickHandler=function(a){var b=this;b.shouldClick===!1&&(a.stopImmediatePropagation(),a.stopPropagation(),a.preventDefault())},b.prototype.destroy=function(b){var c=this;c.autoPlayClear(),c.touchObject={},c.cleanUpEvents(),a(".slick-cloned",c.$slider).detach(),c.$dots&&c.$dots.remove(),c.$prevArrow&&c.$prevArrow.length&&(c.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.prevArrow)&&c.$prevArrow.remove()),c.$nextArrow&&c.$nextArrow.length&&(c.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),c.htmlExpr.test(c.options.nextArrow)&&c.$nextArrow.remove()),c.$slides&&(c.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){a(this).attr("style",a(this).data("originalStyling"))}),c.$slideTrack.children(this.options.slide).detach(),c.$slideTrack.detach(),c.$list.detach(),c.$slider.append(c.$slides)),c.cleanUpRows(),c.$slider.removeClass("slick-slider"),c.$slider.removeClass("slick-initialized"),c.$slider.removeClass("slick-dotted"),c.unslicked=!0,b||c.$slider.trigger("destroy",[c])},b.prototype.disableTransition=function(a){var b=this,c={};c[b.transitionType]="",b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.fadeSlide=function(a,b){var c=this;c.cssTransitions===!1?(c.$slides.eq(a).css({zIndex:c.options.zIndex}),c.$slides.eq(a).animate({opacity:1},c.options.speed,c.options.easing,b)):(c.applyTransition(a),c.$slides.eq(a).css({opacity:1,zIndex:c.options.zIndex}),b&&setTimeout(function(){c.disableTransition(a),b.call()},c.options.speed))},b.prototype.fadeSlideOut=function(a){var b=this;b.cssTransitions===!1?b.$slides.eq(a).animate({opacity:0,zIndex:b.options.zIndex-2},b.options.speed,b.options.easing):(b.applyTransition(a),b.$slides.eq(a).css({opacity:0,zIndex:b.options.zIndex-2}))},b.prototype.filterSlides=b.prototype.slickFilter=function(a){var b=this;null!==a&&(b.$slidesCache=b.$slides,b.unload(),b.$slideTrack.children(this.options.slide).detach(),b.$slidesCache.filter(a).appendTo(b.$slideTrack),b.reinit())},b.prototype.focusHandler=function(){var b=this;b.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*:not(.slick-arrow)",function(c){c.stopImmediatePropagation();var d=a(this);setTimeout(function(){b.options.pauseOnFocus&&(b.focussed=d.is(":focus"),b.autoPlay())},0)})},b.prototype.getCurrent=b.prototype.slickCurrentSlide=function(){var a=this;return a.currentSlide},b.prototype.getDotCount=function(){var a=this,b=0,c=0,d=0;if(a.options.infinite===!0)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else if(a.options.centerMode===!0)d=a.slideCount;else if(a.options.asNavFor)for(;b<a.slideCount;)++d,b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;else d=1+Math.ceil((a.slideCount-a.options.slidesToShow)/a.options.slidesToScroll);return d-1},b.prototype.getLeft=function(a){var c,d,f,b=this,e=0;return b.slideOffset=0,d=b.$slides.first().outerHeight(!0),b.options.infinite===!0?(b.slideCount>b.options.slidesToShow&&(b.slideOffset=b.slideWidth*b.options.slidesToShow*-1,e=d*b.options.slidesToShow*-1),b.slideCount%b.options.slidesToScroll!==0&&a+b.options.slidesToScroll>b.slideCount&&b.slideCount>b.options.slidesToShow&&(a>b.slideCount?(b.slideOffset=(b.options.slidesToShow-(a-b.slideCount))*b.slideWidth*-1,e=(b.options.slidesToShow-(a-b.slideCount))*d*-1):(b.slideOffset=b.slideCount%b.options.slidesToScroll*b.slideWidth*-1,e=b.slideCount%b.options.slidesToScroll*d*-1))):a+b.o
vendor: 4,100 bytes, line 27
27ptions.slidesToShow>b.slideCount&&(b.slideOffset=(a+b.options.slidesToShow-b.slideCount)*b.slideWidth,e=(a+b.options.slidesToShow-b.slideCount)*d),b.slideCount<=b.options.slidesToShow&&(b.slideOffset=0,e=0),b.options.centerMode===!0&&b.options.infinite===!0?b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)-b.slideWidth:b.options.centerMode===!0&&(b.slideOffset=0,b.slideOffset+=b.slideWidth*Math.floor(b.options.slidesToShow/2)),c=b.options.vertical===!1?a*b.slideWidth*-1+b.slideOffset:a*d*-1+e,b.options.variableWidth===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,b.options.centerMode===!0&&(f=b.slideCount<=b.options.slidesToShow||b.options.infinite===!1?b.$slideTrack.children(".slick-slide").eq(a):b.$slideTrack.children(".slick-slide").eq(a+b.options.slidesToShow+1),c=b.options.rtl===!0?f[0]?-1*(b.$slideTrack.width()-f[0].offsetLeft-f.width()):0:f[0]?-1*f[0].offsetLeft:0,c+=(b.$list.width()-f.outerWidth())/2)),c},b.prototype.getOption=b.prototype.slickGetOption=function(a){var b=this;return b.options[a]},b.prototype.getNavigableIndexes=function(){var e,a=this,b=0,c=0,d=[];for(a.options.infinite===!1?e=a.slideCount:(b=-1*a.options.slidesToScroll,c=-1*a.options.slidesToScroll,e=2*a.slideCount);e>b;)d.push(b),b=c+a.options.slidesToScroll,c+=a.options.slidesToScroll<=a.options.slidesToShow?a.options.slidesToScroll:a.options.slidesToShow;return d},b.prototype.getSlick=function(){return this},b.prototype.getSlideCount=function(){var c,d,e,b=this;return e=b.options.centerMode===!0?b.slideWidth*Math.floor(b.options.slidesToShow/2):0,b.options.swipeToSlide===!0?(b.$slideTrack.find(".slick-slide").each(function(c,f){return f.offsetLeft-e+a(f).outerWidth()/2>-1*b.swipeLeft?(d=f,!1):void 0}),c=Math.abs(a(d).attr("data-slick-index")-b.currentSlide)||1):b.options.slidesToScroll},b.prototype.goTo=b.prototype.slickGoTo=function(a,b){var c=this;c.changeSlide({data:{message:"index",index:parseInt(a)}},b)},b.prototype.init=function(b){var c=this;a(c.$slider).hasClass("slick-initialized")||(a(c.$slider).addClass("slick-initialized"),c.buildRows(),c.buildOut(),c.setProps(),c.startLoad(),c.loadSlider(),c.initializeEvents(),c.updateArrows(),c.updateDots(),c.checkResponsive(!0),c.focusHandler()),b&&c.$slider.trigger("init",[c]),c.options.accessibility===!0&&c.initADA(),c.options.autoplay&&(c.paused=!1,c.autoPlay())},b.prototype.initADA=function(){var b=this;b.$slides.add(b.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),b.$slideTrack.attr("role","listbox"),b.$slides.not(b.$slideTrack.find(".slick-cloned")).each(function(c){a(this).attr({role:"option","aria-describedby":"slick-slide"+b.instanceUid+c})}),null!==b.$dots&&b.$dots.attr("role","tablist").find("li").each(function(c){a(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+b.instanceUid+c,id:"slick-slide"+b.instanceUid+c})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar"),b.activateADA()},b.prototype.initArrowEvents=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},a.changeSlide),a.$nextArrow.off("click.slick").on("click.slick",{message:"next"},a.changeSlide))},b.prototype.initDotEvents=function(){var b=this;b.options.dots===!0&&b.slideCount>b.options.slidesToShow&&a("li",b.$dots).on("click.slick",{message:"index"},b.changeSlide),b.options.dots===!0&&b.options.pauseOnDotsHover===!0&&a("li",b.$dots).on("mouseenter.slick",a.proxy(b.interrupt,b,!0)).on("mouseleave.slick",a.proxy(b.interrupt,b,!1))},b.prototype.initSlideEvents=function(){var b=this;b.options.pauseOnHover&&(b.$list.on("mouseenter.slick",a.proxy(b.interrupt,b,!0)),b.$list.on("mouseleave.
27slick",a.proxy(b.interrupt,b,!1)))},b.prototype.initializeEvents=function(){var b=this;b.initArrowEvents(),b.initDotEvents(),b.initSlideEvents(),b.$list.on("touchstart.slick mousedown.slick",{action:"start"},b.swipeHandler),b.$list.on("touchmove.slick mousemove.slick",{action:"move"},b.swipeHandler),b.$list.on("touchend.slick mouseup.slick",{action:"end"},b.swipeHandler),b.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},b.swipeHandler),b.$list.on("click.slick",b.clickHandler),a(document).on(b.visibilityChange,a.proxy(b.visibility,b)),b.options.accessibility===!0&&b.$list.on("keydown.slick",b.keyHandler),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),a(window).on("orientationchange.slick.slick-"+b.instanceUid,a.proxy(b.orientationChange,b)),a(window).on("resize.slick.slick-"+b.instanceUid,a.proxy(b.resize,b)),a("[draggable!=true]",b.$slideTrack).on("dragstart",b.preventDefault),a(window).on("load.slick.slick-"+b.instanceUid,b.setPosition),a(document).on("ready.slick.slick-"+b.instanceUid,b.setPosition)},b.prototype.initUI=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.show(),a.$nextArrow.show()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.show()},b.prototype.keyHandler=function(a){var b=this;a.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===a.keyCode&&b.options.accessibility===!0?b.changeSlide({data:{message:b.options.rtl===!0?"next":"previous"}}):39===a.keyCode&&b.options.accessibility===!0&&b.changeSlide({data:{message:b.options.rtl===!0?"previous":"next"}}))},b.prototype.lazyLoad=function(){function g(c){a("img[data-lazy]",c).each(function(){var c=a(this),d=a(this).attr("data-lazy"),e=document.createElement("img");e.onload=function(){c.animate({opacity:0}
vendor: 4,284 bytes, line 27
27,100,function(){c.attr("src",d).animate({opacity:1},200,function(){c.removeAttr("data-lazy").removeClass("slick-loading")}),b.$slider.trigger("lazyLoaded",[b,c,d])})},e.onerror=function(){c.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),b.$slider.trigger("lazyLoadError",[b,c,d])},e.src=d})}var c,d,e,f,b=this;b.options.centerMode===!0?b.options.infinite===!0?(e=b.currentSlide+(b.options.slidesToShow/2+1),f=e+b.options.slidesToShow+2):(e=Math.max(0,b.currentSlide-(b.options.slidesToShow/2+1)),f=2+(b.options.slidesToShow/2+1)+b.currentSlide):(e=b.options.infinite?b.options.slidesToShow+b.currentSlide:b.currentSlide,f=Math.ceil(e+b.options.slidesToShow),b.options.fade===!0&&(e>0&&e--,f<=b.slideCount&&f++)),c=b.$slider.find(".slick-slide").slice(e,f),g(c),b.slideCount<=b.options.slidesToShow?(d=b.$slider.find(".slick-slide"),g(d)):b.currentSlide>=b.slideCount-b.options.slidesToShow?(d=b.$slider.find(".slick-cloned").slice(0,b.options.slidesToShow),g(d)):0===b.currentSlide&&(d=b.$slider.find(".slick-cloned").slice(-1*b.options.slidesToShow),g(d))},b.prototype.loadSlider=function(){var a=this;a.setPosition(),a.$slideTrack.css({opacity:1}),a.$slider.removeClass("slick-loading"),a.initUI(),"progressive"===a.options.lazyLoad&&a.progressiveLazyLoad()},b.prototype.next=b.prototype.slickNext=function(){var a=this;a.changeSlide({data:{message:"next"}})},b.prototype.orientationChange=function(){var a=this;a.checkResponsive(),a.setPosition()},b.prototype.pause=b.prototype.slickPause=function(){var a=this;a.autoPlayClear(),a.paused=!0},b.prototype.play=b.prototype.slickPlay=function(){var a=this;a.autoPlay(),a.options.autoplay=!0,a.paused=!1,a.focussed=!1,a.interrupted=!1},b.prototype.postSlide=function(a){var b=this;b.unslicked||(b.$slider.trigger("afterChange",[b,a]),b.animating=!1,b.setPosition(),b.swipeLeft=null,b.options.autoplay&&b.autoPlay(),b.options.accessibility===!0&&b.initADA())},b.prototype.prev=b.prototype.slickPrev=function(){var a=this;a.changeSlide({data:{message:"previous"}})},b.prototype.preventDefault=function(a){a.preventDefault()},b.prototype.progressiveLazyLoad=function(b){b=b||1;var e,f,g,c=this,d=a("img[data-lazy]",c.$slider);d.length?(e=d.first(),f=e.attr("data-lazy"),g=document.createElement("img"),g.onload=function(){e.attr("src",f).removeAttr("data-lazy").removeClass("slick-loading"),c.options.adaptiveHeight===!0&&c.setPosition(),c.$slider.trigger("lazyLoaded",[c,e,f]),c.progressiveLazyLoad()},g.onerror=function(){3>b?setTimeout(function(){c.progressiveLazyLoad(b+1)},500):(e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),c.$slider.trigger("lazyLoadError",[c,e,f]),c.progressiveLazyLoad())},g.src=f):c.$slider.trigger("allImagesLoaded",[c])},b.prototype.refresh=function(b){var d,e,c=this;e=c.slideCount-c.options.slidesToShow,!c.options.infinite&&c.currentSlide>e&&(c.currentSlide=e),c.slideCount<=c.options.slidesToShow&&(c.currentSlide=0),d=c.currentSlide,c.destroy(!0),a.extend(c,c.initials,{currentSlide:d}),c.init(),b||c.changeSlide({data:{message:"index",index:d}},!1)},b.prototype.registerBreakpoints=function(){var c,d,e,b=this,f=b.options.responsive||null;if("array"===a.type(f)&&f.length){b.respondTo=b.options.respondTo||"window";for(c in f)if(e=b.breakpoints.length-1,d=f[c].breakpoint,f.hasOwnProperty(c)){for(;e>=0;)b.breakpoints[e]&&b.breakpoints[e]===d&&b.breakpoints.splice(e,1),e--;b.breakpoints.push(d),b.breakpointSettings[d]=f[c].settings}b.breakpoints.sort(function(a,c){return b.options.mobileFirst?a-c:c-a})}},b.prototype.reinit=function(){var b=this;b.$slides=b.$slideTrack.children(b.options.slide).addClass("slick-slide"),b.slideCount=b.$slides.length,b.currentSlide>=b.slideCount&&0!==b.currentSlide&&(b.currentSlide=b.currentSlide-b.options.slidesToScroll),b.slideCount<=b.options.slidesToShow&&(b.currentSlide=0),b.registerBreakpoints(),b.setProps(),b.setupInfinite(),b.buildArrows(),b.updateArrows(),b.initArrowEvents(),b.buildDots(),b.updateDots(),b.initDotEvents(),b.cleanUpSlideEvents(),b.initSlideEvents(),b.checkResponsive(!1,!0),b.options.focusOnSelect===!0&&a(b.$slideTrack).children().on("click.slick",b.selectHandler),b.setSlideClasses("number"==typeof b.currentSlide?b.currentSlide:0),b.setPosition(),b.focu
vendor: 2,346 bytes, line 27
27sHandler(),b.paused=!b.options.autoplay,b.autoPlay(),b.$slider.trigger("reInit",[b])},b.prototype.resize=function(){var b=this;a(window).width()!==b.windowWidth&&(clearTimeout(b.windowDelay),b.windowDelay=window.setTimeout(function(){b.windowWidth=a(window).width(),b.checkResponsive(),b.unslicked||b.setPosition()},50))},b.prototype.removeSlide=b.prototype.slickRemove=function(a,b,c){var d=this;return"boolean"==typeof a?(b=a,a=b===!0?0:d.slideCount-1):a=b===!0?--a:a,d.slideCount<1||0>a||a>d.slideCount-1?!1:(d.unload(),c===!0?d.$slideTrack.children().remove():d.$slideTrack.children(this.options.slide).eq(a).remove(),d.$slides=d.$slideTrack.children(this.options.slide),d.$slideTrack.children(this.options.slide).detach(),d.$slideTrack.append(d.$slides),d.$slidesCache=d.$slides,void d.reinit())},b.prototype.setCSS=function(a){var d,e,b=this,c={};b.options.rtl===!0&&(a=-a),d="left"==b.positionProp?Math.ceil(a)+"px":"0px",e="top"==b.positionProp?Math.ceil(a)+"px":"0px",c[b.positionProp]=a,b.transformsEnabled===!1?b.$slideTrack.css(c):(c={},b.cssTransitions===!1?(c[b.animType]="translate("+d+", "+e+")",b.$slideTrack.css(c)):(c[b.animType]="translate3d("+d+", "+e+", 0px)",b.$slideTrack.css(c)))},b.prototype.setDimensions=function(){var a=this;a.options.vertical===!1?a.options.centerMode===!0&&a.$list.css({padding:"0px "+a.options.centerPadding}):(a.$list.height(a.$slides.first().outerHeight(!0)*a.options.slidesToShow),a.options.centerMode===!0&&a.$list.css({padding:a.options.centerPadding+" 0px"})),a.listWidth=a.$list.width(),a.listHeight=a.$list.height(),a.options.vertical===!1&&a.options.variableWidth===!1?(a.slideWidth=Math.ceil(a.listWidth/a.options.slidesToShow),a.$slideTrack.width(Math.ceil(a.slideWidth*a.$slideTrack.children(".slick-slide").length))):a.options.variableWidth===!0?a.$slideTrack.width(5e3*a.slideCount):(a.slideWidth=Math.ceil(a.listWidth),a.$slideTrack.height(Math.ceil(a.$slides.first().outerHeight(!0)*a.$slideTrack.children(".slick-slide").length)));var b=a.$slides.first().outerWidth(!0)-a.$slides.first().width();a.options.variableWidth===!1&&a.$slideTrack.children(".slick-slide").width(a.slideWidth-b)},b.prototype.setFade=function(){var c,b=this;b.$slides.each(function(d,e){c=b.slideWidth*d*-1,b.options.rtl===!0?a(e).css({position:"relative",right:c,top:0,zIndex:b.options.zIndex-2,opacity:0}
vendor: 3,177 bytes, line 27
27):a(e).css({position:"relative",left:c,top:0,zIndex:b.options.zIndex-2,opacity:0})}),b.$slides.eq(b.currentSlide).css({zIndex:b.options.zIndex-1,opacity:1})},b.prototype.setHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.css("height",b)}},b.prototype.setOption=b.prototype.slickSetOption=function(){var c,d,e,f,h,b=this,g=!1;if("object"===a.type(arguments[0])?(e=arguments[0],g=arguments[1],h="multiple"):"string"===a.type(arguments[0])&&(e=arguments[0],f=arguments[1],g=arguments[2],"responsive"===arguments[0]&&"array"===a.type(arguments[1])?h="responsive":"undefined"!=typeof arguments[1]&&(h="single")),"single"===h)b.options[e]=f;else if("multiple"===h)a.each(e,function(a,c){b.options[a]=c});else if("responsive"===h)for(d in f)if("array"!==a.type(b.options.responsive))b.options.responsive=[f[d]];else{for(c=b.options.responsive.length-1;c>=0;)b.options.responsive[c].breakpoint===f[d].breakpoint&&b.options.responsive.splice(c,1),c--;b.options.responsive.push(f[d])}g&&(b.unload(),b.reinit())},b.prototype.setPosition=function(){var a=this;a.setDimensions(),a.setHeight(),a.options.fade===!1?a.setCSS(a.getLeft(a.currentSlide)):a.setFade(),a.$slider.trigger("setPosition",[a])},b.prototype.setProps=function(){var a=this,b=document.body.style;a.positionProp=a.options.vertical===!0?"top":"left","top"===a.positionProp?a.$slider.addClass("slick-vertical"):a.$slider.removeClass("slick-vertical"),(void 0!==b.WebkitTransition||void 0!==b.MozTransition||void 0!==b.msTransition)&&a.options.useCSS===!0&&(a.cssTransitions=!0),a.options.fade&&("number"==typeof a.options.zIndex?a.options.zIndex<3&&(a.options.zIndex=3):a.options.zIndex=a.defaults.zIndex),void 0!==b.OTransform&&(a.animType="OTransform",a.transformType="-o-transform",a.transitionType="OTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.MozTransform&&(a.animType="MozTransform",a.transformType="-moz-transform",a.transitionType="MozTransition",void 0===b.perspectiveProperty&&void 0===b.MozPerspective&&(a.animType=!1)),void 0!==b.webkitTransform&&(a.animType="webkitTransform",a.transformType="-webkit-transform",a.transitionType="webkitTransition",void 0===b.perspectiveProperty&&void 0===b.webkitPerspective&&(a.animType=!1)),void 0!==b.msTransform&&(a.animType="msTransform",a.transformType="-ms-transform",a.transitionType="msTransition",void 0===b.msTransform&&(a.animType=!1)),void 0!==b.transform&&a.animType!==!1&&(a.animType="transform",a.transformType="transform",a.transitionType="transition"),a.transformsEnabled=a.options.useTransform&&null!==a.animType&&a.animType!==!1},b.prototype.setSlideClasses=function(a){var c,d,e,f,b=this;d=b.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),b.$slides.eq(a).addClass("slick-current"),b.options.centerMode===!0?(c=Math.floor(b.options.slidesToShow/2),b.options.infinite===!0&&(a>=c&&a<=b.slideCount-1-c?b.$slides.slice(a-c,a+c+1).addClass("slick-active").attr("aria-hidden","false"):(e=b.options.slidesToShow+a,
vendor: 1,607 bytes, line 28
28d.slice(e-c+1,e+c+2).addClass("slick-active").attr("aria-hidden","false")),0===a?d.eq(d.length-1-b.options.slidesToShow).addClass("slick-center"):a===b.slideCount-1&&d.eq(b.options.slidesToShow).addClass("slick-center")),b.$slides.eq(a).addClass("slick-center")):a>=0&&a<=b.slideCount-b.options.slidesToShow?b.$slides.slice(a,a+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):d.length<=b.options.slidesToShow?d.addClass("slick-active").attr("aria-hidden","false"):(f=b.slideCount%b.options.slidesToShow,e=b.options.infinite===!0?b.options.slidesToShow+a:a,b.options.slidesToShow==b.options.slidesToScroll&&b.slideCount-a<b.options.slidesToShow?d.slice(e-(b.options.slidesToShow-f),e+f).addClass("slick-active").attr("aria-hidden","false"):d.slice(e,e+b.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false")),"ondemand"===b.options.lazyLoad&&b.lazyLoad()},b.prototype.setupInfinite=function(){var c,d,e,b=this;if(b.options.fade===!0&&(b.options.centerMode=!1),b.options.infinite===!0&&b.options.fade===!1&&(d=null,b.slideCount>b.options.slidesToShow)){for(e=b.options.centerMode===!0?b.options.slidesToShow+1:b.options.slidesToShow,c=b.slideCount;c>b.slideCount-e;c-=1)d=c-1,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d-b.slideCount).prependTo(b.$slideTrack).addClass("slick-cloned");for(c=0;e>c;c+=1)d=c,a(b.$slides[d]).clone(!0).attr("id","").attr("data-slick-index",d+b.slideCount).appendTo(b.$slideTrack).addClass("slick-cloned");b.$slideTrack.find(".slick-cloned").find("[id]").each(function(){a(this).attr("id","")})}},b.prototype.
vendor: 4,540 bytes, line 28
28interrupt=function(a){var b=this;a||b.autoPlay(),b.interrupted=a},b.prototype.selectHandler=function(b){var c=this,d=a(b.target).is(".slick-slide")?a(b.target):a(b.target).parents(".slick-slide"),e=parseInt(d.attr("data-slick-index"));return e||(e=0),c.slideCount<=c.options.slidesToShow?(c.setSlideClasses(e),void c.asNavFor(e)):void c.slideHandler(e)},b.prototype.slideHandler=function(a,b,c){var d,e,f,g,j,h=null,i=this;return b=b||!1,i.animating===!0&&i.options.waitForAnimate===!0||i.options.fade===!0&&i.currentSlide===a||i.slideCount<=i.options.slidesToShow?void 0:(b===!1&&i.asNavFor(a),d=a,h=i.getLeft(d),g=i.getLeft(i.currentSlide),i.currentLeft=null===i.swipeLeft?g:i.swipeLeft,i.options.infinite===!1&&i.options.centerMode===!1&&(0>a||a>i.getDotCount()*i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):i.options.infinite===!1&&i.options.centerMode===!0&&(0>a||a>i.slideCount-i.options.slidesToScroll)?void(i.options.fade===!1&&(d=i.currentSlide,c!==!0?i.animateSlide(g,function(){i.postSlide(d)}):i.postSlide(d))):(i.options.autoplay&&clearInterval(i.autoPlayTimer),e=0>d?i.slideCount%i.options.slidesToScroll!==0?i.slideCount-i.slideCount%i.options.slidesToScroll:i.slideCount+d:d>=i.slideCount?i.slideCount%i.options.slidesToScroll!==0?0:d-i.slideCount:d,i.animating=!0,i.$slider.trigger("beforeChange",[i,i.currentSlide,e]),f=i.currentSlide,i.currentSlide=e,i.setSlideClasses(i.currentSlide),i.options.asNavFor&&(j=i.getNavTarget(),j=j.slick("getSlick"),j.slideCount<=j.options.slidesToShow&&j.setSlideClasses(i.currentSlide)),i.updateDots(),i.updateArrows(),i.options.fade===!0?(c!==!0?(i.fadeSlideOut(f),i.fadeSlide(e,function(){i.postSlide(e)})):i.postSlide(e),void i.animateHeight()):void(c!==!0?i.animateSlide(h,function(){i.postSlide(e)}):i.postSlide(e))))},b.prototype.startLoad=function(){var a=this;a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&(a.$prevArrow.hide(),a.$nextArrow.hide()),a.options.dots===!0&&a.slideCount>a.options.slidesToShow&&a.$dots.hide(),a.$slider.addClass("slick-loading")},b.prototype.swipeDirection=function(){var a,b,c,d,e=this;return a=e.touchObject.startX-e.touchObject.curX,b=e.touchObject.startY-e.touchObject.curY,c=Math.atan2(b,a),d=Math.round(180*c/Math.PI),0>d&&(d=360-Math.abs(d)),45>=d&&d>=0?e.options.rtl===!1?"left":"right":360>=d&&d>=315?e.options.rtl===!1?"left":"right":d>=135&&225>=d?e.options.rtl===!1?"right":"left":e.options.verticalSwiping===!0?d>=35&&135>=d?"down":"up":"vertical"},b.prototype.swipeEnd=function(a){var c,d,b=this;if(b.dragging=!1,b.interrupted=!1,b.shouldClick=b.touchObject.swipeLength>10?!1:!0,void 0===b.touchObject.curX)return!1;if(b.touchObject.edgeHit===!0&&b.$slider.trigger("edge",[b,b.swipeDirection()]),b.touchObject.swipeLength>=b.touchObject.minSwipe){switch(d=b.swipeDirection()){case"left":case"down":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide+b.getSlideCount()):b.currentSlide+b.getSlideCount(),b.currentDirection=0;break;case"right":case"up":c=b.options.swipeToSlide?b.checkNavigable(b.currentSlide-b.getSlideCount()):b.currentSlide-b.getSlideCount(),b.currentDirection=1}"vertical"!=d&&(b.slideHandler(c),b.touchObject={},b.$slider.trigger("swipe",[b,d]))}else b.touchObject.startX!==b.touchObject.curX&&(b.slideHandler(b.currentSlide),b.touchObject={})},b.prototype.swipeHandler=function(a){var b=this;if(!(b.options.swipe===!1||"ontouchend"in document&&b.options.swipe===!1||b.options.draggable===!1&&-1!==a.type.indexOf("mouse")))switch(b.touchObject.fingerCount=a.originalEvent&&void 0!==a.originalEvent.touches?a.originalEvent.touches.length:1,b.touchObject.minSwipe=b.listWidth/b.options.touchThreshold,b.options.verticalSwiping===!0&&(b.touchObject.minSwipe=b.listHeight/b.options.touchThreshold),a.data.action){case"start":b.swipeStart(a);break;case"move":b.swipeMove(a);break;case"end":b.swipeEnd(a)}},b.prototype.swipeMove=function(a){var d,e,f,g,h,b=this;return h=void 0!==a.originalEvent?a.originalEvent.touches:null,!b.dragging||h&&1!==h.length?!1:(d=b.getLeft(b.currentSlide),b.touchObject.curX=void 0!==h?h[0].pageX:a.clientX,b.touchObject.curY=void 0!==h?h[0].pageY:a.clientY,b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curX-b.touchObject.startX,2))),b.options.verticalSwiping===!0&&(b.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(b.touchObject.curY-b.touchObject.startY,2)))),e=b.swipeDirection(),"vertical"!==e?(void 0!==a.originalEvent&&b.touchObject.swipeLength>
284&&a.preventDefault(),g=(b.options.rtl===!1?1:-1)*(b.touchObject.curX>b.touchObject.startX?1:-1),b.options.verticalSwiping===!0&&(g=b.touchObject.curY>b.touchObject.startY?1:-1),f=b.touchObject.swipeLength,b.touchObject.edgeHit=!1,b.options.infinite===!1&&(0===b.currentSlide&&"right"===e||b.currentSlide>=b.getDotCount()&&"left"===e)&&(f=b.touchObject.swipeLength*b.options.edgeFriction,b.touchObject.edgeHit=!0),b.options.vertical===!1?b.swipeLeft=d+f*g:b.swipeLeft=d+f*(b.$list.height()/b.listWidth)*g,b.options.verticalSwiping===!0&&(b.swipeLeft=d+f*g),b.options.fade===!0||b.options.touchMove===!1?!1:b.animating===!0?(b.swipeLeft=null,!1):void b.setCSS(b.swipeLeft)):void 0)},b.prototype.swipeStart=function(a){var c,b=this;return b.interrupted=!0,1!==b.touchObject.fingerCount||b.slideCount<=b.options.slidesToShow?(b.touchObject={},!1):(void 0!==a.originalEvent&&void 0!==a.originalEvent.touches&&(c=a.originalEvent.touches[0]),b.touchObject.startX=b.touchObject.curX=void 0!==c?c.pageX:a.clientX,b.touchObject.startY=b.touchObject.curY=void 0!==c?c.pageY:a.clientY,void(b.dragging=!0))},b.prototype.unfilterSlides=b.prototype.slickUnfilter=function(){var a=this;null!==a.$slidesCache&&(a.unload(),a.$slideTrack.children(this.options.slide).detach(),a.$slidesCache.appendTo(a.$slideTrack),a.reinit())},b.prototype.unload=function(){var b=this;a(".slick-cloned",b.$slider).remove(),b.$dots&&b.$dots.remove(),b.$prevArrow&&b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.remove(),b.$nextArrow&&b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.remove(),b.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},b.prototype.unslick=function(a){var b=this;b.$slider.trigger("unslick",[b,a]),b.destroy()},b.prototype.updateArrows=function(){var b,a=this;b=Math.floor(a.options.slidesToShow/2),a.options.arrows===!0&&a.slideCount>a.options.slidesToShow&&!a.options.infinite&&(a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===a.currentSlide?(a.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-a.options.slidesToShow&&a.options.centerMode===!1?(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):a.currentSlide>=a.slideCount-1&&a.options.centerMode===!0&&(a.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),a.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},b.prototype.updateDots=function(){var a=this;null!==a.$dots&&(a.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),a.$dots.find("li").eq(Math.floor(a.currentSlide/a.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))},b.prototype.visibility=function(){var a=this;a.options.autoplay&&(document[a.hidden]?a.interrupted=!0:a.interrupted=!1)},a.fn.slick=function(){var f,g,a=this,c=arguments[0],d=Array.prototype.slice.call(arguments,1),e=a.length;for(f=0;e>f;f++)if("object"==typeof c||"undefined"==typeof c?a[f].slick=new b(a[f],c):g=a[f].slick[c].apply(a[f].slick,d),"undefined"!=typeof g)return g;return a}}); 29/* End */ 30; 31; /* Start:"a:4:{s:4:"full";s:92:"/bitrix/templates/gvozdevsoft_event_s1/lib/owl-carousel-2/js/owl.carousel.js?177808411088680";s:6:"source";s:76:"/bitrix/templates/gvozdevsoft_event_s1/lib/owl-carousel-2/js/owl.carousel.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 32/** 33 * Owl Carousel v2.2.1 34 * Copyright 2013-2017 David Deutsch 35 * Licensed under () 36 */ 37/** 38 * Owl carousel 39 * @version 2.1.6 40 * @author Bartosz Wojciechowski 41 * @author David Deutsch 42 * @license The MIT License (MIT) 43 * @todo Lazy Load Icon 44 * @todo prevent animationend bubling 45 * @todo itemsScaleUp 46 * @todo Test Zepto 47 * @todo stagePadding calculate wrong active classes 48 */ 49;(function($, window, document, undefined) { 50 51 /** 52 * Creates a carousel. 53 * @class The Owl Carousel. 54 * @public 55 * @param {HTMLElement|jQuery} element - The element to create the carousel for. 56 * @param {Object} [options] - The options 57 */ 58 function Owl(element, options) { 59 60 /** 61 * Current settings for the carousel. 62 * @public 63 */ 64 this.settings = null; 65 66 /** 67 * Current options set by the caller including defaults. 68 * @public 69 */ 70 this.options = $.extend({}, Owl.Defaults, options); 71 72 /** 73 * Plugin element. 74 * @public 75 */ 76 this.$element = $(element); 77 78 /** 79 * Proxied event handlers. 80 * @protected 81 */ 82 this._handlers = {}; 83 84 /** 85 * References to the running plugins of this carousel. 86 * @protected 87 */ 88 this._plugins = {}; 89 90 /** 91 * Currently suppressed events to prevent them from beeing retriggered. 92 * @protected 93 */ 94 this._supress = {}; 95 96 /** 97 * Absolute current position. 98 * @protected 99 */ 100 this._current = null; 101 102 /** 103 * Animation speed in milliseconds. 104 * @protected 105 */ 106 this._speed = null; 107 108 /** 109 * Coordinates of all items in pixel. 110 * @todo The name of this member is missleading. 111 * @protected 112 */ 113 this._coordinates = []; 114 115 /** 116 * Current breakpoint. 117 * @todo Real media queries would be nice. 118 * @protected 119 */ 120 this._breakpoint = null; 121 122 /** 123 * Current width of the plugin element. 124 */ 125 this._width = null; 126 127 /** 128 * All real items. 129 * @protected 130 */ 131 this._items = []; 132 133 /** 134 * All cloned items. 135 * @protected 136 */ 137 this._clones = []; 138 139 /** 140 * Merge values of all items. 141 * @todo Maybe this could be part of a plugin. 142 * @protected 143 */ 144 this._mergers = []; 145 146 /** 147 * Widths of all items. 148 */ 149 this._widths = []; 150 151 /** 152 * Invalidated parts within the update process. 153 * @protected 154 */ 155 this._invalidated = {}; 156 157 /** 158 * Ordered list of workers for the update process. 159 * @protected 160 */ 161 this._pipe = []; 162 163 /** 164 * Current state information for the drag operation. 165 * @todo #261 166 * @protected 167 */ 168 this._drag = { 169 time: null, 170 target: null, 171 pointer: null, 172 stage: { 173 start: null, 174 current: null 175 }, 176 direction: null 177 }; 178 179 /** 180 * Current state information and their tags. 181 * @type {Object} 182 * @protected 183 */ 184 this._states = { 185 current: {}, 186 tags: { 187 'initializing': [ 'busy' ], 188 'animating': [ 'busy' ], 189 'dragging': [ 'interacting' ] 190 } 191 }; 192 193 $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) { 194 this._handlers[handler] = $.proxy(this[handler], this); 195 }, this)); 196 197 $.each(Owl.Plugins, $.proxy(function(key, plugin) { 198 this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] 199 = new plugin(this); 200 }, this)); 201 202 $.each(Owl.Workers, $.proxy(function(priority, worker) { 203 this._pipe.push({ 204 'filter': worker.filter, 205 'run': $.proxy(worker.run, this) 206 }); 207 }, this)); 208 209 this.setup(); 210 this.initialize(); 211 } 212 213 /** 214 * Default options for the carousel. 215 * @public 216 */ 217 Owl.Defaults = { 218 items: 3, 219 loop: false, 220 center: false, 221 rewind: false, 222
vendor: 4,168 bytes, lines 223-397
223 mouseDrag: true, 224 touchDrag: true, 225 pullDrag: true, 226 freeDrag: false, 227 228 margin: 0, 229 stagePadding: 0, 230 231 merge: false, 232 mergeFit: true, 233 autoWidth: false, 234 235 startPosition: 0, 236 rtl: false, 237 238 smartSpeed: 250, 239 fluidSpeed: false, 240 dragEndSpeed: false, 241 242 responsive: {}, 243 responsiveRefreshRate: 200, 244 responsiveBaseElement: window, 245 246 fallbackEasing: 'swing', 247 248 info: false, 249 250 nestedItemSelector: false, 251 itemElement: 'div', 252 stageElement: 'div', 253 254 refreshClass: 'owl-refresh', 255 loadedClass: 'owl-loaded', 256 loadingClass: 'owl-loading', 257 rtlClass: 'owl-rtl', 258 responsiveClass: 'owl-responsive', 259 dragClass: 'owl-drag', 260 itemClass: 'owl-item', 261 stageClass: 'owl-stage', 262 stageOuterClass: 'owl-stage-outer', 263 grabClass: 'owl-grab' 264 }; 265 266 /** 267 * Enumeration for width. 268 * @public 269 * @readonly 270 * @enum {String} 271 */ 272 Owl.Width = { 273 Default: 'default', 274 Inner: 'inner', 275 Outer: 'outer' 276 }; 277 278 /** 279 * Enumeration for types. 280 * @public 281 * @readonly 282 * @enum {String} 283 */ 284 Owl.Type = { 285 Event: 'event', 286 State: 'state' 287 }; 288 289 /** 290 * Contains all registered plugins. 291 * @public 292 */ 293 Owl.Plugins = {}; 294 295 /** 296 * List of workers involved in the update process. 297 */ 298 Owl.Workers = [ { 299 filter: [ 'width', 'settings' ], 300 run: function() { 301 this._width = this.$element.width(); 302 } 303 }, { 304 filter: [ 'width', 'items', 'settings' ], 305 run: function(cache) { 306 cache.current = this._items && this._items[this.relative(this._current)]; 307 } 308 }, { 309 filter: [ 'items', 'settings' ], 310 run: function() { 311 this.$stage.children('.cloned').remove(); 312 } 313 }, { 314 filter: [ 'width', 'items', 'settings' ], 315 run: function(cache) { 316 var margin = this.settings.margin || '', 317 grid = !this.settings.autoWidth, 318 rtl = this.settings.rtl, 319 css = { 320 'width': 'auto', 321 'margin-left': rtl ? margin : '', 322 'margin-right': rtl ? '' : margin 323 }; 324 325 !grid && this.$stage.children().css(css); 326 327 cache.css = css; 328 } 329 }, { 330 filter: [ 'width', 'items', 'settings' ], 331 run: function(cache) { 332 var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, 333 merge = null, 334 iterator = this._items.length, 335 grid = !this.settings.autoWidth, 336 widths = []; 337 338 cache.items = { 339 merge: false, 340 width: width 341 }; 342 343 while (iterator--) { 344 merge = this._mergers[iterator]; 345 merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge; 346 347 cache.items.merge = merge > 1 || cache.items.merge; 348 349 widths[iterator] = !grid ? this._items[iterator].width() : width * merge; 350 } 351 352 this._widths = widths; 353 } 354 }, { 355 filter: [ 'items', 'settings' ], 356 run: function() { 357 var clones = [], 358 items = this._items, 359 settings = this.settings, 360 // TODO: Should be computed from number of min width items in stage 361 view = Math.max(settings.items * 2, 4), 362 size = Math.ceil(items.length / 2) * 2, 363 repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0, 364 append = '', 365 prepend = ''; 366 367 repeat /= 2; 368 369 while (repeat--) { 370 // Switch to only using appended clones 371 clones.push(this.normalize(clones.length / 2, true)); 372 append = append + items[clones[clones.length - 1]][0].outerHTML; 373 clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true)); 374 prepend = items[clones[clones.length - 1]][0].outerHTML + prepend; 375 } 376 377 this._clones = clones; 378 379 $(append).addClass('cloned').appendTo(this.$stage); 380 $(prepend).addClass('cloned').prependTo(this.$stage); 381 } 382 }, { 383 filter: [ 'width', 'items', 'settings' ], 384 run: function() { 385 var rtl = this.settings.rtl ? 1 : -1, 386 size = this._clones.length + this._items.length, 387 iterator = -1, 388 previous = 0, 389 current = 0, 390 coordinates = []; 391 392 while (++iterator < size) { 393 previous = coordinates[iterator - 1] || 0; 394 current = this._widths[this.relative(iterator)] + this.settings.margin; 395 coordinates.push(previous + current * rtl); 396 } 397
vendor: 8,251 bytes, lines 398-709
398 this._coordinates = coordinates; 399 } 400 }, { 401 filter: [ 'width', 'items', 'settings' ], 402 run: function() { 403 var padding = this.settings.stagePadding, 404 coordinates = this._coordinates, 405 css = { 406 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2, 407 'padding-left': padding || '', 408 'padding-right': padding || '' 409 }; 410 411 this.$stage.css(css); 412 } 413 }, { 414 filter: [ 'width', 'items', 'settings' ], 415 run: function(cache) { 416 var iterator = this._coordinates.length, 417 grid = !this.settings.autoWidth, 418 items = this.$stage.children(); 419 420 if (grid && cache.items.merge) { 421 while (iterator--) { 422 cache.css.width = this._widths[this.relative(iterator)]; 423 items.eq(iterator).css(cache.css); 424 } 425 } else if (grid) { 426 cache.css.width = cache.items.width; 427 items.css(cache.css); 428 } 429 } 430 }, { 431 filter: [ 'items' ], 432 run: function() { 433 this._coordinates.length < 1 && this.$stage.removeAttr('style'); 434 } 435 }, { 436 filter: [ 'width', 'items', 'settings' ], 437 run: function(cache) { 438 cache.current = cache.current ? this.$stage.children().index(cache.current) : 0; 439 cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current)); 440 this.reset(cache.current); 441 } 442 }, { 443 filter: [ 'position' ], 444 run: function() { 445 this.animate(this.coordinates(this._current)); 446 } 447 }, { 448 filter: [ 'width', 'position', 'items', 'settings' ], 449 run: function() { 450 var rtl = this.settings.rtl ? 1 : -1, 451 padding = this.settings.stagePadding * 2, 452 begin = this.coordinates(this.current()) + padding, 453 end = begin + this.width() * rtl, 454 inner, outer, matches = [], i, n; 455 456 for (i = 0, n = this._coordinates.length; i < n; i++) { 457 inner = this._coordinates[i - 1] || 0; 458 outer = Math.abs(this._coordinates[i]) + padding * rtl; 459 460 if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end))) 461 || (this.op(outer, '<', begin) && this.op(outer, '>', end))) { 462 matches.push(i); 463 } 464 } 465 466 this.$stage.children('.active').removeClass('active'); 467 this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active'); 468 469 if (this.settings.center) { 470 this.$stage.children('.center').removeClass('center'); 471 this.$stage.children().eq(this.current()).addClass('center'); 472 } 473 } 474 } ]; 475 476 /** 477 * Initializes the carousel. 478 * @protected 479 */ 480 Owl.prototype.initialize = function() { 481 this.enter('initializing'); 482 this.trigger('initialize'); 483 484 this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl); 485 486 if (this.settings.autoWidth && !this.is('pre-loading')) { 487 var imgs, nestedSelector, width; 488 imgs = this.$element.find('img'); 489 nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined; 490 width = this.$element.children(nestedSelector).width(); 491 492 if (imgs.length && width <= 0) { 493 this.preloadAutoWidthImages(imgs); 494 } 495 } 496 497 this.$element.addClass(this.options.loadingClass); 498 499 // create stage 500 this.$stage = $('<' + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>') 501 .wrap('<div class="' + this.settings.stageOuterClass + '"/>'); 502 503 // append stage 504 this.$element.append(this.$stage.parent()); 505 506 // append content 507 this.replace(this.$element.children().not(this.$stage.parent())); 508 509 // check visibility 510 if (this.$element.is(':visible')) { 511 // update view 512 this.refresh(); 513 } else { 514 // invalidate width 515 this.invalidate('width'); 516 } 517 518 this.$element 519 .removeClass(this.options.loadingClass) 520 .addClass(this.options.loadedClass); 521 522 // register event handlers 523 this.registerEventHandlers(); 524 525 this.leave('initializing'); 526 this.trigger('initialized'); 527 }; 528 529 /** 530 * Setups the current settings. 531 * @todo Remove responsive classes. Why should adaptive designs be brought into IE8? 532 * @todo Support for media queries by using `matchMedia` would be nice. 533 * @public 534 */ 535 Owl.prototype.setup = function() { 536 var viewport = this.viewport(), 537 overwrites = this.options.responsive, 538 match = -1, 539 settings = null; 540 541 if (!overwrites) { 542 settings = $.extend({}, this.options); 543 } else { 544 $.each(overwrites, function(breakpoint) { 545 if (breakpoint <= viewport && breakpoint > match) { 546 match = Number(breakpoint); 547 } 548 }); 549 550 settings = $.extend({}, this.options, overwrites[match]); 551 if (typeof settings.stagePadding === 'function') { 552 settings.stagePadding = settings.stagePadding(); 553 } 554 delete settings.responsive; 555 556 // responsive class 557 if (settings.responsiveClass) { 558 this.$element.attr('class', 559 this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match) 560 ); 561 } 562 } 563 564 this.trigger('change', { property: { name: 'settings', value: settings } }); 565 this._breakpoint = match; 566 this.settings = settings; 567 this.invalidate('settings'); 568 this.trigger('changed', { property: { name: 'settings', value: this.settings } }); 569 }; 570 571 /** 572 * Updates option logic if necessery. 573 * @protected 574 */ 575 Owl.prototype.optionsLogic = function() { 576 if (this.settings.autoWidth) { 577 this.settings.stagePadding = false; 578 this.settings.merge = false; 579 } 580 }; 581 582 /** 583 * Prepares an item before add. 584 * @todo Rename event parameter `content` to `item`. 585 * @protected 586 * @returns {jQuery|HTMLElement} - The item container. 587 */ 588 Owl.prototype.prepare = function(item) { 589 var event = this.trigger('prepare', { content: item }); 590 591 if (!event.data) { 592 event.data = $('<' + this.settings.itemElement + '/>') 593 .addClass(this.options.itemClass).append(item) 594 } 595 596 this.trigger('prepared', { content: event.data }); 597 598 return event.data; 599 }; 600 601 /** 602 * Updates the view. 603 * @public 604 */ 605 Owl.prototype.update = function() { 606 var i = 0, 607 n = this._pipe.length, 608 filter = $.proxy(function(p) { return this[p] }, this._invalidated), 609 cache = {}; 610 611 while (i < n) { 612 if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) { 613 this._pipe[i].run(cache); 614 } 615 i++; 616 } 617 618 this._invalidated = {}; 619 620 !this.is('valid') && this.enter('valid'); 621 }; 622 623 /** 624 * Gets the width of the view. 625 * @public 626 * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return. 627 * @returns {Number} - The width of the view in pixel. 628 */ 629 Owl.prototype.width = function(dimension) { 630 dimension = dimension || Owl.Width.Default; 631 switch (dimension) { 632 case Owl.Width.Inner: 633 case Owl.Width.Outer: 634 return this._width; 635 default: 636 return this._width - this.settings.stagePadding * 2 + this.settings.margin; 637 } 638 }; 639 640 /** 641 * Refreshes the carousel primarily for adaptive purposes. 642 * @public 643 */ 644 Owl.prototype.refresh = function() { 645 this.enter('refreshing'); 646 this.trigger('refresh'); 647 648 this.setup(); 649 650 this.optionsLogic(); 651 652 this.$element.addClass(this.options.refreshClass); 653 654 this.update(); 655 656 this.$element.removeClass(this.options.refreshClass); 657 658 this.leave('refreshing'); 659 this.trigger('refreshed'); 660 }; 661 662 /** 663 * Checks window `resize` event. 664 * @protected 665 */ 666 Owl.prototype.onThrottledResize = function() { 667 window.clearTimeout(this.resizeTimer); 668 this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate); 669 }; 670 671 /** 672 * Checks window `resize` event. 673 * @protected 674 */ 675 Owl.prototype.onResize = function() { 676 if (!this._items.length) { 677 return false; 678 } 679 680 if (this._width === this.$element.width()) { 681 return false; 682 } 683 684 if (!this.$element.is(':visible')) { 685 return false; 686 } 687 688 this.enter('resizing'); 689 690 if (this.trigger('resize').isDefaultPrevented()) { 691 this.leave('resizing'); 692 return false; 693 } 694 695 this.invalidate('width'); 696 697 this.refresh(); 698 699 this.leave('resizing'); 700 this.trigger('resized'); 701 }; 702 703 /** 704 * Registers event handlers. 705 * @todo Check `msPointerEnabled` 706 * @todo #261 707 * @protected 708 */ 709 Owl.prototype.registerEventHandlers = function() {
vendor: 5,214 bytes, lines 710-877
710 if ($.support.transition) { 711 this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this)); 712 } 713 714 if (this.settings.responsive !== false) { 715 this.on(window, 'resize', this._handlers.onThrottledResize); 716 } 717 718 if (this.settings.mouseDrag) { 719 this.$element.addClass(this.options.dragClass); 720 this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this)); 721 this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false }); 722 } 723 724 if (this.settings.touchDrag){ 725 this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this)); 726 this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this)); 727 } 728 }; 729 730 /** 731 * Handles `touchstart` and `mousedown` events. 732 * @todo Horizontal swipe threshold as option 733 * @todo #261 734 * @protected 735 * @param {Event} event - The event arguments. 736 */ 737 Owl.prototype.onDragStart = function(event) { 738 var stage = null; 739 740 if (event.which === 3) { 741 return; 742 } 743 744 if ($.support.transform) { 745 stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(','); 746 stage = { 747 x: stage[stage.length === 16 ? 12 : 4], 748 y: stage[stage.length === 16 ? 13 : 5] 749 }; 750 } else { 751 stage = this.$stage.position(); 752 stage = { 753 x: this.settings.rtl ? 754 stage.left + this.$stage.width() - this.width() + this.settings.margin : 755 stage.left, 756 y: stage.top 757 }; 758 } 759 760 if (this.is('animating')) { 761 $.support.transform ? this.animate(stage.x) : this.$stage.stop() 762 this.invalidate('position'); 763 } 764 765 this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown'); 766 767 this.speed(0); 768 769 this._drag.time = new Date().getTime(); 770 this._drag.target = $(event.target); 771 this._drag.stage.start = stage; 772 this._drag.stage.current = stage; 773 this._drag.pointer = this.pointer(event); 774 775 $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this)); 776 777 $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) { 778 var delta = this.difference(this._drag.pointer, this.pointer(event)); 779 780 $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this)); 781 782 if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) { 783 return; 784 } 785 786 event.preventDefault(); 787 788 this.enter('dragging'); 789 this.trigger('drag'); 790 }, this)); 791 }; 792 793 /** 794 * Handles the `touchmove` and `mousemove` events. 795 * @todo #261 796 * @protected 797 * @param {Event} event - The event arguments. 798 */ 799 Owl.prototype.onDragMove = function(event) { 800 var minimum = null, 801 maximum = null, 802 pull = null, 803 delta = this.difference(this._drag.pointer, this.pointer(event)), 804 stage = this.difference(this._drag.stage.start, delta); 805 806 if (!this.is('dragging')) { 807 return; 808 } 809 810 event.preventDefault(); 811 812 if (this.settings.loop) { 813 minimum = this.coordinates(this.minimum()); 814 maximum = this.coordinates(this.maximum() + 1) - minimum; 815 stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum; 816 } else { 817 minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()); 818 maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()); 819 pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0; 820 stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull); 821 } 822 823 this._drag.stage.current = stage; 824 825 this.animate(stage.x); 826 }; 827 828 /** 829 * Handles the `touchend` and `mouseup` events. 830 * @todo #261 831 * @todo Threshold for click event 832 * @protected 833 * @param {Event} event - The event arguments. 834 */ 835 Owl.prototype.onDragEnd = function(event) { 836 var delta = this.difference(this._drag.pointer, this.pointer(event)), 837 stage = this._drag.stage.current, 838 direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right'; 839 840 $(document).off('.owl.core'); 841 842 this.$element.removeClass(this.options.grabClass); 843 844 if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) { 845 this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed); 846 this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction)); 847 this.invalidate('position'); 848 this.update(); 849 850 this._drag.direction = direction; 851 852 if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) { 853 this._drag.target.one('click.owl.core', function() { return false; }); 854 } 855 } 856 857 if (!this.is('dragging')) { 858 return; 859 } 860 861 this.leave('dragging'); 862 this.trigger('dragged'); 863 }; 864 865 /** 866 * Gets absolute position of the closest item for a coordinate. 867 * @todo Setting `freeDrag` makes `closest` not reusable. See #165. 868 * @protected 869 * @param {Number} coordinate - The coordinate in pixel. 870 * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`. 871 * @return {Number} - The absolute position of the closest item. 872 */ 873 Owl.prototype.closest = function(coordinate, direction) { 874 var position = -1, 875 pull = 30, 876 width = this.width(), 877 coordinates = this.coordinates();
vendor: 59,797 bytes, lines 878-3021
878 879 if (!this.settings.freeDrag) { 880 // check closest item 881 $.each(coordinates, $.proxy(function(index, value) { 882 // on a left pull, check on current index 883 if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) { 884 position = index; 885 // on a right pull, check on previous index 886 // to do so, subtract width from value and set position = index + 1 887 } else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) { 888 position = index + 1; 889 } else if (this.op(coordinate, '<', value) 890 && this.op(coordinate, '>', coordinates[index + 1] || value - width)) { 891 position = direction === 'left' ? index + 1 : index; 892 } 893 return position === -1; 894 }, this)); 895 } 896 897 if (!this.settings.loop) { 898 // non loop boundries 899 if (this.op(coordinate, '>', coordinates[this.minimum()])) { 900 position = coordinate = this.minimum(); 901 } else if (this.op(coordinate, '<', coordinates[this.maximum()])) { 902 position = coordinate = this.maximum(); 903 } 904 } 905 906 return position; 907 }; 908 909 /** 910 * Animates the stage. 911 * @todo #270 912 * @public 913 * @param {Number} coordinate - The coordinate in pixels. 914 */ 915 Owl.prototype.animate = function(coordinate) { 916 var animate = this.speed() > 0; 917 918 this.is('animating') && this.onTransitionEnd(); 919 920 if (animate) { 921 this.enter('animating'); 922 this.trigger('translate'); 923 } 924 925 if ($.support.transform3d && $.support.transition) { 926 this.$stage.css({ 927 transform: 'translate3d(' + coordinate + 'px,0px,0px)', 928 transition: (this.speed() / 1000) + 's' 929 }); 930 } else if (animate) { 931 this.$stage.animate({ 932 left: coordinate + 'px' 933 }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)); 934 } else { 935 this.$stage.css({ 936 left: coordinate + 'px' 937 }); 938 } 939 }; 940 941 /** 942 * Checks whether the carousel is in a specific state or not. 943 * @param {String} state - The state to check. 944 * @returns {Boolean} - The flag which indicates if the carousel is busy. 945 */ 946 Owl.prototype.is = function(state) { 947 return this._states.current[state] && this._states.current[state] > 0; 948 }; 949 950 /** 951 * Sets the absolute position of the current item. 952 * @public 953 * @param {Number} [position] - The new absolute position or nothing to leave it unchanged. 954 * @returns {Number} - The absolute position of the current item. 955 */ 956 Owl.prototype.current = function(position) { 957 if (position === undefined) { 958 return this._current; 959 } 960 961 if (this._items.length === 0) { 962 return undefined; 963 } 964 965 position = this.normalize(position); 966 967 if (this._current !== position) { 968 var event = this.trigger('change', { property: { name: 'position', value: position } }); 969 970 if (event.data !== undefined) { 971 position = this.normalize(event.data); 972 } 973 974 this._current = position; 975 976 this.invalidate('position'); 977 978 this.trigger('changed', { property: { name: 'position', value: this._current } }); 979 } 980 981 return this._current; 982 }; 983 984 /** 985 * Invalidates the given part of the update routine. 986 * @param {String} [part] - The part to invalidate. 987 * @returns {Array.<String>} - The invalidated parts. 988 */ 989 Owl.prototype.invalidate = function(part) { 990 if ($.type(part) === 'string') { 991 this._invalidated[part] = true; 992 this.is('valid') && this.leave('valid'); 993 } 994 return $.map(this._invalidated, function(v, i) { return i }); 995 }; 996 997 /** 998 * Resets the absolute position of the current item. 999 * @public 1000 * @param {Number} position - The absolute position of the new item. 1001 */ 1002 Owl.prototype.reset = function(position) { 1003 position = this.normalize(position); 1004 1005 if (position === undefined) { 1006 return; 1007 } 1008 1009 this._speed = 0; 1010 this._current = position; 1011 1012 this.suppress([ 'translate', 'translated' ]); 1013 1014 this.animate(this.coordinates(position)); 1015 1016 this.release([ 'translate', 'translated' ]); 1017 }; 1018 1019 /** 1020 * Normalizes an absolute or a relative position of an item. 1021 * @public 1022 * @param {Number} position - The absolute or relative position to normalize. 1023 * @param {Boolean} [relative=false] - Whether the given position is relative or not. 1024 * @returns {Number} - The normalized position. 1025 */ 1026 Owl.prototype.normalize = function(position, relative) { 1027 var n = this._items.length, 1028 m = relative ? 0 : this._clones.length; 1029 1030 if (!this.isNumeric(position) || n < 1) { 1031 position = undefined; 1032 } else if (position < 0 || position >= n + m) { 1033 position = ((position - m / 2) % n + n) % n + m / 2; 1034 } 1035 1036 return position; 1037 }; 1038 1039 /** 1040 * Converts an absolute position of an item into a relative one. 1041 * @public 1042 * @param {Number} position - The absolute position to convert. 1043 * @returns {Number} - The converted position. 1044 */ 1045 Owl.prototype.relative = function(position) { 1046 position -= this._clones.length / 2; 1047 return this.normalize(position, true); 1048 }; 1049 1050 /** 1051 * Gets the maximum position for the current item. 1052 * @public 1053 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. 1054 * @returns {Number} 1055 */ 1056 Owl.prototype.maximum = function(relative) { 1057 var settings = this.settings, 1058 maximum = this._coordinates.length, 1059 iterator, 1060 reciprocalItemsWidth, 1061 elementWidth; 1062 1063 if (settings.loop) { 1064 maximum = this._clones.length / 2 + this._items.length - 1; 1065 } else if (settings.autoWidth || settings.merge) { 1066 iterator = this._items.length; 1067 reciprocalItemsWidth = this._items[--iterator].width(); 1068 elementWidth = this.$element.width(); 1069 while (iterator--) { 1070 reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin; 1071 if (reciprocalItemsWidth > elementWidth) { 1072 break; 1073 } 1074 } 1075 maximum = iterator + 1; 1076 } else if (settings.center) { 1077 maximum = this._items.length - 1; 1078 } else { 1079 maximum = this._items.length - settings.items; 1080 } 1081 1082 if (relative) { 1083 maximum -= this._clones.length / 2; 1084 } 1085 1086 return Math.max(maximum, 0); 1087 }; 1088 1089 /** 1090 * Gets the minimum position for the current item. 1091 * @public 1092 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. 1093 * @returns {Number} 1094 */ 1095 Owl.prototype.minimum = function(relative) { 1096 return relative ? 0 : this._clones.length / 2; 1097 }; 1098 1099 /** 1100 * Gets an item at the specified relative position. 1101 * @public 1102 * @param {Number} [position] - The relative position of the item. 1103 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given. 1104 */ 1105 Owl.prototype.items = function(position) { 1106 if (position === undefined) { 1107 return this._items.slice(); 1108 } 1109 1110 position = this.normalize(position, true); 1111 return this._items[position]; 1112 }; 1113 1114 /** 1115 * Gets an item at the specified relative position. 1116 * @public 1117 * @param {Number} [position] - The relative position of the item. 1118 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given. 1119 */ 1120 Owl.prototype.mergers = function(position) { 1121 if (position === undefined) { 1122 return this._mergers.slice(); 1123 } 1124 1125 position = this.normalize(position, true); 1126 return this._mergers[position]; 1127 }; 1128 1129 /** 1130 * Gets the absolute positions of clones for an item. 1131 * @public 1132 * @param {Number} [position] - The relative position of the item. 1133 * @returns {Array.<Number>} - The absolute positions of clones for the item or all if no position was given. 1134 */ 1135 Owl.prototype.clones = function(position) { 1136 var odd = this._clones.length / 2, 1137 even = odd + this._items.length, 1138 map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 }; 1139 1140 if (position === undefined) { 1141 return $.map(this._clones, function(v, i) { return map(i) }); 1142 } 1143 1144 return $.map(this._clones, function(v, i) { return v === position ? map(i) : null }); 1145 }; 1146 1147 /** 1148 * Sets the current animation speed. 1149 * @public 1150 * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged. 1151 * @returns {Number} - The current animation speed in milliseconds. 1152 */ 1153 Owl.prototype.speed = function(speed) { 1154 if (speed !== undefined) { 1155 this._speed = speed; 1156 } 1157 1158 return this._speed; 1159 }; 1160 1161 /** 1162 * Gets the coordinate of an item. 1163 * @todo The name of this method is missleanding. 1164 * @public 1165 * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`. 1166 * @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates. 1167 */ 1168 Owl.prototype.coordinates = function(position) { 1169 var multiplier = 1, 1170 newPosition = position - 1, 1171 coordinate; 1172 1173 if (position === undefined) { 1174 return $.map(this._coordinates, $.proxy(function(coordinate, index) { 1175 return this.coordinates(index); 1176 }, this)); 1177 } 1178 1179 if (this.settings.center) { 1180 if (this.settings.rtl) { 1181 multiplier = -1; 1182 newPosition = position + 1; 1183 } 1184 1185 coordinate = this._coordinates[position]; 1186 coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier; 1187 } else { 1188 coordinate = this._coordinates[newPosition] || 0; 1189 } 1190 1191 coordinate = Math.ceil(coordinate); 1192 1193 return coordinate; 1194 }; 1195 1196 /** 1197 * Calculates the speed for a translation. 1198 * @protected 1199 * @param {Number} from - The absolute position of the start item. 1200 * @param {Number} to - The absolute position of the target item. 1201 * @param {Number} [factor=undefined] - The time factor in milliseconds. 1202 * @returns {Number} - The time in milliseconds for the translation. 1203 */ 1204 Owl.prototype.duration = function(from, to, factor) { 1205 if (factor === 0) { 1206 return 0; 1207 } 1208 1209 return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed)); 1210 }; 1211 1212 /** 1213 * Slides to the specified item. 1214 * @public 1215 * @param {Number} position - The position of the item. 1216 * @param {Number} [speed] - The time in milliseconds for the transition. 1217 */ 1218 Owl.prototype.to = function(position, speed) { 1219 var current = this.current(), 1220 revert = null, 1221 distance = position - this.relative(current), 1222 direction = (distance > 0) - (distance < 0), 1223 items = this._items.length, 1224 minimum = this.minimum(), 1225 maximum = this.maximum(); 1226 1227 if (this.settings.loop) { 1228 if (!this.settings.rewind && Math.abs(distance) > items / 2) { 1229 distance += direction * -1 * items; 1230 } 1231 1232 position = current + distance; 1233 revert = ((position - minimum) % items + items) % items + minimum; 1234 1235 if (revert !== position && revert - distance <= maximum && revert - distance > 0) { 1236 current = revert - distance; 1237 position = revert; 1238 this.reset(current); 1239 } 1240 } else if (this.settings.rewind) { 1241 maximum += 1; 1242 position = (position % maximum + maximum) % maximum; 1243 } else { 1244 position = Math.max(minimum, Math.min(maximum, position)); 1245 } 1246 1247 this.speed(this.duration(current, position, speed)); 1248 this.current(position); 1249 1250 if (this.$element.is(':visible')) { 1251 this.update(); 1252 } 1253 }; 1254 1255 /** 1256 * Slides to the next item. 1257 * @public 1258 * @param {Number} [speed] - The time in milliseconds for the transition. 1259 */ 1260 Owl.prototype.next = function(speed) { 1261 speed = speed || false; 1262 this.to(this.relative(this.current()) + 1, speed); 1263 }; 1264 1265 /** 1266 * Slides to the previous item. 1267 * @public 1268 * @param {Number} [speed] - The time in milliseconds for the transition. 1269 */ 1270 Owl.prototype.prev = function(speed) { 1271 speed = speed || false; 1272 this.to(this.relative(this.current()) - 1, speed); 1273 }; 1274 1275 /** 1276 * Handles the end of an animation. 1277 * @protected 1278 * @param {Event} event - The event arguments. 1279 */ 1280 Owl.prototype.onTransitionEnd = function(event) { 1281 1282 // if css2 animation then event object is undefined 1283 if (event !== undefined) { 1284 event.stopPropagation(); 1285 1286 // Catch only owl-stage transitionEnd event 1287 if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) { 1288 return false; 1289 } 1290 } 1291 1292 this.leave('animating'); 1293 this.trigger('translated'); 1294 }; 1295 1296 /** 1297 * Gets viewport width. 1298 * @protected 1299 * @return {Number} - The width in pixel. 1300 */ 1301 Owl.prototype.viewport = function() { 1302 var width; 1303 if (this.options.responsiveBaseElement !== window) { 1304 width = $(this.options.responsiveBaseElement).width(); 1305 } else if (window.innerWidth) { 1306 width = window.innerWidth; 1307 } else if (document.documentElement && document.documentElement.clientWidth) { 1308 width = document.documentElement.clientWidth; 1309 } else { 1310 console.warn('Can not detect viewport width.'); 1311 } 1312 return width; 1313 }; 1314 1315 /** 1316 * Replaces the current content. 1317 * @public 1318 * @param {HTMLElement|jQuery|String} content - The new content. 1319 */ 1320 Owl.prototype.replace = function(content) { 1321 this.$stage.empty(); 1322 this._items = []; 1323 1324 if (content) { 1325 content = (content instanceof jQuery) ? content : $(content); 1326 } 1327 1328 if (this.settings.nestedItemSelector) { 1329 content = content.find('.' + this.settings.nestedItemSelector); 1330 } 1331 1332 content.filter(function() { 1333 return this.nodeType === 1; 1334 }).each($.proxy(function(index, item) { 1335 item = this.prepare(item); 1336 this.$stage.append(item); 1337 this._items.push(item); 1338 this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); 1339 }, this)); 1340 1341 this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0); 1342 1343 this.invalidate('items'); 1344 }; 1345 1346 /** 1347 * Adds an item. 1348 * @todo Use `item` instead of `content` for the event arguments. 1349 * @public 1350 * @param {HTMLElement|jQuery|String} content - The item content to add. 1351 * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end. 1352 */ 1353 Owl.prototype.add = function(content, position) { 1354 var current = this.relative(this._current); 1355 1356 position = position === undefined ? this._items.length : this.normalize(position, true); 1357 content = content instanceof jQuery ? content : $(content); 1358 1359 this.trigger('add', { content: content, position: position }); 1360 1361 content = this.prepare(content); 1362 1363 if (this._items.length === 0 || position === this._items.length) { 1364 this._items.length === 0 && this.$stage.append(content); 1365 this._items.length !== 0 && this._items[position - 1].after(content); 1366 this._items.push(content); 1367 this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); 1368 } else { 1369 this._items[position].before(content); 1370 this._items.splice(position, 0, content); 1371 this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); 1372 } 1373 1374 this._items[current] && this.reset(this._items[current].index()); 1375 1376 this.invalidate('items'); 1377 1378 this.trigger('added', { content: content, position: position }); 1379 }; 1380 1381 /** 1382 * Removes an item by its position. 1383 * @todo Use `item` instead of `content` for the event arguments. 1384 * @public 1385 * @param {Number} position - The relative position of the item to remove. 1386 */ 1387 Owl.prototype.remove = function(position) { 1388 position = this.normalize(position, true); 1389 1390 if (position === undefined) { 1391 return; 1392 } 1393 1394 this.trigger('remove', { content: this._items[position], position: position }); 1395 1396 this._items[position].remove(); 1397 this._items.splice(position, 1); 1398 this._mergers.splice(position, 1); 1399 1400 this.invalidate('items'); 1401 1402 this.trigger('removed', { content: null, position: position }); 1403 }; 1404 1405 /** 1406 * Preloads images with auto width. 1407 * @todo Replace by a more generic approach 1408 * @protected 1409 */ 1410 Owl.prototype.preloadAutoWidthImages = function(images) { 1411 images.each($.proxy(function(i, element) { 1412 this.enter('pre-loading'); 1413 element = $(element); 1414 $(new Image()).one('load', $.proxy(function(e) { 1415 element.attr('src', e.target.src); 1416 element.css('opacity', 1); 1417 this.leave('pre-loading'); 1418 !this.is('pre-loading') && !this.is('initializing') && this.refresh(); 1419 }, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina')); 1420 }, this)); 1421 }; 1422 1423 /** 1424 * Destroys the carousel. 1425 * @public 1426 */ 1427 Owl.prototype.destroy = function() { 1428 1429 this.$element.off('.owl.core'); 1430 this.$stage.off('.owl.core'); 1431 $(document).off('.owl.core'); 1432 1433 if (this.settings.responsive !== false) { 1434 window.clearTimeout(this.resizeTimer); 1435 this.off(window, 'resize', this._handlers.onThrottledResize); 1436 } 1437 1438 for (var i in this._plugins) { 1439 this._plugins[i].destroy(); 1440 } 1441 1442 this.$stage.children('.cloned').remove(); 1443 1444 this.$stage.unwrap(); 1445 this.$stage.children().contents().unwrap(); 1446 this.$stage.children().unwrap(); 1447 1448 this.$element 1449 .removeClass(this.options.refreshClass) 1450 .removeClass(this.options.loadingClass) 1451 .removeClass(this.options.loadedClass) 1452 .removeClass(this.options.rtlClass) 1453 .removeClass(this.options.dragClass) 1454 .removeClass(this.options.grabClass) 1455 .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), '')) 1456 .removeData('owl.carousel'); 1457 }; 1458 1459 /** 1460 * Operators to calculate right-to-left and left-to-right. 1461 * @protected 1462 * @param {Number} [a] - The left side operand. 1463 * @param {String} [o] - The operator. 1464 * @param {Number} [b] - The right side operand. 1465 */ 1466 Owl.prototype.op = function(a, o, b) { 1467 var rtl = this.settings.rtl; 1468 switch (o) { 1469 case '<': 1470 return rtl ? a > b : a < b; 1471 case '>': 1472 return rtl ? a < b : a > b; 1473 case '>=': 1474 return rtl ? a <= b : a >= b; 1475 case '<=': 1476 return rtl ? a >= b : a <= b; 1477 default: 1478 break; 1479 } 1480 }; 1481 1482 /** 1483 * Attaches to an internal event. 1484 * @protected 1485 * @param {HTMLElement} element - The event source. 1486 * @param {String} event - The event name. 1487 * @param {Function} listener - The event handler to attach. 1488 * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not. 1489 */ 1490 Owl.prototype.on = function(element, event, listener, capture) { 1491 if (element.addEventListener) { 1492 element.addEventListener(event, listener, capture); 1493 } else if (element.attachEvent) { 1494 element.attachEvent('on' + event, listener); 1495 } 1496 }; 1497 1498 /** 1499 * Detaches from an internal event. 1500 * @protected 1501 * @param {HTMLElement} element - The event source. 1502 * @param {String} event - The event name. 1503 * @param {Function} listener - The attached event handler to detach. 1504 * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not. 1505 */ 1506 Owl.prototype.off = function(element, event, listener, capture) { 1507 if (element.removeEventListener) { 1508 element.removeEventListener(event, listener, capture); 1509 } else if (element.detachEvent) { 1510 element.detachEvent('on' + event, listener); 1511 } 1512 }; 1513 1514 /** 1515 * Triggers a public event. 1516 * @todo Remove `status`, `relatedTarget` should be used instead. 1517 * @protected 1518 * @param {String} name - The event name. 1519 * @param {*} [data=null] - The event data. 1520 * @param {String} [namespace=carousel] - The event namespace. 1521 * @param {String} [state] - The state which is associated with the event. 1522 * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not. 1523 * @returns {Event} - The event arguments. 1524 */ 1525 Owl.prototype.trigger = function(name, data, namespace, state, enter) { 1526 var status = { 1527 item: { count: this._items.length, index: this.current() } 1528 }, handler = $.camelCase( 1529 $.grep([ 'on', name, namespace ], function(v) { return v }) 1530 .join('-').toLowerCase() 1531 ), event = $.Event( 1532 [ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(), 1533 $.extend({ relatedTarget: this }, status, data) 1534 ); 1535 1536 if (!this._supress[name]) { 1537 $.each(this._plugins, function(name, plugin) { 1538 if (plugin.onTrigger) { 1539 plugin.onTrigger(event); 1540 } 1541 }); 1542 1543 this.register({ type: Owl.Type.Event, name: name }); 1544 this.$element.trigger(event); 1545 1546 if (this.settings && typeof this.settings[handler] === 'function') { 1547 this.settings[handler].call(this, event); 1548 } 1549 } 1550 1551 return event; 1552 }; 1553 1554 /** 1555 * Enters a state. 1556 * @param name - The state name. 1557 */ 1558 Owl.prototype.enter = function(name) { 1559 $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) { 1560 if (this._states.current[name] === undefined) { 1561 this._states.current[name] = 0; 1562 } 1563 1564 this._states.current[name]++; 1565 }, this)); 1566 }; 1567 1568 /** 1569 * Leaves a state. 1570 * @param name - The state name. 1571 */ 1572 Owl.prototype.leave = function(name) { 1573 $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) { 1574 this._states.current[name]--; 1575 }, this)); 1576 }; 1577 1578 /** 1579 * Registers an event or state. 1580 * @public 1581 * @param {Object} object - The event or state to register. 1582 */ 1583 Owl.prototype.register = function(object) { 1584 if (object.type === Owl.Type.Event) { 1585 if (!$.event.special[object.name]) { 1586 $.event.special[object.name] = {}; 1587 } 1588 1589 if (!$.event.special[object.name].owl) { 1590 var _default = $.event.special[object.name]._default; 1591 $.event.special[object.name]._default = function(e) { 1592 if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) { 1593 return _default.apply(this, arguments); 1594 } 1595 return e.namespace && e.namespace.indexOf('owl') > -1; 1596 }; 1597 $.event.special[object.name].owl = true; 1598 } 1599 } else if (object.type === Owl.Type.State) { 1600 if (!this._states.tags[object.name]) { 1601 this._states.tags[object.name] = object.tags; 1602 } else { 1603 this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags); 1604 } 1605 1606 this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) { 1607 return $.inArray(tag, this._states.tags[object.name]) === i; 1608 }, this)); 1609 } 1610 }; 1611 1612 /** 1613 * Suppresses events. 1614 * @protected 1615 * @param {Array.<String>} events - The events to suppress. 1616 */ 1617 Owl.prototype.suppress = function(events) { 1618 $.each(events, $.proxy(function(index, event) { 1619 this._supress[event] = true; 1620 }, this)); 1621 }; 1622 1623 /** 1624 * Releases suppressed events. 1625 * @protected 1626 * @param {Array.<String>} events - The events to release. 1627 */ 1628 Owl.prototype.release = function(events) { 1629 $.each(events, $.proxy(function(index, event) { 1630 delete this._supress[event]; 1631 }, this)); 1632 }; 1633 1634 /** 1635 * Gets unified pointer coordinates from event. 1636 * @todo #261 1637 * @protected 1638 * @param {Event} - The `mousedown` or `touchstart` event. 1639 * @returns {Object} - Contains `x` and `y` coordinates of current pointer position. 1640 */ 1641 Owl.prototype.pointer = function(event) { 1642 var result = { x: null, y: null }; 1643 1644 event = event.originalEvent || event || window.event; 1645 1646 event = event.touches && event.touches.length ? 1647 event.touches[0] : event.changedTouches && event.changedTouches.length ? 1648 event.changedTouches[0] : event; 1649 1650 if (event.pageX) { 1651 result.x = event.pageX; 1652 result.y = event.pageY; 1653 } else { 1654 result.x = event.clientX; 1655 result.y = event.clientY; 1656 } 1657 1658 return result; 1659 }; 1660 1661 /** 1662 * Determines if the input is a Number or something that can be coerced to a Number 1663 * @protected 1664 * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested 1665 * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number 1666 */ 1667 Owl.prototype.isNumeric = function(number) { 1668 return !isNaN(parseFloat(number)); 1669 }; 1670 1671 /** 1672 * Gets the difference of two vectors. 1673 * @todo #261 1674 * @protected 1675 * @param {Object} - The first vector. 1676 * @param {Object} - The second vector. 1677 * @returns {Object} - The difference. 1678 */ 1679 Owl.prototype.difference = function(first, second) { 1680 return { 1681 x: first.x - second.x, 1682 y: first.y - second.y 1683 }; 1684 }; 1685 1686 /** 1687 * The jQuery Plugin for the Owl Carousel 1688 * @todo Navigation plugin `next` and `prev` 1689 * @public 1690 */ 1691 $.fn.owlCarousel = function(option) { 1692 var args = Array.prototype.slice.call(arguments, 1); 1693 1694 return this.each(function() { 1695 var $this = $(this), 1696 data = $this.data('owl.carousel'); 1697 1698 if (!data) { 1699 data = new Owl(this, typeof option == 'object' && option); 1700 $this.data('owl.carousel', data); 1701 1702 $.each([ 1703 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove' 1704 ], function(i, event) { 1705 data.register({ type: Owl.Type.Event, name: event }); 1706 data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) { 1707 if (e.namespace && e.relatedTarget !== this) { 1708 this.suppress([ event ]); 1709 data[event].apply(this, [].slice.call(arguments, 1)); 1710 this.release([ event ]); 1711 } 1712 }, data)); 1713 }); 1714 } 1715 1716 if (typeof option == 'string' && option.charAt(0) !== '_') { 1717 data[option].apply(data, args); 1718 } 1719 }); 1720 }; 1721 1722 /** 1723 * The constructor for the jQuery Plugin 1724 * @public 1725 */ 1726 $.fn.owlCarousel.Constructor = Owl; 1727 1728})(window.Zepto || window.jQuery, window, document); 1729 1730/** 1731 * AutoRefresh Plugin 1732 * @version 2.1.0 1733 * @author Artus Kolanowski 1734 * @author David Deutsch 1735 * @license The MIT License (MIT) 1736 */ 1737;(function($, window, document, undefined) { 1738 1739 /** 1740 * Creates the auto refresh plugin. 1741 * @class The Auto Refresh Plugin 1742 * @param {Owl} carousel - The Owl Carousel 1743 */ 1744 var AutoRefresh = function(carousel) { 1745 /** 1746 * Reference to the core. 1747 * @protected 1748 * @type {Owl} 1749 */ 1750 this._core = carousel; 1751 1752 /** 1753 * Refresh interval. 1754 * @protected 1755 * @type {number} 1756 */ 1757 this._interval = null; 1758 1759 /** 1760 * Whether the element is currently visible or not. 1761 * @protected 1762 * @type {Boolean} 1763 */ 1764 this._visible = null; 1765 1766 /** 1767 * All event handlers. 1768 * @protected 1769 * @type {Object} 1770 */ 1771 this._handlers = { 1772 'initialized.owl.carousel': $.proxy(function(e) { 1773 if (e.namespace && this._core.settings.autoRefresh) { 1774 this.watch(); 1775 } 1776 }, this) 1777 }; 1778 1779 // set default options 1780 this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options); 1781 1782 // register event handlers 1783 this._core.$element.on(this._handlers); 1784 }; 1785 1786 /** 1787 * Default options. 1788 * @public 1789 */ 1790 AutoRefresh.Defaults = { 1791 autoRefresh: true, 1792 autoRefreshInterval: 500 1793 }; 1794 1795 /** 1796 * Watches the element. 1797 */ 1798 AutoRefresh.prototype.watch = function() { 1799 if (this._interval) { 1800 return; 1801 } 1802 1803 this._visible = this._core.$element.is(':visible'); 1804 this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval); 1805 }; 1806 1807 /** 1808 * Refreshes the element. 1809 */ 1810 AutoRefresh.prototype.refresh = function() { 1811 if (this._core.$element.is(':visible') === this._visible) { 1812 return; 1813 } 1814 1815 this._visible = !this._visible; 1816 1817 this._core.$element.toggleClass('owl-hidden', !this._visible); 1818 1819 this._visible && (this._core.invalidate('width') && this._core.refresh()); 1820 }; 1821 1822 /** 1823 * Destroys the plugin. 1824 */ 1825 AutoRefresh.prototype.destroy = function() { 1826 var handler, property; 1827 1828 window.clearInterval(this._interval); 1829 1830 for (handler in this._handlers) { 1831 this._core.$element.off(handler, this._handlers[handler]); 1832 } 1833 for (property in Object.getOwnPropertyNames(this)) { 1834 typeof this[property] != 'function' && (this[property] = null); 1835 } 1836 }; 1837 1838 $.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh; 1839 1840})(window.Zepto || window.jQuery, window, document); 1841 1842/** 1843 * Lazy Plugin 1844 * @version 2.1.0 1845 * @author Bartosz Wojciechowski 1846 * @author David Deutsch 1847 * @license The MIT License (MIT) 1848 */ 1849;(function($, window, document, undefined) { 1850 1851 /** 1852 * Creates the lazy plugin. 1853 * @class The Lazy Plugin 1854 * @param {Owl} carousel - The Owl Carousel 1855 */ 1856 var Lazy = function(carousel) { 1857 1858 /** 1859 * Reference to the core. 1860 * @protected 1861 * @type {Owl} 1862 */ 1863 this._core = carousel; 1864 1865 /** 1866 * Already loaded items. 1867 * @protected 1868 * @type {Array.<jQuery>} 1869 */ 1870 this._loaded = []; 1871 1872 /** 1873 * Event handlers. 1874 * @protected 1875 * @type {Object} 1876 */ 1877 this._handlers = { 1878 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) { 1879 if (!e.namespace) { 1880 return; 1881 } 1882 1883 if (!this._core.settings || !this._core.settings.lazyLoad) { 1884 return; 1885 } 1886 1887 if ((e.property && e.property.name == 'position') || e.type == 'initialized') { 1888 var settings = this._core.settings, 1889 n = (settings.center && Math.ceil(settings.items / 2) || settings.items), 1890 i = ((settings.center && n * -1) || 0), 1891 position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i, 1892 clones = this._core.clones().length, 1893 load = $.proxy(function(i, v) { this.load(v) }, this); 1894 1895 while (i++ < n) { 1896 this.load(clones / 2 + this._core.relative(position)); 1897 clones && $.each(this._core.clones(this._core.relative(position)), load); 1898 position++; 1899 } 1900 } 1901 }, this) 1902 }; 1903 1904 // set the default options 1905 this._core.options = $.extend({}, Lazy.Defaults, this._core.options); 1906 1907 // register event handler 1908 this._core.$element.on(this._handlers); 1909 }; 1910 1911 /** 1912 * Default options. 1913 * @public 1914 */ 1915 Lazy.Defaults = { 1916 lazyLoad: false 1917 }; 1918 1919 /** 1920 * Loads all resources of an item at the specified position. 1921 * @param {Number} position - The absolute position of the item. 1922 * @protected 1923 */ 1924 Lazy.prototype.load = function(position) { 1925 var $item = this._core.$stage.children().eq(position), 1926 $elements = $item && $item.find('.owl-lazy'); 1927 1928 if (!$elements || $.inArray($item.get(0), this._loaded) > -1) { 1929 return; 1930 } 1931 1932 $elements.each($.proxy(function(index, element) { 1933 var $element = $(element), image, 1934 url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src'); 1935 1936 this._core.trigger('load', { element: $element, url: url }, 'lazy'); 1937 1938 if ($element.is('img')) { 1939 $element.one('load.owl.lazy', $.proxy(function() { 1940 $element.css('opacity', 1); 1941 this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); 1942 }, this)).attr('src', url); 1943 } else { 1944 image = new Image(); 1945 image.onload = $.proxy(function() { 1946 $element.css({ 1947 'background-image': 'url("' + url + '")', 1948 'opacity': '1' 1949 }); 1950 this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); 1951 }, this); 1952 image.src = url; 1953 } 1954 }, this)); 1955 1956 this._loaded.push($item.get(0)); 1957 }; 1958 1959 /** 1960 * Destroys the plugin. 1961 * @public 1962 */ 1963 Lazy.prototype.destroy = function() { 1964 var handler, property; 1965 1966 for (handler in this.handlers) { 1967 this._core.$element.off(handler, this.handlers[handler]); 1968 } 1969 for (property in Object.getOwnPropertyNames(this)) { 1970 typeof this[property] != 'function' && (this[property] = null); 1971 } 1972 }; 1973 1974 $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy; 1975 1976})(window.Zepto || window.jQuery, window, document); 1977 1978/** 1979 * AutoHeight Plugin 1980 * @version 2.1.0 1981 * @author Bartosz Wojciechowski 1982 * @author David Deutsch 1983 * @license The MIT License (MIT) 1984 */ 1985;(function($, window, document, undefined) { 1986 1987 /** 1988 * Creates the auto height plugin. 1989 * @class The Auto Height Plugin 1990 * @param {Owl} carousel - The Owl Carousel 1991 */ 1992 var AutoHeight = function(carousel) { 1993 /** 1994 * Reference to the core. 1995 * @protected 1996 * @type {Owl} 1997 */ 1998 this._core = carousel; 1999 2000 /** 2001 * All event handlers. 2002 * @protected 2003 * @type {Object} 2004 */ 2005 this._handlers = { 2006 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) { 2007 if (e.namespace && this._core.settings.autoHeight) { 2008 this.update(); 2009 } 2010 }, this), 2011 'changed.owl.carousel': $.proxy(function(e) { 2012 if (e.namespace && this._core.settings.autoHeight && e.property.name == 'position'){ 2013 this.update(); 2014 } 2015 }, this), 2016 'loaded.owl.lazy': $.proxy(function(e) { 2017 if (e.namespace && this._core.settings.autoHeight 2018 && e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) { 2019 this.update(); 2020 } 2021 }, this) 2022 }; 2023 2024 // set default options 2025 this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options); 2026 2027 // register event handlers 2028 this._core.$element.on(this._handlers); 2029 }; 2030 2031 /** 2032 * Default options. 2033 * @public 2034 */ 2035 AutoHeight.Defaults = { 2036 autoHeight: false, 2037 autoHeightClass: 'owl-height' 2038 }; 2039 2040 /** 2041 * Updates the view. 2042 */ 2043 AutoHeight.prototype.update = function() { 2044 var start = this._core._current, 2045 end = start + this._core.settings.items, 2046 visible = this._core.$stage.children().toArray().slice(start, end), 2047 heights = [], 2048 maxheight = 0; 2049 2050 $.each(visible, function(index, item) { 2051 heights.push($(item).height()); 2052 }); 2053 2054 maxheight = Math.max.apply(null, heights); 2055 2056 this._core.$stage.parent() 2057 .height(maxheight) 2058 .addClass(this._core.settings.autoHeightClass); 2059 }; 2060 2061 AutoHeight.prototype.destroy = function() { 2062 var handler, property; 2063 2064 for (handler in this._handlers) { 2065 this._core.$element.off(handler, this._handlers[handler]); 2066 } 2067 for (property in Object.getOwnPropertyNames(this)) { 2068 typeof this[property] != 'function' && (this[property] = null); 2069 } 2070 }; 2071 2072 $.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight; 2073 2074})(window.Zepto || window.jQuery, window, document); 2075 2076/** 2077 * Video Plugin 2078 * @version 2.1.0 2079 * @author Bartosz Wojciechowski 2080 * @author David Deutsch 2081 * @license The MIT License (MIT) 2082 */ 2083;(function($, window, document, undefined) { 2084 2085 /** 2086 * Creates the video plugin. 2087 * @class The Video Plugin 2088 * @param {Owl} carousel - The Owl Carousel 2089 */ 2090 var Video = function(carousel) { 2091 /** 2092 * Reference to the core. 2093 * @protected 2094 * @type {Owl} 2095 */ 2096 this._core = carousel; 2097 2098 /** 2099 * Cache all video URLs. 2100 * @protected 2101 * @type {Object} 2102 */ 2103 this._videos = {}; 2104 2105 /** 2106 * Current playing item. 2107 * @protected 2108 * @type {jQuery} 2109 */ 2110 this._playing = null; 2111 2112 /** 2113 * All event handlers. 2114 * @todo The cloned content removale is too late 2115 * @protected 2116 * @type {Object} 2117 */ 2118 this._handlers = { 2119 'initialized.owl.carousel': $.proxy(function(e) { 2120 if (e.namespace) { 2121 this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] }); 2122 } 2123 }, this), 2124 'resize.owl.carousel': $.proxy(function(e) { 2125 if (e.namespace && this._core.settings.video && this.isInFullScreen()) { 2126 e.preventDefault(); 2127 } 2128 }, this), 2129 'refreshed.owl.carousel': $.proxy(function(e) { 2130 if (e.namespace && this._core.is('resizing')) { 2131 this._core.$stage.find('.cloned .owl-video-frame').remove(); 2132 } 2133 }, this), 2134 'changed.owl.carousel': $.proxy(function(e) { 2135 if (e.namespace && e.property.name === 'position' && this._playing) { 2136 this.stop(); 2137 } 2138 }, this), 2139 'prepared.owl.carousel': $.proxy(function(e) { 2140 if (!e.namespace) { 2141 return; 2142 } 2143 2144 var $element = $(e.content).find('.owl-video'); 2145 2146 if ($element.length) { 2147 $element.css('display', 'none'); 2148 this.fetch($element, $(e.content)); 2149 } 2150 }, this) 2151 }; 2152 2153 // set default options 2154 this._core.options = $.extend({}, Video.Defaults, this._core.options); 2155 2156 // register event handlers 2157 this._core.$element.on(this._handlers); 2158 2159 this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) { 2160 this.play(e); 2161 }, this)); 2162 }; 2163 2164 /** 2165 * Default options. 2166 * @public 2167 */ 2168 Video.Defaults = { 2169 video: false, 2170 videoHeight: false, 2171 videoWidth: false 2172 }; 2173 2174 /** 2175 * Gets the video ID and the type (YouTube/Vimeo/vzaar only). 2176 * @protected 2177 * @param {jQuery} target - The target containing the video data. 2178 * @param {jQuery} item - The item containing the video. 2179 */ 2180 Video.prototype.fetch = function(target, item) { 2181 var type = (function() { 2182 if (target.attr('data-vimeo-id')) { 2183 return 'vimeo'; 2184 } else if (target.attr('data-vzaar-id')) { 2185 return 'vzaar' 2186 } else { 2187 return 'youtube'; 2188 } 2189 })(), 2190 id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'), 2191 width = target.attr('data-width') || this._core.settings.videoWidth, 2192 height = target.attr('data-height') || this._core.settings.videoHeight, 2193 url = target.attr('href'); 2194 2195 if (url) { 2196 2197 /* 2198 Parses the id's out of the following urls (and probably more): 2199 https://www.youtube.com/watch?v=:id 2200 https://youtu.be/:id 2201 https://vimeo.com/:id 2202 https://vimeo.com/channels/:channel/:id 2203 https://vimeo.com/groups/:group/videos/:id 2204 https://app.vzaar.com/videos/:id 2205 2206 Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F 2207 */ 2208 2209 id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); 2210 2211 if (id[3].indexOf('youtu') > -1) { 2212 type = 'youtube'; 2213 } else if (id[3].indexOf('vimeo') > -1) { 2214 type = 'vimeo'; 2215 } else if (id[3].indexOf('vzaar') > -1) { 2216 type = 'vzaar'; 2217 } else { 2218 throw new Error('Video URL not supported.'); 2219 } 2220 id = id[6]; 2221 } else { 2222 throw new Error('Missing video URL.'); 2223 } 2224 2225 this._videos[url] = { 2226 type: type, 2227 id: id, 2228 width: width, 2229 height: height 2230 }; 2231 2232 item.attr('data-video', url); 2233 2234 this.thumbnail(target, this._videos[url]); 2235 }; 2236 2237 /** 2238 * Creates video thumbnail. 2239 * @protected 2240 * @param {jQuery} target - The target containing the video data. 2241 * @param {Object} info - The video info object. 2242 * @see `fetch` 2243 */ 2244 Video.prototype.thumbnail = function(target, video) { 2245 var tnLink, 2246 icon, 2247 path, 2248 dimensions = video.width && video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"' : '', 2249 customTn = target.find('img'), 2250 srcType = 'src', 2251 lazyClass = '', 2252 settings = this._core.settings, 2253 create = function(path) { 2254 icon = '<div class="owl-video-play-icon"></div>'; 2255 2256 if (settings.lazyLoad) { 2257 tnLink = '<div class="owl-video-tn ' + lazyClass + '" ' + srcType + '="' + path + '"></div>'; 2258 } else { 2259 tnLink = '<div class="owl-video-tn" style="opacity:1;background-image:url(' + path + ')"></div>'; 2260 } 2261 target.after(tnLink); 2262 target.after(icon); 2263 }; 2264 2265 // wrap video content into owl-video-wrapper div 2266 target.wrap('<div class="owl-video-wrapper"' + dimensions + '></div>'); 2267 2268 if (this._core.settings.lazyLoad) { 2269 srcType = 'data-src'; 2270 lazyClass = 'owl-lazy'; 2271 } 2272 2273 // custom thumbnail 2274 if (customTn.length) { 2275 create(customTn.attr(srcType)); 2276 customTn.remove(); 2277 return false; 2278 } 2279 2280 if (video.type === 'youtube') { 2281 path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; 2282 create(path); 2283 } else if (video.type === 'vimeo') { 2284 $.ajax({ 2285 type: 'GET', 2286 url: '//vimeo.com/api/v2/video/' + video.id + '.json', 2287 jsonp: 'callback', 2288 dataType: 'jsonp', 2289 success: function(data) { 2290 path = data[0].thumbnail_large; 2291 create(path); 2292 } 2293 }); 2294 } else if (video.type === 'vzaar') { 2295 $.ajax({ 2296 type: 'GET', 2297 url: '//vzaar.com/api/videos/' + video.id + '.json', 2298 jsonp: 'callback', 2299 dataType: 'jsonp', 2300 success: function(data) { 2301 path = data.framegrab_url; 2302 create(path); 2303 } 2304 }); 2305 } 2306 }; 2307 2308 /** 2309 * Stops the current video. 2310 * @public 2311 */ 2312 Video.prototype.stop = function() { 2313 this._core.trigger('stop', null, 'video'); 2314 this._playing.find('.owl-video-frame').remove(); 2315 this._playing.removeClass('owl-video-playing'); 2316 this._playing = null; 2317 this._core.leave('playing'); 2318 this._core.trigger('stopped', null, 'video'); 2319 }; 2320 2321 /** 2322 * Starts the current video. 2323 * @public 2324 * @param {Event} event - The event arguments. 2325 */ 2326 Video.prototype.play = function(event) { 2327 var target = $(event.target), 2328 item = target.closest('.' + this._core.settings.itemClass), 2329 video = this._videos[item.attr('data-video')], 2330 width = video.width || '100%', 2331 height = video.height || this._core.$stage.height(), 2332 html; 2333 2334 if (this._playing) { 2335 return; 2336 } 2337 2338 this._core.enter('playing'); 2339 this._core.trigger('play', null, 'video'); 2340 2341 item = this._core.items(this._core.relative(item.index())); 2342 2343 this._core.reset(item.index()); 2344 2345 if (video.type === 'youtube') { 2346 html = '<iframe width="' + width + '" height="' + height + '" src="//www.youtube.com/embed/' + 2347 video.id + '?autoplay=1&rel=0&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>'; 2348 } else if (video.type === 'vimeo') { 2349 html = '<iframe src="//player.vimeo.com/video/' + video.id + 2350 '?autoplay=1" width="' + width + '" height="' + height + 2351 '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; 2352 } else if (video.type === 'vzaar') { 2353 html = '<iframe frameborder="0"' + 'height="' + height + '"' + 'width="' + width + 2354 '" allowfullscreen mozallowfullscreen webkitAllowFullScreen ' + 2355 'src="//view.vzaar.com/' + video.id + '/player?autoplay=true"></iframe>'; 2356 } 2357 2358 $('<div class="owl-video-frame">' + html + '</div>').insertAfter(item.find('.owl-video')); 2359 2360 this._playing = item.addClass('owl-video-playing'); 2361 }; 2362 2363 /** 2364 * Checks whether an video is currently in full screen mode or not. 2365 * @todo Bad style because looks like a readonly method but changes members. 2366 * @protected 2367 * @returns {Boolean} 2368 */ 2369 Video.prototype.isInFullScreen = function() { 2370 var element = document.fullscreenElement || document.mozFullScreenElement || 2371 document.webkitFullscreenElement; 2372 2373 return element && $(element).parent().hasClass('owl-video-frame'); 2374 }; 2375 2376 /** 2377 * Destroys the plugin. 2378 */ 2379 Video.prototype.destroy = function() { 2380 var handler, property; 2381 2382 this._core.$element.off('click.owl.video'); 2383 2384 for (handler in this._handlers) { 2385 this._core.$element.off(handler, this._handlers[handler]); 2386 } 2387 for (property in Object.getOwnPropertyNames(this)) { 2388 typeof this[property] != 'function' && (this[property] = null); 2389 } 2390 }; 2391 2392 $.fn.owlCarousel.Constructor.Plugins.Video = Video; 2393 2394})(window.Zepto || window.jQuery, window, document); 2395 2396/** 2397 * Animate Plugin 2398 * @version 2.1.0 2399 * @author Bartosz Wojciechowski 2400 * @author David Deutsch 2401 * @license The MIT License (MIT) 2402 */ 2403;(function($, window, document, undefined) { 2404 2405 /** 2406 * Creates the animate plugin. 2407 * @class The Navigation Plugin 2408 * @param {Owl} scope - The Owl Carousel 2409 */ 2410 var Animate = function(scope) { 2411 this.core = scope; 2412 this.core.options = $.extend({}, Animate.Defaults, this.core.options); 2413 this.swapping = true; 2414 this.previous = undefined; 2415 this.next = undefined; 2416 2417 this.handlers = { 2418 'change.owl.carousel': $.proxy(function(e) { 2419 if (e.namespace && e.property.name == 'position') { 2420 this.previous = this.core.current(); 2421 this.next = e.property.value; 2422 } 2423 }, this), 2424 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) { 2425 if (e.namespace) { 2426 this.swapping = e.type == 'translated'; 2427 } 2428 }, this), 2429 'translate.owl.carousel': $.proxy(function(e) { 2430 if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) { 2431 this.swap(); 2432 } 2433 }, this) 2434 }; 2435 2436 this.core.$element.on(this.handlers); 2437 }; 2438 2439 /** 2440 * Default options. 2441 * @public 2442 */ 2443 Animate.Defaults = { 2444 animateOut: false, 2445 animateIn: false 2446 }; 2447 2448 /** 2449 * Toggles the animation classes whenever an translations starts. 2450 * @protected 2451 * @returns {Boolean|undefined} 2452 */ 2453 Animate.prototype.swap = function() { 2454 2455 if (this.core.settings.items !== 1) { 2456 return; 2457 } 2458 2459 if (!$.support.animation || !$.support.transition) { 2460 return; 2461 } 2462 2463 this.core.speed(0); 2464 2465 var left, 2466 clear = $.proxy(this.clear, this), 2467 previous = this.core.$stage.children().eq(this.previous), 2468 next = this.core.$stage.children().eq(this.next), 2469 incoming = this.core.settings.animateIn, 2470 outgoing = this.core.settings.animateOut; 2471 2472 if (this.core.current() === this.previous) { 2473 return; 2474 } 2475 2476 if (outgoing) { 2477 left = this.core.coordinates(this.previous) - this.core.coordinates(this.next); 2478 previous.one($.support.animation.end, clear) 2479 .css( { 'left': left + 'px' } ) 2480 .addClass('animated owl-animated-out') 2481 .addClass(outgoing); 2482 } 2483 2484 if (incoming) { 2485 next.one($.support.animation.end, clear) 2486 .addClass('animated owl-animated-in') 2487 .addClass(incoming); 2488 } 2489 }; 2490 2491 Animate.prototype.clear = function(e) { 2492 $(e.target).css( { 'left': '' } ) 2493 .removeClass('animated owl-animated-out owl-animated-in') 2494 .removeClass(this.core.settings.animateIn) 2495 .removeClass(this.core.settings.animateOut); 2496 this.core.onTransitionEnd(); 2497 }; 2498 2499 /** 2500 * Destroys the plugin. 2501 * @public 2502 */ 2503 Animate.prototype.destroy = function() { 2504 var handler, property; 2505 2506 for (handler in this.handlers) { 2507 this.core.$element.off(handler, this.handlers[handler]); 2508 } 2509 for (property in Object.getOwnPropertyNames(this)) { 2510 typeof this[property] != 'function' && (this[property] = null); 2511 } 2512 }; 2513 2514 $.fn.owlCarousel.Constructor.Plugins.Animate = Animate; 2515 2516})(window.Zepto || window.jQuery, window, document); 2517 2518/** 2519 * Autoplay Plugin 2520 * @version 2.1.0 2521 * @author Bartosz Wojciechowski 2522 * @author Artus Kolanowski 2523 * @author David Deutsch 2524 * @license The MIT License (MIT) 2525 */ 2526;(function($, window, document, undefined) { 2527 2528 /** 2529 * Creates the autoplay plugin. 2530 * @class The Autoplay Plugin 2531 * @param {Owl} scope - The Owl Carousel 2532 */ 2533 var Autoplay = function(carousel) { 2534 /** 2535 * Reference to the core. 2536 * @protected 2537 * @type {Owl} 2538 */ 2539 this._core = carousel; 2540 2541 /** 2542 * The autoplay timeout. 2543 * @type {Timeout} 2544 */ 2545 this._timeout = null; 2546 2547 /** 2548 * Indicates whenever the autoplay is paused. 2549 * @type {Boolean} 2550 */ 2551 this._paused = false; 2552 2553 /** 2554 * All event handlers. 2555 * @protected 2556 * @type {Object} 2557 */ 2558 this._handlers = { 2559 'changed.owl.carousel': $.proxy(function(e) { 2560 if (e.namespace && e.property.name === 'settings') { 2561 if (this._core.settings.autoplay) { 2562 this.play(); 2563 } else { 2564 this.stop(); 2565 } 2566 } else if (e.namespace && e.property.name === 'position') { 2567 //console.log('play?', e); 2568 if (this._core.settings.autoplay) { 2569 this._setAutoPlayInterval(); 2570 } 2571 } 2572 }, this), 2573 'initialized.owl.carousel': $.proxy(function(e) { 2574 if (e.namespace && this._core.settings.autoplay) { 2575 this.play(); 2576 } 2577 }, this), 2578 'play.owl.autoplay': $.proxy(function(e, t, s) { 2579 if (e.namespace) { 2580 this.play(t, s); 2581 } 2582 }, this), 2583 'stop.owl.autoplay': $.proxy(function(e) { 2584 if (e.namespace) { 2585 this.stop(); 2586 } 2587 }, this), 2588 'mouseover.owl.autoplay': $.proxy(function() { 2589 if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { 2590 this.pause(); 2591 } 2592 }, this), 2593 'mouseleave.owl.autoplay': $.proxy(function() { 2594 if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { 2595 this.play(); 2596 } 2597 }, this), 2598 'touchstart.owl.core': $.proxy(function() { 2599 if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { 2600 this.pause(); 2601 } 2602 }, this), 2603 'touchend.owl.core': $.proxy(function() { 2604 if (this._core.settings.autoplayHoverPause) { 2605 this.play(); 2606 } 2607 }, this) 2608 }; 2609 2610 // register event handlers 2611 this._core.$element.on(this._handlers); 2612 2613 // set default options 2614 this._core.options = $.extend({}, Autoplay.Defaults, this._core.options); 2615 }; 2616 2617 /** 2618 * Default options. 2619 * @public 2620 */ 2621 Autoplay.Defaults = { 2622 autoplay: false, 2623 autoplayTimeout: 5000, 2624 autoplayHoverPause: false, 2625 autoplaySpeed: false 2626 }; 2627 2628 /** 2629 * Starts the autoplay. 2630 * @public 2631 * @param {Number} [timeout] - The interval before the next animation starts. 2632 * @param {Number} [speed] - The animation speed for the animations. 2633 */ 2634 Autoplay.prototype.play = function(timeout, speed) { 2635 this._paused = false; 2636 2637 if (this._core.is('rotating')) { 2638 return; 2639 } 2640 2641 this._core.enter('rotating'); 2642 2643 this._setAutoPlayInterval(); 2644 }; 2645 2646 /** 2647 * Gets a new timeout 2648 * @private 2649 * @param {Number} [timeout] - The interval before the next animation starts. 2650 * @param {Number} [speed] - The animation speed for the animations. 2651 * @return {Timeout} 2652 */ 2653 Autoplay.prototype._getNextTimeout = function(timeout, speed) { 2654 if ( this._timeout ) { 2655 window.clearTimeout(this._timeout); 2656 } 2657 return window.setTimeout($.proxy(function() { 2658 if (this._paused || this._core.is('busy') || this._core.is('interacting') || document.hidden) { 2659 this._setAutoPlayInterval(); 2660 return; 2661 } 2662 this._core.next(speed || this._core.settings.autoplaySpeed); 2663 }, this), timeout || this._core.settings.autoplayTimeout); 2664 }; 2665 2666 /** 2667 * Sets autoplay in motion. 2668 * @private 2669 */ 2670 Autoplay.prototype._setAutoPlayInterval = function() { 2671 this._timeout = this._getNextTimeout(); 2672 }; 2673 2674 /** 2675 * Stops the autoplay. 2676 * @public 2677 */ 2678 Autoplay.prototype.stop = function() { 2679 if (!this._core.is('rotating')) { 2680 return; 2681 } 2682 2683 window.clearTimeout(this._timeout); 2684 this._core.leave('rotating'); 2685 }; 2686 2687 /** 2688 * Stops the autoplay. 2689 * @public 2690 */ 2691 Autoplay.prototype.pause = function() { 2692 if (!this._core.is('rotating')) { 2693 return; 2694 } 2695 2696 this._paused = true; 2697 }; 2698 2699 /** 2700 * Destroys the plugin. 2701 */ 2702 Autoplay.prototype.destroy = function() { 2703 var handler, property; 2704 2705 this.stop(); 2706 2707 for (handler in this._handlers) { 2708 this._core.$element.off(handler, this._handlers[handler]); 2709 } 2710 for (property in Object.getOwnPropertyNames(this)) { 2711 typeof this[property] != 'function' && (this[property] = null); 2712 } 2713 }; 2714 2715 $.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay; 2716 2717})(window.Zepto || window.jQuery, window, document); 2718 2719/** 2720 * Navigation Plugin 2721 * @version 2.1.0 2722 * @author Artus Kolanowski 2723 * @author David Deutsch 2724 * @license The MIT License (MIT) 2725 */ 2726;(function($, window, document, undefined) { 2727 'use strict'; 2728 2729 /** 2730 * Creates the navigation plugin. 2731 * @class The Navigation Plugin 2732 * @param {Owl} carousel - The Owl Carousel. 2733 */ 2734 var Navigation = function(carousel) { 2735 /** 2736 * Reference to the core. 2737 * @protected 2738 * @type {Owl} 2739 */ 2740 this._core = carousel; 2741 2742 /** 2743 * Indicates whether the plugin is initialized or not. 2744 * @protected 2745 * @type {Boolean} 2746 */ 2747 this._initialized = false; 2748 2749 /** 2750 * The current paging indexes. 2751 * @protected 2752 * @type {Array} 2753 */ 2754 this._pages = []; 2755 2756 /** 2757 * All DOM elements of the user interface. 2758 * @protected 2759 * @type {Object} 2760 */ 2761 this._controls = {}; 2762 2763 /** 2764 * Markup for an indicator. 2765 * @protected 2766 * @type {Array.<String>} 2767 */ 2768 this._templates = []; 2769 2770 /** 2771 * The carousel element. 2772 * @type {jQuery} 2773 */ 2774 this.$element = this._core.$element; 2775 2776 /** 2777 * Overridden methods of the carousel. 2778 * @protected 2779 * @type {Object} 2780 */ 2781 this._overrides = { 2782 next: this._core.next, 2783 prev: this._core.prev, 2784 to: this._core.to 2785 }; 2786 2787 /** 2788 * All event handlers. 2789 * @protected 2790 * @type {Object} 2791 */ 2792 this._handlers = { 2793 'prepared.owl.carousel': $.proxy(function(e) { 2794 if (e.namespace && this._core.settings.dotsData) { 2795 this._templates.push('<div class="' + this._core.settings.dotClass + '">' + 2796 $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '</div>'); 2797 } 2798 }, this), 2799 'added.owl.carousel': $.proxy(function(e) { 2800 if (e.namespace && this._core.settings.dotsData) { 2801 this._templates.splice(e.position, 0, this._templates.pop()); 2802 } 2803 }, this), 2804 'remove.owl.carousel': $.proxy(function(e) { 2805 if (e.namespace && this._core.settings.dotsData) { 2806 this._templates.splice(e.position, 1); 2807 } 2808 }, this), 2809 'changed.owl.carousel': $.proxy(function(e) { 2810 if (e.namespace && e.property.name == 'position') { 2811 this.draw(); 2812 } 2813 }, this), 2814 'initialized.owl.carousel': $.proxy(function(e) { 2815 if (e.namespace && !this._initialized) { 2816 this._core.trigger('initialize', null, 'navigation'); 2817 this.initialize(); 2818 this.update(); 2819 this.draw(); 2820 this._initialized = true; 2821 this._core.trigger('initialized', null, 'navigation'); 2822 } 2823 }, this), 2824 'refreshed.owl.carousel': $.proxy(function(e) { 2825 if (e.namespace && this._initialized) { 2826 this._core.trigger('refresh', null, 'navigation'); 2827 this.update(); 2828 this.draw(); 2829 this._core.trigger('refreshed', null, 'navigation'); 2830 } 2831 }, this) 2832 }; 2833 2834 // set default options 2835 this._core.options = $.extend({}, Navigation.Defaults, this._core.options); 2836 2837 // register event handlers 2838 this.$element.on(this._handlers); 2839 }; 2840 2841 /** 2842 * Default options. 2843 * @public 2844 * @todo Rename `slideBy` to `navBy` 2845 */ 2846 Navigation.Defaults = { 2847 nav: false, 2848 navText: [ 'prev', 'next' ], 2849 navSpeed: false, 2850 navElement: 'div', 2851 navContainer: false, 2852 navContainerClass: 'owl-nav', 2853 navClass: [ 'owl-prev', 'owl-next' ], 2854 slideBy: 1, 2855 dotClass: 'owl-dot', 2856 dotsClass: 'owl-dots', 2857 dots: true, 2858 dotsEach: false, 2859 dotsData: false, 2860 dotsSpeed: false, 2861 dotsContainer: false 2862 }; 2863 2864 /** 2865 * Initializes the layout of the plugin and extends the carousel. 2866 * @protected 2867 */ 2868 Navigation.prototype.initialize = function() { 2869 var override, 2870 settings = this._core.settings; 2871 2872 // create DOM structure for relative navigation 2873 this._controls.$relative = (settings.navContainer ? $(settings.navContainer) 2874 : $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); 2875 2876 this._controls.$previous = $('<' + settings.navElement + '>') 2877 .addClass(settings.navClass[0]) 2878 .html(settings.navText[0]) 2879 .prependTo(this._controls.$relative) 2880 .on('click', $.proxy(function(e) { 2881 this.prev(settings.navSpeed); 2882 }, this)); 2883 this._controls.$next = $('<' + settings.navElement + '>') 2884 .addClass(settings.navClass[1]) 2885 .html(settings.navText[1]) 2886 .appendTo(this._controls.$relative) 2887 .on('click', $.proxy(function(e) { 2888 this.next(settings.navSpeed); 2889 }, this)); 2890 2891 // create DOM structure for absolute navigation 2892 if (!settings.dotsData) { 2893 this._templates = [ $('<div>') 2894 .addClass(settings.dotClass) 2895 .append($('<span>')) 2896 .prop('outerHTML') ]; 2897 } 2898 2899 this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer) 2900 : $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled'); 2901 2902 this._controls.$absolute.on('click', 'div', $.proxy(function(e) { 2903 var index = $(e.target).parent().is(this._controls.$absolute) 2904 ? $(e.target).index() : $(e.target).parent().index(); 2905 2906 e.preventDefault(); 2907 2908 this.to(index, settings.dotsSpeed); 2909 }, this)); 2910 2911 // override public methods of the carousel 2912 for (override in this._overrides) { 2913 this._core[override] = $.proxy(this[override], this); 2914 } 2915 }; 2916 2917 /** 2918 * Destroys the plugin. 2919 * @protected 2920 */ 2921 Navigation.prototype.destroy = function() { 2922 var handler, control, property, override; 2923 2924 for (handler in this._handlers) { 2925 this.$element.off(handler, this._handlers[handler]); 2926 } 2927 for (control in this._controls) { 2928 this._controls[control].remove(); 2929 } 2930 for (override in this.overides) { 2931 this._core[override] = this._overrides[override]; 2932 } 2933 for (property in Object.getOwnPropertyNames(this)) { 2934 typeof this[property] != 'function' && (this[property] = null); 2935 } 2936 }; 2937 2938 /** 2939 * Updates the internal state. 2940 * @protected 2941 */ 2942 Navigation.prototype.update = function() { 2943 var i, j, k, 2944 lower = this._core.clones().length / 2, 2945 upper = lower + this._core.items().length, 2946 maximum = this._core.maximum(true), 2947 settings = this._core.settings, 2948 size = settings.center || settings.autoWidth || settings.dotsData 2949 ? 1 : settings.dotsEach || settings.items; 2950 2951 if (settings.slideBy !== 'page') { 2952 settings.slideBy = Math.min(settings.slideBy, settings.items); 2953 } 2954 2955 if (settings.dots || settings.slideBy == 'page') { 2956 this._pages = []; 2957 2958 for (i = lower, j = 0, k = 0; i < upper; i++) { 2959 if (j >= size || j === 0) { 2960 this._pages.push({ 2961 start: Math.min(maximum, i - lower), 2962 end: i - lower + size - 1 2963 }); 2964 if (Math.min(maximum, i - lower) === maximum) { 2965 break; 2966 } 2967 j = 0, ++k; 2968 } 2969 j += this._core.mergers(this._core.relative(i)); 2970 } 2971 } 2972 }; 2973 2974 /** 2975 * Draws the user interface. 2976 * @todo The option `dotsData` wont work. 2977 * @protected 2978 */ 2979 Navigation.prototype.draw = function() { 2980 var difference, 2981 settings = this._core.settings, 2982 disabled = this._core.items().length <= settings.items, 2983 index = this._core.relative(this._core.current()), 2984 loop = settings.loop || settings.rewind; 2985 2986 this._controls.$relative.toggleClass('disabled', !settings.nav || disabled); 2987 2988 if (settings.nav) { 2989 this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true)); 2990 this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true)); 2991 } 2992 2993 this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled); 2994 2995 if (settings.dots) { 2996 difference = this._pages.length - this._controls.$absolute.children().length; 2997 2998 if (settings.dotsData && difference !== 0) { 2999 this._controls.$absolute.html(this._templates.join('')); 3000 } else if (difference > 0) { 3001 this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0])); 3002 } else if (difference < 0) { 3003 this._controls.$absolute.children().slice(difference).remove(); 3004 } 3005 3006 this._controls.$absolute.find('.active').removeClass('active'); 3007 this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active'); 3008 } 3009 }; 3010 3011 /** 3012 * Extends event data. 3013 * @protected 3014 * @param {Event} event - The event object which gets thrown. 3015 */ 3016 Navigation.prototype.onTrigger = function(event) { 3017 var settings = this._core.settings; 3018 3019 event.page = { 3020 index: $.inArray(this.current(), this._pages), 3021 count: this._pages.length,
vendor: 7,458 bytes, lines 3022-3303
3022 size: settings && (settings.center || settings.autoWidth || settings.dotsData 3023 ? 1 : settings.dotsEach || settings.items) 3024 }; 3025 }; 3026 3027 /** 3028 * Gets the current page position of the carousel. 3029 * @protected 3030 * @returns {Number} 3031 */ 3032 Navigation.prototype.current = function() { 3033 var current = this._core.relative(this._core.current()); 3034 return $.grep(this._pages, $.proxy(function(page, index) { 3035 return page.start <= current && page.end >= current; 3036 }, this)).pop(); 3037 }; 3038 3039 /** 3040 * Gets the current succesor/predecessor position. 3041 * @protected 3042 * @returns {Number} 3043 */ 3044 Navigation.prototype.getPosition = function(successor) { 3045 var position, length, 3046 settings = this._core.settings; 3047 3048 if (settings.slideBy == 'page') { 3049 position = $.inArray(this.current(), this._pages); 3050 length = this._pages.length; 3051 successor ? ++position : --position; 3052 position = this._pages[((position % length) + length) % length].start; 3053 } else { 3054 position = this._core.relative(this._core.current()); 3055 length = this._core.items().length; 3056 successor ? position += settings.slideBy : position -= settings.slideBy; 3057 } 3058 3059 return position; 3060 }; 3061 3062 /** 3063 * Slides to the next item or page. 3064 * @public 3065 * @param {Number} [speed=false] - The time in milliseconds for the transition. 3066 */ 3067 Navigation.prototype.next = function(speed) { 3068 $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed); 3069 }; 3070 3071 /** 3072 * Slides to the previous item or page. 3073 * @public 3074 * @param {Number} [speed=false] - The time in milliseconds for the transition. 3075 */ 3076 Navigation.prototype.prev = function(speed) { 3077 $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed); 3078 }; 3079 3080 /** 3081 * Slides to the specified item or page. 3082 * @public 3083 * @param {Number} position - The position of the item or page. 3084 * @param {Number} [speed] - The time in milliseconds for the transition. 3085 * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not. 3086 */ 3087 Navigation.prototype.to = function(position, speed, standard) { 3088 var length; 3089 3090 if (!standard && this._pages.length) { 3091 length = this._pages.length; 3092 $.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed); 3093 } else { 3094 $.proxy(this._overrides.to, this._core)(position, speed); 3095 } 3096 }; 3097 3098 $.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation; 3099 3100})(window.Zepto || window.jQuery, window, document); 3101 3102/** 3103 * Hash Plugin 3104 * @version 2.1.0 3105 * @author Artus Kolanowski 3106 * @author David Deutsch 3107 * @license The MIT License (MIT) 3108 */ 3109;(function($, window, document, undefined) { 3110 'use strict'; 3111 3112 /** 3113 * Creates the hash plugin. 3114 * @class The Hash Plugin 3115 * @param {Owl} carousel - The Owl Carousel 3116 */ 3117 var Hash = function(carousel) { 3118 /** 3119 * Reference to the core. 3120 * @protected 3121 * @type {Owl} 3122 */ 3123 this._core = carousel; 3124 3125 /** 3126 * Hash index for the items. 3127 * @protected 3128 * @type {Object} 3129 */ 3130 this._hashes = {}; 3131 3132 /** 3133 * The carousel element. 3134 * @type {jQuery} 3135 */ 3136 this.$element = this._core.$element; 3137 3138 /** 3139 * All event handlers. 3140 * @protected 3141 * @type {Object} 3142 */ 3143 this._handlers = { 3144 'initialized.owl.carousel': $.proxy(function(e) { 3145 if (e.namespace && this._core.settings.startPosition === 'URLHash') { 3146 $(window).trigger('hashchange.owl.navigation'); 3147 } 3148 }, this), 3149 'prepared.owl.carousel': $.proxy(function(e) { 3150 if (e.namespace) { 3151 var hash = $(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash'); 3152 3153 if (!hash) { 3154 return; 3155 } 3156 3157 this._hashes[hash] = e.content; 3158 } 3159 }, this), 3160 'changed.owl.carousel': $.proxy(function(e) { 3161 if (e.namespace && e.property.name === 'position') { 3162 var current = this._core.items(this._core.relative(this._core.current())), 3163 hash = $.map(this._hashes, function(item, hash) { 3164 return item === current ? hash : null; 3165 }).join(); 3166 3167 if (!hash || window.location.hash.slice(1) === hash) { 3168 return; 3169 } 3170 3171 window.location.hash = hash; 3172 } 3173 }, this) 3174 }; 3175 3176 // set default options 3177 this._core.options = $.extend({}, Hash.Defaults, this._core.options); 3178 3179 // register the event handlers 3180 this.$element.on(this._handlers); 3181 3182 // register event listener for hash navigation 3183 $(window).on('hashchange.owl.navigation', $.proxy(function(e) { 3184 var hash = window.location.hash.substring(1), 3185 items = this._core.$stage.children(), 3186 position = this._hashes[hash] && items.index(this._hashes[hash]); 3187 3188 if (position === undefined || position === this._core.current()) { 3189 return; 3190 } 3191 3192 this._core.to(this._core.relative(position), false, true); 3193 }, this)); 3194 }; 3195 3196 /** 3197 * Default options. 3198 * @public 3199 */ 3200 Hash.Defaults = { 3201 URLhashListener: false 3202 }; 3203 3204 /** 3205 * Destroys the plugin. 3206 * @public 3207 */ 3208 Hash.prototype.destroy = function() { 3209 var handler, property; 3210 3211 $(window).off('hashchange.owl.navigation'); 3212 3213 for (handler in this._handlers) { 3214 this._core.$element.off(handler, this._handlers[handler]); 3215 } 3216 for (property in Object.getOwnPropertyNames(this)) { 3217 typeof this[property] != 'function' && (this[property] = null); 3218 } 3219 }; 3220 3221 $.fn.owlCarousel.Constructor.Plugins.Hash = Hash; 3222 3223})(window.Zepto || window.jQuery, window, document); 3224 3225/** 3226 * Support Plugin 3227 * 3228 * @version 2.1.0 3229 * @author Vivid Planet Software GmbH 3230 * @author Artus Kolanowski 3231 * @author David Deutsch 3232 * @license The MIT License (MIT) 3233 */ 3234;(function($, window, document, undefined) { 3235 3236 var style = $('<support>').get(0).style, 3237 prefixes = 'Webkit Moz O ms'.split(' '), 3238 events = { 3239 transition: { 3240 end: { 3241 WebkitTransition: 'webkitTransitionEnd', 3242 MozTransition: 'transitionend', 3243 OTransition: 'oTransitionEnd', 3244 transition: 'transitionend' 3245 } 3246 }, 3247 animation: { 3248 end: { 3249 WebkitAnimation: 'webkitAnimationEnd', 3250 MozAnimation: 'animationend', 3251 OAnimation: 'oAnimationEnd', 3252 animation: 'animationend' 3253 } 3254 } 3255 }, 3256 tests = { 3257 csstransforms: function() { 3258 return !!test('transform'); 3259 }, 3260 csstransforms3d: function() { 3261 return !!test('perspective'); 3262 }, 3263 csstransitions: function() { 3264 return !!test('transition'); 3265 }, 3266 cssanimations: function() { 3267 return !!test('animation'); 3268 } 3269 }; 3270 3271 function test(property, prefixed) { 3272 var result = false, 3273 upper = property.charAt(0).toUpperCase() + property.slice(1); 3274 3275 $.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) { 3276 if (style[property] !== undefined) { 3277 result = prefixed ? property : true; 3278 return false; 3279 } 3280 }); 3281 3282 return result; 3283 } 3284 3285 function prefixed(property) { 3286 return test(property, true); 3287 } 3288 3289 if (tests.csstransitions()) { 3290 /* jshint -W053 */ 3291 $.support.transition = new String(prefixed('transition')) 3292 $.support.transition.end = events.transition.end[ $.support.transition ]; 3293 } 3294 3295 if (tests.cssanimations()) { 3296 /* jshint -W053 */ 3297 $.support.animation = new String(prefixed('animation')) 3298 $.support.animation.end = events.animation.end[ $.support.animation ]; 3299 } 3300 3301 if (tests.csstransforms()) { 3302 /* jshint -W053 */ 3303 $.support.transform = new String(prefixed('transform'));
3304 $.support.transform3d = tests.csstransforms3d(); 3305 } 3306 3307})(window.Zepto || window.jQuery, window, document); 3308 3309/* End */ 3310; 3311; /* Start:"a:4:{s:4:"full";s:90:"/bitrix/templates/gvozdevsoft_event_s1/lib/fancybox/jquery.fancybox.min.js?177808411068253";s:6:"source";s:74:"/bitrix/templates/gvozdevsoft_event_s1/lib/fancybox/jquery.fancybox.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
vendor: 68,253 bytes, lines 3312-3324
3312// ================================================== 3313// fancyBox v3.5.7 3314// 3315// Licensed GPLv3 for open source use 3316// or fancyBox Commercial License for commercial use 3317// 3318// http://fancyapps.com/fancybox/ 3319// Copyright 2019 fancyApps 3320// 3321// ================================================== 3322!function(t,e,n,o){"use strict";function i(t,e){var o,i,a,s=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger("blur"),(a=n.fancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(e.selector?s=n(e.selector):(i=o.attr("data-fancybox")||"",i?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox="'+i+'"]'):n('[data-fancybox="'+i+'"]')):s=[o]),r=n(s).index(o),r<0&&(r=0),a=n.fancybox.open(s,e,r),a.$trigger=o))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var a={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span> / <span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergrößern"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==n.style[t])return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},g=function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),i)},b=function(t,e,o){var i=this;i.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(i.opts=h(i.opts,e)),n.fancybox.isMobile&&(i.opts=h(i.opts,i.opts.mobile)),i.id=i.opts.id||++c,i.currIndex=parseInt(i.opts.index,10)||0,i.prevIndex=null,i.prevPos=null,i.currPos=0,i.firstRun=!0,i.group=[],i.slides={},i.addContent(t),i.group.length&&i.init()};n.extend(b.prototype,{init:function(){var o,i,a=this,s=a.group[a.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&&!1!==r.hideScrollbar&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+"px;}</style>"),n("body").addClass("compensate-for-scrollbar")),i="",n.each(r.buttons,function(t,e){i+=r.btnTpl[e]||""}),o=n(a.translate(a,r.baseTpl.replace("{{buttons}}",i).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+a.id).addClass(r.baseClass).data("FancyBox",a).appendTo(r.parentEl),a.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){a.$refs[t]=o.find(".fancybox-"+t)}),a.trigger("onInit"),a.activate(),a.jumpTo(a.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===n[e]?t:n[e]})},addContent:function(t){var e,o=this,i=n.makeArray(t);n.each(i,function(t,e){var i,a,s,r,c,l={},d={};n.isPlainObject(e)?(l=e,d=e.opts||e):"object"===n.type(e)&&n(e).length?(i=n(e),d=i.data()||{},d=n.extend(!0,{},d,d.options),d.$orig=i,l.src=o.opts.src||d.src||i.attr("href"),l.type||l.src||(l.type="inline",l.src=e)):l={type:"html",src:e+""},l.opts=n.extend(!0,{},o.opts,d),n.isArray(d.buttons)&&(l.opts.buttons=d.buttons),n.fancybox.isMobile&&l.opts.mobile&&(l.opts=h(l.opts,l.opts.mobile)),a=l.type||l.opts.type,r=l.src||"",!a&&r&&((s=r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(a="video",l.opts.video.format||(l.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?a="image":r.match(/\.(pdf)((\?|#).*)?$/i)?(a="iframe",l=n.extend(!0,l,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===r.charAt(0)&&(a="inline")),a?l.type=a:o.trigger("objectNeedsType",l),l.contentType||(l.contentType=n.inArray(l.type,["html","inline","ajax"])>-1?"html":l.type),l.index=o.group.length,"auto"==l.opts.smallBtn&&(l.opts.smallBtn=n.inArray(l.type,["html","inline","ajax"])>-1),"auto"===l.opts.toolbar&&(l.opts.toolbar=!l.opts.smallBtn),l.$thumb=l.opts.$thumb||null,l.opts.$trigger&&l.index===o.opts.index&&(l.$thumb=l.opts.$trigger.find("img:first"),l.$thumb.length&&(l.opts.$orig=l.opts.$trigger)),l.$thumb&&l.$thumb.length||!l.opts.$orig||(l.$thumb=l.opts.$orig.find("img:first")),l.$thumb&&!l.$thumb.length&&(l.$thumb=null),l.thumb=l.opts.thumb||(l.$thumb?l.$thumb[0].src:null),"function"===n.type(l.opts.caption)&&(l.opts.caption=l.opts.caption.apply(e,[o,l])),"function"===n.type(o.opts.caption)&&(l.opts.caption=o.opts.caption.apply(e,[o,l])),l.opts.caption instanceof n||(l.opts.caption=void 0===l.opts.caption?"":l.opts.caption+""),"ajax"===l.type&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(l)}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,i=o.current,a=t.keyCode||t.which;if(9==a)return void(i.opts.trapFocus&&e.focus(t));if(!(!i.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input,textarea,video,audio,select")))return 8===a||27===a?(t.preventDefault(),void e.close(t)):37===a||38===a?(t.preventDefault(),void e.previous()):39===a||40===a?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,a)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){++e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,i,a,s,r,c,l,d,u,f=this,h=f.group.length;if(!(f.isDragging||f.isClosing||f.isAnimating&&f.firstRun)){if(t=parseInt(t,10),!(a=f.current?f.current.opts.loop:f.opts.loop)&&(t<0||t>=h))return!1;if(o=f.firstRun=!Object.keys(f.slides).length,r=f.current,f.prevIndex=f.currIndex,f.prevPos=f.currPos,s=f.createSlide(t),h>1&&((a||s.index<h-1)&&f.createSlide(t+1),(a||s.index>0)&&f.createSlide(t-1)),f.current=s,f.currIndex=s.index,f.currPos=s.pos,f.trigger("beforeShow",o),f.updateControls(),s.forcedDuration=void 0,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=f.isMoved(s),s.$slide.addClass("fancybox-slide--current"),o)return s.opts.animationEffect&&e&&f.$refs.container.css("transition-duration",e+"ms"),f.$refs.container.addClass("fancybox-is-open").trigger("focus"),f.loadSlide(s),void f.preload("image");c=n.fancybox.getTranslate(r.$slide),l=n.fancybox.getTranslate(f.$refs.stage),n.each(f.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),r.pos!==s.pos&&(r.isComplete=!1),r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(u=c.left-(r.pos*c.width+r.pos*r.opts.gutter),n.each(f.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var i=o.pos*c.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:i-l.left+u}),o.pos!==s.pos&&o.$slide.addClass("fancybox-slide--"+(o.pos>s.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-s.pos)*c.width+(o.pos-s.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===f.currPos&&f.complete()})})):e&&s.opts.transitionEffect&&(d="fancybox-animated fancybox-fx-"+s.opts.transitionEffect,r.$slide.addClass("fancybox-slide--"+(r.pos>s.pos?"next":"previous")),n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),s.isLoaded?f.revealContent(s):f.loadSlide(s),f.preload("image")}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('<div class="fancybox-slide"></div>').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,o){var i,a,s,r,c,l=this,d=l.current,u=d.$content,f=n.fancybox.getTranslate(d.$slide).width,p=n.fancybox.getTranslate(d.$slide).height,h=d.width,g=d.height;l.isAnimating||l.isMoved()||!u||"image"!=d.type||!d.isLoaded||d.hasError||(l.isAnimating=!0,n.fancybox.stop(u),t=void 0===t?.5*f:t,e=void 0===e?.5*p:e,i=n.fancybox.getTranslate(u),i.top-=n.fancybox.getTranslate(d.$slide).top,i.left-=n.fancybox.getTranslate(d.$slide).left,r=h/i.width,c=g/i.height,a=.5*f-.5*h,s=.5*p-.5*g,h>f&&(a=i.left*r-(t*r-t),a>0&&(a=0),a<f-h&&(a=f-h)),g>p&&(s=i.top*c-(e*c-e),s>0&&(s=0),s<p-g&&(s=p-g)),l.updateCursor(h,g),n.fancybox.animate(u,{top:s,left:a,scaleX:r,scaleY:c},o||366,function(){l.isAnimating=!1}),l.SlideShow&&l.SlideShow.isActive&&l.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,a=i.$content;o.isAnimating||o.isMoved()||!a||"image"!=i.type||!i.isLoaded||i.hasError||(o.isAnimating=!0,n.fancybox.stop(a),e=o.getFitPos(i),o.updateCursor(e.width,e.height),n.fancybox.animate(a,{top:e.top,left:e.left,scaleX:e.width/a.width(),scaleY:e.height/a.height()},t||366,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,i,a,s=this,r=t.$content,c=t.$slide,l=t.width||t.opts.width,d=t.height||t.opts.height,u={};return!!(t.isLoaded&&r&&r.length)&&(e=n.fancybox.getTranslate(s.$refs.stage).width,o=n.fancybox.getTranslate(s.$refs.stage).height,e-=parseFloat(c.css("paddingLeft"))+parseFloat(c.css("paddingRight"))+parseFloat(r.css("marginLeft"))+parseFloat(r.css("marginRight")),o-=parseFloat(c.css("paddingTop"))+parseFloat(c.css("paddingBottom"))+parseFloat(r.css("marginTop"))+parseFloat(r.css("marginBottom")),l&&d||(l=e,d=o),i=Math.min(1,e/l,o/d),l*=i,d*=i,l>e-.5&&(l=e),d>o-.5&&(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&&(a=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/a?d=l/a:l>d*a&&(l=d*a)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),i&&(a||s||"video"===t.contentType)&&!t.hasError&&(n.fancybox.stop(i),n.fancybox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(i.$slide),!i.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,i,a=this,s=a.current,r=a.$refs.container;s&&!a.isClosing&&a.Guestures&&(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=a.canPan(t,e),i=!!o||a.isZoomable(),r.toggleClass("fancybox-is-zoomable",i),n("[data-fancybox-zoom]").prop("disabled",!i),o?r.addClass("fancybox-can-pan"):i&&("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||a.group.length>1)&&"video"!==s.contentType&&r.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if((t=e.getFitPos(n))&&(n.width>t.width||n.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=this,i=!1,a=o.current,s=a.$content;return void 0!==t&&void 0!==e?i=t<a.width&&e<a.height:s&&(i=n.fancybox.getTranslate(s),i=i.width<a.width&&i.height<a.height),i},canPan:function(t,e){var o=this,i=o.current,a=null,s=!1;return"image"===i.type&&(i.isComplete||t&&e)&&!i.hasError&&(s=o.getFitPos(i),void 0!==t&&void 0!==e?a={width:t,height:e}:i.isComplete&&(a=n.fancybox.getTranslate(i.$content)),a&&s&&(s=Math.abs(a.width-s.width)>1.5||Math.abs(a.height-s.height)>1.5)),s},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===a.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"video":a.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t)},50),i.checkSrcset(t),t.$content=n('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){i.afterLoad(t)},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),i.setBigImage(t)},checkSrcset:function(e){var n,o,i,a,s=e.opts.srcset||e.opts.image.srcset;if(s){i=t.devicePixelRatio||1,a=t.innerWidth*i,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);if(0===n)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1])}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r<o.length;r++){var c=o[r];if("w"===c.postfix&&c.value>=a||"x"===c.postfix&&c.value>=i){n=c;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,i=e.createElement("img"),a=n(i);t.$image=a.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&"auto"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),a.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(i.complete||"complete"==i.readyState)&&a.naturalWidth&&a.naturalHeight?a.trigger("load"):i.error&&a.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),i>0&&(t.width=Math.floor(i*e/n),t.height=i)},setIframe:function(t){var e,o=this,i=t.opts.iframe,a=t.$slide;t.$content=n('<div class="fancybox-content'+(i.preload?" fancybox-is-hidden":"")+'"></div>').css(i.css).appendTo(a),a.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)}),a.on("refresh.fb",function(){var n,o,s=t.$content,r=i.css.width,c=i.css.height;if(1===e[0].isReady){try{n=e.contents(),o=n.find("body")}catch(t){}o&&o.length&&o.children().length&&(a.css("overflow","visible"),s.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===r&&(r=Math.ceil(Math.max(o[0].clientWidth,o.outerWidth(!0)))),s.css("width",r||"").css("max-width",""),void 0===c&&(c=Math.ceil(Math.max(o[0].clientHeight,o.outerHeight(!0)))),s.css("height",c||""),a.css("overflow","auto")),s.removeClass("fancybox-is-hidden")}})):o.afterLoad(t),e.attr("src",t.src),a.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("<div>").append(n.trim(e)).contents()),t.opts.filter&&(e=n("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;(t=t||e.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e,n=this,o=t||n.current,i=o.opts.caption,a=o.opts.preventCaptionOverlap,s=n.$refs.caption,r=!1;s.toggleClass("fancybox-caption--separate",a),a&&i&&i.length&&(o.pos!==n.currPos?(e=s.clone().appendTo(s.parent()),e.children().eq(0).empty().html(i),r=e.outerHeight(!0),e.empty().remove()):n.$caption&&(r=n.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",r||""))},adjustLayout:function(t){var e,n,o,i,a=this,s=t||a.current;s.isLoaded&&!0!==s.opts.disableLayoutFix&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],i=s.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=i),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,o,i,a,s=this,r=t.$slide,c=!1,l=!1,d=s.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?"animationEffect":"transitionEffect"],i=t.opts[s.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!d&&t.pos===s.currPos&&i||(e=!1),"zoom"===e&&(t.pos===s.currPos&&i&&"image"===t.type&&!t.hasError&&(l=s.getThumbPos(t))?c=s.getFitPos(t):e="fade"),"zoom"===e?(s.isAnimating=!0,c.scaleX=c.width/l.width,c.scaleY=c.height/l.height,a=t.opts.zoomOpacity,"auto"==a&&(a=Math.abs(t.width/t.height-l.width/l.height)>.1),a&&(l.opacity=.1,c.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),l),p(t.$content),void n.fancybox.animate(t.$content,c,i,function(){s.isAnimating=!1,s.complete()})):(s.updateSlide(t),e?(n.fancybox.stop(r),o="fancybox-slide--"+(t.pos>=s.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,r.addClass(o).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(r),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(r,"fancybox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===s.currPos&&s.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),u||!d||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===s.currPos&&s.complete())))},getThumbPos:function(t){var e,o,i,a,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),i=parseFloat(c.css("border-right-width")||0),a=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-i-s,height:e.height-o-a,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var i,a,s=this,r=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(i=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),i=i.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled")}),i.length?(a=i.index(e.activeElement),t&&t.shiftKey?(a<0||0==a)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(a<0||a==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,!1===u.trigger("beforeClose",t)?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),i&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",i+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||a&&i&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity, 3323"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,i,h):!0===t?setTimeout(h,i):h(),!0)))},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;"afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i)},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find("[data-fancybox-count]").html(t.group.length),a.find("[data-fancybox-index]").html(i+1),a.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&i<=0),a.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&i>=t.group.length-1),"image"===o.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.7",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css("transition-duration",""),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c))}),n.isNumeric(o)&&t.css("transition-duration",o+"ms"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=null;r.on("mousedown mouseup focus blur",".fancybox-button",function(e){switch(e.type){case"mousedown":t=n(this);break;case"mouseup":t=null;break;case"focusin":n(".fancybox-button").removeClass("fancybox-focus"),n(this).is(t)||n(this).is("[disabled]")||n(this).addClass("fancybox-focus");break;case"focusout":n(".fancybox-button").removeClass("fancybox-focus")}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},e,a.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i<d.length;++i){var s=d[i].split("=",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,a.opts[e],u),p="function"===t.type(o.url)?o.url.call(this,c,l,a):n(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,a):n(o.thumb,c),"youtube"===e?p=p.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===e&&(p=p.replace("&%23","#")),!1}}),h?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),"iframe"===h&&(a.opts=t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(a,{type:h,src:p,origSrc:a.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&&(a.type=a.opts.defaultType)});var o={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,n=this;if(this[t].loaded)return void setTimeout(function(){n.done(t)});this[t].loading||(this[t].loading=!0,e=document.createElement("script"),e.type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){n[t].loaded=!0,n.done(t)}:e.onload=function(){n[t].loaded=!0,n.done(t)},document.body.appendChild(e))},done:function(e){var n,o,i;"youtube"===e&&delete window.onYouTubeIframeAPIReady,(n=t.fancybox.getInstance())&&(o=n.current.$content.find("iframe"),"youtube"===e&&void 0!==YT&&YT?i=new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&n.next()}}}):"vimeo"===e&&void 0!==Vimeo&&Vimeo&&(i=new Vimeo.Player(o),i.on("ended",function(){n.next()})))}};t(document).on({"afterShow.fb":function(t,e,n){e.group.length>1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(i(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();i.realPoints=i.startPoints=a(o),i.startPoints.length&&(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),((i.opts||i.canPan)&&(c.is(i.$stage)||i.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.parents(".fancybox-caption").length))&&(i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(!0!==c)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||!1===s.opts.vertical||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,i;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),i=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-i.top,s.sliderStartPos.left=o.left-i.left),n.fancybox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;if(s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5))return void(t.startPoints=t.newPoints);t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i<n&&(i=n+1-Math.pow(n-f-l,.8)||0),d>0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&a<o&&(a=o+1-Math.pow(o-p-d,.8)||0),{top:a,left:i}},d.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,a=e.contentStartPos,r=a.width,c=a.height,l=a.left,d=a.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&i(e.requestId),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=o.isSwiping,r=o.isPanning,c=o.isZooming,l=o.isScrolling;if(o.endPoints=a(t),o.dMs=Math.max((new Date).getTime()-o.startTime,1),o.$container.removeClass("fancybox-is-grabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap)return o.onTap(t);o.speed=100,o.velocityX=o.distanceX/o.dMs*.5,o.velocityY=o.distanceY/o.dMs*.5,r?o.endPanning():c?o.endZooming():o.endSwiping(s,l)},d.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length,s=Math.abs(o.distanceX),r="x"==t&&a>1&&(o.dMs>130&&s>10||s>50);o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,250)):r&&o.distanceX>0?i=o.instance.previous(300):r&&o.distanceX<0&&(i=o.instance.next(300)),!1!==i||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(!1===i.opts.momentum||i.dMs>350?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+500*i.velocityX,e=i.contentLastPos.top+500*i.velocityY),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,366))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('<div class="fancybox-progress"></div>').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,i=o.current;i&&(!0===t||i.opts.loop||o.currIndex<o.group.length-1)?n.isActive&&"video"!==i.contentType&&(n.$progress&&e.fancybox.animate(n.$progress.show(),{scaleX:1},i.opts.slideShow.speed),n.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},i.opts.slideShow.speed)):(n.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&&t.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var a=0;a<i.length;a++)n[e[0][a]]=i[a];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.isAnimating=!1,n.update(!0,!0,0),n.isComplete||n.complete()),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var i;if(!n)return void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove();e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,a=n.length;i<a&&(n[i].thumb&&o++,!(o>1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('<div class="'+n+" "+n+"-"+o.opts.axis+'"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('<div class="'+n+'__list">').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('<a href="javascript:;" tabindex="0" data-index="'+e+'"'+(t&&t.length?' style="background-image:url('+t+')"':'class="fancybox-thumbs-missing"')+"></a>")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,o=this,i=o.$list,a=o.$grid;o.instance.current&&(e=i.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("fancybox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.left<a.scrollLeft()||n.left>a.scrollLeft()+(a.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new o(e),n.isActive&&!0===n.opts.autoStart&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&!1!==n.opts.hideOnClose&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}, 3324tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
vendor: 15,746 bytes, lines 3324-3335
3324 3325/* End */ 3326; 3327; /* Start:"a:4:{s:4:"full";s:103:"/bitrix/templates/gvozdevsoft_event_s1/lib/flex-gallery/jquery.justified-gallery.min.js?177808411018510";s:6:"source";s:87:"/bitrix/templates/gvozdevsoft_event_s1/lib/flex-gallery/jquery.justified-gallery.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3328/*! 3329 * justifiedGallery - v3.7.0 3330 * http://miromannino.github.io/Justified-Gallery/ 3331 * Copyright (c) 2018 Miro Mannino 3332 * Licensed under the MIT license. 3333 */ 3334 3335!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(g){var r=function(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:g('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t};r.prototype.getSuffix=function(t,i){var e,s;for(e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},r.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},r.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},r.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)){if(0===this.settings.sizeRangeSuffixes[i].length)continue;if(this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i]}return""},r.prototype.newSrc=function(t,i,e,s){var n;if(this.settings.thumbnailPath)n=this.settings.thumbnailPath(t,i,e,s);else{var r=t.match(this.settings.extension),o=null!==r?r[0]:"";n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+o}return n},r.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},r.prototype.extractImgSrcFromImage=function(t){var i=void 0!==t.data("safe-src")?t.data("safe-src"):t.attr("src");return t.data("jg.originalSrc",i),i},r.prototype.imgFromEntry=function(t){var i=t.find(this.settings.imgSelector);return 0===i.length?null:i},r.prototype.captionFromEntry=function(t){var i=t.find("> .caption");return 0===i.length?null:i},r.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o=this.imgFromEntry(t);if(null!==o){o.css("width",s),o.css("height",n),o.css("margin-left",-s/2),o.css("margin-top",-n/2);var a=o.attr("src"),h=this.newSrc(a,s,n,o[0]);o.one("error",function(){o.attr("src",o.data("jg.originalSrc"))});var l=function(){a!==h&&o.attr("src",h)};"skipped"===t.data("jg.loaded")?this.onImageEvent(a,g.proxy(function(){this.showImg(t,l),t.data("jg.loaded",!0)},this)):this.showImg(t,l)}else this.showImg(t);this.displayEntryCaption(t)},r.prototype.displayEntryCaption=function(t){var i=this.imgFromEntry(t);if(null!==i&&this.settings.captions){var e=this.captionFromEntry(t);if(null===e){var s=i.attr("alt");this.isValidCaption(s)||(s=t.attr("title")),this.isValidCaption(s)&&(e=g('<div class="caption">'+s+"</div>"),t.append(e),t.data("jg.createdCaption",!0))}null!==e&&(this.settings.cssAnimation||e.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))}else this.removeCaptionEventsHandlers(t)},r.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},r.prototype.onEntryMouseEnterForCaption=function(t){var i=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?i.addClass("caption-visible").removeClass("caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},r.prototype.onEntryMouseLeaveForCaption=function(t){var i=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?i.removeClass("caption-visible").removeClass("caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},r.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:g.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:g.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},r.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},r.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},r.prototype.prepareBuildingRow=function(t){var i,e,s,n,r,o=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,l=h/this.buildingRow.aspectRatio,g=this.settings.rowHeight,u=this.buildingRow.width/h>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!u){for(i=0;i<this.buildingRow.entriesBuff.length;i++)e=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?e.removeClass("entry-visible"):(e.stop().fadeTo(0,.1),e.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!u&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(o=!1,0<this.rows&&(o=(g=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),i=0;i<this.buildingRow.entriesBuff.length;i++)s=(e=this.buildingRow.entriesBuff[i]).data("jg.width")/e.data("jg.height"),o?(n=i===this.buildingRow.entriesBuff.length-1?h:l*s,r=l):(n=g*s,r=g),h-=Math.round(n),e.data("jg.jwidth",Math.round(n)),e.data("jg.jheight",Math.ceil(r)),(0===i||r<a)&&(a=r);return this.buildingRow.height=a,o},r.prototype.flushRow=function(t){var i,e,s,n=this.settings,r=this.border;if(e=this.prepareBuildingRow(t),t&&"hide"===n.lastRow&&-1===e)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===n.lastRow||"right"===n.lastRow)){var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*n.margins;for(s=0;s<this.buildingRow.entriesBuff.length;s++)o-=(i=this.buildingRow.entriesBuff[s]).data("jg.jwidth");"center"===n.lastRow?r+=o/2:"right"===n.lastRow&&(r+=o)}var a=this.buildingRow.entriesBuff.length-1;for(s=0;s<=a;s++)i=this.buildingRow.entriesBuff[this.settings.rtl?a-s:s],this.displayEntry(i,r,this.offY,i.data("jg.jwidth"),i.data("jg.jheight"),this.buildingRow.height),r+=i.data("jg.jwidth")+n.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=n.rowHeight&&e)&&(this.offY+=this.buildingRow.height+n.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;function e(){return g("body").height()>g(window).height()}r.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},r.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},r.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},r.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(g.proxy(function(){if(this.$gallery.is(":visible")){var t=parseFloat(this.$gallery.width());e()===this.scrollBarOn?Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=e(),this.galleryWidth=t)}},this),this.settings.refreshTime)},r.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},r.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},r.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},r.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},r.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},r.prototype.updateEntries=function(t){var i;return t&&null!=this.lastFetchedEntry?i=g(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],i=this.$gallery.children(this.settings.selector).toArray()),0<i.length&&(g.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},r.prototype.insertToGallery=function(t){var i=this;g.each(t,function(){g(this).appendTo(i.$gallery)})},r.prototype.shuffleArray=function(t){var i,e,s;for(i=t.length-1;0<i;i--)e=Math.floor(Math.random()*(i+1)),s=t[i],t[i]=t[e],t[e]=s;return this.insertToGallery(t),t},r.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},r.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)g(t[i]).removeClass("jg-filtered")},r.prototype.filterArray=function(t){var e=this.settings;if("string"===g.type(e.filter))return t.filter(function(t){var i=g(t);return i.is(e.filter)?(i.removeClass("jg-filtered"),!0):(i.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(g.isFunction(e.filter)){for(var i=t.filter(e.filter),s=0;s<t.length;s++)-1===i.indexOf(t[s])?g(t[s]).addClass("jg-filtered").removeClass("jg-visible"):g(t[s]).removeClass("jg-filtered");return i}},r.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),g.each(this.entries,g.proxy(function(t,i){var e=g(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry");var s=this.imgFromEntry(e);s.css("width",""),s.css("height",""),s.css("margin-left",""),s.css("margin-top",""),s.attr("src",s.data("jg.originalSrc")),s.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(e);var n=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==n&&n.remove()):null!==n&&n.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},r.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=g(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete"),this.setGalleryFinalHeight(this.galleryHeightToSet)},r.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},r.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},r.prototype.onImageEvent=function(t,i,e){if(i||e){var s=new Image,n=g(s);i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t}},r.prototype.init=function(){var a=!1,h=!1,l=this;g.each(this.entries,function(t,i){var e=g(i),s=l.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==l.settings.rel&&e.attr("rel",l.settings.rel),null!==l.settings.target&&e.attr("target",l.settings.target),null!==s){var n=l.extractImgSrcFromImage(s);if(s.attr("src",n),!1===l.settings.waitThumbnailsLoad){var r=parseFloat(s.prop("width")),o=parseFloat(s.prop("height"));if(!isNaN(r)&&!isNaN(o))return e.data("jg.width",r),e.data("jg.height",o),e.data("jg.loaded","skipped"),h=!0,l.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),a=!0,l.isSpinnerActive()||l.startLoadingSpinnerAnimation(),l.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),l.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),l.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),a||h||this.startImgAnalyzer(!1),this.checkWidth()},r.prototype.checkOrConvertNumber=function(t,i){if("string"===g.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==g.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},r.prototype.checkSizeRangesSuffixes=function(){if("object"!==g.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(i);for(var e={0:""},s=0;s<t.length;s++)if("string"===g.type(t[s]))try{e[parseInt(t[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[t[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[t[s]]=this.settings.sizeRangeSuffixes[t[s]];this.settings.sizeRangeSuffixes=e},r.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===g.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==g.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},r.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");
3335if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==g.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==g.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==g.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==g.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!g.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!g.isFunction(this.settings.filter)&&"string"!==g.type(this.settings.filter))throw"filter must be false, a string or a filter function"},r.prototype.retrieveSuffixRanges=function(){var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(parseInt(i,10));return t.sort(function(t,i){return i<t?1:t<i?-1:0}),t},r.prototype.updateSettings=function(t){this.settings=g.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},r.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(t){this.$gallery.trigger(t)}},g.fn.justifiedGallery=function(n){return this.each(function(t,i){var e=g(i);e.addClass("justified-gallery");var s=e.data("jg.controller");if(void 0===s){if(null!=n&&"object"!==g.type(n)){if("destroy"===n)return;throw"The argument must be an object"}s=new r(e,g.extend({},r.prototype.defaults,n)),e.data("jg.controller",s)}else if("norewind"===n);else{if("destroy"===n)return void s.destroy();s.updateSettings(n),s.rewind()}s.updateEntries("norewind"===n)&&s.init()})}}); 3336/* End */ 3337; 3338; /* Start:"a:4:{s:4:"full";s:81:"/bitrix/templates/gvozdevsoft_event_s1/lib/sticky/jquery.sticky.js?17780841103836";s:6:"source";s:66:"/bitrix/templates/gvozdevsoft_event_s1/lib/sticky/jquery.sticky.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3339/* 3340 * Sticky Plugin v1.0.0 for jQuery 3341 * Free to use and abuse under the MIT license. 3342 */ 3343 3344(function($) { 3345 var defaults = { 3346 topSpacing: 0, 3347 bottomSpacing: 440, 3348 className: 'is-sticky', 3349 wrapperClassName: 'sticky-wrapper', 3350 center: false, 3351 getWidthFrom: '' 3352 }, 3353 $window = $(window), 3354 $document = $(document), 3355 sticked = [], 3356 windowHeight = $window.height(), 3357 scroller = function() { 3358 var scrollTop = $window.scrollTop(), 3359 documentHeight = $document.height(), 3360 dwh = documentHeight - windowHeight, 3361 extra = (scrollTop > dwh) ? dwh - scrollTop : 0; 3362 3363 for (var i = 0; i < sticked.length; i++) { 3364 var s = sticked[i], 3365 elementTop = s.stickyWrapper.offset().top, 3366 etse = elementTop - s.topSpacing - extra; 3367 3368 if (scrollTop <= etse) { 3369 if (s.currentTop !== null) { 3370 s.stickyElement 3371 .css('position', '') 3372 .css('top', ''); 3373 s.stickyElement.parent().removeClass(s.className); 3374 s.currentTop = null; 3375 } 3376 } 3377 else { 3378 var newTop = documentHeight - s.stickyElement.outerHeight() 3379 - s.topSpacing - s.bottomSpacing - scrollTop - extra; 3380 if (newTop < 0) { 3381 newTop = newTop + s.topSpacing; 3382 } else { 3383 newTop = s.topSpacing; 3384 } 3385 if (s.currentTop != newTop) { 3386 s.stickyElement 3387 .css('position', 'fixed') 3388 .css('top', newTop); 3389 3390 if (typeof s.getWidthFrom !== 'undefined') { 3391 s.stickyElement.css('width', $(s.getWidthFrom).width()); 3392 } 3393 3394 s.stickyElement.parent().addClass(s.className); 3395 s.currentTop = newTop; 3396 } 3397 } 3398 } 3399 }, 3400 resizer = function() { 3401 windowHeight = $window.height(); 3402 }, 3403 methods = { 3404 init: function(options) { 3405 var o = $.extend(defaults, options); 3406 return this.each(function() { 3407 var stickyElement = $(this); 3408 3409 var stickyId = stickyElement.attr('id');
3410 var wrapper = $('<div></div>') 3411 .attr('id', stickyId + '-sticky-wrapper') 3412 .addClass(o.wrapperClassName); 3413 stickyElement.wrapAll(wrapper); 3414 3415 if (o.center) { 3416 stickyElement.parent().css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); 3417 } 3418 3419 if (stickyElement.css("float") == "right") { 3420 stickyElement.css({"float":"none"}).parent().css({"float":"right"}); 3421 } 3422 3423 var stickyWrapper = stickyElement.parent(); 3424 stickyWrapper.css('height', stickyElement.outerHeight()); 3425 sticked.push({ 3426 topSpacing: o.topSpacing, 3427 bottomSpacing: o.bottomSpacing, 3428 stickyElement: stickyElement, 3429 currentTop: null, 3430 stickyWrapper: stickyWrapper, 3431 className: o.className, 3432 getWidthFrom: o.getWidthFrom 3433 }); 3434 }); 3435 }, 3436 update: scroller 3437 }; 3438 3439 // should be more efficient than using $window.scroll(scroller) and $window.resize(resizer): 3440 if (window.addEventListener) { 3441 window.addEventListener('scroll', scroller, false); 3442 window.addEventListener('resize', resizer, false); 3443 } else if (window.attachEvent) { 3444 window.attachEvent('onscroll', scroller); 3445 window.attachEvent('onresize', resizer); 3446 } 3447 3448 $.fn.sticky = function(method) { 3449 if (methods[method]) { 3450 return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 3451 } else if (typeof method === 'object' || !method ) { 3452 return methods.init.apply( this, arguments ); 3453 } else { 3454 $.error('Method ' + method + ' does not exist on jQuery.sticky'); 3455 } 3456 }; 3457 $(function() { 3458 setTimeout(scroller, 0); 3459 }); 3460})(jQuery); 3461 3462 3463/* End */ 3464; 3465; /* Start:"a:4:{s:4:"full";s:79:"/bitrix/templates/gvozdevsoft_event_s1/lib/accordion/accordion.js?1778084110311";s:6:"source";s:65:"/bitrix/templates/gvozdevsoft_event_s1/lib/accordion/accordion.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3466$(document).ready(function(i) { 3467 var o, n; 3468 i(".title_block").on("click", function() { 3469 o = i(this).parents(".accordion_item"), 3470 n = o.find(".info"), 3471 o.hasClass("active_block") ? (o.removeClass("active_block"), 3472 n.slideUp()) : (o.addClass("active_block"), 3473 n.stop(!0, !0).slideDown()) 3474 }) 3475}); 3476 3477/* End */ 3478; 3479; /* Start:"a:4:{s:4:"full";s:69:"/bitrix/templates/gvozdevsoft_event_s1/lib/tabs/tabs.js?1778084110792";s:6:"source";s:55:"/bitrix/templates/gvozdevsoft_event_s1/lib/tabs/tabs.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3480$(document).ready(function() { 3481 jQuery.fn.lightTabs = function(options){ 3482 3483 var createTabs = function(){ 3484 tabs = this; 3485 i = 0; 3486 3487 showPage = function(i){ 3488 $(tabs).children("div").children("div").hide(); 3489 $(tabs).children("div").children("div").eq(i).show(); 3490 $(tabs).children("ul").children("li").removeClass("active"); 3491 $(tabs).children("ul").children("li").eq(i).addClass("active"); 3492 } 3493 3494 showPage(0); 3495 3496 $(tabs).children("ul").children("li").each(function(index, element){ 3497 $(element).attr("data-page", i); 3498 i++; 3499 }); 3500 3501 $(tabs).children("ul").children("li").click(function(){ 3502 showPage(parseInt($(this).attr("data-page"))); 3503 }); 3504 }; 3505 return this.each(createTabs); 3506 }; 3507}); 3508/* End */ 3509; 3510; /* Start:"a:4:{s:4:"full";s:74:"/bitrix/templates/gvozdevsoft_event_s1/lib/flmenu/flmenu.js?17780841105322";s:6:"source";s:59:"/bitrix/templates/gvozdevsoft_event_s1/lib/flmenu/flmenu.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3511let minwidth = 769; 3512let flgmini = false; 3513let lastWidth = window.innerWidth; 3514 3515window.onresize = function() { 3516 const currentWidth = window.innerWidth; 3517 if (currentWidth !== lastWidth) { 3518 lastWidth = currentWidth; 3519 CheckLis(); 3520 } 3521}; 3522 3523jQuery(document).ready(function() { 3524 let lastli = "<li id='fllast'><a>. . .</a><ul></ul></li>"; 3525 jQuery("#flvmenu > ul").append(lastli); 3526 jQuery("#flvmenu").prepend("<div class='minmenu'><i class='fa fa-bars'></i><a>МЕНЮ</a></div>"); 3527 jQuery("#flvmenu > ul li ul").before("<a class='flarr'></a>"); 3528 CheckLis(); 3529 Setmini(); 3530 if (window.innerWidth <= minwidth) { 3531 jQuery("#flvmenu >
3531 ul").css("display", "none"); 3532 } 3533}); 3534 3535function CheckLisOld() { 3536 let navw, lastli, allw = 0, navItems, wdoc = window.innerWidth; 3537 3538 if (wdoc > minwidth) { 3539 lastli = jQuery("#fllast").width(); 3540 let fllastlng = jQuery("#fllast > ul > li").length; 3541 if (fllastlng == 0) lastli = 0; 3542 navw = jQuery("#flvmenu").width(); 3543 jQuery('#flvmenu > ul > li').last().before(jQuery("#fllast > ul > li")); 3544 jQuery("#flvmenu > ul > li:not(#fllast)").each(function() { allw += this.clientWidth; }); 3545 navItems = jQuery('#flvmenu > ul > li:not(#fllast)'); 3546 if (fllastlng == 1 && allw <= navw) lastli = 0; 3547 3548 while ((allw + lastli) > navw) { 3549 allw -= navItems.last().width(); 3550 navItems.last().prependTo('#fllast > ul'); 3551 navItems.splice(-1, 1); 3552 if (fllastlng == 0) lastli = jQuery("#fllast").width(); 3553 } 3554 jQuery("#fllast").css("display", "none"); 3555 if (jQuery("#fllast > ul > li").length > 0) jQuery("#fllast").css("display", "inline-block"); 3556 jQuery(".flarr").html(""); 3557 jQuery('#flvmenu > ul > li ul').css("height", "auto"); 3558 jQuery("#flvmenu > ul").css("display", "flex"); 3559 SetAlignBl(wdoc); 3560 if (flgmini) { flgmini = false; CheckLis(); } 3561 } else { 3562 jQuery('#flvmenu > ul > li').last().before(jQuery("#fllast > ul > li")); 3563 jQuery("#fllast").css("display", "none"); 3564 jQuery('#flvmenu > ul > li ul').css("height", "0").css("right", "auto").css("left", "auto"); 3565 jQuery(".flarr").html("<i class='fa fa-plus'></i>"); 3566 jQuery("#flvmenu > ul").css("display", "none"); 3567 flgmini = true; 3568 } 3569} 3570 3571function CheckLis() { 3572 let navw, lastli, allw = 0, navItems, wdoc = window.innerWidth; 3573 3574 if (wdoc > minwidth) { 3575 // УбиÑаем вÑе пÑнкÑÑ Ð¸Ð· fllast обÑаÑно в Ð¼ÐµÐ½Ñ 3576 jQuery('#flvmenu > ul > li').last().before(jQuery("#fllast > ul > li")); 3577 3578 // СкÑÑваем fllast â он нам не нÑжен 3579 jQuery("#fllast").css("display", "none"); 3580 3581 // УÐÐ ÐÐÐ: Ð»Ð¾Ð³Ð¸ÐºÑ Ð¸Ð·Ð¼ÐµÑÐµÐ½Ð¸Ñ Ð¸ ÑкÑÑÑÐ¸Ñ Ð¿ÑнкÑов 3582 3583 jQuery(".flarr").html(""); 3584 jQuery('#flvmenu > ul > li ul').css("height", "auto"); 3585 jQuery("#flvmenu > ul").css("display", "flex"); // flex вмеÑÑо block 3586 SetAlignBl(wdoc); 3587 if (flgmini) { flgmini = false; CheckLis(); } 3588 } else { 3589 jQuery('#flvmenu > ul > li').last().before(jQuery("#fllast > ul > li")); 3590 jQuery("#fllast").css("display", "none"); 3591 jQuery('#flvmenu > ul > li ul').css("height", "0").css("right", "auto").css("left", "auto"); 3592 jQuery(".flarr").html("<i class='fa fa-plus'></i>"); 3593 jQuery("#flvmenu > ul").css("display", "none"); 3594 flgmini = true; 3595 } 3596} 3597 3598function Setmini() { 3599 jQuery("#flvmenu").on("click", ".flarr", function() { 3600 let wdoc = window.innerWidth; 3601 if (minwidth > wdoc) { 3602 let par = this.parentElement; 3603 let chldul = par.getElementsByTagName('ul')[0]; 3604 let chght = chldul.style.height; 3605 if (chght === "0px") { 3606 jQuery(this).html("<i class='fa fa-minus'></i>"); 3607 chldul.style.height = "auto"; 3608 } else { 3609 jQuery(this).html("<i class='fa fa-plus'></i>"); 3610 chldul.style.height = "0px"; 3611 } 3612 } 3613 }); 3614 3615 jQuery(".minmenu").click(function() { 3616 let ul = jQuery("#flvmenu > ul"); 3617 if (ul.css("display") === "none") { 3618 ul.css("display", "block"); 3619 } else { 3620 ul.css("display", "none"); 3621 } 3622 }); 3623} 3624 3625function SetAlignBl(wdoc) { 3626 jQuery("#flvmenu > ul > li > ul").each(function() { 3627 jQuery(this).css("left", "0").css("right", "auto"); 3628 let chldel = this.firstElementChild; 3629 let chlwth = chldel ? jQuery(chldel).width() : 0; 3630 if (getLeftSet(this) + chlwth > wdoc) { 3631 jQuery(this).css("left", "auto").css("right", "0"); 3632 } 3633 }); 3634 jQuery("#flvmenu > ul > li > ul > li > ul").each(function() { 3635 jQuery(this).css("left", "100%").css("right", "auto"); 3636 let chldel = this.firstElementChild; 3637 let chlwth = chldel ? jQuery(chldel).width() : 0; 3638 if (getLeftSet(this) + jQuery(this.parentElement).width() + chlwth > wdoc) { 3639 jQuery(this).css("left", "-100%"); 3640 } 3641 }); 3642} 3643 3644function getLeftSet(elem) { 3645 let left = 0; 3646 while (elem) { 3647 left += parseFloat(elem.offsetLeft); 3648 elem = elem.parentElement; 3649 } 3650 return Math.round(left); 3651} 3652/* End */ 3653; 3654; /* Start:"a:4:{s:4:"full";
3654s:71:"/bitrix/templates/gvozdevsoft_event_s1/lib/arrup/arrup.js?1778084110423";s:6:"source";s:57:"/bitrix/templates/gvozdevsoft_event_s1/lib/arrup/arrup.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3655jQuery(document).ready(function() { 3656 jQuery("body").append('<a id="arrup"><i class="fa fa-angle-up"></i></a>'); 3657 3658 jQuery(window).scroll(function(){ 3659 if (jQuery(this).scrollTop() > 200) { 3660 jQuery('#arrup').addClass("arvis"); 3661 } else { 3662 jQuery('#arrup').removeClass("arvis"); 3663 } 3664 }); 3665 3666 jQuery('#arrup').click(function(){ 3667 jQuery("html, body").animate({ scrollTop: 0 }, 800); 3668 return false; 3669 }); 3670}); 3671/* End */ 3672; 3673; /* Start:"a:4:{s:4:"full";s:71:"/bitrix/templates/gvozdevsoft_event_s1/lib/hdfix/hdfix.js?1778084110230";s:6:"source";s:57:"/bitrix/templates/gvozdevsoft_event_s1/lib/hdfix/hdfix.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3674jQuery(document).ready(function() { 3675 jQuery(window).scroll(function(){ 3676 if (jQuery(this).scrollTop() > 180) { 3677 jQuery('.head_slide').css("top","0px"); 3678 } else { 3679 jQuery('.head_slide').css("top","-50px"); 3680 } 3681 }); 3682}); 3683/* End */ 3684; 3685; /* Start:"a:4:{s:4:"full";s:77:"/bitrix/templates/gvozdevsoft_event_s1/lib/img-zoom/img-zoom.js?1778084110220";s:6:"source";s:63:"/bitrix/templates/gvozdevsoft_event_s1/lib/img-zoom/img-zoom.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3686$(document).ready(function(){ 3687 $(".img_zoom a").append("<span></span>"); 3688 $(".img_zoom a").hover(function(){ 3689 $(this).children("span").fadeIn(0); 3690 },function(){ 3691 $(this).children("span").fadeOut(0); 3692 }); 3693}); 3694/* End */ 3695; 3696; /* Start:"a:4:{s:4:"full";s:40:"/lib/feedback/feedback.js?17782267286791";s:6:"source";s:25:"/lib/feedback/feedback.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3697$(document).ready(function(){ 3698 3699 $('.files').click(function(){ 3700 $(this).closest('form').find('input[type=file]').click(); 3701 }); 3702 3703 $('input[type=file]').change(function(){ 3704 var form = $(this).closest('form'); 3705 var count = form.find("input:file")[0].files.length; 3706 form.find('.files span').text('ÐÑбÑано '+count+' Ñайл(ов)'); 3707 }); 3708 3709 /* date form */ 3710 $(function () { 3711 $('.datepicker').datepicker({ 3712 closeText: 'ÐакÑÑÑÑ', 3713 prevText: 'ÐÑедÑдÑÑий', 3714 dateFormat:'dd/mm/yy', 3715 nextText: 'СледÑÑÑий', 3716 monthNames : ['ЯнваÑÑ','ФевÑалÑ','ÐаÑÑ','ÐпÑелÑ','Ðай','ÐÑнÑ','ÐÑлÑ','ÐвгÑÑÑ','СенÑÑбÑÑ','ÐкÑÑбÑÑ','ÐоÑбÑÑ','ÐекабÑÑ'], 3717 dayNamesMin : ['ÐÑ','Ðн','ÐÑ','СÑ','ЧÑ','ÐÑ','Сб'], 3718 firstDay: 1 3719 }); 3720 $('.sel1 select').change(function(){ 3721 $('.sel1 select').css({'color':'black'}); 3722 }); 3723 $('.sel2 select').change(function(){ 3724 $('.sel2 select').css({'color':'black'}); 3725 }); 3726 }); 3727 3728 /* FORM EXPERT */ 3729 3730 $("#form_vopros_expert").submit(function(event){ 3731 event.preventDefault(); 3732 var formData = new FormData(this); 3733 if($('#garant_ch_expert').prop('checked')){ 3734 $.ajax({ 3735 url: "/lib/feedback/mail-form.php", 3736 type: "post", 3737 data: formData, 3738 success: function(data) { 3739 $("#titlepop_expert").html('<div class="thanks_form">'+data+'</div>'); 3740 }, 3741 error: function(){ 3742 alert("ÐаÑа заÑвка не оÑпÑавлена! ÐопÑобÑйÑе еÑе Ñаз"); 3743 }, 3744 cache: false, 3745 contentType: false, 3746 processData: false 3747 }); 3748 $("#garant_error_expert").html(""); 3749 } else {$("#garant_error_expert").html("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ даÑÑ ÑоглаÑие");} 3750 }); 3751 3752 /* FORM CONTACTS */ 3753 3754 $("#form_contacts_vopros").submit(function(event){ 3755 event.preventDefault(); 3756 var formData = new FormData(this); 3757 if($('#garant_ch_contacts').prop('checked')){ 3758 $.ajax({ 3759 url: "/lib/feedback/mail-form.php", 3760 type: "post", 3761 data: formData, 3762 success: function(data) { 3763 $("#titlepop_contacts").html('<div class="thanks_form">'+data+'</div>'); 3764 }, 3765 error: function(){ 3766 alert("ÐаÑа заÑвка не оÑпÑавлена! ÐопÑобÑйÑе еÑе Ñаз"); 3767 }, 3768 cache: false, 3769 contentType: false, 3770 processData: false 3771 }); 3772 $("#garant_error_contacts").html(""); 3773 } else {$("#garant_error_contacts").html("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ даÑÑ ÑоглаÑие");} 3774 }); 3775 3776 /* FORM SLIDER */ 3777 3778 $("#form_slider").submit(function(event){ 3779 event.preventDefault(); 3780 var formData = new FormData(this); 3781 if($('#garant_ch_uslugi').prop('checked')){ 3782 $.ajax({ 3783 url: "/lib/feedback/mail-form.php", 3784 type: "post", 3785 data: formData, 3786 success: function(data) { 3787 $(".garant").hide(); 3788 $("#titlepop_uslugi").html('<div class="thanks_form">'+data+'</div>'); 3789 }, 3790 error: function(){ 3791 alert("ÐаÑа заÑвка не оÑпÑавлена! ÐопÑобÑйÑе еÑе Ñаз"); 3792 }, 3793 cache: false, 3794 contentType: false, 3795 processData: false 3796 }); 3797 $("#garant_error_uslugi").html(""); 3798 } else {$("#garant_error_uslugi").html("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ даÑÑ ÑоглаÑие");} 3799 }); 3800 3801 //ZAYVKA POPUP 3802 3803 $("#form_zayvka_popup").submit(function(event){ 3804 event.preventDefault(); 3805 var formData = new FormData(this); 3806 if($('#garant_ch_zayvka').prop('checked')){ 3807 $.ajax({ 3808 url: "/lib/feedback/mail-form.php", 3809 type: "post", 3810 data: formData, 3811 success: function(data) { 3812 $("#titlepop_zayvka").html('<div class="thanks_form">'+data+'</div>'); 3813 $("#form_zayvka_popup input").css("display","none"); 3814 $("#form_zayvka_popup textarea").css("display","none"); 3815 $("#form_zayvka_popup .date").css("display","none"); 3816 $("#form_zayvka_popup .select").css("display","none"); 3817 $("#form_zayvka_popup .button").css("display","none"); 3818 $("#form_zayvka_popup .garant").css("display","none"); 3819 $(".files").css("display","none"); 3820 setTimeout(function(){ 3821 $(".fancybox-button").click(); 3822 },3000); 3823 }, 3824 error: function(){ 3825 alert("ÐаÑа заÑвка не оÑпÑавлена! ÐопÑобÑйÑе еÑе Ñаз"); 3826 }, 3827 cache: false, 3828 contentType: false, 3829 processData: false 3830 }); 3831 $("#garant_error_zayvka").html(""); 3832 } else {$("#garant_error_zayvka").html("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ даÑÑ ÑоглаÑие");} 3833 }); 3834 3835 //CALLBACK POPUP 3836 3837 $("#form_callback_popup").submit(function(event){ 3838 event.preventDefault(); 3839 var formData = new FormData(this); 3840 if($('#garant_ch_callback').prop('checked')){ 3841 $.ajax({ 3842 url: "/lib/feedback/mail-form.php", 3843 type: "post", 3844 data: formData, 3845 success: function(data) { 3846 $("#titlepop_callback").html('<div class="thanks_form">'+data+'</div>'); 3847 $("#form_callback_popup .text").css("display","none");
vendor: 8,835 bytes, lines 3848-3908
3848 $("#form_callback_popup input").css("display","none"); 3849 $("#form_callback_popup .button").css("display","none"); 3850 $("#form_callback_popup .garant").css("display","none"); 3851 setTimeout(function(){ 3852 $(".fancybox-button").click(); 3853 },3000); 3854 }, 3855 error: function(){ 3856 alert("ÐаÑа заÑвка не оÑпÑавлена! ÐопÑобÑйÑе еÑе Ñаз"); 3857 }, 3858 cache: false, 3859 contentType: false, 3860 processData: false 3861 }); 3862 $("#garant_error_callback").html(""); 3863 } else {$("#garant_error_callback").html("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ даÑÑ ÑоглаÑие");} 3864 }); 3865 3866 //CATALOG POPUP 3867 3868 $("#form_catalog_popup").submit(function(event){ 3869 event.preventDefault(); 3870 var formData = new FormData(this); 3871 if($('#garant_ch_catalog').prop('checked')){ 3872 $.ajax({ 3873 url: "/lib/feedback/mail-form.php", 3874 type: "post", 3875 data: formData, 3876 success: function(data) { 3877 $("#titlepop_catalog").html('<div class="thanks_form">'+data+'</div>'); 3878 $("#form_catalog_popup .text").css("display","none"); 3879 $("#form_catalog_popup textarea").css("display","none"); 3880 $("#form_catalog_popup input").css("display","none"); 3881 $("#form_catalog_popup .button").css("display","none"); 3882 $("#form_catalog_popup .garant").css("display","none"); 3883 $("#form_catalog_popup .tovar").css("display","none"); 3884 setTimeout(function(){ 3885 $(".fancybox-button").click(); 3886 },3000); 3887 }, 3888 error: function(){ 3889 alert("ÐаÑа заÑвка не оÑпÑавлена! ÐопÑобÑйÑе еÑе Ñаз"); 3890 }, 3891 cache: false, 3892 contentType: false, 3893 processData: false 3894 }); 3895 $("#garant_error_catalog").html(""); 3896 } else {$("#garant_error_catalog").html("ÐÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ даÑÑ ÑоглаÑие");} 3897 }); 3898 3899}); 3900/* End */ 3901; 3902; /* Start:"a:4:{s:4:"full";s:87:"/bitrix/templates/gvozdevsoft_event_s1/lib/datepicker/datepicker.min.js?177808411036675";s:6:"source";s:71:"/bitrix/templates/gvozdevsoft_event_s1/lib/datepicker/datepicker.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3903/*! jQuery UI - v1.12.1 - 2018-08-02 3904* http://jqueryui.com 3905* Includes: keycode.js, widgets/datepicker.js 3906* Copyright jQuery Foundation and other contributors; Licensed MIT */ 3907 3908(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,n)}function n(){t.datepicker._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.ui=t.ui||{},t.ui.version="1.12.1",t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.extend(t.ui,{datepicker:{version:"1.12.1"}});var a;t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(i),t.data(e,"datepicker",i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.on("focus",this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,a){var r,l,h,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>
3908"),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),o(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(l=document.documentElement.clientWidth,h=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,h/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),a===n&&(a=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,a,r,l,h=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):h?"all"===i?t.extend({},h.settings):this._get(h,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),h&&(this._curInst===h&&this._hideDatepicker(),a=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(h,"min"),l=this._getMinMaxDate(h,"max"),o(h.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(h.settings.minDate=this._formatDate(h,r)),null!==l&&void 0!==n.dateFormat&&void 0===n.maxDate&&(h.settings.maxDate=this._formatDate(h,l)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),h),this._autoSize(h),this._setDate(h,a),this._updateAlternate(h),this._updateDatepicker(h)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(i){if(i=i.target||i,"input"!==i.nodeName.toLowerCase()&&(i=t("input",i.parentNode)[0]),!t.datepicker._isDisabledDatepicker(i)&&t.datepicker._lastInput!==i){var s,n,a,r,l,h,c;s=t.datepicker._getInst(i),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),a=n?
vendor: 11,729 bytes, line 3908
3908n.apply(i,[i,s]):{},a!==!1&&(o(s.settings,a),s.lastVal=null,t.datepicker._lastInput=i,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(i.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(i),t.datepicker._pos[1]+=i.offsetHeight),r=!1,t(i).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),l=t.datepicker._checkOffset(s,l,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),s.inline||(h=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",e(t(i))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?s.dpDiv.show(h,t.datepicker._get(s,"showOptions"),c):s.dpDiv[h||"show"](h?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),o=s[1],r=17,l=e.dpDiv.find("."+this._dayOverClass+" a");l.length>0&&n.apply(l.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",r*o+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),h=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>l&&l>n?Math.abs(i.left+n-l):0),i.top-=Math.min(i.top,i.top+o>h&&h>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,l=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(l,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],l+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},x=function(){if(i.charAt(l)!==e.charAt(n))throw"Unexpected literal at position "+l;l++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>l&&(a=i.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,l=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},h=function(t,e,i){var s=""+e;if(l(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return l(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||l("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=h("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=h("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=h("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=l("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=l.exec(i);h;){switch(h[2]||"d"){case"d":case"D":r+=parseInt(h[1],10);break;case"w":case"W":r+=7*parseInt(h[1],10);break;case"m":case"M":a+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(h[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}h=l.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null}
vendor: 6,672 bytes, line 3908
3908,_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,T,I,M,P,S,N,H,z,A,O,E,W,F,L,R=new Date,Y=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),B=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),X=this._get(t,"stepMonths"),$=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),J=this._getMinMaxDate(t,"min"),Q=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),Q)for(e=this._daylightSavingAdjust(new Date(Q.getFullYear(),Q.getMonth()-U[0]*U[1]+1,Q.getDate())),e=J&&J>e?J:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-X,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":q?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+X,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":q?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:Y,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",h=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?l:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),T=" ui-corner-all",I="",$){if(I+="<div class='ui-datepicker-group",U[1]>1)switch(C){case 0:I+=" ui-datepicker-group-first",T=" ui-corner-"+(B?"right":"left");break;case U[1]-1:I+=" ui-datepicker-group-last",T=" ui-corner-"+(B?"left":"right");break;default:I+=" ui-datepicker-group-middle",T=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?B?o:s:"")+(/all|right/.test(T)&&0===k?B?s:o:"")+this._generateMonthYearHeader(t,Z,te,J,Q,k>0||C>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",M=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w++)P=(w+c)%7,M+="<th scope='col'"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[P]+"'>"+p[P]+"</span></th>";for(I+=M+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),N=(this._getFirstDayOfMonth(te,Z)-c+7)%7,H=Math.ceil((N+S)/7),z=$?this.maxRows>H?this.maxRows:H:H,this.maxRows=z,A=this._daylightSavingAdjust(new Date(te,Z,1-N)),O=0;z>O;O++){for(I+="<tr>",E=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(A)+"</td>":"",w=0;7>w;w++)W=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!W[0]||J&&J>A||Q&&A>Q,E+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(A.getTime()===D.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===A.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+W[1]+(A.getTime()===G.getTime()?" "+this._currentClass:"")+(A.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"'")+"'")+(L?"":" data-handler='selectDay' data-event='click' data-month='"+A.getMonth()+"' data-year='"+A.getFullYear()+"'")+">"+(F&&!_?" ":L?"<span class='ui-state-default'>"+A.getDate()+"</span>":"<a class='ui-state-default"+(A.getTime()===Y.getTime()?" ui-state-highlight":"")+(A.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+A.getDate()+"</a>")+"</td>",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);I+=E+"</tr>"}Z++,Z>11&&(Z=0,te++),I+="</tbody></table>"+($?"</div>"+(U[0]>0&&C===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),x+=I}y+=x}return y+=h,t._keyEvent=!1,y}
vendor: 6,441 bytes, lines 3908-3959
3908,_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y=""; 3909if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=s.getMonth())&&(!h||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(v||(b+=y+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":" ")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker}); 3910/* End */ 3911; 3912; /* Start:"a:4:{s:4:"full";s:89:"/bitrix/templates/gvozdevsoft_event_s1/lib/inputmask/jquery.inputmask.js?1778084110220934";s:6:"source";s:72:"/bitrix/templates/gvozdevsoft_event_s1/lib/inputmask/jquery.inputmask.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3913/*! 3914* jquery.inputmask.bundle.js 3915* https://github.com/RobinHerbots/Inputmask 3916* Copyright (c) 2010 - 2019 Robin Herbots 3917* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) 3918* Version: 4.0.6 3919*/ 3920 3921(function(modules) { 3922 var installedModules = {}; 3923 function __webpack_require__(moduleId) { 3924 if (installedModules[moduleId]) { 3925 return installedModules[moduleId].exports; 3926 } 3927 var module = installedModules[moduleId] = { 3928 i: moduleId, 3929 l: false, 3930 exports: {} 3931 }; 3932 modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 3933 module.l = true; 3934 return module.exports; 3935 } 3936 __webpack_require__.m = modules; 3937 __webpack_require__.c = installedModules; 3938 __webpack_require__.d = function(exports, name, getter) { 3939 if (!__webpack_require__.o(exports, name)) { 3940 Object.defineProperty(exports, name, { 3941 enumerable: true, 3942 get: getter 3943 }); 3944 } 3945 }; 3946 __webpack_require__.r = function(exports) { 3947 if (typeof Symbol !== "undefined" && Symbol.toStringTag) { 3948 Object.defineProperty(exports, Symbol.toStringTag, { 3949 value: "Module" 3950 }); 3951 } 3952 Object.defineProperty(exports, "__esModule", { 3953 value: true 3954 }); 3955 }; 3956 __webpack_require__.t = function(value, mode) { 3957 if (mode & 1) value = __webpack_require__(value); 3958 if (mode & 8) return value; 3959 if (mode & 4 && typeof value === "object" && value && value.__esMo
3959dule) return value; 3960 var ns = Object.create(null); 3961 __webpack_require__.r(ns); 3962 Object.defineProperty(ns, "default", { 3963 enumerable: true, 3964 value: value 3965 }); 3966 if (mode & 2 && typeof value != "string") for (var key in value) __webpack_require__.d(ns, key, function(key) { 3967 return value[key]; 3968 }.bind(null, key)); 3969 return ns; 3970 }; 3971 __webpack_require__.n = function(module) { 3972 var getter = module && module.__esModule ? function getDefault() { 3973 return module["default"]; 3974 } : function getModuleExports() { 3975 return module; 3976 }; 3977 __webpack_require__.d(getter, "a", getter); 3978 return getter; 3979 }; 3980 __webpack_require__.o = function(object, property) { 3981 return Object.prototype.hasOwnProperty.call(object, property); 3982 }; 3983 __webpack_require__.p = ""; 3984 return __webpack_require__(__webpack_require__.s = 0); 3985})([ function(module, exports, __webpack_require__) { 3986 "use strict"; 3987 __webpack_require__(1); 3988 __webpack_require__(6); 3989 __webpack_require__(7); 3990 var _inputmask = __webpack_require__(2); 3991 var _inputmask2 = _interopRequireDefault(_inputmask); 3992 var _inputmask3 = __webpack_require__(3); 3993 var _inputmask4 = _interopRequireDefault(_inputmask3); 3994 var _jquery = __webpack_require__(4); 3995 var _jquery2 = _interopRequireDefault(_jquery); 3996 function _interopRequireDefault(obj) { 3997 return obj && obj.__esModule ? obj : { 3998 default: obj 3999 }; 4000 } 4001 if (_inputmask4.default === _jquery2.default) { 4002 __webpack_require__(8); 4003 } 4004 window.Inputmask = _inputmask2.default; 4005}, function(module, exports, __webpack_require__) { 4006 "use strict"; 4007 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 4008 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 4009 return typeof obj; 4010 } : function(obj) { 4011 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 4012 }; 4013 (function(factory) { 4014 if (true) { 4015 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 4016 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 4017 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 4018 } else {} 4019 })(function(Inputmask) { 4020 Inputmask.extendDefinitions({ 4021 A: { 4022 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 4023 casing: "upper" 4024 }, 4025 "&": { 4026 validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 4027 casing: "upper" 4028 }, 4029 "#": { 4030 validator: "[0-9A-Fa-f]", 4031 casing: "upper" 4032 } 4033 }); 4034 Inputmask.extendAliases({ 4035 cssunit: { 4036 regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)" 4037 }, 4038 url: { 4039 regex: "(https?|ftp)//.*", 4040 autoUnmask: false 4041 }, 4042 ip: { 4043 mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]", 4044 definitions: { 4045 i: { 4046 validator: function validator(chrs, maskset, pos, strict, opts) { 4047 if (pos - 1 > -1 && maskset.buffer[pos - 1] !== ".") { 4048 chrs = maskset.buffer[pos - 1] + chrs; 4049 if (pos - 2 > -1 && maskset.buffer[pos - 2] !== ".") { 4050 chrs = maskset.buffer[pos - 2] + chrs; 4051 } else chrs = "0" + chrs; 4052 } else chrs = "00" + chrs; 4053 return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs); 4054 } 4055 } 4056 }, 4057 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 4058 return maskedValue; 4059 }, 4060 inputmode: "numeric" 4061 }, 4062 email: { 4063 mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",
4064 greedy: false, 4065 casing: "lower", 4066 onBeforePaste: function onBeforePaste(pastedValue, opts) { 4067 pastedValue = pastedValue.toLowerCase(); 4068 return pastedValue.replace("mailto:", ""); 4069 }, 4070 definitions: { 4071 "*": { 4072 validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]" 4073 }, 4074 "-": { 4075 validator: "[0-9A-Za-z-]" 4076 } 4077 }, 4078 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 4079 return maskedValue; 4080 }, 4081 inputmode: "email" 4082 }, 4083 mac: { 4084 mask: "##:##:##:##:##:##" 4085 }, 4086 vin: { 4087 mask: "V{13}9{4}", 4088 definitions: { 4089 V: { 4090 validator: "[A-HJ-NPR-Za-hj-npr-z\\d]", 4091 casing: "upper" 4092 } 4093 }, 4094 clearIncomplete: true, 4095 autoUnmask: true 4096 } 4097 }); 4098 return Inputmask; 4099 }); 4100}, function(module, exports, __webpack_require__) { 4101 "use strict"; 4102 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 4103 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 4104 return typeof obj; 4105 } : function(obj) { 4106 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 4107 }; 4108 (function(factory) { 4109 if (true) { 4110 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(3), __webpack_require__(5) ], 4111 __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 4112 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 4113 } else {} 4114 })(function($, window, undefined) { 4115 var document = window.document, ua = navigator.userAgent, ie = ua.indexOf("MSIE ") > 0 || ua.indexOf("Trident/") > 0, mobile = isInputEventSupported("touchstart"), iemobile = /iemobile/i.test(ua), iphone = /iphone/i.test(ua) && !iemobile; 4116 function Inputmask(alias, options, internal) { 4117 if (!(this instanceof Inputmask)) { 4118 return new Inputmask(alias, options, internal); 4119 } 4120 this.el = undefined; 4121 this.events = {}; 4122 this.maskset = undefined; 4123 this.refreshValue = false; 4124 if (internal !== true) { 4125 if ($.isPlainObject(alias)) { 4126 options = alias; 4127 } else { 4128 options = options || {}; 4129 if (alias) options.alias = alias; 4130 } 4131 this.opts = $.extend(true, {}, this.defaults, options); 4132 this.noMasksCache = options && options.definitions !== undefined; 4133 this.userOptions = options || {}; 4134 this.isRTL = this.opts.numericInput; 4135 resolveAlias(this.opts.alias, options, this.opts); 4136 } 4137 } 4138 Inputmask.prototype = { 4139 dataAttribute: "data-inputmask", 4140 defaults: { 4141 placeholder: "_", 4142 optionalmarker: [ "[", "]" ], 4143 quantifiermarker: [ "{", "}" ], 4144 groupmarker: [ "(", ")" ], 4145 alternatormarker: "|", 4146 escapeChar: "\\", 4147 mask: null, 4148 regex: null, 4149 oncomplete: $.noop, 4150 onincomplete: $.noop, 4151 oncleared: $.noop, 4152 repeat: 0, 4153 greedy: false, 4154 autoUnmask: false, 4155 removeMaskOnSubmit: false, 4156 clearMaskOnLostFocus: true, 4157 insertMode: true, 4158 clearIncomplete: false, 4159 alias: null, 4160 onKeyDown: $.noop, 4161 onBeforeMask: null, 4162 onBeforePaste: function onBeforePaste(pastedValue, opts) { 4163 return $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(this, pastedValue, opts) : pastedValue; 4164 }, 4165 onBeforeWrite: null, 4166 onUnMask: null, 4167 showMaskOnFocus: true, 4168 showMaskOnHover: true, 4169 onKeyValidation: $.noop, 4170 skipOptionalPartCharacter: " ", 4171 numericInput: false, 4172 rightAlign: false, 4173 undoOnEscape: true, 4174 radixPoint: "", 4175 _radixDance: false, 4176 groupSeparator: "", 4177 keepStatic: null, 4178 positionCaretOnTab: true, 4179 tabThrough: false, 4180 supportsInputType: [ "text", "tel", "url", "password", "search" ], 4181 ignorables: [ 8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ], 4182 isComplete: null, 4183 preValidation: null, 4184 postValidation: null, 4185 staticDefinitionSymbol: undefined, 4186 jitMasking: false, 4187 nullable: true, 4188 inputEventOnly: false, 4189 noValuePatching: false, 4190 positionCaretOnClick: "lvp", 4191 casing: null, 4192 inputmode: "verbatim", 4193 colorMask: false, 4194 disablePredictiveText: false, 4195 importDataAttributes: true, 4196 shiftPositions: true 4197 }, 4198 definitions: { 4199 9: { 4200 validator: "[0-9\uff11-\uff19]", 4201 definitionSymbol: "*" 4202 }, 4203 a: { 4204 validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]", 4205 definitionSymbol: "*" 4206 }, 4207 "*": { 4208 validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]" 4209 } 4210 }, 4211 aliases: {}, 4212 masksCache: {}, 4213 mask: function mask(elems) { 4214 var that = this; 4215 function importAttributeOptions(npt, opts, userOptions, dataAttribute) { 4216 if (opts.importDataAttributes === true) { 4217 var importOption = function importOption(option, optionData) { 4218 optionData = optionData !== undefined ? optionData : npt.getAttribute(dataAttribute + "-" + option); 4219 if (optionData !== null) { 4220 if (typeof optionData === "string") { 4221 if (option.indexOf("on") === 0) optionData = window[optionData];
4221 else if (optionData === "false") optionData = false; else if (optionData === "true") optionData = true; 4222 } 4223 userOptions[option] = optionData; 4224 } 4225 }; 4226 var attrOptions = npt.getAttribute(dataAttribute), option, dataoptions, optionData, p; 4227 if (attrOptions && attrOptions !== "") { 4228 attrOptions = attrOptions.replace(/'/g, '"'); 4229 dataoptions = JSON.parse("{" + attrOptions + "}"); 4230 } 4231 if (dataoptions) { 4232 optionData = undefined; 4233 for (p in dataoptions) { 4234 if (p.toLowerCase() === "alias") { 4235 optionData = dataoptions[p]; 4236 break; 4237 } 4238 } 4239 } 4240 importOption("alias", optionData); 4241 if (userOptions.alias) { 4242 resolveAlias(userOptions.alias, userOptions, opts); 4243 } 4244 for (option in opts) { 4245 if (dataoptions) { 4246 optionData = undefined; 4247 for (p in dataoptions) { 4248 if (p.toLowerCase() === option.toLowerCase()) { 4249 optionData = dataoptions[p]; 4250 break; 4251 } 4252 } 4253 } 4254 importOption(option, optionData); 4255 } 4256 } 4257 $.extend(true, opts, userOptions); 4258 if (npt.dir === "rtl" || opts.rightAlign) { 4259 npt.style.textAlign = "right"; 4260 } 4261 if (npt.dir === "rtl" || opts.numericInput) { 4262 npt.dir = "ltr"; 4263 npt.removeAttribute("dir"); 4264 opts.isRTL = true; 4265 } 4266 return Object.keys(userOptions).length; 4267 } 4268 if (typeof elems === "string") { 4269 elems = document.getElementById(elems) || document.querySelectorAll(elems); 4270 } 4271 elems = elems.nodeName ? [ elems ] : elems; 4272 $.each(elems, function(ndx, el) { 4273 var scopedOpts = $.extend(true, {}, that.opts); 4274 if (importAttributeOptions(el, scopedOpts, $.extend(true, {}, that.userOptions), that.dataAttribute)) { 4275 var maskset = generateMaskSet(scopedOpts, that.noMasksCache); 4276 if (maskset !== undefined) { 4277 if (el.inputmask !== undefined) { 4278 el.inputmask.opts.autoUnmask = true; 4279 el.inputmask.remove(); 4280 } 4281 el.inputmask = new Inputmask(undefined, undefined, true); 4282 el.inputmask.opts = scopedOpts; 4283 el.inputmask.noMasksCache = that.noMasksCache; 4284 el.inputmask.userOptions = $.extend(true, {}, that.userOptions); 4285 el.inputmask.isRTL = scopedOpts.isRTL || scopedOpts.numericInput; 4286 el.inputmask.el = el; 4287 el.inputmask.maskset = maskset; 4288 $.data(el, "_inputmask_opts", scopedOpts); 4289 maskScope.call(el.inputmask, { 4290 action: "mask" 4291 }); 4292 } 4293 } 4294 }); 4295 return elems && elems[0] ? elems[0].inputmask || this : this; 4296 }, 4297 option: function option(options, noremask) { 4298 if (typeof options === "string") { 4299 return this.opts[options]; 4300 } else if ((typeof options === "undefined" ? "undefined" : _typeof(options)) === "object") { 4301 $.extend(this.userOptions, options); 4302 if (this.el && noremask !== true) { 4303 this.mask(this.el); 4304 } 4305 return this; 4306 } 4307 }, 4308 unmaskedvalue: function unmaskedvalue(value) { 4309 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 4310 return maskScope.call(this, { 4311 action: "unmaskedvalue", 4312 value: value 4313 }); 4314 }, 4315 remove: function remove() { 4316 return maskScope.call(this, { 4317 action: "remove" 4318 }); 4319 }, 4320 getemptymask: function getemptymask() { 4321 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 4322 return maskScope.call(this, { 4323 action: "getemptymask" 4324 }); 4325 }, 4326 hasMaskedValue: function hasMaskedValue() { 4327 return !this.opts.autoUnmask; 4328 }, 4329 isComplete: function isComplete() { 4330 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 4331 return maskScope.call(this, { 4332 action: "isComplete" 4333 }); 4334 }, 4335 getmetadata: function getmetadata() { 4336 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 4337 return maskScope.call(this, { 4338 action: "getmetadata" 4339 }); 4340 }, 4341 isValid: function isValid(value) { 4342 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 4343 return maskScope.call(this, { 4344 action: "isValid", 4345 value: value 4346 }); 4347 }, 4348 format: function format(value, metadata) { 4349 this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache); 4350 return maskScope.call(this, { 4351 action: "format", 4352 value: value, 4353 metadata: metadata 4354 }); 4355 }, 4356 setValue: function setValue(value) { 4357 if (this.el) { 4358 $(this.el).trigger("setvalue", [ value ]); 4359 } 4360 }, 4361 analyseMask: function analyseMask(mask, regexMask, opts) { 4362 var tokenizer = /(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?(?:\|[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g, regexTokenizer = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, escaped = false, currentToken = new MaskToken(), match, m, openenings = [], maskTokens = [], openingToken, currentOpeningToken, alternator, lastMatch, groupToken; 4363 function MaskToken(isGroup, isOptional, isQuantifier, isAlternator) { 4364 this.matches = []; 4365 this.openGroup = isGroup || false; 4366 this.alternatorGroup = false;
4367 this.isGroup = isGroup || false; 4368 this.isOptional = isOptional || false; 4369 this.isQuantifier = isQuantifier || false; 4370 this.isAlternator = isAlternator || false; 4371 this.quantifier = { 4372 min: 1, 4373 max: 1 4374 }; 4375 } 4376 function insertTestDefinition(mtoken, element, position) { 4377 position = position !== undefined ? position : mtoken.matches.length; 4378 var prevMatch = mtoken.matches[position - 1]; 4379 if (regexMask) { 4380 if (element.indexOf("[") === 0 || escaped && /\\d|\\s|\\w]/i.test(element) || element === ".") { 4381 mtoken.matches.splice(position++, 0, { 4382 fn: new RegExp(element, opts.casing ? "i" : ""), 4383 optionality: false, 4384 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== element, 4385 casing: null, 4386 def: element, 4387 placeholder: undefined, 4388 nativeDef: element 4389 }); 4390 } else { 4391 if (escaped) element = element[element.length - 1]; 4392 $.each(element.split(""), function(ndx, lmnt) { 4393 prevMatch = mtoken.matches[position - 1]; 4394 mtoken.matches.splice(position++, 0, { 4395 fn: null, 4396 optionality: false, 4397 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== lmnt && prevMatch.fn !== null, 4398 casing: null, 4399 def: opts.staticDefinitionSymbol || lmnt, 4400 placeholder: opts.staticDefinitionSymbol !== undefined ? lmnt : undefined, 4401 nativeDef: (escaped ? "'" : "") + lmnt 4402 }); 4403 }); 4404 } 4405 escaped = false; 4406 } else { 4407 var maskdef = (opts.definitions ? opts.definitions[element] : undefined) || Inputmask.prototype.definitions[element]; 4408 if (maskdef && !escaped) { 4409 mtoken.matches.splice(position++, 0, { 4410 fn: maskdef.validator ? typeof maskdef.validator == "string" ? new RegExp(maskdef.validator, opts.casing ? "i" : "") : new function() { 4411 this.test = maskdef.validator; 4412 }() : new RegExp("."), 4413 optionality: false, 4414 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== (maskdef.definitionSymbol || element), 4415 casing: maskdef.casing, 4416 def: maskdef.definitionSymbol || element, 4417 placeholder: maskdef.placeholder, 4418 nativeDef: element 4419 }); 4420 } else { 4421 mtoken.matches.splice(position++, 0, { 4422 fn: null, 4423 optionality: false, 4424 newBlockMarker: prevMatch === undefined ? "master" : prevMatch.def !== element && prevMatch.fn !== null, 4425 casing: null, 4426 def: opts.staticDefinitionSymbol || element, 4427 placeholder: opts.staticDefinitionSymbol !== undefined ? element : undefined, 4428 nativeDef: (escaped ? "'" : "") + element 4429 }); 4430 escaped = false;
4431 } 4432 } 4433 } 4434 function verifyGroupMarker(maskToken) { 4435 if (maskToken && maskToken.matches) { 4436 $.each(maskToken.matches, function(ndx, token) { 4437 var nextToken = maskToken.matches[ndx + 1]; 4438 if ((nextToken === undefined || nextToken.matches === undefined || nextToken.isQuantifier === false) && token && token.isGroup) { 4439 token.isGroup = false; 4440 if (!regexMask) { 4441 insertTestDefinition(token, opts.groupmarker[0], 0); 4442 if (token.openGroup !== true) { 4443 insertTestDefinition(token, opts.groupmarker[1]); 4444 } 4445 } 4446 } 4447 verifyGroupMarker(token); 4448 }); 4449 } 4450 } 4451 function defaultCase() { 4452 if (openenings.length > 0) { 4453 currentOpeningToken = openenings[openenings.length - 1]; 4454 insertTestDefinition(currentOpeningToken, m); 4455 if (currentOpeningToken.isAlternator) { 4456 alternator = openenings.pop(); 4457 for (var mndx = 0; mndx < alternator.matches.length; mndx++) { 4458 if (alternator.matches[mndx].isGroup) alternator.matches[mndx].isGroup = false; 4459 } 4460 if (openenings.length > 0) { 4461 currentOpeningToken = openenings[openenings.length - 1]; 4462 currentOpeningToken.matches.push(alternator); 4463 } else { 4464 currentToken.matches.push(alternator); 4465 } 4466 } 4467 } else { 4468 insertTestDefinition(currentToken, m); 4469 } 4470 } 4471 function reverseTokens(maskToken) { 4472 function reverseStatic(st) { 4473 if (st === opts.optionalmarker[0]) st = opts.optionalmarker[1]; else if (st === opts.optionalmarker[1]) st = opts.optionalmarker[0]; else if (st === opts.groupmarker[0]) st = opts.groupmarker[1]; else if (st === opts.groupmarker[1]) st = opts.groupmarker[0]; 4474 return st; 4475 } 4476 maskToken.matches = maskToken.matches.reverse(); 4477 for (var match in maskToken.matches) { 4478 if (maskToken.matches.hasOwnProperty(match)) { 4479 var intMatch = parseInt(match); 4480 if (maskToken.matches[match].isQuantifier && maskToken.matches[intMatch + 1] && maskToken.matches[intMatch + 1].isGroup) { 4481 var qt = maskToken.matches[match]; 4482 maskToken.matches.splice(match, 1); 4483 maskToken.matches.splice(intMatch + 1, 0, qt); 4484 } 4485 if (maskToken.matches[match].matches !== undefined) { 4486 maskToken.matches[match] = reverseTokens(maskToken.matches[match]); 4487 } else { 4488 maskToken.matches[match] = reverseStatic(maskToken.matches[match]); 4489 } 4490 } 4491 } 4492 return maskToken; 4493 } 4494 function groupify(matches) { 4495 var groupToken = new MaskToken(true); 4496 groupToken.openGroup = false; 4497 groupToken.matches = matches; 4498 return groupToken; 4499 } 4500 if (regexMask) { 4501 opts.optionalmarker[0] = undefined; 4502 opts.optionalmarker[1] = undefined; 4503 } 4504 while (match = regexMask ? regexTokenizer.exec(mask) : tokenizer.exec(mask)) { 4505 m = match[0]; 4506 if (regexMask) { 4507 switch (m.charAt(0)) { 4508 case "?": 4509 m = "{0,1}"; 4510 break; 4511 4512 case "+": 4513 case "*": 4514 m = "{" + m + "}"; 4515 break; 4516 } 4517 } 4518 if (escaped) { 4519 defaultCase(); 4520 continue; 4521 } 4522 switch (m.charAt(0)) { 4523 case "(?=": 4524 break; 4525 4526 case "(?!": 4527 break; 4528 4529 case "(?<=": 4530 break; 4531 4532 case "(?<!": 4533 break; 4534 4535 case opts.escapeChar: 4536 escaped = true; 4537 if (regexMask) { 4538 defaultCase(); 4539 } 4540 break; 4541 4542 case opts.optionalmarker[1]: 4543 case opts.groupmarker[1]: 4544 openingToken = openenings.pop(); 4545 openingToken.openGroup = false;
4546 if (openingToken !== undefined) { 4547 if (openenings.length > 0) { 4548 currentOpeningToken = openenings[openenings.length - 1]; 4549 currentOpeningToken.matches.push(openingToken); 4550 if (currentOpeningToken.isAlternator) { 4551 alternator = openenings.pop(); 4552 for (var mndx = 0; mndx < alternator.matches.length; mndx++) { 4553 alternator.matches[mndx].isGroup = false; 4554 alternator.matches[mndx].alternatorGroup = false; 4555 } 4556 if (openenings.length > 0) { 4557 currentOpeningToken = openenings[openenings.length - 1]; 4558 currentOpeningToken.matches.push(alternator); 4559 } else { 4560 currentToken.matches.push(alternator); 4561 } 4562 } 4563 } else { 4564 currentToken.matches.push(openingToken); 4565 } 4566 } else defaultCase(); 4567 break; 4568 4569 case opts.optionalmarker[0]: 4570 openenings.push(new MaskToken(false, true)); 4571 break; 4572 4573 case opts.groupmarker[0]: 4574 openenings.push(new MaskToken(true)); 4575 break; 4576 4577 case opts.quantifiermarker[0]: 4578 var quantifier = new MaskToken(false, false, true); 4579 m = m.replace(/[{}]/g, ""); 4580 var mqj = m.split("|"), mq = mqj[0].split(","), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = mq.length === 1 ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]); 4581 if (mq0 === "*" || mq0 === "+") { 4582 mq0 = mq1 === "*" ? 0 : 1; 4583 } 4584 quantifier.quantifier = { 4585 min: mq0, 4586 max: mq1, 4587 jit: mqj[1] 4588 }; 4589 var matches = openenings.length > 0 ? openenings[openenings.length - 1].matches : currentToken.matches; 4590 match = matches.pop(); 4591 if (match.isAlternator) { 4592 matches.push(match); 4593 matches = match.matches; 4594 var groupToken = new MaskToken(true); 4595 var tmpMatch = matches.pop(); 4596 matches.push(groupToken); 4597 matches = groupToken.matches; 4598 match = tmpMatch; 4599 } 4600 if (!match.isGroup) { 4601 match = groupify([ match ]); 4602 } 4603 matches.push(match); 4604 matches.push(quantifier); 4605 break; 4606 4607 case opts.alternatormarker: 4608 var groupQuantifier = function groupQuantifier(matches) { 4609 var lastMatch = matches.pop(); 4610 if (lastMatch.isQuantifier) { 4611 lastMatch = groupify([ matches.pop(), lastMatch ]); 4612 } 4613 return lastMatch; 4614 }; 4615 if (openenings.length > 0) { 4616 currentOpeningToken = openenings[openenings.length - 1]; 4617 var subToken = currentOpeningToken.matches[currentOpeningToken.matches.length - 1]; 4618 if (currentOpeningToken.openGroup && (subToken.matches === undefined || subToken.isGroup === false && subToken.isAlternator === false)) { 4619 lastMatch = openenings.pop(); 4620 } else { 4621 lastMatch = groupQuantifier(currentOpeningToken.matches); 4622 } 4623 } else { 4624 lastMatch = groupQuantifier(currentToken.matches); 4625 } 4626 if (lastMatch.isAlternator) { 4627 openenings.push(lastMatch); 4628 } else { 4629 if (lastMatch.alternatorGroup) { 4630 alternator = openenings.pop(); 4631 lastMatch.alternatorGroup = false;
4632 } else { 4633 alternator = new MaskToken(false, false, false, true); 4634 } 4635 alternator.matches.push(lastMatch); 4636 openenings.push(alternator); 4637 if (lastMatch.openGroup) { 4638 lastMatch.openGroup = false; 4639 var alternatorGroup = new MaskToken(true); 4640 alternatorGroup.alternatorGroup = true; 4641 openenings.push(alternatorGroup); 4642 } 4643 } 4644 break; 4645 4646 default: 4647 defaultCase(); 4648 } 4649 } 4650 while (openenings.length > 0) { 4651 openingToken = openenings.pop(); 4652 currentToken.matches.push(openingToken); 4653 } 4654 if (currentToken.matches.length > 0) { 4655 verifyGroupMarker(currentToken); 4656 maskTokens.push(currentToken); 4657 } 4658 if (opts.numericInput || opts.isRTL) { 4659 reverseTokens(maskTokens[0]); 4660 } 4661 return maskTokens; 4662 } 4663 }; 4664 Inputmask.extendDefaults = function(options) { 4665 $.extend(true, Inputmask.prototype.defaults, options); 4666 }; 4667 Inputmask.extendDefinitions = function(definition) { 4668 $.extend(true, Inputmask.prototype.definitions, definition); 4669 }; 4670 Inputmask.extendAliases = function(alias) { 4671 $.extend(true, Inputmask.prototype.aliases, alias); 4672 }; 4673 Inputmask.format = function(value, options, metadata) { 4674 return Inputmask(options).format(value, metadata); 4675 }; 4676 Inputmask.unmask = function(value, options) { 4677 return Inputmask(options).unmaskedvalue(value); 4678 }; 4679 Inputmask.isValid = function(value, options) { 4680 return Inputmask(options).isValid(value); 4681 }; 4682 Inputmask.remove = function(elems) { 4683 if (typeof elems === "string") { 4684 elems = document.getElementById(elems) || document.querySelectorAll(elems); 4685 } 4686 elems = elems.nodeName ? [ elems ] : elems; 4687 $.each(elems, function(ndx, el) { 4688 if (el.inputmask) el.inputmask.remove(); 4689 }); 4690 }; 4691 Inputmask.setValue = function(elems, value) { 4692 if (typeof elems === "string") { 4693 elems = document.getElementById(elems) || document.querySelectorAll(elems); 4694 } 4695 elems = elems.nodeName ? [ elems ] : elems; 4696 $.each(elems, function(ndx, el) { 4697 if (el.inputmask) el.inputmask.setValue(value); else $(el).trigger("setvalue", [ value ]); 4698 }); 4699 }; 4700 Inputmask.escapeRegex = function(str) { 4701 var specials = [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ]; 4702 return str.replace(new RegExp("(\\" + specials.join("|\\") + ")", "gim"), "\\$1"); 4703 }; 4704 Inputmask.keyCode = { 4705 BACKSPACE: 8, 4706 BACKSPACE_SAFARI: 127, 4707 DELETE: 46, 4708 DOWN: 40, 4709 END: 35, 4710 ENTER: 13, 4711 ESCAPE: 27, 4712 HOME: 36, 4713 INSERT: 45, 4714 LEFT: 37, 4715 PAGE_DOWN: 34, 4716 PAGE_UP: 33, 4717 RIGHT: 39, 4718 SPACE: 32, 4719 TAB: 9, 4720 UP: 38, 4721 X: 88, 4722 CONTROL: 17 4723 }; 4724 Inputmask.dependencyLib = $; 4725 function resolveAlias(aliasStr, options, opts) { 4726 var aliasDefinition = Inputmask.prototype.aliases[aliasStr]; 4727 if (aliasDefinition) { 4728 if (aliasDefinition.alias) resolveAlias(aliasDefinition.alias, undefined, opts); 4729 $.extend(true, opts, aliasDefinition); 4730 $.extend(true, opts, options); 4731 return true; 4732 } else if (opts.mask === null) { 4733 opts.mask = aliasStr; 4734 } 4735 return false;
4736 } 4737 function generateMaskSet(opts, nocache) { 4738 function generateMask(mask, metadata, opts) { 4739 var regexMask = false; 4740 if (mask === null || mask === "") { 4741 regexMask = opts.regex !== null; 4742 if (regexMask) { 4743 mask = opts.regex; 4744 mask = mask.replace(/^(\^)(.*)(\$)$/, "$2"); 4745 } else { 4746 regexMask = true; 4747 mask = ".*"; 4748 } 4749 } 4750 if (mask.length === 1 && opts.greedy === false && opts.repeat !== 0) { 4751 opts.placeholder = ""; 4752 } 4753 if (opts.repeat > 0 || opts.repeat === "*" || opts.repeat === "+") { 4754 var repeatStart = opts.repeat === "*" ? 0 : opts.repeat === "+" ? 1 : opts.repeat; 4755 mask = opts.groupmarker[0] + mask + opts.groupmarker[1] + opts.quantifiermarker[0] + repeatStart + "," + opts.repeat + opts.quantifiermarker[1]; 4756 } 4757 var masksetDefinition, maskdefKey = regexMask ? "regex_" + opts.regex : opts.numericInput ? mask.split("").reverse().join("") : mask; 4758 if (Inputmask.prototype.masksCache[maskdefKey] === undefined || nocache === true) { 4759 masksetDefinition = { 4760 mask: mask, 4761 maskToken: Inputmask.prototype.analyseMask(mask, regexMask, opts), 4762 validPositions: {}, 4763 _buffer: undefined, 4764 buffer: undefined, 4765 tests: {}, 4766 excludes: {}, 4767 metadata: metadata, 4768 maskLength: undefined, 4769 jitOffset: {} 4770 }; 4771 if (nocache !== true) { 4772 Inputmask.prototype.masksCache[maskdefKey] = masksetDefinition; 4773 masksetDefinition = $.extend(true, {}, Inputmask.prototype.masksCache[maskdefKey]); 4774 } 4775 } else masksetDefinition = $.extend(true, {}, Inputmask.prototype.masksCache[maskdefKey]); 4776 return masksetDefinition; 4777 } 4778 var ms; 4779 if ($.isFunction(opts.mask)) { 4780 opts.mask = opts.mask(opts); 4781 } 4782 if ($.isArray(opts.mask)) { 4783 if (opts.mask.length > 1) { 4784 if (opts.keepStatic === null) { 4785 opts.keepStatic = "auto"; 4786 for (var i = 0; i < opts.mask.length; i++) { 4787 if (opts.mask[i].charAt(0) !== opts.mask[0].charAt(0)) { 4788 opts.keepStatic = true; 4789 break; 4790 } 4791 } 4792 } 4793 var altMask = opts.groupmarker[0]; 4794 $.each(opts.isRTL ? opts.mask.reverse() : opts.mask, function(ndx, msk) { 4795 if (altMask.length > 1) { 4796 altMask += opts.groupmarker[1] + opts.alternatormarker + opts.groupmarker[0]; 4797 } 4798 if (msk.mask !== undefined && !$.isFunction(msk.mask)) { 4799 altMask += msk.mask; 4800 } else { 4801 altMask += msk; 4802 } 4803 }); 4804 altMask += opts.groupmarker[1]; 4805 return generateMask(altMask, opts.mask, opts); 4806 } else opts.mask = opts.mask.pop(); 4807 } 4808 if (opts.mask && opts.mask.mask !== undefined && !$.isFunction(opts.mask.mask)) { 4809 ms = generateMask(opts.mask.mask, opts.mask, opts); 4810 } else { 4811 ms = generateMask(opts.mask, opts.mask, opts); 4812 } 4813 return ms; 4814 } 4815 function isInputEventSupported(eventName) { 4816 var el = document.createElement("input"), evName = "on" + eventName, isSupported = evName in el; 4817 if (!isSupported) { 4818 el.setAttribute(evName, "return;"); 4819 isSupported = typeof el[evName] === "function"; 4820 } 4821 el = null; 4822 return isSupported; 4823 } 4824 function maskScope(actionObj, maskset, opts) { 4825 maskset = maskset || this.maskset; 4826 opts = opts || this.opts; 4827 var inputmask = this, el = this.el, isRTL = this.isRTL, undoValue, $el, skipKeyPressEvent = false, skipInputEvent = false, ignorable = false, maxLength, mouseEnter = false, colorMask, originalPlaceholder; 4828 function getMaskTemplate(baseOnInput, minimalPos, includeMode, noJit, clearOptionalTail) { 4829 var greedy = opts.greedy; 4830 if (clearOptionalTail) opts.greedy = false;
4831 minimalPos = minimalPos || 0; 4832 var maskTemplate = [], ndxIntlzr, pos = 0, test, testPos, lvp = getLastValidPosition(); 4833 do { 4834 if (baseOnInput === true && getMaskSet().validPositions[pos]) { 4835 testPos = clearOptionalTail && getMaskSet().validPositions[pos].match.optionality === true && getMaskSet().validPositions[pos + 1] === undefined && (getMaskSet().validPositions[pos].generatedInput === true || getMaskSet().validPositions[pos].input == opts.skipOptionalPartCharacter && pos > 0) ? determineTestTemplate(pos, getTests(pos, ndxIntlzr, pos - 1)) : getMaskSet().validPositions[pos]; 4836 test = testPos.match; 4837 ndxIntlzr = testPos.locator.slice(); 4838 maskTemplate.push(includeMode === true ? testPos.input : includeMode === false ? test.nativeDef : getPlaceholder(pos, test)); 4839 } else { 4840 testPos = getTestTemplate(pos, ndxIntlzr, pos - 1); 4841 test = testPos.match; 4842 ndxIntlzr = testPos.locator.slice(); 4843 var jitMasking = noJit === true ? false : opts.jitMasking !== false ? opts.jitMasking : test.jit; 4844 if (jitMasking === false || jitMasking === undefined || typeof jitMasking === "number" && isFinite(jitMasking) && jitMasking > pos) { 4845 maskTemplate.push(includeMode === false ? test.nativeDef : getPlaceholder(pos, test)); 4846 } 4847 } 4848 if (opts.keepStatic === "auto") { 4849 if (test.newBlockMarker && test.fn !== null) { 4850 opts.keepStatic = pos - 1; 4851 } 4852 } 4853 pos++; 4854 } while ((maxLength === undefined || pos < maxLength) && (test.fn !== null || test.def !== "") || minimalPos > pos); 4855 if (maskTemplate[maskTemplate.length - 1] === "") { 4856 maskTemplate.pop(); 4857 } 4858 if (includeMode !== false || getMaskSet().maskLength === undefined) getMaskSet().maskLength = pos - 1; 4859 opts.greedy = greedy; 4860 return maskTemplate; 4861 } 4862 function getMaskSet() { 4863 return maskset; 4864 } 4865 function resetMaskSet(soft) { 4866 var maskset = getMaskSet(); 4867 maskset.buffer = undefined; 4868 if (soft !== true) { 4869 maskset.validPositions = {}; 4870 maskset.p = 0; 4871 } 4872 } 4873 function getLastValidPosition(closestTo, strict, validPositions) { 4874 var before = -1, after = -1, valids = validPositions || getMaskSet().validPositions; 4875 if (closestTo === undefined) closestTo = -1; 4876 for (var posNdx in valids) { 4877 var psNdx = parseInt(posNdx); 4878 if (valids[psNdx] && (strict || valids[psNdx].generatedInput !== true)) { 4879 if (psNdx <= closestTo) before = psNdx; 4880 if (psNdx >= closestTo) after = psNdx; 4881 } 4882 } 4883 return before === -1 || before == closestTo ? after : after == -1 ? before : closestTo - before < after - closestTo ? before : after; 4884 } 4885 function getDecisionTaker(tst) { 4886 var decisionTaker = tst.locator[tst.alternation]; 4887 if (typeof decisionTaker == "string" && decisionTaker.length > 0) { 4888 decisionTaker = decisionTaker.split(",")[0]; 4889 } 4890 return decisionTaker !== undefined ? decisionTaker.toString() : ""; 4891 } 4892 function getLocator(tst, align) { 4893 var locator = (tst.alternation != undefined ? tst.mloc[getDecisionTaker(tst)] : tst.locator).join(""); 4894 if (locator !== "") while (locator.length < align) { 4895 locator += "0"; 4896 } 4897 return locator; 4898 } 4899 function determineTestTemplate(pos, tests) { 4900 pos = pos > 0 ? pos - 1 : 0;
4901 var altTest = getTest(pos), targetLocator = getLocator(altTest), tstLocator, closest, bestMatch; 4902 for (var ndx = 0; ndx < tests.length; ndx++) { 4903 var tst = tests[ndx]; 4904 tstLocator = getLocator(tst, targetLocator.length); 4905 var distance = Math.abs(tstLocator - targetLocator); 4906 if (closest === undefined || tstLocator !== "" && distance < closest || bestMatch && !opts.greedy && bestMatch.match.optionality && bestMatch.match.newBlockMarker === "master" && (!tst.match.optionality || !tst.match.newBlockMarker) || bestMatch && bestMatch.match.optionalQuantifier && !tst.match.optionalQuantifier) { 4907 closest = distance; 4908 bestMatch = tst; 4909 } 4910 } 4911 return bestMatch; 4912 } 4913 function getTestTemplate(pos, ndxIntlzr, tstPs) { 4914 return getMaskSet().validPositions[pos] || determineTestTemplate(pos, getTests(pos, ndxIntlzr ? ndxIntlzr.slice() : ndxIntlzr, tstPs)); 4915 } 4916 function getTest(pos, tests) { 4917 if (getMaskSet().validPositions[pos]) { 4918 return getMaskSet().validPositions[pos]; 4919 } 4920 return (tests || getTests(pos))[0]; 4921 } 4922 function positionCanMatchDefinition(pos, def) { 4923 var valid = false, tests = getTests(pos); 4924 for (var tndx = 0; tndx < tests.length; tndx++) { 4925 if (tests[tndx].match && tests[tndx].match.def === def) { 4926 valid = true; 4927 break; 4928 } 4929 } 4930 return valid; 4931 } 4932 function getTests(pos, ndxIntlzr, tstPs) { 4933 var maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr ? ndxIntlzr.slice() : [ 0 ], matches = [], insertStop = false, latestMatch, cacheDependency = ndxIntlzr ? ndxIntlzr.join("") : ""; 4934 function resolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) { 4935 function handleMatch(match, loopNdx, quantifierRecurse) { 4936 function isFirstMatch(latestMatch, tokenGroup) { 4937 var firstMatch = $.inArray(latestMatch, tokenGroup.matches) === 0; 4938 if (!firstMatch) { 4939 $.each(tokenGroup.matches, function(ndx, match) { 4940 if (match.isQuantifier === true) firstMatch = isFirstMatch(latestMatch, tokenGroup.matches[ndx - 1]); else if (match.hasOwnProperty("matches")) firstMatch = isFirstMatch(latestMatch, match); 4941 if (firstMatch) return false; 4942 }); 4943 } 4944 return firstMatch; 4945 } 4946 function resolveNdxInitializer(pos, alternateNdx, targetAlternation) { 4947 var bestMatch, indexPos; 4948 if (getMaskSet().tests[pos] || getMaskSet().validPositions[pos]) { 4949 $.each(getMaskSet().tests[pos] || [ getMaskSet().validPositions[pos] ], function(ndx, lmnt) { 4950 if (lmnt.mloc[alternateNdx]) { 4951 bestMatch = lmnt; 4952 return false; 4953 } 4954 var alternation = targetAlternation !== undefined ? targetAlternation : lmnt.alternation, ndxPos = lmnt.locator[alternation] !== undefined ? lmnt.locator[alternation].toString().indexOf(alternateNdx) : -1; 4955 if ((indexPos === undefined || ndxPos < indexPos) && ndxPos !== -1) { 4956 bestMatch = lmnt; 4957 indexPos = ndxPos; 4958 } 4959 }); 4960 } 4961 if (bestMatch) { 4962 var bestMatchAltIndex = bestMatch.locator[bestMatch.alternation]; 4963 var locator = bestMatch.mloc[alternateNdx] || bestMatch.mloc[bestMatchAltIndex] || bestMatch.locator; 4964 return locator.slice((targetAlternation !== undefined ? targetAlternation : bestMatch.alternation) + 1); 4965 } else { 4966 return targetAlternation !== undefined ? resolveNdxInitializer(pos, alternateNdx) : undefined; 4967 } 4968 } 4969 function isSubsetOf(source, target) { 4970 function expand(pattern) { 4971 var expanded = [], start, end; 4972 for (var i = 0, l = pattern.length; i < l; i++) { 4973 if (pattern.charAt(i) === "-") {
4974 end = pattern.charCodeAt(i + 1); 4975 while (++start < end) { 4976 expanded.push(String.fromCharCode(start)); 4977 } 4978 } else { 4979 start = pattern.charCodeAt(i); 4980 expanded.push(pattern.charAt(i)); 4981 } 4982 } 4983 return expanded.join(""); 4984 } 4985 if (opts.regex && source.match.fn !== null && target.match.fn !== null) { 4986 return expand(target.match.def.replace(/[\[\]]/g, "")).indexOf(expand(source.match.def.replace(/[\[\]]/g, ""))) !== -1; 4987 } 4988 return source.match.def === target.match.nativeDef; 4989 } 4990 function staticCanMatchDefinition(source, target) { 4991 var sloc = source.locator.slice(source.alternation).join(""), tloc = target.locator.slice(target.alternation).join(""), canMatch = sloc == tloc; 4992 canMatch = canMatch && source.match.fn === null && target.match.fn !== null ? target.match.fn.test(source.match.def, getMaskSet(), pos, false, opts, false) : false; 4993 return canMatch; 4994 } 4995 function setMergeLocators(targetMatch, altMatch) { 4996 if (altMatch === undefined || targetMatch.alternation === altMatch.alternation && targetMatch.locator[targetMatch.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) === -1) { 4997 targetMatch.mloc = targetMatch.mloc || {}; 4998 var locNdx = targetMatch.locator[targetMatch.alternation]; 4999 if (locNdx === undefined) targetMatch.alternation = undefined; else { 5000 if (typeof locNdx === "string") locNdx = locNdx.split(",")[0]; 5001 if (targetMatch.mloc[locNdx] === undefined) targetMatch.mloc[locNdx] = targetMatch.locator.slice(); 5002 if (altMatch !== undefined) { 5003 for (var ndx in altMatch.mloc) { 5004 if (typeof ndx === "string") ndx = ndx.split(",")[0]; 5005 if (targetMatch.mloc[ndx] === undefined) targetMatch.mloc[ndx] = altMatch.mloc[ndx]; 5006 } 5007 targetMatch.locator[targetMatch.alternation] = Object.keys(targetMatch.mloc).join(","); 5008 } 5009 return true; 5010 } 5011 } 5012 return false; 5013 } 5014 if (testPos > 500 && quantifierRecurse !== undefined) { 5015 throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + getMaskSet().mask; 5016 } 5017 if (testPos === pos && match.matches === undefined) { 5018 matches.push({ 5019 match: match, 5020 locator: loopNdx.reverse(), 5021 cd: cacheDependency, 5022 mloc: {} 5023 }); 5024 return true; 5025 } else if (match.matches !== undefined) { 5026 if (match.isGroup && quantifierRecurse !== match) { 5027 match = handleMatch(maskToken.matches[$.inArray(match, maskToken.matches) + 1], loopNdx, quantifierRecurse); 5028 if (match) return true; 5029 } else if (match.isOptional) { 5030 var optionalToken = match; 5031 match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse); 5032 if (match) { 5033 $.each(matches, function(ndx, mtch) { 5034 mtch.match.optionality = true; 5035 }); 5036 latestMatch = matches[matches.length - 1].match; 5037 if (quantifierRecurse === undefined && isFirstMatch(latestMatch, optionalToken)) { 5038 insertStop = true; 5039 testPos = pos; 5040 } else return true; 5041 } 5042 } else if (match.isAlternator) { 5043 var alternateToken = match, malternateMatches = [], maltMatches, currentMatches = matches.slice(), loopNdxCnt = loopNdx.length; 5044 var altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1; 5045 if (altIndex === -1 || typeof altIndex === "string") { 5046 var currentPos = testPos, ndxInitializerClone = ndxInitializer.slice(), altIndexArr = [], amndx; 5047 if (typeof altIndex == "string") { 5048 altIndexArr = altIndex.split(","); 5049 } else { 5050 for (amndx = 0;
5050 amndx < alternateToken.matches.length; amndx++) { 5051 altIndexArr.push(amndx.toString()); 5052 } 5053 } 5054 if (getMaskSet().excludes[pos]) { 5055 var altIndexArrClone = altIndexArr.slice(); 5056 for (var i = 0, el = getMaskSet().excludes[pos].length; i < el; i++) { 5057 altIndexArr.splice(altIndexArr.indexOf(getMaskSet().excludes[pos][i].toString()), 1); 5058 } 5059 if (altIndexArr.length === 0) { 5060 getMaskSet().excludes[pos] = undefined; 5061 altIndexArr = altIndexArrClone; 5062 } 5063 } 5064 if (opts.keepStatic === true || isFinite(parseInt(opts.keepStatic)) && currentPos >= opts.keepStatic) altIndexArr = altIndexArr.slice(0, 1); 5065 var unMatchedAlternation = false; 5066 for (var ndx = 0; ndx < altIndexArr.length; ndx++) { 5067 amndx = parseInt(altIndexArr[ndx]); 5068 matches = []; 5069 ndxInitializer = typeof altIndex === "string" ? resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice() : ndxInitializerClone.slice(); 5070 if (alternateToken.matches[amndx] && handleMatch(alternateToken.matches[amndx], [ amndx ].concat(loopNdx), quantifierRecurse)) match = true; else if (ndx === 0) { 5071 unMatchedAlternation = true; 5072 } 5073 maltMatches = matches.slice(); 5074 testPos = currentPos; 5075 matches = []; 5076 for (var ndx1 = 0; ndx1 < maltMatches.length; ndx1++) { 5077 var altMatch = maltMatches[ndx1], dropMatch = false; 5078 altMatch.match.jit = altMatch.match.jit || unMatchedAlternation; 5079 altMatch.alternation = altMatch.alternation || loopNdxCnt; 5080 setMergeLocators(altMatch); 5081 for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) { 5082 var altMatch2 = malternateMatches[ndx2]; 5083 if (typeof altIndex !== "string" || altMatch.alternation !== undefined && $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) { 5084 if (altMatch.match.nativeDef === altMatch2.match.nativeDef) { 5085 dropMatch = true; 5086 setMergeLocators(altMatch2, altMatch); 5087 break; 5088 } else if (isSubsetOf(altMatch, altMatch2)) { 5089 if (setMergeLocators(altMatch, altMatch2)) { 5090 dropMatch = true; 5091 malternateMatches.splice(malternateMatches.indexOf(altMatch2), 0, altMatch); 5092 } 5093 break; 5094 } else if (isSubsetOf(altMatch2, altMatch)) { 5095 setMergeLocators(altMatch2, altMatch); 5096 break; 5097 } else if (staticCanMatchDefinition(altMatch, altMatch2)) { 5098 if (setMergeLocators(altMatch, altMatch2)) { 5099 dropMatch = true; 5100 malternateMatches.splice(malternateMatches.indexOf(altMatch2), 0, altMatch); 5101 } 5102 break; 5103 } 5104 } 5105 } 5106 if (!dropMatch) { 5107 malternateMatches.push(altMatch); 5108 } 5109 } 5110 } 5111 matches = currentMatches.concat(malternateMatches); 5112 testPos = pos; 5113 insertStop = matches.length > 0; 5114 match = malternateMatches.length > 0; 5115 ndxInitializer = ndxInitializerClone.slice(); 5116 } else match = handleMatch(alternateToken.matches[altIndex] || maskToken.matches[altIndex], [ altIndex ].concat(loopNdx), quantifierRecurse); 5117 if (match) return true; 5118 } else if (match.isQuantifier && quantifierRecurse !== maskToken.matches[$.inArray(match, maskToken.matches) - 1]) { 5119 var qt = match; 5120 for (var qndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; qndx < (isNaN(qt.quantifier.max) ? qndx + 1 : qt.quantifier.max) && testPos <= pos; qndx++) { 5121 var tokenGroup = maskToken.matches[$.inArray(qt, maskToken.matches) - 1]; 5122 match = handleMatch(tokenGroup, [ qndx ].concat(loopNdx), tokenGroup); 5123 if (match) { 5124 latestMatch = matches[matches.length - 1].match; 5125 latestMatch.optionalQuantifier = qndx >= qt.quantifier.min; 5126 latestMatch.jit = (qndx || 1) * tokenGroup.matches.indexOf(latestMatch) >= qt.quantifier.jit; 5127 if (latestMatch.optionalQuantifier && isFirstMatch(latestMatch, tokenGroup)) { 5128 insertStop = true; 5129 testPos = pos; 5130 break; 5131 } 5132 if (latestMatch.jit) { 5133 getMaskSet().jitOffset[pos] = tokenGroup.matches.indexOf(latestMatch); 5134 } 5135 return true; 5136 } 5137 } 5138 } else { 5139 match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse); 5140 if (match) return true; 5141 } 5142 } else { 5143 testPos++; 5144 } 5145 } 5146 for (var tndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; tndx < maskToken.matches.length; tndx++) { 5147 if (maskToken.matches[tndx].isQuantifier !== true) { 5148 var match = handleMatch(maskToken.matches[tndx], [ tndx ].concat(loopNdx), quantifierRecurse); 5149 if (match && testPos === pos) { 5150 return match; 5151 } else if (testPos > pos) { 5152 break; 5153 } 5154 } 5155 } 5156 } 5157 function mergeLocators(pos, tests) { 5158 var locator = []; 5159 if (!$.isArray(tests)) tests = [ tests ]; 5160 if (tests.length > 0) { 5161 if (tests[0].alternation === undefined) { 5162 locator = determineTestTemplate(pos, tests.slice()).locator.slice(); 5163 if (locator.length === 0) locator = tests[0].locator.slice(); 5164 } else { 5165 $.each(tests, function(ndx, tst) { 5166 if (tst.def !== "") { 5167 if (locator.length === 0) locator = t
5167st.locator.slice(); else { 5168 for (var i = 0; i < locator.length; i++) { 5169 if (tst.locator[i] && locator[i].toString().indexOf(tst.locator[i]) === -1) { 5170 locator[i] += "," + tst.locator[i]; 5171 } 5172 } 5173 } 5174 } 5175 }); 5176 } 5177 } 5178 return locator; 5179 } 5180 if (pos > -1) { 5181 if (ndxIntlzr === undefined) { 5182 var previousPos = pos - 1, test; 5183 while ((test = getMaskSet().validPositions[previousPos] || getMaskSet().tests[previousPos]) === undefined && previousPos > -1) { 5184 previousPos--; 5185 } 5186 if (test !== undefined && previousPos > -1) { 5187 ndxInitializer = mergeLocators(previousPos, test); 5188 cacheDependency = ndxInitializer.join(""); 5189 testPos = previousPos; 5190 } 5191 } 5192 if (getMaskSet().tests[pos] && getMaskSet().tests[pos][0].cd === cacheDependency) { 5193 return getMaskSet().tests[pos]; 5194 } 5195 for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length; mtndx++) { 5196 var match = resolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]); 5197 if (match && testPos === pos || testPos > pos) { 5198 break; 5199 } 5200 } 5201 } 5202 if (matches.length === 0 || insertStop) { 5203 matches.push({ 5204 match: { 5205 fn: null, 5206 optionality: false, 5207 casing: null, 5208 def: "", 5209 placeholder: "" 5210 }, 5211 locator: [], 5212 mloc: {}, 5213 cd: cacheDependency 5214 }); 5215 } 5216 if (ndxIntlzr !== undefined && getMaskSet().tests[pos]) { 5217 return $.extend(true, [], matches); 5218 } 5219 getMaskSet().tests[pos] = $.extend(true, [], matches); 5220 return getMaskSet().tests[pos]; 5221 } 5222 function getBufferTemplate() { 5223 if (getMaskSet()._buffer === undefined) { 5224 getMaskSet()._buffer = getMaskTemplate(false, 1); 5225 if (getMaskSet().buffer === undefined) getMaskSet().buffer = getMaskSet()._buffer.slice(); 5226 } 5227 return getMaskSet()._buffer; 5228 } 5229 function getBuffer(noCache) { 5230 if (getMaskSet().buffer === undefined || noCache === true) { 5231 getMaskSet().buffer = getMaskTemplate(true, getLastValidPosition(), true); 5232 if (getMaskSet()._buffer === undefined) getMaskSet()._buffer = getMaskSet().buffer.slice(); 5233 } 5234 return getMaskSet().buffer; 5235 } 5236 function refreshFromBuffer(start, end, buffer) { 5237 var i, p; 5238 if (start === true) { 5239 resetMaskSet(); 5240 start = 0; 5241 end = buffer.length; 5242 } else { 5243 for (i = start; i < end; i++) { 5244 delete getMaskSet().validPositions[i]; 5245 } 5246 } 5247 p = start; 5248 for (i = start; i < end; i++) { 5249 resetMaskSet(true); 5250 if (buffer[i] !== opts.skipOptionalPartCharacter) { 5251 var valResult = isValid(p, buffer[i], true, true); 5252 if (valResult !== false) { 5253 resetMaskSet(true); 5254 p = valResult.caret !== undefined ? valResult.caret : valResult.pos + 1; 5255 } 5256 } 5257 } 5258 } 5259 function casing(elem, test, pos) { 5260 switch (opts.casing || test.casing) { 5261 case "upper": 5262 elem = elem.toUpperCase(); 5263 break; 5264 5265 case "lower": 5266 elem = elem.toLowerCase(); 5267 break; 5268 5269 case "title": 5270 var posBefore = getMaskSet().validPositions[pos - 1]; 5271 if (pos === 0 || posBefore && posBefore.input === String.fromCharCode(Inputmask.keyCode.SPACE)) { 5272 elem = elem.toUpperCase(); 5273 } else { 5274 elem = elem.toLowerCase(); 5275 } 5276 break; 5277 5278 default: 5279 if ($.isFunction(opts.casing)) { 5280 var args = Array.prototype.slice.call(arguments); 5281 args.push(getMaskSet().validPositions); 5282 elem = opts.casing.apply(this, args); 5283 } 5284 } 5285 return elem; 5286 } 5287 function checkAlternationMatch(altArr1, altArr2, na) { 5288 var altArrC = opts.greedy ? altArr2 : altArr2.slice(0, 1), isMatch = false, naArr = na !== undefined ? na.split(",") : [], naNdx; 5289 for (var i = 0; i < naArr.length; i++) { 5290 if ((naNdx = altArr1.indexOf(naArr[i])) !== -1) { 5291 altArr1.splice(naNdx, 1); 5292 } 5293 } 5294 for (var alndx = 0; alndx < altArr1.length; alndx++) { 5295 if ($.inArray(altArr1[alndx], altArrC) !== -1) { 5296 isMatch = true; 5297 break; 5298 } 5299 } 5300 return isMatch; 5301 } 5302 function alternate(pos, c, strict, fromSetValid, rAltPos) {
5303 var validPsClone = $.extend(true, {}, getMaskSet().validPositions), lastAlt, alternation, isValidRslt = false, altPos, prevAltPos, i, validPos, decisionPos, lAltPos = rAltPos !== undefined ? rAltPos : getLastValidPosition(); 5304 if (lAltPos === -1 && rAltPos === undefined) { 5305 lastAlt = 0; 5306 prevAltPos = getTest(lastAlt); 5307 alternation = prevAltPos.alternation; 5308 } else { 5309 for (;lAltPos >= 0; lAltPos--) { 5310 altPos = getMaskSet().validPositions[lAltPos]; 5311 if (altPos && altPos.alternation !== undefined) { 5312 if (prevAltPos && prevAltPos.locator[altPos.alternation] !== altPos.locator[altPos.alternation]) { 5313 break; 5314 } 5315 lastAlt = lAltPos; 5316 alternation = getMaskSet().validPositions[lastAlt].alternation; 5317 prevAltPos = altPos; 5318 } 5319 } 5320 } 5321 if (alternation !== undefined) { 5322 decisionPos = parseInt(lastAlt); 5323 getMaskSet().excludes[decisionPos] = getMaskSet().excludes[decisionPos] || []; 5324 if (pos !== true) { 5325 getMaskSet().excludes[decisionPos].push(getDecisionTaker(prevAltPos)); 5326 } 5327 var validInputsClone = [], staticInputsBeforePos = 0; 5328 for (i = decisionPos; i < getLastValidPosition(undefined, true) + 1; i++) { 5329 validPos = getMaskSet().validPositions[i]; 5330 if (validPos && validPos.generatedInput !== true) { 5331 validInputsClone.push(validPos.input); 5332 } else if (i < pos) staticInputsBeforePos++; 5333 delete getMaskSet().validPositions[i]; 5334 } 5335 while (getMaskSet().excludes[decisionPos] && getMaskSet().excludes[decisionPos].length < 10) { 5336 var posOffset = staticInputsBeforePos * -1, validInputs = validInputsClone.slice(); 5337 getMaskSet().tests[decisionPos] = undefined; 5338 resetMaskSet(true); 5339 isValidRslt = true; 5340 while (validInputs.length > 0) { 5341 var input = validInputs.shift(); 5342 if (!(isValidRslt = isValid(getLastValidPosition(undefined, true) + 1, input, false, fromSetValid, true))) { 5343 break; 5344 } 5345 } 5346 if (isValidRslt && c !== undefined) { 5347 var targetLvp = getLastValidPosition(pos) + 1; 5348 for (i = decisionPos; i < getLastValidPosition() + 1; i++) { 5349 validPos = getMaskSet().validPositions[i]; 5350 if ((validPos === undefined || validPos.match.fn == null) && i < pos + posOffset) { 5351 posOffset++; 5352 } 5353 } 5354 pos = pos + posOffset; 5355 isValidRslt = isValid(pos > targetLvp ? targetLvp : pos, c, strict, fromSetValid, true); 5356 } 5357 if (!isValidRslt) { 5358 resetMaskSet(); 5359 prevAltPos = getTest(decisionPos); 5360 getMaskSet().validPositions = $.extend(true, {}, validPsClone); 5361 if (getMaskSet().excludes[decisionPos]) { 5362 var decisionTaker = getDecisionTaker(prevAltPos); 5363 if (getMaskSet().excludes[decisionPos].indexOf(decisionTaker) !== -1) { 5364 isValidRslt = alternate(pos, c, strict, fromSetValid, decisionPos - 1); 5365 break; 5366 } 5367 getMaskSet().excludes[decisionPos].push(decisionTaker); 5368 for (i = decisionPos; i < getLastValidPosition(undefined, true) + 1; i++) { 5369 delete getMaskSet().validPositions[i]; 5370 } 5371 } else { 5372 isValidRslt = alternate(pos, c, strict, fromSetValid, decisionPos - 1); 5373 break; 5374 } 5375 } else break; 5376 } 5377 } 5378 getMaskSet().excludes[decisionPos] = undefined; 5379 return isValidRslt; 5380 } 5381 function isValid(pos, c, strict, fromSetValid, fromAlternate, validateOnly) { 5382 function isSelection(posObj) { 5383 return isRTL ? posObj.begin - posObj.end > 1 || posObj.begin - posObj.end === 1 : posObj.end - posObj.begin > 1 || posObj.end - posObj.begin === 1; 5384 }
5385 strict = strict === true; 5386 var maskPos = pos; 5387 if (pos.begin !== undefined) { 5388 maskPos = isRTL ? pos.end : pos.begin; 5389 } 5390 function _isValid(position, c, strict) { 5391 var rslt = false; 5392 $.each(getTests(position), function(ndx, tst) { 5393 var test = tst.match; 5394 getBuffer(true); 5395 rslt = test.fn != null ? test.fn.test(c, getMaskSet(), position, strict, opts, isSelection(pos)) : (c === test.def || c === opts.skipOptionalPartCharacter) && test.def !== "" ? { 5396 c: getPlaceholder(position, test, true) || test.def, 5397 pos: position 5398 } : false; 5399 if (rslt !== false) { 5400 var elem = rslt.c !== undefined ? rslt.c : c, validatedPos = position; 5401 elem = elem === opts.skipOptionalPartCharacter && test.fn === null ? getPlaceholder(position, test, true) || test.def : elem; 5402 if (rslt.remove !== undefined) { 5403 if (!$.isArray(rslt.remove)) rslt.remove = [ rslt.remove ]; 5404 $.each(rslt.remove.sort(function(a, b) { 5405 return b - a; 5406 }), function(ndx, lmnt) { 5407 revalidateMask({ 5408 begin: lmnt, 5409 end: lmnt + 1 5410 }); 5411 }); 5412 } 5413 if (rslt.insert !== undefined) { 5414 if (!$.isArray(rslt.insert)) rslt.insert = [ rslt.insert ]; 5415 $.each(rslt.insert.sort(function(a, b) { 5416 return a - b; 5417 }), function(ndx, lmnt) { 5418 isValid(lmnt.pos, lmnt.c, true, fromSetValid); 5419 }); 5420 } 5421 if (rslt !== true && rslt.pos !== undefined && rslt.pos !== position) { 5422 validatedPos = rslt.pos; 5423 } 5424 if (rslt !== true && rslt.pos === undefined && rslt.c === undefined) { 5425 return false; 5426 } 5427 if (!revalidateMask(pos, $.extend({}, tst, { 5428 input: casing(elem, test, validatedPos) 5429 }), fromSetValid, validatedPos)) { 5430 rslt = false; 5431 } 5432 return false; 5433 } 5434 }); 5435 return rslt; 5436 } 5437 var result = true, positionsClone = $.extend(true, {}, getMaskSet().validPositions); 5438 if ($.isFunction(opts.preValidation) && !strict && fromSetValid !== true && validateOnly !== true) { 5439 result = opts.preValidation(getBuffer(), maskPos, c, isSelection(pos), opts, getMaskSet()); 5440 } 5441 if (result === true) { 5442 trackbackPositions(undefined, maskPos, true); 5443 if (maxLength === undefined || maskPos < maxLength) { 5444 result = _isValid(maskPos, c, strict); 5445 if ((!strict || fromSetValid === true) && result === false && validateOnly !== true) { 5446 var currentPosValid = getMaskSet().validPositions[maskPos]; 5447 if (currentPosValid && currentPosValid.match.fn === null && (currentPosValid.match.def === c || c === opts.skipOptionalPartCharacter)) { 5448 result = { 5449 caret: seekNext(maskPos) 5450 }; 5451 } else { 5452 if ((opts.insertMode || getMaskSet().validPositions[seekNext(maskPos)] === undefined) && (!isMask(maskPos, true) || getMaskSet().jitOffset[maskPos])) { 5453 if (getMaskSet().jitOffset[maskPos] && getMaskSet().validPositions[seekNext(maskPos)] === undefined) { 5454 result = isValid(maskPos + getMaskSet().jitOffset[maskPos], c, strict); 5455 if (result !== false) result.caret = maskPos; 5456 } else for (var nPos = maskPos + 1, snPos = seekNext(maskPos); nPos <= snPos; nPos++) { 5457 result = _isValid(nPos, c, strict); 5458 if (result !== false) { 5459 result = trackbackPositions(maskPos, result.pos !== undefined ? result.pos : nPos) || result; 5460 maskPos = nPos; 5461 break; 5462 } 5463 } 5464 } 5465 } 5466 } 5467 } 5468 if (result === false && opts.keepStatic !== false && (opts.regex == null || isComplete(getBuffer())) && !strict && fromAlternate !== true) { 5469 result = alternate(maskPos, c, strict, fromSetValid); 5470 } 5471 if (result === true) { 5472 result = { 5473 pos: maskPos 5474 }; 5475 } 5476 } 5477 if ($.isFunction(opts.postValidation) && result !== false && !strict && fromSetValid !== true && validateOnly !== true) { 5478 var postResult = opts.postValidation(getBuffer(true), pos.begin !== undefined ? isRTL ? pos.end : pos.begin : pos, result, opts); 5479 if (postResult !== undefined) { 5480 if (postResult.refreshFromBuffer && postResult.buffer) { 5481 var refresh = postResult.refreshFromBuffer; 5482 refreshFromBuffer(refresh === true ? refresh : refresh.start, refresh.end, postResult.buffer); 5483 } 5484 result = postResult === true ? result : postResult; 5485 } 5486 } 5487 if (result && result.pos === undefined) { 5488 result.pos = maskPos; 5489 } 5490 if (result === false || validateOnly === true) { 5491 resetMaskSet(true); 5492 getMaskSet().validPositions = $.extend(true, {}, positionsClone); 5493 } 5494 return result; 5495 } 5496 function trackbackPositions(originalPos, newPos, fillOnly) { 5497 var result; 5498 if (originalPos === undefined) { 5499 for (originalPos = newPos - 1; originalPos > 0; originalPos--) { 5500 if (getMaskSet().validPositions[originalPos]) break; 5501 } 5502 } 5503 for (var ps = originalPos; ps < newPos; ps++) { 5504 if (getMaskSet().validPositions[ps] === undefined && !isMask(ps, true)) { 5505 var vp = ps == 0 ? getTest(ps) : getMaskSet().validPositions[ps - 1]; 5506 if (vp) { 5507 var tests = getTests(ps).slice(); 5508 if (tests[tests.length - 1].match.def === "") tests.pop(); 5509 var bestMatch = determineTestTemplate(ps, tests); 5510 bestMatch = $.extend({}, bestMatch, { 5511 input: getPlaceholder(ps, bestMatch.match, true) || bestMatch.match.def 5512 }); 5513 bestMatch.generatedInput = true; 5514 revalidateMask(ps, bestMatch, true); 5515 if (fillOnly !== true) { 5516 var cvpInput = getMaskSet().validPositions[newPos].input; 5517 getMaskSet().validPositions[newPos] = undefined; 5518 result = isValid(newPos, cvpInput, true, true); 5519 } 5520 } 5521 } 5522 } 5523 return result; 5524 } 5525 function revalidateMask(pos, validTest, fromSetValid, validatedPos) { 5526 function IsEnclosedStatic(pos, valids, selection) { 5527 var posMatch = valids[pos]; 5528 if (posMatch !== undefined && (posMatch.match.fn === null && posMatch.match.optionality !== true || posMatch.input === opts.radixPoint)) { 5529 var prevMatch = selection.begin <= pos - 1 ? valids[pos - 1] && valids[pos - 1].match.fn === null && valids[pos - 1] : valids[pos - 1], nextMatch = selection.end > pos + 1 ? valids[pos + 1] && valids[pos + 1].match.fn === null && valids[pos + 1] : valids[pos + 1]; 5530 return prevMatch && nextMatch; 5531 } 5532 return false;
5533 } 5534 var begin = pos.begin !== undefined ? pos.begin : pos, end = pos.end !== undefined ? pos.end : pos; 5535 if (pos.begin > pos.end) { 5536 begin = pos.end; 5537 end = pos.begin; 5538 } 5539 validatedPos = validatedPos !== undefined ? validatedPos : begin; 5540 if (begin !== end || opts.insertMode && getMaskSet().validPositions[validatedPos] !== undefined && fromSetValid === undefined) { 5541 var positionsClone = $.extend(true, {}, getMaskSet().validPositions), lvp = getLastValidPosition(undefined, true), i; 5542 getMaskSet().p = begin; 5543 for (i = lvp; i >= begin; i--) { 5544 if (getMaskSet().validPositions[i] && getMaskSet().validPositions[i].match.nativeDef === "+") { 5545 opts.isNegative = false; 5546 } 5547 delete getMaskSet().validPositions[i]; 5548 } 5549 var valid = true, j = validatedPos, vps = getMaskSet().validPositions, needsValidation = false, posMatch = j, i = j; 5550 if (validTest) { 5551 getMaskSet().validPositions[validatedPos] = $.extend(true, {}, validTest); 5552 posMatch++; 5553 j++; 5554 if (begin < end) i++; 5555 } 5556 for (;i <= lvp; i++) { 5557 var t = positionsClone[i]; 5558 if (t !== undefined && (i >= end || i >= begin && t.generatedInput !== true && IsEnclosedStatic(i, positionsClone, { 5559 begin: begin, 5560 end: end 5561 }))) { 5562 while (getTest(posMatch).match.def !== "") { 5563 if (needsValidation === false && positionsClone[posMatch] && positionsClone[posMatch].match.nativeDef === t.match.nativeDef) { 5564 getMaskSet().validPositions[posMatch] = $.extend(true, {}, positionsClone[posMatch]); 5565 getMaskSet().validPositions[posMatch].input = t.input; 5566 trackbackPositions(undefined, posMatch, true); 5567 j = posMatch + 1; 5568 valid = true; 5569 } else if (opts.shiftPositions && positionCanMatchDefinition(posMatch, t.match.def)) { 5570 var result = isValid(posMatch, t.input, true, true); 5571 valid = result !== false; 5572 j = result.caret || result.insert ? getLastValidPosition() : posMatch + 1; 5573 needsValidation = true; 5574 } else { 5575 valid = t.generatedInput === true || t.input === opts.radixPoint && opts.numericInput === true; 5576 } 5577 if (valid) break; 5578 if (!valid && posMatch > end && isMask(posMatch, true) && (t.match.fn !== null || posMatch > getMaskSet().maskLength)) { 5579 break; 5580 } 5581 posMatch++; 5582 } 5583 if (getTest(posMatch).match.def == "") valid = false; 5584 posMatch = j; 5585 } 5586 if (!valid) break; 5587 } 5588 if (!valid) { 5589 getMaskSet().validPositions = $.extend(true, {}, positionsClone); 5590 resetMaskSet(true); 5591 return false; 5592 } 5593 } else if (validTest) { 5594 getMaskSet().validPositions[validatedPos] = $.extend(true, {}, validTest); 5595 } 5596 resetMaskSet(true); 5597 return true; 5598 } 5599 function isMask(pos, strict) { 5600 var test = getTestTemplate(pos).match; 5601 if (test.def === "") test = getTest(pos).match; 5602 if (test.fn != null) { 5603 return test.fn; 5604 } 5605 if (strict !== true && pos > -1) { 5606 var tests = getTests(pos); 5607 return tests.length > 1 + (tests[tests.length - 1].match.def === "" ? 1 : 0); 5608 } 5609 return false;
5610 } 5611 function seekNext(pos, newBlock) { 5612 var position = pos + 1; 5613 while (getTest(position).match.def !== "" && (newBlock === true && (getTest(position).match.newBlockMarker !== true || !isMask(position)) || newBlock !== true && !isMask(position))) { 5614 position++; 5615 } 5616 return position; 5617 } 5618 function seekPrevious(pos, newBlock) { 5619 var position = pos, tests; 5620 if (position <= 0) return 0; 5621 while (--position > 0 && (newBlock === true && getTest(position).match.newBlockMarker !== true || newBlock !== true && !isMask(position) && (tests = getTests(position), 5622 tests.length < 2 || tests.length === 2 && tests[1].match.def === ""))) {} 5623 return position; 5624 } 5625 function writeBuffer(input, buffer, caretPos, event, triggerEvents) { 5626 if (event && $.isFunction(opts.onBeforeWrite)) { 5627 var result = opts.onBeforeWrite.call(inputmask, event, buffer, caretPos, opts); 5628 if (result) { 5629 if (result.refreshFromBuffer) { 5630 var refresh = result.refreshFromBuffer; 5631 refreshFromBuffer(refresh === true ? refresh : refresh.start, refresh.end, result.buffer || buffer); 5632 buffer = getBuffer(true); 5633 } 5634 if (caretPos !== undefined) caretPos = result.caret !== undefined ? result.caret : caretPos; 5635 } 5636 } 5637 if (input !== undefined) { 5638 input.inputmask._valueSet(buffer.join("")); 5639 if (caretPos !== undefined && (event === undefined || event.type !== "blur")) { 5640 caret(input, caretPos); 5641 } else renderColorMask(input, caretPos, buffer.length === 0); 5642 if (triggerEvents === true) { 5643 var $input = $(input), nptVal = input.inputmask._valueGet(); 5644 skipInputEvent = true; 5645 $input.trigger("input"); 5646 setTimeout(function() { 5647 if (nptVal === getBufferTemplate().join("")) { 5648 $input.trigger("cleared"); 5649 } else if (isComplete(buffer) === true) { 5650 $input.trigger("complete"); 5651 } 5652 }, 0); 5653 } 5654 } 5655 } 5656 function getPlaceholder(pos, test, returnPL) { 5657 test = test || getTest(pos).match; 5658 if (test.placeholder !== undefined || returnPL === true) { 5659 return $.isFunction(test.placeholder) ? test.placeholder(opts) : test.placeholder; 5660 } else if (test.fn === null) { 5661 if (pos > -1 && getMaskSet().validPositions[pos] === undefined) { 5662 var tests = getTests(pos), staticAlternations = [], prevTest; 5663 if (tests.length > 1 + (tests[tests.length - 1].match.def === "" ? 1 : 0)) { 5664 for (var i = 0; i < tests.length; i++) { 5665 if (tests[i].match.optionality !== true && tests[i].match.optionalQuantifier !== true && (tests[i].match.fn === null || prevTest === undefined || tests[i].match.fn.test(prevTest.match.def, getMaskSet(), pos, true, opts) !== false)) { 5666 staticAlternations.push(tests[i]); 5667 if (tests[i].match.fn === null) prevTest = tests[i]; 5668 if (staticAlternations.length > 1) { 5669 if (/[0-9a-bA-Z]/.test(staticAlternations[0].match.def)) { 5670 return opts.placeholder.charAt(pos % opts.placeholder.length); 5671 } 5672 } 5673 } 5674 } 5675 } 5676 } 5677 return test.def; 5678 } 5679 return opts.placeholder.charAt(pos % opts.placeholder.length); 5680 } 5681 function HandleNativePlaceholder(npt, value) { 5682 if (ie) { 5683 if (npt.inputmask._valueGet() !== value && (npt.placeholder !== value || npt.placeholder === "")) { 5684 var buffer = getBuffer().slice(), nptValue = npt.inputmask._valueGet(); 5685 if (nptValue !== value) { 5686 var lvp = getLastValidPosition(); 5687 if (lvp === -1 && nptValue === getBufferTemplate().join("")) { 5688 buffer = []; 5689 } else if (lvp !== -1) { 5690 clearOptionalTail(buffer); 5691 } 5692 writeBuffer(npt, buffer); 5693 } 5694 } 5695 } else if (npt.placeholder !== value) { 5696 npt.placeholder = value; 5697 if (npt.placeholder === "") npt.removeAttribute("placeholder"); 5698 } 5699 } 5700 var EventRuler = { 5701 on: function on(input, eventName, eventHandler) { 5702 var ev = function ev(e) { 5703 var that = this; 5704 if (that.inputmask === undefined && this.nodeName !== "FORM") { 5705 var imOpts = $.data(that, "_inputmask_opts"); 5706 if (imOpts) new Inputmask(imOpts).mask(that); else EventRuler.off(that); 5707 } else if (e.type !== "setvalue" && this.nodeName !== "FORM" && (that.disabled || that.readOnly && !(e.type === "keydown" && e.ctrlKey && e.keyCode === 67 || opts.tabThrough === false && e.keyCode === Inputmask.keyCode.TAB))) { 5708 e.preventDefault(); 5709 } else { 5710 switch (e.type) { 5711 case "input": 5712 if (skipInputEvent === true) { 5713 skipInputEvent = false;
5714 return e.preventDefault(); 5715 } 5716 if (mobile) { 5717 var args = arguments; 5718 setTimeout(function() { 5719 eventHandler.apply(that, args); 5720 caret(that, that.inputmask.caretPos, undefined, true); 5721 }, 0); 5722 return false; 5723 } 5724 break; 5725 5726 case "keydown": 5727 skipKeyPressEvent = false; 5728 skipInputEvent = false; 5729 break; 5730 5731 case "keypress": 5732 if (skipKeyPressEvent === true) { 5733 return e.preventDefault(); 5734 } 5735 skipKeyPressEvent = true; 5736 break; 5737 5738 case "click": 5739 if (iemobile || iphone) { 5740 var args = arguments; 5741 setTimeout(function() { 5742 eventHandler.apply(that, args); 5743 }, 0); 5744 return false; 5745 } 5746 break; 5747 } 5748 var returnVal = eventHandler.apply(that, arguments); 5749 if (returnVal === false) { 5750 e.preventDefault(); 5751 e.stopPropagation(); 5752 } 5753 return returnVal; 5754 } 5755 }; 5756 input.inputmask.events[eventName] = input.inputmask.events[eventName] || []; 5757 input.inputmask.events[eventName].push(ev); 5758 if ($.inArray(eventName, [ "submit", "reset" ]) !== -1) { 5759 if (input.form !== null) $(input.form).on(eventName, ev); 5760 } else { 5761 $(input).on(eventName, ev); 5762 } 5763 }, 5764 off: function off(input, event) { 5765 if (input.inputmask && input.inputmask.events) { 5766 var events; 5767 if (event) { 5768 events = []; 5769 events[event] = input.inputmask.events[event]; 5770 } else { 5771 events = input.inputmask.events; 5772 } 5773 $.each(events, function(eventName, evArr) { 5774 while (evArr.length > 0) { 5775 var ev = evArr.pop(); 5776 if ($.inArray(eventName, [ "submit", "reset" ]) !== -1) { 5777 if (input.form !== null) $(input.form).off(eventName, ev); 5778 } else { 5779 $(input).off(eventName, ev); 5780 } 5781 } 5782 delete input.inputmask.events[eventName]; 5783 }); 5784 } 5785 } 5786 }; 5787 var EventHandlers = { 5788 keydownEvent: function keydownEvent(e) { 5789 var input = this, $input = $(input), k = e.keyCode, pos = caret(input); 5790 if (k === Inputmask.keyCode.BACKSPACE || k === Inputmask.keyCode.DELETE || iphone && k === Inputmask.keyCode.BACKSPACE_SAFARI || e.ctrlKey && k === Inputmask.keyCode.X && !isInputEventSupported("cut")) { 5791 e.preventDefault(); 5792 handleRemove(input, k, pos); 5793 writeBuffer(input, getBuffer(true), getMaskSet().p, e, input.inputmask._valueGet() !== getBuffer().join("")); 5794 } else if (k === Inputmask.keyCode.END || k === Inputmask.keyCode.PAGE_DOWN) { 5795 e.preventDefault(); 5796 var caretPos = seekNext(getLastValidPosition()); 5797 caret(input, e.shiftKey ? pos.begin : caretPos, caretPos, true); 5798 } else if (k === Inputmask.keyCode.HOME && !e.shiftKey || k === Inputmask.keyCode.PAGE_UP) { 5799 e.preventDefault(); 5800 caret(input, 0, e.shiftKey ? pos.begin : 0, true); 5801 } else if ((opts.undoOnEscape && k === Inputmask.keyCode.ESCAPE || k === 90 && e.ctrlKey) && e.altKey !== true) { 5802 checkVal(input, true, false, undoValue.split("")); 5803 $input.trigger("click"); 5804 } else if (k === Inputmask.keyCode.INSERT && !(e.shiftKey || e.ctrlKey)) { 5805 opts.insertMode = !opts.insertMode; 5806 input.setAttribute("im-insert", opts.insertMode); 5807 } else if (opts.tabThrough === true && k === Inputmask.keyCode.TAB) { 5808 if (e.shiftKey === true) { 5809 if (getTest(pos.begin).match.fn === null) { 5810 pos.begin = seekNext(pos.begin); 5811 } 5812 pos.end = seekPrevious(pos.begin, true); 5813 pos.begin = seekPrevious(pos.end, true); 5814 } else { 5815 pos.begin = seekNext(pos.begin, true); 5816 pos.end = seekNext(pos.begin, true); 5817 if (pos.end < getMaskSet().maskLength) pos.end--; 5818 } 5819 if (pos.begin < getMaskSet().maskLength) { 5820 e.preventDefault(); 5821 caret(input, pos.begin, pos.end); 5822 } 5823 } 5824 opts.onKeyDown.call(this, e, getBuffer(), caret(input).begin, opts); 5825 ignorable = $.inArray(k, opts.ignorables) !== -1; 5826 }, 5827 keypressEvent: function keypressEvent(e, checkval, writeOut, strict, ndx) { 5828 var input = this, $input = $(input), k = e.which || e.charCode || e.keyCode; 5829 if (checkval !== true && !(e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable)) { 5830 if (k === Inputmask.keyCode.ENTER && undoValue !== getBuffer().join("")) { 5831 undoValue = getBuffer().join(""); 5832 setTimeout(function() { 5833 $input.trigger("change"); 5834 }, 0); 5835 } 5836 return true; 5837 } else { 5838 if (k) { 5839 if (k === 46 && e.shiftKey === false && opts.radixPoint !== "") k = opts.radixPoint.charCodeAt(0); 5840 var pos = checkval ? { 5841 begin: ndx, 5842 end: ndx 5843 } : caret(input), forwardPosition, c = String.fromCharCode(k), offset = 0; 5844 if (opts._radixDance && opts.numericInput) { 5845 var caretPos = getBuffer().indexOf(opts.radixPoint.charAt(0)) + 1; 5846 if (pos.begin <= caretPos) { 5847 if (k === opts.radixPoint.charCodeAt(0)) offset = 1; 5848 pos.begin -= 1; 5849 pos.end -= 1; 5850 } 5851 } 5852 getMaskSet().writeOutBuffer = true; 5853 var valResult = isValid(pos, c, strict); 5854 if (valResult !== false) { 5855 resetMaskSet(true); 5856 forwardPosition = valResult.caret !== undefined ? valResult.caret : seekNext(valResult.pos.begin ? valResult.pos.begin : valResult.pos); 5857 getMaskSet().p = forwardPosition; 5858 } 5859 forwardPosition = (opts.numericInput && valResult.caret === undefined ? seekPrevious(forwardPosition) : forwardPosition) + offset; 5860 if (writeOut !== false) { 5861 setTimeout(function() { 5862 opts.onKeyValidation.call(input, k, valResult, opts); 5863 }, 0); 5864 if (getMaskSet().writeOutBuffer && valResult !== false) { 5865 var buffer = getBuffer(); 5866 writeBuffer(input, buffer, forwardPosition, e, checkval !== true); 5867 } 5868 } 5869 e.preventDefault(); 5870 if (checkval) { 5871 if (valResult !== false) valResult.forwardPosition = forwardPosition; 5872 return valResult; 5873 } 5874 } 5875 } 5876 }, 5877 pasteEvent: function pasteEvent(e) { 5878 var input = this, ev = e.originalEvent || e, $input = $(input), inputValue = input.inputmask._valueGet(true), caretPos = caret(input), tempValue; 5879 if (isRTL) { 5880 tempValue = caretPos.end; 5881 caretPos.end = caretPos.begin; 5882 caretPos.begin = tempValue; 5883 } 5884 var valueBeforeCaret = inputValue.substr(0, caretPos.begin), valueAfterCaret = inputValue.substr(caretPos.end, inputValue.length); 5885 if (valueBeforeCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(0, caretPos.begin).join("")) valueBeforeCaret = ""; 5886 if (valueAfterCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(caretPos.end).join("")) valueAfterCaret = ""; 5887 if (window.clipboardData && window.clipboardData.getData) { 5888 inputValue = valueBeforeCaret + window.clipboardData.getData("Text") + valueAfterCaret; 5889 } else if (ev.clipboardData && ev.clipboardData.getData) { 5890 inputValue = valueBeforeCaret + ev.clipboardData.getData("text/plain") + valueAfterCaret; 5891 } else return true; 5892 var pasteValue = inputValue; 5893 if ($.isFunction(opts.onBeforePaste)) { 5894 pasteValue = opts.onBeforePaste.call(inputmask, inputValue, opts); 5895 if (pasteValue === false) { 5896 return e.preventDefault(); 5897 } 5898 if (!pasteValue) { 5899 pasteValue = inputValue; 5900 } 5901 } 5902 checkVal(input, false, false, pasteValue.toString().split("")); 5903 writeBuffer(input, getBuffer(), seekNext(getLastValidPosition()), e, undoValue !== getBuffer().join("")); 5904 return e.preventDefault(); 5905 }, 5906 inputFallBackEvent: function inputFallBackEvent(e) { 5907 function radixPointHandler(input, inputValue, caretPos) { 5908 if (inputValue.charAt(caretPos.begin - 1) === "." && opts.radixPoint !== "") { 5909 inputValue = inputValue.split(""); 5910 inputValue[caretPos.begin - 1] = opts.radixPoint.charAt(0); 5911 inputValue = inputValue.join(""); 5912 } 5913 return inputValue; 5914 } 5915 function ieMobileHandler(input, inputValue, caretPos) { 5916 if (iemobile) { 5917 var inputChar = inputValue.replace(getBuffer().join(""), ""); 5918 if (inputChar.length === 1) { 5919 var iv = inputValue.split(""); 5920 iv.splice(caretPos.begin, 0, inputChar); 5921 inputValue = iv.join(""); 5922 } 5923 } 5924 return inputValue; 5925 } 5926 var input = this, inputValue = input.inputmask._valueGet(); 5927 if (getBuffer().join("") !== inputValue) { 5928 var caretPos = caret(input); 5929 inputValue = radixPointHandler(input, inputValue, caretPos); 5930 inputValue = ieMobileHandler(input, inputValue, caretPos); 5931 if (getBuffer().join("") !== inputValue) { 5932 var buffer = getBuffer().join(""), offset = !opts.numericInput && inputValue.length > buffer.length ? -1 : 0, frontPart = inputValue.substr(0, caretPos.begin), backPart = inputValue.substr(caretPos.begin), frontBufferPart = buffer.substr(0, caretPos.begin + offset), backBufferPart = buffer.substr(caretPos.begin + offset); 5933 var selection = caretPos, entries = "", isEntry = false;
5934 if (frontPart !== frontBufferPart) { 5935 var fpl = (isEntry = frontPart.length >= frontBufferPart.length) ? frontPart.length : frontBufferPart.length, i; 5936 for (i = 0; frontPart.charAt(i) === frontBufferPart.charAt(i) && i < fpl; i++) {} 5937 if (isEntry) { 5938 selection.begin = i - offset; 5939 entries += frontPart.slice(i, selection.end); 5940 } 5941 } 5942 if (backPart !== backBufferPart) { 5943 if (backPart.length > backBufferPart.length) { 5944 entries += backPart.slice(0, 1); 5945 } else { 5946 if (backPart.length < backBufferPart.length) { 5947 selection.end += backBufferPart.length - backPart.length; 5948 if (!isEntry && opts.radixPoint !== "" && backPart === "" && frontPart.charAt(selection.begin + offset - 1) === opts.radixPoint) { 5949 selection.begin--; 5950 entries = opts.radixPoint; 5951 } 5952 } 5953 } 5954 } 5955 writeBuffer(input, getBuffer(), { 5956 begin: selection.begin + offset, 5957 end: selection.end + offset 5958 }); 5959 if (entries.length > 0) { 5960 $.each(entries.split(""), function(ndx, entry) { 5961 var keypress = new $.Event("keypress"); 5962 keypress.which = entry.charCodeAt(0); 5963 ignorable = false; 5964 EventHandlers.keypressEvent.call(input, keypress); 5965 }); 5966 } else { 5967 if (selection.begin === selection.end - 1) { 5968 selection.begin = seekPrevious(selection.begin + 1); 5969 if (selection.begin === selection.end - 1) { 5970 caret(input, selection.begin); 5971 } else { 5972 caret(input, selection.begin, selection.end); 5973 } 5974 } 5975 var keydown = new $.Event("keydown"); 5976 keydown.keyCode = opts.numericInput ? Inputmask.keyCode.BACKSPACE : Inputmask.keyCode.DELETE; 5977 EventHandlers.keydownEvent.call(input, keydown); 5978 } 5979 e.preventDefault(); 5980 } 5981 } 5982 }, 5983 beforeInputEvent: function beforeInputEvent(e) { 5984 if (e.cancelable) { 5985 var input = this; 5986 switch (e.inputType) { 5987 case "insertText": 5988 $.each(e.data.split(""), function(ndx, entry) { 5989 var keypress = new $.Event("keypress"); 5990 keypress.which = entry.charCodeAt(0); 5991 ignorable = false; 5992 EventHandlers.keypressEvent.call(input, keypress); 5993 }); 5994 return e.preventDefault(); 5995 5996 case "deleteContentBackward": 5997 var keydown = new $.Event("keydown"); 5998 keydown.keyCode = Inputmask.keyCode.BACKSPACE; 5999 EventHandlers.keydownEvent.call(input, keydown); 6000 return e.preventDefault(); 6001 6002 case "deleteContentForward":
6003 var keydown = new $.Event("keydown"); 6004 keydown.keyCode = Inputmask.keyCode.DELETE; 6005 EventHandlers.keydownEvent.call(input, keydown); 6006 return e.preventDefault(); 6007 } 6008 } 6009 }, 6010 setValueEvent: function setValueEvent(e) { 6011 this.inputmask.refreshValue = false; 6012 var input = this, value = e && e.detail ? e.detail[0] : arguments[1], value = value || input.inputmask._valueGet(true); 6013 if ($.isFunction(opts.onBeforeMask)) value = opts.onBeforeMask.call(inputmask, value, opts) || value; 6014 value = value.split(""); 6015 checkVal(input, true, false, value); 6016 undoValue = getBuffer().join(""); 6017 if ((opts.clearMaskOnLostFocus || opts.clearIncomplete) && input.inputmask._valueGet() === getBufferTemplate().join("")) { 6018 input.inputmask._valueSet(""); 6019 } 6020 }, 6021 focusEvent: function focusEvent(e) { 6022 var input = this, nptValue = input.inputmask._valueGet(); 6023 if (opts.showMaskOnFocus) { 6024 if (nptValue !== getBuffer().join("")) { 6025 writeBuffer(input, getBuffer(), seekNext(getLastValidPosition())); 6026 } else if (mouseEnter === false) { 6027 caret(input, seekNext(getLastValidPosition())); 6028 } 6029 } 6030 if (opts.positionCaretOnTab === true && mouseEnter === false) { 6031 EventHandlers.clickEvent.apply(input, [ e, true ]); 6032 } 6033 undoValue = getBuffer().join(""); 6034 }, 6035 mouseleaveEvent: function mouseleaveEvent(e) { 6036 var input = this; 6037 mouseEnter = false; 6038 if (opts.clearMaskOnLostFocus && document.activeElement !== input) { 6039 HandleNativePlaceholder(input, originalPlaceholder); 6040 } 6041 }, 6042 clickEvent: function clickEvent(e, tabbed) { 6043 function doRadixFocus(clickPos) { 6044 if (opts.radixPoint !== "") { 6045 var vps = getMaskSet().validPositions; 6046 if (vps[clickPos] === undefined || vps[clickPos].input === getPlaceholder(clickPos)) { 6047 if (clickPos < seekNext(-1)) return true; 6048 var radixPos = $.inArray(opts.radixPoint, getBuffer()); 6049 if (radixPos !== -1) { 6050 for (var vp in vps) { 6051 if (radixPos < vp && vps[vp].input !== getPlaceholder(vp)) { 6052 return false; 6053 } 6054 } 6055 return true; 6056 } 6057 } 6058 } 6059 return false; 6060 } 6061 var input = this; 6062 setTimeout(function() { 6063 if (document.activeElement === input) { 6064 var selectedCaret = caret(input); 6065 if (tabbed) { 6066 if (isRTL) { 6067 selectedCaret.end = selectedCaret.begin; 6068 } else { 6069 selectedCaret.begin = selectedCaret.end; 6070 } 6071 } 6072 if (selectedCaret.begin === selectedCaret.end) { 6073 switch (opts.positionCaretOnClick) { 6074 case "none": 6075 break; 6076 6077 case "select": 6078 caret(input, 0, getBuffer().length); 6079 break; 6080 6081 case "ignore": 6082 caret(input, seekNext(getLastValidPosition())); 6083 break; 6084 6085 case "radixFocus": 6086 if (doRadixFocus(selectedCaret.begin)) { 6087 var radixPos = getBuffer().join("").indexOf(opts.radixPoint); 6088 caret(input, opts.numericInput ? seekNext(radixPos) : radixPos); 6089 break; 6090 } 6091 6092 default: 6093 var clickPosition = selectedCaret.begin, lvclickPosition = getLastValidPosition(clickPosition, true), lastPosition = seekNext(lvclickPosition); 6094 if (clickPosition < lastPosition) { 6095 caret(input, !isMask(clickPosition, true) && !isMask(clickPosition - 1, true) ? seekNext(clickPosition) : clickPosition); 6096 } else { 6097 var lvp = getMaskSet().validPositions[lvclickPosition], tt = getTestTemplate(lastPosition, lvp ? lvp.match.locator : undefined, lvp), placeholder = getPlaceholder(lastPosition, tt.match); 6098 if (placeholder !== "" && getBuffer()[lastPosition] !== placeholder && tt.match.optionalQuantifier !== true && tt.match.newBlockMarker !== true || !isMask(lastPosition, opts.keepStatic) && tt.match.def === placeholder) { 6099 var newPos = seekNext(lastPosition); 6100 if (clickPosition >= newPos || clickPosition === lastPosition) { 6101 lastPosition = newPos; 6102 } 6103 } 6104 caret(input, lastPosition); 6105 } 6106 break; 6107 } 6108 } 6109 } 6110 }, 0); 6111 }, 6112 cutEvent: function cutEvent(e) { 6113 var input = this, $input = $(input), pos = caret(input), ev = e.originalEvent || e; 6114 var clipboardData = window.clipboardData || ev.clipboardData, clipData = isRTL ? getBuffer().slice(pos.end, pos.begin) : getBuffer().slice(pos.begin, pos.end); 6115 clipboardData.setData("text", isRTL ? clipData.reverse().join("") : clip
6115Data.join("")); 6116 if (document.execCommand) document.execCommand("copy"); 6117 handleRemove(input, Inputmask.keyCode.DELETE, pos); 6118 writeBuffer(input, getBuffer(), getMaskSet().p, e, undoValue !== getBuffer().join("")); 6119 }, 6120 blurEvent: function blurEvent(e) { 6121 var $input = $(this), input = this; 6122 if (input.inputmask) { 6123 HandleNativePlaceholder(input, originalPlaceholder); 6124 var nptValue = input.inputmask._valueGet(), buffer = getBuffer().slice(); 6125 if (nptValue !== "" || colorMask !== undefined) { 6126 if (opts.clearMaskOnLostFocus) { 6127 if (getLastValidPosition() === -1 && nptValue === getBufferTemplate().join("")) { 6128 buffer = []; 6129 } else { 6130 clearOptionalTail(buffer); 6131 } 6132 } 6133 if (isComplete(buffer) === false) { 6134 setTimeout(function() { 6135 $input.trigger("incomplete"); 6136 }, 0); 6137 if (opts.clearIncomplete) { 6138 resetMaskSet(); 6139 if (opts.clearMaskOnLostFocus) { 6140 buffer = []; 6141 } else { 6142 buffer = getBufferTemplate().slice(); 6143 } 6144 } 6145 } 6146 writeBuffer(input, buffer, undefined, e); 6147 } 6148 if (undoValue !== getBuffer().join("")) { 6149 undoValue = buffer.join(""); 6150 $input.trigger("change"); 6151 } 6152 } 6153 }, 6154 mouseenterEvent: function mouseenterEvent(e) { 6155 var input = this; 6156 mouseEnter = true; 6157 if (document.activeElement !== input && opts.showMaskOnHover) { 6158 HandleNativePlaceholder(input, (isRTL ? getBuffer().slice().reverse() : getBuffer()).join("")); 6159 } 6160 }, 6161 submitEvent: function submitEvent(e) { 6162 if (undoValue !== getBuffer().join("")) { 6163 $el.trigger("change"); 6164 } 6165 if (opts.clearMaskOnLostFocus && getLastValidPosition() === -1 && el.inputmask._valueGet && el.inputmask._valueGet() === getBufferTemplate().join("")) { 6166 el.inputmask._valueSet(""); 6167 } 6168 if (opts.clearIncomplete && isComplete(getBuffer()) === false) { 6169 el.inputmask._valueSet(""); 6170 } 6171 if (opts.removeMaskOnSubmit) { 6172 el.inputmask._valueSet(el.inputmask.unmaskedvalue(), true); 6173 setTimeout(function() { 6174 writeBuffer(el, getBuffer()); 6175 }, 0); 6176 } 6177 }, 6178 resetEvent: function resetEvent(e) { 6179 el.inputmask.refreshValue = true; 6180 setTimeout(function() { 6181 $el.trigger("setvalue"); 6182 }, 0); 6183 } 6184 }; 6185 function checkVal(input, writeOut, strict, nptvl, initiatingEvent) { 6186 var inputmask = this || input.inputmask, inputValue = nptvl.slice(), charCodes = "", initialNdx = -1, result = undefined; 6187 function isTemplateMatch(ndx, charCodes) { 6188 var charCodeNdx = getMaskTemplate(true, 0, false).slice(ndx, seekNext(ndx)).join("").replace(/'/g, "").indexOf(charCodes); 6189 return charCodeNdx !== -1 && !isMask(ndx) && (getTest(ndx).match.nativeDef === charCodes.charAt(0) || getTest(ndx).match.fn === null && getTest(ndx).match.nativeDef === "'" + charCodes.charAt(0) || getTest(ndx).match.nativeDef === " " && (getTest(ndx + 1).match.nativeDef === charCodes.charAt(0) || getTest(ndx + 1).match.fn === null && getTest(ndx + 1).match.nativeDef === "'" + charCodes.charAt(0))); 6190 } 6191 resetMaskSet(); 6192 if (!strict && opts.autoUnmask !== true) { 6193 var staticInput = getBufferTemplate().slice(0, seekNext(-1)).join(""), matches = inputValue.join("").match(new RegExp("^" + Inputmask.escapeRegex(staticInput), "g")); 6194 if (matches && matches.length > 0) { 6195 inputValue.splice(0, matches.length * staticInput.length); 6196 initialNdx = seekNext(initialNdx); 6197 } 6198 } else { 6199 initialNdx = seekNext(initialNdx); 6200 } 6201 if (initialNdx === -1) { 6202 getMaskSet().p = seekNext(initialNdx); 6203 initialNdx = 0; 6204 } else getMaskSet().p = initialNdx; 6205 inputmask.caretPos = { 6206 begin: initialNdx 6207 };
6208 $.each(inputValue, function(ndx, charCode) { 6209 if (charCode !== undefined) { 6210 if (getMaskSet().validPositions[ndx] === undefined && inputValue[ndx] === getPlaceholder(ndx) && isMask(ndx, true) && isValid(ndx, inputValue[ndx], true, undefined, undefined, true) === false) { 6211 getMaskSet().p++; 6212 } else { 6213 var keypress = new $.Event("_checkval"); 6214 keypress.which = charCode.charCodeAt(0); 6215 charCodes += charCode; 6216 var lvp = getLastValidPosition(undefined, true); 6217 if (!isTemplateMatch(initialNdx, charCodes)) { 6218 result = EventHandlers.keypressEvent.call(input, keypress, true, false, strict, inputmask.caretPos.begin); 6219 if (result) { 6220 initialNdx = inputmask.caretPos.begin + 1; 6221 charCodes = ""; 6222 } 6223 } else { 6224 result = EventHandlers.keypressEvent.call(input, keypress, true, false, strict, lvp + 1); 6225 } 6226 if (result) { 6227 writeBuffer(undefined, getBuffer(), result.forwardPosition, keypress, false); 6228 inputmask.caretPos = { 6229 begin: result.forwardPosition, 6230 end: result.forwardPosition 6231 }; 6232 } 6233 } 6234 } 6235 }); 6236 if (writeOut) writeBuffer(input, getBuffer(), result ? result.forwardPosition : undefined, initiatingEvent || new $.Event("checkval"), initiatingEvent && initiatingEvent.type === "input"); 6237 } 6238 function unmaskedvalue(input) { 6239 if (input) { 6240 if (input.inputmask === undefined) { 6241 return input.value; 6242 } 6243 if (input.inputmask && input.inputmask.refreshValue) { 6244 EventHandlers.setValueEvent.call(input); 6245 } 6246 } 6247 var umValue = [], vps = getMaskSet().validPositions; 6248 for (var pndx in vps) { 6249 if (vps[pndx].match && vps[pndx].match.fn != null) { 6250 umValue.push(vps[pndx].input); 6251 } 6252 } 6253 var unmaskedValue = umValue.length === 0 ? "" : (isRTL ? umValue.reverse() : umValue).join(""); 6254 if ($.isFunction(opts.onUnMask)) { 6255 var bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join(""); 6256 unmaskedValue = opts.onUnMask.call(inputmask, bufferValue, unmaskedValue, opts); 6257 } 6258 return unmaskedValue; 6259 } 6260 function caret(input, begin, end, notranslate) { 6261 function translatePosition(pos) { 6262 if (isRTL && typeof pos === "number" && (!opts.greedy || opts.placeholder !== "") && el) { 6263 pos = el.inputmask._valueGet().length - pos; 6264 } 6265 return pos; 6266 } 6267 var range; 6268 if (begin !== undefined) { 6269 if ($.isArray(begin)) { 6270 end = isRTL ? begin[0] : begin[1]; 6271 begin = isRTL ? begin[1] : begin[0]; 6272 } 6273 if (begin.begin !== undefined) { 6274 end = isRTL ? begin.begin : begin.end; 6275 begin = isRTL ? begin.end : begin.begin; 6276 } 6277 if (typeof begin === "number") { 6278 begin = notranslate ? begin : translatePosition(begin); 6279 end = notranslate ? end : translatePosition(end); 6280 end = typeof end == "number" ? end : begin; 6281 var scrollCalc = parseInt(((input.ownerDocument.defaultView || window).getComputedStyle ? (input.ownerDocument.defaultView || window).getComputedStyle(input, null) : input.currentStyle).fontSize) * end; 6282 input.scrollLeft = scrollCalc > input.scrollWidth ? scrollCalc : 0; 6283 input.inputmask.caretPos = { 6284 begin: begin, 6285 end: end 6286 }; 6287 if (input === document.activeElement) { 6288 if ("selectionStart" in input) { 6289 input.selectionStart = begin; 6290 input.selectionEnd = end; 6291 } else if (window.getSelection) { 6292 range = document.createRange(); 6293 if (input.firstChild === undefined || input.firstChild === null) { 6294 var textNode = document.createTextNode(""); 6295 input.appendChild(textNode); 6296 } 6297 range.setStart(input.firstChild, begin < input.inputmask._valueGet().length ? begin : input.inputmask._valueGet().length); 6298 range.setEnd(input.firstChild, end < input.inputmask._valueGet().length ? end : input.inputmask._valueGet().length); 6299 range.collapse(true); 6300 var sel = window.getSelection(); 6301 sel.removeAllRanges(); 6302 sel.addRange(range); 6303 } else if (input.createTextRange) { 6304 range = input.createTextRange(); 6305 range.collapse(true); 6306 range.moveEnd("character", end); 6307 range.moveStart("character", begin); 6308 range.select(); 6309 } 6310 renderColorMask(input, { 6311 begin: begin, 6312 end: end 6313 }); 6314 } 6315 } 6316 } else { 6317 if ("selectionStart" in input) { 6318 begin = input.selectionStart; 6319 end = input.selectionEnd; 6320 } else if (window.getSelection) { 6321 range = window.getSelection().getRangeAt(0); 6322 if (range.commonAncestorContainer.parentNode === input || range.commonAncestorContainer === input) { 6323 begin = range.startOffset; 6324 end = range.endOffset; 6325 } 6326 } else if (document.selection && document.selection.createRange) { 6327 range = document.selection.createRange(); 6328 begin = 0 - range.duplicate().moveStart("character", -input.inputmask._valueGet().length); 6329 end = begin + range.text.length; 6330 } 6331 return { 6332 begin: notranslate ? begin : translatePosition(begin), 6333 end: notranslate ? end : translatePosition(en
6333d) 6334 }; 6335 } 6336 } 6337 function determineLastRequiredPosition(returnDefinition) { 6338 var buffer = getMaskTemplate(true, getLastValidPosition(), true, true), bl = buffer.length, pos, lvp = getLastValidPosition(), positions = {}, lvTest = getMaskSet().validPositions[lvp], ndxIntlzr = lvTest !== undefined ? lvTest.locator.slice() : undefined, testPos; 6339 for (pos = lvp + 1; pos < buffer.length; pos++) { 6340 testPos = getTestTemplate(pos, ndxIntlzr, pos - 1); 6341 ndxIntlzr = testPos.locator.slice(); 6342 positions[pos] = $.extend(true, {}, testPos); 6343 } 6344 var lvTestAlt = lvTest && lvTest.alternation !== undefined ? lvTest.locator[lvTest.alternation] : undefined; 6345 for (pos = bl - 1; pos > lvp; pos--) { 6346 testPos = positions[pos]; 6347 if ((testPos.match.optionality || testPos.match.optionalQuantifier && testPos.match.newBlockMarker || lvTestAlt && (lvTestAlt !== positions[pos].locator[lvTest.alternation] && testPos.match.fn != null || testPos.match.fn === null && testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(","), lvTestAlt.toString().split(",")) && getTests(pos)[0].def !== "")) && buffer[pos] === getPlaceholder(pos, testPos.match)) { 6348 bl--; 6349 } else break; 6350 } 6351 return returnDefinition ? { 6352 l: bl, 6353 def: positions[bl] ? positions[bl].match : undefined 6354 } : bl; 6355 } 6356 function clearOptionalTail(buffer) { 6357 buffer.length = 0; 6358 var template = getMaskTemplate(true, 0, true, undefined, true), lmnt, validPos; 6359 while (lmnt = template.shift(), lmnt !== undefined) { 6360 buffer.push(lmnt); 6361 } 6362 return buffer; 6363 } 6364 function isComplete(buffer) { 6365 if ($.isFunction(opts.isComplete)) return opts.isComplete(buffer, opts); 6366 if (opts.repeat === "*") return undefined; 6367 var complete = false, lrp = determineLastRequiredPosition(true), aml = seekPrevious(lrp.l); 6368 if (lrp.def === undefined || lrp.def.newBlockMarker || lrp.def.optionality || lrp.def.optionalQuantifier) { 6369 complete = true; 6370 for (var i = 0; i <= aml; i++) { 6371 var test = getTestTemplate(i).match; 6372 if (test.fn !== null && getMaskSet().validPositions[i] === undefined && test.optionality !== true && test.optionalQuantifier !== true || test.fn === null && buffer[i] !== getPlaceholder(i, test)) { 6373 complete = false; 6374 break; 6375 } 6376 } 6377 } 6378 return complete; 6379 } 6380 function handleRemove(input, k, pos, strict, fromIsValid) { 6381 if (opts.numericInput || isRTL) { 6382 if (k === Inputmask.keyCode.BACKSPACE) { 6383 k = Inputmask.keyCode.DELETE; 6384 } else if (k === Inputmask.keyCode.DELETE) { 6385 k = Inputmask.keyCode.BACKSPACE; 6386 } 6387 if (isRTL) { 6388 var pend = pos.end; 6389 pos.end = pos.begin; 6390 pos.begin = pend; 6391 } 6392 } 6393 if (k === Inputmask.keyCode.BACKSPACE && pos.end - pos.begin < 1) { 6394 pos.begin = seekPrevious(pos.begin); 6395 if (getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator) { 6396 pos.begin--; 6397 } 6398 } else if (k === Inputmask.keyCode.DELETE && pos.begin === pos.end) { 6399 pos.end = isMask(pos.end, true) && getMaskSet().validPositions[pos.end] && getMaskSet().validPositions[pos.end].input !== opts.radixPoint ? pos.end + 1 : seekNext(pos.end) + 1; 6400 if (getMaskSet().validPositions[pos.begin] !== undefined && getMaskSet().validPositions[pos.begin].input === opts.groupSeparator) { 6401 pos.end++; 6402 } 6403 } 6404 revalidateMask(pos); 6405 if (strict !== true && opts.keepStatic !== false || opts.regex !== null) { 6406 var result = alternate(true); 6407 if (result) { 6408 var newPos = result.caret !== undefined ? result.caret : result.pos ? seekNext(result.pos.begin ? result.pos.begin : result.pos) : getLastValidPosition(-1, true); 6409 if (k !== Inputmask.keyCode.DELETE || pos.begin > newPos) { 6410 pos.begin == newPos; 6411 } 6412 } 6413 } 6414 var lvp = getLastValidPosition(pos.begin, true); 6415 if (lvp < pos.begin || pos.begin === -1) { 6416 getMaskSet().p = seekNext(lvp); 6417 } else if (strict !== true) { 6418 getMaskSet().p = pos.begin; 6419 if (fromIsValid !== true) { 6420 while (getMaskSet().p < lvp && getMaskSet().validPositions[getMaskSet().p] === undefined) { 6421 getMaskSet().p++; 6422 } 6423 } 6424 } 6425 } 6426 function initializeColorMask(input) { 6427 var computedStyle = (input.ownerDocument.defaultView || window).getComputedStyle(input, null); 6428 function findCaretPos(clientx) { 6429 var e = document.createElement("span"), caretPos; 6430 for (var style in computedStyle) { 6431 if (isNaN(style) && style.indexOf("font") !== -1) { 6432 e.style[style] = computedStyle[style]; 6433 } 6434 } 6435 e.style.textTransform = computedStyle.textTransform; 6436 e.style.letterSpacing = computedStyle.letterSpacing; 6437 e.style.position = "absolute"; 6438 e.style.height = "auto"; 6439 e.style.width = "auto"; 6440 e.style.visibility = "hidden"; 6441 e.style.whiteSpace = "nowrap"; 6442 document.body.appendChild(e); 6443 var inputText = input.inputmask._valueGet(), previousWidth = 0, itl; 6444 for (caretPos = 0, itl = inputText.length; caretPos <= itl;
6444 caretPos++) { 6445 e.innerHTML += inputText.charAt(caretPos) || "_"; 6446 if (e.offsetWidth >= clientx) { 6447 var offset1 = clientx - previousWidth; 6448 var offset2 = e.offsetWidth - clientx; 6449 e.innerHTML = inputText.charAt(caretPos); 6450 offset1 -= e.offsetWidth / 3; 6451 caretPos = offset1 < offset2 ? caretPos - 1 : caretPos; 6452 break; 6453 } 6454 previousWidth = e.offsetWidth; 6455 } 6456 document.body.removeChild(e); 6457 return caretPos; 6458 } 6459 var template = document.createElement("div"); 6460 template.style.width = computedStyle.width; 6461 template.style.textAlign = computedStyle.textAlign; 6462 colorMask = document.createElement("div"); 6463 input.inputmask.colorMask = colorMask; 6464 colorMask.className = "im-colormask"; 6465 input.parentNode.insertBefore(colorMask, input); 6466 input.parentNode.removeChild(input); 6467 colorMask.appendChild(input); 6468 colorMask.appendChild(template); 6469 input.style.left = template.offsetLeft + "px"; 6470 $(colorMask).on("mouseleave", function(e) { 6471 return EventHandlers.mouseleaveEvent.call(input, [ e ]); 6472 }); 6473 $(colorMask).on("mouseenter", function(e) { 6474 return EventHandlers.mouseenterEvent.call(input, [ e ]); 6475 }); 6476 $(colorMask).on("click", function(e) { 6477 caret(input, findCaretPos(e.clientX)); 6478 return EventHandlers.clickEvent.call(input, [ e ]); 6479 }); 6480 } 6481 Inputmask.prototype.positionColorMask = function(input, template) { 6482 input.style.left = template.offsetLeft + "px"; 6483 }; 6484 function renderColorMask(input, caretPos, clear) { 6485 var maskTemplate = [], isStatic = false, test, testPos, ndxIntlzr, pos = 0; 6486 function setEntry(entry) { 6487 if (entry === undefined) entry = ""; 6488 if (!isStatic && (test.fn === null || testPos.input === undefined)) { 6489 isStatic = true; 6490 maskTemplate.push("<span class='im-static'>" + entry); 6491 } else if (isStatic && (test.fn !== null && testPos.input !== undefined || test.def === "")) { 6492 isStatic = false; 6493 var mtl = maskTemplate.length; 6494 maskTemplate[mtl - 1] = maskTemplate[mtl - 1] + "</span>"; 6495 maskTemplate.push(entry); 6496 } else maskTemplate.push(entry); 6497 } 6498 function setCaret() { 6499 if (document.activeElement === input) { 6500 maskTemplate.splice(caretPos.begin, 0, caretPos.begin === caretPos.end || caretPos.end > getMaskSet().maskLength ? '<mark class="im-caret" style="border-right-width: 1px;border-right-style: solid;">' : '<mark class="im-caret-select">'); 6501 maskTemplate.splice(caretPos.end + 1, 0, "</mark>"); 6502 } 6503 } 6504 if (colorMask !== undefined) { 6505 var buffer = getBuffer(); 6506 if (caretPos === undefined) { 6507 caretPos = caret(input); 6508 } else if (caretPos.begin === undefined) { 6509 caretPos = { 6510 begin: caretPos, 6511 end: caretPos 6512 }; 6513 } 6514 if (clear !== true) { 6515 var lvp = getLastValidPosition(); 6516 do { 6517 if (getMaskSet().validPositions[pos]) { 6518 testPos = getMaskSet().validPositions[pos]; 6519 test = testPos.match; 6520 ndxIntlzr = testPos.locator.slice(); 6521 setEntry(buffer[pos]); 6522 } else { 6523 testPos = getTestTemplate(pos, ndxIntlzr, pos - 1); 6524 test = testPos.match; 6525 ndxIntlzr = testPos.locator.slice(); 6526 if (opts.jitMasking === false || pos < lvp || typeof opts.jitMasking === "number" && isFinite(opts.jitMasking) && opts.jitMasking > pos) { 6527 setEntry(getPlaceholder(pos, test)); 6528 } else isStatic = false;
6529 } 6530 pos++; 6531 } while ((maxLength === undefined || pos < maxLength) && (test.fn !== null || test.def !== "") || lvp > pos || isStatic); 6532 if (isStatic) setEntry(); 6533 setCaret(); 6534 } 6535 var template = colorMask.getElementsByTagName("div")[0]; 6536 template.innerHTML = maskTemplate.join(""); 6537 input.inputmask.positionColorMask(input, template); 6538 } 6539 } 6540 function mask(elem) { 6541 function isElementTypeSupported(input, opts) { 6542 function patchValueProperty(npt) { 6543 var valueGet; 6544 var valueSet; 6545 function patchValhook(type) { 6546 if ($.valHooks && ($.valHooks[type] === undefined || $.valHooks[type].inputmaskpatch !== true)) { 6547 var valhookGet = $.valHooks[type] && $.valHooks[type].get ? $.valHooks[type].get : function(elem) { 6548 return elem.value; 6549 }; 6550 var valhookSet = $.valHooks[type] && $.valHooks[type].set ? $.valHooks[type].set : function(elem, value) { 6551 elem.value = value; 6552 return elem; 6553 }; 6554 $.valHooks[type] = { 6555 get: function get(elem) { 6556 if (elem.inputmask) { 6557 if (elem.inputmask.opts.autoUnmask) { 6558 return elem.inputmask.unmaskedvalue(); 6559 } else { 6560 var result = valhookGet(elem); 6561 return getLastValidPosition(undefined, undefined, elem.inputmask.maskset.validPositions) !== -1 || opts.nullable !== true ? result : ""; 6562 } 6563 } else return valhookGet(elem); 6564 }, 6565 set: function set(elem, value) { 6566 var $elem = $(elem), result; 6567 result = valhookSet(elem, value); 6568 if (elem.inputmask) { 6569 $elem.trigger("setvalue", [ value ]); 6570 } 6571 return result; 6572 }, 6573 inputmaskpatch: true 6574 }; 6575 } 6576 } 6577 function getter() { 6578 if (this.inputmask) { 6579 return this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : getLastValidPosition() !== -1 || opts.nullable !== true ? document.activeElement === this && opts.clearMaskOnLostFocus ? (isRTL ? clearOptionalTail(getBuffer().slice()).reverse() : clearOptionalTail(getBuffer().slice())).join("") : valueGet.call(this) : ""; 6580 } else return valueGet.call(this); 6581 } 6582 function setter(value) { 6583 valueSet.call(this, value); 6584 if (this.inputmask) { 6585 $(this).trigger("setvalue", [ value ]); 6586 } 6587 } 6588 function installNativeValueSetFallback(npt) { 6589 EventRuler.on(npt, "mouseenter", function(event) { 6590 var $input = $(this), input = this, value = input.inputmask._valueGet(); 6591 if (value !== getBuffer().join("")) { 6592 $input.trigger("setvalue"); 6593 } 6594 }); 6595 } 6596 if (!npt.inputmask.__valueGet) { 6597 if (opts.noValuePatching !== true) { 6598 if (Object.getOwnPropertyDescriptor) { 6599 if (typeof Object.getPrototypeOf
6599!== "function") { 6600 Object.getPrototypeOf = _typeof("test".__proto__) === "object" ? function(object) { 6601 return object.__proto__; 6602 } : function(object) { 6603 return object.constructor.prototype; 6604 }; 6605 } 6606 var valueProperty = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(npt), "value") : undefined; 6607 if (valueProperty && valueProperty.get && valueProperty.set) { 6608 valueGet = valueProperty.get; 6609 valueSet = valueProperty.set; 6610 Object.defineProperty(npt, "value", { 6611 get: getter, 6612 set: setter, 6613 configurable: true 6614 }); 6615 } else if (npt.tagName !== "INPUT") { 6616 valueGet = function valueGet() { 6617 return this.textContent; 6618 }; 6619 valueSet = function valueSet(value) { 6620 this.textContent = value; 6621 }; 6622 Object.defineProperty(npt, "value", { 6623 get: getter, 6624 set: setter, 6625 configurable: true 6626 }); 6627 } 6628 } else if (document.__lookupGetter__ && npt.__lookupGetter__("value")) { 6629 valueGet = npt.__lookupGetter__("value"); 6630 valueSet = npt.__lookupSetter__("value"); 6631 npt.__defineGetter__("value", getter); 6632 npt.__defineSetter__("value", setter); 6633 } 6634 npt.inputmask.__valueGet = valueGet; 6635 npt.inputmask.__valueSet = valueSet; 6636 } 6637 npt.inputmask._valueGet = function(overruleRTL) { 6638 return isRTL && overruleRTL !== true ? valueGet.call(this.el).split("").reverse().join("") : valueGet.call(this.el); 6639 }; 6640 npt.inputmask._valueSet = function(value, overruleRTL) { 6641 valueSet.call(this.el, value === null || value === undefined ? "" : overruleRTL !== true && isRTL ? value.split("").reverse().join("") : value); 6642 }; 6643 if (valueGet === undefined) { 6644 valueGet = function valueGet() { 6645 return this.value; 6646 }; 6647 valueSet = function valueSet(value) { 6648 this.value = value; 6649 }; 6650 patchValhook(npt.type); 6651 installNativeValueSetFallback(npt); 6652 } 6653 } 6654 } 6655 var elementType = input.getAttribute("type"); 6656 var isSupported = input.tagName === "INPUT" && $.inArray(elementType, opts.supportsInputType) !== -1 || input.isContentEditable || input.tagName === "TEXTAREA"; 6657 if (!isSupported) { 6658 if (input.tagName === "INPUT") { 6659 var el = document.createElement("input"); 6660 el.setAttribute("type", elementType); 6661 isSupported = el.type === "text"; 6662 el = null; 6663 } else isSupported = "partial"; 6664 } 6665 if (isSupported !== false) { 6666 patchValueProperty(input); 6667 } else input.inputmask = undefined; 6668 return isSupported; 6669 } 6670 EventRuler.off(elem); 6671 var isSupported = isElementTypeSupported(elem, opts); 6672 if (isSupported !== false) { 6673 el = elem; 6674 $el = $(el); 6675 originalPlaceholder = el.placeholder; 6676 maxLength = el !== undefined ? el.maxLength : undefined; 6677 if (maxLength === -1) maxLength = undefined; 6678 if (opts.colorMask === true) { 6679 initializeColorMask(el); 6680 } 6681 if (mobile) { 6682 if ("inputmode" in el) { 6683 el.inputmode = opts.inputmode; 6684 el.setAttribute("inputmode", opts.inputmode); 6685 } 6686 if (opts.disablePredictiveText === true) { 6687 if ("autocorrect" in el) { 6688 el.autocorrect = false;
6689 } else { 6690 if (opts.colorMask !== true) { 6691 initializeColorMask(el); 6692 } 6693 el.type = "password"; 6694 } 6695 } 6696 } 6697 if (isSupported === true) { 6698 el.setAttribute("im-insert", opts.insertMode); 6699 EventRuler.on(el, "submit", EventHandlers.submitEvent); 6700 EventRuler.on(el, "reset", EventHandlers.resetEvent); 6701 EventRuler.on(el, "blur", EventHandlers.blurEvent); 6702 EventRuler.on(el, "focus", EventHandlers.focusEvent); 6703 if (opts.colorMask !== true) { 6704 EventRuler.on(el, "click", EventHandlers.clickEvent); 6705 EventRuler.on(el, "mouseleave", EventHandlers.mouseleaveEvent); 6706 EventRuler.on(el, "mouseenter", EventHandlers.mouseenterEvent); 6707 } 6708 EventRuler.on(el, "paste", EventHandlers.pasteEvent); 6709 EventRuler.on(el, "cut", EventHandlers.cutEvent); 6710 EventRuler.on(el, "complete", opts.oncomplete); 6711 EventRuler.on(el, "incomplete", opts.onincomplete); 6712 EventRuler.on(el, "cleared", opts.oncleared); 6713 if (!mobile && opts.inputEventOnly !== true) { 6714 EventRuler.on(el, "keydown", EventHandlers.keydownEvent); 6715 EventRuler.on(el, "keypress", EventHandlers.keypressEvent); 6716 } else { 6717 el.removeAttribute("maxLength"); 6718 } 6719 EventRuler.on(el, "input", EventHandlers.inputFallBackEvent); 6720 EventRuler.on(el, "beforeinput", EventHandlers.beforeInputEvent); 6721 } 6722 EventRuler.on(el, "setvalue", EventHandlers.setValueEvent); 6723 undoValue = getBufferTemplate().join(""); 6724 if (el.inputmask._valueGet(true) !== "" || opts.clearMaskOnLostFocus === false || document.activeElement === el) { 6725 var initialValue = $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, el.inputmask._valueGet(true), opts) || el.inputmask._valueGet(true) : el.inputmask._valueGet(true); 6726 if (initialValue !== "") checkVal(el, true, false, initialValue.split("")); 6727 var buffer = getBuffer().slice(); 6728 undoValue = buffer.join(""); 6729 if (isComplete(buffer) === false) { 6730 if (opts.clearIncomplete) { 6731 resetMaskSet(); 6732 } 6733 } 6734 if (opts.clearMaskOnLostFocus && document.activeElement !== el) { 6735 if (getLastValidPosition() === -1) { 6736 buffer = []; 6737 } else { 6738 clearOptionalTail(buffer); 6739 } 6740 } 6741 if (opts.clearMaskOnLostFocus === false || opts.showMaskOnFocus && document.activeElement === el || el.inputmask._valueGet(true) !== "") writeBuffer(el, buffer); 6742 if (document.activeElement === el) { 6743 caret(el, seekNext(getLastValidPosition())); 6744 } 6745 } 6746 } 6747 } 6748 var valueBuffer; 6749 if (actionObj !== undefined) { 6750 switch (actionObj.action) { 6751 case "isComplete": 6752 el = actionObj.el; 6753 return isComplete(getBuffer()); 6754 6755 case "unmaskedvalue": 6756 if (el === undefined || actionObj.value !== undefined) { 6757 valueBuffer = actionObj.value; 6758 valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, valueBuffer, opts) || valueBuffer : valueBuffer).split(""); 6759 checkVal.call(this, undefined, false, false, valueBuffer); 6760 if ($.isFunction(opts.onBeforeWrite)) opts.onBeforeWrite.call(inputmask, undefined, getBuffer(), 0, opts); 6761 } 6762 return unmaskedvalue(el); 6763 6764 case "mask": 6765 mask(el); 6766 break; 6767 6768 case "format": 6769 valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(inputmask, actionObj.value, opts) || actionObj.value : actionObj.value).split(""); 6770 checkVal.call(this, undefined, true, false, valueBuffer); 6771 if (actionObj.metadata) { 6772 return { 6773 value: isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""), 6774 metadata: maskScope.call(this, { 6775 action: "getmetadata" 6776 }, maskset, opts) 6777 }; 6778 } 6779 return isRTL ? getBuffer().slice().reverse().join("") : getBuffer().join(""); 6780 6781 case "isValid": 6782 if (actionObj.value) { 6783 valueBuffer = actionObj.value.split(""); 6784 checkVal.call(this, undefined, true, true, valueBuffer); 6785 } else { 6786 actionObj.value = getBuffer().join(""); 6787 } 6788 var buffer = getBuffer(); 6789 var rl = determineLastRequiredPosition(), lmib = buffer.length - 1; 6790 for (;lmib > rl; lmib--) { 6791 if (isMask(lmib)) break; 6792 } 6793 buffer.splice(rl, lmib + 1 - rl); 6794 return isComplete(buffer) && actionObj.value === getBuffer().join(""); 6795 6796 case "getemptymask": 6797 return getBufferTemplate().join(""); 6798 6799 case "remove": 6800 if (el && el.inputmask) { 6801 $.data(el, "_inputmask_opts", null); 6802 $el = $(el); 6803 el.inputmask._valueSet(opts.autoUnmask ? unmaskedvalue(el) : el.inputmask._valueGet(true)); 6804 EventRuler.off(el); 6805 if (el.inputmask.colorMask) { 6806 colorMask = el.inputmask.colorMask; 6807 colorMask.removeChild(el); 6808 colorMask.parentNode.insertBefore(el, colorMask); 6809 colorMask.parentNode.removeChild(colorMask); 6810 } 6811 var valueProperty; 6812 if (Object.getOwnPropertyDescriptor && Ob
6812ject.getPrototypeOf) { 6813 valueProperty = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(el), "value"); 6814 if (valueProperty) { 6815 if (el.inputmask.__valueGet) { 6816 Object.defineProperty(el, "value", { 6817 get: el.inputmask.__valueGet, 6818 set: el.inputmask.__valueSet, 6819 configurable: true 6820 }); 6821 } 6822 } 6823 } else if (document.__lookupGetter__ && el.__lookupGetter__("value")) { 6824 if (el.inputmask.__valueGet) { 6825 el.__defineGetter__("value", el.inputmask.__valueGet); 6826 el.__defineSetter__("value", el.inputmask.__valueSet); 6827 } 6828 } 6829 el.inputmask = undefined; 6830 } 6831 return el; 6832 break; 6833 6834 case "getmetadata": 6835 if ($.isArray(maskset.metadata)) { 6836 var maskTarget = getMaskTemplate(true, 0, false).join(""); 6837 $.each(maskset.metadata, function(ndx, mtdt) { 6838 if (mtdt.mask === maskTarget) { 6839 maskTarget = mtdt; 6840 return false; 6841 } 6842 }); 6843 return maskTarget; 6844 } 6845 return maskset.metadata; 6846 } 6847 } 6848 } 6849 return Inputmask; 6850 }); 6851}, function(module, exports, __webpack_require__) { 6852 "use strict"; 6853 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 6854 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 6855 return typeof obj; 6856 } : function(obj) { 6857 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 6858 }; 6859 (function(factory) { 6860 if (true) { 6861 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(4) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 6862 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 6863 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 6864 } else {} 6865 })(function($) { 6866 return $; 6867 }); 6868}, function(module, exports) { 6869 module.exports = jQuery; 6870}, function(module, exports, __webpack_require__) { 6871 "use strict"; 6872 var __WEBPACK_AMD_DEFINE_RESULT__; 6873 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 6874 return typeof obj; 6875 } : function(obj) { 6876 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 6877 }; 6878 if (true) !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { 6879 return typeof window !== "undefined" ? window : new (eval("require('jsdom').JSDOM"))("").window; 6880 }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); else {} 6881}, function(module, exports, __webpack_require__) { 6882 "use strict"; 6883 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 6884 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 6885 return typeof obj; 6886 } : function(obj) { 6887 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 6888 }; 6889 (function(factory) { 6890 if (true) { 6891 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 6892 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 6893 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 6894 } else {} 6895 })(function(Inputmask) { 6896 var $ = Inputmask.dependencyLib; 6897 var formatCode = { 6898 d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ], 6899 dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() { 6900 return pad(Date.prototype.getDate.call(this), 2); 6901 } ], 6902 ddd: [ "" ], 6903 dddd: [ "" ], 6904 m: [ "[1-9]|1[012]", Date.prototype.setMonth, "month", function() { 6905 return Date.prototype.getMonth.call(this) + 1; 6906 } ], 6907 mm: [ "0[1-9]|1[012]", Date.prototype.setMonth, "month", function() { 6908 return pad(Date.prototype.getMonth.call(this) + 1, 2); 6909 } ], 6910 mmm: [ "" ], 6911 mmmm: [ "" ], 6912 yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() { 6913 return pad(Date.prototype.getFullYear.call(this), 2); 6914 } ], 6915 yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() { 6916 return pad(Date.prototype.getFullYear.call(this), 4); 6917 } ], 6918 h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 6919 hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() { 6920 return pad(Date.prototype.getHours.call(this), 2); 6921 } ], 6922 hhh: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ], 6923 H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ], 6924 HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() { 6925 return pad(Date.prototype.getHours.call(this), 2); 6926 } ], 6927 HHH: [ "[0-9]+", Date.prototype.setHours, "hours", Date.prototype.getHours ], 6928 M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ], 6929 MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() { 6930 return pad(Date.prototype.getMinutes.call(this), 2); 6931 } ], 6932 ss: [ "[0-5][0-9]", Date.prototype.setSeconds, "seconds", function() { 6933 return pad(Date.prototype.getSeconds.call(this), 2); 6934 } ], 6935 l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() { 6936 return pad(Date.prototype.getMilliseconds.call(this), 3); 6937 } ], 6938 L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() { 6939 return pad(Date.prototype.getMilliseconds.call(this), 2); 6940 } ], 6941 t: [ "[ap]" ], 6942 tt: [ "[ap]m" ], 6943 T: [ "[AP]" ], 6944 TT: [ "[AP]M" ], 6945 Z: [ "" ], 6946 o: [ "" ], 6947 S: [ "" ] 6948 }, formatAlias = { 6949 isoDate: "yyyy-mm-dd", 6950 isoTime: "HH:MM:ss", 6951 isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", 6952 isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" 6953 }; 6954 function getTokenizer(opts) { 6955 if (!opts.tokenizer) { 6956 var tokens = []; 6957 for (var ndx in formatCode) { 6958 if (tokens.indexOf(ndx[0]) === -1) tokens.push(ndx[0]); 6959 } 6960 opts.tokenizer = "(" + tokens.join("+|") + ")+?|."; 6961 opts.tokenizer = new RegExp(opts.tokenizer, "g"); 6962 } 6963 return opts.tokenizer; 6964 } 6965 function isValidDate(dateParts, currentResult) { 6966 return !isFinite(dateParts.rawday) || dateParts.day == "29" && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day ? currentResult : false;
6967 } 6968 function isDateInRange(dateParts, opts) { 6969 var result = true; 6970 if (opts.min) { 6971 if (dateParts["rawyear"]) { 6972 var rawYear = dateParts["rawyear"].replace(/[^0-9]/g, ""), minYear = opts.min.year.substr(0, rawYear.length); 6973 result = minYear <= rawYear; 6974 } 6975 if (dateParts["year"] === dateParts["rawyear"]) { 6976 if (opts.min.date.getTime() === opts.min.date.getTime()) { 6977 result = opts.min.date.getTime() <= dateParts.date.getTime(); 6978 } 6979 } 6980 } 6981 if (result && opts.max && opts.max.date.getTime() === opts.max.date.getTime()) { 6982 result = opts.max.date.getTime() >= dateParts.date.getTime(); 6983 } 6984 return result; 6985 } 6986 function parse(format, dateObjValue, opts, raw) { 6987 var mask = "", match; 6988 while (match = getTokenizer(opts).exec(format)) { 6989 if (dateObjValue === undefined) { 6990 if (formatCode[match[0]]) { 6991 mask += "(" + formatCode[match[0]][0] + ")"; 6992 } else { 6993 switch (match[0]) { 6994 case "[": 6995 mask += "("; 6996 break; 6997 6998 case "]": 6999 mask += ")?"; 7000 break; 7001 7002 default: 7003 mask += Inputmask.escapeRegex(match[0]); 7004 } 7005 } 7006 } else { 7007 if (formatCode[match[0]]) { 7008 if (raw !== true && formatCode[match[0]][3]) { 7009 var getFn = formatCode[match[0]][3]; 7010 mask += getFn.call(dateObjValue.date); 7011 } else if (formatCode[match[0]][2]) mask += dateObjValue["raw" + formatCode[match[0]][2]]; else mask += match[0]; 7012 } else mask += match[0]; 7013 } 7014 } 7015 return mask; 7016 } 7017 function pad(val, len) { 7018 val = String(val); 7019 len = len || 2; 7020 while (val.length < len) { 7021 val = "0" + val; 7022 } 7023 return val; 7024 } 7025 function analyseMask(maskString, format, opts) { 7026 var dateObj = { 7027 date: new Date(1, 0, 1) 7028 }, targetProp, mask = maskString, match, dateOperation, targetValidator; 7029 function extendProperty(value) { 7030 var correctedValue = value.replace(/[^0-9]/g, "0"); 7031 if (correctedValue != value) { 7032 var enteredPart = value.replace(/[^0-9]/g, ""), min = (opts.min && opts.min[targetProp] || value).toString(), max = (opts.max && opts.max[targetProp] || value).toString(); 7033 correctedValue = enteredPart + (enteredPart < min.slice(0, enteredPart.length) ? min.slice(enteredPart.length) : enteredPart > max.slice(0, enteredPart.length) ? max.slice(enteredPart.length) : correctedValue.toString().slice(enteredPart.length)); 7034 } 7035 return correctedValue; 7036 } 7037 function setValue(dateObj, value, opts) { 7038 dateObj[targetProp] = extendProperty(value); 7039 dateObj["raw" + targetProp] = value; 7040 if (dateOperation !== undefined) dateOperation.call(dateObj.date, targetProp == "month" ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]); 7041 } 7042 if (typeof mask === "string") { 7043 while (match = getTokenizer(opts).exec(format)) { 7044 var value = mask.slice(0, match[0].length); 7045 if (formatCode.hasOwnProperty(match[0])) { 7046 targetValidator = formatCode[match[0]][0]; 7047 targetProp = formatCode[match[0]][2]; 7048 dateOperation = formatCode[match[0]][1]; 7049 setValue(dateObj, value, opts); 7050 } 7051 mask = mask.slice(value.length); 7052 } 7053 return dateObj; 7054 } else if (mask && (typeof mask === "undefined" ? "undefined" : _typeof(mask)) === "object" && mask.hasOwnProperty("date")) { 7055 return mask; 7056 } 7057 return undefined; 7058 } 7059 Inputmask.extendAliases({ 7060 datetime: { 7061 mask: function mask(opts) { 7062 formatCode.S = opts.i18n.ordinalSuffix.join("|"); 7063 opts.inputFormat = formatAlias[opts.inputFormat] || opts.inputFormat; 7064 opts.displayFormat = formatAlias[opts.displayFormat] || opts.displayFormat || opts.inputFormat; 7065 opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat; 7066 opts.placeholder = opts.placeholder !== "" ? opts.placeholder : opts.inputFormat.replace(/[\[\]]/, ""); 7067 opts.regex = parse(opts.inputFormat, undefined, opts); 7068 return null; 7069 }, 7070 placeholder: "", 7071 inputFormat: "isoDateTime", 7072 displayFormat: undefined, 7073 outputFormat: undefined, 7074 min: null, 7075 max: null, 7076 i18n: { 7077 dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ], 7078 monthNames: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "
7078November", "December" ], 7079 ordinalSuffix: [ "st", "nd", "rd", "th" ] 7080 }, 7081 postValidation: function postValidation(buffer, pos, currentResult, opts) { 7082 opts.min = analyseMask(opts.min, opts.inputFormat, opts); 7083 opts.max = analyseMask(opts.max, opts.inputFormat, opts); 7084 var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts); 7085 if (result && dateParts.date.getTime() === dateParts.date.getTime()) { 7086 result = isValidDate(dateParts, result); 7087 result = result && isDateInRange(dateParts, opts); 7088 } 7089 if (pos && result && currentResult.pos !== pos) { 7090 return { 7091 buffer: parse(opts.inputFormat, dateParts, opts), 7092 refreshFromBuffer: { 7093 start: pos, 7094 end: currentResult.pos 7095 } 7096 }; 7097 } 7098 return result; 7099 }, 7100 onKeyDown: function onKeyDown(e, buffer, caretPos, opts) { 7101 var input = this; 7102 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) { 7103 var today = new Date(), match, date = ""; 7104 while (match = getTokenizer(opts).exec(opts.inputFormat)) { 7105 if (match[0].charAt(0) === "d") { 7106 date += pad(today.getDate(), match[0].length); 7107 } else if (match[0].charAt(0) === "m") { 7108 date += pad(today.getMonth() + 1, match[0].length); 7109 } else if (match[0] === "yyyy") { 7110 date += today.getFullYear().toString(); 7111 } else if (match[0].charAt(0) === "y") { 7112 date += pad(today.getYear(), match[0].length); 7113 } 7114 } 7115 input.inputmask._valueSet(date); 7116 $(input).trigger("setvalue"); 7117 } 7118 }, 7119 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 7120 return parse(opts.outputFormat, analyseMask(maskedValue, opts.inputFormat, opts), opts, true); 7121 }, 7122 casing: function casing(elem, test, pos, validPositions) { 7123 if (test.nativeDef.indexOf("[ap]") == 0) return elem.toLowerCase(); 7124 if (test.nativeDef.indexOf("[AP]") == 0) return elem.toUpperCase(); 7125 return elem; 7126 }, 7127 insertMode: false, 7128 shiftPositions: false 7129 } 7130 }); 7131 return Inputmask; 7132 }); 7133}, function(module, exports, __webpack_require__) { 7134 "use strict"; 7135 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 7136 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 7137 return typeof obj; 7138 } : function(obj) { 7139 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 7140 }; 7141 (function(factory) { 7142 if (true) { 7143 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(2) ], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, 7144 __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 7145 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 7146 } else {} 7147 })(function(Inputmask) { 7148 var $ = Inputmask.dependencyLib; 7149 function autoEscape(txt, opts) { 7150 var escapedTxt = ""; 7151 for (var i = 0; i < txt.length; i++) { 7152 if (Inputmask.prototype.definitions[txt.charAt(i)] || opts.definitions[txt.charAt(i)] || opts.optionalmarker.start === txt.charAt(i) || opts.optionalmarker.end === txt.charAt(i) || opts.quantifiermarker.start === txt.charAt(i) || opts.quantifiermarker.end === txt.charAt(i) || opts.groupmarker.start === txt.charAt(i) || opts.groupmarker.end === txt.charAt(i) || opts.alternatormarker === txt.charAt(i)) { 7153 escapedTxt += "\\" + txt.charAt(i); 7154 } else escapedTxt += txt.charAt(i); 7155 } 7156 return escapedTxt; 7157 } 7158 function alignDigits(buffer, digits, opts) { 7159 if (digits > 0) { 7160 var radixPosition = $.inArray(opts.radixPoint, buffer); 7161 if (radixPosition === -1) { 7162 buffer.push(opts.radixPoint); 7163 radixPosition = buffer.length - 1; 7164 } 7165 for (var i = 1; i <= digits; i++) { 7166 buffer[radixPosition + i] = buffer[radixPosition + i] || "0"; 7167 } 7168 } 7169 return buffer; 7170 } 7171 Inputmask.extendAliases({ 7172 numeric: { 7173 mask: function mask(opts) { 7174 if (opts.repeat !== 0 && isNaN(opts.integerDigits)) { 7175 opts.integerDigits = opts.repeat; 7176 } 7177 opts.repeat = 0; 7178 if (opts.groupSeparator === opts.radixPoint && opts.digits && opts.digits !== "0") { 7179 if (opts.radixPoint === ".") { 7180 opts.groupSeparator = ","; 7181 } else if (opts.radixPoint === ",") { 7182 opts.groupSeparator = "."; 7183 } else opts.groupSeparator = ""; 7184 } 7185 if (opts.groupSeparator === " ") { 7186 opts.skipOptionalPartCharacter = undefined; 7187 } 7188 opts.autoGroup = opts.autoGroup && opts.groupSeparator !== ""; 7189 if (opts.autoGroup) { 7190 if (typeof opts.groupSize == "string" && isFinite(opts.groupSize)) opts.groupSize = parseInt(opts.groupSize); 7191 if (isFinite(opts.integerDigits)) { 7192 var seps = Math.floor(opts.integerDigits / opts.groupSize); 7193 var mod = opts.integerDigits % opts.groupSize; 7194 opts.integerDigits = parseInt(opts.integerDigits) + (mod === 0 ? seps - 1 : seps); 7195 if (opts.integerDigits < 1) { 7196 opts.integerDigits = "*"; 7197 } 7198 } 7199 } 7200 if (opts.placeholder.length > 1) { 7201 opts.placeholder = opts.placeholder.charAt(0); 7202 } 7203 if (opts.positionCaretOnClick === "radixFocus" && opts.placeholder === "" && opts.integerOptional === false) { 7204 opts.positionCaretOnClick = "lvp"; 7205 } 7206 opts.definitions[";"] = opts.definitions["~"]; 7207 opts.definitions[";"].definitionSymbol = "~"; 7208 if (opts.numericInput === true) { 7209 opts.positionCaretOnClick = opts.positionCaretOnClick === "radixFocus" ? "lvp" : opts.positionCaretOnClick; 7210 opts.digitsOptional = false;
7211 if (isNaN(opts.digits)) opts.digits = 2; 7212 opts.decimalProtect = false; 7213 } 7214 var mask = "[+]"; 7215 mask += autoEscape(opts.prefix, opts); 7216 if (opts.integerOptional === true) { 7217 mask += "~{1," + opts.integerDigits + "}"; 7218 } else mask += "~{" + opts.integerDigits + "}"; 7219 if (opts.digits !== undefined) { 7220 var radixDef = opts.decimalProtect ? ":" : opts.radixPoint; 7221 var dq = opts.digits.toString().split(","); 7222 if (isFinite(dq[0]) && dq[1] && isFinite(dq[1])) { 7223 mask += radixDef + ";{" + opts.digits + "}"; 7224 } else if (isNaN(opts.digits) || parseInt(opts.digits) > 0) { 7225 if (opts.digitsOptional) { 7226 mask += "[" + radixDef + ";{1," + opts.digits + "}]"; 7227 } else mask += radixDef + ";{" + opts.digits + "}"; 7228 } 7229 } 7230 mask += autoEscape(opts.suffix, opts); 7231 mask += "[-]"; 7232 opts.greedy = false; 7233 return mask; 7234 }, 7235 placeholder: "", 7236 greedy: false, 7237 digits: "*", 7238 digitsOptional: true, 7239 enforceDigitsOnBlur: false, 7240 radixPoint: ".", 7241 positionCaretOnClick: "radixFocus", 7242 groupSize: 3, 7243 groupSeparator: "", 7244 autoGroup: false, 7245 allowMinus: true, 7246 negationSymbol: { 7247 front: "-", 7248 back: "" 7249 }, 7250 integerDigits: "+", 7251 integerOptional: true, 7252 prefix: "", 7253 suffix: "", 7254 rightAlign: true, 7255 decimalProtect: true, 7256 min: null, 7257 max: null, 7258 step: 1, 7259 insertMode: true, 7260 autoUnmask: false, 7261 unmaskAsNumber: false, 7262 inputType: "text", 7263 inputmode: "numeric", 7264 preValidation: function preValidation(buffer, pos, c, isSelection, opts, maskset) { 7265 if (c === "-" || c === opts.negationSymbol.front) { 7266 if (opts.allowMinus !== true) return false; 7267 opts.isNegative = opts.isNegative === undefined ? true : !opts.isNegative; 7268 if (buffer.join("") === "") return true; 7269 return { 7270 caret: maskset.validPositions[pos] ? pos : undefined, 7271 dopost: true 7272 }; 7273 } 7274 if (isSelection === false && c === opts.radixPoint && opts.digits !== undefined && (isNaN(opts.digits) || parseInt(opts.digits) > 0)) { 7275 var radixPos = $.inArray(opts.radixPoint, buffer); 7276 if (radixPos !== -1 && maskset.validPositions[radixPos] !== undefined) { 7277 if (opts.numericInput === true) { 7278 return pos === radixPos; 7279 } 7280 return { 7281 caret: radixPos + 1 7282 }; 7283 } 7284 } 7285 return true; 7286 }, 7287 postValidation: function postValidation(buffer, pos, currentResult, opts) { 7288 function buildPostMask(buffer, opts) { 7289 var postMask = ""; 7290 postMask += "(" + opts.groupSeparator + "*{" + opts.groupSize + "}){*}"; 7291 if (opts.radixPoint !== "") { 7292 var radixSplit = buffer.join("").split(opts.radixPoint); 7293 if (radixSplit[1]) { 7294 postMask += opts.radixPoint + "*{" + radixSplit[1].match(/^\d*\??\d*/)[0].length + "}"; 7295 } 7296 } 7297 return postMask; 7298 } 7299 var suffix = opts.suffix.split(""), prefix = opts.prefix.split(""); 7300 if (currentResult.pos === undefined && currentResult.caret !== undefined && currentResult.dopost !== true) return currentResult; 7301 var caretPos = currentResult.caret !== undefined ? currentResult.caret : currentResult.pos; 7302 var maskedValue = buffer.slice(); 7303 if (opts.numericInput) { 7304 caretPos = maskedValue.length - caretPos - 1; 7305 maskedValue = maskedValue.reverse(); 7306 } 7307 var charAtPos = maskedValue[caretPos]; 7308 if (charAtPos === opts.groupSeparator) { 7309 caretPos += 1; 7310 charAtPos = maskedValue[caretPos]; 7311 } 7312 if (caretPos === maskedValue.length - opts.suffix.length - 1 && charAtPos === opts.radixPoint) return currentResult; 7313 if (charAtPos !== undefined) { 7314 if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) { 7315 maskedValue[caretPos] = "?"; 7316 if (opts.prefix.length > 0 && caretPos >= (opts.isNegative === false ? 1 : 0) && caretPos < opts.prefix.length - 1 + (opts.isNegative === false ? 1 : 0)) { 7317 prefix[caretPos - (opts.isNegative === false ? 1 : 0)] = "?"; 7318 } else if (opts.suffix.length > 0 && caretPos >= maskedValue.length - opts.suffix.length - (opts.isNegative === false ? 1 : 0)) { 7319 suffix[caretPos - (maskedValue.length - opts.suffix.length - (opts.isNegative === false ? 1 : 0))] = "?"; 7320 } 7321 } 7322 } 7323 prefix = prefix.join(""); 7324 suffix = suffix.join(""); 7325 var processValue = maskedValue.join("").replace(prefix, ""); 7326 processValue = processValue.replace(suffix, ""); 7327 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 7328 processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""); 7329 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 7330 if (isNaN(opts.placeholder)) { 7331 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), "g"), ""); 7332 } 7333 if (processValue.length > 1 && processValue.indexOf(opts.radixPoint) !== 1) { 7334 if (charAtPos === "0") { 7335 processValue = processValue.replace(/^\?/g, ""); 7336 } 7337 processValue = processValue.replace(/^0/g, ""); 7338 } 7339 if (processValue.charAt(0) === opts.radixPoint && opts.radixPoint !== "" && opts.numericInput !== true) { 7340 processValue = "0" + processValue; 7341 } 7342 if (processValue !== "") { 7343 processValue = processValue.split(""); 7344 if ((!opts.digitsOptional || opts.enforceDigitsOnBlur && currentResult.event === "blur") && isFinite(opts.digits)) { 7345 var radixPosition = $.inArray(opts.radixPoint, processValue); 7346 var rpb = $.inArray(opts.radixPoint, maskedValue); 7347 if (radixPosition === -1) { 7348 processValue.push(opts.radixPoint); 7349 radixPosition = processValue.length - 1; 7350 } 7351 for (var i = 1; i <= opts.digits; i++) { 7352 if ((!opts.digitsOptional || opts.enforceDigitsOnBlur && currentResult.event === "blur") && (processValue[radixPosition + i] === undefined || processValue[radixPosition + i] === opts.placeholder.charAt(0))) { 7353 processValue[radixPosition + i] = currentResult.placeholder || opts.placeholder.charAt(0); 7354 } else if (rpb !== -1 && maskedValue[rpb + i] !== undefined) { 7355 processValue[radixPosition + i] = processValue[radixPosition + i] || maskedValue[rpb + i]; 7356 } 7357 } 7358 } 7359 if (opts.autoGroup === true && opts.groupSeparator !== "" && (charAtPos !== opts.radixPoint || currentResult.pos !== undefined || currentResult.dopost)) { 7360 var addRadix = processValue[processValue.length - 1] === opts.radixPoint && currentResult.c === opts.radixPoint; 7361 processValue = Inputmask(buildPostMask(processValue, opts), { 7362 numericInput: true, 7363 jitMasking: true, 7364 definitions: { 7365 "*": { 7366 validator: "[0-9?]", 7367 cardinality: 1 7368 } 7369 } 7370 }).format(processValue.join("")); 7371 if (addRadix) processValue += opts.radixPoint; 7372 if (processValue.charAt(0) === opts.groupSeparator) { 7373 processValue.substr(1); 7374 } 7375 } else processValue = processValue.join(""); 7376 } 7377 if (opts.isNegative && currentResult.event === "blur") { 7378 opts.isNegative = processValue !== "0"; 7379 } 7380 processValue = prefix + processValue; 7381 processValue += suffix; 7382 if (opts.isNegative) { 7383 processValue = opts.negationSymbol.front + processValue; 7384 processValue += opts.negationSymbol.back; 7385 } 7386 processValue = processValue.split(""); 7387 if (charAtPos !== undefined) { 7388 if (charAtPos !== opts.radixPoint && charAtPos !== opts.negationSymbol.front && charAtPos !== opts.negationSymbol.back) { 7389 caretPos = $.inArray("?", processValue); 7390 if (caretPos > -1) { 7391 processValue[caretPos] = charAtPos; 7392 } else caretPos = currentResult.caret || 0; 7393 } else if (charAtPos === opts.radixPoint || charAtPos === opts.negationSymbol.front || charAtPos === opts.negationSymbol.back) { 7394 var newCaretPos = $.inArray(charAtPos, processValue); 7395 if (newCaretPos !== -1) caretPos = newCaretPos; 7396 } 7397 } 7398 if (opts.numericInput) { 7399 caretPos = processValue.length - caretPos - 1; 7400 processValue = processValue.reverse(); 7401 } 7402 var rslt = { 7403 caret: (charAtPos === undefined || currentResult.pos !== undefined) && caretPos !== undefined ? caretPos + (opts.numericInput ? -1 : 1) : caretPos, 7404 buffer: processValue, 7405 refreshFromBuffer: currentResult.dopost || buffer.join("") !== processValue.join("") 7406 }; 7407 return rslt.refreshFromBuffer ? rslt : currentResult; 7408 }, 7409 onBeforeWrite: function onBeforeWrite(e, buffer, caretPos, opts) { 7410 function parseMinMaxOptions(opts) { 7411 if (opts.parseMinMaxOptions === undefined) { 7412 if (opts.min !== null) { 7413 opts.min = opts.min.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 7414 if (opts.radixPoint === ",") opts.min = opts.min.replace(opts.radixPoint, "."); 7415 opts.min = isFinite(opts.min) ? parseFloat(opts.min) : NaN; 7416 if (isNaN(opts.min)) opts.min = Number.MIN_VALUE; 7417 } 7418 if (opts.max !== null) { 7419 opts.max = opts.max.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 7420 if (opts.radixPoint === ",") opts.max = opts.max.replace(opts.radixPoint, "."); 7421 opts.max = isFinite(opts.max) ? parseFloat(opts.max) : NaN; 7422 if (isNaN(opts.max)) opts.max = Number.MAX_VALUE; 7423 } 7424 opts.parseMinMaxOptions = "done"; 7425 } 7426 } 7427 if (e) { 7428 switch (e.type) { 7429 case "keydown": 7430 return opts.postValidation(buffer, caretPos, { 7431 caret: caretPos, 7432 dopost: true 7433 }, opts); 7434 7435 case "blur": 7436 case "checkval": 7437 var unmasked; 7438 parseMinMaxOptions(opts); 7439 if (opts.min !== null || opts.max !== null) { 7440 unmasked = opts.onUnMask(buffer.join(""), undefined, $.extend({}, opts, { 7441 unmaskAsNumber: true 7442 })); 7443 if (opts.min !== null && unmasked < opts.min) { 7444 opts.isNegative = opts.min < 0; 7445 return opts.postValidation(opts.min.toString().replace(".", opts.radixPoint).split(""), caretPos, { 7446 caret: caretPos, 7447 dopost: true, 7448 placeholder: "0" 7449 }, opts); 7450 } else if (opts.max !== null && unmasked > opts.max) { 7451 opts.isNegative = opts.max < 0; 7452 return opts.postValidation(opts.max.toString().replace(".", opts.radixPoint).split(""), caretPos, { 7453 caret: caretPos, 7454 dopost: true, 7455 placeholder: "0" 7456 }, opts); 7457 } 7458 } 7459 return opts.postValidation(buffer, caretPos, { 7460 caret: caretPos, 7461 placeholder: "0", 7462 event: "blur" 7463 }, opts); 7464 7465 case "_checkval": 7466 return { 7467 caret: caretPos 7468 }; 7469 7470 default: 7471 break; 7472 } 7473 } 7474 }, 7475 regex: { 7476 integerPart: function integerPart(opts, emptyCheck) { 7477 return emptyCheck ? new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?") : new RegExp("[" + Inputmask.escapeRegex(opts.negationSymbol.front) + "+]?\\d+"); 7478 }, 7479 integerNPart: function integerNPart(opts) { 7480 return new RegExp("[\\d" + Inputmask.escapeRegex(opts.
7480groupSeparator) + Inputmask.escapeRegex(opts.placeholder.charAt(0)) + "]+"); 7481 } 7482 }, 7483 definitions: { 7484 "~": { 7485 validator: function validator(chrs, maskset, pos, strict, opts, isSelection) { 7486 var isValid, l; 7487 if (chrs === "k" || chrs === "m") { 7488 isValid = { 7489 insert: [], 7490 c: 0 7491 }; 7492 for (var i = 0, l = chrs === "k" ? 2 : 5; i < l; i++) { 7493 isValid.insert.push({ 7494 pos: pos + i, 7495 c: 0 7496 }); 7497 } 7498 isValid.pos = pos + l; 7499 return isValid; 7500 } 7501 isValid = strict ? new RegExp("[0-9" + Inputmask.escapeRegex(opts.groupSeparator) + "]").test(chrs) : new RegExp("[0-9]").test(chrs); 7502 if (isValid === true) { 7503 if (opts.numericInput !== true && maskset.validPositions[pos] !== undefined && maskset.validPositions[pos].match.def === "~" && !isSelection) { 7504 var processValue = maskset.buffer.join(""); 7505 processValue = processValue.replace(new RegExp("[-" + Inputmask.escapeRegex(opts.negationSymbol.front) + "]", "g"), ""); 7506 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 7507 var pvRadixSplit = processValue.split(opts.radixPoint); 7508 if (pvRadixSplit.length > 1) { 7509 pvRadixSplit[1] = pvRadixSplit[1].replace(/0/g, opts.placeholder.charAt(0)); 7510 } 7511 if (pvRadixSplit[0] === "0") { 7512 pvRadixSplit[0] = pvRadixSplit[0].replace(/0/g, opts.placeholder.charAt(0)); 7513 } 7514 processValue = pvRadixSplit[0] + opts.radixPoint + pvRadixSplit[1] || ""; 7515 var bufferTemplate = maskset._buffer.join(""); 7516 if (processValue === opts.radixPoint) { 7517 processValue = bufferTemplate; 7518 } 7519 while (processValue.match(Inputmask.escapeRegex(bufferTemplate) + "$") === null) { 7520 bufferTemplate = bufferTemplate.slice(1); 7521 } 7522 processValue = processValue.replace(bufferTemplate, ""); 7523 processValue = processValue.split(""); 7524 if (processValue[pos] === undefined) { 7525 isValid = { 7526 pos: pos, 7527 remove: pos 7528 }; 7529 } else { 7530 isValid = { 7531 pos: pos 7532 }; 7533 } 7534 } 7535 } else if (!strict && chrs === opts.radixPoint && maskset.validPositions[pos - 1] === undefined) { 7536 isValid = { 7537 insert: { 7538 pos: pos, 7539 c: 0 7540 }, 7541 pos: pos + 1 7542 }; 7543 } 7544 return isValid; 7545 }, 7546 cardinality: 1 7547 }, 7548 "+": { 7549 validator: function validator(chrs, maskset, pos, strict, opts) { 7550 return opts.allowMinus && (chrs === "-" || chrs === opts.negationSymbol.front); 7551 }, 7552 cardinality: 1, 7553 placeholder: "" 7554 }, 7555 "-": { 7556 validator: function validator(chrs, maskset, pos, strict, opts) { 7557 return opts.allowMinus && chrs === opts.negationSymbol.back; 7558 }, 7559 cardinality: 1, 7560 placeholder: "" 7561 }, 7562 ":": { 7563 validator: function validator(chrs, maskset, pos, strict, opts) { 7564 var radix = "[" + Inputmask.escapeRegex(opts.radixPoint) + "]"; 7565 var isValid = new RegExp(radix).test(chrs); 7566 if (isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder === opts.radixPoint) { 7567 isValid = { 7568 caret: pos + 1 7569 }; 7570 } 7571 return isValid; 7572 }, 7573 cardinality: 1, 7574 placeholder: function placeholder(opts) { 7575 return opts.radixPoint; 7576 } 7577 } 7578 }, 7579 onUnMask: function onUnMask(maskedValue, unmaskedValue, opts) { 7580 if (unmaskedValue === "" && opts.nullable === true) { 7581 return unmaskedValue; 7582 } 7583 var processValue = maskedValue.replace(opts.prefix, ""); 7584 processValue = processValue.replace(opts.suffix, ""); 7585 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""); 7586 if (opts.placeholder.charAt(0) !== "") { 7587 processValue = processValue.replace(new RegExp(opts.placeholder.charAt(0), "g"), "0"); 7588 } 7589 if (opts.unmaskAsNumber) { 7590 if (opts.radixPoint !== "" && processValue.indexOf(opts.radixPoint) !== -1) processValue = processValue.replace(Inputmask.escapeRegex.call(this, opts.radixPoint), "."); 7591 processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"); 7592 processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 7593 return Number(processValue); 7594 } 7595 return processValue; 7596 }, 7597 isComplete: function isComplete(buffer, opts) { 7598 var maskedValue = (opts.numericInput ? buffer.slice().reverse() : buffer).join(""); 7599 maskedValue = maskedValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"); 7600 maskedValue = maskedValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""); 7601 maskedValue = maskedValue.replace(opts.prefix, ""); 7602 maskedValue = maskedValue.replace(opts.suffix, ""); 7603 maskedValue = maskedValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator) + "([0-9]{3})", "g"), "$1"); 7604 if (opts.radixPoint === ",") maskedValue = maskedValue.replace(Inputmask.escapeRegex(opts.radixPoint), "."); 7605 return isFinite(maskedValue); 7606 }, 7607 onBeforeMask: function onBeforeMask(initialValue, opts) { 7608 opts.isNegative = undefined; 7609 var radixPoint = opts.radixPoint || ","; 7610 if ((typeof initialValue == "number" || opts.inputType === "number") && radixPoint !== "") { 7611 initialValue = initialValue.toString().replace(".", radixPoint); 7612 } 7613 var valueParts = initialValue.split(radixPoint), integerPart = valueParts[0].replace(/[^\-0-9]/g, ""), decimalPart = valueParts.length > 1 ? valueParts[1].replace(/[^0-9]/g, "") : ""; 7614 initialValue = integerPart + (decimalPart !== "" ? radixPoint + decimalPart : decimalPart); 7615 var digits = 0; 7616 if (radixPoint !== "") { 7617 digits = decimalPart.length; 7618 if (decimalPart !== "") { 7619 var digitsFactor = Math.pow(10, digits || 1); 7620 if (isFinite(opts.digits)) { 7621 digits = parseInt(opts.digits); 7622 digitsFactor = Math.pow(10, digits); 7623 } 7624 initialValue = initialValue.replace(Inputmask.escapeRegex(radixPoint), "."); 7625 if (isFinite(initialValue)) initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor; 7626 initialValue = initialValue.toString().replace(".", radixPoint); 7627 } 7628 } 7629 if (opts.digits === 0 && initialValue.indexOf(Inputmask.escapeRegex(radixPoint)) !== -1) { 7630 initialValue = initialValue.substring(0, initialValue.indexOf(Inputmask.escapeRegex(radixPoint))); 7631 } 7632 return alignDigits(initialValue.toString().split(""), digits, opts).join(""); 7633 }, 7634 onKeyDown: function onKeyDown(e, buffer, caretPos, opts) { 7635 var $input = $(this); 7636 if (e.ctrlKey) { 7637 switch (e.keyCode) { 7638 case Inputmask.keyCode.UP: 7639 $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)); 7640 $input.trigger("setvalue"); 7641 break; 7642 7643 case Inputmask.keyCode.DOWN: 7644 $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)); 7645 $input.trigger("setvalue"); 7646 break; 7647 } 7648 } 7649 } 7650 }, 7651 currency: { 7652 prefix: "$ ", 7653 groupSeparator: ",", 7654 alias: "numeric", 7655 placeholder: "0", 7656 autoGroup: true, 7657 digits: 2, 7658 digitsOptional: false, 7659 clearMaskOnLostFocus: false 7660 },
7661 decimal: { 7662 alias: "numeric" 7663 }, 7664 integer: { 7665 alias: "numeric", 7666 digits: 0, 7667 radixPoint: "" 7668 }, 7669 percentage: { 7670 alias: "numeric", 7671 digits: 2, 7672 digitsOptional: true, 7673 radixPoint: ".", 7674 placeholder: "0", 7675 autoGroup: false, 7676 min: 0, 7677 max: 100, 7678 suffix: " %", 7679 allowMinus: false 7680 } 7681 }); 7682 return Inputmask; 7683 }); 7684}, function(module, exports, __webpack_require__) { 7685 "use strict"; 7686 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; 7687 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) { 7688 return typeof obj; 7689 } : function(obj) { 7690 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; 7691 }; 7692 (function(factory) { 7693 if (true) { 7694 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(4), __webpack_require__(2) ], 7695 __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, 7696 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 7697 } else {} 7698 })(function($, Inputmask) { 7699 if ($.fn.inputmask === undefined) { 7700 $.fn.inputmask = function(fn, options) { 7701 var nptmask, input = this[0]; 7702 if (options === undefined) options = {}; 7703 if (typeof fn === "string") { 7704 switch (fn) { 7705 case "unmaskedvalue": 7706 return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val(); 7707 7708 case "remove": 7709 return this.each(function() { 7710 if (this.inputmask) this.inputmask.remove(); 7711 }); 7712 7713 case "getemptymask": 7714 return input && input.inputmask ? input.inputmask.getemptymask() : ""; 7715 7716 case "hasMaskedValue": 7717 return input && input.inputmask ? input.inputmask.hasMaskedValue() : false; 7718 7719 case "isComplete": 7720 return input && input.inputmask ? input.inputmask.isComplete() : true; 7721 7722 case "getmetadata": 7723 return input && input.inputmask ? input.inputmask.getmetadata() : undefined; 7724 7725 case "setvalue": 7726 Inputmask.setValue(input, options); 7727 break; 7728 7729 case "option": 7730 if (typeof options === "string") { 7731 if (input && input.inputmask !== undefined) { 7732 return input.inputmask.option(options); 7733 } 7734 } else { 7735 return this.each(function() { 7736 if (this.inputmask !== undefined) { 7737 return this.inputmask.option(options); 7738 } 7739 }); 7740 } 7741 break; 7742 7743 default: 7744 options.alias = fn; 7745 nptmask = new Inputmask(options); 7746 return this.each(function() { 7747 nptmask.mask(this); 7748 }); 7749 } 7750 } else if (Array.isArray(fn)) { 7751 options.alias = fn; 7752 nptmask = new Inputmask(options); 7753 return this.each(function() { 7754 nptmask.mask(this); 7755 }); 7756 } else if ((typeof fn === "undefined" ? "undefined" : _typeof(fn)) == "object") { 7757 nptmask = new Inputmask(fn);
7758 if (fn.mask === undefined && fn.alias === undefined) { 7759 return this.each(function() { 7760 if (this.inputmask !== undefined) { 7761 return this.inputmask.option(fn); 7762 } else nptmask.mask(this); 7763 }); 7764 } else { 7765 return this.each(function() { 7766 nptmask.mask(this); 7767 }); 7768 } 7769 } else if (fn === undefined) { 7770 return this.each(function() { 7771 nptmask = new Inputmask(options); 7772 nptmask.mask(this); 7773 }); 7774 } 7775 }; 7776 } 7777 return $.fn.inputmask; 7778 }); 7779} ]); 7780/* End */ 7781; 7782; /* Start:"a:4:{s:4:"full";s:64:"/bitrix/templates/gvozdevsoft_event_s1/js/main.js?17780841104684";s:6:"source";s:49:"/bitrix/templates/gvozdevsoft_event_s1/js/main.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 7783$(document).ready(function(){ 7784 7785 $(".mygallery").justifiedGallery({ 7786 rowHeight : 130, 7787 lastRow : 'nojustify', 7788 captions : false, 7789 border : 0, 7790 margins : 7 7791 }); 7792 $(".mygallery-catalog").justifiedGallery({ 7793 rowHeight : 60, 7794 lastRow : 'nojustify', 7795 captions : false, 7796 border : 0, 7797 margins : 7 7798 }); 7799 7800 //Slider main page 7801 $(".owl-carousel").owlCarousel({ 7802 items:1, 7803 loop:true, 7804 margin:0, 7805 nav:true, 7806 autoplay:true, 7807 autoplayTimeout:6000, 7808 smartSpeed:750, 7809 autoplayHoverPause:false 7810 }); 7811 $(".owl-prev").html("<i class='fa fa-angle-left'></i>"); 7812 $(".owl-next").html("<i class='fa fa-angle-right'></i>"); 7813 7814 // Stiky menu - sidebar 7815 $('#sidebar_fixed').sticky({topSpacing:70}); 7816 7817 //Slider Index v.1.6.0 - sidebar photo 7818 $("#index_photo").slick({ 7819 arrows: true, 7820 nextArrow: '<i class="fa fa-arrow-circle-right nextarr" aria-hidden="true"></i>', 7821 prevArrow: '<i class="fa fa-arrow-circle-left prevarr" aria-hidden="true"></i>', 7822 dots: false, 7823 infinite: true, 7824 speed: 300, 7825 slidesToShow: 4, 7826 slidesToScroll: 4, 7827 responsive: [ 7828 { 7829 breakpoint: 1024, 7830 settings: { 7831 slidesToShow: 3, 7832 slidesToScroll: 3, 7833 infinite: true, 7834 dots: false 7835 } 7836 }, 7837 { 7838 breakpoint: 768, 7839 settings: { 7840 slidesToShow: 2, 7841 slidesToScroll: 2 7842 } 7843 }, 7844 { 7845 breakpoint: 480, 7846 settings: { 7847 slidesToShow: 1, 7848 slidesToScroll: 1 7849 } 7850 } 7851 ] 7852 }); 7853 7854 //Slider Index v.1.6.0 - partnery 7855 $("#index_partnery").slick({ 7856 arrows: true, 7857 nextArrow: '<i class="fa fa-arrow-circle-right nextarr" aria-hidden="true"></i>', 7858 prevArrow: '<i class="fa fa-arrow-circle-left prevarr" aria-hidden="true"></i>', 7859 dots: false, 7860 infinite: true, 7861 autoplay: true, 7862 autoplaySpeed: 2000, 7863 speed: 300, 7864 slidesToShow: 5, 7865 slidesToScroll: 1, 7866 responsive: [ 7867 { 7868 breakpoint: 1024, 7869 settings: { 7870 slidesToShow: 5, 7871 slidesToScroll: 1, 7872 infinite: true, 7873 dots: false 7874 } 7875 }, 7876 { 7877 breakpoint: 992, 7878 settings: { 7879 slidesToShow: 4, 7880 slidesToScroll: 1, 7881 infinite: true, 7882 dots: false 7883 } 7884 }, 7885 { 7886 breakpoint: 768, 7887 settings: { 7888 slidesToShow: 3, 7889 slidesToScroll: 1 7890 } 7891 }, 7892 { 7893 breakpoint: 480, 7894 settings: { 7895 slidesToShow: 2, 7896 slidesToScroll: 1 7897 } 7898 } 7899 ] 7900 }); 7901 7902 //Slider Slick v.1.6.0 - sidebar photo 7903 $("#sidebar_photo").slick({ 7904 arrows: true, 7905 nextArrow: '<i class="fa fa-arrow-circle-right nextarr" aria-hidden="true"></i>', 7906 prevArrow: '<i class="fa fa-arrow-circle-left prevarr" aria-hidden="true"></i>', 7907 infinite: true, 7908 speed: 500 7909 }); 7910 7911 //Slider Slick v.1.6.0 - sidebar otzyv 7912 $("#sidebar_otzyv").slick({ 7913 arrows: true, 7914 nextArrow: '<i class="fa fa-arrow-circle-right nextarr" aria-hidden="true"></i>', 7915 prevArrow: '<i class="fa fa-arrow-circle-left prevarr" aria-hidden="true"></i>', 7916 infinite: true, 7917 speed: 500 7918 }); 7919 7920 //Slider Slick v.1.6.0 - sidebar action 7921 $("#sidebar_action").slick({ 7922 arrows: true, 7923 nextArrow: '<i class="fa fa-arrow-circle-right nextarr" aria-hidden="true"></i>', 7924 prevArrow: '<i class="fa fa-arrow-circle-left prevarr" aria-hidden="true"></i>', 7925 autoplay: true, 7926 autoplaySpeed: 4000, 7927 infinite: true, 7928 speed: 500 7929 }); 7930 7931 //Slider Slick v.1.6.0 - uslugi bottom 7932 $('#carousel_photo').slick({ 7933 arrows: true, 7934 nextArrow: '<i class="fa fa-arrow-circle-right nextarr" aria-hidden="true"></i>', 7935 prevArrow: '<i class="fa fa-arrow-circle-left prevarr" aria-hidden="true"></i>', 7936 dots: false, 7937 infinite: true, 7938 speed: 300, 7939 slidesToShow: 3, 7940 slidesToScroll: 3, 7941 responsive: [ 7942 { 7943 breakpoint: 1024, 7944 settings: { 7945 slidesToShow: 3, 7946 slidesToScroll: 3, 7947 infinite: true, 7948 dots: false 7949 } 7950 }, 7951 { 7952 breakpoint: 768, 7953 settings: { 7954 slidesToShow: 2, 7955 slidesToScroll: 2 7956 } 7957 }, 7958 { 7959 breakpoint: 480, 7960 settings: { 7961 slidesToShow: 1, 7962 slidesToScroll: 1 7963 } 7964 } 7965 ] 7966 }); 7967 7968 // Taby - calc 7969 $("#tabs").lightTabs();
7970 7971 //Maska nomer phone 7972 $(".inputmask").inputmask("+7 (999) 999-99-99"); 7973 7974 // Spaces in a prices 7975 $(".pricespace").each(function(){ 7976 var price = $(this).html(); 7977 var parts = (price + '').split('.'); 7978 var main = parts[0]; 7979 var len = main.length; 7980 var pricetxt = ''; 7981 var i = len - 1; 7982 while(i >= 0) { 7983 pricetxt = main.charAt(i) + pricetxt; 7984 if ((len - i) % 3 === 0 && i > 0) { 7985 pricetxt = ' ' + pricetxt; 7986 } 7987 --i; 7988 } 7989 if (parts.length > 1) { pricetxt += '.' + parts[1]; } 7990 $(this).html(pricetxt); 7991 }); 7992 7993}); 7994/* End */ 7995; 7996; /* Start:"a:4:{s:4:"full";s:103:"/bitrix/templates/gvozdevsoft_event_s1/components/bitrix/menu/mn_flmenu_top/script.min.js?1778084110408";s:6:"source";s:85:"/bitrix/templates/gvozdevsoft_event_s1/components/bitrix/menu/mn_flmenu_top/script.js";s:3:"min";s:89:"/bitrix/templates/gvozdevsoft_event_s1/components/bitrix/menu/mn_flmenu_top/script.min.js";s:3:"map";s:89:"/bitrix/templates/gvozdevsoft_event_s1/components/bitrix/menu/mn_flmenu_top/script.map.js";}"*/ 7997var jshover=function(){var e=document.getElementById("horizontal-multilevel-menu");if(!e)return;var t=e.getElementsByTagName("li");for(var n=0;n<t.length;n++){t[n].onmouseover=function(){this.className+=" jshover"};t[n].onmouseout=function(){this.className=this.className.replace(new RegExp(" jshover\\b"),"")}}};if(window.attachEvent)window.attachEvent("onload",jshover); 7998/* End */ 7999;; /* /bitrix/templates/gvozdevsoft_event_s1/lib/jquery-1.11.0.min.js?177808411096381*/ 8000; /* /bitrix/templates/gvozdevsoft_event_s1/lib/slider-slick/slick.min.js?177808411041953*/ 8001; /* /bitrix/templates/gvozdevsoft_event_s1/lib/owl-carousel-2/js/owl.carousel.js?177808411088680*/ 8002; /* /bitrix/templates/gvozdevsoft_event_s1/lib/fancybox/jquery.fancybox.min.js?177808411068253*/ 8003; /* /bitrix/templates/gvozdevsoft_event_s1/lib/flex-gallery/jquery.justified-gallery.min.js?177808411018510*/ 8004; /* /bitrix/templates/gvozdevsoft_event_s1/lib/sticky/jquery.sticky.js?17780841103836*/ 8005; /* /bitrix/templates/gvozdevsoft_event_s1/lib/accordion/accordion.js?1778084110311*/ 8006; /* /bitrix/templates/gvozdevsoft_event_s1/lib/tabs/tabs.js?1778084110792*/ 8007; /* /bitrix/templates/gvozdevsoft_event_s1/lib/flmenu/flmenu.js?17780841105322*/ 8008; /* /bitrix/templates/gvozdevsoft_event_s1/lib/arrup/arrup.js?1778084110423*/ 8009; /* /bitrix/templates/gvozdevsoft_event_s1/lib/hdfix/hdfix.js?1778084110230*/ 8010; /* /bitrix/templates/gvozdevsoft_event_s1/lib/img-zoom/img-zoom.js?1778084110220*/ 8011; /* /lib/feedback/feedback.js?17782267286791*/ 8012; /* /bitrix/templates/gvozdevsoft_event_s1/lib/datepicker/datepicker.min.js?177808411036675*/ 8013; /* /bitrix/templates/gvozdevsoft_event_s1/lib/inputmask/jquery.inputmask.js?1778084110220934*/ 8014; /* /bitrix/templates/gvozdevsoft_event_s1/js/main.js?17780841104684*/ 8015; /* /bitrix/templates/gvozdevsoft_event_s1/components/bitrix/menu/mn_flmenu_top/script.min.js?1778084110408*/ 8016 8017//# sourceMappingURL=template_8a9976e5ff928ace1c1a206865c5ff99.map.js
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.